Skip to content

Add poster_time to file/gallery field value types#50

Merged
stefanoverna merged 2 commits into
mainfrom
feat/file-field-poster-time
Jun 29, 2026
Merged

Add poster_time to file/gallery field value types#50
stefanoverna merged 2 commits into
mainfrom
feat/file-field-poster-time

Conversation

@stefanoverna

Copy link
Copy Markdown
Member

What

The CMA returns (and accepts) a poster_time metadata key on file and gallery field values for video assets — the float second into the video used to generate the thumbnail (the video counterpart of focal_point for images). The hand-written field value types were missing it.

Changes

  • Add poster_time to FileFieldValue (number | null) and FileFieldValueInRequest (number | null, optional), in packages/cma-client/src/fieldTypes/file.ts.
  • Require poster_time in the isFileFieldValue response type guard, matching the existing focal_point check.
  • Surface poster_time in inspectItem for both file and gallery items (guarded, so existing snapshots are unaffected).

GalleryItem / GalleryFieldValue derive from the file types, so they pick this up automatically.

Context

Mirrors the corresponding docs/hyperschema update on the API side documenting poster_time in the single-asset and asset gallery fields. The generated ApiTypes/RawApiTypes already carry poster_time for the upload default_field_metadata (generated from the hyperschema); these hand-written record field-value types are the part that needed a manual update.

🤖 Generated with Claude Code

The CMA returns (and accepts) a `poster_time` metadata key on file and
gallery field values for video assets — the float second into the video
used to generate the thumbnail. The hand-written field value types didn't
include it, so it was missing from `FileFieldValue`,
`FileFieldValueInRequest`, and (via re-export) the gallery equivalents.

- Add `poster_time` to `FileFieldValue` (`number | null`) and
  `FileFieldValueInRequest` (`number | null`, optional).
- Require `poster_time` in the `isFileFieldValue` response type guard,
  matching the existing `focal_point` check.
- Surface `poster_time` in `inspectItem` for file and gallery items.

Gallery types derive from the file types, so they pick this up for free.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@stefanoverna stefanoverna force-pushed the feat/file-field-poster-time branch from e3c4e95 to bcda3fd Compare June 29, 2026 12:51
@stefanoverna stefanoverna merged commit 56e77cb into main Jun 29, 2026
0 of 3 checks passed
@stefanoverna stefanoverna deleted the feat/file-field-poster-time branch June 29, 2026 12:55
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.

1 participant