import type { MetadataItemInput } from '../schemas/MetadataItemInput'; /** * Request payload containing metadata items to add or update for a specific entity. * * **Priority Logic:** * 1. If `path` is present, it takes highest priority and determines the target entity * 2. If `path` is absent but `package` and `version` are provided, metadata is attached to the specific package version * 3. If only `package` is provided (without `version`), metadata is attached to the package level * 4. If neither `path`, `package`, nor `version` are provided, metadata is attached to the registry level * * @example {"metadata":[{"key":"environment","value":"production"},{"key":"team","value":"backend"}],"package":"my-package","path":"/path/to/entity","registryIdentifier":"my-registry","version":"1.0.0"} */ export interface MetadataInput { artifactKeyFilters?: { [key: string]: string; }; /** * Array of metadata key-value pairs */ metadata: MetadataItemInput[]; /** * Optional package name. Used when `path` is not provided. * * @example "my-package" */ package?: string; /** * Optional hierarchical path to the specific entity within the registry. * When provided, this takes highest priority for determining the metadata target. * Examples: "/my-package/1.0.0" for a specific version, "/my-package" for an package * * @example "/path/to/entity" */ path?: string; /** * The unique identifier of the registry where the metadata will be applied. * * @example "my-registry" */ registryIdentifier: string; /** * Optional version identifier. Only used when `package` is also provided and `path` is absent. * When both `package` and `version` are specified, metadata is attached to the specific package version. * * @example "1.0.0" */ version?: string; }