UNPKG

@hello.nrfcloud.com/proto

Version:

Documents the communication protocol between the hello.nrfcloud.com backend and the web application

21 lines (20 loc) 758 B
import { Type } from '@sinclair/typebox'; import { Context } from './Context.js'; import { IsoDateType } from './IsoDateType.js'; import { deviceId } from './deviceId.js'; export var DeviceIdentity = Type.Object({ '@context': Type.Literal(Context.deviceIdentity.toString()), id: deviceId, model: Type.String({ minLength: 1, description: 'the device model', examples: [ 'PCA20035', 'PCA20035+solar' ] }), lastSeen: Type.Optional(IsoDateType('Time formatted as ISO 8601 string when the device last sent in a message.')), hideDataBefore: Type.Optional(IsoDateType('Data before this date is not accessible. Time formatted as ISO 8601 string.')) }, { title: 'DeviceIdentity' });