@bapp/auto-api-client
v1.0.9
Published
Client to consume BAPP auto API, based on content types with type inference
Downloads
227
Readme
@bapp/auto-api-client
Generic API to request data from and trigger actions in the Bapp API.
Roadmap
- [x] Functions for the generic endpoints
- [ ] Tree shaking
- [ ] Generate Zod schemas for client-side validation
- [ ] Type inference based on content type
Installation
Install the package using one of the following commands:
npm install @bapp/auto-api-client axios
yarn add @bapp/auto-api-client axios
pnpm add @bapp/auto-api-client axios
Optionally, install @tanstack/react-query
for query option getters:
npm install @tanstack/react-query
yarn add @tanstack/react-query
pnpm add @tanstack/react-query
Example usage
import bappApi from "@bapp/auto-api-client"
bappApi.listEntity("company_invoice.Orders", {
filters: {
paid: true,
},
})
Disclaimer
Proper documentation is WIP