@kusinta/iot-schema 0.1.0-beta.2 → 0.1.0-beta.21

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 (57) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +49 -0
  3. package/package.json +10 -2
  4. package/src/kusinta/iot/access/v1/acl_pb.d.ts +3 -3
  5. package/src/kusinta/iot/access/v1/acl_pb.js +3 -3
  6. package/src/kusinta/iot/access/v1/roles_pb.d.ts +1 -1
  7. package/src/kusinta/iot/access/v1/roles_pb.js +1 -1
  8. package/src/kusinta/iot/common/v1/types_pb.d.ts +1 -1
  9. package/src/kusinta/iot/common/v1/types_pb.js +1 -1
  10. package/src/kusinta/iot/connector/v1/connector_pb.d.ts +31 -24
  11. package/src/kusinta/iot/connector/v1/connector_pb.js +16 -15
  12. package/src/kusinta/iot/connector/v1/connector_service_pb.d.ts +6 -6
  13. package/src/kusinta/iot/connector/v1/connector_service_pb.js +3 -3
  14. package/src/kusinta/iot/device/v1/descriptor_pb.d.ts +3 -3
  15. package/src/kusinta/iot/device/v1/descriptor_pb.js +3 -3
  16. package/src/kusinta/iot/device/v1/device_pb.d.ts +36 -4
  17. package/src/kusinta/iot/device/v1/device_pb.js +4 -4
  18. package/src/kusinta/iot/device/v1/matter_options_pb.d.ts +46 -0
  19. package/src/kusinta/iot/device/v1/matter_options_pb.js +50 -0
  20. package/src/kusinta/iot/device/v1/properties_pb.d.ts +175 -208
  21. package/src/kusinta/iot/device/v1/properties_pb.js +3 -2
  22. package/src/kusinta/iot/device/v1/property_update_pb.d.ts +38 -5
  23. package/src/kusinta/iot/device/v1/property_update_pb.js +2 -2
  24. package/src/kusinta/iot/identity/v1/identity_pb.d.ts +1 -1
  25. package/src/kusinta/iot/identity/v1/identity_pb.js +1 -1
  26. package/src/kusinta/iot/registration/v1/registration_pb.d.ts +170 -0
  27. package/src/kusinta/iot/registration/v1/registration_pb.js +61 -0
  28. package/src/kusinta/iot/registration/v1/registration_service_pb.d.ts +34 -0
  29. package/src/kusinta/iot/registration/v1/registration_service_pb.js +19 -0
  30. package/src/kusinta/iot/signaling/v1/signaling_pb.d.ts +320 -0
  31. package/src/kusinta/iot/signaling/v1/signaling_pb.js +83 -0
  32. package/src/kusinta/iot/signaling/v1/signaling_service_pb.d.ts +34 -0
  33. package/src/kusinta/iot/signaling/v1/signaling_service_pb.js +19 -0
  34. package/src/kusinta/iot/space/v1/space_pb.d.ts +3 -3
  35. package/src/kusinta/iot/space/v1/space_pb.js +3 -3
  36. package/src/kusinta/iot/vendor/homematic/v1/homematic_pb.d.ts +16 -11
  37. package/src/kusinta/iot/vendor/homematic/v1/homematic_pb.js +2 -2
  38. package/src/kusinta/iot/webrtc/v1/app_token_pb.d.ts +152 -0
  39. package/src/kusinta/iot/webrtc/v1/app_token_pb.js +28 -0
  40. package/src/kusinta/iot/webrtc/v1/command_pb.d.ts +4 -4
  41. package/src/kusinta/iot/webrtc/v1/command_pb.js +2 -2
  42. package/src/kusinta/iot/webrtc/v1/device_state_pb.d.ts +69 -6
  43. package/src/kusinta/iot/webrtc/v1/device_state_pb.js +20 -5
  44. package/src/kusinta/iot/webrtc/v1/envelope_pb.d.ts +365 -17
  45. package/src/kusinta/iot/webrtc/v1/envelope_pb.js +79 -11
  46. package/src/kusinta/iot/webrtc/v1/management_pb.d.ts +451 -0
  47. package/src/kusinta/iot/webrtc/v1/management_pb.js +106 -0
  48. package/src/kusinta/iot/webrtc/v1/permission_push_pb.d.ts +10 -4
  49. package/src/kusinta/iot/webrtc/v1/permission_push_pb.js +3 -3
  50. package/src/__tests__/access.test.js +0 -134
  51. package/src/__tests__/common.test.js +0 -29
  52. package/src/__tests__/connector.test.js +0 -144
  53. package/src/__tests__/device.test.js +0 -194
  54. package/src/__tests__/identity.test.js +0 -43
  55. package/src/__tests__/space.test.js +0 -54
  56. package/src/__tests__/vendor.test.js +0 -60
  57. package/src/__tests__/webrtc.test.js +0 -268
@@ -1,14 +1,16 @@
1
- // @generated by protoc-gen-es v2.12.0 with parameter "target=js+dts"
1
+ // @generated by protoc-gen-es v2.12.0 with parameter "target=js+dts,import_extension=js"
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
- import type { DeviceId } from "../../identity/v1/identity_pb";
7
+ import type { DeviceId } from "../../identity/v1/identity_pb.js";
8
+ import type { Space } from "../../space/v1/space_pb.js";
9
+ import type { ManagementAck, ManagementRequest, SpaceTree } from "./management_pb.js";
8
10
  import type { Timestamp } from "@bufbuild/protobuf/wkt";
9
- import type { DevicePropertyEvent, DeviceStateSnapshot } from "./device_state_pb";
10
- import type { LivePermissionUpdate } from "./permission_push_pb";
11
- import type { CommandResult, DeviceCommand } from "./command_pb";
11
+ import type { DeviceAdded, DevicePropertyEvent, DeviceRemoved, DeviceStateSnapshot } from "./device_state_pb.js";
12
+ import type { LivePermissionUpdate } from "./permission_push_pb.js";
13
+ import type { CommandResult, DeviceCommand } from "./command_pb.js";
12
14
 
13
15
  /**
14
16
  * Describes the file kusinta/iot/webrtc/v1/envelope.proto.
@@ -40,19 +42,45 @@ export declare type Pong = Message<"kusinta.iot.webrtc.v1.Pong"> & {
40
42
  export declare const PongSchema: GenMessage<Pong>;
41
43
 
42
44
  /**
43
- * AppHandshake must be the first message sent by the Flutter app on the data channel.
44
- * The gateway validates the JWT locally using the mykusinta-api-server public key,
45
+ * @generated from message kusinta.iot.webrtc.v1.HandshakeRejected
46
+ */
47
+ export declare type HandshakeRejected = Message<"kusinta.iot.webrtc.v1.HandshakeRejected"> & {
48
+ /**
49
+ * @generated from field: string reason = 1;
50
+ */
51
+ reason: string;
52
+ };
53
+
54
+ /**
55
+ * Describes the message kusinta.iot.webrtc.v1.HandshakeRejected.
56
+ * Use `create(HandshakeRejectedSchema)` to create a new message.
57
+ */
58
+ export declare const HandshakeRejectedSchema: GenMessage<HandshakeRejected>;
59
+
60
+ /**
61
+ * AppHandshake must be the first message sent by the app on the data channel.
62
+ * The gateway validates the JWT locally using the api-server's public key,
45
63
  * checks that gateway_id in the JWT matches this gateway, then extracts the role.
46
64
  *
47
65
  * @generated from message kusinta.iot.webrtc.v1.AppHandshake
48
66
  */
