Skip to content

Conversation

@pratyush07-hub
Copy link
Contributor

This PR adds the Batching type to the QuerystringSearchResponse and SearchResponse interfaces in the Volto types package. Previously, the batching information returned by the Plone REST API was missing in TypeScript definitions, which caused incomplete type safety when consuming paginated results from the API.

Changes include:

  • Created a Batching interface in common.d.ts with @id, first, last, and optional prev and next properties.
  • Updated QuerystringSearchResponse and SearchResponse to optionally include a batching property.
  • Cleaned up duplicate or unnecessary Batching definitions in registry.d.ts and other service files.

This ensures TypeScript correctly recognizes API responses containing batching metadata, improving type safety when working with paginated query results.

Files updated:

  • packages/types/src/services/common.d.ts
  • packages/types/src/services/querystring-search.d.ts
  • packages/types/src/services/search.d.ts
  • packages/types/src/services/registry.d.ts


Closes #6267


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.

@plone/types: Batching information missing from batched requests

1 participant