@kusinta/iot-schema 0.1.0-beta.9 → 0.2.0-beta.1

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.
Files changed (46) hide show
  1. package/package.json +13 -2
  2. package/src/kusinta/iot/access/v1/acl_pb.d.ts +100 -11
  3. package/src/kusinta/iot/access/v1/acl_pb.js +11 -4
  4. package/src/kusinta/iot/access/v1/roles_pb.d.ts +27 -0
  5. package/src/kusinta/iot/access/v1/roles_pb.js +4 -0
  6. package/src/kusinta/iot/connector/v1/connector_pb.d.ts +60 -30
  7. package/src/kusinta/iot/connector/v1/connector_pb.js +12 -11
  8. package/src/kusinta/iot/connector/v1/connector_service_pb.d.ts +5 -5
  9. package/src/kusinta/iot/connector/v1/connector_service_pb.js +1 -1
  10. package/src/kusinta/iot/device/v1/cluster_state_pb.d.ts +238 -0
  11. package/src/kusinta/iot/device/v1/cluster_state_pb.js +54 -0
  12. package/src/kusinta/iot/device/v1/descriptor_pb.d.ts +37 -8
  13. package/src/kusinta/iot/device/v1/descriptor_pb.js +2 -1
  14. package/src/kusinta/iot/device/v1/device_event_pb.d.ts +162 -0
  15. package/src/kusinta/iot/device/v1/device_event_pb.js +45 -0
  16. package/src/kusinta/iot/device/v1/device_pb.d.ts +154 -28
  17. package/src/kusinta/iot/device/v1/device_pb.js +10 -2
  18. package/src/kusinta/iot/device/v1/matter_options_pb.d.ts +84 -0
  19. package/src/kusinta/iot/device/v1/matter_options_pb.js +91 -0
  20. package/src/kusinta/iot/device/v1/properties_pb.d.ts +228 -207
  21. package/src/kusinta/iot/device/v1/properties_pb.js +9 -1
  22. package/src/kusinta/iot/device/v1/property_update_pb.d.ts +197 -8
  23. package/src/kusinta/iot/device/v1/property_update_pb.js +20 -2
  24. package/src/kusinta/iot/registration/v1/registration_pb.d.ts +170 -0
  25. package/src/kusinta/iot/registration/v1/registration_pb.js +61 -0
  26. package/src/kusinta/iot/registration/v1/registration_service_pb.d.ts +34 -0
  27. package/src/kusinta/iot/registration/v1/registration_service_pb.js +19 -0
  28. package/src/kusinta/iot/signaling/v1/signaling_pb.d.ts +320 -0
  29. package/src/kusinta/iot/signaling/v1/signaling_pb.js +83 -0
  30. package/src/kusinta/iot/signaling/v1/signaling_service_pb.d.ts +34 -0
  31. package/src/kusinta/iot/signaling/v1/signaling_service_pb.js +19 -0
  32. package/src/kusinta/iot/vendor/homematic/v1/homematic_pb.d.ts +65 -47
  33. package/src/kusinta/iot/vendor/homematic/v1/homematic_pb.js +8 -7
  34. package/src/kusinta/iot/vendor/v1/vendor_options_pb.d.ts +50 -0
  35. package/src/kusinta/iot/vendor/v1/vendor_options_pb.js +53 -0
  36. package/src/kusinta/iot/webrtc/v1/app_token_pb.d.ts +152 -0
  37. package/src/kusinta/iot/webrtc/v1/app_token_pb.js +28 -0
  38. package/src/kusinta/iot/webrtc/v1/command_pb.d.ts +269 -39
  39. package/src/kusinta/iot/webrtc/v1/command_pb.js +28 -2
  40. package/src/kusinta/iot/webrtc/v1/device_state_pb.d.ts +65 -2
  41. package/src/kusinta/iot/webrtc/v1/device_state_pb.js +16 -1
  42. package/src/kusinta/iot/webrtc/v1/envelope_pb.d.ts +368 -21
  43. package/src/kusinta/iot/webrtc/v1/envelope_pb.js +68 -5
  44. package/src/kusinta/iot/webrtc/v1/management_pb.d.ts +451 -0
  45. package/src/kusinta/iot/webrtc/v1/management_pb.js +106 -0
  46. package/src/kusinta/iot/webrtc/v1/permission_push_pb.d.ts +7 -1
@@ -2,10 +2,12 @@
2
2
  // @generated from file kusinta/iot/webrtc/v1/command.proto (package kusinta.iot.webrtc.v1, syntax proto3)
3
3
  /* eslint-disable */
4
4
 
5
- import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
5
+ import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
6
6
  import type { Message } from "@bufbuild/protobuf";
7
7
  import type { DeviceId } from "../../identity/v1/identity_pb.js";
8
8
  import type { Timestamp } from "@bufbuild/protobuf/wkt";
9
+ import type { AttributeRef } from "../../access/v1/acl_pb.js";
10
+ import type { AttributeValue } from "../../device/v1/cluster_state_pb.js";
9
11
 
10
12
  /**
11
13
  * Describes the file kusinta/iot/webrtc/v1/command.proto.
@@ -13,17 +15,24 @@ import type { Timestamp } from "@bufbuild/protobuf/wkt";
13
15
  export declare const file_kusinta_iot_webrtc_v1_command: GenFile;
14
16
 
15
17
  /**
16
- * Maps to Matter SetpointRaiseLower command (Thermostat cluster 0x0201).
18
+ * Adjusts a setpoint by a delta. Maps to the Matter SetpointRaiseLower command
19
+ * (Thermostat cluster 0x0201).
20
+ *
21
+ * A delta needs a base, and only the producer holds one. On a battery-powered device
22
+ * that wakes on a multi-minute cycle the producer often has no current base and MUST
23
+ * refuse the command rather than guess at one — guessing moves a real radiator to a
24
+ * temperature nobody asked for. Prefer ThermostatSetpointWriteParams where the caller
25
+ * already knows the absolute value it wants; it has no such failure mode.
17
26
  *
18
27
  * @generated from message kusinta.iot.webrtc.v1.ThermostatSetpointParams
19
28
  */
20
29
  export declare type ThermostatSetpointParams = Message<"kusinta.iot.webrtc.v1.ThermostatSetpointParams"> & {
21
30
  /**
22
- * SetpointAdjustMode: Heat=1, Cool=2, Both=3
31
+ * SetpointAdjustMode, see above
23
32
  *
24
- * @generated from field: uint32 mode = 1;
33
+ * @generated from field: optional uint32 mode = 1;
25
34
  */
26
- mode: number;
35
+ mode?: number | undefined;
27
36
 
28
37
  /**
29
38
  * centidegrees delta
@@ -67,20 +76,17 @@ export declare type LevelControlParams = Message<"kusinta.iot.webrtc.v1.LevelCon
67
76
  export declare const LevelControlParamsSchema: GenMessage<LevelControlParams>;
68
77
 
69
78
  /**
70
- * Maps to Matter On and Off commands (On/Off cluster 0x0006).
79
+ * Arguments for the Matter On/Off cluster's Off (0x00), On (0x01) and Toggle (0x02)
80
+ * commands — of which there are none: all three take no arguments.
81
+ *
82
+ * Which of the three is meant is DeviceCommand.matter_command_id, and only that. The
83
+ * message previously carried `on` and `toggle` booleans, a second encoding of the same
84
+ * choice in a different shape, so a command could say Toggle in one field and On in
85
+ * another and parse cleanly. Empty is the honest form.
71
86
  *
72
87
  * @generated from message kusinta.iot.webrtc.v1.OnOffParams
73
88
  */
74
89
  export declare type OnOffParams = Message<"kusinta.iot.webrtc.v1.OnOffParams"> & {
75
- /**
76
- * @generated from field: bool on = 1;
77
- */
78
- on: boolean;
79
-
80
- /**
81
- * @generated from field: bool toggle = 2;
82
- */
83
- toggle: boolean;
84
90
  };
85
91
 
86
92
  /**
@@ -110,18 +116,16 @@ export declare type WindowCoveringLiftParams = Message<"kusinta.iot.webrtc.v1.Wi
110
116
  export declare const WindowCoveringLiftParamsSchema: GenMessage<WindowCoveringLiftParams>;
111
117
 
112
118
  /**
113
- * Maps to Matter LockDoor/UnlockDoor commands (Door Lock cluster 0x0101).
119
+ * Arguments for the Matter Door Lock cluster's LockDoor (0x00) and UnlockDoor (0x01),
120
+ * which take an optional PIN and nothing else.
121
+ *
122
+ * lock_state is gone: it restated LockDoor/UnlockDoor as Locked=1/Unlocked=2, a second
123
+ * selector in a THIRD numbering, disagreeing with both Matter's command IDs and its
124
+ * LockState attribute. Which operation is meant is DeviceCommand.matter_command_id.
114
125
  *
115
126
  * @generated from message kusinta.iot.webrtc.v1.DoorLockParams
116
127
  */
117
128
  export declare type DoorLockParams = Message<"kusinta.iot.webrtc.v1.DoorLockParams"> & {
118
- /**
119
- * Locked=1, Unlocked=2
120
- *
121
- * @generated from field: uint32 lock_state = 1;
122
- */
123
- lockState: number;
124
-
125
129
  /**
126
130
  * optional PIN
127
131
  *
@@ -137,15 +141,34 @@ export declare type DoorLockParams = Message<"kusinta.iot.webrtc.v1.DoorLockPara
137
141
  export declare const DoorLockParamsSchema: GenMessage<DoorLockParams>;
138
142
 
139
143
  /**
144
+ * A command an app asks the gateway to run on a device.
145
+ *
146
+ * Authorization
147
+ *
148
+ * An app MAY send any command; it does not decide whether it is allowed. The gateway
149
+ * authorizes every DeviceCommand against the caller's access.v1.DeviceAcl for the target
150
+ * device before forwarding it to a connector — the command must be permitted by
151
+ * PERMISSION_ACTION_INVOKE, must target an attribute the ACL's allowed_attribute_refs
152
+ * reaches, and must respect any PropertyConstraint bounding the value.
153
+ *
154
+ * A refusal comes back as an ordinary CommandResult with success = false and an error,
155
+ * NOT as a session-level GatewayError: one command being refused says nothing about the
156
+ * session, which continues. A command for a device the caller cannot reach is refused the
157
+ * same way whether or not it exists, so no result reveals a device the user may not see.
158
+ *
140
159
  * @generated from message kusinta.iot.webrtc.v1.DeviceCommand
141
160
  */
142
161
  export declare type DeviceCommand = Message<"kusinta.iot.webrtc.v1.DeviceCommand"> & {
143
162
  /**
144
- * UUID, matched in CommandResult
163
+ * Was command_id. Renamed because Matter has its own numeric command ID, added below,
164
+ * and two fields called "command id" meaning entirely different things in one message is
165
+ * a trap. Same name as AttributeWriteRequest.request_id, which correlates the same way.
145
166
  *
146
- * @generated from field: string command_id = 1;
167
+ * UUID, matched in the result
168
+ *
169
+ * @generated from field: string request_id = 1;
147
170
  */
148
- commandId: string;
171
+ requestId: string;
149
172
 
150
173
  /**
151
174
  * @generated from field: kusinta.iot.identity.v1.DeviceId device_id = 2;
@@ -153,16 +176,60 @@ export declare type DeviceCommand = Message<"kusinta.iot.webrtc.v1.DeviceCommand
153
176
  deviceId?: DeviceId | undefined;
154
177
 
155
178
  /**
156
- * @generated from field: string cluster_id_hex = 3;
179
+ * The command's own PascalCase spelling, for logs and rendering.
180
+ *
181
+ * ADVISORY, and not validated against anything: nothing reconciles it with
182
+ * matter_command_id, so it can say "Toggle" beside an ID meaning On. A consumer MUST NOT
183
+ * route or authorize on it, and where the two disagree the ID wins. It is here so a
184
+ * refused or unresolvable command is legible to whoever reads the log.
185
+ *
186
+ * @generated from field: string command_name = 4;
157
187
  */
158
- clusterIdHex: string;
188
+ commandName: string;
159
189
 
160
190
  /**
161
- * PascalCase Matter command name
191
+ * e.g. 0x0201 for Thermostat
162
192
  *
163
- * @generated from field: string command_name = 4;
193
+ * @generated from field: uint32 cluster_id = 12;
164
194
  */
165
- commandName: string;
195
+ clusterId: number;
196
+
197
+ /**
198
+ * The Matter command ID within that cluster, e.g. 0x02 for On/Off's Toggle.
199
+ *
200
+ * What a consumer routes and authorizes on, matching Matter's own wire and the numeric
201
+ * Endpoint.clusters[].accepted_command_ids — so "does this device accept this command"
202
+ * is answerable before sending it rather than by watching it fail.
203
+ *
204
+ * Where the parameters case declares a (matter_command_id), this MUST equal it; where it
205
+ * declares only a (matter_command_cluster) — because several commands share the same
206
+ * arguments — this is what picks the command. cluster_id MUST equal the case's
207
+ * (matter_command_cluster) either way. A mismatch is malformed and is refused with
208
+ * COMMAND_ERROR_CODE_INVALID_COMMAND.
209
+ *
210
+ * raw_tlv has no annotation to check against, so there this is simply required.
211
+ *
212
+ * @generated from field: optional uint32 matter_command_id = 13;
213
+ */
214
+ matterCommandId?: number | undefined;
215
+
216
+ /**
217
+ * Which endpoint of the device to command. Required by rule — proto3 has no `required`,
218
+ * and `optional` is what makes "not stated" representable so a consumer can reject it
219
+ * rather than decode an omission to endpoint 0, which is the Matter root node.
220
+ *
221
+ * A device presents several
222
+ * endpoints and a command with no destination has no correct one — on a 4-channel
223
+ * actuator, picking any of them moves real hardware. Refuse an unaddressed command
224
+ * rather than guessing.
225
+ *
226
+ * No exemption for single-endpoint devices. A rule where the same message is valid or
227
+ * invalid depending on the shape of its target is a rule that works until a device
228
+ * grows an endpoint.
229
+ *
230
+ * @generated from field: optional uint32 endpoint_id = 11;
231
+ */
232
+ endpointId?: number | undefined;
166
233
 
167
234
  /**
168
235
  * @generated from oneof kusinta.iot.webrtc.v1.DeviceCommand.parameters
@@ -219,14 +286,16 @@ export declare const DeviceCommandSchema: GenMessage<DeviceCommand>;
219
286
  */
220
287
  export declare type CommandError = Message<"kusinta.iot.webrtc.v1.CommandError"> & {
221
288
  /**
222
- * @generated from field: string code = 1;
289
+ * human-readable, for logs never rendered to a user
290
+ *
291
+ * @generated from field: string message = 2;
223
292
  */
224
- code: string;
293
+ message: string;
225
294
 
226
295
  /**
227
- * @generated from field: string message = 2;
296
+ * @generated from field: kusinta.iot.webrtc.v1.CommandErrorCode code = 3;
228
297
  */
229
- message: string;
298
+ code: CommandErrorCode;
230
299
  };
231
300
 
232
301
  /**
@@ -236,16 +305,23 @@ export declare type CommandError = Message<"kusinta.iot.webrtc.v1.CommandError">
236
305
  export declare const CommandErrorSchema: GenMessage<CommandError>;
237
306
 
238
307
  /**
239
- * CommandResult travels gateway → Flutter app (GatewayMessage) and
240
- * connector → gateway (ConnectRequest via connector.proto import).
308
+ * CommandResult travels gateway → app (GatewayMessage) and
309
+ * connector → gateway (SessionRequest via connector.proto import).
310
+ *
311
+ * success = true means the command was ACCEPTED, not that the device confirmed it. For
312
+ * a battery-powered device that wakes on a multi-minute cycle, acceptance without
313
+ * confirmation is the normal path, not an edge case: waiting for the device would fail
314
+ * every write to a sleeping one.
241
315
  *
242
316
  * @generated from message kusinta.iot.webrtc.v1.CommandResult
243
317
  */
244
318
  export declare type CommandResult = Message<"kusinta.iot.webrtc.v1.CommandResult"> & {
245
319
  /**
246
- * @generated from field: string command_id = 1;
320
+ * matches DeviceCommand.request_id
321
+ *
322
+ * @generated from field: string request_id = 1;
247
323
  */
248
- commandId: string;
324
+ requestId: string;
249
325
 
250
326
  /**
251
327
  * @generated from field: bool success = 2;
@@ -261,6 +337,25 @@ export declare type CommandResult = Message<"kusinta.iot.webrtc.v1.CommandResult
261
337
  * @generated from field: google.protobuf.Timestamp completed_at = 4;
262
338
  */
263
339
  completedAt?: Timestamp | undefined;
340
+
341
+ /**
342
+ * When the producer's own optimistic window closes: by this time the value has either
343
+ * been confirmed by the device or restored to what it was, and either way the producer
344
+ * will have published a PropertyUpdate saying so.
345
+ *
346
+ * Set it when the producer applied the value optimistically and runs a rollback timer.
347
+ * It exists so a consumer can bound its wait without hardcoding a constant chasing a
348
+ * timer that lives in someone else's codebase and changes without notice.
349
+ *
350
+ * Absent means no claim — either the producer confirms synchronously, or it cannot
351
+ * state a bound. Absent is NOT "settles immediately".
352
+ *
353
+ * This bounds the wait; it does not label the values that arrive. Which update was the
354
+ * optimistic one is device.v1.PropertyUpdate.provenance.
355
+ *
356
+ * @generated from field: optional google.protobuf.Timestamp settles_by = 5;
357
+ */
358
+ settlesBy?: Timestamp | undefined;
264
359
  };
265
360
 
266
361
  /**
@@ -269,3 +364,138 @@ export declare type CommandResult = Message<"kusinta.iot.webrtc.v1.CommandResult
269
364
  */
270
365
  export declare const CommandResultSchema: GenMessage<CommandResult>;
271
366
 
367
+ /**
368
+ * Writes one attribute of one endpoint. The carrier for PERMISSION_ACTION_WRITE, which
369
+ * until it existed authorized an operation no message performed.
370
+ *
371
+ * Deliberately not a DeviceCommand case. A write and an invoke are different operations in
372
+ * Matter carrying different authority: a user who may toggle a light is not thereby a user
373
+ * who may rewrite its attributes. Routing both through one message made INVOKE imply WRITE
374
+ * and left the distinction unenforceable.
375
+ *
376
+ * Lives here beside DeviceCommand rather than in envelope.proto because both legs carry
377
+ * it — the app sends one, and the gateway forwards it to a connector. That is the same
378
+ * reason DeviceCommand is here.
379
+ *
380
+ * Addressed by AttributeRef, so an access.v1.PropertyConstraint bounds the value by
381
+ * matching target directly rather than needing a rule per writable attribute.
382
+ *
383
+ * A relative adjust is NOT this. Thermostat SetpointRaiseLower is a genuine Matter command
384
+ * and stays a DeviceCommand; this is for writing an absolute value.
385
+ *
386
+ * Answered by CommandResult, correlated on request_id.
387
+ *
388
+ * @generated from message kusinta.iot.webrtc.v1.AttributeWriteRequest
389
+ */
390
+ export declare type AttributeWriteRequest = Message<"kusinta.iot.webrtc.v1.AttributeWriteRequest"> & {
391
+ /**
392
+ * UUID, matched in CommandResult
393
+ *
394
+ * @generated from field: string request_id = 1;
395
+ */
396
+ requestId: string;
397
+
398
+ /**
399
+ * @generated from field: kusinta.iot.identity.v1.DeviceId device_id = 2;
400
+ */
401
+ deviceId?: DeviceId | undefined;
402
+
403
+ /**
404
+ * Which attribute to write. endpoint_id is required here — an unaddressed write has no
405
+ * correct destination, exactly as for a command.
406
+ *
407
+ * @generated from field: kusinta.iot.access.v1.AttributeRef target = 3;
408
+ */
409
+ target?: AttributeRef | undefined;
410
+
411
+ /**
412
+ * @generated from field: kusinta.iot.device.v1.AttributeValue value = 4;
413
+ */
414
+ value?: AttributeValue | undefined;
415
+ };
416
+
417
+ /**
418
+ * Describes the message kusinta.iot.webrtc.v1.AttributeWriteRequest.
419
+ * Use `create(AttributeWriteRequestSchema)` to create a new message.
420
+ */
421
+ export declare const AttributeWriteRequestSchema: GenMessage<AttributeWriteRequest>;
422
+
423
+ /**
424
+ * Why a command was refused or failed, so an app can branch without string-matching a
425
+ * human sentence. Closed vocabulary for the same reason as GatewayErrorCode: the app leg
426
+ * is versioned together with the gateway, so clients can switch exhaustively.
427
+ *
428
+ * @generated from enum kusinta.iot.webrtc.v1.CommandErrorCode
429
+ */
430
+ export enum CommandErrorCode {
431
+ /**
432
+ * Sender did not set a code, or sent one this client's schema does not know.
433
+ *
434
+ * @generated from enum value: COMMAND_ERROR_CODE_UNSPECIFIED = 0;
435
+ */
436
+ UNSPECIFIED = 0,
437
+
438
+ /**
439
+ * The caller's DeviceAcl does not permit this command. Permanent: do not retry, and do
440
+ * not reveal whether the device exists. Also the answer for a device out of reach.
441
+ *
442
+ * @generated from enum value: COMMAND_ERROR_CODE_NOT_ENTITLED = 1;
443
+ */
444
+ NOT_ENTITLED = 1,
445
+
446
+ /**
447
+ * The value is outside a PropertyConstraint bounding it — a resident asking for a
448
+ * setpoint above the property owner's limit. About the USER's request, not the app's
449
+ * correctness: worth telling the user, and the limit is readable from their permissions.
450
+ *
451
+ * @generated from enum value: COMMAND_ERROR_CODE_CONSTRAINT_VIOLATED = 2;
452
+ */
453
+ CONSTRAINT_VIOLATED = 2,
454
+
455
+ /**
456
+ * Malformed: no endpoint_id, an unknown parameters case, a cluster the device does not
457
+ * have. A client bug — log it, do not retry.
458
+ *
459
+ * @generated from enum value: COMMAND_ERROR_CODE_INVALID_COMMAND = 3;
460
+ */
461
+ INVALID_COMMAND = 3,
462
+
463
+ /**
464
+ * No route to the device right now: its connector is disconnected, or the device did
465
+ * not answer. Transient, retrying is reasonable. NOT a statement that the device is
466
+ * gone — that is webrtc.v1.DeviceRemoved.
467
+ *
468
+ * @generated from enum value: COMMAND_ERROR_CODE_UNREACHABLE = 4;
469
+ */
470
+ UNREACHABLE = 4,
471
+
472
+ /**
473
+ * The gateway's own deadline passed with no answer from the connector. The command MAY
474
+ * still have run: this is the one code that says nothing about what happened to the
475
+ * device, so it is never a reason to roll back a displayed value.
476
+ *
477
+ * @generated from enum value: COMMAND_ERROR_CODE_TIMEOUT = 5;
478
+ */
479
+ TIMEOUT = 5,
480
+
481
+ /**
482
+ * The connector or the device refused it for a reason of its own — a mode the hardware
483
+ * will not accept, a locked device. Read message for specifics.
484
+ *
485
+ * @generated from enum value: COMMAND_ERROR_CODE_REJECTED_BY_DEVICE = 6;
486
+ */
487
+ REJECTED_BY_DEVICE = 6,
488
+
489
+ /**
490
+ * Gateway-side fault. Not the app's doing; retry cautiously.
491
+ *
492
+ * @generated from enum value: COMMAND_ERROR_CODE_INTERNAL = 7;
493
+ */
494
+ INTERNAL = 7,
495
+ }
496
+
497
+ /**
498
+ * Describes the enum kusinta.iot.webrtc.v1.CommandErrorCode.
499
+ */
500
+ export declare const CommandErrorCodeSchema: GenEnum<CommandErrorCode>;
501
+
@@ -2,15 +2,18 @@
2
2
  // @generated from file kusinta/iot/webrtc/v1/command.proto (package kusinta.iot.webrtc.v1, syntax proto3)
3
3
  /* eslint-disable */
4
4
 
5
- import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
5
+ import { enumDesc, fileDesc, messageDesc, tsEnum } from "@bufbuild/protobuf/codegenv2";
6
6
  import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
7
+ import { file_kusinta_iot_access_v1_acl } from "../../access/v1/acl_pb.js";
8
+ import { file_kusinta_iot_device_v1_cluster_state } from "../../device/v1/cluster_state_pb.js";
9
+ import { file_kusinta_iot_device_v1_matter_options } from "../../device/v1/matter_options_pb.js";
7
10
  import { file_kusinta_iot_identity_v1_identity } from "../../identity/v1/identity_pb.js";
8
11
 
9
12
  /**
10
13
  * Describes the file kusinta/iot/webrtc/v1/command.proto.
11
14
  */
12
15
  export const file_kusinta_iot_webrtc_v1_command = /*@__PURE__*/
13
- fileDesc("CiNrdXNpbnRhL2lvdC93ZWJydGMvdjEvY29tbWFuZC5wcm90bxIVa3VzaW50YS5pb3Qud2VicnRjLnYxIjgKGFRoZXJtb3N0YXRTZXRwb2ludFBhcmFtcxIMCgRtb2RlGAEgASgNEg4KBmFtb3VudBgCIAEoESI8ChJMZXZlbENvbnRyb2xQYXJhbXMSDQoFbGV2ZWwYASABKA0SFwoPdHJhbnNpdGlvbl90aW1lGAIgASgNIikKC09uT2ZmUGFyYW1zEgoKAm9uGAEgASgIEg4KBnRvZ2dsZRgCIAEoCCI2ChhXaW5kb3dDb3ZlcmluZ0xpZnRQYXJhbXMSGgoSbGlmdF9wZXJjZW50MTAwdGhzGAEgASgNIjYKDkRvb3JMb2NrUGFyYW1zEhIKCmxvY2tfc3RhdGUYASABKA0SEAoIcGluX2NvZGUYAiABKAki/wMKDURldmljZUNvbW1hbmQSEgoKY29tbWFuZF9pZBgBIAEoCRI0CglkZXZpY2VfaWQYAiABKAsyIS5rdXNpbnRhLmlvdC5pZGVudGl0eS52MS5EZXZpY2VJZBIWCg5jbHVzdGVyX2lkX2hleBgDIAEoCRIUCgxjb21tYW5kX25hbWUYBCABKAkSTgoTdGhlcm1vc3RhdF9zZXRwb2ludBgFIAEoCzIvLmt1c2ludGEuaW90LndlYnJ0Yy52MS5UaGVybW9zdGF0U2V0cG9pbnRQYXJhbXNIABJCCg1sZXZlbF9jb250cm9sGAYgASgLMikua3VzaW50YS5pb3Qud2VicnRjLnYxLkxldmVsQ29udHJvbFBhcmFtc0gAEjQKBm9uX29mZhgHIAEoCzIi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hIKCnJlcXVlc3RfaWQYASABKAkSDwoHc3VjY2VzcxgCIAEoCBIyCgVlcnJvchgDIAEoCzIjLmt1c2ludGEuaW90LndlYnJ0Yy52MS5Db21tYW5kRXJyb3ISMAoMY29tcGxldGVkX2F0GAQgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIzCgpzZXR0bGVzX2J5GAUgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcEgAiAEBQg0KC19zZXR0bGVzX2J5IswBChVBdHRyaWJ1dGVXcml0ZVJlcXVlc3QSEgoKcmVxdWVzdF9pZBgBIAEoCRI0CglkZXZpY2VfaWQYAiABKAsyIS5rdXNpbnRhLmlvdC5pZGVudGl0eS52MS5EZXZpY2VJZBIzCgZ0YXJnZXQYAyABKAsyIy5rdXNpbnRhLmlvdC5hY2Nlc3MudjEuQXR0cmlidXRlUmVmEjQKBXZhbHVlGAQgASgLMiUua3VzaW50YS5pb3QuZGV2aWNlLnYxLkF0dHJpYnV0ZVZhbHVlKr8CChBDb21tYW5kRXJyb3JDb2RlEiIKHkNPTU1BTkRfRVJST1JfQ09ERV9VTlNQRUNJRklFRBAAEiMKH0NPTU1BTkRfRVJST1JfQ09ERV9OT1RfRU5USVRMRUQQARIqCiZDT01NQU5EX0VSUk9SX0NPREVfQ09OU1RSQUlOVF9WSU9MQVRFRBACEiYKIkNPTU1BTkRfRVJST1JfQ09ERV9JTlZBTElEX0NPTU1BTkQQAxIiCh5DT01NQU5EX0VSUk9SX0NPREVfVU5SRUFDSEFCTEUQBBIeChpDT01NQU5EX0VSUk9SX0NPREVfVElNRU9VVBAFEikKJUNPTU1BTkRfRVJST1JfQ09ERV9SRUpFQ1RFRF9CWV9ERVZJQ0UQBhIfChtDT01NQU5EX0VSUk9SX0NPREVfSU5URVJOQUwQB0ICSAFiBnByb3RvMw", [file_google_protobuf_timestamp, file_kusinta_iot_access_v1_acl, file_kusinta_iot_device_v1_cluster_state, file_kusinta_iot_device_v1_matter_options, file_kusinta_iot_identity_v1_identity]);
14
17
 
15
18
  /**
16
19
  * Describes the message kusinta.iot.webrtc.v1.ThermostatSetpointParams.
@@ -68,3 +71,26 @@ export const CommandErrorSchema = /*@__PURE__*/
68
71
  export const CommandResultSchema = /*@__PURE__*/
69
72
  messageDesc(file_kusinta_iot_webrtc_v1_command, 7);
70
73
 
74
+ /**
75
+ * Describes the message kusinta.iot.webrtc.v1.AttributeWriteRequest.
76
+ * Use `create(AttributeWriteRequestSchema)` to create a new message.
77
+ */
78
+ export const AttributeWriteRequestSchema = /*@__PURE__*/
79
+ messageDesc(file_kusinta_iot_webrtc_v1_command, 8);
80
+
81
+ /**
82
+ * Describes the enum kusinta.iot.webrtc.v1.CommandErrorCode.
83
+ */
84
+ export const CommandErrorCodeSchema = /*@__PURE__*/
85
+ enumDesc(file_kusinta_iot_webrtc_v1_command, 0);
86
+
87
+ /**
88
+ * Why a command was refused or failed, so an app can branch without string-matching a
89
+ * human sentence. Closed vocabulary for the same reason as GatewayErrorCode: the app leg
90
+ * is versioned together with the gateway, so clients can switch exhaustively.
91
+ *
92
+ * @generated from enum kusinta.iot.webrtc.v1.CommandErrorCode
93
+ */
94
+ export const CommandErrorCode = /*@__PURE__*/
95
+ tsEnum(CommandErrorCodeSchema);
96
+
@@ -8,6 +8,7 @@ import type { Device } from "../../device/v1/device_pb.js";
8
8
  import type { EffectivePermissions } from "../../access/v1/acl_pb.js";
9
9
  import type { Timestamp } from "@bufbuild/protobuf/wkt";
10
10
  import type { PropertyUpdate } from "../../device/v1/property_update_pb.js";
11
+ import type { DeviceId } from "../../identity/v1/identity_pb.js";
11
12
 
12
13
  /**
13
14
  * Describes the file kusinta/iot/webrtc/v1/device_state.proto.
@@ -15,7 +16,7 @@ import type { PropertyUpdate } from "../../device/v1/property_update_pb.js";
15
16
  export declare const file_kusinta_iot_webrtc_v1_device_state: GenFile;
16
17
 
17
18
  /**
18
- * Full device state sent to the Flutter app on initial WebRTC connection.
19
+ * Full device state sent to the app on initial WebRTC connection.
19
20
  *
20
21
  * @generated from message kusinta.iot.webrtc.v1.DeviceStateSnapshot
21
22
  */
@@ -43,7 +44,7 @@ export declare type DeviceStateSnapshot = Message<"kusinta.iot.webrtc.v1.DeviceS
43
44
  export declare const DeviceStateSnapshotSchema: GenMessage<DeviceStateSnapshot>;
44
45
 
45
46
  /**
46
- * Single property change event streamed to the Flutter app in real time.
47
+ * Single property change event streamed to the app in real time.
47
48
  *
48
49
  * @generated from message kusinta.iot.webrtc.v1.DevicePropertyEvent
49
50
  */
@@ -65,3 +66,65 @@ export declare type DevicePropertyEvent = Message<"kusinta.iot.webrtc.v1.DeviceP
65
66
  */
66
67
  export declare const DevicePropertyEventSchema: GenMessage<DevicePropertyEvent>;
67
68
 
69
+ /**
70
+ * A device appeared while the app was connected — the app leg's counterpart to
71
+ * connector.v1.DeviceAnnouncement, which the gateway can currently only drop.
72
+ *
73
+ * Carries the full Device, descriptor plus current typed properties, so the app can
74
+ * render it without a follow-up read — the same payload DeviceStateSnapshot gives
75
+ * per device.
76
+ *
77
+ * Apply as an upsert keyed on descriptor.device_id, never as an insert: a device can
78
+ * be in the snapshot and then announced, or announced twice across a connector
79
+ * reconnect.
80
+ *
81
+ * Discovery, not interest. Being told a device exists does not subscribe the app to
82
+ * it — that still takes AppMessage.subscribe. The gateway sends this only for devices
83
+ * the user is entitled to see; an unfiltered announcement would be a device
84
+ * enumeration channel.
85
+ *
86
+ * @generated from message kusinta.iot.webrtc.v1.DeviceAdded
87
+ */
88
+ export declare type DeviceAdded = Message<"kusinta.iot.webrtc.v1.DeviceAdded"> & {
89
+ /**
90
+ * @generated from field: kusinta.iot.device.v1.Device device = 1;
91
+ */
92
+ device?: Device | undefined;
93
+ };
94
+
95
+ /**
96
+ * Describes the message kusinta.iot.webrtc.v1.DeviceAdded.
97
+ * Use `create(DeviceAddedSchema)` to create a new message.
98
+ */
99
+ export declare const DeviceAddedSchema: GenMessage<DeviceAdded>;
100
+
101
+ /**
102
+ * A device is gone, because its connector said so via connector.v1.DeviceRemoval.
103
+ *
104
+ * A connector disconnecting is NOT a removal: an ordinary reconnect wipes the
105
+ * device→connector route while every device still exists, and treating that as a
106
+ * removal makes the whole UI flap. Unreachability is a separate signal — read
107
+ * device.v1.Device.last_seen for that.
108
+ *
109
+ * @generated from message kusinta.iot.webrtc.v1.DeviceRemoved
110
+ */
111
+ export declare type DeviceRemoved = Message<"kusinta.iot.webrtc.v1.DeviceRemoved"> & {
112
+ /**
113
+ * @generated from field: kusinta.iot.identity.v1.DeviceId device_id = 1;
114
+ */
115
+ deviceId?: DeviceId | undefined;
116
+
117
+ /**
118
+ * passed through from the connector, for logs
119
+ *
120
+ * @generated from field: string reason = 2;
121
+ */
122
+ reason: string;
123
+ };
124
+
125
+ /**
126
+ * Describes the message kusinta.iot.webrtc.v1.DeviceRemoved.
127
+ * Use `create(DeviceRemovedSchema)` to create a new message.
128
+ */
129
+ export declare const DeviceRemovedSchema: GenMessage<DeviceRemoved>;
130
+
@@ -7,12 +7,13 @@ import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
7
7
  import { file_kusinta_iot_device_v1_device } from "../../device/v1/device_pb.js";
8
8
  import { file_kusinta_iot_device_v1_property_update } from "../../device/v1/property_update_pb.js";
9
9
  import { file_kusinta_iot_access_v1_acl } from "../../access/v1/acl_pb.js";
10
+ import { file_kusinta_iot_identity_v1_identity } from "../../identity/v1/identity_pb.js";
10
11
 
11
12
  /**
12
13
  * Describes the file kusinta/iot/webrtc/v1/device_state.proto.
13
14
  */
14
15
  export const file_kusinta_iot_webrtc_v1_device_state = /*@__PURE__*/
15
- fileDesc("CihrdXNpbnRhL2lvdC93ZWJydGMvdjEvZGV2aWNlX3N0YXRlLnByb3RvEhVrdXNpbnRhLmlvdC53ZWJydGMudjEiuwEKE0RldmljZVN0YXRlU25hcHNob3QSLgoHZGV2aWNlcxgBIAMoCzIdLmt1c2ludGEuaW90LmRldmljZS52MS5EZXZpY2USQAoLcGVybWlzc2lvbnMYAiABKAsyKy5rdXNpbnRhLmlvdC5hY2Nlc3MudjEuRWZmZWN0aXZlUGVybWlzc2lvbnMSMgoOc25hcHNob3R0ZWRfYXQYAyABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wIoYBChNEZXZpY2VQcm9wZXJ0eUV2ZW50EjUKBnVwZGF0ZRgBIAEoCzIlLmt1c2ludGEuaW90LmRldmljZS52MS5Qcm9wZXJ0eVVwZGF0ZRI4ChRnYXRld2F5X3Byb2Nlc3NlZF9hdBgCIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCAkgBYgZwcm90bzM", [file_google_protobuf_timestamp, file_kusinta_iot_device_v1_device, file_kusinta_iot_device_v1_property_update, file_kusinta_iot_access_v1_acl]);
16
+ fileDesc("CihrdXNpbnRhL2lvdC93ZWJydGMvdjEvZGV2aWNlX3N0YXRlLnByb3RvEhVrdXNpbnRhLmlvdC53ZWJydGMudjEiuwEKE0RldmljZVN0YXRlU25hcHNob3QSLgoHZGV2aWNlcxgBIAMoCzIdLmt1c2ludGEuaW90LmRldmljZS52MS5EZXZpY2USQAoLcGVybWlzc2lvbnMYAiABKAsyKy5rdXNpbnRhLmlvdC5hY2Nlc3MudjEuRWZmZWN0aXZlUGVybWlzc2lvbnMSMgoOc25hcHNob3R0ZWRfYXQYAyABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wIoYBChNEZXZpY2VQcm9wZXJ0eUV2ZW50EjUKBnVwZGF0ZRgBIAEoCzIlLmt1c2ludGEuaW90LmRldmljZS52MS5Qcm9wZXJ0eVVwZGF0ZRI4ChRnYXRld2F5X3Byb2Nlc3NlZF9hdBgCIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXAiPAoLRGV2aWNlQWRkZWQSLQoGZGV2aWNlGAEgASgLMh0ua3VzaW50YS5pb3QuZGV2aWNlLnYxLkRldmljZSJVCg1EZXZpY2VSZW1vdmVkEjQKCWRldmljZV9pZBgBIAEoCzIhLmt1c2ludGEuaW90LmlkZW50aXR5LnYxLkRldmljZUlkEg4KBnJlYXNvbhgCIAEoCUICSAFiBnByb3RvMw", [file_google_protobuf_timestamp, file_kusinta_iot_device_v1_device, file_kusinta_iot_device_v1_property_update, file_kusinta_iot_access_v1_acl, file_kusinta_iot_identity_v1_identity]);
16
17
 
17
18
  /**
18
19
  * Describes the message kusinta.iot.webrtc.v1.DeviceStateSnapshot.
@@ -28,3 +29,17 @@ export const DeviceStateSnapshotSchema = /*@__PURE__*/
28
29
  export const DevicePropertyEventSchema = /*@__PURE__*/
29
30
  messageDesc(file_kusinta_iot_webrtc_v1_device_state, 1);
30
31
 
32
+ /**
33
+ * Describes the message kusinta.iot.webrtc.v1.DeviceAdded.
34
+ * Use `create(DeviceAddedSchema)` to create a new message.
35
+ */
36
+ export const DeviceAddedSchema = /*@__PURE__*/
37
+ messageDesc(file_kusinta_iot_webrtc_v1_device_state, 2);
38
+
39
+ /**
40
+ * Describes the message kusinta.iot.webrtc.v1.DeviceRemoved.
41
+ * Use `create(DeviceRemovedSchema)` to create a new message.
42
+ */
43
+ export const DeviceRemovedSchema = /*@__PURE__*/
44
+ messageDesc(file_kusinta_iot_webrtc_v1_device_state, 3);
45
+