49
67
  export declare type AppHandshake = Message<"kusinta.iot.webrtc.v1.AppHandshake"> & {
50
68
  /**
69
+ * Signed compact JWS. Its payload claims are documented by AppTokenClaims
70
+ * in app_token.proto — the shared contract between the api-server (issuer)
71
+ * and the gateway (validator).
72
+ *
51
73
  * @generated from field: string jwt = 1;
52
74
  */
53
75
  jwt: string;
54
76
 
55
77
  /**
78
+ * Initial interest set — an optimisation that saves one round trip, equivalent to
79
+ * sending SubscribeDevices immediately after the handshake. Interest only: naming
80
+ * an id here does not entitle the app to it, and ids the user may not see are
81
+ * refused in the SubscriptionAck that follows. Not the only mechanism — the set is
82
+ * revisable mid-session via AppMessage.subscribe / .unsubscribe.
83
+ *
56
84
  * @generated from field: repeated kusinta.iot.identity.v1.DeviceId subscribe_device_ids = 2;
57
85
  */
58
86
  subscribeDeviceIds: DeviceId[];
@@ -64,6 +92,110 @@ export declare type AppHandshake = Message<"kusinta.iot.webrtc.v1.AppHandshake">
64
92
  */
65
93
  export declare const AppHandshakeSchema: GenMessage<AppHandshake>;
66
94
 
95
+ /**
96
+ * Adds device_ids to what the app wants streamed. Interest, never entitlement:
97
+ * the gateway intersects the request with what the user is permitted to see and
98
+ * reports what it declined in SubscriptionAck.refused. Additive — ids already in
99
+ * the set are a no-op, so a retry after a dropped ack is safe.
100
+ *
101
+ * @generated from message kusinta.iot.webrtc.v1.SubscribeDevices
102
+ */
103
+ export declare type SubscribeDevices = Message<"kusinta.iot.webrtc.v1.SubscribeDevices"> & {
104
+ /**
105
+ * @generated from field: repeated kusinta.iot.identity.v1.DeviceId device_ids = 1;
106
+ */
107
+ deviceIds: DeviceId[];
108
+ };
109
+
110
+ /**
111
+ * Describes the message kusinta.iot.webrtc.v1.SubscribeDevices.
112
+ * Use `create(SubscribeDevicesSchema)` to create a new message.
113
+ */
114
+ export declare const SubscribeDevicesSchema: GenMessage<SubscribeDevices>;
115
+
116
+ /**
117
+ * Removes device_ids from what the app wants streamed. Removing an id the app is
118
+ * not subscribed to is a no-op, not an error.
119
+ *
120
+ * @generated from message kusinta.iot.webrtc.v1.UnsubscribeDevices
121
+ */
122
+ export declare type UnsubscribeDevices = Message<"kusinta.iot.webrtc.v1.UnsubscribeDevices"> & {
123
+ /**
124
+ * @generated from field: repeated kusinta.iot.identity.v1.DeviceId device_ids = 1;
125
+ */
126
+ deviceIds: DeviceId[];
127
+ };
128
+
129
+ /**
130
+ * Describes the message kusinta.iot.webrtc.v1.UnsubscribeDevices.
131
+ * Use `create(UnsubscribeDevicesSchema)` to create a new message.
132
+ */
133
+ export declare const UnsubscribeDevicesSchema: GenMessage<UnsubscribeDevices>;
134
+
135
+ /**
136
+ * A device the gateway declined to add to the interest set. Ids the gateway does
137
+ * not know are refused as NOT_ENTITLED rather than a distinct not-found code, so
138
+ * the ack cannot be used to enumerate devices the user may not see.
139
+ *
140
+ * @generated from message kusinta.iot.webrtc.v1.RefusedSubscription
141
+ */
142
+ export declare type RefusedSubscription = Message<"kusinta.iot.webrtc.v1.RefusedSubscription"> & {
143
+ /**
144
+ * @generated from field: kusinta.iot.identity.v1.DeviceId device_id = 1;
145
+ */
146
+ deviceId?: DeviceId | undefined;
147
+
148
+ /**
149
+ * @generated from field: kusinta.iot.webrtc.v1.GatewayErrorCode code = 2;
150
+ */
151
+ code: GatewayErrorCode;
152
+
153
+ /**
154
+ * human-readable, for logs
155
+ *
156
+ * @generated from field: string message = 3;
157
+ */
158
+ message: string;
159
+ };
160
+
161
+ /**
162
+ * Describes the message kusinta.iot.webrtc.v1.RefusedSubscription.
163
+ * Use `create(RefusedSubscriptionSchema)` to create a new message.
164
+ */
165
+ export declare const RefusedSubscriptionSchema: GenMessage<RefusedSubscription>;
166
+
167
+ /**
168
+ * Answer to SubscribeDevices / UnsubscribeDevices, gateway → app.
169
+ * `subscribed` is the effective set after the change, not a delta: an app that
170
+ * missed an ack or raced two requests re-syncs from it without reconnecting.
171
+ *
172
+ * @generated from message kusinta.iot.webrtc.v1.SubscriptionAck
173
+ */
174
+ export declare type SubscriptionAck = Message<"kusinta.iot.webrtc.v1.SubscriptionAck"> & {
175
+ /**
176
+ * AppMessage.message_id of the request
177
+ *
178
+ * @generated from field: string in_reply_to = 1;
179
+ */
180
+ inReplyTo: string;
181
+
182
+ /**
183
+ * @generated from field: repeated kusinta.iot.identity.v1.DeviceId subscribed = 2;
184
+ */
185
+ subscribed: DeviceId[];
186
+
187
+ /**
188
+ * @generated from field: repeated kusinta.iot.webrtc.v1.RefusedSubscription refused = 3;
189
+ */
190
+ refused: RefusedSubscription[];
191
+ };
192
+
193
+ /**
194
+ * Describes the message kusinta.iot.webrtc.v1.SubscriptionAck.
195
+ * Use `create(SubscriptionAckSchema)` to create a new message.
196
+ */
197
+ export declare const SubscriptionAckSchema: GenMessage<SubscriptionAck>;
198
+
67
199
  /**
68
200
  * @generated from message kusinta.iot.webrtc.v1.PropertyReadRequest
69
201
  */
@@ -91,7 +223,106 @@ export declare type PropertyReadRequest = Message<"kusinta.iot.webrtc.v1.Propert
91
223
  export declare const PropertyReadRequestSchema: GenMessage<PropertyReadRequest>;
92
224
 
93
225
  /**
94
- * GatewayMessage: gateway → Flutter app
226
+ * Session-level error, gateway → app. Mirrors connector.v1.GatewayError
227
+ * on the connector leg; kept separate because the two legs have different
228
+ * authorization semantics and this one has a closed code vocabulary.
229
+ *
230
+ * @generated from message kusinta.iot.webrtc.v1.GatewayError
231
+ */
232
+ export declare type GatewayError = Message<"kusinta.iot.webrtc.v1.GatewayError"> & {
233
+ /**
234
+ * @generated from field: kusinta.iot.webrtc.v1.GatewayErrorCode code = 1;
235
+ */
236
+ code: GatewayErrorCode;
237
+
238
+ /**
239
+ * human-readable, for logs — never rendered to a user
240
+ *
241
+ * @generated from field: string message = 2;
242
+ */
243
+ message: string;
244
+
245
+ /**
246
+ * structured detail, e.g. {"device_id": "therm-1"}
247
+ *
248
+ * @generated from field: map<string, string> metadata = 3;
249
+ */
250
+ metadata: { [key: string]: string };
251
+ };
252
+
253
+ /**
254
+ * Describes the message kusinta.iot.webrtc.v1.GatewayError.
255
+ * Use `create(GatewayErrorSchema)` to create a new message.
256
+ */
257
+ export declare const GatewayErrorSchema: GenMessage<GatewayError>;
258
+
259
+ /**
260
+ * Answer to a ManagementRequest, gateway → app. Lives here rather than beside the
261
+ * requests in management.proto because it carries GatewayError, which is declared
262
+ * in this file; the other direction would be an import cycle.
263
+ *
264
+ * Exactly one result arrives per request, correlated by in_reply_to. A refusal is
265
+ * an ordinary result, not a session-level error: a filing operation the caller may
266
+ * not perform says so and the session continues. Targets the caller cannot reach
267
+ * are refused as NOT_ENTITLED whether or not they exist, so no result here reveals
268
+ * which spaces or devices are out there.
269
+ *
270
+ * @generated from message kusinta.iot.webrtc.v1.ManagementResult
271
+ */
272
+ export declare type ManagementResult = Message<"kusinta.iot.webrtc.v1.ManagementResult"> & {
273
+ /**
274
+ * AppMessage.message_id of the request
275
+ *
276
+ * @generated from field: string in_reply_to = 1;
277
+ */
278
+ inReplyTo: string;
279
+
280
+ /**
281
+ * @generated from oneof kusinta.iot.webrtc.v1.ManagementResult.result
282
+ */
283
+ result: {
284
+ /**
285
+ * refused, or the request was malformed
286
+ *
287
+ * @generated from field: kusinta.iot.webrtc.v1.GatewayError error = 2;
288
+ */
289
+ value: GatewayError;
290
+ case: "error";
291
+ } | {
292
+ /**
293
+ * create_space, update_space
294
+ *
295
+ * @generated from field: kusinta.iot.space.v1.Space space = 3;
296
+ */
297
+ value: Space;
298
+ case: "space";
299
+ } | {
300
+ /**
301
+ * list_spaces
302
+ *
303
+ * @generated from field: kusinta.iot.webrtc.v1.SpaceTree space_tree = 4;
304
+ */
305
+ value: SpaceTree;
306
+ case: "spaceTree";
307
+ } | {
308
+ /**
309
+ * everything else
310
+ *
311
+ * @generated from field: kusinta.iot.webrtc.v1.ManagementAck ack = 5;
312
+ */
313
+ value: ManagementAck;
314
+ case: "ack";
315
+ } | { case: undefined; value?: undefined };
316
+ };
317
+
318
+ /**
319
+ * Describes the message kusinta.iot.webrtc.v1.ManagementResult.
320
+ * Use `create(ManagementResultSchema)` to create a new message.
321
+ */
322
+ export declare const ManagementResultSchema: GenMessage<ManagementResult>;
323
+
324
+ /**
325
+ * GatewayMessage: gateway → app
95
326
  *
96
327
  * @generated from message kusinta.iot.webrtc.v1.GatewayMessage
97
328
  */
@@ -135,18 +366,46 @@ export declare type GatewayMessage = Message<"kusinta.iot.webrtc.v1.GatewayMessa
135
366
  case: "commandResult";
136
367
  } | {
137
368
  /**
138
- * error description string
139
- *
140
- * @generated from field: string error = 7;
369
+ * @generated from field: kusinta.iot.webrtc.v1.Pong pong = 8;
370
+ */
371
+ value: Pong;
372
+ case: "pong";
373
+ } | {
374
+ /**
375
+ * @generated from field: kusinta.iot.webrtc.v1.HandshakeRejected handshake_rejected = 9;
376
+ */
377
+ value: HandshakeRejected;
378
+ case: "handshakeRejected";
379
+ } | {
380
+ /**
381
+ * @generated from field: kusinta.iot.webrtc.v1.GatewayError error = 10;
141
382
  */
142
- value: string;
383
+ value: GatewayError;
143
384
  case: "error";
144
385
  } | {
145
386
  /**
146
- * @generated from field: kusinta.iot.webrtc.v1.Pong pong = 8;
387
+ * @generated from field: kusinta.iot.webrtc.v1.SubscriptionAck subscription_ack = 11;
147
388
  */
148
- value: Pong;
149
- case: "pong";
389
+ value: SubscriptionAck;
390
+ case: "subscriptionAck";
391
+ } | {
392
+ /**
393
+ * @generated from field: kusinta.iot.webrtc.v1.DeviceAdded device_added = 12;
394
+ */
395
+ value: DeviceAdded;
396
+ case: "deviceAdded";
397
+ } | {
398
+ /**
399
+ * @generated from field: kusinta.iot.webrtc.v1.DeviceRemoved device_removed = 13;
400
+ */
401
+ value: DeviceRemoved;
402
+ case: "deviceRemoved";
403
+ } | {
404
+ /**
405
+ * @generated from field: kusinta.iot.webrtc.v1.ManagementResult management_result = 14;
406
+ */
407
+ value: ManagementResult;
408
+ case: "managementResult";
150
409
  } | { case: undefined; value?: undefined };
