@kusinta/iot-schema 0.1.0-beta.17 → 0.1.0-beta.19

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kusinta/iot-schema",
3
- "version": "0.1.0-beta.17",
3
+ "version": "0.1.0-beta.19",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "files": ["src"],
@@ -14,6 +14,7 @@
14
14
  "./device": "./src/kusinta/iot/device/v1/device_pb.js",
15
15
  "./device/descriptor": "./src/kusinta/iot/device/v1/descriptor_pb.js",
16
16
  "./device/properties": "./src/kusinta/iot/device/v1/properties_pb.js",
17
+ "./device/matter-options": "./src/kusinta/iot/device/v1/matter_options_pb.js",
17
18
  "./device/property-update": "./src/kusinta/iot/device/v1/property_update_pb.js",
18
19
  "./space": "./src/kusinta/iot/space/v1/space_pb.js",
19
20
  "./access": "./src/kusinta/iot/access/v1/acl_pb.js",
@@ -19,6 +19,24 @@ export declare const file_kusinta_iot_device_v1_device: GenFile;
19
19
  * Field number convention: 1 = descriptor, 2-49 = standard Matter device types,
20
20
  * 50-99 = vendor extensions, 20+ = timestamps.
21
21
  *
22
+ * Selecting the properties case
23
+ *
24
+ * Each non-vendor case's message type declares the Matter device type it models in
25
+ * (matter_device_type), so the mapping from DeviceDescriptor.matter_device_type_id to a
26
+ * case is read from the descriptor rather than hard-coded. See matter_options.proto, and
27
+ * property_update.proto for the full resolution rule.
28
+ *
29
+ * matter_device_type_id stays a bare uint32: a connector must be able to report a device
30
+ * type this schema does not model. Such a device is legitimate — it exists, it belongs in
31
+ * a device list, it simply carries no typed properties. A consumer that cannot match the
32
+ * device type leaves the properties oneof unset and keeps the Device; it MUST NOT drop the
33
+ * device or substitute a nearby case. An unset oneof therefore means either "not modelled"
34
+ * or "modelled but nothing reported yet", which are indistinguishable here on purpose;
35
+ * distinguish them by re-resolving matter_device_type_id if you need to.
36
+ *
37
+ * Adding a case: annotate the new *Properties message with its (matter_device_type). A case
38
+ * without one resolves for nobody.
39
+ *
22
40
  * @generated from message kusinta.iot.device.v1.Device
23
41
  */
