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:
@@ -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'
|
||||
}
|
||||
|
||||
@@ -1716,6 +1716,7 @@ export type FlowsReadGraphResponse = (BrainGraph);
|
||||
export type FlowsReadLibraryResponse = (Array<LibraryNode>);
|
||||
|
||||
export type FlowsDeleteSharedNodeData = {
|
||||
detach?: boolean;
|
||||
libName: string;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user