Commit Graph
2 Commits
Author SHA1 Message Date
DumiFlex b7d672396a feat(import-export): add templates bucket to engine exporter + importer 2026-05-28 00:21:51 +03:00
DumiFlex f3e1749914 feat(wp_api): /wp/api/import/commit + /wp/api/import/undo endpoints
Add two new POST handlers in wp_api/import_export.py wrapping the
engine.importer.commit_import / undo_import functions from Task 13.

- /wp/api/import/commit: body {adds, replaces, renames}; 200 with
  {ok, undo_entry_id, summary} on success; 400 on contract/DB errors.
- /wp/api/import/undo: body {undo_entry_id}; 200 with {ok: True} on
  success; 404 on unknown entry; 400 on shape/other errors.
- Both guard request body via validate_body_size (5 MB cap).
- Engine returns undo_id; handler renames to undo_entry_id at the
  HTTP boundary to keep the locked endpoint contract decoupled from
  the engine field name.
- Legacy export_bundle + import_bundle + new export_build handlers
  remain unchanged.
2026-05-22 22:21:33 +03:00