@kusinta/iot-schema 0.2.0-beta.3 → 0.2.0-beta.30

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 (60) hide show
  1. package/package.json +9 -1
  2. package/src/kusinta/iot/access/v1/acl_pb.d.ts +118 -2
  3. package/src/kusinta/iot/access/v1/acl_pb.js +20 -3
  4. package/src/kusinta/iot/access/v1/roles_pb.d.ts +119 -4
  5. package/src/kusinta/iot/access/v1/roles_pb.js +98 -5
  6. package/src/kusinta/iot/climate/v1/climate_pb.d.ts +726 -0
  7. package/src/kusinta/iot/climate/v1/climate_pb.js +142 -0
  8. package/src/kusinta/iot/common/v1/pairing_pb.d.ts +217 -0
  9. package/src/kusinta/iot/common/v1/pairing_pb.js +50 -0
  10. package/src/kusinta/iot/common/v1/types_pb.d.ts +175 -0
  11. package/src/kusinta/iot/common/v1/types_pb.js +70 -1
  12. package/src/kusinta/iot/connector/v1/connector_pb.d.ts +691 -2
  13. package/src/kusinta/iot/connector/v1/connector_pb.js +104 -13
  14. package/src/kusinta/iot/device/v1/cluster_state_pb.d.ts +44 -0
  15. package/src/kusinta/iot/device/v1/cluster_state_pb.js +1 -1
  16. package/src/kusinta/iot/device/v1/descriptor_pb.d.ts +22 -2
  17. package/src/kusinta/iot/device/v1/descriptor_pb.js +2 -1
  18. package/src/kusinta/iot/device/v1/device_event_pb.d.ts +87 -5
  19. package/src/kusinta/iot/device/v1/device_event_pb.js +1 -1
  20. package/src/kusinta/iot/device/v1/device_pb.d.ts +150 -6
  21. package/src/kusinta/iot/device/v1/device_pb.js +33 -2
  22. package/src/kusinta/iot/device/v1/matter_options_pb.d.ts +26 -0
  23. package/src/kusinta/iot/device/v1/matter_options_pb.js +31 -4
  24. package/src/kusinta/iot/device/v1/properties_pb.d.ts +14 -0
  25. package/src/kusinta/iot/device/v1/properties_pb.js +1 -1
  26. package/src/kusinta/iot/device/v1/property_update_pb.d.ts +3 -2
  27. package/src/kusinta/iot/link/v1/link_pb.d.ts +438 -0
  28. package/src/kusinta/iot/link/v1/link_pb.js +121 -0
  29. package/src/kusinta/iot/reporting/v1/reporting_pb.d.ts +1219 -0
  30. package/src/kusinta/iot/reporting/v1/reporting_pb.js +238 -0
  31. package/src/kusinta/iot/reporting/v1/reporting_service_pb.d.ts +63 -0
  32. package/src/kusinta/iot/reporting/v1/reporting_service_pb.js +24 -0
  33. package/src/kusinta/iot/signaling/v1/signaling_pb.d.ts +361 -7
  34. package/src/kusinta/iot/signaling/v1/signaling_pb.js +68 -4
  35. package/src/kusinta/iot/signaling/v1/signaling_service_pb.d.ts +24 -1
  36. package/src/kusinta/iot/signaling/v1/signaling_service_pb.js +1 -1
  37. package/src/kusinta/iot/space/v1/space_pb.d.ts +103 -2
  38. package/src/kusinta/iot/space/v1/space_pb.js +10 -1
  39. package/src/kusinta/iot/vendor/homematic/v1/homematic_pb.d.ts +162 -13
  40. package/src/kusinta/iot/vendor/homematic/v1/homematic_pb.js +8 -1
  41. package/src/kusinta/iot/vendor/lorawan/v1/lorawan_pb.d.ts +69 -0
  42. package/src/kusinta/iot/vendor/lorawan/v1/lorawan_pb.js +19 -0
  43. package/src/kusinta/iot/vendor/v1/vendor_options_pb.d.ts +25 -4
  44. package/src/kusinta/iot/vendor/v1/vendor_options_pb.js +28 -6
  45. package/src/kusinta/iot/webrtc/v1/app_token_pb.d.ts +45 -5
  46. package/src/kusinta/iot/webrtc/v1/app_token_pb.js +1 -1
  47. package/src/kusinta/iot/webrtc/v1/command_pb.d.ts +14 -0
  48. package/src/kusinta/iot/webrtc/v1/command_pb.js +1 -1
  49. package/src/kusinta/iot/webrtc/v1/device_state_pb.d.ts +179 -5
  50. package/src/kusinta/iot/webrtc/v1/device_state_pb.js +35 -6
  51. package/src/kusinta/iot/webrtc/v1/envelope_pb.d.ts +520 -3
  52. package/src/kusinta/iot/webrtc/v1/envelope_pb.js +65 -3
  53. package/src/kusinta/iot/webrtc/v1/invite_pb.d.ts +496 -0
  54. package/src/kusinta/iot/webrtc/v1/invite_pb.js +108 -0
  55. package/src/kusinta/iot/webrtc/v1/management_pb.d.ts +977 -12
  56. package/src/kusinta/iot/webrtc/v1/management_pb.js +132 -5
  57. package/src/kusinta/iot/webrtc/v1/members_pb.d.ts +327 -0
  58. package/src/kusinta/iot/webrtc/v1/members_pb.js +78 -0
  59. package/src/kusinta/iot/webrtc/v1/permission_push_pb.d.ts +66 -4
  60. package/src/kusinta/iot/webrtc/v1/permission_push_pb.js +10 -2
@@ -2,13 +2,15 @@
2
2
  // @generated from file kusinta/iot/connector/v1/connector.proto (package kusinta.iot.connector.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 { ConnectorId, DeviceId, GatewayId } from "../../identity/v1/identity_pb.js";
8
- import type { ConnectorTransport } from "../../common/v1/types_pb.js";
8
+ import type { BackendFailureReason, BackendHealth, ConnectorKind, ConnectorTransport } from "../../common/v1/types_pb.js";
9
9
  import type { Device } from "../../device/v1/device_pb.js";
10
+ import type { DeviceLink, LinkFunction, LinkState } from "../../link/v1/link_pb.js";
10
11
  import type { Timestamp } from "@bufbuild/protobuf/wkt";
11
12
  import type { AttributeWriteRequest, CommandError, DeviceCommand } from "../../webrtc/v1/command_pb.js";
13
+ import type { PairingErrorDetail, PairingWindow } from "../../common/v1/pairing_pb.js";
12
14
  import type { PropertyUpdateBatch } from "../../device/v1/property_update_pb.js";
13
15
  import type { DeviceEventBatch } from "../../device/v1/device_event_pb.js";
14
16
 
@@ -27,6 +29,10 @@ export declare type ConnectorInfo = Message<"kusinta.iot.connector.v1.ConnectorI
27
29
  connectorId?: ConnectorId | undefined;
28
30
 
29
31
  /**
32
+ * User-facing and free-form — "HomeMatic hub", "LoRaWAN". An interface may show
33
+ * it; nothing ever matches on it. connector_id is the routing key; this is only
34
+ * a label for a person.
35
+ *
30
36
  * @generated from field: string display_name = 2;
31
37
  */
32
38
  displayName: string;
@@ -52,6 +58,65 @@ export declare type ConnectorInfo = Message<"kusinta.iot.connector.v1.ConnectorI
52
58
  * @generated from field: repeated uint32 supported_device_type_ids = 6;
53
59
  */
54
60
  supportedDeviceTypeIds: number[];
61
+
62
+ /**
63
+ * The connector opens a radio window on request: the app may offer the pairing
64
+ * flow and target webrtc.v1.StartPairing.connector_id at it. A connector whose
65
+ * devices are registered rather than paired (see supports_provisioning) sets this
66
+ * false.
67
+ *
68
+ * @generated from field: bool supports_pairing = 7;
69
+ */
70
+ supportsPairing: boolean;
71
+
72
+ /**
73
+ * The connector registers a device from credentials it is handed, rather than
74
+ * adopting one that joins during a window — the webrtc.v1.ProvisionDevice path.
75
+ * This is how the app knows to show a credential-entry flow instead of pairing,
76
+ * and ProvisionDevice.connector_id is targeted at a connector that declares it.
77
+ *
78
+ * @generated from field: bool supports_provisioning = 8;
79
+ */
80
+ supportsProvisioning: boolean;
81
+
82
+ /**
83
+ * The connector brokers device-to-device (hard) links: the link picker may offer
84
+ * them and can name the hub behind an otherwise-hidden candidate. Declared here
85
+ * rather than inferred from both devices reporting LINK_MODE_HARD, so it is a
86
+ * statement the connector makes rather than a guess the app assembles.
87
+ *
88
+ * @generated from field: bool brokers_links = 9;
89
+ */
90
+ brokersLinks: boolean;
91
+
92
+ /**
93
+ * Presentation only — an icon or a phrase; see common.v1.ConnectorKind for why it
94
+ * never gates behaviour. Unset is CONNECTOR_KIND_UNSPECIFIED, a generic hub.
95
+ *
96
+ * @generated from field: kusinta.iot.common.v1.ConnectorKind kind = 10;
97
+ */
98
+ kind: ConnectorKind;
99
+
100
+ /**
101
+ * Installer or operator detail — where the hub is, which building leg it serves.
102
+ * Kept off connector_id, whose identity contract routing depends on, and off
103
+ * display_name, which is the short label. Free-form, for a person; never matched
104
+ * on.
105
+ *
106
+ * @generated from field: string description = 11;
107
+ */
108
+ description: string;
109
+
110
+ /**
111
+ * The connector answers ReinitializeBackend: it can drop and re-establish its connection
112
+ * to its backend on request. The gateway sends ReinitializeBackend only to a connector
113
+ * that declares this, and refuses a reconnect for any other without asking it — a
114
+ * connector whose schema predates the message would ignore it, and the gateway would wait
115
+ * out its deadline for nothing.
116
+ *
117
+ * @generated from field: bool supports_backend_reinitialize = 12;
118
+ */
119
+ supportsBackendReinitialize: boolean;
55
120
  };
56
121
 
57
122
  /**
@@ -73,6 +138,50 @@ export declare type ConnectorHandshake = Message<"kusinta.iot.connector.v1.Conne
73
138
  * @generated from field: repeated kusinta.iot.device.v1.Device known_devices = 2;
74
139
  */
75
140
  knownDevices: Device[];
141
+
142
+ /**
143
+ * Every link the hub currently holds, reported the way known_devices is.
144
+ *
145
+ * Links are hub state, not gateway state: they outlive a connector restart and
146
+ * can be changed by anyone with access to the hub. The gateway's records are a
147
+ * statement of intent that can drift, so the handshake is the moment to
148
+ * reconcile them against what is really there. A link in the gateway's records
149
+ * and not here has gone; one here and not in the records was made elsewhere.
150
+ *
151
+ * Empty means "states nothing" — a connector that does not model linking is not
152
+ * asserting that no links exist.
153
+ *
154
+ * @generated from field: repeated kusinta.iot.link.v1.DeviceLink known_links = 3;
155
+ */
156
+ knownLinks: DeviceLink[];
157
+
158
+ /**
159
+ * The backend's health as the connector handshakes, so the gateway starts every session
160
+ * from the current state rather than from whatever it held before the stream dropped.
161
+ * From then on, changes arrive as BackendHealthReport on the session.
162
+ *
163
+ * Unset states nothing, and the gateway reads it as OK: a connector that predates backend
164
+ * health never sends it, and is never taken to be failing. A connector whose backend has
165
+ * not answered a call since it connected to the gateway — its backend is still in
166
+ * doubt — leaves it unset, or states FAILING only where BackendHealthReport's rules for
167
+ * FAILING already hold; never OK.
168
+ *
169
+ * After connecting to a gateway that sets HandshakeAck.supports_backend_health, a
170
+ * connector that reports backend health follows the rules on BackendHealthReport: its
171
+ * backend is in doubt from connecting to the gateway until it first answers, so the
172
+ * connector states OK (once it has answered) or FAILING within 60 seconds, here or in a
173
+ * BackendHealthReport, reports none of its devices as unreachable while its backend is in
174
+ * doubt, and re-reports them once it is not, as BackendHealthReport says. Toward a gateway
175
+ * that does not set it, none of those rules applies: the connector reports its devices as
176
+ * it did before backend health existed.
177
+ *
178
+ * Safe to set whatever the gateway: the handshake goes before the connector knows which
179
+ * gateway it reached, and a gateway that predates backend health skips the field as
180
+ * unknown. Everything after the handshake waits for HandshakeAck.supports_backend_health.
181
+ *
182
+ * @generated from field: kusinta.iot.connector.v1.BackendHealthReport backend_health = 4;
183
+ */
184
+ backendHealth?: BackendHealthReport | undefined;
76
185
  };
77
186
 
78
187
  /**
@@ -81,6 +190,319 @@ export declare type ConnectorHandshake = Message<"kusinta.iot.connector.v1.Conne
81
190
  */
82
191
  export declare const ConnectorHandshakeSchema: GenMessage<ConnectorHandshake>;
83
192
 
193
+ /**
194
+ * The health of the backend the connector drives, connector to gateway: whether the radio
195
+ * central or network server behind it is working. See common.v1.BackendHealth.
196
+ *
197
+ * Sent on the session only to a gateway that sets HandshakeAck.supports_backend_health; the
198
+ * handshake's ConnectorHandshake.backend_health is set whatever the gateway, since the ack is
199
+ * not yet known. To a gateway that does not set it — one that predates backend health — the
200
+ * connector sends neither this on the session nor
201
+ * ReinitializeBackendResult, and keeps working as it did before: its backend failing is
202
+ * then only in its own logs.
203
+ *
204
+ * Sent in the handshake (ConnectorHandshake.backend_health), then whenever state or reason
205
+ * changes, and once after every requested re-initialisation (ReinitializeBackend) it
206
+ * attempts, changed or not, before the
207
+ * result that answers it. Not sent for a change of detail alone. Each report replaces the
208
+ * last.
209
+ *
210
+ * The connector's backend is in doubt from when the connector connects to the gateway (each
211
+ * session, whether or not the backend kept answering meanwhile), from any failed call
212
+ * to the backend, and from a re-initialisation the connector attempts, until the backend
213
+ * answers a call again; OK
214
+ * is stated only once it has. While it is in doubt the
215
+ * connector reports none of its devices as unreachable, by whatever its technology uses to
216
+ * say so: a device it cannot reach then may be the backend's fault. The gateway applies no
217
+ * debounce of its own, so the connector never reports FAILING for a single failed call: it
218
+ * reports FAILING once its backend has been in doubt for 60 seconds in all within the last
219
+ * 120 — so a backend that hangs, or answers only now and then, reaches it, and brief failures
220
+ * between answers do not — or sooner when its own
221
+ * retries are used up, with the reason of its latest failed call, or UNREACHABLE when none
222
+ * has failed yet. After a ReinitializeBackend it reports the attempt's true outcome at once,
223
+ * FAILING included, or OK, before the result: the request is the retry a person asked for.
224
+ * A backend outage the connector rides out within 60 seconds opens no problem, and what the
225
+ * backend then says of its devices is reported as it is.
226
+ *
227
+ * When its backend stops being in doubt, whatever started it, the connector reports, within
228
+ * 30 seconds, the current reachability of every device it knows, reachable ones included. If
229
+ * doubt comes back before it is done, it still reports the devices it knows to be reachable,
230
+ * and the rest once the doubt ends. The gateway closes
231
+ * a device's offline problem as recovered only on a report that the device is reachable —
232
+ * this one or any later one — never on silence; it closes for other reasons as reporting.v1
233
+ * says.
234
+ *
235
+ * The gateway raises reporting.v1.PROBLEM_KIND_CONNECTOR_ERROR for this connector while its
236
+ * stream is up and the latest report is FAILING, and clears it when one is anything else; a
237
+ * stream that drops closes it too, and the next handshake decides afresh (see reporting.v1).
238
+ * A connector that never sends one is OK throughout. CONNECTOR_OFFLINE is the other problem
239
+ * and is not this one: that is the stream to the gateway down, this is the stream up and
240
+ * the backend failing.
241
+ *
242
+ * @generated from message kusinta.iot.connector.v1.BackendHealthReport
243
+ */
244
+ export declare type BackendHealthReport = Message<"kusinta.iot.connector.v1.BackendHealthReport"> & {
245
+ /**
246
+ * @generated from field: kusinta.iot.common.v1.BackendHealth health = 1;
247
+ */
248
+ health?: BackendHealth | undefined;
249
+
250
+ /**
251
+ * What went wrong, in the connector's words — an error message, the host it could not
252
+ * reach. For the gateway's logs only. The gateway never forwards it: not to the app, not
253
+ * to the cloud, not into a problem report. Empty when there is nothing to add.
254
+ *
255
+ * @generated from field: string detail = 2;
256
+ */
257
+ detail: string;
258
+ };
259
+
260
+ /**
261
+ * Describes the message kusinta.iot.connector.v1.BackendHealthReport.
262
+ * Use `create(BackendHealthReportSchema)` to create a new message.
263
+ */
264
+ export declare const BackendHealthReportSchema: GenMessage<BackendHealthReport>;
265
+
266
+ /**
267
+ * Asks the connector to re-initialise its backend connection, gateway to connector: drop
268
+ * the connection to its radio central or network server and establish it again, as it would
269
+ * at startup. Sent only to a connector that declares
270
+ * ConnectorInfo.supports_backend_reinitialize.
271
+ *
272
+ * Idempotent. Re-initialising a healthy backend is harmless, and asking twice is the same as
273
+ * asking once: a ReinitializeBackend that arrives while one is running starts nothing new,
274
+ * and is answered with the running one's outcome when it finishes. The gateway sends at most
275
+ * one at a time per connector and refuses a second request from above while one is
276
+ * outstanding; the connector's coalescing covers the case where the gateway gave up waiting
277
+ * and asked again.
278
+ *
279
+ * Sent only by a gateway that sets HandshakeAck.supports_backend_health, so a connector
280
+ * that receives it may answer. Answered once, by ReinitializeBackendResult with the same
281
+ * request_id. The connector bounds its attempt so that it answers within 30 seconds of
282
+ * receiving this; the gateway waits at least 45 and at most 60 seconds before it treats the
283
+ * request as timed out. A result arriving after the gateway has given up is ignored, but the
284
+ * health report sent before it still applies.
285
+ *
286
+ * @generated from message kusinta.iot.connector.v1.ReinitializeBackend
287
+ */
288
+ export declare type ReinitializeBackend = Message<"kusinta.iot.connector.v1.ReinitializeBackend"> & {
289
+ /**
290
+ * minted by the gateway, echoed in the result
291
+ *
292
+ * @generated from field: string request_id = 1;
293
+ */
294
+ requestId: string;
295
+ };
296
+
297
+ /**
298
+ * Describes the message kusinta.iot.connector.v1.ReinitializeBackend.
299
+ * Use `create(ReinitializeBackendSchema)` to create a new message.
300
+ */
301
+ export declare const ReinitializeBackendSchema: GenMessage<ReinitializeBackend>;
302
+
303
+ /**
304
+ * What became of a ReinitializeBackend, connector to gateway.
305
+ *
306
+ * DONE means the attempt was made and has finished — not that it succeeded. Whether the
307
+ * backend works now is stated by the BackendHealthReport the connector sends after every
308
+ * attempt, before this result, so a gateway reading DONE already holds the outcome. Keeping
309
+ * the two apart means there is one place that says whether a backend is healthy, and a
310
+ * result cannot contradict it.
311
+ *
312
+ * @generated from message kusinta.iot.connector.v1.ReinitializeBackendResult
313
+ */
314
+ export declare type ReinitializeBackendResult = Message<"kusinta.iot.connector.v1.ReinitializeBackendResult"> & {
315
+ /**
316
+ * @generated from field: string request_id = 1;
317
+ */
318
+ requestId: string;
319
+
320
+ /**
321
+ * @generated from field: kusinta.iot.connector.v1.ReinitializeOutcome outcome = 2;
322
+ */
323
+ outcome: ReinitializeOutcome;
324
+
325
+ /**
326
+ * Why it could not be attempted, when outcome is FAILED: MISCONFIGURED or INTERNAL.
327
+ * UNSPECIFIED otherwise. Never a failure found by attempting — rejected credentials, a
328
+ * backend that does not answer: the attempt was made, so the outcome is DONE and the
329
+ * health report before it says FAILING with AUTH_FAILED, UNREACHABLE or the like.
330
+ *
331
+ * @generated from field: kusinta.iot.common.v1.BackendFailureReason reason = 3;
332
+ */
333
+ reason: BackendFailureReason;
334
+
335
+ /**
336
+ * For the gateway's logs only, as BackendHealthReport.detail; never forwarded.
337
+ *
338
+ * @generated from field: string detail = 4;
339
+ */
340
+ detail: string;
341
+ };
342
+
343
+ /**
344
+ * Describes the message kusinta.iot.connector.v1.ReinitializeBackendResult.
345
+ * Use `create(ReinitializeBackendResultSchema)` to create a new message.
346
+ */
347
+ export declare const ReinitializeBackendResultSchema: GenMessage<ReinitializeBackendResult>;
348
+
349
+ /**
350
+ * Asks the connector to make a link, gateway to connector.
351
+ *
352
+ * Names two devices and a function; resolving that into whatever set of
353
+ * underlying connections the hub needs is the connector's work. It is expected to
354
+ * build the set atomically and roll back a partial one, because a half-built set
355
+ * is a link that lists as healthy and carries nothing.
356
+ *
357
+ * The connector is also expected to repair whatever the operation disturbs. On at
358
+ * least one vendor, both making and removing a link leaves the receiving device
359
+ * in a state it was not in before, with settings that must be captured
360
+ * beforehand and put back after.
361
+ *
362
+ * @generated from message kusinta.iot.connector.v1.CreateLink
363
+ */
364
+ export declare type CreateLink = Message<"kusinta.iot.connector.v1.CreateLink"> & {
365
+ /**
366
+ * assigned by the gateway, echoed in the result
367
+ *
368
+ * @generated from field: string link_id = 1;
369
+ */
370
+ linkId: string;
371
+
372
+ /**
373
+ * @generated from field: kusinta.iot.identity.v1.DeviceId sender = 2;
374
+ */
375
+ sender?: DeviceId | undefined;
376
+
377
+ /**
378
+ * @generated from field: kusinta.iot.identity.v1.DeviceId receiver = 3;
379
+ */
380
+ receiver?: DeviceId | undefined;
381
+
382
+ /**
383
+ * @generated from field: kusinta.iot.link.v1.LinkFunction function = 4;
384
+ */
385
+ function: LinkFunction;
386
+ };
387
+
388
+ /**
389
+ * Describes the message kusinta.iot.connector.v1.CreateLink.
390
+ * Use `create(CreateLinkSchema)` to create a new message.
391
+ */
392
+ export declare const CreateLinkSchema: GenMessage<CreateLink>;
393
+
394
+ /**
395
+ * Asks the connector to remove a link it previously made.
396
+ *
397
+ * @generated from message kusinta.iot.connector.v1.RemoveLink
398
+ */
399
+ export declare type RemoveLink = Message<"kusinta.iot.connector.v1.RemoveLink"> & {
400
+ /**
401
+ * @generated from field: string link_id = 1;
402
+ */
403
+ linkId: string;
404
+
405
+ /**
406
+ * @generated from field: kusinta.iot.identity.v1.DeviceId sender = 2;
407
+ */
408
+ sender?: DeviceId | undefined;
409
+
410
+ /**
411
+ * @generated from field: kusinta.iot.identity.v1.DeviceId receiver = 3;
412
+ */
413
+ receiver?: DeviceId | undefined;
414
+
415
+ /**
416
+ * @generated from field: kusinta.iot.link.v1.LinkFunction function = 4;
417
+ */
418
+ function: LinkFunction;
419
+ };
420
+
421
+ /**
422
+ * Describes the message kusinta.iot.connector.v1.RemoveLink.
423
+ * Use `create(RemoveLinkSchema)` to create a new message.
424
+ */
425
+ export declare const RemoveLinkSchema: GenMessage<RemoveLink>;
426
+
427
+ /**
428
+ * Asks the connector what links the hub holds, for reconciliation outside a
429
+ * handshake.
430
+ *
431
+ * @generated from message kusinta.iot.connector.v1.ListLinks
432
+ */
433
+ export declare type ListLinks = Message<"kusinta.iot.connector.v1.ListLinks"> & {
434
+ /**
435
+ * Unset asks for every link the hub holds.
436
+ *
437
+ * @generated from field: kusinta.iot.identity.v1.DeviceId device_id = 1;
438
+ */
439
+ deviceId?: DeviceId | undefined;
440
+ };
441
+
442
+ /**
443
+ * Describes the message kusinta.iot.connector.v1.ListLinks.
444
+ * Use `create(ListLinksSchema)` to create a new message.
445
+ */
446
+ export declare const ListLinksSchema: GenMessage<ListLinks>;
447
+
448
+ /**
449
+ * What became of a CreateLink or RemoveLink, connector to gateway.
450
+ *
451
+ * Reports the link's observed state rather than merely whether the call was
452
+ * accepted. A hub will report a link as present and healthy while the devices
453
+ * ignore it, so "the request did not fail" is not the same claim as "the link is
454
+ * carrying" and must not be encoded as though it were.
455
+ *
456
+ * @generated from message kusinta.iot.connector.v1.LinkResult
457
+ */
458
+ export declare type LinkResult = Message<"kusinta.iot.connector.v1.LinkResult"> & {
459
+ /**
460
+ * @generated from field: string link_id = 1;
461
+ */
462
+ linkId: string;
463
+
464
+ /**
465
+ * @generated from field: bool success = 2;
466
+ */
467
+ success: boolean;
468
+
469
+ /**
470
+ * @generated from field: kusinta.iot.link.v1.LinkState state = 3;
471
+ */
472
+ state: LinkState;
473
+
474
+ /**
475
+ * Why not, when success is false. For a person; never parsed.
476
+ *
477
+ * @generated from field: string detail = 4;
478
+ */
479
+ detail: string;
480
+ };
481
+
482
+ /**
483
+ * Describes the message kusinta.iot.connector.v1.LinkResult.
484
+ * Use `create(LinkResultSchema)` to create a new message.
485
+ */
486
+ export declare const LinkResultSchema: GenMessage<LinkResult>;
487
+
488
+ /**
489
+ * Every link the hub holds, connector to gateway, in reply to ListLinks.
490
+ *
491
+ * @generated from message kusinta.iot.connector.v1.LinksReported
492
+ */
493
+ export declare type LinksReported = Message<"kusinta.iot.connector.v1.LinksReported"> & {
494
+ /**
495
+ * @generated from field: repeated kusinta.iot.link.v1.DeviceLink links = 1;
496
+ */
497
+ links: DeviceLink[];
498
+ };
499
+
500
+ /**
501
+ * Describes the message kusinta.iot.connector.v1.LinksReported.
502
+ * Use `create(LinksReportedSchema)` to create a new message.
503
+ */
504
+ export declare const LinksReportedSchema: GenMessage<LinksReported>;
505
+
84
506
  /**
85
507
  * @generated from message kusinta.iot.connector.v1.HandshakeAck
86
508
  */
