Hello,
I want to reload the flows programmatically.
Therefore I want to use the setFlows function of the node runtime.
(DefinitelyTyped/index.d.ts at master · DefinitelyTyped/DefinitelyTyped · GitHub)
/**
* Sets the current flow configuration
* @param opts
* @param opts.flows - the flow configuration: {flows: [..], credentials: {}}
* @param opts.deploymentType - the type of deployment - "full", "nodes", "flows", "reload"
* @param opts.req - the request to log (optional)
*/
setFlows: (opts: { flows: { flows: object; credentials: object; req?: object } }) => Promise<{ rev: string }>;
Documentation:
https://nodered.org/docs/api/modules/v/1.3/@node-red_runtime_flows.html#.setFlows
(has an additional user object)
So the docs mention this format {flows:{}, req?:{}, deploymentType: string},
the coding accepts this format: {flows:[{},{}], credentials?:{}, req?:{}}
there is a mismatch of API Input parameters and docs, but my biggest issue is how can I set the deploymentType. I am using typeScript.
Any suggestions?
Thank you
okm