export type CreateApiAdminUsersActionsBatchPermanentDeleteArgs = {body: {user_ids: Array}}; export type CreateApiAdminUsersActionsBatchPermanentDeleteOptions = {baseUrl: string, backendAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete users permanently in batch * * POST /admin/users/actions/batch_permanent_delete */ export const createApiAdminUsersActionsBatchPermanentDelete = async (args: CreateApiAdminUsersActionsBatchPermanentDeleteArgs, options: CreateApiAdminUsersActionsBatchPermanentDeleteOptions) => { const {baseUrl, fetch: fetchFn = fetch, backendAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (backendAuth !== undefined) cookies.push("mtls-prd=" + encodeURIComponent(backendAuth)) const url = `${baseUrl.replace(/\/+$/, '')}/admin/users/actions/batch_permanent_delete${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };