Skip to content

Commit

Permalink
docs: update doc for release version 1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
luffynando committed Apr 26, 2022
1 parent 1ceaf9b commit f863e42
Show file tree
Hide file tree
Showing 15 changed files with 27 additions and 27 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# @nodecfdi/cfdi-to-pdf ChangeLog

## 1.1.1
- Added support for dual version cfdi 3.3 and 4.0
- Added Información Global Node for cfdi 4.0
- Added Complements Pago10 and Pago20 in generic template.

## 1.1.0
- Remove builders for compatibility with browser generator and aws lambda
- Refactor for tests
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

[discord]: https://discord.gg/aFGYXvX

> Create a generic PDF file from a CFDI 3.3, and Retenciones 1.0
> Create a generic PDF file from a CFDI 3.3, CFDI 4.0, and Retenciones 1.0
:us: The documentation of this project is in spanish as this is the natural language for intended audience.

Expand All @@ -47,7 +47,7 @@ yarn add @nodecfdi/cfdi-to-pdf

## Uso básico

### CFDI 33
### CFDI 33 / CFDI 40

```typescript
import {
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/search.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/AbstractInvoiceData.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/CfdiData.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/GenericCfdiTranslator.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/GenericRetencionesTranslator.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/PdfMakerBrowserBuilder.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/PdfMakerBuilder.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/RetencionesData.html

Large diffs are not rendered by default.

14 changes: 4 additions & 10 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ <h1>@nodecfdi/cfdi-to-pdf</h1>
<a href="https://www.npmjs.com/package/@nodecfdi/cfdi-to-pdf"><img src="https://img.shields.io/npm/v/@nodecfdi/cfdi-to-pdf" alt="Latest Version"></a>
<a href="https://discord.gg/aFGYXvX"><img src="https://img.shields.io/discord/459860554090283019?logo=discord&style=flat-square" alt="Discord"></a></p>
<blockquote>
<p>Create a generic PDF file from a CFDI 3.3, and Retenciones 1.0</p>
<p>Create a generic PDF file from a CFDI 3.3, CFDI 4.0, and Retenciones 1.0</p>
</blockquote>
<p>:us: The documentation of this project is in spanish as this is the natural language for intended audience.</p>
<p>:mexico: La documentación del proyecto está en español porque ese es el lenguaje principal de los usuarios.</p>
Expand All @@ -32,8 +32,8 @@ <h2>Instalación</h2>
<h2>Uso básico</h2>
</a>

<a href="#cfdi-33" id="cfdi-33" style="color: inherit; text-decoration: none;">
<h3>CFDI 33</h3>
<a href="#cfdi-33--cfdi-40" id="cfdi-33--cfdi-40" style="color: inherit; text-decoration: none;">
<h3>CFDI 33 / CFDI 40</h3>
</a>
<pre><code class="language-typescript"><span class="hl-1">import</span><span class="hl-0"> {</span><br/><span class="hl-0"> </span><span class="hl-2">GenericCfdiTranslator</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">PdfMakerBrowserBuilder</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">CfdiData</span><span class="hl-0">,</span><br/><span class="hl-0">} </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-3">&#39;@nodecfdi/cfdi-to-pdf&#39;</span><span class="hl-0">;</span><br/><span class="hl-1">import</span><span class="hl-0"> {</span><span class="hl-2">XmlNodeUtils</span><span class="hl-0">} </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-3">&#39;@nodecfdi/cfdiutils-common&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-4">// Salida base64 CFDI</span><br/><span class="hl-4">// Accedemos al contenido en nuestro archivo XML</span><br/><span class="hl-5">const</span><span class="hl-0"> </span><span class="hl-6">xml</span><span class="hl-0"> = </span><span class="hl-3">&#39;...xmlstring data...&#39;</span><span class="hl-0">;</span><br/><span class="hl-5">const</span><span class="hl-0"> </span><span class="hl-6">comprobante</span><span class="hl-0"> = </span><span class="hl-2">XmlNodeUtils</span><span class="hl-0">.</span><span class="hl-7">nodeFromXmlString</span><span class="hl-0">(</span><span class="hl-2">xml</span><span class="hl-0">);</span><br/><span class="hl-5">const</span><span class="hl-0"> </span><span class="hl-6">cfdiData</span><span class="hl-0"> = </span><span class="hl-5">new</span><span class="hl-0"> </span><span class="hl-7">CfdiData</span><span class="hl-0">(</span><span class="hl-2">comprobante</span><span class="hl-0">, </span><span class="hl-3">&#39;urlCode&#39;</span><span class="hl-0">, </span><span class="hl-3">&#39;cadenaOrigen&#39;</span><span class="hl-0">, </span><span class="hl-3">&#39;myLogoImageBase64&#39;</span><span class="hl-0">);</span><br/><br/><span class="hl-5">const</span><span class="hl-0"> </span><span class="hl-6">builder</span><span class="hl-0"> = </span><span class="hl-5">new</span><span class="hl-0"> </span><span class="hl-7">PdfMakerBrowserBuilder</span><span class="hl-0">(</span><span class="hl-5">new</span><span class="hl-0"> </span><span class="hl-7">GenericCfdiTranslator</span><span class="hl-0">());</span><br/><span class="hl-5">const</span><span class="hl-0"> </span><span class="hl-6">base64</span><span class="hl-0"> = </span><span class="hl-1">await</span><span class="hl-0"> </span><span class="hl-2">builder</span><span class="hl-0">.</span><span class="hl-7">buildBase64</span><span class="hl-0">(</span><span class="hl-2">cfdiData</span><span class="hl-0">);</span><br/><br/><span class="hl-4">// O en NodeJS tambien se puede guardar en un archivo</span><br/><span class="hl-1">await</span><span class="hl-0"> </span><span class="hl-2">builder</span><span class="hl-0">.</span><span class="hl-7">build</span><span class="hl-0">(</span><span class="hl-2">cfdiData</span><span class="hl-0">, </span><span class="hl-2">destPath</span><span class="hl-0">);</span><br/><br/><span class="hl-2">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-2">base64</span><span class="hl-0">);</span>
</code></pre>
Expand All @@ -43,10 +43,4 @@ <h3>Retenciones</h3>
</a>
<pre><code class="language-typescript"><span class="hl-1">import</span><span class="hl-0"> {</span><br/><span class="hl-0"> </span><span class="hl-2">GenericRetencionesTranslator</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">PdfMakerBrowserBuilder</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">RetencionesData</span><br/><span class="hl-0">} </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-3">&#39;@nodecfdi/cfdi-to-pdf&#39;</span><span class="hl-0">;</span><br/><span class="hl-1">import</span><span class="hl-0"> {</span><span class="hl-2">XmlNodeUtils</span><span class="hl-0">} </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-3">&#39;@nodecfdi/cfdiutils-common&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-4">// Salida base64 Retenciones</span><br/><span class="hl-4">// Accedemos al contenido en nuestro archivo XML</span><br/><span class="hl-5">const</span><span class="hl-0"> </span><span class="hl-6">xml</span><span class="hl-0"> = </span><span class="hl-3">&#39;...xmlstring data...&#39;</span><span class="hl-0">;</span><br/><span class="hl-5">const</span><span class="hl-0"> </span><span class="hl-6">retenciones</span><span class="hl-0"> = </span><span class="hl-2">XmlNodeUtils</span><span class="hl-0">.</span><span class="hl-7">nodeFromXmlString</span><span class="hl-0">(</span><span class="hl-2">xml</span><span class="hl-0">);</span><br/><span class="hl-5">const</span><span class="hl-0"> </span><span class="hl-6">retencionesData</span><span class="hl-0"> = </span><span class="hl-5">new</span><span class="hl-0"> </span><span class="hl-7">RetencionesData</span><span class="hl-0">(</span><span class="hl-2">retenciones</span><span class="hl-0">, </span><span class="hl-3">&#39;urlCode&#39;</span><span class="hl-0">, </span><span class="hl-3">&#39;cadenaOrigen&#39;</span><span class="hl-0">, </span><span class="hl-3">&#39;myLogoImageBase64&#39;</span><span class="hl-0">);</span><br/><br/><span class="hl-5">const</span><span class="hl-0"> </span><span class="hl-6">builder</span><span class="hl-0"> = </span><span class="hl-5">new</span><span class="hl-0"> </span><span class="hl-7">PdfMakerBrowserBuilder</span><span class="hl-0">(</span><span class="hl-5">new</span><span class="hl-0"> </span><span class="hl-7">GenericRetencionesTranslator</span><span class="hl-0">());</span><br/><br/><span class="hl-5">const</span><span class="hl-0"> </span><span class="hl-6">base64</span><span class="hl-0"> = </span><span class="hl-1">await</span><span class="hl-0"> </span><span class="hl-2">builder</span><span class="hl-0">.</span><span class="hl-7">buildBase64</span><span class="hl-0">(</span><span class="hl-2">retencionesData</span><span class="hl-0">);</span><br/><br/><span class="hl-4">// O en NodeJS tambien se puede guardar en un archivo</span><br/><span class="hl-1">await</span><span class="hl-0"> </span><span class="hl-2">builder</span><span class="hl-0">.</span><span class="hl-7">build</span><span class="hl-0">(</span><span class="hl-2">retencionesData</span><span class="hl-0">, </span><span class="hl-2">destPath</span><span class="hl-0">);</span><br/><br/><span class="hl-2">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-2">base64</span><span class="hl-0">);</span>
</code></pre>

<a href="#requisitos-si-se-usa-pretende-usar-en-nodejs" id="requisitos-si-se-usa-pretende-usar-en-nodejs" style="color: inherit; text-decoration: none;">
<h2>Requisitos si se usa pretende usar en NodeJS</h2>
</a>
<p>Asegúrate de que tengas los requerimientos para <a href="https://github.com/TooTallNate/node-gyp#installation">node-gyp</a>. No
necesitas instalar manualmente node-gyp, viene dentro de las dependencias de node.</p>
</div></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class="current"><a href="modules.html">Exports</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="tsd-kind-class"><a href="classes/AbstractInvoiceData.html" class="tsd-kind-icon">Abstract<wbr/>Invoice<wbr/>Data</a></li><li class="tsd-kind-class"><a href="classes/CfdiData.html" class="tsd-kind-icon">Cfdi<wbr/>Data</a></li><li class="tsd-kind-class"><a href="classes/GenericCfdiTranslator.html" class="tsd-kind-icon">Generic<wbr/>Cfdi<wbr/>Translator</a></li><li class="tsd-kind-class"><a href="classes/GenericRetencionesTranslator.html" class="tsd-kind-icon">Generic<wbr/>Retenciones<wbr/>Translator</a></li><li class="tsd-kind-class tsd-has-type-parameter"><a href="classes/PdfMakerBrowserBuilder.html" class="tsd-kind-icon">Pdf<wbr/>Maker<wbr/>Browser<wbr/>Builder</a></li><li class="tsd-kind-class tsd-has-type-parameter"><a href="classes/PdfMakerBuilder.html" class="tsd-kind-icon">Pdf<wbr/>Maker<wbr/>Builder</a></li><li class="tsd-kind-class"><a href="classes/RetencionesData.html" class="tsd-kind-icon">Retenciones<wbr/>Data</a></li><li class="tsd-kind-interface tsd-has-type-parameter"><a href="interfaces/BuilderInterface.html" class="tsd-kind-icon">Builder<wbr/>Interface</a></li><li class="tsd-kind-interface tsd-has-type-parameter"><a href="interfaces/DocumentTranslatorInterface.html" class="tsd-kind-icon">Document<wbr/>Translator<wbr/>Interface</a></li><li class="tsd-kind-function"><a href="modules.html#breakEveryNCharacters" class="tsd-kind-icon">break<wbr/>EveryNCharacters</a></li><li class="tsd-kind-function"><a href="modules.html#toCurrency" class="tsd-kind-icon">to<wbr/>Currency</a></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected property</span></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="assets/main.js"></script></body></html>
</div></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class="current"><a href="modules.html">Exports</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="tsd-kind-class"><a href="classes/AbstractInvoiceData.html" class="tsd-kind-icon">Abstract<wbr/>Invoice<wbr/>Data</a></li><li class="tsd-kind-class"><a href="classes/CfdiData.html" class="tsd-kind-icon">Cfdi<wbr/>Data</a></li><li class="tsd-kind-class"><a href="classes/GenericCfdiTranslator.html" class="tsd-kind-icon">Generic<wbr/>Cfdi<wbr/>Translator</a></li><li class="tsd-kind-class"><a href="classes/GenericRetencionesTranslator.html" class="tsd-kind-icon">Generic<wbr/>Retenciones<wbr/>Translator</a></li><li class="tsd-kind-class tsd-has-type-parameter"><a href="classes/PdfMakerBrowserBuilder.html" class="tsd-kind-icon">Pdf<wbr/>Maker<wbr/>Browser<wbr/>Builder</a></li><li class="tsd-kind-class tsd-has-type-parameter"><a href="classes/PdfMakerBuilder.html" class="tsd-kind-icon">Pdf<wbr/>Maker<wbr/>Builder</a></li><li class="tsd-kind-class"><a href="classes/RetencionesData.html" class="tsd-kind-icon">Retenciones<wbr/>Data</a></li><li class="tsd-kind-interface tsd-has-type-parameter"><a href="interfaces/BuilderInterface.html" class="tsd-kind-icon">Builder<wbr/>Interface</a></li><li class="tsd-kind-interface tsd-has-type-parameter"><a href="interfaces/DocumentTranslatorInterface.html" class="tsd-kind-icon">Document<wbr/>Translator<wbr/>Interface</a></li><li class="tsd-kind-function"><a href="modules.html#breakEveryNCharacters" class="tsd-kind-icon">break<wbr/>EveryNCharacters</a></li><li class="tsd-kind-function"><a href="modules.html#formatCurrency" class="tsd-kind-icon">format<wbr/>Currency</a></li><li class="tsd-kind-function"><a href="modules.html#toCurrency" class="tsd-kind-icon">to<wbr/>Currency</a></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected property</span></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="assets/main.js"></script></body></html>
Loading

0 comments on commit f863e42

Please sign in to comment.