apacuana-sdk-core 1.11.0 → 1.13.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/coverage/clover.xml +72 -66
- package/coverage/coverage-final.json +1 -1
- package/coverage/lcov-report/index.html +14 -14
- 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 +2 -2
- 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 +61 -16
- package/coverage/lcov-report/src/utils/httpClient.js.html +1 -1
- package/coverage/lcov-report/src/utils/index.html +13 -13
- package/coverage/lcov.info +196 -171
- package/dist/index.js +10 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -12
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/api/signatures.js +1 -1
- package/src/utils/helpers.js +23 -8
package/dist/index.mjs
CHANGED
|
@@ -32911,12 +32911,10 @@ var encryptedCsr = function encryptedCsr(csr) {
|
|
|
32911
32911
|
};
|
|
32912
32912
|
var createPayloadGetDigest = function createPayloadGetDigest(signData) {
|
|
32913
32913
|
var formData = new FormData();
|
|
32914
|
-
|
|
32915
|
-
// Iterate over the object's own properties
|
|
32916
32914
|
Object.keys(signData).forEach(function (key) {
|
|
32917
|
-
|
|
32918
|
-
|
|
32919
|
-
if (key === "document" && signData[key] instanceof File) {
|
|
32915
|
+
var value = signData[key];
|
|
32916
|
+
var isRNFile = value && _typeof(value) === "object" && value.uri && value.name && value.type;
|
|
32917
|
+
if (key === "document" && (signData[key] instanceof File || isRNFile)) {
|
|
32920
32918
|
// Append the file directly
|
|
32921
32919
|
formData.append(key, signData[key]);
|
|
32922
32920
|
} else if (key === "cert") {
|
|
@@ -32931,13 +32929,9 @@ var validateOnBoardingSignerData = function validateOnBoardingSignerData(signerD
|
|
|
32931
32929
|
if (!validatedSignerData.name || typeof validatedSignerData.name !== "string") {
|
|
32932
32930
|
throw new ApacuanaAPIError('El campo "name" es requerido y debe ser una cadena de texto.', 400, "INVALID_PARAMETER_FORMAT");
|
|
32933
32931
|
}
|
|
32934
|
-
|
|
32935
|
-
// Limpia 'reference' si es inválido o está vacío.
|
|
32936
32932
|
if (!validatedSignerData.reference || typeof validatedSignerData.reference !== "string" || validatedSignerData.reference.trim() === "") {
|
|
32937
32933
|
delete validatedSignerData.reference;
|
|
32938
32934
|
}
|
|
32939
|
-
|
|
32940
|
-
// Limpia 'file' si no es una instancia de File.
|
|
32941
32935
|
if (typeof File === "undefined" || !validatedSignerData.file || !(validatedSignerData.file instanceof File)) {
|
|
32942
32936
|
delete validatedSignerData.file;
|
|
32943
32937
|
}
|
|
@@ -32972,9 +32966,11 @@ var validateOnBoardingSignerData = function validateOnBoardingSignerData(signerD
|
|
|
32972
32966
|
});
|
|
32973
32967
|
var formData = new FormData();
|
|
32974
32968
|
Object.keys(validatedSignerData).forEach(function (key) {
|
|
32969
|
+
var value = validatedSignerData[key];
|
|
32970
|
+
var isRNFile = value && _typeof(value) === "object" && value.uri && value.name && value.type;
|
|
32975
32971
|
if (key === "signature") {
|
|
32976
32972
|
formData.append(key, JSON.stringify(validatedSignerData[key]));
|
|
32977
|
-
} else if (key === "file") {
|
|
32973
|
+
} else if (key === "file" || isRNFile) {
|
|
32978
32974
|
formData.append("document", validatedSignerData[key]);
|
|
32979
32975
|
} else if (validatedSignerData[key] !== undefined) {
|
|
32980
32976
|
formData.append(key, validatedSignerData[key]);
|
|
@@ -33032,7 +33028,9 @@ var validateOnBoardingSignDocumentData = function validateOnBoardingSignDocument
|
|
|
33032
33028
|
})));
|
|
33033
33029
|
formData.append("publickey", cert);
|
|
33034
33030
|
formData.append("signeddigest", signedDigest);
|
|
33035
|
-
|
|
33031
|
+
var value = signData.document;
|
|
33032
|
+
var isRNFile = value && _typeof(value) === "object" && value.uri && value.name && value.type;
|
|
33033
|
+
if (signData.document && (signData.document instanceof File || isRNFile)) {
|
|
33036
33034
|
formData.append("document", signData.document);
|
|
33037
33035
|
}
|
|
33038
33036
|
return formData;
|
|
@@ -33686,7 +33684,7 @@ var addSignerOnBoarding = /*#__PURE__*/function () {
|
|
|
33686
33684
|
response = _context5.v;
|
|
33687
33685
|
return _context5.a(2, new ApacuanaSuccess({
|
|
33688
33686
|
signer: signerData.typedoc + signerData.doc,
|
|
33689
|
-
docId: response.
|
|
33687
|
+
docId: response.id
|
|
33690
33688
|
}));
|
|
33691
33689
|
case 3:
|
|
33692
33690
|
_context5.p = 3;
|