export type DeleteApiApiOrganizationsOrganizationIdUsersIdArgs = {id: string, organization_id: string}; export type DeleteApiApiOrganizationsOrganizationIdUsersIdOptions = {baseUrl: string, cookieAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete organization user * * DELETE /api/organizations/{organization_id}/users/{id}/ * * Also accepts auth: basicAuth, jwtAuth */ export const deleteApiApiOrganizationsOrganizationIdUsersId = async (args: DeleteApiApiOrganizationsOrganizationIdUsersIdArgs, options: DeleteApiApiOrganizationsOrganizationIdUsersIdOptions) => { const {baseUrl, fetch: fetchFn = fetch, cookieAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (cookieAuth !== undefined) cookies.push("sessionid=" + encodeURIComponent(cookieAuth)) const url = `${baseUrl.replace(/\/+$/, '')}/api/organizations/${encodeURIComponent(String(args.organization_id))}/users/${encodeURIComponent(String(args.id))}/${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };