@pluto-khronos/api-client
v3.3.0
Published
TypeScript-Fetch client for the Khronos API. Generated from the Khronos OpenAPI spec on every release.
Downloads
288
Readme
@pluto-khronos/api-client
TypeScript-Fetch client for the Khronos API, generated from the canonical OpenAPI spec.
Versioning
The package version mirrors the Khronos release version. Pinning @pluto-khronos/[email protected] gives you the exact contract that Khronos 2.7.0 ships.
Install
pnpm add @pluto-khronos/api-clientUsage
import { Configuration, MatchesApi } from '@pluto-khronos/api-client'
const api = new MatchesApi(
new Configuration({
basePath: 'https://your-khronos-host/api/khronos/v1',
apiKey: process.env.KHRONOS_API_KEY,
}),
)
const matches = await api.matchesControllerFindAll()Regeneration (Khronos contributors only)
This package is regenerated from apps/api/spec/khronos-swagger-spec-v1.json on every Khronos release.
To regenerate locally for testing:
# From the Khronos repo root
pnpm --filter=@khronos/api swagger:build # refresh the spec
pnpm --filter=@pluto-khronos/api-client pkg:build # regenerate + compileRequires JDK 11+ on PATH (the wrapper script in scripts/generate-client.js enforces this).
Publishing
Publishing is automated by .github/workflows/ci-cd-deployment.yml on every Khronos release. Manual publish is normally not needed.