151
410
  };
152
411
 
@@ -157,7 +416,7 @@ export declare type GatewayMessage = Message<"kusinta.iot.webrtc.v1.GatewayMessa
157
416
  export declare const GatewayMessageSchema: GenMessage<GatewayMessage>;
158
417
 
159
418
  /**
160
- * AppMessage: Flutter app → gateway
419
+ * AppMessage: app → gateway
161
420
  *
162
421
  * @generated from message kusinta.iot.webrtc.v1.AppMessage
163
422
  */
@@ -199,6 +458,24 @@ export declare type AppMessage = Message<"kusinta.iot.webrtc.v1.AppMessage"> & {
199
458
  */
200
459
  value: Ping;
201
460
  case: "ping";
461
+ } | {
462
+ /**
463
+ * @generated from field: kusinta.iot.webrtc.v1.SubscribeDevices subscribe = 7;
464
+ */
465
+ value: SubscribeDevices;
466
+ case: "subscribe";
467
+ } | {
468
+ /**
469
+ * @generated from field: kusinta.iot.webrtc.v1.UnsubscribeDevices unsubscribe = 8;
470
+ */
471
+ value: UnsubscribeDevices;
472
+ case: "unsubscribe";
473
+ } | {
474
+ /**
475
+ * @generated from field: kusinta.iot.webrtc.v1.ManagementRequest management = 9;
476
+ */
477
+ value: ManagementRequest;
478
+ case: "management";
202
479
  } | { case: undefined; value?: undefined };
