Skip to content

feat: add collective identifier helpers and CLI ksef iz - #83

Merged
smekcio merged 4 commits into
mainfrom
feat/iz-helpers-cli
Aug 29, 2026
Merged

feat: add collective identifier helpers and CLI ksef iz#83
smekcio merged 4 commits into
mainfrom
feat/iz-helpers-cli

Conversation

@smekcio

@smekcio smekcio commented Aug 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add IZ convenience helpers (generate_for_ksef_numbers, query_by_created_range, iter_*) and fail-fast validation on the thin client
  • Add CLI group ksef iz (generate, query, invoices, by-ksef) with pagination (--all)
  • Align with KSeF API 2.7.1: POST /collective-identifiers/invoices (up to 10 IZ, pageSize 500), context maxInvoices, InvoicePackage.compressionType, 100-day invoice query range

Test plan

  • python tools/lint.py --strict
  • python tools/sync_generated.py --check --no-fallback
  • python tools/check_coverage.py --src src/ksef_client/clients --no-fallback
  • python -m pytest --cov=ksef_client --cov-fail-under=100

smekcio and others added 4 commits August 29, 2026 11:16
Give SDK users fail-fast IZ validation, convenience generate/query helpers and pagination iterators, plus a ksef iz command group, without changing the 2.7.0 thin API signatures.
Keep generated models and IZ list_invoices in sync with the live TEST spec: POST up to 10 identifiers, pageSize 500, context maxInvoices, and 100-day invoice query range.
Unpack exports from package.compressionType, fail-fast 100-day UTC invoice ranges, and require at least two invoices when generating a collective identifier.
Without --all the CLI dropped the API token, so JSON pagination could
not continue unlike iz query and iz by-ksef.

Co-authored-by: Cursor <cursoragent@cursor.com>
@smekcio
smekcio merged commit 8bc6a2c into main Aug 29, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant