2.7.0 • Published 6 months ago

@nordicsemiconductor/lwm2m-types v2.7.0

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
6 months ago

LwM2M TypeScript type definitions and JSON schema npm version

Test and Release semantic-release Renovate Mergify Status Commitizen friendly code style: prettier ESLint: TypeScript

TypeScript type definitions and JSON schema for the objects defined in the LwM2M Object Registry.

This is useful if you need to validate a JSON representation of those objects.

Installation

npm ci
// Clone LwM2M object registry
git clone https://github.com/OpenMobileAlliance/lwm2m-registry.git --depth 1
npm test

Usage

See example.ts

JSON document structure

LwM2M values are encoded as a JSON document, where the key is an extended version of the LwM2M URN: <ObjectID>:<ObjectVersion>@<LwM2MVersion> (where ObjectVersion and/or LwM2MVersion can be omitted if it is 1.0).

Example

Building the types

git clone https://github.com/OpenMobileAlliance/lwm2m-registry.git --depth 1
npx tsx cli/generate-types.ts
npx tsx cli/generate-json-schema.ts
# Format the source
npx prettier --write ./
# Make sure result compiles
npx tsc
# Compile JS exports
npx swc -d types-dist ./types
# Make sure example runs
npx tsx ./example.ts
2.5.0

10 months ago

2.7.0

6 months ago

2.6.1

8 months ago

2.6.0

8 months ago

2.5.1

8 months ago

2.4.1

11 months ago

2.3.2

11 months ago

2.4.0

11 months ago

2.3.1

12 months ago

2.3.3

11 months ago

2.3.0

1 year ago

2.2.0

1 year ago

2.1.3

1 year ago

1.2.0

1 year ago

1.1.0

1 year ago

2.1.2

1 year ago

2.0.3

1 year ago

2.1.1

1 year ago

2.0.2

1 year ago

2.0.4

1 year ago

2.1.0

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago