export type DeleteApiApiAccountDeletionRequestsBulkArgs = {createdDtm: string}; export type DeleteApiApiAccountDeletionRequestsBulkOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * bulkDeleteAccountDeletionRequestByCreatedDtm * * DELETE /api/accountDeletionRequests/bulk */ export const deleteApiApiAccountDeletionRequestsBulk = async (args: DeleteApiApiAccountDeletionRequestsBulkArgs, options: DeleteApiApiAccountDeletionRequestsBulkOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.createdDtm != null) query.append("createdDtm", String(args.createdDtm)) const url = `${baseUrl.replace(/\/+$/, '')}/api/accountDeletionRequests/bulk${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 };