203
480
  };
204
481
 
@@ -208,3 +485,74 @@ export declare type AppMessage = Message<"kusinta.iot.webrtc.v1.AppMessage"> & {
208
485
  */
209
486
  export declare const AppMessageSchema: GenMessage<AppMessage>;
210
487
 
488
+ /**
489
+ * Machine-readable classification of a session-level gateway error, so the app
490
+ * can branch without string-matching a human sentence. Deliberately an enum here,
491
+ * unlike the free-form code on connector.v1.GatewayError: the app leg is versioned
492
+ * together with the gateway, and clients need an exhaustive switch.
493
+ *
494
+ * @generated from enum kusinta.iot.webrtc.v1.GatewayErrorCode
495
+ */
496
+ export enum GatewayErrorCode {
497
+ /**
498
+ * Sender did not set a code, or sent one this client's schema does not know.
499
+ *
500
+ * @generated from enum value: GATEWAY_ERROR_CODE_UNSPECIFIED = 0;
501
+ */
502
+ UNSPECIFIED = 0,
503
+
504
+ /**
505
+ * Permanent refusal — the user may not see or act on this. Stop asking, tell the user.
506
+ *
507
+ * @generated from enum value: GATEWAY_ERROR_CODE_NOT_ENTITLED = 1;
508
+ */
509
+ NOT_ENTITLED = 1,
510
+
511
+ /**
512
+ * The app sent something malformed. A client bug: log it, do not retry.
513
+ *
514
+ * @generated from enum value: GATEWAY_ERROR_CODE_INVALID_REQUEST = 2;
515
+ */
516
+ INVALID_REQUEST = 2,
517
+
518
+ /**
519
+ * Transient failure. Retrying is reasonable.
520
+ *
521
+ * @generated from enum value: GATEWAY_ERROR_CODE_UNAVAILABLE = 3;
522
+ */
523
+ UNAVAILABLE = 3,
524
+
525
+ /**
526
+ * Gateway-side fault. Not the app's doing; retry cautiously.
527
+ *
528
+ * @generated from enum value: GATEWAY_ERROR_CODE_INTERNAL = 4;
529
+ */
530
+ INTERNAL = 4,
531
+
532
+ /**
533
+ * The user already holds the maximum number of concurrent sessions this
534
+ * gateway will keep, and this attempt is refused. Permanent for this attempt:
535
+ * the limit does not clear on its own, so retrying is exactly the wrong
536
+ * response — the user must end another session first. Distinct from
537
+ * NOT_ENTITLED, which is a statement about what the user may see; this user
538
+ * may, they are simply already connected enough times.
539
+ *
540
+ * The limit itself is gateway configuration and deliberately not modelled
541
+ * here. GatewayError.message carries the specifics so a client can render
542
+ * something actionable.
543
+ *
544
+ * Rollout note: a client whose schema predates this value decodes it as
545
+ * UNSPECIFIED, which is retryable by design. Client handling must therefore
546
+ * ship before or with the gateway that emits it, and the gateway must close
547
+ * the session itself rather than rely on the client standing down.
548
+ *
549
+ * @generated from enum value: GATEWAY_ERROR_CODE_SESSION_LIMIT_REACHED = 5;
550
+ */
551
+ SESSION_LIMIT_REACHED = 5,
552
+ }
553
+
554
+ /**
555
+ * Describes the enum kusinta.iot.webrtc.v1.GatewayErrorCode.
556
+ */
557
+ export declare const GatewayErrorCodeSchema: GenEnum<GatewayErrorCode>;
558
+
@@ -1,19 +1,21 @@
1
- // @generated by protoc-gen-es v2.12.0 with parameter "target=js+dts"
1
+ // @generated by protoc-gen-es v2.12.0 with parameter "target=js+dts,import_extension=js"
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_identity_v1_identity } from "../../identity/v1/identity_pb";
8
- import { file_kusinta_iot_webrtc_v1_command } from "./command_pb";
9
- import { file_kusinta_iot_webrtc_v1_device_state } from "./device_state_pb";
10
- import { file_kusinta_iot_webrtc_v1_permission_push } from "./permission_push_pb";
7
+ import { file_kusinta_iot_identity_v1_identity } from "../../identity/v1/identity_pb.js";
8
+ import { file_kusinta_iot_space_v1_space } from "../../space/v1/space_pb.js";
9
+ import { file_kusinta_iot_webrtc_v1_command } from "./command_pb.js";
10
+ import { file_kusinta_iot_webrtc_v1_device_state } from "./device_state_pb.js";
11
+ import { file_kusinta_iot_webrtc_v1_management } from "./management_pb.js";
12
+ import { file_kusinta_iot_webrtc_v1_permission_push } from "./permission_push_pb.js";
11
13
 
