export type AmenidadDepositoRequest = {authorization?: string | undefined, comision?: string | undefined, fecha?: string | undefined, forma_pago?: string | undefined, lote?: string | undefined, monto?: string | undefined, montoDeposito?: string | undefined, referencia?: string | undefined}; export type CreateApiApiPagoAmenidadArgs = {body: AmenidadDepositoRequest}; export type CreateApiApiPagoAmenidadOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * pago_amenidad * * POST /api/pago_amenidad */ export const createApiApiPagoAmenidad = async (args: CreateApiApiPagoAmenidadArgs, options: CreateApiApiPagoAmenidadOptions) => { 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/pago_amenidad${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() };