Skip to content

Use DateTime for timestamp fields in storage types #1597

Description

@spydon

Context

AnalyticsBucket (added in #1588) exposes createdAt / updatedAt as DateTime. The pre-existing storage types still expose their timestamp fields as String, so the public API is now inconsistent: some timestamps are parsed DateTime values and others are raw ISO strings the consumer has to parse themselves.

Aligning the existing types on DateTime is a breaking change, so it is deferred to v3.

Affected fields (packages/storage_client/lib/src/types.dart)

  • Bucket.createdAt, Bucket.updatedAt (StringDateTime)
  • FileObject.createdAt, FileObject.updatedAt, FileObject.lastAccessedAt (String?DateTime?)
  • FileObjectV2.createdAt (StringDateTime), FileObjectV2.updatedAt, FileObjectV2.lastAccessedAt (String?DateTime?)
  • PaginatedFile.createdAt, PaginatedFile.updatedAt (String?DateTime?)

Notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requeststorageThis issue or pull request is related to storagev3

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions