TypeScript SDK
The preview TypeScript SDK wraps the public API with small, predictable helpers. It is generated from the committed OpenAPI contract, so operation metadata stays aligned with the API reference.
Install
The package name is @hollyhr/api-client. HollyHR uses a scoped public package
so partners can identify the official client, while api-client keeps the
meaning clear: this is the TypeScript client for the API, not the API contract
itself.
Install the public preview package from npm:
Code
During local HollyHR development, the source package lives at
packages/hollyhr-api-client. Regenerate and test it with:
Code
pnpm guard:sdk is part of the required merge gate. It builds the package with
the SDK's own tsconfig.json, runs the dedicated SDK tests, regenerates the
operation catalogue from docs/api/openapi.v1.yaml, and fails if the generated
SDK output is not committed.
Before publishing a new version, HollyHR maintainers should prove the package contents:
Code
For private testing from the monorepo or a local tarball before the next npm release, use Test the SDK from source.
Publishing a new npm version requires @hollyhr organisation publish rights and
npm write authentication:
Code
Do not publish under a personal or unofficial scope. The package name is part of the long-term developer contract. HollyHR does not need a separate public GitHub repository for the package. The SDK can be published from the private monorepo; package metadata points developers to this documentation and support channel.
First call
Code
Pagination
Code
Safe writes
Use idempotency keys for writes and If-Match for conditional updates:
Code
Webhook signatures
Code
Reject deliveries when signature verification returns false, then use the API
to fetch the current resource state if your integration needs more than the
webhook notification payload.