Introduce the Models module in order to make others internal

This commit is contained in:
Sven van Heugten 2026-01-03 19:24:37 +01:00
parent 915d01e086
commit c377ec25dc
6 changed files with 31 additions and 26 deletions

View file

@ -1,20 +1,12 @@
module NightLight.ZigbeeEvents
module internal NightLight.ZigbeeEvents
open NightLight.Models
open FsToolkit.ErrorHandling
open FSharp.Data
type ZigbeeEvent = DeviceAnnounce of FriendlyName: string
type ParseZigbeeEventError =
| InvalidJson
| MissingTypeField
| MissingDataField
| MissingFriendlyNameField
| InvalidTypeField
| InvalidFriendlyNameField
| UnknownType
let internal parseZigbeeEvent str =
let parseZigbeeEvent str =
result {
let! jsonValue = JsonValue.TryParse str |> Result.requireSome InvalidJson