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.
This commit is contained in:
2026-10-15 09:48:47 +02:00
parent 96f4fa5a38
commit 0004e4b9bd
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;
};