apacuana-sdk-core 1.26.3 → 1.26.4
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/coverage/clover.xml +125 -123
- package/coverage/coverage-final.json +2 -2
- package/coverage/lcov-report/index.html +13 -13
- package/coverage/lcov-report/src/api/certs.js.html +1 -1
- package/coverage/lcov-report/src/api/faceLiveness.js.html +1 -1
- package/coverage/lcov-report/src/api/index.html +1 -1
- package/coverage/lcov-report/src/api/revocations.js.html +1 -1
- package/coverage/lcov-report/src/api/signatures.js.html +10 -4
- package/coverage/lcov-report/src/api/users.js.html +1 -1
- 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 +1 -1
- package/coverage/lcov-report/src/success/index.html +1 -1
- package/coverage/lcov-report/src/success/index.js.html +1 -1
- package/coverage/lcov-report/src/utils/constant.js.html +1 -1
- package/coverage/lcov-report/src/utils/helpers.js.html +1 -1
- package/coverage/lcov-report/src/utils/httpClient.js.html +51 -9
- package/coverage/lcov-report/src/utils/index.html +12 -12
- package/coverage/lcov.info +218 -213
- package/dist/index.js +17 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -4
- package/dist/index.mjs.map +1 -1
- package/dist/utils/httpClient.d.ts +3 -1
- package/package.json +1 -1
- package/src/api/signatures.js +4 -2
- package/src/utils/httpClient.js +16 -2
- package/tests/api/signatures.test.js +4 -2
- package/tests/integration/createAndLockDocument.test.js +3 -2
|
@@ -23,16 +23,16 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">55.85% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>358/
|
|
28
|
+
<span class='fraction'>358/641</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">33.
|
|
33
|
+
<span class="strong">33.04% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>155/
|
|
35
|
+
<span class='fraction'>155/469</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">56.
|
|
47
|
+
<span class="strong">56.02% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>358/
|
|
49
|
+
<span class='fraction'>358/639</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -155,17 +155,17 @@
|
|
|
155
155
|
|
|
156
156
|
<tr>
|
|
157
157
|
<td class="file low" data-value="src/utils"><a href="src/utils/index.html">src/utils</a></td>
|
|
158
|
-
<td data-value="9.
|
|
158
|
+
<td data-value="9.64" class="pic low">
|
|
159
159
|
<div class="chart"><div class="cover-fill" style="width: 9%"></div><div class="cover-empty" style="width: 91%"></div></div>
|
|
160
160
|
</td>
|
|
161
|
-
<td data-value="9.
|
|
162
|
-
<td data-value="
|
|
161
|
+
<td data-value="9.64" class="pct low">9.64%</td>
|
|
162
|
+
<td data-value="197" class="abs low">19/197</td>
|
|
163
163
|
<td data-value="0" class="pct low">0%</td>
|
|
164
|
-
<td data-value="
|
|
164
|
+
<td data-value="233" class="abs low">0/233</td>
|
|
165
165
|
<td data-value="0" class="pct low">0%</td>
|
|
166
166
|
<td data-value="23" class="abs low">0/23</td>
|
|
167
|
-
<td data-value="9.
|
|
168
|
-
<td data-value="
|
|
167
|
+
<td data-value="9.69" class="pct low">9.69%</td>
|
|
168
|
+
<td data-value="196" class="abs low">19/196</td>
|
|
169
169
|
</tr>
|
|
170
170
|
|
|
171
171
|
</tbody>
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
177
177
|
Code coverage generated by
|
|
178
178
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
179
|
-
at 2026-06-
|
|
179
|
+
at 2026-06-17T20:28:28.937Z
|
|
180
180
|
</div>
|
|
181
181
|
<script src="prettify.js"></script>
|
|
182
182
|
<script>
|
|
@@ -1018,7 +1018,7 @@ export const requestCertificate = async (params) => {
|
|
|
1018
1018
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1019
1019
|
Code coverage generated by
|
|
1020
1020
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
1021
|
-
at 2026-06-
|
|
1021
|
+
at 2026-06-17T20:28:28.937Z
|
|
1022
1022
|
</div>
|
|
1023
1023
|
<script src="../../prettify.js"></script>
|
|
1024
1024
|
<script>
|
|
@@ -274,7 +274,7 @@ export const sendFaceLiveness = async ({ faceLiveness, documentprefid }) => {
|
|
|
274
274
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
275
275
|
Code coverage generated by
|
|
276
276
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
277
|
-
at 2026-06-
|
|
277
|
+
at 2026-06-17T20:28:28.937Z
|
|
278
278
|
</div>
|
|
279
279
|
<script src="../../prettify.js"></script>
|
|
280
280
|
<script>
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
162
162
|
Code coverage generated by
|
|
163
163
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
164
|
-
at 2026-06-
|
|
164
|
+
at 2026-06-17T20:28:28.937Z
|
|
165
165
|
</div>
|
|
166
166
|
<script src="../../prettify.js"></script>
|
|
167
167
|
<script>
|
|
@@ -397,7 +397,7 @@ export const getRevocationReasons = async () => {
|
|
|
397
397
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
398
398
|
Code coverage generated by
|
|
399
399
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
400
|
-
at 2026-06-
|
|
400
|
+
at 2026-06-17T20:28:28.937Z
|
|
401
401
|
</div>
|
|
402
402
|
<script src="../../prettify.js"></script>
|
|
403
403
|
<script>
|
|
@@ -705,7 +705,9 @@
|
|
|
705
705
|
<a name='L640'></a><a href='#L640'>640</a>
|
|
706
706
|
<a name='L641'></a><a href='#L641'>641</a>
|
|
707
707
|
<a name='L642'></a><a href='#L642'>642</a>
|
|
708
|
-
<a name='L643'></a><a href='#L643'>643</a
|
|
708
|
+
<a name='L643'></a><a href='#L643'>643</a>
|
|
709
|
+
<a name='L644'></a><a href='#L644'>644</a>
|
|
710
|
+
<a name='L645'></a><a href='#L645'>645</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
709
711
|
<span class="cline-any cline-neutral"> </span>
|
|
710
712
|
<span class="cline-any cline-neutral"> </span>
|
|
711
713
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -987,6 +989,7 @@
|
|
|
987
989
|
<span class="cline-any cline-neutral"> </span>
|
|
988
990
|
<span class="cline-any cline-neutral"> </span>
|
|
989
991
|
<span class="cline-any cline-neutral"> </span>
|
|
992
|
+
<span class="cline-any cline-neutral"> </span>
|
|
990
993
|
<span class="cline-any cline-yes">1x</span>
|
|
991
994
|
<span class="cline-any cline-neutral"> </span>
|
|
992
995
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -1016,6 +1019,7 @@
|
|
|
1016
1019
|
<span class="cline-any cline-neutral"> </span>
|
|
1017
1020
|
<span class="cline-any cline-neutral"> </span>
|
|
1018
1021
|
<span class="cline-any cline-neutral"> </span>
|
|
1022
|
+
<span class="cline-any cline-neutral"> </span>
|
|
1019
1023
|
<span class="cline-any cline-yes">1x</span>
|
|
1020
1024
|
<span class="cline-any cline-neutral"> </span>
|
|
1021
1025
|
<span class="cline-any cline-yes">1x</span>
|
|
@@ -1627,7 +1631,8 @@ const createDocumentOnBoarding = async (documentData) => {
|
|
|
1627
1631
|
const response = await httpRequest(
|
|
1628
1632
|
"services/api/documents",
|
|
1629
1633
|
formData,
|
|
1630
|
-
"POST"
|
|
1634
|
+
"POST",
|
|
1635
|
+
{ skipAuth: true }
|
|
1631
1636
|
);
|
|
1632
1637
|
return new ApacuanaSuccess({
|
|
1633
1638
|
msg: response.msg,
|
|
@@ -1656,7 +1661,8 @@ const lockDocumentOnBoarding = async (documentId) => {
|
|
|
1656
1661
|
const response = await httpRequest(
|
|
1657
1662
|
`services/api/documents/lock/${documentId}`,
|
|
1658
1663
|
{},
|
|
1659
|
-
"PUT"
|
|
1664
|
+
"PUT",
|
|
1665
|
+
{ skipAuth: true }
|
|
1660
1666
|
);
|
|
1661
1667
|
return new ApacuanaSuccess(response);
|
|
1662
1668
|
} catch (error) {
|
|
@@ -1996,7 +2002,7 @@ export const lockDocument = async (documentId) => {
|
|
|
1996
2002
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1997
2003
|
Code coverage generated by
|
|
1998
2004
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
1999
|
-
at 2026-06-
|
|
2005
|
+
at 2026-06-17T20:28:28.937Z
|
|
2000
2006
|
</div>
|
|
2001
2007
|
<script src="../../prettify.js"></script>
|
|
2002
2008
|
<script>
|
|
@@ -451,7 +451,7 @@ export const createApacuanaUser = <span class="fstat-no" title="function not cov
|
|
|
451
451
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
452
452
|
Code coverage generated by
|
|
453
453
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
454
|
-
at 2026-06-
|
|
454
|
+
at 2026-06-17T20:28:28.937Z
|
|
455
455
|
</div>
|
|
456
456
|
<script src="../../prettify.js"></script>
|
|
457
457
|
<script>
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at 2026-06-
|
|
104
|
+
at 2026-06-17T20:28:28.937Z
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -241,7 +241,7 @@ export const close = <span class="fstat-no" title="function not covered" >()</sp
|
|
|
241
241
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
242
242
|
Code coverage generated by
|
|
243
243
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
244
|
-
at 2026-06-
|
|
244
|
+
at 2026-06-17T20:28:28.937Z
|
|
245
245
|
</div>
|
|
246
246
|
<script src="../../prettify.js"></script>
|
|
247
247
|
<script>
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at 2026-06-
|
|
104
|
+
at 2026-06-17T20:28:28.937Z
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -133,7 +133,7 @@ export default ApacuanaAPIError;
|
|
|
133
133
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
134
134
|
Code coverage generated by
|
|
135
135
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
136
|
-
at 2026-06-
|
|
136
|
+
at 2026-06-17T20:28:28.937Z
|
|
137
137
|
</div>
|
|
138
138
|
<script src="../../prettify.js"></script>
|
|
139
139
|
<script>
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at 2026-06-
|
|
104
|
+
at 2026-06-17T20:28:28.937Z
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -607,7 +607,7 @@ export default apacuana;
|
|
|
607
607
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
608
608
|
Code coverage generated by
|
|
609
609
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
610
|
-
at 2026-06-
|
|
610
|
+
at 2026-06-17T20:28:28.937Z
|
|
611
611
|
</div>
|
|
612
612
|
<script src="../prettify.js"></script>
|
|
613
613
|
<script>
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at 2026-06-
|
|
104
|
+
at 2026-06-17T20:28:28.937Z
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
92
92
|
Code coverage generated by
|
|
93
93
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
94
|
-
at 2026-06-
|
|
94
|
+
at 2026-06-17T20:28:28.937Z
|
|
95
95
|
</div>
|
|
96
96
|
<script src="../../prettify.js"></script>
|
|
97
97
|
<script>
|
|
@@ -247,7 +247,7 @@ export const INTEGRATION_TYPE = {
|
|
|
247
247
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
248
248
|
Code coverage generated by
|
|
249
249
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
250
|
-
at 2026-06-
|
|
250
|
+
at 2026-06-17T20:28:28.937Z
|
|
251
251
|
</div>
|
|
252
252
|
<script src="../../prettify.js"></script>
|
|
253
253
|
<script>
|
|
@@ -1438,7 +1438,7 @@ export default {
|
|
|
1438
1438
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1439
1439
|
Code coverage generated by
|
|
1440
1440
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
1441
|
-
at 2026-06-
|
|
1441
|
+
at 2026-06-17T20:28:28.937Z
|
|
1442
1442
|
</div>
|
|
1443
1443
|
<script src="../../prettify.js"></script>
|
|
1444
1444
|
<script>
|
|
@@ -23,16 +23,16 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">5.
|
|
26
|
+
<span class="strong">5.55% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>3/
|
|
28
|
+
<span class='fraction'>3/54</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
33
|
<span class="strong">0% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>0/
|
|
35
|
+
<span class='fraction'>0/52</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">5.
|
|
47
|
+
<span class="strong">5.55% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>3/
|
|
49
|
+
<span class='fraction'>3/54</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -242,7 +242,21 @@
|
|
|
242
242
|
<a name='L177'></a><a href='#L177'>177</a>
|
|
243
243
|
<a name='L178'></a><a href='#L178'>178</a>
|
|
244
244
|
<a name='L179'></a><a href='#L179'>179</a>
|
|
245
|
-
<a name='L180'></a><a href='#L180'>180</a
|
|
245
|
+
<a name='L180'></a><a href='#L180'>180</a>
|
|
246
|
+
<a name='L181'></a><a href='#L181'>181</a>
|
|
247
|
+
<a name='L182'></a><a href='#L182'>182</a>
|
|
248
|
+
<a name='L183'></a><a href='#L183'>183</a>
|
|
249
|
+
<a name='L184'></a><a href='#L184'>184</a>
|
|
250
|
+
<a name='L185'></a><a href='#L185'>185</a>
|
|
251
|
+
<a name='L186'></a><a href='#L186'>186</a>
|
|
252
|
+
<a name='L187'></a><a href='#L187'>187</a>
|
|
253
|
+
<a name='L188'></a><a href='#L188'>188</a>
|
|
254
|
+
<a name='L189'></a><a href='#L189'>189</a>
|
|
255
|
+
<a name='L190'></a><a href='#L190'>190</a>
|
|
256
|
+
<a name='L191'></a><a href='#L191'>191</a>
|
|
257
|
+
<a name='L192'></a><a href='#L192'>192</a>
|
|
258
|
+
<a name='L193'></a><a href='#L193'>193</a>
|
|
259
|
+
<a name='L194'></a><a href='#L194'>194</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
246
260
|
<span class="cline-any cline-neutral"> </span>
|
|
247
261
|
<span class="cline-any cline-neutral"> </span>
|
|
248
262
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -361,7 +375,14 @@
|
|
|
361
375
|
<span class="cline-any cline-neutral"> </span>
|
|
362
376
|
<span class="cline-any cline-neutral"> </span>
|
|
363
377
|
<span class="cline-any cline-neutral"> </span>
|
|
378
|
+
<span class="cline-any cline-neutral"> </span>
|
|
379
|
+
<span class="cline-any cline-neutral"> </span>
|
|
364
380
|
<span class="cline-any cline-yes">3x</span>
|
|
381
|
+
<span class="cline-any cline-neutral"> </span>
|
|
382
|
+
<span class="cline-any cline-neutral"> </span>
|
|
383
|
+
<span class="cline-any cline-neutral"> </span>
|
|
384
|
+
<span class="cline-any cline-neutral"> </span>
|
|
385
|
+
<span class="cline-any cline-neutral"> </span>
|
|
365
386
|
<span class="cline-any cline-no"> </span>
|
|
366
387
|
<span class="cline-any cline-no"> </span>
|
|
367
388
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -375,6 +396,10 @@
|
|
|
375
396
|
<span class="cline-any cline-no"> </span>
|
|
376
397
|
<span class="cline-any cline-no"> </span>
|
|
377
398
|
<span class="cline-any cline-neutral"> </span>
|
|
399
|
+
<span class="cline-any cline-neutral"> </span>
|
|
400
|
+
<span class="cline-any cline-no"> </span>
|
|
401
|
+
<span class="cline-any cline-no"> </span>
|
|
402
|
+
<span class="cline-any cline-neutral"> </span>
|
|
378
403
|
<span class="cline-any cline-no"> </span>
|
|
379
404
|
<span class="cline-any cline-no"> </span>
|
|
380
405
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -394,6 +419,9 @@
|
|
|
394
419
|
<span class="cline-any cline-no"> </span>
|
|
395
420
|
<span class="cline-any cline-neutral"> </span>
|
|
396
421
|
<span class="cline-any cline-no"> </span>
|
|
422
|
+
<span class="cline-any cline-neutral"> </span>
|
|
423
|
+
<span class="cline-any cline-neutral"> </span>
|
|
424
|
+
<span class="cline-any cline-neutral"> </span>
|
|
397
425
|
<span class="cline-any cline-no"> </span>
|
|
398
426
|
<span class="cline-any cline-neutral"> </span>
|
|
399
427
|
<span class="cline-any cline-no"> </span>
|
|
@@ -537,10 +565,17 @@ export const setAuthToken = <span class="fstat-no" title="function not covered"
|
|
|
537
565
|
* @param {string} path - La ruta del endpoint de la API.
|
|
538
566
|
* @param {object} [data={}] - Los datos para enviar en la petición.
|
|
539
567
|
* @param {string} [method='POST'] - El método HTTP.
|
|
568
|
+
* @param {object} [options={}] - Opciones adicionales.
|
|
569
|
+
* @param {boolean} [options.skipAuth=false] - Si es true, no envía el header Authorization aunque haya un Bearer configurado. Usar para endpoints públicos que solo requieren API keys.
|
|
540
570
|
* @returns {Promise<object>} Los datos de la respuesta del backend.
|
|
541
571
|
* @throws {ApacuanaAPIError} Si la petición falla.
|
|
542
572
|
*/
|
|
543
|
-
export const httpRequest = <span class="fstat-no" title="function not covered" >as</span>ync (
|
|
573
|
+
export const httpRequest = <span class="fstat-no" title="function not covered" >as</span>ync (
|
|
574
|
+
path,
|
|
575
|
+
data = <span class="branch-0 cbranch-no" title="branch not covered" >{},</span>
|
|
576
|
+
method = <span class="branch-0 cbranch-no" title="branch not covered" >"POST",</span>
|
|
577
|
+
options = <span class="branch-0 cbranch-no" title="branch not covered" >{}</span>
|
|
578
|
+
) => {
|
|
544
579
|
<span class="cstat-no" title="statement not covered" > if (!axiosInstance) {</span>
|
|
545
580
|
<span class="cstat-no" title="statement not covered" > throw new Error(</span>
|
|
546
581
|
"Apacuana SDK: Cliente HTTP no inicializado. " +
|
|
@@ -551,6 +586,10 @@ export const httpRequest = <span class="fstat-no" title="function not covered" >
|
|
|
551
586
|
let dataToSend;
|
|
552
587
|
const requestConfig = <span class="cstat-no" title="statement not covered" >{};</span>
|
|
553
588
|
|
|
589
|
+
<span class="cstat-no" title="statement not covered" > if (options.skipAuth) {</span>
|
|
590
|
+
<span class="cstat-no" title="statement not covered" > requestConfig.headers = { Authorization: undefined };</span>
|
|
591
|
+
}
|
|
592
|
+
|
|
554
593
|
<span class="cstat-no" title="statement not covered" > if (typeof FormData !== "undefined" && data instanceof FormData) {</span>
|
|
555
594
|
<span class="cstat-no" title="statement not covered" > dataToSend = data;</span>
|
|
556
595
|
} else {
|
|
@@ -572,7 +611,10 @@ export const httpRequest = <span class="fstat-no" title="function not covered" >
|
|
|
572
611
|
let response;
|
|
573
612
|
<span class="cstat-no" title="statement not covered" > switch (method.toUpperCase()) {</span>
|
|
574
613
|
case "GET":
|
|
575
|
-
<span class="cstat-no" title="statement not covered" > response = await axiosInstance.get(path, {
|
|
614
|
+
<span class="cstat-no" title="statement not covered" > response = await axiosInstance.get(path, {</span>
|
|
615
|
+
params: dataToSend,
|
|
616
|
+
...requestConfig,
|
|
617
|
+
});
|
|
576
618
|
<span class="cstat-no" title="statement not covered" > break;</span>
|
|
577
619
|
case "POST":
|
|
578
620
|
<span class="cstat-no" title="statement not covered" > response = await axiosInstance.post(path, dataToSend, requestConfig);</span>
|
|
@@ -607,7 +649,7 @@ export const httpRequest = <span class="fstat-no" title="function not covered" >
|
|
|
607
649
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
608
650
|
Code coverage generated by
|
|
609
651
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
610
|
-
at 2026-06-
|
|
652
|
+
at 2026-06-17T20:28:28.937Z
|
|
611
653
|
</div>
|
|
612
654
|
<script src="../../prettify.js"></script>
|
|
613
655
|
<script>
|
|
@@ -23,16 +23,16 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">9.
|
|
26
|
+
<span class="strong">9.64% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>19/
|
|
28
|
+
<span class='fraction'>19/197</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
33
|
<span class="strong">0% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>0/
|
|
35
|
+
<span class='fraction'>0/233</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">9.
|
|
47
|
+
<span class="strong">9.69% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>19/
|
|
49
|
+
<span class='fraction'>19/196</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -110,17 +110,17 @@
|
|
|
110
110
|
|
|
111
111
|
<tr>
|
|
112
112
|
<td class="file low" data-value="httpClient.js"><a href="httpClient.js.html">httpClient.js</a></td>
|
|
113
|
-
<td data-value="5.
|
|
113
|
+
<td data-value="5.55" class="pic low">
|
|
114
114
|
<div class="chart"><div class="cover-fill" style="width: 5%"></div><div class="cover-empty" style="width: 95%"></div></div>
|
|
115
115
|
</td>
|
|
116
|
-
<td data-value="5.
|
|
117
|
-
<td data-value="
|
|
116
|
+
<td data-value="5.55" class="pct low">5.55%</td>
|
|
117
|
+
<td data-value="54" class="abs low">3/54</td>
|
|
118
118
|
<td data-value="0" class="pct low">0%</td>
|
|
119
|
-
<td data-value="
|
|
119
|
+
<td data-value="52" class="abs low">0/52</td>
|
|
120
120
|
<td data-value="0" class="pct low">0%</td>
|
|
121
121
|
<td data-value="7" class="abs low">0/7</td>
|
|
122
|
-
<td data-value="5.
|
|
123
|
-
<td data-value="
|
|
122
|
+
<td data-value="5.55" class="pct low">5.55%</td>
|
|
123
|
+
<td data-value="54" class="abs low">3/54</td>
|
|
124
124
|
</tr>
|
|
125
125
|
|
|
126
126
|
</tbody>
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
132
132
|
Code coverage generated by
|
|
133
133
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
134
|
-
at 2026-06-
|
|
134
|
+
at 2026-06-17T20:28:28.937Z
|
|
135
135
|
</div>
|
|
136
136
|
<script src="../../prettify.js"></script>
|
|
137
137
|
<script>
|