@ramiidv/arca-fecred 0.1.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/LICENSE +21 -0
- package/README.md +351 -0
- package/dist/arca-fecred.d.ts +129 -0
- package/dist/arca-fecred.d.ts.map +1 -0
- package/dist/arca-fecred.js +365 -0
- package/dist/arca-fecred.js.map +1 -0
- package/dist/constants.d.ts +83 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +108 -0
- package/dist/constants.js.map +1 -0
- package/dist/fecred-client.d.ts +100 -0
- package/dist/fecred-client.d.ts.map +1 -0
- package/dist/fecred-client.js +194 -0
- package/dist/fecred-client.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +208 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/validation.d.ts +26 -0
- package/dist/validation.d.ts.map +1 -0
- package/dist/validation.js +161 -0
- package/dist/validation.js.map +1 -0
- package/llms.txt +173 -0
- package/package.json +65 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import type { ArcaEvent, SoapCallOptions, ServerStatus } from '@ramiidv/arca-common';
|
|
2
|
+
import type { WsAuth } from './types.js';
|
|
3
|
+
export interface FecredClientConfig {
|
|
4
|
+
/** SOAP endpoint URL */
|
|
5
|
+
endpoint: string;
|
|
6
|
+
/** SOAP namespace */
|
|
7
|
+
namespace: string;
|
|
8
|
+
/** SOAP call options (retries, timeout) */
|
|
9
|
+
soapOptions?: Pick<SoapCallOptions, 'timeout' | 'retries' | 'retryDelayMs'>;
|
|
10
|
+
/** Optional event callback */
|
|
11
|
+
onEvent?: (event: ArcaEvent) => void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Low-level client for the WSFECRED web service.
|
|
15
|
+
* Wraps each SOAP method using afipSoapCall from arca-common.
|
|
16
|
+
*/
|
|
17
|
+
export declare class FecredClient {
|
|
18
|
+
protected readonly endpoint: string;
|
|
19
|
+
protected readonly namespace: string;
|
|
20
|
+
protected readonly soapOptions?: Pick<SoapCallOptions, 'timeout' | 'retries' | 'retryDelayMs'>;
|
|
21
|
+
protected readonly onEvent?: (event: ArcaEvent) => void;
|
|
22
|
+
constructor(config: FecredClientConfig);
|
|
23
|
+
private call;
|
|
24
|
+
/** Health check - verifica el estado de los servidores WSFECRED. */
|
|
25
|
+
dummy(): Promise<ServerStatus>;
|
|
26
|
+
/**
|
|
27
|
+
* Consulta si una CUIT esta obligada a recibir FCE.
|
|
28
|
+
* @param auth - Credenciales de autenticacion
|
|
29
|
+
* @param cuitConsultada - CUIT a consultar
|
|
30
|
+
*/
|
|
31
|
+
consultarMontoObligadoRecepcion(auth: WsAuth, cuitConsultada: string): Promise<Record<string, unknown>>;
|
|
32
|
+
/**
|
|
33
|
+
* Consulta cuentas corrientes de actividad FCE.
|
|
34
|
+
* @param auth - Credenciales de autenticacion
|
|
35
|
+
* @param params - Filtros de consulta (rol, CUITs, fechas)
|
|
36
|
+
*/
|
|
37
|
+
consultarCtasCtes(auth: WsAuth, params: {
|
|
38
|
+
rol: string;
|
|
39
|
+
cuitEmisor?: string;
|
|
40
|
+
cuitReceptor?: string;
|
|
41
|
+
fechaDesde: string;
|
|
42
|
+
fechaHasta: string;
|
|
43
|
+
}): Promise<Record<string, unknown>>;
|
|
44
|
+
/**
|
|
45
|
+
* Consulta comprobantes FCE por filtros.
|
|
46
|
+
* @param auth - Credenciales de autenticacion
|
|
47
|
+
* @param params - Filtros de consulta
|
|
48
|
+
*/
|
|
49
|
+
consultarComprobantes(auth: WsAuth, params: {
|
|
50
|
+
cuitEmisor?: string;
|
|
51
|
+
cuitReceptor?: string;
|
|
52
|
+
codCtaCte?: number;
|
|
53
|
+
fechaDesde?: string;
|
|
54
|
+
fechaHasta?: string;
|
|
55
|
+
}): Promise<Record<string, unknown>>;
|
|
56
|
+
/**
|
|
57
|
+
* Acepta una FCE.
|
|
58
|
+
* @param auth - Credenciales de autenticacion
|
|
59
|
+
* @param codCtaCte - Codigo de cuenta corriente de la FCE a aceptar
|
|
60
|
+
*/
|
|
61
|
+
aceptarFECred(auth: WsAuth, codCtaCte: number): Promise<Record<string, unknown>>;
|
|
62
|
+
/**
|
|
63
|
+
* Rechaza una FCE.
|
|
64
|
+
* @param auth - Credenciales de autenticacion
|
|
65
|
+
* @param codCtaCte - Codigo de cuenta corriente de la FCE a rechazar
|
|
66
|
+
* @param codMotivoRechazo - Codigo del motivo de rechazo
|
|
67
|
+
*/
|
|
68
|
+
rechazarFECred(auth: WsAuth, codCtaCte: number, codMotivoRechazo: number): Promise<Record<string, unknown>>;
|
|
69
|
+
/**
|
|
70
|
+
* Informa que una FCE aceptada fue pagada/cancelada.
|
|
71
|
+
* @param auth - Credenciales de autenticacion
|
|
72
|
+
* @param params - Datos de la cancelacion
|
|
73
|
+
*/
|
|
74
|
+
informarFacturaAceptadaCancelada(auth: WsAuth, params: {
|
|
75
|
+
codCtaCte: number;
|
|
76
|
+
codFormaCancelacion: number;
|
|
77
|
+
observaciones?: string;
|
|
78
|
+
}): Promise<Record<string, unknown>>;
|
|
79
|
+
/**
|
|
80
|
+
* Consulta los tipos de retenciones disponibles.
|
|
81
|
+
* @param auth - Credenciales de autenticacion
|
|
82
|
+
*/
|
|
83
|
+
consultarTiposRetenciones(auth: WsAuth): Promise<Record<string, unknown>>;
|
|
84
|
+
/**
|
|
85
|
+
* Consulta las formas de cancelacion disponibles.
|
|
86
|
+
* @param auth - Credenciales de autenticacion
|
|
87
|
+
*/
|
|
88
|
+
consultarTiposFormasCancelacion(auth: WsAuth): Promise<Record<string, unknown>>;
|
|
89
|
+
/**
|
|
90
|
+
* Consulta los tipos de ajustes de operacion disponibles.
|
|
91
|
+
* @param auth - Credenciales de autenticacion
|
|
92
|
+
*/
|
|
93
|
+
consultarTiposAjustesOperacion(auth: WsAuth): Promise<Record<string, unknown>>;
|
|
94
|
+
/**
|
|
95
|
+
* Consulta los tipos de motivos de rechazo disponibles.
|
|
96
|
+
* @param auth - Credenciales de autenticacion
|
|
97
|
+
*/
|
|
98
|
+
consultarTiposMotivoRechazo(auth: WsAuth): Promise<Record<string, unknown>>;
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=fecred-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fecred-client.d.ts","sourceRoot":"","sources":["../src/fecred-client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACrF,OAAO,KAAK,EACV,MAAM,EACP,MAAM,YAAY,CAAC;AAMpB,MAAM,WAAW,kBAAkB;IACjC,wBAAwB;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,qBAAqB;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,2CAA2C;IAC3C,WAAW,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,SAAS,GAAG,SAAS,GAAG,cAAc,CAAC,CAAC;IAC5E,8BAA8B;IAC9B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;CACtC;AAMD;;;GAGG;AACH,qBAAa,YAAY;IACvB,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IACpC,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IACrC,SAAS,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,SAAS,GAAG,SAAS,GAAG,cAAc,CAAC,CAAC;IAC/F,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;gBAE5C,MAAM,EAAE,kBAAkB;IAWtC,OAAO,CAAC,IAAI;IAcZ,oEAAoE;IAC9D,KAAK,IAAI,OAA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M,CAAC;KACxB,GACA,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAmBnC;;;OAGG;IACG,yBAAyB,CAC7B,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAQnC;;;OAGG;IACG,+BAA+B,CACnC,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAQnC;;;OAGG;IACG,8BAA8B,CAClC,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAQnC;;;OAGG;IACG,2BAA2B,CAC/B,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAOpC"}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { afipSoapCall, checkServiceErrors } from '@ramiidv/arca-common';
|
|
2
|
+
// ---------------------------------------------------------------------------
|
|
3
|
+
// FecredClient
|
|
4
|
+
// ---------------------------------------------------------------------------
|
|
5
|
+
/**
|
|
6
|
+
* Low-level client for the WSFECRED web service.
|
|
7
|
+
* Wraps each SOAP method using afipSoapCall from arca-common.
|
|
8
|
+
*/
|
|
9
|
+
export class FecredClient {
|
|
10
|
+
endpoint;
|
|
11
|
+
namespace;
|
|
12
|
+
soapOptions;
|
|
13
|
+
onEvent;
|
|
14
|
+
constructor(config) {
|
|
15
|
+
this.endpoint = config.endpoint;
|
|
16
|
+
this.namespace = config.namespace;
|
|
17
|
+
this.soapOptions = config.soapOptions;
|
|
18
|
+
this.onEvent = config.onEvent;
|
|
19
|
+
}
|
|
20
|
+
// -------------------------------------------------------------------------
|
|
21
|
+
// Private helper
|
|
22
|
+
// -------------------------------------------------------------------------
|
|
23
|
+
call(method, params) {
|
|
24
|
+
return afipSoapCall(this.endpoint, this.namespace, method, params, { ...this.soapOptions, onEvent: this.onEvent });
|
|
25
|
+
}
|
|
26
|
+
// -------------------------------------------------------------------------
|
|
27
|
+
// Health check
|
|
28
|
+
// -------------------------------------------------------------------------
|
|
29
|
+
/** Health check - verifica el estado de los servidores WSFECRED. */
|
|
30
|
+
async dummy() {
|
|
31
|
+
const result = await this.call('dummy', {});
|
|
32
|
+
return {
|
|
33
|
+
appserver: (result['appserver'] ?? result['AppServer'] ?? ''),
|
|
34
|
+
dbserver: (result['dbserver'] ?? result['DbServer'] ?? ''),
|
|
35
|
+
authserver: (result['authserver'] ?? result['AuthServer'] ?? ''),
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
// -------------------------------------------------------------------------
|
|
39
|
+
// Consultas de operaciones
|
|
40
|
+
// -------------------------------------------------------------------------
|
|
41
|
+
/**
|
|
42
|
+
* Consulta si una CUIT esta obligada a recibir FCE.
|
|
43
|
+
* @param auth - Credenciales de autenticacion
|
|
44
|
+
* @param cuitConsultada - CUIT a consultar
|
|
45
|
+
*/
|
|
46
|
+
async consultarMontoObligadoRecepcion(auth, cuitConsultada) {
|
|
47
|
+
const result = await this.call('consultarMontoObligadoRecepcion', {
|
|
48
|
+
authRequest: auth,
|
|
49
|
+
cuitConsultada: cuitConsultada,
|
|
50
|
+
});
|
|
51
|
+
checkServiceErrors(result, 'WSFECRED');
|
|
52
|
+
return result;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Consulta cuentas corrientes de actividad FCE.
|
|
56
|
+
* @param auth - Credenciales de autenticacion
|
|
57
|
+
* @param params - Filtros de consulta (rol, CUITs, fechas)
|
|
58
|
+
*/
|
|
59
|
+
async consultarCtasCtes(auth, params) {
|
|
60
|
+
const requestParams = {
|
|
61
|
+
authRequest: auth,
|
|
62
|
+
rol: params.rol,
|
|
63
|
+
fechaDesde: params.fechaDesde,
|
|
64
|
+
fechaHasta: params.fechaHasta,
|
|
65
|
+
};
|
|
66
|
+
if (params.cuitEmisor)
|
|
67
|
+
requestParams['CUITEmisor'] = params.cuitEmisor;
|
|
68
|
+
if (params.cuitReceptor)
|
|
69
|
+
requestParams['CUITReceptor'] = params.cuitReceptor;
|
|
70
|
+
const result = await this.call('consultarCtasCtes', requestParams);
|
|
71
|
+
checkServiceErrors(result, 'WSFECRED');
|
|
72
|
+
return result;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Consulta comprobantes FCE por filtros.
|
|
76
|
+
* @param auth - Credenciales de autenticacion
|
|
77
|
+
* @param params - Filtros de consulta
|
|
78
|
+
*/
|
|
79
|
+
async consultarComprobantes(auth, params) {
|
|
80
|
+
const requestParams = {
|
|
81
|
+
authRequest: auth,
|
|
82
|
+
};
|
|
83
|
+
if (params.cuitEmisor)
|
|
84
|
+
requestParams['CUITEmisor'] = params.cuitEmisor;
|
|
85
|
+
if (params.cuitReceptor)
|
|
86
|
+
requestParams['CUITReceptor'] = params.cuitReceptor;
|
|
87
|
+
if (params.codCtaCte !== undefined)
|
|
88
|
+
requestParams['CodCtaCte'] = params.codCtaCte;
|
|
89
|
+
if (params.fechaDesde)
|
|
90
|
+
requestParams['fechaDesde'] = params.fechaDesde;
|
|
91
|
+
if (params.fechaHasta)
|
|
92
|
+
requestParams['fechaHasta'] = params.fechaHasta;
|
|
93
|
+
const result = await this.call('consultarComprobantes', requestParams);
|
|
94
|
+
checkServiceErrors(result, 'WSFECRED');
|
|
95
|
+
return result;
|
|
96
|
+
}
|
|
97
|
+
// -------------------------------------------------------------------------
|
|
98
|
+
// Acciones sobre FCE
|
|
99
|
+
// -------------------------------------------------------------------------
|
|
100
|
+
/**
|
|
101
|
+
* Acepta una FCE.
|
|
102
|
+
* @param auth - Credenciales de autenticacion
|
|
103
|
+
* @param codCtaCte - Codigo de cuenta corriente de la FCE a aceptar
|
|
104
|
+
*/
|
|
105
|
+
async aceptarFECred(auth, codCtaCte) {
|
|
106
|
+
const result = await this.call('aceptarFECred', {
|
|
107
|
+
authRequest: auth,
|
|
108
|
+
CodCtaCte: codCtaCte,
|
|
109
|
+
});
|
|
110
|
+
checkServiceErrors(result, 'WSFECRED');
|
|
111
|
+
return result;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Rechaza una FCE.
|
|
115
|
+
* @param auth - Credenciales de autenticacion
|
|
116
|
+
* @param codCtaCte - Codigo de cuenta corriente de la FCE a rechazar
|
|
117
|
+
* @param codMotivoRechazo - Codigo del motivo de rechazo
|
|
118
|
+
*/
|
|
119
|
+
async rechazarFECred(auth, codCtaCte, codMotivoRechazo) {
|
|
120
|
+
const result = await this.call('rechazarFECred', {
|
|
121
|
+
authRequest: auth,
|
|
122
|
+
CodCtaCte: codCtaCte,
|
|
123
|
+
CodMotivoRechazo: codMotivoRechazo,
|
|
124
|
+
});
|
|
125
|
+
checkServiceErrors(result, 'WSFECRED');
|
|
126
|
+
return result;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Informa que una FCE aceptada fue pagada/cancelada.
|
|
130
|
+
* @param auth - Credenciales de autenticacion
|
|
131
|
+
* @param params - Datos de la cancelacion
|
|
132
|
+
*/
|
|
133
|
+
async informarFacturaAceptadaCancelada(auth, params) {
|
|
134
|
+
const requestParams = {
|
|
135
|
+
authRequest: auth,
|
|
136
|
+
CodCtaCte: params.codCtaCte,
|
|
137
|
+
CodFormaCancelacion: params.codFormaCancelacion,
|
|
138
|
+
};
|
|
139
|
+
if (params.observaciones) {
|
|
140
|
+
requestParams['observaciones'] = params.observaciones;
|
|
141
|
+
}
|
|
142
|
+
const result = await this.call('informarFacturaAceptadaCancelada', requestParams);
|
|
143
|
+
checkServiceErrors(result, 'WSFECRED');
|
|
144
|
+
return result;
|
|
145
|
+
}
|
|
146
|
+
// -------------------------------------------------------------------------
|
|
147
|
+
// Consultas de parametros
|
|
148
|
+
// -------------------------------------------------------------------------
|
|
149
|
+
/**
|
|
150
|
+
* Consulta los tipos de retenciones disponibles.
|
|
151
|
+
* @param auth - Credenciales de autenticacion
|
|
152
|
+
*/
|
|
153
|
+
async consultarTiposRetenciones(auth) {
|
|
154
|
+
const result = await this.call('consultarTiposRetenciones', {
|
|
155
|
+
authRequest: auth,
|
|
156
|
+
});
|
|
157
|
+
checkServiceErrors(result, 'WSFECRED');
|
|
158
|
+
return result;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Consulta las formas de cancelacion disponibles.
|
|
162
|
+
* @param auth - Credenciales de autenticacion
|
|
163
|
+
*/
|
|
164
|
+
async consultarTiposFormasCancelacion(auth) {
|
|
165
|
+
const result = await this.call('consultarTiposFormasCancelacion', {
|
|
166
|
+
authRequest: auth,
|
|
167
|
+
});
|
|
168
|
+
checkServiceErrors(result, 'WSFECRED');
|
|
169
|
+
return result;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Consulta los tipos de ajustes de operacion disponibles.
|
|
173
|
+
* @param auth - Credenciales de autenticacion
|
|
174
|
+
*/
|
|
175
|
+
async consultarTiposAjustesOperacion(auth) {
|
|
176
|
+
const result = await this.call('consultarTiposAjustesOperacion', {
|
|
177
|
+
authRequest: auth,
|
|
178
|
+
});
|
|
179
|
+
checkServiceErrors(result, 'WSFECRED');
|
|
180
|
+
return result;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Consulta los tipos de motivos de rechazo disponibles.
|
|
184
|
+
* @param auth - Credenciales de autenticacion
|
|
185
|
+
*/
|
|
186
|
+
async consultarTiposMotivoRechazo(auth) {
|
|
187
|
+
const result = await this.call('consultarTiposMotivoRechazo', {
|
|
188
|
+
authRequest: auth,
|
|
189
|
+
});
|
|
190
|
+
checkServiceErrors(result, 'WSFECRED');
|
|
191
|
+
return result;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
//# sourceMappingURL=fecred-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fecred-client.js","sourceRoot":"","sources":["../src/fecred-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,sBA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AA6B,EAAE;YAC5D,WAAW,EAAE,IAAI;SAClB,CAAC,CAAC;QACH,kBAAkB,CAAC,MAAiC,EAAE,UAAU,CAAC,CAAC;QAClE,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { ArcaFecred } from './arca-fecred.js';
|
|
2
|
+
export { FecredClient } from './fecred-client.js';
|
|
3
|
+
export type { FecredClientConfig } from './fecred-client.js';
|
|
4
|
+
export { ArcaError, ArcaAuthError, ArcaSoapError, ArcaServiceError, } from '@ramiidv/arca-common';
|
|
5
|
+
export { WsaaClient } from '@ramiidv/arca-common';
|
|
6
|
+
export type { WsaaClientConfig } from '@ramiidv/arca-common';
|
|
7
|
+
export type { ArcaFecredConfig, WsAuth, AccessTicket, ArcaEvent, ServerStatus, SoapCallOptions, MontoObligadoResult, CtaCte, ComprobanteFecred, ConsultarCtasCtesParams, ConsultarComprobantesParams, AceptarFecredResult, RechazarFecredResult, InformarCanceladaParams, InformarCanceladaResult, RetencionFecred, TipoRetencionItem, TipoFormaCancelacionItem, TipoAjusteOperacionItem, TipoMotivoRechazoItem, WsFecredError, } from './types.js';
|
|
8
|
+
export { ENDPOINTS, RolCtaCte, EstadoCtaCte, MotivoRechazo, FormaCancelacion, TipoAjusteOperacion, TipoRetencion, } from './constants.js';
|
|
9
|
+
export { validateCuit, validateCodCtaCte, validateConsultaCtasCtes, } from './validation.js';
|
|
10
|
+
export { ArcaValidationError } from '@ramiidv/arca-common';
|
|
11
|
+
export type { ValidationErrorDetail } from '@ramiidv/arca-common';
|
|
12
|
+
export { ensureArray, parseXml, buildXml, checkServiceErrors, } from '@ramiidv/arca-common';
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG9C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAG7D,OAAO,EACL,SAAS,EACT,aAAa,EACb,aAAa,EACb,gBAAgB,GACjB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,YAAY,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAG7D,YAAY,EACV,gBAAgB,EAChB,MAAM,EACN,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,MAAM,EACN,iBAAiB,EACjB,uBAAuB,EACvB,2BAA2B,EAC3B,mBAAmB,EACnB,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,eAAe,EACf,iBAAiB,EACjB,wBAAwB,EACxB,uBAAuB,EACvB,qBAAqB,EACrB,aAAa,GACd,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,SAAS,EACT,SAAS,EACT,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,GACd,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,wBAAwB,GACzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,YAAY,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAGlE,OAAO,EACL,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,kBAAkB,GACnB,MAAM,sBAAsB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Main class
|
|
2
|
+
export { ArcaFecred } from './arca-fecred.js';
|
|
3
|
+
// Low-level client
|
|
4
|
+
export { FecredClient } from './fecred-client.js';
|
|
5
|
+
// Error classes (from common)
|
|
6
|
+
export { ArcaError, ArcaAuthError, ArcaSoapError, ArcaServiceError, } from '@ramiidv/arca-common';
|
|
7
|
+
// WSAA client (from common)
|
|
8
|
+
export { WsaaClient } from '@ramiidv/arca-common';
|
|
9
|
+
// Constants and enums
|
|
10
|
+
export { ENDPOINTS, RolCtaCte, EstadoCtaCte, MotivoRechazo, FormaCancelacion, TipoAjusteOperacion, TipoRetencion, } from './constants.js';
|
|
11
|
+
// Validation
|
|
12
|
+
export { validateCuit, validateCodCtaCte, validateConsultaCtasCtes, } from './validation.js';
|
|
13
|
+
export { ArcaValidationError } from '@ramiidv/arca-common';
|
|
14
|
+
// Utilities (from common)
|
|
15
|
+
export { ensureArray, parseXml, buildXml, checkServiceErrors, } from '@ramiidv/arca-common';
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,mBAAmB;AACnB,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlD,8BAA8B;AAC9B,OAAO,EACL,SAAS,EACT,aAAa,EACb,aAAa,EACb,gBAAgB,GACjB,MAAM,sBAAsB,CAAC;AAE9B,4BAA4B;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AA4BlD,sBAAsB;AACtB,OAAO,EACL,SAAS,EACT,SAAS,EACT,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,GACd,MAAM,gBAAgB,CAAC;AAExB,aAAa;AACb,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,wBAAwB,GACzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAG3D,0BAA0B;AAC1B,OAAO,EACL,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,kBAAkB,GACnB,MAAM,sBAAsB,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
export type { AccessTicket, ArcaEvent, ServerStatus, SoapCallOptions } from '@ramiidv/arca-common';
|
|
2
|
+
import type { ArcaEvent } from '@ramiidv/arca-common';
|
|
3
|
+
export interface ArcaFecredConfig {
|
|
4
|
+
/** PEM-encoded X.509 certificate */
|
|
5
|
+
cert: string;
|
|
6
|
+
/** PEM-encoded RSA private key */
|
|
7
|
+
key: string;
|
|
8
|
+
/** CUIT of the entity represented (e.g. "20123456789") */
|
|
9
|
+
cuit: string;
|
|
10
|
+
/** Use production endpoints (default: false = testing / homologacion) */
|
|
11
|
+
production?: boolean;
|
|
12
|
+
/** Request timeout in ms (default: 30000) */
|
|
13
|
+
timeout?: number;
|
|
14
|
+
/** Number of retries on 5xx / network errors (default: 1) */
|
|
15
|
+
retries?: number;
|
|
16
|
+
/** Base delay in ms for exponential backoff (default: 1000) */
|
|
17
|
+
retryDelayMs?: number;
|
|
18
|
+
/** Optional event callback */
|
|
19
|
+
onEvent?: (event: ArcaEvent) => void;
|
|
20
|
+
}
|
|
21
|
+
export interface WsAuth {
|
|
22
|
+
Token: string;
|
|
23
|
+
Sign: string;
|
|
24
|
+
Cuit: string;
|
|
25
|
+
}
|
|
26
|
+
export interface MontoObligadoResult {
|
|
27
|
+
/** CUIT consultada */
|
|
28
|
+
cuitConsultada: string;
|
|
29
|
+
/** Si la CUIT esta obligada a recibir FCE */
|
|
30
|
+
obligado: boolean;
|
|
31
|
+
/** Monto desde el cual esta obligada (si aplica) */
|
|
32
|
+
montoDesde?: number;
|
|
33
|
+
/** Respuesta cruda del WS */
|
|
34
|
+
raw: Record<string, unknown>;
|
|
35
|
+
}
|
|
36
|
+
export interface CtaCte {
|
|
37
|
+
/** Codigo de cuenta corriente */
|
|
38
|
+
codCtaCte: number;
|
|
39
|
+
/** CUIT del emisor */
|
|
40
|
+
cuitEmisor: string;
|
|
41
|
+
/** Denominacion del emisor */
|
|
42
|
+
denominacionEmisor?: string;
|
|
43
|
+
/** CUIT del receptor */
|
|
44
|
+
cuitReceptor: string;
|
|
45
|
+
/** Denominacion del receptor */
|
|
46
|
+
denominacionReceptor?: string;
|
|
47
|
+
/** Tipo de comprobante */
|
|
48
|
+
tipoComprobante?: number;
|
|
49
|
+
/** Punto de venta */
|
|
50
|
+
puntoVenta?: number;
|
|
51
|
+
/** Numero de comprobante */
|
|
52
|
+
nroComprobante?: number;
|
|
53
|
+
/** Codigo de moneda */
|
|
54
|
+
codMoneda?: string;
|
|
55
|
+
/** Importe total */
|
|
56
|
+
importeTotal?: number;
|
|
57
|
+
/** Saldo actual */
|
|
58
|
+
saldo?: number;
|
|
59
|
+
/** Estado de la cuenta corriente */
|
|
60
|
+
estado?: string;
|
|
61
|
+
/** Fecha de emision */
|
|
62
|
+
fechaEmision?: string;
|
|
63
|
+
/** Fecha de vencimiento del pago */
|
|
64
|
+
fechaVencimientoPago?: string;
|
|
65
|
+
/** Fecha de vencimiento de aceptacion */
|
|
66
|
+
fechaVencimientoAceptacion?: string;
|
|
67
|
+
/** CAE del comprobante */
|
|
68
|
+
cae?: string;
|
|
69
|
+
/** Respuesta cruda */
|
|
70
|
+
raw?: Record<string, unknown>;
|
|
71
|
+
}
|
|
72
|
+
/** Parametros para consultar cuentas corrientes */
|
|
73
|
+
export interface ConsultarCtasCtesParams {
|
|
74
|
+
/** Rol: "Emisor" o "Receptor" */
|
|
75
|
+
rol: string;
|
|
76
|
+
/** CUIT del emisor (requerido si rol = "Receptor") */
|
|
77
|
+
cuitEmisor?: string;
|
|
78
|
+
/** CUIT del receptor (requerido si rol = "Emisor") */
|
|
79
|
+
cuitReceptor?: string;
|
|
80
|
+
/** Fecha desde (formato YYYY-MM-DD) */
|
|
81
|
+
fechaDesde: string;
|
|
82
|
+
/** Fecha hasta (formato YYYY-MM-DD) */
|
|
83
|
+
fechaHasta: string;
|
|
84
|
+
}
|
|
85
|
+
export interface ComprobanteFecred {
|
|
86
|
+
/** Codigo de cuenta corriente */
|
|
87
|
+
codCtaCte: number;
|
|
88
|
+
/** Tipo de comprobante */
|
|
89
|
+
tipoComprobante?: number;
|
|
90
|
+
/** Punto de venta */
|
|
91
|
+
puntoVenta?: number;
|
|
92
|
+
/** Numero de comprobante */
|
|
93
|
+
nroComprobante?: number;
|
|
94
|
+
/** CUIT del emisor */
|
|
95
|
+
cuitEmisor: string;
|
|
96
|
+
/** Denominacion del emisor */
|
|
97
|
+
denominacionEmisor?: string;
|
|
98
|
+
/** CUIT del receptor */
|
|
99
|
+
cuitReceptor: string;
|
|
100
|
+
/** Denominacion del receptor */
|
|
101
|
+
denominacionReceptor?: string;
|
|
102
|
+
/** Codigo de moneda */
|
|
103
|
+
codMoneda?: string;
|
|
104
|
+
/** Importe total */
|
|
105
|
+
importeTotal?: number;
|
|
106
|
+
/** Importe neto */
|
|
107
|
+
importeNeto?: number;
|
|
108
|
+
/** Saldo */
|
|
109
|
+
saldo?: number;
|
|
110
|
+
/** Estado */
|
|
111
|
+
estado?: string;
|
|
112
|
+
/** Fecha de emision */
|
|
113
|
+
fechaEmision?: string;
|
|
114
|
+
/** Fecha de vencimiento del pago */
|
|
115
|
+
fechaVencimientoPago?: string;
|
|
116
|
+
/** CAE */
|
|
117
|
+
cae?: string;
|
|
118
|
+
/** Retenciones aplicadas */
|
|
119
|
+
retenciones?: RetencionFecred[];
|
|
120
|
+
/** Respuesta cruda */
|
|
121
|
+
raw?: Record<string, unknown>;
|
|
122
|
+
}
|
|
123
|
+
/** Parametros para consultar comprobantes */
|
|
124
|
+
export interface ConsultarComprobantesParams {
|
|
125
|
+
/** CUIT del emisor */
|
|
126
|
+
cuitEmisor?: string;
|
|
127
|
+
/** CUIT del receptor */
|
|
128
|
+
cuitReceptor?: string;
|
|
129
|
+
/** Codigo de cuenta corriente (para consultar un comprobante especifico) */
|
|
130
|
+
codCtaCte?: number;
|
|
131
|
+
/** Fecha desde (formato YYYY-MM-DD) */
|
|
132
|
+
fechaDesde?: string;
|
|
133
|
+
/** Fecha hasta (formato YYYY-MM-DD) */
|
|
134
|
+
fechaHasta?: string;
|
|
135
|
+
}
|
|
136
|
+
/** Resultado de aceptar una FCE */
|
|
137
|
+
export interface AceptarFecredResult {
|
|
138
|
+
/** Codigo de cuenta corriente */
|
|
139
|
+
codCtaCte: number;
|
|
140
|
+
/** Resultado de la operacion */
|
|
141
|
+
resultado: string;
|
|
142
|
+
/** Respuesta cruda del WS */
|
|
143
|
+
raw: Record<string, unknown>;
|
|
144
|
+
}
|
|
145
|
+
/** Resultado de rechazar una FCE */
|
|
146
|
+
export interface RechazarFecredResult {
|
|
147
|
+
/** Codigo de cuenta corriente */
|
|
148
|
+
codCtaCte: number;
|
|
149
|
+
/** Resultado de la operacion */
|
|
150
|
+
resultado: string;
|
|
151
|
+
/** Respuesta cruda del WS */
|
|
152
|
+
raw: Record<string, unknown>;
|
|
153
|
+
}
|
|
154
|
+
export interface InformarCanceladaParams {
|
|
155
|
+
/** Codigo de cuenta corriente */
|
|
156
|
+
codCtaCte: number;
|
|
157
|
+
/** Codigo de forma de cancelacion */
|
|
158
|
+
codFormaCancelacion: number;
|
|
159
|
+
/** Observaciones opcionales */
|
|
160
|
+
observaciones?: string;
|
|
161
|
+
}
|
|
162
|
+
export interface InformarCanceladaResult {
|
|
163
|
+
/** Codigo de cuenta corriente */
|
|
164
|
+
codCtaCte: number;
|
|
165
|
+
/** Resultado de la operacion */
|
|
166
|
+
resultado: string;
|
|
167
|
+
/** Respuesta cruda del WS */
|
|
168
|
+
raw: Record<string, unknown>;
|
|
169
|
+
}
|
|
170
|
+
export interface RetencionFecred {
|
|
171
|
+
/** Codigo de tipo de retencion */
|
|
172
|
+
codTipoRetencion: number;
|
|
173
|
+
/** Descripcion del tipo de retencion */
|
|
174
|
+
descTipoRetencion?: string;
|
|
175
|
+
/** Importe de la retencion */
|
|
176
|
+
importeRetencion: number;
|
|
177
|
+
/** Porcentaje de la retencion */
|
|
178
|
+
porcentajeRetencion?: number;
|
|
179
|
+
}
|
|
180
|
+
export interface TipoRetencionItem {
|
|
181
|
+
/** Codigo del tipo de retencion */
|
|
182
|
+
codTipoRetencion: number;
|
|
183
|
+
/** Descripcion */
|
|
184
|
+
descTipoRetencion: string;
|
|
185
|
+
}
|
|
186
|
+
export interface TipoFormaCancelacionItem {
|
|
187
|
+
/** Codigo de la forma de cancelacion */
|
|
188
|
+
codFormaCancelacion: number;
|
|
189
|
+
/** Descripcion */
|
|
190
|
+
descFormaCancelacion: string;
|
|
191
|
+
}
|
|
192
|
+
export interface TipoAjusteOperacionItem {
|
|
193
|
+
/** Codigo del tipo de ajuste */
|
|
194
|
+
codTipoAjuste: number;
|
|
195
|
+
/** Descripcion */
|
|
196
|
+
descTipoAjuste: string;
|
|
197
|
+
}
|
|
198
|
+
export interface TipoMotivoRechazoItem {
|
|
199
|
+
/** Codigo del motivo de rechazo */
|
|
200
|
+
codMotivoRechazo: number;
|
|
201
|
+
/** Descripcion */
|
|
202
|
+
descMotivoRechazo: string;
|
|
203
|
+
}
|
|
204
|
+
export interface WsFecredError {
|
|
205
|
+
Code: number;
|
|
206
|
+
Msg: string;
|
|
207
|
+
}
|
|
208
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACnG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAMtD,MAAM,WAAW,gBAAgB;IAC/B,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,kCAAkC;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,0DAA0D;IAC1D,IAAI,EAAE,MAAM,CAAC;IACb,yEAAyE;IACzE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,6CAA6C;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CAAiC;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,gCAAgC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,6BAA6B;IAC7B,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC9B;AAMD,MAAM,WAAW,eAAe;IAC9B,kCAAkC;IAClC,gBAAgB,EAAE,MAAM,CAAC;IACzB,wCAAwC;IACxC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,8BAA8B;IAC9B,gBAAgB,EAAE,MAAM,CAAC;IACzB,iCAAiC;IACjC,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAMD,MAAM,WAAW,iBAAiB;IAChC,mCAAmC;IACnC,gBAAgB,EAAE,MAAM,CAAC;IACzB,kBAAkB;IAClB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,wBAAwB;IACvC,wCAAwC;IACxC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,kBAAkB;IAClB,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,uBAAuB;IACtC,gCAAgC;IAChC,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB;IAClB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,qBAAqB;IACpC,mCAAmC;IACnC,gBAAgB,EAAE,MAAM,CAAC;IACzB,kBAAkB;IAClB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAMD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ConsultarCtasCtesParams } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Validates a CUIT value. Must be a positive number or a non-empty numeric string.
|
|
4
|
+
* @param cuit - Value to validate
|
|
5
|
+
* @param fieldName - Field name for error messages (default: "cuit")
|
|
6
|
+
* @returns The CUIT as a string
|
|
7
|
+
* @throws ArcaValidationError if the CUIT is invalid
|
|
8
|
+
*/
|
|
9
|
+
export declare function validateCuit(cuit: unknown, fieldName?: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Validates a CodCtaCte (current account code).
|
|
12
|
+
* Must be a non-empty string or a positive number.
|
|
13
|
+
* @param cod - Value to validate
|
|
14
|
+
* @returns The code as a number
|
|
15
|
+
* @throws ArcaValidationError if the code is invalid
|
|
16
|
+
*/
|
|
17
|
+
export declare function validateCodCtaCte(cod: unknown): number;
|
|
18
|
+
/**
|
|
19
|
+
* Validates parameters for consultarCtasCtes.
|
|
20
|
+
* Requires rol, fechaDesde, fechaHasta, and at least one of CUITEmisor or CUITReceptor
|
|
21
|
+
* (depending on the role).
|
|
22
|
+
* @param params - Parameters to validate
|
|
23
|
+
* @throws ArcaValidationError if required fields are missing or invalid
|
|
24
|
+
*/
|
|
25
|
+
export declare function validateConsultaCtasCtes(params: ConsultarCtasCtesParams): void;
|
|
26
|
+
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../src/validation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAM1D;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,SAAS,SAAS,GAAG,MAAM,CAsCtE;AAMD;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAqCtD;AAMD;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,uBAAuB,GAAG,IAAI,CA8E9E"}
|