@statezero/core 0.1.52 → 0.1.53

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.
@@ -210,6 +210,12 @@ export class Model {
210
210
  // Let DateParsingHelpers.serializeDate throw if it fails
211
211
  return DateParsingHelpers.serializeDate(value, field, ModelClass.schema);
212
212
  }
213
+ const fileFormats = ["file-path", "image-path"];
214
+ if (ModelClass.schema &&
215
+ fileFormats.includes(ModelClass.schema.properties[field]?.format) &&
216
+ value) {
217
+ return value.filePath || value.file_path || value;
218
+ }
213
219
  return value;
214
220
  }
215
221
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@statezero/core",
3
- "version": "0.1.52",
3
+ "version": "0.1.53",
4
4
  "type": "module",
5
5
  "module": "ESNext",
6
6
  "description": "The type-safe frontend client for StateZero - connect directly to your backend models with zero boilerplate",