@kusinta/iot-schema 0.1.0-beta.17 → 0.1.0-beta.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kusinta/iot-schema",
3
- "version": "0.1.0-beta.17",
3
+ "version": "0.1.0-beta.18",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "files": ["src"],
@@ -113,11 +113,25 @@ export declare type Device = Message<"kusinta.iot.device.v1.Device"> & {
113
113
  } | { case: undefined; value?: undefined };
114
114
 
115
115
  /**
116
+ * When the gateway last had evidence this device exists and is reachable — the
117
+ * most recent PropertyUpdate, announcement, or command result concerning it.
118
+ * Gateway-observed, not connector-reported: no message on either leg carries a
119
+ * per-device liveness timestamp, so this is as precise as the device's own report
120
+ * interval. A device that reports every 15 minutes looks stale for 15 minutes.
121
+ *
122
+ * Survives a connector reconnect. Losing the route to a device is not evidence the
123
+ * device is gone, so last_seen keeps its value; only fresh evidence advances it.
124
+ *
125
+ * Advisory, for showing staleness in a UI. It is not a removal signal — that is
126
+ * webrtc.v1.DeviceRemoved, sent only when a connector reports the device gone.
127
+ *
116
128
  * @generated from field: google.protobuf.Timestamp last_seen = 20;
117
129
  */
118
130
  lastSeen?: Timestamp | undefined;
119
131
 
120
132
  /**
133
+ * When any field of this Device last changed value.
134
+ *
121
135
  * @generated from field: google.protobuf.Timestamp last_updated = 21;
122
136
  */
123
137
  lastUpdated?: Timestamp | undefined;
@@ -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.
@@ -65,3 +66,65 @@ export declare type DevicePropertyEvent = Message<"kusinta.iot.webrtc.v1.DeviceP
65
66
  */
66
67
  export declare const DevicePropertyEventSchema: GenMessage<DevicePropertyEvent>;
67
68
 
69
+ /**
70
+ * A device appeared while the app was connected — the app leg's counterpart to
71
+ * connector.v1.DeviceAnnouncement, which the gateway can currently only drop.
72
+ *
73
+ * Carries the full Device, descriptor plus current typed properties, so the app can
74
+ * render it without a follow-up read — the same payload DeviceStateSnapshot gives
75
+ * per device.
76
+ *
77
+ * Apply as an upsert keyed on descriptor.device_id, never as an insert: a device can
78
+ * be in the snapshot and then announced, or announced twice across a connector
79
+ * reconnect.
80
+ *
81
+ * Discovery, not interest. Being told a device exists does not subscribe the app to
82
+ * it — that still takes AppMessage.subscribe. The gateway sends this only for devices
83
+ * the user is entitled to see; an unfiltered announcement would be a device
84
+ * enumeration channel.
85
+ *
86
+ * @generated from message kusinta.iot.webrtc.v1.DeviceAdded
87
+ */
88
+ export declare type DeviceAdded = Message<"kusinta.iot.webrtc.v1.DeviceAdded"> & {
89
+ /**
90
+ * @generated from field: kusinta.iot.device.v1.Device device = 1;
91
+ */
92
+ device?: Device | undefined;
93
+ };
94
+
95
+ /**
96
+ * Describes the message kusinta.iot.webrtc.v1.DeviceAdded.
97
+ * Use `create(DeviceAddedSchema)` to create a new message.
98
+ */
99
+ export declare const DeviceAddedSchema: GenMessage<DeviceAdded>;
100
+
101
+ /**
102
+ * A device is gone, because its connector said so via connector.v1.DeviceRemoval.
103
+ *
104
+ * A connector disconnecting is NOT a removal: an ordinary reconnect wipes the
105
+ * device→connector route while every device still exists, and treating that as a
106
+ * removal makes the whole UI flap. Unreachability is a separate signal — read
107
+ * device.v1.Device.last_seen for that.
108
+ *
109
+ * @generated from message kusinta.iot.webrtc.v1.DeviceRemoved
110
+ */
111
+ export declare type DeviceRemoved = Message<"kusinta.iot.webrtc.v1.DeviceRemoved"> & {
112
+ /**
113
+ * @generated from field: kusinta.iot.identity.v1.DeviceId device_id = 1;
114
+ */
115
+ deviceId?: DeviceId | undefined;
116
+
117
+ /**
118
+ * passed through from the connector, for logs
119
+ *
120
+ * @generated from field: string reason = 2;
121
+ */
122
+ reason: string;
123
+ };
124
+
125
+ /**
126
+ * Describes the message kusinta.iot.webrtc.v1.DeviceRemoved.
127
+ * Use `create(DeviceRemovedSchema)` to create a new message.
128
+ */
129
+ export declare const DeviceRemovedSchema: GenMessage<DeviceRemoved>;
130
+
@@ -7,12 +7,13 @@ import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
7
7
  import { file_kusinta_iot_device_v1_device } from "../../device/v1/device_pb.js";
8
8
  import { file_kusinta_iot_device_v1_property_update } from "../../device/v1/property_update_pb.js";
9
9
  import { file_kusinta_iot_access_v1_acl } from "../../access/v1/acl_pb.js";
10
+ import { file_kusinta_iot_identity_v1_identity } from "../../identity/v1/identity_pb.js";
10
11
 
11
12
  /**
12
13
  * Describes the file kusinta/iot/webrtc/v1/device_state.proto.
13
14
  */
14
15
  export const file_kusinta_iot_webrtc_v1_device_state = /*@__PURE__*/
15
- fileDesc("CihrdXNpbnRhL2lvdC93ZWJydGMvdjEvZGV2aWNlX3N0YXRlLnByb3RvEhVrdXNpbnRhLmlvdC53ZWJydGMudjEiuwEKE0RldmljZVN0YXRlU25hcHNob3QSLgoHZGV2aWNlcxgBIAMoCzIdLmt1c2ludGEuaW90LmRldmljZS52MS5EZXZpY2USQAoLcGVybWlzc2lvbnMYAiABKAsyKy5rdXNpbnRhLmlvdC5hY2Nlc3MudjEuRWZmZWN0aXZlUGVybWlzc2lvbnMSMgoOc25hcHNob3R0ZWRfYXQYAyABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wIoYBChNEZXZpY2VQcm9wZXJ0eUV2ZW50EjUKBnVwZGF0ZRgBIAEoCzIlLmt1c2ludGEuaW90LmRldmljZS52MS5Qcm9wZXJ0eVVwZGF0ZRI4ChRnYXRld2F5X3Byb2Nlc3NlZF9hdBgCIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCAkgBYgZwcm90bzM", [file_google_protobuf_timestamp, file_kusinta_iot_device_v1_device, file_kusinta_iot_device_v1_property_update, file_kusinta_iot_access_v1_acl]);
16
+ fileDesc("CihrdXNpbnRhL2lvdC93ZWJydGMvdjEvZGV2aWNlX3N0YXRlLnByb3RvEhVrdXNpbnRhLmlvdC53ZWJydGMudjEiuwEKE0RldmljZVN0YXRlU25hcHNob3QSLgoHZGV2aWNlcxgBIAMoCzIdLmt1c2ludGEuaW90LmRldmljZS52MS5EZXZpY2USQAoLcGVybWlzc2lvbnMYAiABKAsyKy5rdXNpbnRhLmlvdC5hY2Nlc3MudjEuRWZmZWN0aXZlUGVybWlzc2lvbnMSMgoOc25hcHNob3R0ZWRfYXQYAyABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wIoYBChNEZXZpY2VQcm9wZXJ0eUV2ZW50EjUKBnVwZGF0ZRgBIAEoCzIlLmt1c2ludGEuaW90LmRldmljZS52MS5Qcm9wZXJ0eVVwZGF0ZRI4ChRnYXRld2F5X3Byb2Nlc3NlZF9hdBgCIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXAiPAoLRGV2aWNlQWRkZWQSLQoGZGV2aWNlGAEgASgLMh0ua3VzaW50YS5pb3QuZGV2aWNlLnYxLkRldmljZSJVCg1EZXZpY2VSZW1vdmVkEjQKCWRldmljZV9pZBgBIAEoCzIhLmt1c2ludGEuaW90LmlkZW50aXR5LnYxLkRldmljZUlkEg4KBnJlYXNvbhgCIAEoCUICSAFiBnByb3RvMw", [file_google_protobuf_timestamp, file_kusinta_iot_device_v1_device, file_kusinta_iot_device_v1_property_update, file_kusinta_iot_access_v1_acl, file_kusinta_iot_identity_v1_identity]);
16
17
 
