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