UNPKG

@hello.nrfcloud.com/proto-map

Version:

Documents the communication protocol between devices, the hello.nrfcloud.com/map backend and web application

14 lines 644 B
import type { LwM2MObjectInstance } from "../LwM2MObjectInstance.js"; import { TimeResource, NumberResource, OptionalResource, validateInstance } from "../validation.js"; import type { Reboot_14250 } from "../objects.js"; import { LwM2MObjectID } from "../LwM2MObjectID.js"; /** * Validate Reboot (14250) * * Ensures the given object is an LwM2M object according to the schema 14250.xml. */ export const validate14250 = (o: unknown): { error: Error; } | { object: LwM2MObjectInstance<Reboot_14250>; } => validateInstance<Reboot_14250>(LwM2MObjectID.Reboot_14250, "1.0", { 99: TimeResource, 0: OptionalResource(NumberResource) })(o);