-
Notifications
You must be signed in to change notification settings - Fork 403
Description
Problem
I wanted to extend the ReturnRequestService to customize the behavior of the getReturnRequest() method. However, I noticed that the service is not exported in any public API file in the Spartacus libraries (tested on version 2211.41.0).
Although the service is defined and provided via Angular's dependency injection system (@Injectable({ providedIn: 'root' })), it cannot be imported in a custom implementation, because it is not exposed through any of the package’s public entry points (e.g., @spartacus/order, @spartacus/order/components, or @spartacus/order/root).
Expected
It should be possible to extend or override ReturnRequestService by exporting it in the appropriate public API file so that it can be imported and injected as needed.
Use Case
In our project, we need to adjust the logic inside getReturnRequest() (e.g., modify how the return code is validated or conditionally load details). Since ReturnRequestService is not exported, our only options are:
- Fully recreate the service logic in a new custom service, or
- Try to override the facade behavior (which might not be as straightforward or desirable).
Request
Please consider exporting ReturnRequestService so that it can be extended and overridden in projects where additional customization is required.
Thank you!