feat(synapse-sdk): expose paginated client dataset queries in WarmStorageService#717
Open
Chaitu-Tatipamula wants to merge 2 commits intoFilOzone:masterfrom
Open
Conversation
8dcf2c0 to
2c4a880
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates WarmStorageService in synapse-sdk to expose the new paginated client dataset query actions added in synapse-core, enabling consumers to query client datasets using offset/limit and retrieve dataset counts/IDs.
Changes:
- Extended
getClientDataSetsto accept optionaloffset/limitfor paginated reads. - Added
getClientDataSetsLengthandgetClientDataSetIdswrappers to expose total count and paginated ID reads. - Refactored
getClientDataSetsWithDetailsto fetch dataset IDs via the new core action instead of a directreadContractcall.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Collaborator
|
@hugomrdias can you review this PR? |
2c4a880 to
0b8b732
Compare
- Fix JSDoc to use `0n` instead of `0` for bigint parameters - Use OutputType aliases for return type consistency - Implement chunked pagination in getClientDataSetsWithDetails to avoid unbounded response size - Use wrapper method internally for consistency - Add comprehensive tests for pagination methods
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Exposes the paginated client dataset actions from synapse-core (#698) in
WarmStorageService, enabling consumers to useoffset/limitfor dataset queries.Changes
packages/synapse-sdk/src/warm-storage/service.tsgetClientDataSets— Added optionaloffset/limitparameters to support paginated queriesgetClientDataSetIds— New method wrappinggetClientDataSetIdsfrom synapse-core, returns dataset ID arrays with optional paginationgetClientDataSetsLength— New method wrappinggetClientDataSetsLengthfrom synapse-core, returns total dataset count for a clientgetClientDataSetsWithDetails— Refactored to usegetClientDataSetIdsinstead of rawreadContractcallRelated
with this in place
Closes #691