@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,13 +2,17 @@
2
2
  // @generated from file kusinta/iot/webrtc/v1/envelope.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
+ import type { AttributeRef } from "../../access/v1/acl_pb.js";
9
+ import type { Space } from "../../space/v1/space_pb.js";
10
+ import type { ManagementAck, ManagementRequest, SpaceTree } from "./management_pb.js";
8
11
  import type { Timestamp } from "@bufbuild/protobuf/wkt";
9
- import type { DevicePropertyEvent, DeviceStateSnapshot } from "./device_state_pb.js";
12
+ import type { DeviceAdded, DeviceRemoved, DeviceStateSnapshot, PropertyReport } from "./device_state_pb.js";
10
13
  import type { LivePermissionUpdate } from "./permission_push_pb.js";
11
- import type { CommandResult, DeviceCommand } from "./command_pb.js";
14
+ import type { AttributeWriteRequest, CommandResult, DeviceCommand } from "./command_pb.js";
15
+ import type { DeviceEventBatch } from "../../device/v1/device_event_pb.js";
12
16
 
13
17
  /**
14
18
  * Describes the file kusinta/iot/webrtc/v1/envelope.proto.
@@ -56,19 +60,29 @@ export declare type HandshakeRejected = Message<"kusinta.iot.webrtc.v1.Handshake
56
60
  export declare const HandshakeRejectedSchema: GenMessage<HandshakeRejected>;
57
61
 
58
62
  /**
59
- * AppHandshake must be the first message sent by the Flutter app on the data channel.
60
- * The gateway validates the JWT locally using the mykusinta-api-server public key,
63
+ * AppHandshake must be the first message sent by the app on the data channel.
64
+ * The gateway validates the JWT locally using the api-server's public key,
61
65
  * checks that gateway_id in the JWT matches this gateway, then extracts the role.
62
66
  *
63
67
  * @generated from message kusinta.iot.webrtc.v1.AppHandshake
64
68
  */
65
69
  export declare type AppHandshake = Message<"kusinta.iot.webrtc.v1.AppHandshake"> & {
66
70
  /**
71
+ * Signed compact JWS. Its payload claims are documented by AppTokenClaims
72
+ * in app_token.proto — the shared contract between the api-server (issuer)
73
+ * and the gateway (validator).
74
+ *
67
75
  * @generated from field: string jwt = 1;
68
76
  */
69
77
  jwt: string;
70
78
 
71
79
  /**
80
+ * Initial interest set — an optimisation that saves one round trip, equivalent to
81
+ * sending SubscribeDevices immediately after the handshake. Interest only: naming
82
+ * an id here does not entitle the app to it, and ids the user may not see are
83
+ * refused in the SubscriptionAck that follows. Not the only mechanism — the set is
84
+ * revisable mid-session via AppMessage.subscribe / .unsubscribe.
85
+ *
72
86
  * @generated from field: repeated kusinta.iot.identity.v1.DeviceId subscribe_device_ids = 2;
73
87
  */
74
88
  subscribeDeviceIds: DeviceId[];
@@ -81,23 +95,129 @@ export declare type AppHandshake = Message<"kusinta.iot.webrtc.v1.AppHandshake">
81
95
  export declare const AppHandshakeSchema: GenMessage<AppHandshake>;
82
96
 
83
97
  /**
84
- * @generated from message kusinta.iot.webrtc.v1.PropertyReadRequest
98
+ * Adds device_ids to what the app wants streamed. Interest, never entitlement:
99
+ * the gateway intersects the request with what the user is permitted to see and
100
+ * reports what it declined in SubscriptionAck.refused. Additive — ids already in
101
+ * the set are a no-op, so a retry after a dropped ack is safe.
102
+ *
103
+ * @generated from message kusinta.iot.webrtc.v1.SubscribeDevices
85
104
  */
86
- export declare type PropertyReadRequest = Message<"kusinta.iot.webrtc.v1.PropertyReadRequest"> & {
105
+ export declare type SubscribeDevices = Message<"kusinta.iot.webrtc.v1.SubscribeDevices"> & {
106
+ /**
107
+ * @generated from field: repeated kusinta.iot.identity.v1.DeviceId device_ids = 1;
108
+ */
109
+ deviceIds: DeviceId[];
110
+ };
111
+
112
+ /**
113
+ * Describes the message kusinta.iot.webrtc.v1.SubscribeDevices.
114
+ * Use `create(SubscribeDevicesSchema)` to create a new message.
115
+ */
116
+ export declare const SubscribeDevicesSchema: GenMessage<SubscribeDevices>;
117
+
118
+ /**
119
+ * Removes device_ids from what the app wants streamed. Removing an id the app is
120
+ * not subscribed to is a no-op, not an error.
121
+ *
122
+ * @generated from message kusinta.iot.webrtc.v1.UnsubscribeDevices
123
+ */
124
+ export declare type UnsubscribeDevices = Message<"kusinta.iot.webrtc.v1.UnsubscribeDevices"> & {
125
+ /**
126
+ * @generated from field: repeated kusinta.iot.identity.v1.DeviceId device_ids = 1;
127
+ */
128
+ deviceIds: DeviceId[];
129
+ };
130
+
131
+ /**
132
+ * Describes the message kusinta.iot.webrtc.v1.UnsubscribeDevices.
133
+ * Use `create(UnsubscribeDevicesSchema)` to create a new message.
134
+ */
135
+ export declare const UnsubscribeDevicesSchema: GenMessage<UnsubscribeDevices>;
136
+
137
+ /**
138
+ * A device the gateway declined to add to the interest set. Ids the gateway does
139
+ * not know are refused as NOT_ENTITLED rather than a distinct not-found code, so
140
+ * the ack cannot be used to enumerate devices the user may not see.
141
+ *
142
+ * @generated from message kusinta.iot.webrtc.v1.RefusedSubscription
143
+ */
144
+ export declare type RefusedSubscription = Message<"kusinta.iot.webrtc.v1.RefusedSubscription"> & {
87
145
  /**
88
146
  * @generated from field: kusinta.iot.identity.v1.DeviceId device_id = 1;
89
147
  */
90
148
  deviceId?: DeviceId | undefined;
91
149
 
92
150
  /**
93
- * @generated from field: string attribute_name = 2;
151
+ * @generated from field: kusinta.iot.webrtc.v1.GatewayErrorCode code = 2;
94
152
  */
95
- attributeName: string;
153
+ code: GatewayErrorCode;
96
154
 
97
155
  /**
98
- * @generated from field: string cluster_id_hex = 3;
156
+ * human-readable, for logs
157
+ *
158
+ * @generated from field: string message = 3;
99
159
  */
100
- clusterIdHex: string;
160
+ message: string;
161
+ };
162
+
163
+ /**
164
+ * Describes the message kusinta.iot.webrtc.v1.RefusedSubscription.
165
+ * Use `create(RefusedSubscriptionSchema)` to create a new message.
166
+ */
167
+ export declare const RefusedSubscriptionSchema: GenMessage<RefusedSubscription>;
168
+
169
+ /**
170
+ * Answer to SubscribeDevices / UnsubscribeDevices, gateway → app.
171
+ * `subscribed` is the effective set after the change, not a delta: an app that
172
+ * missed an ack or raced two requests re-syncs from it without reconnecting.
173
+ *
174
+ * @generated from message kusinta.iot.webrtc.v1.SubscriptionAck
175
+ */
176
+ export declare type SubscriptionAck = Message<"kusinta.iot.webrtc.v1.SubscriptionAck"> & {
177
+ /**
178
+ * AppMessage.message_id of the request
179
+ *
180
+ * @generated from field: string in_reply_to = 1;
181
+ */
182
+ inReplyTo: string;
183
+
184
+ /**
185
+ * @generated from field: repeated kusinta.iot.identity.v1.DeviceId subscribed = 2;
186
+ */
187
+ subscribed: DeviceId[];
188
+
189
+ /**
190
+ * @generated from field: repeated kusinta.iot.webrtc.v1.RefusedSubscription refused = 3;
191
+ */
192
+ refused: RefusedSubscription[];
193
+ };
194
+
195
+ /**
196
+ * Describes the message kusinta.iot.webrtc.v1.SubscriptionAck.
197
+ * Use `create(SubscriptionAckSchema)` to create a new message.
198
+ */
199
+ export declare const SubscriptionAckSchema: GenMessage<SubscriptionAck>;
200
+
201
+ /**
202
+ * Reads one attribute of one endpoint, on demand. The carrier for
203
+ * PERMISSION_ACTION_READ.
204
+ *
205
+ * Addressed by AttributeRef, the same type a write, a grant and a constraint use — so a
206
+ * read, the write that changes the value, and the permission covering both name the
207
+ * attribute identically.
208
+ *
209
+ * @generated from message kusinta.iot.webrtc.v1.PropertyReadRequest
210
+ */
211
+ export declare type PropertyReadRequest = Message<"kusinta.iot.webrtc.v1.PropertyReadRequest"> & {
212
+ /**
213
+ * @generated from field: kusinta.iot.identity.v1.DeviceId device_id = 1;
214
+ */
215
+ deviceId?: DeviceId | undefined;
216
+
217
+ /**
218
+ * @generated from field: kusinta.iot.access.v1.AttributeRef target = 7;
219
+ */
220
+ target?: AttributeRef | undefined;
101
221
  };
102
222
 
103
223
  /**
@@ -107,7 +227,106 @@ export declare type PropertyReadRequest = Message<"kusinta.iot.webrtc.v1.Propert
107
227
  export declare const PropertyReadRequestSchema: GenMessage<PropertyReadRequest>;
108
228
 
109
229
  /**
110
- * GatewayMessage: gateway → Flutter app
230
+ * Session-level error, gateway → app. Mirrors connector.v1.GatewayError
231
+ * on the connector leg; kept separate because the two legs have different
232
+ * authorization semantics and this one has a closed code vocabulary.
233
+ *
234
+ * @generated from message kusinta.iot.webrtc.v1.GatewayError
235
+ */
236
+ export declare type GatewayError = Message<"kusinta.iot.webrtc.v1.GatewayError"> & {
237
+ /**
238
+ * @generated from field: kusinta.iot.webrtc.v1.GatewayErrorCode code = 1;
239
+ */
240
+ code: GatewayErrorCode;
241
+
242
+ /**
243
+ * human-readable, for logs — never rendered to a user
244
+ *
245
+ * @generated from field: string message = 2;
246
+ */
247
+ message: string;
248
+
249
+ /**
250
+ * structured detail, e.g. {"device_id": "therm-1"}
251
+ *
252
+ * @generated from field: map<string, string> metadata = 3;
253
+ */
254
+ metadata: { [key: string]: string };
255
+ };
256
+
257
+ /**
258
+ * Describes the message kusinta.iot.webrtc.v1.GatewayError.
259
+ * Use `create(GatewayErrorSchema)` to create a new message.
260
+ */
261
+ export declare const GatewayErrorSchema: GenMessage<GatewayError>;
262
+
263
+ /**
264
+ * Answer to a ManagementRequest, gateway → app. Lives here rather than beside the
265
+ * requests in management.proto because it carries GatewayError, which is declared
266
+ * in this file; the other direction would be an import cycle.
267
+ *
268
+ * Exactly one result arrives per request, correlated by in_reply_to. A refusal is
269
+ * an ordinary result, not a session-level error: a filing operation the caller may
270
+ * not perform says so and the session continues. Targets the caller cannot reach
271
+ * are refused as NOT_ENTITLED whether or not they exist, so no result here reveals
272
+ * which spaces or devices are out there.
273
+ *
274
+ * @generated from message kusinta.iot.webrtc.v1.ManagementResult
275
+ */
276
+ export declare type ManagementResult = Message<"kusinta.iot.webrtc.v1.ManagementResult"> & {
277
+ /**
278
+ * AppMessage.message_id of the request
279
+ *
280
+ * @generated from field: string in_reply_to = 1;
281
+ */
282
+ inReplyTo: string;
283
+
284
+ /**
285
+ * @generated from oneof kusinta.iot.webrtc.v1.ManagementResult.result
286
+ */
287
+ result: {
288
+ /**
289
+ * refused, or the request was malformed
290
+ *
291
+ * @generated from field: kusinta.iot.webrtc.v1.GatewayError error = 2;
292
+ */
293
+ value: GatewayError;
294
+ case: "error";
295
+ } | {
296
+ /**
297
+ * create_space, update_space
298
+ *
299
+ * @generated from field: kusinta.iot.space.v1.Space space = 3;
300
+ */
301
+ value: Space;
302
+ case: "space";
303
+ } | {
304
+ /**
305
+ * list_spaces
306
+ *
307
+ * @generated from field: kusinta.iot.webrtc.v1.SpaceTree space_tree = 4;
308
+ */
309
+ value: SpaceTree;
310
+ case: "spaceTree";
311
+ } | {
312
+ /**
313
+ * everything else
314
+ *
315
+ * @generated from field: kusinta.iot.webrtc.v1.ManagementAck ack = 5;
316
+ */
317
+ value: ManagementAck;
318
+ case: "ack";
319
+ } | { case: undefined; value?: undefined };
320
+ };
321
+
322
+ /**
323
+ * Describes the message kusinta.iot.webrtc.v1.ManagementResult.
324
+ * Use `create(ManagementResultSchema)` to create a new message.
325
+ */
326
+ export declare const ManagementResultSchema: GenMessage<ManagementResult>;
327
+
328
+ /**
329
+ * GatewayMessage: gateway → app
111
330
  *
112
331
  * @generated from message kusinta.iot.webrtc.v1.GatewayMessage
113
332
  */
@@ -133,10 +352,10 @@ export declare type GatewayMessage = Message<"kusinta.iot.webrtc.v1.GatewayMessa
133
352
  case: "stateSnapshot";
134
353
  } | {
135
354
  /**
136
- * @generated from field: kusinta.iot.webrtc.v1.DevicePropertyEvent property_event = 4;
355
+ * @generated from field: kusinta.iot.webrtc.v1.PropertyReport property_report = 4;
137
356
  */
138
- value: DevicePropertyEvent;
139
- case: "propertyEvent";
357
+ value: PropertyReport;
358
+ case: "propertyReport";
140
359
  } | {
141
360
  /**
142
361
  * @generated from field: kusinta.iot.webrtc.v1.LivePermissionUpdate permission_update = 5;
@@ -149,14 +368,6 @@ export declare type GatewayMessage = Message<"kusinta.iot.webrtc.v1.GatewayMessa
149
368
  */
150
369
  value: CommandResult;
151
370
  case: "commandResult";
152
- } | {
153
- /**
154
- * error description string
155
- *
156
- * @generated from field: string error = 7;
157
- */
158
- value: string;
159
- case: "error";
160
371
  } | {
161
372
  /**
162
373
  * @generated from field: kusinta.iot.webrtc.v1.Pong pong = 8;
@@ -169,6 +380,47 @@ export declare type GatewayMessage = Message<"kusinta.iot.webrtc.v1.GatewayMessa
169
380
  */
170
381
  value: HandshakeRejected;
171
382
  case: "handshakeRejected";
383
+ } | {
384
+ /**
385
+ * @generated from field: kusinta.iot.webrtc.v1.GatewayError error = 10;
386
+ */
387
+ value: GatewayError;
388
+ case: "error";
389
+ } | {
390
+ /**
391
+ * @generated from field: kusinta.iot.webrtc.v1.SubscriptionAck subscription_ack = 11;
392
+ */
393
+ value: SubscriptionAck;
394
+ case: "subscriptionAck";
395
+ } | {
396
+ /**
397
+ * @generated from field: kusinta.iot.webrtc.v1.DeviceAdded device_added = 12;
398
+ */
399
+ value: DeviceAdded;
400
+ case: "deviceAdded";
401
+ } | {
402
+ /**
403
+ * @generated from field: kusinta.iot.webrtc.v1.DeviceRemoved device_removed = 13;
404
+ */
405
+ value: DeviceRemoved;
406
+ case: "deviceRemoved";
407
+ } | {
408
+ /**
409
+ * @generated from field: kusinta.iot.webrtc.v1.ManagementResult management_result = 14;
410
+ */
411
+ value: ManagementResult;
412
+ case: "managementResult";
413
+ } | {
414
+ /**
415
+ * 15 was attribute_write_result. Answers to attribute writes come back as
416
+ * command_result above instead: a write and an invoke differ in what they do to a
417
+ * device, not in how the gateway reports having done it, and request_id says which
418
+ * request is being answered either way.
419
+ *
420
+ * @generated from field: kusinta.iot.device.v1.DeviceEventBatch device_events = 16;
421
+ */
422
+ value: DeviceEventBatch;
423
+ case: "deviceEvents";
172
424
  } | { case: undefined; value?: undefined };
173
425
  };
174
426
 
@@ -179,7 +431,7 @@ export declare type GatewayMessage = Message<"kusinta.iot.webrtc.v1.GatewayMessa
179
431
  export declare const GatewayMessageSchema: GenMessage<GatewayMessage>;
180
432
 
181
433
  /**
182
- * AppMessage: Flutter app → gateway
434
+ * AppMessage: app → gateway
183
435
  *
184
436
  * @generated from message kusinta.iot.webrtc.v1.AppMessage
185
437
  */
@@ -221,6 +473,30 @@ export declare type AppMessage = Message<"kusinta.iot.webrtc.v1.AppMessage"> & {
221
473
  */
222
474
  value: Ping;
223
475
  case: "ping";
476
+ } | {
477
+ /**
478
+ * @generated from field: kusinta.iot.webrtc.v1.SubscribeDevices subscribe = 7;
479
+ */
480
+ value: SubscribeDevices;
481
+ case: "subscribe";
482
+ } | {
483
+ /**
484
+ * @generated from field: kusinta.iot.webrtc.v1.UnsubscribeDevices unsubscribe = 8;
485
+ */
486
+ value: UnsubscribeDevices;
487
+ case: "unsubscribe";
488
+ } | {
489
+ /**
490
+ * @generated from field: kusinta.iot.webrtc.v1.ManagementRequest management = 9;
491
+ */
492
+ value: ManagementRequest;
493
+ case: "management";
494
+ } | {
495
+ /**
496
+ * @generated from field: kusinta.iot.webrtc.v1.AttributeWriteRequest attribute_write = 10;
497
+ */
498
+ value: AttributeWriteRequest;
499
+ case: "attributeWrite";
224
500
  } | { case: undefined; value?: undefined };
