Skip to content

fix: serialize nested query map values with bracket notation - #14

Merged
javorosas merged 5 commits into
mainfrom
fix/nested-query-params
Sep 9, 2026
Merged

javorosas merged 5 commits into
mainfrom
fix/nested-query-params

Conversation

@javorosas

@javorosas javorosas commented Sep 9, 2026 •

Copy link
Copy Markdown
Member

Cambios (2.2.0)

Added

  • SearchResult expone cursor/capped metadata: totalsAreCapped, nextCursor, previousCursor (paginación por cursores y totales capeados).

Fixed

  • Serialización de query params anidados (Map → notación de corchetes date[gte]=...).

Bump 2.2.0 (minor: campos nuevos aditivos). CHANGELOG incluye la sección [2.2.0].

A date range passed as a nested map (Map.of("date", Map.of("gte", ..., "lt",
...))) was stringified with Map.toString(), producing garbage like
date={gte=2026-01-01, lt=2026-02-01}. Recurse into Map values and expand them
into bracket keys (date[gte]=...&date[lt]=...), matching the v2 API contract.
Iterable/array values keep expanding to repeated keys.

Bump to 2.1.1 and add a regression test.
SearchResult gains totalsAreCapped, nextCursor, and previousCursor so callers
can follow cursor pagination and detect capped totals once the capping wave is
live (page totals capped; cursor mode returns totals only on the first page).
The nested query serialization fix is a patch, but the new cursor and
capped-total fields on SearchResult are additive public API, so the release
is a minor per semver, consistent with the node SDK bump.
SearchResult cursor/capped metadata under Added; nested query map
serialization fix under Fixed.

This comment was marked as resolved.

@javorosas
javorosas requested review from raul-facturapi and a balanced review from Copilot September 9, 2026 23:23
@javorosas javorosas self-assigned this Sep 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The implementation matches the described behavior and includes focused regression coverage.

Review details
  • Files reviewed: 6/6 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@javorosas
javorosas merged commit 9dae194 into main Sep 9, 2026
5 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.

3 participants