@hello.nrfcloud.com/proto-map 10.0.0 → 10.0.2

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.
@@ -681,23 +681,23 @@ var _obj;
681
681
  Resources: {
682
682
  0: {
683
683
  ResourceID: 0,
684
- Name: "Mode",
685
- Mandatory: false,
684
+ Name: "Update interval",
685
+ Mandatory: true,
686
686
  Type: ResourceType.Integer,
687
- Description: "The operation mode of the application, e.g. 0: \"real-time\", 1: \"interactive\", 2: \"low-power\".",
687
+ Description: "The update interval in seconds. Examples: 10, 3600.",
688
688
  RangeEnumeration: {
689
689
  min: 0,
690
- max: 99
690
+ max: 31622400
691
691
  }
692
692
  },
693
693
  /**
694
- * GNSSEnabled (Boolean)
694
+ * GNSS enabled (Boolean)
695
695
  *
696
696
  * Whether to enabled the device's GNSS receiver.
697
697
  */ 1: {
698
698
  ResourceID: 1,
699
- Name: "GNSSEnabled",
700
- Mandatory: false,
699
+ Name: "GNSS enabled",
700
+ Mandatory: true,
701
701
  Type: ResourceType.Boolean,
702
702
  Description: "Whether to enabled the device's GNSS receiver."
703
703
  },
@@ -1,4 +1,4 @@
1
- import { TimeResource, NumberResource, OptionalResource, BooleanResource, validateInstance } from "../validation.js";
1
+ import { NumberResource, BooleanResource, TimeResource, validateInstance } from "../validation.js";
2
2
  import { LwM2MObjectID } from "../LwM2MObjectID.js";
3
3
  /**
4
4
  * Validate Application Configuration (14301)
@@ -6,8 +6,8 @@ import { LwM2MObjectID } from "../LwM2MObjectID.js";
6
6
  * Ensures the given object is an LwM2M object according to the schema 14301.xml.
7
7
  */ export var validate14301 = function(o) {
8
8
  return validateInstance(LwM2MObjectID.ApplicationConfiguration_14301, "1.0", {
9
- 99: TimeResource,
10
- 0: OptionalResource(NumberResource),
11
- 1: OptionalResource(BooleanResource)
9
+ 0: NumberResource,
10
+ 1: BooleanResource,
11
+ 99: TimeResource
12
12
  })(o);
13
13
  };
package/lwm2m/14301.xml CHANGED
@@ -9,20 +9,20 @@
9
9
  <Mandatory>Optional</Mandatory>
10
10
  <Resources>
11
11
  <Item ID="0">
12
- <Name>Mode</Name>
12
+ <Name>Update interval</Name>
13
13
  <Operations>RW</Operations>
14
14
  <MultipleInstances>Single</MultipleInstances>
15
- <Mandatory>Optional</Mandatory>
15
+ <Mandatory>Mandatory</Mandatory>
16
16
  <Type>Integer</Type>
17
- <RangeEnumeration>0..99</RangeEnumeration>
17
+ <RangeEnumeration>0..31622400</RangeEnumeration>
18
18
  <Units/>
19
- <Description><![CDATA[The operation mode of the application, e.g. 0: "real-time", 1: "interactive", 2: "low-power".]]></Description>
19
+ <Description><![CDATA[The update interval in seconds. Examples: 10, 3600.]]></Description>
20
20
  </Item>
21
21
  <Item ID="1">
22
- <Name>GNSSEnabled</Name>
22
+ <Name>GNSS enabled</Name>
23
23
  <Operations>RW</Operations>
24
24
  <MultipleInstances>Single</MultipleInstances>
25
- <Mandatory>Optional</Mandatory>
25
+ <Mandatory>Mandatory</Mandatory>
26
26
  <Type>Boolean</Type>
27
27
  <RangeEnumeration/>
28
28
  <Units/>
@@ -318,19 +318,19 @@ export const definitions: Record<LwM2MObjectID, LWM2MObjectInfo> = { /**
318
318
  * Describes application configuration
319
319
  */
320
320
  [LwM2MObjectID.ApplicationConfiguration_14301]: { ObjectID: LwM2MObjectID.ApplicationConfiguration_14301, ObjectVersion: "1.0", Name: "Application Configuration", Description: "Describes application configuration", Resources: { /**
321
- * Mode (Integer)
321
+ * Update interval (Integer)
322
322
  *
323
- * The operation mode of the application, e.g. 0: "real-time", 1: "interactive", 2: "low-power".
323
+ * The update interval in seconds. Examples: 10, 3600.
324
324
  *
325
325
  * Minimum: 0
326
- * Maximum: 99
326
+ * Maximum: 31622400
327
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)
328
+ 0: { ResourceID: 0, Name: "Update interval", Mandatory: true, Type: ResourceType.Integer, Description: "The update interval in seconds. Examples: 10, 3600.", RangeEnumeration: { min: 0, max: 31622400 } }, /**
329
+ * GNSS enabled (Boolean)
330
330
  *
331
331
  * Whether to enabled the device's GNSS receiver.
332
332
  */
333
- 1: { ResourceID: 1, Name: "GNSSEnabled", Mandatory: false, Type: ResourceType.Boolean, Description: "Whether to enabled the device's GNSS receiver." }, /**
333
+ 1: { ResourceID: 1, Name: "GNSS enabled", Mandatory: true, Type: ResourceType.Boolean, Description: "Whether to enabled the device's GNSS receiver." }, /**
334
334
  * Timestamp (Time)
335
335
  *
336
336
  * The timestamp of when the configuration was updated.
@@ -10,25 +10,25 @@ export type ApplicationConfiguration_14301 = LwM2MObject<{
10
10
  ObjectVersion: "1.0";
11
11
  Resources: {
12
12
  /**
13
- * Timestamp
14
- *
15
- * The timestamp of when the configuration was updated.
16
- */
17
- 99: number;
18
- /**
19
- * Mode
13
+ * Update interval
20
14
  *
21
- * The operation mode of the application, e.g. 0: "real-time", 1: "interactive", 2: "low-power".
15
+ * The update interval in seconds. Examples: 10, 3600.
22
16
  *
23
17
  * Minimum: 0
24
- * Maximum: 99
18
+ * Maximum: 31622400
25
19
  */
26
- 0?: number;
20
+ 0: number;
27
21
  /**
28
- * GNSSEnabled
22
+ * GNSS enabled
29
23
  *
30
24
  * Whether to enabled the device's GNSS receiver.
31
25
  */
32
- 1?: boolean;
26
+ 1: boolean;
27
+ /**
28
+ * Timestamp
29
+ *
30
+ * The timestamp of when the configuration was updated.
31
+ */
32
+ 99: number;
33
33
  };
34
34
  }>;
@@ -1,5 +1,5 @@
1
1
  import type { LwM2MObjectInstance } from "../LwM2MObjectInstance.js";
2
- import { TimeResource, NumberResource, OptionalResource, BooleanResource, validateInstance } from "../validation.js";
2
+ import { NumberResource, BooleanResource, TimeResource, validateInstance } from "../validation.js";
3
3
  import type { ApplicationConfiguration_14301 } from "../objects.js";
4
4
  import { LwM2MObjectID } from "../LwM2MObjectID.js";
5
5
  /**
@@ -11,4 +11,4 @@ export const validate14301 = (o: unknown): {
11
11
  error: Error;
12
12
  } | {
13
13
  object: LwM2MObjectInstance<ApplicationConfiguration_14301>;
14
- } => validateInstance<ApplicationConfiguration_14301>(LwM2MObjectID.ApplicationConfiguration_14301, "1.0", { 99: TimeResource, 0: OptionalResource(NumberResource), 1: OptionalResource(BooleanResource) })(o);
14
+ } => validateInstance<ApplicationConfiguration_14301>(LwM2MObjectID.ApplicationConfiguration_14301, "1.0", { 0: NumberResource, 1: BooleanResource, 99: TimeResource })(o);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hello.nrfcloud.com/proto-map",
3
- "version": "10.0.0",
3
+ "version": "10.0.2",
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": {