@@ -99,6 +521,16 @@ export declare type HandshakeAck = Message<"kusinta.iot.connector.v1.HandshakeAc
99
521
  * @generated from field: kusinta.iot.identity.v1.GatewayId gateway_id = 3;
100
522
  */
101
523
  gatewayId?: GatewayId | undefined;
524
+
525
+ /**
526
+ * The gateway understands BackendHealthReport and ReinitializeBackendResult. A connector
527
+ * sends either on the session only when this is set. Unset — a gateway that predates
528
+ * backend health — the connector sends neither and works as before; such a gateway never
529
+ * sends ReinitializeBackend.
530
+ *
531
+ * @generated from field: bool supports_backend_health = 4;
532
+ */
533
+ supportsBackendHealth: boolean;
102
534
  };
103
535
 
104
536
  /**
@@ -122,6 +554,25 @@ export declare type DeviceAnnouncement = Message<"kusinta.iot.connector.v1.Devic
122
554
  * @generated from field: kusinta.iot.device.v1.Device device = 2;
123
555
  */
124
556
  device?: Device | undefined;
557
+
558
+ /**
559
+ * The pairing request this device arrived for, empty for a device that arrived on its own.
560
+ *
561
+ * This field is the whole attribution mechanism. A connector is the only party that knows
562
+ * when its own hub was accepting devices, so it decides whether an arrival belongs to a
563
+ * request and says so here.
564
+ *
565
+ * Set it only when the arrival was actually checked. An arrival that fails the check is
566
+ * still announced — the device exists and has joined — but with this empty, which files it
567
+ * as belonging to nobody rather than to the wrong person.
568
+ *
569
+ * This is EnterPairingMode.request_id, minted per connector, and NOT an app message id:
570
+ * whoever forwards the outcome to the app has to map it back. The name avoids `in_reply_to`
571
+ * for that reason, which everywhere else in this schema means the app's own message id.
572
+ *
573
+ * @generated from field: string pairing_request_id = 3;
574
+ */
575
+ pairingRequestId: string;
125
576
  };
