//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
})
/**
* List Schedules
* List the workspace's schedules, optionally filtered by schedule path prefix or by the script/flow they run.
*/
export async function main(
path_start: string | undefined,
script_path: string | undefined,
page: number | undefined,
per_page: number | undefined
) {
return await wmill.ScheduleService.listSchedules({
workspace: wmill.getWorkspace(),
pathStart: path_start || undefined,
path: script_path || undefined,
page: page ?? undefined,
perPage: per_page ?? undefined,
})
}
Submitted by hugo989 5 hours ago