225
501
  };
226
502
 
@@ -230,3 +506,74 @@ export declare type AppMessage = Message<"kusinta.iot.webrtc.v1.AppMessage"> & {
230
506
  */
231
507
  export declare const AppMessageSchema: GenMessage<AppMessage>;
232
508
 
509
+ /**
510
+ * Machine-readable classification of a session-level gateway error, so the app
511
+ * can branch without string-matching a human sentence. Deliberately an enum here,
512
+ * unlike the free-form code on connector.v1.GatewayError: the app leg is versioned
513
+ * together with the gateway, and clients need an exhaustive switch.
514
+ *
515
+ * @generated from enum kusinta.iot.webrtc.v1.GatewayErrorCode
516
+ */
517
+ export enum GatewayErrorCode {
518
+ /**
519
+ * Sender did not set a code, or sent one this client's schema does not know.
520
+ *
521
+ * @generated from enum value: GATEWAY_ERROR_CODE_UNSPECIFIED = 0;
522
+ */
523
+ UNSPECIFIED = 0,
524
+
525
+ /**
526
+ * Permanent refusal — the user may not see or act on this. Stop asking, tell the user.
527
+ *
528
+ * @generated from enum value: GATEWAY_ERROR_CODE_NOT_ENTITLED = 1;
529
+ */
530
+ NOT_ENTITLED = 1,
531
+
532
+ /**
533
+ * The app sent something malformed. A client bug: log it, do not retry.
534
+ *
535
+ * @generated from enum value: GATEWAY_ERROR_CODE_INVALID_REQUEST = 2;
536
+ */
537
+ INVALID_REQUEST = 2,
538
+
539
+ /**
540
+ * Transient failure. Retrying is reasonable.
541
+ *
542
+ * @generated from enum value: GATEWAY_ERROR_CODE_UNAVAILABLE = 3;
543
+ */
544
+ UNAVAILABLE = 3,
545
+
546
+ /**
547
+ * Gateway-side fault. Not the app's doing; retry cautiously.
548
+ *
549
+ * @generated from enum value: GATEWAY_ERROR_CODE_INTERNAL = 4;
550
+ */
551
+ INTERNAL = 4,
552
+
553
+ /**
554
+ * The user already holds the maximum number of concurrent sessions this
555
+ * gateway will keep, and this attempt is refused. Permanent for this attempt:
556
+ * the limit does not clear on its own, so retrying is exactly the wrong
557
+ * response — the user must end another session first. Distinct from
558
+ * NOT_ENTITLED, which is a statement about what the user may see; this user
559
+ * may, they are simply already connected enough times.
560
+ *
561
+ * The limit itself is gateway configuration and deliberately not modelled
562
+ * here. GatewayError.message carries the specifics so a client can render
563
+ * something actionable.
564
+ *
565
+ * Rollout note: a client whose schema predates this value decodes it as
566
+ * UNSPECIFIED, which is retryable by design. Client handling must therefore
567
+ * ship before or with the gateway that emits it, and the gateway must close
568
+ * the session itself rather than rely on the client standing down.
569
+ *
570
+ * @generated from enum value: GATEWAY_ERROR_CODE_SESSION_LIMIT_REACHED = 5;
571
+ */
572
+ SESSION_LIMIT_REACHED = 5,
573
+ }
574
+
575
+ /**
576
+ * Describes the enum kusinta.iot.webrtc.v1.GatewayErrorCode.
577
+ */
578
+ export declare const GatewayErrorCodeSchema: GenEnum<GatewayErrorCode>;
579
+
@@ -2,18 +2,22 @@
2
2
  // @generated from file kusinta/iot/webrtc/v1/envelope.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_device_event } from "../../device/v1/device_event_pb.js";
7
9
  import { file_kusinta_iot_identity_v1_identity } from "../../identity/v1/identity_pb.js";
10
+ import { file_kusinta_iot_space_v1_space } from "../../space/v1/space_pb.js";
8
11
  import { file_kusinta_iot_webrtc_v1_command } from "./command_pb.js";
9
12
  import { file_kusinta_iot_webrtc_v1_device_state } from "./device_state_pb.js";
13
+ import { file_kusinta_iot_webrtc_v1_management } from "./management_pb.js";
10
14
  import { file_kusinta_iot_webrtc_v1_permission_push } from "./permission_push_pb.js";
11
15
 
12
16
  /**
13
17
  * Describes the file kusinta/iot/webrtc/v1/envelope.proto.
14
18
  */
15
19
  export const file_kusinta_iot_webrtc_v1_envelope = /*@__PURE__*/
16
- fileDesc("CiRrdXNpbnRhL2lvdC93ZWJydGMvdjEvZW52ZWxvcGUucHJvdG8SFWt1c2ludGEuaW90LndlYnJ0Yy52MSIGCgRQaW5nIgYKBFBvbmciIwoRSGFuZHNoYWtlUmVqZWN0ZWQSDgoGcmVhc29uGAEgASgJIlwKDEFwcEhhbmRzaGFrZRILCgNqd3QYASABKAkSPwoUc3Vic2NyaWJlX2RldmljZV9pZHMYAiADKAsyIS5rdXNpbnRhLmlvdC5pZGVudGl0eS52MS5EZXZpY2VJZCJ7ChNQcm9wZXJ0eVJlYWRSZXF1ZXN0EjQKCWRldmljZV9pZBgBIAEoCzIhLmt1c2ludGEuaW90LmlkZW50aXR5LnYxLkRldmljZUlkEhYKDmF0dHJpYnV0ZV9uYW1lGAIgASgJEhYKDmNsdXN0ZXJfaWRfaGV4GAMgASgJIvgDCg5HYXRld2F5TWVzc2FnZRISCgptZXNzYWdlX2lkGAEgASgJEisKB3NlbnRfYXQYAiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEkQKDnN0YXRlX3NuYXBzaG90GAMgASgLMioua3VzaW50YS5pb3Qud2VicnRjLnYxLkRldmljZVN0YXRlU25hcHNob3RIABJECg5wcm9wZXJ0eV9ldmVudBgEIAEoCzIqLmt1c2ludGEuaW90LndlYnJ0Yy52MS5EZXZpY2VQcm9wZXJ0eUV2ZW50SAASSAoRcGVybWlzc2lvbl91cGRhdGUYBSABKAsyKy5rdXNpbnRhLmlvdC53ZWJydGMudjEuTGl2ZVBlcm1pc3Npb25VcGRhdGVIABI+Cg5jb21tYW5kX3Jlc3VsdBgGIAEoCzIkLmt1c2ludGEuaW90LndlYnJ0Yy52MS5Db21tYW5kUmVzdWx0SAASDwoFZXJyb3IYByABKAlIABIrCgRwb25nGAggASgLMhsua3VzaW50YS5pb3Qud2VicnRjLnYxLlBvbmdIABJGChJoYW5kc2hha2VfcmVqZWN0ZWQYCSABKAsyKC5rdXNpbnRhLmlvdC53ZWJydGMudjEuSGFuZHNoYWtlUmVqZWN0ZWRIAEIJCgdwYXlsb2FkIrwCCgpBcHBNZXNzYWdlEhIKCm1lc3NhZ2VfaWQYASABKAkSKwoHc2VudF9hdBgCIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASOAoJaGFuZHNoYWtlGAMgASgLMiMua3VzaW50YS5pb3Qud2VicnRjLnYxLkFwcEhhbmRzaGFrZUgAEjcKB2NvbW1hbmQYBCABKAsyJC5rdXNpbnRhLmlvdC53ZWJydGMudjEuRGV2aWNlQ29tbWFuZEgAEkIKDHJlYWRfcmVxdWVzdBgFIAEoCzIqLmt1c2ludGEuaW90LndlYnJ0Yy52MS5Qcm9wZXJ0eVJlYWRSZXF1ZXN0SAASKwoEcGluZxgGIAEoCzIbLmt1c2ludGEuaW90LndlYnJ0Yy52MS5QaW5nSABCCQoHcGF5bG9hZEICSAFiBnByb3RvMw", [file_google_protobuf_timestamp, file_kusinta_iot_identity_v1_identity, file_kusinta_iot_webrtc_v1_command, file_kusinta_iot_webrtc_v1_device_state, file_kusinta_iot_webrtc_v1_permission_push]);
20
+ fileDesc("CiRrdXNpbnRhL2lvdC93ZWJydGMvdjEvZW52ZWxvcGUucHJvdG8SFWt1c2ludGEuaW90LndlYnJ0Yy52MSIGCgRQaW5nIgYKBFBvbmciIwoRSGFuZHNoYWtlUmVqZWN0ZWQSDgoGcmVhc29uGAEgASgJIlw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mdIABI8CglzdWJzY3JpYmUYByABKAsyJy5rdXNpbnRhLmlvdC53ZWJydGMudjEuU3Vic2NyaWJlRGV2aWNlc0gAEkAKC3Vuc3Vic2NyaWJlGAggASgLMikua3VzaW50YS5pb3Qud2VicnRjLnYxLlVuc3Vic2NyaWJlRGV2aWNlc0gAEj4KCm1hbmFnZW1lbnQYCSABKAsyKC5rdXNpbnRhLmlvdC53ZWJydGMudjEuTWFuYWdlbWVudFJlcXVlc3RIABJHCg9hdHRyaWJ1dGVfd3JpdGUYCiABKAsyLC5rdXNpbnRhLmlvdC53ZWJydGMudjEuQXR0cmlidXRlV3JpdGVSZXF1ZXN0SABCCQoHcGF5bG9hZCr2AQoQR2F0ZXdheUVycm9yQ29kZRIiCh5HQVRFV0FZX0VSUk9SX0NPREVfVU5TUEVDSUZJRUQQABIjCh9HQVRFV0FZX0VSUk9SX0NPREVfTk9UX0VOVElUTEVEEAESJgoiR0FURVdBWV9FUlJPUl9DT0RFX0lOVkFMSURfUkVRVUVTVBACEiIKHkdBVEVXQVlfRVJST1JfQ09ERV9VTkFWQUlMQUJMRRADEh8KG0dBVEVXQVlfRVJST1JfQ09ERV9JTlRFUk5BTBAEEiwKKEdBVEVXQVlfRVJST1JfQ09ERV9TRVNTSU9OX0xJTUlUX1JFQUNIRUQQBUICSAFiBnByb3RvMw", [file_google_protobuf_timestamp, file_kusinta_iot_access_v1_acl, file_kusinta_iot_device_v1_device_event, file_kusinta_iot_identity_v1_identity, file_kusinta_iot_space_v1_space, file_kusinta_iot_webrtc_v1_command, file_kusinta_iot_webrtc_v1_device_state, file_kusinta_iot_webrtc_v1_management, file_kusinta_iot_webrtc_v1_permission_push]);
17
21
 
18
22
  /**
19
23
  * Describes the message kusinta.iot.webrtc.v1.Ping.
@@ -43,24 +47,83 @@ export const HandshakeRejectedSchema = /*@__PURE__*/
43
47
  export const AppHandshakeSchema = /*@__PURE__*/
44
48
  messageDesc(file_kusinta_iot_webrtc_v1_envelope, 3);
45
49
 
50
+ /**
51
+ * Describes the message kusinta.iot.webrtc.v1.SubscribeDevices.
52
+ * Use `create(SubscribeDevicesSchema)` to create a new message.
53
+ */
54
+ export const SubscribeDevicesSchema = /*@__PURE__*/
55
+ messageDesc(file_kusinta_iot_webrtc_v1_envelope, 4);
56
+
57
+ /**
58
+ * Describes the message kusinta.iot.webrtc.v1.UnsubscribeDevices.
59
+ * Use `create(UnsubscribeDevicesSchema)` to create a new message.
60
+ */
61
+ export const UnsubscribeDevicesSchema = /*@__PURE__*/
62
+ messageDesc(file_kusinta_iot_webrtc_v1_envelope, 5);
63
+
64
+ /**
65
+ * Describes the message kusinta.iot.webrtc.v1.RefusedSubscription.
66
+ * Use `create(RefusedSubscriptionSchema)` to create a new message.
67
+ */
68
+ export const RefusedSubscriptionSchema = /*@__PURE__*/
69
+ messageDesc(file_kusinta_iot_webrtc_v1_envelope, 6);
70
+
71
+ /**
72
+ * Describes the message kusinta.iot.webrtc.v1.SubscriptionAck.
73
+ * Use `create(SubscriptionAckSchema)` to create a new message.
74
+ */
75
+ export const SubscriptionAckSchema = /*@__PURE__*/
76
+ messageDesc(file_kusinta_iot_webrtc_v1_envelope, 7);
77
+
46
78
  /**
47
79
  * Describes the message kusinta.iot.webrtc.v1.PropertyReadRequest.
48
80
  * Use `create(PropertyReadRequestSchema)` to create a new message.
49
81
  */
50
82
  export const PropertyReadRequestSchema = /*@__PURE__*/
51
- messageDesc(file_kusinta_iot_webrtc_v1_envelope, 4);
83
+ messageDesc(file_kusinta_iot_webrtc_v1_envelope, 8);
84
+
85
+ /**
86
+ * Describes the message kusinta.iot.webrtc.v1.GatewayError.
87
+ * Use `create(GatewayErrorSchema)` to create a new message.
88
+ */
89
+ export const GatewayErrorSchema = /*@__PURE__*/
90
+ messageDesc(file_kusinta_iot_webrtc_v1_envelope, 9);
91
+
92
+ /**
93
+ * Describes the message kusinta.iot.webrtc.v1.ManagementResult.
94
+ * Use `create(ManagementResultSchema)` to create a new message.
95
+ */
96
+ export const ManagementResultSchema = /*@__PURE__*/
97
+ messageDesc(file_kusinta_iot_webrtc_v1_envelope, 10);
52
98
 
53
99
  /**
54
100
  * Describes the message kusinta.iot.webrtc.v1.GatewayMessage.
55
101
  * Use `create(GatewayMessageSchema)` to create a new message.
56
102
  */
57
103
  export const GatewayMessageSchema = /*@__PURE__*/
58
- messageDesc(file_kusinta_iot_webrtc_v1_envelope, 5);
104
+ messageDesc(file_kusinta_iot_webrtc_v1_envelope, 11);
59
105
 
60
106
  /**
61
107
  * Describes the message kusinta.iot.webrtc.v1.AppMessage.
62
108
  * Use `create(AppMessageSchema)` to create a new message.
63
109
  */
64
110
  export const AppMessageSchema = /*@__PURE__*/
65
- messageDesc(file_kusinta_iot_webrtc_v1_envelope, 6);
111
+ messageDesc(file_kusinta_iot_webrtc_v1_envelope, 12);
112
+
113
+ /**
114
+ * Describes the enum kusinta.iot.webrtc.v1.GatewayErrorCode.
115
+ */
116
+ export const GatewayErrorCodeSchema = /*@__PURE__*/
117
+ enumDesc(file_kusinta_iot_webrtc_v1_envelope, 0);
118
+
119
+ /**
120
+ * Machine-readable classification of a session-level gateway error, so the app
121
+ * can branch without string-matching a human sentence. Deliberately an enum here,
122
+ * unlike the free-form code on connector.v1.GatewayError: the app leg is versioned
123
+ * together with the gateway, and clients need an exhaustive switch.
124
+ *
125
+ * @generated from enum kusinta.iot.webrtc.v1.GatewayErrorCode
126
+ */
127
+ export const GatewayErrorCode = /*@__PURE__*/
128
+ tsEnum(GatewayErrorCodeSchema);
66
129