Skip to content

feat(payments): support list filters - #99

Draft
sarkissianraffi wants to merge 2 commits into
mainfrom
feat/payments-list-filters
Draft

feat(payments): support list filters#99
sarkissianraffi wants to merge 2 commits into
mainfrom
feat/payments-list-filters

Conversation

@sarkissianraffi

@sarkissianraffi sarkissianraffi commented Sep 7, 2026

Copy link
Copy Markdown

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-filters at 1cb1dd67552d07279e74f005ac28d3e9684a76f7 (bundled SHA-256 edc85fddf229feb79974e65bb8c7a1a8e720926cb294d3749e6bd572edb72d7d).

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 build consumes the immutable URL/checksum pin with both generators. LAGO_OPENAPI_SPEC accepts 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_type removed 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.

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.
Removed from the Lago API for performance reasons; the client is
regenerated from the updated OpenAPI bundle and must not send it.
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