diff --git a/backend/src/BigRegister.Api/Contracts/Dtos.cs b/backend/src/BigRegister.Api/Contracts/Dtos.cs index 2d23a08..8322958 100644 --- a/backend/src/BigRegister.Api/Contracts/Dtos.cs +++ b/backend/src/BigRegister.Api/Contracts/Dtos.cs @@ -147,7 +147,14 @@ public sealed record BriefDto( IReadOnlyList Sections, BriefStatusDto Status, string DrafterId); -public sealed record BriefViewDto(BriefDto Brief, IReadOnlyList AvailablePassages); +// Decision flags for the CURRENT acting principal + this brief's live status +// (PRD-0002 phase P1) — the FE renders these, it never recomputes them. +public sealed record BriefDecisionsDto(bool CanEdit, bool CanApprove, bool CanReject, bool CanSend); + +public sealed record BriefViewDto(BriefDto Brief, IReadOnlyList AvailablePassages, BriefDecisionsDto Decisions); public sealed record SaveBriefRequest(IReadOnlyList Sections); public sealed record RejectBriefRequest(string Comments); + +// PRD-0002 §6: coarse, role-derived capabilities for nav/menu-level checks. +public sealed record MeDto(IReadOnlyList Capabilities); diff --git a/backend/src/BigRegister.Api/Data/BriefStore.cs b/backend/src/BigRegister.Api/Data/BriefStore.cs index 94bec04..5649bfd 100644 --- a/backend/src/BigRegister.Api/Data/BriefStore.cs +++ b/backend/src/BigRegister.Api/Data/BriefStore.cs @@ -1,4 +1,5 @@ using BigRegister.Api.Contracts; +using BigRegister.Domain.Authorization; namespace BigRegister.Api.Data; @@ -72,11 +73,13 @@ public static class BriefStore } } - public static (Outcome, BriefEntity?) Approve(string owner, string actingId, string at) => - Review(owner, actingId, e => new BriefStatusDto("approved", ApprovedBy: actingId, ApprovedAt: at)); + public static (Outcome, BriefEntity?) Approve(string owner, Principal principal, string at) => + Review(owner, principal, BriefAction.Approve, () => + new BriefStatusDto("approved", ApprovedBy: Authz.ActingId(principal), ApprovedAt: at)); - public static (Outcome, BriefEntity?) Reject(string owner, string actingId, string comments, string at) => - Review(owner, actingId, e => new BriefStatusDto("rejected", RejectedBy: actingId, RejectedAt: at, Comments: comments)); + public static (Outcome, BriefEntity?) Reject(string owner, Principal principal, string comments, string at) => + Review(owner, principal, BriefAction.Reject, () => + new BriefStatusDto("rejected", RejectedBy: Authz.ActingId(principal), RejectedAt: at, Comments: comments)); public static (Outcome, BriefEntity?) Send(string owner, string at) { @@ -109,15 +112,18 @@ public static class BriefStore } // Approve/reject share the guard: must be submitted, and the approver must differ - // from the drafter (a drafter cannot approve their own letter). - private static (Outcome, BriefEntity?) Review(string owner, string actingId, Func next) + // from the drafter (a drafter cannot approve their own letter). The SoD check is + // Authz.CanActOn — the SAME check the screen DTO's decision flags use — checked + // BEFORE the status guard so Forbidden vs Conflict ordering matches the old + // inline check exactly. + private static (Outcome, BriefEntity?) Review(string owner, Principal principal, BriefAction action, Func next) { lock (_gate) { if (!_byOwner.TryGetValue(owner, out var e)) return (Outcome.Conflict, null); - if (actingId == e.DrafterId) return (Outcome.Forbidden, null); + if (!Authz.CanActOn(action, principal, e.DrafterId)) return (Outcome.Forbidden, null); if (e.Status.Tag != "submitted") return (Outcome.Conflict, null); - e.Status = next(e); + e.Status = next(); return (Outcome.Ok, e); } } diff --git a/backend/src/BigRegister.Api/Domain/Authorization/Authz.cs b/backend/src/BigRegister.Api/Domain/Authorization/Authz.cs new file mode 100644 index 0000000..ce74fe2 --- /dev/null +++ b/backend/src/BigRegister.Api/Domain/Authorization/Authz.cs @@ -0,0 +1,59 @@ +using BigRegister.Api.Contracts; +using BigRegister.Api.Data; + +namespace BigRegister.Domain.Authorization; + +public enum PrincipalRole { Drafter, Approver } + +/// +/// The acting identity for this request. dev stub — NOT a security boundary: resolved +/// from the client-asserted X-Role header (mirrors the FE's `?role=` toggle). A real +/// system builds this from verified AD/OIDC claims (PRD-0002 §3, §7); everything else +/// in this file — the capability model, the single Authz.Can check both emitting and +/// enforcing — carries over unchanged once that swap happens. +/// +public sealed record Principal(PrincipalRole Role); + +public enum BriefAction { Approve, Reject, Send } + +/// +/// Single source of truth for brief authorization (PRD-0002 phase P1). The SAME +/// check both computes the decision flags shipped on the screen DTO (emit) and +/// gates the mutation endpoints (enforce) — so the two can never drift, closing the +/// classic broken-object-level-authorization gap (PRD-0002 §7). +/// +public static class Authz +{ + public static Principal ResolvePrincipal(HttpContext ctx) => + new(ctx.Request.Headers["X-Role"].ToString() == "approver" ? PrincipalRole.Approver : PrincipalRole.Drafter); + + public static string ActingId(Principal principal) => + principal.Role == PrincipalRole.Approver ? BriefStore.ApproverId : BriefStore.DrafterId; + + /// Coarse, resource-independent capabilities for `GET /me` (nav/menu-level — NOT + /// tied to any specific brief's live status; contrast Decisions below). + public static IReadOnlyList RoleCapabilities(Principal principal) => + principal.Role == PrincipalRole.Approver + ? new[] { "brief:approve", "brief:reject", "brief:send" } + : Array.Empty(); + + /// Role + four-eyes (SoD) check only — no status. This is the exact check + /// BriefStore.Review enforces before its status guard; kept separate from + /// Decisions() below so enforcement ORDER (Forbidden before Conflict) matches + /// today's behavior exactly. + public static bool CanActOn(BriefAction action, Principal principal, string drafterId) => action switch + { + BriefAction.Approve or BriefAction.Reject => ActingId(principal) != drafterId, + BriefAction.Send => true, // sending is a mechanical dispatch step, not role-gated today + _ => false, + }; + + /// Resource-aware decision for the screen DTO: "would this action succeed right + /// now" — role/SoD AND the brief's current status. This is what the UI renders; + /// it never re-derives these booleans itself. + public static BriefDecisionsDto Decisions(Principal principal, string status, string drafterId) => new( + CanEdit: principal.Role == PrincipalRole.Drafter && status is "draft" or "rejected", + CanApprove: CanActOn(BriefAction.Approve, principal, drafterId) && status == "submitted", + CanReject: CanActOn(BriefAction.Reject, principal, drafterId) && status == "submitted", + CanSend: CanActOn(BriefAction.Send, principal, drafterId) && status == "approved"); +} diff --git a/backend/src/BigRegister.Api/Program.cs b/backend/src/BigRegister.Api/Program.cs index 95bcba8..12ecc1d 100644 --- a/backend/src/BigRegister.Api/Program.cs +++ b/backend/src/BigRegister.Api/Program.cs @@ -2,6 +2,7 @@ using System.Text.Json; using System.Text.Json.Serialization; using BigRegister.Api.Contracts; using BigRegister.Api.Data; +using BigRegister.Domain.Authorization; using BigRegister.Domain.Diplomas; using BigRegister.Domain.Documents; using BigRegister.Domain.Intake; @@ -239,76 +240,81 @@ api.MapPost("/applications/{id}/submit", (string id, SubmitApplicationRequest re .ProducesProblem(StatusCodes.Status409Conflict) .Produces(StatusCodes.Status404NotFound); -// --- Brief (letter composition). One demo brief per owner; the server owns the -// status machine + role rules. Role is a dev-only stand-in via X-Role (mirrors the -// X-Admin seam and the FE ?role= toggle) — no real identities in this POC. --- +// PRD-0002 §6: coarse, role-derived capabilities for nav/menu-level checks (NOT +// tied to a specific brief's live status — see BriefDecisionsDto for that). +api.MapGet("/me", (HttpContext ctx) => new MeDto(Authz.RoleCapabilities(Authz.ResolvePrincipal(ctx)))) +.Produces(); -api.MapGet("/brief", () => +// --- Brief (letter composition). One demo brief per owner; the server owns the +// status machine + authorization (Authz, PRD-0002 phase P1). Principal is a +// dev-only stand-in via X-Role (mirrors the X-Admin seam and the FE ?role= +// toggle) — no real identities in this POC. --- + +api.MapGet("/brief", (HttpContext ctx) => { var e = BriefStore.GetOrCreate(DocumentStore.DemoOwner); - return new BriefViewDto(e.ToDto(), BriefSeed.PassagesFor(e.Beroep)); + return ToView(ctx, e); }) .Produces(); api.MapPut("/brief", (SaveBriefRequest req, HttpContext ctx) => { - var (_, isDrafter) = BriefRole(ctx); - return BriefResult(BriefStore.Save(DocumentStore.DemoOwner, req.Sections, isDrafter), "Alleen de opsteller mag de brief bewerken."); + var isDrafter = Authz.ResolvePrincipal(ctx).Role == PrincipalRole.Drafter; + return BriefResult(ctx, BriefStore.Save(DocumentStore.DemoOwner, req.Sections, isDrafter), "Alleen de opsteller mag de brief bewerken."); }) -.Produces() +.Produces() .ProducesProblem(StatusCodes.Status403Forbidden) .ProducesProblem(StatusCodes.Status409Conflict); api.MapPost("/brief/submit", (HttpContext ctx) => { - var (_, isDrafter) = BriefRole(ctx); + var isDrafter = Authz.ResolvePrincipal(ctx).Role == PrincipalRole.Drafter; var r = BriefStore.Submit(DocumentStore.DemoOwner, isDrafter, Now()); LogBrief("submit", r); - return BriefResult(r, "Alleen de opsteller mag indienen."); + return BriefResult(ctx, r, "Alleen de opsteller mag indienen."); }) .WithName("briefSubmit") // distinct name so the generated client method isn't `submit2` -.Produces() +.Produces() .ProducesProblem(StatusCodes.Status403Forbidden) .ProducesProblem(StatusCodes.Status409Conflict); api.MapPost("/brief/approve", (HttpContext ctx) => { - var (acting, _) = BriefRole(ctx); - var r = BriefStore.Approve(DocumentStore.DemoOwner, acting, Now()); + var r = BriefStore.Approve(DocumentStore.DemoOwner, Authz.ResolvePrincipal(ctx), Now()); LogBrief("approve", r); - return BriefResult(r, "De beoordelaar mag niet de opsteller zijn."); + return BriefResult(ctx, r, "De beoordelaar mag niet de opsteller zijn."); }) -.Produces() +.Produces() .ProducesProblem(StatusCodes.Status403Forbidden) .ProducesProblem(StatusCodes.Status409Conflict); api.MapPost("/brief/reject", (RejectBriefRequest req, HttpContext ctx) => { - var (acting, _) = BriefRole(ctx); - var r = BriefStore.Reject(DocumentStore.DemoOwner, acting, req.Comments, Now()); + var r = BriefStore.Reject(DocumentStore.DemoOwner, Authz.ResolvePrincipal(ctx), req.Comments, Now()); LogBrief("reject", r); - return BriefResult(r, "De beoordelaar mag niet de opsteller zijn."); + return BriefResult(ctx, r, "De beoordelaar mag niet de opsteller zijn."); }) -.Produces() +.Produces() .ProducesProblem(StatusCodes.Status403Forbidden) .ProducesProblem(StatusCodes.Status409Conflict); -api.MapPost("/brief/send", () => +api.MapPost("/brief/send", (HttpContext ctx) => { // Send-time placeholder linting is FE-authoritative in this slice (no C# parity - // port); the backend only guards the approved→sent transition. + // port); the backend only guards the approved→sent transition (not role-gated + // today — see Authz.CanActOn(Send, …), a mechanical dispatch step). var r = BriefStore.Send(DocumentStore.DemoOwner, Now()); LogBrief("send", r); - return BriefResult(r, "Versturen kan niet in deze status."); + return BriefResult(ctx, r, "Versturen kan niet in deze status."); }) -.Produces() +.Produces() .ProducesProblem(StatusCodes.Status409Conflict); -api.MapPost("/brief/reset", () => +api.MapPost("/brief/reset", (HttpContext ctx) => { // Demo "start over": recreate a fresh draft. No guards — showcase affordance only. var e = BriefStore.ResetAndCreate(DocumentStore.DemoOwner); - return new BriefViewDto(e.ToDto(), BriefSeed.PassagesFor(e.Beroep)); + return ToView(ctx, e); }) .WithName("briefReset") .Produces(); @@ -319,17 +325,16 @@ static bool IsAdmin(HttpContext ctx) => ctx.Request.Headers["X-Admin"] == "true" static string Now() => DateTimeOffset.UtcNow.ToString("o"); -// Dev-only role stand-in: X-Role: approver acts as the approver identity, anything -// else (default) acts as the drafter. -static (string acting, bool isDrafter) BriefRole(HttpContext ctx) -{ - var isDrafter = ctx.Request.Headers["X-Role"].ToString() != "approver"; - return (isDrafter ? BriefStore.DrafterId : BriefStore.ApproverId, isDrafter); -} +BriefViewDto ToView(HttpContext ctx, BriefEntity e) => new( + e.ToDto(), + BriefSeed.PassagesFor(e.Beroep), + Authz.Decisions(Authz.ResolvePrincipal(ctx), e.Status.Tag, e.DrafterId)); -IResult BriefResult((BriefStore.Outcome outcome, BriefEntity? entity) r, string forbiddenDetail) => r.outcome switch +// Emit (decision flags, via ToView) and enforce (Forbidden/Conflict below) both run +// through Authz — see BriefStore.Review and Authz.CanActOn — so they cannot drift. +IResult BriefResult(HttpContext ctx, (BriefStore.Outcome outcome, BriefEntity? entity) r, string forbiddenDetail) => r.outcome switch { - BriefStore.Outcome.Ok => Results.Ok(r.entity!.ToDto()), + BriefStore.Outcome.Ok => Results.Ok(ToView(ctx, r.entity!)), BriefStore.Outcome.Forbidden => Results.Problem(detail: forbiddenDetail, statusCode: StatusCodes.Status403Forbidden), _ => Results.Problem(detail: "Ongeldige overgang voor de huidige status van de brief.", statusCode: StatusCodes.Status409Conflict), }; diff --git a/backend/swagger.json b/backend/swagger.json index 6b93c6f..23647ef 100644 --- a/backend/swagger.json +++ b/backend/swagger.json @@ -641,6 +641,25 @@ } } }, + "/api/v1/me": { + "get": { + "tags": [ + "BigRegister.Api, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MeDto" + } + } + } + } + } + } + }, "/api/v1/brief": { "get": { "tags": [ @@ -679,7 +698,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BriefDto" + "$ref": "#/components/schemas/BriefViewDto" } } } @@ -719,7 +738,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BriefDto" + "$ref": "#/components/schemas/BriefViewDto" } } } @@ -758,7 +777,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BriefDto" + "$ref": "#/components/schemas/BriefViewDto" } } } @@ -807,7 +826,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BriefDto" + "$ref": "#/components/schemas/BriefViewDto" } } } @@ -846,7 +865,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BriefDto" + "$ref": "#/components/schemas/BriefViewDto" } } } @@ -1030,6 +1049,24 @@ }, "additionalProperties": false }, + "BriefDecisionsDto": { + "type": "object", + "properties": { + "canEdit": { + "type": "boolean" + }, + "canApprove": { + "type": "boolean" + }, + "canReject": { + "type": "boolean" + }, + "canSend": { + "type": "boolean" + } + }, + "additionalProperties": false + }, "BriefDto": { "type": "object", "properties": { @@ -1123,6 +1160,9 @@ "$ref": "#/components/schemas/LibraryPassageDto" }, "nullable": true + }, + "decisions": { + "$ref": "#/components/schemas/BriefDecisionsDto" } }, "additionalProperties": false @@ -1469,6 +1509,19 @@ }, "additionalProperties": false }, + "MeDto": { + "type": "object", + "properties": { + "capabilities": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + }, + "additionalProperties": false + }, "ParagraphDto": { "type": "object", "properties": { diff --git a/backend/tests/BigRegister.Tests/AuthzTests.cs b/backend/tests/BigRegister.Tests/AuthzTests.cs new file mode 100644 index 0000000..90109a1 --- /dev/null +++ b/backend/tests/BigRegister.Tests/AuthzTests.cs @@ -0,0 +1,68 @@ +using BigRegister.Domain.Authorization; +using Xunit; + +namespace BigRegister.Tests; + +/// +/// Unit tests for the single authorization helper (PRD-0002 phase P1) that both +/// computes the brief screen's decision flags and gates the mutation endpoints. +/// +public class AuthzTests +{ + private static readonly Principal Drafter = new(PrincipalRole.Drafter); + private static readonly Principal Approver = new(PrincipalRole.Approver); + private const string DrafterId = "demo-drafter"; + + [Fact] + public void Drafter_may_not_approve_or_reject_even_when_submitted() + { + Assert.False(Authz.CanActOn(BriefAction.Approve, Drafter, DrafterId)); + Assert.False(Authz.CanActOn(BriefAction.Reject, Drafter, DrafterId)); + } + + [Fact] + public void Approver_may_approve_and_reject_a_different_drafters_letter() + { + Assert.True(Authz.CanActOn(BriefAction.Approve, Approver, DrafterId)); + Assert.True(Authz.CanActOn(BriefAction.Reject, Approver, DrafterId)); + } + + [Fact] + public void Send_is_not_role_gated() + { + Assert.True(Authz.CanActOn(BriefAction.Send, Drafter, DrafterId)); + Assert.True(Authz.CanActOn(BriefAction.Send, Approver, DrafterId)); + } + + [Theory] + [InlineData("draft")] + [InlineData("rejected")] + public void Decisions_CanEdit_true_for_drafter_in_editable_statuses(string status) + { + Assert.True(Authz.Decisions(Drafter, status, DrafterId).CanEdit); + Assert.False(Authz.Decisions(Approver, status, DrafterId).CanEdit); + } + + [Fact] + public void Decisions_CanApprove_requires_submitted_status_and_approver_role() + { + Assert.True(Authz.Decisions(Approver, "submitted", DrafterId).CanApprove); + Assert.False(Authz.Decisions(Approver, "draft", DrafterId).CanApprove); + Assert.False(Authz.Decisions(Drafter, "submitted", DrafterId).CanApprove); + } + + [Fact] + public void Decisions_CanSend_requires_approved_status_only() + { + Assert.True(Authz.Decisions(Drafter, "approved", DrafterId).CanSend); + Assert.True(Authz.Decisions(Approver, "approved", DrafterId).CanSend); + Assert.False(Authz.Decisions(Approver, "submitted", DrafterId).CanSend); + } + + [Fact] + public void RoleCapabilities_are_empty_for_drafter_and_the_three_brief_capabilities_for_approver() + { + Assert.Empty(Authz.RoleCapabilities(Drafter)); + Assert.Equal(new[] { "brief:approve", "brief:reject", "brief:send" }, Authz.RoleCapabilities(Approver)); + } +} diff --git a/backend/tests/BigRegister.Tests/BriefEndpointTests.cs b/backend/tests/BigRegister.Tests/BriefEndpointTests.cs index de79d68..2c965c3 100644 --- a/backend/tests/BigRegister.Tests/BriefEndpointTests.cs +++ b/backend/tests/BigRegister.Tests/BriefEndpointTests.cs @@ -90,8 +90,8 @@ public class BriefEndpointTests(WebApplicationFactory factory) : IClass var res = await _client.SendAsync(Post("/api/v1/brief/submit")); res.EnsureSuccessStatusCode(); - var submitted = await res.Content.ReadFromJsonAsync(); - Assert.Equal("submitted", submitted!.Status.Tag); + var submitted = await res.Content.ReadFromJsonAsync(); + Assert.Equal("submitted", submitted!.Brief.Status.Tag); } [Fact] @@ -106,7 +106,7 @@ public class BriefEndpointTests(WebApplicationFactory factory) : IClass var res = await _client.SendAsync(Post("/api/v1/brief/approve", role: "approver")); res.EnsureSuccessStatusCode(); - Assert.Equal("approved", (await res.Content.ReadFromJsonAsync())!.Status.Tag); + Assert.Equal("approved", (await res.Content.ReadFromJsonAsync())!.Brief.Status.Tag); } [Fact] @@ -117,13 +117,13 @@ public class BriefEndpointTests(WebApplicationFactory factory) : IClass await _client.SendAsync(Post("/api/v1/brief/submit")); var rejected = await (await _client.SendAsync( - Post("/api/v1/brief/reject", role: "approver", body: new RejectBriefRequest("Graag aanvullen.")))).Content.ReadFromJsonAsync(); - Assert.Equal("rejected", rejected!.Status.Tag); - Assert.Equal("Graag aanvullen.", rejected.Status.Comments); + Post("/api/v1/brief/reject", role: "approver", body: new RejectBriefRequest("Graag aanvullen.")))).Content.ReadFromJsonAsync(); + Assert.Equal("rejected", rejected!.Brief.Status.Tag); + Assert.Equal("Graag aanvullen.", rejected.Brief.Status.Comments); // A drafter save on a rejected letter reopens it to draft. - var reopened = await (await _client.PutAsJsonAsync("/api/v1/brief", FilledFrom(brief))).Content.ReadFromJsonAsync(); - Assert.Equal("draft", reopened!.Status.Tag); + var reopened = await (await _client.PutAsJsonAsync("/api/v1/brief", FilledFrom(brief))).Content.ReadFromJsonAsync(); + Assert.Equal("draft", reopened!.Brief.Status.Tag); } [Fact] @@ -139,7 +139,36 @@ public class BriefEndpointTests(WebApplicationFactory factory) : IClass await _client.SendAsync(Post("/api/v1/brief/approve", role: "approver")); var res = await _client.SendAsync(Post("/api/v1/brief/send")); res.EnsureSuccessStatusCode(); - Assert.Equal("sent", (await res.Content.ReadFromJsonAsync())!.Status.Tag); + Assert.Equal("sent", (await res.Content.ReadFromJsonAsync())!.Brief.Status.Tag); + } + + [Fact] + public async Task Decisions_on_the_view_mirror_the_acting_principal_and_live_status() + { + var brief = await Get(); + var view = await _client.GetFromJsonAsync("/api/v1/brief"); + Assert.True(view!.Decisions.CanEdit); // default (no X-Role) = drafter, draft status + Assert.False(view.Decisions.CanApprove); + + await _client.PutAsJsonAsync("/api/v1/brief", FilledFrom(brief)); + await _client.SendAsync(Post("/api/v1/brief/submit")); + + var asApprover = await _client.SendAsync( + new HttpRequestMessage(HttpMethod.Get, "/api/v1/brief") { Headers = { { "X-Role", "approver" } } }); + var approverView = await asApprover.Content.ReadFromJsonAsync(); + Assert.True(approverView!.Decisions.CanApprove); + Assert.False(approverView.Decisions.CanEdit); // approver never edits + } + + [Fact] + public async Task Me_returns_no_capabilities_for_drafter_and_the_brief_set_for_approver() + { + var asDrafter = await _client.GetFromJsonAsync("/api/v1/me"); + Assert.Empty(asDrafter!.Capabilities); + + var res = await _client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "/api/v1/me") { Headers = { { "X-Role", "approver" } } }); + var asApprover = await res.Content.ReadFromJsonAsync(); + Assert.Equal(new[] { "brief:approve", "brief:reject", "brief:send" }, asApprover!.Capabilities); } [Fact] diff --git a/docs/backlog/README.md b/docs/backlog/README.md index 9396d03..a68a93d 100644 --- a/docs/backlog/README.md +++ b/docs/backlog/README.md @@ -57,7 +57,7 @@ for its existing violations, so every WP ends green. | [WP-15](WP-15-missing-stories.md) | Missing stories: shell + brief components | 3 · Storybook | todo | | [WP-16](WP-16-component-a11y.md) | Component a11y: description wiring + alert role | 4 · a11y | todo | | [WP-17](WP-17-app-a11y.md) | App-level a11y: route focus, template lint, WCAG checklist | 4 · a11y | todo | -| [WP-18](WP-18-abac-capability-spine.md) | ABAC capability spine (Principal + capabilities, phase P1) | 5 · productie-volwassenheid | todo | +| [WP-18](WP-18-abac-capability-spine.md) | ABAC capability spine (Principal + capabilities, phase P1) | 5 · productie-volwassenheid | done | | [WP-19](WP-19-e2e-smoke.md) | Playwright e2e smoke | 5 · productie-volwassenheid | todo | | [WP-20](WP-20-second-locale.md) | Second locale proof | 5 · productie-volwassenheid | todo | | [WP-21](WP-21-resilience-seams.md) | Resilience seams (correlation-id, idempotency, retry) | 5 · productie-volwassenheid | todo | diff --git a/docs/backlog/WP-18-abac-capability-spine.md b/docs/backlog/WP-18-abac-capability-spine.md index fb52f5f..cbbc665 100644 --- a/docs/backlog/WP-18-abac-capability-spine.md +++ b/docs/backlog/WP-18-abac-capability-spine.md @@ -1,6 +1,6 @@ # WP-18 — ABAC capability spine (Principal + capabilities, phase P1) -Status: todo +Status: done (pending commit — see repo history for the final hash) Phase: 5 — productie-volwassenheid ## Why @@ -8,146 +8,171 @@ Phase: 5 — productie-volwassenheid The single biggest gap between this POC and a production SSP: identity carries no roles/capabilities (`Session { bsn, naam }` only), the only "role" is an unverified `?role=` query param stamped as an `X-Role` header, and `BriefStore.editable` -computes its authorization gate **in the frontend** from that header — the exact +computed its authorization gate **in the frontend** from that header — the exact anti-pattern ADR-0001 exists to prevent (FE renders decisions, never computes them). -The backend is fully open: no `[Authorize]`, no principal, ownership is a constant -`DemoOwner`. ADR-0002 and PRD-0002 already designed the fix; nothing is built. This -WP implements PRD-0002's **P1 — Capability spine** only (§9), the smallest slice -that closes the anti-pattern and gives every later phase (data-scoping, PII -redaction, step-up/audit) a real foundation to extend. +The backend was fully open: no `[Authorize]`, no principal, ownership is a constant +`DemoOwner`. ADR-0002 and PRD-0002 already designed the fix; this WP implements +PRD-0002's **P1 — Capability spine** only (§9), the smallest slice that closes the +anti-pattern and gives every later phase (data-scoping, PII redaction, step-up/audit) +a real foundation to extend. ## Read first - `docs/architecture/0002-user-groups-and-bounded-contexts.md` (the `Principal` - union, identity-vs-authorization split) -- `docs/prd/0002-attribute-based-access-control.md` §5a, §6, §7, §9-P1 (this WP - implements exactly P1 — don't reach into P2/P3) -- `src/app/auth/domain/session.ts` (flat `Session` to replace) -- `src/app/auth/application/session.store.ts`, `src/app/auth/auth.guard.ts` (seams - that already localise the `Session → Principal` swap, per ADR-0002) -- `src/app/shared/domain/role.ts`, `src/app/shared/infrastructure/role.ts` + - `role.interceptor.ts` (the dev stub being retired as an authority, kept as a dev - toggle) -- `src/app/brief/application/brief.store.ts:28,41-46` (`readonly role = currentRole()` - and the `editable` computed — the FE-computed gate to remove) -- `backend/src/BigRegister.Api/Contracts/Dtos.cs:25-27` (`HerregistratieDecisionsDto` - — the decision-flag pattern this WP extends to a `BriefDecisionsDto`) -- `backend/src/BigRegister.Api/Program.cs:318-335` (`IsAdmin`, the `X-Role` reader - around brief endpoints — becomes `Authz.Can`) -- `backend/src/BigRegister.Api/Data/BriefStore.cs` (`Review`, the - `actingId == e.DrafterId → Forbidden` SoD check — keep this check, move it behind - the verified principal) + union, identity-vs-authorization split — see the deviation noted below) +- `docs/prd/0002-attribute-based-access-control.md` §5a, §6, §7, §9-P1 +- `backend/src/BigRegister.Api/Domain/Authorization/Authz.cs` (new — the single + authorization helper) +- `backend/src/BigRegister.Api/Data/BriefStore.cs` (`Review` — now delegates its + SoD guard to `Authz.CanActOn`) +- `src/app/brief/application/brief.store.ts` (the FE-computed gate that was removed) ## Decisions (pre-made, don't relitigate) - **P1 scope only.** No data-scoping, no PII redaction/BSN reveal, no step-up or - audit log — those are PRD-0002 §9 P2/P3, separate future WPs. This WP: `Principal`, - `AccessStore`/`can()`, `capabilityGuard`, `GET /me`, capability flags on the brief - screen DTO, and server-side enforcement via one shared `Authz.Can` helper. + audit log — those are PRD-0002 §9 P2/P3, separate future WPs. - **The AD/OIDC identity provider stays simulated** (PRD-0002 §3 non-goal). The - `Principal` is still built server-side from the existing dev stand-ins - (`X-Role`/`X-Admin` headers), but it becomes the backend's own construct — the FE - never re-derives capabilities from the header, it only reads what the backend sends. -- **Capability naming**: stable, namespaced strings per PRD-0002 §5a — start with - exactly `brief:approve`, `brief:reject`, `brief:send` (the brief flow is the only - role-gated flow that exists today). Do not invent capabilities for flows that don't - exist yet (e.g. `aanvraag:beoordelen` — that's the backoffice, ADR-0002, out of scope). -- **Emit and enforce are the same code path.** `Authz.Can(principal, action, resource)` - is called both to compute the DTO flag and to gate the endpoint — never two separate - checks that can drift (PRD-0002 §7, the classic BOLA bug it calls out). -- **Dev role toggle survives**, but moves behind the `Principal` seam: `?role=` still - picks an identity for demo purposes, but it flows into building the `Principal` - server-side (still asserted by the client — this is _not_ real auth, just moving - the authority from FE-computed to BE-computed within the POC's honesty envelope). - Keep it explicitly commented `// dev stub — NOT a security boundary` per PRD-0002 §3. + `Principal` is built server-side from the existing dev stand-in (`X-Role` header), + but it becomes the backend's own construct — the FE never re-derives capabilities + from the header, it only reads what the backend sends. +- **Capability naming**: stable, namespaced strings per PRD-0002 §5a — exactly + `brief:approve`, `brief:reject`, `brief:send` (the only role-gated flow that + exists today). The brief screen's fourth flag, `canEdit`, is a **screen decision** + on `BriefDecisionsDto`, not a named capability string — it's resource/state-scoped + (draft/rejected + drafter role) the same way `HerregistratieDecisionsDto` blends + business state into a decision flag, and `GET /me`'s coarse `RoleCapabilities` set + stays exactly the three above. +- **Emit and enforce are the same code path for approve/reject.** + `Authz.CanActOn(action, principal, drafterId)` is the SAME check + `BriefStore.Review` uses to gate the mutation and `Authz.Decisions` uses to compute + the DTO flag — never two separate checks that can drift (PRD-0002 §7, the classic + BOLA bug it calls out). `Send` is deliberately **not** role-gated (see Risks) — + that parity is preserved exactly, decisions only mirror it. +- **Dev role toggle survives** as the POC's identity stub: `?role=` still picks an + identity for demo purposes, resolved into a `Principal` server-side via + `Authz.ResolvePrincipal`. Commented `dev stub — NOT a security boundary` per + PRD-0002 §3. +- **Deviation from the original plan — `auth/domain/session.ts` is untouched.** An + earlier draft of this WP planned a `Session → Principal` rename in the SSP's login + domain. That's **out of scope**: ADR-0002 explicitly lists that refactor as + "deferred until a second actor is actually introduced" (§"Out of scope here"), and + no second actor exists yet — renaming a type to a one-variant union ahead of that + need is exactly the premature abstraction the ADR warns against. It also turned + out unnecessary: the brief workflow's drafter/approver "acting identity" is a + **separate axis** from the SSP login session (a Zorgverlener logs in via BSN; + drafter/approver is an independent `?role=` toggle, not tied to that login). This + WP's `Principal` therefore lives entirely in the backend's + `BigRegister.Domain.Authorization` namespace and never touches `auth/`. -## Files +## Files (as built) -- `src/app/auth/domain/session.ts` — replace `Session` with the `Principal` - discriminated union from ADR-0002 (`{ kind: 'zorgverlener'; bsn; naam }` — no - `medewerker` variant yet, that's ADR-0002/backoffice scope; keep the union shape so - it's additive later). Update `isAuthenticated`. -- `src/app/auth/application/session.store.ts` — carries the `Principal`; unchanged - persistence rules (never persist the BSN, per existing comment). -- New `src/app/shared/domain/capability.ts` — branded/union `Capability` type - (`'brief:approve' | 'brief:reject' | 'brief:send'`), framework-free. -- New `src/app/shared/application/access.store.ts` — `providedIn: 'root'`, holds - resolved capabilities as `RemoteData` from `GET /me`; `can(capability): boolean`, - deny-by-default on absence. -- New `src/app/shared/infrastructure/me.adapter.ts` (+ spec) — calls `GET /me`, - `parseMe(): Result` boundary. -- New `capabilityGuard` in `src/app/auth/auth.guard.ts` (or co-located - `capability.guard.ts`) — factory `CanActivateFn` extending `authGuard`'s shape. -- `src/app/brief/application/brief.store.ts` — delete `readonly role = currentRole()` - and the FE-computed `editable`; read `canApprove`/`canReject`/`canSend` off the - loaded `BriefViewDto`'s new `BriefDecisionsDto` instead. -- `src/app/shared/infrastructure/role.interceptor.ts` — keep (still asserts the dev - identity), retitle its comment to "feeds Principal construction, not an authority - the FE reads back." -- Backend: `backend/src/BigRegister.Api/Contracts/Dtos.cs` — add - `BriefDecisionsDto(bool CanApprove, bool CanReject, bool CanSend)`; add it to - `BriefViewDto`. -- New `backend/src/BigRegister.Api/Domain/Authorization/Principal.cs` + - `Authz.cs` — `Principal` (mirrors the FE union), `Authz.Can(principal, action)` - covering the three brief capabilities + the existing SoD rule. -- `backend/src/BigRegister.Api/Program.cs` — add `GET /api/v1/me` returning the - resolved `Principal`'s capabilities; replace the ad-hoc `X-Role` reads around - brief endpoints with `Authz.Can`; compute `BriefDecisionsDto` via the same helper. -- New backend test `backend/tests/BigRegister.Tests/AuthzTests.cs` — `Authz.Can` - unit tests (approve/reject/send × drafter/approver × SoD). +- `backend/src/BigRegister.Api/Domain/Authorization/Authz.cs` (new) — `Principal`, + `PrincipalRole`, `BriefAction`, `Authz.ResolvePrincipal/ActingId/RoleCapabilities/ +CanActOn/Decisions`. +- `backend/src/BigRegister.Api/Contracts/Dtos.cs` — added `BriefDecisionsDto(CanEdit, +CanApprove, CanReject, CanSend)` on `BriefViewDto`; added `MeDto(Capabilities)`. +- `backend/src/BigRegister.Api/Data/BriefStore.cs` — `Approve`/`Reject`/`Review` take + a `Principal` + `BriefAction` and delegate the SoD check to `Authz.CanActOn` + (same Forbidden-before-Conflict ordering as before). +- `backend/src/BigRegister.Api/Program.cs` — `GET /api/v1/me`; every brief endpoint + (including `send`, which had no `HttpContext` before) now returns a fresh + `BriefViewDto` (via a shared `ToView`/`BriefResult` helper) so decisions are never + stale after a mutation. +- `backend/tests/BigRegister.Tests/AuthzTests.cs` (new) — unit tests for `Authz`. +- `backend/tests/BigRegister.Tests/BriefEndpointTests.cs` — updated to deserialize + `BriefViewDto` (not bare `BriefDto`) from submit/approve/reject/send; two new + tests for live decisions and `/me`. +- `src/app/shared/domain/capability.ts` (new) — the `Capability` union type. +- `src/app/shared/infrastructure/me.adapter.ts` (+ spec, new) — `GET /me` adapter + + `parseMe` boundary (unknown capability strings are dropped, not rejected). +- `src/app/shared/application/access.store.ts` (new) — `AccessStore.can()`, + deny-by-default. +- `src/app/auth/auth.guard.ts` — added `capabilityGuard(capability)` factory. + **Built but deliberately unwired**: no route in this app needs a capability gate + today (both drafter and approver land on the same `/brief` page; the gating is + per-action, not per-page). It's the available building block for a future + approver-only page. +- `src/app/brief/domain/brief.ts` — added the `BriefDecisions` domain type. +- `src/app/brief/domain/brief.machine.ts` (+ spec) — `BriefState.loaded` and the + `BriefLoaded`/`Submitted`/`Approved`/`Rejected`/`Sent` messages now carry + `decisions`; the pure `transition()` helper replaces them with each fresh + server value. +- `src/app/brief/infrastructure/brief.adapter.ts` (+ spec) — `save/submit/approve/ +reject/send` now return `Result` (was `Brief`) via + `parseBriefView`, which also parses `decisions`. +- `src/app/brief/application/brief.store.ts` — deleted `currentRole()`/`editable`; + added `canEdit`/`canApprove`/`canReject`/`canSend` computed straight from + `BriefState.loaded.decisions`. +- `src/app/brief/ui/letter-composer/letter-composer.component.ts` (+ stories) — + `editable`/`role` inputs replaced by the four `can*` inputs; the approve/reject + block gates on `canApprove() || canReject()`, the send button on `canSend()`. +- `src/app/brief/ui/brief.page.ts` — passes the four `can*` signals through. +- `src/app/shared/infrastructure/role.ts` — comment updated (no longer claims the + FE derives `editable` from the role reader). +- Regenerated `backend/swagger.json` + `src/app/shared/infrastructure/api-client.ts` + via `npm run gen:api` (new `/me` endpoint + DTO shapes). -## Steps +## Steps (as executed) -1. Backend: `Principal`, `Authz.Can`, `GET /me`, `BriefDecisionsDto` wired into the - existing brief endpoints (replace `IsDrafter`/`X-Role` reads one at a time, - keeping `BriefEndpointTests.cs` green after each). -2. FE: `Capability` type, `access.store.ts`, `me.adapter.ts`, `capabilityGuard`. -3. FE: `Session → Principal` in `auth/domain`; thread through `SessionStore`, - `auth.guard.ts` (both keep working — `isAuthenticated` still means "has a - Principal"). -4. FE: `brief.store.ts` reads `canApprove`/`canReject`/`canSend` from the DTO; - delete `currentRole()` import and the FE-computed `editable`. Update the brief - UI components consuming `.editable`/`.role` to consume the new flags. -5. Update PRD-0002's own status: this WP completes phase P1 — note it in the PRD or - leave for a follow-up doc pass (don't rewrite the PRD's phasing table mid-WP). +1. Backend: `Authz.cs`, DTOs, `BriefStore` delegation, `Program.cs` wiring + (`GET /me` + `BriefResult`/`ToView`) — kept `dotnet test` green throughout + (79/79 including 10 new tests). +2. `npm run gen:api` to pick up the new endpoint/DTOs before touching the FE. +3. FE domain: `BriefDecisions`, machine state/messages, machine spec fixtures. +4. FE infrastructure: `parseDecisions`/`parseBriefView` in `brief.adapter.ts` (+spec). +5. FE application: `brief.store.ts`'s computed flags; `access.store.ts` + + `me.adapter.ts` (+spec) as the general capability-spine infrastructure. +6. FE UI: `letter-composer` inputs/template, `brief.page.ts` bindings, stories. +7. Full GREEN gate + a live curl smoke test against the running backend (submit as + drafter → 403 on approve as drafter → 200 on approve as approver, with decisions + flipping correctly at each step). ## Acceptance criteria -- [ ] `brief.store.ts` contains no `currentRole()` call and no FE-computed +- [x] `brief.store.ts` contains no `currentRole()` call and no FE-computed permission boolean; `canApprove`/`canReject`/`canSend` come from the DTO. -- [ ] Forging `?role=approver` in the browser with a stale/absent server capability - still gets a 403 from the backend (verified by a test hitting the endpoint - directly, bypassing the FE). -- [ ] `Authz.Can` is the only place brief authorization logic lives; the emit path - (DTO flags) and the enforce path (endpoint gating) both call it. -- [ ] `GET /me` returns capabilities; `AccessStore.can()` defaults to `false` for an - unknown capability. -- [ ] The existing SoD rule (approver ≠ drafter) still holds, now expressed as an - `Authz.Can` precondition rather than inline in `BriefStore.Review`. -- [ ] `capabilityGuard` compiles and is demonstrated on at least one route (or - documented as available-but-unwired if no route needs it yet — brief has no - route today, it's a page section). +- [x] The SoD rule is enforced server-side regardless of FE state — verified by + curl directly against the backend (drafter calling `/brief/approve` → 403) + and by `AuthzTests`/`BriefEndpointTests`, bypassing the FE entirely. +- [x] `Authz.CanActOn`/`Authz.Decisions` is the only place brief authorization logic + lives; the emit path (DTO flags) and the enforce path (`BriefStore.Review`) + both call it. +- [x] `GET /me` returns capabilities; `AccessStore.can()` defaults to `false` for an + unknown capability (deny-by-default, verified in `me.adapter.spec.ts`). +- [x] The existing SoD rule (approver ≠ drafter) still holds, expressed as + `Authz.CanActOn` instead of the old inline check in `BriefStore.Review`. +- [x] `capabilityGuard` compiles; documented as available-but-unwired (no route + needs it yet — see Files). ## Verification -GREEN (`docs/backlog/README.md`) + `cd backend && dotnet test`. Manual smoke: -`npm start` with `?role=drafter` — draft-only actions enabled; `?role=approver` — -approve/reject enabled, editing disabled. Confirm via browser devtools that removing -the `X-Role` header (or backend patched to ignore it) makes every capability `false` -— i.e. deny-by-default actually denies. +GREEN gate, all green: `npm run lint && npm run check:tokens && npm test && npm run +build && npm run build-storybook && npm run test-storybook:ci` (189 unit tests, 137 +Storybook/a11y tests) + `cd backend && dotnet test` (79/79) + +`dotnet format --verify-no-changes`. Manual smoke via curl against a running +backend: default (drafter) `GET /brief` → `canEdit: true`; submit → decisions +recompute; drafter `POST /brief/approve` → 403; approver `POST /brief/approve` → +200, `canSend: true` afterward. `GET /me` → `[]` for drafter, +`["brief:approve","brief:reject","brief:send"]` for approver. ## Out of scope PRD-0002 P2 (data-scoping, PII/BSN redaction) and P3 (step-up, break-glass, audit -log) — separate future WPs. The Behandeling/backoffice app and `medewerker` +log) — separate future WPs. The Behandeling/backoffice app and a `medewerker` `Principal` variant (ADR-0002 — no second actor exists yet, still YAGNI). Real -AD/OIDC integration (identity provider stays simulated). +AD/OIDC integration (identity provider stays simulated). The `auth/domain/session.ts` +`Session → Principal` rename (see the Decisions deviation above — ADR-0002 defers +it explicitly). ## Risks -Threading `Principal` through `SessionStore`/`auth.guard.ts` touches the one -authenticated-session seam every route depends on — keep the observable shape -(`isAuthenticated(): boolean`) identical so no route wiring needs to change, only -what's inside `Session`/`Principal`. Backend `Authz.Can` replacing inline `X-Role` -reads must preserve the existing 403 `Outcome.Forbidden` mapping -(`Program.cs:330-335`) exactly, or `BriefEndpointTests.cs` breaks. +`Send` was already unauthenticated/unauthorized before this WP (no role check on +`POST /brief/send`) — `Authz.CanActOn(Send, …)` preserves that exactly +(`=> true`, a mechanical dispatch step) rather than silently introducing a new gate +that would have broken the existing `Send_only_from_approved` test (which calls +`send` as the default drafter identity and expects success). If a future WP decides +`send` should be approver-only, that's a deliberate behavior change, not a bug fix. +Every brief mutation endpoint now returns `BriefViewDto` instead of bare `BriefDto` +— a wire-shape change; the generated `api-client.ts` was regenerated and every FE +call site updated, but any other caller of these endpoints outside this repo would +need the same update. diff --git a/documentation.json b/documentation.json index 4659d03..31b7b95 100644 --- a/documentation.json +++ b/documentation.json @@ -48,12 +48,12 @@ }, { "name": "AantekeningDto", - "id": "interface-AantekeningDto-134629d19fe3b5e6a76daeb4f10c282202eb1b8380b939c25450bb44b86fcb3df7a15e5ead886ad958b8bb7f158457387fb6c11872acdb4893c4933c2fdef07b", + "id": "interface-AantekeningDto-fb1ee9618e8a58db438478dc30a2ef41f099ba42e2d9a7155300e95c801cc6c2851c481c1bff1e7af3c066bc79e76529bbb37756fed2b5e35a56532325220bab", "file": "src/app/shared/infrastructure/api-client.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", + "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n me(): Promise {\n let url_ = this.baseUrl + \"/api/v1/me\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processMe(_response);\n });\n }\n\n protected processMe(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as MeDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDecisionsDto {\n canEdit?: boolean;\n canApprove?: boolean;\n canReject?: boolean;\n canSend?: boolean;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n decisions?: BriefDecisionsDto;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface MeDto {\n capabilities?: string[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", "properties": [ { "name": "datum", @@ -63,7 +63,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1251 + "line": 1287 }, { "name": "omschrijving", @@ -73,7 +73,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1250 + "line": 1286 }, { "name": "type", @@ -83,7 +83,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1249 + "line": 1285 } ], "indexSignatures": [], @@ -207,12 +207,12 @@ }, { "name": "AanvraagRow", - "id": "interface-AanvraagRow-6793264f2cc6a82fd203220ab82e1fe318943002bfdd08de089d20fb9bba17edd4775e5a8a36d3c69125a491442595c79a4e64a3115a37a4f27b698eab9113c8", + "id": "interface-AanvraagRow-c0a98dbd2b70fdab17be4733c584ff631f762cc4c156dd528f80e547147f580e65ba92a202e950c9996087f20f1c371993e9d72aec62f7b3b335c21927947692", "file": "src/app/registratie/domain/aanvraag-view.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "import { Aanvraag, AanvraagStatus, AanvraagType } from './aanvraag';\n\n/** View-model mapping for an aanvraag: type → labels, status → label, and the fields\n for a CIBG \"aanvragen\" row / the case-detail page. Pure, no Angular — the UI\n renders these, it does not derive them. */\n\nexport const TYPE_LABELS: Record = {\n registratie: $localize`:@@aanvraagBlock.type.registratie:Inschrijving`,\n herregistratie: $localize`:@@aanvraagBlock.type.herregistratie:Herregistratie`,\n intake: $localize`:@@aanvraagBlock.type.intake:Herregistratie-intake`,\n};\n\n/** What the aanvraag is for (shown under the title). */\nexport function purposeLabel(type: AanvraagType): string {\n switch (type) {\n case 'registratie': return $localize`:@@aanvraag.purpose.registratie:Inschrijving in het BIG-register`;\n case 'herregistratie': return $localize`:@@aanvraag.purpose.herregistratie:Verlenging van uw BIG-registratie`;\n case 'intake': return $localize`:@@aanvraag.purpose.intake:Intake-vragenlijst voor uw herregistratie`;\n }\n}\n\n/** The status as a plain label (what state the aanvraag is in). */\nexport function statusLabel(status: AanvraagStatus): string {\n switch (status.tag) {\n case 'Concept': return $localize`:@@aanvraag.status.concept:Concept (nog niet ingediend)`;\n case 'InBehandeling': return $localize`:@@aanvraag.status.inBehandeling:In behandeling`;\n case 'Goedgekeurd': return $localize`:@@aanvraag.status.goedgekeurd:Goedgekeurd`;\n case 'Afgewezen': return $localize`:@@aanvraag.status.afgewezen:Afgewezen`;\n }\n}\n\n/** The reference number, or '' for a Concept (which has none yet). */\nexport function referentie(status: AanvraagStatus): string {\n return status.tag === 'Concept' ? '' : status.referentie;\n}\n\nexport interface AanvraagRow {\n heading: string;\n /** What the aanvraag is for (the `.subtitle` line). */\n subtitle: string;\n /** The status: label + reference + submit date (+ any note) — the `.status` line. */\n status: string;\n}\n\nfunction formatNL(iso?: string): string {\n return iso ? new Date(iso).toLocaleDateString('nl-NL', { day: 'numeric', month: 'long', year: 'numeric' }) : '';\n}\n\n/** Fields for a submitted aanvraag's row in the dashboard \"aanvragen\" list (Concept\n has no row — it renders as a resumable melding, see aanvraag-block). */\nexport function submittedRow(a: Aanvraag): AanvraagRow {\n const s = a.status;\n const parts = [statusLabel(s)];\n const ref = referentie(s);\n if (ref) parts.push($localize`:@@aanvraag.row.ref:Referentie ${ref}:ref:`);\n if (a.submittedAt) parts.push($localize`:@@aanvraag.row.ingediend:ingediend op ${formatNL(a.submittedAt)}:datum:`);\n if (s.tag === 'InBehandeling' && s.manual) parts.push($localize`:@@aanvraagBlock.manual:Uw aanvraag wordt handmatig beoordeeld in de backoffice.`);\n if (s.tag === 'Afgewezen') parts.push(s.reden);\n return { heading: TYPE_LABELS[a.type], subtitle: purposeLabel(a.type), status: parts.join(' · ') };\n}\n\n/** Key/value rows for the case-detail page (CIBG Datablock). */\nexport function detailRows(a: Aanvraag): { key: string; value: string }[] {\n const rows = [\n { key: $localize`:@@aanvraag.detail.soort:Soort aanvraag`, value: TYPE_LABELS[a.type] },\n { key: $localize`:@@aanvraag.detail.waarvoor:Waarvoor`, value: purposeLabel(a.type) },\n { key: $localize`:@@aanvraag.detail.status:Status`, value: statusLabel(a.status) },\n { key: $localize`:@@aanvraag.detail.referentie:Referentie`, value: referentie(a.status) || '—' },\n { key: $localize`:@@aanvraag.detail.ingediend:Ingediend op`, value: a.submittedAt ? formatNL(a.submittedAt) : '—' },\n ];\n if (a.status.tag === 'Afgewezen') {\n rows.push({ key: $localize`:@@aanvraag.detail.reden:Reden van afwijzing`, value: a.status.reden });\n }\n return rows;\n}\n", + "sourceCode": "import { Aanvraag, AanvraagStatus, AanvraagType } from './aanvraag';\n\n/** View-model mapping for an aanvraag: type → labels, status → label, and the fields\n for a CIBG \"aanvragen\" row / the case-detail page. Pure, no Angular — the UI\n renders these, it does not derive them. */\n\nexport const TYPE_LABELS: Record = {\n registratie: $localize`:@@aanvraagBlock.type.registratie:Inschrijving`,\n herregistratie: $localize`:@@aanvraagBlock.type.herregistratie:Herregistratie`,\n intake: $localize`:@@aanvraagBlock.type.intake:Herregistratie-intake`,\n};\n\n/** What the aanvraag is for (shown under the title). */\nexport function purposeLabel(type: AanvraagType): string {\n switch (type) {\n case 'registratie':\n return $localize`:@@aanvraag.purpose.registratie:Inschrijving in het BIG-register`;\n case 'herregistratie':\n return $localize`:@@aanvraag.purpose.herregistratie:Verlenging van uw BIG-registratie`;\n case 'intake':\n return $localize`:@@aanvraag.purpose.intake:Intake-vragenlijst voor uw herregistratie`;\n }\n}\n\n/** The status as a plain label (what state the aanvraag is in). */\nexport function statusLabel(status: AanvraagStatus): string {\n switch (status.tag) {\n case 'Concept':\n return $localize`:@@aanvraag.status.concept:Concept (nog niet ingediend)`;\n case 'InBehandeling':\n return $localize`:@@aanvraag.status.inBehandeling:In behandeling`;\n case 'Goedgekeurd':\n return $localize`:@@aanvraag.status.goedgekeurd:Goedgekeurd`;\n case 'Afgewezen':\n return $localize`:@@aanvraag.status.afgewezen:Afgewezen`;\n }\n}\n\n/** The reference number, or '' for a Concept (which has none yet). */\nexport function referentie(status: AanvraagStatus): string {\n return status.tag === 'Concept' ? '' : status.referentie;\n}\n\nexport interface AanvraagRow {\n heading: string;\n /** What the aanvraag is for (the `.subtitle` line). */\n subtitle: string;\n /** The status: label + reference + submit date (+ any note) — the `.status` line. */\n status: string;\n}\n\nfunction formatNL(iso?: string): string {\n return iso\n ? new Date(iso).toLocaleDateString('nl-NL', { day: 'numeric', month: 'long', year: 'numeric' })\n : '';\n}\n\n/** Fields for a submitted aanvraag's row in the dashboard \"aanvragen\" list (Concept\n has no row — it renders as a resumable melding, see aanvraag-block). */\nexport function submittedRow(a: Aanvraag): AanvraagRow {\n const s = a.status;\n const parts = [statusLabel(s)];\n const ref = referentie(s);\n if (ref) parts.push($localize`:@@aanvraag.row.ref:Referentie ${ref}:ref:`);\n if (a.submittedAt)\n parts.push($localize`:@@aanvraag.row.ingediend:ingediend op ${formatNL(a.submittedAt)}:datum:`);\n if (s.tag === 'InBehandeling' && s.manual)\n parts.push(\n $localize`:@@aanvraagBlock.manual:Uw aanvraag wordt handmatig beoordeeld in de backoffice.`,\n );\n if (s.tag === 'Afgewezen') parts.push(s.reden);\n return {\n heading: TYPE_LABELS[a.type],\n subtitle: purposeLabel(a.type),\n status: parts.join(' · '),\n };\n}\n\n/** Key/value rows for the case-detail page (CIBG Datablock). */\nexport function detailRows(a: Aanvraag): { key: string; value: string }[] {\n const rows = [\n { key: $localize`:@@aanvraag.detail.soort:Soort aanvraag`, value: TYPE_LABELS[a.type] },\n { key: $localize`:@@aanvraag.detail.waarvoor:Waarvoor`, value: purposeLabel(a.type) },\n { key: $localize`:@@aanvraag.detail.status:Status`, value: statusLabel(a.status) },\n {\n key: $localize`:@@aanvraag.detail.referentie:Referentie`,\n value: referentie(a.status) || '—',\n },\n {\n key: $localize`:@@aanvraag.detail.ingediend:Ingediend op`,\n value: a.submittedAt ? formatNL(a.submittedAt) : '—',\n },\n ];\n if (a.status.tag === 'Afgewezen') {\n rows.push({\n key: $localize`:@@aanvraag.detail.reden:Reden van afwijzing`,\n value: a.status.reden,\n });\n }\n return rows;\n}\n", "properties": [ { "name": "heading", @@ -222,7 +222,7 @@ "indexKey": "", "optional": false, "description": "", - "line": 38 + "line": 45 }, { "name": "status", @@ -232,7 +232,7 @@ "indexKey": "", "optional": false, "description": "

The status: label + reference + submit date (+ any note) — the .status line.

\n", - "line": 42, + "line": 49, "rawdescription": "\nThe status: label + reference + submit date (+ any note) — the `.status` line." }, { @@ -243,7 +243,7 @@ "indexKey": "", "optional": false, "description": "

What the aanvraag is for (the .subtitle line).

\n", - "line": 40, + "line": 47, "rawdescription": "\nWhat the aanvraag is for (the `.subtitle` line)." } ], @@ -254,12 +254,12 @@ }, { "name": "AanvraagStatusDto", - "id": "interface-AanvraagStatusDto-134629d19fe3b5e6a76daeb4f10c282202eb1b8380b939c25450bb44b86fcb3df7a15e5ead886ad958b8bb7f158457387fb6c11872acdb4893c4933c2fdef07b", + "id": "interface-AanvraagStatusDto-fb1ee9618e8a58db438478dc30a2ef41f099ba42e2d9a7155300e95c801cc6c2851c481c1bff1e7af3c066bc79e76529bbb37756fed2b5e35a56532325220bab", "file": "src/app/shared/infrastructure/api-client.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", + "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n me(): Promise {\n let url_ = this.baseUrl + \"/api/v1/me\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processMe(_response);\n });\n }\n\n protected processMe(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as MeDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDecisionsDto {\n canEdit?: boolean;\n canApprove?: boolean;\n canReject?: boolean;\n canSend?: boolean;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n decisions?: BriefDecisionsDto;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface MeDto {\n capabilities?: string[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", "properties": [ { "name": "manual", @@ -269,7 +269,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1259 + "line": 1295 }, { "name": "reden", @@ -279,7 +279,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1260 + "line": 1296 }, { "name": "referentie", @@ -289,7 +289,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1258 + "line": 1294 }, { "name": "stepCount", @@ -299,7 +299,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1257 + "line": 1293 }, { "name": "stepIndex", @@ -309,7 +309,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1256 + "line": 1292 }, { "name": "tag", @@ -319,7 +319,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1255 + "line": 1291 } ], "indexSignatures": [], @@ -376,12 +376,12 @@ }, { "name": "AdresDto", - "id": "interface-AdresDto-134629d19fe3b5e6a76daeb4f10c282202eb1b8380b939c25450bb44b86fcb3df7a15e5ead886ad958b8bb7f158457387fb6c11872acdb4893c4933c2fdef07b", + "id": "interface-AdresDto-fb1ee9618e8a58db438478dc30a2ef41f099ba42e2d9a7155300e95c801cc6c2851c481c1bff1e7af3c066bc79e76529bbb37756fed2b5e35a56532325220bab", "file": "src/app/shared/infrastructure/api-client.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", + "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n me(): Promise {\n let url_ = this.baseUrl + \"/api/v1/me\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processMe(_response);\n });\n }\n\n protected processMe(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as MeDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDecisionsDto {\n canEdit?: boolean;\n canApprove?: boolean;\n canReject?: boolean;\n canSend?: boolean;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n decisions?: BriefDecisionsDto;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface MeDto {\n capabilities?: string[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", "properties": [ { "name": "postcode", @@ -391,7 +391,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1265 + "line": 1301 }, { "name": "straat", @@ -401,7 +401,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1264 + "line": 1300 }, { "name": "woonplaats", @@ -411,7 +411,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1266 + "line": 1302 } ], "indexSignatures": [], @@ -469,12 +469,12 @@ }, { "name": "AdresValue", - "id": "interface-AdresValue-486bc51fe6e0580e73e1eaff7fadd0391ce7111e5b66294eff93f0f0dc84f19a80abb6dd269909450a94d13a2d7d24aa3b167dbe8472717ecd4208f00c5ae6bc", + "id": "interface-AdresValue-015eae490619260826447717bed220caa3ddf37636c81644c7bb3ed37ee1426d981ebf7410dd6b57987d8c9d00e3046ee5ddabe0bda0856b4d1ddb5a19037d26", "file": "src/app/registratie/ui/address-fields/address-fields.component.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "import { Component, input, output } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { FormFieldComponent } from '@shared/ui/form-field/form-field.component';\nimport { TextInputComponent } from '@shared/ui/text-input/text-input.component';\n\nexport interface AdresValue {\n straat: string;\n postcode: string;\n woonplaats: string;\n}\nexport type AdresErrors = Partial>;\n\n/** Organism: the editable address block (straat / postcode / woonplaats), grouped\n in a fieldset/legend. Pure & presentational — values in via `value`, errors in\n via `errors`, every keystroke out via `fieldChange`. No store, no services, no\n internal state; the container owns the Model and decides what a change means\n (registratie-wizard dispatches SetField; change-request-form sets its props).\n Composes the form-field molecule (×3) so labels/error wiring stay consistent. */\n@Component({\n selector: 'app-address-fields',\n imports: [FormsModule, FormFieldComponent, TextInputComponent],\n styles: [`\n fieldset{border:0;margin:0;padding:0;min-inline-size:0}\n legend{padding:0;font-weight:var(--rhc-text-font-weight-semi-bold);margin-block-end:var(--rhc-space-max-md)}\n `],\n template: `\n
\n {{ legend() }}\n \n \n \n \n \n \n \n \n \n
\n `,\n})\nexport class AddressFieldsComponent {\n value = input.required();\n errors = input({});\n /** Prefix for field ids/labels — keeps them unique if two blocks ever co-exist. */\n idPrefix = input('adres');\n legend = input($localize`:@@address.legend:Adres`);\n fieldChange = output<{ key: keyof AdresValue; value: string }>();\n}\n", + "sourceCode": "import { Component, input, output } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { FormFieldComponent } from '@shared/ui/form-field/form-field.component';\nimport { TextInputComponent } from '@shared/ui/text-input/text-input.component';\n\nexport interface AdresValue {\n straat: string;\n postcode: string;\n woonplaats: string;\n}\nexport type AdresErrors = Partial>;\n\n/** Organism: the editable address block (straat / postcode / woonplaats), grouped\n in a fieldset/legend. Pure & presentational — values in via `value`, errors in\n via `errors`, every keystroke out via `fieldChange`. No store, no services, no\n internal state; the container owns the Model and decides what a change means\n (registratie-wizard dispatches SetField; change-request-form sets its props).\n Composes the form-field molecule (×3) so labels/error wiring stay consistent. */\n@Component({\n selector: 'app-address-fields',\n imports: [FormsModule, FormFieldComponent, TextInputComponent],\n styles: [\n `\n fieldset {\n border: 0;\n margin: 0;\n padding: 0;\n min-inline-size: 0;\n }\n legend {\n padding: 0;\n font-weight: var(--rhc-text-font-weight-semi-bold);\n margin-block-end: var(--rhc-space-max-md);\n }\n `,\n ],\n template: `\n
\n {{ legend() }}\n \n \n \n \n \n \n \n \n \n
\n `,\n})\nexport class AddressFieldsComponent {\n value = input.required();\n errors = input({});\n /** Prefix for field ids/labels — keeps them unique if two blocks ever co-exist. */\n idPrefix = input('adres');\n legend = input($localize`:@@address.legend:Adres`);\n fieldChange = output<{ key: keyof AdresValue; value: string }>();\n}\n", "properties": [ { "name": "postcode", @@ -514,12 +514,12 @@ }, { "name": "Answers", - "id": "interface-Answers-7bf45afef74ccc5d1b6fecd5ce7c56a21a9244e3daaf5f01717b29ec9163e0e4416b96e2a722a32e9260ca035e9a76c4d7a02d13c5dbd784c16d2d9a03e58bc9", + "id": "interface-Answers-680555ac1bfaffac91378e696a359753efc86831c57347b0d4573c7daf842844894c74288115af64a6a779f6cbd7e2b399a42f5a379be1c67aac206b6135997f", "file": "src/app/herregistratie/domain/intake.machine.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "import { Result, ok, err, assertNever } from '@shared/kernel/fp';\nimport { Uren, parseUren } from '@registratie/domain/value-objects/uren';\n\n/**\n * A FIXED 3-step wizard with progressive disclosure. The steps never change in\n * number (always `STEPS`); instead, follow-up questions appear *inline within a\n * step* depending on earlier answers — answer \"buiten Nederland gewerkt? → ja\"\n * and the country/hours questions reveal in the same step; report few hours and\n * the scholing-question reveals inside the 'werk' step. \"Is this field required\n * right now\" is a pure function (`validateStep`/`lageUren`), so it's trivial to\n * test and impossible to get out of sync with the data.\n */\n\nexport type JaNee = 'ja' | 'nee';\n\n/** The three fixed steps. Each step groups one or more questions. */\nexport type StepId = 'buitenland' | 'werk' | 'review';\n\n/** One record carried across every step (and persisted). All optional: the user\n fills it in gradually, and branches may never ask some fields. */\nexport interface Answers {\n buitenlandGewerkt?: JaNee; // Q1\n land?: string; // Q1a — only when buitenlandGewerkt === 'ja'\n buitenlandseUren?: string; // Q1b — only when buitenlandGewerkt === 'ja'\n uren?: string; // Q2 — uren in NL\n scholingGevolgd?: JaNee; // Q3 — only when total hours are below the threshold\n punten?: string; // Q4\n}\n\n/** What we have after the review step parses — guaranteed valid/typed. */\nexport interface ValidIntake {\n werktBuitenland: boolean;\n land?: string;\n buitenlandseUren?: Uren;\n uren: Uren;\n aanvullendeScholing?: boolean;\n punten?: Uren; // only collected when aanvullende scholing is gevolgd (scholingGevolgd === 'ja')\n}\n\n/** Demo fallback only — the real threshold is a SERVER-OWNED policy value fetched\n at runtime (see IntakePolicyDto / SetPolicy). ponytail: default is the offline\n fallback; the server value wins. */\nexport const SCHOLING_THRESHOLD_DEFAULT = 1000;\n\n/** True when NL-hours are low enough that the scholing question must be answered.\n The threshold is passed in (server-owned), not hardcoded. */\nexport function lageUren(a: Answers, scholingThreshold = SCHOLING_THRESHOLD_DEFAULT): boolean {\n const r = parseUren(a.uren ?? '');\n return r.ok && r.value < scholingThreshold;\n}\n\n/** The fixed step list. Number of steps never changes; questions reveal inline. */\nexport const STEPS: StepId[] = ['buitenland', 'werk', 'review'];\n\n/** Per-field error map: one message per question, since a step holds several. */\ntype Errors = Partial>;\n\nexport type IntakeState =\n | { tag: 'Answering'; answers: Answers; cursor: number; errors: Errors; scholingThreshold: number }\n | { tag: 'Submitting'; data: ValidIntake }\n | { tag: 'Submitted'; data: ValidIntake }\n | { tag: 'Failed'; data: ValidIntake; error: string };\n\nexport const initial: IntakeState = { tag: 'Answering', answers: {}, cursor: 0, errors: {}, scholingThreshold: SCHOLING_THRESHOLD_DEFAULT };\n\n/** Which step the cursor currently points at (clamped to the fixed list). */\nexport function currentStep(s: Extract): StepId {\n return STEPS[Math.min(s.cursor, STEPS.length - 1)];\n}\n\n/** Has the user meaningfully started, so it's worth persisting as a Concept?\n (No auto-prefill here — pristine means truly untouched.) */\nexport function hasProgress(s: Extract): boolean {\n return s.cursor > 0 || Object.keys(s.answers).length > 0;\n}\n\n/** Validate every question currently visible in ONE step. Errors keyed per field. */\nfunction validateStep(step: StepId, a: Answers, scholingThreshold: number): Result {\n const errors: Errors = {};\n switch (step) {\n case 'buitenland':\n if (!a.buitenlandGewerkt) errors.buitenlandGewerkt = $localize`:@@validation.maakKeuze:Maak een keuze.`;\n else if (a.buitenlandGewerkt === 'ja') {\n if (!a.land || a.land.trim() === '') errors.land = $localize`:@@validation.land:Vul een land in.`;\n const u = parseUren(a.buitenlandseUren ?? '');\n if (!u.ok) errors.buitenlandseUren = u.error;\n }\n break;\n case 'werk': {\n const u = parseUren(a.uren ?? '');\n if (!u.ok) errors.uren = u.error;\n if (lageUren(a, scholingThreshold) && !a.scholingGevolgd) errors.scholingGevolgd = $localize`:@@validation.maakKeuze:Maak een keuze.`;\n // Nascholingspunten are only asked (and required) when scholing was followed.\n if (a.scholingGevolgd === 'ja') {\n const p = parseUren(a.punten ?? '');\n if (!p.ok) errors.punten = p.error;\n }\n break;\n }\n case 'review':\n break; // review shows a summary; no own fields\n default:\n return assertNever(step);\n }\n return Object.keys(errors).length > 0 ? err(errors) : ok(undefined);\n}\n\n/** Parse the whole questionnaire into a ValidIntake (called on submit). */\nfunction validateAll(a: Answers, scholingThreshold: number): Result {\n const errors: Errors = {};\n for (const step of STEPS) {\n const r = validateStep(step, a, scholingThreshold);\n if (!r.ok) Object.assign(errors, r.error);\n }\n if (Object.keys(errors).length > 0) return err(errors);\n\n const uren = parseUren(a.uren ?? '');\n // validateStep guaranteed uren parses, but keep the compiler happy.\n if (!uren.ok) return err(errors);\n\n const werktBuitenland = a.buitenlandGewerkt === 'ja';\n const buitenland = parseUren(a.buitenlandseUren ?? '');\n // Punten are only collected when aanvullende scholing was gevolgd.\n const punten = a.scholingGevolgd === 'ja' ? parseUren(a.punten ?? '') : undefined;\n return ok({\n werktBuitenland,\n land: werktBuitenland ? a.land : undefined,\n buitenlandseUren: werktBuitenland && buitenland.ok ? buitenland.value : undefined,\n uren: uren.value,\n aanvullendeScholing: lageUren(a, scholingThreshold) ? a.scholingGevolgd === 'ja' : undefined,\n punten: punten?.ok ? punten.value : undefined,\n });\n}\n\nexport function setAnswer(s: IntakeState, key: keyof Answers, value: string): IntakeState {\n if (s.tag !== 'Answering') return s;\n // Steps are fixed, so editing an answer never moves the cursor — it only\n // reveals/hides inline questions within the current step.\n return { ...s, answers: { ...s.answers, [key]: value } };\n}\n\nexport function next(s: IntakeState): IntakeState {\n if (s.tag !== 'Answering') return s;\n const r = validateStep(currentStep(s), s.answers, s.scholingThreshold);\n if (!r.ok) return { ...s, errors: r.error };\n return { ...s, cursor: Math.min(s.cursor + 1, STEPS.length - 1), errors: {} };\n}\n\n/** Apply a server-owned policy value (e.g. the scholing threshold). */\nexport function setPolicy(s: IntakeState, scholingThreshold: number): IntakeState {\n return s.tag === 'Answering' ? { ...s, scholingThreshold } : s;\n}\n\nexport function back(s: IntakeState): IntakeState {\n if (s.tag !== 'Answering' || s.cursor === 0) return s;\n return { ...s, cursor: s.cursor - 1, errors: {} };\n}\n\n/** Jump back to an earlier step to correct answers (review → step N). Forward\n jumps are not allowed (would skip validation). */\nexport function gaNaarStap(s: IntakeState, cursor: number): IntakeState {\n if (s.tag !== 'Answering' || cursor < 0 || cursor >= s.cursor) return s;\n return { ...s, cursor, errors: {} };\n}\n\nexport function submit(s: IntakeState): IntakeState {\n if (s.tag !== 'Answering') return s;\n const r = validateAll(s.answers, s.scholingThreshold);\n return r.ok ? { tag: 'Submitting', data: r.value } : { ...s, errors: r.error };\n}\n\nexport function resolve(s: IntakeState, r: Result): IntakeState {\n if (s.tag !== 'Submitting') return s;\n return r.ok ? { tag: 'Submitted', data: s.data } : { tag: 'Failed', data: s.data, error: r.error };\n}\n\nexport type IntakeMsg =\n | { tag: 'SetAnswer'; key: keyof Answers; value: string }\n | { tag: 'Next' }\n | { tag: 'Back' }\n | { tag: 'GaNaarStap'; cursor: number }\n | { tag: 'Submit' }\n | { tag: 'Retry' }\n | { tag: 'SubmitConfirmed' }\n | { tag: 'SubmitFailed'; error: string }\n | { tag: 'SetPolicy'; scholingThreshold: number }\n | { tag: 'Seed'; state: IntakeState };\n\nexport function reduce(s: IntakeState, m: IntakeMsg): IntakeState {\n switch (m.tag) {\n case 'SetAnswer':\n return setAnswer(s, m.key, m.value);\n case 'Next':\n return next(s);\n case 'Back':\n return back(s);\n case 'GaNaarStap':\n return gaNaarStap(s, m.cursor);\n case 'Submit':\n return submit(s);\n case 'Retry':\n return s.tag === 'Failed' ? { tag: 'Submitting', data: s.data } : s;\n case 'SubmitConfirmed':\n return s.tag === 'Submitting' ? { tag: 'Submitted', data: s.data } : s;\n case 'SubmitFailed':\n return s.tag === 'Submitting' ? { tag: 'Failed', data: s.data, error: m.error } : s;\n case 'SetPolicy':\n return setPolicy(s, m.scholingThreshold);\n case 'Seed':\n return m.state;\n default:\n return assertNever(m);\n }\n}\n", + "sourceCode": "import { Result, ok, err, assertNever } from '@shared/kernel/fp';\nimport { Uren, parseUren } from '@registratie/domain/value-objects/uren';\n\n/**\n * A FIXED 3-step wizard with progressive disclosure. The steps never change in\n * number (always `STEPS`); instead, follow-up questions appear *inline within a\n * step* depending on earlier answers — answer \"buiten Nederland gewerkt? → ja\"\n * and the country/hours questions reveal in the same step; report few hours and\n * the scholing-question reveals inside the 'werk' step. \"Is this field required\n * right now\" is a pure function (`validateStep`/`lageUren`), so it's trivial to\n * test and impossible to get out of sync with the data.\n */\n\nexport type JaNee = 'ja' | 'nee';\n\n/** The three fixed steps. Each step groups one or more questions. */\nexport type StepId = 'buitenland' | 'werk' | 'review';\n\n/** One record carried across every step (and persisted). All optional: the user\n fills it in gradually, and branches may never ask some fields. */\nexport interface Answers {\n buitenlandGewerkt?: JaNee; // Q1\n land?: string; // Q1a — only when buitenlandGewerkt === 'ja'\n buitenlandseUren?: string; // Q1b — only when buitenlandGewerkt === 'ja'\n uren?: string; // Q2 — uren in NL\n scholingGevolgd?: JaNee; // Q3 — only when total hours are below the threshold\n punten?: string; // Q4\n}\n\n/** What we have after the review step parses — guaranteed valid/typed. */\nexport interface ValidIntake {\n werktBuitenland: boolean;\n land?: string;\n buitenlandseUren?: Uren;\n uren: Uren;\n aanvullendeScholing?: boolean;\n punten?: Uren; // only collected when aanvullende scholing is gevolgd (scholingGevolgd === 'ja')\n}\n\n/** Demo fallback only — the real threshold is a SERVER-OWNED policy value fetched\n at runtime (see IntakePolicyDto / SetPolicy). ponytail: default is the offline\n fallback; the server value wins. */\nexport const SCHOLING_THRESHOLD_DEFAULT = 1000;\n\n/** True when NL-hours are low enough that the scholing question must be answered.\n The threshold is passed in (server-owned), not hardcoded. */\nexport function lageUren(a: Answers, scholingThreshold = SCHOLING_THRESHOLD_DEFAULT): boolean {\n const r = parseUren(a.uren ?? '');\n return r.ok && r.value < scholingThreshold;\n}\n\n/** The fixed step list. Number of steps never changes; questions reveal inline. */\nexport const STEPS: StepId[] = ['buitenland', 'werk', 'review'];\n\n/** Per-field error map: one message per question, since a step holds several. */\ntype Errors = Partial>;\n\nexport type IntakeState =\n | {\n tag: 'Answering';\n answers: Answers;\n cursor: number;\n errors: Errors;\n scholingThreshold: number;\n }\n | { tag: 'Submitting'; data: ValidIntake }\n | { tag: 'Submitted'; data: ValidIntake }\n | { tag: 'Failed'; data: ValidIntake; error: string };\n\nexport const initial: IntakeState = {\n tag: 'Answering',\n answers: {},\n cursor: 0,\n errors: {},\n scholingThreshold: SCHOLING_THRESHOLD_DEFAULT,\n};\n\n/** Which step the cursor currently points at (clamped to the fixed list). */\nexport function currentStep(s: Extract): StepId {\n return STEPS[Math.min(s.cursor, STEPS.length - 1)];\n}\n\n/** Has the user meaningfully started, so it's worth persisting as a Concept?\n (No auto-prefill here — pristine means truly untouched.) */\nexport function hasProgress(s: Extract): boolean {\n return s.cursor > 0 || Object.keys(s.answers).length > 0;\n}\n\n/** Validate every question currently visible in ONE step. Errors keyed per field. */\nfunction validateStep(step: StepId, a: Answers, scholingThreshold: number): Result {\n const errors: Errors = {};\n switch (step) {\n case 'buitenland':\n if (!a.buitenlandGewerkt)\n errors.buitenlandGewerkt = $localize`:@@validation.maakKeuze:Maak een keuze.`;\n else if (a.buitenlandGewerkt === 'ja') {\n if (!a.land || a.land.trim() === '')\n errors.land = $localize`:@@validation.land:Vul een land in.`;\n const u = parseUren(a.buitenlandseUren ?? '');\n if (!u.ok) errors.buitenlandseUren = u.error;\n }\n break;\n case 'werk': {\n const u = parseUren(a.uren ?? '');\n if (!u.ok) errors.uren = u.error;\n if (lageUren(a, scholingThreshold) && !a.scholingGevolgd)\n errors.scholingGevolgd = $localize`:@@validation.maakKeuze:Maak een keuze.`;\n // Nascholingspunten are only asked (and required) when scholing was followed.\n if (a.scholingGevolgd === 'ja') {\n const p = parseUren(a.punten ?? '');\n if (!p.ok) errors.punten = p.error;\n }\n break;\n }\n case 'review':\n break; // review shows a summary; no own fields\n default:\n return assertNever(step);\n }\n return Object.keys(errors).length > 0 ? err(errors) : ok(undefined);\n}\n\n/** Parse the whole questionnaire into a ValidIntake (called on submit). */\nfunction validateAll(a: Answers, scholingThreshold: number): Result {\n const errors: Errors = {};\n for (const step of STEPS) {\n const r = validateStep(step, a, scholingThreshold);\n if (!r.ok) Object.assign(errors, r.error);\n }\n if (Object.keys(errors).length > 0) return err(errors);\n\n const uren = parseUren(a.uren ?? '');\n // validateStep guaranteed uren parses, but keep the compiler happy.\n if (!uren.ok) return err(errors);\n\n const werktBuitenland = a.buitenlandGewerkt === 'ja';\n const buitenland = parseUren(a.buitenlandseUren ?? '');\n // Punten are only collected when aanvullende scholing was gevolgd.\n const punten = a.scholingGevolgd === 'ja' ? parseUren(a.punten ?? '') : undefined;\n return ok({\n werktBuitenland,\n land: werktBuitenland ? a.land : undefined,\n buitenlandseUren: werktBuitenland && buitenland.ok ? buitenland.value : undefined,\n uren: uren.value,\n aanvullendeScholing: lageUren(a, scholingThreshold) ? a.scholingGevolgd === 'ja' : undefined,\n punten: punten?.ok ? punten.value : undefined,\n });\n}\n\nexport function setAnswer(s: IntakeState, key: keyof Answers, value: string): IntakeState {\n if (s.tag !== 'Answering') return s;\n // Steps are fixed, so editing an answer never moves the cursor — it only\n // reveals/hides inline questions within the current step.\n return { ...s, answers: { ...s.answers, [key]: value } };\n}\n\nexport function next(s: IntakeState): IntakeState {\n if (s.tag !== 'Answering') return s;\n const r = validateStep(currentStep(s), s.answers, s.scholingThreshold);\n if (!r.ok) return { ...s, errors: r.error };\n return { ...s, cursor: Math.min(s.cursor + 1, STEPS.length - 1), errors: {} };\n}\n\n/** Apply a server-owned policy value (e.g. the scholing threshold). */\nexport function setPolicy(s: IntakeState, scholingThreshold: number): IntakeState {\n return s.tag === 'Answering' ? { ...s, scholingThreshold } : s;\n}\n\nexport function back(s: IntakeState): IntakeState {\n if (s.tag !== 'Answering' || s.cursor === 0) return s;\n return { ...s, cursor: s.cursor - 1, errors: {} };\n}\n\n/** Jump back to an earlier step to correct answers (review → step N). Forward\n jumps are not allowed (would skip validation). */\nexport function gaNaarStap(s: IntakeState, cursor: number): IntakeState {\n if (s.tag !== 'Answering' || cursor < 0 || cursor >= s.cursor) return s;\n return { ...s, cursor, errors: {} };\n}\n\nexport function submit(s: IntakeState): IntakeState {\n if (s.tag !== 'Answering') return s;\n const r = validateAll(s.answers, s.scholingThreshold);\n return r.ok ? { tag: 'Submitting', data: r.value } : { ...s, errors: r.error };\n}\n\nexport function resolve(s: IntakeState, r: Result): IntakeState {\n if (s.tag !== 'Submitting') return s;\n return r.ok\n ? { tag: 'Submitted', data: s.data }\n : { tag: 'Failed', data: s.data, error: r.error };\n}\n\nexport type IntakeMsg =\n | { tag: 'SetAnswer'; key: keyof Answers; value: string }\n | { tag: 'Next' }\n | { tag: 'Back' }\n | { tag: 'GaNaarStap'; cursor: number }\n | { tag: 'Submit' }\n | { tag: 'Retry' }\n | { tag: 'SubmitConfirmed' }\n | { tag: 'SubmitFailed'; error: string }\n | { tag: 'SetPolicy'; scholingThreshold: number }\n | { tag: 'Seed'; state: IntakeState };\n\nexport function reduce(s: IntakeState, m: IntakeMsg): IntakeState {\n switch (m.tag) {\n case 'SetAnswer':\n return setAnswer(s, m.key, m.value);\n case 'Next':\n return next(s);\n case 'Back':\n return back(s);\n case 'GaNaarStap':\n return gaNaarStap(s, m.cursor);\n case 'Submit':\n return submit(s);\n case 'Retry':\n return s.tag === 'Failed' ? { tag: 'Submitting', data: s.data } : s;\n case 'SubmitConfirmed':\n return s.tag === 'Submitting' ? { tag: 'Submitted', data: s.data } : s;\n case 'SubmitFailed':\n return s.tag === 'Submitting' ? { tag: 'Failed', data: s.data, error: m.error } : s;\n case 'SetPolicy':\n return setPolicy(s, m.scholingThreshold);\n case 'Seed':\n return m.state;\n default:\n return assertNever(m);\n }\n}\n", "properties": [ { "name": "buitenlandGewerkt", @@ -591,12 +591,12 @@ }, { "name": "ApplicationDetailDto", - "id": "interface-ApplicationDetailDto-134629d19fe3b5e6a76daeb4f10c282202eb1b8380b939c25450bb44b86fcb3df7a15e5ead886ad958b8bb7f158457387fb6c11872acdb4893c4933c2fdef07b", + "id": "interface-ApplicationDetailDto-fb1ee9618e8a58db438478dc30a2ef41f099ba42e2d9a7155300e95c801cc6c2851c481c1bff1e7af3c066bc79e76529bbb37756fed2b5e35a56532325220bab", "file": "src/app/shared/infrastructure/api-client.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", + "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n me(): Promise {\n let url_ = this.baseUrl + \"/api/v1/me\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processMe(_response);\n });\n }\n\n protected processMe(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as MeDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDecisionsDto {\n canEdit?: boolean;\n canApprove?: boolean;\n canReject?: boolean;\n canSend?: boolean;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n decisions?: BriefDecisionsDto;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface MeDto {\n capabilities?: string[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", "properties": [ { "name": "createdAt", @@ -606,7 +606,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1275 + "line": 1311 }, { "name": "documentIds", @@ -616,7 +616,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1274 + "line": 1310 }, { "name": "draft", @@ -626,7 +626,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1273 + "line": 1309 }, { "name": "id", @@ -636,7 +636,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1270 + "line": 1306 }, { "name": "status", @@ -646,7 +646,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1272 + "line": 1308 }, { "name": "submittedAt", @@ -656,7 +656,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1277 + "line": 1313 }, { "name": "type", @@ -666,7 +666,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1271 + "line": 1307 }, { "name": "updatedAt", @@ -676,7 +676,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1276 + "line": 1312 } ], "indexSignatures": [], @@ -686,12 +686,12 @@ }, { "name": "ApplicationSummaryDto", - "id": "interface-ApplicationSummaryDto-134629d19fe3b5e6a76daeb4f10c282202eb1b8380b939c25450bb44b86fcb3df7a15e5ead886ad958b8bb7f158457387fb6c11872acdb4893c4933c2fdef07b", + "id": "interface-ApplicationSummaryDto-fb1ee9618e8a58db438478dc30a2ef41f099ba42e2d9a7155300e95c801cc6c2851c481c1bff1e7af3c066bc79e76529bbb37756fed2b5e35a56532325220bab", "file": "src/app/shared/infrastructure/api-client.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", + "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n me(): Promise {\n let url_ = this.baseUrl + \"/api/v1/me\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processMe(_response);\n });\n }\n\n protected processMe(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as MeDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDecisionsDto {\n canEdit?: boolean;\n canApprove?: boolean;\n canReject?: boolean;\n canSend?: boolean;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n decisions?: BriefDecisionsDto;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface MeDto {\n capabilities?: string[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", "properties": [ { "name": "createdAt", @@ -701,7 +701,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1285 + "line": 1321 }, { "name": "documentIds", @@ -711,7 +711,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1284 + "line": 1320 }, { "name": "id", @@ -721,7 +721,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1281 + "line": 1317 }, { "name": "status", @@ -731,7 +731,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1283 + "line": 1319 }, { "name": "submittedAt", @@ -741,7 +741,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1287 + "line": 1323 }, { "name": "type", @@ -751,7 +751,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1282 + "line": 1318 }, { "name": "updatedAt", @@ -761,7 +761,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1286 + "line": 1322 } ], "indexSignatures": [], @@ -808,12 +808,12 @@ }, { "name": "BreadcrumbItem", - "id": "interface-BreadcrumbItem-ca2d9e2ecbcf92ee4c86cc2f0d2eafa6be15870319719a9c4a3c7ad14597a383bc488f7503bf0e608f37b57ca8f2d7b790dac822e4908bdff4324cb617e8ce98", + "id": "interface-BreadcrumbItem-5cc0813df484012a94edf479464fb40695912dfaf900d95e71fa7b69079cd96dafa4d7b4109b3020bd43ce3ac25736056ddb42aaf43424739e647291e61a02b2", "file": "src/app/shared/layout/breadcrumb/breadcrumb.component.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "import { Component, input } from '@angular/core';\nimport { RouterLink } from '@angular/router';\n\nexport interface BreadcrumbItem {\n label: string;\n link?: string; // omit on the current (last) page\n}\n\n/** Chrome: breadcrumb navigation, styled for the CIBG titlebar (`.titlebar .title`) —\n plain links with a chevron `::after` from the CIBG Icons font, current page as an\n unlinked, bold span. Domain-free — the caller supplies the trail. */\n@Component({\n selector: 'app-breadcrumb',\n imports: [RouterLink],\n // CIBG's global \"header nav\" background rule matches ANY nav inside a
\n // — including this one, wherever it's mounted. Override it so the breadcrumb\n // never carries its own background (it should show whatever's behind it, e.g.\n // the titlebar's robijn fill).\n styles: [`nav{background:none}`],\n template: `\n \n `,\n})\nexport class BreadcrumbComponent {\n items = input.required();\n}\n", + "sourceCode": "import { Component, input } from '@angular/core';\nimport { RouterLink } from '@angular/router';\n\nexport interface BreadcrumbItem {\n label: string;\n link?: string; // omit on the current (last) page\n}\n\n/** Chrome: breadcrumb navigation, styled for the CIBG titlebar (`.titlebar .title`) —\n plain links with a chevron `::after` from the CIBG Icons font, current page as an\n unlinked, bold span. Domain-free — the caller supplies the trail. */\n@Component({\n selector: 'app-breadcrumb',\n imports: [RouterLink],\n // CIBG's global \"header nav\" background rule matches ANY nav inside a
\n // — including this one, wherever it's mounted. Override it so the breadcrumb\n // never carries its own background (it should show whatever's behind it, e.g.\n // the titlebar's robijn fill).\n styles: [\n `\n nav {\n background: none;\n }\n `,\n ],\n template: `\n \n `,\n})\nexport class BreadcrumbComponent {\n items = input.required();\n}\n", "properties": [ { "name": "label", @@ -843,12 +843,12 @@ }, { "name": "Brief", - "id": "interface-Brief-039c5d6b394bb2232cfe3dcb751c570fd3683a09171bc3d7a7a6498185bff667b40236840f0c1010e79861a99c27279a3c324ae82cebd97ef0a73f87f27878a4", + "id": "interface-Brief-26aef4f3009ac7786c37d55aa31ae2c74313694364bf3ec3112e7a1d1890fd4b265dd8b5ec955ea190df6ac75fd6fcbb8fc7693efc4957323a08aa13056b99b5", "file": "src/app/brief/domain/brief.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "import { RichTextBlock, placeholderKeysIn } from '@shared/kernel/rich-text';\nimport { Diagnostic, lintPlaceholders, PlaceholderDef } from './placeholders';\n\n/**\n * The `Brief` (letter) entity and its derived selectors.\n *\n * A letter has a FIXED section structure (from a template, server-instantiated); the\n * drafter fills a skeleton, never reorders sections. Each block is either a frozen\n * snapshot of a library passage (provenance kept) or free text. Everything the UI\n * needs beyond the stored shape — diagnostics, unresolved placeholders, whether it\n * can be submitted — is DERIVED here, never stored.\n */\n\nexport type PassageScope = 'global' | 'beroep';\n\n// Re-export placeholderKeysIn for one-import convenience at call sites.\nexport { placeholderKeysIn };\n\n/** A passage in the library (the source). Snapshotted into a letter on insert. */\nexport interface LibraryPassage {\n readonly passageId: string;\n readonly scope: PassageScope;\n readonly beroep?: string; // set when scope === 'beroep'\n readonly sectionKey: string;\n readonly label: string;\n readonly content: RichTextBlock;\n readonly version: number; // library version, for provenance only\n}\n\n/** A block inside a letter section: a frozen passage snapshot, or free text. */\nexport type LetterBlock =\n | {\n readonly type: 'passage';\n readonly blockId: string;\n readonly sourcePassageId: string; // provenance\n readonly sourceVersion: number; // library version at snapshot time (audit only)\n readonly content: RichTextBlock; // FROZEN, possibly edited — source of truth for this block\n readonly edited: boolean; // changed from the snapshot?\n }\n | {\n readonly type: 'freeText';\n readonly blockId: string;\n readonly content: RichTextBlock;\n };\n\nexport interface LetterSection {\n readonly sectionKey: string;\n readonly title: string;\n readonly required: boolean;\n // Predefined template sections (aanhef, slot) arrive locked and prefilled — the drafter\n // composes only the unlocked section(s). The reducer refuses edits to locked sections.\n readonly locked: boolean;\n readonly blocks: readonly LetterBlock[];\n}\n\n/** The approval state machine as a sum type — transitions are total and guarded in\n `brief.machine.ts`; illegal transitions are unrepresentable. */\nexport type BriefStatus =\n | { readonly tag: 'draft' }\n | { readonly tag: 'submitted'; readonly submittedBy: string; readonly submittedAt: string }\n | { readonly tag: 'approved'; readonly approvedBy: string; readonly approvedAt: string }\n | { readonly tag: 'rejected'; readonly rejectedBy: string; readonly rejectedAt: string; readonly comments: string }\n | { readonly tag: 'sent'; readonly sentAt: string };\n\nexport interface Brief {\n readonly briefId: string;\n readonly beroep: string; // drives which beroep-scoped passages apply\n readonly templateId: string;\n readonly placeholders: readonly PlaceholderDef[]; // valid fields for this letter\n readonly sections: readonly LetterSection[]; // instantiated from the template, in order\n readonly status: BriefStatus;\n readonly drafterId: string;\n}\n\n// --- Derived selectors (pure; recomputed, never stored) ---\n\nexport function allBlocks(brief: Brief): LetterBlock[] {\n return brief.sections.flatMap((s) => s.blocks);\n}\n\n/** Every diagnostic in the letter, in section→block→node order. This is what the\n diagnostics panel renders and what the send gate checks. */\nexport function allDiagnostics(brief: Brief): Diagnostic[] {\n return allBlocks(brief).flatMap((b) => lintPlaceholders(b.content, brief.placeholders, b.blockId));\n}\n\nexport function hasBlockingErrors(diagnostics: readonly Diagnostic[]): boolean {\n return diagnostics.some((d) => d.severity === 'error');\n}\n\n/** Manual (non-auto-resolvable) placeholder keys still present, deduped. These are the\n `unresolved-at-send` warnings, surfaced as a completeness list. */\nexport function unresolvedPlaceholders(brief: Brief): string[] {\n const auto = new Set(brief.placeholders.filter((p) => p.autoResolvable).map((p) => p.key));\n const used = allBlocks(brief).flatMap((b) => placeholderKeysIn(b.content));\n return [...new Set(used.filter((k) => !auto.has(k)))];\n}\n\n/** A letter can be submitted only when every REQUIRED section has at least one block. */\nexport function canSubmit(brief: Brief): boolean {\n return brief.sections.every((s) => !s.required || s.blocks.length > 0);\n}\n", + "sourceCode": "import { RichTextBlock, placeholderKeysIn } from '@shared/kernel/rich-text';\nimport { Diagnostic, lintPlaceholders, PlaceholderDef } from './placeholders';\n\n/**\n * The `Brief` (letter) entity and its derived selectors.\n *\n * A letter has a FIXED section structure (from a template, server-instantiated); the\n * drafter fills a skeleton, never reorders sections. Each block is either a frozen\n * snapshot of a library passage (provenance kept) or free text. Everything the UI\n * needs beyond the stored shape — diagnostics, unresolved placeholders, whether it\n * can be submitted — is DERIVED here, never stored.\n */\n\nexport type PassageScope = 'global' | 'beroep';\n\n// Re-export placeholderKeysIn for one-import convenience at call sites.\nexport { placeholderKeysIn };\n\n/** A passage in the library (the source). Snapshotted into a letter on insert. */\nexport interface LibraryPassage {\n readonly passageId: string;\n readonly scope: PassageScope;\n readonly beroep?: string; // set when scope === 'beroep'\n readonly sectionKey: string;\n readonly label: string;\n readonly content: RichTextBlock;\n readonly version: number; // library version, for provenance only\n}\n\n/** A block inside a letter section: a frozen passage snapshot, or free text. */\nexport type LetterBlock =\n | {\n readonly type: 'passage';\n readonly blockId: string;\n readonly sourcePassageId: string; // provenance\n readonly sourceVersion: number; // library version at snapshot time (audit only)\n readonly content: RichTextBlock; // FROZEN, possibly edited — source of truth for this block\n readonly edited: boolean; // changed from the snapshot?\n }\n | {\n readonly type: 'freeText';\n readonly blockId: string;\n readonly content: RichTextBlock;\n };\n\nexport interface LetterSection {\n readonly sectionKey: string;\n readonly title: string;\n readonly required: boolean;\n // Predefined template sections (aanhef, slot) arrive locked and prefilled — the drafter\n // composes only the unlocked section(s). The reducer refuses edits to locked sections.\n readonly locked: boolean;\n readonly blocks: readonly LetterBlock[];\n}\n\n/** The approval state machine as a sum type — transitions are total and guarded in\n `brief.machine.ts`; illegal transitions are unrepresentable. */\nexport type BriefStatus =\n | { readonly tag: 'draft' }\n | { readonly tag: 'submitted'; readonly submittedBy: string; readonly submittedAt: string }\n | { readonly tag: 'approved'; readonly approvedBy: string; readonly approvedAt: string }\n | {\n readonly tag: 'rejected';\n readonly rejectedBy: string;\n readonly rejectedAt: string;\n readonly comments: string;\n }\n | { readonly tag: 'sent'; readonly sentAt: string };\n\nexport interface Brief {\n readonly briefId: string;\n readonly beroep: string; // drives which beroep-scoped passages apply\n readonly templateId: string;\n readonly placeholders: readonly PlaceholderDef[]; // valid fields for this letter\n readonly sections: readonly LetterSection[]; // instantiated from the template, in order\n readonly status: BriefStatus;\n readonly drafterId: string;\n}\n\n// --- Derived selectors (pure; recomputed, never stored) ---\n\nexport function allBlocks(brief: Brief): LetterBlock[] {\n return brief.sections.flatMap((s) => s.blocks);\n}\n\n/** Every diagnostic in the letter, in section→block→node order. This is what the\n diagnostics panel renders and what the send gate checks. */\nexport function allDiagnostics(brief: Brief): Diagnostic[] {\n return allBlocks(brief).flatMap((b) =>\n lintPlaceholders(b.content, brief.placeholders, b.blockId),\n );\n}\n\nexport function hasBlockingErrors(diagnostics: readonly Diagnostic[]): boolean {\n return diagnostics.some((d) => d.severity === 'error');\n}\n\n/** Manual (non-auto-resolvable) placeholder keys still present, deduped. These are the\n `unresolved-at-send` warnings, surfaced as a completeness list. */\nexport function unresolvedPlaceholders(brief: Brief): string[] {\n const auto = new Set(brief.placeholders.filter((p) => p.autoResolvable).map((p) => p.key));\n const used = allBlocks(brief).flatMap((b) => placeholderKeysIn(b.content));\n return [...new Set(used.filter((k) => !auto.has(k)))];\n}\n\n/** A letter can be submitted only when every REQUIRED section has at least one block. */\nexport function canSubmit(brief: Brief): boolean {\n return brief.sections.every((s) => !s.required || s.blocks.length > 0);\n}\n\n/** Server-computed decision flags for the acting principal + this brief's live\n status (PRD-0002 phase P1) — rendered as-is, never recomputed here. */\nexport interface BriefDecisions {\n readonly canEdit: boolean;\n readonly canApprove: boolean;\n readonly canReject: boolean;\n readonly canSend: boolean;\n}\n", "properties": [ { "name": "beroep", @@ -858,37 +858,37 @@ "indexKey": "", "optional": false, "description": "", - "line": 67, - "modifierKind": [ - 148 - ] - }, - { - "name": "briefId", - "deprecated": false, - "deprecationMessage": "", - "type": "string", - "indexKey": "", - "optional": false, - "description": "", - "line": 66, - "modifierKind": [ - 148 - ] - }, - { - "name": "drafterId", - "deprecated": false, - "deprecationMessage": "", - "type": "string", - "indexKey": "", - "optional": false, - "description": "", "line": 72, "modifierKind": [ 148 ] }, + { + "name": "briefId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "indexKey": "", + "optional": false, + "description": "", + "line": 71, + "modifierKind": [ + 148 + ] + }, + { + "name": "drafterId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "indexKey": "", + "optional": false, + "description": "", + "line": 77, + "modifierKind": [ + 148 + ] + }, { "name": "placeholders", "deprecated": false, @@ -897,7 +897,7 @@ "indexKey": "", "optional": false, "description": "", - "line": 69, + "line": 74, "modifierKind": [ 148 ] @@ -910,7 +910,7 @@ "indexKey": "", "optional": false, "description": "", - "line": 70, + "line": 75, "modifierKind": [ 148 ] @@ -923,7 +923,7 @@ "indexKey": "", "optional": false, "description": "", - "line": 71, + "line": 76, "modifierKind": [ 148 ] @@ -936,7 +936,7 @@ "indexKey": "", "optional": false, "description": "", - "line": 68, + "line": 73, "modifierKind": [ 148 ] @@ -948,13 +948,137 @@ "extends": [] }, { - "name": "BriefDto", - "id": "interface-BriefDto-134629d19fe3b5e6a76daeb4f10c282202eb1b8380b939c25450bb44b86fcb3df7a15e5ead886ad958b8bb7f158457387fb6c11872acdb4893c4933c2fdef07b", + "name": "BriefDecisions", + "id": "interface-BriefDecisions-26aef4f3009ac7786c37d55aa31ae2c74313694364bf3ec3112e7a1d1890fd4b265dd8b5ec955ea190df6ac75fd6fcbb8fc7693efc4957323a08aa13056b99b5", + "file": "src/app/brief/domain/brief.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { RichTextBlock, placeholderKeysIn } from '@shared/kernel/rich-text';\nimport { Diagnostic, lintPlaceholders, PlaceholderDef } from './placeholders';\n\n/**\n * The `Brief` (letter) entity and its derived selectors.\n *\n * A letter has a FIXED section structure (from a template, server-instantiated); the\n * drafter fills a skeleton, never reorders sections. Each block is either a frozen\n * snapshot of a library passage (provenance kept) or free text. Everything the UI\n * needs beyond the stored shape — diagnostics, unresolved placeholders, whether it\n * can be submitted — is DERIVED here, never stored.\n */\n\nexport type PassageScope = 'global' | 'beroep';\n\n// Re-export placeholderKeysIn for one-import convenience at call sites.\nexport { placeholderKeysIn };\n\n/** A passage in the library (the source). Snapshotted into a letter on insert. */\nexport interface LibraryPassage {\n readonly passageId: string;\n readonly scope: PassageScope;\n readonly beroep?: string; // set when scope === 'beroep'\n readonly sectionKey: string;\n readonly label: string;\n readonly content: RichTextBlock;\n readonly version: number; // library version, for provenance only\n}\n\n/** A block inside a letter section: a frozen passage snapshot, or free text. */\nexport type LetterBlock =\n | {\n readonly type: 'passage';\n readonly blockId: string;\n readonly sourcePassageId: string; // provenance\n readonly sourceVersion: number; // library version at snapshot time (audit only)\n readonly content: RichTextBlock; // FROZEN, possibly edited — source of truth for this block\n readonly edited: boolean; // changed from the snapshot?\n }\n | {\n readonly type: 'freeText';\n readonly blockId: string;\n readonly content: RichTextBlock;\n };\n\nexport interface LetterSection {\n readonly sectionKey: string;\n readonly title: string;\n readonly required: boolean;\n // Predefined template sections (aanhef, slot) arrive locked and prefilled — the drafter\n // composes only the unlocked section(s). The reducer refuses edits to locked sections.\n readonly locked: boolean;\n readonly blocks: readonly LetterBlock[];\n}\n\n/** The approval state machine as a sum type — transitions are total and guarded in\n `brief.machine.ts`; illegal transitions are unrepresentable. */\nexport type BriefStatus =\n | { readonly tag: 'draft' }\n | { readonly tag: 'submitted'; readonly submittedBy: string; readonly submittedAt: string }\n | { readonly tag: 'approved'; readonly approvedBy: string; readonly approvedAt: string }\n | {\n readonly tag: 'rejected';\n readonly rejectedBy: string;\n readonly rejectedAt: string;\n readonly comments: string;\n }\n | { readonly tag: 'sent'; readonly sentAt: string };\n\nexport interface Brief {\n readonly briefId: string;\n readonly beroep: string; // drives which beroep-scoped passages apply\n readonly templateId: string;\n readonly placeholders: readonly PlaceholderDef[]; // valid fields for this letter\n readonly sections: readonly LetterSection[]; // instantiated from the template, in order\n readonly status: BriefStatus;\n readonly drafterId: string;\n}\n\n// --- Derived selectors (pure; recomputed, never stored) ---\n\nexport function allBlocks(brief: Brief): LetterBlock[] {\n return brief.sections.flatMap((s) => s.blocks);\n}\n\n/** Every diagnostic in the letter, in section→block→node order. This is what the\n diagnostics panel renders and what the send gate checks. */\nexport function allDiagnostics(brief: Brief): Diagnostic[] {\n return allBlocks(brief).flatMap((b) =>\n lintPlaceholders(b.content, brief.placeholders, b.blockId),\n );\n}\n\nexport function hasBlockingErrors(diagnostics: readonly Diagnostic[]): boolean {\n return diagnostics.some((d) => d.severity === 'error');\n}\n\n/** Manual (non-auto-resolvable) placeholder keys still present, deduped. These are the\n `unresolved-at-send` warnings, surfaced as a completeness list. */\nexport function unresolvedPlaceholders(brief: Brief): string[] {\n const auto = new Set(brief.placeholders.filter((p) => p.autoResolvable).map((p) => p.key));\n const used = allBlocks(brief).flatMap((b) => placeholderKeysIn(b.content));\n return [...new Set(used.filter((k) => !auto.has(k)))];\n}\n\n/** A letter can be submitted only when every REQUIRED section has at least one block. */\nexport function canSubmit(brief: Brief): boolean {\n return brief.sections.every((s) => !s.required || s.blocks.length > 0);\n}\n\n/** Server-computed decision flags for the acting principal + this brief's live\n status (PRD-0002 phase P1) — rendered as-is, never recomputed here. */\nexport interface BriefDecisions {\n readonly canEdit: boolean;\n readonly canApprove: boolean;\n readonly canReject: boolean;\n readonly canSend: boolean;\n}\n", + "properties": [ + { + "name": "canApprove", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "indexKey": "", + "optional": false, + "description": "", + "line": 115, + "modifierKind": [ + 148 + ] + }, + { + "name": "canEdit", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "indexKey": "", + "optional": false, + "description": "", + "line": 114, + "modifierKind": [ + 148 + ] + }, + { + "name": "canReject", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "indexKey": "", + "optional": false, + "description": "", + "line": 116, + "modifierKind": [ + 148 + ] + }, + { + "name": "canSend", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "indexKey": "", + "optional": false, + "description": "", + "line": 117, + "modifierKind": [ + 148 + ] + } + ], + "indexSignatures": [], + "kind": 172, + "description": "

Server-computed decision flags for the acting principal + this brief's live\nstatus (PRD-0002 phase P1) — rendered as-is, never recomputed here.

\n", + "rawdescription": "\nServer-computed decision flags for the acting principal + this brief's live\nstatus (PRD-0002 phase P1) — rendered as-is, never recomputed here.", + "methods": [], + "extends": [] + }, + { + "name": "BriefDecisionsDto", + "id": "interface-BriefDecisionsDto-fb1ee9618e8a58db438478dc30a2ef41f099ba42e2d9a7155300e95c801cc6c2851c481c1bff1e7af3c066bc79e76529bbb37756fed2b5e35a56532325220bab", "file": "src/app/shared/infrastructure/api-client.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", + "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n me(): Promise {\n let url_ = this.baseUrl + \"/api/v1/me\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processMe(_response);\n });\n }\n\n protected processMe(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as MeDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDecisionsDto {\n canEdit?: boolean;\n canApprove?: boolean;\n canReject?: boolean;\n canSend?: boolean;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n decisions?: BriefDecisionsDto;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface MeDto {\n capabilities?: string[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", + "properties": [ + { + "name": "canApprove", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "indexKey": "", + "optional": true, + "description": "", + "line": 1328 + }, + { + "name": "canEdit", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "indexKey": "", + "optional": true, + "description": "", + "line": 1327 + }, + { + "name": "canReject", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "indexKey": "", + "optional": true, + "description": "", + "line": 1329 + }, + { + "name": "canSend", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "indexKey": "", + "optional": true, + "description": "", + "line": 1330 + } + ], + "indexSignatures": [], + "kind": 172, + "methods": [], + "extends": [] + }, + { + "name": "BriefDto", + "id": "interface-BriefDto-fb1ee9618e8a58db438478dc30a2ef41f099ba42e2d9a7155300e95c801cc6c2851c481c1bff1e7af3c066bc79e76529bbb37756fed2b5e35a56532325220bab", + "file": "src/app/shared/infrastructure/api-client.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n me(): Promise {\n let url_ = this.baseUrl + \"/api/v1/me\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processMe(_response);\n });\n }\n\n protected processMe(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as MeDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDecisionsDto {\n canEdit?: boolean;\n canApprove?: boolean;\n canReject?: boolean;\n canSend?: boolean;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n decisions?: BriefDecisionsDto;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface MeDto {\n capabilities?: string[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", "properties": [ { "name": "beroep", @@ -964,7 +1088,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1292 + "line": 1335 }, { "name": "briefId", @@ -974,7 +1098,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1291 + "line": 1334 }, { "name": "drafterId", @@ -984,7 +1108,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1297 + "line": 1340 }, { "name": "placeholders", @@ -994,7 +1118,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1294 + "line": 1337 }, { "name": "sections", @@ -1004,7 +1128,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1295 + "line": 1338 }, { "name": "status", @@ -1014,7 +1138,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1296 + "line": 1339 }, { "name": "templateId", @@ -1024,7 +1148,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1293 + "line": 1336 } ], "indexSignatures": [], @@ -1034,12 +1158,12 @@ }, { "name": "BriefStatusDto", - "id": "interface-BriefStatusDto-134629d19fe3b5e6a76daeb4f10c282202eb1b8380b939c25450bb44b86fcb3df7a15e5ead886ad958b8bb7f158457387fb6c11872acdb4893c4933c2fdef07b", + "id": "interface-BriefStatusDto-fb1ee9618e8a58db438478dc30a2ef41f099ba42e2d9a7155300e95c801cc6c2851c481c1bff1e7af3c066bc79e76529bbb37756fed2b5e35a56532325220bab", "file": "src/app/shared/infrastructure/api-client.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", + "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n me(): Promise {\n let url_ = this.baseUrl + \"/api/v1/me\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processMe(_response);\n });\n }\n\n protected processMe(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as MeDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDecisionsDto {\n canEdit?: boolean;\n canApprove?: boolean;\n canReject?: boolean;\n canSend?: boolean;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n decisions?: BriefDecisionsDto;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface MeDto {\n capabilities?: string[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", "properties": [ { "name": "approvedAt", @@ -1049,7 +1173,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1305 + "line": 1348 }, { "name": "approvedBy", @@ -1059,7 +1183,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1304 + "line": 1347 }, { "name": "comments", @@ -1069,7 +1193,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1308 + "line": 1351 }, { "name": "rejectedAt", @@ -1079,7 +1203,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1307 + "line": 1350 }, { "name": "rejectedBy", @@ -1089,7 +1213,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1306 + "line": 1349 }, { "name": "sentAt", @@ -1099,7 +1223,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1309 + "line": 1352 }, { "name": "submittedAt", @@ -1109,7 +1233,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1303 + "line": 1346 }, { "name": "submittedBy", @@ -1119,7 +1243,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1302 + "line": 1345 }, { "name": "tag", @@ -1129,7 +1253,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1301 + "line": 1344 } ], "indexSignatures": [], @@ -1139,12 +1263,12 @@ }, { "name": "BriefView", - "id": "interface-BriefView-2cdc4ea68dd5d8941b52d3a3d324bdc1debb1e3cbeb7bb63c0d4dd1fc73b3b81b9fea5eb7cd8a3a9900f3fa0847318c385460cb0c7c8e3f98b841c4a958a185c", + "id": "interface-BriefView-dab389b87b9ac80b84dd0626641f4061b7e55f52901742fde7d2dcd0a9551f9742a7bac034a906b0ef6a778f87d5803d48999902f1990f84d70aa581628ff598", "file": "src/app/brief/infrastructure/brief.adapter.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "import { Injectable, inject } from '@angular/core';\nimport { Result, ok, err } from '@shared/kernel/fp';\nimport { runSubmit } from '@shared/application/submit';\nimport {\n ApiClient,\n BriefDto,\n BriefStatusDto,\n BriefViewDto,\n LetterBlockDto,\n LetterSectionDto,\n LibraryPassageDto,\n PlaceholderDefDto,\n RichTextBlockDto,\n RichTextNodeDto,\n} from '@shared/infrastructure/api-client';\nimport { Brief, BriefStatus, LetterBlock, LetterSection, LibraryPassage, PassageScope } from '@brief/domain/brief';\nimport { PlaceholderDef } from '@brief/domain/placeholders';\nimport { Mark, Paragraph, RichTextBlock, RichTextNode } from '@shared/kernel/rich-text';\n\n/**\n * The only place brief HTTP lives (ADR-0001 anti-corruption boundary). The wire\n * uses FLAT unions (a `type`/`tag` string + nullable fields, the repo convention);\n * the `parse*` boundary narrows them into the domain's proper discriminated unions\n * and rejects malformed shapes. Mutations go through `runSubmit` (ProblemDetails →\n * error string), then parse the returned brief.\n */\n\nexport interface BriefView {\n readonly brief: Brief;\n readonly availablePassages: LibraryPassage[];\n}\n\nexport const BRIEF_LOAD_FAILED = $localize`:@@brief.load.failed:De brief kon niet worden geladen.`;\nexport const BRIEF_ACTION_FAILED = $localize`:@@brief.action.failed:De actie is niet gelukt. Probeer het later opnieuw.`;\n\n@Injectable({ providedIn: 'root' })\nexport class BriefAdapter {\n private client = inject(ApiClient);\n\n async load(): Promise> {\n const r = await runSubmit(() => this.client.briefGET(), BRIEF_LOAD_FAILED);\n return r.ok ? parseBriefView(r.value) : r;\n }\n\n async save(sections: readonly LetterSection[]): Promise> {\n const r = await runSubmit(() => this.client.briefPUT({ sections: sections.map(sectionToDto) }), BRIEF_ACTION_FAILED);\n return r.ok ? parseBrief(r.value) : r;\n }\n\n async submit(): Promise> {\n const r = await runSubmit(() => this.client.briefSubmit(), BRIEF_ACTION_FAILED);\n return r.ok ? parseBrief(r.value) : r;\n }\n\n async approve(): Promise> {\n const r = await runSubmit(() => this.client.approve(), BRIEF_ACTION_FAILED);\n return r.ok ? parseBrief(r.value) : r;\n }\n\n async reject(comments: string): Promise> {\n const r = await runSubmit(() => this.client.reject({ comments }), BRIEF_ACTION_FAILED);\n return r.ok ? parseBrief(r.value) : r;\n }\n\n async send(): Promise> {\n const r = await runSubmit(() => this.client.send(), BRIEF_ACTION_FAILED);\n return r.ok ? parseBrief(r.value) : r;\n }\n\n /** Demo \"start over\" — recreate a fresh brief server-side and return the new view. */\n async reset(): Promise> {\n const r = await runSubmit(() => this.client.briefReset(), BRIEF_ACTION_FAILED);\n return r.ok ? parseBriefView(r.value) : r;\n }\n}\n\n// --- parse: wire (flat) → domain (discriminated unions), validating at the boundary ---\n\nconst MARKS: readonly string[] = ['bold', 'italic', 'underline'];\n\nexport function parseNode(dto: RichTextNodeDto): Result {\n switch (dto.type) {\n case 'text': {\n if (typeof dto.text !== 'string') return err('node: text missing text');\n const marks = dto.marks?.filter((m): m is Mark => MARKS.includes(m));\n return ok(marks && marks.length ? { type: 'text', text: dto.text, marks } : { type: 'text', text: dto.text });\n }\n case 'placeholder':\n return typeof dto.key === 'string' ? ok({ type: 'placeholder', key: dto.key }) : err('node: placeholder missing key');\n case 'lineBreak':\n return ok({ type: 'lineBreak' });\n default:\n return err(`node: unknown type ${dto.type}`);\n }\n}\n\nexport function parseBlockContent(dto: RichTextBlockDto | undefined): Result {\n if (!dto || !Array.isArray(dto.paragraphs)) return err('content: paragraphs not an array');\n const paragraphs: Paragraph[] = [];\n for (const p of dto.paragraphs) {\n const nodes: RichTextNode[] = [];\n for (const n of p.nodes ?? []) {\n const parsed = parseNode(n);\n if (!parsed.ok) return parsed;\n nodes.push(parsed.value);\n }\n const list = p.list === 'bullet' || p.list === 'number' ? p.list : undefined;\n paragraphs.push(list ? { nodes, list } : { nodes });\n }\n return ok({ paragraphs });\n}\n\nfunction parseBlock(dto: LetterBlockDto): Result {\n if (typeof dto.blockId !== 'string') return err('block: missing blockId');\n const content = parseBlockContent(dto.content);\n if (!content.ok) return content;\n switch (dto.type) {\n case 'passage':\n if (typeof dto.sourcePassageId !== 'string' || typeof dto.sourceVersion !== 'number') return err('block: bad passage provenance');\n return ok({\n type: 'passage',\n blockId: dto.blockId,\n sourcePassageId: dto.sourcePassageId,\n sourceVersion: dto.sourceVersion,\n content: content.value,\n edited: dto.edited ?? false,\n });\n case 'freeText':\n return ok({ type: 'freeText', blockId: dto.blockId, content: content.value });\n default:\n return err(`block: unknown type ${dto.type}`);\n }\n}\n\nfunction parseSection(dto: LetterSectionDto): Result {\n if (typeof dto.sectionKey !== 'string' || typeof dto.title !== 'string' || typeof dto.required !== 'boolean') {\n return err('section: bad shape');\n }\n const blocks: LetterBlock[] = [];\n for (const b of dto.blocks ?? []) {\n const parsed = parseBlock(b);\n if (!parsed.ok) return parsed;\n blocks.push(parsed.value);\n }\n return ok({ sectionKey: dto.sectionKey, title: dto.title, required: dto.required, locked: dto.locked ?? false, blocks });\n}\n\nfunction parsePlaceholderDef(dto: PlaceholderDefDto): Result {\n if (typeof dto.key !== 'string' || typeof dto.label !== 'string' || typeof dto.autoResolvable !== 'boolean') {\n return err('placeholder: bad shape');\n }\n return ok({\n key: dto.key,\n label: dto.label,\n autoResolvable: dto.autoResolvable,\n ...(dto.fillable != null ? { fillable: dto.fillable } : {}),\n ...(dto.deprecated != null ? { deprecated: dto.deprecated } : {}),\n });\n}\n\nexport function parseStatus(dto: BriefStatusDto | undefined): Result {\n switch (dto?.tag) {\n case 'draft':\n return ok({ tag: 'draft' });\n case 'submitted':\n if (typeof dto.submittedBy !== 'string' || typeof dto.submittedAt !== 'string') return err('status: bad submitted');\n return ok({ tag: 'submitted', submittedBy: dto.submittedBy, submittedAt: dto.submittedAt });\n case 'approved':\n if (typeof dto.approvedBy !== 'string' || typeof dto.approvedAt !== 'string') return err('status: bad approved');\n return ok({ tag: 'approved', approvedBy: dto.approvedBy, approvedAt: dto.approvedAt });\n case 'rejected':\n if (typeof dto.rejectedBy !== 'string' || typeof dto.rejectedAt !== 'string' || typeof dto.comments !== 'string') return err('status: bad rejected');\n return ok({ tag: 'rejected', rejectedBy: dto.rejectedBy, rejectedAt: dto.rejectedAt, comments: dto.comments });\n case 'sent':\n if (typeof dto.sentAt !== 'string') return err('status: bad sent');\n return ok({ tag: 'sent', sentAt: dto.sentAt });\n default:\n return err(`status: unknown tag ${dto?.tag}`);\n }\n}\n\nfunction parsePassage(dto: LibraryPassageDto): Result {\n if (typeof dto.passageId !== 'string' || (dto.scope !== 'global' && dto.scope !== 'beroep')) return err('passage: bad shape');\n if (typeof dto.sectionKey !== 'string' || typeof dto.label !== 'string' || typeof dto.version !== 'number') return err('passage: bad shape');\n const content = parseBlockContent(dto.content);\n if (!content.ok) return content;\n return ok({\n passageId: dto.passageId,\n scope: dto.scope as PassageScope,\n sectionKey: dto.sectionKey,\n label: dto.label,\n content: content.value,\n version: dto.version,\n ...(dto.beroep != null ? { beroep: dto.beroep } : {}),\n });\n}\n\nexport function parseBrief(dto: BriefDto): Result {\n if (typeof dto.briefId !== 'string' || typeof dto.drafterId !== 'string' || typeof dto.beroep !== 'string' || typeof dto.templateId !== 'string') {\n return err('brief: missing ids');\n }\n const status = parseStatus(dto.status);\n if (!status.ok) return status;\n\n const placeholders: PlaceholderDef[] = [];\n for (const p of dto.placeholders ?? []) {\n const parsed = parsePlaceholderDef(p);\n if (!parsed.ok) return parsed;\n placeholders.push(parsed.value);\n }\n const sections: LetterSection[] = [];\n for (const s of dto.sections ?? []) {\n const parsed = parseSection(s);\n if (!parsed.ok) return parsed;\n sections.push(parsed.value);\n }\n return ok({\n briefId: dto.briefId,\n beroep: dto.beroep,\n templateId: dto.templateId,\n placeholders,\n sections,\n status: status.value,\n drafterId: dto.drafterId,\n });\n}\n\nexport function parseBriefView(dto: BriefViewDto): Result {\n if (!dto.brief) return err('brief-view: missing brief');\n const brief = parseBrief(dto.brief);\n if (!brief.ok) return brief;\n const availablePassages: LibraryPassage[] = [];\n for (const p of dto.availablePassages ?? []) {\n const parsed = parsePassage(p);\n if (!parsed.ok) return parsed;\n availablePassages.push(parsed.value);\n }\n return ok({ brief: brief.value, availablePassages });\n}\n\n// --- toDto: domain → wire, for save (collapses the union to the flat shape) ---\n\nfunction nodeToDto(n: RichTextNode): RichTextNodeDto {\n switch (n.type) {\n case 'text':\n return { type: 'text', text: n.text, ...(n.marks ? { marks: [...n.marks] } : {}) };\n case 'placeholder':\n return { type: 'placeholder', key: n.key };\n case 'lineBreak':\n return { type: 'lineBreak' };\n }\n}\n\nfunction contentToDto(content: RichTextBlock): RichTextBlockDto {\n return { paragraphs: content.paragraphs.map((p) => ({ nodes: p.nodes.map(nodeToDto), ...(p.list ? { list: p.list } : {}) })) };\n}\n\nfunction blockToDto(b: LetterBlock): LetterBlockDto {\n return b.type === 'passage'\n ? { type: 'passage', blockId: b.blockId, content: contentToDto(b.content), sourcePassageId: b.sourcePassageId, sourceVersion: b.sourceVersion, edited: b.edited }\n : { type: 'freeText', blockId: b.blockId, content: contentToDto(b.content) };\n}\n\nfunction sectionToDto(s: LetterSection): LetterSectionDto {\n return { sectionKey: s.sectionKey, title: s.title, required: s.required, locked: s.locked, blocks: s.blocks.map(blockToDto) };\n}\n", + "sourceCode": "import { Injectable, inject } from '@angular/core';\nimport { Result, ok, err } from '@shared/kernel/fp';\nimport { runSubmit } from '@shared/application/submit';\nimport {\n ApiClient,\n BriefDecisionsDto,\n BriefDto,\n BriefStatusDto,\n BriefViewDto,\n LetterBlockDto,\n LetterSectionDto,\n LibraryPassageDto,\n PlaceholderDefDto,\n RichTextBlockDto,\n RichTextNodeDto,\n} from '@shared/infrastructure/api-client';\nimport {\n Brief,\n BriefDecisions,\n BriefStatus,\n LetterBlock,\n LetterSection,\n LibraryPassage,\n PassageScope,\n} from '@brief/domain/brief';\nimport { PlaceholderDef } from '@brief/domain/placeholders';\nimport { Mark, Paragraph, RichTextBlock, RichTextNode } from '@shared/kernel/rich-text';\n\n/**\n * The only place brief HTTP lives (ADR-0001 anti-corruption boundary). The wire\n * uses FLAT unions (a `type`/`tag` string + nullable fields, the repo convention);\n * the `parse*` boundary narrows them into the domain's proper discriminated unions\n * and rejects malformed shapes. Mutations go through `runSubmit` (ProblemDetails →\n * error string), then parse the returned brief.\n */\n\nexport interface BriefView {\n readonly brief: Brief;\n readonly availablePassages: LibraryPassage[];\n readonly decisions: BriefDecisions;\n}\n\nexport const BRIEF_LOAD_FAILED = $localize`:@@brief.load.failed:De brief kon niet worden geladen.`;\nexport const BRIEF_ACTION_FAILED = $localize`:@@brief.action.failed:De actie is niet gelukt. Probeer het later opnieuw.`;\n\n@Injectable({ providedIn: 'root' })\nexport class BriefAdapter {\n private client = inject(ApiClient);\n\n async load(): Promise> {\n const r = await runSubmit(() => this.client.briefGET(), BRIEF_LOAD_FAILED);\n return r.ok ? parseBriefView(r.value) : r;\n }\n\n async save(sections: readonly LetterSection[]): Promise> {\n const r = await runSubmit(\n () => this.client.briefPUT({ sections: sections.map(sectionToDto) }),\n BRIEF_ACTION_FAILED,\n );\n return r.ok ? parseBriefView(r.value) : r;\n }\n\n async submit(): Promise> {\n const r = await runSubmit(() => this.client.briefSubmit(), BRIEF_ACTION_FAILED);\n return r.ok ? parseBriefView(r.value) : r;\n }\n\n async approve(): Promise> {\n const r = await runSubmit(() => this.client.approve(), BRIEF_ACTION_FAILED);\n return r.ok ? parseBriefView(r.value) : r;\n }\n\n async reject(comments: string): Promise> {\n const r = await runSubmit(() => this.client.reject({ comments }), BRIEF_ACTION_FAILED);\n return r.ok ? parseBriefView(r.value) : r;\n }\n\n async send(): Promise> {\n const r = await runSubmit(() => this.client.send(), BRIEF_ACTION_FAILED);\n return r.ok ? parseBriefView(r.value) : r;\n }\n\n /** Demo \"start over\" — recreate a fresh brief server-side and return the new view. */\n async reset(): Promise> {\n const r = await runSubmit(() => this.client.briefReset(), BRIEF_ACTION_FAILED);\n return r.ok ? parseBriefView(r.value) : r;\n }\n}\n\n// --- parse: wire (flat) → domain (discriminated unions), validating at the boundary ---\n\nconst MARKS: readonly string[] = ['bold', 'italic', 'underline'];\n\nexport function parseNode(dto: RichTextNodeDto): Result {\n switch (dto.type) {\n case 'text': {\n if (typeof dto.text !== 'string') return err('node: text missing text');\n const marks = dto.marks?.filter((m): m is Mark => MARKS.includes(m));\n return ok(\n marks && marks.length\n ? { type: 'text', text: dto.text, marks }\n : { type: 'text', text: dto.text },\n );\n }\n case 'placeholder':\n return typeof dto.key === 'string'\n ? ok({ type: 'placeholder', key: dto.key })\n : err('node: placeholder missing key');\n case 'lineBreak':\n return ok({ type: 'lineBreak' });\n default:\n return err(`node: unknown type ${dto.type}`);\n }\n}\n\nexport function parseBlockContent(\n dto: RichTextBlockDto | undefined,\n): Result {\n if (!dto || !Array.isArray(dto.paragraphs)) return err('content: paragraphs not an array');\n const paragraphs: Paragraph[] = [];\n for (const p of dto.paragraphs) {\n const nodes: RichTextNode[] = [];\n for (const n of p.nodes ?? []) {\n const parsed = parseNode(n);\n if (!parsed.ok) return parsed;\n nodes.push(parsed.value);\n }\n const list = p.list === 'bullet' || p.list === 'number' ? p.list : undefined;\n paragraphs.push(list ? { nodes, list } : { nodes });\n }\n return ok({ paragraphs });\n}\n\nfunction parseBlock(dto: LetterBlockDto): Result {\n if (typeof dto.blockId !== 'string') return err('block: missing blockId');\n const content = parseBlockContent(dto.content);\n if (!content.ok) return content;\n switch (dto.type) {\n case 'passage':\n if (typeof dto.sourcePassageId !== 'string' || typeof dto.sourceVersion !== 'number')\n return err('block: bad passage provenance');\n return ok({\n type: 'passage',\n blockId: dto.blockId,\n sourcePassageId: dto.sourcePassageId,\n sourceVersion: dto.sourceVersion,\n content: content.value,\n edited: dto.edited ?? false,\n });\n case 'freeText':\n return ok({ type: 'freeText', blockId: dto.blockId, content: content.value });\n default:\n return err(`block: unknown type ${dto.type}`);\n }\n}\n\nfunction parseSection(dto: LetterSectionDto): Result {\n if (\n typeof dto.sectionKey !== 'string' ||\n typeof dto.title !== 'string' ||\n typeof dto.required !== 'boolean'\n ) {\n return err('section: bad shape');\n }\n const blocks: LetterBlock[] = [];\n for (const b of dto.blocks ?? []) {\n const parsed = parseBlock(b);\n if (!parsed.ok) return parsed;\n blocks.push(parsed.value);\n }\n return ok({\n sectionKey: dto.sectionKey,\n title: dto.title,\n required: dto.required,\n locked: dto.locked ?? false,\n blocks,\n });\n}\n\nfunction parsePlaceholderDef(dto: PlaceholderDefDto): Result {\n if (\n typeof dto.key !== 'string' ||\n typeof dto.label !== 'string' ||\n typeof dto.autoResolvable !== 'boolean'\n ) {\n return err('placeholder: bad shape');\n }\n return ok({\n key: dto.key,\n label: dto.label,\n autoResolvable: dto.autoResolvable,\n ...(dto.fillable != null ? { fillable: dto.fillable } : {}),\n ...(dto.deprecated != null ? { deprecated: dto.deprecated } : {}),\n });\n}\n\nexport function parseStatus(dto: BriefStatusDto | undefined): Result {\n switch (dto?.tag) {\n case 'draft':\n return ok({ tag: 'draft' });\n case 'submitted':\n if (typeof dto.submittedBy !== 'string' || typeof dto.submittedAt !== 'string')\n return err('status: bad submitted');\n return ok({ tag: 'submitted', submittedBy: dto.submittedBy, submittedAt: dto.submittedAt });\n case 'approved':\n if (typeof dto.approvedBy !== 'string' || typeof dto.approvedAt !== 'string')\n return err('status: bad approved');\n return ok({ tag: 'approved', approvedBy: dto.approvedBy, approvedAt: dto.approvedAt });\n case 'rejected':\n if (\n typeof dto.rejectedBy !== 'string' ||\n typeof dto.rejectedAt !== 'string' ||\n typeof dto.comments !== 'string'\n )\n return err('status: bad rejected');\n return ok({\n tag: 'rejected',\n rejectedBy: dto.rejectedBy,\n rejectedAt: dto.rejectedAt,\n comments: dto.comments,\n });\n case 'sent':\n if (typeof dto.sentAt !== 'string') return err('status: bad sent');\n return ok({ tag: 'sent', sentAt: dto.sentAt });\n default:\n return err(`status: unknown tag ${dto?.tag}`);\n }\n}\n\nfunction parsePassage(dto: LibraryPassageDto): Result {\n if (typeof dto.passageId !== 'string' || (dto.scope !== 'global' && dto.scope !== 'beroep'))\n return err('passage: bad shape');\n if (\n typeof dto.sectionKey !== 'string' ||\n typeof dto.label !== 'string' ||\n typeof dto.version !== 'number'\n )\n return err('passage: bad shape');\n const content = parseBlockContent(dto.content);\n if (!content.ok) return content;\n return ok({\n passageId: dto.passageId,\n scope: dto.scope as PassageScope,\n sectionKey: dto.sectionKey,\n label: dto.label,\n content: content.value,\n version: dto.version,\n ...(dto.beroep != null ? { beroep: dto.beroep } : {}),\n });\n}\n\nexport function parseBrief(dto: BriefDto): Result {\n if (\n typeof dto.briefId !== 'string' ||\n typeof dto.drafterId !== 'string' ||\n typeof dto.beroep !== 'string' ||\n typeof dto.templateId !== 'string'\n ) {\n return err('brief: missing ids');\n }\n const status = parseStatus(dto.status);\n if (!status.ok) return status;\n\n const placeholders: PlaceholderDef[] = [];\n for (const p of dto.placeholders ?? []) {\n const parsed = parsePlaceholderDef(p);\n if (!parsed.ok) return parsed;\n placeholders.push(parsed.value);\n }\n const sections: LetterSection[] = [];\n for (const s of dto.sections ?? []) {\n const parsed = parseSection(s);\n if (!parsed.ok) return parsed;\n sections.push(parsed.value);\n }\n return ok({\n briefId: dto.briefId,\n beroep: dto.beroep,\n templateId: dto.templateId,\n placeholders,\n sections,\n status: status.value,\n drafterId: dto.drafterId,\n });\n}\n\nfunction parseDecisions(dto: BriefDecisionsDto | undefined): Result {\n if (\n typeof dto?.canEdit !== 'boolean' ||\n typeof dto.canApprove !== 'boolean' ||\n typeof dto.canReject !== 'boolean' ||\n typeof dto.canSend !== 'boolean'\n ) {\n return err('brief-view: missing/invalid decisions');\n }\n return ok({\n canEdit: dto.canEdit,\n canApprove: dto.canApprove,\n canReject: dto.canReject,\n canSend: dto.canSend,\n });\n}\n\nexport function parseBriefView(dto: BriefViewDto): Result {\n if (!dto.brief) return err('brief-view: missing brief');\n const brief = parseBrief(dto.brief);\n if (!brief.ok) return brief;\n const decisions = parseDecisions(dto.decisions);\n if (!decisions.ok) return decisions;\n const availablePassages: LibraryPassage[] = [];\n for (const p of dto.availablePassages ?? []) {\n const parsed = parsePassage(p);\n if (!parsed.ok) return parsed;\n availablePassages.push(parsed.value);\n }\n return ok({ brief: brief.value, availablePassages, decisions: decisions.value });\n}\n\n// --- toDto: domain → wire, for save (collapses the union to the flat shape) ---\n\nfunction nodeToDto(n: RichTextNode): RichTextNodeDto {\n switch (n.type) {\n case 'text':\n return { type: 'text', text: n.text, ...(n.marks ? { marks: [...n.marks] } : {}) };\n case 'placeholder':\n return { type: 'placeholder', key: n.key };\n case 'lineBreak':\n return { type: 'lineBreak' };\n }\n}\n\nfunction contentToDto(content: RichTextBlock): RichTextBlockDto {\n return {\n paragraphs: content.paragraphs.map((p) => ({\n nodes: p.nodes.map(nodeToDto),\n ...(p.list ? { list: p.list } : {}),\n })),\n };\n}\n\nfunction blockToDto(b: LetterBlock): LetterBlockDto {\n return b.type === 'passage'\n ? {\n type: 'passage',\n blockId: b.blockId,\n content: contentToDto(b.content),\n sourcePassageId: b.sourcePassageId,\n sourceVersion: b.sourceVersion,\n edited: b.edited,\n }\n : { type: 'freeText', blockId: b.blockId, content: contentToDto(b.content) };\n}\n\nfunction sectionToDto(s: LetterSection): LetterSectionDto {\n return {\n sectionKey: s.sectionKey,\n title: s.title,\n required: s.required,\n locked: s.locked,\n blocks: s.blocks.map(blockToDto),\n };\n}\n", "properties": [ { "name": "availablePassages", @@ -1154,7 +1278,7 @@ "indexKey": "", "optional": false, "description": "", - "line": 30, + "line": 39, "modifierKind": [ 148 ] @@ -1167,7 +1291,20 @@ "indexKey": "", "optional": false, "description": "", - "line": 29, + "line": 38, + "modifierKind": [ + 148 + ] + }, + { + "name": "decisions", + "deprecated": false, + "deprecationMessage": "", + "type": "BriefDecisions", + "indexKey": "", + "optional": false, + "description": "", + "line": 40, "modifierKind": [ 148 ] @@ -1182,12 +1319,12 @@ }, { "name": "BriefViewDto", - "id": "interface-BriefViewDto-134629d19fe3b5e6a76daeb4f10c282202eb1b8380b939c25450bb44b86fcb3df7a15e5ead886ad958b8bb7f158457387fb6c11872acdb4893c4933c2fdef07b", + "id": "interface-BriefViewDto-fb1ee9618e8a58db438478dc30a2ef41f099ba42e2d9a7155300e95c801cc6c2851c481c1bff1e7af3c066bc79e76529bbb37756fed2b5e35a56532325220bab", "file": "src/app/shared/infrastructure/api-client.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", + "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n me(): Promise {\n let url_ = this.baseUrl + \"/api/v1/me\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processMe(_response);\n });\n }\n\n protected processMe(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as MeDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDecisionsDto {\n canEdit?: boolean;\n canApprove?: boolean;\n canReject?: boolean;\n canSend?: boolean;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n decisions?: BriefDecisionsDto;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface MeDto {\n capabilities?: string[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", "properties": [ { "name": "availablePassages", @@ -1197,7 +1334,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1314 + "line": 1357 }, { "name": "brief", @@ -1207,7 +1344,17 @@ "indexKey": "", "optional": true, "description": "", - "line": 1313 + "line": 1356 + }, + { + "name": "decisions", + "deprecated": false, + "deprecationMessage": "", + "type": "BriefDecisionsDto", + "indexKey": "", + "optional": true, + "description": "", + "line": 1358 } ], "indexSignatures": [], @@ -1217,12 +1364,12 @@ }, { "name": "BrpAddressDto", - "id": "interface-BrpAddressDto-134629d19fe3b5e6a76daeb4f10c282202eb1b8380b939c25450bb44b86fcb3df7a15e5ead886ad958b8bb7f158457387fb6c11872acdb4893c4933c2fdef07b", + "id": "interface-BrpAddressDto-fb1ee9618e8a58db438478dc30a2ef41f099ba42e2d9a7155300e95c801cc6c2851c481c1bff1e7af3c066bc79e76529bbb37756fed2b5e35a56532325220bab", "file": "src/app/shared/infrastructure/api-client.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", + "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n me(): Promise {\n let url_ = this.baseUrl + \"/api/v1/me\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processMe(_response);\n });\n }\n\n protected processMe(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as MeDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDecisionsDto {\n canEdit?: boolean;\n canApprove?: boolean;\n canReject?: boolean;\n canSend?: boolean;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n decisions?: BriefDecisionsDto;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface MeDto {\n capabilities?: string[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", "properties": [ { "name": "adres", @@ -1232,7 +1379,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1319 + "line": 1363 }, { "name": "gevonden", @@ -1242,7 +1389,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1318 + "line": 1362 } ], "indexSignatures": [], @@ -1292,12 +1439,12 @@ }, { "name": "CategoryParams", - "id": "interface-CategoryParams-5fab28e6a8d389767caddf0e34edcd3013f54e6fdf3e82341e2ed7e9ef1035fa5a5338c98630c1de1e65329cdd6d40d726b1885c5c3ee4eff5a462ea3e81fcd7", + "id": "interface-CategoryParams-ab1d83e34758ab9255d93ad1919e0f70bf41f8ba472c7d0d4e796e140d9abe27210e3e9418b927e8772385a5d85fc28e0917b333e2e8a92b01304b6f5c5fefde", "file": "src/app/shared/upload/upload.adapter.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "import { Injectable, computed, inject, resource } from '@angular/core';\nimport {\n ApiClient,\n DocumentCategoryDto,\n UploadStatusItemDto,\n} from '@shared/infrastructure/api-client';\nimport { problemDetail } from '@shared/infrastructure/api-error';\nimport { currentScenario } from '@shared/infrastructure/scenario';\nimport { environment } from '../../../environments/environment';\nimport { DocumentCategory } from './upload.machine';\n\n/** Answer-derived query params that affect which categories the server presents. */\nexport interface CategoryParams {\n diplomaHerkomst?: string;\n taalvaardigheid?: string;\n}\n\n/** One arrived/known status item from poll-on-return. */\nexport interface StatusItem {\n localId: string;\n status: string; // 'complete' | 'unknown'\n documentId?: string;\n}\n\nexport interface XhrUploadRequest {\n localId: string;\n categoryId: string;\n wizardId: string;\n file: File;\n}\n\n/** A live upload: progress is reported via the callback; cancel aborts the XHR. */\nexport interface XhrUploadHandle {\n done: Promise<{ documentId: string }>;\n cancel: () => void;\n}\n\n/** Sentinel rejection so the caller can tell a user-cancel from a real failure. */\nexport const UPLOAD_ABORTED = Symbol('upload-aborted');\n\n/**\n * Infrastructure: the only place upload HTTP lives. Reads (categories, status,\n * delete) go through the NSwag client; the multipart POST is hand-written XHR\n * because the generated client is JSON-only (the endpoint is ExcludeFromDescription)\n * and we need upload-progress events + cancellation, which fetch can't give us.\n */\n@Injectable({ providedIn: 'root' })\nexport class UploadAdapter {\n private client = inject(ApiClient);\n\n /** Categories are server-owned; some depend on answers (e.g. registratie's diploma\n set varies by DUO/handmatig + course language). `extra` makes the resource reactive\n so it re-fetches when those answers change. */\n categoriesResource(wizardId: string, extra?: () => CategoryParams) {\n // Structural equality so we re-fetch only when a category-affecting answer changes,\n // not on every unrelated draft edit (a computed with `equal` returns the cached\n // reference while equal, so the resource sees no change).\n const params = computed(\n () => ({ wizardId, diplomaHerkomst: extra?.().diplomaHerkomst, taalvaardigheid: extra?.().taalvaardigheid }),\n { equal: (a, b) => a.wizardId === b.wizardId && a.diplomaHerkomst === b.diplomaHerkomst && a.taalvaardigheid === b.taalvaardigheid },\n );\n return resource({\n params,\n loader: ({ params }) =>\n this.client.categories(params.wizardId, params.diplomaHerkomst, params.taalvaardigheid).then((r) => (r.categories ?? []).map(toCategory)),\n });\n }\n\n /** Poll-on-return: which client localIds have arrived at the BFF. */\n status(localIds: string[]): Promise {\n if (localIds.length === 0) return Promise.resolve([]);\n return this.client.status(localIds.join(',')).then((r) => (r.results ?? []).map(toStatusItem));\n }\n\n /** User delete; throws a ProblemDetails (e.g. 409 once linked) the caller maps. */\n deleteDocument(documentId: string): Promise {\n return this.client.uploads(documentId);\n }\n\n /**\n * Direct URL to the stored bytes, for a preview/download link (``) — the\n * server serves it inline for pdf/image, attachment otherwise. Not a fetch: the\n * browser opens it. demo-* ids (dev simulation) have no bytes and 404 here.\n */\n contentUrl(documentId: string): string {\n return `${environment.apiBaseUrl}/api/v1/uploads/${documentId}/content`;\n }\n\n /**\n * Multipart upload with progress + cancel. ponytail: XHR (not fetch keepalive) —\n * progress events need XHR; the keepalive/background gap is covered by\n * poll-on-return (UploadShellService.pollReturning). Swap in a Service Worker\n * transport behind UploadTransport for true background sync.\n */\n xhrUpload(req: XhrUploadRequest, onProgress: (pct: number) => void): XhrUploadHandle {\n const scenario = currentScenario();\n if (scenario === 'upload-slow' || scenario === 'upload-fail') return simulateUpload(scenario, onProgress);\n\n const xhr = new XMLHttpRequest();\n const form = new FormData();\n form.append('file', req.file);\n form.append('categoryId', req.categoryId);\n form.append('localId', req.localId);\n form.append('wizardId', req.wizardId);\n\n let aborted = false;\n const done = new Promise<{ documentId: string }>((resolve, reject) => {\n xhr.upload.addEventListener('progress', (e) => {\n if (e.lengthComputable) onProgress(Math.round((e.loaded / e.total) * 100));\n });\n xhr.addEventListener('load', () => {\n if (xhr.status >= 200 && xhr.status < 300) {\n try {\n resolve({ documentId: JSON.parse(xhr.responseText).documentId });\n } catch {\n reject(genericError());\n }\n } else {\n reject(parseError(xhr.responseText));\n }\n });\n xhr.addEventListener('error', () => reject(genericError()));\n xhr.addEventListener('abort', () => (aborted ? reject(UPLOAD_ABORTED) : reject(genericError())));\n });\n\n xhr.open('POST', `${environment.apiBaseUrl}/api/v1/uploads`);\n xhr.send(form);\n return { done, cancel: () => ((aborted = true), xhr.abort()) };\n }\n}\n\nconst UPLOAD_FAILED = $localize`:@@upload.failed:Uploaden is niet gelukt. Probeer het opnieuw.`;\nconst genericError = (): string => UPLOAD_FAILED;\n\n/**\n * Demo-only (dev): the real XHR POST finishes instantly for metadata, so progress\n * and failure can't otherwise be shown. Drives the progress bar over ~2.5s, then\n * succeeds (`upload-slow`) or fails (`upload-fail`). ponytail: timer-based, cancel\n * via the returned handle; no network.\n */\nfunction simulateUpload(scenario: 'upload-slow' | 'upload-fail', onProgress: (pct: number) => void): XhrUploadHandle {\n let pct = 0;\n let cancelled = false;\n const done = new Promise<{ documentId: string }>((resolve, reject) => {\n const tick = () => {\n if (cancelled) {\n reject(UPLOAD_ABORTED);\n } else if (pct < 100) {\n pct += 10;\n onProgress(Math.min(pct, 100));\n setTimeout(tick, 250);\n } else if (scenario === 'upload-fail') {\n reject(UPLOAD_FAILED);\n } else {\n resolve({ documentId: `demo-${crypto.randomUUID()}` });\n }\n };\n setTimeout(tick, 250);\n });\n return { done, cancel: () => void (cancelled = true) };\n}\nconst parseError = (body: string): string => {\n try {\n return problemDetail(JSON.parse(body), UPLOAD_FAILED);\n } catch {\n return genericError();\n }\n};\n\n/** Wire DTO (all fields optional) → domain. */\nfunction toCategory(c: DocumentCategoryDto): DocumentCategory {\n return {\n categoryId: c.categoryId ?? '',\n label: c.label ?? '',\n description: c.description ?? '',\n required: c.required ?? false,\n acceptedTypes: c.acceptedTypes ?? [],\n maxSizeMb: c.maxSizeMb ?? 0,\n multiple: c.multiple ?? false,\n allowPostDelivery: c.allowPostDelivery ?? false,\n };\n}\n\nfunction toStatusItem(s: UploadStatusItemDto): StatusItem {\n return { localId: s.localId ?? '', status: s.status ?? 'unknown', documentId: s.documentId ?? undefined };\n}\n", + "sourceCode": "import { Injectable, computed, inject, resource } from '@angular/core';\nimport {\n ApiClient,\n DocumentCategoryDto,\n UploadStatusItemDto,\n} from '@shared/infrastructure/api-client';\nimport { problemDetail } from '@shared/infrastructure/api-error';\nimport { currentScenario } from '@shared/infrastructure/scenario';\nimport { environment } from '../../../environments/environment';\nimport { DocumentCategory } from './upload.machine';\n\n/** Answer-derived query params that affect which categories the server presents. */\nexport interface CategoryParams {\n diplomaHerkomst?: string;\n taalvaardigheid?: string;\n}\n\n/** One arrived/known status item from poll-on-return. */\nexport interface StatusItem {\n localId: string;\n status: string; // 'complete' | 'unknown'\n documentId?: string;\n}\n\nexport interface XhrUploadRequest {\n localId: string;\n categoryId: string;\n wizardId: string;\n file: File;\n}\n\n/** A live upload: progress is reported via the callback; cancel aborts the XHR. */\nexport interface XhrUploadHandle {\n done: Promise<{ documentId: string }>;\n cancel: () => void;\n}\n\n/** Sentinel rejection so the caller can tell a user-cancel from a real failure. */\nexport const UPLOAD_ABORTED = Symbol('upload-aborted');\n\n/**\n * Infrastructure: the only place upload HTTP lives. Reads (categories, status,\n * delete) go through the NSwag client; the multipart POST is hand-written XHR\n * because the generated client is JSON-only (the endpoint is ExcludeFromDescription)\n * and we need upload-progress events + cancellation, which fetch can't give us.\n */\n@Injectable({ providedIn: 'root' })\nexport class UploadAdapter {\n private client = inject(ApiClient);\n\n /** Categories are server-owned; some depend on answers (e.g. registratie's diploma\n set varies by DUO/handmatig + course language). `extra` makes the resource reactive\n so it re-fetches when those answers change. */\n categoriesResource(wizardId: string, extra?: () => CategoryParams) {\n // Structural equality so we re-fetch only when a category-affecting answer changes,\n // not on every unrelated draft edit (a computed with `equal` returns the cached\n // reference while equal, so the resource sees no change).\n const params = computed(\n () => ({\n wizardId,\n diplomaHerkomst: extra?.().diplomaHerkomst,\n taalvaardigheid: extra?.().taalvaardigheid,\n }),\n {\n equal: (a, b) =>\n a.wizardId === b.wizardId &&\n a.diplomaHerkomst === b.diplomaHerkomst &&\n a.taalvaardigheid === b.taalvaardigheid,\n },\n );\n return resource({\n params,\n loader: ({ params }) =>\n this.client\n .categories(params.wizardId, params.diplomaHerkomst, params.taalvaardigheid)\n .then((r) => (r.categories ?? []).map(toCategory)),\n });\n }\n\n /** Poll-on-return: which client localIds have arrived at the BFF. */\n status(localIds: string[]): Promise {\n if (localIds.length === 0) return Promise.resolve([]);\n return this.client.status(localIds.join(',')).then((r) => (r.results ?? []).map(toStatusItem));\n }\n\n /** User delete; throws a ProblemDetails (e.g. 409 once linked) the caller maps. */\n deleteDocument(documentId: string): Promise {\n return this.client.uploads(documentId);\n }\n\n /**\n * Direct URL to the stored bytes, for a preview/download link (``) — the\n * server serves it inline for pdf/image, attachment otherwise. Not a fetch: the\n * browser opens it. demo-* ids (dev simulation) have no bytes and 404 here.\n */\n contentUrl(documentId: string): string {\n return `${environment.apiBaseUrl}/api/v1/uploads/${documentId}/content`;\n }\n\n /**\n * Multipart upload with progress + cancel. ponytail: XHR (not fetch keepalive) —\n * progress events need XHR; the keepalive/background gap is covered by\n * poll-on-return (UploadShellService.pollReturning). Swap in a Service Worker\n * transport behind UploadTransport for true background sync.\n */\n xhrUpload(req: XhrUploadRequest, onProgress: (pct: number) => void): XhrUploadHandle {\n const scenario = currentScenario();\n if (scenario === 'upload-slow' || scenario === 'upload-fail')\n return simulateUpload(scenario, onProgress);\n\n const xhr = new XMLHttpRequest();\n const form = new FormData();\n form.append('file', req.file);\n form.append('categoryId', req.categoryId);\n form.append('localId', req.localId);\n form.append('wizardId', req.wizardId);\n\n let aborted = false;\n const done = new Promise<{ documentId: string }>((resolve, reject) => {\n xhr.upload.addEventListener('progress', (e) => {\n if (e.lengthComputable) onProgress(Math.round((e.loaded / e.total) * 100));\n });\n xhr.addEventListener('load', () => {\n if (xhr.status >= 200 && xhr.status < 300) {\n try {\n resolve({ documentId: JSON.parse(xhr.responseText).documentId });\n } catch {\n reject(genericError());\n }\n } else {\n reject(parseError(xhr.responseText));\n }\n });\n xhr.addEventListener('error', () => reject(genericError()));\n xhr.addEventListener('abort', () =>\n aborted ? reject(UPLOAD_ABORTED) : reject(genericError()),\n );\n });\n\n xhr.open('POST', `${environment.apiBaseUrl}/api/v1/uploads`);\n xhr.send(form);\n return { done, cancel: () => ((aborted = true), xhr.abort()) };\n }\n}\n\nconst UPLOAD_FAILED = $localize`:@@upload.failed:Uploaden is niet gelukt. Probeer het opnieuw.`;\nconst genericError = (): string => UPLOAD_FAILED;\n\n/**\n * Demo-only (dev): the real XHR POST finishes instantly for metadata, so progress\n * and failure can't otherwise be shown. Drives the progress bar over ~2.5s, then\n * succeeds (`upload-slow`) or fails (`upload-fail`). ponytail: timer-based, cancel\n * via the returned handle; no network.\n */\nfunction simulateUpload(\n scenario: 'upload-slow' | 'upload-fail',\n onProgress: (pct: number) => void,\n): XhrUploadHandle {\n let pct = 0;\n let cancelled = false;\n const done = new Promise<{ documentId: string }>((resolve, reject) => {\n const tick = () => {\n if (cancelled) {\n reject(UPLOAD_ABORTED);\n } else if (pct < 100) {\n pct += 10;\n onProgress(Math.min(pct, 100));\n setTimeout(tick, 250);\n } else if (scenario === 'upload-fail') {\n reject(UPLOAD_FAILED);\n } else {\n resolve({ documentId: `demo-${crypto.randomUUID()}` });\n }\n };\n setTimeout(tick, 250);\n });\n return { done, cancel: () => void (cancelled = true) };\n}\nconst parseError = (body: string): string => {\n try {\n return problemDetail(JSON.parse(body), UPLOAD_FAILED);\n } catch {\n return genericError();\n }\n};\n\n/** Wire DTO (all fields optional) → domain. */\nfunction toCategory(c: DocumentCategoryDto): DocumentCategory {\n return {\n categoryId: c.categoryId ?? '',\n label: c.label ?? '',\n description: c.description ?? '',\n required: c.required ?? false,\n acceptedTypes: c.acceptedTypes ?? [],\n maxSizeMb: c.maxSizeMb ?? 0,\n multiple: c.multiple ?? false,\n allowPostDelivery: c.allowPostDelivery ?? false,\n };\n}\n\nfunction toStatusItem(s: UploadStatusItemDto): StatusItem {\n return {\n localId: s.localId ?? '',\n status: s.status ?? 'unknown',\n documentId: s.documentId ?? undefined,\n };\n}\n", "properties": [ { "name": "diplomaHerkomst", @@ -1329,12 +1476,12 @@ }, { "name": "ChangeRequestRequest", - "id": "interface-ChangeRequestRequest-134629d19fe3b5e6a76daeb4f10c282202eb1b8380b939c25450bb44b86fcb3df7a15e5ead886ad958b8bb7f158457387fb6c11872acdb4893c4933c2fdef07b", + "id": "interface-ChangeRequestRequest-fb1ee9618e8a58db438478dc30a2ef41f099ba42e2d9a7155300e95c801cc6c2851c481c1bff1e7af3c066bc79e76529bbb37756fed2b5e35a56532325220bab", "file": "src/app/shared/infrastructure/api-client.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", + "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n me(): Promise {\n let url_ = this.baseUrl + \"/api/v1/me\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processMe(_response);\n });\n }\n\n protected processMe(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as MeDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDecisionsDto {\n canEdit?: boolean;\n canApprove?: boolean;\n canReject?: boolean;\n canSend?: boolean;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n decisions?: BriefDecisionsDto;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface MeDto {\n capabilities?: string[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", "properties": [ { "name": "postcode", @@ -1344,7 +1491,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1324 + "line": 1368 }, { "name": "straat", @@ -1354,7 +1501,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1323 + "line": 1367 }, { "name": "woonplaats", @@ -1364,7 +1511,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1325 + "line": 1369 } ], "indexSignatures": [], @@ -1374,12 +1521,12 @@ }, { "name": "CreateApplicationRequest", - "id": "interface-CreateApplicationRequest-134629d19fe3b5e6a76daeb4f10c282202eb1b8380b939c25450bb44b86fcb3df7a15e5ead886ad958b8bb7f158457387fb6c11872acdb4893c4933c2fdef07b", + "id": "interface-CreateApplicationRequest-fb1ee9618e8a58db438478dc30a2ef41f099ba42e2d9a7155300e95c801cc6c2851c481c1bff1e7af3c066bc79e76529bbb37756fed2b5e35a56532325220bab", "file": "src/app/shared/infrastructure/api-client.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", + "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n me(): Promise {\n let url_ = this.baseUrl + \"/api/v1/me\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processMe(_response);\n });\n }\n\n protected processMe(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as MeDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDecisionsDto {\n canEdit?: boolean;\n canApprove?: boolean;\n canReject?: boolean;\n canSend?: boolean;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n decisions?: BriefDecisionsDto;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface MeDto {\n capabilities?: string[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", "properties": [ { "name": "type", @@ -1389,7 +1536,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1329 + "line": 1373 } ], "indexSignatures": [], @@ -1399,12 +1546,12 @@ }, { "name": "Crumb", - "id": "interface-Crumb-88fb29ef3974e1a6599728a6d40b6bafed2354ec6dde840b2d2de49ba648633c1da50552c711f9fd85f8f0985e4ae96627c05ab2890bf0f4c1894ed28e0f0797", + "id": "interface-Crumb-387bcfe20226e242fae94fb956a2df2ac295e42c7856d634a7761802bac04301d7e2374eb68f0e261b8c3e75e2de72b4d2bd76a59fe01e47ec6817de9805b0a2", "file": "src/app/shared/layout/breadcrumb/breadcrumb-trail.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "import { BreadcrumbItem } from './breadcrumb.component';\n\n/** Route → breadcrumb label + parent. The app has a small fixed route set\n (see app.routes.ts), so a static map is enough — no per-page wiring.\n ponytail: static map, not a breadcrumb service; revisit if routes go dynamic. */\ninterface Crumb { label: string; parent?: string }\n\nconst ROUTES: Record = {\n '/dashboard': { label: $localize`:@@crumb.dashboard:Mijn overzicht` },\n '/registratie': { label: $localize`:@@crumb.registratie:Mijn gegevens`, parent: '/dashboard' },\n '/registreren': { label: $localize`:@@crumb.registreren:Inschrijven`, parent: '/dashboard' },\n '/herregistratie': { label: $localize`:@@crumb.herregistratie:Herregistratie`, parent: '/dashboard' },\n '/intake': { label: $localize`:@@crumb.intake:Herregistratie-intake`, parent: '/dashboard' },\n '/concepts': { label: $localize`:@@crumb.concepts:Functionele patronen`, parent: '/dashboard' },\n};\n\n/** Build the breadcrumb trail for a router url (query/fragment stripped).\n Returns [] for unknown routes (e.g. /login) so the bar can hide itself. */\nexport function trailFor(url: string): BreadcrumbItem[] {\n const path = url.split(/[?#]/)[0];\n const trail: BreadcrumbItem[] = [];\n let cursor: string | undefined = path;\n while (cursor) {\n const node: Crumb | undefined = ROUTES[cursor];\n if (!node) break;\n trail.unshift({ label: node.label, link: cursor });\n cursor = node.parent;\n }\n // The current (last) page is not a link.\n if (trail.length) delete trail[trail.length - 1].link;\n return trail;\n}\n", + "sourceCode": "import { BreadcrumbItem } from './breadcrumb.component';\n\n/** Route → breadcrumb label + parent. The app has a small fixed route set\n (see app.routes.ts), so a static map is enough — no per-page wiring.\n ponytail: static map, not a breadcrumb service; revisit if routes go dynamic. */\ninterface Crumb {\n label: string;\n parent?: string;\n}\n\nconst ROUTES: Record = {\n '/dashboard': { label: $localize`:@@crumb.dashboard:Mijn overzicht` },\n '/registratie': { label: $localize`:@@crumb.registratie:Mijn gegevens`, parent: '/dashboard' },\n '/registreren': { label: $localize`:@@crumb.registreren:Inschrijven`, parent: '/dashboard' },\n '/herregistratie': {\n label: $localize`:@@crumb.herregistratie:Herregistratie`,\n parent: '/dashboard',\n },\n '/intake': { label: $localize`:@@crumb.intake:Herregistratie-intake`, parent: '/dashboard' },\n '/concepts': { label: $localize`:@@crumb.concepts:Functionele patronen`, parent: '/dashboard' },\n};\n\n/** Build the breadcrumb trail for a router url (query/fragment stripped).\n Returns [] for unknown routes (e.g. /login) so the bar can hide itself. */\nexport function trailFor(url: string): BreadcrumbItem[] {\n const path = url.split(/[?#]/)[0];\n const trail: BreadcrumbItem[] = [];\n let cursor: string | undefined = path;\n while (cursor) {\n const node: Crumb | undefined = ROUTES[cursor];\n if (!node) break;\n trail.unshift({ label: node.label, link: cursor });\n cursor = node.parent;\n }\n // The current (last) page is not a link.\n if (trail.length) delete trail[trail.length - 1].link;\n return trail;\n}\n", "properties": [ { "name": "label", @@ -1414,7 +1561,7 @@ "indexKey": "", "optional": false, "description": "", - "line": 6 + "line": 7 }, { "name": "parent", @@ -1424,7 +1571,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 6 + "line": 8 } ], "indexSignatures": [], @@ -1436,12 +1583,12 @@ }, { "name": "DashboardView", - "id": "interface-DashboardView-c58fb64e1122f4fd879cc04af00e47d5f21ebcd704c19b3ee6ff824dc42bc58cbaf30d615093402c466690d62d19c307b82fa5afbff32e4feeadf419e21ac189", + "id": "interface-DashboardView-fb5de6756087ca976acf83ceda6040c5feb5609d3738e6065dca10e0679d1c559196eb1d59bb2881d9c724e50c11d663d7fdf197c58e707e3af4ffa6ee8ee46f", "file": "src/app/registratie/infrastructure/dashboard-view.adapter.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "import { Injectable, inject, resource } from '@angular/core';\nimport { Result, ok, err } from '@shared/kernel/fp';\nimport { DashboardViewDto, HerregistratieDecisions } from '@registratie/contracts/dashboard-view.dto';\nimport { Registration } from '@registratie/domain/registration';\nimport { Person } from '@registratie/domain/person';\nimport { BigProfile } from '@registratie/domain/big-profile';\nimport { ApiClient } from '@shared/infrastructure/api-client';\n\n/**\n * The parsed, frontend-side view: the wire DTO mapped onto our own domain model.\n * Lives HERE, not in contracts/, because it references domain types — contracts\n * stays import-free. This split is the decoupling seam (CLAUDE.md §1, ADR-0001).\n */\nexport interface DashboardView {\n profile: BigProfile;\n decisions: HerregistratieDecisions;\n}\n\n/**\n * Infrastructure adapter for the screen-shaped (\"BFF-lite\") dashboard endpoint.\n * ONE call returns registration + person + server-computed decisions. The data\n * comes from the .NET backend (`GET /api/dashboard-view`) via the generated typed\n * client; the decisions (e.g. herregistratie eligibility) are computed there.\n */\n@Injectable({ providedIn: 'root' })\nexport class DashboardViewAdapter {\n private client = inject(ApiClient);\n\n // The value is still untrusted JSON — parseDashboardView validates it at the\n // boundary and maps DTO → domain before the app uses it.\n //\n // SEAM (G5): retry-with-backoff for non-mutating reads wraps the loader here —\n // e.g. `loader: () => withBackoff(() => this.client.dashboardView())` — since the\n // adapter is the single place HTTP lives. Reads are safe to retry; MUTATING calls\n // (the submit-* commands) must NEVER auto-retry — and don't. Manual retry\n // (resource.reload via ) covers the UX today, so backoff stays unbuilt.\n dashboardViewResource() {\n return resource({ loader: () => this.client.dashboardView() });\n }\n}\n\n/**\n * Trust-boundary parse: validate the untrusted response shape and map the DTO\n * onto our own domain model. Hand-written on purpose — no Zod for a single\n * contract. ponytail: reach for a schema lib once the contract count grows.\n */\nexport function parseDashboardView(json: unknown): Result {\n if (typeof json !== 'object' || json === null) return err('dashboard-view: not an object');\n const dto = json as Partial;\n\n const reg = dto.registration;\n if (!reg || typeof reg.bigNummer !== 'string' || !reg.status || typeof reg.status.tag !== 'string') {\n return err('dashboard-view: missing/invalid registration');\n }\n const person = dto.person;\n if (!person || !person.adres || typeof person.adres.postcode !== 'string') {\n return err('dashboard-view: missing/invalid person');\n }\n const d = dto.decisions;\n if (!d || typeof d.eligibleForHerregistratie !== 'boolean') {\n return err('dashboard-view: missing/invalid decisions');\n }\n\n // Map wire → domain. The shapes are identical today, so this reads as an\n // identity copy — but the TYPES differ (wire DTO vs domain), so the moment the\n // wire diverges the compiler forces a real mapping here. That's the seam.\n const registration: Registration = {\n bigNummer: reg.bigNummer,\n naam: reg.naam,\n beroep: reg.beroep,\n registratiedatum: reg.registratiedatum,\n geboortedatum: reg.geboortedatum,\n status: reg.status,\n };\n const persoon: Person = { naam: person.naam, geboortedatum: person.geboortedatum, adres: person.adres };\n\n return ok({\n profile: { registration, person: persoon },\n decisions: { eligibleForHerregistratie: d.eligibleForHerregistratie, herregistratieReason: d.herregistratieReason },\n });\n}\n", + "sourceCode": "import { Injectable, inject, resource } from '@angular/core';\nimport { Result, ok, err } from '@shared/kernel/fp';\nimport {\n DashboardViewDto,\n HerregistratieDecisions,\n} from '@registratie/contracts/dashboard-view.dto';\nimport { Registration } from '@registratie/domain/registration';\nimport { Person } from '@registratie/domain/person';\nimport { BigProfile } from '@registratie/domain/big-profile';\nimport { ApiClient } from '@shared/infrastructure/api-client';\n\n/**\n * The parsed, frontend-side view: the wire DTO mapped onto our own domain model.\n * Lives HERE, not in contracts/, because it references domain types — contracts\n * stays import-free. This split is the decoupling seam (CLAUDE.md §1, ADR-0001).\n */\nexport interface DashboardView {\n profile: BigProfile;\n decisions: HerregistratieDecisions;\n}\n\n/**\n * Infrastructure adapter for the screen-shaped (\"BFF-lite\") dashboard endpoint.\n * ONE call returns registration + person + server-computed decisions. The data\n * comes from the .NET backend (`GET /api/dashboard-view`) via the generated typed\n * client; the decisions (e.g. herregistratie eligibility) are computed there.\n */\n@Injectable({ providedIn: 'root' })\nexport class DashboardViewAdapter {\n private client = inject(ApiClient);\n\n // The value is still untrusted JSON — parseDashboardView validates it at the\n // boundary and maps DTO → domain before the app uses it.\n //\n // SEAM (G5): retry-with-backoff for non-mutating reads wraps the loader here —\n // e.g. `loader: () => withBackoff(() => this.client.dashboardView())` — since the\n // adapter is the single place HTTP lives. Reads are safe to retry; MUTATING calls\n // (the submit-* commands) must NEVER auto-retry — and don't. Manual retry\n // (resource.reload via ) covers the UX today, so backoff stays unbuilt.\n dashboardViewResource() {\n return resource({ loader: () => this.client.dashboardView() });\n }\n}\n\n/**\n * Trust-boundary parse: validate the untrusted response shape and map the DTO\n * onto our own domain model. Hand-written on purpose — no Zod for a single\n * contract. ponytail: reach for a schema lib once the contract count grows.\n */\nexport function parseDashboardView(json: unknown): Result {\n if (typeof json !== 'object' || json === null) return err('dashboard-view: not an object');\n const dto = json as Partial;\n\n const reg = dto.registration;\n if (\n !reg ||\n typeof reg.bigNummer !== 'string' ||\n !reg.status ||\n typeof reg.status.tag !== 'string'\n ) {\n return err('dashboard-view: missing/invalid registration');\n }\n const person = dto.person;\n if (!person || !person.adres || typeof person.adres.postcode !== 'string') {\n return err('dashboard-view: missing/invalid person');\n }\n const d = dto.decisions;\n if (!d || typeof d.eligibleForHerregistratie !== 'boolean') {\n return err('dashboard-view: missing/invalid decisions');\n }\n\n // Map wire → domain. The shapes are identical today, so this reads as an\n // identity copy — but the TYPES differ (wire DTO vs domain), so the moment the\n // wire diverges the compiler forces a real mapping here. That's the seam.\n const registration: Registration = {\n bigNummer: reg.bigNummer,\n naam: reg.naam,\n beroep: reg.beroep,\n registratiedatum: reg.registratiedatum,\n geboortedatum: reg.geboortedatum,\n status: reg.status,\n };\n const persoon: Person = {\n naam: person.naam,\n geboortedatum: person.geboortedatum,\n adres: person.adres,\n };\n\n return ok({\n profile: { registration, person: persoon },\n decisions: {\n eligibleForHerregistratie: d.eligibleForHerregistratie,\n herregistratieReason: d.herregistratieReason,\n },\n });\n}\n", "properties": [ { "name": "decisions", @@ -1451,7 +1598,7 @@ "indexKey": "", "optional": false, "description": "", - "line": 16 + "line": 19 }, { "name": "profile", @@ -1461,7 +1608,7 @@ "indexKey": "", "optional": false, "description": "", - "line": 15 + "line": 18 } ], "indexSignatures": [], @@ -1473,12 +1620,12 @@ }, { "name": "DashboardViewDto", - "id": "interface-DashboardViewDto-134629d19fe3b5e6a76daeb4f10c282202eb1b8380b939c25450bb44b86fcb3df7a15e5ead886ad958b8bb7f158457387fb6c11872acdb4893c4933c2fdef07b", + "id": "interface-DashboardViewDto-fb1ee9618e8a58db438478dc30a2ef41f099ba42e2d9a7155300e95c801cc6c2851c481c1bff1e7af3c066bc79e76529bbb37756fed2b5e35a56532325220bab", "file": "src/app/shared/infrastructure/api-client.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", + "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n me(): Promise {\n let url_ = this.baseUrl + \"/api/v1/me\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processMe(_response);\n });\n }\n\n protected processMe(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as MeDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDecisionsDto {\n canEdit?: boolean;\n canApprove?: boolean;\n canReject?: boolean;\n canSend?: boolean;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n decisions?: BriefDecisionsDto;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface MeDto {\n capabilities?: string[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", "properties": [ { "name": "decisions", @@ -1488,7 +1635,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1335 + "line": 1379 }, { "name": "person", @@ -1498,7 +1645,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1334 + "line": 1378 }, { "name": "registration", @@ -1508,7 +1655,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1333 + "line": 1377 } ], "indexSignatures": [], @@ -1566,12 +1713,12 @@ }, { "name": "Diagnostic", - "id": "interface-Diagnostic-7cd6b7f0437b0e74cbd408b88e6dceda3d58ed0171b5fc3baf66911b7dae607149d424cee85829f75b69eef30cea3d3978b49dd3d8ecdd5311e71533576fd713", + "id": "interface-Diagnostic-24aa1b1685594bea112d1b3c31df103c636a268f289c497bc10188a5406317268811107fbc86521cae511b7156f1d0967e6a409ccffcc903a367eafa46bb7e21", "file": "src/app/brief/domain/placeholders.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "import { RichTextBlock } from '@shared/kernel/rich-text';\n\n/**\n * Placeholder fields and the PURE linter over them.\n *\n * `lintPlaceholders` is a total, effect-free function of (content, valid set). It\n * runs identically on the client (for live UX) and could run on the server (for\n * authority) — same rules, same config, so the two agree by construction. The FE\n * never STORES its output: diagnostics are a `computed()` over content (see\n * `brief.ts` selectors), the same \"derive, don't store\" discipline as wizard step\n * validity.\n */\n\n/** A placeholder field the template knows about. `fillable`/`deprecated` default to\n the healthy case; the seed flips them to exercise the not-fillable/deprecated rules. */\nexport interface PlaceholderDef {\n readonly key: string; // e.g. 'naam_zorgverlener'\n readonly label: string; // human label for the insert menu, e.g. 'Naam zorgverlener'\n readonly autoResolvable: boolean; // server can fill from case data (name, date, …)\n readonly fillable?: boolean; // default true; false → not resolvable for this beroep/case type\n readonly deprecated?: boolean; // default false; true → retired but still referenceable in old snapshots\n}\n\nexport type DiagnosticSeverity = 'error' | 'warning';\n\nexport type DiagnosticCode =\n | 'malformed' // raw braces in a text node (a paste that should have been a chip)\n | 'unknown-placeholder' // well-formed key not in the valid set\n | 'not-fillable' // key exists but isn't resolvable for this case type / beroep\n | 'deprecated' // key was valid once but the template no longer offers it\n | 'unresolved-at-send'; // manual (non-auto-resolvable) placeholder still to be filled\n\nexport interface DiagnosticLocation {\n readonly blockId: string;\n readonly paragraphIndex: number;\n readonly nodeIndex: number;\n}\n\nexport interface Diagnostic {\n readonly severity: DiagnosticSeverity;\n readonly code: DiagnosticCode;\n readonly placeholderKey?: string;\n readonly location: DiagnosticLocation;\n readonly message: string; // human-readable, Dutch\n}\n\n/** `error` blocks save (author time) and send (send time); `warning` is surfaced but allowed. */\nexport function severityOf(code: DiagnosticCode): DiagnosticSeverity {\n switch (code) {\n case 'malformed':\n case 'unknown-placeholder':\n case 'not-fillable':\n return 'error';\n case 'deprecated':\n case 'unresolved-at-send':\n return 'warning';\n }\n}\n\n// Raw `{{` or `}}` in text — the only way a malformed placeholder can exist, since\n// menu insertion always produces a proper placeholder NODE. Paste safety net.\nconst RAW_BRACES = /\\{\\{|\\}\\}/;\n\nfunction messageFor(code: DiagnosticCode, key?: string): string {\n switch (code) {\n case 'malformed':\n return $localize`:@@brief.lint.malformed:Deze tekst bevat losse accolades ({{ of }}). Voeg een veld toe via het menu in plaats van het te typen.`;\n case 'unknown-placeholder':\n return $localize`:@@brief.lint.unknown:Onbekend veld “${key}:key:”. Dit veld hoort niet bij dit sjabloon.`;\n case 'not-fillable':\n return $localize`:@@brief.lint.notFillable:Veld “${key}:key:” kan niet worden ingevuld voor dit beroep.`;\n case 'deprecated':\n return $localize`:@@brief.lint.deprecated:Veld “${key}:key:” is verouderd en wordt niet meer aangeboden.`;\n case 'unresolved-at-send':\n return $localize`:@@brief.lint.unresolved:Veld “${key}:key:” wordt handmatig ingevuld en is nog leeg.`;\n }\n}\n\nfunction diag(code: DiagnosticCode, location: DiagnosticLocation, key?: string): Diagnostic {\n return { severity: severityOf(code), code, placeholderKey: key, location, message: messageFor(code, key) };\n}\n\n/**\n * Lint one block against the template's placeholder set. Pure: given the same\n * content + valid set + blockId it always returns the same diagnostics, in\n * document order. One diagnostic per node at most (most-severe wins).\n */\nexport function lintPlaceholders(\n content: RichTextBlock,\n valid: readonly PlaceholderDef[],\n blockId: string,\n): Diagnostic[] {\n const byKey = new Map(valid.map((p) => [p.key, p]));\n const out: Diagnostic[] = [];\n\n content.paragraphs.forEach((p, paragraphIndex) => {\n p.nodes.forEach((n, nodeIndex) => {\n const location: DiagnosticLocation = { blockId, paragraphIndex, nodeIndex };\n if (n.type === 'text') {\n if (RAW_BRACES.test(n.text)) out.push(diag('malformed', location));\n return;\n }\n if (n.type !== 'placeholder') return; // lineBreak — nothing to check\n\n const def = byKey.get(n.key);\n if (!def) out.push(diag('unknown-placeholder', location, n.key));\n else if (def.fillable === false) out.push(diag('not-fillable', location, n.key));\n else if (def.deprecated) out.push(diag('deprecated', location, n.key));\n else if (!def.autoResolvable) out.push(diag('unresolved-at-send', location, n.key));\n // auto-resolvable & fillable & not deprecated → clean (filled by the server at send)\n });\n });\n\n return out;\n}\n", + "sourceCode": "import { RichTextBlock } from '@shared/kernel/rich-text';\n\n/**\n * Placeholder fields and the PURE linter over them.\n *\n * `lintPlaceholders` is a total, effect-free function of (content, valid set). It\n * runs identically on the client (for live UX) and could run on the server (for\n * authority) — same rules, same config, so the two agree by construction. The FE\n * never STORES its output: diagnostics are a `computed()` over content (see\n * `brief.ts` selectors), the same \"derive, don't store\" discipline as wizard step\n * validity.\n */\n\n/** A placeholder field the template knows about. `fillable`/`deprecated` default to\n the healthy case; the seed flips them to exercise the not-fillable/deprecated rules. */\nexport interface PlaceholderDef {\n readonly key: string; // e.g. 'naam_zorgverlener'\n readonly label: string; // human label for the insert menu, e.g. 'Naam zorgverlener'\n readonly autoResolvable: boolean; // server can fill from case data (name, date, …)\n readonly fillable?: boolean; // default true; false → not resolvable for this beroep/case type\n readonly deprecated?: boolean; // default false; true → retired but still referenceable in old snapshots\n}\n\nexport type DiagnosticSeverity = 'error' | 'warning';\n\nexport type DiagnosticCode =\n | 'malformed' // raw braces in a text node (a paste that should have been a chip)\n | 'unknown-placeholder' // well-formed key not in the valid set\n | 'not-fillable' // key exists but isn't resolvable for this case type / beroep\n | 'deprecated' // key was valid once but the template no longer offers it\n | 'unresolved-at-send'; // manual (non-auto-resolvable) placeholder still to be filled\n\nexport interface DiagnosticLocation {\n readonly blockId: string;\n readonly paragraphIndex: number;\n readonly nodeIndex: number;\n}\n\nexport interface Diagnostic {\n readonly severity: DiagnosticSeverity;\n readonly code: DiagnosticCode;\n readonly placeholderKey?: string;\n readonly location: DiagnosticLocation;\n readonly message: string; // human-readable, Dutch\n}\n\n/** `error` blocks save (author time) and send (send time); `warning` is surfaced but allowed. */\nexport function severityOf(code: DiagnosticCode): DiagnosticSeverity {\n switch (code) {\n case 'malformed':\n case 'unknown-placeholder':\n case 'not-fillable':\n return 'error';\n case 'deprecated':\n case 'unresolved-at-send':\n return 'warning';\n }\n}\n\n// Raw `{{` or `}}` in text — the only way a malformed placeholder can exist, since\n// menu insertion always produces a proper placeholder NODE. Paste safety net.\nconst RAW_BRACES = /\\{\\{|\\}\\}/;\n\nfunction messageFor(code: DiagnosticCode, key?: string): string {\n switch (code) {\n case 'malformed':\n return $localize`:@@brief.lint.malformed:Deze tekst bevat losse accolades ({{ of }}). Voeg een veld toe via het menu in plaats van het te typen.`;\n case 'unknown-placeholder':\n return $localize`:@@brief.lint.unknown:Onbekend veld “${key}:key:”. Dit veld hoort niet bij dit sjabloon.`;\n case 'not-fillable':\n return $localize`:@@brief.lint.notFillable:Veld “${key}:key:” kan niet worden ingevuld voor dit beroep.`;\n case 'deprecated':\n return $localize`:@@brief.lint.deprecated:Veld “${key}:key:” is verouderd en wordt niet meer aangeboden.`;\n case 'unresolved-at-send':\n return $localize`:@@brief.lint.unresolved:Veld “${key}:key:” wordt handmatig ingevuld en is nog leeg.`;\n }\n}\n\nfunction diag(code: DiagnosticCode, location: DiagnosticLocation, key?: string): Diagnostic {\n return {\n severity: severityOf(code),\n code,\n placeholderKey: key,\n location,\n message: messageFor(code, key),\n };\n}\n\n/**\n * Lint one block against the template's placeholder set. Pure: given the same\n * content + valid set + blockId it always returns the same diagnostics, in\n * document order. One diagnostic per node at most (most-severe wins).\n */\nexport function lintPlaceholders(\n content: RichTextBlock,\n valid: readonly PlaceholderDef[],\n blockId: string,\n): Diagnostic[] {\n const byKey = new Map(valid.map((p) => [p.key, p]));\n const out: Diagnostic[] = [];\n\n content.paragraphs.forEach((p, paragraphIndex) => {\n p.nodes.forEach((n, nodeIndex) => {\n const location: DiagnosticLocation = { blockId, paragraphIndex, nodeIndex };\n if (n.type === 'text') {\n if (RAW_BRACES.test(n.text)) out.push(diag('malformed', location));\n return;\n }\n if (n.type !== 'placeholder') return; // lineBreak — nothing to check\n\n const def = byKey.get(n.key);\n if (!def) out.push(diag('unknown-placeholder', location, n.key));\n else if (def.fillable === false) out.push(diag('not-fillable', location, n.key));\n else if (def.deprecated) out.push(diag('deprecated', location, n.key));\n else if (!def.autoResolvable) out.push(diag('unresolved-at-send', location, n.key));\n // auto-resolvable & fillable & not deprecated → clean (filled by the server at send)\n });\n });\n\n return out;\n}\n", "properties": [ { "name": "code", @@ -1646,12 +1793,12 @@ }, { "name": "DiagnosticLocation", - "id": "interface-DiagnosticLocation-7cd6b7f0437b0e74cbd408b88e6dceda3d58ed0171b5fc3baf66911b7dae607149d424cee85829f75b69eef30cea3d3978b49dd3d8ecdd5311e71533576fd713", + "id": "interface-DiagnosticLocation-24aa1b1685594bea112d1b3c31df103c636a268f289c497bc10188a5406317268811107fbc86521cae511b7156f1d0967e6a409ccffcc903a367eafa46bb7e21", "file": "src/app/brief/domain/placeholders.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "import { RichTextBlock } from '@shared/kernel/rich-text';\n\n/**\n * Placeholder fields and the PURE linter over them.\n *\n * `lintPlaceholders` is a total, effect-free function of (content, valid set). It\n * runs identically on the client (for live UX) and could run on the server (for\n * authority) — same rules, same config, so the two agree by construction. The FE\n * never STORES its output: diagnostics are a `computed()` over content (see\n * `brief.ts` selectors), the same \"derive, don't store\" discipline as wizard step\n * validity.\n */\n\n/** A placeholder field the template knows about. `fillable`/`deprecated` default to\n the healthy case; the seed flips them to exercise the not-fillable/deprecated rules. */\nexport interface PlaceholderDef {\n readonly key: string; // e.g. 'naam_zorgverlener'\n readonly label: string; // human label for the insert menu, e.g. 'Naam zorgverlener'\n readonly autoResolvable: boolean; // server can fill from case data (name, date, …)\n readonly fillable?: boolean; // default true; false → not resolvable for this beroep/case type\n readonly deprecated?: boolean; // default false; true → retired but still referenceable in old snapshots\n}\n\nexport type DiagnosticSeverity = 'error' | 'warning';\n\nexport type DiagnosticCode =\n | 'malformed' // raw braces in a text node (a paste that should have been a chip)\n | 'unknown-placeholder' // well-formed key not in the valid set\n | 'not-fillable' // key exists but isn't resolvable for this case type / beroep\n | 'deprecated' // key was valid once but the template no longer offers it\n | 'unresolved-at-send'; // manual (non-auto-resolvable) placeholder still to be filled\n\nexport interface DiagnosticLocation {\n readonly blockId: string;\n readonly paragraphIndex: number;\n readonly nodeIndex: number;\n}\n\nexport interface Diagnostic {\n readonly severity: DiagnosticSeverity;\n readonly code: DiagnosticCode;\n readonly placeholderKey?: string;\n readonly location: DiagnosticLocation;\n readonly message: string; // human-readable, Dutch\n}\n\n/** `error` blocks save (author time) and send (send time); `warning` is surfaced but allowed. */\nexport function severityOf(code: DiagnosticCode): DiagnosticSeverity {\n switch (code) {\n case 'malformed':\n case 'unknown-placeholder':\n case 'not-fillable':\n return 'error';\n case 'deprecated':\n case 'unresolved-at-send':\n return 'warning';\n }\n}\n\n// Raw `{{` or `}}` in text — the only way a malformed placeholder can exist, since\n// menu insertion always produces a proper placeholder NODE. Paste safety net.\nconst RAW_BRACES = /\\{\\{|\\}\\}/;\n\nfunction messageFor(code: DiagnosticCode, key?: string): string {\n switch (code) {\n case 'malformed':\n return $localize`:@@brief.lint.malformed:Deze tekst bevat losse accolades ({{ of }}). Voeg een veld toe via het menu in plaats van het te typen.`;\n case 'unknown-placeholder':\n return $localize`:@@brief.lint.unknown:Onbekend veld “${key}:key:”. Dit veld hoort niet bij dit sjabloon.`;\n case 'not-fillable':\n return $localize`:@@brief.lint.notFillable:Veld “${key}:key:” kan niet worden ingevuld voor dit beroep.`;\n case 'deprecated':\n return $localize`:@@brief.lint.deprecated:Veld “${key}:key:” is verouderd en wordt niet meer aangeboden.`;\n case 'unresolved-at-send':\n return $localize`:@@brief.lint.unresolved:Veld “${key}:key:” wordt handmatig ingevuld en is nog leeg.`;\n }\n}\n\nfunction diag(code: DiagnosticCode, location: DiagnosticLocation, key?: string): Diagnostic {\n return { severity: severityOf(code), code, placeholderKey: key, location, message: messageFor(code, key) };\n}\n\n/**\n * Lint one block against the template's placeholder set. Pure: given the same\n * content + valid set + blockId it always returns the same diagnostics, in\n * document order. One diagnostic per node at most (most-severe wins).\n */\nexport function lintPlaceholders(\n content: RichTextBlock,\n valid: readonly PlaceholderDef[],\n blockId: string,\n): Diagnostic[] {\n const byKey = new Map(valid.map((p) => [p.key, p]));\n const out: Diagnostic[] = [];\n\n content.paragraphs.forEach((p, paragraphIndex) => {\n p.nodes.forEach((n, nodeIndex) => {\n const location: DiagnosticLocation = { blockId, paragraphIndex, nodeIndex };\n if (n.type === 'text') {\n if (RAW_BRACES.test(n.text)) out.push(diag('malformed', location));\n return;\n }\n if (n.type !== 'placeholder') return; // lineBreak — nothing to check\n\n const def = byKey.get(n.key);\n if (!def) out.push(diag('unknown-placeholder', location, n.key));\n else if (def.fillable === false) out.push(diag('not-fillable', location, n.key));\n else if (def.deprecated) out.push(diag('deprecated', location, n.key));\n else if (!def.autoResolvable) out.push(diag('unresolved-at-send', location, n.key));\n // auto-resolvable & fillable & not deprecated → clean (filled by the server at send)\n });\n });\n\n return out;\n}\n", + "sourceCode": "import { RichTextBlock } from '@shared/kernel/rich-text';\n\n/**\n * Placeholder fields and the PURE linter over them.\n *\n * `lintPlaceholders` is a total, effect-free function of (content, valid set). It\n * runs identically on the client (for live UX) and could run on the server (for\n * authority) — same rules, same config, so the two agree by construction. The FE\n * never STORES its output: diagnostics are a `computed()` over content (see\n * `brief.ts` selectors), the same \"derive, don't store\" discipline as wizard step\n * validity.\n */\n\n/** A placeholder field the template knows about. `fillable`/`deprecated` default to\n the healthy case; the seed flips them to exercise the not-fillable/deprecated rules. */\nexport interface PlaceholderDef {\n readonly key: string; // e.g. 'naam_zorgverlener'\n readonly label: string; // human label for the insert menu, e.g. 'Naam zorgverlener'\n readonly autoResolvable: boolean; // server can fill from case data (name, date, …)\n readonly fillable?: boolean; // default true; false → not resolvable for this beroep/case type\n readonly deprecated?: boolean; // default false; true → retired but still referenceable in old snapshots\n}\n\nexport type DiagnosticSeverity = 'error' | 'warning';\n\nexport type DiagnosticCode =\n | 'malformed' // raw braces in a text node (a paste that should have been a chip)\n | 'unknown-placeholder' // well-formed key not in the valid set\n | 'not-fillable' // key exists but isn't resolvable for this case type / beroep\n | 'deprecated' // key was valid once but the template no longer offers it\n | 'unresolved-at-send'; // manual (non-auto-resolvable) placeholder still to be filled\n\nexport interface DiagnosticLocation {\n readonly blockId: string;\n readonly paragraphIndex: number;\n readonly nodeIndex: number;\n}\n\nexport interface Diagnostic {\n readonly severity: DiagnosticSeverity;\n readonly code: DiagnosticCode;\n readonly placeholderKey?: string;\n readonly location: DiagnosticLocation;\n readonly message: string; // human-readable, Dutch\n}\n\n/** `error` blocks save (author time) and send (send time); `warning` is surfaced but allowed. */\nexport function severityOf(code: DiagnosticCode): DiagnosticSeverity {\n switch (code) {\n case 'malformed':\n case 'unknown-placeholder':\n case 'not-fillable':\n return 'error';\n case 'deprecated':\n case 'unresolved-at-send':\n return 'warning';\n }\n}\n\n// Raw `{{` or `}}` in text — the only way a malformed placeholder can exist, since\n// menu insertion always produces a proper placeholder NODE. Paste safety net.\nconst RAW_BRACES = /\\{\\{|\\}\\}/;\n\nfunction messageFor(code: DiagnosticCode, key?: string): string {\n switch (code) {\n case 'malformed':\n return $localize`:@@brief.lint.malformed:Deze tekst bevat losse accolades ({{ of }}). Voeg een veld toe via het menu in plaats van het te typen.`;\n case 'unknown-placeholder':\n return $localize`:@@brief.lint.unknown:Onbekend veld “${key}:key:”. Dit veld hoort niet bij dit sjabloon.`;\n case 'not-fillable':\n return $localize`:@@brief.lint.notFillable:Veld “${key}:key:” kan niet worden ingevuld voor dit beroep.`;\n case 'deprecated':\n return $localize`:@@brief.lint.deprecated:Veld “${key}:key:” is verouderd en wordt niet meer aangeboden.`;\n case 'unresolved-at-send':\n return $localize`:@@brief.lint.unresolved:Veld “${key}:key:” wordt handmatig ingevuld en is nog leeg.`;\n }\n}\n\nfunction diag(code: DiagnosticCode, location: DiagnosticLocation, key?: string): Diagnostic {\n return {\n severity: severityOf(code),\n code,\n placeholderKey: key,\n location,\n message: messageFor(code, key),\n };\n}\n\n/**\n * Lint one block against the template's placeholder set. Pure: given the same\n * content + valid set + blockId it always returns the same diagnostics, in\n * document order. One diagnostic per node at most (most-severe wins).\n */\nexport function lintPlaceholders(\n content: RichTextBlock,\n valid: readonly PlaceholderDef[],\n blockId: string,\n): Diagnostic[] {\n const byKey = new Map(valid.map((p) => [p.key, p]));\n const out: Diagnostic[] = [];\n\n content.paragraphs.forEach((p, paragraphIndex) => {\n p.nodes.forEach((n, nodeIndex) => {\n const location: DiagnosticLocation = { blockId, paragraphIndex, nodeIndex };\n if (n.type === 'text') {\n if (RAW_BRACES.test(n.text)) out.push(diag('malformed', location));\n return;\n }\n if (n.type !== 'placeholder') return; // lineBreak — nothing to check\n\n const def = byKey.get(n.key);\n if (!def) out.push(diag('unknown-placeholder', location, n.key));\n else if (def.fillable === false) out.push(diag('not-fillable', location, n.key));\n else if (def.deprecated) out.push(diag('deprecated', location, n.key));\n else if (!def.autoResolvable) out.push(diag('unresolved-at-send', location, n.key));\n // auto-resolvable & fillable & not deprecated → clean (filled by the server at send)\n });\n });\n\n return out;\n}\n", "properties": [ { "name": "blockId", @@ -1700,12 +1847,12 @@ }, { "name": "DocumentCategory", - "id": "interface-DocumentCategory-a9d98fc612c255dd91f2cd2e1dfab2fbff1c2361f950c1fbd696c7075a6424d5bebf88230c1c3c0f9e463fada8809608c0e890549e98b7dd3e745b512ebeee6f", + "id": "interface-DocumentCategory-0a5f080a466cf706e5778a68cef10e29895054104ee6cbc222451b12481341b217159dd1216c57fe6713d96ec0a87d54df2a32d5930fc7915fe28613339296f4", "file": "src/app/shared/upload/upload.machine.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "import { assertNever } from '@shared/kernel/fp';\n\n/**\n * Pure upload domain (no Angular). Reusable across wizards: the host wizard folds\n * `UploadState` into its Model and delegates upload `Msg`s to `reduceUpload`.\n * Illegal states are unrepresentable by construction; the few transitions a union\n * can't express (channel↔upload exclusivity, single-file categories) are enforced\n * here in the reducer. Effects live in the shell (upload-shell.service.ts).\n */\n\nexport type UploadStatus =\n | { type: 'idle' }\n | { type: 'queued' }\n | { type: 'uploading'; progressPct: number }\n | { type: 'complete'; documentId: string }\n | { type: 'failed'; reason: string }\n | { type: 'deleting'; documentId: string } // carries the id so a failed delete can revert\n | { type: 'deleted' };\n\nexport interface Upload {\n localId: string; // client-generated UUID; the sync tag / status key\n categoryId: string;\n fileName: string;\n fileSizeMb: number;\n status: UploadStatus;\n backgroundSync: boolean;\n}\n\nexport type DeliveryChannel = 'digital' | 'post';\n\nexport interface DocumentCategory {\n categoryId: string;\n label: string;\n description: string;\n required: boolean;\n acceptedTypes: string[];\n maxSizeMb: number;\n multiple: boolean;\n allowPostDelivery: boolean;\n}\n\nexport interface UploadState {\n categories: DocumentCategory[];\n uploads: Upload[];\n deliveryChannel: Record; // categoryId → channel; default 'digital'\n rejections: Record; // categoryId → client-side validation message (transient)\n backgroundSyncAvailable: boolean;\n categoriesError?: string;\n}\n\nexport const initialUpload: UploadState = {\n categories: [],\n uploads: [],\n deliveryChannel: {},\n rejections: {},\n backgroundSyncAvailable: false,\n};\n\nexport type UploadMsg =\n | { type: 'CategoriesLoaded'; categories: DocumentCategory[] }\n | { type: 'CategoriesLoadFailed'; reason: string }\n | { type: 'BackgroundSyncAvailability'; available: boolean }\n | { type: 'FileSelected'; categoryId: string; localId: string; fileName: string; fileSizeMb: number }\n | { type: 'FileRejected'; categoryId: string; reason: 'type' | 'size' | 'multiple' }\n | { type: 'UploadQueued'; localId: string; backgroundSync: boolean }\n | { type: 'UploadProgress'; localId: string; progressPct: number }\n | { type: 'UploadComplete'; localId: string; documentId: string }\n | { type: 'UploadFailed'; localId: string; reason: string }\n | { type: 'UploadRetried'; localId: string }\n | { type: 'UploadRemoved'; localId: string }\n | { type: 'UploadDeleteRequested'; localId: string; documentId: string }\n | { type: 'UploadDeleting'; localId: string }\n | { type: 'UploadDeleteComplete'; localId: string }\n | { type: 'UploadDeleteFailed'; localId: string; reason: string }\n | { type: 'DeliveryChannelChanged'; categoryId: string; channel: DeliveryChannel }\n | {\n type: 'BackgroundUploadsReturned';\n results: Array<{ localId: string } & ({ success: true; documentId: string } | { success: false; reason: string })>;\n };\n\nconst REJECTION_MESSAGES: Record<'type' | 'size' | 'multiple', string> = {\n type: $localize`:@@upload.reject.type:Dit bestandstype is niet toegestaan voor deze categorie.`,\n size: $localize`:@@upload.reject.size:Dit bestand is te groot.`,\n multiple: $localize`:@@upload.reject.multiple:U kunt voor deze categorie maar één bestand uploaden.`,\n};\n\nconst ACTIVE: ReadonlyArray = ['queued', 'uploading', 'complete'];\n\n/** A required category is satisfied by an initiated upload OR a post-delivery choice. */\nexport function categorySatisfied(s: UploadState, categoryId: string): boolean {\n if (s.deliveryChannel[categoryId] === 'post') return true;\n return s.uploads.some((u) => u.categoryId === categoryId && ACTIVE.includes(u.status.type));\n}\n\nexport function requiredCategoriesSatisfied(s: UploadState): boolean {\n return s.categories.filter((c) => c.required).every((c) => categorySatisfied(s, c.categoryId));\n}\n\n/**\n * FE format-validation (never authority — the server re-validates). Returns the\n * rejection reason for one file, or null if it passes the category's type/size.\n */\nexport function rejectReason(cat: DocumentCategory, file: { type: string; sizeMb: number }): 'type' | 'size' | null {\n if (cat.acceptedTypes.length > 0 && !cat.acceptedTypes.includes(file.type)) return 'type';\n if (cat.maxSizeMb > 0 && file.sizeMb > cat.maxSizeMb) return 'size';\n return null;\n}\n\n/** Map one upload's status, leaving the rest of the list untouched. */\nfunction mapUpload(s: UploadState, localId: string, f: (u: Upload) => Upload): UploadState {\n return { ...s, uploads: s.uploads.map((u) => (u.localId === localId ? f(u) : u)) };\n}\n\nconst find = (s: UploadState, localId: string) => s.uploads.find((u) => u.localId === localId);\nconst categoryOf = (s: UploadState, categoryId: string) => s.categories.find((c) => c.categoryId === categoryId);\n\nexport function reduceUpload(s: UploadState, m: UploadMsg): UploadState {\n switch (m.type) {\n case 'CategoriesLoaded': {\n // Categories can change with the answers (e.g. the diploma upload disappears once\n // DUO is chosen). Drop uploads + channel choices for categories no longer present.\n const ids = new Set(m.categories.map((c) => c.categoryId));\n const deliveryChannel: Record = {};\n for (const c of m.categories) deliveryChannel[c.categoryId] = s.deliveryChannel[c.categoryId] ?? 'digital';\n const uploads = s.uploads.filter((u) => ids.has(u.categoryId));\n return { ...s, categories: m.categories, uploads, deliveryChannel, categoriesError: undefined };\n }\n case 'CategoriesLoadFailed':\n return { ...s, categoriesError: m.reason };\n case 'BackgroundSyncAvailability':\n return { ...s, backgroundSyncAvailable: m.available };\n\n case 'FileSelected': {\n // Reject at dispatch: unknown category, or a category set to post-delivery.\n if (!categoryOf(s, m.categoryId) || s.deliveryChannel[m.categoryId] === 'post') return s;\n const cat = categoryOf(s, m.categoryId)!;\n // Single-file categories: a new selection replaces any existing upload.\n const uploads = cat.multiple ? s.uploads : s.uploads.filter((u) => u.categoryId !== m.categoryId);\n const next: Upload = {\n localId: m.localId,\n categoryId: m.categoryId,\n fileName: m.fileName,\n fileSizeMb: m.fileSizeMb,\n status: { type: 'queued' },\n backgroundSync: false,\n };\n const { [m.categoryId]: _cleared, ...rejections } = s.rejections;\n return { ...s, uploads: [...uploads, next], rejections };\n }\n case 'FileRejected':\n return { ...s, rejections: { ...s.rejections, [m.categoryId]: REJECTION_MESSAGES[m.reason] } };\n\n case 'UploadQueued':\n return mapUpload(s, m.localId, (u) => ({ ...u, status: { type: 'queued' }, backgroundSync: m.backgroundSync }));\n case 'UploadProgress':\n return mapUpload(s, m.localId, (u) => ({ ...u, status: { type: 'uploading', progressPct: m.progressPct } }));\n case 'UploadComplete':\n return mapUpload(s, m.localId, (u) => ({ ...u, status: { type: 'complete', documentId: m.documentId } }));\n case 'UploadFailed':\n return mapUpload(s, m.localId, (u) => ({ ...u, status: { type: 'failed', reason: m.reason } }));\n case 'UploadRetried':\n return mapUpload(s, m.localId, (u) => ({ ...u, status: { type: 'queued' } }));\n\n case 'UploadRemoved':\n return { ...s, uploads: s.uploads.filter((u) => u.localId !== m.localId) };\n\n case 'UploadDeleteRequested':\n case 'UploadDeleting':\n // Both mark the in-flight delete; keep the documentId so a failure can revert.\n return mapUpload(s, m.localId, (u) => {\n const documentId = u.status.type === 'complete' ? u.status.documentId\n : u.status.type === 'deleting' ? u.status.documentId : '';\n return { ...u, status: { type: 'deleting', documentId } };\n });\n case 'UploadDeleteComplete':\n return { ...s, uploads: s.uploads.filter((u) => u.localId !== m.localId) };\n case 'UploadDeleteFailed':\n return mapUpload(s, m.localId, (u) =>\n u.status.type === 'deleting' ? { ...u, status: { type: 'complete', documentId: u.status.documentId } } : u);\n\n case 'DeliveryChannelChanged': {\n const cat = categoryOf(s, m.categoryId);\n // Reject post for a category that doesn't permit it.\n if (m.channel === 'post' && (!cat || !cat.allowPostDelivery)) return s;\n const deliveryChannel = { ...s.deliveryChannel, [m.categoryId]: m.channel };\n // Switching to post removes that category's uploads; switching to digital starts clean.\n const uploads = s.uploads.filter((u) => u.categoryId !== m.categoryId);\n return { ...s, deliveryChannel, uploads };\n }\n\n case 'BackgroundUploadsReturned': {\n let next = s;\n for (const r of m.results) {\n next = mapUpload(next, r.localId, (u) => ({\n ...u,\n status: r.success ? { type: 'complete', documentId: r.documentId } : { type: 'failed', reason: r.reason },\n }));\n }\n return next;\n }\n\n default:\n return assertNever(m);\n }\n}\n\n/** The submit payload fragment: digital docs carry their documentId, post categories the channel. */\nexport function deliveryRefs(s: UploadState): Array<{ categoryId: string; channel: DeliveryChannel; documentId?: string }> {\n const refs: Array<{ categoryId: string; channel: DeliveryChannel; documentId?: string }> = [];\n for (const c of s.categories) {\n if (s.deliveryChannel[c.categoryId] === 'post') {\n refs.push({ categoryId: c.categoryId, channel: 'post' });\n } else {\n for (const u of s.uploads) {\n if (u.categoryId === c.categoryId && u.status.type === 'complete') {\n refs.push({ categoryId: c.categoryId, channel: 'digital', documentId: u.status.documentId });\n }\n }\n }\n }\n return refs;\n}\n\n/** Used by the shell to find what to poll on return: still-in-flight uploads. */\nexport const inFlight = (s: UploadState): Upload[] =>\n s.uploads.filter((u) => u.status.type === 'queued' || u.status.type === 'uploading');\n", + "sourceCode": "import { assertNever } from '@shared/kernel/fp';\n\n/**\n * Pure upload domain (no Angular). Reusable across wizards: the host wizard folds\n * `UploadState` into its Model and delegates upload `Msg`s to `reduceUpload`.\n * Illegal states are unrepresentable by construction; the few transitions a union\n * can't express (channel↔upload exclusivity, single-file categories) are enforced\n * here in the reducer. Effects live in the shell (upload-shell.service.ts).\n */\n\nexport type UploadStatus =\n | { type: 'idle' }\n | { type: 'queued' }\n | { type: 'uploading'; progressPct: number }\n | { type: 'complete'; documentId: string }\n | { type: 'failed'; reason: string }\n | { type: 'deleting'; documentId: string } // carries the id so a failed delete can revert\n | { type: 'deleted' };\n\nexport interface Upload {\n localId: string; // client-generated UUID; the sync tag / status key\n categoryId: string;\n fileName: string;\n fileSizeMb: number;\n status: UploadStatus;\n backgroundSync: boolean;\n}\n\nexport type DeliveryChannel = 'digital' | 'post';\n\nexport interface DocumentCategory {\n categoryId: string;\n label: string;\n description: string;\n required: boolean;\n acceptedTypes: string[];\n maxSizeMb: number;\n multiple: boolean;\n allowPostDelivery: boolean;\n}\n\nexport interface UploadState {\n categories: DocumentCategory[];\n uploads: Upload[];\n deliveryChannel: Record; // categoryId → channel; default 'digital'\n rejections: Record; // categoryId → client-side validation message (transient)\n backgroundSyncAvailable: boolean;\n categoriesError?: string;\n}\n\nexport const initialUpload: UploadState = {\n categories: [],\n uploads: [],\n deliveryChannel: {},\n rejections: {},\n backgroundSyncAvailable: false,\n};\n\nexport type UploadMsg =\n | { type: 'CategoriesLoaded'; categories: DocumentCategory[] }\n | { type: 'CategoriesLoadFailed'; reason: string }\n | { type: 'BackgroundSyncAvailability'; available: boolean }\n | {\n type: 'FileSelected';\n categoryId: string;\n localId: string;\n fileName: string;\n fileSizeMb: number;\n }\n | { type: 'FileRejected'; categoryId: string; reason: 'type' | 'size' | 'multiple' }\n | { type: 'UploadQueued'; localId: string; backgroundSync: boolean }\n | { type: 'UploadProgress'; localId: string; progressPct: number }\n | { type: 'UploadComplete'; localId: string; documentId: string }\n | { type: 'UploadFailed'; localId: string; reason: string }\n | { type: 'UploadRetried'; localId: string }\n | { type: 'UploadRemoved'; localId: string }\n | { type: 'UploadDeleteRequested'; localId: string; documentId: string }\n | { type: 'UploadDeleting'; localId: string }\n | { type: 'UploadDeleteComplete'; localId: string }\n | { type: 'UploadDeleteFailed'; localId: string; reason: string }\n | { type: 'DeliveryChannelChanged'; categoryId: string; channel: DeliveryChannel }\n | {\n type: 'BackgroundUploadsReturned';\n results: Array<\n { localId: string } & (\n | { success: true; documentId: string }\n | { success: false; reason: string }\n )\n >;\n };\n\nconst REJECTION_MESSAGES: Record<'type' | 'size' | 'multiple', string> = {\n type: $localize`:@@upload.reject.type:Dit bestandstype is niet toegestaan voor deze categorie.`,\n size: $localize`:@@upload.reject.size:Dit bestand is te groot.`,\n multiple: $localize`:@@upload.reject.multiple:U kunt voor deze categorie maar één bestand uploaden.`,\n};\n\nconst ACTIVE: ReadonlyArray = ['queued', 'uploading', 'complete'];\n\n/** A required category is satisfied by an initiated upload OR a post-delivery choice. */\nexport function categorySatisfied(s: UploadState, categoryId: string): boolean {\n if (s.deliveryChannel[categoryId] === 'post') return true;\n return s.uploads.some((u) => u.categoryId === categoryId && ACTIVE.includes(u.status.type));\n}\n\nexport function requiredCategoriesSatisfied(s: UploadState): boolean {\n return s.categories.filter((c) => c.required).every((c) => categorySatisfied(s, c.categoryId));\n}\n\n/**\n * FE format-validation (never authority — the server re-validates). Returns the\n * rejection reason for one file, or null if it passes the category's type/size.\n */\nexport function rejectReason(\n cat: DocumentCategory,\n file: { type: string; sizeMb: number },\n): 'type' | 'size' | null {\n if (cat.acceptedTypes.length > 0 && !cat.acceptedTypes.includes(file.type)) return 'type';\n if (cat.maxSizeMb > 0 && file.sizeMb > cat.maxSizeMb) return 'size';\n return null;\n}\n\n/** Map one upload's status, leaving the rest of the list untouched. */\nfunction mapUpload(s: UploadState, localId: string, f: (u: Upload) => Upload): UploadState {\n return { ...s, uploads: s.uploads.map((u) => (u.localId === localId ? f(u) : u)) };\n}\n\nconst find = (s: UploadState, localId: string) => s.uploads.find((u) => u.localId === localId);\nconst categoryOf = (s: UploadState, categoryId: string) =>\n s.categories.find((c) => c.categoryId === categoryId);\n\nexport function reduceUpload(s: UploadState, m: UploadMsg): UploadState {\n switch (m.type) {\n case 'CategoriesLoaded': {\n // Categories can change with the answers (e.g. the diploma upload disappears once\n // DUO is chosen). Drop uploads + channel choices for categories no longer present.\n const ids = new Set(m.categories.map((c) => c.categoryId));\n const deliveryChannel: Record = {};\n for (const c of m.categories)\n deliveryChannel[c.categoryId] = s.deliveryChannel[c.categoryId] ?? 'digital';\n const uploads = s.uploads.filter((u) => ids.has(u.categoryId));\n return {\n ...s,\n categories: m.categories,\n uploads,\n deliveryChannel,\n categoriesError: undefined,\n };\n }\n case 'CategoriesLoadFailed':\n return { ...s, categoriesError: m.reason };\n case 'BackgroundSyncAvailability':\n return { ...s, backgroundSyncAvailable: m.available };\n\n case 'FileSelected': {\n // Reject at dispatch: unknown category, or a category set to post-delivery.\n if (!categoryOf(s, m.categoryId) || s.deliveryChannel[m.categoryId] === 'post') return s;\n const cat = categoryOf(s, m.categoryId)!;\n // Single-file categories: a new selection replaces any existing upload.\n const uploads = cat.multiple\n ? s.uploads\n : s.uploads.filter((u) => u.categoryId !== m.categoryId);\n const next: Upload = {\n localId: m.localId,\n categoryId: m.categoryId,\n fileName: m.fileName,\n fileSizeMb: m.fileSizeMb,\n status: { type: 'queued' },\n backgroundSync: false,\n };\n const { [m.categoryId]: _cleared, ...rejections } = s.rejections;\n return { ...s, uploads: [...uploads, next], rejections };\n }\n case 'FileRejected':\n return {\n ...s,\n rejections: { ...s.rejections, [m.categoryId]: REJECTION_MESSAGES[m.reason] },\n };\n\n case 'UploadQueued':\n return mapUpload(s, m.localId, (u) => ({\n ...u,\n status: { type: 'queued' },\n backgroundSync: m.backgroundSync,\n }));\n case 'UploadProgress':\n return mapUpload(s, m.localId, (u) => ({\n ...u,\n status: { type: 'uploading', progressPct: m.progressPct },\n }));\n case 'UploadComplete':\n return mapUpload(s, m.localId, (u) => ({\n ...u,\n status: { type: 'complete', documentId: m.documentId },\n }));\n case 'UploadFailed':\n return mapUpload(s, m.localId, (u) => ({\n ...u,\n status: { type: 'failed', reason: m.reason },\n }));\n case 'UploadRetried':\n return mapUpload(s, m.localId, (u) => ({ ...u, status: { type: 'queued' } }));\n\n case 'UploadRemoved':\n return { ...s, uploads: s.uploads.filter((u) => u.localId !== m.localId) };\n\n case 'UploadDeleteRequested':\n case 'UploadDeleting':\n // Both mark the in-flight delete; keep the documentId so a failure can revert.\n return mapUpload(s, m.localId, (u) => {\n const documentId =\n u.status.type === 'complete'\n ? u.status.documentId\n : u.status.type === 'deleting'\n ? u.status.documentId\n : '';\n return { ...u, status: { type: 'deleting', documentId } };\n });\n case 'UploadDeleteComplete':\n return { ...s, uploads: s.uploads.filter((u) => u.localId !== m.localId) };\n case 'UploadDeleteFailed':\n return mapUpload(s, m.localId, (u) =>\n u.status.type === 'deleting'\n ? { ...u, status: { type: 'complete', documentId: u.status.documentId } }\n : u,\n );\n\n case 'DeliveryChannelChanged': {\n const cat = categoryOf(s, m.categoryId);\n // Reject post for a category that doesn't permit it.\n if (m.channel === 'post' && (!cat || !cat.allowPostDelivery)) return s;\n const deliveryChannel = { ...s.deliveryChannel, [m.categoryId]: m.channel };\n // Switching to post removes that category's uploads; switching to digital starts clean.\n const uploads = s.uploads.filter((u) => u.categoryId !== m.categoryId);\n return { ...s, deliveryChannel, uploads };\n }\n\n case 'BackgroundUploadsReturned': {\n let next = s;\n for (const r of m.results) {\n next = mapUpload(next, r.localId, (u) => ({\n ...u,\n status: r.success\n ? { type: 'complete', documentId: r.documentId }\n : { type: 'failed', reason: r.reason },\n }));\n }\n return next;\n }\n\n default:\n return assertNever(m);\n }\n}\n\n/** The submit payload fragment: digital docs carry their documentId, post categories the channel. */\nexport function deliveryRefs(\n s: UploadState,\n): Array<{ categoryId: string; channel: DeliveryChannel; documentId?: string }> {\n const refs: Array<{ categoryId: string; channel: DeliveryChannel; documentId?: string }> = [];\n for (const c of s.categories) {\n if (s.deliveryChannel[c.categoryId] === 'post') {\n refs.push({ categoryId: c.categoryId, channel: 'post' });\n } else {\n for (const u of s.uploads) {\n if (u.categoryId === c.categoryId && u.status.type === 'complete') {\n refs.push({\n categoryId: c.categoryId,\n channel: 'digital',\n documentId: u.status.documentId,\n });\n }\n }\n }\n }\n return refs;\n}\n\n/** Used by the shell to find what to poll on return: still-in-flight uploads. */\nexport const inFlight = (s: UploadState): Upload[] =>\n s.uploads.filter((u) => u.status.type === 'queued' || u.status.type === 'uploading');\n", "properties": [ { "name": "acceptedTypes", @@ -1795,12 +1942,12 @@ }, { "name": "DocumentCategoryDto", - "id": "interface-DocumentCategoryDto-134629d19fe3b5e6a76daeb4f10c282202eb1b8380b939c25450bb44b86fcb3df7a15e5ead886ad958b8bb7f158457387fb6c11872acdb4893c4933c2fdef07b", + "id": "interface-DocumentCategoryDto-fb1ee9618e8a58db438478dc30a2ef41f099ba42e2d9a7155300e95c801cc6c2851c481c1bff1e7af3c066bc79e76529bbb37756fed2b5e35a56532325220bab", "file": "src/app/shared/infrastructure/api-client.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", + "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n me(): Promise {\n let url_ = this.baseUrl + \"/api/v1/me\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processMe(_response);\n });\n }\n\n protected processMe(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as MeDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDecisionsDto {\n canEdit?: boolean;\n canApprove?: boolean;\n canReject?: boolean;\n canSend?: boolean;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n decisions?: BriefDecisionsDto;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface MeDto {\n capabilities?: string[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", "properties": [ { "name": "acceptedTypes", @@ -1810,7 +1957,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1343 + "line": 1387 }, { "name": "allowPostDelivery", @@ -1820,7 +1967,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1346 + "line": 1390 }, { "name": "categoryId", @@ -1830,7 +1977,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1339 + "line": 1383 }, { "name": "description", @@ -1840,7 +1987,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1341 + "line": 1385 }, { "name": "label", @@ -1850,7 +1997,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1340 + "line": 1384 }, { "name": "maxSizeMb", @@ -1860,7 +2007,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1344 + "line": 1388 }, { "name": "multiple", @@ -1870,7 +2017,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1345 + "line": 1389 }, { "name": "required", @@ -1880,7 +2027,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1342 + "line": 1386 } ], "indexSignatures": [], @@ -1890,12 +2037,12 @@ }, { "name": "DocumentRefDto", - "id": "interface-DocumentRefDto-134629d19fe3b5e6a76daeb4f10c282202eb1b8380b939c25450bb44b86fcb3df7a15e5ead886ad958b8bb7f158457387fb6c11872acdb4893c4933c2fdef07b", + "id": "interface-DocumentRefDto-fb1ee9618e8a58db438478dc30a2ef41f099ba42e2d9a7155300e95c801cc6c2851c481c1bff1e7af3c066bc79e76529bbb37756fed2b5e35a56532325220bab", "file": "src/app/shared/infrastructure/api-client.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", + "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n me(): Promise {\n let url_ = this.baseUrl + \"/api/v1/me\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processMe(_response);\n });\n }\n\n protected processMe(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as MeDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDecisionsDto {\n canEdit?: boolean;\n canApprove?: boolean;\n canReject?: boolean;\n canSend?: boolean;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n decisions?: BriefDecisionsDto;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface MeDto {\n capabilities?: string[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", "properties": [ { "name": "categoryId", @@ -1905,7 +2052,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1350 + "line": 1394 }, { "name": "channel", @@ -1915,7 +2062,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1351 + "line": 1395 }, { "name": "documentId", @@ -1925,7 +2072,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1352 + "line": 1396 } ], "indexSignatures": [], @@ -1935,12 +2082,59 @@ }, { "name": "Draft", - "id": "interface-Draft-69e87ea9a6c36bd372087191f1524450d62f799934711812731fbbd8f034a9e92b7928082471c429b82990c34c47b84b6493735cb994ec6fdfb81b200e990467", + "id": "interface-Draft-3f75a0ff51d12ccab50bfa13789cace778d5acff9f4feaa1607cdf1acb4a5ab4fcc687512424cb2252ec07568f6aea07a0b4f04469cbeed733c28654443ffd9e", + "file": "src/app/herregistratie/domain/herregistratie.machine.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Result, assertNever } from '@shared/kernel/fp';\nimport { Uren, parseUren } from '@registratie/domain/value-objects/uren';\nimport {\n UploadState,\n UploadMsg,\n initialUpload,\n reduceUpload,\n requiredCategoriesSatisfied,\n deliveryRefs,\n} from '@shared/upload/upload.machine';\n\n/** What the user is typing (raw, possibly invalid). */\nexport interface Draft {\n uren: string;\n jaren: string;\n punten: string;\n}\n\nexport type StepErrors = Partial>;\n\n/** What we have AFTER parsing — branded/typed, guaranteed valid. */\nexport interface Valid {\n uren: Uren;\n jaren: number;\n punten: number;\n documents: Array<{ categoryId: string; channel: 'digital' | 'post'; documentId?: string }>;\n}\n\n/**\n * The whole wizard as one tagged union. `step` and `errors` exist ONLY while\n * Editing; Submitting/Submitted/Failed carry a `Valid` payload and nothing else.\n * So \"submitting while a field is invalid\" or \"showing the success screen with\n * errors set\" are unrepresentable — the bug class is gone by construction.\n */\nexport type WizardState =\n | { tag: 'Editing'; step: 1 | 2 | 3; draft: Draft; errors: StepErrors; upload: UploadState }\n | { tag: 'Submitting'; data: Valid }\n | { tag: 'Submitted'; data: Valid }\n | { tag: 'Failed'; data: Valid; error: string };\n\nexport const initial: WizardState = {\n tag: 'Editing',\n step: 1,\n draft: { uren: '', jaren: '', punten: '' },\n errors: {},\n upload: initialUpload,\n};\n\n/** Has the user meaningfully started, so it's worth persisting as a Concept? */\nexport function hasProgress(s: Extract): boolean {\n return (\n s.step > 1 ||\n !!s.draft.uren ||\n !!s.draft.jaren ||\n !!s.draft.punten ||\n deliveryRefs(s.upload).some((r) => r.channel === 'digital' && !!r.documentId)\n );\n}\n\n/** Parse every field; on success hand back a Valid, else the per-field errors. */\nfunction validate(draft: Draft, upload: UploadState): Result {\n const uren = parseUren(draft.uren);\n const jaren = parseUren(draft.jaren);\n const punten = parseUren(draft.punten);\n const errors: StepErrors = {};\n if (!uren.ok) errors.uren = uren.error;\n if (!jaren.ok) errors.jaren = jaren.error;\n if (!punten.ok) errors.punten = punten.error;\n if (!requiredCategoriesSatisfied(upload)) {\n errors.documenten = $localize`:@@validation.documenten:Lever de verplichte documenten aan (upload of kies \"per post nasturen\").`;\n }\n if (uren.ok && jaren.ok && punten.ok && !errors.documenten) {\n return {\n ok: true,\n value: {\n uren: uren.value,\n jaren: jaren.value,\n punten: punten.value,\n documents: deliveryRefs(upload),\n },\n };\n }\n return { ok: false, error: errors };\n}\n\n/** Advance one step, gating on that step's fields. Illegal elsewhere = no-op. */\nexport function next(s: WizardState): WizardState {\n if (s.tag !== 'Editing') return s;\n const errors: StepErrors = {};\n if (s.step === 1) {\n const uren = parseUren(s.draft.uren);\n const jaren = parseUren(s.draft.jaren);\n if (!uren.ok) errors.uren = uren.error;\n if (!jaren.ok) errors.jaren = jaren.error;\n return Object.keys(errors).length === 0 ? { ...s, step: 2, errors: {} } : { ...s, errors };\n }\n if (s.step === 2) {\n const punten = parseUren(s.draft.punten);\n if (!punten.ok) errors.punten = punten.error;\n return punten.ok ? { ...s, step: 3, errors: {} } : { ...s, errors };\n }\n return s;\n}\n\nexport function back(s: WizardState): WizardState {\n if (s.tag !== 'Editing' || s.step === 1) return s;\n return { ...s, step: (s.step - 1) as 1 | 2, errors: {} };\n}\n\n/** Jump back to an earlier step to correct data (controle → step N). Forward\n jumps are not allowed (would skip validation). */\nexport function gaNaarStap(s: WizardState, step: 1 | 2 | 3): WizardState {\n if (s.tag !== 'Editing' || step >= s.step) return s;\n return { ...s, step, errors: {} };\n}\n\n/** Step 3 submit: parse everything + require documents; Submitting only with Valid. */\nexport function submit(s: WizardState): WizardState {\n if (s.tag !== 'Editing' || s.step !== 3) return s;\n const result = validate(s.draft, s.upload);\n return result.ok ? { tag: 'Submitting', data: result.value } : { ...s, errors: result.error };\n}\n\n/** Route an upload sub-message through the pure upload reducer (Editing only). */\nexport function upload(s: WizardState, msg: UploadMsg): WizardState {\n if (s.tag !== 'Editing') return s;\n return { ...s, upload: reduceUpload(s.upload, msg) };\n}\n\n/** Resolve the async submit. Only meaningful while Submitting. */\nexport function resolve(s: WizardState, r: Result): WizardState {\n if (s.tag !== 'Submitting') return s;\n return r.ok\n ? { tag: 'Submitted', data: s.data }\n : { tag: 'Failed', data: s.data, error: r.error };\n}\n\n/** Update one draft field while editing; ignored in any other state. */\nexport function setField(s: WizardState, key: keyof Draft, value: string): WizardState {\n if (s.tag !== 'Editing') return s;\n return { ...s, draft: { ...s.draft, [key]: value } };\n}\n\n/**\n * Every event that can happen to the wizard, as one message type. The component\n * sends a WizardMsg; `reduce` decides the next state. This is the Elm\n * Model+Msg+update pattern: ONE pure function describes all state changes.\n */\nexport type WizardMsg =\n | { tag: 'SetField'; key: keyof Draft; value: string }\n | { tag: 'Next' }\n | { tag: 'Back' }\n | { tag: 'GaNaarStap'; step: 1 | 2 | 3 }\n | { tag: 'Submit' }\n | { tag: 'Retry' }\n | { tag: 'SubmitConfirmed' }\n | { tag: 'SubmitFailed'; error: string }\n | { tag: 'Upload'; msg: UploadMsg }\n | { tag: 'Seed'; state: WizardState }; // mount a specific state (stories/showcase)\n\nexport function reduce(s: WizardState, m: WizardMsg): WizardState {\n switch (m.tag) {\n case 'SetField':\n return setField(s, m.key, m.value);\n case 'Next':\n return next(s);\n case 'Back':\n return back(s);\n case 'GaNaarStap':\n return gaNaarStap(s, m.step);\n case 'Submit':\n return submit(s);\n case 'Retry':\n return s.tag === 'Failed' ? { tag: 'Submitting', data: s.data } : s;\n case 'SubmitConfirmed':\n return s.tag === 'Submitting' ? { tag: 'Submitted', data: s.data } : s;\n case 'SubmitFailed':\n return s.tag === 'Submitting' ? { tag: 'Failed', data: s.data, error: m.error } : s;\n case 'Upload':\n return upload(s, m.msg);\n case 'Seed':\n return m.state;\n default:\n return assertNever(m);\n }\n}\n", + "properties": [ + { + "name": "jaren", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "indexKey": "", + "optional": false, + "description": "", + "line": 15 + }, + { + "name": "punten", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "indexKey": "", + "optional": false, + "description": "", + "line": 16 + }, + { + "name": "uren", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "indexKey": "", + "optional": false, + "description": "", + "line": 14 + } + ], + "indexSignatures": [], + "kind": 172, + "description": "

What the user is typing (raw, possibly invalid).

\n", + "rawdescription": "\nWhat the user is typing (raw, possibly invalid).", + "methods": [], + "extends": [] + }, + { + "name": "Draft", + "id": "interface-Draft-e2705c063a865160d8b4effa4448b7409aad1ea6065acd928ddce1cf628f34fd7984fe8d1078d372fb64c525f4288babd5bdf5ff700d1c7405eecb15ea85550c-1", "file": "src/app/registratie/domain/change-request.machine.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "import { Result, assertNever } from '@shared/kernel/fp';\nimport { Postcode, parsePostcode } from '@registratie/domain/value-objects/postcode';\n\n/** What the user is typing (raw, possibly invalid). */\nexport interface Draft {\n straat: string;\n postcode: string;\n woonplaats: string;\n}\n\n/** After parsing — postcode is the branded type, so downstream can't get a raw one. */\nexport interface Valid {\n straat: string;\n postcode: Postcode;\n woonplaats: string;\n}\n\nexport type Errors = Partial>;\n\n/**\n * The change-request (adreswijziging) form as one tagged union — the SAME idiom\n * as the wizards, just single-step. `draft`/`errors` exist only while Editing;\n * Submitting/Submitted/Failed carry the parsed `Valid`. Illegal states (submitting\n * an invalid draft, a success screen with errors) are unrepresentable.\n */\nexport type State =\n | { tag: 'Editing'; draft: Draft; errors: Errors }\n | { tag: 'Submitting'; data: Valid }\n | { tag: 'Submitted'; data: Valid; referentie: string }\n | { tag: 'Failed'; data: Valid; error: string };\n\nexport const initial: State = {\n tag: 'Editing',\n draft: { straat: '', postcode: '', woonplaats: '' },\n errors: {},\n};\n\n/** Parse via the value objects; on success hand back a Valid, else per-field errors. */\nfunction validate(draft: Draft): Result {\n const straat = draft.straat.trim();\n const postcode = parsePostcode(draft.postcode);\n const errors: Errors = {};\n if (!straat) errors.straat = $localize`:@@validation.straat:Vul straat en huisnummer in.`;\n if (!postcode.ok) errors.postcode = postcode.error;\n if (straat && postcode.ok) {\n return { ok: true, value: { straat, postcode: postcode.value, woonplaats: draft.woonplaats.trim() } };\n }\n return { ok: false, error: errors };\n}\n\nexport type Msg =\n | { tag: 'SetField'; key: keyof Draft; value: string }\n | { tag: 'Submit' }\n | { tag: 'Retry' }\n | { tag: 'SubmitConfirmed'; referentie: string }\n | { tag: 'SubmitFailed'; error: string }\n | { tag: 'Reset' }\n | { tag: 'Seed'; state: State }; // mount a specific state (stories/tests)\n\nexport function reduce(s: State, m: Msg): State {\n switch (m.tag) {\n case 'SetField':\n return s.tag === 'Editing' ? { ...s, draft: { ...s.draft, [m.key]: m.value } } : s;\n case 'Submit': {\n if (s.tag !== 'Editing') return s;\n const r = validate(s.draft);\n return r.ok ? { tag: 'Submitting', data: r.value } : { ...s, errors: r.error };\n }\n case 'Retry':\n return s.tag === 'Failed' ? { tag: 'Submitting', data: s.data } : s;\n case 'SubmitConfirmed':\n return s.tag === 'Submitting' ? { tag: 'Submitted', data: s.data, referentie: m.referentie } : s;\n case 'SubmitFailed':\n return s.tag === 'Submitting' ? { tag: 'Failed', data: s.data, error: m.error } : s;\n case 'Reset':\n return initial;\n case 'Seed':\n return m.state;\n default:\n return assertNever(m);\n }\n}\n", + "sourceCode": "import { Result, assertNever } from '@shared/kernel/fp';\nimport { Postcode, parsePostcode } from '@registratie/domain/value-objects/postcode';\n\n/** What the user is typing (raw, possibly invalid). */\nexport interface Draft {\n straat: string;\n postcode: string;\n woonplaats: string;\n}\n\n/** After parsing — postcode is the branded type, so downstream can't get a raw one. */\nexport interface Valid {\n straat: string;\n postcode: Postcode;\n woonplaats: string;\n}\n\nexport type Errors = Partial>;\n\n/**\n * The change-request (adreswijziging) form as one tagged union — the SAME idiom\n * as the wizards, just single-step. `draft`/`errors` exist only while Editing;\n * Submitting/Submitted/Failed carry the parsed `Valid`. Illegal states (submitting\n * an invalid draft, a success screen with errors) are unrepresentable.\n */\nexport type State =\n | { tag: 'Editing'; draft: Draft; errors: Errors }\n | { tag: 'Submitting'; data: Valid }\n | { tag: 'Submitted'; data: Valid; referentie: string }\n | { tag: 'Failed'; data: Valid; error: string };\n\nexport const initial: State = {\n tag: 'Editing',\n draft: { straat: '', postcode: '', woonplaats: '' },\n errors: {},\n};\n\n/** Parse via the value objects; on success hand back a Valid, else per-field errors. */\nfunction validate(draft: Draft): Result {\n const straat = draft.straat.trim();\n const postcode = parsePostcode(draft.postcode);\n const errors: Errors = {};\n if (!straat) errors.straat = $localize`:@@validation.straat:Vul straat en huisnummer in.`;\n if (!postcode.ok) errors.postcode = postcode.error;\n if (straat && postcode.ok) {\n return {\n ok: true,\n value: { straat, postcode: postcode.value, woonplaats: draft.woonplaats.trim() },\n };\n }\n return { ok: false, error: errors };\n}\n\nexport type Msg =\n | { tag: 'SetField'; key: keyof Draft; value: string }\n | { tag: 'Submit' }\n | { tag: 'Retry' }\n | { tag: 'SubmitConfirmed'; referentie: string }\n | { tag: 'SubmitFailed'; error: string }\n | { tag: 'Reset' }\n | { tag: 'Seed'; state: State }; // mount a specific state (stories/tests)\n\nexport function reduce(s: State, m: Msg): State {\n switch (m.tag) {\n case 'SetField':\n return s.tag === 'Editing' ? { ...s, draft: { ...s.draft, [m.key]: m.value } } : s;\n case 'Submit': {\n if (s.tag !== 'Editing') return s;\n const r = validate(s.draft);\n return r.ok ? { tag: 'Submitting', data: r.value } : { ...s, errors: r.error };\n }\n case 'Retry':\n return s.tag === 'Failed' ? { tag: 'Submitting', data: s.data } : s;\n case 'SubmitConfirmed':\n return s.tag === 'Submitting'\n ? { tag: 'Submitted', data: s.data, referentie: m.referentie }\n : s;\n case 'SubmitFailed':\n return s.tag === 'Submitting' ? { tag: 'Failed', data: s.data, error: m.error } : s;\n case 'Reset':\n return initial;\n case 'Seed':\n return m.state;\n default:\n return assertNever(m);\n }\n}\n", "properties": [ { "name": "postcode", @@ -1978,16 +2172,19 @@ "description": "

What the user is typing (raw, possibly invalid).

\n", "rawdescription": "\nWhat the user is typing (raw, possibly invalid).", "methods": [], - "extends": [] + "extends": [], + "isDuplicate": true, + "duplicateId": 1, + "duplicateName": "Draft-1" }, { "name": "Draft", - "id": "interface-Draft-b7c3c5d493aa141ca68cb964e63408db7152b07336b239864d3c430b84d8eb3e650d1a3abaf3fda253444af942c45f86138a5d8229832d49bda94eec35c33546-1", + "id": "interface-Draft-9669bb22f8d4cc591a3bd64d9fc83275b70ad9e7275d59b4d1d394db7252e8820908b20c593f0b3a16c415c40ad1232ed7d04ba684d0dee9d72bc1ae820d06b6-2", "file": "src/app/registratie/domain/registratie-wizard.machine.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "import { Result, ok, err, assertNever } from '@shared/kernel/fp';\nimport { Postcode, parsePostcode } from '@registratie/domain/value-objects/postcode';\nimport { Email, parseEmail } from '@registratie/domain/value-objects/email';\nimport {\n UploadState,\n UploadMsg,\n DeliveryChannel,\n initialUpload,\n reduceUpload,\n requiredCategoriesSatisfied,\n deliveryRefs,\n} from '@shared/upload/upload.machine';\n\n/**\n * A FIXED 3-step registration wizard. The steps never change in number (always\n * `STEPS`): (1) adres + correspondentievoorkeur, (2) beroep o.b.v. diploma,\n * (3) controle & indienen. Follow-up questions appear *inline within a step*\n * (e.g. choosing 'email' reveals the e-mail field). \"Is this field required\n * right now\" is a pure function (`validateStep`), so it is trivial to test and\n * impossible to get out of sync with the data. Invariants live here, not in the\n * UI: the wizard reaches `Indienen` only when a complete `ValidRegistratie` parses.\n */\n\nexport type StepId = 'adres' | 'beroep' | 'controle';\n\n/** The fixed step list. Number of steps never changes; questions reveal inline. */\nexport const STEPS: StepId[] = ['adres', 'beroep', 'controle'];\n\n/** Where a piece of data came from — recorded on the aggregate (PRD §5). */\nexport type AdresHerkomst = 'brp' | 'handmatig';\nexport type DiplomaHerkomst = 'duo' | 'handmatig';\nexport type Correspondentie = 'email' | 'post';\n\n/** One record carried across every step (and persisted). All optional: the user\n fills it in gradually. Adres fields are kept flat so one `SetField` message\n serves them all (mirrors the intake machine). */\nexport interface Draft {\n straat?: string;\n postcode?: string;\n woonplaats?: string;\n adresHerkomst?: AdresHerkomst;\n correspondentie?: Correspondentie;\n email?: string;\n diplomaId?: string;\n diplomaHerkomst?: DiplomaHerkomst;\n beroep?: string; // DERIVED from the chosen DUO diploma (or declared for a manual one)\n vraagIds?: string[]; // ids of the policy questions that apply to the chosen diploma\n antwoorden: Record; // geldigheidsantwoorden, keyed by question id\n}\n\n/** What we have after the controle step parses — guaranteed valid/typed. */\nexport interface ValidRegistratie {\n adres: { straat: string; postcode: Postcode; woonplaats: string };\n adresHerkomst: AdresHerkomst;\n correspondentie: Correspondentie;\n email?: Email; // only when correspondentie === 'email'\n diplomaId: string;\n diplomaHerkomst: DiplomaHerkomst;\n beroep: string;\n antwoorden: Record;\n documents: Array<{ categoryId: string; channel: DeliveryChannel; documentId?: string }>;\n}\n\n/** Text fields settable via SetField. */\nexport type DraftField = 'straat' | 'postcode' | 'woonplaats' | 'email';\n\n/** Per-field error map. `antwoorden` holds per-policy-question errors, keyed by\n question id (a step can show several questions). */\nexport interface Errors {\n straat?: string;\n postcode?: string;\n woonplaats?: string;\n email?: string;\n correspondentie?: string;\n diploma?: string;\n documenten?: string;\n antwoorden?: Record;\n}\n\nexport type RegistratieState =\n | { tag: 'Invullen'; draft: Draft; cursor: number; errors: Errors; upload: UploadState }\n | { tag: 'Indienen'; data: ValidRegistratie }\n | { tag: 'Ingediend'; data: ValidRegistratie; referentie: string }\n | { tag: 'Mislukt'; data: ValidRegistratie; error: string };\n\nconst emptyDraft: Draft = { antwoorden: {} };\nexport const initial: RegistratieState = { tag: 'Invullen', draft: emptyDraft, cursor: 0, errors: {}, upload: initialUpload };\n\n/** Which step the cursor currently points at (clamped to the fixed list). */\nexport function currentStep(s: Extract): StepId {\n return STEPS[Math.min(s.cursor, STEPS.length - 1)];\n}\n\n/** Has the user meaningfully started, so it's worth persisting as a Concept? Excludes\n the automatic BRP address prefill on step 0 — a bare page visit creates nothing.\n ponytail: an address typed at step 0 without any of these signals is not yet\n persisted (created once they advance/choose); accepted regression vs. sessionStorage. */\nexport function hasProgress(s: Extract): boolean {\n const d = s.draft;\n return (\n s.cursor > 0 ||\n !!d.correspondentie ||\n !!d.email ||\n !!d.diplomaId ||\n !!d.beroep ||\n deliveryRefs(s.upload).some((r) => r.channel === 'digital' && !!r.documentId)\n );\n}\n\n/** Validate every question currently visible in ONE step. Errors keyed per field. */\nfunction validateStep(step: StepId, d: Draft, upload: UploadState): Result {\n const errors: Errors = {};\n switch (step) {\n case 'adres': {\n if (!d.straat || d.straat.trim() === '') errors.straat = $localize`:@@validation.straat2:Vul een straat en huisnummer in.`;\n const pc = parsePostcode(d.postcode ?? '');\n if (!pc.ok) errors.postcode = pc.error;\n if (!d.woonplaats || d.woonplaats.trim() === '') errors.woonplaats = $localize`:@@validation.woonplaats:Vul een woonplaats in.`;\n if (!d.correspondentie) errors.correspondentie = $localize`:@@validation.maakKeuze:Maak een keuze.`;\n // E-mail is only required when 'email' is the chosen channel.\n if (d.correspondentie === 'email') {\n const e = parseEmail(d.email ?? '');\n if (!e.ok) errors.email = e.error;\n }\n break;\n }\n case 'beroep': {\n // A diploma must be chosen (or declared manually); its beroep is then known.\n if (!d.diplomaId || !d.beroep) {\n errors.diploma = $localize`:@@validation.diploma:Kies het diploma waarmee u zich wilt registreren, of voer het handmatig in.`;\n break;\n }\n // Every policy question the chosen diploma raised must be answered. Which\n // questions apply is server-decided (carried in `vraagIds`); we only check\n // they're answered.\n const open: Record = {};\n for (const id of d.vraagIds ?? []) {\n if (!(d.antwoorden[id] ?? '').trim()) open[id] = $localize`:@@validation.beantwoordVraag:Beantwoord deze vraag.`;\n }\n if (Object.keys(open).length > 0) errors.antwoorden = open;\n // Required documents for this wizard attach to the beroep step (inline upload).\n if (!requiredCategoriesSatisfied(upload)) {\n errors.documenten = $localize`:@@validation.documenten:Lever de verplichte documenten aan (upload of kies \"per post nasturen\").`;\n }\n break;\n }\n case 'controle':\n break; // controle shows a summary; no own fields\n default:\n return assertNever(step);\n }\n return Object.keys(errors).length > 0 ? err(errors) : ok(undefined);\n}\n\n/** Parse the whole wizard into a ValidRegistratie (called on submit). */\nfunction validateAll(d: Draft, upload: UploadState): Result {\n const errors: Errors = {};\n for (const step of STEPS) {\n const r = validateStep(step, d, upload);\n if (!r.ok) Object.assign(errors, r.error);\n }\n if (Object.keys(errors).length > 0) return err(errors);\n\n const pc = parsePostcode(d.postcode ?? '');\n // validateStep guaranteed these parse, but keep the compiler happy.\n if (!pc.ok || !d.diplomaId || !d.beroep || !d.correspondentie) return err(errors);\n const email = d.correspondentie === 'email' ? parseEmail(d.email ?? '') : undefined;\n // Keep only the answers to the questions that actually applied.\n const vraagIds = d.vraagIds ?? [];\n const antwoorden = Object.fromEntries(vraagIds.map((id) => [id, d.antwoorden[id] ?? '']));\n\n return ok({\n adres: { straat: d.straat!, postcode: pc.value, woonplaats: d.woonplaats! },\n adresHerkomst: d.adresHerkomst ?? 'handmatig',\n correspondentie: d.correspondentie,\n email: email?.ok ? email.value : undefined,\n diplomaId: d.diplomaId,\n diplomaHerkomst: d.diplomaHerkomst ?? 'handmatig',\n beroep: d.beroep,\n antwoorden,\n documents: deliveryRefs(upload),\n });\n}\n\nexport function setField(s: RegistratieState, key: DraftField, value: string): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n const draft: Draft = { ...s.draft, [key]: value };\n // Editing an address field means the user owns it now — not the BRP copy.\n if (key === 'straat' || key === 'postcode' || key === 'woonplaats') draft.adresHerkomst = 'handmatig';\n return { ...s, draft };\n}\n\nexport function setCorrespondentie(s: RegistratieState, value: Correspondentie): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n return { ...s, draft: { ...s.draft, correspondentie: value } };\n}\n\n/** Prefill the address from a BRP lookup and flag its origin (PRD §7). */\nexport function prefillAdres(s: RegistratieState, straat: string, postcode: string, woonplaats: string): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n return { ...s, draft: { ...s.draft, straat, postcode, woonplaats, adresHerkomst: 'brp' } };\n}\n\n/** Pick a DUO diploma; the beroep is derived from it and the applicable policy\n questions (`vraagIds`) come with it (both server-computed, passed in). */\nexport function kiesDiploma(s: RegistratieState, diplomaId: string, beroep: string, vraagIds: string[]): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n return { ...s, draft: { ...s.draft, diplomaId, beroep, vraagIds, diplomaHerkomst: 'duo' }, errors: {} };\n}\n\n/** Switch to manual diploma entry: the diploma isn't in DUO, so the MAXIMAL\n policy-question set applies and the entry is flagged handmatig/unverified. The\n beroep is declared separately (declareerBeroep). */\nexport function kiesHandmatig(s: RegistratieState, vraagIds: string[]): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n return { ...s, draft: { ...s.draft, diplomaId: 'handmatig', beroep: undefined, vraagIds, diplomaHerkomst: 'handmatig' }, errors: {} };\n}\n\n/** Declare the beroep for a manually-entered diploma (chosen from a fixed list). */\nexport function declareerBeroep(s: RegistratieState, beroep: string): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n return { ...s, draft: { ...s.draft, beroep } };\n}\n\nexport function setAntwoord(s: RegistratieState, vraagId: string, value: string): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n return { ...s, draft: { ...s.draft, antwoorden: { ...s.draft.antwoorden, [vraagId]: value } } };\n}\n\nexport function next(s: RegistratieState): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n const r = validateStep(currentStep(s), s.draft, s.upload);\n if (!r.ok) return { ...s, errors: r.error };\n return { ...s, cursor: Math.min(s.cursor + 1, STEPS.length - 1), errors: {} };\n}\n\nexport function back(s: RegistratieState): RegistratieState {\n if (s.tag !== 'Invullen' || s.cursor === 0) return s;\n return { ...s, cursor: s.cursor - 1, errors: {} };\n}\n\n/** Jump back to an earlier step to correct data (controle → step N). Forward\n jumps are not allowed (would skip validation). Preserves the draft. */\nexport function gaNaarStap(s: RegistratieState, cursor: number): RegistratieState {\n if (s.tag !== 'Invullen' || cursor < 0 || cursor >= s.cursor) return s;\n return { ...s, cursor, errors: {} };\n}\n\nexport function submit(s: RegistratieState): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n const r = validateAll(s.draft, s.upload);\n return r.ok ? { tag: 'Indienen', data: r.value } : { ...s, errors: r.error };\n}\n\n/** Route an upload sub-message through the pure upload reducer (Invullen only). */\nexport function upload(s: RegistratieState, msg: UploadMsg): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n return { ...s, upload: reduceUpload(s.upload, msg) };\n}\n\nexport function resolve(s: RegistratieState, r: Result): RegistratieState {\n if (s.tag !== 'Indienen') return s;\n return r.ok ? { tag: 'Ingediend', data: s.data, referentie: r.value } : { tag: 'Mislukt', data: s.data, error: r.error };\n}\n\nexport type RegistratieMsg =\n | { tag: 'SetField'; key: DraftField; value: string }\n | { tag: 'SetCorrespondentie'; value: Correspondentie }\n | { tag: 'PrefillAdres'; straat: string; postcode: string; woonplaats: string }\n | { tag: 'KiesDiploma'; diplomaId: string; beroep: string; vraagIds: string[] }\n | { tag: 'KiesHandmatig'; vraagIds: string[] }\n | { tag: 'DeclareerBeroep'; beroep: string }\n | { tag: 'SetAntwoord'; vraagId: string; value: string }\n | { tag: 'Next' }\n | { tag: 'Back' }\n | { tag: 'GaNaarStap'; cursor: number }\n | { tag: 'Submit' }\n | { tag: 'Retry' }\n | { tag: 'SubmitConfirmed'; referentie: string }\n | { tag: 'SubmitFailed'; error: string }\n | { tag: 'Upload'; msg: UploadMsg }\n | { tag: 'Seed'; state: RegistratieState };\n\nexport function reduce(s: RegistratieState, m: RegistratieMsg): RegistratieState {\n switch (m.tag) {\n case 'SetField':\n return setField(s, m.key, m.value);\n case 'SetCorrespondentie':\n return setCorrespondentie(s, m.value);\n case 'PrefillAdres':\n return prefillAdres(s, m.straat, m.postcode, m.woonplaats);\n case 'KiesDiploma':\n return kiesDiploma(s, m.diplomaId, m.beroep, m.vraagIds);\n case 'KiesHandmatig':\n return kiesHandmatig(s, m.vraagIds);\n case 'DeclareerBeroep':\n return declareerBeroep(s, m.beroep);\n case 'SetAntwoord':\n return setAntwoord(s, m.vraagId, m.value);\n case 'Next':\n return next(s);\n case 'Back':\n return back(s);\n case 'GaNaarStap':\n return gaNaarStap(s, m.cursor);\n case 'Submit':\n return submit(s);\n case 'Retry':\n return s.tag === 'Mislukt' ? { tag: 'Indienen', data: s.data } : s;\n case 'SubmitConfirmed':\n return s.tag === 'Indienen' ? { tag: 'Ingediend', data: s.data, referentie: m.referentie } : s;\n case 'SubmitFailed':\n return s.tag === 'Indienen' ? { tag: 'Mislukt', data: s.data, error: m.error } : s;\n case 'Upload':\n return upload(s, m.msg);\n case 'Seed':\n return m.state;\n default:\n return assertNever(m);\n }\n}\n", + "sourceCode": "import { Result, ok, err, assertNever } from '@shared/kernel/fp';\nimport { Postcode, parsePostcode } from '@registratie/domain/value-objects/postcode';\nimport { Email, parseEmail } from '@registratie/domain/value-objects/email';\nimport {\n UploadState,\n UploadMsg,\n DeliveryChannel,\n initialUpload,\n reduceUpload,\n requiredCategoriesSatisfied,\n deliveryRefs,\n} from '@shared/upload/upload.machine';\n\n/**\n * A FIXED 3-step registration wizard. The steps never change in number (always\n * `STEPS`): (1) adres + correspondentievoorkeur, (2) beroep o.b.v. diploma,\n * (3) controle & indienen. Follow-up questions appear *inline within a step*\n * (e.g. choosing 'email' reveals the e-mail field). \"Is this field required\n * right now\" is a pure function (`validateStep`), so it is trivial to test and\n * impossible to get out of sync with the data. Invariants live here, not in the\n * UI: the wizard reaches `Indienen` only when a complete `ValidRegistratie` parses.\n */\n\nexport type StepId = 'adres' | 'beroep' | 'controle';\n\n/** The fixed step list. Number of steps never changes; questions reveal inline. */\nexport const STEPS: StepId[] = ['adres', 'beroep', 'controle'];\n\n/** Where a piece of data came from — recorded on the aggregate (PRD §5). */\nexport type AdresHerkomst = 'brp' | 'handmatig';\nexport type DiplomaHerkomst = 'duo' | 'handmatig';\nexport type Correspondentie = 'email' | 'post';\n\n/** One record carried across every step (and persisted). All optional: the user\n fills it in gradually. Adres fields are kept flat so one `SetField` message\n serves them all (mirrors the intake machine). */\nexport interface Draft {\n straat?: string;\n postcode?: string;\n woonplaats?: string;\n adresHerkomst?: AdresHerkomst;\n correspondentie?: Correspondentie;\n email?: string;\n diplomaId?: string;\n diplomaHerkomst?: DiplomaHerkomst;\n beroep?: string; // DERIVED from the chosen DUO diploma (or declared for a manual one)\n vraagIds?: string[]; // ids of the policy questions that apply to the chosen diploma\n antwoorden: Record; // geldigheidsantwoorden, keyed by question id\n}\n\n/** What we have after the controle step parses — guaranteed valid/typed. */\nexport interface ValidRegistratie {\n adres: { straat: string; postcode: Postcode; woonplaats: string };\n adresHerkomst: AdresHerkomst;\n correspondentie: Correspondentie;\n email?: Email; // only when correspondentie === 'email'\n diplomaId: string;\n diplomaHerkomst: DiplomaHerkomst;\n beroep: string;\n antwoorden: Record;\n documents: Array<{ categoryId: string; channel: DeliveryChannel; documentId?: string }>;\n}\n\n/** Text fields settable via SetField. */\nexport type DraftField = 'straat' | 'postcode' | 'woonplaats' | 'email';\n\n/** Per-field error map. `antwoorden` holds per-policy-question errors, keyed by\n question id (a step can show several questions). */\nexport interface Errors {\n straat?: string;\n postcode?: string;\n woonplaats?: string;\n email?: string;\n correspondentie?: string;\n diploma?: string;\n documenten?: string;\n antwoorden?: Record;\n}\n\nexport type RegistratieState =\n | { tag: 'Invullen'; draft: Draft; cursor: number; errors: Errors; upload: UploadState }\n | { tag: 'Indienen'; data: ValidRegistratie }\n | { tag: 'Ingediend'; data: ValidRegistratie; referentie: string }\n | { tag: 'Mislukt'; data: ValidRegistratie; error: string };\n\nconst emptyDraft: Draft = { antwoorden: {} };\nexport const initial: RegistratieState = {\n tag: 'Invullen',\n draft: emptyDraft,\n cursor: 0,\n errors: {},\n upload: initialUpload,\n};\n\n/** Which step the cursor currently points at (clamped to the fixed list). */\nexport function currentStep(s: Extract): StepId {\n return STEPS[Math.min(s.cursor, STEPS.length - 1)];\n}\n\n/** Has the user meaningfully started, so it's worth persisting as a Concept? Excludes\n the automatic BRP address prefill on step 0 — a bare page visit creates nothing.\n ponytail: an address typed at step 0 without any of these signals is not yet\n persisted (created once they advance/choose); accepted regression vs. sessionStorage. */\nexport function hasProgress(s: Extract): boolean {\n const d = s.draft;\n return (\n s.cursor > 0 ||\n !!d.correspondentie ||\n !!d.email ||\n !!d.diplomaId ||\n !!d.beroep ||\n deliveryRefs(s.upload).some((r) => r.channel === 'digital' && !!r.documentId)\n );\n}\n\n/** Validate every question currently visible in ONE step. Errors keyed per field. */\nfunction validateStep(step: StepId, d: Draft, upload: UploadState): Result {\n const errors: Errors = {};\n switch (step) {\n case 'adres': {\n if (!d.straat || d.straat.trim() === '')\n errors.straat = $localize`:@@validation.straat2:Vul een straat en huisnummer in.`;\n const pc = parsePostcode(d.postcode ?? '');\n if (!pc.ok) errors.postcode = pc.error;\n if (!d.woonplaats || d.woonplaats.trim() === '')\n errors.woonplaats = $localize`:@@validation.woonplaats:Vul een woonplaats in.`;\n if (!d.correspondentie)\n errors.correspondentie = $localize`:@@validation.maakKeuze:Maak een keuze.`;\n // E-mail is only required when 'email' is the chosen channel.\n if (d.correspondentie === 'email') {\n const e = parseEmail(d.email ?? '');\n if (!e.ok) errors.email = e.error;\n }\n break;\n }\n case 'beroep': {\n // A diploma must be chosen (or declared manually); its beroep is then known.\n if (!d.diplomaId || !d.beroep) {\n errors.diploma = $localize`:@@validation.diploma:Kies het diploma waarmee u zich wilt registreren, of voer het handmatig in.`;\n break;\n }\n // Every policy question the chosen diploma raised must be answered. Which\n // questions apply is server-decided (carried in `vraagIds`); we only check\n // they're answered.\n const open: Record = {};\n for (const id of d.vraagIds ?? []) {\n if (!(d.antwoorden[id] ?? '').trim())\n open[id] = $localize`:@@validation.beantwoordVraag:Beantwoord deze vraag.`;\n }\n if (Object.keys(open).length > 0) errors.antwoorden = open;\n // Required documents for this wizard attach to the beroep step (inline upload).\n if (!requiredCategoriesSatisfied(upload)) {\n errors.documenten = $localize`:@@validation.documenten:Lever de verplichte documenten aan (upload of kies \"per post nasturen\").`;\n }\n break;\n }\n case 'controle':\n break; // controle shows a summary; no own fields\n default:\n return assertNever(step);\n }\n return Object.keys(errors).length > 0 ? err(errors) : ok(undefined);\n}\n\n/** Parse the whole wizard into a ValidRegistratie (called on submit). */\nfunction validateAll(d: Draft, upload: UploadState): Result {\n const errors: Errors = {};\n for (const step of STEPS) {\n const r = validateStep(step, d, upload);\n if (!r.ok) Object.assign(errors, r.error);\n }\n if (Object.keys(errors).length > 0) return err(errors);\n\n const pc = parsePostcode(d.postcode ?? '');\n // validateStep guaranteed these parse, but keep the compiler happy.\n if (!pc.ok || !d.diplomaId || !d.beroep || !d.correspondentie) return err(errors);\n const email = d.correspondentie === 'email' ? parseEmail(d.email ?? '') : undefined;\n // Keep only the answers to the questions that actually applied.\n const vraagIds = d.vraagIds ?? [];\n const antwoorden = Object.fromEntries(vraagIds.map((id) => [id, d.antwoorden[id] ?? '']));\n\n return ok({\n adres: { straat: d.straat!, postcode: pc.value, woonplaats: d.woonplaats! },\n adresHerkomst: d.adresHerkomst ?? 'handmatig',\n correspondentie: d.correspondentie,\n email: email?.ok ? email.value : undefined,\n diplomaId: d.diplomaId,\n diplomaHerkomst: d.diplomaHerkomst ?? 'handmatig',\n beroep: d.beroep,\n antwoorden,\n documents: deliveryRefs(upload),\n });\n}\n\nexport function setField(s: RegistratieState, key: DraftField, value: string): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n const draft: Draft = { ...s.draft, [key]: value };\n // Editing an address field means the user owns it now — not the BRP copy.\n if (key === 'straat' || key === 'postcode' || key === 'woonplaats')\n draft.adresHerkomst = 'handmatig';\n return { ...s, draft };\n}\n\nexport function setCorrespondentie(s: RegistratieState, value: Correspondentie): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n return { ...s, draft: { ...s.draft, correspondentie: value } };\n}\n\n/** Prefill the address from a BRP lookup and flag its origin (PRD §7). */\nexport function prefillAdres(\n s: RegistratieState,\n straat: string,\n postcode: string,\n woonplaats: string,\n): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n return { ...s, draft: { ...s.draft, straat, postcode, woonplaats, adresHerkomst: 'brp' } };\n}\n\n/** Pick a DUO diploma; the beroep is derived from it and the applicable policy\n questions (`vraagIds`) come with it (both server-computed, passed in). */\nexport function kiesDiploma(\n s: RegistratieState,\n diplomaId: string,\n beroep: string,\n vraagIds: string[],\n): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n return {\n ...s,\n draft: { ...s.draft, diplomaId, beroep, vraagIds, diplomaHerkomst: 'duo' },\n errors: {},\n };\n}\n\n/** Switch to manual diploma entry: the diploma isn't in DUO, so the MAXIMAL\n policy-question set applies and the entry is flagged handmatig/unverified. The\n beroep is declared separately (declareerBeroep). */\nexport function kiesHandmatig(s: RegistratieState, vraagIds: string[]): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n return {\n ...s,\n draft: {\n ...s.draft,\n diplomaId: 'handmatig',\n beroep: undefined,\n vraagIds,\n diplomaHerkomst: 'handmatig',\n },\n errors: {},\n };\n}\n\n/** Declare the beroep for a manually-entered diploma (chosen from a fixed list). */\nexport function declareerBeroep(s: RegistratieState, beroep: string): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n return { ...s, draft: { ...s.draft, beroep } };\n}\n\nexport function setAntwoord(s: RegistratieState, vraagId: string, value: string): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n return { ...s, draft: { ...s.draft, antwoorden: { ...s.draft.antwoorden, [vraagId]: value } } };\n}\n\nexport function next(s: RegistratieState): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n const r = validateStep(currentStep(s), s.draft, s.upload);\n if (!r.ok) return { ...s, errors: r.error };\n return { ...s, cursor: Math.min(s.cursor + 1, STEPS.length - 1), errors: {} };\n}\n\nexport function back(s: RegistratieState): RegistratieState {\n if (s.tag !== 'Invullen' || s.cursor === 0) return s;\n return { ...s, cursor: s.cursor - 1, errors: {} };\n}\n\n/** Jump back to an earlier step to correct data (controle → step N). Forward\n jumps are not allowed (would skip validation). Preserves the draft. */\nexport function gaNaarStap(s: RegistratieState, cursor: number): RegistratieState {\n if (s.tag !== 'Invullen' || cursor < 0 || cursor >= s.cursor) return s;\n return { ...s, cursor, errors: {} };\n}\n\nexport function submit(s: RegistratieState): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n const r = validateAll(s.draft, s.upload);\n return r.ok ? { tag: 'Indienen', data: r.value } : { ...s, errors: r.error };\n}\n\n/** Route an upload sub-message through the pure upload reducer (Invullen only). */\nexport function upload(s: RegistratieState, msg: UploadMsg): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n return { ...s, upload: reduceUpload(s.upload, msg) };\n}\n\nexport function resolve(s: RegistratieState, r: Result): RegistratieState {\n if (s.tag !== 'Indienen') return s;\n return r.ok\n ? { tag: 'Ingediend', data: s.data, referentie: r.value }\n : { tag: 'Mislukt', data: s.data, error: r.error };\n}\n\nexport type RegistratieMsg =\n | { tag: 'SetField'; key: DraftField; value: string }\n | { tag: 'SetCorrespondentie'; value: Correspondentie }\n | { tag: 'PrefillAdres'; straat: string; postcode: string; woonplaats: string }\n | { tag: 'KiesDiploma'; diplomaId: string; beroep: string; vraagIds: string[] }\n | { tag: 'KiesHandmatig'; vraagIds: string[] }\n | { tag: 'DeclareerBeroep'; beroep: string }\n | { tag: 'SetAntwoord'; vraagId: string; value: string }\n | { tag: 'Next' }\n | { tag: 'Back' }\n | { tag: 'GaNaarStap'; cursor: number }\n | { tag: 'Submit' }\n | { tag: 'Retry' }\n | { tag: 'SubmitConfirmed'; referentie: string }\n | { tag: 'SubmitFailed'; error: string }\n | { tag: 'Upload'; msg: UploadMsg }\n | { tag: 'Seed'; state: RegistratieState };\n\nexport function reduce(s: RegistratieState, m: RegistratieMsg): RegistratieState {\n switch (m.tag) {\n case 'SetField':\n return setField(s, m.key, m.value);\n case 'SetCorrespondentie':\n return setCorrespondentie(s, m.value);\n case 'PrefillAdres':\n return prefillAdres(s, m.straat, m.postcode, m.woonplaats);\n case 'KiesDiploma':\n return kiesDiploma(s, m.diplomaId, m.beroep, m.vraagIds);\n case 'KiesHandmatig':\n return kiesHandmatig(s, m.vraagIds);\n case 'DeclareerBeroep':\n return declareerBeroep(s, m.beroep);\n case 'SetAntwoord':\n return setAntwoord(s, m.vraagId, m.value);\n case 'Next':\n return next(s);\n case 'Back':\n return back(s);\n case 'GaNaarStap':\n return gaNaarStap(s, m.cursor);\n case 'Submit':\n return submit(s);\n case 'Retry':\n return s.tag === 'Mislukt' ? { tag: 'Indienen', data: s.data } : s;\n case 'SubmitConfirmed':\n return s.tag === 'Indienen'\n ? { tag: 'Ingediend', data: s.data, referentie: m.referentie }\n : s;\n case 'SubmitFailed':\n return s.tag === 'Indienen' ? { tag: 'Mislukt', data: s.data, error: m.error } : s;\n case 'Upload':\n return upload(s, m.msg);\n case 'Seed':\n return m.state;\n default:\n return assertNever(m);\n }\n}\n", "properties": [ { "name": "adresHerkomst", @@ -2107,67 +2304,17 @@ "methods": [], "extends": [], "isDuplicate": true, - "duplicateId": 1, - "duplicateName": "Draft-1" - }, - { - "name": "Draft", - "id": "interface-Draft-f2c910e7845c4a1e95cc75170624db8664de0937455edc1bf8423b6389c310b7ef9ea149dc07ea49f0a4ecad039dbaf09b226864660b29dce075e717125dab0d-2", - "file": "src/app/herregistratie/domain/herregistratie.machine.ts", - "deprecated": false, - "deprecationMessage": "", - "type": "interface", - "sourceCode": "import { Result, assertNever } from '@shared/kernel/fp';\nimport { Uren, parseUren } from '@registratie/domain/value-objects/uren';\nimport {\n UploadState,\n UploadMsg,\n initialUpload,\n reduceUpload,\n requiredCategoriesSatisfied,\n deliveryRefs,\n} from '@shared/upload/upload.machine';\n\n/** What the user is typing (raw, possibly invalid). */\nexport interface Draft {\n uren: string;\n jaren: string;\n punten: string;\n}\n\nexport type StepErrors = Partial>;\n\n/** What we have AFTER parsing — branded/typed, guaranteed valid. */\nexport interface Valid {\n uren: Uren;\n jaren: number;\n punten: number;\n documents: Array<{ categoryId: string; channel: 'digital' | 'post'; documentId?: string }>;\n}\n\n/**\n * The whole wizard as one tagged union. `step` and `errors` exist ONLY while\n * Editing; Submitting/Submitted/Failed carry a `Valid` payload and nothing else.\n * So \"submitting while a field is invalid\" or \"showing the success screen with\n * errors set\" are unrepresentable — the bug class is gone by construction.\n */\nexport type WizardState =\n | { tag: 'Editing'; step: 1 | 2 | 3; draft: Draft; errors: StepErrors; upload: UploadState }\n | { tag: 'Submitting'; data: Valid }\n | { tag: 'Submitted'; data: Valid }\n | { tag: 'Failed'; data: Valid; error: string };\n\nexport const initial: WizardState = { tag: 'Editing', step: 1, draft: { uren: '', jaren: '', punten: '' }, errors: {}, upload: initialUpload };\n\n/** Has the user meaningfully started, so it's worth persisting as a Concept? */\nexport function hasProgress(s: Extract): boolean {\n return s.step > 1 || !!s.draft.uren || !!s.draft.jaren || !!s.draft.punten || deliveryRefs(s.upload).some((r) => r.channel === 'digital' && !!r.documentId);\n}\n\n/** Parse every field; on success hand back a Valid, else the per-field errors. */\nfunction validate(draft: Draft, upload: UploadState): Result {\n const uren = parseUren(draft.uren);\n const jaren = parseUren(draft.jaren);\n const punten = parseUren(draft.punten);\n const errors: StepErrors = {};\n if (!uren.ok) errors.uren = uren.error;\n if (!jaren.ok) errors.jaren = jaren.error;\n if (!punten.ok) errors.punten = punten.error;\n if (!requiredCategoriesSatisfied(upload)) {\n errors.documenten = $localize`:@@validation.documenten:Lever de verplichte documenten aan (upload of kies \"per post nasturen\").`;\n }\n if (uren.ok && jaren.ok && punten.ok && !errors.documenten) {\n return { ok: true, value: { uren: uren.value, jaren: jaren.value, punten: punten.value, documents: deliveryRefs(upload) } };\n }\n return { ok: false, error: errors };\n}\n\n/** Advance one step, gating on that step's fields. Illegal elsewhere = no-op. */\nexport function next(s: WizardState): WizardState {\n if (s.tag !== 'Editing') return s;\n const errors: StepErrors = {};\n if (s.step === 1) {\n const uren = parseUren(s.draft.uren);\n const jaren = parseUren(s.draft.jaren);\n if (!uren.ok) errors.uren = uren.error;\n if (!jaren.ok) errors.jaren = jaren.error;\n return Object.keys(errors).length === 0 ? { ...s, step: 2, errors: {} } : { ...s, errors };\n }\n if (s.step === 2) {\n const punten = parseUren(s.draft.punten);\n if (!punten.ok) errors.punten = punten.error;\n return punten.ok ? { ...s, step: 3, errors: {} } : { ...s, errors };\n }\n return s;\n}\n\nexport function back(s: WizardState): WizardState {\n if (s.tag !== 'Editing' || s.step === 1) return s;\n return { ...s, step: (s.step - 1) as 1 | 2, errors: {} };\n}\n\n/** Jump back to an earlier step to correct data (controle → step N). Forward\n jumps are not allowed (would skip validation). */\nexport function gaNaarStap(s: WizardState, step: 1 | 2 | 3): WizardState {\n if (s.tag !== 'Editing' || step >= s.step) return s;\n return { ...s, step, errors: {} };\n}\n\n/** Step 3 submit: parse everything + require documents; Submitting only with Valid. */\nexport function submit(s: WizardState): WizardState {\n if (s.tag !== 'Editing' || s.step !== 3) return s;\n const result = validate(s.draft, s.upload);\n return result.ok ? { tag: 'Submitting', data: result.value } : { ...s, errors: result.error };\n}\n\n/** Route an upload sub-message through the pure upload reducer (Editing only). */\nexport function upload(s: WizardState, msg: UploadMsg): WizardState {\n if (s.tag !== 'Editing') return s;\n return { ...s, upload: reduceUpload(s.upload, msg) };\n}\n\n/** Resolve the async submit. Only meaningful while Submitting. */\nexport function resolve(s: WizardState, r: Result): WizardState {\n if (s.tag !== 'Submitting') return s;\n return r.ok ? { tag: 'Submitted', data: s.data } : { tag: 'Failed', data: s.data, error: r.error };\n}\n\n/** Update one draft field while editing; ignored in any other state. */\nexport function setField(s: WizardState, key: keyof Draft, value: string): WizardState {\n if (s.tag !== 'Editing') return s;\n return { ...s, draft: { ...s.draft, [key]: value } };\n}\n\n/**\n * Every event that can happen to the wizard, as one message type. The component\n * sends a WizardMsg; `reduce` decides the next state. This is the Elm\n * Model+Msg+update pattern: ONE pure function describes all state changes.\n */\nexport type WizardMsg =\n | { tag: 'SetField'; key: keyof Draft; value: string }\n | { tag: 'Next' }\n | { tag: 'Back' }\n | { tag: 'GaNaarStap'; step: 1 | 2 | 3 }\n | { tag: 'Submit' }\n | { tag: 'Retry' }\n | { tag: 'SubmitConfirmed' }\n | { tag: 'SubmitFailed'; error: string }\n | { tag: 'Upload'; msg: UploadMsg }\n | { tag: 'Seed'; state: WizardState }; // mount a specific state (stories/showcase)\n\nexport function reduce(s: WizardState, m: WizardMsg): WizardState {\n switch (m.tag) {\n case 'SetField':\n return setField(s, m.key, m.value);\n case 'Next':\n return next(s);\n case 'Back':\n return back(s);\n case 'GaNaarStap':\n return gaNaarStap(s, m.step);\n case 'Submit':\n return submit(s);\n case 'Retry':\n return s.tag === 'Failed' ? { tag: 'Submitting', data: s.data } : s;\n case 'SubmitConfirmed':\n return s.tag === 'Submitting' ? { tag: 'Submitted', data: s.data } : s;\n case 'SubmitFailed':\n return s.tag === 'Submitting' ? { tag: 'Failed', data: s.data, error: m.error } : s;\n case 'Upload':\n return upload(s, m.msg);\n case 'Seed':\n return m.state;\n default:\n return assertNever(m);\n }\n}\n", - "properties": [ - { - "name": "jaren", - "deprecated": false, - "deprecationMessage": "", - "type": "string", - "indexKey": "", - "optional": false, - "description": "", - "line": 15 - }, - { - "name": "punten", - "deprecated": false, - "deprecationMessage": "", - "type": "string", - "indexKey": "", - "optional": false, - "description": "", - "line": 16 - }, - { - "name": "uren", - "deprecated": false, - "deprecationMessage": "", - "type": "string", - "indexKey": "", - "optional": false, - "description": "", - "line": 14 - } - ], - "indexSignatures": [], - "kind": 172, - "description": "

What the user is typing (raw, possibly invalid).

\n", - "rawdescription": "\nWhat the user is typing (raw, possibly invalid).", - "methods": [], - "extends": [], - "isDuplicate": true, "duplicateId": 2, "duplicateName": "Draft-2" }, { "name": "DraftSnapshot", - "id": "interface-DraftSnapshot-e575992a23399ee78afe66c219bd8a146ede9c3330705108a5ee488100dd204c54c96e1a8e354dfcd03f8f842249ad8ee59f6bd9967431b700e9050ca058b295", + "id": "interface-DraftSnapshot-55123d51a2676aadb15e8ab015deab7e0aeadca2977e31ae5c4331659bbcf56dc907991fd0d7cfa37b9b0f227c0b360edc455991e250a23ff6655c05cf139a71", "file": "src/app/registratie/application/draft-sync.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "import { DestroyRef, effect, inject } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { Result } from '@shared/kernel/fp';\nimport { runSubmit, SUBMIT_FAILED } from '@shared/application/submit';\nimport type { SubmitApplicationRequest, SubmitApplicationResponse } from '@shared/infrastructure/api-client';\nimport { AanvraagType } from '@registratie/domain/aanvraag';\nimport { ApplicationsAdapter, parseApplications } from '@registratie/infrastructure/applications.adapter';\n\n/** What a wizard persists per step: the opaque machine snapshot + progress + docs. */\nexport interface DraftSnapshot {\n draft: unknown;\n stepIndex: number;\n stepCount: number;\n documentIds: string[];\n}\n\nexport interface DraftSyncDeps {\n type: AanvraagType;\n /** The machine snapshot while it's worth persisting; null when not (pristine/done). */\n snapshot: () => DraftSnapshot | null;\n /** Seed the machine from a resumed draft. Called at most once, on init, and ONLY\n with a real draft on a still-pristine machine — see `applyResume`. */\n onResume: (draft: unknown) => void;\n /** Draft-sync only runs in the real app — false in Storybook/tests (explicit seed). */\n enabled: () => boolean;\n}\n\nconst DEBOUNCE_MS = 600; // ponytail: fixed debounce; tune if the sync feels laggy/chatty.\n\n/**\n * The effectful glue that replaces per-wizard sessionStorage with a backend-owned\n * Concept (PRD 0001, phase D). Instantiated in a field initializer (like\n * `createStore`/`createUploadController`). Responsibilities:\n *\n * - resume: a `?aanvraag=` link wins; otherwise resume the ONE existing Concept of\n * this type (at most one per type), seeding the machine from its saved draft;\n * - create-on-first-progress: when no Concept exists, one is created lazily the first\n * time the wizard reports a non-null snapshot, and its id is stamped into the URL;\n * - debounced draft sync on every subsequent change.\n *\n * Inert without a Router (stories) or when `enabled()` is false — no network, no resume.\n */\nexport function createDraftSync(deps: DraftSyncDeps) {\n const adapter = inject(ApplicationsAdapter);\n const router = inject(Router, { optional: true });\n const route = inject(ActivatedRoute, { optional: true });\n const active = () => deps.enabled() && !!router && !!route;\n\n let id: string | undefined;\n let ensuring: Promise | undefined; // in-flight create, so we never create twice\n let timer: ReturnType | undefined;\n // Resolves once resume() has decided whether a Concept of this type already exists;\n // gates ensureId so a fast typist can't create a duplicate before that lookup lands.\n let resumeGate: Promise = Promise.resolve();\n\n const ensureId = async (): Promise => {\n await resumeGate;\n if (id) return id;\n ensuring ??= adapter.create(deps.type).then((newId) => {\n id = newId;\n // Stamp the id into the URL (no navigation) so a reload resumes this Concept.\n void router!.navigate([], { relativeTo: route!, queryParams: { aanvraag: newId }, queryParamsHandling: 'merge', replaceUrl: true });\n return newId;\n });\n return ensuring;\n };\n\n // Apply a resumed draft only when it's safe to: a late lookup must never clobber\n // progress the user already made while it was in flight, and \"start fresh\" needs no\n // dispatch (the machine already starts fresh). snapshot() is non-null once the user\n // has real progress.\n const applyResume = (draft: unknown | null) => {\n if (draft == null || deps.snapshot() != null) return;\n deps.onResume(draft);\n };\n\n const flush = async () => {\n const snap = deps.snapshot();\n if (!snap) return;\n const theId = await ensureId();\n await adapter.syncDraft(theId, { draft: snap.draft, stepIndex: snap.stepIndex, stepCount: snap.stepCount, documentIds: snap.documentIds });\n };\n\n // One effect watches the snapshot; each change resets a debounce timer. The timer's\n // callback only does network I/O (never dispatch), so it can't livelock the store.\n effect(() => {\n if (!active()) return;\n const snap = deps.snapshot(); // tracked: fires on every machine change\n if (!snap) return;\n if (timer) clearTimeout(timer);\n timer = setTimeout(() => void flush(), DEBOUNCE_MS);\n });\n\n inject(DestroyRef).onDestroy(() => timer && clearTimeout(timer));\n\n // Attach to a specific Concept id and seed the machine from its draft. A non-Concept\n // (submitted/gone) id is treated as fresh so it can't reopen as an editable draft.\n const load = (linked: string): Promise => {\n id = linked;\n return adapter\n .detail(linked)\n .then((dto) => {\n if (dto.status && dto.status.tag !== 'Concept') {\n id = undefined;\n applyResume(null);\n return;\n }\n applyResume(dto.draft ?? null);\n })\n .catch(() => {\n id = undefined;\n applyResume(null); // unknown/deleted id → start fresh\n });\n };\n\n // Find the user's existing Concept of this type (at most one), if any.\n const findConcept = async (): Promise => {\n try {\n const parsed = parseApplications(await adapter.list());\n return parsed.ok ? parsed.value.find((a) => a.type === deps.type && a.status.tag === 'Concept')?.id : undefined;\n } catch {\n return undefined;\n }\n };\n\n return {\n /** Resolve the initial state: a `?aanvraag` link wins; else resume this type's\n existing Concept; else start fresh (a Concept is created on first progress). */\n async resume() {\n let release!: () => void;\n resumeGate = new Promise((r) => (release = r));\n try {\n if (!active()) {\n applyResume(null);\n return;\n }\n const linked = route!.snapshot.queryParamMap.get('aanvraag');\n if (linked) {\n await load(linked);\n return;\n }\n const existing = await findConcept();\n if (existing) {\n await load(existing);\n // Stamp the id into the URL so a reload resumes the same Concept.\n void router!.navigate([], { relativeTo: route!, queryParams: { aanvraag: existing }, queryParamsHandling: 'merge', replaceUrl: true });\n return;\n }\n applyResume(null);\n } finally {\n release();\n }\n },\n\n /** Submit through the aanvraag lifecycle: ensure the Concept exists, then\n `POST /applications/{id}/submit` (server sets autoApprovable + transitions).\n Folded into a Result like the old submit-* commands. */\n submit(body: SubmitApplicationRequest): Promise> {\n return runSubmit(async () => adapter.submit(await ensureId(), body), SUBMIT_FAILED);\n },\n\n /** Restart: discard the current in-progress Concept (delete it) and detach, so a\n fresh one is created on next progress. Keeps the one-per-type invariant. A\n submitted id can't be deleted (409, caught) — that submission correctly remains,\n and detaching still lets the user start a new Concept. */\n reset() {\n if (id) {\n void adapter.cancel(id).catch(() => {}); // Concept → deleted; submitted → 409, kept\n id = undefined;\n ensuring = undefined;\n }\n if (active()) void router!.navigate([], { relativeTo: route!, queryParams: { aanvraag: null }, queryParamsHandling: 'merge', replaceUrl: true });\n },\n };\n}\n", + "sourceCode": "import { DestroyRef, effect, inject } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { Result } from '@shared/kernel/fp';\nimport { runSubmit, SUBMIT_FAILED } from '@shared/application/submit';\nimport type {\n SubmitApplicationRequest,\n SubmitApplicationResponse,\n} from '@shared/infrastructure/api-client';\nimport { AanvraagType } from '@registratie/domain/aanvraag';\nimport {\n ApplicationsAdapter,\n parseApplications,\n} from '@registratie/infrastructure/applications.adapter';\n\n/** What a wizard persists per step: the opaque machine snapshot + progress + docs. */\nexport interface DraftSnapshot {\n draft: unknown;\n stepIndex: number;\n stepCount: number;\n documentIds: string[];\n}\n\nexport interface DraftSyncDeps {\n type: AanvraagType;\n /** The machine snapshot while it's worth persisting; null when not (pristine/done). */\n snapshot: () => DraftSnapshot | null;\n /** Seed the machine from a resumed draft. Called at most once, on init, and ONLY\n with a real draft on a still-pristine machine — see `applyResume`. */\n onResume: (draft: unknown) => void;\n /** Draft-sync only runs in the real app — false in Storybook/tests (explicit seed). */\n enabled: () => boolean;\n}\n\nconst DEBOUNCE_MS = 600; // ponytail: fixed debounce; tune if the sync feels laggy/chatty.\n\n/**\n * The effectful glue that replaces per-wizard sessionStorage with a backend-owned\n * Concept (PRD 0001, phase D). Instantiated in a field initializer (like\n * `createStore`/`createUploadController`). Responsibilities:\n *\n * - resume: a `?aanvraag=` link wins; otherwise resume the ONE existing Concept of\n * this type (at most one per type), seeding the machine from its saved draft;\n * - create-on-first-progress: when no Concept exists, one is created lazily the first\n * time the wizard reports a non-null snapshot, and its id is stamped into the URL;\n * - debounced draft sync on every subsequent change.\n *\n * Inert without a Router (stories) or when `enabled()` is false — no network, no resume.\n */\nexport function createDraftSync(deps: DraftSyncDeps) {\n const adapter = inject(ApplicationsAdapter);\n const router = inject(Router, { optional: true });\n const route = inject(ActivatedRoute, { optional: true });\n const active = () => deps.enabled() && !!router && !!route;\n\n let id: string | undefined;\n let ensuring: Promise | undefined; // in-flight create, so we never create twice\n let timer: ReturnType | undefined;\n // Resolves once resume() has decided whether a Concept of this type already exists;\n // gates ensureId so a fast typist can't create a duplicate before that lookup lands.\n let resumeGate: Promise = Promise.resolve();\n\n const ensureId = async (): Promise => {\n await resumeGate;\n if (id) return id;\n ensuring ??= adapter.create(deps.type).then((newId) => {\n id = newId;\n // Stamp the id into the URL (no navigation) so a reload resumes this Concept.\n void router!.navigate([], {\n relativeTo: route!,\n queryParams: { aanvraag: newId },\n queryParamsHandling: 'merge',\n replaceUrl: true,\n });\n return newId;\n });\n return ensuring;\n };\n\n // Apply a resumed draft only when it's safe to: a late lookup must never clobber\n // progress the user already made while it was in flight, and \"start fresh\" needs no\n // dispatch (the machine already starts fresh). snapshot() is non-null once the user\n // has real progress.\n const applyResume = (draft: unknown | null) => {\n if (draft == null || deps.snapshot() != null) return;\n deps.onResume(draft);\n };\n\n const flush = async () => {\n const snap = deps.snapshot();\n if (!snap) return;\n const theId = await ensureId();\n await adapter.syncDraft(theId, {\n draft: snap.draft,\n stepIndex: snap.stepIndex,\n stepCount: snap.stepCount,\n documentIds: snap.documentIds,\n });\n };\n\n // One effect watches the snapshot; each change resets a debounce timer. The timer's\n // callback only does network I/O (never dispatch), so it can't livelock the store.\n effect(() => {\n if (!active()) return;\n const snap = deps.snapshot(); // tracked: fires on every machine change\n if (!snap) return;\n if (timer) clearTimeout(timer);\n timer = setTimeout(() => void flush(), DEBOUNCE_MS);\n });\n\n inject(DestroyRef).onDestroy(() => timer && clearTimeout(timer));\n\n // Attach to a specific Concept id and seed the machine from its draft. A non-Concept\n // (submitted/gone) id is treated as fresh so it can't reopen as an editable draft.\n const load = (linked: string): Promise => {\n id = linked;\n return adapter\n .detail(linked)\n .then((dto) => {\n if (dto.status && dto.status.tag !== 'Concept') {\n id = undefined;\n applyResume(null);\n return;\n }\n applyResume(dto.draft ?? null);\n })\n .catch(() => {\n id = undefined;\n applyResume(null); // unknown/deleted id → start fresh\n });\n };\n\n // Find the user's existing Concept of this type (at most one), if any.\n const findConcept = async (): Promise => {\n try {\n const parsed = parseApplications(await adapter.list());\n return parsed.ok\n ? parsed.value.find((a) => a.type === deps.type && a.status.tag === 'Concept')?.id\n : undefined;\n } catch {\n return undefined;\n }\n };\n\n return {\n /** Resolve the initial state: a `?aanvraag` link wins; else resume this type's\n existing Concept; else start fresh (a Concept is created on first progress). */\n async resume() {\n let release!: () => void;\n resumeGate = new Promise((r) => (release = r));\n try {\n if (!active()) {\n applyResume(null);\n return;\n }\n const linked = route!.snapshot.queryParamMap.get('aanvraag');\n if (linked) {\n await load(linked);\n return;\n }\n const existing = await findConcept();\n if (existing) {\n await load(existing);\n // Stamp the id into the URL so a reload resumes the same Concept.\n void router!.navigate([], {\n relativeTo: route!,\n queryParams: { aanvraag: existing },\n queryParamsHandling: 'merge',\n replaceUrl: true,\n });\n return;\n }\n applyResume(null);\n } finally {\n release();\n }\n },\n\n /** Submit through the aanvraag lifecycle: ensure the Concept exists, then\n `POST /applications/{id}/submit` (server sets autoApprovable + transitions).\n Folded into a Result like the old submit-* commands. */\n submit(body: SubmitApplicationRequest): Promise> {\n return runSubmit(async () => adapter.submit(await ensureId(), body), SUBMIT_FAILED);\n },\n\n /** Restart: discard the current in-progress Concept (delete it) and detach, so a\n fresh one is created on next progress. Keeps the one-per-type invariant. A\n submitted id can't be deleted (409, caught) — that submission correctly remains,\n and detaching still lets the user start a new Concept. */\n reset() {\n if (id) {\n void adapter.cancel(id).catch(() => {}); // Concept → deleted; submitted → 409, kept\n id = undefined;\n ensuring = undefined;\n }\n if (active())\n void router!.navigate([], {\n relativeTo: route!,\n queryParams: { aanvraag: null },\n queryParamsHandling: 'merge',\n replaceUrl: true,\n });\n },\n };\n}\n", "properties": [ { "name": "documentIds", @@ -2177,7 +2324,7 @@ "indexKey": "", "optional": false, "description": "", - "line": 14 + "line": 20 }, { "name": "draft", @@ -2187,7 +2334,7 @@ "indexKey": "", "optional": false, "description": "", - "line": 11 + "line": 17 }, { "name": "stepCount", @@ -2197,7 +2344,7 @@ "indexKey": "", "optional": false, "description": "", - "line": 13 + "line": 19 }, { "name": "stepIndex", @@ -2207,7 +2354,7 @@ "indexKey": "", "optional": false, "description": "", - "line": 12 + "line": 18 } ], "indexSignatures": [], @@ -2219,12 +2366,12 @@ }, { "name": "DraftSyncDeps", - "id": "interface-DraftSyncDeps-e575992a23399ee78afe66c219bd8a146ede9c3330705108a5ee488100dd204c54c96e1a8e354dfcd03f8f842249ad8ee59f6bd9967431b700e9050ca058b295", + "id": "interface-DraftSyncDeps-55123d51a2676aadb15e8ab015deab7e0aeadca2977e31ae5c4331659bbcf56dc907991fd0d7cfa37b9b0f227c0b360edc455991e250a23ff6655c05cf139a71", "file": "src/app/registratie/application/draft-sync.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "import { DestroyRef, effect, inject } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { Result } from '@shared/kernel/fp';\nimport { runSubmit, SUBMIT_FAILED } from '@shared/application/submit';\nimport type { SubmitApplicationRequest, SubmitApplicationResponse } from '@shared/infrastructure/api-client';\nimport { AanvraagType } from '@registratie/domain/aanvraag';\nimport { ApplicationsAdapter, parseApplications } from '@registratie/infrastructure/applications.adapter';\n\n/** What a wizard persists per step: the opaque machine snapshot + progress + docs. */\nexport interface DraftSnapshot {\n draft: unknown;\n stepIndex: number;\n stepCount: number;\n documentIds: string[];\n}\n\nexport interface DraftSyncDeps {\n type: AanvraagType;\n /** The machine snapshot while it's worth persisting; null when not (pristine/done). */\n snapshot: () => DraftSnapshot | null;\n /** Seed the machine from a resumed draft. Called at most once, on init, and ONLY\n with a real draft on a still-pristine machine — see `applyResume`. */\n onResume: (draft: unknown) => void;\n /** Draft-sync only runs in the real app — false in Storybook/tests (explicit seed). */\n enabled: () => boolean;\n}\n\nconst DEBOUNCE_MS = 600; // ponytail: fixed debounce; tune if the sync feels laggy/chatty.\n\n/**\n * The effectful glue that replaces per-wizard sessionStorage with a backend-owned\n * Concept (PRD 0001, phase D). Instantiated in a field initializer (like\n * `createStore`/`createUploadController`). Responsibilities:\n *\n * - resume: a `?aanvraag=` link wins; otherwise resume the ONE existing Concept of\n * this type (at most one per type), seeding the machine from its saved draft;\n * - create-on-first-progress: when no Concept exists, one is created lazily the first\n * time the wizard reports a non-null snapshot, and its id is stamped into the URL;\n * - debounced draft sync on every subsequent change.\n *\n * Inert without a Router (stories) or when `enabled()` is false — no network, no resume.\n */\nexport function createDraftSync(deps: DraftSyncDeps) {\n const adapter = inject(ApplicationsAdapter);\n const router = inject(Router, { optional: true });\n const route = inject(ActivatedRoute, { optional: true });\n const active = () => deps.enabled() && !!router && !!route;\n\n let id: string | undefined;\n let ensuring: Promise | undefined; // in-flight create, so we never create twice\n let timer: ReturnType | undefined;\n // Resolves once resume() has decided whether a Concept of this type already exists;\n // gates ensureId so a fast typist can't create a duplicate before that lookup lands.\n let resumeGate: Promise = Promise.resolve();\n\n const ensureId = async (): Promise => {\n await resumeGate;\n if (id) return id;\n ensuring ??= adapter.create(deps.type).then((newId) => {\n id = newId;\n // Stamp the id into the URL (no navigation) so a reload resumes this Concept.\n void router!.navigate([], { relativeTo: route!, queryParams: { aanvraag: newId }, queryParamsHandling: 'merge', replaceUrl: true });\n return newId;\n });\n return ensuring;\n };\n\n // Apply a resumed draft only when it's safe to: a late lookup must never clobber\n // progress the user already made while it was in flight, and \"start fresh\" needs no\n // dispatch (the machine already starts fresh). snapshot() is non-null once the user\n // has real progress.\n const applyResume = (draft: unknown | null) => {\n if (draft == null || deps.snapshot() != null) return;\n deps.onResume(draft);\n };\n\n const flush = async () => {\n const snap = deps.snapshot();\n if (!snap) return;\n const theId = await ensureId();\n await adapter.syncDraft(theId, { draft: snap.draft, stepIndex: snap.stepIndex, stepCount: snap.stepCount, documentIds: snap.documentIds });\n };\n\n // One effect watches the snapshot; each change resets a debounce timer. The timer's\n // callback only does network I/O (never dispatch), so it can't livelock the store.\n effect(() => {\n if (!active()) return;\n const snap = deps.snapshot(); // tracked: fires on every machine change\n if (!snap) return;\n if (timer) clearTimeout(timer);\n timer = setTimeout(() => void flush(), DEBOUNCE_MS);\n });\n\n inject(DestroyRef).onDestroy(() => timer && clearTimeout(timer));\n\n // Attach to a specific Concept id and seed the machine from its draft. A non-Concept\n // (submitted/gone) id is treated as fresh so it can't reopen as an editable draft.\n const load = (linked: string): Promise => {\n id = linked;\n return adapter\n .detail(linked)\n .then((dto) => {\n if (dto.status && dto.status.tag !== 'Concept') {\n id = undefined;\n applyResume(null);\n return;\n }\n applyResume(dto.draft ?? null);\n })\n .catch(() => {\n id = undefined;\n applyResume(null); // unknown/deleted id → start fresh\n });\n };\n\n // Find the user's existing Concept of this type (at most one), if any.\n const findConcept = async (): Promise => {\n try {\n const parsed = parseApplications(await adapter.list());\n return parsed.ok ? parsed.value.find((a) => a.type === deps.type && a.status.tag === 'Concept')?.id : undefined;\n } catch {\n return undefined;\n }\n };\n\n return {\n /** Resolve the initial state: a `?aanvraag` link wins; else resume this type's\n existing Concept; else start fresh (a Concept is created on first progress). */\n async resume() {\n let release!: () => void;\n resumeGate = new Promise((r) => (release = r));\n try {\n if (!active()) {\n applyResume(null);\n return;\n }\n const linked = route!.snapshot.queryParamMap.get('aanvraag');\n if (linked) {\n await load(linked);\n return;\n }\n const existing = await findConcept();\n if (existing) {\n await load(existing);\n // Stamp the id into the URL so a reload resumes the same Concept.\n void router!.navigate([], { relativeTo: route!, queryParams: { aanvraag: existing }, queryParamsHandling: 'merge', replaceUrl: true });\n return;\n }\n applyResume(null);\n } finally {\n release();\n }\n },\n\n /** Submit through the aanvraag lifecycle: ensure the Concept exists, then\n `POST /applications/{id}/submit` (server sets autoApprovable + transitions).\n Folded into a Result like the old submit-* commands. */\n submit(body: SubmitApplicationRequest): Promise> {\n return runSubmit(async () => adapter.submit(await ensureId(), body), SUBMIT_FAILED);\n },\n\n /** Restart: discard the current in-progress Concept (delete it) and detach, so a\n fresh one is created on next progress. Keeps the one-per-type invariant. A\n submitted id can't be deleted (409, caught) — that submission correctly remains,\n and detaching still lets the user start a new Concept. */\n reset() {\n if (id) {\n void adapter.cancel(id).catch(() => {}); // Concept → deleted; submitted → 409, kept\n id = undefined;\n ensuring = undefined;\n }\n if (active()) void router!.navigate([], { relativeTo: route!, queryParams: { aanvraag: null }, queryParamsHandling: 'merge', replaceUrl: true });\n },\n };\n}\n", + "sourceCode": "import { DestroyRef, effect, inject } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { Result } from '@shared/kernel/fp';\nimport { runSubmit, SUBMIT_FAILED } from '@shared/application/submit';\nimport type {\n SubmitApplicationRequest,\n SubmitApplicationResponse,\n} from '@shared/infrastructure/api-client';\nimport { AanvraagType } from '@registratie/domain/aanvraag';\nimport {\n ApplicationsAdapter,\n parseApplications,\n} from '@registratie/infrastructure/applications.adapter';\n\n/** What a wizard persists per step: the opaque machine snapshot + progress + docs. */\nexport interface DraftSnapshot {\n draft: unknown;\n stepIndex: number;\n stepCount: number;\n documentIds: string[];\n}\n\nexport interface DraftSyncDeps {\n type: AanvraagType;\n /** The machine snapshot while it's worth persisting; null when not (pristine/done). */\n snapshot: () => DraftSnapshot | null;\n /** Seed the machine from a resumed draft. Called at most once, on init, and ONLY\n with a real draft on a still-pristine machine — see `applyResume`. */\n onResume: (draft: unknown) => void;\n /** Draft-sync only runs in the real app — false in Storybook/tests (explicit seed). */\n enabled: () => boolean;\n}\n\nconst DEBOUNCE_MS = 600; // ponytail: fixed debounce; tune if the sync feels laggy/chatty.\n\n/**\n * The effectful glue that replaces per-wizard sessionStorage with a backend-owned\n * Concept (PRD 0001, phase D). Instantiated in a field initializer (like\n * `createStore`/`createUploadController`). Responsibilities:\n *\n * - resume: a `?aanvraag=` link wins; otherwise resume the ONE existing Concept of\n * this type (at most one per type), seeding the machine from its saved draft;\n * - create-on-first-progress: when no Concept exists, one is created lazily the first\n * time the wizard reports a non-null snapshot, and its id is stamped into the URL;\n * - debounced draft sync on every subsequent change.\n *\n * Inert without a Router (stories) or when `enabled()` is false — no network, no resume.\n */\nexport function createDraftSync(deps: DraftSyncDeps) {\n const adapter = inject(ApplicationsAdapter);\n const router = inject(Router, { optional: true });\n const route = inject(ActivatedRoute, { optional: true });\n const active = () => deps.enabled() && !!router && !!route;\n\n let id: string | undefined;\n let ensuring: Promise | undefined; // in-flight create, so we never create twice\n let timer: ReturnType | undefined;\n // Resolves once resume() has decided whether a Concept of this type already exists;\n // gates ensureId so a fast typist can't create a duplicate before that lookup lands.\n let resumeGate: Promise = Promise.resolve();\n\n const ensureId = async (): Promise => {\n await resumeGate;\n if (id) return id;\n ensuring ??= adapter.create(deps.type).then((newId) => {\n id = newId;\n // Stamp the id into the URL (no navigation) so a reload resumes this Concept.\n void router!.navigate([], {\n relativeTo: route!,\n queryParams: { aanvraag: newId },\n queryParamsHandling: 'merge',\n replaceUrl: true,\n });\n return newId;\n });\n return ensuring;\n };\n\n // Apply a resumed draft only when it's safe to: a late lookup must never clobber\n // progress the user already made while it was in flight, and \"start fresh\" needs no\n // dispatch (the machine already starts fresh). snapshot() is non-null once the user\n // has real progress.\n const applyResume = (draft: unknown | null) => {\n if (draft == null || deps.snapshot() != null) return;\n deps.onResume(draft);\n };\n\n const flush = async () => {\n const snap = deps.snapshot();\n if (!snap) return;\n const theId = await ensureId();\n await adapter.syncDraft(theId, {\n draft: snap.draft,\n stepIndex: snap.stepIndex,\n stepCount: snap.stepCount,\n documentIds: snap.documentIds,\n });\n };\n\n // One effect watches the snapshot; each change resets a debounce timer. The timer's\n // callback only does network I/O (never dispatch), so it can't livelock the store.\n effect(() => {\n if (!active()) return;\n const snap = deps.snapshot(); // tracked: fires on every machine change\n if (!snap) return;\n if (timer) clearTimeout(timer);\n timer = setTimeout(() => void flush(), DEBOUNCE_MS);\n });\n\n inject(DestroyRef).onDestroy(() => timer && clearTimeout(timer));\n\n // Attach to a specific Concept id and seed the machine from its draft. A non-Concept\n // (submitted/gone) id is treated as fresh so it can't reopen as an editable draft.\n const load = (linked: string): Promise => {\n id = linked;\n return adapter\n .detail(linked)\n .then((dto) => {\n if (dto.status && dto.status.tag !== 'Concept') {\n id = undefined;\n applyResume(null);\n return;\n }\n applyResume(dto.draft ?? null);\n })\n .catch(() => {\n id = undefined;\n applyResume(null); // unknown/deleted id → start fresh\n });\n };\n\n // Find the user's existing Concept of this type (at most one), if any.\n const findConcept = async (): Promise => {\n try {\n const parsed = parseApplications(await adapter.list());\n return parsed.ok\n ? parsed.value.find((a) => a.type === deps.type && a.status.tag === 'Concept')?.id\n : undefined;\n } catch {\n return undefined;\n }\n };\n\n return {\n /** Resolve the initial state: a `?aanvraag` link wins; else resume this type's\n existing Concept; else start fresh (a Concept is created on first progress). */\n async resume() {\n let release!: () => void;\n resumeGate = new Promise((r) => (release = r));\n try {\n if (!active()) {\n applyResume(null);\n return;\n }\n const linked = route!.snapshot.queryParamMap.get('aanvraag');\n if (linked) {\n await load(linked);\n return;\n }\n const existing = await findConcept();\n if (existing) {\n await load(existing);\n // Stamp the id into the URL so a reload resumes the same Concept.\n void router!.navigate([], {\n relativeTo: route!,\n queryParams: { aanvraag: existing },\n queryParamsHandling: 'merge',\n replaceUrl: true,\n });\n return;\n }\n applyResume(null);\n } finally {\n release();\n }\n },\n\n /** Submit through the aanvraag lifecycle: ensure the Concept exists, then\n `POST /applications/{id}/submit` (server sets autoApprovable + transitions).\n Folded into a Result like the old submit-* commands. */\n submit(body: SubmitApplicationRequest): Promise> {\n return runSubmit(async () => adapter.submit(await ensureId(), body), SUBMIT_FAILED);\n },\n\n /** Restart: discard the current in-progress Concept (delete it) and detach, so a\n fresh one is created on next progress. Keeps the one-per-type invariant. A\n submitted id can't be deleted (409, caught) — that submission correctly remains,\n and detaching still lets the user start a new Concept. */\n reset() {\n if (id) {\n void adapter.cancel(id).catch(() => {}); // Concept → deleted; submitted → 409, kept\n id = undefined;\n ensuring = undefined;\n }\n if (active())\n void router!.navigate([], {\n relativeTo: route!,\n queryParams: { aanvraag: null },\n queryParamsHandling: 'merge',\n replaceUrl: true,\n });\n },\n };\n}\n", "properties": [ { "name": "enabled", @@ -2234,7 +2381,7 @@ "indexKey": "", "optional": false, "description": "

Draft-sync only runs in the real app — false in Storybook/tests (explicit seed).

\n", - "line": 25, + "line": 31, "rawdescription": "\nDraft-sync only runs in the real app — false in Storybook/tests (explicit seed)." }, { @@ -2245,7 +2392,7 @@ "indexKey": "", "optional": false, "description": "

Seed the machine from a resumed draft. Called at most once, on init, and ONLY\nwith a real draft on a still-pristine machine — see applyResume.

\n", - "line": 23, + "line": 29, "rawdescription": "\nSeed the machine from a resumed draft. Called at most once, on init, and ONLY\nwith a real draft on a still-pristine machine — see `applyResume`." }, { @@ -2256,7 +2403,7 @@ "indexKey": "", "optional": false, "description": "

The machine snapshot while it's worth persisting; null when not (pristine/done).

\n", - "line": 20, + "line": 26, "rawdescription": "\nThe machine snapshot while it's worth persisting; null when not (pristine/done)." }, { @@ -2267,7 +2414,7 @@ "indexKey": "", "optional": false, "description": "", - "line": 18 + "line": 24 } ], "indexSignatures": [], @@ -2277,12 +2424,12 @@ }, { "name": "DraftSyncRequest", - "id": "interface-DraftSyncRequest-134629d19fe3b5e6a76daeb4f10c282202eb1b8380b939c25450bb44b86fcb3df7a15e5ead886ad958b8bb7f158457387fb6c11872acdb4893c4933c2fdef07b", + "id": "interface-DraftSyncRequest-fb1ee9618e8a58db438478dc30a2ef41f099ba42e2d9a7155300e95c801cc6c2851c481c1bff1e7af3c066bc79e76529bbb37756fed2b5e35a56532325220bab", "file": "src/app/shared/infrastructure/api-client.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", + "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n me(): Promise {\n let url_ = this.baseUrl + \"/api/v1/me\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processMe(_response);\n });\n }\n\n protected processMe(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as MeDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDecisionsDto {\n canEdit?: boolean;\n canApprove?: boolean;\n canReject?: boolean;\n canSend?: boolean;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n decisions?: BriefDecisionsDto;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface MeDto {\n capabilities?: string[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", "properties": [ { "name": "documentIds", @@ -2292,7 +2439,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1359 + "line": 1403 }, { "name": "draft", @@ -2302,7 +2449,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1356 + "line": 1400 }, { "name": "stepCount", @@ -2312,7 +2459,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1358 + "line": 1402 }, { "name": "stepIndex", @@ -2322,7 +2469,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1357 + "line": 1401 } ], "indexSignatures": [], @@ -2332,12 +2479,12 @@ }, { "name": "DuoDiplomaDto", - "id": "interface-DuoDiplomaDto-134629d19fe3b5e6a76daeb4f10c282202eb1b8380b939c25450bb44b86fcb3df7a15e5ead886ad958b8bb7f158457387fb6c11872acdb4893c4933c2fdef07b", + "id": "interface-DuoDiplomaDto-fb1ee9618e8a58db438478dc30a2ef41f099ba42e2d9a7155300e95c801cc6c2851c481c1bff1e7af3c066bc79e76529bbb37756fed2b5e35a56532325220bab", "file": "src/app/shared/infrastructure/api-client.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", + "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n me(): Promise {\n let url_ = this.baseUrl + \"/api/v1/me\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processMe(_response);\n });\n }\n\n protected processMe(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as MeDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDecisionsDto {\n canEdit?: boolean;\n canApprove?: boolean;\n canReject?: boolean;\n canSend?: boolean;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n decisions?: BriefDecisionsDto;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface MeDto {\n capabilities?: string[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", "properties": [ { "name": "beroep", @@ -2347,7 +2494,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1367 + "line": 1411 }, { "name": "id", @@ -2357,7 +2504,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1363 + "line": 1407 }, { "name": "instelling", @@ -2367,7 +2514,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1365 + "line": 1409 }, { "name": "jaar", @@ -2377,7 +2524,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1366 + "line": 1410 }, { "name": "naam", @@ -2387,7 +2534,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1364 + "line": 1408 }, { "name": "policyQuestions", @@ -2397,7 +2544,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1368 + "line": 1412 } ], "indexSignatures": [], @@ -2485,12 +2632,12 @@ }, { "name": "DuoLookupDto", - "id": "interface-DuoLookupDto-134629d19fe3b5e6a76daeb4f10c282202eb1b8380b939c25450bb44b86fcb3df7a15e5ead886ad958b8bb7f158457387fb6c11872acdb4893c4933c2fdef07b", + "id": "interface-DuoLookupDto-fb1ee9618e8a58db438478dc30a2ef41f099ba42e2d9a7155300e95c801cc6c2851c481c1bff1e7af3c066bc79e76529bbb37756fed2b5e35a56532325220bab", "file": "src/app/shared/infrastructure/api-client.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", + "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n me(): Promise {\n let url_ = this.baseUrl + \"/api/v1/me\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processMe(_response);\n });\n }\n\n protected processMe(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as MeDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDecisionsDto {\n canEdit?: boolean;\n canApprove?: boolean;\n canReject?: boolean;\n canSend?: boolean;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n decisions?: BriefDecisionsDto;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface MeDto {\n capabilities?: string[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", "properties": [ { "name": "diplomas", @@ -2500,7 +2647,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1372 + "line": 1416 }, { "name": "handmatig", @@ -2510,7 +2657,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1373 + "line": 1417 } ], "indexSignatures": [], @@ -2560,12 +2707,12 @@ }, { "name": "Errors", - "id": "interface-Errors-b7c3c5d493aa141ca68cb964e63408db7152b07336b239864d3c430b84d8eb3e650d1a3abaf3fda253444af942c45f86138a5d8229832d49bda94eec35c33546", + "id": "interface-Errors-9669bb22f8d4cc591a3bd64d9fc83275b70ad9e7275d59b4d1d394db7252e8820908b20c593f0b3a16c415c40ad1232ed7d04ba684d0dee9d72bc1ae820d06b6", "file": "src/app/registratie/domain/registratie-wizard.machine.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "import { Result, ok, err, assertNever } from '@shared/kernel/fp';\nimport { Postcode, parsePostcode } from '@registratie/domain/value-objects/postcode';\nimport { Email, parseEmail } from '@registratie/domain/value-objects/email';\nimport {\n UploadState,\n UploadMsg,\n DeliveryChannel,\n initialUpload,\n reduceUpload,\n requiredCategoriesSatisfied,\n deliveryRefs,\n} from '@shared/upload/upload.machine';\n\n/**\n * A FIXED 3-step registration wizard. The steps never change in number (always\n * `STEPS`): (1) adres + correspondentievoorkeur, (2) beroep o.b.v. diploma,\n * (3) controle & indienen. Follow-up questions appear *inline within a step*\n * (e.g. choosing 'email' reveals the e-mail field). \"Is this field required\n * right now\" is a pure function (`validateStep`), so it is trivial to test and\n * impossible to get out of sync with the data. Invariants live here, not in the\n * UI: the wizard reaches `Indienen` only when a complete `ValidRegistratie` parses.\n */\n\nexport type StepId = 'adres' | 'beroep' | 'controle';\n\n/** The fixed step list. Number of steps never changes; questions reveal inline. */\nexport const STEPS: StepId[] = ['adres', 'beroep', 'controle'];\n\n/** Where a piece of data came from — recorded on the aggregate (PRD §5). */\nexport type AdresHerkomst = 'brp' | 'handmatig';\nexport type DiplomaHerkomst = 'duo' | 'handmatig';\nexport type Correspondentie = 'email' | 'post';\n\n/** One record carried across every step (and persisted). All optional: the user\n fills it in gradually. Adres fields are kept flat so one `SetField` message\n serves them all (mirrors the intake machine). */\nexport interface Draft {\n straat?: string;\n postcode?: string;\n woonplaats?: string;\n adresHerkomst?: AdresHerkomst;\n correspondentie?: Correspondentie;\n email?: string;\n diplomaId?: string;\n diplomaHerkomst?: DiplomaHerkomst;\n beroep?: string; // DERIVED from the chosen DUO diploma (or declared for a manual one)\n vraagIds?: string[]; // ids of the policy questions that apply to the chosen diploma\n antwoorden: Record; // geldigheidsantwoorden, keyed by question id\n}\n\n/** What we have after the controle step parses — guaranteed valid/typed. */\nexport interface ValidRegistratie {\n adres: { straat: string; postcode: Postcode; woonplaats: string };\n adresHerkomst: AdresHerkomst;\n correspondentie: Correspondentie;\n email?: Email; // only when correspondentie === 'email'\n diplomaId: string;\n diplomaHerkomst: DiplomaHerkomst;\n beroep: string;\n antwoorden: Record;\n documents: Array<{ categoryId: string; channel: DeliveryChannel; documentId?: string }>;\n}\n\n/** Text fields settable via SetField. */\nexport type DraftField = 'straat' | 'postcode' | 'woonplaats' | 'email';\n\n/** Per-field error map. `antwoorden` holds per-policy-question errors, keyed by\n question id (a step can show several questions). */\nexport interface Errors {\n straat?: string;\n postcode?: string;\n woonplaats?: string;\n email?: string;\n correspondentie?: string;\n diploma?: string;\n documenten?: string;\n antwoorden?: Record;\n}\n\nexport type RegistratieState =\n | { tag: 'Invullen'; draft: Draft; cursor: number; errors: Errors; upload: UploadState }\n | { tag: 'Indienen'; data: ValidRegistratie }\n | { tag: 'Ingediend'; data: ValidRegistratie; referentie: string }\n | { tag: 'Mislukt'; data: ValidRegistratie; error: string };\n\nconst emptyDraft: Draft = { antwoorden: {} };\nexport const initial: RegistratieState = { tag: 'Invullen', draft: emptyDraft, cursor: 0, errors: {}, upload: initialUpload };\n\n/** Which step the cursor currently points at (clamped to the fixed list). */\nexport function currentStep(s: Extract): StepId {\n return STEPS[Math.min(s.cursor, STEPS.length - 1)];\n}\n\n/** Has the user meaningfully started, so it's worth persisting as a Concept? Excludes\n the automatic BRP address prefill on step 0 — a bare page visit creates nothing.\n ponytail: an address typed at step 0 without any of these signals is not yet\n persisted (created once they advance/choose); accepted regression vs. sessionStorage. */\nexport function hasProgress(s: Extract): boolean {\n const d = s.draft;\n return (\n s.cursor > 0 ||\n !!d.correspondentie ||\n !!d.email ||\n !!d.diplomaId ||\n !!d.beroep ||\n deliveryRefs(s.upload).some((r) => r.channel === 'digital' && !!r.documentId)\n );\n}\n\n/** Validate every question currently visible in ONE step. Errors keyed per field. */\nfunction validateStep(step: StepId, d: Draft, upload: UploadState): Result {\n const errors: Errors = {};\n switch (step) {\n case 'adres': {\n if (!d.straat || d.straat.trim() === '') errors.straat = $localize`:@@validation.straat2:Vul een straat en huisnummer in.`;\n const pc = parsePostcode(d.postcode ?? '');\n if (!pc.ok) errors.postcode = pc.error;\n if (!d.woonplaats || d.woonplaats.trim() === '') errors.woonplaats = $localize`:@@validation.woonplaats:Vul een woonplaats in.`;\n if (!d.correspondentie) errors.correspondentie = $localize`:@@validation.maakKeuze:Maak een keuze.`;\n // E-mail is only required when 'email' is the chosen channel.\n if (d.correspondentie === 'email') {\n const e = parseEmail(d.email ?? '');\n if (!e.ok) errors.email = e.error;\n }\n break;\n }\n case 'beroep': {\n // A diploma must be chosen (or declared manually); its beroep is then known.\n if (!d.diplomaId || !d.beroep) {\n errors.diploma = $localize`:@@validation.diploma:Kies het diploma waarmee u zich wilt registreren, of voer het handmatig in.`;\n break;\n }\n // Every policy question the chosen diploma raised must be answered. Which\n // questions apply is server-decided (carried in `vraagIds`); we only check\n // they're answered.\n const open: Record = {};\n for (const id of d.vraagIds ?? []) {\n if (!(d.antwoorden[id] ?? '').trim()) open[id] = $localize`:@@validation.beantwoordVraag:Beantwoord deze vraag.`;\n }\n if (Object.keys(open).length > 0) errors.antwoorden = open;\n // Required documents for this wizard attach to the beroep step (inline upload).\n if (!requiredCategoriesSatisfied(upload)) {\n errors.documenten = $localize`:@@validation.documenten:Lever de verplichte documenten aan (upload of kies \"per post nasturen\").`;\n }\n break;\n }\n case 'controle':\n break; // controle shows a summary; no own fields\n default:\n return assertNever(step);\n }\n return Object.keys(errors).length > 0 ? err(errors) : ok(undefined);\n}\n\n/** Parse the whole wizard into a ValidRegistratie (called on submit). */\nfunction validateAll(d: Draft, upload: UploadState): Result {\n const errors: Errors = {};\n for (const step of STEPS) {\n const r = validateStep(step, d, upload);\n if (!r.ok) Object.assign(errors, r.error);\n }\n if (Object.keys(errors).length > 0) return err(errors);\n\n const pc = parsePostcode(d.postcode ?? '');\n // validateStep guaranteed these parse, but keep the compiler happy.\n if (!pc.ok || !d.diplomaId || !d.beroep || !d.correspondentie) return err(errors);\n const email = d.correspondentie === 'email' ? parseEmail(d.email ?? '') : undefined;\n // Keep only the answers to the questions that actually applied.\n const vraagIds = d.vraagIds ?? [];\n const antwoorden = Object.fromEntries(vraagIds.map((id) => [id, d.antwoorden[id] ?? '']));\n\n return ok({\n adres: { straat: d.straat!, postcode: pc.value, woonplaats: d.woonplaats! },\n adresHerkomst: d.adresHerkomst ?? 'handmatig',\n correspondentie: d.correspondentie,\n email: email?.ok ? email.value : undefined,\n diplomaId: d.diplomaId,\n diplomaHerkomst: d.diplomaHerkomst ?? 'handmatig',\n beroep: d.beroep,\n antwoorden,\n documents: deliveryRefs(upload),\n });\n}\n\nexport function setField(s: RegistratieState, key: DraftField, value: string): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n const draft: Draft = { ...s.draft, [key]: value };\n // Editing an address field means the user owns it now — not the BRP copy.\n if (key === 'straat' || key === 'postcode' || key === 'woonplaats') draft.adresHerkomst = 'handmatig';\n return { ...s, draft };\n}\n\nexport function setCorrespondentie(s: RegistratieState, value: Correspondentie): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n return { ...s, draft: { ...s.draft, correspondentie: value } };\n}\n\n/** Prefill the address from a BRP lookup and flag its origin (PRD §7). */\nexport function prefillAdres(s: RegistratieState, straat: string, postcode: string, woonplaats: string): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n return { ...s, draft: { ...s.draft, straat, postcode, woonplaats, adresHerkomst: 'brp' } };\n}\n\n/** Pick a DUO diploma; the beroep is derived from it and the applicable policy\n questions (`vraagIds`) come with it (both server-computed, passed in). */\nexport function kiesDiploma(s: RegistratieState, diplomaId: string, beroep: string, vraagIds: string[]): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n return { ...s, draft: { ...s.draft, diplomaId, beroep, vraagIds, diplomaHerkomst: 'duo' }, errors: {} };\n}\n\n/** Switch to manual diploma entry: the diploma isn't in DUO, so the MAXIMAL\n policy-question set applies and the entry is flagged handmatig/unverified. The\n beroep is declared separately (declareerBeroep). */\nexport function kiesHandmatig(s: RegistratieState, vraagIds: string[]): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n return { ...s, draft: { ...s.draft, diplomaId: 'handmatig', beroep: undefined, vraagIds, diplomaHerkomst: 'handmatig' }, errors: {} };\n}\n\n/** Declare the beroep for a manually-entered diploma (chosen from a fixed list). */\nexport function declareerBeroep(s: RegistratieState, beroep: string): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n return { ...s, draft: { ...s.draft, beroep } };\n}\n\nexport function setAntwoord(s: RegistratieState, vraagId: string, value: string): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n return { ...s, draft: { ...s.draft, antwoorden: { ...s.draft.antwoorden, [vraagId]: value } } };\n}\n\nexport function next(s: RegistratieState): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n const r = validateStep(currentStep(s), s.draft, s.upload);\n if (!r.ok) return { ...s, errors: r.error };\n return { ...s, cursor: Math.min(s.cursor + 1, STEPS.length - 1), errors: {} };\n}\n\nexport function back(s: RegistratieState): RegistratieState {\n if (s.tag !== 'Invullen' || s.cursor === 0) return s;\n return { ...s, cursor: s.cursor - 1, errors: {} };\n}\n\n/** Jump back to an earlier step to correct data (controle → step N). Forward\n jumps are not allowed (would skip validation). Preserves the draft. */\nexport function gaNaarStap(s: RegistratieState, cursor: number): RegistratieState {\n if (s.tag !== 'Invullen' || cursor < 0 || cursor >= s.cursor) return s;\n return { ...s, cursor, errors: {} };\n}\n\nexport function submit(s: RegistratieState): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n const r = validateAll(s.draft, s.upload);\n return r.ok ? { tag: 'Indienen', data: r.value } : { ...s, errors: r.error };\n}\n\n/** Route an upload sub-message through the pure upload reducer (Invullen only). */\nexport function upload(s: RegistratieState, msg: UploadMsg): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n return { ...s, upload: reduceUpload(s.upload, msg) };\n}\n\nexport function resolve(s: RegistratieState, r: Result): RegistratieState {\n if (s.tag !== 'Indienen') return s;\n return r.ok ? { tag: 'Ingediend', data: s.data, referentie: r.value } : { tag: 'Mislukt', data: s.data, error: r.error };\n}\n\nexport type RegistratieMsg =\n | { tag: 'SetField'; key: DraftField; value: string }\n | { tag: 'SetCorrespondentie'; value: Correspondentie }\n | { tag: 'PrefillAdres'; straat: string; postcode: string; woonplaats: string }\n | { tag: 'KiesDiploma'; diplomaId: string; beroep: string; vraagIds: string[] }\n | { tag: 'KiesHandmatig'; vraagIds: string[] }\n | { tag: 'DeclareerBeroep'; beroep: string }\n | { tag: 'SetAntwoord'; vraagId: string; value: string }\n | { tag: 'Next' }\n | { tag: 'Back' }\n | { tag: 'GaNaarStap'; cursor: number }\n | { tag: 'Submit' }\n | { tag: 'Retry' }\n | { tag: 'SubmitConfirmed'; referentie: string }\n | { tag: 'SubmitFailed'; error: string }\n | { tag: 'Upload'; msg: UploadMsg }\n | { tag: 'Seed'; state: RegistratieState };\n\nexport function reduce(s: RegistratieState, m: RegistratieMsg): RegistratieState {\n switch (m.tag) {\n case 'SetField':\n return setField(s, m.key, m.value);\n case 'SetCorrespondentie':\n return setCorrespondentie(s, m.value);\n case 'PrefillAdres':\n return prefillAdres(s, m.straat, m.postcode, m.woonplaats);\n case 'KiesDiploma':\n return kiesDiploma(s, m.diplomaId, m.beroep, m.vraagIds);\n case 'KiesHandmatig':\n return kiesHandmatig(s, m.vraagIds);\n case 'DeclareerBeroep':\n return declareerBeroep(s, m.beroep);\n case 'SetAntwoord':\n return setAntwoord(s, m.vraagId, m.value);\n case 'Next':\n return next(s);\n case 'Back':\n return back(s);\n case 'GaNaarStap':\n return gaNaarStap(s, m.cursor);\n case 'Submit':\n return submit(s);\n case 'Retry':\n return s.tag === 'Mislukt' ? { tag: 'Indienen', data: s.data } : s;\n case 'SubmitConfirmed':\n return s.tag === 'Indienen' ? { tag: 'Ingediend', data: s.data, referentie: m.referentie } : s;\n case 'SubmitFailed':\n return s.tag === 'Indienen' ? { tag: 'Mislukt', data: s.data, error: m.error } : s;\n case 'Upload':\n return upload(s, m.msg);\n case 'Seed':\n return m.state;\n default:\n return assertNever(m);\n }\n}\n", + "sourceCode": "import { Result, ok, err, assertNever } from '@shared/kernel/fp';\nimport { Postcode, parsePostcode } from '@registratie/domain/value-objects/postcode';\nimport { Email, parseEmail } from '@registratie/domain/value-objects/email';\nimport {\n UploadState,\n UploadMsg,\n DeliveryChannel,\n initialUpload,\n reduceUpload,\n requiredCategoriesSatisfied,\n deliveryRefs,\n} from '@shared/upload/upload.machine';\n\n/**\n * A FIXED 3-step registration wizard. The steps never change in number (always\n * `STEPS`): (1) adres + correspondentievoorkeur, (2) beroep o.b.v. diploma,\n * (3) controle & indienen. Follow-up questions appear *inline within a step*\n * (e.g. choosing 'email' reveals the e-mail field). \"Is this field required\n * right now\" is a pure function (`validateStep`), so it is trivial to test and\n * impossible to get out of sync with the data. Invariants live here, not in the\n * UI: the wizard reaches `Indienen` only when a complete `ValidRegistratie` parses.\n */\n\nexport type StepId = 'adres' | 'beroep' | 'controle';\n\n/** The fixed step list. Number of steps never changes; questions reveal inline. */\nexport const STEPS: StepId[] = ['adres', 'beroep', 'controle'];\n\n/** Where a piece of data came from — recorded on the aggregate (PRD §5). */\nexport type AdresHerkomst = 'brp' | 'handmatig';\nexport type DiplomaHerkomst = 'duo' | 'handmatig';\nexport type Correspondentie = 'email' | 'post';\n\n/** One record carried across every step (and persisted). All optional: the user\n fills it in gradually. Adres fields are kept flat so one `SetField` message\n serves them all (mirrors the intake machine). */\nexport interface Draft {\n straat?: string;\n postcode?: string;\n woonplaats?: string;\n adresHerkomst?: AdresHerkomst;\n correspondentie?: Correspondentie;\n email?: string;\n diplomaId?: string;\n diplomaHerkomst?: DiplomaHerkomst;\n beroep?: string; // DERIVED from the chosen DUO diploma (or declared for a manual one)\n vraagIds?: string[]; // ids of the policy questions that apply to the chosen diploma\n antwoorden: Record; // geldigheidsantwoorden, keyed by question id\n}\n\n/** What we have after the controle step parses — guaranteed valid/typed. */\nexport interface ValidRegistratie {\n adres: { straat: string; postcode: Postcode; woonplaats: string };\n adresHerkomst: AdresHerkomst;\n correspondentie: Correspondentie;\n email?: Email; // only when correspondentie === 'email'\n diplomaId: string;\n diplomaHerkomst: DiplomaHerkomst;\n beroep: string;\n antwoorden: Record;\n documents: Array<{ categoryId: string; channel: DeliveryChannel; documentId?: string }>;\n}\n\n/** Text fields settable via SetField. */\nexport type DraftField = 'straat' | 'postcode' | 'woonplaats' | 'email';\n\n/** Per-field error map. `antwoorden` holds per-policy-question errors, keyed by\n question id (a step can show several questions). */\nexport interface Errors {\n straat?: string;\n postcode?: string;\n woonplaats?: string;\n email?: string;\n correspondentie?: string;\n diploma?: string;\n documenten?: string;\n antwoorden?: Record;\n}\n\nexport type RegistratieState =\n | { tag: 'Invullen'; draft: Draft; cursor: number; errors: Errors; upload: UploadState }\n | { tag: 'Indienen'; data: ValidRegistratie }\n | { tag: 'Ingediend'; data: ValidRegistratie; referentie: string }\n | { tag: 'Mislukt'; data: ValidRegistratie; error: string };\n\nconst emptyDraft: Draft = { antwoorden: {} };\nexport const initial: RegistratieState = {\n tag: 'Invullen',\n draft: emptyDraft,\n cursor: 0,\n errors: {},\n upload: initialUpload,\n};\n\n/** Which step the cursor currently points at (clamped to the fixed list). */\nexport function currentStep(s: Extract): StepId {\n return STEPS[Math.min(s.cursor, STEPS.length - 1)];\n}\n\n/** Has the user meaningfully started, so it's worth persisting as a Concept? Excludes\n the automatic BRP address prefill on step 0 — a bare page visit creates nothing.\n ponytail: an address typed at step 0 without any of these signals is not yet\n persisted (created once they advance/choose); accepted regression vs. sessionStorage. */\nexport function hasProgress(s: Extract): boolean {\n const d = s.draft;\n return (\n s.cursor > 0 ||\n !!d.correspondentie ||\n !!d.email ||\n !!d.diplomaId ||\n !!d.beroep ||\n deliveryRefs(s.upload).some((r) => r.channel === 'digital' && !!r.documentId)\n );\n}\n\n/** Validate every question currently visible in ONE step. Errors keyed per field. */\nfunction validateStep(step: StepId, d: Draft, upload: UploadState): Result {\n const errors: Errors = {};\n switch (step) {\n case 'adres': {\n if (!d.straat || d.straat.trim() === '')\n errors.straat = $localize`:@@validation.straat2:Vul een straat en huisnummer in.`;\n const pc = parsePostcode(d.postcode ?? '');\n if (!pc.ok) errors.postcode = pc.error;\n if (!d.woonplaats || d.woonplaats.trim() === '')\n errors.woonplaats = $localize`:@@validation.woonplaats:Vul een woonplaats in.`;\n if (!d.correspondentie)\n errors.correspondentie = $localize`:@@validation.maakKeuze:Maak een keuze.`;\n // E-mail is only required when 'email' is the chosen channel.\n if (d.correspondentie === 'email') {\n const e = parseEmail(d.email ?? '');\n if (!e.ok) errors.email = e.error;\n }\n break;\n }\n case 'beroep': {\n // A diploma must be chosen (or declared manually); its beroep is then known.\n if (!d.diplomaId || !d.beroep) {\n errors.diploma = $localize`:@@validation.diploma:Kies het diploma waarmee u zich wilt registreren, of voer het handmatig in.`;\n break;\n }\n // Every policy question the chosen diploma raised must be answered. Which\n // questions apply is server-decided (carried in `vraagIds`); we only check\n // they're answered.\n const open: Record = {};\n for (const id of d.vraagIds ?? []) {\n if (!(d.antwoorden[id] ?? '').trim())\n open[id] = $localize`:@@validation.beantwoordVraag:Beantwoord deze vraag.`;\n }\n if (Object.keys(open).length > 0) errors.antwoorden = open;\n // Required documents for this wizard attach to the beroep step (inline upload).\n if (!requiredCategoriesSatisfied(upload)) {\n errors.documenten = $localize`:@@validation.documenten:Lever de verplichte documenten aan (upload of kies \"per post nasturen\").`;\n }\n break;\n }\n case 'controle':\n break; // controle shows a summary; no own fields\n default:\n return assertNever(step);\n }\n return Object.keys(errors).length > 0 ? err(errors) : ok(undefined);\n}\n\n/** Parse the whole wizard into a ValidRegistratie (called on submit). */\nfunction validateAll(d: Draft, upload: UploadState): Result {\n const errors: Errors = {};\n for (const step of STEPS) {\n const r = validateStep(step, d, upload);\n if (!r.ok) Object.assign(errors, r.error);\n }\n if (Object.keys(errors).length > 0) return err(errors);\n\n const pc = parsePostcode(d.postcode ?? '');\n // validateStep guaranteed these parse, but keep the compiler happy.\n if (!pc.ok || !d.diplomaId || !d.beroep || !d.correspondentie) return err(errors);\n const email = d.correspondentie === 'email' ? parseEmail(d.email ?? '') : undefined;\n // Keep only the answers to the questions that actually applied.\n const vraagIds = d.vraagIds ?? [];\n const antwoorden = Object.fromEntries(vraagIds.map((id) => [id, d.antwoorden[id] ?? '']));\n\n return ok({\n adres: { straat: d.straat!, postcode: pc.value, woonplaats: d.woonplaats! },\n adresHerkomst: d.adresHerkomst ?? 'handmatig',\n correspondentie: d.correspondentie,\n email: email?.ok ? email.value : undefined,\n diplomaId: d.diplomaId,\n diplomaHerkomst: d.diplomaHerkomst ?? 'handmatig',\n beroep: d.beroep,\n antwoorden,\n documents: deliveryRefs(upload),\n });\n}\n\nexport function setField(s: RegistratieState, key: DraftField, value: string): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n const draft: Draft = { ...s.draft, [key]: value };\n // Editing an address field means the user owns it now — not the BRP copy.\n if (key === 'straat' || key === 'postcode' || key === 'woonplaats')\n draft.adresHerkomst = 'handmatig';\n return { ...s, draft };\n}\n\nexport function setCorrespondentie(s: RegistratieState, value: Correspondentie): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n return { ...s, draft: { ...s.draft, correspondentie: value } };\n}\n\n/** Prefill the address from a BRP lookup and flag its origin (PRD §7). */\nexport function prefillAdres(\n s: RegistratieState,\n straat: string,\n postcode: string,\n woonplaats: string,\n): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n return { ...s, draft: { ...s.draft, straat, postcode, woonplaats, adresHerkomst: 'brp' } };\n}\n\n/** Pick a DUO diploma; the beroep is derived from it and the applicable policy\n questions (`vraagIds`) come with it (both server-computed, passed in). */\nexport function kiesDiploma(\n s: RegistratieState,\n diplomaId: string,\n beroep: string,\n vraagIds: string[],\n): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n return {\n ...s,\n draft: { ...s.draft, diplomaId, beroep, vraagIds, diplomaHerkomst: 'duo' },\n errors: {},\n };\n}\n\n/** Switch to manual diploma entry: the diploma isn't in DUO, so the MAXIMAL\n policy-question set applies and the entry is flagged handmatig/unverified. The\n beroep is declared separately (declareerBeroep). */\nexport function kiesHandmatig(s: RegistratieState, vraagIds: string[]): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n return {\n ...s,\n draft: {\n ...s.draft,\n diplomaId: 'handmatig',\n beroep: undefined,\n vraagIds,\n diplomaHerkomst: 'handmatig',\n },\n errors: {},\n };\n}\n\n/** Declare the beroep for a manually-entered diploma (chosen from a fixed list). */\nexport function declareerBeroep(s: RegistratieState, beroep: string): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n return { ...s, draft: { ...s.draft, beroep } };\n}\n\nexport function setAntwoord(s: RegistratieState, vraagId: string, value: string): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n return { ...s, draft: { ...s.draft, antwoorden: { ...s.draft.antwoorden, [vraagId]: value } } };\n}\n\nexport function next(s: RegistratieState): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n const r = validateStep(currentStep(s), s.draft, s.upload);\n if (!r.ok) return { ...s, errors: r.error };\n return { ...s, cursor: Math.min(s.cursor + 1, STEPS.length - 1), errors: {} };\n}\n\nexport function back(s: RegistratieState): RegistratieState {\n if (s.tag !== 'Invullen' || s.cursor === 0) return s;\n return { ...s, cursor: s.cursor - 1, errors: {} };\n}\n\n/** Jump back to an earlier step to correct data (controle → step N). Forward\n jumps are not allowed (would skip validation). Preserves the draft. */\nexport function gaNaarStap(s: RegistratieState, cursor: number): RegistratieState {\n if (s.tag !== 'Invullen' || cursor < 0 || cursor >= s.cursor) return s;\n return { ...s, cursor, errors: {} };\n}\n\nexport function submit(s: RegistratieState): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n const r = validateAll(s.draft, s.upload);\n return r.ok ? { tag: 'Indienen', data: r.value } : { ...s, errors: r.error };\n}\n\n/** Route an upload sub-message through the pure upload reducer (Invullen only). */\nexport function upload(s: RegistratieState, msg: UploadMsg): RegistratieState {\n if (s.tag !== 'Invullen') return s;\n return { ...s, upload: reduceUpload(s.upload, msg) };\n}\n\nexport function resolve(s: RegistratieState, r: Result): RegistratieState {\n if (s.tag !== 'Indienen') return s;\n return r.ok\n ? { tag: 'Ingediend', data: s.data, referentie: r.value }\n : { tag: 'Mislukt', data: s.data, error: r.error };\n}\n\nexport type RegistratieMsg =\n | { tag: 'SetField'; key: DraftField; value: string }\n | { tag: 'SetCorrespondentie'; value: Correspondentie }\n | { tag: 'PrefillAdres'; straat: string; postcode: string; woonplaats: string }\n | { tag: 'KiesDiploma'; diplomaId: string; beroep: string; vraagIds: string[] }\n | { tag: 'KiesHandmatig'; vraagIds: string[] }\n | { tag: 'DeclareerBeroep'; beroep: string }\n | { tag: 'SetAntwoord'; vraagId: string; value: string }\n | { tag: 'Next' }\n | { tag: 'Back' }\n | { tag: 'GaNaarStap'; cursor: number }\n | { tag: 'Submit' }\n | { tag: 'Retry' }\n | { tag: 'SubmitConfirmed'; referentie: string }\n | { tag: 'SubmitFailed'; error: string }\n | { tag: 'Upload'; msg: UploadMsg }\n | { tag: 'Seed'; state: RegistratieState };\n\nexport function reduce(s: RegistratieState, m: RegistratieMsg): RegistratieState {\n switch (m.tag) {\n case 'SetField':\n return setField(s, m.key, m.value);\n case 'SetCorrespondentie':\n return setCorrespondentie(s, m.value);\n case 'PrefillAdres':\n return prefillAdres(s, m.straat, m.postcode, m.woonplaats);\n case 'KiesDiploma':\n return kiesDiploma(s, m.diplomaId, m.beroep, m.vraagIds);\n case 'KiesHandmatig':\n return kiesHandmatig(s, m.vraagIds);\n case 'DeclareerBeroep':\n return declareerBeroep(s, m.beroep);\n case 'SetAntwoord':\n return setAntwoord(s, m.vraagId, m.value);\n case 'Next':\n return next(s);\n case 'Back':\n return back(s);\n case 'GaNaarStap':\n return gaNaarStap(s, m.cursor);\n case 'Submit':\n return submit(s);\n case 'Retry':\n return s.tag === 'Mislukt' ? { tag: 'Indienen', data: s.data } : s;\n case 'SubmitConfirmed':\n return s.tag === 'Indienen'\n ? { tag: 'Ingediend', data: s.data, referentie: m.referentie }\n : s;\n case 'SubmitFailed':\n return s.tag === 'Indienen' ? { tag: 'Mislukt', data: s.data, error: m.error } : s;\n case 'Upload':\n return upload(s, m.msg);\n case 'Seed':\n return m.state;\n default:\n return assertNever(m);\n }\n}\n", "properties": [ { "name": "antwoorden", @@ -2657,12 +2804,12 @@ }, { "name": "Glyph", - "id": "interface-Glyph-bc824192fb4b5b1e5ca46093e18a138c2c643d35be29ea257636d0b96b1867c3aa6d37f84437e9315f4e8157cdd99351b9bb1fe0f58adadd7cafca9c69d46185", + "id": "interface-Glyph-ae9e44e67ca5bd8c81eb03b421e26b6e483e39ace2f891ea78a64fc371bfba96366ab1b407573fc65454fb8fb4375ade37f8d187e49a3598fe47a762bfbd9be1", "file": "src/app/shared/ui/upload/upload-status-icon/upload-status-icon.component.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "import { Component, computed, input } from '@angular/core';\nimport type { UploadStatus } from '@shared/upload/upload.machine';\n\ninterface Glyph {\n char: string;\n label: string;\n color: string;\n}\n\n/** Atom: a small status glyph for one upload. Pure UI — glyph, colour and a11y\n label derive purely from the status type. */\n@Component({\n selector: 'app-upload-status-icon',\n styles: [`\n .glyph { font-weight: var(--rhc-text-font-weight-semi-bold); }\n `],\n template: `\n @if (glyph()) {\n \n {{ glyph()!.char }}\n \n }\n `,\n})\nexport class UploadStatusIconComponent {\n status = input.required();\n\n protected readonly glyph = computed(() => {\n switch (this.status()) {\n case 'queued':\n return { char: '…', label: $localize`:@@upload.status.queued:In wachtrij`, color: 'var(--rhc-color-foreground-subtle)' };\n case 'uploading':\n return { char: '↑', label: $localize`:@@upload.status.uploading:Bezig met uploaden`, color: 'var(--rhc-color-lintblauw-600)' };\n case 'complete':\n return { char: '✓', label: $localize`:@@upload.status.complete:Geüpload`, color: 'var(--rhc-color-groen-500)' };\n case 'failed':\n return { char: '✕', label: $localize`:@@upload.status.failed:Mislukt`, color: 'var(--rhc-color-rood-500)' };\n case 'deleting':\n return { char: '⟳', label: $localize`:@@upload.status.deleting:Bezig met verwijderen`, color: 'var(--rhc-color-foreground-subtle)' };\n case 'idle':\n case 'deleted':\n return null;\n }\n });\n}\n", + "sourceCode": "import { Component, computed, input } from '@angular/core';\nimport type { UploadStatus } from '@shared/upload/upload.machine';\n\ninterface Glyph {\n char: string;\n label: string;\n color: string;\n}\n\n/** Atom: a small status glyph for one upload. Pure UI — glyph, colour and a11y\n label derive purely from the status type. */\n@Component({\n selector: 'app-upload-status-icon',\n styles: [\n `\n .glyph {\n font-weight: var(--rhc-text-font-weight-semi-bold);\n }\n `,\n ],\n template: `\n @if (glyph()) {\n \n {{ glyph()!.char }}\n \n }\n `,\n})\nexport class UploadStatusIconComponent {\n status = input.required();\n\n protected readonly glyph = computed(() => {\n switch (this.status()) {\n case 'queued':\n return {\n char: '…',\n label: $localize`:@@upload.status.queued:In wachtrij`,\n color: 'var(--rhc-color-foreground-subtle)',\n };\n case 'uploading':\n return {\n char: '↑',\n label: $localize`:@@upload.status.uploading:Bezig met uploaden`,\n color: 'var(--rhc-color-lintblauw-600)',\n };\n case 'complete':\n return {\n char: '✓',\n label: $localize`:@@upload.status.complete:Geüpload`,\n color: 'var(--rhc-color-groen-500)',\n };\n case 'failed':\n return {\n char: '✕',\n label: $localize`:@@upload.status.failed:Mislukt`,\n color: 'var(--rhc-color-rood-500)',\n };\n case 'deleting':\n return {\n char: '⟳',\n label: $localize`:@@upload.status.deleting:Bezig met verwijderen`,\n color: 'var(--rhc-color-foreground-subtle)',\n };\n case 'idle':\n case 'deleted':\n return null;\n }\n });\n}\n", "properties": [ { "name": "char", @@ -2702,12 +2849,12 @@ }, { "name": "HeaderNavItem", - "id": "interface-HeaderNavItem-d54300d0ac696bf6b73475c3fe4a3361abeb7fe500974720d181c345c1522016509451d281951a621c673f50b01b330a5467fe0748789cf5d4a8995bd03c9a95", + "id": "interface-HeaderNavItem-a0c115949f8f7f8c794708a232dd899ff4f8cef791c7c67a268bdab2addb5706bdb2657580819aff599f17276dd46cb703c40aa4db1191cdfa5d5de6e252b16b", "file": "src/app/shared/layout/site-header/site-header.component.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "import { Component, computed, inject } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { NavigationEnd, Router, RouterLink, RouterLinkActive } from '@angular/router';\nimport { filter, map } from 'rxjs/operators';\nimport { SESSION_PORT } from '@shared/application/session.port';\nimport { BreadcrumbComponent } from '@shared/layout/breadcrumb/breadcrumb.component';\nimport { trailFor } from '@shared/layout/breadcrumb/breadcrumb-trail';\n\ninterface HeaderNavItem {\n readonly label: string;\n readonly to: string;\n}\n\nconst NAV_ITEMS: readonly HeaderNavItem[] = [\n { label: $localize`:@@header.nav.overzicht:Overzicht`, to: '/dashboard' },\n { label: $localize`:@@header.nav.gegevens:Mijn gegevens`, to: '/registratie' },\n { label: $localize`:@@header.nav.herregistratie:Herregistratie`, to: '/herregistratie' },\n { label: $localize`:@@header.nav.inschrijven:Inschrijven`, to: '/registreren' },\n];\n\n/** Organism: CIBG Huisstijl site header — logo block, robijn titlebar (breadcrumb +\n user menu), horizontal nav. ponytail: text wordmark, not the licensed Rijksoverheid\n beeldmerk; no search box (no search feature yet). */\n@Component({\n selector: 'app-site-header',\n imports: [RouterLink, RouterLinkActive, BreadcrumbComponent],\n styles: [`\n .logout{background:none;border:0;padding:0;cursor:pointer;text-decoration:underline;font:inherit;color:inherit}\n /* CIBG's header nav has no bg by default in this build — the grey bar is ours.\n (.titlebar keeps its own robijn fill — --ro-layout — untouched; the breadcrumb\n inside it has no background of its own, so the bar's colour shows through.) */\n nav{background-color:var(--rhc-color-cool-grey-200)}\n `],\n template: `\n
\n \n
\n
\n
\n
\n @if (trail().length) { }\n
\n
\n @if (session(); as s) {\n
{{ s.naam }}
\n
\n }\n
\n
\n
\n
\n \n
\n `,\n})\nexport class SiteHeaderComponent {\n protected readonly navItems = NAV_ITEMS;\n\n private router = inject(Router);\n private sessionPort = inject(SESSION_PORT, { optional: true });\n\n readonly session = computed(() => this.sessionPort?.session() ?? null);\n private url = toSignal(\n this.router.events.pipe(filter((e) => e instanceof NavigationEnd), map(() => this.router.url)),\n { initialValue: this.router.url },\n );\n protected trail = computed(() => trailFor(this.url()));\n\n logout() {\n this.sessionPort?.logout();\n this.router.navigate(['/login']);\n }\n}\n", + "sourceCode": "import { Component, computed, inject } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { NavigationEnd, Router, RouterLink, RouterLinkActive } from '@angular/router';\nimport { filter, map } from 'rxjs/operators';\nimport { SESSION_PORT } from '@shared/application/session.port';\nimport { BreadcrumbComponent } from '@shared/layout/breadcrumb/breadcrumb.component';\nimport { trailFor } from '@shared/layout/breadcrumb/breadcrumb-trail';\n\ninterface HeaderNavItem {\n readonly label: string;\n readonly to: string;\n}\n\nconst NAV_ITEMS: readonly HeaderNavItem[] = [\n { label: $localize`:@@header.nav.overzicht:Overzicht`, to: '/dashboard' },\n { label: $localize`:@@header.nav.gegevens:Mijn gegevens`, to: '/registratie' },\n { label: $localize`:@@header.nav.herregistratie:Herregistratie`, to: '/herregistratie' },\n { label: $localize`:@@header.nav.inschrijven:Inschrijven`, to: '/registreren' },\n];\n\n/** Organism: CIBG Huisstijl site header — logo block, robijn titlebar (breadcrumb +\n user menu), horizontal nav. ponytail: text wordmark, not the licensed Rijksoverheid\n beeldmerk; no search box (no search feature yet). */\n@Component({\n selector: 'app-site-header',\n imports: [RouterLink, RouterLinkActive, BreadcrumbComponent],\n styles: [\n `\n .logout {\n background: none;\n border: 0;\n padding: 0;\n cursor: pointer;\n text-decoration: underline;\n font: inherit;\n color: inherit;\n }\n /* CIBG's header nav has no bg by default in this build — the grey bar is ours.\n (.titlebar keeps its own robijn fill — --ro-layout — untouched; the breadcrumb\n inside it has no background of its own, so the bar's colour shows through.) */\n nav {\n background-color: var(--rhc-color-cool-grey-200);\n }\n `,\n ],\n template: `\n
\n \n
\n
\n
\n
\n @if (trail().length) {\n \n }\n
\n
\n @if (session(); as s) {\n
\n {{ s.naam }}\n
\n
\n \n
\n }\n
\n
\n
\n
\n \n
\n `,\n})\nexport class SiteHeaderComponent {\n protected readonly navItems = NAV_ITEMS;\n\n private router = inject(Router);\n private sessionPort = inject(SESSION_PORT, { optional: true });\n\n readonly session = computed(() => this.sessionPort?.session() ?? null);\n private url = toSignal(\n this.router.events.pipe(\n filter((e) => e instanceof NavigationEnd),\n map(() => this.router.url),\n ),\n { initialValue: this.router.url },\n );\n protected trail = computed(() => trailFor(this.url()));\n\n logout() {\n this.sessionPort?.logout();\n this.router.navigate(['/login']);\n }\n}\n", "properties": [ { "name": "label", @@ -2780,12 +2927,12 @@ }, { "name": "HerregistratieDecisionsDto", - "id": "interface-HerregistratieDecisionsDto-134629d19fe3b5e6a76daeb4f10c282202eb1b8380b939c25450bb44b86fcb3df7a15e5ead886ad958b8bb7f158457387fb6c11872acdb4893c4933c2fdef07b", + "id": "interface-HerregistratieDecisionsDto-fb1ee9618e8a58db438478dc30a2ef41f099ba42e2d9a7155300e95c801cc6c2851c481c1bff1e7af3c066bc79e76529bbb37756fed2b5e35a56532325220bab", "file": "src/app/shared/infrastructure/api-client.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", + "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n me(): Promise {\n let url_ = this.baseUrl + \"/api/v1/me\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processMe(_response);\n });\n }\n\n protected processMe(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as MeDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDecisionsDto {\n canEdit?: boolean;\n canApprove?: boolean;\n canReject?: boolean;\n canSend?: boolean;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n decisions?: BriefDecisionsDto;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface MeDto {\n capabilities?: string[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", "properties": [ { "name": "eligibleForHerregistratie", @@ -2795,7 +2942,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1377 + "line": 1421 }, { "name": "herregistratieReason", @@ -2805,7 +2952,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1378 + "line": 1422 } ], "indexSignatures": [], @@ -2815,12 +2962,12 @@ }, { "name": "HerregistratieRequest", - "id": "interface-HerregistratieRequest-134629d19fe3b5e6a76daeb4f10c282202eb1b8380b939c25450bb44b86fcb3df7a15e5ead886ad958b8bb7f158457387fb6c11872acdb4893c4933c2fdef07b", + "id": "interface-HerregistratieRequest-fb1ee9618e8a58db438478dc30a2ef41f099ba42e2d9a7155300e95c801cc6c2851c481c1bff1e7af3c066bc79e76529bbb37756fed2b5e35a56532325220bab", "file": "src/app/shared/infrastructure/api-client.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", + "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n me(): Promise {\n let url_ = this.baseUrl + \"/api/v1/me\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processMe(_response);\n });\n }\n\n protected processMe(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as MeDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDecisionsDto {\n canEdit?: boolean;\n canApprove?: boolean;\n canReject?: boolean;\n canSend?: boolean;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n decisions?: BriefDecisionsDto;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface MeDto {\n capabilities?: string[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", "properties": [ { "name": "documents", @@ -2830,7 +2977,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1383 + "line": 1427 }, { "name": "uren", @@ -2840,7 +2987,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1382 + "line": 1426 } ], "indexSignatures": [], @@ -2850,12 +2997,12 @@ }, { "name": "IntakePolicyDto", - "id": "interface-IntakePolicyDto-134629d19fe3b5e6a76daeb4f10c282202eb1b8380b939c25450bb44b86fcb3df7a15e5ead886ad958b8bb7f158457387fb6c11872acdb4893c4933c2fdef07b", + "id": "interface-IntakePolicyDto-fb1ee9618e8a58db438478dc30a2ef41f099ba42e2d9a7155300e95c801cc6c2851c481c1bff1e7af3c066bc79e76529bbb37756fed2b5e35a56532325220bab", "file": "src/app/shared/infrastructure/api-client.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", + "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n me(): Promise {\n let url_ = this.baseUrl + \"/api/v1/me\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processMe(_response);\n });\n }\n\n protected processMe(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as MeDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDecisionsDto {\n canEdit?: boolean;\n canApprove?: boolean;\n canReject?: boolean;\n canSend?: boolean;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n decisions?: BriefDecisionsDto;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface MeDto {\n capabilities?: string[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", "properties": [ { "name": "scholingThreshold", @@ -2865,7 +3012,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1387 + "line": 1431 } ], "indexSignatures": [], @@ -2875,12 +3022,12 @@ }, { "name": "IntakeRequest", - "id": "interface-IntakeRequest-134629d19fe3b5e6a76daeb4f10c282202eb1b8380b939c25450bb44b86fcb3df7a15e5ead886ad958b8bb7f158457387fb6c11872acdb4893c4933c2fdef07b", + "id": "interface-IntakeRequest-fb1ee9618e8a58db438478dc30a2ef41f099ba42e2d9a7155300e95c801cc6c2851c481c1bff1e7af3c066bc79e76529bbb37756fed2b5e35a56532325220bab", "file": "src/app/shared/infrastructure/api-client.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", + "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n me(): Promise {\n let url_ = this.baseUrl + \"/api/v1/me\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processMe(_response);\n });\n }\n\n protected processMe(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as MeDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDecisionsDto {\n canEdit?: boolean;\n canApprove?: boolean;\n canReject?: boolean;\n canSend?: boolean;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n decisions?: BriefDecisionsDto;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface MeDto {\n capabilities?: string[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", "properties": [ { "name": "uren", @@ -2890,7 +3037,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1391 + "line": 1435 } ], "indexSignatures": [], @@ -2900,12 +3047,12 @@ }, { "name": "LetterBlockDto", - "id": "interface-LetterBlockDto-134629d19fe3b5e6a76daeb4f10c282202eb1b8380b939c25450bb44b86fcb3df7a15e5ead886ad958b8bb7f158457387fb6c11872acdb4893c4933c2fdef07b", + "id": "interface-LetterBlockDto-fb1ee9618e8a58db438478dc30a2ef41f099ba42e2d9a7155300e95c801cc6c2851c481c1bff1e7af3c066bc79e76529bbb37756fed2b5e35a56532325220bab", "file": "src/app/shared/infrastructure/api-client.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", + "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n me(): Promise {\n let url_ = this.baseUrl + \"/api/v1/me\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processMe(_response);\n });\n }\n\n protected processMe(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as MeDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDecisionsDto {\n canEdit?: boolean;\n canApprove?: boolean;\n canReject?: boolean;\n canSend?: boolean;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n decisions?: BriefDecisionsDto;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface MeDto {\n capabilities?: string[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", "properties": [ { "name": "blockId", @@ -2915,7 +3062,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1396 + "line": 1440 }, { "name": "content", @@ -2925,7 +3072,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1397 + "line": 1441 }, { "name": "edited", @@ -2935,7 +3082,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1400 + "line": 1444 }, { "name": "sourcePassageId", @@ -2945,7 +3092,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1398 + "line": 1442 }, { "name": "sourceVersion", @@ -2955,7 +3102,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1399 + "line": 1443 }, { "name": "type", @@ -2965,7 +3112,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1395 + "line": 1439 } ], "indexSignatures": [], @@ -2975,12 +3122,12 @@ }, { "name": "LetterSection", - "id": "interface-LetterSection-039c5d6b394bb2232cfe3dcb751c570fd3683a09171bc3d7a7a6498185bff667b40236840f0c1010e79861a99c27279a3c324ae82cebd97ef0a73f87f27878a4", + "id": "interface-LetterSection-26aef4f3009ac7786c37d55aa31ae2c74313694364bf3ec3112e7a1d1890fd4b265dd8b5ec955ea190df6ac75fd6fcbb8fc7693efc4957323a08aa13056b99b5", "file": "src/app/brief/domain/brief.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "import { RichTextBlock, placeholderKeysIn } from '@shared/kernel/rich-text';\nimport { Diagnostic, lintPlaceholders, PlaceholderDef } from './placeholders';\n\n/**\n * The `Brief` (letter) entity and its derived selectors.\n *\n * A letter has a FIXED section structure (from a template, server-instantiated); the\n * drafter fills a skeleton, never reorders sections. Each block is either a frozen\n * snapshot of a library passage (provenance kept) or free text. Everything the UI\n * needs beyond the stored shape — diagnostics, unresolved placeholders, whether it\n * can be submitted — is DERIVED here, never stored.\n */\n\nexport type PassageScope = 'global' | 'beroep';\n\n// Re-export placeholderKeysIn for one-import convenience at call sites.\nexport { placeholderKeysIn };\n\n/** A passage in the library (the source). Snapshotted into a letter on insert. */\nexport interface LibraryPassage {\n readonly passageId: string;\n readonly scope: PassageScope;\n readonly beroep?: string; // set when scope === 'beroep'\n readonly sectionKey: string;\n readonly label: string;\n readonly content: RichTextBlock;\n readonly version: number; // library version, for provenance only\n}\n\n/** A block inside a letter section: a frozen passage snapshot, or free text. */\nexport type LetterBlock =\n | {\n readonly type: 'passage';\n readonly blockId: string;\n readonly sourcePassageId: string; // provenance\n readonly sourceVersion: number; // library version at snapshot time (audit only)\n readonly content: RichTextBlock; // FROZEN, possibly edited — source of truth for this block\n readonly edited: boolean; // changed from the snapshot?\n }\n | {\n readonly type: 'freeText';\n readonly blockId: string;\n readonly content: RichTextBlock;\n };\n\nexport interface LetterSection {\n readonly sectionKey: string;\n readonly title: string;\n readonly required: boolean;\n // Predefined template sections (aanhef, slot) arrive locked and prefilled — the drafter\n // composes only the unlocked section(s). The reducer refuses edits to locked sections.\n readonly locked: boolean;\n readonly blocks: readonly LetterBlock[];\n}\n\n/** The approval state machine as a sum type — transitions are total and guarded in\n `brief.machine.ts`; illegal transitions are unrepresentable. */\nexport type BriefStatus =\n | { readonly tag: 'draft' }\n | { readonly tag: 'submitted'; readonly submittedBy: string; readonly submittedAt: string }\n | { readonly tag: 'approved'; readonly approvedBy: string; readonly approvedAt: string }\n | { readonly tag: 'rejected'; readonly rejectedBy: string; readonly rejectedAt: string; readonly comments: string }\n | { readonly tag: 'sent'; readonly sentAt: string };\n\nexport interface Brief {\n readonly briefId: string;\n readonly beroep: string; // drives which beroep-scoped passages apply\n readonly templateId: string;\n readonly placeholders: readonly PlaceholderDef[]; // valid fields for this letter\n readonly sections: readonly LetterSection[]; // instantiated from the template, in order\n readonly status: BriefStatus;\n readonly drafterId: string;\n}\n\n// --- Derived selectors (pure; recomputed, never stored) ---\n\nexport function allBlocks(brief: Brief): LetterBlock[] {\n return brief.sections.flatMap((s) => s.blocks);\n}\n\n/** Every diagnostic in the letter, in section→block→node order. This is what the\n diagnostics panel renders and what the send gate checks. */\nexport function allDiagnostics(brief: Brief): Diagnostic[] {\n return allBlocks(brief).flatMap((b) => lintPlaceholders(b.content, brief.placeholders, b.blockId));\n}\n\nexport function hasBlockingErrors(diagnostics: readonly Diagnostic[]): boolean {\n return diagnostics.some((d) => d.severity === 'error');\n}\n\n/** Manual (non-auto-resolvable) placeholder keys still present, deduped. These are the\n `unresolved-at-send` warnings, surfaced as a completeness list. */\nexport function unresolvedPlaceholders(brief: Brief): string[] {\n const auto = new Set(brief.placeholders.filter((p) => p.autoResolvable).map((p) => p.key));\n const used = allBlocks(brief).flatMap((b) => placeholderKeysIn(b.content));\n return [...new Set(used.filter((k) => !auto.has(k)))];\n}\n\n/** A letter can be submitted only when every REQUIRED section has at least one block. */\nexport function canSubmit(brief: Brief): boolean {\n return brief.sections.every((s) => !s.required || s.blocks.length > 0);\n}\n", + "sourceCode": "import { RichTextBlock, placeholderKeysIn } from '@shared/kernel/rich-text';\nimport { Diagnostic, lintPlaceholders, PlaceholderDef } from './placeholders';\n\n/**\n * The `Brief` (letter) entity and its derived selectors.\n *\n * A letter has a FIXED section structure (from a template, server-instantiated); the\n * drafter fills a skeleton, never reorders sections. Each block is either a frozen\n * snapshot of a library passage (provenance kept) or free text. Everything the UI\n * needs beyond the stored shape — diagnostics, unresolved placeholders, whether it\n * can be submitted — is DERIVED here, never stored.\n */\n\nexport type PassageScope = 'global' | 'beroep';\n\n// Re-export placeholderKeysIn for one-import convenience at call sites.\nexport { placeholderKeysIn };\n\n/** A passage in the library (the source). Snapshotted into a letter on insert. */\nexport interface LibraryPassage {\n readonly passageId: string;\n readonly scope: PassageScope;\n readonly beroep?: string; // set when scope === 'beroep'\n readonly sectionKey: string;\n readonly label: string;\n readonly content: RichTextBlock;\n readonly version: number; // library version, for provenance only\n}\n\n/** A block inside a letter section: a frozen passage snapshot, or free text. */\nexport type LetterBlock =\n | {\n readonly type: 'passage';\n readonly blockId: string;\n readonly sourcePassageId: string; // provenance\n readonly sourceVersion: number; // library version at snapshot time (audit only)\n readonly content: RichTextBlock; // FROZEN, possibly edited — source of truth for this block\n readonly edited: boolean; // changed from the snapshot?\n }\n | {\n readonly type: 'freeText';\n readonly blockId: string;\n readonly content: RichTextBlock;\n };\n\nexport interface LetterSection {\n readonly sectionKey: string;\n readonly title: string;\n readonly required: boolean;\n // Predefined template sections (aanhef, slot) arrive locked and prefilled — the drafter\n // composes only the unlocked section(s). The reducer refuses edits to locked sections.\n readonly locked: boolean;\n readonly blocks: readonly LetterBlock[];\n}\n\n/** The approval state machine as a sum type — transitions are total and guarded in\n `brief.machine.ts`; illegal transitions are unrepresentable. */\nexport type BriefStatus =\n | { readonly tag: 'draft' }\n | { readonly tag: 'submitted'; readonly submittedBy: string; readonly submittedAt: string }\n | { readonly tag: 'approved'; readonly approvedBy: string; readonly approvedAt: string }\n | {\n readonly tag: 'rejected';\n readonly rejectedBy: string;\n readonly rejectedAt: string;\n readonly comments: string;\n }\n | { readonly tag: 'sent'; readonly sentAt: string };\n\nexport interface Brief {\n readonly briefId: string;\n readonly beroep: string; // drives which beroep-scoped passages apply\n readonly templateId: string;\n readonly placeholders: readonly PlaceholderDef[]; // valid fields for this letter\n readonly sections: readonly LetterSection[]; // instantiated from the template, in order\n readonly status: BriefStatus;\n readonly drafterId: string;\n}\n\n// --- Derived selectors (pure; recomputed, never stored) ---\n\nexport function allBlocks(brief: Brief): LetterBlock[] {\n return brief.sections.flatMap((s) => s.blocks);\n}\n\n/** Every diagnostic in the letter, in section→block→node order. This is what the\n diagnostics panel renders and what the send gate checks. */\nexport function allDiagnostics(brief: Brief): Diagnostic[] {\n return allBlocks(brief).flatMap((b) =>\n lintPlaceholders(b.content, brief.placeholders, b.blockId),\n );\n}\n\nexport function hasBlockingErrors(diagnostics: readonly Diagnostic[]): boolean {\n return diagnostics.some((d) => d.severity === 'error');\n}\n\n/** Manual (non-auto-resolvable) placeholder keys still present, deduped. These are the\n `unresolved-at-send` warnings, surfaced as a completeness list. */\nexport function unresolvedPlaceholders(brief: Brief): string[] {\n const auto = new Set(brief.placeholders.filter((p) => p.autoResolvable).map((p) => p.key));\n const used = allBlocks(brief).flatMap((b) => placeholderKeysIn(b.content));\n return [...new Set(used.filter((k) => !auto.has(k)))];\n}\n\n/** A letter can be submitted only when every REQUIRED section has at least one block. */\nexport function canSubmit(brief: Brief): boolean {\n return brief.sections.every((s) => !s.required || s.blocks.length > 0);\n}\n\n/** Server-computed decision flags for the acting principal + this brief's live\n status (PRD-0002 phase P1) — rendered as-is, never recomputed here. */\nexport interface BriefDecisions {\n readonly canEdit: boolean;\n readonly canApprove: boolean;\n readonly canReject: boolean;\n readonly canSend: boolean;\n}\n", "properties": [ { "name": "blocks", @@ -3055,12 +3202,12 @@ }, { "name": "LetterSectionDto", - "id": "interface-LetterSectionDto-134629d19fe3b5e6a76daeb4f10c282202eb1b8380b939c25450bb44b86fcb3df7a15e5ead886ad958b8bb7f158457387fb6c11872acdb4893c4933c2fdef07b", + "id": "interface-LetterSectionDto-fb1ee9618e8a58db438478dc30a2ef41f099ba42e2d9a7155300e95c801cc6c2851c481c1bff1e7af3c066bc79e76529bbb37756fed2b5e35a56532325220bab", "file": "src/app/shared/infrastructure/api-client.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", + "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n me(): Promise {\n let url_ = this.baseUrl + \"/api/v1/me\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processMe(_response);\n });\n }\n\n protected processMe(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as MeDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDecisionsDto {\n canEdit?: boolean;\n canApprove?: boolean;\n canReject?: boolean;\n canSend?: boolean;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n decisions?: BriefDecisionsDto;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface MeDto {\n capabilities?: string[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", "properties": [ { "name": "blocks", @@ -3070,7 +3217,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1407 + "line": 1451 }, { "name": "locked", @@ -3080,7 +3227,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1408 + "line": 1452 }, { "name": "required", @@ -3090,7 +3237,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1406 + "line": 1450 }, { "name": "sectionKey", @@ -3100,7 +3247,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1404 + "line": 1448 }, { "name": "title", @@ -3110,7 +3257,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1405 + "line": 1449 } ], "indexSignatures": [], @@ -3120,12 +3267,12 @@ }, { "name": "LibraryPassage", - "id": "interface-LibraryPassage-039c5d6b394bb2232cfe3dcb751c570fd3683a09171bc3d7a7a6498185bff667b40236840f0c1010e79861a99c27279a3c324ae82cebd97ef0a73f87f27878a4", + "id": "interface-LibraryPassage-26aef4f3009ac7786c37d55aa31ae2c74313694364bf3ec3112e7a1d1890fd4b265dd8b5ec955ea190df6ac75fd6fcbb8fc7693efc4957323a08aa13056b99b5", "file": "src/app/brief/domain/brief.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "import { RichTextBlock, placeholderKeysIn } from '@shared/kernel/rich-text';\nimport { Diagnostic, lintPlaceholders, PlaceholderDef } from './placeholders';\n\n/**\n * The `Brief` (letter) entity and its derived selectors.\n *\n * A letter has a FIXED section structure (from a template, server-instantiated); the\n * drafter fills a skeleton, never reorders sections. Each block is either a frozen\n * snapshot of a library passage (provenance kept) or free text. Everything the UI\n * needs beyond the stored shape — diagnostics, unresolved placeholders, whether it\n * can be submitted — is DERIVED here, never stored.\n */\n\nexport type PassageScope = 'global' | 'beroep';\n\n// Re-export placeholderKeysIn for one-import convenience at call sites.\nexport { placeholderKeysIn };\n\n/** A passage in the library (the source). Snapshotted into a letter on insert. */\nexport interface LibraryPassage {\n readonly passageId: string;\n readonly scope: PassageScope;\n readonly beroep?: string; // set when scope === 'beroep'\n readonly sectionKey: string;\n readonly label: string;\n readonly content: RichTextBlock;\n readonly version: number; // library version, for provenance only\n}\n\n/** A block inside a letter section: a frozen passage snapshot, or free text. */\nexport type LetterBlock =\n | {\n readonly type: 'passage';\n readonly blockId: string;\n readonly sourcePassageId: string; // provenance\n readonly sourceVersion: number; // library version at snapshot time (audit only)\n readonly content: RichTextBlock; // FROZEN, possibly edited — source of truth for this block\n readonly edited: boolean; // changed from the snapshot?\n }\n | {\n readonly type: 'freeText';\n readonly blockId: string;\n readonly content: RichTextBlock;\n };\n\nexport interface LetterSection {\n readonly sectionKey: string;\n readonly title: string;\n readonly required: boolean;\n // Predefined template sections (aanhef, slot) arrive locked and prefilled — the drafter\n // composes only the unlocked section(s). The reducer refuses edits to locked sections.\n readonly locked: boolean;\n readonly blocks: readonly LetterBlock[];\n}\n\n/** The approval state machine as a sum type — transitions are total and guarded in\n `brief.machine.ts`; illegal transitions are unrepresentable. */\nexport type BriefStatus =\n | { readonly tag: 'draft' }\n | { readonly tag: 'submitted'; readonly submittedBy: string; readonly submittedAt: string }\n | { readonly tag: 'approved'; readonly approvedBy: string; readonly approvedAt: string }\n | { readonly tag: 'rejected'; readonly rejectedBy: string; readonly rejectedAt: string; readonly comments: string }\n | { readonly tag: 'sent'; readonly sentAt: string };\n\nexport interface Brief {\n readonly briefId: string;\n readonly beroep: string; // drives which beroep-scoped passages apply\n readonly templateId: string;\n readonly placeholders: readonly PlaceholderDef[]; // valid fields for this letter\n readonly sections: readonly LetterSection[]; // instantiated from the template, in order\n readonly status: BriefStatus;\n readonly drafterId: string;\n}\n\n// --- Derived selectors (pure; recomputed, never stored) ---\n\nexport function allBlocks(brief: Brief): LetterBlock[] {\n return brief.sections.flatMap((s) => s.blocks);\n}\n\n/** Every diagnostic in the letter, in section→block→node order. This is what the\n diagnostics panel renders and what the send gate checks. */\nexport function allDiagnostics(brief: Brief): Diagnostic[] {\n return allBlocks(brief).flatMap((b) => lintPlaceholders(b.content, brief.placeholders, b.blockId));\n}\n\nexport function hasBlockingErrors(diagnostics: readonly Diagnostic[]): boolean {\n return diagnostics.some((d) => d.severity === 'error');\n}\n\n/** Manual (non-auto-resolvable) placeholder keys still present, deduped. These are the\n `unresolved-at-send` warnings, surfaced as a completeness list. */\nexport function unresolvedPlaceholders(brief: Brief): string[] {\n const auto = new Set(brief.placeholders.filter((p) => p.autoResolvable).map((p) => p.key));\n const used = allBlocks(brief).flatMap((b) => placeholderKeysIn(b.content));\n return [...new Set(used.filter((k) => !auto.has(k)))];\n}\n\n/** A letter can be submitted only when every REQUIRED section has at least one block. */\nexport function canSubmit(brief: Brief): boolean {\n return brief.sections.every((s) => !s.required || s.blocks.length > 0);\n}\n", + "sourceCode": "import { RichTextBlock, placeholderKeysIn } from '@shared/kernel/rich-text';\nimport { Diagnostic, lintPlaceholders, PlaceholderDef } from './placeholders';\n\n/**\n * The `Brief` (letter) entity and its derived selectors.\n *\n * A letter has a FIXED section structure (from a template, server-instantiated); the\n * drafter fills a skeleton, never reorders sections. Each block is either a frozen\n * snapshot of a library passage (provenance kept) or free text. Everything the UI\n * needs beyond the stored shape — diagnostics, unresolved placeholders, whether it\n * can be submitted — is DERIVED here, never stored.\n */\n\nexport type PassageScope = 'global' | 'beroep';\n\n// Re-export placeholderKeysIn for one-import convenience at call sites.\nexport { placeholderKeysIn };\n\n/** A passage in the library (the source). Snapshotted into a letter on insert. */\nexport interface LibraryPassage {\n readonly passageId: string;\n readonly scope: PassageScope;\n readonly beroep?: string; // set when scope === 'beroep'\n readonly sectionKey: string;\n readonly label: string;\n readonly content: RichTextBlock;\n readonly version: number; // library version, for provenance only\n}\n\n/** A block inside a letter section: a frozen passage snapshot, or free text. */\nexport type LetterBlock =\n | {\n readonly type: 'passage';\n readonly blockId: string;\n readonly sourcePassageId: string; // provenance\n readonly sourceVersion: number; // library version at snapshot time (audit only)\n readonly content: RichTextBlock; // FROZEN, possibly edited — source of truth for this block\n readonly edited: boolean; // changed from the snapshot?\n }\n | {\n readonly type: 'freeText';\n readonly blockId: string;\n readonly content: RichTextBlock;\n };\n\nexport interface LetterSection {\n readonly sectionKey: string;\n readonly title: string;\n readonly required: boolean;\n // Predefined template sections (aanhef, slot) arrive locked and prefilled — the drafter\n // composes only the unlocked section(s). The reducer refuses edits to locked sections.\n readonly locked: boolean;\n readonly blocks: readonly LetterBlock[];\n}\n\n/** The approval state machine as a sum type — transitions are total and guarded in\n `brief.machine.ts`; illegal transitions are unrepresentable. */\nexport type BriefStatus =\n | { readonly tag: 'draft' }\n | { readonly tag: 'submitted'; readonly submittedBy: string; readonly submittedAt: string }\n | { readonly tag: 'approved'; readonly approvedBy: string; readonly approvedAt: string }\n | {\n readonly tag: 'rejected';\n readonly rejectedBy: string;\n readonly rejectedAt: string;\n readonly comments: string;\n }\n | { readonly tag: 'sent'; readonly sentAt: string };\n\nexport interface Brief {\n readonly briefId: string;\n readonly beroep: string; // drives which beroep-scoped passages apply\n readonly templateId: string;\n readonly placeholders: readonly PlaceholderDef[]; // valid fields for this letter\n readonly sections: readonly LetterSection[]; // instantiated from the template, in order\n readonly status: BriefStatus;\n readonly drafterId: string;\n}\n\n// --- Derived selectors (pure; recomputed, never stored) ---\n\nexport function allBlocks(brief: Brief): LetterBlock[] {\n return brief.sections.flatMap((s) => s.blocks);\n}\n\n/** Every diagnostic in the letter, in section→block→node order. This is what the\n diagnostics panel renders and what the send gate checks. */\nexport function allDiagnostics(brief: Brief): Diagnostic[] {\n return allBlocks(brief).flatMap((b) =>\n lintPlaceholders(b.content, brief.placeholders, b.blockId),\n );\n}\n\nexport function hasBlockingErrors(diagnostics: readonly Diagnostic[]): boolean {\n return diagnostics.some((d) => d.severity === 'error');\n}\n\n/** Manual (non-auto-resolvable) placeholder keys still present, deduped. These are the\n `unresolved-at-send` warnings, surfaced as a completeness list. */\nexport function unresolvedPlaceholders(brief: Brief): string[] {\n const auto = new Set(brief.placeholders.filter((p) => p.autoResolvable).map((p) => p.key));\n const used = allBlocks(brief).flatMap((b) => placeholderKeysIn(b.content));\n return [...new Set(used.filter((k) => !auto.has(k)))];\n}\n\n/** A letter can be submitted only when every REQUIRED section has at least one block. */\nexport function canSubmit(brief: Brief): boolean {\n return brief.sections.every((s) => !s.required || s.blocks.length > 0);\n}\n\n/** Server-computed decision flags for the acting principal + this brief's live\n status (PRD-0002 phase P1) — rendered as-is, never recomputed here. */\nexport interface BriefDecisions {\n readonly canEdit: boolean;\n readonly canApprove: boolean;\n readonly canReject: boolean;\n readonly canSend: boolean;\n}\n", "properties": [ { "name": "beroep", @@ -3228,12 +3375,12 @@ }, { "name": "LibraryPassageDto", - "id": "interface-LibraryPassageDto-134629d19fe3b5e6a76daeb4f10c282202eb1b8380b939c25450bb44b86fcb3df7a15e5ead886ad958b8bb7f158457387fb6c11872acdb4893c4933c2fdef07b", + "id": "interface-LibraryPassageDto-fb1ee9618e8a58db438478dc30a2ef41f099ba42e2d9a7155300e95c801cc6c2851c481c1bff1e7af3c066bc79e76529bbb37756fed2b5e35a56532325220bab", "file": "src/app/shared/infrastructure/api-client.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", + "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n me(): Promise {\n let url_ = this.baseUrl + \"/api/v1/me\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processMe(_response);\n });\n }\n\n protected processMe(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as MeDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDecisionsDto {\n canEdit?: boolean;\n canApprove?: boolean;\n canReject?: boolean;\n canSend?: boolean;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n decisions?: BriefDecisionsDto;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface MeDto {\n capabilities?: string[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", "properties": [ { "name": "beroep", @@ -3243,7 +3390,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1418 + "line": 1462 }, { "name": "content", @@ -3253,7 +3400,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1416 + "line": 1460 }, { "name": "label", @@ -3263,7 +3410,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1415 + "line": 1459 }, { "name": "passageId", @@ -3273,7 +3420,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1412 + "line": 1456 }, { "name": "scope", @@ -3283,7 +3430,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1413 + "line": 1457 }, { "name": "sectionKey", @@ -3293,7 +3440,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1414 + "line": 1458 }, { "name": "version", @@ -3303,7 +3450,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1417 + "line": 1461 } ], "indexSignatures": [], @@ -3313,12 +3460,12 @@ }, { "name": "ManualDiplomaPolicyDto", - "id": "interface-ManualDiplomaPolicyDto-134629d19fe3b5e6a76daeb4f10c282202eb1b8380b939c25450bb44b86fcb3df7a15e5ead886ad958b8bb7f158457387fb6c11872acdb4893c4933c2fdef07b", + "id": "interface-ManualDiplomaPolicyDto-fb1ee9618e8a58db438478dc30a2ef41f099ba42e2d9a7155300e95c801cc6c2851c481c1bff1e7af3c066bc79e76529bbb37756fed2b5e35a56532325220bab", "file": "src/app/shared/infrastructure/api-client.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", + "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n me(): Promise {\n let url_ = this.baseUrl + \"/api/v1/me\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processMe(_response);\n });\n }\n\n protected processMe(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as MeDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDecisionsDto {\n canEdit?: boolean;\n canApprove?: boolean;\n canReject?: boolean;\n canSend?: boolean;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n decisions?: BriefDecisionsDto;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface MeDto {\n capabilities?: string[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", "properties": [ { "name": "beroepen", @@ -3328,7 +3475,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1422 + "line": 1466 }, { "name": "policyQuestions", @@ -3338,7 +3485,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1423 + "line": 1467 } ], "indexSignatures": [], @@ -3384,6 +3531,31 @@ "duplicateId": 1, "duplicateName": "ManualDiplomaPolicyDto-1" }, + { + "name": "MeDto", + "id": "interface-MeDto-fb1ee9618e8a58db438478dc30a2ef41f099ba42e2d9a7155300e95c801cc6c2851c481c1bff1e7af3c066bc79e76529bbb37756fed2b5e35a56532325220bab", + "file": "src/app/shared/infrastructure/api-client.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n me(): Promise {\n let url_ = this.baseUrl + \"/api/v1/me\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processMe(_response);\n });\n }\n\n protected processMe(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as MeDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDecisionsDto {\n canEdit?: boolean;\n canApprove?: boolean;\n canReject?: boolean;\n canSend?: boolean;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n decisions?: BriefDecisionsDto;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface MeDto {\n capabilities?: string[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", + "properties": [ + { + "name": "capabilities", + "deprecated": false, + "deprecationMessage": "", + "type": "string[] | undefined", + "indexKey": "", + "optional": true, + "description": "", + "line": 1471 + } + ], + "indexSignatures": [], + "kind": 172, + "methods": [], + "extends": [] + }, { "name": "Paragraph", "id": "interface-Paragraph-c2d889eaa693df9c04ea212ab04e3ecf791f72b27c8dbf611134586bea92876ed6887499f9c8e58c49023b46f7373f68901d75b46539efc375fbb84f97d79aa2", @@ -3427,12 +3599,12 @@ }, { "name": "ParagraphDto", - "id": "interface-ParagraphDto-134629d19fe3b5e6a76daeb4f10c282202eb1b8380b939c25450bb44b86fcb3df7a15e5ead886ad958b8bb7f158457387fb6c11872acdb4893c4933c2fdef07b", + "id": "interface-ParagraphDto-fb1ee9618e8a58db438478dc30a2ef41f099ba42e2d9a7155300e95c801cc6c2851c481c1bff1e7af3c066bc79e76529bbb37756fed2b5e35a56532325220bab", "file": "src/app/shared/infrastructure/api-client.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", + "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n me(): Promise {\n let url_ = this.baseUrl + \"/api/v1/me\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processMe(_response);\n });\n }\n\n protected processMe(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as MeDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDecisionsDto {\n canEdit?: boolean;\n canApprove?: boolean;\n canReject?: boolean;\n canSend?: boolean;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n decisions?: BriefDecisionsDto;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface MeDto {\n capabilities?: string[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", "properties": [ { "name": "list", @@ -3442,7 +3614,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1428 + "line": 1476 }, { "name": "nodes", @@ -3452,7 +3624,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1427 + "line": 1475 } ], "indexSignatures": [], @@ -3507,12 +3679,12 @@ }, { "name": "PersonDto", - "id": "interface-PersonDto-134629d19fe3b5e6a76daeb4f10c282202eb1b8380b939c25450bb44b86fcb3df7a15e5ead886ad958b8bb7f158457387fb6c11872acdb4893c4933c2fdef07b", + "id": "interface-PersonDto-fb1ee9618e8a58db438478dc30a2ef41f099ba42e2d9a7155300e95c801cc6c2851c481c1bff1e7af3c066bc79e76529bbb37756fed2b5e35a56532325220bab", "file": "src/app/shared/infrastructure/api-client.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", + "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n me(): Promise {\n let url_ = this.baseUrl + \"/api/v1/me\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processMe(_response);\n });\n }\n\n protected processMe(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as MeDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDecisionsDto {\n canEdit?: boolean;\n canApprove?: boolean;\n canReject?: boolean;\n canSend?: boolean;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n decisions?: BriefDecisionsDto;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface MeDto {\n capabilities?: string[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", "properties": [ { "name": "adres", @@ -3522,7 +3694,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1434 + "line": 1482 }, { "name": "geboortedatum", @@ -3532,7 +3704,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1433 + "line": 1481 }, { "name": "naam", @@ -3542,7 +3714,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1432 + "line": 1480 } ], "indexSignatures": [], @@ -3600,12 +3772,12 @@ }, { "name": "PlaceholderDef", - "id": "interface-PlaceholderDef-7cd6b7f0437b0e74cbd408b88e6dceda3d58ed0171b5fc3baf66911b7dae607149d424cee85829f75b69eef30cea3d3978b49dd3d8ecdd5311e71533576fd713", + "id": "interface-PlaceholderDef-24aa1b1685594bea112d1b3c31df103c636a268f289c497bc10188a5406317268811107fbc86521cae511b7156f1d0967e6a409ccffcc903a367eafa46bb7e21", "file": "src/app/brief/domain/placeholders.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "import { RichTextBlock } from '@shared/kernel/rich-text';\n\n/**\n * Placeholder fields and the PURE linter over them.\n *\n * `lintPlaceholders` is a total, effect-free function of (content, valid set). It\n * runs identically on the client (for live UX) and could run on the server (for\n * authority) — same rules, same config, so the two agree by construction. The FE\n * never STORES its output: diagnostics are a `computed()` over content (see\n * `brief.ts` selectors), the same \"derive, don't store\" discipline as wizard step\n * validity.\n */\n\n/** A placeholder field the template knows about. `fillable`/`deprecated` default to\n the healthy case; the seed flips them to exercise the not-fillable/deprecated rules. */\nexport interface PlaceholderDef {\n readonly key: string; // e.g. 'naam_zorgverlener'\n readonly label: string; // human label for the insert menu, e.g. 'Naam zorgverlener'\n readonly autoResolvable: boolean; // server can fill from case data (name, date, …)\n readonly fillable?: boolean; // default true; false → not resolvable for this beroep/case type\n readonly deprecated?: boolean; // default false; true → retired but still referenceable in old snapshots\n}\n\nexport type DiagnosticSeverity = 'error' | 'warning';\n\nexport type DiagnosticCode =\n | 'malformed' // raw braces in a text node (a paste that should have been a chip)\n | 'unknown-placeholder' // well-formed key not in the valid set\n | 'not-fillable' // key exists but isn't resolvable for this case type / beroep\n | 'deprecated' // key was valid once but the template no longer offers it\n | 'unresolved-at-send'; // manual (non-auto-resolvable) placeholder still to be filled\n\nexport interface DiagnosticLocation {\n readonly blockId: string;\n readonly paragraphIndex: number;\n readonly nodeIndex: number;\n}\n\nexport interface Diagnostic {\n readonly severity: DiagnosticSeverity;\n readonly code: DiagnosticCode;\n readonly placeholderKey?: string;\n readonly location: DiagnosticLocation;\n readonly message: string; // human-readable, Dutch\n}\n\n/** `error` blocks save (author time) and send (send time); `warning` is surfaced but allowed. */\nexport function severityOf(code: DiagnosticCode): DiagnosticSeverity {\n switch (code) {\n case 'malformed':\n case 'unknown-placeholder':\n case 'not-fillable':\n return 'error';\n case 'deprecated':\n case 'unresolved-at-send':\n return 'warning';\n }\n}\n\n// Raw `{{` or `}}` in text — the only way a malformed placeholder can exist, since\n// menu insertion always produces a proper placeholder NODE. Paste safety net.\nconst RAW_BRACES = /\\{\\{|\\}\\}/;\n\nfunction messageFor(code: DiagnosticCode, key?: string): string {\n switch (code) {\n case 'malformed':\n return $localize`:@@brief.lint.malformed:Deze tekst bevat losse accolades ({{ of }}). Voeg een veld toe via het menu in plaats van het te typen.`;\n case 'unknown-placeholder':\n return $localize`:@@brief.lint.unknown:Onbekend veld “${key}:key:”. Dit veld hoort niet bij dit sjabloon.`;\n case 'not-fillable':\n return $localize`:@@brief.lint.notFillable:Veld “${key}:key:” kan niet worden ingevuld voor dit beroep.`;\n case 'deprecated':\n return $localize`:@@brief.lint.deprecated:Veld “${key}:key:” is verouderd en wordt niet meer aangeboden.`;\n case 'unresolved-at-send':\n return $localize`:@@brief.lint.unresolved:Veld “${key}:key:” wordt handmatig ingevuld en is nog leeg.`;\n }\n}\n\nfunction diag(code: DiagnosticCode, location: DiagnosticLocation, key?: string): Diagnostic {\n return { severity: severityOf(code), code, placeholderKey: key, location, message: messageFor(code, key) };\n}\n\n/**\n * Lint one block against the template's placeholder set. Pure: given the same\n * content + valid set + blockId it always returns the same diagnostics, in\n * document order. One diagnostic per node at most (most-severe wins).\n */\nexport function lintPlaceholders(\n content: RichTextBlock,\n valid: readonly PlaceholderDef[],\n blockId: string,\n): Diagnostic[] {\n const byKey = new Map(valid.map((p) => [p.key, p]));\n const out: Diagnostic[] = [];\n\n content.paragraphs.forEach((p, paragraphIndex) => {\n p.nodes.forEach((n, nodeIndex) => {\n const location: DiagnosticLocation = { blockId, paragraphIndex, nodeIndex };\n if (n.type === 'text') {\n if (RAW_BRACES.test(n.text)) out.push(diag('malformed', location));\n return;\n }\n if (n.type !== 'placeholder') return; // lineBreak — nothing to check\n\n const def = byKey.get(n.key);\n if (!def) out.push(diag('unknown-placeholder', location, n.key));\n else if (def.fillable === false) out.push(diag('not-fillable', location, n.key));\n else if (def.deprecated) out.push(diag('deprecated', location, n.key));\n else if (!def.autoResolvable) out.push(diag('unresolved-at-send', location, n.key));\n // auto-resolvable & fillable & not deprecated → clean (filled by the server at send)\n });\n });\n\n return out;\n}\n", + "sourceCode": "import { RichTextBlock } from '@shared/kernel/rich-text';\n\n/**\n * Placeholder fields and the PURE linter over them.\n *\n * `lintPlaceholders` is a total, effect-free function of (content, valid set). It\n * runs identically on the client (for live UX) and could run on the server (for\n * authority) — same rules, same config, so the two agree by construction. The FE\n * never STORES its output: diagnostics are a `computed()` over content (see\n * `brief.ts` selectors), the same \"derive, don't store\" discipline as wizard step\n * validity.\n */\n\n/** A placeholder field the template knows about. `fillable`/`deprecated` default to\n the healthy case; the seed flips them to exercise the not-fillable/deprecated rules. */\nexport interface PlaceholderDef {\n readonly key: string; // e.g. 'naam_zorgverlener'\n readonly label: string; // human label for the insert menu, e.g. 'Naam zorgverlener'\n readonly autoResolvable: boolean; // server can fill from case data (name, date, …)\n readonly fillable?: boolean; // default true; false → not resolvable for this beroep/case type\n readonly deprecated?: boolean; // default false; true → retired but still referenceable in old snapshots\n}\n\nexport type DiagnosticSeverity = 'error' | 'warning';\n\nexport type DiagnosticCode =\n | 'malformed' // raw braces in a text node (a paste that should have been a chip)\n | 'unknown-placeholder' // well-formed key not in the valid set\n | 'not-fillable' // key exists but isn't resolvable for this case type / beroep\n | 'deprecated' // key was valid once but the template no longer offers it\n | 'unresolved-at-send'; // manual (non-auto-resolvable) placeholder still to be filled\n\nexport interface DiagnosticLocation {\n readonly blockId: string;\n readonly paragraphIndex: number;\n readonly nodeIndex: number;\n}\n\nexport interface Diagnostic {\n readonly severity: DiagnosticSeverity;\n readonly code: DiagnosticCode;\n readonly placeholderKey?: string;\n readonly location: DiagnosticLocation;\n readonly message: string; // human-readable, Dutch\n}\n\n/** `error` blocks save (author time) and send (send time); `warning` is surfaced but allowed. */\nexport function severityOf(code: DiagnosticCode): DiagnosticSeverity {\n switch (code) {\n case 'malformed':\n case 'unknown-placeholder':\n case 'not-fillable':\n return 'error';\n case 'deprecated':\n case 'unresolved-at-send':\n return 'warning';\n }\n}\n\n// Raw `{{` or `}}` in text — the only way a malformed placeholder can exist, since\n// menu insertion always produces a proper placeholder NODE. Paste safety net.\nconst RAW_BRACES = /\\{\\{|\\}\\}/;\n\nfunction messageFor(code: DiagnosticCode, key?: string): string {\n switch (code) {\n case 'malformed':\n return $localize`:@@brief.lint.malformed:Deze tekst bevat losse accolades ({{ of }}). Voeg een veld toe via het menu in plaats van het te typen.`;\n case 'unknown-placeholder':\n return $localize`:@@brief.lint.unknown:Onbekend veld “${key}:key:”. Dit veld hoort niet bij dit sjabloon.`;\n case 'not-fillable':\n return $localize`:@@brief.lint.notFillable:Veld “${key}:key:” kan niet worden ingevuld voor dit beroep.`;\n case 'deprecated':\n return $localize`:@@brief.lint.deprecated:Veld “${key}:key:” is verouderd en wordt niet meer aangeboden.`;\n case 'unresolved-at-send':\n return $localize`:@@brief.lint.unresolved:Veld “${key}:key:” wordt handmatig ingevuld en is nog leeg.`;\n }\n}\n\nfunction diag(code: DiagnosticCode, location: DiagnosticLocation, key?: string): Diagnostic {\n return {\n severity: severityOf(code),\n code,\n placeholderKey: key,\n location,\n message: messageFor(code, key),\n };\n}\n\n/**\n * Lint one block against the template's placeholder set. Pure: given the same\n * content + valid set + blockId it always returns the same diagnostics, in\n * document order. One diagnostic per node at most (most-severe wins).\n */\nexport function lintPlaceholders(\n content: RichTextBlock,\n valid: readonly PlaceholderDef[],\n blockId: string,\n): Diagnostic[] {\n const byKey = new Map(valid.map((p) => [p.key, p]));\n const out: Diagnostic[] = [];\n\n content.paragraphs.forEach((p, paragraphIndex) => {\n p.nodes.forEach((n, nodeIndex) => {\n const location: DiagnosticLocation = { blockId, paragraphIndex, nodeIndex };\n if (n.type === 'text') {\n if (RAW_BRACES.test(n.text)) out.push(diag('malformed', location));\n return;\n }\n if (n.type !== 'placeholder') return; // lineBreak — nothing to check\n\n const def = byKey.get(n.key);\n if (!def) out.push(diag('unknown-placeholder', location, n.key));\n else if (def.fillable === false) out.push(diag('not-fillable', location, n.key));\n else if (def.deprecated) out.push(diag('deprecated', location, n.key));\n else if (!def.autoResolvable) out.push(diag('unresolved-at-send', location, n.key));\n // auto-resolvable & fillable & not deprecated → clean (filled by the server at send)\n });\n });\n\n return out;\n}\n", "properties": [ { "name": "autoResolvable", @@ -3682,12 +3854,12 @@ }, { "name": "PlaceholderDefDto", - "id": "interface-PlaceholderDefDto-134629d19fe3b5e6a76daeb4f10c282202eb1b8380b939c25450bb44b86fcb3df7a15e5ead886ad958b8bb7f158457387fb6c11872acdb4893c4933c2fdef07b", + "id": "interface-PlaceholderDefDto-fb1ee9618e8a58db438478dc30a2ef41f099ba42e2d9a7155300e95c801cc6c2851c481c1bff1e7af3c066bc79e76529bbb37756fed2b5e35a56532325220bab", "file": "src/app/shared/infrastructure/api-client.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", + "sourceCode": "export class ApiClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl ?? \"\";\n }\n\n /**\n * @return OK\n */\n health(): Promise {\n let url_ = this.baseUrl + \"/health\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHealth(_response);\n });\n }\n\n protected processHealth(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n ready(): Promise {\n let url_ = this.baseUrl + \"/health/ready\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReady(_response);\n });\n }\n\n protected processReady(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n dashboardView(): Promise {\n let url_ = this.baseUrl + \"/api/v1/dashboard-view\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDashboardView(_response);\n });\n }\n\n protected processDashboardView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DashboardViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n notes(): Promise {\n let url_ = this.baseUrl + \"/api/v1/notes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processNotes(_response);\n });\n }\n\n protected processNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AantekeningDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n address(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brp/address\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processAddress(_response);\n });\n }\n\n protected processAddress(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BrpAddressDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n diplomas(): Promise {\n let url_ = this.baseUrl + \"/api/v1/duo/diplomas\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processDiplomas(_response);\n });\n }\n\n protected processDiplomas(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuoLookupDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n policy(): Promise {\n let url_ = this.baseUrl + \"/api/v1/intake/policy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processPolicy(_response);\n });\n }\n\n protected processPolicy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as IntakePolicyDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n registrations(body: RegistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/registrations\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processRegistrations(_response);\n });\n }\n\n protected processRegistrations(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n herregistraties(body: HerregistratieRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/herregistraties\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processHerregistraties(_response);\n });\n }\n\n protected processHerregistraties(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n intakes(body: IntakeRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/intakes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processIntakes(_response);\n });\n }\n\n protected processIntakes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n changeRequests(body: ChangeRequestRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/change-requests\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processChangeRequests(_response);\n });\n }\n\n protected processChangeRequests(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReferentieResponse;\n return result200;\n });\n } else if (status === 422) {\n return response.text().then((_responseText) => {\n let result422: any = null;\n result422 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Unprocessable Content\", status, _responseText, _headers, result422);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param diplomaHerkomst (optional) \n * @param taalvaardigheid (optional) \n * @return OK\n */\n categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/categories?\";\n if (wizardId === undefined || wizardId === null)\n throw new globalThis.Error(\"The parameter 'wizardId' must be defined and cannot be null.\");\n else\n url_ += \"wizardId=\" + encodeURIComponent(\"\" + wizardId) + \"&\";\n if (diplomaHerkomst === null)\n throw new globalThis.Error(\"The parameter 'diplomaHerkomst' cannot be null.\");\n else if (diplomaHerkomst !== undefined)\n url_ += \"diplomaHerkomst=\" + encodeURIComponent(\"\" + diplomaHerkomst) + \"&\";\n if (taalvaardigheid === null)\n throw new globalThis.Error(\"The parameter 'taalvaardigheid' cannot be null.\");\n else if (taalvaardigheid !== undefined)\n url_ += \"taalvaardigheid=\" + encodeURIComponent(\"\" + taalvaardigheid) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processCategories(_response);\n });\n }\n\n protected processCategories(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadCategoriesDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n content(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}/content\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processContent(_response);\n });\n }\n\n protected processContent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @param localIds (optional) \n * @return OK\n */\n status(localIds?: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/status?\";\n if (localIds === null)\n throw new globalThis.Error(\"The parameter 'localIds' cannot be null.\");\n else if (localIds !== undefined)\n url_ += \"localIds=\" + encodeURIComponent(\"\" + localIds) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processStatus(_response);\n });\n }\n\n protected processStatus(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UploadStatusDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads(_response);\n });\n }\n\n protected processUploads(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n uploads2(documentId: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/admin/uploads/{documentId}\";\n if (documentId === undefined || documentId === null)\n throw new globalThis.Error(\"The parameter 'documentId' must be defined.\");\n url_ = url_.replace(\"{documentId}\", encodeURIComponent(\"\" + documentId));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processUploads2(_response);\n });\n }\n\n protected processUploads2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n return throwException(\"Forbidden\", status, _responseText, _headers);\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsAll(): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsAll(_response);\n });\n }\n\n protected processApplicationsAll(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationSummaryDto[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return Created\n */\n applicationsPOST(body: CreateApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPOST(_response);\n });\n }\n\n protected processApplicationsPOST(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 201) {\n return response.text().then((_responseText) => {\n let result201: any = null;\n result201 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result201;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n applicationsGET(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsGET(_response);\n });\n }\n\n protected processApplicationsGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ApplicationDetailDto;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsPUT(id: string, body: DraftSyncRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsPUT(_response);\n });\n }\n\n protected processApplicationsPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return No Content\n */\n applicationsDELETE(id: string): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApplicationsDELETE(_response);\n });\n }\n\n protected processApplicationsDELETE(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n submit(id: string, body: SubmitApplicationRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/applications/{id}/submit\";\n if (id === undefined || id === null)\n throw new globalThis.Error(\"The parameter 'id' must be defined.\");\n url_ = url_.replace(\"{id}\", encodeURIComponent(\"\" + id));\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSubmit(_response);\n });\n }\n\n protected processSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SubmitApplicationResponse;\n return result200;\n });\n } else if (status === 404) {\n return response.text().then((_responseText) => {\n return throwException(\"Not Found\", status, _responseText, _headers);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n me(): Promise {\n let url_ = this.baseUrl + \"/api/v1/me\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processMe(_response);\n });\n }\n\n protected processMe(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as MeDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefGET(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefGET(_response);\n });\n }\n\n protected processBriefGET(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefPUT(body: SaveBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefPUT(_response);\n });\n }\n\n protected processBriefPUT(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefSubmit(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/submit\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefSubmit(_response);\n });\n }\n\n protected processBriefSubmit(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n approve(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/approve\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processApprove(_response);\n });\n }\n\n protected processApprove(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n reject(body: RejectBriefRequest): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reject\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processReject(_response);\n });\n }\n\n protected processReject(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 403) {\n return response.text().then((_responseText) => {\n let result403: any = null;\n result403 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Forbidden\", status, _responseText, _headers, result403);\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n send(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/send\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processSend(_response);\n });\n }\n\n protected processSend(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status === 409) {\n return response.text().then((_responseText) => {\n let result409: any = null;\n result409 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProblemDetails;\n return throwException(\"Conflict\", status, _responseText, _headers, result409);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * @return OK\n */\n briefReset(): Promise {\n let url_ = this.baseUrl + \"/api/v1/brief/reset\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.http.fetch(url_, options_).then((_response: Response) => {\n return this.processBriefReset(_response);\n });\n }\n\n protected processBriefReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface AantekeningDto {\n type?: string | undefined;\n omschrijving?: string | undefined;\n datum?: string | undefined;\n}\n\nexport interface AanvraagStatusDto {\n tag?: string | undefined;\n stepIndex?: number | undefined;\n stepCount?: number | undefined;\n referentie?: string | undefined;\n manual?: boolean | undefined;\n reden?: string | undefined;\n}\n\nexport interface AdresDto {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface ApplicationDetailDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n draft?: any | undefined;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface ApplicationSummaryDto {\n id?: string | undefined;\n type?: string | undefined;\n status?: AanvraagStatusDto;\n documentIds?: string[] | undefined;\n createdAt?: string | undefined;\n updatedAt?: string | undefined;\n submittedAt?: string | undefined;\n}\n\nexport interface BriefDecisionsDto {\n canEdit?: boolean;\n canApprove?: boolean;\n canReject?: boolean;\n canSend?: boolean;\n}\n\nexport interface BriefDto {\n briefId?: string | undefined;\n beroep?: string | undefined;\n templateId?: string | undefined;\n placeholders?: PlaceholderDefDto[] | undefined;\n sections?: LetterSectionDto[] | undefined;\n status?: BriefStatusDto;\n drafterId?: string | undefined;\n}\n\nexport interface BriefStatusDto {\n tag?: string | undefined;\n submittedBy?: string | undefined;\n submittedAt?: string | undefined;\n approvedBy?: string | undefined;\n approvedAt?: string | undefined;\n rejectedBy?: string | undefined;\n rejectedAt?: string | undefined;\n comments?: string | undefined;\n sentAt?: string | undefined;\n}\n\nexport interface BriefViewDto {\n brief?: BriefDto;\n availablePassages?: LibraryPassageDto[] | undefined;\n decisions?: BriefDecisionsDto;\n}\n\nexport interface BrpAddressDto {\n gevonden?: boolean;\n adres?: AdresDto;\n}\n\nexport interface ChangeRequestRequest {\n straat?: string | undefined;\n postcode?: string | undefined;\n woonplaats?: string | undefined;\n}\n\nexport interface CreateApplicationRequest {\n type?: string | undefined;\n}\n\nexport interface DashboardViewDto {\n registration?: RegistrationDto;\n person?: PersonDto;\n decisions?: HerregistratieDecisionsDto;\n}\n\nexport interface DocumentCategoryDto {\n categoryId?: string | undefined;\n label?: string | undefined;\n description?: string | undefined;\n required?: boolean;\n acceptedTypes?: string[] | undefined;\n maxSizeMb?: number;\n multiple?: boolean;\n allowPostDelivery?: boolean;\n}\n\nexport interface DocumentRefDto {\n categoryId?: string | undefined;\n channel?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport interface DraftSyncRequest {\n draft?: any;\n stepIndex?: number;\n stepCount?: number;\n documentIds?: string[] | undefined;\n}\n\nexport interface DuoDiplomaDto {\n id?: string | undefined;\n naam?: string | undefined;\n instelling?: string | undefined;\n jaar?: number;\n beroep?: string | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface DuoLookupDto {\n diplomas?: DuoDiplomaDto[] | undefined;\n handmatig?: ManualDiplomaPolicyDto;\n}\n\nexport interface HerregistratieDecisionsDto {\n eligibleForHerregistratie?: boolean;\n herregistratieReason?: string | undefined;\n}\n\nexport interface HerregistratieRequest {\n uren?: number;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface IntakePolicyDto {\n scholingThreshold?: number;\n}\n\nexport interface IntakeRequest {\n uren?: number;\n}\n\nexport interface LetterBlockDto {\n type?: string | undefined;\n blockId?: string | undefined;\n content?: RichTextBlockDto;\n sourcePassageId?: string | undefined;\n sourceVersion?: number | undefined;\n edited?: boolean | undefined;\n}\n\nexport interface LetterSectionDto {\n sectionKey?: string | undefined;\n title?: string | undefined;\n required?: boolean;\n blocks?: LetterBlockDto[] | undefined;\n locked?: boolean;\n}\n\nexport interface LibraryPassageDto {\n passageId?: string | undefined;\n scope?: string | undefined;\n sectionKey?: string | undefined;\n label?: string | undefined;\n content?: RichTextBlockDto;\n version?: number;\n beroep?: string | undefined;\n}\n\nexport interface ManualDiplomaPolicyDto {\n beroepen?: string[] | undefined;\n policyQuestions?: PolicyQuestionDto[] | undefined;\n}\n\nexport interface MeDto {\n capabilities?: string[] | undefined;\n}\n\nexport interface ParagraphDto {\n nodes?: RichTextNodeDto[] | undefined;\n list?: string | undefined;\n}\n\nexport interface PersonDto {\n naam?: string | undefined;\n geboortedatum?: string | undefined;\n adres?: AdresDto;\n}\n\nexport interface PlaceholderDefDto {\n key?: string | undefined;\n label?: string | undefined;\n autoResolvable?: boolean;\n fillable?: boolean | undefined;\n deprecated?: boolean | undefined;\n}\n\nexport interface PolicyQuestionDto {\n id?: string | undefined;\n vraag?: string | undefined;\n type?: string | undefined;\n}\n\nexport interface ProblemDetails {\n type?: string | undefined;\n title?: string | undefined;\n status?: number | undefined;\n detail?: string | undefined;\n instance?: string | undefined;\n\n [key: string]: any;\n}\n\nexport interface ReferentieResponse {\n referentie?: string | undefined;\n}\n\nexport interface RegistratieRequest {\n diplomaHerkomst?: string | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface RegistrationDto {\n bigNummer?: string | undefined;\n naam?: string | undefined;\n beroep?: string | undefined;\n registratiedatum?: string | undefined;\n geboortedatum?: string | undefined;\n status?: RegistrationStatusDto;\n}\n\nexport interface RegistrationStatusDto {\n tag?: string | undefined;\n herregistratieDatum?: string | undefined;\n geschorstTot?: string | undefined;\n reden?: string | undefined;\n doorgehaaldOp?: string | undefined;\n}\n\nexport interface RejectBriefRequest {\n comments?: string | undefined;\n}\n\nexport interface RichTextBlockDto {\n paragraphs?: ParagraphDto[] | undefined;\n}\n\nexport interface RichTextNodeDto {\n type?: string | undefined;\n text?: string | undefined;\n marks?: string[] | undefined;\n key?: string | undefined;\n}\n\nexport interface SaveBriefRequest {\n sections?: LetterSectionDto[] | undefined;\n}\n\nexport interface SubmitApplicationRequest {\n diplomaHerkomst?: string | undefined;\n uren?: number | undefined;\n documents?: DocumentRefDto[] | undefined;\n}\n\nexport interface SubmitApplicationResponse {\n referentie?: string | undefined;\n status?: AanvraagStatusDto;\n}\n\nexport interface UploadCategoriesDto {\n categories?: DocumentCategoryDto[] | undefined;\n}\n\nexport interface UploadStatusDto {\n results?: UploadStatusItemDto[] | undefined;\n}\n\nexport interface UploadStatusItemDto {\n localId?: string | undefined;\n status?: string | undefined;\n documentId?: string | undefined;\n}\n\nexport class SwaggerException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isSwaggerException = true;\n\n static isSwaggerException(obj: any): obj is SwaggerException {\n return obj.isSwaggerException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new SwaggerException(message, status, response, headers, null);\n}", "properties": [ { "name": "autoResolvable", @@ -3697,7 +3869,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1440 + "line": 1488 }, { "name": "deprecated", @@ -3707,7 +3879,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1442 + "line": 1490 }, { "name": "fillable", @@ -3717,7 +3889,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1441 + "line": 1489 }, { "name": "key", @@ -3727,7 +3899,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1438 + "line": 1486 }, { "name": "label", @@ -3737,7 +3909,7 @@ "indexKey": "", "optional": true, "description": "", - "line": 1439 + "line": 1487 } ], "indexSignatures": [], @@ -3747,12 +3919,12 @@ }, { "name": "PlaceholderOption", - "id": "interface-PlaceholderOption-4c9a9a5d4bb9dab7bd9e7947414aa0d5db7b5200cd68b6764a0343f354365decd1f3575978b9eb5e2d371f978213f6c65307a95e423e8e68efd7c6d3edb9df13", + "id": "interface-PlaceholderOption-7a8150178a706e0b19a2f28e917beb9f8356eb77f0f6aeba7498d02bd759a1170553ab47aeba53fee1c23368d1d945395a0fe6a35afa83821f650b5a0226fd9c", "file": "src/app/shared/ui/rich-text-editor/rich-text-editor.component.ts", "deprecated": false, "deprecationMessage": "", "type": "interface", - "sourceCode": "import { Component, ElementRef, computed, effect, input, output, viewChild } from '@angular/core';\nimport { RichTextBlock, emptyBlock } from '@shared/kernel/rich-text';\nimport { adjacentChip, createChip, readBlock, renderInto } from './rich-text-dom';\n\n/** A menu entry for the insert-placeholder control — a plain {key,label}, so the\n editor stays domain-free (it never sees the brief's PlaceholderDef). */\nexport interface PlaceholderOption {\n readonly key: string;\n readonly label: string;\n // Auto-resolvable fields are filled server-side at send; manual fields need a value.\n // Drives the chip's styling so the two read apart at a glance.\n readonly autoResolvable?: boolean;\n}\n\n/**\n * Molecule: a minimal no-dependency WYSIWYG editor over a `RichTextBlock`.\n *\n * It is the single quarantined boundary to the imperative `contenteditable` DOM:\n * `content` in, `contentChanged` (a `RichTextBlock`) out, holding NO letter state.\n * Placeholders render as non-editable chips and can only be inserted from the menu\n * (valid keys only) — never typed as raw braces. Swapping in a real editor library\n * later (TipTap) means replacing only this component; nothing else sees the DOM.\n */\n@Component({\n selector: 'app-rich-text-editor',\n styles: [`\n :host{display:block}\n .rte-toolbar{display:flex;flex-wrap:wrap;gap:var(--rhc-space-max-sm);align-items:center;margin-block-end:var(--rhc-space-max-sm)}\n .rte-toolbar button{min-inline-size:2.2rem}\n .rte-sep{inline-size:1px;align-self:stretch;background:var(--rhc-color-border-default)}\n .rte-editable{\n border:1px solid var(--rhc-color-border-default);border-radius:var(--rhc-border-radius-sm);\n padding:var(--rhc-space-max-md);min-block-size:4rem;\n }\n .rte-editable[contenteditable='false']{background:var(--rhc-color-cool-grey-100)}\n .rte-editable :is(p){margin:0 0 var(--rhc-space-max-sm)}\n .rte-editable :is(ul,ol){margin:0 0 var(--rhc-space-max-sm);padding-inline-start:1.4em}\n /* Placeholder chips read as fill-in fields: auto-resolvable (grey, filled server-side)\n vs manual (yellow, still needs a value). The read-only preview adds error/warning states.\n Chips are created imperatively (createChip) inside contenteditable, so they never receive\n Angular's _ngcontent scoping attribute — ::ng-deep is required or the rules won't match them.\n Braces use unicode escapes; a literal { in a CSS content string breaks the style parser. */\n :host ::ng-deep .rte-chip{\n border:1px dashed var(--rhc-color-border-default);border-radius:var(--rhc-border-radius-sm);\n padding:0 0.3em;white-space:nowrap;\n }\n :host ::ng-deep .rte-chip[data-auto='true']{background:var(--rhc-color-cool-grey-100)}\n :host ::ng-deep .rte-chip[data-auto='false']{background:var(--rhc-color-geel-100)}\n :host ::ng-deep .rte-chip::before{content:'\\\\7B';opacity:0.6;font-weight:700;margin-inline-end:0.1em}\n :host ::ng-deep .rte-chip::after{content:'\\\\7D';opacity:0.6;font-weight:700;margin-inline-start:0.1em}\n `],\n template: `\n @if (editable()) {\n
\n \n \n \n \n \n \n @if (placeholders().length) {\n \n \n }\n
\n }\n
\n `,\n})\nexport class RichTextEditorComponent {\n content = input(emptyBlock());\n placeholders = input([]);\n editable = input(true);\n contentChanged = output();\n\n // Localizable-by-default copy (shared-UI convention).\n fieldLabel = input($localize`:@@richTextEditor.field:Tekst`);\n toolbarLabel = input($localize`:@@richTextEditor.toolbar:Opmaak`);\n boldLabel = input($localize`:@@richTextEditor.bold:Vet`);\n italicLabel = input($localize`:@@richTextEditor.italic:Cursief`);\n underlineLabel = input($localize`:@@richTextEditor.underline:Onderstreept`);\n insertLabel = input($localize`:@@richTextEditor.insert:Veld invoegen:`);\n insertPrompt = input($localize`:@@richTextEditor.insertPrompt:Kies…`);\n bulletListLabel = input($localize`:@@richTextEditor.bulletList:Opsomming`);\n numberListLabel = input($localize`:@@richTextEditor.numberList:Genummerde lijst`);\n\n private editorEl = viewChild>('editor');\n private lastEmitted = '';\n\n private labelFor = (key: string) => this.placeholders().find((p) => p.key === key)?.label ?? key;\n private autoFor = (key: string) => this.placeholders().find((p) => p.key === key)?.autoResolvable ?? false;\n\n constructor() {\n // Render when content arrives/changes from OUTSIDE. Skip our own emitted value\n // flowing back (structural compare) so the caret isn't reset while typing.\n effect(() => {\n const content = this.content();\n const el = this.editorEl()?.nativeElement;\n if (!el) return;\n const serialized = JSON.stringify(content);\n if (serialized === this.lastEmitted) return;\n renderInto(el, content, this.labelFor, this.autoFor);\n this.lastEmitted = serialized;\n });\n }\n\n protected emit() {\n const el = this.editorEl()?.nativeElement;\n if (!el) return;\n const block = readBlock(el);\n this.lastEmitted = JSON.stringify(block);\n this.contentChanged.emit(block);\n }\n\n protected format(cmd: 'bold' | 'italic' | 'underline') {\n const el = this.editorEl()?.nativeElement;\n if (!el) return;\n el.focus();\n // ponytail: execCommand is deprecated but universally supported and zero-dependency;\n // if a browser drops it, this component is the one place to swap in a range-based impl.\n el.ownerDocument.execCommand(cmd);\n this.emit();\n }\n\n /** Bullet / numbered lists via execCommand — same deprecated-but-universal path as\n bold/italic (ponytail-noted on `format`); readBlock reads the resulting