File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,13 @@ All notable changes to this project will be documented in this file.
5
5
The format is based on [ Keep a Changelog] ( http://keepachangelog.com/en/1.0.0/ )
6
6
and this project adheres to [ Semantic Versioning] ( http://semver.org/spec/v2.0.0.html ) .
7
7
8
- ## [ 4.9.1] 2025-07-21:
8
+ ## [ 4.10.0] 2025-09-04
9
+
10
+ ### Added
11
+
12
+ - Add ` invoices.previewPdf ` method to generate a preview PDF of an invoice before stamping it.
13
+
14
+ ## [ 4.9.1] 2025-07-21
9
15
10
16
### Fixed
11
17
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " facturapi" ,
3
- "version" : " 4.9.2 " ,
3
+ "version" : " 4.10.0 " ,
4
4
"description" : " Librería oficial de Facturapi. Crea CFDIs timbrados y enviados al SAT, XML y PDF" ,
5
5
"main" : " dist/index.cjs.js" ,
6
6
"module" : " dist/index.es.js" ,
Original file line number Diff line number Diff line change @@ -157,4 +157,13 @@ export default class Invoices {
157
157
copyToDraft ( id : string ) : Promise < Invoice > {
158
158
return this . client . post ( '/invoices/' + id + '/copy' ) ;
159
159
}
160
+
161
+ /**
162
+ * Previews an invoice PDF before stamping it
163
+ * @param body Invoice data
164
+ * @returns PDF file in a stream (Node.js) or Blob (browser)
165
+ */
166
+ previewPdf ( body : Record < string , any > ) : Promise < NodeJS . ReadableStream | Blob > {
167
+ return this . client . post ( '/invoices/preview/pdf' , { body } ) ;
168
+ }
160
169
}
You can’t perform that action at this time.
0 commit comments