Module
x/windmill/windmill-api/services/GroupService.ts
Windmill deno client (separated from the main repo because most of the code is auto-generated from the openapi and not worth committing)
Extremely Popular
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398/* istanbul ignore file *//* tslint:disable *//* eslint-disable */import type { Group } from '../models/Group.ts';import type { InstanceGroup } from '../models/InstanceGroup.ts';
import type { CancelablePromise } from '../core/CancelablePromise.ts';import { OpenAPI } from '../core/OpenAPI.ts';import { request as __request } from '../core/request.ts';
export class GroupService {
/** * list instance groups * @returns InstanceGroup instance group list * @throws ApiError */ public static listInstanceGroups(): CancelablePromise<Array<InstanceGroup>> { return __request(OpenAPI, { method: 'GET', url: '/groups/list', }); }
/** * get instance group * @returns InstanceGroup instance group * @throws ApiError */ public static getInstanceGroup({ name, }: { name: string, }): CancelablePromise<InstanceGroup> { return __request(OpenAPI, { method: 'GET', url: '/groups/get/{name}', path: { 'name': name, }, }); }
/** * create instance group * @returns string instance group created * @throws ApiError */ public static createInstanceGroup({ requestBody, }: { /** * create instance group */ requestBody: { name: string; summary?: string; }, }): CancelablePromise<string> { return __request(OpenAPI, { method: 'POST', url: '/groups/create', body: requestBody, mediaType: 'application/json', }); }
/** * update instance group * @returns string instance group updated * @throws ApiError */ public static updateInstanceGroup({ name, requestBody, }: { name: string, /** * update instance group */ requestBody: { new_summary: string; }, }): CancelablePromise<string> { return __request(OpenAPI, { method: 'POST', url: '/groups/update/{name}', path: { 'name': name, }, body: requestBody, mediaType: 'application/json', }); }
/** * delete instance group * @returns string instance group deleted * @throws ApiError */ public static deleteInstanceGroup({ name, }: { name: string, }): CancelablePromise<string> { return __request(OpenAPI, { method: 'DELETE', url: '/groups/delete/{name}', path: { 'name': name, }, }); }
/** * add user to instance group * @returns string user added to instance group * @throws ApiError */ public static addUserToInstanceGroup({ name, requestBody, }: { name: string, /** * user to add to instance group */ requestBody: { email: string; }, }): CancelablePromise<string> { return __request(OpenAPI, { method: 'POST', url: '/groups/adduser/{name}', path: { 'name': name, }, body: requestBody, mediaType: 'application/json', }); }
/** * remove user from instance group * @returns string user removed from instance group * @throws ApiError */ public static removeUserFromInstanceGroup({ name, requestBody, }: { name: string, /** * user to remove from instance group */ requestBody: { email: string; }, }): CancelablePromise<string> { return __request(OpenAPI, { method: 'POST', url: '/groups/removeuser/{name}', path: { 'name': name, }, body: requestBody, mediaType: 'application/json', }); }
/** * list groups * @returns Group group list * @throws ApiError */ public static listGroups({ workspace, page, perPage, }: { workspace: string, /** * which page to return (start at 1, default 1) */ page?: number, /** * number of items to return for a given page (default 30, max 100) */ perPage?: number, }): CancelablePromise<Array<Group>> { return __request(OpenAPI, { method: 'GET', url: '/w/{workspace}/groups/list', path: { 'workspace': workspace, }, query: { 'page': page, 'per_page': perPage, }, }); }
/** * list group names * @returns string group list * @throws ApiError */ public static listGroupNames({ workspace, onlyMemberOf, }: { workspace: string, /** * only list the groups the user is member of (default false) */ onlyMemberOf?: boolean, }): CancelablePromise<Array<string>> { return __request(OpenAPI, { method: 'GET', url: '/w/{workspace}/groups/listnames', path: { 'workspace': workspace, }, query: { 'only_member_of': onlyMemberOf, }, }); }
/** * create group * @returns string group created * @throws ApiError */ public static createGroup({ workspace, requestBody, }: { workspace: string, /** * create group */ requestBody: { name: string; summary?: string; }, }): CancelablePromise<string> { return __request(OpenAPI, { method: 'POST', url: '/w/{workspace}/groups/create', path: { 'workspace': workspace, }, body: requestBody, mediaType: 'application/json', }); }
/** * update group * @returns string group updated * @throws ApiError */ public static updateGroup({ workspace, name, requestBody, }: { workspace: string, name: string, /** * updated group */ requestBody: { summary?: string; }, }): CancelablePromise<string> { return __request(OpenAPI, { method: 'POST', url: '/w/{workspace}/groups/update/{name}', path: { 'workspace': workspace, 'name': name, }, body: requestBody, mediaType: 'application/json', }); }
/** * delete group * @returns string group deleted * @throws ApiError */ public static deleteGroup({ workspace, name, }: { workspace: string, name: string, }): CancelablePromise<string> { return __request(OpenAPI, { method: 'DELETE', url: '/w/{workspace}/groups/delete/{name}', path: { 'workspace': workspace, 'name': name, }, }); }
/** * get group * @returns Group group * @throws ApiError */ public static getGroup({ workspace, name, }: { workspace: string, name: string, }): CancelablePromise<Group> { return __request(OpenAPI, { method: 'GET', url: '/w/{workspace}/groups/get/{name}', path: { 'workspace': workspace, 'name': name, }, }); }
/** * add user to group * @returns string user added to group * @throws ApiError */ public static addUserToGroup({ workspace, name, requestBody, }: { workspace: string, name: string, /** * added user to group */ requestBody: { username?: string; }, }): CancelablePromise<string> { return __request(OpenAPI, { method: 'POST', url: '/w/{workspace}/groups/adduser/{name}', path: { 'workspace': workspace, 'name': name, }, body: requestBody, mediaType: 'application/json', }); }
/** * remove user to group * @returns string user removed from group * @throws ApiError */ public static removeUserToGroup({ workspace, name, requestBody, }: { workspace: string, name: string, /** * added user to group */ requestBody: { username?: string; }, }): CancelablePromise<string> { return __request(OpenAPI, { method: 'POST', url: '/w/{workspace}/groups/removeuser/{name}', path: { 'workspace': workspace, 'name': name, }, body: requestBody, mediaType: 'application/json', }); }
}