126
577
 
127
578
  /**
@@ -309,6 +760,127 @@ export declare type ConnectorCommandResult = Message<"kusinta.iot.connector.v1.C
309
760
  */
310
761
  export declare const ConnectorCommandResultSchema: GenMessage<ConnectorCommandResult>;
311
762
 
763
+ /**
764
+ * Tells a connector to accept new devices for a while, gateway → connector.
765
+ *
766
+ * Named for what the connector does rather than for what the app asked. The two legs are
767
+ * named differently on purpose: the app starts one pairing, and the gateway may put several
768
+ * connectors into pairing mode to serve it.
769
+ *
770
+ * @generated from message kusinta.iot.connector.v1.EnterPairingMode
771
+ */
772
+ export declare type EnterPairingMode = Message<"kusinta.iot.connector.v1.EnterPairingMode"> & {
773
+ /**
774
+ * echoed on PairingModeResult, PairingModeEnded and the announcement
775
+ *
776
+ * @generated from field: string request_id = 1;
777
+ */
778
+ requestId: string;
779
+
780
+ /**
781
+ * How long, which device, how many. See PairingWindow — and clamp the duration again here.
782
+ * A connector is the last thing standing between a number on the wire and a radio that
783
+ * accepts anything nearby for that long.
784
+ *
785
+ * @generated from field: kusinta.iot.common.v1.PairingWindow window = 2;
786
+ */
787
+ window?: PairingWindow | undefined;
788
+ };
789
+
790
+ /**
791
+ * Describes the message kusinta.iot.connector.v1.EnterPairingMode.
792
+ * Use `create(EnterPairingModeSchema)` to create a new message.
793
+ */
794
+ export declare const EnterPairingModeSchema: GenMessage<EnterPairingMode>;
795
+
796
+ /**
797
+ * A connector's answer to EnterPairingMode: whether the window opened, and nothing more.
798
+ *
799
+ * The same accept-now-report-later split as ConnectorCommandResult, for the same reason — a
800
+ * connector that waited for a device to wake before answering would blow every deadline
801
+ * above it. What the window produced arrives later, as PairingModeEnded.
802
+ *
803
+ * @generated from message kusinta.iot.connector.v1.PairingModeResult
804
+ */
805
+ export declare type PairingModeResult = Message<"kusinta.iot.connector.v1.PairingModeResult"> & {
806
+ /**
807
+ * @generated from field: string request_id = 1;
808
+ */
809
+ requestId: string;
810
+
811
+ /**
812
+ * @generated from field: bool accepted = 2;
813
+ */
814
+ accepted: boolean;
815
+
816
+ /**
817
+ * Why the window did not open. Only what a connector can observe at this point:
818
+ * CONNECTOR_UNAVAILABLE, INTERNAL. NOT_ENTITLED and ALREADY_IN_PROGRESS are the gateway's,
819
+ * decided before this message is sent, and a connector must not claim them.
820
+ *
821
+ * @generated from field: kusinta.iot.common.v1.PairingErrorDetail error = 3;
822
+ */
823
+ error?: PairingErrorDetail | undefined;
824
+
825
+ /**
826
+ * When the window closes, if it opened. Lets the gateway expire its own record against the
827
+ * connector's clock rather than a guess — the connector is the party that clamped it.
828
+ *
829
+ * @generated from field: google.protobuf.Timestamp expires_at = 4;
830
+ */
831
+ expiresAt?: Timestamp | undefined;
832
+ };
833
+
834
+ /**
835
+ * Describes the message kusinta.iot.connector.v1.PairingModeResult.
836
+ * Use `create(PairingModeResultSchema)` to create a new message.
837
+ */
838
+ export declare const PairingModeResultSchema: GenMessage<PairingModeResult>;
839
+
840
+ /**
841
+ * What the window produced, connector → gateway, sent once when it closes.
842
+ *
843
+ * Without this the connector has no way to report anything it learned after the window
844
+ * opened: a device that joined and cannot be modelled, or one that joined and was not the
845
+ * device the hint named. Neither can travel on a DeviceAnnouncement — the first has nothing
846
+ * announceable, and the second is announced but unattributed, which says a device arrived
847
+ * and not why it was refused.
848
+ *
849
+ * It also gives a batch window a definite end. Counting announcements cannot distinguish
850
+ * "three of five so far" from "three of five, and that is all".
851
+ *
852
+ * @generated from message kusinta.iot.connector.v1.PairingModeEnded
853
+ */
854
+ export declare type PairingModeEnded = Message<"kusinta.iot.connector.v1.PairingModeEnded"> & {
855
+ /**
856
+ * @generated from field: string request_id = 1;
857
+ */
858
+ requestId: string;
859
+
860
+ /**
861
+ * How many arrivals this connector attributed to the request. The gateway can count the
862
+ * announcements it received, but only the connector knows it has stopped.
863
+ *
864
+ * @generated from field: uint32 devices_attributed = 2;
865
+ */
866
+ devicesAttributed: number;
867
+
868
+ /**
869
+ * Why it produced fewer than asked for, absent when it produced them all. DEVICE_UNUSABLE
870
+ * and WRONG_DEVICE are reported here and should name the device in the message, since that
871
+ * is the only place a user learns which device is now sitting on their hub.
872
+ *
873
+ * @generated from field: kusinta.iot.common.v1.PairingErrorDetail error = 3;
874
+ */
875
+ error?: PairingErrorDetail | undefined;
876
+ };
877
+
878
+ /**
879
+ * Describes the message kusinta.iot.connector.v1.PairingModeEnded.
880
+ * Use `create(PairingModeEndedSchema)` to create a new message.
881
+ */
882
+ export declare const PairingModeEndedSchema: GenMessage<PairingModeEnded>;
883
+
312
884
  /**
313
885
  * @generated from message kusinta.iot.connector.v1.SessionRequest
314
886
  */
