ksef-client-ts 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -7,14 +7,18 @@ TypeScript client for the Polish National e-Invoice System (KSeF) API v2.
7
7
  ## Features
8
8
 
9
9
  - **Complete API coverage** — KSeF API v2.3.0, types aligned with the official OpenAPI spec
10
- - **Full-featured CLI** — `ksef` with many command groups and subcommands for day-to-day KSeF workflows
11
- - **Full documentation** — VitePress site: Quick Start, API reference, OpenAPI spec
12
- - **Comprehensive test coverage** — Vitest across HTTP, crypto, services, builders; CI on every change
13
- - **Zero HTTP dependencies** — native `fetch` (Node 18+); dual ESM/CJS via tsup
14
- - **Built-in cryptography** — AES-256-CBC, RSA-OAEP, ECDH, XAdES-B, self-signed certs (Node crypto)
15
- - **Automatic token management** — AuthManager: token injection, 401 refresh with dedup, `loginWithToken` / `loginWithCertificate`
16
- - **High-level workflows** — orchestration functions for auth, online/batch sessions, invoice export with polling and decryption
10
+ - **Full-featured CLI** — `ksef` with 14 command groups for auth, sessions, invoices, batch upload, export, and more
11
+ - **High-level workflows** — auth, online/batch sessions, invoice export full lifecycle in a single call
12
+ - **Built-in cryptography** — AES-256-CBC, RSA-OAEP, ECDH, XAdES-B signatures, self-signed certs (Node crypto)
13
+ - **External signing** — HSM, EPUAP, and smart card authentication via callback-based signing
14
+ - **Automatic token management** — AuthManager: token injection, 401 refresh with dedup
15
+ - **Streaming batch uploads** — constant-memory batch upload via Web Streams API with ZIP bomb protection
16
+ - **Incremental export** — HWM-based paginated export with file-based state persistence
17
+ - **Multiple document structures** — FA, PEF, PEF_KOR, FA_RR with typed FormCode constants and UPO parsing
18
+ - **Invoice XML validation** — three-level client-side validation (well-formedness, XSD schema via Zod, NIP/PESEL checksums) with auto-detection for all 6 invoice types
17
19
  - **Typed errors & fluent builders** — `KSeFError` hierarchy (401, 403, 429, validation) and request builders
20
+ - **Comprehensive test coverage** — unit + E2E tests across HTTP, crypto, services, workflows; CI on every change
21
+ - **Zero HTTP dependencies** — native `fetch` (Node 18+); dual ESM/CJS via tsup
18
22
 
19
23
  Requires **Node.js 18+**.
20
24
 
@@ -77,6 +81,7 @@ yarn test # Run all tests (vitest)
77
81
 
78
82
  ## Related
79
83
 
84
+ - [KSeF Web Portal](https://ap.ksef.mf.gov.pl/web/) — official KSeF web application (token management, permissions, invoices)
80
85
  - [KSeF official docs](https://github.com/CIRFMF/ksef-docs) — official documentation (Polish)
81
86
  - [KSeF docs translated](https://flopsstuff.github.io/ksef-docs/) — translated documentation (EN/RU/UK)
82
87
  - [ksef-client-csharp](https://github.com/CIRFMF/ksef-client-csharp) — official C# reference client
@@ -90,7 +95,7 @@ yarn test # Run all tests (vitest)
90
95
 
91
96
  [![Tests](https://github.com/Flopsstuff/ksef-client-ts/actions/workflows/ci.yml/badge.svg)](https://github.com/Flopsstuff/ksef-client-ts/actions/workflows/ci.yml)
92
97
  ![Coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/Fl0p/1558034ac67a11548c7f8f0c05e8d4c0/raw/ksef-client-ts-coverage.json&cacheSeconds=300)
93
- ![NPM Version](https://img.shields.io/npm/v/ksef-client-ts)
98
+ ![NPM Version](https://img.shields.io/npm/v/ksef-client-ts?color=green)
94
99
  ![NPM Downloads](https://img.shields.io/npm/dm/ksef-client-ts)
95
100
  ![GitHub Stars](https://img.shields.io/github/stars/Flopsstuff/ksef-client-ts)
96
101
  ![GitHub Forks](https://img.shields.io/github/forks/Flopsstuff/ksef-client-ts)