ksef-client-ts 0.6.2 → 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 CHANGED
@@ -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 & fluent builders** — `KSeFError` hierarchy (401, 403, 429, validation) and request builders
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