apacuana-sdk-core 1.13.0 → 1.17.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 (31) hide show
  1. package/coverage/clover.xml +123 -121
  2. package/coverage/coverage-final.json +3 -3
  3. package/coverage/lcov-report/index.html +18 -18
  4. package/coverage/lcov-report/src/api/certs.js.html +6 -18
  5. package/coverage/lcov-report/src/api/faceLiveness.js.html +1 -1
  6. package/coverage/lcov-report/src/api/index.html +10 -10
  7. package/coverage/lcov-report/src/api/revocations.js.html +1 -1
  8. package/coverage/lcov-report/src/api/signatures.js.html +1 -1
  9. package/coverage/lcov-report/src/api/users.js.html +1 -1
  10. package/coverage/lcov-report/src/config/index.html +1 -1
  11. package/coverage/lcov-report/src/config/index.js.html +1 -1
  12. package/coverage/lcov-report/src/errors/index.html +1 -1
  13. package/coverage/lcov-report/src/errors/index.js.html +1 -1
  14. package/coverage/lcov-report/src/index.html +1 -1
  15. package/coverage/lcov-report/src/index.js.html +1 -1
  16. package/coverage/lcov-report/src/success/index.html +1 -1
  17. package/coverage/lcov-report/src/success/index.js.html +1 -1
  18. package/coverage/lcov-report/src/utils/constant.js.html +7 -4
  19. package/coverage/lcov-report/src/utils/helpers.js.html +36 -9
  20. package/coverage/lcov-report/src/utils/httpClient.js.html +1 -1
  21. package/coverage/lcov-report/src/utils/index.html +12 -12
  22. package/coverage/lcov.info +256 -247
  23. package/dist/index.js +7 -7
  24. package/dist/index.js.map +1 -1
  25. package/dist/index.mjs +7 -7
  26. package/dist/index.mjs.map +1 -1
  27. package/dist/utils/constant.d.ts +1 -1
  28. package/package.json +1 -1
  29. package/src/api/certs.js +0 -4
  30. package/src/utils/constant.js +3 -2
  31. package/src/utils/helpers.js +11 -2
@@ -12,7 +12,7 @@ export namespace STATUS_CERTIFICATE {
12
12
  export const PARSE_STATUS: {
13
13
  [STATUS_CERTIFICATE.certificate_another_device]: {
14
14
  text: string;
15
- descriptionText: undefined;
15
+ descriptionText: string;
16
16
  };
17
17
  [STATUS_CERTIFICATE.request_cert]: {
18
18
  text: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apacuana-sdk-core",
3
- "version": "1.13.0",
3
+ "version": "1.17.0",
4
4
  "description": "Core SDK para interacciones con las APIs de Apacuana.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
package/src/api/certs.js CHANGED
@@ -95,10 +95,6 @@ export const getCertStatus = async (isCertificateInDevice = false) => {
95
95
  config.integrationType
96
96
  );
97
97
  const parseStatus = PARSE_STATUS[status];
98
- console.log({
99
- status,
100
- parseStatus,
101
- });
102
98
  return new ApacuanaSuccess({ status: parseStatus });
103
99
  };
104
100
 
@@ -12,8 +12,9 @@ export const STATUS_CERTIFICATE = {
12
12
 
13
13
  export const PARSE_STATUS = {
14
14
  [STATUS_CERTIFICATE.certificate_another_device]: {
15
- text: "Verificado",
16
- descriptionText: undefined,
15
+ text: "Certificado generado en otro dispositivo",
16
+ descriptionText:
17
+ "Su certificado fue generado en otro equipo. Para usarlo aquí, debe migrar el certificado o solicitar la revocación del anterior para generar uno nuevo.",
17
18
  },
18
19
  [STATUS_CERTIFICATE.request_cert]: {
19
20
  text: "En revisión",
@@ -141,13 +141,22 @@ const validateOnBoardingSignerData = (signerData) => {
141
141
  ) {
142
142
  delete validatedSignerData.reference;
143
143
  }
144
-
145
144
  if (
146
145
  typeof File === "undefined" ||
147
146
  !validatedSignerData.file ||
148
147
  !(validatedSignerData.file instanceof File)
149
148
  ) {
150
- delete validatedSignerData.file;
149
+ const value = validatedSignerData.file;
150
+ const isRNFile =
151
+ value &&
152
+ typeof value === "object" &&
153
+ value.uri &&
154
+ value.name &&
155
+ value.type;
156
+
157
+ if (!isRNFile) {
158
+ delete validatedSignerData.file;
159
+ }
151
160
  }
152
161
 
153
162
  // Valida que solo uno de los dos campos exista después de la limpieza.