24
42
  export declare type Device = Message<"kusinta.iot.device.v1.Device"> & {
@@ -113,11 +131,25 @@ export declare type Device = Message<"kusinta.iot.device.v1.Device"> & {
113
131
  } | { case: undefined; value?: undefined };
114
132
 
115
133
  /**
134
+ * When the gateway last had evidence this device exists and is reachable — the
135
+ * most recent PropertyUpdate, announcement, or command result concerning it.
136
+ * Gateway-observed, not connector-reported: no message on either leg carries a
137
+ * per-device liveness timestamp, so this is as precise as the device's own report
138
+ * interval. A device that reports every 15 minutes looks stale for 15 minutes.
139
+ *
140
+ * Survives a connector reconnect. Losing the route to a device is not evidence the
141
+ * device is gone, so last_seen keeps its value; only fresh evidence advances it.
142
+ *
143
+ * Advisory, for showing staleness in a UI. It is not a removal signal — that is
144
+ * webrtc.v1.DeviceRemoved, sent only when a connector reports the device gone.
145
+ *
116
146
  * @generated from field: google.protobuf.Timestamp last_seen = 20;
117
147
  */
118
148
  lastSeen?: Timestamp | undefined;
119
149
 
120
150
  /**
151
+ * When any field of this Device last changed value.
152
+ *
121
153
  * @generated from field: google.protobuf.Timestamp last_updated = 21;
122
154
  */
123
155
  lastUpdated?: Timestamp | undefined;
@@ -0,0 +1,46 @@
1
+ // @generated by protoc-gen-es v2.12.0 with parameter "target=js+dts,import_extension=js"
2
+ // @generated from file kusinta/iot/device/v1/matter_options.proto (package kusinta.iot.device.v1, syntax proto3)
3
+ /* eslint-disable */
4
+
5
+ import type { GenExtension, GenFile } from "@bufbuild/protobuf/codegenv2";
6
+ import type { FieldOptions, MessageOptions } from "@bufbuild/protobuf/wkt";
7
+
8
+ /**
9
+ * Describes the file kusinta/iot/device/v1/matter_options.proto.
10
+ */
11
+ export declare const file_kusinta_iot_device_v1_matter_options: GenFile;
12
+
13
+ /**
14
+ * The Matter cluster this attribute belongs to, e.g. 0x0201 for Thermostat.
15
+ *
16
+ * Required alongside matter_attribute because a properties message may span
17
+ * clusters: DimmableLightProperties.on_off is On/Off (0x0006) while its
18
+ * current_level is Level Control (0x0008). Matches PropertyUpdate.cluster_id_hex
19
+ * parsed as a hex integer.
20
+ *
21
+ * @generated from extension: uint32 matter_cluster_id = 50001;
22
+ */
23
+ export declare const matter_cluster_id: GenExtension<FieldOptions, number>;
24
+
25
+ /**
26
+ * The Matter attribute name in the spec's own PascalCase, e.g.
27
+ * "PIROccupiedToUnoccupiedDelay". This is the authoritative spelling; the proto
28
+ * field name is not derived from it and must not be assumed to be. Matches
29
+ * PropertyUpdate.attribute_name byte for byte.
30
+ *
31
+ * @generated from extension: string matter_attribute = 50002;
32
+ */
33
+ export declare const matter_attribute: GenExtension<FieldOptions, string>;
34
+
35
+ /**
36
+ * The Matter device type IDs this properties message models, e.g. 0x0301 for
37
+ * Thermostat. Repeated because one shape of properties can serve several device
38
+ * types; empty on vendor extension messages, which have no Matter device type.
39
+ *
40
+ * A device type appears on at most one properties message, so the mapping from
41
+ * DeviceDescriptor.matter_device_type_id to a Device.properties case is a function.
42
+ *
43
+ * @generated from extension: repeated uint32 matter_device_type = 50003;
44
+ */
45
+ export declare const matter_device_type: GenExtension<MessageOptions, number[]>;
46
+
@@ -0,0 +1,50 @@
1
+ // @generated by protoc-gen-es v2.12.0 with parameter "target=js+dts,import_extension=js"
2
+ // @generated from file kusinta/iot/device/v1/matter_options.proto (package kusinta.iot.device.v1, syntax proto3)
3
+ /* eslint-disable */
4
+
5
+ import { extDesc, fileDesc } from "@bufbuild/protobuf/codegenv2";
6
+ import { file_google_protobuf_descriptor } from "@bufbuild/protobuf/wkt";
7
+
8
+ /**
9
+ * Describes the file kusinta/iot/device/v1/matter_options.proto.
10
+ */
11
+ export const file_kusinta_iot_device_v1_matter_options = /*@__PURE__*/
12
+ fileDesc("CiprdXNpbnRhL2lvdC9kZXZpY2UvdjEvbWF0dGVyX29wdGlvbnMucHJvdG8SFWt1c2ludGEuaW90LmRldmljZS52MTpLChFtYXR0ZXJfY2x1c3Rlcl9pZBIdLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE9wdGlvbnMY0YYDIAEoDVIPbWF0dGVyQ2x1c3RlcklkOkoKEG1hdHRlcl9hdHRyaWJ1dGUSHS5nb29nbGUucHJvdG9idWYuRmllbGRPcHRpb25zGNKGAyABKAlSD21hdHRlckF0dHJpYnV0ZTpPChJtYXR0ZXJfZGV2aWNlX3R5cGUSHy5nb29nbGUucHJvdG9idWYuTWVzc2FnZU9wdGlvbnMY04YDIAMoDVIQbWF0dGVyRGV2aWNlVHlwZUICSAFiBnByb3RvMw", [file_google_protobuf_descriptor]);
13
+
14
+ /**
15
+ * The Matter cluster this attribute belongs to, e.g. 0x0201 for Thermostat.
16
+ *
17
+ * Required alongside matter_attribute because a properties message may span
18
+ * clusters: DimmableLightProperties.on_off is On/Off (0x0006) while its
19
+ * current_level is Level Control (0x0008). Matches PropertyUpdate.cluster_id_hex
20
+ * parsed as a hex integer.
21
+ *
22
+ * @generated from extension: uint32 matter_cluster_id = 50001;
23
+ */
24
+ export const matter_cluster_id = /*@__PURE__*/
25
+ extDesc(file_kusinta_iot_device_v1_matter_options, 0);
26
+
27
+ /**
28
+ * The Matter attribute name in the spec's own PascalCase, e.g.
29
+ * "PIROccupiedToUnoccupiedDelay". This is the authoritative spelling; the proto
30
+ * field name is not derived from it and must not be assumed to be. Matches
31
+ * PropertyUpdate.attribute_name byte for byte.
32
+ *
33
+ * @generated from extension: string matter_attribute = 50002;
34
+ */
35
+ export const matter_attribute = /*@__PURE__*/
36
+ extDesc(file_kusinta_iot_device_v1_matter_options, 1);
37
+
38
+ /**
39
+ * The Matter device type IDs this properties message models, e.g. 0x0301 for
40
+ * Thermostat. Repeated because one shape of properties can serve several device
41
+ * types; empty on vendor extension messages, which have no Matter device type.
42
+ *
43
+ * A device type appears on at most one properties message, so the mapping from
44
+ * DeviceDescriptor.matter_device_type_id to a Device.properties case is a function.
45
+ *
46
+ * @generated from extension: repeated uint32 matter_device_type = 50003;
47
+ */
48
+ export const matter_device_type = /*@__PURE__*/
49
+ extDesc(file_kusinta_iot_device_v1_matter_options, 2);
50
+