//native
import * as wmill from "windmill-client"
// windmill-client errors only carry the status text: throw the response body, which says why
wmill.OpenAPI.interceptors.response.use(async (response) => {
if (!response.ok) {
throw new Error(`${response.status} ${await response.text()}`)
}
return response
})
/**
* Resume Suspended Flow as Owner
* Approve a flow suspended on an approval step, as an owner of the flow or a workspace admin. The payload is passed to the flow as the resume value.
*/
export async function main(
id: string,
resume_payload: { [key: string]: any } | undefined
) {
return await wmill.JobService.resumeSuspendedFlowAsOwner({
workspace: wmill.getWorkspace(),
id,
requestBody: resume_payload ?? {},
})
}
Submitted by hugo989 14 days ago
//native
import * as wmill from "windmill-client@1";
export async function main(id: string, resumePayload?: object) {
return wmill.JobService.resumeSuspendedFlowAsOwner({
workspace: wmill.getWorkspace(),
id,
requestBody: resumePayload ?? {},
});
}
Submitted by hugo989 148 days ago