//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 Folders
* List the workspace's folders with their owners and permissions.
*/
export async function main(
page: number | undefined,
per_page: number | undefined
) {
return await wmill.FolderService.listFolders({
workspace: wmill.getWorkspace(),
page: page ?? undefined,
perPage: per_page ?? undefined,
})
}
Submitted by hugo989 5 hours ago