Update the output format for various asset and folder commands to ensure JSON Lines are emitted on stdout, providing a consistent structure across commands. Enhance error handling to ensure that unknown ids or invalid inputs fail the entire command, improving user feedback and command reliability. This change streamlines the user experience and aligns with the fail-fast convention for batch commands.
614 B
614 B
dapi folder rm <ids...>
Deletes one or more folders. Deletion cascades: every descendant folder and every asset inside the subtree is deleted with it. The fulfilled record reports what the cascade removed, so callers can detect when a delete swept more than intended. Alias: remove.
Input
<ids...>: folder ids (required)
Output
JSON Lines on stdout, one per deleted folder:
{ id: string; deletedFolders: number; deletedAssets: number }
// deletedFolders counts the folder itself plus all descendants
Errors
An unknown id fails the whole command before anything is deleted.