export type DeleteApiOrganizationsUsersIdArgs = {id: string, 'Cartesia-Version': '2026-03-01'}; export type DeleteApiOrganizationsUsersIdOptions = {baseUrl?: string | undefined, AdminAPIKeyAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Remove User * * DELETE /organizations/users/{id} */ export const deleteApiOrganizationsUsersId = async (args: DeleteApiOrganizationsUsersIdArgs, options?: DeleteApiOrganizationsUsersIdOptions) => { const {baseUrl = "https://api.cartesia.ai", fetch: fetchFn = fetch, AdminAPIKeyAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args['Cartesia-Version'] != null) headers.set("Cartesia-Version", String(args['Cartesia-Version'])) if (AdminAPIKeyAuth !== undefined) headers.set('authorization', `Bearer ${AdminAPIKeyAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/organizations/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 };