@rdh/api-client (0.0.1)

Published 2026-04-29 12:17:30 +03:00 by airaneel

Installation

@rdh:registry=
npm install @rdh/api-client@0.0.1
"@rdh/api-client": "0.0.1"

About this package

@rdh/api-client

TypeScript/Axios client for the RDH API. Generated from the OpenAPI schema served by rdh_api and published to the private Forgejo npm registry.

Registry

Hosted on Forgejo at https://git.dev.andyjazzy.cloud/api/packages/airaneel/npm/.

To install in another project, add to its .npmrc:

@rdh:registry=https://git.dev.andyjazzy.cloud/api/packages/airaneel/npm/

For private read access, add an auth token to your user-level ~/.npmrc (do NOT commit):

//git.dev.andyjazzy.cloud/api/packages/airaneel/npm/:_authToken=YOUR_TOKEN

Get the token from Forgejo: User Settings → Applications → Generate New Token (scope read:package for install, write:package for publish).

Then npm install @rdh/api-client.

Generate

Requires rdh_api running locally on localhost:8890 (or override SCHEMA_URL):

npm install
npm run generate    # fetches schema, runs openapi-generator into src/
npm run build       # tsc → dist/

Override the schema source:

SCHEMA_URL=https://api.example.com/schema/ npm run generate

Publish a new version

  1. npm run generate — pull the latest schema.
  2. Inspect git diff src/ to confirm the API delta.
  3. npm run release — bumps patch version, builds, and publishes to Forgejo.

For minor/major bumps:

npm version minor && npm publish

Layout

.
├── package.json
├── tsconfig.json           # CJS output, declarations on
├── .npmrc                  # @rdh scope → Forgejo registry
├── scripts/
│   └── generate.sh         # fetch schema + run openapi-generator
├── src/                    # GENERATED — committed for diff visibility
│   ├── api/                # one file per tag
│   ├── models/             # one file per schema
│   ├── api.ts
│   ├── base.ts
│   ├── common.ts
│   ├── configuration.ts
│   └── index.ts
└── dist/                   # build output (gitignored)

Dependencies

Dependencies

ID Version
axios ^1.6.0

Development dependencies

ID Version
@openapitools/openapi-generator-cli ^2.21.4
typescript ^5.4.0
Details
npm
2026-04-29 12:17:30 +03:00
3
AGPL-3.0-or-later
149 KiB
Assets (1)
Versions (3) View all
0.0.3 2026-04-29
0.0.2 2026-04-29
0.0.1 2026-04-29