Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/types/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 4 additions & 0 deletions test-d/runtime-types.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { expectAssignable, expectType, expectError } from 'tsd';
import Facturapi, {
BinaryDownload,
FacturapiError,
InvoiceItem,
NodeLikeReadableStream,
TaxFactor,
} from '../dist';
Expand Down Expand Up @@ -31,6 +32,9 @@ if ('pipe' in binary && typeof binary.pipe === 'function') {

expectAssignable<TaxFactor>(TaxFactor.EXENTO);

declare const invoiceItem: InvoiceItem;
expectType<string[]>(invoiceItem.property_tax_account);

declare const apiError: FacturapiError;
expectType<number>(apiError.status);
expectType<string | undefined>(apiError.code);
Expand Down