17
18
  /**
18
19
  * Describes the message kusinta.iot.webrtc.v1.DeviceStateSnapshot.
@@ -28,3 +29,17 @@ export const DeviceStateSnapshotSchema = /*@__PURE__*/
28
29
  export const DevicePropertyEventSchema = /*@__PURE__*/
29
30
  messageDesc(file_kusinta_iot_webrtc_v1_device_state, 1);
30
31
 
32
+ /**
33
+ * Describes the message kusinta.iot.webrtc.v1.DeviceAdded.
34
+ * Use `create(DeviceAddedSchema)` to create a new message.
35
+ */
36
+ export const DeviceAddedSchema = /*@__PURE__*/
37
+ messageDesc(file_kusinta_iot_webrtc_v1_device_state, 2);
38
+
39
+ /**
40
+ * Describes the message kusinta.iot.webrtc.v1.DeviceRemoved.
41
+ * Use `create(DeviceRemovedSchema)` to create a new message.
42
+ */
43
+ export const DeviceRemovedSchema = /*@__PURE__*/
44
+ messageDesc(file_kusinta_iot_webrtc_v1_device_state, 3);
45
+
@@ -2,11 +2,11 @@
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
8
  import type { Timestamp } from "@bufbuild/protobuf/wkt";
9
- import type { DevicePropertyEvent, DeviceStateSnapshot } from "./device_state_pb.js";
9
+ import type { DeviceAdded, DevicePropertyEvent, DeviceRemoved, DeviceStateSnapshot } from "./device_state_pb.js";
10
10
  import type { LivePermissionUpdate } from "./permission_push_pb.js";
11
11
  import type { CommandResult, DeviceCommand } from "./command_pb.js";
12
12
 
@@ -73,6 +73,12 @@ export declare type AppHandshake = Message<"kusinta.iot.webrtc.v1.AppHandshake">
73
73
  jwt: string;
74
74
 
75
75
  /**
76
+ * Initial interest set — an optimisation that saves one round trip, equivalent to
77
+ * sending SubscribeDevices immediately after the handshake. Interest only: naming
78
+ * an id here does not entitle the app to it, and ids the user may not see are
79
+ * refused in the SubscriptionAck that follows. Not the only mechanism — the set is
80
+ * revisable mid-session via AppMessage.subscribe / .unsubscribe.
81
+ *
76
82
  * @generated from field: repeated kusinta.iot.identity.v1.DeviceId subscribe_device_ids = 2;
77
83
  */
78
84
  subscribeDeviceIds: DeviceId[];
@@ -84,6 +90,110 @@ export declare type AppHandshake = Message<"kusinta.iot.webrtc.v1.AppHandshake">
84
90
  */
85
91
  export declare const AppHandshakeSchema: GenMessage<AppHandshake>;
86
92
 