12
14
  /**
13
15
  * Describes the file kusinta/iot/webrtc/v1/envelope.proto.
14
16
  */
15
17
  export const file_kusinta_iot_webrtc_v1_envelope = /*@__PURE__*/
16
- fileDesc("CiRrdXNpbnRhL2lvdC93ZWJydGMvdjEvZW52ZWxvcGUucHJvdG8SFWt1c2ludGEuaW90LndlYnJ0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lSAASNwoHY29tbWFuZBgEIAEoCzIkLmt1c2ludGEuaW90LndlYnJ0Yy52MS5EZXZpY2VDb21tYW5kSAASQgoMcmVhZF9yZXF1ZXN0GAUgASgLMioua3VzaW50YS5pb3Qud2VicnRjLnYxLlByb3BlcnR5UmVhZFJlcXVlc3RIABIrCgRwaW5nGAYgASgLMhsua3VzaW50YS5pb3Qud2VicnRjLnYxLlBpbmdIAEIJCgdwYXlsb2FkQgJIAWIGcHJvdG8z", [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]);
18
+ fileDesc("CiRrdXNpbnRhL2lvdC93ZWJydGMvdjEvZW52ZWxvcGUucHJvdG8SFWt1c2ludGEuaW90LndlYnJ0Yy52MSIGCgRQaW5nIgYKBFBvbmciIwoRSGFuZHNoYWtlUmVqZWN0ZWQSDgoGcmVhc29uGAEgASgJIlwKDEFwcEhhbmRzaGFrZRILCgNqd3QYASABKAkSPwoUc3Vic2NyaWJlX2RldmljZV9pZHMYAiADKAsyIS5rdXNpbnRhLmlvdC5pZGVudGl0eS52MS5EZXZpY2VJZCJJChBTdWJzY3JpYmVEZXZpY2VzEjUKCmRldmljZV9pZHMYASADKAsyIS5rdXNpbnRhLmlvdC5pZGVudGl0eS52MS5EZXZpY2VJZCJLChJVbnN1YnNjcmliZURldmljZXMSNQoKZGV2aWNlX2lkcxgBIAMoCzIhLmt1c2ludGEuaW90LmlkZW50aXR5LnYxLkRldmljZUlkIpMBChNSZWZ1c2VkU3Vic2NyaXB0aW9uEjQKCWRldmljZV9pZBgBIAEoCzIhLmt1c2ludGEuaW90LmlkZW50aXR5LnYxLkRldmljZUlkEjUKBGNvZGUYAiABKA4yJy5rdXNpbnRhLmlvdC53ZWJydGMudjEuR2F0ZXdheUVycm9yQ29kZRIPCgdtZXNzYWdlGAMgASgJIpoBCg9TdWJzY3JpcHRpb25BY2sSEwo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hha2UYAyABKAsyIy5rdXNpbnRhLmlvdC53ZWJydGMudjEuQXBwSGFuZHNoYWtlSAASNwoHY29tbWFuZBgEIAEoCzIkLmt1c2ludGEuaW90LndlYnJ0Yy52MS5EZXZpY2VDb21tYW5kSAASQgoMcmVhZF9yZXF1ZXN0GAUgASgLMioua3VzaW50YS5pb3Qud2VicnRjLnYxLlByb3BlcnR5UmVhZFJlcXVlc3RIABIrCgRwaW5nGAYgASgLMhsua3VzaW50YS5pb3Qud2VicnRjLnYxLlBpbmdIABI8CglzdWJzY3JpYmUYByABKAsyJy5rdXNpbnRhLmlvdC53ZWJydGMudjEuU3Vic2NyaWJlRGV2aWNlc0gAEkAKC3Vuc3Vic2NyaWJlGAggASgLMikua3VzaW50YS5pb3Qud2VicnRjLnYxLlVuc3Vic2NyaWJlRGV2aWNlc0gAEj4KCm1hbmFnZW1lbnQYCSABKAsyKC5rdXNpbnRhLmlvdC53ZWJydGMudjEuTWFuYWdlbWVudFJlcXVlc3RIAEIJCgdwYXlsb2FkKvYBChBHYXRld2F5RXJyb3JDb2RlEiIKHkdBVEVXQVlfRVJST1JfQ09ERV9VTlNQRUNJRklFRBAAEiMKH0dBVEVXQVlfRVJST1JfQ09ERV9OT1RfRU5USVRMRUQQARImCiJHQVRFV0FZX0VSUk9SX0NPREVfSU5WQUxJRF9SRVFVRVNUEAISIgoeR0FURVdBWV9FUlJPUl9DT0RFX1VOQVZBSUxBQkxFEAMSHwobR0FURVdBWV9FUlJPUl9DT0RFX0lOVEVSTkFMEAQSLAooR0FURVdBWV9FUlJPUl9DT0RFX1NFU1NJT05fTElNSVRfUkVBQ0hFRBAFQgJIAWIGcHJvdG8z", [file_google_protobuf_timestamp, 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
19
 
18
20
  /**
19
21
  * Describes the message kusinta.iot.webrtc.v1.Ping.
@@ -29,31 +31,97 @@ export const PingSchema = /*@__PURE__*/
29
31
  export const PongSchema = /*@__PURE__*/
30
32
  messageDesc(file_kusinta_iot_webrtc_v1_envelope, 1);
31
33
 
34
+ /**
35
+ * Describes the message kusinta.iot.webrtc.v1.HandshakeRejected.
36
+ * Use `create(HandshakeRejectedSchema)` to create a new message.
37
+ */
38
+ export const HandshakeRejectedSchema = /*@__PURE__*/
39
+ messageDesc(file_kusinta_iot_webrtc_v1_envelope, 2);
40
+
32
41
  /**
33
42
  * Describes the message kusinta.iot.webrtc.v1.AppHandshake.
34
43
  * Use `create(AppHandshakeSchema)` to create a new message.
35
44
  */
36
45
  export const AppHandshakeSchema = /*@__PURE__*/
37
- messageDesc(file_kusinta_iot_webrtc_v1_envelope, 2);
46
+ messageDesc(file_kusinta_iot_webrtc_v1_envelope, 3);
47
+
48
+ /**
49
+ * Describes the message kusinta.iot.webrtc.v1.SubscribeDevices.
50
+ * Use `create(SubscribeDevicesSchema)` to create a new message.
51
+ */
52
+ export const SubscribeDevicesSchema = /*@__PURE__*/
53
+ messageDesc(file_kusinta_iot_webrtc_v1_envelope, 4);
54
+
55
+ /**
56
+ * Describes the message kusinta.iot.webrtc.v1.UnsubscribeDevices.
57
+ * Use `create(UnsubscribeDevicesSchema)` to create a new message.
58
+ */
59
+ export const UnsubscribeDevicesSchema = /*@__PURE__*/
60
+ messageDesc(file_kusinta_iot_webrtc_v1_envelope, 5);
61
+
62
+ /**
63
+ * Describes the message kusinta.iot.webrtc.v1.RefusedSubscription.
64
+ * Use `create(RefusedSubscriptionSchema)` to create a new message.
65
+ */
66
+ export const RefusedSubscriptionSchema = /*@__PURE__*/
67
+ messageDesc(file_kusinta_iot_webrtc_v1_envelope, 6);
68
+
69
+ /**
70
+ * Describes the message kusinta.iot.webrtc.v1.SubscriptionAck.
71
+ * Use `create(SubscriptionAckSchema)` to create a new message.
72
+ */
73
+ export const SubscriptionAckSchema = /*@__PURE__*/
74
+ messageDesc(file_kusinta_iot_webrtc_v1_envelope, 7);
38
75
 
39
76
  /**
40
77
  * Describes the message kusinta.iot.webrtc.v1.PropertyReadRequest.
41
78
  * Use `create(PropertyReadRequestSchema)` to create a new message.
42
79
  */
43
80
  export const PropertyReadRequestSchema = /*@__PURE__*/
44
- messageDesc(file_kusinta_iot_webrtc_v1_envelope, 3);
81
+ messageDesc(file_kusinta_iot_webrtc_v1_envelope, 8);
82
+
83
+ /**
84
+ * Describes the message kusinta.iot.webrtc.v1.GatewayError.
85
+ * Use `create(GatewayErrorSchema)` to create a new message.
86
+ */
87
+ export const GatewayErrorSchema = /*@__PURE__*/
88
+ messageDesc(file_kusinta_iot_webrtc_v1_envelope, 9);
89
+
90
+ /**
91
+ * Describes the message kusinta.iot.webrtc.v1.ManagementResult.
92
+ * Use `create(ManagementResultSchema)` to create a new message.
93
+ */
94
+ export const ManagementResultSchema = /*@__PURE__*/
95
+ messageDesc(file_kusinta_iot_webrtc_v1_envelope, 10);
45
96
 
46
97
  /**
47
98
  * Describes the message kusinta.iot.webrtc.v1.GatewayMessage.
48
99
  * Use `create(GatewayMessageSchema)` to create a new message.
49
100
  */
50
101
  export const GatewayMessageSchema = /*@__PURE__*/
51
- messageDesc(file_kusinta_iot_webrtc_v1_envelope, 4);
102
+ messageDesc(file_kusinta_iot_webrtc_v1_envelope, 11);
52
103
 
53
104
  /**
54
105
  * Describes the message kusinta.iot.webrtc.v1.AppMessage.
55
106
  * Use `create(AppMessageSchema)` to create a new message.
56
107
  */
57
108
  export const AppMessageSchema = /*@__PURE__*/
58
- messageDesc(file_kusinta_iot_webrtc_v1_envelope, 5);
109
+ messageDesc(file_kusinta_iot_webrtc_v1_envelope, 12);
110
+
111
+ /**
112
+ * Describes the enum kusinta.iot.webrtc.v1.GatewayErrorCode.
113
+ */
114
+ export const GatewayErrorCodeSchema = /*@__PURE__*/
115
+ enumDesc(file_kusinta_iot_webrtc_v1_envelope, 0);
116
+
117
+ /**
118
+ * Machine-readable classification of a session-level gateway error, so the app
119
+ * can branch without string-matching a human sentence. Deliberately an enum here,
120
+ * unlike the free-form code on connector.v1.GatewayError: the app leg is versioned
121
+ * together with the gateway, and clients need an exhaustive switch.
122
+ *
123
+ * @generated from enum kusinta.iot.webrtc.v1.GatewayErrorCode
124
+ */
125
+ export const GatewayErrorCode = /*@__PURE__*/
126
+ tsEnum(GatewayErrorCodeSchema);
59
127