export type CreateApiConfirmarLotePorOrigenDocumentosRecibidosArgs = {body: BodyInit}; export type CreateApiConfirmarLotePorOrigenDocumentosRecibidosOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Confirmar lote de documentos electrónicos recibidos por origen * * POST /confirmarLotePorOrigenDocumentosRecibidos */ export const createApiConfirmarLotePorOrigenDocumentosRecibidos = async (args: CreateApiConfirmarLotePorOrigenDocumentosRecibidosArgs, options: CreateApiConfirmarLotePorOrigenDocumentosRecibidosOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/xml") headers.set('accept', "application/xml") const url = `${baseUrl.replace(/\/+$/, '')}/confirmarLotePorOrigenDocumentosRecibidos${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: 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() };