(workflowId: string)
| 173 | } |
| 174 | |
| 175 | export async function assertWorkflowMutable(workflowId: string): Promise<void> { |
| 176 | const status = await getWorkflowLockStatus(workflowId) |
| 177 | if (status.locked) { |
| 178 | throw new WorkflowLockedError( |
| 179 | status.lockedBy === 'folder' |
| 180 | ? 'Workflow is locked by its containing folder' |
| 181 | : 'Workflow is locked' |
| 182 | ) |
| 183 | } |
| 184 | } |
| 185 | |
| 186 | export async function assertFolderMutable(folderId: string | null): Promise<void> { |
| 187 | const status = await getFolderLockStatus(folderId) |
no test coverage detected