API Client (OpenAPI)
Workspace package: @digiwedge/access-control-api-client (Axios-based).
Install (Workspace)
The client is already part of the workspace. Build it if needed:
pnpm nx build access-control-api-client
Usage
import { Configuration } from '@digiwedge/access-control-api-client';
import { UsersApi } from '@digiwedge/access-control-api-client';
const cfg = new Configuration({
basePath: 'https://access-control-api.uat.digiwedge.com',
accessToken: () => token, // return a JWT string
});
const users = new UsersApi(cfg);
const list = await users.getUsers({ page: 1, limit: 20 });
Tips
| Tip | Description |
|---|---|
Override basePath | Set per environment (dev/prod) |
Provide accessToken() | Attaches the Authorization header |
| Single Axios instance | Use if you need interceptors (pass axios in the constructor) |