@ramiidv/arca-empleados 0.1.0 → 0.3.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/llms.txt CHANGED
@@ -1,269 +1,69 @@
1
- # @ramiidv/arca-empleados-sdk
1
+ # @ramiidv/arca-empleados
2
2
 
3
- TypeScript SDK for generating ARCA (ex AFIP) F935 bulk employee management files.
4
- This SDK generates structured data files for "Mi Simplificacion - Ingreso Masivo de Datos".
5
- It does NOT make API/SOAP calls - it is a pure file generator with strong typing and validation.
3
+ TypeScript SDK that generates the TXT file for "Ingreso masivo de datos - Relaciones laborales" of ARCA's
4
+ (ex AFIP) Simplificación Registral service: fixed-width records of 130 characters, single record type "01".
5
+ No web service calls: the file is uploaded manually in Simplificación Registral > Relaciones laborales > Carga Masiva.
6
+ Source: https://www.arca.gob.ar/simplificacionregistral/ayuda/documentos/SR_Manual-de-Ayuda_20250218_definitivo.pdf (page 24)
6
7
 
7
- ## Installation
8
+ Not "F935": versions <= 0.2 generated an invented pipe-delimited "F935" format. Do not use it.
8
9
 
9
- npm install @ramiidv/arca-empleados-sdk
10
+ ## Install
10
11
 
11
- ## Main Class: ArcaEmpleados
12
+ npm install @ramiidv/arca-empleados
12
13
 
13
- ```ts
14
- import { ArcaEmpleados } from '@ramiidv/arca-empleados-sdk';
15
-
16
- const empleados = new ArcaEmpleados({
17
- cuitEmpleador: '30-71234567-1', // required, CUIT of employer
18
- razonSocial: 'Mi Empresa S.A.', // optional
19
- strict: true, // optional, default true - validate on add
20
- });
21
- ```
22
-
23
- ### Methods (all return `this` for chaining, except `generar`/`resumen`):
14
+ ## Usage
24
15
 
25
- - `alta(data: AltaEmpleado): this` - Add employee registration
26
- - `baja(data: BajaEmpleado): this` - Add employee termination
27
- - `modificacion(data: ModificacionEmpleado): this` - Add employee modification
28
- - `datosComplementarios(data: DatosComplementarios): this` - Add supplementary data
29
- - `cbu(data: DatosCBU): this` - Add banking data
30
- - `relacionFamiliar(data: RelacionFamiliar): this` - Add family relationship
31
- - `domicilioExplotacion(data: DomicilioExplotacion & { cuil: string }): this` - Add work address
32
- - `altasMasivas(data: AltaEmpleado[]): this` - Bulk registrations
33
- - `bajasMasivas(data: BajaEmpleado[]): this` - Bulk terminations
34
- - `generar(): F935Output` - Generate file content + metadata
35
- - `resumen(): F935Resumen` - Get record summary
36
- - `limpiar(): this` - Clear all records
37
- - `registros: F935Registro[]` - Read-only stored records
38
-
39
- ## Key Types
40
-
41
- ### AltaEmpleado (7 mandatory fields per RG 5508/2024)
42
16
  ```ts
43
- {
44
- cuil: string, // Worker CUIL
45
- fechaInicio: Date, // Start date
46
- modalidadContratacion: number, // Contract type (ModalidadContratacion enum)
47
- obraSocial: string, // Health insurance code
48
- actividadEconomica: string, // Economic activity code
49
- domicilioExplotacion: DomicilioExplotacion, // Work address
50
- trabajadorAgropecuario?: boolean, // Agricultural worker (default false)
51
- fechaFin?: Date, // Required for fixed-term contracts
52
- }
17
+ import { writeFileSync } from 'node:fs';
18
+ import { ArcaEmpleados } from '@ramiidv/arca-empleados';
19
+
20
+ const sr = new ArcaEmpleados({ strict: true }); // config optional
21
+ sr.alta({ cuil: '20-12345678-6', fechaInicio: '2026-11-02', modalidadContrato: 8, obraSocial: '126205', sucursal: 1 })
22
+ .baja({ cuil: '27111111117', fechaFin: '2026-10-31' }) // BT: baja date goes in fechaFin
23
+ .modificacion({ cuil: '20345678906', retribucion: 1200000 }) // MR
24
+ .novedad({ movimiento: 'NA', cuil: '23987654325' }); // any code: AT|BT|MR|NA|NB
25
+ const { contenido, lineas, buffer, resumen } = sr.generar();
26
+ writeFileSync('relaciones.txt', buffer); // ISO-8859-1, CRLF
53
27
  ```
54
28
 
55
- ### BajaEmpleado
56
- ```ts
57
- { cuil: string, fechaBaja: Date, motivoBaja: number }
58
- ```
29
+ Bulk (atomic: all-or-nothing, error details use field "[i].campo"):
30
+ altasMasivas([...]), bajasMasivas([...]), modificacionesMasivas([...]), novedadesMasivas([...])
31
+ Other: registros (copy), cantidad, resumen(), limpiar()
59
32
 
60
- ### ModificacionEmpleado
61
- ```ts
62
- { cuil: string, fechaInicio: Date, ...optional fields to modify }
63
- ```
33
+ ## Fields (DatosRelacionLaboral) -> positions
64
34
 
65
- ### DatosComplementarios
66
- ```ts
67
- {
68
- cuil: string, fechaInicio: Date, situacionRevista: number,
69
- nivelEducacion?: number, puestoDesempenado?: string,
70
- convenioColectivo?: string, tipoServicio?: number,
71
- modalidadLiquidacion?: number, estadoCivil?: number,
72
- remuneracion?: number, cantidadHorasTrabajadas?: number,
73
- porcentajeAporteAdicionalSS?: number,
74
- contribucionTareasDiferenciales?: number,
75
- codigoSiniestrado?: number, marcaPreaviso?: boolean,
76
- fechaPreaviso?: Date, conceptoLiquidacion?: number,
77
- }
78
- ```
35
+ cuil 5-15 N11 (required) | trabajadorAgropecuario 16 A1 | modalidadContrato 17-19 N3 | fechaInicio 20-29 AAAA/MM/DD |
36
+ fechaFin 30-39 | obraSocial 40-45 N6 | situacionRevista 46-47 N2 | fechaTelegramaRenuncia 48-57 |
37
+ retribucion 58-72 N15 (2 implied decimals, max 2 decimals) | modalidadLiquidacion 73 N1 | sucursal 74-78 N5 |
38
+ actividad 79-84 N6 | puesto 85-88 A4 | rectificacion 89-90 N2 (0-5) | cct 91-100 A10 (e.g. "9999/99") |
39
+ categoriaProfesional 101-106 N6 | tipoServicio 107-109 N3 | fechaSuspensionServiciosTemporarios 110-119 |
40
+ numeroFormularioAgropecuario 120-129 N10 | marcaCovidTipoContratoCCG 130 N1 (0-9, default 0)
41
+ Positions 1-2 = "01", 3-4 = movimiento.
79
42
 
80
- ### DatosCBU
81
- ```ts
82
- { cuil: string, fechaInicio: Date, cbu: string, tipoCuenta?: number }
83
- ```
84
-
85
- ### RelacionFamiliar
86
- ```ts
87
- {
88
- cuil: string, fechaInicio: Date, tipoRelacion: number,
89
- cuilFamiliar?: string, dniFamiliar?: string,
90
- nombreFamiliar: string, apellidoFamiliar: string,
91
- fechaNacimiento: Date, discapacitado?: boolean,
92
- escolaridad?: number, obraSocialFamiliar?: string,
93
- cuilTitularObraSocial?: string,
94
- }
95
- ```
96
-
97
- ### DomicilioExplotacion
98
- ```ts
99
- {
100
- calle: string, numero: string, piso?: string, depto?: string,
101
- localidad: string, codigoPostal: string, provincia: number,
102
- telefono?: string, actividadEconomica?: string,
103
- }
104
- ```
105
-
106
- ### F935Output
107
- ```ts
108
- { contenido: string, archivo: F935Archivo, resumen: F935Resumen }
109
- ```
43
+ Numeric codes: non-negative integer or digit string. Dates: Date (Argentina calendar date) or
44
+ "AAAA-MM-DD" / "AAAAMMDD" / "AAAA/MM/DD" strings. Code tables are not public (only inside the service).
110
45
 
111
- ### F935Resumen
112
- ```ts
113
- {
114
- totalRegistros: number, altas: number, bajas: number,
115
- modificaciones: number, datosComplementarios: number,
116
- cbus: number, familiares: number, domicilios: number,
117
- }
118
- ```
46
+ ## Config
119
47
 
120
- ## Enums
48
+ new ArcaEmpleados({ strict?: boolean, serializacion?: { eol?: '\r\n'|'\n', eolFinal?: boolean,
49
+ encoding?: 'latin1'|'ascii', noRepresentables?: 'error'|'transliterar', numericoVacio?: 'ceros'|'espacios' } })
121
50
 
122
- ### ModalidadContratacion (35 codes, T03 SICOSS)
123
- 0=PROMOVIDA_REDUCCION_0, 1=TIEMPO_PARCIAL_INDETERMINADO,
124
- 2=BECARIOS_RESIDENCIAS, 3=APRENDIZAJE, 4=FOMENTO_EMPLEO_24465,
125
- 5=FOMENTO_EMPLEO_24013, 6=LANZAMIENTO_NUEVA_ACTIVIDAD,
126
- 7=PERIODO_PRUEBA_ANTIGUO, 8=TIEMPO_COMPLETO_INDETERMINADO,
127
- 9=PRACTICA_LABORAL_JOVENES, 10=PASANTIA_SIN_OS, 11=TEMPORADA,
128
- 12=EVENTUAL, 13=TRABAJO_FORMACION, 14=PERIODO_PRUEBA_NUEVO,
129
- 18=DISCAPACITADO_24147, 21=TIEMPO_PARCIAL_PLAZO_FIJO,
130
- 22=TIEMPO_COMPLETO_PLAZO_FIJO, 23=NO_PERMANENTE_22248,
131
- 24=CONSTRUCCION, 25=EMPLEO_PUBLICO_PROVINCIAL, 26=PROGRAMA_EMPLEO,
132
- 27=PASANTIA_CON_OS, 32=PERIODO_PRUEBA, 46=PLANTA_TRANSITORIA,
133
- 49=DIRECTORES_SA, 50=PROMOVIDA_REDUCCION_50, 99=LRT,
134
- 100=PROMOVIDA_REDUCCION_100, 110=AGRARIO_PERMANENTE,
135
- 111=AGRARIO_TEMPORARIO, 112=AGRARIO_PERMANENTE_DISCONTINUO,
136
- 113=AGRARIO_CUADRILLA_FAMILIAR, 301=LEY_26940_INDETERMINADO,
137
- 304=LEY_26940_PARCIAL
51
+ strict (default true): CUIL prefix 20/23/24/27 + check digit; required fields per movement
52
+ (AT: cuil, fechaInicio, modalidadContrato, obraSocial, sucursal; BT: cuil, fechaFin; MR/NA/NB: cuil);
53
+ rectificacion 0-5; fechaFin >= fechaInicio. strict false: only format checks.
138
54
 
139
- ### MotivoBaja (34 codes)
140
- 0=FALLECIMIENTO, 2=OTRAS_CAUSALES, 7=DESPIDO,
141
- 18=TRANSFERENCIA_CONTRATO, 19=DENUNCIA_TRANSFERENCIA,
142
- 20=CESION_PERSONAL, 21=RENUNCIA, 22=MUTUO_ACUERDO,
143
- 23=DENUNCIA_POR_EMPLEADOR, 24=DENUNCIA_POR_TRABAJADOR,
144
- 25=ABANDONO_TRABAJO, 26=DESPIDO_SIN_CAUSA, 27=FALTA_TRABAJO,
145
- 28=FUERZA_MAYOR, 29=FALLECIMIENTO_EMPLEADOR, 30=VENCIMIENTO_PLAZO,
146
- 31=QUIEBRA, 32=CONCURSO, 33=JUBILACION, 34=INCAPACIDAD,
147
- 35=MUTUO_ACUERDO_AGRARIO, 36=DESPIDO_AGRARIO,
148
- 37=FUERZA_MAYOR_AGRARIO, 38=FIN_APRENDIZAJE_PASANTIA,
149
- 39=DESPIDO_CONSTRUCCION, 40=CESANTIA, 41=EXONERACION,
150
- 46=INICIO_RETIRO_VOLUNTARIO, 47=FIN_RETIRO_VOLUNTARIO,
151
- 52=EXTINCION_MUTUO_ACUERDO, 53=BAJA_OFICIO,
152
- 54=RETIRO_VOLUNTARIO, 55=TRASPASO_RIGI, 99=VENCIMIENTO_PLAZO_FIJO
55
+ Padding/encoding/EOL/implied decimals are NOT defined by ARCA's manual: SDK uses ARCA's usual convention
56
+ (zeros left for numeric, spaces right for alphanumeric, blank dates as spaces, ISO-8859-1, CRLF).
57
+ NA/NB meanings are not documented by ARCA.
153
58
 
