facturas 0.15.0 → 0.16.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.
@@ -82,7 +82,7 @@ type LegacyWsmtxcaLine = Omit<WsmtxcaLine, "discount"> & {
82
82
  discount?: number;
83
83
  };
84
84
  type WsmtxcaIssueRequest = ReturnType<typeof wsmtxcaRequest>;
85
- type FiscalHeader = WsfeVoucherInput & {
85
+ type FiscalHeader$1 = WsfeVoucherInput & {
86
86
  /** Derived provider lines. WSFE never reads them; WSMTXCA sends them. */
87
87
  lines?: readonly WsmtxcaLine[];
88
88
  /** @internal Lines mirrored from an authorized WSMTXCA consultation. */
@@ -90,7 +90,7 @@ type FiscalHeader = WsfeVoucherInput & {
90
90
  /** @internal Durable v2 reservation evidence written before `lines`. */
91
91
  details?: readonly LegacyWsmtxcaLine[];
92
92
  };
93
- declare function wsmtxcaRequest(data: FiscalHeader, number?: number): {
93
+ declare function wsmtxcaRequest(data: FiscalHeader$1, number?: number): {
94
94
  comprobanteCAERequest: {
95
95
  arrayItems: {
96
96
  item: {
@@ -223,6 +223,24 @@ type IssueAmounts = {
223
223
  vatAdjustment: number;
224
224
  };
225
225
 
226
+ /**
227
+ * The normalized fiscal fields shared by previews and authorized vouchers.
228
+ * Dates are `YYYY-MM-DD`; `exchangeRate` is an exact decimal string. Service
229
+ * dates are absent for product-only documents. `paymentDueDate` is absent when
230
+ * the fiscal document has no due date.
231
+ */
232
+ type FiscalHeader = {
233
+ /** ARCA concept: products (1), services (2), or both (3). */
234
+ concept: 1 | 2 | 3;
235
+ documentType: number;
236
+ documentNumber: string;
237
+ receiverVatConditionId: number;
238
+ currencyId: string;
239
+ exchangeRate?: string;
240
+ serviceStartDate?: string;
241
+ serviceEndDate?: string;
242
+ paymentDueDate?: string;
243
+ };
226
244
  type IssueOptions = {
227
245
  service?: "wsfe" | "wsmtxca";
228
246
  /** An externally reserved number. Never reads the next number when supplied. */
@@ -246,6 +264,7 @@ type IssueOptions = {
246
264
  type IssuedVoucher = VoucherCoordinates & {
247
265
  voucherClass: VoucherClass;
248
266
  date: string;
267
+ header: FiscalHeader;
249
268
  cae: string;
250
269
  caeExpiry: string;
251
270
  amounts: IssueAmounts;
@@ -269,6 +288,7 @@ type IssueRequest<S extends IssuanceService = "wsfe"> = S extends "wsmtxca" ? Ws
269
288
  type IssuePreview<S extends IssuanceService = "wsfe"> = {
270
289
  voucherClass: VoucherClass;
271
290
  voucherType: number;
291
+ header: FiscalHeader;
272
292
  amounts: IssueAmounts;
273
293
  request: IssueRequest<S>;
274
294
  service?: S;
@@ -599,4 +619,4 @@ type ArcaClient = {
599
619
  */
600
620
  declare function createArcaClient(config?: ArcaClientOptions): ArcaClient;
601
621
 
602
- export { type ArcaClient as A, type CreditNoteInput as C, type DebitNoteInput as D, type FceOptions as F, type InvoiceFamily as I, type NotePreview as N, type PeriodNoteInput as P, type Receiver as R, type Tribute as T, type VatItem as V, type WsfeIdentityMatch as W, type AmountItem as a, type ArcaClientConfigView as b, type IssuanceFields as c, type IssuanceService as d, type IssueAmounts as e, type IssueCommon as f, type IssueInput as g, type IssueOptions as h, type IssueOutcome as i, type IssuePreview as j, type IssueRequest as k, type IssuedVoucher as l, type ItemLine as m, type PreviewOptions as n, type RecoveryOptions as o, type VatRate as p, type VoucherAmounts as q, type VoucherCoordinates as r, type VoucherSummary as s, type VouchersService as t, type WsmtxcaIssueRequest as u, type WsmtxcaLine as v, createArcaClient as w, matchWsfeVoucherIdentity as x };
622
+ export { type ArcaClient as A, type CreditNoteInput as C, type DebitNoteInput as D, type FceOptions as F, type InvoiceFamily as I, type NotePreview as N, type PeriodNoteInput as P, type Receiver as R, type Tribute as T, type VatItem as V, type WsfeIdentityMatch as W, type AmountItem as a, type ArcaClientConfigView as b, type FiscalHeader as c, type IssuanceFields as d, type IssuanceService as e, type IssueAmounts as f, type IssueCommon as g, type IssueInput as h, type IssueOptions as i, type IssueOutcome as j, type IssuePreview as k, type IssueRequest as l, type IssuedVoucher as m, type ItemLine as n, type PreviewOptions as o, type RecoveryOptions as p, type VatRate as q, type VoucherAmounts as r, type VoucherCoordinates as s, type VoucherSummary as t, type VouchersService as u, type WsmtxcaIssueRequest as v, type WsmtxcaLine as w, createArcaClient as x, matchWsfeVoucherIdentity as y };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { a as AmountItem, A as ArcaClient, b as ArcaClientConfigView, C as CreditNoteInput, D as DebitNoteInput, F as FceOptions, I as InvoiceFamily, c as IssuanceFields, d as IssuanceService, e as IssueAmounts, f as IssueCommon, g as IssueInput, h as IssueOptions, i as IssueOutcome, j as IssuePreview, k as IssueRequest, l as IssuedVoucher, m as ItemLine, N as NotePreview, P as PeriodNoteInput, n as PreviewOptions, R as Receiver, o as RecoveryOptions, T as Tribute, V as VatItem, p as VatRate, q as VoucherAmounts, r as VoucherCoordinates, s as VoucherSummary, t as VouchersService, W as WsfeIdentityMatch, u as WsmtxcaIssueRequest, v as WsmtxcaLine, w as createArcaClient, x as matchWsfeVoucherIdentity } from './client-ConWK1mc.js';
1
+ export { a as AmountItem, A as ArcaClient, b as ArcaClientConfigView, C as CreditNoteInput, D as DebitNoteInput, F as FceOptions, c as FiscalHeader, I as InvoiceFamily, d as IssuanceFields, e as IssuanceService, f as IssueAmounts, g as IssueCommon, h as IssueInput, i as IssueOptions, j as IssueOutcome, k as IssuePreview, l as IssueRequest, m as IssuedVoucher, n as ItemLine, N as NotePreview, P as PeriodNoteInput, o as PreviewOptions, R as Receiver, p as RecoveryOptions, T as Tribute, V as VatItem, q as VatRate, r as VoucherAmounts, s as VoucherCoordinates, t as VoucherSummary, u as VouchersService, W as WsfeIdentityMatch, v as WsmtxcaIssueRequest, w as WsmtxcaLine, x as createArcaClient, y as matchWsfeVoucherIdentity } from './client-C7lhfLGY.js';
2
2
  import { h as ArcaEnvironment, a as ArcaClientConfig, i as ArcaStore, j as ArcaWsaaSessionStore } from './types-Su7QwloQ.js';
3
3
  export { g as ArcaAuthCredentials, f as ArcaAuthOptions, A as ArcaClientConfig, k as ArcaLogLevel, l as ArcaLoggerConfig, m as ArcaPadronServiceName, n as ArcaRepresentedTaxId, b as ArcaServiceName, o as ArcaServiceTarget, e as ArcaWsaaServiceId, p as ArcaWsaaSessionKey } from './types-Su7QwloQ.js';
4
4
  export { ARCA_FINAL_CONSUMER_IDENTIFICATION_THRESHOLD_MINOR_UNITS, ARCA_INVOICE_CLASS_BY_ISSUER, ARCA_ISSUER_CONDITION_IDS, ARCA_RECEIVER_CONDITION_IDS, IssuerCondition, ReceiverCondition, VoucherClass } from './constants.js';
package/dist/index.mjs CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  resolveArcaEnvironment,
15
15
  storeCall,
16
16
  withLease
17
- } from "./chunk-6XQTT3GH.mjs";
17
+ } from "./chunk-5O2FESHA.mjs";
18
18
  import {
19
19
  ARCA_FINAL_CONSUMER_IDENTIFICATION_THRESHOLD_MINOR_UNITS,
20
20
  ARCA_INVOICE_CLASS_BY_ISSUER,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "facturas",
3
- "version": "0.15.0",
3
+ "version": "0.16.1",
4
4
  "description": "SDK de facturación electrónica con ARCA / AFIP para Node.js: facturas, notas de crédito y débito, y Padrón con una sola API.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",