@@ -368,6 +940,44 @@ export declare type SessionRequest = Message<"kusinta.iot.connector.v1.SessionRe
368
940
  */
369
941
  value: DeviceEventBatch;
370
942
  case: "deviceEvents";
943
+ } | {
944
+ /**
945
+ * @generated from field: kusinta.iot.connector.v1.PairingModeResult pairing_mode_result = 10;
946
+ */
947
+ value: PairingModeResult;
948
+ case: "pairingModeResult";
949
+ } | {
950
+ /**
951
+ * @generated from field: kusinta.iot.connector.v1.PairingModeEnded pairing_mode_ended = 11;
952
+ */
953
+ value: PairingModeEnded;
954
+ case: "pairingModeEnded";
955
+ } | {
956
+ /**
957
+ * @generated from field: kusinta.iot.connector.v1.LinkResult link_result = 12;
958
+ */
959
+ value: LinkResult;
960
+ case: "linkResult";
961
+ } | {
962
+ /**
963
+ * @generated from field: kusinta.iot.connector.v1.LinksReported links_reported = 13;
964
+ */
965
+ value: LinksReported;
966
+ case: "linksReported";
967
+ } | {
968
+ /**
969
+ * The backend's health; see BackendHealthReport.
970
+ *
971
+ * @generated from field: kusinta.iot.connector.v1.BackendHealthReport backend_health = 14;
972
+ */
973
+ value: BackendHealthReport;
974
+ case: "backendHealth";
975
+ } | {
976
+ /**
977
+ * @generated from field: kusinta.iot.connector.v1.ReinitializeBackendResult reinitialize_backend_result = 15;
978
+ */
979
+ value: ReinitializeBackendResult;
980
+ case: "reinitializeBackendResult";
371
981
  } | { case: undefined; value?: undefined };
