From 2193447b958210609395d447aec9a9928f6cd3bd Mon Sep 17 00:00:00 2001 From: Kenny Mochizuki Escalona Date: Sat, 16 May 2026 15:30:59 -0600 Subject: [PATCH 1/2] fix(models): align RenderWidget.magnet with backend MAGNET enum value Renamed `magnetSensor` to `magnet` and corrected the @JsonValue from 'MAGNET_SENSOR' to 'MAGNET' to match the backend Widget enum. Regenerated models.g.dart. Co-Authored-By: Claude Sonnet 4.6 --- lib/src/models/models.g.dart | 2 +- lib/src/models/src/widget.dart | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/src/models/models.g.dart b/lib/src/models/models.g.dart index 9ae33b5..39c57cc 100644 --- a/lib/src/models/models.g.dart +++ b/lib/src/models/models.g.dart @@ -84,7 +84,7 @@ const _$ConfIoTLayoutEnumMap = { const _$RenderWidgetEnumMap = { RenderWidget.thermometer: 'THERMOMETER', RenderWidget.humidity: 'HUMIDITY', - RenderWidget.magnetSensor: 'MAGNET_SENSOR', + RenderWidget.magnet: 'MAGNET', RenderWidget.magnetCount: 'MAGNET_COUNT', RenderWidget.accelerometer: 'ACCELERATION', RenderWidget.pressure: 'PRESSURE', diff --git a/lib/src/models/src/widget.dart b/lib/src/models/src/widget.dart index d2ecc52..dd1ddb3 100644 --- a/lib/src/models/src/widget.dart +++ b/lib/src/models/src/widget.dart @@ -11,8 +11,8 @@ enum RenderWidget { humidity, /// Magnet sensor state display - @JsonValue('MAGNET_SENSOR') - magnetSensor, + @JsonValue('MAGNET') + magnet, /// Magnet sensor count display @JsonValue('MAGNET_COUNT') From 3ec49af92f70bae2dfab20548768d8cfad8ff4ed Mon Sep 17 00:00:00 2001 From: Kenny Mochizuki Escalona Date: Sat, 16 May 2026 15:31:39 -0600 Subject: [PATCH 2/2] chore: bump version to 3.8.16 and update changelog Co-Authored-By: Claude Sonnet 4.6 --- CHANGELOG.md | 4 ++++ pubspec.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 30020e1..d3d3a85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 3.8.16 + +- Fixed `RenderWidget.magnet` enum value: corrected `@JsonValue` from `'MAGNET_SENSOR'` to `'MAGNET'` to match the backend `Widget` enum. + ## 3.8.15 - Added `originalBuyerAsset` field (`Asset?`) to `AtsPurchaseOrder` to expose the original buyer asset linked to the purchase order. diff --git a/pubspec.yaml b/pubspec.yaml index 900a931..e1db7d3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ description: Layrz API models for Dart/Flutter. This package contains the models used by the Layrz API. name: layrz_models -version: "3.8.15" +version: "3.8.16" repository: https://github.com/goldenm-software/layrz_models environment: