Skip to content

feat: per-version file metadata client API#14

Merged
ABujalance merged 4 commits into
mainfrom
feat/metadata
May 8, 2026
Merged

feat: per-version file metadata client API#14
ABujalance merged 4 commits into
mainfrom
feat/metadata

Conversation

@ABujalance

Copy link
Copy Markdown
Contributor

Summary

  • Drops getFileMetadata (single endpoint, untyped) and replaces it with three per-version methods aligned with the new backend CRUD on /item/:id/version/:tag/metadata.
  • Re-introduces metadata on CreateItemProps / UpdateItemProps / createVersion with the new typed Metadata shape.

Changes

  • types/files.ts: new MetadataValue / Metadata types and METADATA_LIMITS constant (200 fields, 50-char keys, 50-char values).
  • core/client.ts:
    • getFileVersionMetadata(fileId, versionTag, params?)
    • updateFileVersionMetadata(fileId, versionTag, metadata)
    • deleteFileVersionMetadata(fileId, versionTag)
  • CLI test templates (test/, cloud-test/) updated to exercise the new methods + matching CONTEXT.md docs.
  • 5 new unit tests cover URL/method/body shape for each method and the createFile metadata FormData path.

Related

  • Companion PR on backend-api adds the matching endpoints, validator and UI.

ABujalance added 4 commits May 3, 2026 21:36
Replace the single `getFileMetadata` call with explicit per-version CRUD
matching the new backend endpoints.

- Add `Metadata` / `MetadataValue` / `METADATA_LIMITS` exports in `types/files`.
- New methods: `getFileVersionMetadata`, `updateFileVersionMetadata`,
  `deleteFileVersionMetadata`. `metadata` re-added to `CreateItemProps`,
  `UpdateItemProps`, and `createVersion` with the new typed shape.
- Update CLI test templates and CONTEXT.md docs.
- Unit tests cover URL/method/body for each new method and the createFile
  metadata FormData path.
@ABujalance ABujalance merged commit e4fbb63 into main May 8, 2026
1 check passed
@agviegas agviegas deleted the feat/metadata branch June 4, 2026 21:52
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.

2 participants