nfets 0.0.91 → 0.0.93

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { h as StateCode, j as EnvironmentCode, D as DecimalValue, l as Signature, i as StateAcronym, f as StateCodes, p as TransmitterOptions, q as Transmitter, m as Client, a1 as RequestConfig, a6 as SignedEntity, ac as Either, x as NFeTsError, a as ReadCertificateResponse, O as RowBuilderOptions, V as PdfBuilder, a7 as SignerRepository, d as SignatureAlgorithm, ad as Left, ae as Right, R as ReadCertificateRequest, a3 as HttpClient, w as XmlToolkit, W as CacheAdapter, Y as CertificateRepository, a4 as RemoteTransmissionRepository, a9 as EntitySigner, aa as XmlSigner, N as Namespaced } from '../xml-signer-CCwIT1uC.cjs';
1
+ import { h as StateCode, j as EnvironmentCode, D as DecimalValue, l as Signature, i as StateAcronym, f as StateCodes, p as TransmitterOptions, q as Transmitter, m as Client, a1 as RequestConfig, a6 as SignedEntity, ac as Either, x as NFeTsError, a as ReadCertificateResponse, O as RowBuilderOptions, V as PdfBuilder, a7 as SignerRepository, d as SignatureAlgorithm, ad as Left, ae as Right, R as ReadCertificateRequest, a3 as HttpClient, w as XmlToolkit, W as CacheAdapter, Y as CertificateRepository, a4 as RemoteTransmissionRepository, a9 as EntitySigner, aa as XmlSigner, N as Namespaced } from '../xml-signer-E-132bo8.cjs';
2
2
  import { Writable } from 'node:stream';
3
3
  import 'node:crypto';
4
4
 
@@ -4839,12 +4839,6 @@ declare class NfceAuthorizerPipeline extends NfeAuthorizerPipeline {
4839
4839
  protected readonly qrCode: NfceQrcode;
4840
4840
  protected readonly transmitter: NfceRemoteTransmitter;
4841
4841
  constructor(certificate: ReadCertificateRequest);
4842
- options: Pick<NfceTransmitterOptions, 'schema' | 'qrCode'>;
4843
- execute<E extends NFCe$1, T extends E | E[]>(payload: AutorizacaoPayload<E, T>, options: Pick<NfceTransmitterOptions, 'schema' | 'qrCode'>): Promise<Either<NFeTsError, PipelineAuthorizerResponse<E, T>>>;
4844
- protected signNfe(certificate: ReadCertificateResponse, NFe: NFCe$1): Promise<Either<NFeTsError, SignedEntity<NFe>>>;
4845
- private attachInfNfeSupl;
4846
- private attachQrCode;
4847
- private generateQrCode;
4848
4842
  }
4849
4843
 
