export type CreateApiMntfeeServicesV2MaintenancefeeBulkHistoryExportArgs = {input: string}; export type CreateApiMntfeeServicesV2MaintenancefeeBulkHistoryExportOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Generates an Excel spreadsheet containing the user's bulk file submission history * * POST /mntfee-services/v2/maintenancefee/bulk/history/export */ export const createApiMntfeeServicesV2MaintenancefeeBulkHistoryExport = async (args: CreateApiMntfeeServicesV2MaintenancefeeBulkHistoryExportArgs, options: CreateApiMntfeeServicesV2MaintenancefeeBulkHistoryExportOptions) => { 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/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() };