List the workspace's groups with their summary and permissions.
1
//native
2
3
import * as wmill from "windmill-client"
4
5
// windmill-client errors only carry the status text: throw the response body, which says why
6
wmill.OpenAPI.interceptors.response.use(async (response) => {
7
if (!response.ok) {
8
throw new Error(`${response.status} ${await response.text()}`)
9
}
10
return response
11
})
12
13
/**
14
* List Groups
15
* List the workspace's groups with their summary and permissions.
16
*/
17
export async function main(
18
page: number | undefined,
19
per_page: number | undefined
20
) {
21
return await wmill.GroupService.listGroups({
22
workspace: wmill.getWorkspace(),
23
page: page ?? undefined,
24
perPage: per_page ?? undefined,
25
26
27