From 0a9c722391092ddf952c68dcc5fd5696d9be7aac Mon Sep 17 00:00:00 2001 From: "raul@facturapi.io" Date: Mon, 13 Apr 2026 15:04:33 -0600 Subject: [PATCH 1/3] chore(defaultSeries): add new default series method --- CHANGELOG.md | 4 ++++ src/resources/organizations.ts | 19 +++++++++++++++++++ src/types/organization.ts | 5 +++++ 3 files changed, 28 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c0cc9eb..482aa8b 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.15.0] 2026-04-13 +### Added +- Add `organizations.updateDefaultSeries` to set an organization default series by type. + ## [4.14.3] 2026-04-13 ### Fixed - Return blob if content-type is octet-stream. This is the coverage for zip files diff --git a/src/resources/organizations.ts b/src/resources/organizations.ts index 264fde2..56bb6c7 100644 --- a/src/resources/organizations.ts +++ b/src/resources/organizations.ts @@ -10,6 +10,7 @@ import type { OrganizationTeamRoleTemplate, OrganizationTeamRoleUpdateInput, OrganizationUserAccess, + OrganizationDefaultSeriesUpdateInput, Series, } from '../types/organization'; import type { BinaryInput, NodeLikeReadableStream } from '../types'; @@ -347,6 +348,24 @@ export default class Organizations { ); } + /** + * Sets default series for an organization + * @param organization_id Organization Id + * @param data Default series input + * @returns Organization object + */ + updateDefaultSeries( + organization_id: string, + data: OrganizationDefaultSeriesUpdateInput, + ): Promise { + return this.client.put( + `/organizations/${organization_id}/series-group/default-series`, + { + body: data, + }, + ); + } + /** * Update a Series Organization * @param organization_id Organization Id diff --git a/src/types/organization.ts b/src/types/organization.ts index cbf3a6d..fd90841 100644 --- a/src/types/organization.ts +++ b/src/types/organization.ts @@ -7,6 +7,11 @@ export interface Series { next_folio_test: number; } +export interface OrganizationDefaultSeriesUpdateInput { + type: 'I' | 'E' | 'P' | 'N' | 'T'; + series: string; +} + export interface ApiKeys { id: string; first_12: string; From 6aa66cd3591af36771593907b8082cf905011510 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 14 Apr 2026 21:54:08 +0000 Subject: [PATCH 2/3] chore(release): bump package version to 4.15.0 Agent-Logs-Url: https://github.com/FacturAPI/facturapi-node/sessions/3fd2eb2f-55a6-4a99-9cd3-e2317a59d05e Co-authored-by: javorosas <2592262+javorosas@users.noreply.github.com> --- package-lock.json | 4 ++-- package.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2f65861..e4b40da 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "facturapi", - "version": "4.14.2", + "version": "4.15.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "facturapi", - "version": "4.14.2", + "version": "4.15.0", "license": "MIT", "devDependencies": { "@eslint/js": "^10.0.1", diff --git a/package.json b/package.json index eaea0d4..f2190c5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "facturapi", - "version": "4.14.2", + "version": "4.15.0", "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", @@ -95,4 +95,4 @@ "vite": "^8.0.3", "vitest": "^4.1.2" } -} \ No newline at end of file +} From 09cf46cf850ffa5e13f0dd6bb32ed29bd559ddc3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 14 Apr 2026 22:02:45 +0000 Subject: [PATCH 3/3] docs(changelog): merge 4.14.3 notes into 4.15.0 Agent-Logs-Url: https://github.com/FacturAPI/facturapi-node/sessions/434baf24-edd8-4f37-b3bf-47ccd1683fa2 Co-authored-by: javorosas <2592262+javorosas@users.noreply.github.com> --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 482aa8b..d039064 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Added - Add `organizations.updateDefaultSeries` to set an organization default series by type. -## [4.14.3] 2026-04-13 ### Fixed - Return blob if content-type is octet-stream. This is the coverage for zip files