fix(storage): improve FileObject type accuracy with nullable fields#2116
fix(storage): improve FileObject type accuracy with nullable fields#2116
Conversation
mandarini
commented
Feb 12, 2026
- FileObject: Made id, updated_at, created_at, last_accessed_at, metadata nullable (null for folders)
- FileObject: Deprecated bucket_id, owner, buckets fields (not returned by list operations)
- FileObjectV2: Deprecated updated_at field (API returns last_modified)
- SearchV2Object: Made key optional (sometimes missing in responses)
- SearchV2Object: Made id, updated_at, created_at, metadata, last_accessed_at nullable (null for folders)
- Added FileMetadata interface to properly type metadata objects
|
No actionable comments were generated in the recent review. 🎉 📝 WalkthroughSummary by CodeRabbit
WalkthroughThe PR introduces a typed FileMetadata interface and applies it across storage types. FileObject fields (id, updated_at, created_at, last_accessed_at, metadata) are now nullable and some legacy fields (bucket_id, owner, buckets) are optional/deprecated. A new FileObjectV2 models Info responses with v2-style fields (etag, size, cache_control, content_type, metadata, version). SearchV2Object was reshaped (name/key, nullable id/updated_at/created_at, FileMetadata), plus a SearchV2Folder alias and nextCursorKey on SearchV2Result. StorageFileApi docs were expanded and tests were updated to assert richer response validation. Comment |
@supabase/auth-js
@supabase/functions-js
@supabase/postgrest-js
@supabase/realtime-js
@supabase/storage-js
@supabase/supabase-js
commit: |
130799e to
f747aa5
Compare
| /** @deprecated Use last_modified instead */ | ||
| last_accessed_at: string |
There was a problem hiding this comment.
this is shared by info endpoint but it isn't returned so required string would be wrong
475e161 to
6cee1be
Compare
6cee1be to
4fa1627
Compare