feat(storage)!: add pagination to listBucketSnapshots and remove deprecated fields#79
Conversation
…ecated fields
Add paginationToken and limit support to listBucketSnapshots. Remove all
deprecated fields across the storage package: snapshotName, description,
consistency, region, regions, hasForks, sourceBucketName,
sourceBucketSnapshot, contentType (presigned-url), and path (upload).
BREAKING CHANGE: listBucketSnapshots now returns { snapshots, paginationToken }
instead of an array. Removed deprecated fields from CreateBucketOptions,
UpdateBucketOptions, BucketInfoResponse, GetPresignedUrlOptions,
CreateBucketSnapshotOptions, and UploadResponse.
Assisted-by: Claude Opus 4.6 via Claude Code
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Greptile SummaryThis PR adds pagination ( Confidence Score: 5/5Safe to merge — breaking changes are intentional, well-scoped, and correctly implemented. All remaining findings are P2 style suggestions; no correctness, data-integrity, or reliability issues were found. The pagination implementation maps correctly to the AWS SDK types, and all deprecated field removals are consistent with their prior packages/storage/src/lib/upload/server.ts — stale
|
| Filename | Overview |
|---|---|
| packages/storage/src/lib/bucket/snapshot.ts | Adds paginationToken/limit to ListBucketSnapshotsOptions; changes return type from array to { snapshots, paginationToken }; removes deprecated snapshotName; exports new BucketSnapshot type. Pagination maps correctly to ListBucketsCommand ContinuationToken/MaxBuckets. |
| packages/storage/src/lib/bucket/create.ts | Removes deprecated consistency and region fields from CreateBucketOptions along with their validation and header-setting logic. |
| packages/storage/src/lib/bucket/info.ts | Removes deprecated hasForks, sourceBucketName, and sourceBucketSnapshot fields from BucketInfoResponse and their mapping from the API response. |
| packages/storage/src/lib/bucket/update.ts | Removes deprecated regions field from UpdateBucketOptions and its handling logic; locations remains as the sole mechanism. |
| packages/storage/src/lib/object/presigned-url.ts | Removes deprecated contentType field from GetPresignedUrlOptions. |
| packages/storage/src/lib/upload/client.ts | Removes deprecated path field from UploadResponse and all JSON request bodies; name is now the sole identifier field. |
| packages/storage/src/lib/upload/server.ts | Removes contentType from destructured request fields and from the SinglepartInit presigned URL call; contentType remains declared on ClientUploadRequest but is now silently discarded. |
| packages/storage/src/server.ts | Exports the new BucketSnapshot type from snapshot.ts. |
| packages/storage/src/test/bucket-create.integration.test.ts | Removes the integration test for the now-deleted region validation; remaining tests correctly reflect the updated createBucket API. |
Comments Outside Diff (1)
-
packages/storage/src/lib/upload/server.ts, line 14 (link)Stale
contentTypeinClientUploadRequestcontentTypeis still declared onClientUploadRequestbut is no longer destructured or forwarded togetPresignedUrlafter that field was removed fromGetPresignedUrlOptions. The client still sends it in the request body (e.g.,SinglepartInit,MultipartInit), so the server silently discards it. For consistency with the rest of the cleanup in this PR it should either be removed or marked@deprecated.
Reviews (1): Last reviewed commit: "feat(storage)!: add pagination to listBu..." | Re-trigger Greptile
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit fdc1f5b. Configure here.
Remove unused availableRegions, validateRegions, and TigrisHeaders.CONSISTENT. Deprecate contentType in ClientUploadRequest. Assisted-by: Claude Opus 4.6 via Claude Code Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
🎉 This PR is included in version 3.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 2.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 2.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 2.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |

add pagination to listBucketSnapshots and remove deprecated fields
Add paginationToken and limit support to listBucketSnapshots. Remove all deprecated fields across the storage package: snapshotName, description, consistency, region, regions, hasForks, sourceBucketName, sourceBucketSnapshot, contentType (presigned-url), and path (upload).
BREAKING CHANGE: listBucketSnapshots now returns { snapshots, paginationToken } instead of an array. Removed deprecated fields from CreateBucketOptions, UpdateBucketOptions, BucketInfoResponse, GetPresignedUrlOptions, CreateBucketSnapshotOptions, and UploadResponse.
Assisted-by: Claude Opus 4.6 via Claude Code
Note
Medium Risk
Medium risk because it introduces breaking API shape changes (notably
listBucketSnapshotsresponse) and removes previously accepted options/fields, requiring downstream updates; runtime logic changes are limited to snapshot listing pagination and header handling.Overview
Adds pagination support to
listBucketSnapshotsby acceptingpaginationToken/limit, forwarding them to S3ListBucketsCommand, and returning{ snapshots, paginationToken }(with a new exportedBucketSnapshottype) instead of an array.Removes a set of deprecated fields and behaviors across the storage package: legacy bucket
region/regions+ consistency handling, deprecated fork fields onBucketInfoResponse, deprecated snapshot fields (snapshotName, snapshotdescription), deprecatedcontentTypeoption forgetPresignedUrl, and deprecatedpathfield from upload client requests/responses; tests and headers are updated accordingly.Reviewed by Cursor Bugbot for commit 792a0b0. Bugbot is set up for automated code reviews on this repo. Configure here.