372
982
  };
373
983
 
@@ -433,6 +1043,44 @@ export declare type SessionResponse = Message<"kusinta.iot.connector.v1.SessionR
433
1043
  */
434
1044
  value: AttributeWriteRequest;
435
1045
  case: "executeAttributeWrite";
1046
+ } | {
1047
+ /**
1048
+ * The connector-leg half of the pairing flow. See EnterPairingMode.
1049
+ *
1050
+ * @generated from field: kusinta.iot.connector.v1.EnterPairingMode enter_pairing_mode = 10;
1051
+ */
1052
+ value: EnterPairingMode;
1053
+ case: "enterPairingMode";
1054
+ } | {
1055
+ /**
1056
+ * The link operations. Separate cases rather than one with a verb, so a
1057
+ * connector that models none of them fails to match rather than having to
1058
+ * decode a request it cannot serve.
1059
+ *
1060
+ * @generated from field: kusinta.iot.connector.v1.CreateLink create_link = 11;
1061
+ */
1062
+ value: CreateLink;
1063
+ case: "createLink";
1064
+ } | {
1065
+ /**
1066
+ * @generated from field: kusinta.iot.connector.v1.RemoveLink remove_link = 12;
1067
+ */
1068
+ value: RemoveLink;
1069
+ case: "removeLink";
1070
+ } | {
1071
+ /**
1072
+ * @generated from field: kusinta.iot.connector.v1.ListLinks list_links = 13;
1073
+ */
1074
+ value: ListLinks;
1075
+ case: "listLinks";
1076
+ } | {
1077
+ /**
1078
+ * See ReinitializeBackend.
1079
+ *
1080
+ * @generated from field: kusinta.iot.connector.v1.ReinitializeBackend reinitialize_backend = 14;
1081
+ */
1082
+ value: ReinitializeBackend;
1083
+ case: "reinitializeBackend";
436
1084
  } | { case: undefined; value?: undefined };
437
1085
  };
438
1086
 
@@ -442,3 +1090,44 @@ export declare type SessionResponse = Message<"kusinta.iot.connector.v1.SessionR
442
1090
  */
443
1091
  export declare const SessionResponseSchema: GenMessage<SessionResponse>;
444
1092
 
1093
+ /**
1094
+ * @generated from enum kusinta.iot.connector.v1.ReinitializeOutcome
1095
+ */
1096
+ export enum ReinitializeOutcome {
1097
+ /**
1098
+ * Not stated, or a value this gateway's schema does not know. Read as FAILED.
1099
+ *
1100
+ * @generated from enum value: REINITIALIZE_OUTCOME_UNSPECIFIED = 0;
1101
+ */
1102
+ UNSPECIFIED = 0,
1103
+
1104
+ /**
1105
+ * The connection was dropped and an attempt to establish it again has finished. Its
1106
+ * outcome is the BackendHealthReport sent just before.
1107
+ *
1108
+ * @generated from enum value: REINITIALIZE_OUTCOME_DONE = 1;
1109
+ */
1110
+ DONE = 1,
1111
+
1112
+ /**
1113
+ * The connector could not attempt it at all — no configuration to reconnect with, a fault
1114
+ * of its own. Health is unchanged and no report precedes this.
1115
+ *
1116
+ * @generated from enum value: REINITIALIZE_OUTCOME_FAILED = 2;
1117
+ */
1118
+ FAILED = 2,
1119
+
1120
+ /**
1121
+ * The connector has no backend connection it can re-initialise. A connector that answers
1122
+ * this should not declare supports_backend_reinitialize, but the gateway must handle it.
1123
+ *
1124
+ * @generated from enum value: REINITIALIZE_OUTCOME_NOT_SUPPORTED = 3;
1125
+ */
1126
+ NOT_SUPPORTED = 3,
1127
+ }
1128
+
1129
+ /**
1130
+ * Describes the enum kusinta.iot.connector.v1.ReinitializeOutcome.
1131
+ */
1132
+ export declare const ReinitializeOutcomeSchema: GenEnum<ReinitializeOutcome>;
1133
+