export type CreateApiMntfeeServicesV2MaintenancefeeBulkHistoryAdminExportArgs = {input: string}; export type CreateApiMntfeeServicesV2MaintenancefeeBulkHistoryAdminExportOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Retrieves the bulk file submission for an admin user * * POST /mntfee-services/v2/maintenancefee/bulk/history/admin/export */ export const createApiMntfeeServicesV2MaintenancefeeBulkHistoryAdminExport = async (args: CreateApiMntfeeServicesV2MaintenancefeeBulkHistoryAdminExportArgs, options: CreateApiMntfeeServicesV2MaintenancefeeBulkHistoryAdminExportOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "*/*") if (args.input != null) query.append("input", String(args.input)) const url = `${baseUrl.replace(/\/+$/, '')}/mntfee-services/v2/maintenancefee/bulk/history/admin/export${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return res.blob() };