feat(payments): support list filters - #99
Draft
sarkissianraffi wants to merge 2 commits into
Draft
Conversation
Generate from a configurable, checksum-pinned feature spec in CI. Preserve exact int64 query bounds with decimal strings, test both payment list routes, and refresh stale fixtures against the current schema.
This was referenced Sep 7, 2026
Removed from the Lago API for performance reasons; the client is regenerated from the updated OpenAPI bundle and must not send it.
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.
Generate payment list query types from the feature spec and test both routes end to end through mocked fetch. Decimal-string amount inputs preserve all int64 cents; number inputs remain supported. The deterministic post-generation patch touches only payment query bounds, not response types.
Both top-level and customer-scoped payment lists accept status/status alias, inclusive int64 amount bounds, receipt number, created date bounds, provider, method, currency, invoice number, payment type, payable type and search. Existing pagination, customer ID and invoice ID options remain supported. Array values serialize as repeated bracketed keys; exact text is URL-encoded.
Source: lago-openapi
feat/payments-list-filtersat1cb1dd67552d07279e74f005ac28d3e9684a76f7(bundled SHA-256edc85fddf229feb79974e65bb8c7a1a8e720926cb294d3749e6bd572edb72d7d).Live QA: succeeded + EUR returns the same seven IDs as UI/REST; cust_1 returns two; amount_from=9223372036854775807 returns two. API and client QA, 79 HTTP assertions, cross-client IDs, UI QA and recording.
Generation and CI
LAGO_OPENAPI_PIN=scripts/openapi-pin.json deno task buildconsumes the immutable URL/checksum pin with both generators.LAGO_OPENAPI_SPECaccepts a local bundled spec. Published-spec generation remains the release default. CI uses the pin so this PR can be reviewed before publication; update/remove that feature pin after the spec is published. Generated openapi/ and npm/ outputs stay ignored under existing repository conventions.Verification
Deno 1.46.3 (matching CI's v1.x): 117 tests / 78 steps pass, public/webhook typecheck passes, changed generation/payment-test lint clean. Full dnt build and generated CommonJS/ESM runtime suites pass. Tests assert all query types, repeated arrays, punctuation, zero, values above 2^31 and 2^53, and exact max-int64 bounds. Built Node package passes live API parity checks.
The baseline had 79 type errors in older fixtures against the current spec. Updated their renamed input/list types, required fields, decimal strings and pagination metadata; kept existing tests and strict type checks. No client version bump, generated-file force-add, API response change or unrelated runtime behavior change.
Related PRs
Merge order: API, then front; OpenAPI before client/CLI releases. JavaScript CI uses the pinned feature spec during that rollout.
Performance follow-up (2026-09-09)
payment_method_typeremoved from the payments list filters: the Lago API dropped it for performance reasons (getlago/lago-api#6325, "Not shipped for performance reasons"). The OpenAPI pin now points at the updated bundle and the client is regenerated from it; every other filter is unchanged. Indexes for the remaining filters ship first in getlago/lago-api#6341.