layrz_sdk 4.5.0 copy "layrz_sdk: ^4.5.0" to clipboard
layrz_sdk: ^4.5.0 copied to clipboard

A Flutter SDK for Layrz, providing tools and utilities for integrating Layrz services into your Flutter applications.

Changelog #

4.5.0 #

Dart #

  • Moved the RegisteredApp, Tag, and CustomReport model graphs from layrz_models into layrz_sdk, including their transitive closure: User, Asset, Device, Workspace, Trigger, Action, Operation, Sensor, Geofence, Checkpoint, CareProtocol, CareTask, InboundService, OutboundService, MapLayer, Access, Reference, CustomField, ExternalAccount, ReportTemplate, Preset, LayrzFunction, ExchangeService, and their supporting models, enums, inputs, and GraphQL callers.
  • Added LinkShortcut model and LinkShortcutInput with GraphQL callers (fetchAll, fetch, LinkShortcutInput.save, delete) for managing link shortcuts (short redirecting URLs), moved from layrz_models.
  • Added the latlong2 dependency and bumped flutter_mdi_remap to ^1.0.1, required by the moved models.
  • All moved code preserves its existing API surface and onResponse callback signatures; no Material or Cupertino imports were introduced.

Python #

  • No changes in this release.

Go #

  • No changes in this release.

4.4.8+3 #

Dart #

  • Moved the Model / HwModel / InboundProtocol type graph (Model, HwModel, HwModelInput, InboundProtocol, and their supporting command/config/credential-field/flespi/webhook/simulation/zigbee/firmware types) from layrz_models into layrz_sdk, all exported from package:layrz_sdk/layrz_sdk.dart.
  • Added HwModel.fetch and HwModelInput.save API callers, alongside the existing HwModel.fetchAll.
  • HwModel.fragment now fetches nested models: HwModel.models is List<Model> (the full device model type), and the fragment selects each model's reduced field set.

Python #

  • No changes in this release.

Go #

  • No changes in this release.

4.4.8+2 #

Dart #

  • Category caller onResponse callbacks (fetchAll, fetch, CategoryInput.save) now receive an ApiStatus value directly instead of a JSON string.

Python #

  • No changes in this release.

Go #

  • No changes in this release.

4.4.8+1 #

Dart #

  • Category callers (fetchAll, fetch, CategoryInput.save) no longer send apiToken as a GraphQL argument, the token is carried only via the connector's Authorization header.

Python #

  • No changes in this release.

Go #

  • No changes in this release.

4.4.8 #

Dart #

  • Fixed freezed code generation to emit valid collection constructor parameters (disabled make_collections_unmodifiable), so generated code compiles under a real build.

Python #

  • Added a validated_at field to AtsOperation and AtsPurchaseOrder.

Go #

  • No changes in this release.

4.4.7 #

Dart #

  • Added the category module: the Category model (id, name, kind, assetKind), the CategoryKind and AssetKind enums, and the mutable CategoryInput DTO, all exported from package:layrz_sdk/layrz_sdk.dart.
  • Category exposes fetchAll/fetch API callers and CategoryInput exposes a save method for creating or updating categories against the Layrz GraphQL API.
  • Added the RealtimeMessage model (moved from layrz_models): a plain data envelope for realtime/websocket messages, with topic and payload fields, exported from package:layrz_sdk/layrz_sdk.dart.

Python #

  • No changes made to the Python module in this release.

Go #

  • No changes made to the Go module in this release.

4.4.6 #

Dart #

  • Replaced the remap icon registry with a new flutter_mdi_remap package, which is now a dependency of this package.

Python #

  • No changes made to the Python module in this release.

Go #

  • No changes made to the Go module in this release.

4.4.5 #

Dart #

  • Added iconData as a getter to MdiRemapIcon.

Python #

  • No changes made to the Python module in this release.

Go #

  • No changes made to the Go module in this release.

4.4.4 #

Dart #

  • Removed the layrz_icons dependency; icons are now generated directly from flutter_material_design_icons.
  • Added MdiRemapIcon, exposing each icon's name, searchable tags and data.
  • Added the MdiRemapIconsClasses registry and the iconMapping name lookup, covering 7447 Material Design Icons.
  • Icon tags are now available for search and categorisation, which layrz_icons did not provide.
  • Breaking: LayrzIcon, LayrzIcons and LayrzIconsClasses are replaced by MdiRemapIcon and MdiRemapIconsClasses.
  • Breaking: solar-* and fa-* icon names no longer resolve. Unknown names now fall back to mdi-help-circle-outline, previously solar-outline-question-square.
  • Apps consuming this package must build with --no-tree-shake-icons.

Python #

  • No changes made to the Python module in this release.

Go #

  • No changes made to the Go module in this release.

4.4.3 #

  • Fixes on CI that prevented the rollout

4.4.2 #

Dart #

  • Ported 13 modules from layrz_models: a11y, api, app, avatar, converters, department, employee, i18n, mfa, permissions, time_of_day, token, utils — all exported from package:layrz_sdk/layrz_sdk.dart.
  • Includes key types: LayrzConnector, ApiResponse, ApiStatus, GraphQL builders (Gql, GqlQuery, GqlMutation, GqlSubscription, GqlField, GqlFragment, GqlUnion, GqlVariable), UserPreferences, ColorblindMode, Employee, Token, and more.
  • Framework-independent TimeOfDay class — JSON-serializable and intentionally shadows Flutter's TimeOfDay.
  • Full dartdoc documentation across all public declarations.
  • Added comprehensive test suite: 797 tests with 99.73% line coverage; new make test and make coverage targets in dart/Makefile.

Python #

  • No changes made to the Python module in this release.

Go #

  • No changes made to the Go module in this release.

4.4.1 #

  • Fixed BroadcastStatus.BAD_REQUEST (Go and Python) value to BAD_REQUEST, matching the platform's actual API response (was incorrectly BADREQUEST).
  • Added validation to BroadcastResult.status (Python) that accepts the legacy BADREQUEST string and coerces it to BAD_REQUEST.
  • Initial version on Dart implementation

4.4.0 #

  • Added PUSH_NOTIFICATION value to OperationType for Layrz Push (Firebase) operations.
  • Added push_service_account (pushServiceAccount), push_devices (pushDevices), and push_app_id (pushAppId) fields to OperationPayload carrying decrypted FCM credentials, bound device UUIDs, and the owning RegisteredApp ID.
  • Go module now provides the shared OperationPayload and OperationType Kafka wire-contract entities used across Python and Go consumers.

4.3.16 #

  • Fixed BroadcastStatus.INTERNAL_ERROR (Go and Python) value to INTERNALERROR, matching the platform's actual API response.
  • Added validation to BroadcastResult.status and RawBroadcastResult.status (Python) that accepts the legacy INTERNAL_ERROR string and coerces it to INTERNALERROR.

4.3.15 #

  • Added ActionKind.ZIGBEE_CHANGE (Python) for actions that send a command to a Zigbee device.
  • Added zigbee_device_id and zigbee_settings fields to the Action entity (Python), carrying the bound connectivity Device ID and the {device_id, settings: [{key, value}]} payload for ZIGBEE_CHANGE actions.

4.3.14 #

  • Added AuthenticatedAsset entity (Python and Go) with pk/id and name fields.
  • Added authenticated_users (list of User) and authenticated_assets (list of AuthenticatedAsset) fields to the Asset entity in both Python and Go, defaulting to an empty list.

4.3.11 #

  • Fixed types.UnixTime JSON unmarshaling to also accept ISO 8601 datetime strings (e.g. "2026-05-06T03:24:51.099415Z"); MarshalJSON always emits a float regardless of input format.

4.3.10 #

  • Fixed types.UnixTime JSON unmarshaling to accept string-encoded timestamps (e.g. "1746518400.123") in addition to bare numbers, preventing message drops in Go consumers when producers emit quoted floats.

4.3.9 #

  • Fixed DeviceMessage.Id JSON tag: removed omitempty so null id serializes as "id": null matching Python.
  • Fixed DeviceMessage and AssetMessage nil maps/slices to serialize as {}/[] instead of null (matching Python default_factory=dict/list).
  • Fixed DeviceMessageFromMap to read "timestamp" key for received-at (was incorrectly reading "received_at"), with fallback to current time when missing.
  • Added RejectedKeys filtering in DeviceMessageFromMap — keys like ident, protocol.id, device.id, server.timestamp are now excluded from payload, matching Python's REJECTED_KEYS constant.
  • Fixed position.* values in DeviceMessageFromMap to only accept numeric types (matching Python's isinstance(value, (float, int)) guard).
  • Fixed AssetMessageFromDeviceMessage to derive position from asset.OperationMode: DISCONNECTED → empty, STATIC → static position, ZONE → centroid of points, default → device position.
  • Fixed AssetMessageFromDeviceMessage to prefix all payload keys with "{ident}." matching Python's f'{device_message.ident}.{key}'.
  • Replaced haversine distance formula with Vincenty inverse on WGS-84 in AssetMessage.ComputeDistanceTraveled, matching geopy.distance.geodesic output.
  • Added UUIDv7 validation on DeviceMessage.Id and AssetMessage.Id via custom UnmarshalJSON, matching Python's pk field validator.

4.3.8 #

  • Fixed BroadcastPayload.asset to be required (non-optional) to match Python parity.
  • Fixed BroadcastPayload.message_id type from *int64 to types.Uuid to match Python UUID field.
  • Fixed BroadcastPayload.received_at to be required (non-optional) to match Python parity.
  • Fixed BroadcastPayload.position, payload, and sensors fields to always serialize (no omitempty) to match Python default_factory=dict behavior.
  • Fixed types.Uuid.MarshalJSON to return a properly quoted JSON string instead of raw unquoted text bytes.
0
likes
140
points
837
downloads

Documentation

API reference

Publisher

verified publisherlayrz.com

Weekly Downloads

A Flutter SDK for Layrz, providing tools and utilities for integrating Layrz services into your Flutter applications.

Homepage
Repository (GitHub)
View/report issues

Topics

#layrz #sdk #models #iot #telemetry

License

MIT (license)

Dependencies

collection, dio, flutter, flutter_material_design_icons, flutter_mdi_remap, freezed_annotation, json_annotation, latlong2, layrz_i18n, layrz_logging, web_socket_channel

More

Packages that depend on layrz_sdk