93
+ /**
94
+ * Adds device_ids to what the app wants streamed. Interest, never entitlement:
95
+ * the gateway intersects the request with what the user is permitted to see and
96
+ * reports what it declined in SubscriptionAck.refused. Additive — ids already in
97
+ * the set are a no-op, so a retry after a dropped ack is safe.
98
+ *
99
+ * @generated from message kusinta.iot.webrtc.v1.SubscribeDevices
100
+ */
101
+ export declare type SubscribeDevices = Message<"kusinta.iot.webrtc.v1.SubscribeDevices"> & {
102
+ /**
103
+ * @generated from field: repeated kusinta.iot.identity.v1.DeviceId device_ids = 1;
104
+ */
105
+ deviceIds: DeviceId[];
106
+ };
107
+
108
+ /**
109
+ * Describes the message kusinta.iot.webrtc.v1.SubscribeDevices.
110
+ * Use `create(SubscribeDevicesSchema)` to create a new message.
111
+ */
112
+ export declare const SubscribeDevicesSchema: GenMessage<SubscribeDevices>;
113
+
114
+ /**
115
+ * Removes device_ids from what the app wants streamed. Removing an id the app is
116
+ * not subscribed to is a no-op, not an error.
117
+ *
118
+ * @generated from message kusinta.iot.webrtc.v1.UnsubscribeDevices
119
+ */
120
+ export declare type UnsubscribeDevices = Message<"kusinta.iot.webrtc.v1.UnsubscribeDevices"> & {
121
+ /**
122
+ * @generated from field: repeated kusinta.iot.identity.v1.DeviceId device_ids = 1;
123
+ */
124
+ deviceIds: DeviceId[];
125
+ };
126
+
127
+ /**
128
+ * Describes the message kusinta.iot.webrtc.v1.UnsubscribeDevices.
129
+ * Use `create(UnsubscribeDevicesSchema)` to create a new message.
130
+ */
131
+ export declare const UnsubscribeDevicesSchema: GenMessage<UnsubscribeDevices>;
132
+
133
+ /**
134
+ * A device the gateway declined to add to the interest set. Ids the gateway does
135
+ * not know are refused as NOT_ENTITLED rather than a distinct not-found code, so
136
+ * the ack cannot be used to enumerate devices the user may not see.
137
+ *
138
+ * @generated from message kusinta.iot.webrtc.v1.RefusedSubscription
139
+ */
140
+ export declare type RefusedSubscription = Message<"kusinta.iot.webrtc.v1.RefusedSubscription"> & {
141
+ /**
142
+ * @generated from field: kusinta.iot.identity.v1.DeviceId device_id = 1;
143
+ */
144
+ deviceId?: DeviceId | undefined;
145
+
146
+ /**
147
+ * @generated from field: kusinta.iot.webrtc.v1.GatewayErrorCode code = 2;
148
+ */
149
+ code: GatewayErrorCode;
150
+
151
+ /**
152
+ * human-readable, for logs
153
+ *
154
+ * @generated from field: string message = 3;
155
+ */
156
+ message: string;
157
+ };
158
+
159
+ /**
160
+ * Describes the message kusinta.iot.webrtc.v1.RefusedSubscription.
161
+ * Use `create(RefusedSubscriptionSchema)` to create a new message.
162
+ */
163
+ export declare const RefusedSubscriptionSchema: GenMessage<RefusedSubscription>;
164
+
165
+ /**
166
+ * Answer to SubscribeDevices / UnsubscribeDevices, gateway → Flutter app.
167
+ * `subscribed` is the effective set after the change, not a delta: an app that
168
+ * missed an ack or raced two requests re-syncs from it without reconnecting.
169
+ *
170
+ * @generated from message kusinta.iot.webrtc.v1.SubscriptionAck
171
+ */
172
+ export declare type SubscriptionAck = Message<"kusinta.iot.webrtc.v1.SubscriptionAck"> & {
173
+ /**
174
+ * AppMessage.message_id of the request
175
+ *
176
+ * @generated from field: string in_reply_to = 1;
177
+ */
178
+ inReplyTo: string;
179
+
180
+ /**
181
+ * @generated from field: repeated kusinta.iot.identity.v1.DeviceId subscribed = 2;
182
+ */
183
+ subscribed: DeviceId[];
184
+
185
+ /**
186
+ * @generated from field: repeated kusinta.iot.webrtc.v1.RefusedSubscription refused = 3;
187
+ */
188
+ refused: RefusedSubscription[];
189
+ };
190
+
191
+ /**
192
+ * Describes the message kusinta.iot.webrtc.v1.SubscriptionAck.
193
+ * Use `create(SubscriptionAckSchema)` to create a new message.
194
+ */
195
+ export declare const SubscriptionAckSchema: GenMessage<SubscriptionAck>;
196
+
87
197
  /**
88
198
  * @generated from message kusinta.iot.webrtc.v1.PropertyReadRequest
89
199
  */
@@ -110,6 +220,40 @@ export declare type PropertyReadRequest = Message<"kusinta.iot.webrtc.v1.Propert
110
220
  */
111
221
  export declare const PropertyReadRequestSchema: GenMessage<PropertyReadRequest>;
112
222
 
223
+ /**
224
+ * Session-level error, gateway → Flutter app. Mirrors connector.v1.GatewayError
225
+ * on the connector leg; kept separate because the two legs have different
226
+ * authorization semantics and this one has a closed code vocabulary.
227
+ *
228
+ * @generated from message kusinta.iot.webrtc.v1.GatewayError
229
+ */
230
+ export declare type GatewayError = Message<"kusinta.iot.webrtc.v1.GatewayError"> & {
231
+ /**
232
+ * @generated from field: kusinta.iot.webrtc.v1.GatewayErrorCode code = 1;
233
+ */
234
+ code: GatewayErrorCode;
235
+
236
+ /**
237
+ * human-readable, for logs — never rendered to a user
238
+ *
239
+ * @generated from field: string message = 2;
240
+ */
241
+ message: string;
242
+
243
+ /**
244
+ * structured detail, e.g. {"device_id": "therm-1"}
245
+ *
246
+ * @generated from field: map<string, string> metadata = 3;
247
+ */
248
+ metadata: { [key: string]: string };
249
+ };
250
+
251
+ /**
252
+ * Describes the message kusinta.iot.webrtc.v1.GatewayError.
253
+ * Use `create(GatewayErrorSchema)` to create a new message.
254
+ */
255
+ export declare const GatewayErrorSchema: GenMessage<GatewayError>;
256
+
113
257
  /**
114
258
  * GatewayMessage: gateway → Flutter app
115
259
  *
@@ -153,14 +297,6 @@ export declare type GatewayMessage = Message<"kusinta.iot.webrtc.v1.GatewayMessa
153
297
  */
154
298
  value: CommandResult;
155
299
  case: "commandResult";
156
- } | {
157
- /**
158
- * error description string
159
- *
160
- * @generated from field: string error = 7;
161
- */
162
- value: string;
163
- case: "error";
164
300
  } | {
165
301
  /**
166
302
  * @generated from field: kusinta.iot.webrtc.v1.Pong pong = 8;
@@ -173,6 +309,30 @@ export declare type GatewayMessage = Message<"kusinta.iot.webrtc.v1.GatewayMessa
173
309
  */
174
310
  value: HandshakeRejected;
175
311
  case: "handshakeRejected";
312
+ } | {
313
+ /**
314
+ * @generated from field: kusinta.iot.webrtc.v1.GatewayError error = 10;
315
+ */
316
+ value: GatewayError;
317
+ case: "error";
318
+ } | {
319
+ /**
320
+ * @generated from field: kusinta.iot.webrtc.v1.SubscriptionAck subscription_ack = 11;
321
+ */
322
+ value: SubscriptionAck;
323
+ case: "subscriptionAck";
324
+ } | {
325
+ /**
326
+ * @generated from field: kusinta.iot.webrtc.v1.DeviceAdded device_added = 12;
327
+ */
328
+ value: DeviceAdded;
329
+ case: "deviceAdded";
330
+ } | {
331
+ /**
332
+ * @generated from field: kusinta.iot.webrtc.v1.DeviceRemoved device_removed = 13;
333
+ */
334
+ value: DeviceRemoved;
335
+ case: "deviceRemoved";
176
336
  } | { case: undefined; value?: undefined };
