feat(bff): documents endpoint accepts the base64 file and forwards it to the domain (refs #103)

The self-service documents endpoint takes { contentBase64, fileName, contentType }
as JSON (bsn from the token) and forwards it via IDomainClient.ProvideDocumentsAsync.
Regenerates openapi.json + the Angular client (postSelfServiceRegistrationsIdDocuments
now takes a ProvideDocumentsRequest body).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
not
2026-07-20 12:13:10 +02:00
co-authored by Claude Opus 4.8
parent 9d327bbd81
commit 4c516cdad3
4 changed files with 69 additions and 15 deletions
+19 -7
View File
@@ -35,6 +35,14 @@ export interface OpenbaarEntry {
reference: string | null;
}
export interface ProvideDocumentsRequest {
contentBase64: string;
/** @nullable */
fileName?: string | null;
/** @nullable */
contentType?: string | null;
}
export interface SubmitAccepted {
registrationId: string;
status: string;
@@ -226,15 +234,19 @@ export class BffApiV1Service {
);
}
postSelfServiceRegistrationsIdDocuments<TData = void>(id: string, options?: HttpClientBodyOptions): Observable<TData>;
postSelfServiceRegistrationsIdDocuments<TData = void>(id: string, options?: HttpClientEventOptions): Observable<HttpEvent<TData>>;
postSelfServiceRegistrationsIdDocuments<TData = void>(id: string, options?: HttpClientResponseOptions): Observable<AngularHttpResponse<TData>>;
postSelfServiceRegistrationsIdDocuments<TData = void>(id: string,
provideDocumentsRequest: ProvideDocumentsRequest, options?: HttpClientBodyOptions): Observable<TData>;
postSelfServiceRegistrationsIdDocuments<TData = void>(id: string,
provideDocumentsRequest: ProvideDocumentsRequest, options?: HttpClientEventOptions): Observable<HttpEvent<TData>>;
postSelfServiceRegistrationsIdDocuments<TData = void>(id: string,
provideDocumentsRequest: ProvideDocumentsRequest, options?: HttpClientResponseOptions): Observable<AngularHttpResponse<TData>>;
postSelfServiceRegistrationsIdDocuments<TData = void>(
id: string, options?: HttpClientObserveOptions): Observable<TData | HttpEvent<TData> | AngularHttpResponse<TData>> {
id: string,
provideDocumentsRequest: ProvideDocumentsRequest, options?: HttpClientObserveOptions): Observable<TData | HttpEvent<TData> | AngularHttpResponse<TData>> {
if (options?.observe === 'events') {
return this.http.post<TData>(
`/self-service/registrations/${id}/documents`,
undefined,{
provideDocumentsRequest,{
...(options as Omit<NonNullable<typeof options>, 'observe'>),
observe: 'events',
}
@@ -244,7 +256,7 @@ export class BffApiV1Service {
if (options?.observe === 'response') {
return this.http.post<TData>(
`/self-service/registrations/${id}/documents`,
undefined,{
provideDocumentsRequest,{
...(options as Omit<NonNullable<typeof options>, 'observe'>),
observe: 'response',
}
@@ -253,7 +265,7 @@ export class BffApiV1Service {
return this.http.post<TData>(
`/self-service/registrations/${id}/documents`,
undefined,{
provideDocumentsRequest,{
...(options as Omit<NonNullable<typeof options>, 'observe'>),
observe: 'body',
}