export type MantenimientoRequest = {comision?: string | undefined, descuento_mes?: string | undefined, descuento_porcentaje?: string | undefined, externalMonths?: string | undefined, internalMonths?: string | undefined, lote?: string | undefined, memo?: string | undefined, memoria?: string | undefined, meses?: string | undefined, promocion?: string | undefined, rfc?: string | undefined, tipo_pago?: string | undefined}; export type CreateApiApiFacturasPagadasArgs = {body: MantenimientoRequest}; export type CreateApiApiFacturasPagadasOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * facturas_pagadas * * POST /api/facturas_pagadas */ export const createApiApiFacturasPagadas = async (args: CreateApiApiFacturasPagadasArgs, options: CreateApiApiFacturasPagadasOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") headers.set('accept', "*/*") const url = `${baseUrl.replace(/\/+$/, '')}/api/facturas_pagadas${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return res.blob() };