@kusinta/iot-schema 0.1.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/package.json +31 -0
  2. package/src/__tests__/access.test.js +134 -0
  3. package/src/__tests__/common.test.js +29 -0
  4. package/src/__tests__/connector.test.js +144 -0
  5. package/src/__tests__/device.test.js +194 -0
  6. package/src/__tests__/identity.test.js +43 -0
  7. package/src/__tests__/space.test.js +54 -0
  8. package/src/__tests__/vendor.test.js +60 -0
  9. package/src/__tests__/webrtc.test.js +268 -0
  10. package/src/kusinta/iot/access/v1/acl_pb.d.ts +144 -0
  11. package/src/kusinta/iot/access/v1/acl_pb.js +36 -0
  12. package/src/kusinta/iot/access/v1/roles_pb.d.ts +81 -0
  13. package/src/kusinta/iot/access/v1/roles_pb.js +36 -0
  14. package/src/kusinta/iot/common/v1/types_pb.d.ts +163 -0
  15. package/src/kusinta/iot/common/v1/types_pb.js +67 -0
  16. package/src/kusinta/iot/connector/v1/connector_pb.d.ts +359 -0
  17. package/src/kusinta/iot/connector/v1/connector_pb.js +101 -0
  18. package/src/kusinta/iot/connector/v1/connector_service_pb.d.ts +29 -0
  19. package/src/kusinta/iot/connector/v1/connector_service_pb.js +22 -0
  20. package/src/kusinta/iot/device/v1/descriptor_pb.d.ts +115 -0
  21. package/src/kusinta/iot/device/v1/descriptor_pb.js +22 -0
  22. package/src/kusinta/iot/device/v1/device_pb.d.ts +131 -0
  23. package/src/kusinta/iot/device/v1/device_pb.js +23 -0
  24. package/src/kusinta/iot/device/v1/properties_pb.d.ts +580 -0
  25. package/src/kusinta/iot/device/v1/properties_pb.js +96 -0
  26. package/src/kusinta/iot/device/v1/property_update_pb.d.ts +112 -0
  27. package/src/kusinta/iot/device/v1/property_update_pb.js +28 -0
  28. package/src/kusinta/iot/identity/v1/identity_pb.d.ts +108 -0
  29. package/src/kusinta/iot/identity/v1/identity_pb.js +54 -0
  30. package/src/kusinta/iot/space/v1/space_pb.d.ts +86 -0
  31. package/src/kusinta/iot/space/v1/space_pb.js +21 -0
  32. package/src/kusinta/iot/vendor/homematic/v1/homematic_pb.d.ts +94 -0
  33. package/src/kusinta/iot/vendor/homematic/v1/homematic_pb.js +26 -0
  34. package/src/kusinta/iot/webrtc/v1/command_pb.d.ts +271 -0
  35. package/src/kusinta/iot/webrtc/v1/command_pb.js +70 -0
  36. package/src/kusinta/iot/webrtc/v1/device_state_pb.d.ts +67 -0
  37. package/src/kusinta/iot/webrtc/v1/device_state_pb.js +30 -0
  38. package/src/kusinta/iot/webrtc/v1/envelope_pb.d.ts +210 -0
  39. package/src/kusinta/iot/webrtc/v1/envelope_pb.js +59 -0
  40. package/src/kusinta/iot/webrtc/v1/permission_push_pb.d.ts +48 -0
  41. package/src/kusinta/iot/webrtc/v1/permission_push_pb.js +21 -0
