layrz_sdk 4.10.1
layrz_sdk: ^4.10.1 copied to clipboard
A Flutter SDK for Layrz, providing tools and utilities for integrating Layrz services into your Flutter applications.
Changelog #
4.10.1 #
4.10.0 #
Python #
- No changes in this release.
Dart #
- Added the
growthmodule with the home metrics modelsGrowthSummary,GrowthItem,DailyGrowthItem,AccountGrowthandTopAccount, each with itsfragment. - Added GraphQL API callers:
GrowthSummary.fetch(homeMetrics),DailyGrowthItem.fetchAll(userGrowth, by user and date range) andAccountGrowth.fetchAll(growthPerAccount, by date range; heavy on the server, meant to be called on demand). - Added
MonthConverterandMonthOrNullConverterforYYYY-MMmonth strings, and theDateTime.toMonth()extension.
Go #
- No changes in this release.
4.9.0 #
Python #
- No changes in this release.
Dart #
- Added GraphQL API callers for the i18n models:
Language.fetchAll,I18nKey.fetchAll(optionally filtered byids),I18nKey.fetch,I18nKeyInput.save(saveI18nKey),I18nKeyInput.saveAll(saveI18nKeys) andI18nKeyHistory.fetchAll(requestI18nKeyHistory). - Added
Language.fragment,I18nKey.fragmentandI18nKeyHistory.fragment. The employee fields ofcreatedBy,updatedByandperformedByare selected inline instead of throughEmployee.reducedFragment, because the API does not resolve the nestedavatarFragmentfor these queries.
Go #
- No changes in this release.
4.8.2 #
4.8.1 #
Python #
- No changes in this release.
Dart #
- Added the
reportslibrary (ReportScheduler,ReportSchedulerInputand theRelativeChoicesenum), covering the report-scheduling models that previously lived only inlayrz_models, now moved intolayrz_sdkand re-exported fromlayrz_modelsfor backwards compatibility. - The report preview models (
ReportPreview,ReportPage,ReportRow,ReportHeader,ReportCellandReportDataType) that moved tolayrz_sdkin 4.7.0 are now joined by the rest of the report entities, so the report template feature set no longer needslayrz_modelsat all when used alongsidelayrz_sdk. ReportTemplateSourceConverter,ReportTemplateAlgorithmConverter,ReportDataTypeConverterandReportDataTypeOrNullConverterare included for legacy payload compatibility and marked@Deprecatedin favor of the nativejson_serializable/@JsonEnumconverters.
Go #
- No changes in this release.
4.8.0 #
4.7.1 #
4.7.0 #
Python #
ReportPagenow supports multi-row (grouped) headers through a newheader_rowsfield, which takes the header rows top to bottom and uses the newReportHeader.colspan/ReportHeader.rowspanfields to build groups.headerskeeps its type and its meaning: whenheader_rowsis set it is filled with the bottom-most header of each column, solen(page.headers)is still the column count andpage.headers[j]still lines up withrow.content[j].- Added
ReportPage.from_header_matrix, which builds a grouped page from a column-major matrix of shape(columns, levels)— one top-to-bottom label stack per column. Neighbouring labels merge into a shared group only when every label above them merges too, so two unrelated groups that share a leaf label ([['In', 'Total'], ['Out', 'Total']]) stay apart. - Added
ReportPage.resolved_header_rows,ReportPage.header_depthandReportPage.column_count, plus theHeaderCell,layout_header_grid,leaf_headersandcollapse_header_matrixhelpers, for consumers that render headers themselves (includingCustomReportPagebuilders). - An invalid header grid — overlapping headers, a hole, or a
rowspandeeper than the header block — now raises when theReportPageis constructed, instead of corrupting the workbook part-way through an export. - The Excel export writes the whole header block, merging grouped cells, and offsets data rows below it.
freeze_headernow freezes every header row rather than exactly one. Reports with a single header row export exactly as before, and a page with no headers still leaves the first sheet row blank. - The JSON export gains a
header_rowskey carrying each header'scolspan/rowspan, emitted only for pages that use grouping. The existingheaderskey is unchanged: one entry per column, holding the bottom-most header of each. ReportHeadergainscolspanandrowspan, both defaulting to1, somodel_dump()output includes two new keys.
Dart #
ReportHeader(report preview) gainscolspanandrowspan, both defaulting to1, so an existing single-row header parses and renders as before.ReportPage(report preview) gainsheaderRows, the multi-row header definition, plus theheaderDepthandresolvedHeaderRowsgetters matching the Python API.headerskeeps its meaning of one entry per column, and a page with a single header row leavesheaderRowsempty, so existing payloads are unaffected. Note that the Python exporter emits snake_case keys (header_rows) while these models read camelCase; translating between the two happens outside this repository.
Go #
- No changes in this release.
4.6.4 #
Dart #
- Added
commandResultAdd(COMMAND_RESULT_ADD) andcommandResultDel(COMMAND_RESULT_DEL) toAtsHistoryAuthenticationCardOperation, fixing authentication card history rows falling back tounknownfor those operations (bug 135).
Go #
- No changes in this release.
Python #
- No changes in this release.
4.6.3 #
4.6.2 #
4.6.1 #
Version-sync release. Republishes the shared version line so pub.dev and PyPI match; no library code changes. Repairs the tag-cleanup CI job. See 4.6.0 for the functional Dart changes (which shipped to pub.dev but not PyPI under 4.6.0).
Dart #
- No changes since 4.6.0 (version bump only, to keep pub.dev in sync with the shared version line).
Python #
- No code changes; version bumped to 4.6.1 so the PyPI release matches the shared version line (the 4.6.0 PyPI publish failed on a stale version).
Go #
- No changes in this release.
4.6.0 #
Dart #
- Add
Tag.fetchAllandVisionProfile.fetchAllstatic callers (with lightweightfragments), so consumers can list tags and vision profiles. GqlFieldnow emits a spread fragment together with inline fields in the same selection set (previously inline fields silently dropped the fragment).Tag.fetchAllnow also selects the associated-element ID lists (e.g.assetsIds,devicesIds,usersIds,functionsIds, and the rest of the schema-present*Idsfields) for per-tag element counts.Device.fetchAllnow selects the device's last-knowntelemetry(viaDeviceTelemetry.fragment), so list/table connection indicators have data to render without a separate realtime feed.InboundProtocol's fetch fragment now selectsmodels(viaModel.reducedFragment), so fetched protocols carry their models inline (used by protocol-to-model selectors).InboundProtocol.fetchAllnow also selectshasNativeCommands,hasSmsCommands, andhasModbusso consumers can gate command UI on protocol capability without a full fragment fetch.
Python #
- No changes in this release.
Go #
- No changes in this release.
4.5.5+1 #
Dart #
- Move
LayrzNotificationinto a newnotificationsmodule (pure-data model; previously inlayrz_models).
4.5.5 #
Python #
- Fix
OrderCategories.SALE_FROM_THIRD_PARTY_DELIVERY_BY_SELLERspelling toSALE_FROM_THIRD_PARTY_DELIVERED_BY_SELLER.
Go #
- Fix
OrderCategoriesSaleFromThirdPartyDeliveryBySellerspelling toOrderCategoriesSaleFromThirdPartyDeliveredBySeller, keeping parity with the Python entities.
Dart #
- No changes in this release.
4.5.4 #
Python #
- Move ATS entities into an
ats/subpackage. - Add
TERMINAL_ENTRY,TERMINAL_EXIT,REDISPATCHED,MDFE_CONSOLIDATED, andCTE_OPERATION_MERGEDtoOrderStatus, andSALE_FROM_THIRD_PARTY_TANK,SALE_FROM_THIRD_PARTY_DELIVERY_BY_SELLER, andREMITTANCE_SALEtoOrderCategories.
Go #
- Rename ATS-related enum files with an
ats_prefix (ats_delivery_categories.go,ats_order_categories.go,ats_order_status.go). - Add
OrderStatusTerminalEntry,OrderStatusTerminalExit,OrderStatusRedispatched,OrderStatusMdfeConsolidated, andOrderStatusCteOperationMergedtoOrderStatus, andOrderCategoriesSaleFromThirdPartyTank,OrderCategoriesSaleFromThirdPartyDeliveryBySeller, andOrderCategoriesRemittanceSaletoOrderCategories, keeping parity with the Python entities.
Dart #
- No changes in this release.
4.5.3+1 #
Dart #
- Make
EmployeeInput.customPermissionsnullable (GenericPermissionInput?), so building anEmployeeInputfrom anEmployeethat has no custom permissions no longer throws a null-cast error inEmployeeInput.fromJson. - Include
customPermissionsin theEmployeedetail fragment, and switchEmployee.fetchAllto the reduced fragment so the list query fetches only the minimum andEmployee.fetchreturns the full record.
4.5.3 #
Dart #
- Add API connectors to the
Employeemodule:Employee.fetchAll/Employee.fetch(goldenmEmployees),EmployeeInput.save(addGoldenmEmployee/editGoldenmEmployee, input typeGoldenmEmployeeInput),Employee.deleteMany(deleteGoldenmEmployees), andEmployee.resetPassword(resetGoldenmEmployeePassword), so employees can be listed and saved through the SDK. Authentication is header-only.
4.5.2+2 #
4.5.2+1 #
Dart #
- Fixed
AccessInput.save/delete, theTokenqueries/mutations (tokens,expireToken,createToken), andChartInput.saveto stop sendingapiTokenas a GraphQL variable/argument; authentication is carried solely via the connector'sAuthorizationheader.
4.5.2 #
Note:
4.5.1was skipped. Its Dart package published to pub.dev, but the release run failed before the Python package was uploaded, so this version supersedes it across all three languages.
Dart #
- Restore the
deprecateInstance,migrateInstance, andrequestInstancestatic methods onAppInstance, which were dropped during thelayrz_modelsmigration; each performs its GraphQL mutation and returnstrueonApiStatus.ok. - Add an optional
secondfield toTimeOfDay(defaults to0);TimeOfDay.fromDateTimenow preservesdateTime.second, and the JSON serialization round-trips it. - Select
planIdin the remainingUserfragment variant that was still missing it. - Restore the pre-migration
Actionsurface for backwards compatibility withlayrz_models:Action.fetchis an instance method again (withwithDetails),ActionInput.savereturnsFuture<ApiResponse<Action, Map<String, dynamic>>?>,ActionVariantregains its publicqueryName/addMutationName/editMutationName/deleteMutationNamegetters, andAction.gqlFragmentis restored. - Restore the pre-migration
MapLayersurface:MapLayerInput.savereturnsFuture<ApiResponse<MapLayer, Map<String, dynamic>>?>again, andMapLayer.gqlFragmentis restored as an alias offragment. - Restore the
SensorTypeConverter,SensorTypeOrNullConverter,SensorSubTypeConverter, andSensorSubTypeOrNullConverterclasses, which were dropped during thelayrz_modelsmigration.
Python #
- No changes in this release.
Go #
- No changes in this release.
4.5.0+9 #
Dart #
- Add
MapLayerInputwith asavemethod (addMapLayer/editMapLayer) to the map module, so map layers can be created and edited through the SDK. - Add the
BleDevice,BleManufacturerData, andBleServiceDatamodels to a newblemodule (moved fromlayrz_models). - Add
fetch,fetchAll, andsavemethods toDepartment/DepartmentInput(addDepartment/editDepartment), so departments can be listed and saved through the SDK. - Select
mfaEnabled,hasPaymentWarning,isLocked,isSuspended,planId, andbillingPlanin the fullUserfragment soUser.fetchreturns the account-state fields (previously onlyfetchAlldid).
Python #
- No changes in this release.
Go #
- No changes in this release.
4.5.0+8 #
4.5.0+7 #
Dart #
- Add an
isGoldenmflag toAvailableApp.fetchAll/fetchthat queriesinternalAvailableApps(with a caller-suppliedinternalIdentifier) and populatesversionsandimplementations. - Add the
InternalRegisteredAppandInternalAppInstancemodels and anAppVersionfragment; retypeAvailableApp.implementationstoList<InternalRegisteredApp>.
Python #
- No changes in this release.
Go #
- No changes in this release.
4.5.0+6 #
4.5.0+5 #
4.5.0+4 #
4.5.0+3 #
Dart #
- Added the
flespimodule (FlespiProtocol,FlespiChannel,FlespiModel) withfetchAll/fromFlespiGraphQL callers, moved fromlayrz_models. - Added
ModelInputandZigbeeParameterInputto themodelmodule, moved fromlayrz_models. - Added
CommandDefinitionInputandCommandPayloadDefinitionInputto thecommandsmodule, moved fromlayrz_models. - Added
ConfigGroupingInputandConfigDefinitionInputto theinboundmodule, moved fromlayrz_models. - Added
ConfIoTFileandConfIoTNamespace(with supporting converters) to theinboundmodule, moved fromlayrz_models. - Added the report preview types (
ReportPreview,ReportPage,ReportRow,ReportHeader,ReportCell,ReportDataType) to thereport_templatemodule, moved fromlayrz_models. - All moved types were relocated so Flutter components can drop their
layrz_modelsdependency.
Python #
- No changes in this release.
Go #
- No changes in this release.
4.5.0+2 #
Dart #
- Added the
VisionProtocolwrite path:VisionProtocolInput.save(withaddVisionProtocol/editVisionProtocolGraphQL callers) plusVisionProtocol.fragment,VisionProtocol.fetchAllandVisionProtocol.fetch. - Added the
account_launchermodule withGeneratorTemplateInputandBusTemplateInput.
Python #
- No changes in this release.
Go #
- No changes in this release.
4.5.0+1 #
Dart #
- Added
ExchangeProtocolInput.savefor the exchange protocol module, withaddExchangeProtocol/editExchangeProtocolGraphQL callers. - Added
OutboundProtocolInput.savefor the outbound protocol module, withaddOutboundProtocol/editOutboundProtocolGraphQL callers. - Added
AlgorithmInput.savefor the function module, withaddAlgorithm/editAlgorithmGraphQL callers. - Added
SimulationCycleInput.savefor the simulation module, withaddSimulationCycle/editSimulationCycleGraphQL callers. - Added
InboundProtocolInput.savefor the inbound module, withaddInboundProtocol/editInboundProtocolGraphQL callers. - Added
AvailableApp.fetchandAvailableAppInput.saveGraphQL callers alongside the existingAvailableApp.fetchAll. - All added callers preserve the established
onResponsecallback conventions of their module, and none of the new input types introduce a Material or Cupertino dependency.
Python #
- No changes in this release.
Go #
- No changes in this release.
4.5.0 #
Dart #
- Moved the
RegisteredApp,Tag, andCustomReportmodel graphs fromlayrz_modelsintolayrz_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
LinkShortcutmodel andLinkShortcutInputwith GraphQL callers (fetchAll,fetch,LinkShortcutInput.save,delete) for managing link shortcuts (short redirecting URLs), moved fromlayrz_models. - Added the
latlong2dependency and bumpedflutter_mdi_remapto^1.0.1, required by the moved models. - All moved code preserves its existing API surface and
onResponsecallback 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/InboundProtocoltype graph (Model,HwModel,HwModelInput,InboundProtocol, and their supporting command/config/credential-field/flespi/webhook/simulation/zigbee/firmware types) fromlayrz_modelsintolayrz_sdk, all exported frompackage:layrz_sdk/layrz_sdk.dart. - Added
HwModel.fetchandHwModelInput.saveAPI callers, alongside the existingHwModel.fetchAll. HwModel.fragmentnow fetches nested models:HwModel.modelsisList<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 #
4.4.8+1 #
4.4.8 #
4.4.7 #
Dart #
- Added the
categorymodule: theCategorymodel (id,name,kind,assetKind), theCategoryKindandAssetKindenums, and the mutableCategoryInputDTO, all exported frompackage:layrz_sdk/layrz_sdk.dart. CategoryexposesfetchAll/fetchAPI callers andCategoryInputexposes asavemethod 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
topicandpayloadfields, exported frompackage: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 #
4.4.5 #
4.4.4 #
Dart #
- Removed the
layrz_iconsdependency; icons are now generated directly fromflutter_material_design_icons. - Added
MdiRemapIcon, exposing each icon'sname, searchabletagsanddata. - Added the
MdiRemapIconsClassesregistry and theiconMappingname lookup, covering 7447 Material Design Icons. - Icon
tagsare now available for search and categorisation, whichlayrz_iconsdid not provide. - Breaking:
LayrzIcon,LayrzIconsandLayrzIconsClassesare replaced byMdiRemapIconandMdiRemapIconsClasses. - Breaking:
solar-*andfa-*icon names no longer resolve. Unknown names now fall back tomdi-help-circle-outline, previouslysolar-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 frompackage: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
TimeOfDayclass — JSON-serializable and intentionally shadows Flutter'sTimeOfDay. - Full dartdoc documentation across all public declarations.
- Added comprehensive test suite: 797 tests with 99.73% line coverage; new
make testandmake coveragetargets indart/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 toBAD_REQUEST, matching the platform's actual API response (was incorrectlyBADREQUEST). - Added validation to
BroadcastResult.status(Python) that accepts the legacyBADREQUESTstring and coerces it toBAD_REQUEST. - Initial version on Dart implementation
4.4.0 #
- Added
PUSH_NOTIFICATIONvalue toOperationTypefor Layrz Push (Firebase) operations. - Added
push_service_account(pushServiceAccount),push_devices(pushDevices), andpush_app_id(pushAppId) fields toOperationPayloadcarrying decrypted FCM credentials, bound device UUIDs, and the owning RegisteredApp ID. - Go module now provides the shared
OperationPayloadandOperationTypeKafka wire-contract entities used across Python and Go consumers.
4.3.16 #
- Fixed
BroadcastStatus.INTERNAL_ERROR(Go and Python) value toINTERNALERROR, matching the platform's actual API response. - Added validation to
BroadcastResult.statusandRawBroadcastResult.status(Python) that accepts the legacyINTERNAL_ERRORstring and coerces it toINTERNALERROR.
4.3.15 #
- Added
ActionKind.ZIGBEE_CHANGE(Python) for actions that send a command to a Zigbee device. - Added
zigbee_device_idandzigbee_settingsfields to theActionentity (Python), carrying the bound connectivity Device ID and the{device_id, settings: [{key, value}]}payload for ZIGBEE_CHANGE actions.
4.3.14 #
- Added
AuthenticatedAssetentity (Python and Go) withpk/idandnamefields. - Added
authenticated_users(list ofUser) andauthenticated_assets(list ofAuthenticatedAsset) fields to theAssetentity in both Python and Go, defaulting to an empty list.
4.3.11 #
- Fixed
types.UnixTimeJSON unmarshaling to also accept ISO 8601 datetime strings (e.g."2026-05-06T03:24:51.099415Z");MarshalJSONalways emits a float regardless of input format.
4.3.10 #
- Fixed
types.UnixTimeJSON 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.IdJSON tag: removedomitemptyso null id serializes as"id": nullmatching Python. - Fixed
DeviceMessageandAssetMessagenil maps/slices to serialize as{}/[]instead ofnull(matching Pythondefault_factory=dict/list). - Fixed
DeviceMessageFromMapto read"timestamp"key for received-at (was incorrectly reading"received_at"), with fallback to current time when missing. - Added
RejectedKeysfiltering inDeviceMessageFromMap— keys likeident,protocol.id,device.id,server.timestampare now excluded from payload, matching Python'sREJECTED_KEYSconstant. - Fixed
position.*values inDeviceMessageFromMapto only accept numeric types (matching Python'sisinstance(value, (float, int))guard). - Fixed
AssetMessageFromDeviceMessageto derive position fromasset.OperationMode:DISCONNECTED→ empty,STATIC→ static position,ZONE→ centroid of points, default → device position. - Fixed
AssetMessageFromDeviceMessageto prefix all payload keys with"{ident}."matching Python'sf'{device_message.ident}.{key}'. - Replaced haversine distance formula with Vincenty inverse on WGS-84 in
AssetMessage.ComputeDistanceTraveled, matchinggeopy.distance.geodesicoutput. - Added UUIDv7 validation on
DeviceMessage.IdandAssetMessage.Idvia customUnmarshalJSON, matching Python'spkfield validator.
4.3.8 #
- Fixed
BroadcastPayload.assetto be required (non-optional) to match Python parity. - Fixed
BroadcastPayload.message_idtype from*int64totypes.Uuidto match PythonUUIDfield. - Fixed
BroadcastPayload.received_atto be required (non-optional) to match Python parity. - Fixed
BroadcastPayload.position,payload, andsensorsfields to always serialize (noomitempty) to match Pythondefault_factory=dictbehavior. - Fixed
types.Uuid.MarshalJSONto return a properly quoted JSON string instead of raw unquoted text bytes.