feat(bff): POST /behandel/registrations/{id}/decide behind the behandelaar policy (refs #13)
Forwards a behandelaar's goedkeuren/afwijzen to the domain (which applies the decision and completes the workflow task). Validates the besluit vocabulary (400 on unknown) without troubling the domain. openapi.json + api-client regenerated. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -24,6 +24,10 @@ import {
|
||||
Observable
|
||||
} from 'rxjs';
|
||||
|
||||
export interface DecideRequest {
|
||||
besluit: string;
|
||||
}
|
||||
|
||||
export interface OpenbaarEntry {
|
||||
id: string;
|
||||
status: string;
|
||||
@@ -252,4 +256,42 @@ export class BffApiV1Service {
|
||||
);
|
||||
}
|
||||
|
||||
postBehandelRegistrationsIdDecide<TData = void>(id: string,
|
||||
decideRequest: DecideRequest, options?: HttpClientBodyOptions): Observable<TData>;
|
||||
postBehandelRegistrationsIdDecide<TData = void>(id: string,
|
||||
decideRequest: DecideRequest, options?: HttpClientEventOptions): Observable<HttpEvent<TData>>;
|
||||
postBehandelRegistrationsIdDecide<TData = void>(id: string,
|
||||
decideRequest: DecideRequest, options?: HttpClientResponseOptions): Observable<AngularHttpResponse<TData>>;
|
||||
postBehandelRegistrationsIdDecide<TData = void>(
|
||||
id: string,
|
||||
decideRequest: DecideRequest, options?: HttpClientObserveOptions): Observable<TData | HttpEvent<TData> | AngularHttpResponse<TData>> {
|
||||
if (options?.observe === 'events') {
|
||||
return this.http.post<TData>(
|
||||
`/behandel/registrations/${id}/decide`,
|
||||
decideRequest,{
|
||||
...(options as Omit<NonNullable<typeof options>, 'observe'>),
|
||||
observe: 'events',
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if (options?.observe === 'response') {
|
||||
return this.http.post<TData>(
|
||||
`/behandel/registrations/${id}/decide`,
|
||||
decideRequest,{
|
||||
...(options as Omit<NonNullable<typeof options>, 'observe'>),
|
||||
observe: 'response',
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
return this.http.post<TData>(
|
||||
`/behandel/registrations/${id}/decide`,
|
||||
decideRequest,{
|
||||
...(options as Omit<NonNullable<typeof options>, 'observe'>),
|
||||
observe: 'body',
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user