apacuana-sdk-core 0.17.0 → 1.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apacuana-sdk-core",
3
- "version": "0.17.0",
3
+ "version": "1.1.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/users.js CHANGED
@@ -94,7 +94,13 @@ export const createApacuanaUser = async (userData) => {
94
94
  const formData = new FormData();
95
95
  Object.keys(userData).forEach((key) => {
96
96
  const value = userData[key];
97
- if (value instanceof File) {
97
+ const isRNFile =
98
+ value &&
99
+ typeof value === "object" &&
100
+ value.uri &&
101
+ value.name &&
102
+ value.type;
103
+ if (value instanceof File || isRNFile) {
98
104
  formData.append(key, value);
99
105
  } else if (value !== null && value !== undefined) {
100
106
  formData.append(key, String(value));