@hello.nrfcloud.com/proto-map 9.1.1 → 9.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -47,6 +47,11 @@
47
47
  *
48
48
  * Describes an RGB LED. Use different instances to address different LEDs.
49
49
  */ LwM2MObjectID[LwM2MObjectID["RGBLED_14240"] = 14240] = "RGBLED_14240";
50
+ /**
51
+ * Application Configuration (14301)
52
+ *
53
+ * Describes application configuration
54
+ */ LwM2MObjectID[LwM2MObjectID["ApplicationConfiguration_14301"] = 14301] = "ApplicationConfiguration_14301";
50
55
  })(LwM2MObjectID || (LwM2MObjectID = {}));
51
56
  /**
52
57
  * The LwM2M Object IDs defined in this repo.
@@ -59,5 +64,6 @@
59
64
  14210,
60
65
  14220,
61
66
  14230,
62
- 14240
67
+ 14240,
68
+ 14301
63
69
  ];
@@ -456,14 +456,14 @@ var _obj;
456
456
  /**
457
457
  * Atmospheric pressure (Float)
458
458
  *
459
- * Atmospheric pressure in pascal. Examples: 1003.6, 977.
459
+ * Atmospheric pressure in hectopascal. Examples: 1003.6, 977.
460
460
  */ 2: {
461
461
  ResourceID: 2,
462
462
  Name: "Atmospheric pressure",
463
463
  Mandatory: false,
464
464
  Type: ResourceType.Float,
465
- Description: "Atmospheric pressure in pascal. Examples: 1003.6, 977.",
466
- Units: "Pa"
465
+ Description: "Atmospheric pressure in hectopascal. Examples: 1003.6, 977.",
466
+ Units: "hPa"
467
467
  },
468
468
  /**
469
469
  * Air Quality Index (Integer)
@@ -669,4 +669,48 @@ var _obj;
669
669
  Description: "The timestamp of when the LED was changed."
670
670
  }
671
671
  }
672
+ }), /**
673
+ * Application Configuration (14301)
674
+ *
675
+ * Describes application configuration
676
+ */ _define_property(_obj, LwM2MObjectID.ApplicationConfiguration_14301, {
677
+ ObjectID: LwM2MObjectID.ApplicationConfiguration_14301,
678
+ ObjectVersion: "1.0",
679
+ Name: "Application Configuration",
680
+ Description: "Describes application configuration",
681
+ Resources: {
682
+ 0: {
683
+ ResourceID: 0,
684
+ Name: "Mode",
685
+ Mandatory: false,
686
+ Type: ResourceType.Integer,
687
+ Description: "The operation mode of the application, e.g. 0: \"real-time\", 1: \"interactive\", 2: \"low-power\".",
688
+ RangeEnumeration: {
689
+ min: 0,
690
+ max: 99
691
+ }
692
+ },
693
+ /**
694
+ * GNSSEnabled (Boolean)
695
+ *
696
+ * Whether to enabled the device's GNSS receiver.
697
+ */ 1: {
698
+ ResourceID: 1,
699
+ Name: "GNSSEnabled",
700
+ Mandatory: false,
701
+ Type: ResourceType.Boolean,
702
+ Description: "Whether to enabled the device's GNSS receiver."
703
+ },
704
+ /**
705
+ * Timestamp (Time)
706
+ *
707
+ * The timestamp of when the configuration was updated.
708
+ */ 99: {
709
+ ResourceID: 99,
710
+ Name: "Timestamp",
711
+ Mandatory: true,
712
+ Type: ResourceType.Time,
713
+ Description: "The timestamp of when the configuration was updated."
714
+ }
715
+ }
672
716
  }), _obj);
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Application Configuration (14301)
3
+ *
4
+ * Describes application configuration
5
+ */ export { };
@@ -0,0 +1,13 @@
1
+ import { DateResource, NumberResource, OptionalResource, BooleanResource, validateInstance } from "../validation.js";
2
+ import { LwM2MObjectID } from "../LwM2MObjectID.js";
3
+ /**
4
+ * Validate Application Configuration (14301)
5
+ *
6
+ * Ensures the given object is an LwM2M object according to the schema 14301.xml.
7
+ */ export var validate14301 = function(o) {
8
+ return validateInstance(LwM2MObjectID.ApplicationConfiguration_14301, "1.0", {
9
+ 99: DateResource,
10
+ 0: OptionalResource(NumberResource),
11
+ 1: OptionalResource(BooleanResource)
12
+ })(o);
13
+ };
@@ -7,3 +7,4 @@ export { validate14210 } from "./object/validate14210.js";
7
7
  export { validate14220 } from "./object/validate14220.js";
8
8
  export { validate14230 } from "./object/validate14230.js";
9
9
  export { validate14240 } from "./object/validate14240.js";
10
+ export { validate14301 } from "./object/validate14301.js";
@@ -9,5 +9,6 @@
9
9
  14210: 99,
10
10
  14220: 99,
11
11
  14230: 99,
12
- 14240: 99
12
+ 14240: 99,
13
+ 14301: 99
13
14
  };
@@ -8,6 +8,7 @@ import { validate14210 } from "./object/validate14210.js";
8
8
  import { validate14220 } from "./object/validate14220.js";
9
9
  import { validate14230 } from "./object/validate14230.js";
10
10
  import { validate14240 } from "./object/validate14240.js";
11
+ import { validate14301 } from "./object/validate14301.js";
11
12
  /**
12
13
  * Contains the validators for all registered LwM2M objects.
13
14
  */ export var validators = new Map();
@@ -20,3 +21,4 @@ validators.set(LwM2MObjectID.SolarCharge_14210, validate14210);
20
21
  validators.set(LwM2MObjectID.ButtonPress_14220, validate14220);
21
22
  validators.set(LwM2MObjectID.SeaWaterLevel_14230, validate14230);
22
23
  validators.set(LwM2MObjectID.RGBLED_14240, validate14240);
24
+ validators.set(LwM2MObjectID.ApplicationConfiguration_14301, validate14301);
package/lwm2m/14205.xml CHANGED
@@ -35,8 +35,8 @@
35
35
  <Mandatory>Optional</Mandatory>
36
36
  <Type>Float</Type>
37
37
  <RangeEnumeration/>
38
- <Units>Pa</Units>
39
- <Description><![CDATA[Atmospheric pressure in pascal. Examples: 1003.6, 977.]]></Description>
38
+ <Units>hPa</Units>
39
+ <Description><![CDATA[Atmospheric pressure in hectopascal. Examples: 1003.6, 977.]]></Description>
40
40
  </Item>
41
41
  <Item ID="10">
42
42
  <Name>Air Quality Index</Name>
@@ -0,0 +1,44 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <LWM2M xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://openmobilealliance.org/tech/profiles/LWM2M-v1_1.xsd">
3
+ <Object ObjectType="MODefinition">
4
+ <Name>Application Configuration</Name>
5
+ <Description1><![CDATA[Describes application configuration]]></Description1>
6
+ <ObjectID>14301</ObjectID>
7
+ <ObjectURN>urn:oma:lwm2m:x:14301</ObjectURN>
8
+ <MultipleInstances>Multiple</MultipleInstances>
9
+ <Mandatory>Optional</Mandatory>
10
+ <Resources>
11
+ <Item ID="0">
12
+ <Name>Mode</Name>
13
+ <Operations>RW</Operations>
14
+ <MultipleInstances>Single</MultipleInstances>
15
+ <Mandatory>Optional</Mandatory>
16
+ <Type>Integer</Type>
17
+ <RangeEnumeration>0..99</RangeEnumeration>
18
+ <Units/>
19
+ <Description><![CDATA[The operation mode of the application, e.g. 0: "real-time", 1: "interactive", 2: "low-power".]]></Description>
20
+ </Item>
21
+ <Item ID="1">
22
+ <Name>GNSSEnabled</Name>
23
+ <Operations>RW</Operations>
24
+ <MultipleInstances>Single</MultipleInstances>
25
+ <Mandatory>Optional</Mandatory>
26
+ <Type>Boolean</Type>
27
+ <RangeEnumeration/>
28
+ <Units/>
29
+ <Description><![CDATA[Whether to enabled the device's GNSS receiver.]]></Description>
30
+ </Item>
31
+ <Item ID="99">
32
+ <Name>Timestamp</Name>
33
+ <Operations>R</Operations>
34
+ <MultipleInstances>Single</MultipleInstances>
35
+ <Mandatory>Mandatory</Mandatory>
36
+ <Type>Time</Type>
37
+ <RangeEnumeration/>
38
+ <Units/>
39
+ <Description><![CDATA[The timestamp of when the configuration was updated.]]></Description>
40
+ </Item>
41
+ </Resources>
42
+ <Description2/>
43
+ </Object>
44
+ </LWM2M>
@@ -55,7 +55,13 @@ export enum LwM2MObjectID {
55
55
  *
56
56
  * Describes an RGB LED. Use different instances to address different LEDs.
57
57
  */
58
- RGBLED_14240 = 14240
58
+ RGBLED_14240 = 14240,
59
+ /**
60
+ * Application Configuration (14301)
61
+ *
62
+ * Describes application configuration
63
+ */
64
+ ApplicationConfiguration_14301 = 14301
59
65
  }
60
66
  /**
61
67
  * The LwM2M Object IDs defined in this repo.
@@ -78,4 +84,6 @@ export const LwM2MObjectIDs = [
78
84
  // Sea Water Level (14230)
79
85
  LwM2MObjectID.SeaWaterLevel_14230,
80
86
  // RGB LED (14240)
81
- LwM2MObjectID.RGBLED_14240];
87
+ LwM2MObjectID.RGBLED_14240,
88
+ // Application Configuration (14301)
89
+ LwM2MObjectID.ApplicationConfiguration_14301];
@@ -211,9 +211,9 @@ export const definitions: Record<LwM2MObjectID, LWM2MObjectInfo> = { /**
211
211
  1: { ResourceID: 1, Name: "Humidity", Mandatory: false, Type: ResourceType.Float, Description: "Environmental humidity in percent. Examples: 44.2, 72.", RangeEnumeration: { min: 0, max: 100 }, Units: "%" }, /**
212
212
  * Atmospheric pressure (Float)
213
213
  *
214
- * Atmospheric pressure in pascal. Examples: 1003.6, 977.
214
+ * Atmospheric pressure in hectopascal. Examples: 1003.6, 977.
215
215
  */
216
- 2: { ResourceID: 2, Name: "Atmospheric pressure", Mandatory: false, Type: ResourceType.Float, Description: "Atmospheric pressure in pascal. Examples: 1003.6, 977.", Units: "Pa" }, /**
216
+ 2: { ResourceID: 2, Name: "Atmospheric pressure", Mandatory: false, Type: ResourceType.Float, Description: "Atmospheric pressure in hectopascal. Examples: 1003.6, 977.", Units: "hPa" }, /**
217
217
  * Air Quality Index (Integer)
218
218
  *
219
219
  * The Bosch BME680 sensor calculates an Air Quality Index. See https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bme680-ds001.pdf
@@ -312,4 +312,27 @@ export const definitions: Record<LwM2MObjectID, LWM2MObjectInfo> = { /**
312
312
  *
313
313
  * The timestamp of when the LED was changed.
314
314
  */
315
- 99: { ResourceID: 99, Name: "Timestamp", Mandatory: true, Type: ResourceType.Time, Description: "The timestamp of when the LED was changed." } } } };
315
+ 99: { ResourceID: 99, Name: "Timestamp", Mandatory: true, Type: ResourceType.Time, Description: "The timestamp of when the LED was changed." } } }, /**
316
+ * Application Configuration (14301)
317
+ *
318
+ * Describes application configuration
319
+ */
320
+ [LwM2MObjectID.ApplicationConfiguration_14301]: { ObjectID: LwM2MObjectID.ApplicationConfiguration_14301, ObjectVersion: "1.0", Name: "Application Configuration", Description: "Describes application configuration", Resources: { /**
321
+ * Mode (Integer)
322
+ *
323
+ * The operation mode of the application, e.g. 0: "real-time", 1: "interactive", 2: "low-power".
324
+ *
325
+ * Minimum: 0
326
+ * Maximum: 99
327
+ */
328
+ 0: { ResourceID: 0, Name: "Mode", Mandatory: false, Type: ResourceType.Integer, Description: "The operation mode of the application, e.g. 0: \"real-time\", 1: \"interactive\", 2: \"low-power\".", RangeEnumeration: { min: 0, max: 99 } }, /**
329
+ * GNSSEnabled (Boolean)
330
+ *
331
+ * Whether to enabled the device's GNSS receiver.
332
+ */
333
+ 1: { ResourceID: 1, Name: "GNSSEnabled", Mandatory: false, Type: ResourceType.Boolean, Description: "Whether to enabled the device's GNSS receiver." }, /**
334
+ * Timestamp (Time)
335
+ *
336
+ * The timestamp of when the configuration was updated.
337
+ */
338
+ 99: { ResourceID: 99, Name: "Timestamp", Mandatory: true, Type: ResourceType.Time, Description: "The timestamp of when the configuration was updated." } } } };
@@ -31,9 +31,9 @@ export type Environment_14205 = LwM2MObject<{
31
31
  */
32
32
  1?: number;
33
33
  /**
34
- * Atmospheric pressure (Pa)
34
+ * Atmospheric pressure (hPa)
35
35
  *
36
- * Atmospheric pressure in pascal. Examples: 1003.6, 977.
36
+ * Atmospheric pressure in hectopascal. Examples: 1003.6, 977.
37
37
  */
38
38
  2?: number;
39
39
  /**
@@ -0,0 +1,34 @@
1
+ import type { LwM2MObject } from "../LwM2MObject.js";
2
+ import { LwM2MObjectID } from "../LwM2MObjectID.js";
3
+ /**
4
+ * Application Configuration (14301)
5
+ *
6
+ * Describes application configuration
7
+ */
8
+ export type ApplicationConfiguration_14301 = LwM2MObject<{
9
+ ObjectID: LwM2MObjectID.ApplicationConfiguration_14301;
10
+ ObjectVersion: "1.0";
11
+ Resources: {
12
+ /**
13
+ * Timestamp
14
+ *
15
+ * The timestamp of when the configuration was updated.
16
+ */
17
+ 99: Date;
18
+ /**
19
+ * Mode
20
+ *
21
+ * The operation mode of the application, e.g. 0: "real-time", 1: "interactive", 2: "low-power".
22
+ *
23
+ * Minimum: 0
24
+ * Maximum: 99
25
+ */
26
+ 0?: number;
27
+ /**
28
+ * GNSSEnabled
29
+ *
30
+ * Whether to enabled the device's GNSS receiver.
31
+ */
32
+ 1?: boolean;
33
+ };
34
+ }>;
@@ -0,0 +1,14 @@
1
+ import type { LwM2MObjectInstance } from "../LwM2MObjectInstance.js";
2
+ import { DateResource, NumberResource, OptionalResource, BooleanResource, validateInstance } from "../validation.js";
3
+ import type { ApplicationConfiguration_14301 } from "../objects.js";
4
+ import { LwM2MObjectID } from "../LwM2MObjectID.js";
5
+ /**
6
+ * Validate Application Configuration (14301)
7
+ *
8
+ * Ensures the given object is an LwM2M object according to the schema 14301.xml.
9
+ */
10
+ export const validate14301 = (o: unknown): {
11
+ error: Error;
12
+ } | {
13
+ object: LwM2MObjectInstance<ApplicationConfiguration_14301>;
14
+ } => validateInstance<ApplicationConfiguration_14301>(LwM2MObjectID.ApplicationConfiguration_14301, "1.0", { 99: DateResource, 0: OptionalResource(NumberResource), 1: OptionalResource(BooleanResource) })(o);
package/lwm2m/objects.ts CHANGED
@@ -15,4 +15,6 @@ export { validate14220 } from "./object/validate14220.js";
15
15
  export type { SeaWaterLevel_14230 } from "./object/14230.js";
16
16
  export { validate14230 } from "./object/validate14230.js";
17
17
  export type { RGBLED_14240 } from "./object/14240.js";
18
- export { validate14240 } from "./object/validate14240.js";
18
+ export { validate14240 } from "./object/validate14240.js";
19
+ export type { ApplicationConfiguration_14301 } from "./object/14301.js";
20
+ export { validate14301 } from "./object/validate14301.js";
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Contains the ID of the resource that defines the timestamp for each LwM2M object definition
3
3
  */
4
- export const timestampResources: Readonly<Record<number, number>> = { 14201: 99, 14202: 99, 14203: 99, 14204: 99, 14205: 99, 14210: 99, 14220: 99, 14230: 99, 14240: 99 };
4
+ export const timestampResources: Readonly<Record<number, number>> = { 14201: 99, 14202: 99, 14203: 99, 14204: 99, 14205: 99, 14210: 99, 14220: 99, 14230: 99, 14240: 99, 14301: 99 };
@@ -9,6 +9,7 @@ import { validate14210 } from "./object/validate14210.js";
9
9
  import { validate14220 } from "./object/validate14220.js";
10
10
  import { validate14230 } from "./object/validate14230.js";
11
11
  import { validate14240 } from "./object/validate14240.js";
12
+ import { validate14301 } from "./object/validate14301.js";
12
13
  /**
13
14
  * Contains the validators for all registered LwM2M objects.
14
15
  */
@@ -25,4 +26,5 @@ validators.set(LwM2MObjectID.Environment_14205, validate14205)
25
26
  validators.set(LwM2MObjectID.SolarCharge_14210, validate14210)
26
27
  validators.set(LwM2MObjectID.ButtonPress_14220, validate14220)
27
28
  validators.set(LwM2MObjectID.SeaWaterLevel_14230, validate14230)
28
- validators.set(LwM2MObjectID.RGBLED_14240, validate14240)
29
+ validators.set(LwM2MObjectID.RGBLED_14240, validate14240)
30
+ validators.set(LwM2MObjectID.ApplicationConfiguration_14301, validate14301)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hello.nrfcloud.com/proto-map",
3
- "version": "9.1.1",
3
+ "version": "9.2.0",
4
4
  "description": "Documents the communication protocol between devices, the hello.nrfcloud.com/map backend and web application",
5
5
  "type": "module",
6
6
  "exports": {