export type GetApiMntfeeServicesV1MaintenancefeeBulkContentArgs = {fileId?: number | undefined, contentManagerId?: string | undefined}; export type GetApiMntfeeServicesV1MaintenancefeeBulkContentOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Retrieves the remote file for the given bulk file * * GET /mntfee-services/v1/maintenancefee/bulk/content */ export const getApiMntfeeServicesV1MaintenancefeeBulkContent = async (args: GetApiMntfeeServicesV1MaintenancefeeBulkContentArgs, options: GetApiMntfeeServicesV1MaintenancefeeBulkContentOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "*/*") if (args.fileId != null) query.append("fileId", String(args.fileId)) if (args.contentManagerId != null) query.append("contentManagerId", String(args.contentManagerId)) const url = `${baseUrl.replace(/\/+$/, '')}/mntfee-services/v1/maintenancefee/bulk/content${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return res.blob() };