@kusinta/iot-schema 0.1.0-beta.9 → 0.2.0-beta.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.
- package/package.json +13 -2
- package/src/kusinta/iot/access/v1/acl_pb.d.ts +230 -11
- package/src/kusinta/iot/access/v1/acl_pb.js +25 -4
- package/src/kusinta/iot/access/v1/roles_pb.d.ts +95 -2
- package/src/kusinta/iot/access/v1/roles_pb.js +37 -1
- package/src/kusinta/iot/connector/v1/connector_pb.d.ts +60 -30
- package/src/kusinta/iot/connector/v1/connector_pb.js +12 -11
- package/src/kusinta/iot/connector/v1/connector_service_pb.d.ts +5 -5
- package/src/kusinta/iot/connector/v1/connector_service_pb.js +1 -1
- package/src/kusinta/iot/device/v1/cluster_state_pb.d.ts +238 -0
- package/src/kusinta/iot/device/v1/cluster_state_pb.js +54 -0
- package/src/kusinta/iot/device/v1/descriptor_pb.d.ts +37 -8
- package/src/kusinta/iot/device/v1/descriptor_pb.js +2 -1
- package/src/kusinta/iot/device/v1/device_event_pb.d.ts +162 -0
- package/src/kusinta/iot/device/v1/device_event_pb.js +45 -0
- package/src/kusinta/iot/device/v1/device_pb.d.ts +154 -28
- package/src/kusinta/iot/device/v1/device_pb.js +10 -2
- package/src/kusinta/iot/device/v1/matter_options_pb.d.ts +84 -0
- package/src/kusinta/iot/device/v1/matter_options_pb.js +91 -0
- package/src/kusinta/iot/device/v1/properties_pb.d.ts +228 -207
- package/src/kusinta/iot/device/v1/properties_pb.js +9 -1
- package/src/kusinta/iot/device/v1/property_update_pb.d.ts +197 -8
- package/src/kusinta/iot/device/v1/property_update_pb.js +20 -2
- package/src/kusinta/iot/registration/v1/registration_pb.d.ts +170 -0
- package/src/kusinta/iot/registration/v1/registration_pb.js +61 -0
- package/src/kusinta/iot/registration/v1/registration_service_pb.d.ts +34 -0
- package/src/kusinta/iot/registration/v1/registration_service_pb.js +19 -0
- package/src/kusinta/iot/signaling/v1/signaling_pb.d.ts +320 -0
- package/src/kusinta/iot/signaling/v1/signaling_pb.js +83 -0
- package/src/kusinta/iot/signaling/v1/signaling_service_pb.d.ts +34 -0
- package/src/kusinta/iot/signaling/v1/signaling_service_pb.js +19 -0
- package/src/kusinta/iot/vendor/homematic/v1/homematic_pb.d.ts +65 -47
- package/src/kusinta/iot/vendor/homematic/v1/homematic_pb.js +8 -7
- package/src/kusinta/iot/vendor/v1/vendor_options_pb.d.ts +50 -0
- package/src/kusinta/iot/vendor/v1/vendor_options_pb.js +53 -0
- package/src/kusinta/iot/webrtc/v1/app_token_pb.d.ts +152 -0
- package/src/kusinta/iot/webrtc/v1/app_token_pb.js +28 -0
- package/src/kusinta/iot/webrtc/v1/command_pb.d.ts +276 -39
- package/src/kusinta/iot/webrtc/v1/command_pb.js +28 -2
- package/src/kusinta/iot/webrtc/v1/device_state_pb.d.ts +76 -7
- package/src/kusinta/iot/webrtc/v1/device_state_pb.js +19 -4
- package/src/kusinta/iot/webrtc/v1/envelope_pb.d.ts +371 -24
- package/src/kusinta/iot/webrtc/v1/envelope_pb.js +68 -5
- package/src/kusinta/iot/webrtc/v1/management_pb.d.ts +451 -0
- package/src/kusinta/iot/webrtc/v1/management_pb.js +106 -0
- package/src/kusinta/iot/webrtc/v1/permission_push_pb.d.ts +7 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kusinta/iot-schema",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0-beta.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": ["src"],
|
|
@@ -14,13 +14,24 @@
|
|
|
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",
|
|
19
|
+
"./device/cluster-state": "./src/kusinta/iot/device/v1/cluster_state_pb.js",
|
|
20
|
+
"./device/event": "./src/kusinta/iot/device/v1/device_event_pb.js",
|
|
21
|
+
"./vendor/options": "./src/kusinta/iot/vendor/v1/vendor_options_pb.js",
|
|
22
|
+
"./vendor/homematic": "./src/kusinta/iot/vendor/homematic/v1/homematic_pb.js",
|
|
18
23
|
"./space": "./src/kusinta/iot/space/v1/space_pb.js",
|
|
19
24
|
"./access": "./src/kusinta/iot/access/v1/acl_pb.js",
|
|
20
25
|
"./access/roles": "./src/kusinta/iot/access/v1/roles_pb.js",
|
|
21
26
|
"./connector": "./src/kusinta/iot/connector/v1/connector_pb.js",
|
|
22
27
|
"./connector/service": "./src/kusinta/iot/connector/v1/connector_service_pb.js",
|
|
23
|
-
"./webrtc": "./src/kusinta/iot/webrtc/v1/envelope_pb.js"
|
|
28
|
+
"./webrtc": "./src/kusinta/iot/webrtc/v1/envelope_pb.js",
|
|
29
|
+
"./webrtc/app-token": "./src/kusinta/iot/webrtc/v1/app_token_pb.js",
|
|
30
|
+
"./webrtc/management": "./src/kusinta/iot/webrtc/v1/management_pb.js",
|
|
31
|
+
"./registration": "./src/kusinta/iot/registration/v1/registration_pb.js",
|
|
32
|
+
"./registration/service": "./src/kusinta/iot/registration/v1/registration_service_pb.js",
|
|
33
|
+
"./signaling": "./src/kusinta/iot/signaling/v1/signaling_pb.js",
|
|
34
|
+
"./signaling/service": "./src/kusinta/iot/signaling/v1/signaling_service_pb.js"
|
|
24
35
|
},
|
|
25
36
|
"dependencies": {
|
|
26
37
|
"@bufbuild/protobuf": "^2.12.0"
|
|
@@ -13,9 +13,152 @@ import type { Timestamp } from "@bufbuild/protobuf/wkt";
|
|
|
13
13
|
*/
|
|
14
14
|
export declare const file_kusinta_iot_access_v1_acl: GenFile;
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* AttributeRef names one attribute on one endpoint. It is the schema's single way to say
|
|
18
|
+
* "this attribute of this device" — used to grant it, to bound it, to read it and to write
|
|
19
|
+
* it, so a consumer writes one matcher rather than several that must agree.
|
|
20
|
+
*
|
|
21
|
+
* Addressed exactly as device.v1.PropertyUpdate is, and for the same reasons:
|
|
22
|
+
*
|
|
23
|
+
* * cluster_id and attribute_id are NUMERIC and are what resolution matches. Attribute
|
|
24
|
+
* names repeat across clusters — MeasuredValue is Temperature (0x0402), Relative
|
|
25
|
+
* Humidity (0x0405) and Pressure (0x0403) — and a numeric pair is what the
|
|
26
|
+
* (matter_cluster_id)/(matter_attribute_id) annotations carry, so nothing has to be
|
|
27
|
+
* parsed or looked up to compare them.
|
|
28
|
+
* * attribute_name is advisory: the attribute's own spelling, for logs and rendering. It
|
|
29
|
+
* is NOT matched on the Matter branch. On the vendor branch it is the only address
|
|
30
|
+
* there is, and there it is authoritative.
|
|
31
|
+
* * endpoint_id matters because a device presents several endpoints, often of the same
|
|
32
|
+
* device type: all four channels of a 4-channel actuator are OnOff on cluster 0x0006,
|
|
33
|
+
* so a reference without one cannot tell channel 1 from channel 3.
|
|
34
|
+
*
|
|
35
|
+
* What an ABSENT endpoint_id means is decided by the field holding this message, not here,
|
|
36
|
+
* and the current holders mean opposite things on purpose — see
|
|
37
|
+
* DeviceAcl.allowed_attribute_refs and PropertyConstraint.attribute. It is optional on the
|
|
38
|
+
* wire so that "not stated" is representable and rejectable, rather than a bare uint32
|
|
39
|
+
* decoding an omission to endpoint 0, which is the Matter root node.
|
|
40
|
+
*
|
|
41
|
+
* @generated from message kusinta.iot.access.v1.AttributeRef
|
|
42
|
+
*/
|
|
43
|
+
export declare type AttributeRef = Message<"kusinta.iot.access.v1.AttributeRef"> & {
|
|
44
|
+
/**
|
|
45
|
+
* Advisory on the Matter branch, authoritative on the vendor branch. See above.
|
|
46
|
+
*
|
|
47
|
+
* @generated from field: string attribute_name = 1;
|
|
48
|
+
*/
|
|
49
|
+
attributeName: string;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Matter branch. Both required there, both unset on the vendor branch.
|
|
53
|
+
*
|
|
54
|
+
* @generated from field: uint32 cluster_id = 2;
|
|
55
|
+
*/
|
|
56
|
+
clusterId: number;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* @generated from field: uint32 attribute_id = 4;
|
|
60
|
+
*/
|
|
61
|
+
attributeId: number;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @generated from field: optional uint32 endpoint_id = 3;
|
|
65
|
+
*/
|
|
66
|
+
endpointId?: number | undefined;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Set to name a vendor parameter instead of a Matter attribute, by its
|
|
70
|
+
* (vendor_extension) key. Then attribute_name addresses it and cluster_id/attribute_id
|
|
71
|
+
* play no part — a vendor parameter has no Matter cluster and no numeric ID in any
|
|
72
|
+
* specification.
|
|
73
|
+
*
|
|
74
|
+
* Without this a vendor parameter could be reported but never granted, bounded or
|
|
75
|
+
* written: a valve position would be all-or-nothing for permissions, which would undo
|
|
76
|
+
* most of the point of making vendor extensions reachable at all.
|
|
77
|
+
*
|
|
78
|
+
* @generated from field: optional string vendor_extension = 5;
|
|
79
|
+
*/
|
|
80
|
+
vendorExtension?: string | undefined;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Describes the message kusinta.iot.access.v1.AttributeRef.
|
|
85
|
+
* Use `create(AttributeRefSchema)` to create a new message.
|
|
86
|
+
*/
|
|
87
|
+
export declare const AttributeRefSchema: GenMessage<AttributeRef>;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* CommandRef names one command on one endpoint, for DeviceAcl.allowed_command_refs.
|
|
91
|
+
*
|
|
92
|
+
* A separate type from AttributeRef because attributes and commands are numbered
|
|
93
|
+
* independently within a cluster: On/Off (0x0006) has an attribute 0x0000 (OnOff) and a
|
|
94
|
+
* command 0x0000 (Off) that have nothing to do with each other. Putting a command ID in a
|
|
95
|
+
* field named attribute_id would be the same class of ambiguity this schema removed when
|
|
96
|
+
* it made addressing numeric.
|
|
97
|
+
*
|
|
98
|
+
* @generated from message kusinta.iot.access.v1.CommandRef
|
|
99
|
+
*/
|
|
100
|
+
export declare type CommandRef = Message<"kusinta.iot.access.v1.CommandRef"> & {
|
|
101
|
+
/**
|
|
102
|
+
* @generated from field: uint32 cluster_id = 1;
|
|
103
|
+
*/
|
|
104
|
+
clusterId: number;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* @generated from field: uint32 matter_command_id = 2;
|
|
108
|
+
*/
|
|
109
|
+
matterCommandId: number;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Which endpoint. Required on a grant, for the same reason as AttributeRef.endpoint_id:
|
|
113
|
+
* all four channels of a 4-channel actuator accept the same command on the same cluster,
|
|
114
|
+
* so a ref without one cannot tell channel 1 from channel 3.
|
|
115
|
+
*
|
|
116
|
+
* @generated from field: optional uint32 endpoint_id = 3;
|
|
117
|
+
*/
|
|
118
|
+
endpointId?: number | undefined;
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Describes the message kusinta.iot.access.v1.CommandRef.
|
|
123
|
+
* Use `create(CommandRefSchema)` to create a new message.
|
|
124
|
+
*/
|
|
125
|
+
export declare const CommandRefSchema: GenMessage<CommandRef>;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* EventRef names one event on one endpoint, for DeviceAcl.allowed_event_refs.
|
|
129
|
+
*
|
|
130
|
+
* Events are numbered independently of attributes and commands within a cluster, so this
|
|
131
|
+
* is a third type rather than a reuse. On Door Lock (0x0101), the LockState attribute and
|
|
132
|
+
* the lock-operation event are different elements answering different questions: what the
|
|
133
|
+
* lock's state is, and who changed it.
|
|
134
|
+
*
|
|
135
|
+
* @generated from message kusinta.iot.access.v1.EventRef
|
|
136
|
+
*/
|
|
137
|
+
export declare type EventRef = Message<"kusinta.iot.access.v1.EventRef"> & {
|
|
138
|
+
/**
|
|
139
|
+
* @generated from field: uint32 cluster_id = 1;
|
|
140
|
+
*/
|
|
141
|
+
clusterId: number;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* @generated from field: uint32 event_id = 2;
|
|
145
|
+
*/
|
|
146
|
+
eventId: number;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* @generated from field: optional uint32 endpoint_id = 3;
|
|
150
|
+
*/
|
|
151
|
+
endpointId?: number | undefined;
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Describes the message kusinta.iot.access.v1.EventRef.
|
|
156
|
+
* Use `create(EventRefSchema)` to create a new message.
|
|
157
|
+
*/
|
|
158
|
+
export declare const EventRefSchema: GenMessage<EventRef>;
|
|
159
|
+
|
|
16
160
|
/**
|
|
17
161
|
* PropertyConstraint bounds a single Matter cluster attribute.
|
|
18
|
-
* attribute_name uses PascalCase Matter attribute naming (e.g. "MaxHeatSetpointLimit").
|
|
19
162
|
* MaxHeatSetpointLimit and MinHeatSetpointLimit are actual Matter Thermostat cluster
|
|
20
163
|
* attributes (0x0016, 0x0015) — the gateway writes them directly via the connector.
|
|
21
164
|
*
|
|
@@ -23,9 +166,14 @@ export declare const file_kusinta_iot_access_v1_acl: GenFile;
|
|
|
23
166
|
*/
|
|
24
167
|
export declare type PropertyConstraint = Message<"kusinta.iot.access.v1.PropertyConstraint"> & {
|
|
25
168
|
/**
|
|
26
|
-
*
|
|
169
|
+
* An absent AttributeRef.endpoint_id here means EVERY endpoint of the device — the
|
|
170
|
+
* opposite of what it means on a grant, deliberately. A constraint is a restriction, so
|
|
171
|
+
* omission broadens what is restricted; a grant is permission, so omission there would
|
|
172
|
+
* broaden access and is invalid instead. Both defaults fail safe.
|
|
173
|
+
*
|
|
174
|
+
* @generated from field: kusinta.iot.access.v1.AttributeRef attribute = 8;
|
|
27
175
|
*/
|
|
28
|
-
|
|
176
|
+
attribute?: AttributeRef | undefined;
|
|
29
177
|
|
|
30
178
|
/**
|
|
31
179
|
* @generated from oneof kusinta.iot.access.v1.PropertyConstraint.constraint
|
|
@@ -55,11 +203,6 @@ export declare type PropertyConstraint = Message<"kusinta.iot.access.v1.Property
|
|
|
55
203
|
value: number;
|
|
56
204
|
case: "uintMin";
|
|
57
205
|
} | { case: undefined; value?: undefined };
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* @generated from field: string cluster_id_hex = 6;
|
|
61
|
-
*/
|
|
62
|
-
clusterIdHex: string;
|
|
63
206
|
};
|
|
64
207
|
|
|
65
208
|
/**
|
|
@@ -83,26 +226,84 @@ export declare type DeviceAcl = Message<"kusinta.iot.access.v1.DeviceAcl"> & {
|
|
|
83
226
|
userId?: UserId | undefined;
|
|
84
227
|
|
|
85
228
|
/**
|
|
229
|
+
* The user's role AS RESOLVED FOR THIS DEVICE. A gateway-wide role is a ceiling on the
|
|
230
|
+
* kinds of action a user may perform; reach — which devices — is decided separately by
|
|
231
|
+
* filing. This field is what the two produced together for this one device, so it may
|
|
232
|
+
* differ from any single role the user's token carries. See roles.proto.
|
|
233
|
+
*
|
|
234
|
+
* Descriptive. allowed_actions and the ref lists below are what a consumer enforces
|
|
235
|
+
* against; this says which relationship produced them.
|
|
236
|
+
*
|
|
86
237
|
* @generated from field: kusinta.iot.access.v1.Role role = 3;
|
|
87
238
|
*/
|
|
88
239
|
role: Role;
|
|
89
240
|
|
|
90
241
|
/**
|
|
242
|
+
* What this user may do to this device. EMPTY GRANTS NOTHING — an ACL with no actions
|
|
243
|
+
* permits no operation at all.
|
|
244
|
+
*
|
|
245
|
+
* Deliberately the opposite default to allowed_attribute_refs below, which is empty for
|
|
246
|
+
* "every attribute". The two are not the same kind of list: this one IS the grant, so an
|
|
247
|
+
* empty grant is empty, while that one is a FILTER narrowing the grant, so an empty
|
|
248
|
+
* filter narrows nothing. Reading either as the other fails open.
|
|
249
|
+
*
|
|
250
|
+
* PERMISSION_ACTION_UNSPECIFIED in this list is invalid and MUST be rejected; it is not
|
|
251
|
+
* a wildcard. See roles.proto for what each action authorizes.
|
|
252
|
+
*
|
|
91
253
|
* @generated from field: repeated kusinta.iot.access.v1.PermissionAction allowed_actions = 4;
|
|
92
254
|
*/
|
|
93
255
|
allowedActions: PermissionAction[];
|
|
94
256
|
|
|
95
257
|
/**
|
|
96
|
-
*
|
|
258
|
+
* Narrows allowed_actions to particular attributes. Empty = every attribute on every
|
|
259
|
+
* endpoint, unchanged in meaning from the field it replaces — an empty filter narrows
|
|
260
|
+
* nothing. It does NOT grant anything on its own: with allowed_actions empty, this
|
|
261
|
+
* being empty still permits no operation.
|
|
262
|
+
*
|
|
263
|
+
* A ref present with no endpoint_id is INVALID and MUST be rejected, not read as a grant
|
|
264
|
+
* over every endpoint: omission must never be what widens access.
|
|
97
265
|
*
|
|
98
|
-
* @generated from field: repeated
|
|
266
|
+
* @generated from field: repeated kusinta.iot.access.v1.AttributeRef allowed_attribute_refs = 7;
|
|
99
267
|
*/
|
|
100
|
-
|
|
268
|
+
allowedAttributeRefs: AttributeRef[];
|
|
101
269
|
|
|
102
270
|
/**
|
|
103
271
|
* @generated from field: repeated kusinta.iot.access.v1.PropertyConstraint property_constraints = 6;
|
|
104
272
|
*/
|
|
105
273
|
propertyConstraints: PropertyConstraint[];
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Narrows PERMISSION_ACTION_INVOKE to particular commands. Empty = every command the
|
|
277
|
+
* device accepts, matching allowed_attribute_refs — it is a filter, and an empty filter
|
|
278
|
+
* narrows nothing. It grants nothing on its own: without INVOKE in allowed_actions, no
|
|
279
|
+
* command is permitted however this list reads.
|
|
280
|
+
*
|
|
281
|
+
* Without it INVOKE is all-or-nothing, and that is the operation that moves hardware —
|
|
282
|
+
* a grant covering a thermostat setpoint would equally cover UnlockDoor on a device
|
|
283
|
+
* exposing both.
|
|
284
|
+
*
|
|
285
|
+
* A ref present with no endpoint_id is INVALID and MUST be rejected.
|
|
286
|
+
*
|
|
287
|
+
* @generated from field: repeated kusinta.iot.access.v1.CommandRef allowed_command_refs = 9;
|
|
288
|
+
*/
|
|
289
|
+
allowedCommandRefs: CommandRef[];
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Which events this user may receive. Empty = NONE.
|
|
293
|
+
*
|
|
294
|
+
* The opposite default to the two lists above, deliberately. Attributes and commands are
|
|
295
|
+
* a device's operating surface; events are its journal, and a journal discloses who did
|
|
296
|
+
* what and when. Reaching that must be an explicit grant, never something a user gets by
|
|
297
|
+
* holding SUBSCRIBE for ordinary readings.
|
|
298
|
+
*
|
|
299
|
+
* Requires PERMISSION_ACTION_SUBSCRIBE as well: the action says a standing stream is
|
|
300
|
+
* permitted, this list says which events travel on it.
|
|
301
|
+
*
|
|
302
|
+
* A ref present with no endpoint_id is INVALID and MUST be rejected.
|
|
303
|
+
*
|
|
304
|
+
* @generated from field: repeated kusinta.iot.access.v1.EventRef allowed_event_refs = 10;
|
|
305
|
+
*/
|
|
306
|
+
allowedEventRefs: EventRef[];
|
|
106
307
|
};
|
|
107
308
|
|
|
108
309
|
/**
|
|
@@ -112,6 +313,24 @@ export declare type DeviceAcl = Message<"kusinta.iot.access.v1.DeviceAcl"> & {
|
|
|
112
313
|
export declare const DeviceAclSchema: GenMessage<DeviceAcl>;
|
|
113
314
|
|
|
114
315
|
/**
|
|
316
|
+
* Every DeviceAcl in force for one user on one gateway, at valid_at.
|
|
317
|
+
*
|
|
318
|
+
* ADVISORY WHEN SENT TO AN APP. The gateway is the sole authority and enforces every
|
|
319
|
+
* read, write, invoke and subscription against its own copy, whether or not the app has
|
|
320
|
+
* one. This is disclosed so an app can RENDER honestly — grey out a control the user may
|
|
321
|
+
* not invoke, clamp a setpoint slider to a PropertyConstraint, hide a device — instead of
|
|
322
|
+
* offering an action and discovering the refusal.
|
|
323
|
+
*
|
|
324
|
+
* Two mistakes this exists to prevent. An app MUST still handle refusal: this snapshot can
|
|
325
|
+
* be stale, and it is not a promise. A gateway MUST NOT treat having sent it as having
|
|
326
|
+
* enforced anything.
|
|
327
|
+
*
|
|
328
|
+
* It discloses only the recipient's own permissions. It says nothing about what any other
|
|
329
|
+
* user holds.
|
|
330
|
+
*
|
|
331
|
+
* Sent whole rather than as a delta, in webrtc.v1.DeviceStateSnapshot at connect and in
|
|
332
|
+
* webrtc.v1.LivePermissionUpdate when it changes.
|
|
333
|
+
*
|
|
115
334
|
* @generated from message kusinta.iot.access.v1.EffectivePermissions
|
|
116
335
|
*/
|
|
117
336
|
export declare type EffectivePermissions = Message<"kusinta.iot.access.v1.EffectivePermissions"> & {
|
|
@@ -11,26 +11,47 @@ import { file_kusinta_iot_access_v1_roles } from "./roles_pb.js";
|
|
|
11
11
|
* Describes the file kusinta/iot/access/v1/acl.proto.
|
|
12
12
|
*/
|
|
13
13
|
export const file_kusinta_iot_access_v1_acl = /*@__PURE__*/
|
|
14
|
-
fileDesc("
|
|
14
|
+
fileDesc("Ch9rdXNpbnRhL2lvdC9hY2Nlc3MvdjEvYWNsLnByb3RvEhVrdXNpbnRhLmlvdC5hY2Nlc3MudjEirgEKDEF0dHJpYnV0ZVJlZhIWCg5hdHRyaWJ1dGVfbmFtZRgBIAEoCRISCgpjbHVzdGVyX2lkGAIgASgNEhQKDGF0dHJpYnV0ZV9pZBgEIAEoDRIYCgtlbmRwb2ludF9pZBgDIAEoDUgAiAEBEh0KEHZlbmRvcl9leHRlbnNpb24YBSABKAlIAYgBAUIOCgxfZW5kcG9pbnRfaWRCEwoRX3ZlbmRvcl9leHRlbnNpb24iZQoKQ29tbWFuZFJlZhISCgpjbHVzdGVyX2lkGAEgASgNEhkKEW1hdHRlcl9jb21tYW5kX2lkGAIgASgNEhgKC2VuZHBvaW50X2lkGAMgASgNSACIAQFCDgoMX2VuZHBvaW50X2lkIloKCEV2ZW50UmVmEhIKCmNsdXN0ZXJfaWQYASABKA0SEAoIZXZlbnRfaWQYAiABKA0SGAoLZW5kcG9pbnRfaWQYAyABKA1IAIgBAUIOCgxfZW5kcG9pbnRfaWQi5wEKElByb3BlcnR5Q29uc3RyYWludBI2CglhdHRyaWJ1dGUYCCABKAsyIy5rdXNpbnRhLmlvdC5hY2Nlc3MudjEuQXR0cmlidXRlUmVmEhEKB2ludF9tYXgYAiABKBFIABIRCgdpbnRfbWluGAMgASgRSAASEgoIdWludF9tYXgYBCABKA1IABISCgh1aW50X21pbhgFIAEoDUgAQgwKCmNvbnN0cmFpbnRKBAgBEAJKBAgGEAdKBAgHEAhSDmF0dHJpYnV0ZV9uYW1lUg5jbHVzdGVyX2lkX2hleFILZW5kcG9pbnRfaWQihgQKCURldmljZUFjbBI0CglkZXZpY2VfaWQYASABKAsyIS5rdXNpbnRhLmlvdC5pZGVudGl0eS52MS5EZXZpY2VJZBIwCgd1c2VyX2lkGAIgASgLMh8ua3VzaW50YS5pb3QuaWRlbnRpdHkudjEuVXNlcklkEikKBHJvbGUYAyABKA4yGy5rdXNpbnRhLmlvdC5hY2Nlc3MudjEuUm9sZRJACg9hbGxvd2VkX2FjdGlvbnMYBCADKA4yJy5rdXNpbnRhLmlvdC5hY2Nlc3MudjEuUGVybWlzc2lvbkFjdGlvbhJDChZhbGxvd2VkX2F0dHJpYnV0ZV9yZWZzGAcgAygLMiMua3VzaW50YS5pb3QuYWNjZXNzLnYxLkF0dHJpYnV0ZVJlZhJHChRwcm9wZXJ0eV9jb25zdHJhaW50cxgGIAMoCzIpLmt1c2ludGEuaW90LmFjY2Vzcy52MS5Qcm9wZXJ0eUNvbnN0cmFpbnQSPwoUYWxsb3dlZF9jb21tYW5kX3JlZnMYCSADKAsyIS5rdXNpbnRhLmlvdC5hY2Nlc3MudjEuQ29tbWFuZFJlZhI7ChJhbGxvd2VkX2V2ZW50X3JlZnMYCiADKAsyHy5rdXNpbnRhLmlvdC5hY2Nlc3MudjEuRXZlbnRSZWZKBAgFEAZSEmFsbG93ZWRfYXR0cmlidXRlcyLlAQoURWZmZWN0aXZlUGVybWlzc2lvbnMSMAoHdXNlcl9pZBgBIAEoCzIfLmt1c2ludGEuaW90LmlkZW50aXR5LnYxLlVzZXJJZBI2CgpnYXRld2F5X2lkGAIgASgLMiIua3VzaW50YS5pb3QuaWRlbnRpdHkudjEuR2F0ZXdheUlkEjUKC2RldmljZV9hY2xzGAMgAygLMiAua3VzaW50YS5pb3QuYWNjZXNzLnYxLkRldmljZUFjbBIsCgh2YWxpZF9hdBgEIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCAkgBYgZwcm90bzM", [file_google_protobuf_timestamp, file_kusinta_iot_identity_v1_identity, file_kusinta_iot_access_v1_roles]);
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Describes the message kusinta.iot.access.v1.AttributeRef.
|
|
18
|
+
* Use `create(AttributeRefSchema)` to create a new message.
|
|
19
|
+
*/
|
|
20
|
+
export const AttributeRefSchema = /*@__PURE__*/
|
|
21
|
+
messageDesc(file_kusinta_iot_access_v1_acl, 0);
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Describes the message kusinta.iot.access.v1.CommandRef.
|
|
25
|
+
* Use `create(CommandRefSchema)` to create a new message.
|
|
26
|
+
*/
|
|
27
|
+
export const CommandRefSchema = /*@__PURE__*/
|
|
28
|
+
messageDesc(file_kusinta_iot_access_v1_acl, 1);
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Describes the message kusinta.iot.access.v1.EventRef.
|
|
32
|
+
* Use `create(EventRefSchema)` to create a new message.
|
|
33
|
+
*/
|
|
34
|
+
export const EventRefSchema = /*@__PURE__*/
|
|
35
|
+
messageDesc(file_kusinta_iot_access_v1_acl, 2);
|
|
15
36
|
|
|
16
37
|
/**
|
|
17
38
|
* Describes the message kusinta.iot.access.v1.PropertyConstraint.
|
|
18
39
|
* Use `create(PropertyConstraintSchema)` to create a new message.
|
|
19
40
|
*/
|
|
20
41
|
export const PropertyConstraintSchema = /*@__PURE__*/
|
|
21
|
-
messageDesc(file_kusinta_iot_access_v1_acl,
|
|
42
|
+
messageDesc(file_kusinta_iot_access_v1_acl, 3);
|
|
22
43
|
|
|
23
44
|
/**
|
|
24
45
|
* Describes the message kusinta.iot.access.v1.DeviceAcl.
|
|
25
46
|
* Use `create(DeviceAclSchema)` to create a new message.
|
|
26
47
|
*/
|
|
27
48
|
export const DeviceAclSchema = /*@__PURE__*/
|
|
28
|
-
messageDesc(file_kusinta_iot_access_v1_acl,
|
|
49
|
+
messageDesc(file_kusinta_iot_access_v1_acl, 4);
|
|
29
50
|
|
|
30
51
|
/**
|
|
31
52
|
* Describes the message kusinta.iot.access.v1.EffectivePermissions.
|
|
32
53
|
* Use `create(EffectivePermissionsSchema)` to create a new message.
|
|
33
54
|
*/
|
|
34
55
|
export const EffectivePermissionsSchema = /*@__PURE__*/
|
|
35
|
-
messageDesc(file_kusinta_iot_access_v1_acl,
|
|
56
|
+
messageDesc(file_kusinta_iot_access_v1_acl, 5);
|
|
36
57
|
|
|
@@ -10,6 +10,32 @@ import type { GenEnum, GenFile } from "@bufbuild/protobuf/codegenv2";
|
|
|
10
10
|
export declare const file_kusinta_iot_access_v1_roles: GenFile;
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
+
* What kind of party a user is, gateway-wide.
|
|
14
|
+
*
|
|
15
|
+
* A role is a CEILING on the kinds of action a user may perform anywhere on this gateway.
|
|
16
|
+
* It is not reach: it says nothing about WHICH devices the user may act on. Reach is
|
|
17
|
+
* decided by filing — which spaces the user holds, and which devices are in them — and
|
|
18
|
+
* the two are independent. A role must never be read as reach, and reach must never be
|
|
19
|
+
* read as permission to act.
|
|
20
|
+
*
|
|
21
|
+
* The gateway resolves the two together into DeviceAcl.allowed_actions, per device. A
|
|
22
|
+
* role narrows what may appear there; it does not put anything there on its own.
|
|
23
|
+
*
|
|
24
|
+
* Carried in the app's token as webrtc.v1.AppTokenClaims.roles, as an array of proto3
|
|
25
|
+
* canonical enum NAME strings (e.g. ["ROLE_RESIDENT", "ROLE_GATEWAY_ADMIN"]) rather than
|
|
26
|
+
* integers, so the claim stays self-describing. A user may hold several at once and the
|
|
27
|
+
* effective ceiling is their union.
|
|
28
|
+
*
|
|
29
|
+
* UNORDERED. These are categories, not levels: a technician is not "more than" a
|
|
30
|
+
* resident, and there is no >= comparison to make between them. Anything needing a graded
|
|
31
|
+
* comparison — Matter's View/Operate/Manage/Administer, say — would be a separate concept
|
|
32
|
+
* and is deliberately not modelled here.
|
|
33
|
+
*
|
|
34
|
+
* A role is a ceiling rather than a floor, so it may be WIDENED per device by facts the
|
|
35
|
+
* role does not know: a user who owns a device may hold actions on it that their
|
|
36
|
+
* gateway-wide role alone would not grant. That widening is the gateway's to apply and is
|
|
37
|
+
* visible to the app only in the resolved DeviceAcl.
|
|
38
|
+
*
|
|
13
39
|
* @generated from enum kusinta.iot.access.v1.Role
|
|
14
40
|
*/
|
|
15
41
|
export enum Role {
|
|
@@ -19,21 +45,31 @@ export enum Role {
|
|
|
19
45
|
UNSPECIFIED = 0,
|
|
20
46
|
|
|
21
47
|
/**
|
|
48
|
+
* Lives with the devices. Operates what is in the spaces they hold.
|
|
49
|
+
*
|
|
22
50
|
* @generated from enum value: ROLE_RESIDENT = 1;
|
|
23
51
|
*/
|
|
24
52
|
RESIDENT = 1,
|
|
25
53
|
|
|
26
54
|
/**
|
|
55
|
+
* Owns the property the devices are installed in. Sets the bounds residents operate
|
|
56
|
+
* within — see PropertyConstraint in acl.proto.
|
|
57
|
+
*
|
|
27
58
|
* @generated from enum value: ROLE_PROPERTY_OWNER = 2;
|
|
28
59
|
*/
|
|
29
60
|
PROPERTY_OWNER = 2,
|
|
30
61
|
|
|
31
62
|
/**
|
|
63
|
+
* Installs and services devices. Present for the work, not for the tenancy.
|
|
64
|
+
*
|
|
32
65
|
* @generated from enum value: ROLE_TECHNICIAN = 3;
|
|
33
66
|
*/
|
|
34
67
|
TECHNICIAN = 3,
|
|
35
68
|
|
|
36
69
|
/**
|
|
70
|
+
* Administers this gateway itself. The one role that also affects reach: some devices
|
|
71
|
+
* are visible only to a session holding it.
|
|
72
|
+
*
|
|
37
73
|
* @generated from enum value: ROLE_GATEWAY_ADMIN = 4;
|
|
38
74
|
*/
|
|
39
75
|
GATEWAY_ADMIN = 4,
|
|
@@ -45,30 +81,87 @@ export enum Role {
|
|
|
45
81
|
export declare const RoleSchema: GenEnum<Role>;
|
|
46
82
|
|
|
47
83
|
/**
|
|
84
|
+
* What a user may do to a device, as listed in DeviceAcl.allowed_actions. Each value
|
|
85
|
+
* names an operation that exists on the app leg, so a grant can be checked against the
|
|
86
|
+
* message that arrived.
|
|
87
|
+
*
|
|
88
|
+
* The action says HOW data is reached. WHICH elements it reaches is a separate question,
|
|
89
|
+
* answered by the ref lists on DeviceAcl — allowed_attribute_refs, allowed_command_refs
|
|
90
|
+
* and allowed_event_refs. Keeping the two apart is deliberate: attributes, commands and
|
|
91
|
+
* events are addressed by three different ID spaces, and folding "which kind of element"
|
|
92
|
+
* into the action verb would make the action mean two things at once.
|
|
93
|
+
*
|
|
48
94
|
* @generated from enum kusinta.iot.access.v1.PermissionAction
|
|
49
95
|
*/
|
|
50
96
|
export enum PermissionAction {
|
|
51
97
|
/**
|
|
98
|
+
* Names no action. Present only because buf's ENUM_ZERO_VALUE_SUFFIX requires a zero
|
|
99
|
+
* value; it is not a wildcard and carries no permission.
|
|
100
|
+
*
|
|
101
|
+
* In allowed_actions it is INVALID and MUST be rejected — never read as "any action".
|
|
102
|
+
* Omission must never be what widens access.
|
|
103
|
+
*
|
|
52
104
|
* @generated from enum value: PERMISSION_ACTION_UNSPECIFIED = 0;
|
|
53
105
|
*/
|
|
54
106
|
UNSPECIFIED = 0,
|
|
55
107
|
|
|
56
108
|
/**
|
|
109
|
+
* Read an element once, on demand: webrtc.v1.PropertyReadRequest.
|
|
110
|
+
*
|
|
57
111
|
* @generated from enum value: PERMISSION_ACTION_READ = 1;
|
|
58
112
|
*/
|
|
59
113
|
READ = 1,
|
|
60
114
|
|
|
61
115
|
/**
|
|
116
|
+
* Write an attribute to a value: webrtc.v1.AttributeWriteRequest, carried on
|
|
117
|
+
* AppMessage.attribute_write and forwarded to a connector as
|
|
118
|
+
* SessionResponse.execute_attribute_write.
|
|
119
|
+
*
|
|
120
|
+
* MUST be enforced separately from INVOKE. Writing an attribute and invoking a command
|
|
121
|
+
* are different operations in Matter carrying different authority: a user who may
|
|
122
|
+
* toggle a light is not thereby a user who may rewrite its attributes. An earlier form
|
|
123
|
+
* of this schema routed an absolute setpoint through DeviceCommand, which made INVOKE
|
|
124
|
+
* imply WRITE and left the distinction unenforceable — that is the mistake
|
|
125
|
+
* AttributeWriteRequest exists to undo, and checking INVOKE for a write would reinstate
|
|
126
|
+
* it.
|
|
127
|
+
*
|
|
128
|
+
* A relative adjust is NOT a write. Thermostat SetpointRaiseLower is a genuine Matter
|
|
129
|
+
* command and needs INVOKE; setting an absolute value needs WRITE.
|
|
130
|
+
*
|
|
62
131
|
* @generated from enum value: PERMISSION_ACTION_WRITE = 2;
|
|
63
132
|
*/
|
|
64
133
|
WRITE = 2,
|
|
65
134
|
|
|
66
135
|
/**
|
|
67
|
-
*
|
|
136
|
+
* Hold a standing stream of a device's reports: webrtc.v1.AppMessage.subscribe, and the
|
|
137
|
+
* PropertyReport and DeviceEventBatch that follow.
|
|
138
|
+
*
|
|
139
|
+
* Covers BOTH attribute reports and events, as a Matter subscription does — one
|
|
140
|
+
* subscription carries attribute paths and event paths together. Which of them actually
|
|
141
|
+
* arrives is decided by allowed_attribute_refs and allowed_event_refs, not by this
|
|
142
|
+
* action. Note their emptiness rules differ: attributes default to all, events to none.
|
|
143
|
+
*
|
|
144
|
+
* NOT a privacy boundary. Anyone who may READ an element can poll it, so withholding
|
|
145
|
+
* SUBSCRIBE while granting READ hides nothing — it only costs the app round trips. Treat
|
|
146
|
+
* it as a RESOURCE control: bandwidth, battery, and how many standing streams a gateway
|
|
147
|
+
* will carry. Do not use it to protect data; use the ref lists for that.
|
|
148
|
+
*
|
|
149
|
+
* Was PERMISSION_ACTION_OBSERVE. Renamed because "observe" reads as a kind of access
|
|
150
|
+
* distinct from reading, which it is not — it is the same access held open.
|
|
151
|
+
*
|
|
152
|
+
* @generated from enum value: PERMISSION_ACTION_SUBSCRIBE = 3;
|
|
68
153
|
*/
|
|
69
|
-
|
|
154
|
+
SUBSCRIBE = 3,
|
|
70
155
|
|
|
71
156
|
/**
|
|
157
|
+
* Invoke a command on a cluster: webrtc.v1.DeviceCommand. This is the action that moves
|
|
158
|
+
* hardware.
|
|
159
|
+
*
|
|
160
|
+
* Commands are named by (cluster_id, matter_command_id), a different ID space from
|
|
161
|
+
* attributes — On/Off cluster 0x0006 has an attribute 0x0000 and a command 0x0000 that
|
|
162
|
+
* are unrelated. So allowed_attribute_refs cannot narrow this; allowed_command_refs is
|
|
163
|
+
* what does.
|
|
164
|
+
*
|
|
72
165
|
* @generated from enum value: PERMISSION_ACTION_INVOKE = 4;
|
|
73
166
|
*/
|
|
74
167
|
INVOKE = 4,
|
|
@@ -8,7 +8,7 @@ import { enumDesc, fileDesc, tsEnum } from "@bufbuild/protobuf/codegenv2";
|
|
|
8
8
|
* Describes the file kusinta/iot/access/v1/roles.proto.
|
|
9
9
|
*/
|
|
10
10
|
export const file_kusinta_iot_access_v1_roles = /*@__PURE__*/
|
|
11
|
-
fileDesc("
|
|
11
|
+
fileDesc("CiFrdXNpbnRhL2lvdC9hY2Nlc3MvdjEvcm9sZXMucHJvdG8SFWt1c2ludGEuaW90LmFjY2Vzcy52MSp1CgRSb2xlEhQKEFJPTEVfVU5TUEVDSUZJRUQQABIRCg1ST0xFX1JFU0lERU5UEAESFwoTUk9MRV9QUk9QRVJUWV9PV05FUhACEhMKD1JPTEVfVEVDSE5JQ0lBThADEhYKElJPTEVfR0FURVdBWV9BRE1JThAEKq0BChBQZXJtaXNzaW9uQWN0aW9uEiEKHVBFUk1JU1NJT05fQUNUSU9OX1VOU1BFQ0lGSUVEEAASGgoWUEVSTUlTU0lPTl9BQ1RJT05fUkVBRBABEhsKF1BFUk1JU1NJT05fQUNUSU9OX1dSSVRFEAISHwobUEVSTUlTU0lPTl9BQ1RJT05fU1VCU0NSSUJFEAMSHAoYUEVSTUlTU0lPTl9BQ1RJT05fSU5WT0tFEARCAkgBYgZwcm90bzM");
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Describes the enum kusinta.iot.access.v1.Role.
|
|
@@ -17,6 +17,32 @@ export const RoleSchema = /*@__PURE__*/
|
|
|
17
17
|
enumDesc(file_kusinta_iot_access_v1_roles, 0);
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
+
* What kind of party a user is, gateway-wide.
|
|
21
|
+
*
|
|
22
|
+
* A role is a CEILING on the kinds of action a user may perform anywhere on this gateway.
|
|
23
|
+
* It is not reach: it says nothing about WHICH devices the user may act on. Reach is
|
|
24
|
+
* decided by filing — which spaces the user holds, and which devices are in them — and
|
|
25
|
+
* the two are independent. A role must never be read as reach, and reach must never be
|
|
26
|
+
* read as permission to act.
|
|
27
|
+
*
|
|
28
|
+
* The gateway resolves the two together into DeviceAcl.allowed_actions, per device. A
|
|
29
|
+
* role narrows what may appear there; it does not put anything there on its own.
|
|
30
|
+
*
|
|
31
|
+
* Carried in the app's token as webrtc.v1.AppTokenClaims.roles, as an array of proto3
|
|
32
|
+
* canonical enum NAME strings (e.g. ["ROLE_RESIDENT", "ROLE_GATEWAY_ADMIN"]) rather than
|
|
33
|
+
* integers, so the claim stays self-describing. A user may hold several at once and the
|
|
34
|
+
* effective ceiling is their union.
|
|
35
|
+
*
|
|
36
|
+
* UNORDERED. These are categories, not levels: a technician is not "more than" a
|
|
37
|
+
* resident, and there is no >= comparison to make between them. Anything needing a graded
|
|
38
|
+
* comparison — Matter's View/Operate/Manage/Administer, say — would be a separate concept
|
|
39
|
+
* and is deliberately not modelled here.
|
|
40
|
+
*
|
|
41
|
+
* A role is a ceiling rather than a floor, so it may be WIDENED per device by facts the
|
|
42
|
+
* role does not know: a user who owns a device may hold actions on it that their
|
|
43
|
+
* gateway-wide role alone would not grant. That widening is the gateway's to apply and is
|
|
44
|
+
* visible to the app only in the resolved DeviceAcl.
|
|
45
|
+
*
|
|
20
46
|
* @generated from enum kusinta.iot.access.v1.Role
|
|
21
47
|
*/
|
|
22
48
|
export const Role = /*@__PURE__*/
|
|
@@ -29,6 +55,16 @@ export const PermissionActionSchema = /*@__PURE__*/
|
|
|
29
55
|
enumDesc(file_kusinta_iot_access_v1_roles, 1);
|
|
30
56
|
|
|
31
57
|
/**
|
|
58
|
+
* What a user may do to a device, as listed in DeviceAcl.allowed_actions. Each value
|
|
59
|
+
* names an operation that exists on the app leg, so a grant can be checked against the
|
|
60
|
+
* message that arrived.
|
|
61
|
+
*
|
|
62
|
+
* The action says HOW data is reached. WHICH elements it reaches is a separate question,
|
|
63
|
+
* answered by the ref lists on DeviceAcl — allowed_attribute_refs, allowed_command_refs
|
|
64
|
+
* and allowed_event_refs. Keeping the two apart is deliberate: attributes, commands and
|
|
65
|
+
* events are addressed by three different ID spaces, and folding "which kind of element"
|
|
66
|
+
* into the action verb would make the action mean two things at once.
|
|
67
|
+
*
|
|
32
68
|
* @generated from enum kusinta.iot.access.v1.PermissionAction
|
|
33
69
|
*/
|
|
34
70
|
export const PermissionAction = /*@__PURE__*/
|