![license][license-svg] [![javascript style guide][standard-mia-svg]][standard-mia]
The official CRUD Service JavaScript client.
npm i @mia-platform/js-crud-service-client
yarn add @mia-platform/js-crud-service-client
import CrudClient from '@mia-platform/js-crud-service-client'
const crudClient = new CrudClient<ResourceType>('/prefix', 'resource-name')
const resourceList = await crudClient.getList(context, filter)
This package allows you to easily integrate with a CRUD Service. It provides the following APIs:
- get a list of resources optionally filtered
- export all data from the CRUD resource
- count the number of resources
- get a single resource by ID
- create a resource
- create multiple resources at once
- upsert a single resource
- update a single resource by ID
- update multiple resources at once
- soft delete (trash) a single resource by ID
- hard delete a single resource by ID
- delete multiple resources at once
Node.js >= 18