Split allowed metadata store from the corpora module into a new Pinia store
The allowed metadata API endpoints have already been migrated, and are currently housed in api/metadata.ts
: they must be relocated to a new api/allowedMetadata.ts
file, along with their interfaces.
A new allowedMetadata
store must be created, where the allowed metadata are stored by corpus ID { [corpusId]: AllowedMetadata[] }
.
The setCorpusAllowedMetadata
, updateCorpusAllowedMetadata
and removeCorpusAllowedMetadata
mutations can be removed altogether. The listAllowedMetadata
, createAllowedMetadata
, updateAllowedMetadata
and deleteAllowedMetadata
actions must be moved from the corpora
store into that new allowedMetadata
store.
This should be done before / to make #1140 (closed) easier, but does not require any other migration to be done, as allowed metadata are pretty standalone.