nfets 0.0.93 → 0.0.96
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.
- package/dist/chunk-HNU77B3G.mjs +20 -0
- package/dist/{chunk-POAIEFMR.mjs → chunk-IJON6HO5.mjs} +1 -1
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.mjs +1 -1
- package/dist/index.cjs +34 -34
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/nfe/index.cjs +38 -38
- package/dist/nfe/index.d.cts +40 -36
- package/dist/nfe/index.d.ts +40 -36
- package/dist/nfe/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-3QLHNM2Q.mjs +0 -20
package/dist/nfe/index.d.cts
CHANGED
|
@@ -1244,7 +1244,7 @@ interface AsynchronousAutorizacaoResponse {
|
|
|
1244
1244
|
};
|
|
1245
1245
|
}
|
|
1246
1246
|
type AutorizacaoResponse<E extends NFe$1 = NFe$1, T extends E | E[] = E | E[]> = SynchronousAutorizacaoResponse<T> | AsynchronousAutorizacaoResponse;
|
|
1247
|
-
type PipelineAuthorizerResponse<E extends NFe$1, T extends E | E[]> = T extends E[] ? {
|
|
1247
|
+
type PipelineAuthorizerResponse<E extends NFe$1, T extends E | E[] = E | E[]> = T extends E[] ? {
|
|
1248
1248
|
xml: string[];
|
|
1249
1249
|
response: SynchronousAutorizacaoResponse<T>;
|
|
1250
1250
|
} : {
|
|
@@ -1763,19 +1763,19 @@ interface EmitBuilder<T extends object> {
|
|
|
1763
1763
|
emit(payload: Emit): AvulsaBuilder<T> & DestBuilder<T> & RetiradaBuilder<T> & EntregaBuilder<T> & AutXMLBuilder<T> & DetGroupBuilder<T>;
|
|
1764
1764
|
}
|
|
1765
1765
|
interface AvulsaBuilder<T extends object> {
|
|
1766
|
-
avulsa(payload
|
|
1766
|
+
avulsa(payload?: Avulsa): DestBuilder<T> & RetiradaBuilder<T> & EntregaBuilder<T> & AutXMLBuilder<T> & DetGroupBuilder<T>;
|
|
1767
1767
|
}
|
|
1768
1768
|
interface DestBuilder<T extends object> {
|
|
1769
|
-
dest(payload
|
|
1769
|
+
dest(payload?: Dest): RetiradaBuilder<T> & EntregaBuilder<T> & AutXMLBuilder<T> & DetGroupBuilder<T>;
|
|
1770
1770
|
}
|
|
1771
1771
|
interface RetiradaBuilder<T extends object> {
|
|
1772
|
-
retirada(payload
|
|
1772
|
+
retirada(payload?: Local): DestBuilder<T> & EntregaBuilder<T> & AutXMLBuilder<T> & DetGroupBuilder<T>;
|
|
1773
1773
|
}
|
|
1774
1774
|
interface EntregaBuilder<T extends object> {
|
|
1775
|
-
entrega(payload
|
|
1775
|
+
entrega(payload?: Local): DestBuilder<T> & AutXMLBuilder<T> & DetGroupBuilder<T>;
|
|
1776
1776
|
}
|
|
1777
1777
|
interface AutXMLBuilder<T extends object> {
|
|
1778
|
-
autXML(payload
|
|
1778
|
+
autXML(payload?: AutXML): AutXMLBuilder<T> & DetGroupBuilder<T>;
|
|
1779
1779
|
}
|
|
1780
1780
|
interface DetGroupBuilder<T extends object> {
|
|
1781
1781
|
det<D>(items: [D, ...D[]], build: (ctx: ProdBuilder, item: D) => AssembleDetXmlBuilder): TotalBuilder<T> & TranspBuilder<T>;
|
|
@@ -1788,35 +1788,34 @@ interface TranspBuilder<T extends object> {
|
|
|
1788
1788
|
transp(payload: Transp): CobrBuilder<T> & PagBuilder<T>;
|
|
1789
1789
|
}
|
|
1790
1790
|
interface CobrBuilder<T extends object> {
|
|
1791
|
-
cobr(payload
|
|
1791
|
+
cobr(payload?: Cobr): PagBuilder<T>;
|
|
1792
1792
|
}
|
|
1793
1793
|
interface PagBuilder<T extends object> {
|
|
1794
1794
|
pag(payload: Pag): AssembleNfeBuilder<T> & AvulsaBuilder<T> & InfAdicBuilder<T> & InfSolicNFFBuilder<T> & CanaBuilder<T> & CompraBuilder<T> & ExportaBuilder<T> & InfRespTecBuilder<T> & InfIntermedBuilder<T>;
|
|
1795
1795
|
}
|
|
1796
1796
|
interface InfIntermedBuilder<T extends object> {
|
|
1797
|
-
infIntermed(payload
|
|
1797
|
+
infIntermed(payload?: InfIntermed): AssembleNfeBuilder<T> & AvulsaBuilder<T> & InfAdicBuilder<T> & InfSolicNFFBuilder<T> & CanaBuilder<T> & CompraBuilder<T> & InfRespTecBuilder<T> & ExportaBuilder<T>;
|
|
1798
1798
|
}
|
|
1799
1799
|
interface InfAdicBuilder<T extends object> {
|
|
1800
|
-
infAdic(payload
|
|
1800
|
+
infAdic(payload?: InfAdic): AssembleNfeBuilder<T> & AvulsaBuilder<T> & InfAdicBuilder<T> & InfSolicNFFBuilder<T> & InfRespTecBuilder<T> & CanaBuilder<T> & CompraBuilder<T> & ExportaBuilder<T>;
|
|
1801
1801
|
}
|
|
1802
1802
|
interface ExportaBuilder<T extends object> {
|
|
1803
|
-
exporta(payload
|
|
1803
|
+
exporta(payload?: Exporta): AssembleNfeBuilder<T> & AvulsaBuilder<T> & InfAdicBuilder<T> & InfSolicNFFBuilder<T> & InfRespTecBuilder<T> & CanaBuilder<T> & CompraBuilder<T>;
|
|
1804
1804
|
}
|
|
1805
1805
|
interface CompraBuilder<T extends object> {
|
|
1806
|
-
compra(payload
|
|
1806
|
+
compra(payload?: Compra): AssembleNfeBuilder<T> & AvulsaBuilder<T> & InfAdicBuilder<T> & InfSolicNFFBuilder<T> & InfRespTecBuilder<T> & CanaBuilder<T>;
|
|
1807
1807
|
}
|
|
1808
1808
|
interface CanaBuilder<T extends object> {
|
|
1809
|
-
cana(payload
|
|
1809
|
+
cana(payload?: Cana): AssembleNfeBuilder<T> & AvulsaBuilder<T> & InfAdicBuilder<T> & InfSolicNFFBuilder<T> & InfRespTecBuilder<T>;
|
|
1810
1810
|
}
|
|
1811
1811
|
interface InfRespTecBuilder<T extends object> {
|
|
1812
|
-
infRespTec(payload
|
|
1812
|
+
infRespTec(payload?: InfRespTec): AssembleNfeBuilder<T> & AvulsaBuilder<T> & InfAdicBuilder<T> & InfSolicNFFBuilder<T>;
|
|
1813
1813
|
}
|
|
1814
1814
|
interface InfSolicNFFBuilder<T extends object> {
|
|
1815
|
-
infSolicNFF(payload
|
|
1815
|
+
infSolicNFF(payload?: InfSolicNFF): AssembleNfeBuilder<T> & InfAdicBuilder<T> & AvulsaBuilder<T>;
|
|
1816
1816
|
}
|
|
1817
1817
|
interface AssembleNfeBuilder<T extends object> {
|
|
1818
1818
|
quiet(): AssembleNfeBuilder<T>;
|
|
1819
|
-
toObject(): Either<NFeTsError, T>;
|
|
1820
1819
|
assemble(): Promise<Either<NFeTsError, string>>;
|
|
1821
1820
|
}
|
|
1822
1821
|
interface INfeXmlBuilder<T extends object> extends InfNFeBuilder<T>, IdeBuilder<T>, DetGroupBuilder<T>, DestBuilder<T>, RetiradaBuilder<T>, EntregaBuilder<T>, AutXMLBuilder<T>, TotalBuilder<T>, TranspBuilder<T>, PagBuilder<T>, InfIntermedBuilder<T>, ExportaBuilder<T>, CompraBuilder<T>, CanaBuilder<T>, InfRespTecBuilder<T>, InfSolicNFFBuilder<T>, InfAdicBuilder<T>, AvulsaBuilder<T>, AssembleNfeBuilder<T> {
|
|
@@ -3278,14 +3277,21 @@ declare class NFe implements NFe$1 {
|
|
|
3278
3277
|
Signature?: Signature;
|
|
3279
3278
|
}
|
|
3280
3279
|
|
|
3280
|
+
interface NfeAuthorizerPayload<E extends string, T extends E | E[] = E | E[]> {
|
|
3281
|
+
cUF?: StateCode;
|
|
3282
|
+
tpAmb?: EnvironmentCode;
|
|
3283
|
+
idLote?: string;
|
|
3284
|
+
indSinc?: '0' | '1';
|
|
3285
|
+
xml: T;
|
|
3286
|
+
}
|
|
3281
3287
|
declare class NfeAuthorizerPipeline extends TransmissionPipeline {
|
|
3282
|
-
execute
|
|
3288
|
+
execute(payload: NfeAuthorizerPayload<string>, options?: Pick<NfeTransmitterOptions, 'schema'>): Promise<Either<NFeTsError, PipelineAuthorizerResponse<NFe>>>;
|
|
3283
3289
|
protected protocol(NFe: NFe, protNFe: ProtNFe): Promise<string>;
|
|
3284
3290
|
protected response<E extends NFe, T extends E | E[]>(NFe: SignedEntity<NFe>[], response: SynchronousAutorizacaoResponse<T>): Promise<PipelineAuthorizerResponse<E, T>>;
|
|
3285
3291
|
protected signNfe(certificate: ReadCertificateResponse, NFe: NFe): Promise<Either<NFeTsError, SignedEntity<NFe>>>;
|
|
3286
|
-
protected handleNfeBatch(certificate: ReadCertificateResponse,
|
|
3292
|
+
protected handleNfeBatch(certificate: ReadCertificateResponse, xml: string | string[]): Promise<Left<NFeTsError> | Right<SignedEntity<NFe>[]>>;
|
|
3287
3293
|
protected isSyncResponse<E extends NFe, T extends E | E[]>(response: AutorizacaoResponse<E, T>): response is SynchronousAutorizacaoResponse<T>;
|
|
3288
|
-
protected handleAsyncResponse
|
|
3294
|
+
protected handleAsyncResponse(NFe: SignedEntity<NFe>[], response: AsynchronousAutorizacaoResponse): Promise<Either<NFeTsError, PipelineAuthorizerResponse<NFe>>>;
|
|
3289
3295
|
protected contingency(NFe: NFe): {
|
|
3290
3296
|
dhCont: string;
|
|
3291
3297
|
xJust: string;
|
|
@@ -4857,7 +4863,6 @@ declare class NfeXmlBuilderPipeline<T extends object> extends Pipeline {
|
|
|
4857
4863
|
protected readonly builder: (InfNFeBuilder<T> & IdeBuilder<T>) | AssembleNfeBuilder<T>;
|
|
4858
4864
|
constructor(certificate?: ReadCertificateRequest | undefined, schema?: Schema);
|
|
4859
4865
|
build(build: (builder: InfNFeBuilder<T> & IdeBuilder<T>) => AssembleNfeBuilder<T>): this;
|
|
4860
|
-
toObject(): Either<NFeTsError, T>;
|
|
4861
4866
|
assemble(): Promise<Either<NFeTsError, string>>;
|
|
4862
4867
|
protected get nfeXsdSchema(): string;
|
|
4863
4868
|
protected assertXmlSignedAndValidated(xml: string): Promise<Either<NFeTsError, string>>;
|
|
@@ -4871,9 +4876,8 @@ declare class NfceXmlBuilderPipeline<T extends object> extends NfeXmlBuilderPipe
|
|
|
4871
4876
|
protected readonly transmitter: NfceRemoteTransmitter;
|
|
4872
4877
|
constructor(certificate?: ReadCertificateRequest, schema?: Schema, options?: Pick<NfceTransmitterOptions, "qrCode"> | undefined);
|
|
4873
4878
|
protected readonly builder: (InfNFeBuilder<T> & IdeBuilder<T>) | AssembleNfeBuilder<T>;
|
|
4874
|
-
|
|
4879
|
+
protected assertXmlSignedAndValidated(xml: string): Promise<Left<NFeTsError> | Right<string>>;
|
|
4875
4880
|
private generateQrCode;
|
|
4876
|
-
private parseSignedNfce;
|
|
4877
4881
|
}
|
|
4878
4882
|
|
|
4879
4883
|
declare const DanfceSize: {
|
|
@@ -4946,27 +4950,27 @@ declare class NfeXmlBuilder<T extends object = NFe$1> implements INfeXmlBuilder<
|
|
|
4946
4950
|
infNFe($: InfNFeAttributes): this;
|
|
4947
4951
|
ide(payload: Ide): this;
|
|
4948
4952
|
emit(payload: Emit): this;
|
|
4949
|
-
avulsa(payload
|
|
4950
|
-
dest(payload
|
|
4951
|
-
retirada(payload
|
|
4952
|
-
entrega(payload
|
|
4953
|
-
autXML(payload
|
|
4953
|
+
avulsa(payload?: Avulsa): this;
|
|
4954
|
+
dest(payload?: Dest): this;
|
|
4955
|
+
retirada(payload?: Local): this;
|
|
4956
|
+
entrega(payload?: Local): this;
|
|
4957
|
+
autXML(payload?: AutXML): this;
|
|
4954
4958
|
det<D>(items: [D, ...D[]], build: (ctx: ProdBuilder, item: D) => AssembleDetXmlBuilder): TotalBuilder<T> & TranspBuilder<T>;
|
|
4955
4959
|
total(payload: Total): this;
|
|
4956
4960
|
increment(callback: (context: DeepPartial<Total>, det: DeepPartial<Det[]>) => DeepPartial<Total>): this;
|
|
4957
4961
|
private buildTotalForPL_010;
|
|
4958
4962
|
transp(payload: Transp): this;
|
|
4959
|
-
cobr(payload
|
|
4963
|
+
cobr(payload?: Cobr): this;
|
|
4960
4964
|
pag(payload: Pag): this;
|
|
4961
|
-
infIntermed(payload
|
|
4962
|
-
infAdic(payload
|
|
4963
|
-
exporta(payload
|
|
4964
|
-
compra(payload
|
|
4965
|
-
cana(payload
|
|
4966
|
-
infRespTec(payload
|
|
4967
|
-
infSolicNFF(payload
|
|
4965
|
+
infIntermed(payload?: InfIntermed): this;
|
|
4966
|
+
infAdic(payload?: InfAdic): this;
|
|
4967
|
+
exporta(payload?: Exporta): this;
|
|
4968
|
+
compra(payload?: Compra): this;
|
|
4969
|
+
cana(payload?: Cana): this;
|
|
4970
|
+
infRespTec(payload?: InfRespTec): this;
|
|
4971
|
+
infSolicNFF(payload?: InfSolicNFF): this;
|
|
4968
4972
|
quiet(): this;
|
|
4969
|
-
toObject(): Left<NFeTsError> | Right<T>;
|
|
4973
|
+
protected toObject(): Left<NFeTsError> | Right<T>;
|
|
4970
4974
|
assemble(): Promise<Left<NFeTsError> | Right<string>>;
|
|
4971
4975
|
protected assertHomologValidations(): boolean;
|
|
4972
4976
|
protected assertContingencyModes(): void;
|
|
@@ -5150,4 +5154,4 @@ declare class NFCe implements NFCe$1 {
|
|
|
5150
5154
|
Signature?: Signature;
|
|
5151
5155
|
}
|
|
5152
5156
|
|
|
5153
|
-
export { type AccessKey, AccessKeyBuilder, type AssembleDetXmlBuilder, type AssembleNfeBuilder, type AsynchronousAutorizacaoResponse, type AutXMLBuilder, type AutorizacaoPayload, type AutorizacaoRequest, type AutorizacaoResponse, type AvulsaBuilder, type Builder, 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 ICMS, type ICMS00, type ICMS10, type ICMS20, type ICMS30, type ICMS40, type ICMS51, type ICMS60, type ICMS70, type ICMS90, type ICMSPart, type ICMSSN, type ICMSSN101, type ICMSSN102, type ICMSSN201, type ICMSSN202, type ICMSSN500, type ICMSSN900, type ICMSST, type ICMSStandard, type IIBuilder, type INfeDetXmlBuilder, type INfeXmlBuilder, type IbscbsBuilder, 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, NfceCancelPipeline, NfceConsultStatusPipeline, NfceQrcode, type NfceQrcodeOptions, type NfceQrcodeOptions200, type NfceQrcodeOptions300, type NfceQrcodeOptionsBase, type NfceRemoteClient, NfceRemoteTransmitter, type NfceTransmitter, type NfceTransmitterOptions, NfceVoidRangePipeline, NfceXmlBuilder, NfceXmlBuilderPipeline, NfeAuthorizationResponsePipeline, NfeAuthorizerPipeline, NfeCancelPipeline, NfeConsultStatusPipeline, NfeCstatToProtocol, NfeDetXmlBuilder, type NfeRemoteClient, NfeRemoteTransmitter, type NfeTransmitter, type NfeTransmitterOptions, NfeVoidRangePipeline, 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, type vItemBuilder };
|
|
5157
|
+
export { type AccessKey, AccessKeyBuilder, type AssembleDetXmlBuilder, type AssembleNfeBuilder, type AsynchronousAutorizacaoResponse, type AutXMLBuilder, type AutorizacaoPayload, type AutorizacaoRequest, type AutorizacaoResponse, type AvulsaBuilder, type Builder, 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 ICMS, type ICMS00, type ICMS10, type ICMS20, type ICMS30, type ICMS40, type ICMS51, type ICMS60, type ICMS70, type ICMS90, type ICMSPart, type ICMSSN, type ICMSSN101, type ICMSSN102, type ICMSSN201, type ICMSSN202, type ICMSSN500, type ICMSSN900, type ICMSST, type ICMSStandard, type IIBuilder, type INfeDetXmlBuilder, type INfeXmlBuilder, type IbscbsBuilder, 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, NfceCancelPipeline, NfceConsultStatusPipeline, NfceQrcode, type NfceQrcodeOptions, type NfceQrcodeOptions200, type NfceQrcodeOptions300, type NfceQrcodeOptionsBase, type NfceRemoteClient, NfceRemoteTransmitter, type NfceTransmitter, type NfceTransmitterOptions, NfceVoidRangePipeline, NfceXmlBuilder, NfceXmlBuilderPipeline, NfeAuthorizationResponsePipeline, type NfeAuthorizerPayload, NfeAuthorizerPipeline, NfeCancelPipeline, NfeConsultStatusPipeline, NfeCstatToProtocol, NfeDetXmlBuilder, type NfeRemoteClient, NfeRemoteTransmitter, type NfeTransmitter, type NfeTransmitterOptions, NfeVoidRangePipeline, 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, type vItemBuilder };
|
package/dist/nfe/index.d.ts
CHANGED
|
@@ -1244,7 +1244,7 @@ interface AsynchronousAutorizacaoResponse {
|
|
|
1244
1244
|
};
|
|
1245
1245
|
}
|
|
1246
1246
|
type AutorizacaoResponse<E extends NFe$1 = NFe$1, T extends E | E[] = E | E[]> = SynchronousAutorizacaoResponse<T> | AsynchronousAutorizacaoResponse;
|
|
1247
|
-
type PipelineAuthorizerResponse<E extends NFe$1, T extends E | E[]> = T extends E[] ? {
|
|
1247
|
+
type PipelineAuthorizerResponse<E extends NFe$1, T extends E | E[] = E | E[]> = T extends E[] ? {
|
|
1248
1248
|
xml: string[];
|
|
1249
1249
|
response: SynchronousAutorizacaoResponse<T>;
|
|
1250
1250
|
} : {
|
|
@@ -1763,19 +1763,19 @@ interface EmitBuilder<T extends object> {
|
|
|
1763
1763
|
emit(payload: Emit): AvulsaBuilder<T> & DestBuilder<T> & RetiradaBuilder<T> & EntregaBuilder<T> & AutXMLBuilder<T> & DetGroupBuilder<T>;
|
|
1764
1764
|
}
|
|
1765
1765
|
interface AvulsaBuilder<T extends object> {
|
|
1766
|
-
avulsa(payload
|
|
1766
|
+
avulsa(payload?: Avulsa): DestBuilder<T> & RetiradaBuilder<T> & EntregaBuilder<T> & AutXMLBuilder<T> & DetGroupBuilder<T>;
|
|
1767
1767
|
}
|
|
1768
1768
|
interface DestBuilder<T extends object> {
|
|
1769
|
-
dest(payload
|
|
1769
|
+
dest(payload?: Dest): RetiradaBuilder<T> & EntregaBuilder<T> & AutXMLBuilder<T> & DetGroupBuilder<T>;
|
|
1770
1770
|
}
|
|
1771
1771
|
interface RetiradaBuilder<T extends object> {
|
|
1772
|
-
retirada(payload
|
|
1772
|
+
retirada(payload?: Local): DestBuilder<T> & EntregaBuilder<T> & AutXMLBuilder<T> & DetGroupBuilder<T>;
|
|
1773
1773
|
}
|
|
1774
1774
|
interface EntregaBuilder<T extends object> {
|
|
1775
|
-
entrega(payload
|
|
1775
|
+
entrega(payload?: Local): DestBuilder<T> & AutXMLBuilder<T> & DetGroupBuilder<T>;
|
|
1776
1776
|
}
|
|
1777
1777
|
interface AutXMLBuilder<T extends object> {
|
|
1778
|
-
autXML(payload
|
|
1778
|
+
autXML(payload?: AutXML): AutXMLBuilder<T> & DetGroupBuilder<T>;
|
|
1779
1779
|
}
|
|
1780
1780
|
interface DetGroupBuilder<T extends object> {
|
|
1781
1781
|
det<D>(items: [D, ...D[]], build: (ctx: ProdBuilder, item: D) => AssembleDetXmlBuilder): TotalBuilder<T> & TranspBuilder<T>;
|
|
@@ -1788,35 +1788,34 @@ interface TranspBuilder<T extends object> {
|
|
|
1788
1788
|
transp(payload: Transp): CobrBuilder<T> & PagBuilder<T>;
|
|
1789
1789
|
}
|
|
1790
1790
|
interface CobrBuilder<T extends object> {
|
|
1791
|
-
cobr(payload
|
|
1791
|
+
cobr(payload?: Cobr): PagBuilder<T>;
|
|
1792
1792
|
}
|
|
1793
1793
|
interface PagBuilder<T extends object> {
|
|
1794
1794
|
pag(payload: Pag): AssembleNfeBuilder<T> & AvulsaBuilder<T> & InfAdicBuilder<T> & InfSolicNFFBuilder<T> & CanaBuilder<T> & CompraBuilder<T> & ExportaBuilder<T> & InfRespTecBuilder<T> & InfIntermedBuilder<T>;
|
|
1795
1795
|
}
|
|
1796
1796
|
interface InfIntermedBuilder<T extends object> {
|
|
1797
|
-
infIntermed(payload
|
|
1797
|
+
infIntermed(payload?: InfIntermed): AssembleNfeBuilder<T> & AvulsaBuilder<T> & InfAdicBuilder<T> & InfSolicNFFBuilder<T> & CanaBuilder<T> & CompraBuilder<T> & InfRespTecBuilder<T> & ExportaBuilder<T>;
|
|
1798
1798
|
}
|
|
1799
1799
|
interface InfAdicBuilder<T extends object> {
|
|
1800
|
-
infAdic(payload
|
|
1800
|
+
infAdic(payload?: InfAdic): AssembleNfeBuilder<T> & AvulsaBuilder<T> & InfAdicBuilder<T> & InfSolicNFFBuilder<T> & InfRespTecBuilder<T> & CanaBuilder<T> & CompraBuilder<T> & ExportaBuilder<T>;
|
|
1801
1801
|
}
|
|
1802
1802
|
interface ExportaBuilder<T extends object> {
|
|
1803
|
-
exporta(payload
|
|
1803
|
+
exporta(payload?: Exporta): AssembleNfeBuilder<T> & AvulsaBuilder<T> & InfAdicBuilder<T> & InfSolicNFFBuilder<T> & InfRespTecBuilder<T> & CanaBuilder<T> & CompraBuilder<T>;
|
|
1804
1804
|
}
|
|
1805
1805
|
interface CompraBuilder<T extends object> {
|
|
1806
|
-
compra(payload
|
|
1806
|
+
compra(payload?: Compra): AssembleNfeBuilder<T> & AvulsaBuilder<T> & InfAdicBuilder<T> & InfSolicNFFBuilder<T> & InfRespTecBuilder<T> & CanaBuilder<T>;
|
|
1807
1807
|
}
|
|
1808
1808
|
interface CanaBuilder<T extends object> {
|
|
1809
|
-
cana(payload
|
|
1809
|
+
cana(payload?: Cana): AssembleNfeBuilder<T> & AvulsaBuilder<T> & InfAdicBuilder<T> & InfSolicNFFBuilder<T> & InfRespTecBuilder<T>;
|
|
1810
1810
|
}
|
|
1811
1811
|
interface InfRespTecBuilder<T extends object> {
|
|
1812
|
-
infRespTec(payload
|
|
1812
|
+
infRespTec(payload?: InfRespTec): AssembleNfeBuilder<T> & AvulsaBuilder<T> & InfAdicBuilder<T> & InfSolicNFFBuilder<T>;
|
|
1813
1813
|
}
|
|
1814
1814
|
interface InfSolicNFFBuilder<T extends object> {
|
|
1815
|
-
infSolicNFF(payload
|
|
1815
|
+
infSolicNFF(payload?: InfSolicNFF): AssembleNfeBuilder<T> & InfAdicBuilder<T> & AvulsaBuilder<T>;
|
|
1816
1816
|
}
|
|
1817
1817
|
interface AssembleNfeBuilder<T extends object> {
|
|
1818
1818
|
quiet(): AssembleNfeBuilder<T>;
|
|
1819
|
-
toObject(): Either<NFeTsError, T>;
|
|
1820
1819
|
assemble(): Promise<Either<NFeTsError, string>>;
|
|
1821
1820
|
}
|
|
1822
1821
|
interface INfeXmlBuilder<T extends object> extends InfNFeBuilder<T>, IdeBuilder<T>, DetGroupBuilder<T>, DestBuilder<T>, RetiradaBuilder<T>, EntregaBuilder<T>, AutXMLBuilder<T>, TotalBuilder<T>, TranspBuilder<T>, PagBuilder<T>, InfIntermedBuilder<T>, ExportaBuilder<T>, CompraBuilder<T>, CanaBuilder<T>, InfRespTecBuilder<T>, InfSolicNFFBuilder<T>, InfAdicBuilder<T>, AvulsaBuilder<T>, AssembleNfeBuilder<T> {
|
|
@@ -3278,14 +3277,21 @@ declare class NFe implements NFe$1 {
|
|
|
3278
3277
|
Signature?: Signature;
|
|
3279
3278
|
}
|
|
3280
3279
|
|
|
3280
|
+
interface NfeAuthorizerPayload<E extends string, T extends E | E[] = E | E[]> {
|
|
3281
|
+
cUF?: StateCode;
|
|
3282
|
+
tpAmb?: EnvironmentCode;
|
|
3283
|
+
idLote?: string;
|
|
3284
|
+
indSinc?: '0' | '1';
|
|
3285
|
+
xml: T;
|
|
3286
|
+
}
|
|
3281
3287
|
declare class NfeAuthorizerPipeline extends TransmissionPipeline {
|
|
3282
|
-
execute
|
|
3288
|
+
execute(payload: NfeAuthorizerPayload<string>, options?: Pick<NfeTransmitterOptions, 'schema'>): Promise<Either<NFeTsError, PipelineAuthorizerResponse<NFe>>>;
|
|
3283
3289
|
protected protocol(NFe: NFe, protNFe: ProtNFe): Promise<string>;
|
|
3284
3290
|
protected response<E extends NFe, T extends E | E[]>(NFe: SignedEntity<NFe>[], response: SynchronousAutorizacaoResponse<T>): Promise<PipelineAuthorizerResponse<E, T>>;
|
|
3285
3291
|
protected signNfe(certificate: ReadCertificateResponse, NFe: NFe): Promise<Either<NFeTsError, SignedEntity<NFe>>>;
|
|
3286
|
-
protected handleNfeBatch(certificate: ReadCertificateResponse,
|
|
3292
|
+
protected handleNfeBatch(certificate: ReadCertificateResponse, xml: string | string[]): Promise<Left<NFeTsError> | Right<SignedEntity<NFe>[]>>;
|
|
3287
3293
|
protected isSyncResponse<E extends NFe, T extends E | E[]>(response: AutorizacaoResponse<E, T>): response is SynchronousAutorizacaoResponse<T>;
|
|
3288
|
-
protected handleAsyncResponse
|
|
3294
|
+
protected handleAsyncResponse(NFe: SignedEntity<NFe>[], response: AsynchronousAutorizacaoResponse): Promise<Either<NFeTsError, PipelineAuthorizerResponse<NFe>>>;
|
|
3289
3295
|
protected contingency(NFe: NFe): {
|
|
3290
3296
|
dhCont: string;
|
|
3291
3297
|
xJust: string;
|
|
@@ -4857,7 +4863,6 @@ declare class NfeXmlBuilderPipeline<T extends object> extends Pipeline {
|
|
|
4857
4863
|
protected readonly builder: (InfNFeBuilder<T> & IdeBuilder<T>) | AssembleNfeBuilder<T>;
|
|
4858
4864
|
constructor(certificate?: ReadCertificateRequest | undefined, schema?: Schema);
|
|
4859
4865
|
build(build: (builder: InfNFeBuilder<T> & IdeBuilder<T>) => AssembleNfeBuilder<T>): this;
|
|
4860
|
-
toObject(): Either<NFeTsError, T>;
|
|
4861
4866
|
assemble(): Promise<Either<NFeTsError, string>>;
|
|
4862
4867
|
protected get nfeXsdSchema(): string;
|
|
4863
4868
|
protected assertXmlSignedAndValidated(xml: string): Promise<Either<NFeTsError, string>>;
|
|
@@ -4871,9 +4876,8 @@ declare class NfceXmlBuilderPipeline<T extends object> extends NfeXmlBuilderPipe
|
|
|
4871
4876
|
protected readonly transmitter: NfceRemoteTransmitter;
|
|
4872
4877
|
constructor(certificate?: ReadCertificateRequest, schema?: Schema, options?: Pick<NfceTransmitterOptions, "qrCode"> | undefined);
|
|
4873
4878
|
protected readonly builder: (InfNFeBuilder<T> & IdeBuilder<T>) | AssembleNfeBuilder<T>;
|
|
4874
|
-
|
|
4879
|
+
protected assertXmlSignedAndValidated(xml: string): Promise<Left<NFeTsError> | Right<string>>;
|
|
4875
4880
|
private generateQrCode;
|
|
4876
|
-
private parseSignedNfce;
|
|
4877
4881
|
}
|
|
4878
4882
|
|
|
4879
4883
|
declare const DanfceSize: {
|
|
@@ -4946,27 +4950,27 @@ declare class NfeXmlBuilder<T extends object = NFe$1> implements INfeXmlBuilder<
|
|
|
4946
4950
|
infNFe($: InfNFeAttributes): this;
|
|
4947
4951
|
ide(payload: Ide): this;
|
|
4948
4952
|
emit(payload: Emit): this;
|
|
4949
|
-
avulsa(payload
|
|
4950
|
-
dest(payload
|
|
4951
|
-
retirada(payload
|
|
4952
|
-
entrega(payload
|
|
4953
|
-
autXML(payload
|
|
4953
|
+
avulsa(payload?: Avulsa): this;
|
|
4954
|
+
dest(payload?: Dest): this;
|
|
4955
|
+
retirada(payload?: Local): this;
|
|
4956
|
+
entrega(payload?: Local): this;
|
|
4957
|
+
autXML(payload?: AutXML): this;
|
|
4954
4958
|
det<D>(items: [D, ...D[]], build: (ctx: ProdBuilder, item: D) => AssembleDetXmlBuilder): TotalBuilder<T> & TranspBuilder<T>;
|
|
4955
4959
|
total(payload: Total): this;
|
|
4956
4960
|
increment(callback: (context: DeepPartial<Total>, det: DeepPartial<Det[]>) => DeepPartial<Total>): this;
|
|
4957
4961
|
private buildTotalForPL_010;
|
|
4958
4962
|
transp(payload: Transp): this;
|
|
4959
|
-
cobr(payload
|
|
4963
|
+
cobr(payload?: Cobr): this;
|
|
4960
4964
|
pag(payload: Pag): this;
|
|
4961
|
-
infIntermed(payload
|
|
4962
|
-
infAdic(payload
|
|
4963
|
-
exporta(payload
|
|
4964
|
-
compra(payload
|
|
4965
|
-
cana(payload
|
|
4966
|
-
infRespTec(payload
|
|
4967
|
-
infSolicNFF(payload
|
|
4965
|
+
infIntermed(payload?: InfIntermed): this;
|
|
4966
|
+
infAdic(payload?: InfAdic): this;
|
|
4967
|
+
exporta(payload?: Exporta): this;
|
|
4968
|
+
compra(payload?: Compra): this;
|
|
4969
|
+
cana(payload?: Cana): this;
|
|
4970
|
+
infRespTec(payload?: InfRespTec): this;
|
|
4971
|
+
infSolicNFF(payload?: InfSolicNFF): this;
|
|
4968
4972
|
quiet(): this;
|
|
4969
|
-
toObject(): Left<NFeTsError> | Right<T>;
|
|
4973
|
+
protected toObject(): Left<NFeTsError> | Right<T>;
|
|
4970
4974
|
assemble(): Promise<Left<NFeTsError> | Right<string>>;
|
|
4971
4975
|
protected assertHomologValidations(): boolean;
|
|
4972
4976
|
protected assertContingencyModes(): void;
|
|
@@ -5150,4 +5154,4 @@ declare class NFCe implements NFCe$1 {
|
|
|
5150
5154
|
Signature?: Signature;
|
|
5151
5155
|
}
|
|
5152
5156
|
|
|
5153
|
-
export { type AccessKey, AccessKeyBuilder, type AssembleDetXmlBuilder, type AssembleNfeBuilder, type AsynchronousAutorizacaoResponse, type AutXMLBuilder, type AutorizacaoPayload, type AutorizacaoRequest, type AutorizacaoResponse, type AvulsaBuilder, type Builder, 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 ICMS, type ICMS00, type ICMS10, type ICMS20, type ICMS30, type ICMS40, type ICMS51, type ICMS60, type ICMS70, type ICMS90, type ICMSPart, type ICMSSN, type ICMSSN101, type ICMSSN102, type ICMSSN201, type ICMSSN202, type ICMSSN500, type ICMSSN900, type ICMSST, type ICMSStandard, type IIBuilder, type INfeDetXmlBuilder, type INfeXmlBuilder, type IbscbsBuilder, 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, NfceCancelPipeline, NfceConsultStatusPipeline, NfceQrcode, type NfceQrcodeOptions, type NfceQrcodeOptions200, type NfceQrcodeOptions300, type NfceQrcodeOptionsBase, type NfceRemoteClient, NfceRemoteTransmitter, type NfceTransmitter, type NfceTransmitterOptions, NfceVoidRangePipeline, NfceXmlBuilder, NfceXmlBuilderPipeline, NfeAuthorizationResponsePipeline, NfeAuthorizerPipeline, NfeCancelPipeline, NfeConsultStatusPipeline, NfeCstatToProtocol, NfeDetXmlBuilder, type NfeRemoteClient, NfeRemoteTransmitter, type NfeTransmitter, type NfeTransmitterOptions, NfeVoidRangePipeline, 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, type vItemBuilder };
|
|
5157
|
+
export { type AccessKey, AccessKeyBuilder, type AssembleDetXmlBuilder, type AssembleNfeBuilder, type AsynchronousAutorizacaoResponse, type AutXMLBuilder, type AutorizacaoPayload, type AutorizacaoRequest, type AutorizacaoResponse, type AvulsaBuilder, type Builder, 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 ICMS, type ICMS00, type ICMS10, type ICMS20, type ICMS30, type ICMS40, type ICMS51, type ICMS60, type ICMS70, type ICMS90, type ICMSPart, type ICMSSN, type ICMSSN101, type ICMSSN102, type ICMSSN201, type ICMSSN202, type ICMSSN500, type ICMSSN900, type ICMSST, type ICMSStandard, type IIBuilder, type INfeDetXmlBuilder, type INfeXmlBuilder, type IbscbsBuilder, 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, NfceCancelPipeline, NfceConsultStatusPipeline, NfceQrcode, type NfceQrcodeOptions, type NfceQrcodeOptions200, type NfceQrcodeOptions300, type NfceQrcodeOptionsBase, type NfceRemoteClient, NfceRemoteTransmitter, type NfceTransmitter, type NfceTransmitterOptions, NfceVoidRangePipeline, NfceXmlBuilder, NfceXmlBuilderPipeline, NfeAuthorizationResponsePipeline, type NfeAuthorizerPayload, NfeAuthorizerPipeline, NfeCancelPipeline, NfeConsultStatusPipeline, NfeCstatToProtocol, NfeDetXmlBuilder, type NfeRemoteClient, NfeRemoteTransmitter, type NfeTransmitter, type NfeTransmitterOptions, NfeVoidRangePipeline, 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, type vItemBuilder };
|
package/dist/nfe/index.mjs
CHANGED
|
@@ -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-
|
|
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-HNU77B3G.mjs";import"../chunk-IJON6HO5.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};
|