4850
4844
  declare class NfceVoidRangePipeline extends NfeVoidRangePipeline {
@@ -4866,11 +4860,20 @@ declare class NfeXmlBuilderPipeline<T extends object> extends Pipeline {
4866
4860
  toObject(): Either<NFeTsError, T>;
4867
4861
  assemble(): Promise<Either<NFeTsError, string>>;
4868
4862
  protected get nfeXsdSchema(): string;
4869
- protected assertXmlSignedAndValidated(xml: string): Promise<Left<NFeTsError> | Right<string>>;
4863
+ protected assertXmlSignedAndValidated(xml: string): Promise<Either<NFeTsError, string>>;
4864
+ protected signXmlString(xml: string): Promise<Either<NFeTsError, string>>;
4865
+ protected validateXmlString(xml: string): Promise<Either<NFeTsError, string>>;
4870
4866
  }
4871
4867
 
4872
4868
  declare class NfceXmlBuilderPipeline<T extends object> extends NfeXmlBuilderPipeline<T> {
4869
+ protected readonly options?: Pick<NfceTransmitterOptions, "qrCode"> | undefined;
4870
+ protected readonly nfceQrcode: NfceQrcode;
4871
+ protected readonly transmitter: NfceRemoteTransmitter;
4872
+ constructor(certificate?: ReadCertificateRequest, schema?: Schema, options?: Pick<NfceTransmitterOptions, "qrCode"> | undefined);
4873
4873
  protected readonly builder: (InfNFeBuilder<T> & IdeBuilder<T>) | AssembleNfeBuilder<T>;
4874
+ assemble(): Promise<Either<NFeTsError, string>>;
4875
+ private generateQrCode;
4876
+ private parseSignedNfce;
4874
4877
  }
4875
4878
 
4876
4879
  declare const DanfceSize: {
@@ -1,4 +1,4 @@
1
- import { h as StateCode, j as EnvironmentCode, D as DecimalValue, l as Signature, i as StateAcronym, f as StateCodes, p as TransmitterOptions, q as Transmitter, m as Client, a1 as RequestConfig, a6 as SignedEntity, ac as Either, x as NFeTsError, a as ReadCertificateResponse, O as RowBuilderOptions, V as PdfBuilder, a7 as SignerRepository, d as SignatureAlgorithm, ad as Left, ae as Right, R as ReadCertificateRequest, a3 as HttpClient, w as XmlToolkit, W as CacheAdapter, Y as CertificateRepository, a4 as RemoteTransmissionRepository, a9 as EntitySigner, aa as XmlSigner, N as Namespaced } from '../xml-signer-CCwIT1uC.js';
1
+ import { h as StateCode, j as EnvironmentCode, D as DecimalValue, l as Signature, i as StateAcronym, f as StateCodes, p as TransmitterOptions, q as Transmitter, m as Client, a1 as RequestConfig, a6 as SignedEntity, ac as Either, x as NFeTsError, a as ReadCertificateResponse, O as RowBuilderOptions, V as PdfBuilder, a7 as SignerRepository, d as SignatureAlgorithm, ad as Left, ae as Right, R as ReadCertificateRequest, a3 as HttpClient, w as XmlToolkit, W as CacheAdapter, Y as CertificateRepository, a4 as RemoteTransmissionRepository, a9 as EntitySigner, aa as XmlSigner, N as Namespaced } from '../xml-signer-E-132bo8.js';
2
2
  import { Writable } from 'node:stream';
3
3
  import 'node:crypto';
4
4
 
@@ -4839,12 +4839,6 @@ declare class NfceAuthorizerPipeline extends NfeAuthorizerPipeline {
4839
4839
  protected readonly qrCode: NfceQrcode;
4840
4840
  protected readonly transmitter: NfceRemoteTransmitter;
4841
4841
  constructor(certificate: ReadCertificateRequest);
4842
- options: Pick<NfceTransmitterOptions, 'schema' | 'qrCode'>;
4843
- execute<E extends NFCe$1, T extends E | E[]>(payload: AutorizacaoPayload<E, T>, options: Pick<NfceTransmitterOptions, 'schema' | 'qrCode'>): Promise<Either<NFeTsError, PipelineAuthorizerResponse<E, T>>>;
4844
- protected signNfe(certificate: ReadCertificateResponse, NFe: NFCe$1): Promise<Either<NFeTsError, SignedEntity<NFe>>>;
4845
- private attachInfNfeSupl;
4846
- private attachQrCode;
4847
- private generateQrCode;
4848
4842
  }
4849
4843
 
4850
4844
  declare class NfceVoidRangePipeline extends NfeVoidRangePipeline {
@@ -4866,11 +4860,20 @@ declare class NfeXmlBuilderPipeline<T extends object> extends Pipeline {
4866
4860
  toObject(): Either<NFeTsError, T>;
4867
4861
  assemble(): Promise<Either<NFeTsError, string>>;
4868
4862
  protected get nfeXsdSchema(): string;
4869
- protected assertXmlSignedAndValidated(xml: string): Promise<Left<NFeTsError> | Right<string>>;
4863
+ protected assertXmlSignedAndValidated(xml: string): Promise<Either<NFeTsError, string>>;
4864
+ protected signXmlString(xml: string): Promise<Either<NFeTsError, string>>;
4865
+ protected validateXmlString(xml: string): Promise<Either<NFeTsError, string>>;
4870
4866
  }
4871
4867
 
4872
4868
  declare class NfceXmlBuilderPipeline<T extends object> extends NfeXmlBuilderPipeline<T> {
4869
+ protected readonly options?: Pick<NfceTransmitterOptions, "qrCode"> | undefined;
4870
+ protected readonly nfceQrcode: NfceQrcode;
4871
+ protected readonly transmitter: NfceRemoteTransmitter;
4872
+ constructor(certificate?: ReadCertificateRequest, schema?: Schema, options?: Pick<NfceTransmitterOptions, "qrCode"> | undefined);
4873
4873
  protected readonly builder: (InfNFeBuilder<T> & IdeBuilder<T>) | AssembleNfeBuilder<T>;
4874
+ assemble(): Promise<Either<NFeTsError, string>>;
4875
+ private generateQrCode;
4876
+ private parseSignedNfce;
4874
4877
  }
4875
4878
 
4876
4879
  declare const DanfceSize: {
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{A,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunk-OE5U6JNA.mjs";import"../chunk-4WBTBSE6.mjs";import"../chunk-W6MRGYXP.mjs";export{d as AccessKeyBuilder,z as DanfceDefaultPdfDocument,A as DanfceReducedPdfDocument,e as DefaultDetBuilderAggregator,f as DefaultTotalBuilderAggregator,w as NFCeDto,s as NFeDto,p as NfceAuthorizerPipeline,o as NfceCancelPipeline,r as NfceConsultStatusPipeline,m as NfceQrcode,n as NfceRemoteTransmitter,q as NfceVoidRangePipeline,x as NfceXmlBuilder,y as NfceXmlBuilderPipeline,l as NfeAuthorizationResponsePipeline,i as NfeAuthorizerPipeline,h as NfeCancelPipeline,k as NfeConsultStatusPipeline,t as NfeDetXmlBuilder,g as NfeRemoteTransmitter,j as NfeVoidRangePipeline,u as NfeXmlBuilder,v as NfeXmlBuilderPipeline,a as TpEmis,b as TpEvent,c as schemas};
2
+ import{A,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunk-3QLHNM2Q.mjs";import"../chunk-POAIEFMR.mjs";import"../chunk-W6MRGYXP.mjs";export{d as AccessKeyBuilder,z as DanfceDefaultPdfDocument,A as DanfceReducedPdfDocument,e as DefaultDetBuilderAggregator,f as DefaultTotalBuilderAggregator,w as NFCeDto,s as NFeDto,p as NfceAuthorizerPipeline,o as NfceCancelPipeline,r as NfceConsultStatusPipeline,m as NfceQrcode,n as NfceRemoteTransmitter,q as NfceVoidRangePipeline,x as NfceXmlBuilder,y as NfceXmlBuilderPipeline,l as NfeAuthorizationResponsePipeline,i as NfeAuthorizerPipeline,h as NfeCancelPipeline,k as NfeConsultStatusPipeline,t as NfeDetXmlBuilder,g as NfeRemoteTransmitter,j as NfeVoidRangePipeline,u as NfeXmlBuilder,v as NfeXmlBuilderPipeline,a as TpEmis,b as TpEvent,c as schemas};
@@ -304,6 +304,7 @@ interface XmlToolkit {
304
304
  getFirstNode(xml: string): string | null;
305
305
  getAttribute(xml: string, tag: string): string | null;
306
306
  appendNode(xml: string, node: string): string;
307
+ insertBefore(xml: string, referenceTag: string, node: string): string;
307
308
  }
308
309
 
309
310
  type DocumentOptions = PDFKit.PDFDocumentOptions;
@@ -304,6 +304,7 @@ interface XmlToolkit {
304
304
  getFirstNode(xml: string): string | null;
305
305
  getAttribute(xml: string, tag: string): string | null;
306
306
  appendNode(xml: string, node: string): string;
307
+ insertBefore(xml: string, referenceTag: string, node: string): string;
307
308
  }
308
309
 
309
310
  type DocumentOptions = PDFKit.PDFDocumentOptions;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nfets",
3
- "version": "0.0.91",
3
+ "version": "0.0.93",
4
4
  "description": "typescript libraries for Brazilian's SEFAZ standards",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",