@@ -0,0 +1,271 @@
1
+ // @generated by protoc-gen-es v2.12.0 with parameter "target=js+dts"
2
+ // @generated from file kusinta/iot/webrtc/v1/command.proto (package kusinta.iot.webrtc.v1, syntax proto3)
3
+ /* eslint-disable */
4
+
5
+ import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
6
+ import type { Message } from "@bufbuild/protobuf";
7
+ import type { DeviceId } from "../../identity/v1/identity_pb";
8
+ import type { Timestamp } from "@bufbuild/protobuf/wkt";
9
+
10
+ /**
11
+ * Describes the file kusinta/iot/webrtc/v1/command.proto.
12
+ */
13
+ export declare const file_kusinta_iot_webrtc_v1_command: GenFile;
14
+
15
+ /**
16
+ * Maps to Matter SetpointRaiseLower command (Thermostat cluster 0x0201).
17
+ *
18
+ * @generated from message kusinta.iot.webrtc.v1.ThermostatSetpointParams
19
+ */
20
+ export declare type ThermostatSetpointParams = Message<"kusinta.iot.webrtc.v1.ThermostatSetpointParams"> & {
21
+ /**
22
+ * SetpointAdjustMode: Heat=1, Cool=2, Both=3
23
+ *
24
+ * @generated from field: uint32 mode = 1;
25
+ */
26
+ mode: number;
27
+
28
+ /**
29
+ * centidegrees delta
30
+ *
31
+ * @generated from field: sint32 amount = 2;
32
+ */
33
+ amount: number;
34
+ };
35
+
36
+ /**
37
+ * Describes the message kusinta.iot.webrtc.v1.ThermostatSetpointParams.
38
+ * Use `create(ThermostatSetpointParamsSchema)` to create a new message.
39
+ */
40
+ export declare const ThermostatSetpointParamsSchema: GenMessage<ThermostatSetpointParams>;
41
+
42
+ /**
43
+ * Maps to Matter MoveToLevel command (Level Control cluster 0x0008).
44
+ *
45
+ * @generated from message kusinta.iot.webrtc.v1.LevelControlParams
46
+ */
47
+ export declare type LevelControlParams = Message<"kusinta.iot.webrtc.v1.LevelControlParams"> & {
48
+ /**
49
+ * 0–254
50
+ *
51
+ * @generated from field: uint32 level = 1;
52
+ */
53
+ level: number;
54
+
55
+ /**
56
+ * 100ms units
57
+ *
58
+ * @generated from field: uint32 transition_time = 2;
59
+ */
60
+ transitionTime: number;
61
+ };
62
+
63
+ /**
64
+ * Describes the message kusinta.iot.webrtc.v1.LevelControlParams.
65
+ * Use `create(LevelControlParamsSchema)` to create a new message.
66
+ */
67
+ export declare const LevelControlParamsSchema: GenMessage<LevelControlParams>;
68
+
69
+ /**
70
+ * Maps to Matter On and Off commands (On/Off cluster 0x0006).
71
+ *
72
+ * @generated from message kusinta.iot.webrtc.v1.OnOffParams
73
+ */
74
+ export declare type OnOffParams = Message<"kusinta.iot.webrtc.v1.OnOffParams"> & {
75
+ /**
76
+ * @generated from field: bool on = 1;
77
+ */
78
+ on: boolean;
79
+
80
+ /**
81
+ * @generated from field: bool toggle = 2;
82
+ */
83
+ toggle: boolean;
84
+ };
85
+
86
+ /**
87
+ * Describes the message kusinta.iot.webrtc.v1.OnOffParams.
88
+ * Use `create(OnOffParamsSchema)` to create a new message.
89
+ */
90
+ export declare const OnOffParamsSchema: GenMessage<OnOffParams>;
91
+
92
+ /**
93
+ * Maps to Matter GoToLiftPercentage command (Window Covering cluster 0x0102).
94
+ *
95
+ * @generated from message kusinta.iot.webrtc.v1.WindowCoveringLiftParams
96
+ */
97
+ export declare type WindowCoveringLiftParams = Message<"kusinta.iot.webrtc.v1.WindowCoveringLiftParams"> & {
98
+ /**
99
+ * 0–10000
100
+ *
101
+ * @generated from field: uint32 lift_percent100ths = 1;
102
+ */
103
+ liftPercent100ths: number;
104
+ };
105
+
106
+ /**
107
+ * Describes the message kusinta.iot.webrtc.v1.WindowCoveringLiftParams.
108
+ * Use `create(WindowCoveringLiftParamsSchema)` to create a new message.
109
+ */
110
+ export declare const WindowCoveringLiftParamsSchema: GenMessage<WindowCoveringLiftParams>;
111
+
112
+ /**
113
+ * Maps to Matter LockDoor/UnlockDoor commands (Door Lock cluster 0x0101).
114
+ *
115
+ * @generated from message kusinta.iot.webrtc.v1.DoorLockParams
116
+ */
117
+ export declare type DoorLockParams = Message<"kusinta.iot.webrtc.v1.DoorLockParams"> & {
118
+ /**
119
+ * Locked=1, Unlocked=2
120
+ *
121
+ * @generated from field: uint32 lock_state = 1;
122
+ */
123
+ lockState: number;
124
+
125
+ /**
126
+ * optional PIN
127
+ *
128
+ * @generated from field: string pin_code = 2;
129
+ */
130
+ pinCode: string;
131
+ };
132
+
133
+ /**
134
+ * Describes the message kusinta.iot.webrtc.v1.DoorLockParams.
135
+ * Use `create(DoorLockParamsSchema)` to create a new message.
136
+ */
137
+ export declare const DoorLockParamsSchema: GenMessage<DoorLockParams>;
138
+
139
+ /**
140
+ * @generated from message kusinta.iot.webrtc.v1.DeviceCommand
141
+ */
142
+ export declare type DeviceCommand = Message<"kusinta.iot.webrtc.v1.DeviceCommand"> & {
143
+ /**
144
+ * UUID, matched in CommandResult
145
+ *
146
+ * @generated from field: string command_id = 1;
147
+ */
148
+ commandId: string;
149
+
150
+ /**
151
+ * @generated from field: kusinta.iot.identity.v1.DeviceId device_id = 2;
152
+ */
153
+ deviceId?: DeviceId | undefined;
154
+
155
+ /**
156
+ * @generated from field: string cluster_id_hex = 3;
157
+ */
158
+ clusterIdHex: string;
159
+
160
+ /**
161
+ * PascalCase Matter command name
162
+ *
163
+ * @generated from field: string command_name = 4;
164
+ */
165
+ commandName: string;
166
+
167
+ /**
168
+ * @generated from oneof kusinta.iot.webrtc.v1.DeviceCommand.parameters
169
+ */
170
+ parameters: {
171
+ /**
172
+ * @generated from field: kusinta.iot.webrtc.v1.ThermostatSetpointParams thermostat_setpoint = 5;
173
+ */
174
+ value: ThermostatSetpointParams;
175
+ case: "thermostatSetpoint";
176
+ } | {
177
+ /**
178
+ * @generated from field: kusinta.iot.webrtc.v1.LevelControlParams level_control = 6;
179
+ */
180
+ value: LevelControlParams;
181
+ case: "levelControl";
182
+ } | {
183
+ /**
184
+ * @generated from field: kusinta.iot.webrtc.v1.OnOffParams on_off = 7;
185
+ */
186
+ value: OnOffParams;
187
+ case: "onOff";
188
+ } | {
189
+ /**
190
+ * @generated from field: kusinta.iot.webrtc.v1.WindowCoveringLiftParams window_covering_lift = 8;
191
+ */
192
+ value: WindowCoveringLiftParams;
193
+ case: "windowCoveringLift";
194
+ } | {
195
+ /**
196
+ * @generated from field: kusinta.iot.webrtc.v1.DoorLockParams door_lock = 9;
197
+ */
198
+ value: DoorLockParams;
199
+ case: "doorLock";
200
+ } | {
201
+ /**
202
+ * escape hatch for unsupported commands
203
+ *
204
+ * @generated from field: bytes raw_tlv = 99;
205
+ */
206
+ value: Uint8Array;
207
+ case: "rawTlv";
208
+ } | { case: undefined; value?: undefined };
209
+ };
210
+
211
+ /**
212
+ * Describes the message kusinta.iot.webrtc.v1.DeviceCommand.
213
+ * Use `create(DeviceCommandSchema)` to create a new message.
214
+ */
215
+ export declare const DeviceCommandSchema: GenMessage<DeviceCommand>;
216
+
217
+ /**
218
+ * @generated from message kusinta.iot.webrtc.v1.CommandError
219
+ */
220
+ export declare type CommandError = Message<"kusinta.iot.webrtc.v1.CommandError"> & {
221
+ /**
222
+ * @generated from field: string code = 1;
223
+ */
224
+ code: string;
225
+
226
+ /**
227
+ * @generated from field: string message = 2;
228
+ */
229
+ message: string;
230
+ };
231
+
232
+ /**
233
+ * Describes the message kusinta.iot.webrtc.v1.CommandError.
234
+ * Use `create(CommandErrorSchema)` to create a new message.
235
+ */
236
+ export declare const CommandErrorSchema: GenMessage<CommandError>;
237
+
238
+ /**
239
+ * CommandResult travels gateway → Flutter app (GatewayMessage) and
240
+ * connector → gateway (ConnectRequest via connector.proto import).
241
+ *
242
+ * @generated from message kusinta.iot.webrtc.v1.CommandResult
243
+ */
244
+ export declare type CommandResult = Message<"kusinta.iot.webrtc.v1.CommandResult"> & {
245
+ /**
246
+ * @generated from field: string command_id = 1;
247
+ */
248
+ commandId: string;
249
+
250
+ /**
251
+ * @generated from field: bool success = 2;
252
+ */
253
+ success: boolean;
254
+
255
+ /**
256
+ * @generated from field: kusinta.iot.webrtc.v1.CommandError error = 3;
257
+ */
258
+ error?: CommandError | undefined;
259
+
260
+ /**
261
+ * @generated from field: google.protobuf.Timestamp completed_at = 4;
262
+ */
263
+ completedAt?: Timestamp | undefined;
264
+ };
265
+
266
+ /**
267
+ * Describes the message kusinta.iot.webrtc.v1.CommandResult.
268
+ * Use `create(CommandResultSchema)` to create a new message.
269
+ */
270
+ export declare const CommandResultSchema: GenMessage<CommandResult>;
271
+
@@ -0,0 +1,70 @@
1
+ // @generated by protoc-gen-es v2.12.0 with parameter "target=js+dts"
2
+ // @generated from file kusinta/iot/webrtc/v1/command.proto (package kusinta.iot.webrtc.v1, syntax proto3)
3
+ /* eslint-disable */
4
+
5
+ import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
6
+ import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
7
+ import { file_kusinta_iot_identity_v1_identity } from "../../identity/v1/identity_pb";
8
+
9
+ /**
10
+ * Describes the file kusinta/iot/webrtc/v1/command.proto.
11
+ */
12
+ export const file_kusinta_iot_webrtc_v1_command = /*@__PURE__*/
13
+ fileDesc("CiNrdXNpbnRhL2lvdC93ZWJydGMvdjEvY29tbWFuZC5wcm90bxIVa3VzaW50YS5pb3Qud2VicnRjLnYxIjgKGFRoZXJtb3N0YXRTZXRwb2ludFBhcmFtcxIMCgRtb2RlGAEgASgNEg4KBmFtb3VudBgCIAEoESI8ChJMZXZlbENvbnRyb2xQYXJhbXMSDQoFbGV2ZWwYASABKA0SFwoPdHJhbnNpdGlvbl90aW1lGAIgASgNIikKC09uT2ZmUGFyYW1zEgoKAm9uGAEgASgIEg4KBnRvZ2dsZRgCIAEoCCI2ChhXaW5kb3dDb3ZlcmluZ0xpZnRQYXJhbXMSGgoSbGlmdF9wZXJjZW50MTAwdGhzGAEgASgNIjYKDkRvb3JMb2NrUGFyYW1zEhIKCmxvY2tfc3RhdGUYASABKA0SEAoIcGluX2NvZGUYAiABKAki/wMKDURldmljZUNvbW1hbmQSEgoKY29tbWFuZF9pZBgBIAEoCRI0CglkZXZpY2VfaWQYAiABKAsyIS5rdXNpbnRhLmlvdC5pZGVudGl0eS52MS5EZXZpY2VJZBIWCg5jbHVzdGVyX2lkX2hleBgDIAEoCRIUCgxjb21tYW5kX25hbWUYBCABKAkSTgoTdGhlcm1vc3RhdF9zZXRwb2ludBgFIAEoCzIvLmt1c2ludGEuaW90LndlYnJ0Yy52MS5UaGVybW9zdGF0U2V0cG9pbnRQYXJhbXNIABJCCg1sZXZlbF9jb250cm9sGAYgASgLMikua3VzaW50YS5pb3Qud2VicnRjLnYxLkxldmVsQ29udHJvbFBhcmFtc0gAEjQKBm9uX29mZhgHIAEoCzIiLmt1c2ludGEuaW90LndlYnJ0Yy52MS5Pbk9mZlBhcmFtc0gAEk8KFHdpbmRvd19jb3ZlcmluZ19saWZ0GAggASgLMi8ua3VzaW50YS5pb3Qud2VicnRjLnYxLldpbmRvd0NvdmVyaW5nTGlmdFBhcmFtc0gAEjoKCWRvb3JfbG9jaxgJIAEoCzIlLmt1c2ludGEuaW90LndlYnJ0Yy52MS5Eb29yTG9ja1BhcmFtc0gAEhEKB3Jhd190bHYYYyABKAxIAEIMCgpwYXJhbWV0ZXJzIi0KDENvbW1hbmRFcnJvchIMCgRjb2RlGAEgASgJEg8KB21lc3NhZ2UYAiABKAkimgEKDUNvbW1hbmRSZXN1bHQSEgoKY29tbWFuZF9pZBgBIAEoCRIPCgdzdWNjZXNzGAIgASgIEjIKBWVycm9yGAMgASgLMiMua3VzaW50YS5pb3Qud2VicnRjLnYxLkNvbW1hbmRFcnJvchIwCgxjb21wbGV0ZWRfYXQYBCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wQgJIAWIGcHJvdG8z", [file_google_protobuf_timestamp, file_kusinta_iot_identity_v1_identity]);
14
+
15
+ /**
16
+ * Describes the message kusinta.iot.webrtc.v1.ThermostatSetpointParams.
17
+ * Use `create(ThermostatSetpointParamsSchema)` to create a new message.
18
+ */
19
+ export const ThermostatSetpointParamsSchema = /*@__PURE__*/
20
+ messageDesc(file_kusinta_iot_webrtc_v1_command, 0);
21
+
22
+ /**
23
+ * Describes the message kusinta.iot.webrtc.v1.LevelControlParams.
24
+ * Use `create(LevelControlParamsSchema)` to create a new message.
25
+ */
26
+ export const LevelControlParamsSchema = /*@__PURE__*/
27
+ messageDesc(file_kusinta_iot_webrtc_v1_command, 1);
28
+
29
+ /**
30
+ * Describes the message kusinta.iot.webrtc.v1.OnOffParams.
31
+ * Use `create(OnOffParamsSchema)` to create a new message.
32
+ */
33
+ export const OnOffParamsSchema = /*@__PURE__*/
34
+ messageDesc(file_kusinta_iot_webrtc_v1_command, 2);
35
+
36
+ /**
37
+ * Describes the message kusinta.iot.webrtc.v1.WindowCoveringLiftParams.
38
+ * Use `create(WindowCoveringLiftParamsSchema)` to create a new message.
39
+ */
40
+ export const WindowCoveringLiftParamsSchema = /*@__PURE__*/
41
+ messageDesc(file_kusinta_iot_webrtc_v1_command, 3);
42
+
43
+ /**
44
+ * Describes the message kusinta.iot.webrtc.v1.DoorLockParams.
45
+ * Use `create(DoorLockParamsSchema)` to create a new message.
46
+ */
47
+ export const DoorLockParamsSchema = /*@__PURE__*/
48
+ messageDesc(file_kusinta_iot_webrtc_v1_command, 4);
49
+
50
+ /**
51
+ * Describes the message kusinta.iot.webrtc.v1.DeviceCommand.
52
+ * Use `create(DeviceCommandSchema)` to create a new message.
53
+ */
54
+ export const DeviceCommandSchema = /*@__PURE__*/
55
+ messageDesc(file_kusinta_iot_webrtc_v1_command, 5);
56
+
57
+ /**
58
+ * Describes the message kusinta.iot.webrtc.v1.CommandError.
59
+ * Use `create(CommandErrorSchema)` to create a new message.
60
+ */
61
+ export const CommandErrorSchema = /*@__PURE__*/
62
+ messageDesc(file_kusinta_iot_webrtc_v1_command, 6);
63
+
64
+ /**
65
+ * Describes the message kusinta.iot.webrtc.v1.CommandResult.
66
+ * Use `create(CommandResultSchema)` to create a new message.
67
+ */
68
+ export const CommandResultSchema = /*@__PURE__*/
69
+ messageDesc(file_kusinta_iot_webrtc_v1_command, 7);
70
+
@@ -0,0 +1,67 @@
1
+ // @generated by protoc-gen-es v2.12.0 with parameter "target=js+dts"
2
+ // @generated from file kusinta/iot/webrtc/v1/device_state.proto (package kusinta.iot.webrtc.v1, syntax proto3)
3
+ /* eslint-disable */
4
+
5
+ import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
6
+ import type { Message } from "@bufbuild/protobuf";
7
+ import type { Device } from "../../device/v1/device_pb";
8
+ import type { EffectivePermissions } from "../../access/v1/acl_pb";
9
+ import type { Timestamp } from "@bufbuild/protobuf/wkt";
10
+ import type { PropertyUpdate } from "../../device/v1/property_update_pb";
11
+
12
+ /**
13
+ * Describes the file kusinta/iot/webrtc/v1/device_state.proto.
14
+ */
15
+ export declare const file_kusinta_iot_webrtc_v1_device_state: GenFile;
16
+
17
+ /**
18
+ * Full device state sent to the Flutter app on initial WebRTC connection.
19
+ *
20
+ * @generated from message kusinta.iot.webrtc.v1.DeviceStateSnapshot
21
+ */
22
+ export declare type DeviceStateSnapshot = Message<"kusinta.iot.webrtc.v1.DeviceStateSnapshot"> & {
23
+ /**
24
+ * @generated from field: repeated kusinta.iot.device.v1.Device devices = 1;
25
+ */
26
+ devices: Device[];
27
+
28
+ /**
29
+ * @generated from field: kusinta.iot.access.v1.EffectivePermissions permissions = 2;
30
+ */
31
+ permissions?: EffectivePermissions | undefined;
32
+
33
+ /**
34
+ * @generated from field: google.protobuf.Timestamp snapshotted_at = 3;
35
+ */
36
+ snapshottedAt?: Timestamp | undefined;
37
+ };
38
+
39
+ /**
40
+ * Describes the message kusinta.iot.webrtc.v1.DeviceStateSnapshot.
41
+ * Use `create(DeviceStateSnapshotSchema)` to create a new message.
42
+ */
43
+ export declare const DeviceStateSnapshotSchema: GenMessage<DeviceStateSnapshot>;
44
+
45
+ /**
46
+ * Single property change event streamed to the Flutter app in real time.
47
+ *
48
+ * @generated from message kusinta.iot.webrtc.v1.DevicePropertyEvent
49
+ */
50
+ export declare type DevicePropertyEvent = Message<"kusinta.iot.webrtc.v1.DevicePropertyEvent"> & {
51
+ /**
52
+ * @generated from field: kusinta.iot.device.v1.PropertyUpdate update = 1;
53
+ */
54
+ update?: PropertyUpdate | undefined;
55
+
56
+ /**
57
+ * @generated from field: google.protobuf.Timestamp gateway_processed_at = 2;
58
+ */
59
+ gatewayProcessedAt?: Timestamp | undefined;
60
+ };
61
+
62
+ /**
63
+ * Describes the message kusinta.iot.webrtc.v1.DevicePropertyEvent.
64
+ * Use `create(DevicePropertyEventSchema)` to create a new message.
65
+ */
66
+ export declare const DevicePropertyEventSchema: GenMessage<DevicePropertyEvent>;
67
+
@@ -0,0 +1,30 @@
1
+ // @generated by protoc-gen-es v2.12.0 with parameter "target=js+dts"
2
+ // @generated from file kusinta/iot/webrtc/v1/device_state.proto (package kusinta.iot.webrtc.v1, syntax proto3)
3
+ /* eslint-disable */
4
+
5
+ import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
6
+ import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
7
+ import { file_kusinta_iot_device_v1_device } from "../../device/v1/device_pb";
8
+ import { file_kusinta_iot_device_v1_property_update } from "../../device/v1/property_update_pb";
9
+ import { file_kusinta_iot_access_v1_acl } from "../../access/v1/acl_pb";
10
+
11
+ /**
12
+ * Describes the file kusinta/iot/webrtc/v1/device_state.proto.
13
+ */
14
+ 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
+
17
+ /**
18
+ * Describes the message kusinta.iot.webrtc.v1.DeviceStateSnapshot.
19
+ * Use `create(DeviceStateSnapshotSchema)` to create a new message.
20
+ */
21
+ export const DeviceStateSnapshotSchema = /*@__PURE__*/
22
+ messageDesc(file_kusinta_iot_webrtc_v1_device_state, 0);
23
+
24
+ /**
25
+ * Describes the message kusinta.iot.webrtc.v1.DevicePropertyEvent.
26
+ * Use `create(DevicePropertyEventSchema)` to create a new message.
27
+ */
28
+ export const DevicePropertyEventSchema = /*@__PURE__*/
29
+ messageDesc(file_kusinta_iot_webrtc_v1_device_state, 1);
30
+
@@ -0,0 +1,210 @@
1
+ // @generated by protoc-gen-es v2.12.0 with parameter "target=js+dts"
2
+ // @generated from file kusinta/iot/webrtc/v1/envelope.proto (package kusinta.iot.webrtc.v1, syntax proto3)
3
+ /* eslint-disable */
4
+
5
+ import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
6
+ import type { Message } from "@bufbuild/protobuf";
7
+ import type { DeviceId } from "../../identity/v1/identity_pb";
8
+ 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";
12
+
13
+ /**
14
+ * Describes the file kusinta/iot/webrtc/v1/envelope.proto.
15
+ */
16
+ export declare const file_kusinta_iot_webrtc_v1_envelope: GenFile;
17
+
18
+ /**
19
+ * @generated from message kusinta.iot.webrtc.v1.Ping
20
+ */
21
+ export declare type Ping = Message<"kusinta.iot.webrtc.v1.Ping"> & {
22
+ };
23
+
24
+ /**
25
+ * Describes the message kusinta.iot.webrtc.v1.Ping.
26
+ * Use `create(PingSchema)` to create a new message.
27
+ */
28
+ export declare const PingSchema: GenMessage<Ping>;
29
+
30
+ /**
31
+ * @generated from message kusinta.iot.webrtc.v1.Pong
32
+ */
33
+ export declare type Pong = Message<"kusinta.iot.webrtc.v1.Pong"> & {
34
+ };
35
+
36
+ /**
37
+ * Describes the message kusinta.iot.webrtc.v1.Pong.
38
+ * Use `create(PongSchema)` to create a new message.
39
+ */
40
+ export declare const PongSchema: GenMessage<Pong>;
41
+
42
+ /**
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
+ * checks that gateway_id in the JWT matches this gateway, then extracts the role.
46
+ *
47
+ * @generated from message kusinta.iot.webrtc.v1.AppHandshake
48
+ */
49
+ export declare type AppHandshake = Message<"kusinta.iot.webrtc.v1.AppHandshake"> & {
50
+ /**
51
+ * @generated from field: string jwt = 1;
52
+ */
53
+ jwt: string;
54
+
55
+ /**
56
+ * @generated from field: repeated kusinta.iot.identity.v1.DeviceId subscribe_device_ids = 2;
57
+ */
58
+ subscribeDeviceIds: DeviceId[];
59
+ };
60
+
61
+ /**
62
+ * Describes the message kusinta.iot.webrtc.v1.AppHandshake.
63
+ * Use `create(AppHandshakeSchema)` to create a new message.
64
+ */
65
+ export declare const AppHandshakeSchema: GenMessage<AppHandshake>;
66
+
67
+ /**
68
+ * @generated from message kusinta.iot.webrtc.v1.PropertyReadRequest
69
+ */
70
+ export declare type PropertyReadRequest = Message<"kusinta.iot.webrtc.v1.PropertyReadRequest"> & {
71
+ /**
72
+ * @generated from field: kusinta.iot.identity.v1.DeviceId device_id = 1;
73
+ */
74
+ deviceId?: DeviceId | undefined;
75
+
76
+ /**
77
+ * @generated from field: string attribute_name = 2;
78
+ */
79
+ attributeName: string;
80
+
81
+ /**
82
+ * @generated from field: string cluster_id_hex = 3;
83
+ */
84
+ clusterIdHex: string;
85
+ };
86
+
87
+ /**
88
+ * Describes the message kusinta.iot.webrtc.v1.PropertyReadRequest.
89
+ * Use `create(PropertyReadRequestSchema)` to create a new message.
90
+ */
91
+ export declare const PropertyReadRequestSchema: GenMessage<PropertyReadRequest>;
92
+
93
+ /**
94
+ * GatewayMessage: gateway → Flutter app
95
+ *
96
+ * @generated from message kusinta.iot.webrtc.v1.GatewayMessage
97
+ */
98
+ export declare type GatewayMessage = Message<"kusinta.iot.webrtc.v1.GatewayMessage"> & {
99
+ /**
100
+ * @generated from field: string message_id = 1;
101
+ */
102
+ messageId: string;
103
+
104
+ /**
105
+ * @generated from field: google.protobuf.Timestamp sent_at = 2;
106
+ */
107
+ sentAt?: Timestamp | undefined;
108
+
109
+ /**
110
+ * @generated from oneof kusinta.iot.webrtc.v1.GatewayMessage.payload
111
+ */
112
+ payload: {
113
+ /**
114
+ * @generated from field: kusinta.iot.webrtc.v1.DeviceStateSnapshot state_snapshot = 3;
115
+ */
116
+ value: DeviceStateSnapshot;
117
+ case: "stateSnapshot";
118
+ } | {
119
+ /**
120
+ * @generated from field: kusinta.iot.webrtc.v1.DevicePropertyEvent property_event = 4;
121
+ */
122
+ value: DevicePropertyEvent;
123
+ case: "propertyEvent";
124
+ } | {
125
+ /**
126
+ * @generated from field: kusinta.iot.webrtc.v1.LivePermissionUpdate permission_update = 5;
127
+ */
128
+ value: LivePermissionUpdate;
129
+ case: "permissionUpdate";
130
+ } | {
131
+ /**
132
+ * @generated from field: kusinta.iot.webrtc.v1.CommandResult command_result = 6;
133
+ */
134
+ value: CommandResult;
135
+ case: "commandResult";
136
+ } | {
137
+ /**
138
+ * error description string
139
+ *
140
+ * @generated from field: string error = 7;
141
+ */
142
+ value: string;
143
+ case: "error";
144
+ } | {
145
+ /**
146
+ * @generated from field: kusinta.iot.webrtc.v1.Pong pong = 8;
147
+ */
148
+ value: Pong;
149
+ case: "pong";
150
+ } | { case: undefined; value?: undefined };
151
+ };
152
+
153
+ /**
154
+ * Describes the message kusinta.iot.webrtc.v1.GatewayMessage.
155
+ * Use `create(GatewayMessageSchema)` to create a new message.
156
+ */
157
+ export declare const GatewayMessageSchema: GenMessage<GatewayMessage>;
158
+
159
+ /**
160
+ * AppMessage: Flutter app → gateway
161
+ *
162
+ * @generated from message kusinta.iot.webrtc.v1.AppMessage
163
+ */
164
+ export declare type AppMessage = Message<"kusinta.iot.webrtc.v1.AppMessage"> & {
165
+ /**
166
+ * @generated from field: string message_id = 1;
167
+ */
168
+ messageId: string;
169
+
170
+ /**
171
+ * @generated from field: google.protobuf.Timestamp sent_at = 2;
172
+ */
173
+ sentAt?: Timestamp | undefined;
174
+
175
+ /**
176
+ * @generated from oneof kusinta.iot.webrtc.v1.AppMessage.payload
177
+ */
178
+ payload: {
179
+ /**
180
+ * @generated from field: kusinta.iot.webrtc.v1.AppHandshake handshake = 3;
181
+ */
182
+ value: AppHandshake;
183
+ case: "handshake";
184
+ } | {
185
+ /**
186
+ * @generated from field: kusinta.iot.webrtc.v1.DeviceCommand command = 4;
187
+ */
188
+ value: DeviceCommand;
189
+ case: "command";
190
+ } | {
191
+ /**
192
+ * @generated from field: kusinta.iot.webrtc.v1.PropertyReadRequest read_request = 5;
193
+ */
194
+ value: PropertyReadRequest;
195
+ case: "readRequest";
196
+ } | {
197
+ /**
198
+ * @generated from field: kusinta.iot.webrtc.v1.Ping ping = 6;
199
+ */
200
+ value: Ping;
201
+ case: "ping";
202
+ } | { case: undefined; value?: undefined };
203
+ };
204
+
205
+ /**
206
+ * Describes the message kusinta.iot.webrtc.v1.AppMessage.
207
+ * Use `create(AppMessageSchema)` to create a new message.
208
+ */
209
+ export declare const AppMessageSchema: GenMessage<AppMessage>;
210
+