export type CreateApihttpLocalhost8000ProjectIdGroupsMembershipsArgs = {project_id: string}; export type CreateApihttpLocalhost8000ProjectIdGroupsMembershipsOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Update the group membership of multiple users at once. * * POST http://localhost:8000/{project_id}/groups/memberships/ */ export const createApihttpLocalhost8000ProjectIdGroupsMemberships = async (args: CreateApihttpLocalhost8000ProjectIdGroupsMembershipsArgs, options?: CreateApihttpLocalhost8000ProjectIdGroupsMembershipsOptions) => { const {baseUrl = "http://localhost:8000", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}http://localhost:8000/${encodeURIComponent(String(args.project_id))}/groups/memberships/${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };