feat: add collective identifier helpers and CLI ksef iz - #83
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
generate_for_ksef_numbers,query_by_created_range,iter_*) and fail-fast validation on the thin clientksef iz(generate,query,invoices,by-ksef) with pagination (--all)POST /collective-identifiers/invoices(up to 10 IZ, pageSize 500), contextmaxInvoices,InvoicePackage.compressionType, 100-day invoice query rangeTest plan
python tools/lint.py --strictpython tools/sync_generated.py --check --no-fallbackpython tools/check_coverage.py --src src/ksef_client/clients --no-fallbackpython -m pytest --cov=ksef_client --cov-fail-under=100