export type DeleteApiInvoiceCustomFieldsBulkDeleteArgs = {'ids[]': number}; export type DeleteApiInvoiceCustomFieldsBulkDeleteOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Bulk Delete Invoice Custom Fields * * DELETE /invoice-custom-fields/bulk-delete */ export const deleteApiInvoiceCustomFieldsBulkDelete = async (args: DeleteApiInvoiceCustomFieldsBulkDeleteArgs, options?: DeleteApiInvoiceCustomFieldsBulkDeleteOptions) => { const {baseUrl = "http://localhost/app4legal/api/v2/money", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/invoice-custom-fields/bulk-delete${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 };