huridocs / uwazi

Uwazi is a web-based, open-source solution for building and sharing document collections
http://www.uwazi.io
MIT License
242 stars 80 forks source link

API Client Layer #5938

Open mfacar opened 1 year ago

mfacar commented 1 year ago

To research and implement a centralized API Client layer that as a first iteration should:

### Tasks
- [ ] Add a draft title or issue reference here
- [ ] Introduce an adapter layer to isolate client entities from the backend entities.
- [ ] Have a centralized exception handler with its own categories of error.
- [ ] Standardize the consumption of API Endpoints.
- [ ] Prefer generic calls for standard consumptions over poltergeist functions
fnocetti commented 1 year ago

Please note that in the backend v2 we have been providing dedicated typings for the api requests and responses. At this point they're only available for the relationships v2 feature. But we aim to continue developing with that philosophy in mind. Check https://github.com/huridocs/uwazi/tree/development/app/shared/types/api.v2