177
337
  };
178
338
 
@@ -225,6 +385,18 @@ export declare type AppMessage = Message<"kusinta.iot.webrtc.v1.AppMessage"> & {
225
385
  */
226
386
  value: Ping;
227
387
  case: "ping";
388
+ } | {
389
+ /**
390
+ * @generated from field: kusinta.iot.webrtc.v1.SubscribeDevices subscribe = 7;
391
+ */
392
+ value: SubscribeDevices;
393
+ case: "subscribe";
394
+ } | {
395
+ /**
396
+ * @generated from field: kusinta.iot.webrtc.v1.UnsubscribeDevices unsubscribe = 8;
397
+ */
398
+ value: UnsubscribeDevices;
399
+ case: "unsubscribe";
228
400
  } | { case: undefined; value?: undefined };
229
401
  };
230
402
 
@@ -234,3 +406,53 @@ export declare type AppMessage = Message<"kusinta.iot.webrtc.v1.AppMessage"> & {
234
406
  */
235
407
  export declare const AppMessageSchema: GenMessage<AppMessage>;
236
408
 
409
+ /**
410
+ * Machine-readable classification of a session-level gateway error, so the app
411
+ * can branch without string-matching a human sentence. Deliberately an enum here,
412
+ * unlike the free-form code on connector.v1.GatewayError: the app leg is versioned
413
+ * together with the gateway, and clients need an exhaustive switch.
414
+ *
415
+ * @generated from enum kusinta.iot.webrtc.v1.GatewayErrorCode
416
+ */
417
+ export enum GatewayErrorCode {
418
+ /**
419
+ * Sender did not set a code, or sent one this client's schema does not know.
420
+ *
421
+ * @generated from enum value: GATEWAY_ERROR_CODE_UNSPECIFIED = 0;
422
+ */
423
+ UNSPECIFIED = 0,
424
+
425
+ /**
426
+ * Permanent refusal — the user may not see or act on this. Stop asking, tell the user.
427
+ *
428
+ * @generated from enum value: GATEWAY_ERROR_CODE_NOT_ENTITLED = 1;
429
+ */
430
+ NOT_ENTITLED = 1,
431
+
432
+ /**
433
+ * The app sent something malformed. A client bug: log it, do not retry.
434
+ *
435
+ * @generated from enum value: GATEWAY_ERROR_CODE_INVALID_REQUEST = 2;
436
+ */
437
+ INVALID_REQUEST = 2,
438
+
439
+ /**
440
+ * Transient failure. Retrying is reasonable.
441
+ *
442
+ * @generated from enum value: GATEWAY_ERROR_CODE_UNAVAILABLE = 3;
443
+ */
444
+ UNAVAILABLE = 3,
445
+
446
+ /**
447
+ * Gateway-side fault. Not the app's doing; retry cautiously.
448
+ *
449
+ * @generated from enum value: GATEWAY_ERROR_CODE_INTERNAL = 4;
450
+ */
451
+ INTERNAL = 4,
452
+ }
453
+
454
+ /**
455
+ * Describes the enum kusinta.iot.webrtc.v1.GatewayErrorCode.
456
+ */
457
+ export declare const GatewayErrorCodeSchema: GenEnum<GatewayErrorCode>;
458
+
@@ -2,7 +2,7 @@
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
7
  import { file_kusinta_iot_identity_v1_identity } from "../../identity/v1/identity_pb.js";
8
8
  import { file_kusinta_iot_webrtc_v1_command } from "./command_pb.js";
@@ -13,7 +13,7 @@ import { file_kusinta_iot_webrtc_v1_permission_push } from "./permission_push_pb
13
13
  * Describes the file kusinta/iot/webrtc/v1/envelope.proto.
14
14
  */
15
15
  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]);
16
+ fileDesc("CiRrdXNpbnRhL2lvdC93ZWJydGMvdjEvZW52ZWxvcGUucHJvdG8SFWt1c2ludGEuaW90LndlYnJ0Yy52MSIGCgRQaW5nIgYKBFBvbmciIwoRSGFuZHNoYWtlUmVqZWN0ZWQSDgoGcmVhc29uGAEgASgJIlwKDEFwcEhhbmRzaGFrZRILCgNqd3QYASABKAkSPwoUc3Vic2NyaWJlX2RldmljZV9pZHMYAiADKAsyIS5rdXNpbnRhLmlvdC5pZGVudGl0eS52MS5EZXZpY2VJZCJJChBTdWJzY3JpYmVE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YnJ0Yy52MS5BcHBIYW5kc2hha2VIABI3Cgdjb21tYW5kGAQgASgLMiQua3VzaW50YS5pb3Qud2VicnRjLnYxLkRldmljZUNvbW1hbmRIABJCCgxyZWFkX3JlcXVlc3QYBSABKAsyKi5rdXNpbnRhLmlvdC53ZWJydGMudjEuUHJvcGVydHlSZWFkUmVxdWVzdEgAEisKBHBpbmcYBiABKAsyGy5rdXNpbnRhLmlvdC53ZWJydGMudjEuUGluZ0gAEjwKCXN1YnNjcmliZRgHIAEoCzInLmt1c2ludGEuaW90LndlYnJ0Yy52MS5TdWJzY3JpYmVEZXZpY2VzSAASQAoLdW5zdWJzY3JpYmUYCCABKAsyKS5rdXNpbnRhLmlvdC53ZWJydGMudjEuVW5zdWJzY3JpYmVEZXZpY2VzSABCCQoHcGF5bG9hZCrIAQoQR2F0ZXdheUVycm9yQ29kZRIiCh5HQVRFV0FZX0VSUk9SX0NPREVfVU5TUEVDSUZJRUQQABIjCh9HQVRFV0FZX0VSUk9SX0NPREVfTk9UX0VOVElUTEVEEAESJgoiR0FURVdBWV9FUlJPUl9DT0RFX0lOVkFMSURfUkVRVUVTVBACEiIKHkdBVEVXQVlfRVJST1JfQ09ERV9VTkFWQUlMQUJMRRADEh8KG0dBVEVXQVlfRVJST1JfQ09ERV9JTlRFUk5BTBAEQgJIAWIGcHJvdG8z", [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]);
17
17
 
18
18
  /**
19
19
  * Describes the message kusinta.iot.webrtc.v1.Ping.
@@ -43,24 +43,76 @@ export const HandshakeRejectedSchema = /*@__PURE__*/
43
43
  export const AppHandshakeSchema = /*@__PURE__*/
44
44
  messageDesc(file_kusinta_iot_webrtc_v1_envelope, 3);
45
45
 
46
+ /**
47
+ * Describes the message kusinta.iot.webrtc.v1.SubscribeDevices.
48
+ * Use `create(SubscribeDevicesSchema)` to create a new message.
49
+ */
50
+ export const SubscribeDevicesSchema = /*@__PURE__*/
51
+ messageDesc(file_kusinta_iot_webrtc_v1_envelope, 4);
52
+
53
+ /**
54
+ * Describes the message kusinta.iot.webrtc.v1.UnsubscribeDevices.
55
+ * Use `create(UnsubscribeDevicesSchema)` to create a new message.
56
+ */
57
+ export const UnsubscribeDevicesSchema = /*@__PURE__*/
58
+ messageDesc(file_kusinta_iot_webrtc_v1_envelope, 5);
59
+
60
+ /**
61
+ * Describes the message kusinta.iot.webrtc.v1.RefusedSubscription.
62
+ * Use `create(RefusedSubscriptionSchema)` to create a new message.
63
+ */
64
+ export const RefusedSubscriptionSchema = /*@__PURE__*/
65
+ messageDesc(file_kusinta_iot_webrtc_v1_envelope, 6);
66
+
67
+ /**
68
+ * Describes the message kusinta.iot.webrtc.v1.SubscriptionAck.
69
+ * Use `create(SubscriptionAckSchema)` to create a new message.
70
+ */
71
+ export const SubscriptionAckSchema = /*@__PURE__*/
72
+ messageDesc(file_kusinta_iot_webrtc_v1_envelope, 7);
73
+
46
74
  /**
47
75
  * Describes the message kusinta.iot.webrtc.v1.PropertyReadRequest.
48
76
  * Use `create(PropertyReadRequestSchema)` to create a new message.
49
77
  */
50
78
  export const PropertyReadRequestSchema = /*@__PURE__*/
51
- messageDesc(file_kusinta_iot_webrtc_v1_envelope, 4);
79
+ messageDesc(file_kusinta_iot_webrtc_v1_envelope, 8);
80
+
81
+ /**
82
+ * Describes the message kusinta.iot.webrtc.v1.GatewayError.
83
+ * Use `create(GatewayErrorSchema)` to create a new message.
84
+ */
85
+ export const GatewayErrorSchema = /*@__PURE__*/
86
+ messageDesc(file_kusinta_iot_webrtc_v1_envelope, 9);
52
87
 
53
88
  /**
54
89
  * Describes the message kusinta.iot.webrtc.v1.GatewayMessage.
55
90
  * Use `create(GatewayMessageSchema)` to create a new message.
56
91
  */
57
92
  export const GatewayMessageSchema = /*@__PURE__*/
58
- messageDesc(file_kusinta_iot_webrtc_v1_envelope, 5);
93
+ messageDesc(file_kusinta_iot_webrtc_v1_envelope, 10);
59
94
 
60
95
  /**
61
96
  * Describes the message kusinta.iot.webrtc.v1.AppMessage.
62
97
  * Use `create(AppMessageSchema)` to create a new message.
63
98
  */
64
99
  export const AppMessageSchema = /*@__PURE__*/
65
- messageDesc(file_kusinta_iot_webrtc_v1_envelope, 6);
100
+ messageDesc(file_kusinta_iot_webrtc_v1_envelope, 11);
101
+
102
+ /**
103
+ * Describes the enum kusinta.iot.webrtc.v1.GatewayErrorCode.
104
+ */
105
+ export const GatewayErrorCodeSchema = /*@__PURE__*/
106
+ enumDesc(file_kusinta_iot_webrtc_v1_envelope, 0);
107
+
108
+ /**
109
+ * Machine-readable classification of a session-level gateway error, so the app
110
+ * can branch without string-matching a human sentence. Deliberately an enum here,
111
+ * unlike the free-form code on connector.v1.GatewayError: the app leg is versioned
112
+ * together with the gateway, and clients need an exhaustive switch.
113
+ *
114
+ * @generated from enum kusinta.iot.webrtc.v1.GatewayErrorCode
115
+ */
116
+ export const GatewayErrorCode = /*@__PURE__*/
117
+ tsEnum(GatewayErrorCodeSchema);
66
118
 
@@ -25,11 +25,17 @@ export declare type LivePermissionUpdate = Message<"kusinta.iot.webrtc.v1.LivePe
25
25
  newPermissions?: EffectivePermissions | undefined;
26
26
 
27
27
  /**
28
+ * Newly entitled devices. Entitlement is not interest: the app is not subscribed
29
+ * to these until it asks via AppMessage.subscribe.
30
+ *
28
31
  * @generated from field: repeated kusinta.iot.identity.v1.DeviceId added_devices = 2;
29
32
  */
30
33
  addedDevices: DeviceId[];
31
34
 
32
35
  /**
36
+ * Devices the user may no longer see. The gateway has already dropped these from
37
+ * the app's interest set — no property events follow, and no unsubscribe is needed.
38
+ *
33
39
  * @generated from field: repeated kusinta.iot.identity.v1.DeviceId removed_devices = 3;
34
40
  */
35
41
  removedDevices: DeviceId[];