@ramiidv/arca-padron 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 +310 -0
- package/dist/arca-padron.d.ts +70 -0
- package/dist/arca-padron.d.ts.map +1 -0
- package/dist/arca-padron.js +129 -0
- package/dist/arca-padron.js.map +1 -0
- package/dist/base-client.d.ts +26 -0
- package/dist/base-client.d.ts.map +1 -0
- package/dist/base-client.js +27 -0
- package/dist/base-client.js.map +1 -0
- package/dist/constants.d.ts +79 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +89 -0
- package/dist/constants.js.map +1 -0
- package/dist/errors.d.ts +20 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +24 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/padron-a10.d.ts +16 -0
- package/dist/padron-a10.d.ts.map +1 -0
- package/dist/padron-a10.js +74 -0
- package/dist/padron-a10.js.map +1 -0
- package/dist/padron-a100.d.ts +15 -0
- package/dist/padron-a100.d.ts.map +1 -0
- package/dist/padron-a100.js +40 -0
- package/dist/padron-a100.js.map +1 -0
- package/dist/padron-a4.d.ts +16 -0
- package/dist/padron-a4.d.ts.map +1 -0
- package/dist/padron-a4.js +174 -0
- package/dist/padron-a4.js.map +1 -0
- package/dist/soap-client.d.ts +2 -0
- package/dist/soap-client.d.ts.map +1 -0
- package/dist/soap-client.js +3 -0
- package/dist/soap-client.js.map +1 -0
- package/dist/types.d.ts +172 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/wsaa.d.ts +3 -0
- package/dist/wsaa.d.ts.map +1 -0
- package/dist/wsaa.js +2 -0
- package/dist/wsaa.js.map +1 -0
- package/llms.txt +162 -0
- package/package.json +64 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 ramiidv
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
# @ramiidv/arca-padron-sdk
|
|
2
|
+
|
|
3
|
+
SDK de TypeScript para los web services de Padron de ARCA (ex AFIP). Soporta los alcances A4 (datos completos), A10 (datos basicos) y A100 (tablas de parametros).
|
|
4
|
+
|
|
5
|
+
## Caracteristicas
|
|
6
|
+
|
|
7
|
+
- Zero dependencias SOAP: construye los envelopes SOAP manualmente
|
|
8
|
+
- Zero dependencias HTTP: usa `fetch` nativo (Node 18+)
|
|
9
|
+
- Firma CMS/PKCS#7 con node-forge
|
|
10
|
+
- ESM only
|
|
11
|
+
- TypeScript estricto con tipos completos
|
|
12
|
+
- Cache automatico de tokens WSAA
|
|
13
|
+
- Reintentos con backoff exponencial
|
|
14
|
+
- Sistema de eventos para monitoreo
|
|
15
|
+
|
|
16
|
+
## Instalacion
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm install @ramiidv/arca-padron-sdk
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Inicio rapido
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
import { readFileSync } from 'fs';
|
|
26
|
+
import { ArcaPadron } from '@ramiidv/arca-padron-sdk';
|
|
27
|
+
|
|
28
|
+
const padron = new ArcaPadron({
|
|
29
|
+
cert: readFileSync('./cert.pem', 'utf-8'),
|
|
30
|
+
key: readFileSync('./key.pem', 'utf-8'),
|
|
31
|
+
cuit: '20123456789',
|
|
32
|
+
production: false, // false = homologacion
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
// Consulta completa (A4)
|
|
36
|
+
const contribuyente = await padron.getPersona('20123456789');
|
|
37
|
+
console.log(contribuyente.tipoPersona, contribuyente.nombre);
|
|
38
|
+
|
|
39
|
+
// Consulta basica (A10)
|
|
40
|
+
const contribuyenteBasico = await padron.getPersonaBasic('20123456789');
|
|
41
|
+
console.log(contribuyenteBasico.domicilio?.[0]?.direccion);
|
|
42
|
+
|
|
43
|
+
// Tablas de parametros (A100)
|
|
44
|
+
import { CollectionName } from '@ramiidv/arca-padron-sdk';
|
|
45
|
+
const provincias = await padron.getParametros(CollectionName.PROVINCIA);
|
|
46
|
+
console.log(provincias.length, 'provincias');
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Configuracion
|
|
50
|
+
|
|
51
|
+
```typescript
|
|
52
|
+
interface ArcaPadronConfig {
|
|
53
|
+
/** Certificado X.509 en formato PEM */
|
|
54
|
+
cert: string;
|
|
55
|
+
/** Clave privada RSA en formato PEM */
|
|
56
|
+
key: string;
|
|
57
|
+
/** CUIT de la entidad representada */
|
|
58
|
+
cuit: string;
|
|
59
|
+
/** Usar endpoints de produccion (default: false) */
|
|
60
|
+
production?: boolean;
|
|
61
|
+
/** Cantidad de reintentos en errores 5xx/red (default: 1) */
|
|
62
|
+
retries?: number;
|
|
63
|
+
/** Delay base en ms para backoff exponencial (default: 1000) */
|
|
64
|
+
retryDelayMs?: number;
|
|
65
|
+
/** Callback de eventos para monitoreo */
|
|
66
|
+
onEvent?: (event: ArcaPadronEvent) => void;
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## API
|
|
71
|
+
|
|
72
|
+
### Metodos de alto nivel
|
|
73
|
+
|
|
74
|
+
#### `getPersona(cuit: string): Promise<PersonaA4>`
|
|
75
|
+
|
|
76
|
+
Obtiene los datos completos de un contribuyente via ws_sr_padron_a4. Autentica automaticamente con WSAA.
|
|
77
|
+
|
|
78
|
+
```typescript
|
|
79
|
+
const contribuyente = await padron.getPersona('20123456789');
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
#### `getPersonaBasic(cuit: string): Promise<PersonaA10>`
|
|
83
|
+
|
|
84
|
+
Obtiene los datos basicos de un contribuyente via ws_sr_padron_a10.
|
|
85
|
+
|
|
86
|
+
```typescript
|
|
87
|
+
const contribuyenteBasico = await padron.getPersonaBasic('20123456789');
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
#### `getParametros(collection: string): Promise<ParameterRecord[]>`
|
|
91
|
+
|
|
92
|
+
Obtiene una tabla de parametros via ws_sr_padron_a100.
|
|
93
|
+
|
|
94
|
+
```typescript
|
|
95
|
+
import { CollectionName } from '@ramiidv/arca-padron-sdk';
|
|
96
|
+
|
|
97
|
+
const provincias = await padron.getParametros(CollectionName.PROVINCIA);
|
|
98
|
+
const tiposDocumento = await padron.getParametros(CollectionName.TIPO_DOCUMENTO);
|
|
99
|
+
const tiposRelacion = await padron.getParametros(CollectionName.TIPO_RELACION);
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Colecciones disponibles (enum `CollectionName`, valores SUPA.\* prefijados): `PROVINCIA`, `TIPO_DOCUMENTO`, `TIPO_DOMICILIO`, `TIPO_CLAVE`, `TIPO_EMPRESA_JURIDICA`, `TIPO_EMPRESA_JURIDICA_SUBGRUPO`, `TIPO_RELACION`, `TIPO_SUBTIPO_RELACION`, `TIPO_COMPONENTE_SOCIEDAD`, `TIPO_RELACION_COMPONENTE_SOC`, `TIPO_EMAIL`, `TIPO_TELEFONO`, `TIPO_RESIDENCIA`, `TIPO_DATO_ADICIONAL_DOMICILIO`, `ORGANISMO_INFORMANTE`, `ORGANISMO_CONTROL`, `PROVINCIA_SOCIEDAD_ORG`, `SEXO`, `CALLE`, `LOCALIDAD`.
|
|
103
|
+
|
|
104
|
+
#### `status(): Promise<{ a4: ServerStatus, a10: ServerStatus, a100: ServerStatus }>`
|
|
105
|
+
|
|
106
|
+
Verifica el estado de los tres servicios (no requiere autenticacion).
|
|
107
|
+
|
|
108
|
+
```typescript
|
|
109
|
+
const estadoServicios = await padron.status();
|
|
110
|
+
console.log(estadoServicios.a4.appserver); // "OK"
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Acceso a clientes de bajo nivel
|
|
114
|
+
|
|
115
|
+
Para casos avanzados, se pueden usar los clientes individuales directamente:
|
|
116
|
+
|
|
117
|
+
```typescript
|
|
118
|
+
const padron = new ArcaPadron({ /* ... */ });
|
|
119
|
+
|
|
120
|
+
// Obtener ticket de acceso manualmente
|
|
121
|
+
const ticket = await padron.wsaa.getAccessTicket('ws_sr_padron_a4');
|
|
122
|
+
|
|
123
|
+
const credenciales = {
|
|
124
|
+
Token: ticket.token,
|
|
125
|
+
Sign: ticket.sign,
|
|
126
|
+
CuitRepresentada: '20123456789',
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
// Llamar directamente al servicio
|
|
130
|
+
const contribuyente = await padron.a4.getPersona(credenciales, '20123456789');
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Tipos de respuesta
|
|
134
|
+
|
|
135
|
+
### PersonaA4 (datos completos)
|
|
136
|
+
|
|
137
|
+
```typescript
|
|
138
|
+
interface PersonaA4 {
|
|
139
|
+
idPersona: string;
|
|
140
|
+
tipoPersona: 'FISICA' | 'JURIDICA';
|
|
141
|
+
tipoClave?: string;
|
|
142
|
+
estadoClave?: string;
|
|
143
|
+
apellido?: string;
|
|
144
|
+
nombre?: string;
|
|
145
|
+
razonSocial?: string;
|
|
146
|
+
numeroDocumento?: string;
|
|
147
|
+
tipoDocumento?: string;
|
|
148
|
+
fechaNacimiento?: string;
|
|
149
|
+
sexo?: string;
|
|
150
|
+
numeroInscripcion?: string;
|
|
151
|
+
formaJuridica?: string;
|
|
152
|
+
mesCierre?: number;
|
|
153
|
+
fechaInscripcion?: string;
|
|
154
|
+
fechaContratoSocial?: string;
|
|
155
|
+
fechaFallecimiento?: string;
|
|
156
|
+
fechaJubilado?: string;
|
|
157
|
+
fechaVencimientoMigracion?: string;
|
|
158
|
+
localidadInscripcion?: string;
|
|
159
|
+
provinciaInscripcion?: string;
|
|
160
|
+
organismoInscripcion?: string;
|
|
161
|
+
organismoOriginante?: string;
|
|
162
|
+
tipoOrganismoOriginante?: string;
|
|
163
|
+
tipoResidencia?: string;
|
|
164
|
+
porcentajeCapitalNacional?: number;
|
|
165
|
+
cantidadSociosEmpresaMono?: number;
|
|
166
|
+
leyJubilacion?: number;
|
|
167
|
+
dependencia?: DependenciaA4;
|
|
168
|
+
claveInactivaAsociada?: string[];
|
|
169
|
+
domicilio?: DomicilioA4[];
|
|
170
|
+
impuesto?: ImpuestoA4[];
|
|
171
|
+
actividad?: ActividadA4[];
|
|
172
|
+
regimen?: RegimenA4[];
|
|
173
|
+
relacion?: RelacionA4[];
|
|
174
|
+
categoria?: CategoriaA4[];
|
|
175
|
+
email?: EmailA4[];
|
|
176
|
+
telefono?: TelefonoA4[];
|
|
177
|
+
}
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### PersonaA10 (datos basicos)
|
|
181
|
+
|
|
182
|
+
```typescript
|
|
183
|
+
interface PersonaA10 {
|
|
184
|
+
idPersona: string;
|
|
185
|
+
tipoPersona: 'FISICA' | 'JURIDICA';
|
|
186
|
+
tipoClave?: string;
|
|
187
|
+
estadoClave?: string;
|
|
188
|
+
nombre?: string;
|
|
189
|
+
apellido?: string;
|
|
190
|
+
razonSocial?: string;
|
|
191
|
+
numeroDocumento?: string;
|
|
192
|
+
tipoDocumento?: string;
|
|
193
|
+
idActividadPrincipal?: string;
|
|
194
|
+
descripcionActividadPrincipal?: string;
|
|
195
|
+
dependencia?: DependenciaA10;
|
|
196
|
+
claveInactivaAsociada?: string[];
|
|
197
|
+
domicilio?: DomicilioA10[];
|
|
198
|
+
}
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### ParameterRecord (tablas A100)
|
|
202
|
+
|
|
203
|
+
```typescript
|
|
204
|
+
interface ParameterRecord {
|
|
205
|
+
id: string;
|
|
206
|
+
descripcion: string;
|
|
207
|
+
atributos?: ParameterAttribute[];
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
interface ParameterAttribute {
|
|
211
|
+
name: string;
|
|
212
|
+
value: string;
|
|
213
|
+
}
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
## Manejo de errores
|
|
217
|
+
|
|
218
|
+
El SDK usa una jerarquia de errores de 4 clases:
|
|
219
|
+
|
|
220
|
+
```
|
|
221
|
+
Error
|
|
222
|
+
└── ArcaPadronError (base)
|
|
223
|
+
├── ArcaAuthError (errores de WSAA)
|
|
224
|
+
├── ArcaPadronServiceError (errores de negocio)
|
|
225
|
+
└── ArcaSoapError (errores HTTP/transporte)
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
```typescript
|
|
229
|
+
import {
|
|
230
|
+
ArcaAuthError,
|
|
231
|
+
ArcaPadronServiceError,
|
|
232
|
+
ArcaSoapError,
|
|
233
|
+
} from '@ramiidv/arca-padron-sdk';
|
|
234
|
+
|
|
235
|
+
try {
|
|
236
|
+
await padron.getPersona('20123456789');
|
|
237
|
+
} catch (error) {
|
|
238
|
+
if (error instanceof ArcaAuthError) {
|
|
239
|
+
// Certificado vencido, servicio no autorizado, WSAA caido
|
|
240
|
+
console.error('Error de autenticacion:', error.message);
|
|
241
|
+
} else if (error instanceof ArcaPadronServiceError) {
|
|
242
|
+
// Errores de negocio (CUIT no encontrada, etc.)
|
|
243
|
+
for (const detalle of error.errors) {
|
|
244
|
+
console.error(`[${detalle.code}] ${detalle.msg}`);
|
|
245
|
+
}
|
|
246
|
+
} else if (error instanceof ArcaSoapError) {
|
|
247
|
+
// Errores HTTP/red
|
|
248
|
+
console.error('Error HTTP:', error.statusCode, error.message);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
## Eventos
|
|
254
|
+
|
|
255
|
+
El SDK emite eventos para monitoreo y debugging:
|
|
256
|
+
|
|
257
|
+
```typescript
|
|
258
|
+
const padron = new ArcaPadron({
|
|
259
|
+
// ...
|
|
260
|
+
onEvent: (evento) => {
|
|
261
|
+
switch (evento.type) {
|
|
262
|
+
case 'auth:login':
|
|
263
|
+
console.log(`Login para ${evento.serviceId}`);
|
|
264
|
+
break;
|
|
265
|
+
case 'auth:cache-hit':
|
|
266
|
+
console.log(`Token cacheado para ${evento.serviceId}`);
|
|
267
|
+
break;
|
|
268
|
+
case 'request:start':
|
|
269
|
+
console.log(`Inicio ${evento.method}`);
|
|
270
|
+
break;
|
|
271
|
+
case 'request:end':
|
|
272
|
+
console.log(`Fin ${evento.method} (${evento.durationMs}ms)`);
|
|
273
|
+
break;
|
|
274
|
+
case 'request:retry':
|
|
275
|
+
console.log(`Reintento #${evento.attempt}`);
|
|
276
|
+
break;
|
|
277
|
+
case 'request:error':
|
|
278
|
+
console.log(`Error: ${evento.error.message}`);
|
|
279
|
+
break;
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
});
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
## Enums utiles
|
|
286
|
+
|
|
287
|
+
```typescript
|
|
288
|
+
import {
|
|
289
|
+
Provincia,
|
|
290
|
+
TipoDomicilio,
|
|
291
|
+
TipoPersona,
|
|
292
|
+
ImpuestoId,
|
|
293
|
+
CollectionName,
|
|
294
|
+
} from '@ramiidv/arca-padron-sdk';
|
|
295
|
+
|
|
296
|
+
// Verificar si el contribuyente esta inscripto en IVA
|
|
297
|
+
const tieneIva = contribuyente.impuesto?.some(
|
|
298
|
+
(imp) => imp.idImpuesto === ImpuestoId.IVA_RESPONSABLE_INSCRIPTO && imp.estado === 'AC'
|
|
299
|
+
);
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
## Requisitos
|
|
303
|
+
|
|
304
|
+
- Node.js >= 18 (soporte nativo de `fetch`)
|
|
305
|
+
- Certificado digital emitido por ARCA/AFIP
|
|
306
|
+
- Autorizacion para los servicios web correspondientes
|
|
307
|
+
|
|
308
|
+
## Licencia
|
|
309
|
+
|
|
310
|
+
MIT
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { WsaaClient } from '@ramiidv/arca-common';
|
|
2
|
+
import { PadronA4Client } from './padron-a4.js';
|
|
3
|
+
import { PadronA10Client } from './padron-a10.js';
|
|
4
|
+
import { PadronA100Client } from './padron-a100.js';
|
|
5
|
+
import type { ArcaPadronConfig, ParameterRecord, PersonaA4, PersonaA10, ServerStatus } from './types.js';
|
|
6
|
+
/**
|
|
7
|
+
* Main orchestrator class for ARCA Padrón web services.
|
|
8
|
+
*
|
|
9
|
+
* Provides high-level methods that handle WSAA authentication automatically
|
|
10
|
+
* and expose results from the A4 (full), A10 (basic), and A100 (parameters)
|
|
11
|
+
* web services.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* import { ArcaPadron } from '@ramiidv/arca-padron';
|
|
16
|
+
* import { readFileSync } from 'fs';
|
|
17
|
+
*
|
|
18
|
+
* const client = new ArcaPadron({
|
|
19
|
+
* cert: readFileSync('cert.pem', 'utf-8'),
|
|
20
|
+
* key: readFileSync('key.pem', 'utf-8'),
|
|
21
|
+
* cuit: '20123456789',
|
|
22
|
+
* production: false,
|
|
23
|
+
* });
|
|
24
|
+
*
|
|
25
|
+
* const persona = await client.getPersona('20123456789');
|
|
26
|
+
* console.log(persona.tipoPersona, persona.nombre);
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare class ArcaPadron {
|
|
30
|
+
/** Low-level WSAA client for direct access */
|
|
31
|
+
readonly wsaa: WsaaClient;
|
|
32
|
+
/** Low-level Padrón A4 client for direct access */
|
|
33
|
+
readonly a4: PadronA4Client;
|
|
34
|
+
/** Low-level Padrón A10 client for direct access */
|
|
35
|
+
readonly a10: PadronA10Client;
|
|
36
|
+
/** Low-level Padrón A100 client for direct access */
|
|
37
|
+
readonly a100: PadronA100Client;
|
|
38
|
+
private readonly cuit;
|
|
39
|
+
private readonly onEvent?;
|
|
40
|
+
constructor(config: ArcaPadronConfig);
|
|
41
|
+
/**
|
|
42
|
+
* Get full taxpayer data (Padrón A4) for a given CUIT.
|
|
43
|
+
* Authenticates automatically via WSAA.
|
|
44
|
+
* @param cuit - CUIT of the taxpayer to query
|
|
45
|
+
*/
|
|
46
|
+
getPersona(cuit: string): Promise<PersonaA4>;
|
|
47
|
+
/**
|
|
48
|
+
* Get basic taxpayer data (Padrón A10) for a given CUIT.
|
|
49
|
+
* Authenticates automatically via WSAA.
|
|
50
|
+
* @param cuit - CUIT of the taxpayer to query
|
|
51
|
+
*/
|
|
52
|
+
getPersonaBasic(cuit: string): Promise<PersonaA10>;
|
|
53
|
+
/**
|
|
54
|
+
* Get a parameter table (Padrón A100) by collection name.
|
|
55
|
+
* Authenticates automatically via WSAA.
|
|
56
|
+
* @param collection - Name of the collection (e.g. CollectionName.PROVINCIA, CollectionName.TIPO_DOCUMENTO)
|
|
57
|
+
*/
|
|
58
|
+
getParametros(collection: string): Promise<ParameterRecord[]>;
|
|
59
|
+
/**
|
|
60
|
+
* Health check for all three Padrón services.
|
|
61
|
+
* Does not require authentication.
|
|
62
|
+
*/
|
|
63
|
+
status(): Promise<{
|
|
64
|
+
a4: ServerStatus;
|
|
65
|
+
a10: ServerStatus;
|
|
66
|
+
a100: ServerStatus;
|
|
67
|
+
}>;
|
|
68
|
+
private getAuth;
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=arca-padron.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arca-padron.d.ts","sourceRoot":"","sources":["../src/arca-padron.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGlD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,SAAS,EACT,UAAU,EACV,YAAY,EAEb,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,UAAU;IACrB,8CAA8C;IAC9C,SAAgB,IAAI,EAAE,UAAU,CAAC;IACjC,mDAAmD;IACnD,SAAgB,EAAE,EAAE,cAAc,CAAC;IACnC,oDAAoD;IACpD,SAAgB,GAAG,EAAE,eAAe,CAAC;IACrC,qDAAqD;IACrD,SAAgB,IAAI,EAAE,gBAAgB,CAAC;IAEvC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAA6B;gBAE1C,MAAM,EAAE,gBAAgB;IA4CpC;;;;OAIG;IACG,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;IAKlD;;;;OAIG;IACG,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAKxD;;;;OAIG;IACG,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAKnE;;;OAGG;IACG,MAAM,IAAI,OAAO,CAAC;QAAE,EAAE,EAAE,YAAY,CAAC;QAAC,GAAG,EAAE,YAAY,CAAC;QAAC,IAAI,EAAE,YAAY,CAAA;KAAE,CAAC;YAatE,OAAO;CAQtB"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { WsaaClient } from '@ramiidv/arca-common';
|
|
2
|
+
import { ENDPOINTS } from './constants.js';
|
|
3
|
+
import { PadronA4Client } from './padron-a4.js';
|
|
4
|
+
import { PadronA10Client } from './padron-a10.js';
|
|
5
|
+
import { PadronA100Client } from './padron-a100.js';
|
|
6
|
+
/**
|
|
7
|
+
* Main orchestrator class for ARCA Padrón web services.
|
|
8
|
+
*
|
|
9
|
+
* Provides high-level methods that handle WSAA authentication automatically
|
|
10
|
+
* and expose results from the A4 (full), A10 (basic), and A100 (parameters)
|
|
11
|
+
* web services.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* import { ArcaPadron } from '@ramiidv/arca-padron';
|
|
16
|
+
* import { readFileSync } from 'fs';
|
|
17
|
+
*
|
|
18
|
+
* const client = new ArcaPadron({
|
|
19
|
+
* cert: readFileSync('cert.pem', 'utf-8'),
|
|
20
|
+
* key: readFileSync('key.pem', 'utf-8'),
|
|
21
|
+
* cuit: '20123456789',
|
|
22
|
+
* production: false,
|
|
23
|
+
* });
|
|
24
|
+
*
|
|
25
|
+
* const persona = await client.getPersona('20123456789');
|
|
26
|
+
* console.log(persona.tipoPersona, persona.nombre);
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export class ArcaPadron {
|
|
30
|
+
/** Low-level WSAA client for direct access */
|
|
31
|
+
wsaa;
|
|
32
|
+
/** Low-level Padrón A4 client for direct access */
|
|
33
|
+
a4;
|
|
34
|
+
/** Low-level Padrón A10 client for direct access */
|
|
35
|
+
a10;
|
|
36
|
+
/** Low-level Padrón A100 client for direct access */
|
|
37
|
+
a100;
|
|
38
|
+
cuit;
|
|
39
|
+
onEvent;
|
|
40
|
+
constructor(config) {
|
|
41
|
+
const isProduction = config.production ?? false;
|
|
42
|
+
const env = isProduction ? 'production' : 'testing';
|
|
43
|
+
this.cuit = config.cuit;
|
|
44
|
+
this.onEvent = config.onEvent;
|
|
45
|
+
const soapOptions = {
|
|
46
|
+
timeout: config.timeout,
|
|
47
|
+
retries: config.retries,
|
|
48
|
+
retryDelayMs: config.retryDelayMs,
|
|
49
|
+
};
|
|
50
|
+
this.wsaa = new WsaaClient({
|
|
51
|
+
cert: config.cert,
|
|
52
|
+
key: config.key,
|
|
53
|
+
production: isProduction,
|
|
54
|
+
timeout: config.timeout,
|
|
55
|
+
retries: config.retries,
|
|
56
|
+
retryDelayMs: config.retryDelayMs,
|
|
57
|
+
onEvent: config.onEvent,
|
|
58
|
+
});
|
|
59
|
+
this.a4 = new PadronA4Client({
|
|
60
|
+
endpoint: ENDPOINTS.a4[env],
|
|
61
|
+
namespace: ENDPOINTS.a4.namespace,
|
|
62
|
+
soapOptions,
|
|
63
|
+
onEvent: config.onEvent,
|
|
64
|
+
});
|
|
65
|
+
this.a10 = new PadronA10Client({
|
|
66
|
+
endpoint: ENDPOINTS.a10[env],
|
|
67
|
+
namespace: ENDPOINTS.a10.namespace,
|
|
68
|
+
soapOptions,
|
|
69
|
+
onEvent: config.onEvent,
|
|
70
|
+
});
|
|
71
|
+
this.a100 = new PadronA100Client({
|
|
72
|
+
endpoint: ENDPOINTS.a100[env],
|
|
73
|
+
namespace: ENDPOINTS.a100.namespace,
|
|
74
|
+
soapOptions,
|
|
75
|
+
onEvent: config.onEvent,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Get full taxpayer data (Padrón A4) for a given CUIT.
|
|
80
|
+
* Authenticates automatically via WSAA.
|
|
81
|
+
* @param cuit - CUIT of the taxpayer to query
|
|
82
|
+
*/
|
|
83
|
+
async getPersona(cuit) {
|
|
84
|
+
const auth = await this.getAuth(ENDPOINTS.a4.serviceId);
|
|
85
|
+
return this.a4.getPersona(auth, cuit);
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Get basic taxpayer data (Padrón A10) for a given CUIT.
|
|
89
|
+
* Authenticates automatically via WSAA.
|
|
90
|
+
* @param cuit - CUIT of the taxpayer to query
|
|
91
|
+
*/
|
|
92
|
+
async getPersonaBasic(cuit) {
|
|
93
|
+
const auth = await this.getAuth(ENDPOINTS.a10.serviceId);
|
|
94
|
+
return this.a10.getPersona(auth, cuit);
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Get a parameter table (Padrón A100) by collection name.
|
|
98
|
+
* Authenticates automatically via WSAA.
|
|
99
|
+
* @param collection - Name of the collection (e.g. CollectionName.PROVINCIA, CollectionName.TIPO_DOCUMENTO)
|
|
100
|
+
*/
|
|
101
|
+
async getParametros(collection) {
|
|
102
|
+
const auth = await this.getAuth(ENDPOINTS.a100.serviceId);
|
|
103
|
+
return this.a100.getParameterCollectionByName(auth, collection);
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Health check for all three Padrón services.
|
|
107
|
+
* Does not require authentication.
|
|
108
|
+
*/
|
|
109
|
+
async status() {
|
|
110
|
+
const [a4, a10, a100] = await Promise.all([
|
|
111
|
+
this.a4.dummy(),
|
|
112
|
+
this.a10.dummy(),
|
|
113
|
+
this.a100.dummy(),
|
|
114
|
+
]);
|
|
115
|
+
return { a4, a10, a100 };
|
|
116
|
+
}
|
|
117
|
+
// -------------------------------------------------------------------------
|
|
118
|
+
// Private helpers
|
|
119
|
+
// -------------------------------------------------------------------------
|
|
120
|
+
async getAuth(serviceId) {
|
|
121
|
+
const ticket = await this.wsaa.getAccessTicket(serviceId);
|
|
122
|
+
return {
|
|
123
|
+
Token: ticket.token,
|
|
124
|
+
Sign: ticket.sign,
|
|
125
|
+
CuitRepresentada: this.cuit,
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=arca-padron.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arca-padron.js","sourceRoot":"","sources":["../src/arca-padron.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ArcaEvent, SoapCallOptions, ServerStatus } from '@ramiidv/arca-common';
|
|
2
|
+
/** Shared configuration for all Padrón service clients. */
|
|
3
|
+
export interface PadronClientConfig {
|
|
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
|
+
* Abstract base class for Padrón web service clients.
|
|
15
|
+
* Provides shared constructor logic and health-check method.
|
|
16
|
+
*/
|
|
17
|
+
export declare abstract class BasePadronClient {
|
|
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: PadronClientConfig);
|
|
23
|
+
/** Health check for this service. */
|
|
24
|
+
dummy(): Promise<ServerStatus>;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=base-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-client.d.ts","sourceRoot":"","sources":["../src/base-client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAErF,2DAA2D;AAC3D,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;AAED;;;GAGG;AACH,8BAAsB,gBAAgB;IACpC,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;IAOtC,qCAAqC;IAC/B,KAAK,IAAI,OAAO,CAAC,YAAY,CAAC;CAerC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { afipSoapCall } from '@ramiidv/arca-common';
|
|
2
|
+
/**
|
|
3
|
+
* Abstract base class for Padrón web service clients.
|
|
4
|
+
* Provides shared constructor logic and health-check method.
|
|
5
|
+
*/
|
|
6
|
+
export class BasePadronClient {
|
|
7
|
+
endpoint;
|
|
8
|
+
namespace;
|
|
9
|
+
soapOptions;
|
|
10
|
+
onEvent;
|
|
11
|
+
constructor(config) {
|
|
12
|
+
this.endpoint = config.endpoint;
|
|
13
|
+
this.namespace = config.namespace;
|
|
14
|
+
this.soapOptions = config.soapOptions;
|
|
15
|
+
this.onEvent = config.onEvent;
|
|
16
|
+
}
|
|
17
|
+
/** Health check for this service. */
|
|
18
|
+
async dummy() {
|
|
19
|
+
const result = await afipSoapCall(this.endpoint, this.namespace, 'dummy', {}, { ...this.soapOptions, onEvent: this.onEvent });
|
|
20
|
+
return {
|
|
21
|
+
appserver: (result['appserver'] ?? ''),
|
|
22
|
+
dbserver: (result['dbserver'] ?? ''),
|
|
23
|
+
authserver: (result['authserver'] ?? ''),
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=base-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-client.js","sourceRoot":"","sources":["../src/base-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAepD;;;GAGG;AACH,MAAM,OAAgB,gBAAgB;IACjB,QAAQ,CAAS;IACjB,SAAS,CAAS;IAClB,WAAW,CAAiE;IAC5E,OAAO,CAA8B;IAExD,YAAY,MAA0B;QACpC,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;QAChC,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;QAClC,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;QACtC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;IAChC,CAAC;IAED,qCAAqC;IACrC,KAAK,CAAC,KAAK;QACT,MAAM,MAAM,GAAG,MAAM,YAAY,CAC/B,IAAI,CAAC,QAAQ,EACb,IAAI,CAAC,SAAS,EACd,OAAO,EACP,EAAE,EACF,EAAE,GAAG,IAAI,CAAC,WAAW,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAC/C,CAAC;QAEF,OAAO;YACL,SAAS,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,CAAW;YAChD,QAAQ,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,CAAW;YAC9C,UAAU,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,CAAW;SACnD,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export { Provincia, DocTipo as TipoDocumento } from '@ramiidv/arca-common';
|
|
2
|
+
export declare const ENDPOINTS: {
|
|
3
|
+
readonly wsaa: {
|
|
4
|
+
readonly testing: "https://wsaahomo.afip.gov.ar/ws/services/LoginCms";
|
|
5
|
+
readonly production: "https://wsaa.afip.gov.ar/ws/services/LoginCms";
|
|
6
|
+
};
|
|
7
|
+
readonly a4: {
|
|
8
|
+
readonly testing: "https://awshomo.afip.gov.ar/sr-padron/webservices/personaServiceA4";
|
|
9
|
+
readonly production: "https://aws.afip.gov.ar/sr-padron/webservices/personaServiceA4";
|
|
10
|
+
readonly namespace: "http://a4.soap.ws.server.puc.sr/";
|
|
11
|
+
readonly serviceId: "ws_sr_padron_a4";
|
|
12
|
+
};
|
|
13
|
+
readonly a10: {
|
|
14
|
+
readonly testing: "https://awshomo.afip.gov.ar/sr-padron/webservices/personaServiceA10";
|
|
15
|
+
readonly production: "https://aws.afip.gov.ar/sr-padron/webservices/personaServiceA10";
|
|
16
|
+
readonly namespace: "http://a10.soap.ws.server.puc.sr/";
|
|
17
|
+
readonly serviceId: "ws_sr_padron_a10";
|
|
18
|
+
};
|
|
19
|
+
readonly a100: {
|
|
20
|
+
readonly testing: "https://awshomo.afip.gov.ar/sr-parametros/webservices/parameterServiceA100";
|
|
21
|
+
readonly production: "https://aws.afip.gov.ar/sr-parametros/webservices/parameterServiceA100";
|
|
22
|
+
readonly namespace: "http://a100.soap.ws.server.pucParam.sr/";
|
|
23
|
+
readonly serviceId: "ws_sr_padron_a100";
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
/** Tipos de domicilio */
|
|
27
|
+
export declare enum TipoDomicilio {
|
|
28
|
+
FISCAL = "FISCAL",
|
|
29
|
+
LEGAL = "LEGAL",
|
|
30
|
+
REAL = "REAL"
|
|
31
|
+
}
|
|
32
|
+
/** Tipos de persona */
|
|
33
|
+
export declare enum TipoPersona {
|
|
34
|
+
FISICA = "FISICA",
|
|
35
|
+
JURIDICA = "JURIDICA"
|
|
36
|
+
}
|
|
37
|
+
/** IDs de impuestos comunes */
|
|
38
|
+
export declare enum ImpuestoId {
|
|
39
|
+
GANANCIAS_PJ = 10,
|
|
40
|
+
GANANCIAS_PH = 11,
|
|
41
|
+
MONOTRIBUTO_SOCIAL = 20,
|
|
42
|
+
MONOTRIBUTO = 21,
|
|
43
|
+
IVA_RESPONSABLE_INSCRIPTO = 30,
|
|
44
|
+
BIENES_PERSONALES = 31,
|
|
45
|
+
IVA_EXENTO = 32,
|
|
46
|
+
IVA_NO_INSCRIPTO = 33,
|
|
47
|
+
IVA_NO_ALCANZADO = 34,
|
|
48
|
+
EMPLEADOR = 301
|
|
49
|
+
}
|
|
50
|
+
/** Estado de la clave fiscal del contribuyente */
|
|
51
|
+
export declare enum EstadoClave {
|
|
52
|
+
ACTIVO = "ACTIVO",
|
|
53
|
+
INACTIVO = "INACTIVO",
|
|
54
|
+
LIMITADO = "LIMITADO"
|
|
55
|
+
}
|
|
56
|
+
/** Nombres de colecciones disponibles en ws_sr_padron_a100 */
|
|
57
|
+
export declare enum CollectionName {
|
|
58
|
+
PROVINCIA = "SUPA.E_PROVINCIA",
|
|
59
|
+
TIPO_DOCUMENTO = "SUPA.TIPO_DOCUMENTO",
|
|
60
|
+
TIPO_DOMICILIO = "SUPA.TIPO_DOMICILIO",
|
|
61
|
+
TIPO_CLAVE = "SUPA.TIPO_CLAVE_IDENTIFICACION",
|
|
62
|
+
TIPO_EMPRESA_JURIDICA = "SUPA.TIPO_EMPRESA_JURIDICA",
|
|
63
|
+
TIPO_EMPRESA_JURIDICA_SUBGRUPO = "SUPA.TIPO_EMPRESA_JURI_SUBGRUPO",
|
|
64
|
+
TIPO_RELACION = "SUPA.TIPO_RELACION",
|
|
65
|
+
TIPO_SUBTIPO_RELACION = "SUPA.TIPO_SUBTIPO_RELACION",
|
|
66
|
+
TIPO_COMPONENTE_SOCIEDAD = "SUPA.TIPO_COMPONENTE_SOCIEDAD",
|
|
67
|
+
TIPO_RELACION_COMPONENTE_SOC = "SUPA.TIPO_RELACION_COMPONENTE_SOC",
|
|
68
|
+
TIPO_EMAIL = "SUPA.TIPO_EMAIL",
|
|
69
|
+
TIPO_TELEFONO = "SUPA.TIPO_TELEFONO",
|
|
70
|
+
TIPO_RESIDENCIA = "SUPA.TIPO_RESIDENCIA",
|
|
71
|
+
TIPO_DATO_ADICIONAL_DOMICILIO = "SUPA.TIPO_DATO_ADICIONAL_DOMICILIO",
|
|
72
|
+
ORGANISMO_INFORMANTE = "SUPA.E_ORGANISMO_INFORMANTE",
|
|
73
|
+
ORGANISMO_CONTROL = "SUPA.E_ORGANISMO_CONTROL",
|
|
74
|
+
PROVINCIA_SOCIEDAD_ORG = "SUPA.A_PROVINCIA_SOCIEDAD_ORG",
|
|
75
|
+
SEXO = "E_SEXO",
|
|
76
|
+
CALLE = "PUC_PARAM.T_CALLE",
|
|
77
|
+
LOCALIDAD = "PUC_PARAM.T_LOCALIDAD"
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=constants.d.ts.map
|