facturas 0.21.0 → 0.22.1
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/README.md +4 -2
- package/dist/{chunk-C2KX652X.mjs → chunk-5CGIRDZY.mjs} +5 -2
- package/dist/chunk-5CGIRDZY.mjs.map +1 -0
- package/dist/{chunk-FQD2PZXE.mjs → chunk-67ISWKGE.mjs} +3 -2
- package/dist/{chunk-WEEV76IC.mjs → chunk-6BLEIM5F.mjs} +2824 -299
- package/dist/chunk-6BLEIM5F.mjs.map +1 -0
- package/dist/{chunk-4PSLYA2B.mjs → chunk-7MNVZSW6.mjs} +12 -3
- package/dist/chunk-7MNVZSW6.mjs.map +1 -0
- package/dist/{chunk-QHNI4ZIA.mjs → chunk-FSJHE4VS.mjs} +2 -2
- package/dist/{chunk-HSGTCGUX.mjs → chunk-GQGYO2Z2.mjs} +2 -2
- package/dist/cli.d.ts +4 -4
- package/dist/cli.mjs +9 -9
- package/dist/cli.mjs.map +1 -1
- package/dist/{client-CP1PQD_j.d.ts → client-ghHzZdu8.d.ts} +613 -73
- package/dist/constants.d.ts +3 -0
- package/dist/constants.mjs +1 -1
- package/dist/errors.d.ts +2 -2
- package/dist/{fiscal-evidence-Cp-ntg5p.d.ts → fiscal-evidence-DjG8zB3o.d.ts} +2 -2
- package/dist/{index-abxokwjJ.d.ts → index-BSTxy3nN.d.ts} +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.mjs +10 -10
- package/dist/index.mjs.map +1 -1
- package/dist/padron.d.ts +2 -2
- package/dist/padron.mjs +2 -2
- package/dist/{types-DhrPnj3r.d.ts → types-CbvsjIhf.d.ts} +2 -2
- package/dist/types.d.ts +1 -1
- package/dist/wsfe.d.ts +3 -3
- package/dist/wsfe.mjs +2 -2
- package/dist/wsmtxca.d.ts +3 -3
- package/dist/wsmtxca.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-4PSLYA2B.mjs.map +0 -1
- package/dist/chunk-C2KX652X.mjs.map +0 -1
- package/dist/chunk-WEEV76IC.mjs.map +0 -1
- /package/dist/{chunk-FQD2PZXE.mjs.map → chunk-67ISWKGE.mjs.map} +0 -0
- /package/dist/{chunk-QHNI4ZIA.mjs.map → chunk-FSJHE4VS.mjs.map} +0 -0
- /package/dist/{chunk-HSGTCGUX.mjs.map → chunk-GQGYO2Z2.mjs.map} +0 -0
package/README.md
CHANGED
|
@@ -127,6 +127,8 @@ una reserva sin emitir.
|
|
|
127
127
|
contrato fiscal de emisión.
|
|
128
128
|
- [Notas de crédito](https://facturas-sdk.dev/guides/credit-notes): `issueCreditNote()`, modo
|
|
129
129
|
parcial y modo total.
|
|
130
|
+
- [Factura E](https://facturas-sdk.dev/guides/export): exportación de bienes y servicios por
|
|
131
|
+
WSFEX con el mismo `issue()`.
|
|
130
132
|
- [Evitar comprobantes duplicados](https://facturas-sdk.dev/guides/avoid-duplicates): claves para
|
|
131
133
|
reintentos, Postgres, Redis, archivos y memoria.
|
|
132
134
|
- [WSMTXCA para casos requeridos](https://facturas-sdk.dev/guides/wsmtxca): configuración
|
|
@@ -134,8 +136,8 @@ una reserva sin emitir.
|
|
|
134
136
|
- [Configuración](https://facturas-sdk.dev/reference/configuration): variables de entorno, opciones del
|
|
135
137
|
cliente, sesiones WSAA, logs, reintentos y límites de tiempo.
|
|
136
138
|
- [Módulos de transporte](https://facturas-sdk.dev/reference/arca-services): `client.wsfe`,
|
|
137
|
-
`client.wsmtxca` y `client.padron` para lecturas, catálogos,
|
|
138
|
-
servicio y Padrón.
|
|
139
|
+
`client.wsfex`, `client.wsmtxca` y `client.padron` para lecturas, catálogos,
|
|
140
|
+
estado del servicio y Padrón.
|
|
139
141
|
- [Errores](https://facturas-sdk.dev/reference/errors): clases de error y diagnóstico.
|
|
140
142
|
- [Referencia](https://facturas-sdk.dev/reference/public-api): constantes, API pública con semver y
|
|
141
143
|
seguridad.
|
|
@@ -8,7 +8,10 @@ var ARCA_VOUCHER_TYPES = {
|
|
|
8
8
|
NOTA_CREDITO_B: 8,
|
|
9
9
|
FACTURA_C: 11,
|
|
10
10
|
NOTA_DEBITO_C: 12,
|
|
11
|
-
NOTA_CREDITO_C: 13
|
|
11
|
+
NOTA_CREDITO_C: 13,
|
|
12
|
+
FACTURA_E: 19,
|
|
13
|
+
NOTA_DEBITO_E: 20,
|
|
14
|
+
NOTA_CREDITO_E: 21
|
|
12
15
|
};
|
|
13
16
|
var ARCA_DOCUMENT_TYPES = {
|
|
14
17
|
CUIT: 80,
|
|
@@ -117,4 +120,4 @@ export {
|
|
|
117
120
|
ARCA_FINAL_CONSUMER_IDENTIFICATION_THRESHOLD_MINOR_UNITS,
|
|
118
121
|
ARCA_INVOICE_CLASS_BY_ISSUER
|
|
119
122
|
};
|
|
120
|
-
//# sourceMappingURL=chunk-
|
|
123
|
+
//# sourceMappingURL=chunk-5CGIRDZY.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/constants.ts"],"sourcesContent":["/** Common ARCA reference data for readable userland code and examples. */\nexport const ARCA_VOUCHER_TYPES = {\n FACTURA_A: 1,\n NOTA_DEBITO_A: 2,\n NOTA_CREDITO_A: 3,\n FACTURA_B: 6,\n NOTA_DEBITO_B: 7,\n NOTA_CREDITO_B: 8,\n FACTURA_C: 11,\n NOTA_DEBITO_C: 12,\n NOTA_CREDITO_C: 13,\n FACTURA_E: 19,\n NOTA_DEBITO_E: 20,\n NOTA_CREDITO_E: 21,\n} as const;\n\n/** Common document types accepted by ARCA services. */\nexport const ARCA_DOCUMENT_TYPES = {\n CUIT: 80,\n DNI: 96,\n CONSUMIDOR_FINAL: 99,\n} as const;\n\n/**\n * ARCA's generic WSMTXCA item codes, keyed by the `matrixCode` to send.\n * RG 2904, Anexo VII: for concepts outside the issuer's main line of goods,\n * which carry their GTIN instead. Samples and promotional material use\n * `7790001001054` (Ventas varias).\n * https://www.afip.gob.ar/fe/documentos/codigosGenericosYEspecificos.xls\n */\nexport const ARCA_WSMTXCA_GENERIC_CODES = {\n \"7790001001030\": \"Descuentos y bonificaciones comerciales\",\n \"7790001001047\": \"Conceptos financieros\",\n \"7790001001054\": \"Ventas varias\",\n \"7790001001061\": \"Bienes de uso\",\n \"7790001001078\": \"Servicios prestados\",\n \"7790001001085\": \"Fletes\",\n \"7790001001092\": \"Alquileres\",\n \"7790001001115\": \"Depósito y servicios de logística\",\n \"7790001001122\": \"Repuestos y accesorios\",\n \"7790001001139\": \"Ajustes impositivos\",\n \"7790001001146\": \"Actividades comerciales no codificadas\",\n \"7790001001153\": \"Venta de material de rezago\",\n \"7790001001856\": \"Anticipos y señas\",\n} as const;\n\n/**\n * Common receiver IVA condition identifiers used by WSFE.\n * Allowed values depend on the voucher class and ARCA's live catalog.\n */\nexport const ARCA_RECEIVER_VAT_CONDITIONS = {\n RESPONSABLE_INSCRIPTO: 1,\n EXENTO: 4,\n CONSUMIDOR_FINAL: 5,\n MONOTRIBUTISTA: 6,\n IVA_NO_ALCANZADO: 15,\n} as const;\n\n/** Supported invoice concept types for WSFE requests. */\nexport const ARCA_CONCEPT_TYPES = {\n PRODUCTOS: 1,\n SERVICIOS: 2,\n PRODUCTOS_Y_SERVICIOS: 3,\n} as const;\n\n/** Common IVA rate identifiers used by WSFE. */\nexport const ARCA_VAT_RATES = {\n IVA_0: 3,\n IVA_10_5: 4,\n IVA_21: 5,\n IVA_27: 6,\n IVA_5: 8,\n IVA_2_5: 9,\n} as const;\n\n/** ISO currency codes accepted by the high-level WSFE builders. */\nexport const ISO_CURRENCIES = {\n ARS: \"ARS\",\n USD: \"USD\",\n} as const;\n\n/** ARCA currency identifiers keyed by their corresponding ISO currency. */\nexport const ARCA_CURRENCY_IDS = {\n ARS: \"PES\",\n USD: \"DOL\",\n} as const;\n\n/** Legal assertions supported by the invoice high-level API; never inferred from Padrón. */\nexport type IssuerCondition =\n | \"responsable_inscripto\"\n | \"monotributo\"\n | \"exento\"\n | \"no_alcanzado\";\nexport type ReceiverCondition = IssuerCondition | \"consumidor_final\";\nexport type VoucherClass = \"A\" | \"B\" | \"C\";\n\nexport const ARCA_RECEIVER_CONDITION_IDS = {\n responsable_inscripto: ARCA_RECEIVER_VAT_CONDITIONS.RESPONSABLE_INSCRIPTO,\n monotributo: ARCA_RECEIVER_VAT_CONDITIONS.MONOTRIBUTISTA,\n exento: ARCA_RECEIVER_VAT_CONDITIONS.EXENTO,\n consumidor_final: ARCA_RECEIVER_VAT_CONDITIONS.CONSUMIDOR_FINAL,\n no_alcanzado: ARCA_RECEIVER_VAT_CONDITIONS.IVA_NO_ALCANZADO,\n} as const satisfies Record<ReceiverCondition, number>;\n\nexport const ARCA_ISSUER_CONDITION_IDS = {\n responsable_inscripto: 1,\n monotributo: 6,\n exento: 4,\n no_alcanzado: 15,\n} as const satisfies Record<IssuerCondition, number>;\n\n/** The ARCA identifier of each issuer condition, accepted wherever a name is. */\nexport type IssuerConditionId =\n (typeof ARCA_ISSUER_CONDITION_IDS)[IssuerCondition];\n\n// RG 5866/2026, art. 1(f), effective 2026-07-01 (art. 4).\n// https://www.argentina.gob.ar/normativa/nacional/norma-427092/texto\nexport const ARCA_FINAL_CONSUMER_IDENTIFICATION_THRESHOLD_MINOR_UNITS =\n 1_000_000_000n;\n\n// WSFE v4.7, physical PDF p. 203, validations 10243/10246; issuer asserted first.\n// ARCA checks actual issuer eligibility independently at authorization.\nexport const ARCA_INVOICE_CLASS_BY_ISSUER = {\n responsable_inscripto: {\n responsable_inscripto: \"A\",\n monotributo: \"A\",\n exento: \"B\",\n consumidor_final: \"B\",\n no_alcanzado: \"B\",\n },\n monotributo: {\n responsable_inscripto: \"C\",\n monotributo: \"C\",\n exento: \"C\",\n consumidor_final: \"C\",\n no_alcanzado: \"C\",\n },\n exento: {\n responsable_inscripto: \"C\",\n monotributo: \"C\",\n exento: \"C\",\n consumidor_final: \"C\",\n no_alcanzado: \"C\",\n },\n no_alcanzado: {\n responsable_inscripto: \"C\",\n monotributo: \"C\",\n exento: \"C\",\n consumidor_final: \"C\",\n no_alcanzado: \"C\",\n },\n} as const satisfies Record<\n IssuerCondition,\n Record<ReceiverCondition, VoucherClass>\n>;\n"],"mappings":";AACO,IAAM,qBAAqB;AAAA,EAChC,WAAW;AAAA,EACX,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,WAAW;AAAA,EACX,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,WAAW;AAAA,EACX,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,WAAW;AAAA,EACX,eAAe;AAAA,EACf,gBAAgB;AAClB;AAGO,IAAM,sBAAsB;AAAA,EACjC,MAAM;AAAA,EACN,KAAK;AAAA,EACL,kBAAkB;AACpB;AASO,IAAM,6BAA6B;AAAA,EACxC,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,iBAAiB;AACnB;AAMO,IAAM,+BAA+B;AAAA,EAC1C,uBAAuB;AAAA,EACvB,QAAQ;AAAA,EACR,kBAAkB;AAAA,EAClB,gBAAgB;AAAA,EAChB,kBAAkB;AACpB;AAGO,IAAM,qBAAqB;AAAA,EAChC,WAAW;AAAA,EACX,WAAW;AAAA,EACX,uBAAuB;AACzB;AAGO,IAAM,iBAAiB;AAAA,EAC5B,OAAO;AAAA,EACP,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,SAAS;AACX;AAGO,IAAM,iBAAiB;AAAA,EAC5B,KAAK;AAAA,EACL,KAAK;AACP;AAGO,IAAM,oBAAoB;AAAA,EAC/B,KAAK;AAAA,EACL,KAAK;AACP;AAWO,IAAM,8BAA8B;AAAA,EACzC,uBAAuB,6BAA6B;AAAA,EACpD,aAAa,6BAA6B;AAAA,EAC1C,QAAQ,6BAA6B;AAAA,EACrC,kBAAkB,6BAA6B;AAAA,EAC/C,cAAc,6BAA6B;AAC7C;AAEO,IAAM,4BAA4B;AAAA,EACvC,uBAAuB;AAAA,EACvB,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,cAAc;AAChB;AAQO,IAAM,2DACX;AAIK,IAAM,+BAA+B;AAAA,EAC1C,uBAAuB;AAAA,IACrB,uBAAuB;AAAA,IACvB,aAAa;AAAA,IACb,QAAQ;AAAA,IACR,kBAAkB;AAAA,IAClB,cAAc;AAAA,EAChB;AAAA,EACA,aAAa;AAAA,IACX,uBAAuB;AAAA,IACvB,aAAa;AAAA,IACb,QAAQ;AAAA,IACR,kBAAkB;AAAA,IAClB,cAAc;AAAA,EAChB;AAAA,EACA,QAAQ;AAAA,IACN,uBAAuB;AAAA,IACvB,aAAa;AAAA,IACb,QAAQ;AAAA,IACR,kBAAkB;AAAA,IAClB,cAAc;AAAA,EAChB;AAAA,EACA,cAAc;AAAA,IACZ,uBAAuB;AAAA,IACvB,aAAa;AAAA,IACb,QAAQ;AAAA,IACR,kBAAkB;AAAA,IAClB,cAAc;AAAA,EAChB;AACF;","names":[]}
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
classifyArcaAuthenticationIssues,
|
|
9
9
|
createArcaAuthenticationEvidence,
|
|
10
10
|
executeWithAuthenticationRecovery
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-7MNVZSW6.mjs";
|
|
12
12
|
import {
|
|
13
13
|
ArcaInputError,
|
|
14
14
|
ArcaInvalidSoapResponseError,
|
|
@@ -1523,6 +1523,7 @@ function getWsfeNumericResultEntries(result, key) {
|
|
|
1523
1523
|
export {
|
|
1524
1524
|
toIsoDate,
|
|
1525
1525
|
normalizeArcaAmountToMinorUnits,
|
|
1526
|
+
serializeArcaAmount,
|
|
1526
1527
|
serializeArcaExchangeRate,
|
|
1527
1528
|
assertArcaMinorUnits,
|
|
1528
1529
|
arcaMinorUnitsToNumber,
|
|
@@ -1532,4 +1533,4 @@ export {
|
|
|
1532
1533
|
normalizeWsfeVoucherInput,
|
|
1533
1534
|
normalizeWsfeDateInput
|
|
1534
1535
|
};
|
|
1535
|
-
//# sourceMappingURL=chunk-
|
|
1536
|
+
//# sourceMappingURL=chunk-67ISWKGE.mjs.map
|