apacuana-sdk-core 0.1.0 → 0.2.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 +117 -46
- package/coverage/clover.xml +205 -91
- package/coverage/coverage-final.json +9 -6
- package/coverage/lcov-report/index.html +48 -33
- package/coverage/lcov-report/src/api/certs.js.html +74 -83
- package/coverage/lcov-report/src/api/index.html +36 -21
- package/coverage/lcov-report/src/api/revocations.js.html +1 -1
- package/coverage/lcov-report/src/api/signatures.js.html +528 -81
- package/coverage/lcov-report/src/api/users.js.html +5 -2
- package/coverage/lcov-report/src/config/index.html +21 -21
- package/coverage/lcov-report/src/config/index.js.html +65 -32
- package/coverage/lcov-report/src/errors/index.html +5 -5
- package/coverage/lcov-report/src/errors/index.js.html +13 -10
- package/coverage/lcov-report/src/index.html +1 -1
- package/coverage/lcov-report/src/index.js.html +13 -4
- package/coverage/lcov-report/src/utils/constant.js.html +4 -4
- package/coverage/lcov-report/src/utils/helpers.js.html +268 -145
- package/coverage/lcov-report/src/utils/httpClient.js.html +646 -0
- package/coverage/lcov-report/src/utils/index.html +32 -17
- package/coverage/lcov.info +429 -167
- package/dist/index.js +390 -150
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +390 -150
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/api/certs.js +27 -30
- package/src/api/signatures.js +205 -50
- package/src/api/users.js +1 -0
- package/src/errors/index.js +1 -0
- package/src/index.js +4 -1
- package/src/utils/helpers.js +140 -99
- package/tests/api/certs.test.js +126 -4
- package/tests/api/signatures.test.js +207 -4
- package/tests/api/users.test.js +1 -0
- package/src/auth/index.js +0 -24
package/README.md
CHANGED
|
@@ -112,24 +112,43 @@ try {
|
|
|
112
112
|
}
|
|
113
113
|
```
|
|
114
114
|
|
|
115
|
-
### generateCert()
|
|
115
|
+
### generateCert(csr)
|
|
116
116
|
|
|
117
|
-
Genera un certificado digital basado en el tipo de integración configurado.
|
|
117
|
+
Genera un certificado digital basado en el tipo de integración configurado. Para la integración `ONBOARDING`, esta función valida la Solicitud de Firma de Certificado (CSR) y la envía a la API de Apacuana para su registro.
|
|
118
118
|
|
|
119
|
-
**Parámetros:**
|
|
119
|
+
**Parámetros:**
|
|
120
|
+
|
|
121
|
+
- `csr` (String): Una cadena de texto en formato Base64 que representa la Solicitud de Firma de Certificado.
|
|
122
|
+
|
|
123
|
+
**Validaciones:**
|
|
124
|
+
|
|
125
|
+
- **csr**:
|
|
126
|
+
- Es un parámetro requerido.
|
|
127
|
+
- Debe ser una cadena de texto (`string`).
|
|
128
|
+
- No puede ser una cadena vacía.
|
|
129
|
+
- Debe estar codificada en formato Base64 válido.
|
|
130
|
+
|
|
131
|
+
Si alguna de estas validaciones falla, la función lanzará una `ApacuanaAPIError` con el código `INVALID_PARAMETER` o `INVALID_PARAMETER_FORMAT`.
|
|
120
132
|
|
|
121
133
|
**Retorna:**
|
|
122
134
|
|
|
123
|
-
- Promise que se resuelve con
|
|
135
|
+
- `Promise` que se resuelve con un objeto que contiene el certificado (`cert`) si la solicitud es exitosa.
|
|
124
136
|
|
|
125
137
|
**Ejemplo:**
|
|
126
138
|
|
|
127
139
|
```javascript
|
|
140
|
+
// Asumiendo que 'myBase64Csr' es una variable que contiene tu CSR en formato Base64
|
|
141
|
+
const myBase64Csr = "MIIC...==";
|
|
142
|
+
|
|
128
143
|
try {
|
|
129
|
-
const
|
|
130
|
-
console.log("Certificado generado:",
|
|
144
|
+
const response = await apacuana.generateCert(myBase64Csr);
|
|
145
|
+
console.log("Certificado generado exitosamente:", response.cert);
|
|
131
146
|
} catch (error) {
|
|
132
|
-
|
|
147
|
+
if (error.name === "ApacuanaAPIError") {
|
|
148
|
+
console.error(`Error de API (${error.code}):`, error.message);
|
|
149
|
+
} else {
|
|
150
|
+
console.error("Ocurrió un error inesperado:", error);
|
|
151
|
+
}
|
|
133
152
|
}
|
|
134
153
|
```
|
|
135
154
|
|
|
@@ -177,67 +196,119 @@ try {
|
|
|
177
196
|
}
|
|
178
197
|
```
|
|
179
198
|
|
|
180
|
-
|
|
199
|
+
// ... existing code ...
|
|
200
|
+
|
|
201
|
+
#### `getDocs(data)`
|
|
202
|
+
|
|
203
|
+
Obtiene una lista de documentos paginada. El comportamiento de esta función varía según el `integrationType` configurado.
|
|
204
|
+
|
|
205
|
+
- **Parámetros:**
|
|
206
|
+
|
|
207
|
+
- `data` (object): Objeto que contiene los parámetros para la consulta.
|
|
208
|
+
- `page` (number): Número de página para la paginación.
|
|
209
|
+
- `size` (number): Cantidad de resultados por página.
|
|
210
|
+
- `status` (number, opcional): Filtra los documentos por su estado. Los valores permitidos son:
|
|
211
|
+
- `-1`: Rechazado
|
|
212
|
+
- `0`: Pendiente
|
|
213
|
+
- `1`: Firmado
|
|
214
|
+
- `2`: En proceso
|
|
215
|
+
|
|
216
|
+
- **Retorna:** `Promise<object>` - Un objeto que contiene la lista de documentos y la información de paginación.
|
|
217
|
+
|
|
218
|
+
- **Comportamiento por `integrationType`:**
|
|
219
|
+
|
|
220
|
+
- **`ONBOARDING`**: Obtiene los documentos asociados al `customerId` configurado.
|
|
221
|
+
- **`ONPREMISE`**: No soportado. Lanza un `ApacuanaAPIError` con el código `NOT_IMPLEMENTED`.
|
|
222
|
+
|
|
223
|
+
- **Ejemplo (`ONBOARDING`):**
|
|
181
224
|
|
|
182
|
-
|
|
225
|
+
```javascript
|
|
226
|
+
try {
|
|
227
|
+
const documents = await apacuana.getDocs({ page: 1, size: 10, status: 1 });
|
|
228
|
+
console.log("Documentos:", documents);
|
|
229
|
+
} catch (error) {
|
|
230
|
+
console.error("Error al obtener documentos:", error.message);
|
|
231
|
+
}
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
- **Posibles `ApacuanaAPIError`:**
|
|
235
|
+
- `INVALID_PARAMETER`: Si `page`, `size` o `status` no son válidos.
|
|
236
|
+
- `CONFIGURATION_ERROR`: Si el `customerId` no está configurado en la inicialización.
|
|
237
|
+
- `NOT_IMPLEMENTED`: Si se llama con `integrationType` igual a `ONPREMISE`.
|
|
238
|
+
|
|
239
|
+
### addSigner(signerData)
|
|
240
|
+
|
|
241
|
+
Agrega un firmante a un documento. El comportamiento de esta función y la estructura del objeto `signerData` varían según el `integrationType` configurado (`ONBOARDING` u `ONPREMISE`).
|
|
183
242
|
|
|
184
243
|
**Parámetros:**
|
|
185
244
|
|
|
186
|
-
- `
|
|
187
|
-
- `signatureData` (Object): Datos de la firma
|
|
245
|
+
- `signerData` (Object): Un objeto que contiene la información del firmante. Su estructura es específica para cada tipo de integración.
|
|
188
246
|
|
|
189
|
-
|
|
247
|
+
---
|
|
190
248
|
|
|
191
|
-
|
|
249
|
+
#### Flujo de Integración: ONBOARDING
|
|
192
250
|
|
|
193
|
-
|
|
251
|
+
Para el tipo de integración `ONBOARDING`, la función espera un objeto `signerData` con la siguiente estructura y realiza validaciones estrictas sobre cada campo.
|
|
194
252
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
console.error("Error al firmar documento:", error);
|
|
253
|
+
**Estructura de `signerData` para ONBOARDING:**
|
|
254
|
+
|
|
255
|
+
```json
|
|
256
|
+
{
|
|
257
|
+
"name": "Nombre del Documento",
|
|
258
|
+
"reference": "Referencia Externa",
|
|
259
|
+
"typedoc": "V",
|
|
260
|
+
"doc": "26122862",
|
|
261
|
+
"signature": [
|
|
262
|
+
{
|
|
263
|
+
"page": 1,
|
|
264
|
+
"x": 0.5,
|
|
265
|
+
"y": 0.85
|
|
266
|
+
}
|
|
267
|
+
]
|
|
211
268
|
}
|
|
212
269
|
```
|
|
213
270
|
|
|
214
|
-
|
|
271
|
+
**Validaciones (ONBOARDING):**
|
|
215
272
|
|
|
216
|
-
|
|
273
|
+
- **signerData**: Debe ser un objeto no vacío.
|
|
274
|
+
- **name**: Requerido, `string`.
|
|
275
|
+
- **reference**: Requerido, `string`. (referencia del documento en el gestor documental)
|
|
276
|
+
- **typedoc**: Requerido, debe ser `V`, `P` o `E`.
|
|
277
|
+
- **doc**: Requerido, `string`.
|
|
278
|
+
- **signature**: Requerido, `array` no vacío.
|
|
279
|
+
- Cada objeto en el `array` debe tener:
|
|
280
|
+
- `page`: Requerido, `número` entero positivo.
|
|
281
|
+
- `x`: Requerido, `número` entre 0 y 1.
|
|
282
|
+
- `y`: Requerido, `número` entre 0 y 1.
|
|
217
283
|
|
|
218
|
-
|
|
284
|
+
Si alguna validación falla, se lanzará una `ApacuanaAPIError` con el código `INVALID_PARAMETER` o `INVALID_PARAMETER_FORMAT`.
|
|
219
285
|
|
|
220
|
-
|
|
286
|
+
---
|
|
221
287
|
|
|
222
288
|
**Retorna:**
|
|
223
289
|
|
|
224
|
-
- Promise que se resuelve con
|
|
290
|
+
- `Promise` que se resuelve con un objeto que contiene el ID del firmante (`signerId`) y el estado (`status`) si la operación es exitosa.
|
|
225
291
|
|
|
226
|
-
**Ejemplo:**
|
|
292
|
+
**Ejemplo (ONBOARDING):**
|
|
227
293
|
|
|
228
294
|
```javascript
|
|
295
|
+
const signerInfo = {
|
|
296
|
+
name: "Contrato de Servicios",
|
|
297
|
+
reference: "CS-2024-001",
|
|
298
|
+
typedoc: "V",
|
|
299
|
+
doc: "12345678",
|
|
300
|
+
signature: [{ page: 5, x: 0.25, y: 0.75 }],
|
|
301
|
+
};
|
|
302
|
+
|
|
229
303
|
try {
|
|
230
|
-
const
|
|
231
|
-
|
|
232
|
-
email: "signer@example.com",
|
|
233
|
-
name: "John Doe",
|
|
234
|
-
role: "Approver",
|
|
235
|
-
};
|
|
236
|
-
|
|
237
|
-
const response = await apacuana.addSigner(signerData);
|
|
238
|
-
console.log("Firmante añadido:", response);
|
|
304
|
+
const response = await apacuana.addSigner(signerInfo);
|
|
305
|
+
console.log("Firmante agregado exitosamente:", response);
|
|
239
306
|
} catch (error) {
|
|
240
|
-
|
|
307
|
+
if (error.name === "ApacuanaAPIError") {
|
|
308
|
+
console.error(`Error de API (${error.code}):`, error.message);
|
|
309
|
+
} else {
|
|
310
|
+
console.error("Ocurrió un error inesperado:", error);
|
|
311
|
+
}
|
|
241
312
|
}
|
|
242
313
|
```
|
|
243
314
|
|
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="1755876851223" clover="3.2.0">
|
|
3
|
+
<project timestamp="1755876851224" name="All files">
|
|
4
|
+
<metrics statements="234" coveredstatements="129" conditionals="185" coveredconditionals="63" methods="28" coveredmethods="15" elements="447" coveredelements="207" complexity="0" loc="234" ncloc="234" 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,35 +24,33 @@
|
|
|
24
24
|
</file>
|
|
25
25
|
</package>
|
|
26
26
|
<package name="src.api">
|
|
27
|
-
<metrics statements="
|
|
27
|
+
<metrics statements="93" coveredstatements="74" conditionals="51" coveredconditionals="34" methods="11" coveredmethods="10"/>
|
|
28
28
|
<file name="certs.js" path="/builds/3dlinkweb/apacuana/libs/apacuana-sdk-core/main/src/api/certs.js">
|
|
29
|
-
<metrics statements="
|
|
30
|
-
<line num="
|
|
31
|
-
<line num="
|
|
32
|
-
<line num="
|
|
33
|
-
<line num="11" count="
|
|
34
|
-
<line num="
|
|
35
|
-
<line num="
|
|
36
|
-
<line num="
|
|
37
|
-
<line num="
|
|
38
|
-
<line num="28" count="
|
|
39
|
-
<line num="29" count="
|
|
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="58" count="
|
|
52
|
-
<line num="
|
|
53
|
-
<line num="
|
|
54
|
-
<line num="66" count="0" type="stmt"/>
|
|
55
|
-
<line num="67" count="0" type="stmt"/>
|
|
29
|
+
<metrics statements="24" coveredstatements="23" conditionals="11" coveredconditionals="8" methods="3" coveredmethods="3"/>
|
|
30
|
+
<line num="7" count="2" type="cond" truecount="0" falsecount="1"/>
|
|
31
|
+
<line num="8" count="2" type="stmt"/>
|
|
32
|
+
<line num="9" count="2" type="stmt"/>
|
|
33
|
+
<line num="11" count="2" type="stmt"/>
|
|
34
|
+
<line num="16" count="2" type="stmt"/>
|
|
35
|
+
<line num="17" count="2" type="cond" truecount="2" falsecount="0"/>
|
|
36
|
+
<line num="18" count="1" type="stmt"/>
|
|
37
|
+
<line num="25" count="1" type="stmt"/>
|
|
38
|
+
<line num="28" count="1" type="cond" truecount="1" falsecount="1"/>
|
|
39
|
+
<line num="29" count="1" type="stmt"/>
|
|
40
|
+
<line num="31" count="0" type="stmt"/>
|
|
41
|
+
<line num="35" count="2" type="cond" truecount="1" falsecount="0"/>
|
|
42
|
+
<line num="36" count="7" type="stmt"/>
|
|
43
|
+
<line num="37" count="7" type="stmt"/>
|
|
44
|
+
<line num="38" count="4" type="cond" truecount="2" falsecount="0"/>
|
|
45
|
+
<line num="39" count="2" type="stmt"/>
|
|
46
|
+
<line num="41" count="2" type="cond" truecount="2" falsecount="0"/>
|
|
47
|
+
<line num="43" count="1" type="stmt"/>
|
|
48
|
+
<line num="46" count="1" type="stmt"/>
|
|
49
|
+
<line num="50" count="1" type="stmt"/>
|
|
50
|
+
<line num="57" count="2" type="cond" truecount="0" falsecount="1"/>
|
|
51
|
+
<line num="58" count="1" type="stmt"/>
|
|
52
|
+
<line num="59" count="1" type="stmt"/>
|
|
53
|
+
<line num="63" count="1" type="stmt"/>
|
|
56
54
|
</file>
|
|
57
55
|
<file name="revocations.js" path="/builds/3dlinkweb/apacuana/libs/apacuana-sdk-core/main/src/api/revocations.js">
|
|
58
56
|
<metrics statements="12" coveredstatements="1" conditionals="8" coveredconditionals="0" methods="1" coveredmethods="0"/>
|
|
@@ -69,6 +67,49 @@
|
|
|
69
67
|
<line num="34" count="0" type="stmt"/>
|
|
70
68
|
<line num="39" count="0" type="stmt"/>
|
|
71
69
|
</file>
|
|
70
|
+
<file name="signatures.js" path="/builds/3dlinkweb/apacuana/libs/apacuana-sdk-core/main/src/api/signatures.js">
|
|
71
|
+
<metrics statements="40" coveredstatements="33" conditionals="19" coveredconditionals="14" methods="6" coveredmethods="6"/>
|
|
72
|
+
<line num="122" count="2" type="stmt"/>
|
|
73
|
+
<line num="123" count="1" type="stmt"/>
|
|
74
|
+
<line num="124" count="1" type="stmt"/>
|
|
75
|
+
<line num="126" count="1" type="stmt"/>
|
|
76
|
+
<line num="127" count="1" type="stmt"/>
|
|
77
|
+
<line num="129" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
78
|
+
<line num="130" count="0" type="stmt"/>
|
|
79
|
+
<line num="132" count="0" type="stmt"/>
|
|
80
|
+
<line num="138" count="2" type="stmt"/>
|
|
81
|
+
<line num="139" count="1" type="stmt"/>
|
|
82
|
+
<line num="146" count="2" type="stmt"/>
|
|
83
|
+
<line num="147" count="4" type="cond" truecount="2" falsecount="0"/>
|
|
84
|
+
<line num="152" count="1" type="stmt"/>
|
|
85
|
+
<line num="159" count="3" type="stmt"/>
|
|
86
|
+
<line num="161" count="3" type="cond" truecount="2" falsecount="0"/>
|
|
87
|
+
<line num="162" count="1" type="stmt"/>
|
|
88
|
+
<line num="165" count="2" type="cond" truecount="2" falsecount="0"/>
|
|
89
|
+
<line num="166" count="1" type="stmt"/>
|
|
90
|
+
<line num="169" count="1" type="stmt"/>
|
|
91
|
+
<line num="176" count="2" type="stmt"/>
|
|
92
|
+
<line num="177" count="1" type="stmt"/>
|
|
93
|
+
<line num="184" count="2" type="stmt"/>
|
|
94
|
+
<line num="185" count="2" type="stmt"/>
|
|
95
|
+
<line num="186" count="2" type="cond" truecount="2" falsecount="0"/>
|
|
96
|
+
<line num="187" count="1" type="stmt"/>
|
|
97
|
+
<line num="194" count="1" type="stmt"/>
|
|
98
|
+
<line num="195" count="1" type="stmt"/>
|
|
99
|
+
<line num="197" count="1" type="stmt"/>
|
|
100
|
+
<line num="198" count="1" type="stmt"/>
|
|
101
|
+
<line num="200" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
102
|
+
<line num="201" count="0" type="stmt"/>
|
|
103
|
+
<line num="203" count="0" type="stmt"/>
|
|
104
|
+
<line num="214" count="2" type="stmt"/>
|
|
105
|
+
<line num="215" count="5" type="stmt"/>
|
|
106
|
+
<line num="217" count="3" type="stmt"/>
|
|
107
|
+
<line num="219" count="3" type="cond" truecount="2" falsecount="0"/>
|
|
108
|
+
<line num="220" count="2" type="stmt"/>
|
|
109
|
+
<line num="223" count="1" type="cond" truecount="1" falsecount="1"/>
|
|
110
|
+
<line num="224" count="1" type="stmt"/>
|
|
111
|
+
<line num="227" count="0" type="stmt"/>
|
|
112
|
+
</file>
|
|
72
113
|
<file name="users.js" path="/builds/3dlinkweb/apacuana/libs/apacuana-sdk-core/main/src/api/users.js">
|
|
73
114
|
<metrics statements="17" coveredstatements="17" conditionals="13" coveredconditionals="12" methods="1" coveredmethods="1"/>
|
|
74
115
|
<line num="14" count="1" type="stmt"/>
|
|
@@ -84,87 +125,160 @@
|
|
|
84
125
|
<line num="46" count="2" type="cond" truecount="4" falsecount="0"/>
|
|
85
126
|
<line num="48" count="1" type="stmt"/>
|
|
86
127
|
<line num="55" count="1" type="stmt"/>
|
|
87
|
-
<line num="
|
|
88
|
-
<line num="
|
|
89
|
-
<line num="
|
|
90
|
-
<line num="
|
|
128
|
+
<line num="63" count="3" type="stmt"/>
|
|
129
|
+
<line num="64" count="3" type="cond" truecount="2" falsecount="0"/>
|
|
130
|
+
<line num="65" count="2" type="stmt"/>
|
|
131
|
+
<line num="67" count="1" type="stmt"/>
|
|
132
|
+
</file>
|
|
133
|
+
</package>
|
|
134
|
+
<package name="src.config">
|
|
135
|
+
<metrics statements="10" coveredstatements="3" conditionals="9" coveredconditionals="0" methods="2" coveredmethods="0"/>
|
|
136
|
+
<file name="index.js" path="/builds/3dlinkweb/apacuana/libs/apacuana-sdk-core/main/src/config/index.js">
|
|
137
|
+
<metrics statements="10" coveredstatements="3" conditionals="9" coveredconditionals="0" methods="2" coveredmethods="0"/>
|
|
138
|
+
<line num="4" count="2" type="stmt"/>
|
|
139
|
+
<line num="15" count="2" type="stmt"/>
|
|
140
|
+
<line num="16" count="0" type="stmt"/>
|
|
141
|
+
<line num="18" count="0" type="cond" truecount="0" falsecount="7"/>
|
|
142
|
+
<line num="19" count="0" type="stmt"/>
|
|
143
|
+
<line num="26" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
144
|
+
<line num="27" count="0" type="stmt"/>
|
|
145
|
+
<line num="33" count="0" type="stmt"/>
|
|
146
|
+
<line num="35" count="0" type="stmt"/>
|
|
147
|
+
<line num="41" count="2" type="stmt"/>
|
|
91
148
|
</file>
|
|
92
149
|
</package>
|
|
93
150
|
<package name="src.errors">
|
|
94
|
-
<metrics statements="
|
|
151
|
+
<metrics statements="7" coveredstatements="7" conditionals="4" coveredconditionals="3" methods="1" coveredmethods="1"/>
|
|
95
152
|
<file name="index.js" path="/builds/3dlinkweb/apacuana/libs/apacuana-sdk-core/main/src/errors/index.js">
|
|
96
|
-
<metrics statements="
|
|
97
|
-
<line num="8" count="
|
|
98
|
-
<line num="9" count="
|
|
99
|
-
<line num="10" count="
|
|
100
|
-
<line num="11" count="
|
|
101
|
-
<line num="
|
|
102
|
-
<line num="15" count="
|
|
153
|
+
<metrics statements="7" coveredstatements="7" conditionals="4" coveredconditionals="3" methods="1" coveredmethods="1"/>
|
|
154
|
+
<line num="8" count="22" type="stmt"/>
|
|
155
|
+
<line num="9" count="22" type="stmt"/>
|
|
156
|
+
<line num="10" count="22" type="stmt"/>
|
|
157
|
+
<line num="11" count="22" type="stmt"/>
|
|
158
|
+
<line num="12" count="22" type="stmt"/>
|
|
159
|
+
<line num="15" count="22" type="cond" truecount="1" falsecount="1"/>
|
|
160
|
+
<line num="16" count="22" type="stmt"/>
|
|
103
161
|
</file>
|
|
104
162
|
</package>
|
|
105
163
|
<package name="src.utils">
|
|
106
|
-
<metrics statements="
|
|
164
|
+
<metrics statements="109" coveredstatements="31" conditionals="119" coveredconditionals="25" methods="13" coveredmethods="3"/>
|
|
107
165
|
<file name="constant.js" path="/builds/3dlinkweb/apacuana/libs/apacuana-sdk-core/main/src/utils/constant.js">
|
|
108
166
|
<metrics statements="3" coveredstatements="3" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
|
|
109
|
-
<line num="1" count="
|
|
110
|
-
<line num="12" count="
|
|
111
|
-
<line num="17" count="
|
|
167
|
+
<line num="1" count="5" type="stmt"/>
|
|
168
|
+
<line num="12" count="5" type="stmt"/>
|
|
169
|
+
<line num="17" count="5" type="stmt"/>
|
|
112
170
|
</file>
|
|
113
171
|
<file name="helpers.js" path="/builds/3dlinkweb/apacuana/libs/apacuana-sdk-core/main/src/utils/helpers.js">
|
|
114
|
-
<metrics statements="
|
|
115
|
-
<line num="
|
|
116
|
-
<line num="8" count="
|
|
117
|
-
<line num="9" count="
|
|
118
|
-
<line num="
|
|
119
|
-
<line num="12" count="
|
|
120
|
-
<line num="
|
|
121
|
-
<line num="18" count="
|
|
122
|
-
<line num="19" count="0" type="
|
|
123
|
-
<line num="
|
|
124
|
-
<line num="
|
|
125
|
-
<line num="29" count="
|
|
126
|
-
<line num="30" count="0" type="
|
|
127
|
-
<line num="
|
|
128
|
-
<line num="
|
|
129
|
-
<line num="37" count="
|
|
130
|
-
<line num="
|
|
131
|
-
<line num="
|
|
132
|
-
<line num="
|
|
172
|
+
<metrics statements="60" coveredstatements="25" conditionals="79" coveredconditionals="25" methods="8" coveredmethods="3"/>
|
|
173
|
+
<line num="6" count="2" type="stmt"/>
|
|
174
|
+
<line num="8" count="2" type="stmt"/>
|
|
175
|
+
<line num="9" count="1" type="cond" truecount="1" falsecount="1"/>
|
|
176
|
+
<line num="10" count="0" type="stmt"/>
|
|
177
|
+
<line num="12" count="1" type="cond" truecount="1" falsecount="1"/>
|
|
178
|
+
<line num="13" count="0" type="stmt"/>
|
|
179
|
+
<line num="18" count="1" type="cond" truecount="1" falsecount="1"/>
|
|
180
|
+
<line num="19" count="0" type="stmt"/>
|
|
181
|
+
<line num="20" count="1" type="cond" truecount="1" falsecount="1"/>
|
|
182
|
+
<line num="27" count="0" type="stmt"/>
|
|
183
|
+
<line num="29" count="1" type="cond" truecount="2" falsecount="2"/>
|
|
184
|
+
<line num="30" count="0" type="stmt"/>
|
|
185
|
+
<line num="31" count="1" type="cond" truecount="1" falsecount="1"/>
|
|
186
|
+
<line num="35" count="0" type="stmt"/>
|
|
187
|
+
<line num="37" count="1" type="cond" truecount="1" falsecount="1"/>
|
|
188
|
+
<line num="38" count="1" type="cond" truecount="1" falsecount="1"/>
|
|
189
|
+
<line num="40" count="1" type="cond" truecount="1" falsecount="1"/>
|
|
190
|
+
<line num="42" count="0" type="stmt"/>
|
|
191
|
+
<line num="46" count="2" type="stmt"/>
|
|
192
|
+
<line num="47" count="0" type="stmt"/>
|
|
133
193
|
<line num="48" count="0" type="stmt"/>
|
|
134
|
-
<line num="
|
|
135
|
-
<line num="
|
|
136
|
-
<line num="51" count="0" type="stmt"/>
|
|
194
|
+
<line num="52" count="0" type="stmt"/>
|
|
195
|
+
<line num="53" count="0" type="stmt"/>
|
|
137
196
|
<line num="54" count="0" type="stmt"/>
|
|
138
|
-
<line num="
|
|
139
|
-
<line num="
|
|
140
|
-
<line num="
|
|
141
|
-
<line num="
|
|
142
|
-
<line num="
|
|
197
|
+
<line num="55" count="0" type="stmt"/>
|
|
198
|
+
<line num="58" count="2" type="cond" truecount="1" falsecount="0"/>
|
|
199
|
+
<line num="59" count="2" type="stmt"/>
|
|
200
|
+
<line num="65" count="2" type="stmt"/>
|
|
201
|
+
<line num="68" count="2" type="stmt"/>
|
|
202
|
+
<line num="69" count="0" type="cond" truecount="0" falsecount="4"/>
|
|
203
|
+
<line num="70" count="0" type="stmt"/>
|
|
204
|
+
<line num="77" count="0" type="cond" truecount="0" falsecount="4"/>
|
|
143
205
|
<line num="78" count="0" type="stmt"/>
|
|
144
|
-
<line num="
|
|
145
|
-
<line num="82" count="0" type="stmt"/>
|
|
206
|
+
<line num="85" count="0" type="stmt"/>
|
|
146
207
|
<line num="86" count="0" type="cond" truecount="0" falsecount="4"/>
|
|
147
208
|
<line num="87" count="0" type="stmt"/>
|
|
148
|
-
<line num="
|
|
149
|
-
<line num="93" count="0" type="stmt"/>
|
|
209
|
+
<line num="94" count="0" type="cond" truecount="0" falsecount="4"/>
|
|
150
210
|
<line num="95" count="0" type="stmt"/>
|
|
151
|
-
<line num="
|
|
152
|
-
<line num="
|
|
153
|
-
<line num="
|
|
211
|
+
<line num="102" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
212
|
+
<line num="106" count="0" type="stmt"/>
|
|
213
|
+
<line num="113" count="0" type="stmt"/>
|
|
214
|
+
<line num="114" count="0" type="cond" truecount="0" falsecount="4"/>
|
|
215
|
+
<line num="115" count="0" type="stmt"/>
|
|
216
|
+
<line num="124" count="0" type="cond" truecount="0" falsecount="5"/>
|
|
154
217
|
<line num="125" count="0" type="stmt"/>
|
|
155
|
-
<line num="
|
|
156
|
-
<line num="
|
|
157
|
-
<line num="
|
|
158
|
-
<line num="
|
|
159
|
-
<line num="
|
|
160
|
-
<line num="
|
|
161
|
-
<line num="
|
|
218
|
+
<line num="134" count="0" type="cond" truecount="0" falsecount="5"/>
|
|
219
|
+
<line num="135" count="0" type="stmt"/>
|
|
220
|
+
<line num="146" count="2" type="stmt"/>
|
|
221
|
+
<line num="147" count="7" type="stmt"/>
|
|
222
|
+
<line num="149" count="7" type="cond" truecount="2" falsecount="0"/>
|
|
223
|
+
<line num="150" count="1" type="stmt"/>
|
|
224
|
+
<line num="157" count="6" type="cond" truecount="4" falsecount="0"/>
|
|
225
|
+
<line num="158" count="1" type="stmt"/>
|
|
226
|
+
<line num="165" count="5" type="cond" truecount="2" falsecount="0"/>
|
|
227
|
+
<line num="166" count="1" type="stmt"/>
|
|
228
|
+
<line num="174" count="2" type="stmt"/>
|
|
229
|
+
<line num="175" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
230
|
+
<line num="180" count="0" type="stmt"/>
|
|
231
|
+
<line num="187" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
232
|
+
<line num="191" count="0" type="stmt"/>
|
|
233
|
+
</file>
|
|
234
|
+
<file name="httpClient.js" path="/builds/3dlinkweb/apacuana/libs/apacuana-sdk-core/main/src/utils/httpClient.js">
|
|
235
|
+
<metrics statements="46" coveredstatements="3" conditionals="40" coveredconditionals="0" methods="5" coveredmethods="0"/>
|
|
236
|
+
<line num="12" count="2" type="stmt"/>
|
|
237
|
+
<line num="13" count="0" type="stmt"/>
|
|
238
|
+
<line num="15" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
239
|
+
<line num="22" count="0" type="stmt"/>
|
|
240
|
+
<line num="27" count="0" type="stmt"/>
|
|
241
|
+
<line num="40" count="0" type="stmt"/>
|
|
242
|
+
<line num="43" count="0" type="cond" truecount="0" falsecount="4"/>
|
|
243
|
+
<line num="44" count="0" type="stmt"/>
|
|
244
|
+
<line num="51" count="0" type="stmt"/>
|
|
245
|
+
<line num="56" count="0" type="stmt"/>
|
|
246
|
+
<line num="61" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
247
|
+
<line num="62" count="0" type="stmt"/>
|
|
248
|
+
<line num="63" count="0" type="stmt"/>
|
|
249
|
+
<line num="69" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
250
|
+
<line num="71" count="0" type="stmt"/>
|
|
251
|
+
<line num="78" count="0" type="stmt"/>
|
|
252
|
+
<line num="88" count="0" type="stmt"/>
|
|
253
|
+
<line num="99" count="2" type="stmt"/>
|
|
254
|
+
<line num="100" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
255
|
+
<line num="101" count="0" type="stmt"/>
|
|
256
|
+
<line num="105" count="0" type="cond" truecount="0" falsecount="4"/>
|
|
257
|
+
<line num="106" count="0" type="stmt"/>
|
|
258
|
+
<line num="110" count="0" type="stmt"/>
|
|
259
|
+
<line num="112" count="0" type="stmt"/>
|
|
260
|
+
<line num="126" count="2" type="cond" truecount="0" falsecount="2"/>
|
|
261
|
+
<line num="127" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
262
|
+
<line num="128" count="0" type="stmt"/>
|
|
263
|
+
<line num="136" count="0" type="stmt"/>
|
|
264
|
+
<line num="141" count="0" type="stmt"/>
|
|
265
|
+
<line num="145" count="0" type="stmt"/>
|
|
162
266
|
<line num="150" count="0" type="stmt"/>
|
|
163
|
-
<line num="
|
|
164
|
-
<line num="
|
|
267
|
+
<line num="152" count="0" type="stmt"/>
|
|
268
|
+
<line num="154" count="0" type="cond" truecount="0" falsecount="5"/>
|
|
165
269
|
<line num="156" count="0" type="stmt"/>
|
|
166
270
|
<line num="157" count="0" type="stmt"/>
|
|
167
|
-
<line num="
|
|
271
|
+
<line num="159" count="0" type="stmt"/>
|
|
272
|
+
<line num="160" count="0" type="stmt"/>
|
|
273
|
+
<line num="162" count="0" type="stmt"/>
|
|
274
|
+
<line num="163" count="0" type="stmt"/>
|
|
275
|
+
<line num="165" count="0" type="stmt"/>
|
|
276
|
+
<line num="166" count="0" type="stmt"/>
|
|
277
|
+
<line num="168" count="0" type="stmt"/>
|
|
278
|
+
<line num="178" count="0" type="stmt"/>
|
|
279
|
+
<line num="179" count="0" type="stmt"/>
|
|
280
|
+
<line num="184" count="0" type="stmt"/>
|
|
281
|
+
<line num="185" count="0" type="stmt"/>
|
|
168
282
|
</file>
|
|
169
283
|
</package>
|
|
170
284
|
</project>
|