facturas 0.12.4 → 0.13.0
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 +41 -35
- package/dist/{chunk-YYDSBHMO.mjs → chunk-BPBTQDCO.mjs} +16 -173
- package/dist/chunk-BPBTQDCO.mjs.map +1 -0
- package/dist/{chunk-7V5S3ISG.mjs → chunk-KPWAQMR5.mjs} +766 -190
- package/dist/chunk-KPWAQMR5.mjs.map +1 -0
- package/dist/{chunk-GX5ERXT6.mjs → chunk-LQMNKQ2V.mjs} +1 -1
- package/dist/chunk-LQMNKQ2V.mjs.map +1 -0
- package/dist/{chunk-3EJINDBP.mjs → chunk-WN62NMUJ.mjs} +13 -13
- package/dist/chunk-WN62NMUJ.mjs.map +1 -0
- package/dist/cli.d.ts +5 -5
- package/dist/cli.mjs +4 -4
- package/dist/{client-tzfxAy7w.d.ts → client-bblLZeUb.d.ts} +83 -46
- package/dist/constants.d.ts +1 -1
- package/dist/constants.mjs +1 -1
- package/dist/errors.d.ts +2 -2
- package/dist/{fiscal-evidence-DXl_U1uz.d.ts → fiscal-evidence-DaCyGd5o.d.ts} +2 -2
- package/dist/{index-CT1ffEAL.d.ts → index-DAC3edtw.d.ts} +1 -1
- package/dist/index.d.ts +6 -7
- package/dist/index.mjs +9 -15
- package/dist/index.mjs.map +1 -1
- package/dist/padron.d.ts +2 -2
- package/dist/{types-SdBQAflw.d.ts → types-Su7QwloQ.d.ts} +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/wsfe.d.ts +255 -31
- package/dist/wsfe.mjs +1 -8
- package/dist/wsmtxca.d.ts +6 -6
- package/dist/wsmtxca.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-3EJINDBP.mjs.map +0 -1
- package/dist/chunk-7V5S3ISG.mjs.map +0 -1
- package/dist/chunk-GX5ERXT6.mjs.map +0 -1
- package/dist/chunk-YYDSBHMO.mjs.map +0 -1
- package/dist/chunk-ZZDL6I56.mjs +0 -169
- package/dist/chunk-ZZDL6I56.mjs.map +0 -1
- package/dist/decimal-CgWMOiAC.d.ts +0 -272
|
@@ -1,272 +0,0 @@
|
|
|
1
|
-
import { a as ArcaClientConfig } from './types-SdBQAflw.js';
|
|
2
|
-
import { W as WsaaAuthModule, S as SoapTransport } from './index-CT1ffEAL.js';
|
|
3
|
-
import { A as ArcaAuthorizationOutcome, a as ArcaVoucherLookupResult } from './fiscal-evidence-DXl_U1uz.js';
|
|
4
|
-
|
|
5
|
-
/** Accepted public date inputs for WSFE request fields. */
|
|
6
|
-
type WsfeDateInput = `${number}${number}${number}${number}-${number}${number}-${number}${number}` | `${number}${number}${number}${number}${number}${number}${number}${number}`;
|
|
7
|
-
/** An associated voucher referenced by a WSFE invoice request. */
|
|
8
|
-
type WsfeAssociatedVoucher = {
|
|
9
|
-
type: number;
|
|
10
|
-
salesPoint: number;
|
|
11
|
-
number: number;
|
|
12
|
-
taxId?: string;
|
|
13
|
-
voucherDate?: WsfeDateInput;
|
|
14
|
-
};
|
|
15
|
-
/** An associated period used by WSFE credit/debit notes without associated vouchers. */
|
|
16
|
-
type WsfeAssociatedPeriod = {
|
|
17
|
-
startDate: WsfeDateInput;
|
|
18
|
-
endDate: WsfeDateInput;
|
|
19
|
-
};
|
|
20
|
-
/** A tax (tributo) item in a WSFE invoice request. */
|
|
21
|
-
type WsfeTax = {
|
|
22
|
-
id: number;
|
|
23
|
-
description?: string;
|
|
24
|
-
baseAmount: number;
|
|
25
|
-
rate: number;
|
|
26
|
-
amount: number;
|
|
27
|
-
};
|
|
28
|
-
/** A VAT rate (alícuota IVA) item in a WSFE invoice request. */
|
|
29
|
-
type WsfeVatRate = {
|
|
30
|
-
id: number;
|
|
31
|
-
baseAmount: number;
|
|
32
|
-
amount: number;
|
|
33
|
-
};
|
|
34
|
-
/** An optional field (campo opcional) in a WSFE invoice request. */
|
|
35
|
-
type WsfeOptionalField = {
|
|
36
|
-
id: string;
|
|
37
|
-
value: string;
|
|
38
|
-
};
|
|
39
|
-
/** A buyer (comprador) in a WSFE invoice request. */
|
|
40
|
-
type WsfeBuyer = {
|
|
41
|
-
documentType: number;
|
|
42
|
-
documentNumber: number;
|
|
43
|
-
percentage: number;
|
|
44
|
-
};
|
|
45
|
-
/** An activity associated with a WSFE invoice request. */
|
|
46
|
-
type WsfeActivity = {
|
|
47
|
-
id: number;
|
|
48
|
-
};
|
|
49
|
-
/** Input data for authorizing a WSFE voucher. */
|
|
50
|
-
type WsfeVoucherInput = {
|
|
51
|
-
salesPoint: number;
|
|
52
|
-
voucherType: number;
|
|
53
|
-
concept: number;
|
|
54
|
-
documentType: number;
|
|
55
|
-
documentNumber: number;
|
|
56
|
-
receiverVatConditionId: number;
|
|
57
|
-
voucherDate: WsfeDateInput;
|
|
58
|
-
totalAmount: number;
|
|
59
|
-
nonTaxableAmount: number;
|
|
60
|
-
netAmount: number;
|
|
61
|
-
exemptAmount: number;
|
|
62
|
-
taxAmount: number;
|
|
63
|
-
vatAmount: number;
|
|
64
|
-
currencyId: string;
|
|
65
|
-
exchangeRate?: number | string;
|
|
66
|
-
sameCurrencyForeignCancellation?: "S" | "N";
|
|
67
|
-
serviceStartDate?: WsfeDateInput;
|
|
68
|
-
serviceEndDate?: WsfeDateInput;
|
|
69
|
-
paymentDueDate?: WsfeDateInput;
|
|
70
|
-
associatedVouchers?: WsfeAssociatedVoucher[];
|
|
71
|
-
associatedPeriod?: WsfeAssociatedPeriod;
|
|
72
|
-
taxes?: WsfeTax[];
|
|
73
|
-
vatRates?: WsfeVatRate[];
|
|
74
|
-
optionalFields?: WsfeOptionalField[];
|
|
75
|
-
buyers?: WsfeBuyer[];
|
|
76
|
-
activities?: WsfeActivity[];
|
|
77
|
-
};
|
|
78
|
-
/** Input for authorizing a WSFE voucher with an explicit voucher number. */
|
|
79
|
-
type WsfeAuthorizeVoucherInput = {
|
|
80
|
-
representedTaxId?: number | string;
|
|
81
|
-
data: WsfeVoucherInput;
|
|
82
|
-
voucherNumber: number;
|
|
83
|
-
forceRefresh?: boolean;
|
|
84
|
-
/** Aborts login, submission and consultation with the caller's deadline. */
|
|
85
|
-
signal?: AbortSignal;
|
|
86
|
-
};
|
|
87
|
-
/** Structured evidence from one exact WSFE authorization attempt. */
|
|
88
|
-
type WsfeAuthorizationOutcome = ArcaAuthorizationOutcome<"wsfe">;
|
|
89
|
-
/** A point-of-sale entry returned by {@link WsfeService.getSalesPoints}. */
|
|
90
|
-
type WsfeSalesPoint = {
|
|
91
|
-
number: number;
|
|
92
|
-
emissionType?: string;
|
|
93
|
-
blocked?: string;
|
|
94
|
-
deletedSince?: string;
|
|
95
|
-
};
|
|
96
|
-
/** Voucher details returned by {@link WsfeService.getVoucherInfo}. */
|
|
97
|
-
type WsfeVoucherInfo = {
|
|
98
|
-
voucherNumber: number;
|
|
99
|
-
voucherDate?: string;
|
|
100
|
-
salesPoint?: number;
|
|
101
|
-
voucherType?: number;
|
|
102
|
-
concept?: number;
|
|
103
|
-
documentType?: number;
|
|
104
|
-
documentNumber?: string;
|
|
105
|
-
receiverVatConditionId?: number;
|
|
106
|
-
totalAmount?: number;
|
|
107
|
-
nonTaxableAmount?: number;
|
|
108
|
-
netAmount?: number;
|
|
109
|
-
exemptAmount?: number;
|
|
110
|
-
taxAmount?: number;
|
|
111
|
-
vatAmount?: number;
|
|
112
|
-
currencyId?: string;
|
|
113
|
-
exchangeRate?: number;
|
|
114
|
-
result?: string;
|
|
115
|
-
cae?: string;
|
|
116
|
-
caeExpiry?: string;
|
|
117
|
-
vatRates?: WsfeVatRate[];
|
|
118
|
-
serviceStartDate?: string;
|
|
119
|
-
serviceEndDate?: string;
|
|
120
|
-
paymentDueDate?: string;
|
|
121
|
-
taxes?: WsfeTax[];
|
|
122
|
-
associatedVouchers?: WsfeAssociatedVoucher[];
|
|
123
|
-
associatedPeriod?: WsfeAssociatedPeriod;
|
|
124
|
-
optionalFields?: WsfeOptionalField[];
|
|
125
|
-
buyers?: WsfeBuyer[];
|
|
126
|
-
activities?: WsfeActivity[];
|
|
127
|
-
sameCurrencyForeignCancellation?: "S" | "N";
|
|
128
|
-
raw: Record<string, unknown>;
|
|
129
|
-
};
|
|
130
|
-
/** Typed exact-voucher consultation result for WSFE. */
|
|
131
|
-
type WsfeVoucherLookupResult = ArcaVoucherLookupResult<WsfeVoucherInfo, "wsfe">;
|
|
132
|
-
type WsfeCatalogEntry = {
|
|
133
|
-
id: number;
|
|
134
|
-
description: string;
|
|
135
|
-
};
|
|
136
|
-
type WsfeActivityType = WsfeCatalogEntry & {
|
|
137
|
-
order: number;
|
|
138
|
-
};
|
|
139
|
-
type WsfeReceiverVatCondition = WsfeCatalogEntry & {
|
|
140
|
-
voucherClass: string;
|
|
141
|
-
};
|
|
142
|
-
type WsfeCurrencyType = {
|
|
143
|
-
id: string;
|
|
144
|
-
description: string;
|
|
145
|
-
validFrom: string;
|
|
146
|
-
validTo: string;
|
|
147
|
-
};
|
|
148
|
-
type WsfeServerStatus = {
|
|
149
|
-
appServer: string;
|
|
150
|
-
dbServer: string;
|
|
151
|
-
authServer: string;
|
|
152
|
-
};
|
|
153
|
-
type WsfeQuotation = {
|
|
154
|
-
currencyId: string;
|
|
155
|
-
rate: number;
|
|
156
|
-
date: string;
|
|
157
|
-
};
|
|
158
|
-
/** WSFE electronic invoicing service. */
|
|
159
|
-
type WsfeService = {
|
|
160
|
-
/**
|
|
161
|
-
* Issues one exact voucher: a single FECAESolicitar for the caller-owned
|
|
162
|
-
* `voucherNumber`, without transport retries, returning structured evidence
|
|
163
|
-
* (`authorized`, `rejected` or `indeterminate`) instead of throwing.
|
|
164
|
-
*/
|
|
165
|
-
issue(input: WsfeAuthorizeVoucherInput): Promise<WsfeAuthorizationOutcome>;
|
|
166
|
-
/** Returns the next available voucher number for the given sales point and type. */
|
|
167
|
-
getNextVoucherNumber(input: {
|
|
168
|
-
representedTaxId?: number | string;
|
|
169
|
-
salesPoint: number;
|
|
170
|
-
voucherType: number;
|
|
171
|
-
forceRefresh?: boolean;
|
|
172
|
-
signal?: AbortSignal;
|
|
173
|
-
}): Promise<number>;
|
|
174
|
-
/**
|
|
175
|
-
* @deprecated Use `getNextVoucherNumber()` instead.
|
|
176
|
-
* Returns the next available voucher number, not the last authorized one.
|
|
177
|
-
*/
|
|
178
|
-
getLastVoucher(input: {
|
|
179
|
-
representedTaxId?: number | string;
|
|
180
|
-
salesPoint: number;
|
|
181
|
-
voucherType: number;
|
|
182
|
-
forceRefresh?: boolean;
|
|
183
|
-
}): Promise<number>;
|
|
184
|
-
/** Lists all configured points of sale for the taxpayer. */
|
|
185
|
-
getSalesPoints(input: {
|
|
186
|
-
representedTaxId?: number | string;
|
|
187
|
-
forceRefresh?: boolean;
|
|
188
|
-
}): Promise<WsfeSalesPoint[]>;
|
|
189
|
-
/** Lists voucher types accepted by WSFE. */
|
|
190
|
-
getVoucherTypes(input: {
|
|
191
|
-
representedTaxId?: number | string;
|
|
192
|
-
forceRefresh?: boolean;
|
|
193
|
-
}): Promise<WsfeCatalogEntry[]>;
|
|
194
|
-
/** Lists document types accepted by WSFE. */
|
|
195
|
-
getDocumentTypes(input: {
|
|
196
|
-
representedTaxId?: number | string;
|
|
197
|
-
forceRefresh?: boolean;
|
|
198
|
-
}): Promise<WsfeCatalogEntry[]>;
|
|
199
|
-
/** Lists concept types accepted by WSFE. */
|
|
200
|
-
getConceptTypes(input: {
|
|
201
|
-
representedTaxId?: number | string;
|
|
202
|
-
forceRefresh?: boolean;
|
|
203
|
-
}): Promise<WsfeCatalogEntry[]>;
|
|
204
|
-
/** Lists live ARCA currency identifiers such as PES and DOL, not ISO codes. */
|
|
205
|
-
getCurrencyTypes(input: {
|
|
206
|
-
representedTaxId?: number | string;
|
|
207
|
-
forceRefresh?: boolean;
|
|
208
|
-
}): Promise<WsfeCurrencyType[]>;
|
|
209
|
-
/** Lists VAT rates accepted by WSFE. */
|
|
210
|
-
getVatRates(input: {
|
|
211
|
-
representedTaxId?: number | string;
|
|
212
|
-
forceRefresh?: boolean;
|
|
213
|
-
}): Promise<WsfeCatalogEntry[]>;
|
|
214
|
-
/** Lists tax types accepted by WSFE. */
|
|
215
|
-
getTaxTypes(input: {
|
|
216
|
-
representedTaxId?: number | string;
|
|
217
|
-
forceRefresh?: boolean;
|
|
218
|
-
}): Promise<WsfeCatalogEntry[]>;
|
|
219
|
-
/** Lists optional field types accepted by WSFE. */
|
|
220
|
-
getOptionalTypes(input: {
|
|
221
|
-
representedTaxId?: number | string;
|
|
222
|
-
forceRefresh?: boolean;
|
|
223
|
-
}): Promise<WsfeCatalogEntry[]>;
|
|
224
|
-
/** Lists activities enabled for the taxpayer. */
|
|
225
|
-
getActivities(input: {
|
|
226
|
-
representedTaxId?: number | string;
|
|
227
|
-
forceRefresh?: boolean;
|
|
228
|
-
}): Promise<WsfeActivityType[]>;
|
|
229
|
-
/** Lists receiver VAT condition values accepted by WSFE. */
|
|
230
|
-
getReceiverVatConditions(input: {
|
|
231
|
-
representedTaxId?: number | string;
|
|
232
|
-
voucherClass?: string;
|
|
233
|
-
forceRefresh?: boolean;
|
|
234
|
-
}): Promise<WsfeReceiverVatCondition[]>;
|
|
235
|
-
/** Reports WSFE backend status without requiring taxpayer authorization. */
|
|
236
|
-
getServerStatus(): Promise<WsfeServerStatus>;
|
|
237
|
-
/** Returns the exchange rate for a given currency. */
|
|
238
|
-
getQuotation(input: {
|
|
239
|
-
currencyId: string;
|
|
240
|
-
representedTaxId?: number | string;
|
|
241
|
-
forceRefresh?: boolean;
|
|
242
|
-
}): Promise<WsfeQuotation>;
|
|
243
|
-
/** Retrieves details for a specific voucher. Returns `null` if not found. */
|
|
244
|
-
getVoucherInfo(input: {
|
|
245
|
-
representedTaxId?: number | string;
|
|
246
|
-
number: number;
|
|
247
|
-
salesPoint: number;
|
|
248
|
-
voucherType: number;
|
|
249
|
-
forceRefresh?: boolean;
|
|
250
|
-
}): Promise<WsfeVoucherInfo | null>;
|
|
251
|
-
/** Consults one exact voucher and normalizes WSFE error 602 to `not_found`. */
|
|
252
|
-
lookupVoucher(input: {
|
|
253
|
-
representedTaxId?: number | string;
|
|
254
|
-
number: number;
|
|
255
|
-
salesPoint: number;
|
|
256
|
-
voucherType: number;
|
|
257
|
-
forceRefresh?: boolean;
|
|
258
|
-
signal?: AbortSignal;
|
|
259
|
-
}): Promise<WsfeVoucherLookupResult>;
|
|
260
|
-
};
|
|
261
|
-
type CreateWsfeServiceOptions = {
|
|
262
|
-
config: ArcaClientConfig;
|
|
263
|
-
auth: WsaaAuthModule;
|
|
264
|
-
soap: SoapTransport;
|
|
265
|
-
};
|
|
266
|
-
/** Creates a WSFE service instance wired with authentication and SOAP transport. */
|
|
267
|
-
declare function createWsfeService(options: CreateWsfeServiceOptions): WsfeService;
|
|
268
|
-
|
|
269
|
-
declare const SUPPORTED_VAT_RATES: readonly [0, 2.5, 5, 10.5, 21, 27];
|
|
270
|
-
type SupportedVatRate = (typeof SUPPORTED_VAT_RATES)[number];
|
|
271
|
-
|
|
272
|
-
export { type CreateWsfeServiceOptions as C, type SupportedVatRate as S, type WsfeActivity as W, type WsfeActivityType as a, type WsfeAssociatedPeriod as b, type WsfeAssociatedVoucher as c, type WsfeAuthorizationOutcome as d, type WsfeAuthorizeVoucherInput as e, type WsfeBuyer as f, type WsfeCatalogEntry as g, type WsfeCurrencyType as h, type WsfeDateInput as i, type WsfeOptionalField as j, type WsfeQuotation as k, type WsfeReceiverVatCondition as l, type WsfeSalesPoint as m, type WsfeServerStatus as n, type WsfeService as o, type WsfeTax as p, type WsfeVatRate as q, type WsfeVoucherInfo as r, type WsfeVoucherInput as s, type WsfeVoucherLookupResult as t, createWsfeService as u };
|