List queries now return metadata with pagination options
This release updates list query behavior to include metadata and adds pagination controls. It also adjusts method signatures to support these capabilities and limits CI tests to push events.
Breaking Changes
- all() now returns an AllOperationResult instead of a plain array, containing
{ items, metadata }. Consumers must readresult.itemsinstead of using the array directly (src/ops/all.ts; tests updated to assert metadata) (commit 1109e99). - PItemAPI.all signature extended to accept
locationsandallOptions(AllOptions). Calls that previously passed onlyqueryshould update to the new signature as needed (src/PItemAPI.ts; tests updated to expect({}, [], undefined)) (commit 1109e99).
New Features & Improvements
- Return metadata for list queries and add pagination options.
all()acceptsAllOptionsand will overridelimitandoffsetquery params when provided (src/ops/all.ts) (commit 1109e99). - Enhance logging for list queries to include
allOptionsand returned metadata (src/ops/all.ts) (commit 1109e99). - Update
one()to read from AllOperationResult, processresult.items, and return the first item; remove the forcedparams.limit = '1'(src/ops/one.ts) (commit 1109e99).
Testing Improvements
- Update tests to mock and assert the AllOperationResult shape for list queries, including metadata checks and the new PItemAPI.all call signature (tests/AItemAPI.test.ts, tests/PItemAPI.test.ts) (commit 1109e99).
Dependency Updates
- Bump @fjell/* packages: core to 4.4.64, http-api to 4.4.54, logging to 4.4.59, registry to 4.4.70; devDependency @fjell/common-config to 1.1.31 (package.json) (commit 1109e99).
CI/Workflow
- Limit CI test workflow to push events only; remove
pull_requesttrigger formain. Push triggers retained formain,working, andfeature/**(/.github/workflows/test.yml) (commit 24818f2).