Skip to content

[Backend] Define admin media library File resource operations #304

@juliuskrah

Description

@juliuskrah

Related admin initiative: #287
Blocks admin issues: #295, #301

Summary

Define and implement the backend File resource operations needed by the commerce admin media library and asset picker.

Acceptance criteria

  • gitstore-api exposes documented File resource list/detail operations suitable for browsing media in a namespace.
  • The issue explicitly decides and implements the supported admin write capabilities for File resources, such as attach-by-reference, replace, upload, or read-only selection.
  • Media responses include stable identifiers, display metadata, content type, URL or resolvable reference, optional/required state, and deterministic missing-file errors.
  • Product, ProductVariant, Collection, and CategoryTaxonomy media references can be validated through backend-owned APIs or resource write validation.
  • Authorization and namespace boundary errors are structured for admin UI mapping.
  • Tests cover media browsing, missing assets, invalid references, namespace isolation, and whichever File write capabilities are supported.

Architecture note

The commerce admin remains an optional add-on and consumes gitstore-api; it must not talk directly to gitstore-git-service. In admin workflows, a namespace is the store context.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions