@hello.nrfcloud.com/proto-map 16.3.33 → 16.4.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.
@@ -66,6 +66,11 @@
66
66
  *
67
67
  * Information about the connection quality.
68
68
  */ LwM2MObjectID[LwM2MObjectID["ConnectionQuality_14501"] = 14501] = "ConnectionQuality_14501";
69
+ /**
70
+ * Network Neighbor (14502)
71
+ *
72
+ * This LwM2M Object describes neighboring devices.
73
+ */ LwM2MObjectID[LwM2MObjectID["NetworkNeighbor_14502"] = 14502] = "NetworkNeighbor_14502";
69
74
  return LwM2MObjectID;
70
75
  }({});
71
76
  /**
@@ -83,5 +88,6 @@
83
88
  14250,
84
89
  14301,
85
90
  14401,
86
- 14501
91
+ 14501,
92
+ 14502
87
93
  ];
@@ -917,4 +917,61 @@ var _obj;
917
917
  Description: "The timestamp of when the measurement was performed."
918
918
  }
919
919
  }
920
+ }), /**
921
+ * Network Neighbor (14502)
922
+ *
923
+ * This LwM2M Object describes neighboring devices.
924
+ */ _define_property(_obj, LwM2MObjectID.NetworkNeighbor_14502, {
925
+ ObjectID: LwM2MObjectID.NetworkNeighbor_14502,
926
+ ObjectVersion: "1.0",
927
+ Name: "Network Neighbor",
928
+ Description: "This LwM2M Object describes neighboring devices.",
929
+ Resources: {
930
+ 0: {
931
+ ResourceID: 0,
932
+ Name: "Neighbor ID",
933
+ Mandatory: true,
934
+ Type: ResourceType.Integer,
935
+ Multiple: false,
936
+ Description: "This identifier uniquely identifies each neighbor device in the network. Examples: 1523, 862.",
937
+ RangeEnumeration: {
938
+ min: 1,
939
+ max: 4294967293
940
+ }
941
+ },
942
+ /**
943
+ * Radio Signal Strength (Integer)
944
+ *
945
+ * Indicates the average value of the received signal strength indication from the neighbor device. Examples: -123, -98.
946
+ *
947
+ * Minimum: -140
948
+ * Maximum: -1
949
+ */ 1: {
950
+ ResourceID: 1,
951
+ Name: "Radio Signal Strength",
952
+ Mandatory: false,
953
+ Type: ResourceType.Integer,
954
+ Multiple: false,
955
+ Description: "Indicates the average value of the received signal strength indication from the neighbor device. Examples: -123, -98.",
956
+ RangeEnumeration: {
957
+ min: -140,
958
+ max: -1
959
+ },
960
+ Units: "dBm"
961
+ },
962
+ /**
963
+ * Timestamp (Time)
964
+ *
965
+ * The timestamp of when the neighbor information was reported.
966
+ *
967
+ * Time resources in LwM2M are represented as a signed integer representing the number of seconds since Jan 1, 1970 in the UTC time zone.
968
+ */ 99: {
969
+ ResourceID: 99,
970
+ Name: "Timestamp",
971
+ Mandatory: true,
972
+ Type: ResourceType.Time,
973
+ Multiple: false,
974
+ Description: "The timestamp of when the neighbor information was reported."
975
+ }
976
+ }
920
977
  }), _obj);
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Network Neighbor (14502)
3
+ *
4
+ * This LwM2M Object describes neighboring devices.
5
+ */ export { };
@@ -0,0 +1,13 @@
1
+ import { NumberResource, TimeResource, OptionalResource, validateInstance } from "../validation.js";
2
+ import { LwM2MObjectID } from "../LwM2MObjectID.js";
3
+ /**
4
+ * Validate Network Neighbor (14502)
5
+ *
6
+ * Ensures the given object is an LwM2M object according to the schema 14502.xml.
7
+ */ export var validate14502 = function(o) {
8
+ return validateInstance(LwM2MObjectID.NetworkNeighbor_14502, "1.0", {
9
+ 0: NumberResource,
10
+ 99: TimeResource,
11
+ 1: OptionalResource(NumberResource)
12
+ })(o);
13
+ };
@@ -11,3 +11,4 @@ export { validate14250 } from "./object/validate14250.js";
11
11
  export { validate14301 } from "./object/validate14301.js";
12
12
  export { validate14401 } from "./object/validate14401.js";
13
13
  export { validate14501 } from "./object/validate14501.js";
14
+ export { validate14502 } from "./object/validate14502.js";
@@ -53,5 +53,9 @@ import { LwM2MObjectID } from "./LwM2MObjectID.js";
53
53
  [
54
54
  LwM2MObjectID.ConnectionQuality_14501,
55
55
  99
56
+ ],
57
+ [
58
+ LwM2MObjectID.NetworkNeighbor_14502,
59
+ 99
56
60
  ]
57
61
  ]);
@@ -12,6 +12,7 @@ import { validate14250 } from "./object/validate14250.js";
12
12
  import { validate14301 } from "./object/validate14301.js";
13
13
  import { validate14401 } from "./object/validate14401.js";
14
14
  import { validate14501 } from "./object/validate14501.js";
15
+ import { validate14502 } from "./object/validate14502.js";
15
16
  /**
16
17
  * Contains the validators for all registered LwM2M objects.
17
18
  */ export var validators = new Map();
@@ -28,3 +29,4 @@ validators.set(LwM2MObjectID.Reboot_14250, validate14250);
28
29
  validators.set(LwM2MObjectID.ApplicationConfiguration_14301, validate14301);
29
30
  validators.set(LwM2MObjectID.NRFCloudServiceInfo_14401, validate14401);
30
31
  validators.set(LwM2MObjectID.ConnectionQuality_14501, validate14501);
32
+ validators.set(LwM2MObjectID.NetworkNeighbor_14502, validate14502);
@@ -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>Network Neighbor</Name>
5
+ <Description1><![CDATA[This LwM2M Object describes neighboring devices.]]></Description1>
6
+ <ObjectID>14502</ObjectID>
7
+ <ObjectURN>urn:oma:lwm2m:x:14502</ObjectURN>
8
+ <MultipleInstances>Multiple</MultipleInstances>
9
+ <Mandatory>Optional</Mandatory>
10
+ <Resources>
11
+ <Item ID="0">
12
+ <Name>Neighbor ID</Name>
13
+ <Operations>R</Operations>
14
+ <MultipleInstances>Single</MultipleInstances>
15
+ <Mandatory>Mandatory</Mandatory>
16
+ <Type>Integer</Type>
17
+ <RangeEnumeration>1..4294967293</RangeEnumeration>
18
+ <Units/>
19
+ <Description><![CDATA[This identifier uniquely identifies each neighbor device in the network. Examples: 1523, 862.]]></Description>
20
+ </Item>
21
+ <Item ID="1">
22
+ <Name>Radio Signal Strength</Name>
23
+ <Operations>R</Operations>
24
+ <MultipleInstances>Single</MultipleInstances>
25
+ <Mandatory>Optional</Mandatory>
26
+ <Type>Integer</Type>
27
+ <RangeEnumeration>-140..-1</RangeEnumeration>
28
+ <Units>dBm</Units>
29
+ <Description><![CDATA[Indicates the average value of the received signal strength indication from the neighbor device. Examples: -123, -98.]]></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 neighbor information was reported.]]></Description>
40
+ </Item>
41
+ </Resources>
42
+ <Description2/>
43
+ </Object>
44
+ </LWM2M>
@@ -79,7 +79,13 @@ export enum LwM2MObjectID {
79
79
  *
80
80
  * Information about the connection quality.
81
81
  */
82
- ConnectionQuality_14501 = 14501
82
+ ConnectionQuality_14501 = 14501,
83
+ /**
84
+ * Network Neighbor (14502)
85
+ *
86
+ * This LwM2M Object describes neighboring devices.
87
+ */
88
+ NetworkNeighbor_14502 = 14502
83
89
  }
84
90
  /**
85
91
  * The LwM2M Object IDs defined in this repo.
@@ -110,4 +116,6 @@ export const LwM2MObjectIDs = [
110
116
  // nRF Cloud Service Info (14401)
111
117
  LwM2MObjectID.NRFCloudServiceInfo_14401,
112
118
  // Connection Quality (14501)
113
- LwM2MObjectID.ConnectionQuality_14501];
119
+ LwM2MObjectID.ConnectionQuality_14501,
120
+ // Network Neighbor (14502)
121
+ LwM2MObjectID.NetworkNeighbor_14502];
@@ -420,4 +420,32 @@ export const definitions: Record<LwM2MObjectID, LWM2MObjectInfo> = { /**
420
420
  *
421
421
  * Time resources in LwM2M are represented as a signed integer representing the number of seconds since Jan 1, 1970 in the UTC time zone.
422
422
  */
423
- 99: { ResourceID: 99, Name: "Timestamp", Mandatory: true, Type: ResourceType.Time, Multiple: false, Description: "The timestamp of when the measurement was performed." } } } };
423
+ 99: { ResourceID: 99, Name: "Timestamp", Mandatory: true, Type: ResourceType.Time, Multiple: false, Description: "The timestamp of when the measurement was performed." } } }, /**
424
+ * Network Neighbor (14502)
425
+ *
426
+ * This LwM2M Object describes neighboring devices.
427
+ */
428
+ [LwM2MObjectID.NetworkNeighbor_14502]: { ObjectID: LwM2MObjectID.NetworkNeighbor_14502, ObjectVersion: "1.0", Name: "Network Neighbor", Description: "This LwM2M Object describes neighboring devices.", Resources: { /**
429
+ * Neighbor ID (Integer)
430
+ *
431
+ * This identifier uniquely identifies each neighbor device in the network. Examples: 1523, 862.
432
+ *
433
+ * Minimum: 1
434
+ * Maximum: 4294967293
435
+ */
436
+ 0: { ResourceID: 0, Name: "Neighbor ID", Mandatory: true, Type: ResourceType.Integer, Multiple: false, Description: "This identifier uniquely identifies each neighbor device in the network. Examples: 1523, 862.", RangeEnumeration: { min: 1, max: 4294967293 } }, /**
437
+ * Radio Signal Strength (Integer)
438
+ *
439
+ * Indicates the average value of the received signal strength indication from the neighbor device. Examples: -123, -98.
440
+ *
441
+ * Minimum: -140
442
+ * Maximum: -1
443
+ */
444
+ 1: { ResourceID: 1, Name: "Radio Signal Strength", Mandatory: false, Type: ResourceType.Integer, Multiple: false, Description: "Indicates the average value of the received signal strength indication from the neighbor device. Examples: -123, -98.", RangeEnumeration: { min: -140, max: -1 }, Units: "dBm" }, /**
445
+ * Timestamp (Time)
446
+ *
447
+ * The timestamp of when the neighbor information was reported.
448
+ *
449
+ * Time resources in LwM2M are represented as a signed integer representing the number of seconds since Jan 1, 1970 in the UTC time zone.
450
+ */
451
+ 99: { ResourceID: 99, Name: "Timestamp", Mandatory: true, Type: ResourceType.Time, Multiple: false, Description: "The timestamp of when the neighbor information was reported." } } } };
@@ -0,0 +1,37 @@
1
+ import type { LwM2MObject } from "../LwM2MObject.js";
2
+ import { LwM2MObjectID } from "../LwM2MObjectID.js";
3
+ /**
4
+ * Network Neighbor (14502)
5
+ *
6
+ * This LwM2M Object describes neighboring devices.
7
+ */
8
+ export type NetworkNeighbor_14502 = LwM2MObject<{
9
+ ObjectID: LwM2MObjectID.NetworkNeighbor_14502;
10
+ ObjectVersion: "1.0";
11
+ Resources: {
12
+ /**
13
+ * Neighbor ID
14
+ *
15
+ * This identifier uniquely identifies each neighbor device in the network. Examples: 1523, 862.
16
+ *
17
+ * Minimum: 1
18
+ * Maximum: 4294967293
19
+ */
20
+ 0: number;
21
+ /**
22
+ * Timestamp
23
+ *
24
+ * The timestamp of when the neighbor information was reported.
25
+ */
26
+ 99: number;
27
+ /**
28
+ * Radio Signal Strength (dBm)
29
+ *
30
+ * Indicates the average value of the received signal strength indication from the neighbor device. Examples: -123, -98.
31
+ *
32
+ * Minimum: -140
33
+ * Maximum: -1
34
+ */
35
+ 1?: number;
36
+ };
37
+ }>;
@@ -0,0 +1,14 @@
1
+ import type { LwM2MObjectInstance } from "../LwM2MObjectInstance.js";
2
+ import { NumberResource, TimeResource, OptionalResource, validateInstance } from "../validation.js";
3
+ import type { NetworkNeighbor_14502 } from "../objects.js";
4
+ import { LwM2MObjectID } from "../LwM2MObjectID.js";
5
+ /**
6
+ * Validate Network Neighbor (14502)
7
+ *
8
+ * Ensures the given object is an LwM2M object according to the schema 14502.xml.
9
+ */
10
+ export const validate14502 = (o: unknown): {
11
+ error: Error;
12
+ } | {
13
+ object: LwM2MObjectInstance<NetworkNeighbor_14502>;
14
+ } => validateInstance<NetworkNeighbor_14502>(LwM2MObjectID.NetworkNeighbor_14502, "1.0", { 0: NumberResource, 99: TimeResource, 1: OptionalResource(NumberResource) })(o);
package/lwm2m/objects.ts CHANGED
@@ -23,4 +23,6 @@ export { validate14301 } from "./object/validate14301.js";
23
23
  export type { NRFCloudServiceInfo_14401 } from "./object/14401.js";
24
24
  export { validate14401 } from "./object/validate14401.js";
25
25
  export type { ConnectionQuality_14501 } from "./object/14501.js";
26
- export { validate14501 } from "./object/validate14501.js";
26
+ export { validate14501 } from "./object/validate14501.js";
27
+ export type { NetworkNeighbor_14502 } from "./object/14502.js";
28
+ export { validate14502 } from "./object/validate14502.js";
@@ -2,4 +2,4 @@ import { LwM2MObjectID } from "./LwM2MObjectID.js";
2
2
  /**
3
3
  * Contains the ID of the resource that defines the timestamp for each LwM2M object definition
4
4
  */
5
- export const timestampResources: Readonly<Map<LwM2MObjectID, number>> = new Map<LwM2MObjectID, number>([[LwM2MObjectID.Geolocation_14201, 99], [LwM2MObjectID.BatteryAndPower_14202, 99], [LwM2MObjectID.ConnectionInformation_14203, 99], [LwM2MObjectID.DeviceInformation_14204, 99], [LwM2MObjectID.Environment_14205, 99], [LwM2MObjectID.SolarCharge_14210, 99], [LwM2MObjectID.ButtonPress_14220, 99], [LwM2MObjectID.SeaWaterLevel_14230, 99], [LwM2MObjectID.RGBLED_14240, 99], [LwM2MObjectID.Reboot_14250, 99], [LwM2MObjectID.ApplicationConfiguration_14301, 99], [LwM2MObjectID.NRFCloudServiceInfo_14401, 99], [LwM2MObjectID.ConnectionQuality_14501, 99]]);
5
+ export const timestampResources: Readonly<Map<LwM2MObjectID, number>> = new Map<LwM2MObjectID, number>([[LwM2MObjectID.Geolocation_14201, 99], [LwM2MObjectID.BatteryAndPower_14202, 99], [LwM2MObjectID.ConnectionInformation_14203, 99], [LwM2MObjectID.DeviceInformation_14204, 99], [LwM2MObjectID.Environment_14205, 99], [LwM2MObjectID.SolarCharge_14210, 99], [LwM2MObjectID.ButtonPress_14220, 99], [LwM2MObjectID.SeaWaterLevel_14230, 99], [LwM2MObjectID.RGBLED_14240, 99], [LwM2MObjectID.Reboot_14250, 99], [LwM2MObjectID.ApplicationConfiguration_14301, 99], [LwM2MObjectID.NRFCloudServiceInfo_14401, 99], [LwM2MObjectID.ConnectionQuality_14501, 99], [LwM2MObjectID.NetworkNeighbor_14502, 99]]);
@@ -13,6 +13,7 @@ import { validate14250 } from "./object/validate14250.js";
13
13
  import { validate14301 } from "./object/validate14301.js";
14
14
  import { validate14401 } from "./object/validate14401.js";
15
15
  import { validate14501 } from "./object/validate14501.js";
16
+ import { validate14502 } from "./object/validate14502.js";
16
17
  /**
17
18
  * Contains the validators for all registered LwM2M objects.
18
19
  */
@@ -33,4 +34,5 @@ validators.set(LwM2MObjectID.RGBLED_14240, validate14240)
33
34
  validators.set(LwM2MObjectID.Reboot_14250, validate14250)
34
35
  validators.set(LwM2MObjectID.ApplicationConfiguration_14301, validate14301)
35
36
  validators.set(LwM2MObjectID.NRFCloudServiceInfo_14401, validate14401)
36
- validators.set(LwM2MObjectID.ConnectionQuality_14501, validate14501)
37
+ validators.set(LwM2MObjectID.ConnectionQuality_14501, validate14501)
38
+ validators.set(LwM2MObjectID.NetworkNeighbor_14502, validate14502)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hello.nrfcloud.com/proto-map",
3
- "version": "16.3.33",
3
+ "version": "16.4.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": {
@@ -39,8 +39,8 @@
39
39
  "@bifravst/prettier-config": "1.1.11",
40
40
  "@commitlint/config-conventional": "19.8.1",
41
41
  "@swc/cli": "0.7.7",
42
- "@swc/core": "1.12.7",
43
- "@types/node": "22.15.33",
42
+ "@swc/core": "1.12.9",
43
+ "@types/node": "22.16.0",
44
44
  "@types/xml2js": "0.4.14",
45
45
  "chalk": "5.4.1",
46
46
  "globstar": "1.0.0",
@@ -98,7 +98,7 @@
98
98
  "lwm2m"
99
99
  ],
100
100
  "peerDependencies": {
101
- "@aws-sdk/client-timestream-write": "^3.839.0",
101
+ "@aws-sdk/client-timestream-write": "^3.840.0",
102
102
  "@sinclair/typebox": "^0.34.37"
103
103
  }
104
104
  }