154
- ### SituacionRevista (23 codes)
155
- 1=ACTIVO, 5=LICENCIA_MATERNIDAD, 6=SUSPENSION_OTRAS_CAUSALES,
156
- 9=SUSPENSION_223_BIS, 10=LICENCIA_EXCEDENCIA,
157
- 11=LICENCIA_MATERNIDAD_DOWN, 12=LICENCIA_VACACIONES,
158
- 13=LICENCIA_SIN_GOCE, 14=RESERVA_PUESTO,
159
- 15=CESE_TRANSITORIO_ESE, 16=SINIESTRADO_TERCEROS,
160
- 17=REINGRESO_JUDICIAL, 21=TEMPORADA_RESERVA_PUESTO,
161
- 31=ACTIVO_EXTERIOR, 32=LICENCIA_PATERNIDAD,
162
- 33=LICENCIA_FUERZA_MAYOR, 42=EVENTUAL_EU_MES_COMPLETO,
163
- 43=EVENTUAL_EU_MES_INCOMPLETO, 44=CONSERVACION_EMPLEO,
164
- 45=SUSPENSION_DISCIPLINARIA, 48=SUSPENSION_RES_397,
165
- 49=SUSPENSION_PARCIAL_223_BIS, 51=LICENCIA_CANCER_INFANTIL
59
+ ## Errors
166
60
 
167
- ### NivelEducacion
168
- 0=SIN_INSTRUCCION, 1=PRIMARIO_INCOMPLETO, 2=PRIMARIO_COMPLETO,
169
- 3=SECUNDARIO_INCOMPLETO, 4=SECUNDARIO_COMPLETO, 5=TERCIARIO_INCOMPLETO,
170
- 6=TERCIARIO_COMPLETO, 7=UNIVERSITARIO_INCOMPLETO, 8=UNIVERSITARIO_COMPLETO,
171
- 9=POSGRADO_INCOMPLETO, 10=POSGRADO_COMPLETO
61
+ ArcaValidationError (from @ramiidv/arca-common): business rules, non-object input, invalid movimiento; details[] per field.
62
+ ArcaSerializationError: value does not fit its field (never truncated); field, desde, hasta, value, indice, cause.
63
+ ArcaEmpleadosError: base class.
172
64
 
173
- ### EstadoCivil
174
- 1=SOLTERO, 2=CASADO, 3=DIVORCIADO, 4=VIUDO, 5=SEPARADO, 6=UNION_CONVIVENCIAL
65
+ ## Advanced exports
175
66
 
176
- ### TipoRelacionFamiliar
177
- 1=CONYUGE, 2=HIJO, 3=HIJO_DISCAPACITADO, 4=HIJASTRO,
178
- 5=MENOR_GUARDA, 6=PRENATAL, 7=CONVIVIENTE
179
-
180
- ### Provincia (24 codes)
181
- 0=CAPITAL_FEDERAL, 1=BUENOS_AIRES, 2=CATAMARCA, 3=CORDOBA,
182
- 4=CORRIENTES, 5=ENTRE_RIOS, 6=JUJUY, 7=MENDOZA, 8=LA_RIOJA,
183
- 9=SALTA, 10=SAN_JUAN, 11=SAN_LUIS, 12=SANTA_FE,
184
- 13=SANTIAGO_DEL_ESTERO, 14=TUCUMAN, 15=CHACO, 16=CHUBUT,
185
- 17=FORMOSA, 18=MISIONES, 19=NEUQUEN, 20=LA_PAMPA,
186
- 21=RIO_NEGRO, 22=SANTA_CRUZ, 23=TIERRA_DEL_FUEGO
187
-
188
- ### TipoServicio
189
- 1=CON_APORTE_PAMI, 2=SIN_APORTE_PAMI
190
-
191
- ### ModalidadLiquidacion
192
- 1=MENSUAL, 2=QUINCENAL, 3=SEMANAL, 4=DIARIA, 5=POR_HORA,
193
- 6=POR_PIEZA, 7=A_COMISION, 8=JORNAL
194
-
195
- ### TipoCuenta
196
- 1=CAJA_AHORRO, 2=CUENTA_CORRIENTE
197
-
198
- ### Escolaridad
199
- 0=NO_ESCOLAR, 1=PREESCOLAR, 2=PRIMARIA, 3=SECUNDARIA,
200
- 4=TERCIARIA, 5=UNIVERSITARIA
201
-
202
- ### TipoOperacion
203
- 0=ALTA, 1=BAJA, 2=MODIFICACION
204
-
205
- ## Description Maps
206
-
207
- Each enum has a corresponding description map:
208
- MODALIDAD_CONTRATACION_DESCRIPCION, MOTIVO_BAJA_DESCRIPCION,
209
- SITUACION_REVISTA_DESCRIPCION, NIVEL_EDUCACION_DESCRIPCION,
210
- ESTADO_CIVIL_DESCRIPCION, TIPO_RELACION_FAMILIAR_DESCRIPCION,
211
- PROVINCIA_DESCRIPCION, MODALIDAD_LIQUIDACION_DESCRIPCION,
212
- TIPO_CUENTA_DESCRIPCION, ESCOLARIDAD_DESCRIPCION, TIPO_SERVICIO_DESCRIPCION
213
-
214
- ## Validation Rules
215
-
216
- - CUIL: 11 digits, valid prefixes (20/23/24/27/30/33/34), mod-11 checksum
217
- - CBU: 22 digits, block 1 (8 digits) and block 2 (14 digits) checksums
218
- - Dates: must be valid Date objects
219
- - fechaFin > fechaInicio when both provided
220
- - fechaFin required for modalidades: TIEMPO_PARCIAL_PLAZO_FIJO, TIEMPO_COMPLETO_PLAZO_FIJO, EVENTUAL, TEMPORADA, APRENDIZAJE, PASANTIA_SIN_OS, PASANTIA_CON_OS, AGRARIO_TEMPORARIO, NO_PERMANENTE_22248
221
- - Provincia: 0-23
222
- - Domicilio: calle, numero, localidad, codigoPostal required
223
-
224
- ## Utility Functions
225
-
226
- - `validateCuil(cuil: string): string` - Validate & normalize CUIL
227
- - `validateCBU(cbu: string): string` - Validate CBU
228
- - `normalizeCuil(cuil: string): string` - Remove hyphens
229
- - `formatCuil(cuil: string): string` - Add hyphens (XX-XXXXXXXX-X)
230
-
231
- ## Error Types
232
-
233
- - `ArcaEmpleadosError` - Base error (catch-all)
234
- - `ArcaValidationError` - Validation failures (has `.field?: string`, `.errors: ValidationErrorDetail[]`)
235
- - `ArcaSerializationError` - File generation failures
236
-
237
- ValidationErrorDetail: `{ field: string, message: string, value?: unknown }`
238
-
239
- ## File Format
240
-
241
- Pipe-delimited text. Line types:
242
- - 00: Header (CUIT|RAZON_SOCIAL|FECHA|COUNT)
243
- - 01: Relacion laboral (op 0=alta, 1=baja, 2=modificacion)
244
- - 02: Datos complementarios
245
- - 03: CBU
246
- - 04: Relacion familiar
247
- - 05: Domicilio de explotacion
248
-
249
- Dates: DDMMYYYY. Booleans: S/N.
250
-
251
- ## Common Patterns
252
-
253
- ```ts
254
- // Alta + complementarios + CBU (typical onboarding)
255
- const resultado = empleados
256
- .alta({ cuil: '...', fechaInicio: new Date(), ... })
257
- .datosComplementarios({ cuil: '...', fechaInicio: new Date(), ... })
258
- .cbu({ cuil: '...', fechaInicio: new Date(), cbu: '...' })
259
- .generar();
260
-
261
- // Bulk terminations
262
- empleados.bajasMasivas([
263
- { cuil: '...', fechaBaja: new Date(), motivoBaja: MotivoBaja.RENUNCIA },
264
- { cuil: '...', fechaBaja: new Date(), motivoBaja: MotivoBaja.DESPIDO_SIN_CAUSA },
265
- ]);
266
-
267
- // Non-strict mode (skip validation on add)
268
- const empleados = new ArcaEmpleados({ cuitEmpleador: '...', strict: false });
269
- ```
67
+ serializarRegistro(registro, opts) -> 130-char string; serializarArchivo(registros, opts) -> string;
68
+ codificarArchivo(contenido, encoding) -> Buffer; formatFechaSR(fecha) -> "AAAA/MM/DD";
69
+ validateRegistro, validateCuilTrabajador, DISENO_REGISTRO, CAMPOS_OBLIGATORIOS, CodigoMovimiento.
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@ramiidv/arca-empleados",
3
- "version": "0.1.0",
4
- "description": "TypeScript SDK para gestion de empleados con ARCA (ex AFIP) - Generacion de archivos F935 para altas, bajas y modificaciones",
3
+ "version": "0.3.0",
4
+ "description": "TypeScript SDK para generar el archivo TXT de ingreso masivo de relaciones laborales de Simplificación Registral (ARCA, ex AFIP): altas, bajas y modificaciones",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "exports": {
9
9
  ".": {
10
10
  "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js",
11
12
  "default": "./dist/index.js"
12
13
  }
13
14
  },
@@ -23,29 +24,30 @@
23
24
  "typecheck": "tsc --noEmit",
24
25
  "test": "vitest run",
25
26
  "test:watch": "vitest",
26
- "prepublishOnly": "npm run build"
27
+ "prepublishOnly": "npm run clean && npm run build && npm test"
27
28
  },
28
29
  "keywords": [
29
30
  "arca",
30
31
  "afip",
31
32
  "empleados",
32
- "f935",
33
33
  "argentina",
34
34
  "sdk",
35
35
  "typescript",
36
36
  "simplificacion-registral",
37
37
  "alta",
38
- "baja"
38
+ "baja",
39
+ "relaciones-laborales",
40
+ "ingreso-masivo"
39
41
  ],
40
42
  "author": "ramiidv",
41
43
  "license": "MIT",
42
44
  "repository": {
43
45
  "type": "git",
44
- "url": "git+https://github.com/ramiidv/arca-empleados-sdk.git"
46
+ "url": "git+https://github.com/ramiidv/arca-empleados.git"
45
47
  },
46
- "homepage": "https://github.com/ramiidv/arca-empleados-sdk#readme",
48
+ "homepage": "https://arca-sdk.dev/empleados",
47
49
  "bugs": {
48
- "url": "https://github.com/ramiidv/arca-empleados-sdk/issues"
50
+ "url": "https://github.com/ramiidv/arca-empleados/issues"
49
51
  },
50
52
  "publishConfig": {
51
53
  "access": "public"
@@ -54,11 +56,12 @@
54
56
  "node": ">=18"
55
57
  },
56
58
  "dependencies": {
57
- "@ramiidv/arca-common": "^0.1.0"
59
+ "@ramiidv/arca-common": "^0.4.0"
58
60
  },
59
61
  "devDependencies": {
60
62
  "@types/node": "^22.0.0",
61
63
  "typescript": "^5.7.0",
62
64
  "vitest": "^3.1.0"
63
- }
65
+ },
66
+ "sideEffects": false
64
67
  }
@@ -1,91 +0,0 @@
1
- import type { ArcaEmpleadosConfig, AltaEmpleado, BajaEmpleado, ModificacionEmpleado, DatosComplementarios, DatosCBU, RelacionFamiliar, DomicilioExplotacion, F935Registro, F935Output, F935Resumen } from './types.js';
2
- /**
3
- * Builder class for generating ARCA F935 bulk employee management files.
4
- *
5
- * Supports method chaining for adding records and generates the complete
6
- * file content via the `generar()` method.
7
- *
8
- * @example
9
- * ```ts
10
- * const sdk = new ArcaEmpleados({ cuitEmpleador: '30-71234567-9' });
11
- * const output = sdk
12
- * .alta({ cuil: '20-12345678-9', fechaInicio: new Date(), ... })
13
- * .datosComplementarios({ cuil: '20-12345678-9', ... })
14
- * .generar();
15
- *
16
- * fs.writeFileSync('F935.txt', output.contenido);
17
- * ```
18
- */
19
- export declare class ArcaEmpleados {
20
- private readonly config;
21
- private _registros;
22
- constructor(config: ArcaEmpleadosConfig);
23
- /** Returns a shallow copy of the stored records. */
24
- get registros(): F935Registro[];
25
- /**
26
- * Adds an employee registration (alta) record.
27
- * Validates the data if strict mode is enabled.
28
- */
29
- alta(data: AltaEmpleado): this;
30
- /**
31
- * Adds an employee termination (baja) record.
32
- * Validates the data if strict mode is enabled.
33
- */
34
- baja(data: BajaEmpleado): this;
35
- /**
36
- * Adds an employee modification record.
37
- * Validates the data if strict mode is enabled.
38
- */
39
- modificacion(data: ModificacionEmpleado): this;
40
- /**
41
- * Adds supplementary worker data.
42
- * Validates the data if strict mode is enabled.
43
- */
44
- datosComplementarios(data: DatosComplementarios): this;
45
- /**
46
- * Adds a CBU (banking data) record.
47
- * Validates the data if strict mode is enabled.
48
- */
49
- cbu(data: DatosCBU): this;
50
- /**
51
- * Adds a family relationship record.
52
- * Validates the data if strict mode is enabled.
53
- */
54
- relacionFamiliar(data: RelacionFamiliar): this;
55
- /**
56
- * Adds a work location address record.
57
- * Validates the data if strict mode is enabled.
58
- */
59
- domicilioExplotacion(data: DomicilioExplotacion & {
60
- cuil: string;
61
- }): this;
62
- /**
63
- * Adds multiple employee registrations (altas) at once.
64
- * Validates each record if strict mode is enabled.
65
- * Stops at the first validation error.
66
- */
67
- altasMasivas(data: AltaEmpleado[]): this;
68
- /**
69
- * Adds multiple employee terminations (bajas) at once.
70
- * Validates each record if strict mode is enabled.
71
- * Stops at the first validation error.
72
- */
73
- bajasMasivas(data: BajaEmpleado[]): this;
74
- /**
75
- * Generates the F935 file content and metadata.
76
- * Validates all records and serializes them to the pipe-delimited format.
77
- *
78
- * @throws ArcaValidationError if any record fails validation.
79
- * @throws ArcaSerializationError if serialization fails.
80
- */
81
- generar(): F935Output;
82
- /**
83
- * Returns a summary of the currently stored records.
84
- */
85
- resumen(): F935Resumen;
86
- /**
87
- * Clears all stored records.
88
- */
89
- limpiar(): this;
90
- }
91
- //# sourceMappingURL=f935-builder.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"f935-builder.d.ts","sourceRoot":"","sources":["../src/f935-builder.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACZ,YAAY,EACZ,oBAAoB,EACpB,oBAAoB,EACpB,QAAQ,EACR,gBAAgB,EAChB,oBAAoB,EAEpB,YAAY,EACZ,UAAU,EACV,WAAW,EACZ,MAAM,YAAY,CAAC;AAcpB;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA6G;IACpI,OAAO,CAAC,UAAU,CAAsB;gBAE5B,MAAM,EAAE,mBAAmB;IAevC,oDAAoD;IACpD,IAAI,SAAS,IAAI,YAAY,EAAE,CAE9B;IAMD;;;OAGG;IACH,IAAI,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI;IAQ9B;;;OAGG;IACH,IAAI,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI;IAQ9B;;;OAGG;IACH,YAAY,CAAC,IAAI,EAAE,oBAAoB,GAAG,IAAI;IAQ9C;;;OAGG;IACH,oBAAoB,CAAC,IAAI,EAAE,oBAAoB,GAAG,IAAI;IAQtD;;;OAGG;IACH,GAAG,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI;IAQzB;;;OAGG;IACH,gBAAgB,CAAC,IAAI,EAAE,gBAAgB,GAAG,IAAI;IAQ9C;;;OAGG;IACH,oBAAoB,CAAC,IAAI,EAAE,oBAAoB,GAAG;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IAazE;;;;OAIG;IACH,YAAY,CAAC,IAAI,EAAE,YAAY,EAAE,GAAG,IAAI;IAOxC;;;;OAIG;IACH,YAAY,CAAC,IAAI,EAAE,YAAY,EAAE,GAAG,IAAI;IAWxC;;;;;;OAMG;IACH,OAAO,IAAI,UAAU;IAsCrB;;OAEG;IACH,OAAO,IAAI,WAAW;IAqCtB;;OAEG;IACH,OAAO,IAAI,IAAI;CAIhB"}