apacuana-sdk-core 0.2.0 → 0.4.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 +64 -15
- package/coverage/clover.xml +155 -121
- package/coverage/coverage-final.json +8 -8
- package/coverage/lcov-report/block-navigation.js +1 -1
- package/coverage/lcov-report/index.html +30 -30
- package/coverage/lcov-report/sorter.js +21 -7
- package/coverage/lcov-report/src/api/certs.js.html +73 -28
- package/coverage/lcov-report/src/api/index.html +31 -31
- package/coverage/lcov-report/src/api/revocations.js.html +12 -15
- package/coverage/lcov-report/src/api/signatures.js.html +186 -159
- package/coverage/lcov-report/src/api/users.js.html +24 -63
- 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 +8 -8
- package/coverage/lcov-report/src/index.html +1 -1
- package/coverage/lcov-report/src/index.js.html +6 -3
- package/coverage/lcov-report/src/utils/constant.js.html +4 -4
- package/coverage/lcov-report/src/utils/helpers.js.html +101 -50
- package/coverage/lcov-report/src/utils/httpClient.js.html +1 -1
- package/coverage/lcov-report/src/utils/index.html +19 -19
- package/coverage/lcov.info +293 -221
- package/dist/api/certs.d.ts +8 -0
- package/dist/api/revocations.d.ts +7 -0
- package/dist/api/signatures.d.ts +16 -0
- package/dist/api/users.d.ts +15 -0
- package/dist/config/index.d.ts +11 -0
- package/dist/errors/index.d.ts +10 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.js +252 -251
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +252 -251
- package/dist/index.mjs.map +1 -1
- package/dist/utils/constant.d.ts +18 -0
- package/dist/utils/helpers.d.ts +21 -0
- package/dist/utils/httpClient.d.ts +3 -0
- package/package.json +9 -4
- package/src/api/certs.js +25 -10
- package/src/api/revocations.js +10 -11
- package/src/api/signatures.js +106 -97
- package/src/api/users.js +16 -29
- package/src/index.js +2 -1
- package/src/utils/helpers.js +17 -0
- package/tests/api/certs.test.js +58 -74
- package/tests/api/signatures.test.js +18 -73
- package/tests/api/users.test.js +10 -10
- package/tsconfig.json +15 -0
package/README.md
CHANGED
|
@@ -97,16 +97,19 @@ Obtiene la información del cliente utilizando los datos de configuración.
|
|
|
97
97
|
**Retorna:**
|
|
98
98
|
|
|
99
99
|
- Promise que se resuelve con un objeto que contiene:
|
|
100
|
-
- `token` (String): ID de sesión para autenticación
|
|
101
|
-
- `userData` (Object): Datos del usuario
|
|
100
|
+
- `token` (String): ID de sesión para autenticación.
|
|
101
|
+
- `userData` (Object): Datos del usuario.
|
|
102
|
+
- `success` (Boolean): Indicador de éxito de la operación.
|
|
102
103
|
|
|
103
104
|
**Ejemplo:**
|
|
104
105
|
|
|
105
106
|
```javascript
|
|
106
107
|
try {
|
|
107
|
-
const { token, userData } = await apacuana.getCustomer();
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
const { token, userData, success } = await apacuana.getCustomer();
|
|
109
|
+
if (success) {
|
|
110
|
+
console.log("Token de sesión:", token);
|
|
111
|
+
console.log("Datos del usuario:", userData);
|
|
112
|
+
}
|
|
110
113
|
} catch (error) {
|
|
111
114
|
console.error("Error al obtener información del cliente:", error);
|
|
112
115
|
}
|
|
@@ -132,7 +135,9 @@ Si alguna de estas validaciones falla, la función lanzará una `ApacuanaAPIErro
|
|
|
132
135
|
|
|
133
136
|
**Retorna:**
|
|
134
137
|
|
|
135
|
-
- `Promise` que se resuelve con un objeto que contiene
|
|
138
|
+
- `Promise` que se resuelve con un objeto que contiene:
|
|
139
|
+
- `cert` (String): El certificado generado.
|
|
140
|
+
- `success` (Boolean): Indicador de éxito de la operación.
|
|
136
141
|
|
|
137
142
|
**Ejemplo:**
|
|
138
143
|
|
|
@@ -141,8 +146,10 @@ Si alguna de estas validaciones falla, la función lanzará una `ApacuanaAPIErro
|
|
|
141
146
|
const myBase64Csr = "MIIC...==";
|
|
142
147
|
|
|
143
148
|
try {
|
|
144
|
-
const
|
|
145
|
-
|
|
149
|
+
const { cert, success } = await apacuana.generateCert(myBase64Csr);
|
|
150
|
+
if (success) {
|
|
151
|
+
console.log("Certificado generado exitosamente:", cert);
|
|
152
|
+
}
|
|
146
153
|
} catch (error) {
|
|
147
154
|
if (error.name === "ApacuanaAPIError") {
|
|
148
155
|
console.error(`Error de API (${error.code}):`, error.message);
|
|
@@ -152,7 +159,7 @@ try {
|
|
|
152
159
|
}
|
|
153
160
|
```
|
|
154
161
|
|
|
155
|
-
### getCertStatus()
|
|
162
|
+
### getCertStatus(isCertificateInDevice)
|
|
156
163
|
|
|
157
164
|
Obtiene el estado actual del certificado del usuario.
|
|
158
165
|
|
|
@@ -160,19 +167,59 @@ Obtiene el estado actual del certificado del usuario.
|
|
|
160
167
|
|
|
161
168
|
**Retorna:**
|
|
162
169
|
|
|
163
|
-
-
|
|
170
|
+
- Un objeto que contiene:
|
|
171
|
+
- `status` (String): El estado del certificado (ver sección de Estados de Certificado).
|
|
172
|
+
- `success` (Boolean): Indicador de éxito de la operación.
|
|
164
173
|
|
|
165
174
|
**Ejemplo:**
|
|
166
175
|
|
|
167
176
|
```javascript
|
|
168
177
|
try {
|
|
169
|
-
const status =
|
|
170
|
-
|
|
178
|
+
const { status, success } = apacuana.getCertStatus(true);
|
|
179
|
+
if (success) {
|
|
180
|
+
console.log("Estado del certificado:", status);
|
|
181
|
+
}
|
|
171
182
|
} catch (error) {
|
|
172
183
|
console.error("Error al obtener estado del certificado:", error);
|
|
173
184
|
}
|
|
174
185
|
```
|
|
175
186
|
|
|
187
|
+
### signDocument(signData)
|
|
188
|
+
|
|
189
|
+
Esta función está actualmente deshabilitada y lanzará un error si se invoca.
|
|
190
|
+
|
|
191
|
+
**Parámetros:**
|
|
192
|
+
|
|
193
|
+
- `signData` (Object): Datos para la firma.
|
|
194
|
+
|
|
195
|
+
**Retorna:**
|
|
196
|
+
|
|
197
|
+
- `Promise<void>`
|
|
198
|
+
|
|
199
|
+
**Posibles `ApacuanaAPIError`:**
|
|
200
|
+
|
|
201
|
+
- `NOT_IMPLEMENTED`: La función no está implementada para el tipo de integración.
|
|
202
|
+
|
|
203
|
+
### getDigest(signData)
|
|
204
|
+
|
|
205
|
+
Obtiene el digest de un documento que se va a firmar.
|
|
206
|
+
|
|
207
|
+
- **Parámetros:**
|
|
208
|
+
|
|
209
|
+
- `signData` (Object): Objeto que contiene los datos para la firma.
|
|
210
|
+
- `cert` (String): Certificado en formato PEM.
|
|
211
|
+
- `signatureId` (String): Identificador único de la firma.
|
|
212
|
+
|
|
213
|
+
- **Retorna:** `Promise<object>` - Un objeto que contiene:
|
|
214
|
+
|
|
215
|
+
- `digest` (String): El digest del documento a firmar.
|
|
216
|
+
- `success` (Boolean): Indicador de éxito de la operación.
|
|
217
|
+
|
|
218
|
+
- **Posibles `ApacuanaAPIError`:**
|
|
219
|
+
- `INVALID_PARAMETER`: Si `cert` o `signatureId` no son válidos.
|
|
220
|
+
- `API_RESPONSE_ERROR`: Si la API no devuelve un digest.
|
|
221
|
+
- `NOT_IMPLEMENTED`: Si se llama con un `integrationType` no soportado.
|
|
222
|
+
|
|
176
223
|
### requestRevocation(reasonCode)
|
|
177
224
|
|
|
178
225
|
Solicita la revocación de un certificado.
|
|
@@ -196,8 +243,6 @@ try {
|
|
|
196
243
|
}
|
|
197
244
|
```
|
|
198
245
|
|
|
199
|
-
// ... existing code ...
|
|
200
|
-
|
|
201
246
|
#### `getDocs(data)`
|
|
202
247
|
|
|
203
248
|
Obtiene una lista de documentos paginada. El comportamiento de esta función varía según el `integrationType` configurado.
|
|
@@ -213,7 +258,11 @@ Obtiene una lista de documentos paginada. El comportamiento de esta función var
|
|
|
213
258
|
- `1`: Firmado
|
|
214
259
|
- `2`: En proceso
|
|
215
260
|
|
|
216
|
-
- **Retorna:** `Promise<object>` - Un objeto que contiene
|
|
261
|
+
- **Retorna:** `Promise<object>` - Un objeto que contiene:
|
|
262
|
+
|
|
263
|
+
- `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.
|
|
265
|
+
- `success` (Boolean): Indicador de éxito de la operación.
|
|
217
266
|
|
|
218
267
|
- **Comportamiento por `integrationType`:**
|
|
219
268
|
|
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="1756138288119" clover="3.2.0">
|
|
3
|
+
<project timestamp="1756138288119" name="All files">
|
|
4
|
+
<metrics statements="268" coveredstatements="119" conditionals="207" coveredconditionals="38" methods="36" coveredmethods="13" elements="511" coveredelements="170" complexity="0" loc="268" ncloc="268" 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,111 +24,142 @@
|
|
|
24
24
|
</file>
|
|
25
25
|
</package>
|
|
26
26
|
<package name="src.api">
|
|
27
|
-
<metrics statements="
|
|
27
|
+
<metrics statements="124" coveredstatements="81" conditionals="66" coveredconditionals="34" methods="18" coveredmethods="11"/>
|
|
28
28
|
<file name="certs.js" path="/builds/3dlinkweb/apacuana/libs/apacuana-sdk-core/main/src/api/certs.js">
|
|
29
|
-
<metrics statements="
|
|
29
|
+
<metrics statements="25" coveredstatements="25" conditionals="11" coveredconditionals="8" methods="4" coveredmethods="4"/>
|
|
30
30
|
<line num="7" count="2" type="cond" truecount="0" falsecount="1"/>
|
|
31
|
-
<line num="8" count="
|
|
32
|
-
<line num="9" count="
|
|
33
|
-
<line num="11" count="
|
|
31
|
+
<line num="8" count="4" type="stmt"/>
|
|
32
|
+
<line num="9" count="4" type="stmt"/>
|
|
33
|
+
<line num="11" count="4" type="stmt"/>
|
|
34
34
|
<line num="16" count="2" type="stmt"/>
|
|
35
35
|
<line num="17" count="2" type="cond" truecount="2" falsecount="0"/>
|
|
36
36
|
<line num="18" count="1" type="stmt"/>
|
|
37
37
|
<line num="25" count="1" type="stmt"/>
|
|
38
|
-
<line num="28" count="
|
|
39
|
-
<line num="29" count="
|
|
40
|
-
<line num="31" count="
|
|
41
|
-
<line num="35" count="2" type="
|
|
42
|
-
<line num="36" count="
|
|
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="
|
|
38
|
+
<line num="28" count="3" type="cond" truecount="2" falsecount="0"/>
|
|
39
|
+
<line num="29" count="2" type="stmt"/>
|
|
40
|
+
<line num="31" count="1" type="stmt"/>
|
|
41
|
+
<line num="35" count="2" type="stmt"/>
|
|
42
|
+
<line num="36" count="1" type="stmt"/>
|
|
43
|
+
<line num="50" count="2" type="cond" truecount="0" falsecount="1"/>
|
|
44
|
+
<line num="51" count="6" type="stmt"/>
|
|
45
|
+
<line num="52" count="6" type="stmt"/>
|
|
46
|
+
<line num="53" count="6" type="cond" truecount="2" falsecount="0"/>
|
|
47
|
+
<line num="54" count="4" type="stmt"/>
|
|
48
|
+
<line num="56" count="2" type="cond" truecount="2" falsecount="0"/>
|
|
49
|
+
<line num="57" count="1" type="stmt"/>
|
|
50
|
+
<line num="60" count="1" type="stmt"/>
|
|
51
|
+
<line num="72" count="2" type="cond" truecount="0" falsecount="1"/>
|
|
52
|
+
<line num="73" count="1" type="stmt"/>
|
|
53
|
+
<line num="74" count="1" type="stmt"/>
|
|
54
|
+
<line num="78" count="1" type="stmt"/>
|
|
54
55
|
</file>
|
|
55
56
|
<file name="revocations.js" path="/builds/3dlinkweb/apacuana/libs/apacuana-sdk-core/main/src/api/revocations.js">
|
|
56
57
|
<metrics statements="12" coveredstatements="1" conditionals="8" coveredconditionals="0" methods="1" coveredmethods="0"/>
|
|
57
|
-
<line num="
|
|
58
|
+
<line num="9" count="1" type="stmt"/>
|
|
59
|
+
<line num="10" count="0" type="stmt"/>
|
|
58
60
|
<line num="11" count="0" type="stmt"/>
|
|
59
|
-
<line num="
|
|
60
|
-
<line num="16" count="0" type="
|
|
61
|
-
<line num="
|
|
61
|
+
<line num="15" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
62
|
+
<line num="16" count="0" type="stmt"/>
|
|
63
|
+
<line num="21" count="0" type="stmt"/>
|
|
62
64
|
<line num="22" count="0" type="stmt"/>
|
|
63
|
-
<line num="
|
|
64
|
-
<line num="28" count="0" type="
|
|
65
|
-
<line num="29" count="0" type="
|
|
66
|
-
<line num="
|
|
67
|
-
<line num="
|
|
68
|
-
<line num="39" count="0" type="stmt"/>
|
|
65
|
+
<line num="27" count="0" type="stmt"/>
|
|
66
|
+
<line num="28" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
67
|
+
<line num="29" count="0" type="stmt"/>
|
|
68
|
+
<line num="33" count="0" type="stmt"/>
|
|
69
|
+
<line num="38" count="0" type="stmt"/>
|
|
69
70
|
</file>
|
|
70
71
|
<file name="signatures.js" path="/builds/3dlinkweb/apacuana/libs/apacuana-sdk-core/main/src/api/signatures.js">
|
|
71
|
-
<metrics statements="
|
|
72
|
-
<line num="
|
|
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="
|
|
83
|
-
<line num="
|
|
84
|
-
<line num="
|
|
85
|
-
<line num="
|
|
86
|
-
<line num="
|
|
87
|
-
<line num="
|
|
88
|
-
<line num="
|
|
89
|
-
<line num="
|
|
90
|
-
<line num="
|
|
91
|
-
<line num="
|
|
92
|
-
<line num="
|
|
93
|
-
<line num="
|
|
94
|
-
<line num="
|
|
95
|
-
<line num="
|
|
96
|
-
<line num="
|
|
97
|
-
<line num="
|
|
98
|
-
<line num="
|
|
72
|
+
<metrics statements="74" coveredstatements="42" conditionals="35" coveredconditionals="15" methods="12" coveredmethods="6"/>
|
|
73
|
+
<line num="8" count="2" type="stmt"/>
|
|
74
|
+
<line num="9" count="0" type="stmt"/>
|
|
75
|
+
<line num="16" count="2" type="stmt"/>
|
|
76
|
+
<line num="17" count="0" type="stmt"/>
|
|
77
|
+
<line num="30" count="2" type="stmt"/>
|
|
78
|
+
<line num="31" count="0" type="stmt"/>
|
|
79
|
+
<line num="33" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
80
|
+
<line num="34" count="0" type="stmt"/>
|
|
81
|
+
<line num="37" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
82
|
+
<line num="38" count="0" type="stmt"/>
|
|
83
|
+
<line num="41" count="0" type="stmt"/>
|
|
84
|
+
<line num="48" count="2" type="stmt"/>
|
|
85
|
+
<line num="49" count="0" type="stmt"/>
|
|
86
|
+
<line num="50" count="0" type="stmt"/>
|
|
87
|
+
<line num="57" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
88
|
+
<line num="58" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
89
|
+
<line num="59" count="0" type="stmt"/>
|
|
90
|
+
<line num="66" count="0" type="stmt"/>
|
|
91
|
+
<line num="68" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
92
|
+
<line num="69" count="0" type="stmt"/>
|
|
93
|
+
<line num="71" count="0" type="stmt"/>
|
|
94
|
+
<line num="77" count="2" type="stmt"/>
|
|
95
|
+
<line num="78" count="0" type="stmt"/>
|
|
96
|
+
<line num="91" count="2" type="stmt"/>
|
|
97
|
+
<line num="92" count="0" type="stmt"/>
|
|
98
|
+
<line num="94" count="0" type="stmt"/>
|
|
99
|
+
<line num="96" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
100
|
+
<line num="97" count="0" type="stmt"/>
|
|
101
|
+
<line num="100" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
102
|
+
<line num="101" count="0" type="stmt"/>
|
|
103
|
+
<line num="104" count="0" type="stmt"/>
|
|
104
|
+
<line num="111" count="2" type="stmt"/>
|
|
105
|
+
<line num="112" count="1" type="stmt"/>
|
|
106
|
+
<line num="113" count="1" type="stmt"/>
|
|
107
|
+
<line num="115" count="1" type="stmt"/>
|
|
108
|
+
<line num="116" count="1" type="stmt"/>
|
|
109
|
+
<line num="118" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
110
|
+
<line num="119" count="0" type="stmt"/>
|
|
111
|
+
<line num="121" count="0" type="stmt"/>
|
|
112
|
+
<line num="127" count="2" type="stmt"/>
|
|
113
|
+
<line num="128" count="1" type="stmt"/>
|
|
114
|
+
<line num="141" count="2" type="stmt"/>
|
|
115
|
+
<line num="142" count="4" type="cond" truecount="2" falsecount="0"/>
|
|
116
|
+
<line num="147" count="1" type="stmt"/>
|
|
117
|
+
<line num="154" count="3" type="stmt"/>
|
|
118
|
+
<line num="156" count="3" type="cond" truecount="2" falsecount="0"/>
|
|
119
|
+
<line num="157" count="1" type="stmt"/>
|
|
120
|
+
<line num="160" count="2" type="cond" truecount="2" falsecount="0"/>
|
|
121
|
+
<line num="161" count="1" type="stmt"/>
|
|
122
|
+
<line num="164" count="1" type="stmt"/>
|
|
123
|
+
<line num="171" count="2" type="stmt"/>
|
|
124
|
+
<line num="172" count="1" type="stmt"/>
|
|
125
|
+
<line num="179" count="2" type="stmt"/>
|
|
126
|
+
<line num="180" count="2" type="stmt"/>
|
|
127
|
+
<line num="181" count="2" type="cond" truecount="2" falsecount="0"/>
|
|
128
|
+
<line num="182" count="1" type="stmt"/>
|
|
129
|
+
<line num="189" count="1" type="stmt"/>
|
|
130
|
+
<line num="190" count="1" type="stmt"/>
|
|
131
|
+
<line num="196" count="1" type="cond" truecount="1" falsecount="1"/>
|
|
99
132
|
<line num="197" count="1" type="stmt"/>
|
|
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="
|
|
133
|
+
<line num="200" count="1" type="stmt"/>
|
|
134
|
+
<line num="201" count="1" type="stmt"/>
|
|
135
|
+
<line num="202" count="1" type="stmt"/>
|
|
136
|
+
<line num="208" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
137
|
+
<line num="209" count="0" type="stmt"/>
|
|
138
|
+
<line num="211" count="0" type="stmt"/>
|
|
139
|
+
<line num="223" count="2" type="stmt"/>
|
|
140
|
+
<line num="224" count="5" type="stmt"/>
|
|
141
|
+
<line num="226" count="3" type="stmt"/>
|
|
142
|
+
<line num="228" count="3" type="cond" truecount="2" falsecount="0"/>
|
|
143
|
+
<line num="229" count="2" type="stmt"/>
|
|
144
|
+
<line num="232" count="1" type="cond" truecount="1" falsecount="1"/>
|
|
145
|
+
<line num="233" count="1" type="stmt"/>
|
|
146
|
+
<line num="236" count="0" type="stmt"/>
|
|
112
147
|
</file>
|
|
113
148
|
<file name="users.js" path="/builds/3dlinkweb/apacuana/libs/apacuana-sdk-core/main/src/api/users.js">
|
|
114
|
-
<metrics statements="
|
|
149
|
+
<metrics statements="13" coveredstatements="13" conditionals="12" coveredconditionals="11" methods="1" coveredmethods="1"/>
|
|
115
150
|
<line num="14" count="1" type="stmt"/>
|
|
116
151
|
<line num="15" count="5" type="stmt"/>
|
|
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="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"/>
|
|
152
|
+
<line num="17" count="5" type="cond" truecount="4" falsecount="0"/>
|
|
153
|
+
<line num="18" count="1" type="stmt"/>
|
|
154
|
+
<line num="25" count="4" type="stmt"/>
|
|
155
|
+
<line num="30" count="4" type="stmt"/>
|
|
156
|
+
<line num="31" count="4" type="stmt"/>
|
|
157
|
+
<line num="37" count="2" type="cond" truecount="4" falsecount="0"/>
|
|
158
|
+
<line num="38" count="1" type="stmt"/>
|
|
159
|
+
<line num="45" count="1" type="stmt"/>
|
|
160
|
+
<line num="51" count="3" type="cond" truecount="2" falsecount="0"/>
|
|
161
|
+
<line num="52" count="2" type="stmt"/>
|
|
162
|
+
<line num="54" count="1" type="stmt"/>
|
|
132
163
|
</file>
|
|
133
164
|
</package>
|
|
134
165
|
<package name="src.config">
|
|
@@ -151,42 +182,42 @@
|
|
|
151
182
|
<metrics statements="7" coveredstatements="7" conditionals="4" coveredconditionals="3" methods="1" coveredmethods="1"/>
|
|
152
183
|
<file name="index.js" path="/builds/3dlinkweb/apacuana/libs/apacuana-sdk-core/main/src/errors/index.js">
|
|
153
184
|
<metrics statements="7" coveredstatements="7" conditionals="4" coveredconditionals="3" methods="1" coveredmethods="1"/>
|
|
154
|
-
<line num="8" count="
|
|
155
|
-
<line num="9" count="
|
|
156
|
-
<line num="10" count="
|
|
157
|
-
<line num="11" count="
|
|
158
|
-
<line num="12" count="
|
|
159
|
-
<line num="15" count="
|
|
160
|
-
<line num="16" count="
|
|
185
|
+
<line num="8" count="21" type="stmt"/>
|
|
186
|
+
<line num="9" count="21" type="stmt"/>
|
|
187
|
+
<line num="10" count="21" type="stmt"/>
|
|
188
|
+
<line num="11" count="21" type="stmt"/>
|
|
189
|
+
<line num="12" count="21" type="stmt"/>
|
|
190
|
+
<line num="15" count="21" type="cond" truecount="1" falsecount="1"/>
|
|
191
|
+
<line num="16" count="21" type="stmt"/>
|
|
161
192
|
</file>
|
|
162
193
|
</package>
|
|
163
194
|
<package name="src.utils">
|
|
164
|
-
<metrics statements="
|
|
195
|
+
<metrics statements="112" coveredstatements="14" conditionals="126" coveredconditionals="0" methods="14" coveredmethods="0"/>
|
|
165
196
|
<file name="constant.js" path="/builds/3dlinkweb/apacuana/libs/apacuana-sdk-core/main/src/utils/constant.js">
|
|
166
197
|
<metrics statements="3" coveredstatements="3" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
|
|
167
|
-
<line num="1" count="
|
|
168
|
-
<line num="12" count="
|
|
169
|
-
<line num="17" count="
|
|
198
|
+
<line num="1" count="6" type="stmt"/>
|
|
199
|
+
<line num="12" count="6" type="stmt"/>
|
|
200
|
+
<line num="17" count="6" type="stmt"/>
|
|
170
201
|
</file>
|
|
171
202
|
<file name="helpers.js" path="/builds/3dlinkweb/apacuana/libs/apacuana-sdk-core/main/src/utils/helpers.js">
|
|
172
|
-
<metrics statements="
|
|
203
|
+
<metrics statements="63" coveredstatements="8" conditionals="86" coveredconditionals="0" methods="9" coveredmethods="0"/>
|
|
173
204
|
<line num="6" count="2" type="stmt"/>
|
|
174
205
|
<line num="8" count="2" type="stmt"/>
|
|
175
|
-
<line num="9" count="
|
|
206
|
+
<line num="9" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
176
207
|
<line num="10" count="0" type="stmt"/>
|
|
177
|
-
<line num="12" count="
|
|
208
|
+
<line num="12" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
178
209
|
<line num="13" count="0" type="stmt"/>
|
|
179
|
-
<line num="18" count="
|
|
210
|
+
<line num="18" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
180
211
|
<line num="19" count="0" type="stmt"/>
|
|
181
|
-
<line num="20" count="
|
|
212
|
+
<line num="20" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
182
213
|
<line num="27" count="0" type="stmt"/>
|
|
183
|
-
<line num="29" count="
|
|
214
|
+
<line num="29" count="0" type="cond" truecount="0" falsecount="4"/>
|
|
184
215
|
<line num="30" count="0" type="stmt"/>
|
|
185
|
-
<line num="31" count="
|
|
216
|
+
<line num="31" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
186
217
|
<line num="35" count="0" type="stmt"/>
|
|
187
|
-
<line num="37" count="
|
|
188
|
-
<line num="38" count="
|
|
189
|
-
<line num="40" count="
|
|
218
|
+
<line num="37" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
219
|
+
<line num="38" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
220
|
+
<line num="40" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
190
221
|
<line num="42" count="0" type="stmt"/>
|
|
191
222
|
<line num="46" count="2" type="stmt"/>
|
|
192
223
|
<line num="47" count="0" type="stmt"/>
|
|
@@ -195,9 +226,9 @@
|
|
|
195
226
|
<line num="53" count="0" type="stmt"/>
|
|
196
227
|
<line num="54" count="0" type="stmt"/>
|
|
197
228
|
<line num="55" count="0" type="stmt"/>
|
|
198
|
-
<line num="58" count="2" type="cond" truecount="
|
|
199
|
-
<line num="59" count="
|
|
200
|
-
<line num="65" count="
|
|
229
|
+
<line num="58" count="2" type="cond" truecount="0" falsecount="1"/>
|
|
230
|
+
<line num="59" count="0" type="stmt"/>
|
|
231
|
+
<line num="65" count="0" type="stmt"/>
|
|
201
232
|
<line num="68" count="2" type="stmt"/>
|
|
202
233
|
<line num="69" count="0" type="cond" truecount="0" falsecount="4"/>
|
|
203
234
|
<line num="70" count="0" type="stmt"/>
|
|
@@ -218,18 +249,21 @@
|
|
|
218
249
|
<line num="134" count="0" type="cond" truecount="0" falsecount="5"/>
|
|
219
250
|
<line num="135" count="0" type="stmt"/>
|
|
220
251
|
<line num="146" count="2" type="stmt"/>
|
|
221
|
-
<line num="147" count="
|
|
222
|
-
<line num="149" count="
|
|
223
|
-
<line num="150" count="
|
|
224
|
-
<line num="157" count="
|
|
225
|
-
<line num="158" count="
|
|
226
|
-
<line num="165" count="
|
|
227
|
-
<line num="166" count="
|
|
252
|
+
<line num="147" count="0" type="stmt"/>
|
|
253
|
+
<line num="149" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
254
|
+
<line num="150" count="0" type="stmt"/>
|
|
255
|
+
<line num="157" count="0" type="cond" truecount="0" falsecount="4"/>
|
|
256
|
+
<line num="158" count="0" type="stmt"/>
|
|
257
|
+
<line num="165" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
258
|
+
<line num="166" count="0" type="stmt"/>
|
|
228
259
|
<line num="174" count="2" type="stmt"/>
|
|
229
260
|
<line num="175" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
230
261
|
<line num="180" count="0" type="stmt"/>
|
|
231
262
|
<line num="187" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
232
263
|
<line num="191" count="0" type="stmt"/>
|
|
264
|
+
<line num="199" count="2" type="stmt"/>
|
|
265
|
+
<line num="200" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
266
|
+
<line num="207" count="0" type="stmt"/>
|
|
233
267
|
</file>
|
|
234
268
|
<file name="httpClient.js" path="/builds/3dlinkweb/apacuana/libs/apacuana-sdk-core/main/src/utils/httpClient.js">
|
|
235
269
|
<metrics statements="46" coveredstatements="3" conditionals="40" coveredconditionals="0" methods="5" coveredmethods="0"/>
|