feat(files): batchFiles action for one-shot file operations#112
Merged
remko48 merged 2 commits intodevelopmentfrom May 4, 2026
Merged
feat(files): batchFiles action for one-shot file operations#112remko48 merged 2 commits intodevelopmentfrom
remko48 merged 2 commits intodevelopmentfrom
Conversation
…label
Adds `batchFiles(type, objectId, action, fileIds, params?)` to the files
plugin. Replaces the N-sequential-calls pattern (loop calling
publishFile/unpublishFile/deleteFile per id) with a single POST to
`/files/batch`.
The backend returns 200 when every operation succeeds, or 207 (multi-status)
when some fail; per-file outcomes live in `data.results` and aggregate
counts in `data.summary` ({ succeeded, failed, total }). Both 200 and 207
are treated as valid responses — the caller inspects data.summary to
decide whether to surface a partial-failure UI.
Backwards compatible: existing publishFile / unpublishFile / deleteFile
actions are unchanged. Consumers that haven't migrated continue to work.
Closes OpenRegister file-actions task 136 (ViewObject.vue migration to
the batch endpoint, paired in a separate openregister commit).
SudoThijn
approved these changes
May 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Context
OpenRegister's file-actions change registered POST /api/objects/{register}/{schema}/{id}/files/batch (FilesController::batch). This shared-library addition lets every consumer (OR, OpenCatalogi, Procest, Pipelinq, MyDash) migrate their batch-action UIs from the N-call loop to one round-trip without duplicating fetch logic.
OpenRegister ViewObject.vue is the first consumer; the migration is paired on feat/openspec-batch-impl-2026-05-02.
(Targeting beta because origin/development no longer exists on GitHub; retarget on review if a different base is preferred.)
Test plan