Skip to content

fix: missing pagination#91

Merged
samblacklock merged 2 commits into
mainfrom
fix/missing-limit-offset
May 13, 2026
Merged

fix: missing pagination#91
samblacklock merged 2 commits into
mainfrom
fix/missing-limit-offset

Conversation

@samblacklock
Copy link
Copy Markdown
Collaborator

Description

Goal

  • Restore working pagination on Hierarchies.Nodes.All() and 6 sibling list endpoints, and correct a separately-broken URL on Catalogs.Releases.All that was already returning 404s in production.

Reported by GS

What changed (auto-summarised)

  • fix: add missing limit and offset — Seven list endpoints now serialise this.limit / this.offset into the request URL via buildURL(...), matching the existing pattern on GetNodeChildren. Methods touched:
    • Hierarchies.Nodes.All
    • ShopperCatalog.Hierarchies.All
    • ShopperCatalog.Hierarchies.GetHierarchyChildren
    • ShopperCatalog.Hierarchies.GetHierarchyNodes
    • Catalogs.Nodes.All
    • Catalogs.Releases.All
    • Catalogs.GetCatalogReleases
  • Removed stale // TODO: API - currently not working! comments above Hierarchies.Nodes.All (source + d.ts).
  • New unit tests under test/unit/ for nodes, catalog, and catalogs asserting the SDK emits page[limit] / page[offset] query params when .Limit() / .Offset() are chained. test/tests.ts updated to register them.
  • feat: correct all releases URLCatalogs.Releases.All was building catalogs/releases/{catalogId} (a non-existent route per the catalog-view OpenAPI spec). Corrected to catalogs/{catalogId}/{this.endpoint}, which matches both the spec and the sibling Releases.Get / GetCatalogReleases URL shapes.
  • Pagination params were dropped from Catalogs.Releases.All and Catalogs.GetCatalogReleases after cross-referencing the catalog-view spec: the GET /pcm/catalogs/{catalog_id}/releases endpoint doesn't declare page[limit] / page[offset] and is implicitly capped at "current release + 2 prior", so passing them was a no-op. Test assertions updated to URL-shape regressions instead.

@samblacklock samblacklock changed the title fix: missing limit offsets fix: missing pagination May 12, 2026
@samblacklock samblacklock merged commit c4dd59c into main May 13, 2026
11 checks passed
@samblacklock samblacklock deleted the fix/missing-limit-offset branch May 13, 2026 09:28
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 33.7.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants