Retire a shared node in use with ?detach=true

DELETE /flows/library/{name} still answers 409 while nodes use the source.
With detach=true each of them keeps a copy of the code, in the published
flow and the draft, the source is deleted and the running users rebuild.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WgBfkm4rCmtd1T4vHWjEPx
This commit is contained in:
2026-10-15 09:48:47 +02:00
co-authored by Claude Opus 5.5
parent 0746c94e0a
commit be85c6c92a
7 changed files with 114 additions and 2 deletions
+7
View File
@@ -819,8 +819,12 @@ export class FlowsService {
/**
* Delete Shared Node
* Remove a shared source, as long as no flow still runs it.
*
* With ``detach``, every node using it keeps a copy of the code as its own
* first, so the source can be retired while flows still use it.
* @param data The data for the request.
* @param data.libName
* @param data.detach
* @returns Message Successful Response
* @throws ApiError
*/
@@ -831,6 +835,9 @@ export class FlowsService {
path: {
lib_name: data.libName
},
query: {
detach: data.detach
},
errors: {
422: 'Validation Error'
}
+1
View File
@@ -1716,6 +1716,7 @@ export type FlowsReadGraphResponse = (BrainGraph);
export type FlowsReadLibraryResponse = (Array<LibraryNode>);
export type FlowsDeleteSharedNodeData = {
detach?: boolean;
libName: string;
};