diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a7ae52..72e26fd 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.14.0] 2026-03-04 +### Added +- Add `facturapi.comercioExteriorCatalogs.searchTariffFractions` method for Fracción Arancelaria SAT catalog + ## [4.13.1] 2026-02-11 ### Fixed diff --git a/src/index.ts b/src/index.ts index db9941e..f8c33ed 100644 --- a/src/index.ts +++ b/src/index.ts @@ -11,6 +11,7 @@ import * as enums from './enums'; import { createWrapper, WrapperClient } from './wrapper'; import { DEFAULT_API_VERSION } from './constants'; import CartaPorteCatalogs from './tools/cartaPorteCatalogs'; +import ComercioExteriorCatalogs from './tools/comercioExteriorCatalogs'; export * from './enums'; export * from './types'; @@ -38,6 +39,7 @@ export default class Facturapi { organizations: Organizations; catalogs: Catalogs; cartaPorteCatalogs: CartaPorteCatalogs; + comercioExteriorCatalogs: ComercioExteriorCatalogs; receipts: Receipts; retentions: Retentions; tools: Tools; @@ -118,6 +120,7 @@ export default class Facturapi { this.organizations = new Organizations(this._wrapper); this.catalogs = new Catalogs(this._wrapper); this.cartaPorteCatalogs = new CartaPorteCatalogs(this._wrapper); + this.comercioExteriorCatalogs = new ComercioExteriorCatalogs(this._wrapper); this.receipts = new Receipts(this._wrapper); this.retentions = new Retentions(this._wrapper); this.tools = new Tools(this._wrapper); diff --git a/src/tools/comercioExteriorCatalogs.ts b/src/tools/comercioExteriorCatalogs.ts new file mode 100644 index 0000000..83044d3 --- /dev/null +++ b/src/tools/comercioExteriorCatalogs.ts @@ -0,0 +1,20 @@ +import { WrapperClient } from '../wrapper'; + +export default class ComercioExteriorCatalogs { + client: WrapperClient; + + constructor(client: WrapperClient) { + this.client = client; + } + + /** + * Search tariff fractions for Comercio Exterior + * @param {Object} params - Search parameters (q, page, limit) + * @returns {Promise} + */ + searchTariffFractions(params: { q: string; page?: number; limit?: number }) { + return this.client.get('/catalogs/comercioexterior/2.0/tariff-fractions', { + params, + }); + } +}