Implement NestInterceptor with a generic type, use map() in the RxJS pipeline to wrap every handler return value in a standard object. Register globally via APP_INTERCEPTOR or app.useGlobalInterceptors() so every endpoint returns the same shape.
app.useGlobalInterceptors(new TransformInterceptor()) — no DI support.
{ provide: APP_INTERCEPTOR, useClass: TransformInterceptor } — full DI support, preferred.
The map() operator transforms every emitted value from the handler's observable.
null and undefined handler returns are also passed through map() — handle them if needed.