apacuana-sdk-core 0.13.0 → 0.15.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.
Files changed (45) hide show
  1. package/README.md +606 -179
  2. package/coverage/clover.xml +263 -206
  3. package/coverage/coverage-final.json +6 -6
  4. package/coverage/lcov-report/index.html +36 -36
  5. package/coverage/lcov-report/src/api/certs.js.html +14 -8
  6. package/coverage/lcov-report/src/api/faceLiveness.js.html +1 -1
  7. package/coverage/lcov-report/src/api/index.html +25 -25
  8. package/coverage/lcov-report/src/api/revocations.js.html +2 -2
  9. package/coverage/lcov-report/src/api/signatures.js.html +1 -1
  10. package/coverage/lcov-report/src/api/users.js.html +160 -13
  11. package/coverage/lcov-report/src/config/index.html +1 -1
  12. package/coverage/lcov-report/src/config/index.js.html +1 -1
  13. package/coverage/lcov-report/src/errors/index.html +1 -1
  14. package/coverage/lcov-report/src/errors/index.js.html +1 -1
  15. package/coverage/lcov-report/src/index.html +21 -21
  16. package/coverage/lcov-report/src/index.js.html +278 -59
  17. package/coverage/lcov-report/src/success/index.html +1 -1
  18. package/coverage/lcov-report/src/success/index.js.html +1 -1
  19. package/coverage/lcov-report/src/utils/constant.js.html +115 -4
  20. package/coverage/lcov-report/src/utils/helpers.js.html +16 -13
  21. package/coverage/lcov-report/src/utils/httpClient.js.html +4 -7
  22. package/coverage/lcov-report/src/utils/index.html +12 -12
  23. package/coverage/lcov.info +504 -387
  24. package/dist/api/users.d.ts +27 -21
  25. package/dist/index.d.ts +19 -40
  26. package/dist/index.js +265 -118
  27. package/dist/index.js.map +1 -1
  28. package/dist/index.mjs +265 -118
  29. package/dist/index.mjs.map +1 -1
  30. package/dist/types/certs.d.ts +20 -34
  31. package/dist/utils/constant.d.ts +31 -0
  32. package/dist/utils/helpers.d.ts +1 -1
  33. package/package.json +1 -1
  34. package/src/api/certs.js +4 -2
  35. package/src/api/revocations.js +1 -1
  36. package/src/api/users.js +51 -2
  37. package/src/index.js +114 -41
  38. package/src/types/certs.js +36 -25
  39. package/src/utils/constant.js +37 -0
  40. package/src/utils/helpers.js +5 -4
  41. package/src/utils/httpClient.js +1 -2
  42. package/tests/api/certs.test.js +11 -3
  43. package/tests/api/revocations.test.js +1 -1
  44. package/tests/api/users.test.js +1 -1
  45. package/tests/index.test.js +3 -2
@@ -2,8 +2,8 @@
2
2
  import apacuana from "../src/index.js";
3
3
  import { setConfig, getConfig } from "../src/config/index.js";
4
4
  import { initHttpClient, setAuthToken } from "../src/utils/httpClient.js";
5
- import getCustomer from "../src/api/users.js";
6
5
  import ApacuanaSuccess from "../src/success/index.js";
6
+ import { getCustomer } from "../src/api/users.js";
7
7
 
8
8
  // Mockear todas las dependencias del index.js
9
9
  jest.mock("../src/config/index.js", () => ({
@@ -17,6 +17,7 @@ jest.mock("../src/utils/httpClient.js", () => ({
17
17
  jest.mock("../src/api/users.js", () => ({
18
18
  __esModule: true,
19
19
  default: jest.fn(),
20
+ getCustomer: jest.fn(),
20
21
  }));
21
22
 
22
23
  describe("Apacuana SDK Initialization (init)", () => {
@@ -71,7 +72,7 @@ describe("Apacuana SDK Initialization (init)", () => {
71
72
  expect(result).toBeInstanceOf(ApacuanaSuccess);
72
73
  expect(result.data).toEqual({
73
74
  initialized: true,
74
- message: "SDK inicializado correctamente.",
75
+ message: "SDK inicializado con sesión de usuario.",
75
76
  });
76
77
 
77
78
  // 5. Verificar que las funciones se llamaron el número correcto de veces.