infakt-sdk

Development

Local playground, scripts, and publishing

Built with Vite library mode (ESM + CJS). The SDK repo uses Bun for installs, scripts, and running TypeScript tooling.

Local playground

Copy .env.example to .env and set INFAKT_API_KEY. Bun loads .env automatically.

bun install
bun run dev                    # smoke test (read-only list calls)
bun run dev clients list
bun run dev invoices get <uuid>

Scripts

ScriptDescription
bun run sync:postmanDownload latest collection from docs.infakt.pl
bun run generate:modulesRegenerate src/modules/resources.generated.ts
bun run buildGenerate modules + Vite library build
bun testUnit tests (mock fetch)
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