Skip to content
Merged
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
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +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.3] 2026-04-13
## [4.15.0] 2026-04-13
### Added
- Add `organizations.updateDefaultSeries` to set an organization default series by type.

### Fixed
- Return blob if content-type is octet-stream. This is the coverage for zip files

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -95,4 +95,4 @@
"vite": "^8.0.3",
"vitest": "^4.1.2"
}
}
}
19 changes: 19 additions & 0 deletions src/resources/organizations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import type {
OrganizationTeamRoleTemplate,
OrganizationTeamRoleUpdateInput,
OrganizationUserAccess,
OrganizationDefaultSeriesUpdateInput,
Series,
} from '../types/organization';
import type { BinaryInput, NodeLikeReadableStream } from '../types';
Expand Down Expand Up @@ -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<Organization> {
return this.client.put(
`/organizations/${organization_id}/series-group/default-series`,
{
body: data,
},
);
}

/**
* Update a Series Organization
* @param organization_id Organization Id
Expand Down
5 changes: 5 additions & 0 deletions src/types/organization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading