Codec for <UserList>.
Build a <UserList> for cmd 59 that adds an account
Build a <UserList> for cmd 59 that adds an account
import { assertStringIncludes } from "@std/assert"; import { userList } from "@hertzg/reolink-api/protocol/params"; const xml = userList.encode({ User: [{ userName: "viewer", userSetState: "add", password: "s3cret" }], }); assertStringIncludes(xml, "<userSetState>add</userSetState>");