From 8dbc97ee5845f48b19a6301c3cca6e359d778609 Mon Sep 17 00:00:00 2001 From: javorosas Date: Fri, 17 Jul 2026 17:12:08 +0200 Subject: [PATCH] fix: type property tax accounts as arrays --- CHANGELOG.md | 4 ++++ package.json | 2 +- src/types/common.ts | 2 +- test-d/runtime-types.test-d.ts | 4 ++++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 52628eb..6c3a5b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [4.18.1] 2026-07-17 +### Fixed +- Type `property_tax_account` as an array in invoice and receipt responses. + ## [4.18.0] 2026-06-06 ### Added - Expose structured API error metadata through `FacturapiError`, including `status`, `code`, `path`, `location`, `errors`, `logId`, and response `headers`. diff --git a/package.json b/package.json index b6c17f7..bc84884 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "facturapi", - "version": "4.18.0", + "version": "4.18.1", "description": "SDK oficial de Facturapi para Node.js y navegadores. Integra facturación electrónica en México (CFDI) de forma simple y obtén una perspectiva fiscal completa de tu operación, con búsquedas indexadas, envío de documentos y trazabilidad.", "main": "dist/index.cjs.js", "module": "dist/index.es.js", diff --git a/src/types/common.ts b/src/types/common.ts index e922bb9..867bab9 100644 --- a/src/types/common.ts +++ b/src/types/common.ts @@ -86,7 +86,7 @@ export interface InvoiceItem { third_party: InvoiceItemThirdParty; complement: string; parts: InvoiceItemPart[]; - property_tax_account: string; + property_tax_account: string[]; } export interface XmlNamespace { diff --git a/test-d/runtime-types.test-d.ts b/test-d/runtime-types.test-d.ts index 13ad533..c025639 100644 --- a/test-d/runtime-types.test-d.ts +++ b/test-d/runtime-types.test-d.ts @@ -2,6 +2,7 @@ import { expectAssignable, expectType, expectError } from 'tsd'; import Facturapi, { BinaryDownload, FacturapiError, + InvoiceItem, NodeLikeReadableStream, TaxFactor, } from '../dist'; @@ -31,6 +32,9 @@ if ('pipe' in binary && typeof binary.pipe === 'function') { expectAssignable(TaxFactor.EXENTO); +declare const invoiceItem: InvoiceItem; +expectType(invoiceItem.property_tax_account); + declare const apiError: FacturapiError; expectType(apiError.status); expectType(apiError.code);