@epilot/customer-portal-client
v0.17.5
Published
API Client for epilot portal API
Downloads
8,460
Maintainers
Readme
@epilot/customer-portal-client
API Client for epilot customer-portal API.
Uses openapi-client-axios
Getting Started
Install the package:
npm install --save-dev @epilot/customer-portal-client
Import the package:
import { getClient } from '@epilot/customer-portal-client';
Use the client:
// get typed client
const client = await getClient();
// call an operation
const res = await client.testAuth();
BaseURL & Authorization
To pass an authorization header and set up the API url, you can use axios defaults:
const client = getClient();
client.defaults.baseURL = config.CUSTOMER_PORTAL_API;
client.defaults.headers['authorization'] = `Bearer ${token}`;
API Docs:
https://docs.api.epilot.io/