UNPKG

@hello.nrfcloud.com/proto

Version:

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

10 lines (8 loc) 378 B
import { Type, type TString } from '@sinclair/typebox' export const IsoDateType = (description?: string): TString => Type.String({ pattern: '^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2}(?:.[0-9]*)?)(([+-]([0-9]{2}):([0-9]{2})|Z)?)$', description: description ?? 'A date formatted as an ISO 8601 string', examples: [new Date().toISOString()], })