apacuana-sdk-core 0.5.0 → 0.6.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 +90 -55
- package/coverage/clover.xml +144 -123
- package/coverage/coverage-final.json +6 -6
- package/coverage/lcov-report/index.html +27 -27
- package/coverage/lcov-report/src/api/certs.js.html +40 -4
- package/coverage/lcov-report/src/api/index.html +19 -19
- package/coverage/lcov-report/src/api/revocations.js.html +21 -3
- package/coverage/lcov-report/src/api/signatures.js.html +123 -18
- package/coverage/lcov-report/src/api/users.js.html +24 -3
- package/coverage/lcov-report/src/config/index.html +1 -1
- package/coverage/lcov-report/src/config/index.js.html +1 -1
- package/coverage/lcov-report/src/errors/index.html +1 -1
- package/coverage/lcov-report/src/errors/index.js.html +1 -1
- package/coverage/lcov-report/src/index.html +1 -1
- package/coverage/lcov-report/src/index.js.html +9 -3
- package/coverage/lcov-report/src/utils/constant.js.html +3 -3
- package/coverage/lcov-report/src/utils/helpers.js.html +143 -8
- package/coverage/lcov-report/src/utils/httpClient.js.html +1 -1
- package/coverage/lcov-report/src/utils/index.html +15 -15
- package/coverage/lcov.info +252 -204
- package/dist/api/certs.d.ts +17 -3
- package/dist/api/revocations.d.ts +17 -2
- package/dist/api/signatures.d.ts +18 -1
- package/dist/api/users.d.ts +22 -6
- package/dist/index.d.ts +4 -0
- package/dist/index.js +335 -22
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +335 -22
- package/dist/index.mjs.map +1 -1
- package/dist/utils/helpers.d.ts +2 -0
- package/package.json +1 -1
- package/src/api/certs.js +14 -2
- package/src/api/revocations.js +7 -1
- package/src/api/signatures.js +43 -8
- package/src/api/users.js +8 -1
- package/src/index.js +3 -1
- package/src/utils/constant.js +2 -2
- package/src/utils/helpers.js +45 -0
package/README.md
CHANGED
|
@@ -51,7 +51,7 @@ Inicializa el SDK con la configuración proporcionada.
|
|
|
51
51
|
|
|
52
52
|
**Retorna:**
|
|
53
53
|
|
|
54
|
-
- Promise que se resuelve cuando la inicialización es exitosa
|
|
54
|
+
- `Promise<boolean>` que se resuelve a `true` cuando la inicialización es exitosa.
|
|
55
55
|
|
|
56
56
|
**Ejemplo:**
|
|
57
57
|
|
|
@@ -79,7 +79,7 @@ Obtiene la configuración actual del SDK.
|
|
|
79
79
|
|
|
80
80
|
**Retorna:**
|
|
81
81
|
|
|
82
|
-
- Object
|
|
82
|
+
- `Object`: Configuración actual del SDK
|
|
83
83
|
|
|
84
84
|
**Ejemplo:**
|
|
85
85
|
|
|
@@ -92,11 +92,11 @@ console.log("Configuración actual:", config);
|
|
|
92
92
|
|
|
93
93
|
Obtiene la información del cliente utilizando los datos de configuración.
|
|
94
94
|
|
|
95
|
-
**Parámetros:** Ninguno (utiliza verificationId y customerId de la configuración)
|
|
95
|
+
**Parámetros:** Ninguno (utiliza `verificationId` y `customerId` de la configuración)
|
|
96
96
|
|
|
97
97
|
**Retorna:**
|
|
98
98
|
|
|
99
|
-
- Promise que se resuelve con un objeto que contiene:
|
|
99
|
+
- `Promise<GetCustomerResponse>` que se resuelve con un objeto que contiene:
|
|
100
100
|
- `token` (String): ID de sesión para autenticación.
|
|
101
101
|
- `userData` (Object): Datos del usuario.
|
|
102
102
|
- `success` (Boolean): Indicador de éxito de la operación.
|
|
@@ -135,7 +135,7 @@ Si alguna de estas validaciones falla, la función lanzará una `ApacuanaAPIErro
|
|
|
135
135
|
|
|
136
136
|
**Retorna:**
|
|
137
137
|
|
|
138
|
-
- `Promise
|
|
138
|
+
- `Promise<GenerateCertResponse>` que se resuelve con un objeto que contiene:
|
|
139
139
|
- `cert` (String): El certificado generado.
|
|
140
140
|
- `success` (Boolean): Indicador de éxito de la operación.
|
|
141
141
|
|
|
@@ -163,11 +163,13 @@ try {
|
|
|
163
163
|
|
|
164
164
|
Obtiene el estado actual del certificado del usuario.
|
|
165
165
|
|
|
166
|
-
**Parámetros:**
|
|
166
|
+
**Parámetros:**
|
|
167
|
+
|
|
168
|
+
- `isCertificateInDevice` (Boolean, opcional): Indica si el certificado ya se encuentra en el dispositivo. Por defecto es `false`.
|
|
167
169
|
|
|
168
170
|
**Retorna:**
|
|
169
171
|
|
|
170
|
-
- Un objeto que contiene:
|
|
172
|
+
- `GetCertStatusResponse`: Un objeto que contiene:
|
|
171
173
|
- `status` (String): El estado del certificado (ver sección de Estados de Certificado).
|
|
172
174
|
- `success` (Boolean): Indicador de éxito de la operación.
|
|
173
175
|
|
|
@@ -186,39 +188,67 @@ try {
|
|
|
186
188
|
|
|
187
189
|
### signDocument(signData)
|
|
188
190
|
|
|
189
|
-
Esta función
|
|
191
|
+
Firma un documento utilizando un certificado digital y un digest previamente firmado. Esta función es compatible únicamente con el flujo de integración `ONBOARDING`.
|
|
190
192
|
|
|
191
193
|
**Parámetros:**
|
|
192
194
|
|
|
193
|
-
- `signData` (
|
|
195
|
+
- `signData` (`SignDocumentData`): Un objeto que contiene los datos necesarios para la firma.
|
|
196
|
+
- `signature` (Object): Objeto con información de la firma.
|
|
197
|
+
- `id` (String): ID de la firma.
|
|
198
|
+
- `positions` (Array<Object>): Posiciones de la firma en el documento.
|
|
199
|
+
- `cert` (String): El certificado del firmante en formato base64.
|
|
200
|
+
- `signedDigest` (String): El digest del documento, ya firmado.
|
|
194
201
|
|
|
195
202
|
**Retorna:**
|
|
196
203
|
|
|
197
|
-
- `Promise<
|
|
204
|
+
- `Promise<object>`: Una promesa que se resuelve con la respuesta de la API tras completar la firma.
|
|
198
205
|
|
|
199
206
|
**Posibles `ApacuanaAPIError`:**
|
|
200
207
|
|
|
201
|
-
- `NOT_IMPLEMENTED`:
|
|
208
|
+
- `NOT_IMPLEMENTED`: Si se invoca con un `integrationType` diferente a `ONBOARDING`.
|
|
209
|
+
- `INVALID_PARAMETER`: Si los datos en `signData` son incorrectos o están incompletos.
|
|
210
|
+
|
|
211
|
+
**Ejemplo:**
|
|
212
|
+
|
|
213
|
+
```javascript
|
|
214
|
+
const signData = {
|
|
215
|
+
signature: {
|
|
216
|
+
id: "unique-signature-id",
|
|
217
|
+
positions: [{ page: 1, x: 0.5, y: 0.8 }],
|
|
218
|
+
},
|
|
219
|
+
cert: "base64-encoded-certificate",
|
|
220
|
+
signedDigest: "signed-digest-of-the-document",
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
try {
|
|
224
|
+
const response = await apacuana.signDocument(signData);
|
|
225
|
+
console.log("Documento firmado exitosamente:", response);
|
|
226
|
+
} catch (error) {
|
|
227
|
+
console.error("Error al firmar el documento:", error.message);
|
|
228
|
+
}
|
|
229
|
+
```
|
|
202
230
|
|
|
203
231
|
### getDigest(signData)
|
|
204
232
|
|
|
205
|
-
Obtiene el digest de un documento que se va a firmar.
|
|
233
|
+
Obtiene el `digest` de un documento que se va a firmar. Este `digest` es un resumen criptográfico del documento que luego debe ser firmado por el cliente.
|
|
206
234
|
|
|
207
|
-
|
|
235
|
+
**Parámetros:**
|
|
208
236
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
237
|
+
- `signData` (`GetDigestData`): Objeto que contiene los datos para la firma.
|
|
238
|
+
- `cert` (String): Certificado del firmante en formato PEM (codificado en base64).
|
|
239
|
+
- `signatureId` (String): Identificador único del proceso de firma.
|
|
212
240
|
|
|
213
|
-
|
|
241
|
+
**Retorna:**
|
|
214
242
|
|
|
243
|
+
- `Promise<GetDigestResponse>`: Un objeto que contiene:
|
|
215
244
|
- `digest` (String): El digest del documento a firmar.
|
|
216
245
|
- `success` (Boolean): Indicador de éxito de la operación.
|
|
217
246
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
247
|
+
**Posibles `ApacuanaAPIError`:**
|
|
248
|
+
|
|
249
|
+
- `INVALID_PARAMETER`: Si `cert` o `signatureId` no son válidos.
|
|
250
|
+
- `API_RESPONSE_ERROR`: Si la API no devuelve un digest.
|
|
251
|
+
- `NOT_IMPLEMENTED`: Si se llama con un `integrationType` no soportado (`ONPREMISE`).
|
|
222
252
|
|
|
223
253
|
### requestRevocation(reasonCode)
|
|
224
254
|
|
|
@@ -226,11 +256,13 @@ Solicita la revocación de un certificado.
|
|
|
226
256
|
|
|
227
257
|
**Parámetros:**
|
|
228
258
|
|
|
229
|
-
- `reasonCode` (String): Código que indica la razón de la revocación
|
|
259
|
+
- `reasonCode` (String): Código que indica la razón de la revocación (ej. "COMPROMISED").
|
|
230
260
|
|
|
231
261
|
**Retorna:**
|
|
232
262
|
|
|
233
|
-
- Promise que se resuelve con
|
|
263
|
+
- `Promise<RequestRevocationResponse>` que se resuelve con un objeto que contiene:
|
|
264
|
+
- `revocationStatus` (String): El estado de la solicitud (ej. "pending").
|
|
265
|
+
- `requestId` (String | Number): El ID de la solicitud de revocación.
|
|
234
266
|
|
|
235
267
|
**Ejemplo:**
|
|
236
268
|
|
|
@@ -243,47 +275,49 @@ try {
|
|
|
243
275
|
}
|
|
244
276
|
```
|
|
245
277
|
|
|
246
|
-
|
|
278
|
+
### getDocs(data)
|
|
247
279
|
|
|
248
280
|
Obtiene una lista de documentos paginada. El comportamiento de esta función varía según el `integrationType` configurado.
|
|
249
281
|
|
|
250
|
-
|
|
282
|
+
**Parámetros:**
|
|
251
283
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
284
|
+
- `data` (`GetDocsParams`): Objeto que contiene los parámetros para la consulta.
|
|
285
|
+
- `page` (Number): Número de página para la paginación.
|
|
286
|
+
- `size` (Number): Cantidad de resultados por página.
|
|
287
|
+
- `status` (Number, opcional): Filtra los documentos por su estado. Los valores permitidos son:
|
|
288
|
+
- `-1`: Rechazado
|
|
289
|
+
- `0`: Pendiente
|
|
290
|
+
- `1`: Firmado
|
|
291
|
+
- `2`: En proceso
|
|
260
292
|
|
|
261
|
-
|
|
293
|
+
**Retorna:**
|
|
262
294
|
|
|
295
|
+
- `Promise<GetDocsResponse>`: Un objeto que contiene:
|
|
263
296
|
- `totalRecords` (Number): El número total de documentos que coinciden con la consulta.
|
|
264
|
-
- `records` (Array): Un array de objetos, donde cada objeto es un documento.
|
|
297
|
+
- `records` (Array<Object>): Un array de objetos, donde cada objeto es un documento.
|
|
265
298
|
- `success` (Boolean): Indicador de éxito de la operación.
|
|
266
299
|
|
|
267
|
-
|
|
300
|
+
**Comportamiento por `integrationType`:**
|
|
268
301
|
|
|
269
|
-
|
|
270
|
-
|
|
302
|
+
- **`ONBOARDING`**: Obtiene los documentos asociados al `customerId` configurado.
|
|
303
|
+
- **`ONPREMISE`**: No soportado. Lanza un `ApacuanaAPIError` con el código `NOT_IMPLEMENTED`.
|
|
271
304
|
|
|
272
|
-
|
|
305
|
+
**Ejemplo (`ONBOARDING`):**
|
|
273
306
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
307
|
+
```javascript
|
|
308
|
+
try {
|
|
309
|
+
const documents = await apacuana.getDocs({ page: 1, size: 10, status: 1 });
|
|
310
|
+
console.log("Documentos:", documents);
|
|
311
|
+
} catch (error) {
|
|
312
|
+
console.error("Error al obtener documentos:", error.message);
|
|
313
|
+
}
|
|
314
|
+
```
|
|
282
315
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
316
|
+
**Posibles `ApacuanaAPIError`:**
|
|
317
|
+
|
|
318
|
+
- `INVALID_PARAMETER`: Si `page`, `size` o `status` no son válidos.
|
|
319
|
+
- `CONFIGURATION_ERROR`: Si el `customerId` no está configurado en la inicialización.
|
|
320
|
+
- `NOT_IMPLEMENTED`: Si se llama con `integrationType` igual a `ONPREMISE`.
|
|
287
321
|
|
|
288
322
|
### addSigner(signerData)
|
|
289
323
|
|
|
@@ -336,7 +370,9 @@ Si alguna validación falla, se lanzará una `ApacuanaAPIError` con el código `
|
|
|
336
370
|
|
|
337
371
|
**Retorna:**
|
|
338
372
|
|
|
339
|
-
- `Promise
|
|
373
|
+
- `Promise<AddSignerResponse>` que se resuelve con un objeto que contiene:
|
|
374
|
+
- `signer` (String): Un identificador del firmante, construido a partir de `typedoc` y `doc`.
|
|
375
|
+
- `success` (Boolean): Indicador de éxito de la operación.
|
|
340
376
|
|
|
341
377
|
**Ejemplo (ONBOARDING):**
|
|
342
378
|
|
|
@@ -375,9 +411,8 @@ El SDK utiliza los siguientes estados para los certificados:
|
|
|
375
411
|
|
|
376
412
|
El SDK soporta los siguientes tipos de integración:
|
|
377
413
|
|
|
378
|
-
- `ONBOARDING`: Proceso de registro inicial y generación de certificado
|
|
379
|
-
- `
|
|
380
|
-
- `SIGNATURE`: Proceso de firma de documentos
|
|
414
|
+
- `ONBOARDING`: Proceso de registro inicial y generación de certificado.
|
|
415
|
+
- `ONPREMISE`: Integración donde el cliente gestiona su propia infraestructura. Algunas funcionalidades no están soportadas en este modo.
|
|
381
416
|
|
|
382
417
|
## Manejo de Errores
|
|
383
418
|
|
package/coverage/clover.xml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<coverage generated="
|
|
3
|
-
<project timestamp="
|
|
4
|
-
<metrics statements="
|
|
2
|
+
<coverage generated="1756163918389" clover="3.2.0">
|
|
3
|
+
<project timestamp="1756163918389" name="All files">
|
|
4
|
+
<metrics statements="289" coveredstatements="120" conditionals="230" coveredconditionals="38" methods="38" coveredmethods="13" elements="557" coveredelements="171" complexity="0" loc="289" ncloc="289" packages="5" files="10" classes="10"/>
|
|
5
5
|
<package name="src">
|
|
6
6
|
<metrics statements="15" coveredstatements="14" conditionals="2" coveredconditionals="1" methods="1" coveredmethods="1"/>
|
|
7
7
|
<file name="index.js" path="/builds/3dlinkweb/apacuana/libs/apacuana-sdk-core/main/src/index.js">
|
|
@@ -24,142 +24,151 @@
|
|
|
24
24
|
</file>
|
|
25
25
|
</package>
|
|
26
26
|
<package name="src.api">
|
|
27
|
-
<metrics statements="
|
|
27
|
+
<metrics statements="133" coveredstatements="81" conditionals="70" coveredconditionals="34" methods="19" coveredmethods="11"/>
|
|
28
28
|
<file name="certs.js" path="/builds/3dlinkweb/apacuana/libs/apacuana-sdk-core/main/src/api/certs.js">
|
|
29
29
|
<metrics statements="25" coveredstatements="25" conditionals="11" coveredconditionals="8" methods="4" coveredmethods="4"/>
|
|
30
|
-
<line num="
|
|
31
|
-
<line num="
|
|
32
|
-
<line num="
|
|
33
|
-
<line num="
|
|
34
|
-
<line num="
|
|
35
|
-
<line num="
|
|
36
|
-
<line num="
|
|
37
|
-
<line num="
|
|
38
|
-
<line num="
|
|
39
|
-
<line num="
|
|
40
|
-
<line num="
|
|
41
|
-
<line num="
|
|
42
|
-
<line num="
|
|
43
|
-
<line num="
|
|
44
|
-
<line num="
|
|
45
|
-
<line num="
|
|
46
|
-
<line num="
|
|
47
|
-
<line num="
|
|
48
|
-
<line num="
|
|
49
|
-
<line num="
|
|
50
|
-
<line num="
|
|
51
|
-
<line num="
|
|
52
|
-
<line num="
|
|
53
|
-
<line num="
|
|
54
|
-
<line num="
|
|
30
|
+
<line num="19" count="2" type="cond" truecount="0" falsecount="1"/>
|
|
31
|
+
<line num="20" count="4" type="stmt"/>
|
|
32
|
+
<line num="21" count="4" type="stmt"/>
|
|
33
|
+
<line num="23" count="4" type="stmt"/>
|
|
34
|
+
<line num="28" count="2" type="stmt"/>
|
|
35
|
+
<line num="29" count="2" type="cond" truecount="2" falsecount="0"/>
|
|
36
|
+
<line num="30" count="1" type="stmt"/>
|
|
37
|
+
<line num="37" count="1" type="stmt"/>
|
|
38
|
+
<line num="40" count="3" type="cond" truecount="2" falsecount="0"/>
|
|
39
|
+
<line num="41" count="2" type="stmt"/>
|
|
40
|
+
<line num="43" count="1" type="stmt"/>
|
|
41
|
+
<line num="47" count="2" type="stmt"/>
|
|
42
|
+
<line num="48" count="1" type="stmt"/>
|
|
43
|
+
<line num="62" count="2" type="cond" truecount="0" falsecount="1"/>
|
|
44
|
+
<line num="63" count="6" type="stmt"/>
|
|
45
|
+
<line num="64" count="6" type="stmt"/>
|
|
46
|
+
<line num="65" count="6" type="cond" truecount="2" falsecount="0"/>
|
|
47
|
+
<line num="66" count="4" type="stmt"/>
|
|
48
|
+
<line num="68" count="2" type="cond" truecount="2" falsecount="0"/>
|
|
49
|
+
<line num="69" count="1" type="stmt"/>
|
|
50
|
+
<line num="72" count="1" type="stmt"/>
|
|
51
|
+
<line num="84" count="2" type="cond" truecount="0" falsecount="1"/>
|
|
52
|
+
<line num="85" count="1" type="stmt"/>
|
|
53
|
+
<line num="86" count="1" type="stmt"/>
|
|
54
|
+
<line num="90" count="1" type="stmt"/>
|
|
55
55
|
</file>
|
|
56
56
|
<file name="revocations.js" path="/builds/3dlinkweb/apacuana/libs/apacuana-sdk-core/main/src/api/revocations.js">
|
|
57
57
|
<metrics statements="12" coveredstatements="1" conditionals="8" coveredconditionals="0" methods="1" coveredmethods="0"/>
|
|
58
|
-
<line num="
|
|
59
|
-
<line num="10" count="0" type="stmt"/>
|
|
60
|
-
<line num="11" count="0" type="stmt"/>
|
|
61
|
-
<line num="15" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
58
|
+
<line num="15" count="1" type="stmt"/>
|
|
62
59
|
<line num="16" count="0" type="stmt"/>
|
|
63
|
-
<line num="
|
|
60
|
+
<line num="17" count="0" type="stmt"/>
|
|
61
|
+
<line num="21" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
64
62
|
<line num="22" count="0" type="stmt"/>
|
|
65
63
|
<line num="27" count="0" type="stmt"/>
|
|
66
|
-
<line num="28" count="0" type="
|
|
67
|
-
<line num="29" count="0" type="stmt"/>
|
|
64
|
+
<line num="28" count="0" type="stmt"/>
|
|
68
65
|
<line num="33" count="0" type="stmt"/>
|
|
69
|
-
<line num="
|
|
66
|
+
<line num="34" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
67
|
+
<line num="35" count="0" type="stmt"/>
|
|
68
|
+
<line num="39" count="0" type="stmt"/>
|
|
69
|
+
<line num="44" count="0" type="stmt"/>
|
|
70
70
|
</file>
|
|
71
71
|
<file name="signatures.js" path="/builds/3dlinkweb/apacuana/libs/apacuana-sdk-core/main/src/api/signatures.js">
|
|
72
|
-
<metrics statements="
|
|
73
|
-
<line num="
|
|
74
|
-
<line num="
|
|
75
|
-
<line num="
|
|
76
|
-
<line num="
|
|
77
|
-
<line num="
|
|
78
|
-
<line num="
|
|
79
|
-
<line num="
|
|
80
|
-
<line num="
|
|
81
|
-
<line num="
|
|
82
|
-
<line num="95" count="0" type="stmt"/>
|
|
72
|
+
<metrics statements="83" coveredstatements="42" conditionals="39" coveredconditionals="15" methods="13" coveredmethods="6"/>
|
|
73
|
+
<line num="77" count="2" type="stmt"/>
|
|
74
|
+
<line num="78" count="0" type="stmt"/>
|
|
75
|
+
<line num="79" count="0" type="stmt"/>
|
|
76
|
+
<line num="80" count="0" type="stmt"/>
|
|
77
|
+
<line num="81" count="0" type="stmt"/>
|
|
78
|
+
<line num="83" count="0" type="stmt"/>
|
|
79
|
+
<line num="94" count="0" type="stmt"/>
|
|
80
|
+
<line num="99" count="0" type="stmt"/>
|
|
81
|
+
<line num="101" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
83
82
|
<line num="102" count="0" type="stmt"/>
|
|
84
|
-
<line num="104" count="0" type="
|
|
85
|
-
<line num="
|
|
86
|
-
<line num="
|
|
87
|
-
<line num="
|
|
88
|
-
<line num="
|
|
89
|
-
<line num="
|
|
90
|
-
<line num="122" count="1" type="stmt"/>
|
|
91
|
-
<line num="123" count="1" type="stmt"/>
|
|
92
|
-
<line num="124" count="1" type="stmt"/>
|
|
93
|
-
<line num="125" count="1" type="stmt"/>
|
|
83
|
+
<line num="104" count="0" type="stmt"/>
|
|
84
|
+
<line num="110" count="2" type="stmt"/>
|
|
85
|
+
<line num="111" count="0" type="stmt"/>
|
|
86
|
+
<line num="118" count="2" type="stmt"/>
|
|
87
|
+
<line num="119" count="0" type="stmt"/>
|
|
88
|
+
<line num="120" count="0" type="stmt"/>
|
|
94
89
|
<line num="127" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
95
|
-
<line num="128" count="0" type="
|
|
96
|
-
<line num="
|
|
97
|
-
<line num="
|
|
98
|
-
<line num="
|
|
99
|
-
<line num="
|
|
100
|
-
<line num="
|
|
101
|
-
<line num="
|
|
102
|
-
<line num="
|
|
103
|
-
<line num="
|
|
104
|
-
<line num="
|
|
105
|
-
<line num="
|
|
106
|
-
<line num="
|
|
107
|
-
<line num="
|
|
108
|
-
<line num="
|
|
109
|
-
<line num="
|
|
110
|
-
<line num="
|
|
111
|
-
<line num="
|
|
112
|
-
<line num="
|
|
113
|
-
<line num="
|
|
114
|
-
<line num="
|
|
115
|
-
<line num="
|
|
116
|
-
<line num="
|
|
117
|
-
<line num="
|
|
118
|
-
<line num="
|
|
119
|
-
<line num="
|
|
120
|
-
<line num="
|
|
121
|
-
<line num="
|
|
122
|
-
<line num="
|
|
123
|
-
<line num="
|
|
124
|
-
<line num="
|
|
125
|
-
<line num="
|
|
126
|
-
<line num="
|
|
127
|
-
<line num="
|
|
128
|
-
<line num="
|
|
129
|
-
<line num="
|
|
130
|
-
<line num="
|
|
131
|
-
<line num="
|
|
132
|
-
<line num="
|
|
133
|
-
<line num="
|
|
134
|
-
<line num="
|
|
135
|
-
<line num="
|
|
136
|
-
<line num="
|
|
137
|
-
<line num="
|
|
138
|
-
<line num="
|
|
90
|
+
<line num="128" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
91
|
+
<line num="129" count="0" type="stmt"/>
|
|
92
|
+
<line num="136" count="0" type="stmt"/>
|
|
93
|
+
<line num="138" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
94
|
+
<line num="139" count="0" type="stmt"/>
|
|
95
|
+
<line num="141" count="0" type="stmt"/>
|
|
96
|
+
<line num="147" count="2" type="stmt"/>
|
|
97
|
+
<line num="148" count="0" type="stmt"/>
|
|
98
|
+
<line num="155" count="2" type="stmt"/>
|
|
99
|
+
<line num="156" count="1" type="stmt"/>
|
|
100
|
+
<line num="157" count="1" type="stmt"/>
|
|
101
|
+
<line num="158" count="1" type="stmt"/>
|
|
102
|
+
<line num="159" count="1" type="stmt"/>
|
|
103
|
+
<line num="161" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
104
|
+
<line num="162" count="0" type="stmt"/>
|
|
105
|
+
<line num="164" count="0" type="stmt"/>
|
|
106
|
+
<line num="168" count="2" type="stmt"/>
|
|
107
|
+
<line num="169" count="1" type="stmt"/>
|
|
108
|
+
<line num="176" count="2" type="stmt"/>
|
|
109
|
+
<line num="177" count="1" type="stmt"/>
|
|
110
|
+
<line num="184" count="2" type="stmt"/>
|
|
111
|
+
<line num="185" count="2" type="stmt"/>
|
|
112
|
+
<line num="186" count="2" type="cond" truecount="2" falsecount="0"/>
|
|
113
|
+
<line num="187" count="1" type="stmt"/>
|
|
114
|
+
<line num="194" count="1" type="stmt"/>
|
|
115
|
+
<line num="195" count="1" type="stmt"/>
|
|
116
|
+
<line num="201" count="1" type="cond" truecount="1" falsecount="1"/>
|
|
117
|
+
<line num="202" count="1" type="stmt"/>
|
|
118
|
+
<line num="205" count="1" type="stmt"/>
|
|
119
|
+
<line num="206" count="1" type="stmt"/>
|
|
120
|
+
<line num="207" count="1" type="stmt"/>
|
|
121
|
+
<line num="213" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
122
|
+
<line num="214" count="0" type="stmt"/>
|
|
123
|
+
<line num="216" count="0" type="stmt"/>
|
|
124
|
+
<line num="233" count="2" type="stmt"/>
|
|
125
|
+
<line num="234" count="0" type="stmt"/>
|
|
126
|
+
<line num="236" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
127
|
+
<line num="237" count="0" type="stmt"/>
|
|
128
|
+
<line num="240" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
129
|
+
<line num="241" count="0" type="stmt"/>
|
|
130
|
+
<line num="244" count="0" type="stmt"/>
|
|
131
|
+
<line num="257" count="2" type="stmt"/>
|
|
132
|
+
<line num="258" count="0" type="stmt"/>
|
|
133
|
+
<line num="260" count="0" type="stmt"/>
|
|
134
|
+
<line num="262" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
135
|
+
<line num="263" count="0" type="stmt"/>
|
|
136
|
+
<line num="266" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
137
|
+
<line num="267" count="0" type="stmt"/>
|
|
138
|
+
<line num="270" count="0" type="stmt"/>
|
|
139
139
|
<line num="283" count="2" type="stmt"/>
|
|
140
|
-
<line num="284" count="
|
|
141
|
-
<line num="
|
|
142
|
-
<line num="
|
|
143
|
-
<line num="
|
|
144
|
-
<line num="
|
|
145
|
-
<line num="
|
|
146
|
-
<line num="
|
|
140
|
+
<line num="284" count="4" type="cond" truecount="2" falsecount="0"/>
|
|
141
|
+
<line num="289" count="1" type="stmt"/>
|
|
142
|
+
<line num="295" count="3" type="stmt"/>
|
|
143
|
+
<line num="297" count="3" type="cond" truecount="2" falsecount="0"/>
|
|
144
|
+
<line num="298" count="1" type="stmt"/>
|
|
145
|
+
<line num="301" count="2" type="cond" truecount="2" falsecount="0"/>
|
|
146
|
+
<line num="302" count="1" type="stmt"/>
|
|
147
|
+
<line num="305" count="1" type="stmt"/>
|
|
148
|
+
<line num="318" count="2" type="stmt"/>
|
|
149
|
+
<line num="319" count="5" type="stmt"/>
|
|
150
|
+
<line num="321" count="3" type="stmt"/>
|
|
151
|
+
<line num="323" count="3" type="cond" truecount="2" falsecount="0"/>
|
|
152
|
+
<line num="324" count="2" type="stmt"/>
|
|
153
|
+
<line num="327" count="1" type="cond" truecount="1" falsecount="1"/>
|
|
154
|
+
<line num="328" count="1" type="stmt"/>
|
|
155
|
+
<line num="331" count="0" type="stmt"/>
|
|
147
156
|
</file>
|
|
148
157
|
<file name="users.js" path="/builds/3dlinkweb/apacuana/libs/apacuana-sdk-core/main/src/api/users.js">
|
|
149
158
|
<metrics statements="13" coveredstatements="13" conditionals="12" coveredconditionals="11" methods="1" coveredmethods="1"/>
|
|
150
|
-
<line num="
|
|
151
|
-
<line num="
|
|
152
|
-
<line num="
|
|
153
|
-
<line num="
|
|
154
|
-
<line num="
|
|
155
|
-
<line num="
|
|
156
|
-
<line num="
|
|
157
|
-
<line num="
|
|
158
|
-
<line num="38" count="1" type="stmt"/>
|
|
159
|
+
<line num="21" count="1" type="stmt"/>
|
|
160
|
+
<line num="22" count="5" type="stmt"/>
|
|
161
|
+
<line num="24" count="5" type="cond" truecount="4" falsecount="0"/>
|
|
162
|
+
<line num="25" count="1" type="stmt"/>
|
|
163
|
+
<line num="32" count="4" type="stmt"/>
|
|
164
|
+
<line num="37" count="4" type="stmt"/>
|
|
165
|
+
<line num="38" count="4" type="stmt"/>
|
|
166
|
+
<line num="44" count="2" type="cond" truecount="4" falsecount="0"/>
|
|
159
167
|
<line num="45" count="1" type="stmt"/>
|
|
160
|
-
<line num="
|
|
161
|
-
<line num="
|
|
162
|
-
<line num="
|
|
168
|
+
<line num="52" count="1" type="stmt"/>
|
|
169
|
+
<line num="58" count="3" type="cond" truecount="2" falsecount="0"/>
|
|
170
|
+
<line num="59" count="2" type="stmt"/>
|
|
171
|
+
<line num="61" count="1" type="stmt"/>
|
|
163
172
|
</file>
|
|
164
173
|
</package>
|
|
165
174
|
<package name="src.config">
|
|
@@ -192,7 +201,7 @@
|
|
|
192
201
|
</file>
|
|
193
202
|
</package>
|
|
194
203
|
<package name="src.utils">
|
|
195
|
-
<metrics statements="
|
|
204
|
+
<metrics statements="124" coveredstatements="15" conditionals="145" coveredconditionals="0" methods="15" coveredmethods="0"/>
|
|
196
205
|
<file name="constant.js" path="/builds/3dlinkweb/apacuana/libs/apacuana-sdk-core/main/src/utils/constant.js">
|
|
197
206
|
<metrics statements="3" coveredstatements="3" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
|
|
198
207
|
<line num="1" count="6" type="stmt"/>
|
|
@@ -200,7 +209,7 @@
|
|
|
200
209
|
<line num="17" count="6" type="stmt"/>
|
|
201
210
|
</file>
|
|
202
211
|
<file name="helpers.js" path="/builds/3dlinkweb/apacuana/libs/apacuana-sdk-core/main/src/utils/helpers.js">
|
|
203
|
-
<metrics statements="
|
|
212
|
+
<metrics statements="75" coveredstatements="9" conditionals="105" coveredconditionals="0" methods="10" coveredmethods="0"/>
|
|
204
213
|
<line num="6" count="2" type="stmt"/>
|
|
205
214
|
<line num="8" count="2" type="stmt"/>
|
|
206
215
|
<line num="9" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
@@ -264,6 +273,18 @@
|
|
|
264
273
|
<line num="199" count="2" type="stmt"/>
|
|
265
274
|
<line num="200" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
266
275
|
<line num="207" count="0" type="stmt"/>
|
|
276
|
+
<line num="215" count="2" type="stmt"/>
|
|
277
|
+
<line num="216" count="0" type="cond" truecount="0" falsecount="4"/>
|
|
278
|
+
<line num="217" count="0" type="stmt"/>
|
|
279
|
+
<line num="224" count="0" type="stmt"/>
|
|
280
|
+
<line num="226" count="0" type="cond" truecount="0" falsecount="5"/>
|
|
281
|
+
<line num="227" count="0" type="stmt"/>
|
|
282
|
+
<line num="234" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
283
|
+
<line num="235" count="0" type="stmt"/>
|
|
284
|
+
<line num="242" count="0" type="cond" truecount="0" falsecount="4"/>
|
|
285
|
+
<line num="243" count="0" type="stmt"/>
|
|
286
|
+
<line num="250" count="0" type="cond" truecount="0" falsecount="4"/>
|
|
287
|
+
<line num="251" count="0" type="stmt"/>
|
|
267
288
|
</file>
|
|
268
289
|
<file name="httpClient.js" path="/builds/3dlinkweb/apacuana/libs/apacuana-sdk-core/main/src/utils/httpClient.js">
|
|
269
290
|
<metrics statements="46" coveredstatements="3" conditionals="40" coveredconditionals="0" methods="5" coveredmethods="0"/>
|