API Client for epilot document API
npm install @epilot/document-client@epilot/document-clientAPI Client for epilot Document API.
Uses openapi-client-axios
Install the package:
``bash`
npm install --save-dev @epilot/document-client
Import the package:
`typescript`
import { getClient } from '@epilot/document-client';
Use the client:
`typescript
// get typed client
const client = await getClient();
// call an operation
const res = await client.generateDocument(null, {});
`
To pass an authorization header and set up the API url, you can use axios
defaults:
`typescriptBearer ${token}
const client = getClient();
client.defaults.baseURL = config.API_URL;
client.defaults.headers['authorization'] = ;``
https://docs.api.epilot.io/document