wfirma-sdk

Development

Local playground, scripts, and publishing

Built with Vite library mode (ESM + CJS). XML requests use fast-xml-builder; responses are parsed with fast-xml-parser.

The SDK repo uses Bun for installs, scripts, and running TypeScript tooling.

Local playground

Copy .env.example to .env and set ACCESS_KEY, SECRET_KEY, and APP_KEY. Bun loads .env automatically.

bun install
bun run dev                    # smoke test against live API
bun run dev contractors find   # call a specific resource
bun run dev invoices get 123   # get by id

bun run dev uses --watch and reloads when you edit SDK source under src/.

Scripts

ScriptDescription
bun run sync:postmanDownload latest collection from doc.wfirma.pl
bun run generate:modulesRegenerate resource definitions
bun run buildBuild library for publishing
bun testUnit tests
bun run typecheckTypeScript check

Documentation site

From the repository root:

bun run docs:dev
bun run docs:build

The site lives in docs/ (Next.js + Fumadocs).

On this page