@kaonis/woly-client
v0.1.0
Published
Generated TypeScript API clients for WoLy C&C and node-agent APIs
Readme
@kaonis/woly-client
Generated TypeScript API clients for:
- WoLy C&C API (
openapi/cnc.json) - WoLy node-agent API (
openapi/node-agent.json)
Build
From repository root:
npm run build -w packages/woly-clientbuild performs all generation steps:
- Export OpenAPI specs from
apps/cncandapps/node-agent. - Regenerate client sources under
src/generated. - Compile TypeScript to
dist.
Usage
import { CncApi, NodeAgentApi } from '@kaonis/woly-client';
CncApi.OpenAPI.BASE = 'http://localhost:8080';
NodeAgentApi.OpenAPI.BASE = 'http://localhost:8082';
const capabilities = await CncApi.MetaService.getApiCapabilities();
const health = await NodeAgentApi.HealthService.getHealth();