Codec for <VersionInfo>.
Round-trip a reply with the optional suffix
Round-trip a reply with the optional suffix
import { assertEquals } from "@std/assert"; import { parse } from "@std/xml"; import { versionInfo } from "@hertzg/reolink-api/protocol/params"; const value = { name: "Garage", type: "IPC", serialNumber: "serial-garage", buildDay: "build 24010101", hardwareVersion: "hw-garage", cfgVersion: "cfg-garage", firmwareVersion: "fw-garage", detail: "detail-garage", IEClient: "ie-garage", pakSuffix: "pak", anotherPakSuffix: "paks", }; assertEquals(versionInfo.decode(parse(versionInfo.encode(value)).root), value);
XmlParam<"VersionInfo", VersionInfo>