nfets 0.0.46 → 0.0.48

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,5 @@
1
1
  import { h as StateCode, j as EnvironmentCode, D as DecimalValue, i as StateAcronym, l as Signature, f as StateCodes, p as TransmitterOptions, q as Transmitter, m as Client, G as RequestConfig, O as SignedEntity, Z as Either, x as NFeTsError, a as ReadCertificateResponse, Q as SignerRepository, d as SignatureAlgorithm, _ as Left, $ as Right, R as ReadCertificateRequest, J as HttpClient, w as XmlToolkit, y as CacheAdapter, z as CertificateRepository, L as RemoteTransmissionRepository, V as EntitySigner, W as XmlSigner, N as Namespaced } from '../xml-signer-Cu3OlWV1.cjs';
2
+ import { Writable } from 'node:stream';
2
3
  import 'node:crypto';
3
4
 
4
5
  type DeepPartial<T> = {
@@ -988,8 +989,13 @@ interface NFe$1 {
988
989
  infNFe: InfNFe;
989
990
  infNFeSupl?: InfNFeSupl;
990
991
  }
991
- interface NFeProc {
992
- NFe: NFe$1;
992
+ interface NFeProcAttributes {
993
+ xmlns: 'http://www.portalfiscal.inf.br/nfe';
994
+ versao: string;
995
+ }
996
+ interface NFeProc<T extends object = NFe$1> {
997
+ NFe: T;
998
+ $: NFeProcAttributes;
993
999
  protNFe: ProtNFe;
994
1000
  }
995
1001
 
@@ -1035,6 +1041,13 @@ interface AsynchronousAutorizacaoResponse {
1035
1041
  };
1036
1042
  }
1037
1043
  type AutorizacaoResponse<E extends NFe$1 = NFe$1, T extends E | E[] = E | E[]> = SynchronousAutorizacaoResponse<T> | AsynchronousAutorizacaoResponse;
1044
+ type PipelineAuthorizerResponse<E extends NFe$1, T extends E | E[]> = T extends E[] ? {
1045
+ xml: string[];
1046
+ response: SynchronousAutorizacaoResponse<T>;
1047
+ } : {
1048
+ xml: string;
1049
+ response: SynchronousAutorizacaoResponse<T>;
1050
+ };
1038
1051
 
1039
1052
  interface ConsultStatusPayload {
1040
1053
  tpAmb: EnvironmentCode;
@@ -3030,11 +3043,13 @@ declare abstract class TransmissionPipeline extends Pipeline {
3030
3043
  }
3031
3044
 
3032
3045
  declare class NfeAuthorizerPipeline extends TransmissionPipeline {
3033
- execute<E extends NFe, T extends E | E[]>(payload: AutorizacaoPayload<E, T>, options?: Pick<NfeTransmitterOptions, 'schema'>): Promise<Either<NFeTsError, SynchronousAutorizacaoResponse<T>>>;
3046
+ execute<E extends NFe, T extends E | E[]>(payload: AutorizacaoPayload<E, T>, options?: Pick<NfeTransmitterOptions, 'schema'>): Promise<Either<NFeTsError, PipelineAuthorizerResponse<E, T>>>;
3047
+ protected protocol(NFe: NFe, protNFe: ProtNFe): Promise<string>;
3048
+ protected response<E extends NFe, T extends E | E[]>(NFe: SignedEntity<E> | SignedEntity<E>[], response: SynchronousAutorizacaoResponse<T>): Promise<PipelineAuthorizerResponse<E, T>>;
3034
3049
  protected signNfe(certificate: ReadCertificateResponse, NFe: NFe): Promise<Either<NFeTsError, SignedEntity<NFe>>>;
3035
3050
  protected handleNfeBatch(certificate: ReadCertificateResponse, NFe: NFe | NFe[]): Promise<Left<NFeTsError> | Right<SignedEntity<NFe>[]>>;
3036
3051
  protected isSyncResponse<E extends NFe, T extends E | E[]>(response: AutorizacaoResponse<E, T>): response is SynchronousAutorizacaoResponse<T>;
3037
- protected handleAsyncResponse<E extends NFe, T extends E | E[]>(response: AsynchronousAutorizacaoResponse): Promise<Either<NFeTsError, SynchronousAutorizacaoResponse<T>>>;
3052
+ protected handleAsyncResponse<E extends NFe, T extends E | E[]>(NFe: SignedEntity<NFe> | SignedEntity<NFe>[], response: AsynchronousAutorizacaoResponse): Promise<Either<NFeTsError, PipelineAuthorizerResponse<E, T>>>;
3038
3053
  protected contingency(NFe: NFe): {
3039
3054
  dhCont: string;
3040
3055
  xJust: string;
@@ -4618,6 +4633,124 @@ declare class NfceXmlBuilderPipeline<T extends object> extends NfeXmlBuilderPipe
4618
4633
  protected readonly builder: (InfNFeBuilder<T> & IdeBuilder<T>) | AssembleNfeBuilder<T>;
4619
4634
  }
4620
4635
 
4636
+ type DocumentOptions = PDFKit.PDFDocumentOptions;
4637
+ interface TextOptions extends PDFKit.Mixins.TextOptions {
4638
+ x?: number | undefined;
4639
+ y?: number | undefined;
4640
+ }
4641
+ type ImageOptions = PDFKit.Mixins.ImageOption;
4642
+ type ColorValue = PDFKit.Mixins.ColorValue;
4643
+ type RuleValue = PDFKit.Mixins.RuleValue;
4644
+ type TableOptionsWithData = PDFKit.Mixins.TableOptionsWithData;
4645
+ type TupleOfLength<N extends number, T = unknown> = N extends N ? number extends N ? T[] : _TupleOfLength<T, N, []> : never;
4646
+ type _TupleOfLength<T, N extends number, R extends readonly unknown[]> = R['length'] extends N ? R : _TupleOfLength<T, N, readonly [...R, T]>;
4647
+ interface RowBuilderOptions {
4648
+ x: number;
4649
+ y: number;
4650
+ width: number;
4651
+ }
4652
+ interface RowOptions<C extends number> {
4653
+ columns?: C;
4654
+ gap?: number;
4655
+ left?: number;
4656
+ right?: number;
4657
+ size?: TupleOfLength<C, number>;
4658
+ }
4659
+ type RowBuilderFunction = (options: RowBuilderOptions) => PdfBuilder;
4660
+ interface PdfBuilder {
4661
+ table(options: TableOptionsWithData): this;
4662
+ restore(): this;
4663
+ save(): this;
4664
+ end(): void;
4665
+ path(path: string): this;
4666
+ translate(x: number, y: number): this;
4667
+ scale(x: number, y?: number): this;
4668
+ page(options?: DocumentOptions): this;
4669
+ pipe(stream: Writable): this;
4670
+ configure(options: DocumentOptions): this;
4671
+ font(font: string, familyOrSize?: string | number, size?: number): this;
4672
+ fontSize(size: number): this;
4673
+ text(text: string, options?: TextOptions): this;
4674
+ widthOfString(text: string, options?: PDFKit.Mixins.TextOptions): number;
4675
+ heightOfString(text: string, options?: PDFKit.Mixins.TextOptions): number;
4676
+ currentLineHeight(includeGap?: boolean): number;
4677
+ rect(x: number, y: number, w: number, h: number): this;
4678
+ fill(rule: RuleValue): this;
4679
+ fill(color?: ColorValue, rule?: RuleValue): this;
4680
+ stroke(color?: ColorValue): this;
4681
+ image(image: string, x: number, y: number, options?: ImageOptions): this;
4682
+ image(image: string, options?: ImageOptions): this;
4683
+ pageWidth(): number;
4684
+ pageHeight(): number;
4685
+ pageMargins(): PDFKit.Mixins.ExpandedSides<number>;
4686
+ x(): number;
4687
+ y(): number;
4688
+ moveDown(amount?: number): this;
4689
+ row(...items: [...TupleOfLength<1, RowBuilderFunction>]): this;
4690
+ row<C extends number>(options: RowOptions<C>, ...items: [...TupleOfLength<C, RowBuilderFunction>]): this;
4691
+ }
4692
+
4693
+ interface Builder {
4694
+ setup(): void;
4695
+ build(options?: RowBuilderOptions): Promise<PdfBuilder> | PdfBuilder;
4696
+ end(): void;
4697
+ height?: () => number;
4698
+ }
4699
+
4700
+ declare const DanfceSize: {
4701
+ readonly '80mm': number;
4702
+ };
4703
+ interface DanfceOptions {
4704
+ textFontSize: number;
4705
+ titleFontSize: number;
4706
+ width: keyof typeof DanfceSize;
4707
+ height: number;
4708
+ ignoreDefaultLogo?: boolean;
4709
+ logo?: string;
4710
+ credits?: string;
4711
+ }
4712
+
4713
+ declare abstract class DanfcePdfDocument {
4714
+ protected readonly stream: Writable;
4715
+ data: NFCe$1;
4716
+ protNFe?: ProtNFe;
4717
+ readonly builder: PdfBuilder;
4718
+ readonly toolkit: XmlToolkit;
4719
+ readonly defaults: {
4720
+ displayTitle: true;
4721
+ font: string;
4722
+ info: {
4723
+ Author: string;
4724
+ Creator: string;
4725
+ Keywords: string;
4726
+ Title: string;
4727
+ Subject: string;
4728
+ };
4729
+ };
4730
+ options: DanfceOptions;
4731
+ protected abstract get builders(): Builder[];
4732
+ protected abstract clone(stream: Writable): DanfcePdfDocument;
4733
+ constructor(stream: Writable);
4734
+ protected getDynamicHeight(xml: string, factory: (stream: Writable) => DanfcePdfDocument): Promise<number>;
4735
+ protected height(): number;
4736
+ protected apply(): void;
4737
+ protected parse(xml: string): Promise<void>;
4738
+ build(xml: string): Promise<this>;
4739
+ end(): void;
4740
+ currency(value: DecimalValue, maximumFractionDigits?: number): string;
4741
+ isValueNotEmpty(value?: DecimalValue): value is DecimalValue;
4742
+ }
4743
+
4744
+ declare class DanfceDefaultPdfDocument extends DanfcePdfDocument {
4745
+ clone(stream: Writable): DanfcePdfDocument;
4746
+ protected get builders(): Builder[];
4747
+ }
4748
+
4749
+ declare class DanfceReducedPdfDocument extends DanfcePdfDocument {
4750
+ clone(stream: Writable): DanfcePdfDocument;
4751
+ protected get builders(): Builder[];
4752
+ }
4753
+
4621
4754
  declare class NfeXmlBuilder<T extends object = NFe$1> implements INfeXmlBuilder<T> {
4622
4755
  protected readonly builder: XmlToolkit;
4623
4756
  protected contingency?: ContingencyOptions | undefined;
@@ -4697,4 +4830,4 @@ declare class NFCe implements NFCe$1 {
4697
4830
  Signature?: Signature;
4698
4831
  }
4699
4832
 
4700
- export { type AccessKey, AccessKeyBuilder, type AssembleDetXmlBuilder, type AssembleNfeBuilder, type AsynchronousAutorizacaoResponse, type AutXMLBuilder, type AutorizacaoPayload, type AutorizacaoRequest, type AutorizacaoResponse, type AvulsaBuilder, type CanaBuilder, type CobrBuilder, type CofinsBuilder, type CofinsStBuilder, type CompraBuilder, type ConsultStatusPayload, type ConsultStatusRequest, type ConsultStatusResponse, type ConsultaCadastroPayload, type ConsultaCadastroRequest, type ConsultaCadastroResponse, type ConsultaProtocoloPayload, type ConsultaProtocoloRequest, type ConsultaProtocoloResponse, type ContingencyOptions, DefaultDetBuilderAggregator, DefaultTotalBuilderAggregator, type DestBuilder, type DetBuilder, type DetBuilderAggregator, type DetEventoCancelamento, type DetGroupBuilder, type EmitBuilder, type EntregaBuilder, type EventoCancelamento, type EventoItem, type EventoItemAttributes, type EventoLotePayload, type EventoLoteResponse, type EventoPayload, type EventoRequest, type EventoResponse, type ExportaBuilder, type IIBuilder, type INfeDetXmlBuilder, type INfeXmlBuilder, type IcmsBuilder, type IcmsIpiBuilder, type IcmsOrIssQnBuilder, type IcmsufdestBuilder, type IdeBuilder, type ImpostoBuilder, type InfAdicBuilder, type InfEvento, type InfEventoAttributes, type InfIntermedBuilder, type InfInut, type InfInutAttributes, type InfNFeBuilder, type InfRespTecBuilder, type InfSolicNFFBuilder, type InutNFeAttributes, type InutilizacaoPayload, type InutilizacaoRequest, type InutilizacaoResponse, type IssIpiBuilder, type IssQnBuilder, type NFCe$1 as NFCe, NFCe as NFCeDto, type NFCeProc, type NFe$1 as NFe, type NFeAttributes, NFe as NFeDto, type NFeProc, NfceAuthorizerPipeline, NfceConsultStatusPipeline, NfceQrcode, type NfceQrcodeOptions, type NfceQrcodeOptions200, type NfceQrcodeOptions300, type NfceQrcodeOptionsBase, type NfceRemoteClient, NfceRemoteTransmitter, type NfceTransmitter, type NfceTransmitterOptions, NfceXmlBuilder, NfceXmlBuilderPipeline, NfeAuthorizationResponsePipeline, NfeAuthorizerPipeline, NfeConsultStatusPipeline, NfeDetXmlBuilder, NfeNfceCancelPipeline, NfeNfceVoidRangePipeline, type NfeRemoteClient, NfeRemoteTransmitter, type NfeTransmitter, type NfeTransmitterOptions, NfeXmlBuilder, NfeXmlBuilderPipeline, type OptionalSharedImpostoBuilder, type PagBuilder, type PisBuilder, type PisStBuilder, type ProcEventoNFe, type ProdBuilder, type RetAutorizacaoPayload, type RetAutorizacaoRequest, type RetAutorizacaoResponse, type RetCancNFe, type RetEvento, type RetEventoItem, type RetiradaBuilder, type Schema, type SynchronousAutorizacaoResponse, type TotalBuilder, type TotalBuilderAggregator, TpEmis, TpEvent, type TranspBuilder, type VerifiedAccessKey, type VoidRangePayload, schemas };
4833
+ export { type AccessKey, AccessKeyBuilder, type AssembleDetXmlBuilder, type AssembleNfeBuilder, type AsynchronousAutorizacaoResponse, type AutXMLBuilder, type AutorizacaoPayload, type AutorizacaoRequest, type AutorizacaoResponse, type AvulsaBuilder, type CanaBuilder, type CobrBuilder, type CofinsBuilder, type CofinsStBuilder, type CompraBuilder, type ConsultStatusPayload, type ConsultStatusRequest, type ConsultStatusResponse, type ConsultaCadastroPayload, type ConsultaCadastroRequest, type ConsultaCadastroResponse, type ConsultaProtocoloPayload, type ConsultaProtocoloRequest, type ConsultaProtocoloResponse, type ContingencyOptions, DanfceDefaultPdfDocument, DanfceReducedPdfDocument, DefaultDetBuilderAggregator, DefaultTotalBuilderAggregator, type DestBuilder, type DetBuilder, type DetBuilderAggregator, type DetEventoCancelamento, type DetGroupBuilder, type EmitBuilder, type EntregaBuilder, type EventoCancelamento, type EventoItem, type EventoItemAttributes, type EventoLotePayload, type EventoLoteResponse, type EventoPayload, type EventoRequest, type EventoResponse, type ExportaBuilder, type IIBuilder, type INfeDetXmlBuilder, type INfeXmlBuilder, type IcmsBuilder, type IcmsIpiBuilder, type IcmsOrIssQnBuilder, type IcmsufdestBuilder, type IdeBuilder, type ImpostoBuilder, type InfAdicBuilder, type InfEvento, type InfEventoAttributes, type InfIntermedBuilder, type InfInut, type InfInutAttributes, type InfNFeBuilder, type InfRespTecBuilder, type InfSolicNFFBuilder, type InutNFeAttributes, type InutilizacaoPayload, type InutilizacaoRequest, type InutilizacaoResponse, type IssIpiBuilder, type IssQnBuilder, type NFCe$1 as NFCe, NFCe as NFCeDto, type NFCeProc, type NFe$1 as NFe, type NFeAttributes, NFe as NFeDto, type NFeProc, type NFeProcAttributes, NfceAuthorizerPipeline, NfceConsultStatusPipeline, NfceQrcode, type NfceQrcodeOptions, type NfceQrcodeOptions200, type NfceQrcodeOptions300, type NfceQrcodeOptionsBase, type NfceRemoteClient, NfceRemoteTransmitter, type NfceTransmitter, type NfceTransmitterOptions, NfceXmlBuilder, NfceXmlBuilderPipeline, NfeAuthorizationResponsePipeline, NfeAuthorizerPipeline, NfeConsultStatusPipeline, NfeDetXmlBuilder, NfeNfceCancelPipeline, NfeNfceVoidRangePipeline, type NfeRemoteClient, NfeRemoteTransmitter, type NfeTransmitter, type NfeTransmitterOptions, NfeXmlBuilder, NfeXmlBuilderPipeline, type OptionalSharedImpostoBuilder, type PagBuilder, type PipelineAuthorizerResponse, type PisBuilder, type PisStBuilder, type ProcEventoNFe, type ProdBuilder, type RetAutorizacaoPayload, type RetAutorizacaoRequest, type RetAutorizacaoResponse, type RetCancNFe, type RetEvento, type RetEventoItem, type RetiradaBuilder, type Schema, type SynchronousAutorizacaoResponse, type TotalBuilder, type TotalBuilderAggregator, TpEmis, TpEvent, type TranspBuilder, type VerifiedAccessKey, type VoidRangePayload, schemas };
@@ -1,4 +1,5 @@
1
1
  import { h as StateCode, j as EnvironmentCode, D as DecimalValue, i as StateAcronym, l as Signature, f as StateCodes, p as TransmitterOptions, q as Transmitter, m as Client, G as RequestConfig, O as SignedEntity, Z as Either, x as NFeTsError, a as ReadCertificateResponse, Q as SignerRepository, d as SignatureAlgorithm, _ as Left, $ as Right, R as ReadCertificateRequest, J as HttpClient, w as XmlToolkit, y as CacheAdapter, z as CertificateRepository, L as RemoteTransmissionRepository, V as EntitySigner, W as XmlSigner, N as Namespaced } from '../xml-signer-Cu3OlWV1.js';
2
+ import { Writable } from 'node:stream';
2
3
  import 'node:crypto';
3
4
 
4
5
  type DeepPartial<T> = {
@@ -988,8 +989,13 @@ interface NFe$1 {
988
989
  infNFe: InfNFe;
989
990
  infNFeSupl?: InfNFeSupl;
990
991
  }
991
- interface NFeProc {
992
- NFe: NFe$1;
992
+ interface NFeProcAttributes {
993
+ xmlns: 'http://www.portalfiscal.inf.br/nfe';
994
+ versao: string;
995
+ }
996
+ interface NFeProc<T extends object = NFe$1> {
997
+ NFe: T;
998
+ $: NFeProcAttributes;
993
999
  protNFe: ProtNFe;
994
1000
  }
995
1001
 
@@ -1035,6 +1041,13 @@ interface AsynchronousAutorizacaoResponse {
1035
1041
  };
1036
1042
  }
1037
1043
  type AutorizacaoResponse<E extends NFe$1 = NFe$1, T extends E | E[] = E | E[]> = SynchronousAutorizacaoResponse<T> | AsynchronousAutorizacaoResponse;
1044
+ type PipelineAuthorizerResponse<E extends NFe$1, T extends E | E[]> = T extends E[] ? {
1045
+ xml: string[];
1046
+ response: SynchronousAutorizacaoResponse<T>;
1047
+ } : {
1048
+ xml: string;
1049
+ response: SynchronousAutorizacaoResponse<T>;
1050
+ };
1038
1051
 
1039
1052
  interface ConsultStatusPayload {
1040
1053
  tpAmb: EnvironmentCode;
@@ -3030,11 +3043,13 @@ declare abstract class TransmissionPipeline extends Pipeline {
3030
3043
  }
3031
3044
 
3032
3045
  declare class NfeAuthorizerPipeline extends TransmissionPipeline {
3033
- execute<E extends NFe, T extends E | E[]>(payload: AutorizacaoPayload<E, T>, options?: Pick<NfeTransmitterOptions, 'schema'>): Promise<Either<NFeTsError, SynchronousAutorizacaoResponse<T>>>;
3046
+ execute<E extends NFe, T extends E | E[]>(payload: AutorizacaoPayload<E, T>, options?: Pick<NfeTransmitterOptions, 'schema'>): Promise<Either<NFeTsError, PipelineAuthorizerResponse<E, T>>>;
3047
+ protected protocol(NFe: NFe, protNFe: ProtNFe): Promise<string>;
3048
+ protected response<E extends NFe, T extends E | E[]>(NFe: SignedEntity<E> | SignedEntity<E>[], response: SynchronousAutorizacaoResponse<T>): Promise<PipelineAuthorizerResponse<E, T>>;
3034
3049
  protected signNfe(certificate: ReadCertificateResponse, NFe: NFe): Promise<Either<NFeTsError, SignedEntity<NFe>>>;
3035
3050
  protected handleNfeBatch(certificate: ReadCertificateResponse, NFe: NFe | NFe[]): Promise<Left<NFeTsError> | Right<SignedEntity<NFe>[]>>;
3036
3051
  protected isSyncResponse<E extends NFe, T extends E | E[]>(response: AutorizacaoResponse<E, T>): response is SynchronousAutorizacaoResponse<T>;
3037
- protected handleAsyncResponse<E extends NFe, T extends E | E[]>(response: AsynchronousAutorizacaoResponse): Promise<Either<NFeTsError, SynchronousAutorizacaoResponse<T>>>;
3052
+ protected handleAsyncResponse<E extends NFe, T extends E | E[]>(NFe: SignedEntity<NFe> | SignedEntity<NFe>[], response: AsynchronousAutorizacaoResponse): Promise<Either<NFeTsError, PipelineAuthorizerResponse<E, T>>>;
3038
3053
  protected contingency(NFe: NFe): {
3039
3054
  dhCont: string;
3040
3055
  xJust: string;
@@ -4618,6 +4633,124 @@ declare class NfceXmlBuilderPipeline<T extends object> extends NfeXmlBuilderPipe
4618
4633
  protected readonly builder: (InfNFeBuilder<T> & IdeBuilder<T>) | AssembleNfeBuilder<T>;
4619
4634
  }
4620
4635
 
4636
+ type DocumentOptions = PDFKit.PDFDocumentOptions;
4637
+ interface TextOptions extends PDFKit.Mixins.TextOptions {
4638
+ x?: number | undefined;
4639
+ y?: number | undefined;
4640
+ }
4641
+ type ImageOptions = PDFKit.Mixins.ImageOption;
4642
+ type ColorValue = PDFKit.Mixins.ColorValue;
4643
+ type RuleValue = PDFKit.Mixins.RuleValue;
4644
+ type TableOptionsWithData = PDFKit.Mixins.TableOptionsWithData;
4645
+ type TupleOfLength<N extends number, T = unknown> = N extends N ? number extends N ? T[] : _TupleOfLength<T, N, []> : never;
4646
+ type _TupleOfLength<T, N extends number, R extends readonly unknown[]> = R['length'] extends N ? R : _TupleOfLength<T, N, readonly [...R, T]>;
4647
+ interface RowBuilderOptions {
4648
+ x: number;
4649
+ y: number;
4650
+ width: number;
4651
+ }
4652
+ interface RowOptions<C extends number> {
4653
+ columns?: C;
4654
+ gap?: number;
4655
+ left?: number;
4656
+ right?: number;
4657
+ size?: TupleOfLength<C, number>;
4658
+ }
4659
+ type RowBuilderFunction = (options: RowBuilderOptions) => PdfBuilder;
4660
+ interface PdfBuilder {
4661
+ table(options: TableOptionsWithData): this;
4662
+ restore(): this;
4663
+ save(): this;
4664
+ end(): void;
4665
+ path(path: string): this;
4666
+ translate(x: number, y: number): this;
4667
+ scale(x: number, y?: number): this;
4668
+ page(options?: DocumentOptions): this;
4669
+ pipe(stream: Writable): this;
4670
+ configure(options: DocumentOptions): this;
4671
+ font(font: string, familyOrSize?: string | number, size?: number): this;
4672
+ fontSize(size: number): this;
4673
+ text(text: string, options?: TextOptions): this;
4674
+ widthOfString(text: string, options?: PDFKit.Mixins.TextOptions): number;
4675
+ heightOfString(text: string, options?: PDFKit.Mixins.TextOptions): number;
4676
+ currentLineHeight(includeGap?: boolean): number;
4677
+ rect(x: number, y: number, w: number, h: number): this;
4678
+ fill(rule: RuleValue): this;
4679
+ fill(color?: ColorValue, rule?: RuleValue): this;
4680
+ stroke(color?: ColorValue): this;
4681
+ image(image: string, x: number, y: number, options?: ImageOptions): this;
4682
+ image(image: string, options?: ImageOptions): this;
4683
+ pageWidth(): number;
4684
+ pageHeight(): number;
4685
+ pageMargins(): PDFKit.Mixins.ExpandedSides<number>;
4686
+ x(): number;
4687
+ y(): number;
4688
+ moveDown(amount?: number): this;
4689
+ row(...items: [...TupleOfLength<1, RowBuilderFunction>]): this;
4690
+ row<C extends number>(options: RowOptions<C>, ...items: [...TupleOfLength<C, RowBuilderFunction>]): this;
4691
+ }
4692
+
4693
+ interface Builder {
4694
+ setup(): void;
4695
+ build(options?: RowBuilderOptions): Promise<PdfBuilder> | PdfBuilder;
4696
+ end(): void;
4697
+ height?: () => number;
4698
+ }
4699
+
4700
+ declare const DanfceSize: {
4701
+ readonly '80mm': number;
4702
+ };
4703
+ interface DanfceOptions {
4704
+ textFontSize: number;
4705
+ titleFontSize: number;
4706
+ width: keyof typeof DanfceSize;
4707
+ height: number;
4708
+ ignoreDefaultLogo?: boolean;
4709
+ logo?: string;
4710
+ credits?: string;
4711
+ }
4712
+
4713
+ declare abstract class DanfcePdfDocument {
4714
+ protected readonly stream: Writable;
4715
+ data: NFCe$1;
4716
+ protNFe?: ProtNFe;
4717
+ readonly builder: PdfBuilder;
4718
+ readonly toolkit: XmlToolkit;
4719
+ readonly defaults: {
4720
+ displayTitle: true;
4721
+ font: string;
4722
+ info: {
4723
+ Author: string;
4724
+ Creator: string;
4725
+ Keywords: string;
4726
+ Title: string;
4727
+ Subject: string;
4728
+ };
4729
+ };
4730
+ options: DanfceOptions;
4731
+ protected abstract get builders(): Builder[];
4732
+ protected abstract clone(stream: Writable): DanfcePdfDocument;
4733
+ constructor(stream: Writable);
4734
+ protected getDynamicHeight(xml: string, factory: (stream: Writable) => DanfcePdfDocument): Promise<number>;
4735
+ protected height(): number;
4736
+ protected apply(): void;
4737
+ protected parse(xml: string): Promise<void>;
4738
+ build(xml: string): Promise<this>;
4739
+ end(): void;
4740
+ currency(value: DecimalValue, maximumFractionDigits?: number): string;
4741
+ isValueNotEmpty(value?: DecimalValue): value is DecimalValue;
4742
+ }
4743
+
4744
+ declare class DanfceDefaultPdfDocument extends DanfcePdfDocument {
4745
+ clone(stream: Writable): DanfcePdfDocument;
4746
+ protected get builders(): Builder[];
4747
+ }
4748
+
4749
+ declare class DanfceReducedPdfDocument extends DanfcePdfDocument {
4750
+ clone(stream: Writable): DanfcePdfDocument;
4751
+ protected get builders(): Builder[];
4752
+ }
4753
+
4621
4754
  declare class NfeXmlBuilder<T extends object = NFe$1> implements INfeXmlBuilder<T> {
4622
4755
  protected readonly builder: XmlToolkit;
4623
4756
  protected contingency?: ContingencyOptions | undefined;
@@ -4697,4 +4830,4 @@ declare class NFCe implements NFCe$1 {
4697
4830
  Signature?: Signature;
4698
4831
  }
4699
4832
 
4700
- export { type AccessKey, AccessKeyBuilder, type AssembleDetXmlBuilder, type AssembleNfeBuilder, type AsynchronousAutorizacaoResponse, type AutXMLBuilder, type AutorizacaoPayload, type AutorizacaoRequest, type AutorizacaoResponse, type AvulsaBuilder, type CanaBuilder, type CobrBuilder, type CofinsBuilder, type CofinsStBuilder, type CompraBuilder, type ConsultStatusPayload, type ConsultStatusRequest, type ConsultStatusResponse, type ConsultaCadastroPayload, type ConsultaCadastroRequest, type ConsultaCadastroResponse, type ConsultaProtocoloPayload, type ConsultaProtocoloRequest, type ConsultaProtocoloResponse, type ContingencyOptions, DefaultDetBuilderAggregator, DefaultTotalBuilderAggregator, type DestBuilder, type DetBuilder, type DetBuilderAggregator, type DetEventoCancelamento, type DetGroupBuilder, type EmitBuilder, type EntregaBuilder, type EventoCancelamento, type EventoItem, type EventoItemAttributes, type EventoLotePayload, type EventoLoteResponse, type EventoPayload, type EventoRequest, type EventoResponse, type ExportaBuilder, type IIBuilder, type INfeDetXmlBuilder, type INfeXmlBuilder, type IcmsBuilder, type IcmsIpiBuilder, type IcmsOrIssQnBuilder, type IcmsufdestBuilder, type IdeBuilder, type ImpostoBuilder, type InfAdicBuilder, type InfEvento, type InfEventoAttributes, type InfIntermedBuilder, type InfInut, type InfInutAttributes, type InfNFeBuilder, type InfRespTecBuilder, type InfSolicNFFBuilder, type InutNFeAttributes, type InutilizacaoPayload, type InutilizacaoRequest, type InutilizacaoResponse, type IssIpiBuilder, type IssQnBuilder, type NFCe$1 as NFCe, NFCe as NFCeDto, type NFCeProc, type NFe$1 as NFe, type NFeAttributes, NFe as NFeDto, type NFeProc, NfceAuthorizerPipeline, NfceConsultStatusPipeline, NfceQrcode, type NfceQrcodeOptions, type NfceQrcodeOptions200, type NfceQrcodeOptions300, type NfceQrcodeOptionsBase, type NfceRemoteClient, NfceRemoteTransmitter, type NfceTransmitter, type NfceTransmitterOptions, NfceXmlBuilder, NfceXmlBuilderPipeline, NfeAuthorizationResponsePipeline, NfeAuthorizerPipeline, NfeConsultStatusPipeline, NfeDetXmlBuilder, NfeNfceCancelPipeline, NfeNfceVoidRangePipeline, type NfeRemoteClient, NfeRemoteTransmitter, type NfeTransmitter, type NfeTransmitterOptions, NfeXmlBuilder, NfeXmlBuilderPipeline, type OptionalSharedImpostoBuilder, type PagBuilder, type PisBuilder, type PisStBuilder, type ProcEventoNFe, type ProdBuilder, type RetAutorizacaoPayload, type RetAutorizacaoRequest, type RetAutorizacaoResponse, type RetCancNFe, type RetEvento, type RetEventoItem, type RetiradaBuilder, type Schema, type SynchronousAutorizacaoResponse, type TotalBuilder, type TotalBuilderAggregator, TpEmis, TpEvent, type TranspBuilder, type VerifiedAccessKey, type VoidRangePayload, schemas };
4833
+ export { type AccessKey, AccessKeyBuilder, type AssembleDetXmlBuilder, type AssembleNfeBuilder, type AsynchronousAutorizacaoResponse, type AutXMLBuilder, type AutorizacaoPayload, type AutorizacaoRequest, type AutorizacaoResponse, type AvulsaBuilder, type CanaBuilder, type CobrBuilder, type CofinsBuilder, type CofinsStBuilder, type CompraBuilder, type ConsultStatusPayload, type ConsultStatusRequest, type ConsultStatusResponse, type ConsultaCadastroPayload, type ConsultaCadastroRequest, type ConsultaCadastroResponse, type ConsultaProtocoloPayload, type ConsultaProtocoloRequest, type ConsultaProtocoloResponse, type ContingencyOptions, DanfceDefaultPdfDocument, DanfceReducedPdfDocument, DefaultDetBuilderAggregator, DefaultTotalBuilderAggregator, type DestBuilder, type DetBuilder, type DetBuilderAggregator, type DetEventoCancelamento, type DetGroupBuilder, type EmitBuilder, type EntregaBuilder, type EventoCancelamento, type EventoItem, type EventoItemAttributes, type EventoLotePayload, type EventoLoteResponse, type EventoPayload, type EventoRequest, type EventoResponse, type ExportaBuilder, type IIBuilder, type INfeDetXmlBuilder, type INfeXmlBuilder, type IcmsBuilder, type IcmsIpiBuilder, type IcmsOrIssQnBuilder, type IcmsufdestBuilder, type IdeBuilder, type ImpostoBuilder, type InfAdicBuilder, type InfEvento, type InfEventoAttributes, type InfIntermedBuilder, type InfInut, type InfInutAttributes, type InfNFeBuilder, type InfRespTecBuilder, type InfSolicNFFBuilder, type InutNFeAttributes, type InutilizacaoPayload, type InutilizacaoRequest, type InutilizacaoResponse, type IssIpiBuilder, type IssQnBuilder, type NFCe$1 as NFCe, NFCe as NFCeDto, type NFCeProc, type NFe$1 as NFe, type NFeAttributes, NFe as NFeDto, type NFeProc, type NFeProcAttributes, NfceAuthorizerPipeline, NfceConsultStatusPipeline, NfceQrcode, type NfceQrcodeOptions, type NfceQrcodeOptions200, type NfceQrcodeOptions300, type NfceQrcodeOptionsBase, type NfceRemoteClient, NfceRemoteTransmitter, type NfceTransmitter, type NfceTransmitterOptions, NfceXmlBuilder, NfceXmlBuilderPipeline, NfeAuthorizationResponsePipeline, NfeAuthorizerPipeline, NfeConsultStatusPipeline, NfeDetXmlBuilder, NfeNfceCancelPipeline, NfeNfceVoidRangePipeline, type NfeRemoteClient, NfeRemoteTransmitter, type NfeTransmitter, type NfeTransmitterOptions, NfeXmlBuilder, NfeXmlBuilderPipeline, type OptionalSharedImpostoBuilder, type PagBuilder, type PipelineAuthorizerResponse, type PisBuilder, type PisStBuilder, type ProcEventoNFe, type ProdBuilder, type RetAutorizacaoPayload, type RetAutorizacaoRequest, type RetAutorizacaoResponse, type RetCancNFe, type RetEvento, type RetEventoItem, type RetiradaBuilder, type Schema, type SynchronousAutorizacaoResponse, type TotalBuilder, type TotalBuilderAggregator, TpEmis, TpEvent, type TranspBuilder, type VerifiedAccessKey, type VoidRangePayload, schemas };
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w}from"../chunk-LP4JOWRA.mjs";import"../chunk-EG7US67K.mjs";import"../chunk-W6MRGYXP.mjs";export{d as AccessKeyBuilder,e as DefaultDetBuilderAggregator,f as DefaultTotalBuilderAggregator,u as NFCeDto,q as NFeDto,k as NfceAuthorizerPipeline,m as NfceConsultStatusPipeline,j as NfceQrcode,i as NfceRemoteTransmitter,v as NfceXmlBuilder,w as NfceXmlBuilderPipeline,n as NfeAuthorizationResponsePipeline,h as NfeAuthorizerPipeline,l as NfeConsultStatusPipeline,r as NfeDetXmlBuilder,o as NfeNfceCancelPipeline,p as NfeNfceVoidRangePipeline,g as NfeRemoteTransmitter,s as NfeXmlBuilder,t as NfeXmlBuilderPipeline,a as TpEmis,b as TpEvent,c as schemas};
2
+ import{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}from"../chunk-CAMDTF2T.mjs";import"../chunk-Q47VIRPG.mjs";import"../chunk-W6MRGYXP.mjs";export{d as AccessKeyBuilder,x as DanfceDefaultPdfDocument,y as DanfceReducedPdfDocument,e as DefaultDetBuilderAggregator,f as DefaultTotalBuilderAggregator,u as NFCeDto,q as NFeDto,k as NfceAuthorizerPipeline,m as NfceConsultStatusPipeline,j as NfceQrcode,i as NfceRemoteTransmitter,v as NfceXmlBuilder,w as NfceXmlBuilderPipeline,n as NfeAuthorizationResponsePipeline,h as NfeAuthorizerPipeline,l as NfeConsultStatusPipeline,r as NfeDetXmlBuilder,o as NfeNfceCancelPipeline,p as NfeNfceVoidRangePipeline,g as NfeRemoteTransmitter,s as NfeXmlBuilder,t as NfeXmlBuilderPipeline,a as TpEmis,b as TpEvent,c as schemas};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nfets",
3
- "version": "0.0.46",
3
+ "version": "0.0.48",
4
4
  "description": "typescript libraries for Brazilian's SEFAZ standards",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",