ksef-client-ts 0.6.1 → 0.7.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 +3 -2
- package/dist/cli.js +970 -248
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +1087 -78
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +330 -17
- package/dist/index.d.ts +330 -17
- package/dist/index.js +1062 -78
- package/dist/index.js.map +1 -1
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ TypeScript client for the Polish National e-Invoice System (KSeF) API v2.
|
|
|
6
6
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
9
|
-
- **Complete API coverage** — KSeF API v2.
|
|
9
|
+
- **Complete API coverage** — KSeF API v2.4.0, types aligned with the official OpenAPI spec
|
|
10
10
|
- **Offline invoice mode** — full lifecycle for all 4 KSeF offline modes with QR KOD I + KOD II signing, deadline tracking, local storage, and technical correction
|
|
11
11
|
- **Full-featured CLI** — `ksef` with 15 command groups for auth, sessions, invoices, offline, batch upload, export, and more
|
|
12
12
|
- **High-level workflows** — auth, online/batch sessions, invoice export — full lifecycle in a single call
|
|
@@ -16,8 +16,9 @@ TypeScript client for the Polish National e-Invoice System (KSeF) API v2.
|
|
|
16
16
|
- **Streaming batch uploads** — constant-memory batch upload via Web Streams API with ZIP bomb protection
|
|
17
17
|
- **Incremental export** — HWM-based paginated export with file-based state persistence
|
|
18
18
|
- **Multiple document structures** — FA, PEF, PEF_KOR, FA_RR with typed FormCode constants and UPO parsing
|
|
19
|
+
- **Invoice XML serialization (FA2/FA3/PEF/PEF_KOR)** — build XSD-compliant invoice XML from typed TypeScript objects with correct element ordering (including the FA3 per-VAT-rate interleave) and namespace injection
|
|
19
20
|
- **Invoice XML validation** — three-level client-side validation (well-formedness, XSD schema via Zod, NIP/PESEL checksums, future date rejection) with auto-detection for all 6 invoice types
|
|
20
|
-
- **Typed errors
|
|
21
|
+
- **Typed errors with RFC 7807 Problem Details** — `KSeFError` hierarchy with dedicated classes for 400/401/403/410/429 carrying structured diagnostic context; exhaustive dispatch via the `KSeFApiProblem` union and `assertNever`; fluent request builders
|
|
21
22
|
- **Comprehensive test coverage** — unit + E2E tests across HTTP, crypto, services, workflows; CI on every change
|
|
22
23
|
- **Interactive setup wizard** — `ksef setup` guides through environment selection, authentication, and token generation in one flow
|
|
23
24
|
- **Zero HTTP dependencies** — native `fetch` (Node 18+); dual ESM/CJS via tsup
|