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.
55The format is based on [ Keep a Changelog] ( http://keepachangelog.com/en/1.0.0/ )
66and this project adheres to [ Semantic Versioning] ( http://semver.org/spec/v2.0.0.html ) .
77
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
915
1016### Fixed
1117
Original file line number Diff line number Diff line change 11{
22 "name" : " facturapi" ,
3- "version" : " 4.9.2 " ,
3+ "version" : " 4.10.0 " ,
44 "description" : " Librería oficial de Facturapi. Crea CFDIs timbrados y enviados al SAT, XML y PDF" ,
55 "main" : " dist/index.cjs.js" ,
66 "module" : " dist/index.es.js" ,
Original file line number Diff line number Diff line change @@ -157,4 +157,13 @@ export default class Invoices {
157157 copyToDraft ( id : string ) : Promise < Invoice > {
158158 return this . client . post ( '/invoices/' + id + '/copy' ) ;
159159 }
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+ }
160169}
You can’t perform that action at this time.
0 commit comments