@kusinta/iot-schema 0.1.0-beta.2 → 0.1.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +49 -0
- package/package.json +10 -2
- package/src/kusinta/iot/access/v1/acl_pb.d.ts +3 -3
- package/src/kusinta/iot/access/v1/acl_pb.js +3 -3
- package/src/kusinta/iot/access/v1/roles_pb.d.ts +1 -1
- package/src/kusinta/iot/access/v1/roles_pb.js +1 -1
- package/src/kusinta/iot/common/v1/types_pb.d.ts +1 -1
- package/src/kusinta/iot/common/v1/types_pb.js +1 -1
- package/src/kusinta/iot/connector/v1/connector_pb.d.ts +31 -24
- package/src/kusinta/iot/connector/v1/connector_pb.js +16 -15
- package/src/kusinta/iot/connector/v1/connector_service_pb.d.ts +6 -6
- package/src/kusinta/iot/connector/v1/connector_service_pb.js +3 -3
- package/src/kusinta/iot/device/v1/descriptor_pb.d.ts +3 -3
- package/src/kusinta/iot/device/v1/descriptor_pb.js +3 -3
- package/src/kusinta/iot/device/v1/device_pb.d.ts +36 -4
- package/src/kusinta/iot/device/v1/device_pb.js +4 -4
- package/src/kusinta/iot/device/v1/matter_options_pb.d.ts +46 -0
- package/src/kusinta/iot/device/v1/matter_options_pb.js +50 -0
- package/src/kusinta/iot/device/v1/properties_pb.d.ts +175 -208
- package/src/kusinta/iot/device/v1/properties_pb.js +3 -2
- package/src/kusinta/iot/device/v1/property_update_pb.d.ts +38 -5
- package/src/kusinta/iot/device/v1/property_update_pb.js +2 -2
- package/src/kusinta/iot/identity/v1/identity_pb.d.ts +1 -1
- package/src/kusinta/iot/identity/v1/identity_pb.js +1 -1
- package/src/kusinta/iot/registration/v1/registration_pb.d.ts +170 -0
- package/src/kusinta/iot/registration/v1/registration_pb.js +61 -0
- package/src/kusinta/iot/registration/v1/registration_service_pb.d.ts +34 -0
- package/src/kusinta/iot/registration/v1/registration_service_pb.js +19 -0
- package/src/kusinta/iot/signaling/v1/signaling_pb.d.ts +320 -0
- package/src/kusinta/iot/signaling/v1/signaling_pb.js +83 -0
- package/src/kusinta/iot/signaling/v1/signaling_service_pb.d.ts +34 -0
- package/src/kusinta/iot/signaling/v1/signaling_service_pb.js +19 -0
- package/src/kusinta/iot/space/v1/space_pb.d.ts +3 -3
- package/src/kusinta/iot/space/v1/space_pb.js +3 -3
- package/src/kusinta/iot/vendor/homematic/v1/homematic_pb.d.ts +16 -11
- package/src/kusinta/iot/vendor/homematic/v1/homematic_pb.js +2 -2
- package/src/kusinta/iot/webrtc/v1/app_token_pb.d.ts +152 -0
- package/src/kusinta/iot/webrtc/v1/app_token_pb.js +28 -0
- package/src/kusinta/iot/webrtc/v1/command_pb.d.ts +4 -4
- package/src/kusinta/iot/webrtc/v1/command_pb.js +2 -2
- package/src/kusinta/iot/webrtc/v1/device_state_pb.d.ts +69 -6
- package/src/kusinta/iot/webrtc/v1/device_state_pb.js +20 -5
- package/src/kusinta/iot/webrtc/v1/envelope_pb.d.ts +365 -17
- package/src/kusinta/iot/webrtc/v1/envelope_pb.js +79 -11
- package/src/kusinta/iot/webrtc/v1/management_pb.d.ts +451 -0
- package/src/kusinta/iot/webrtc/v1/management_pb.js +106 -0
- package/src/kusinta/iot/webrtc/v1/permission_push_pb.d.ts +10 -4
- package/src/kusinta/iot/webrtc/v1/permission_push_pb.js +3 -3
- package/src/__tests__/access.test.js +0 -134
- package/src/__tests__/common.test.js +0 -29
- package/src/__tests__/connector.test.js +0 -144
- package/src/__tests__/device.test.js +0 -194
- package/src/__tests__/identity.test.js +0 -43
- package/src/__tests__/space.test.js +0 -54
- package/src/__tests__/vendor.test.js +0 -60
- package/src/__tests__/webrtc.test.js +0 -268
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
// @generated by protoc-gen-es v2.12.0 with parameter "target=js+dts,import_extension=js"
|
|
2
|
+
// @generated from file kusinta/iot/webrtc/v1/app_token.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 { Timestamp } from "@bufbuild/protobuf/wkt";
|
|
8
|
+
import type { Role } from "../../access/v1/roles_pb.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Describes the file kusinta/iot/webrtc/v1/app_token.proto.
|
|
12
|
+
*/
|
|
13
|
+
export declare const file_kusinta_iot_webrtc_v1_app_token: GenFile;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* AppTokenClaims is the contract for the payload of the JWT carried in
|
|
17
|
+
* AppHandshake.jwt. It is the single source of truth shared between the
|
|
18
|
+
* api-server (which mints the token) and the gateway (which validates it
|
|
19
|
+
* locally against the api-server's public key).
|
|
20
|
+
*
|
|
21
|
+
* This message is NOT sent on the wire — the wire value stays the signed,
|
|
22
|
+
* compact JWS string in AppHandshake.jwt. The fields here document the claim
|
|
23
|
+
* names and types each side must agree on. JWT libraries emit registered
|
|
24
|
+
* claims (iss/aud/sub) as flat strings and timestamps as NumericDate
|
|
25
|
+
* (seconds since the Unix epoch), so map to/from your native JWT library
|
|
26
|
+
* rather than serializing this message directly into the token.
|
|
27
|
+
*
|
|
28
|
+
* @generated from message kusinta.iot.webrtc.v1.AppTokenClaims
|
|
29
|
+
*/
|
|
30
|
+
export declare type AppTokenClaims = Message<"kusinta.iot.webrtc.v1.AppTokenClaims"> & {
|
|
31
|
+
/**
|
|
32
|
+
* Registered claims (RFC 7519).
|
|
33
|
+
* Issuer: the api-server's issuer identifier, agreed out of band. A fixed
|
|
34
|
+
* string both sides compare exactly — not derived from anything here.
|
|
35
|
+
*
|
|
36
|
+
* @generated from field: string iss = 1;
|
|
37
|
+
*/
|
|
38
|
+
iss: string;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* audience: the target GatewayId value
|
|
42
|
+
*
|
|
43
|
+
* @generated from field: string aud = 2;
|
|
44
|
+
*/
|
|
45
|
+
aud: string;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* subject: the UserId value
|
|
49
|
+
*
|
|
50
|
+
* @generated from field: string sub = 3;
|
|
51
|
+
*/
|
|
52
|
+
sub: string;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* issued-at (JWT NumericDate on the wire)
|
|
56
|
+
*
|
|
57
|
+
* @generated from field: google.protobuf.Timestamp iat = 4;
|
|
58
|
+
*/
|
|
59
|
+
iat?: Timestamp | undefined;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* expiry (JWT NumericDate on the wire)
|
|
63
|
+
*
|
|
64
|
+
* @generated from field: google.protobuf.Timestamp exp = 5;
|
|
65
|
+
*/
|
|
66
|
+
exp?: Timestamp | undefined;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Custom claims.
|
|
70
|
+
* A user may hold several roles at once (e.g. resident + gateway admin), so
|
|
71
|
+
* this is a list. Carried in the JWT as an array of enum NAME strings
|
|
72
|
+
* (e.g. ["ROLE_RESIDENT", "ROLE_GATEWAY_ADMIN"]), matching proto3 canonical
|
|
73
|
+
* JSON enum encoding — not integer values. This keeps the claim
|
|
74
|
+
* self-describing and aligns with text-typed role storage on the api-server.
|
|
75
|
+
*
|
|
76
|
+
* @generated from field: repeated kusinta.iot.access.v1.Role roles = 6;
|
|
77
|
+
*/
|
|
78
|
+
roles: Role[];
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* RFC 7800 confirmation claim. Binds the token to the DTLS certificate of the
|
|
82
|
+
* connection it may be presented on: the validator compares this against the
|
|
83
|
+
* fingerprint of the live peer and rejects on mismatch, so a token replayed on
|
|
84
|
+
* a different connection is not usable. Without it the token is a pure bearer
|
|
85
|
+
* credential — possession alone is the whole proof.
|
|
86
|
+
*
|
|
87
|
+
* Carried in the JWT as the nested object RFC 7800 specifies:
|
|
88
|
+
* "cnf": { "x5t#S256": "<base64url SHA-256 thumbprint of the peer's DER certificate>" }
|
|
89
|
+
*
|
|
90
|
+
* MANDATORY. The issuer MUST set it on every token, and the validator MUST
|
|
91
|
+
* reject a token that arrives without one. proto3 cannot express that, and
|
|
92
|
+
* the claim is a JSON object in a JWT rather than a field on this message on
|
|
93
|
+
* the wire, so nothing mechanical enforces it — it is a contract both sides
|
|
94
|
+
* implement or the binding is worthless. A validator that treats an absent
|
|
95
|
+
* cnf as "fall back to bearer" reopens the exact replay this claim closes,
|
|
96
|
+
* and gives any holder of a stolen token a way to opt out of the check by
|
|
97
|
+
* stripping it.
|
|
98
|
+
*
|
|
99
|
+
* Rollout order, since a mandatory claim cannot appear on both sides at once:
|
|
100
|
+
* the api-server must be issuing cnf on every token BEFORE the gateway begins
|
|
101
|
+
* rejecting tokens that lack it. Reverse that order and every live session is
|
|
102
|
+
* refused. Tokens are short-TTL, so the gap between the two deployments need
|
|
103
|
+
* only exceed one token lifetime.
|
|
104
|
+
*
|
|
105
|
+
* @generated from field: kusinta.iot.webrtc.v1.Confirmation cnf = 7;
|
|
106
|
+
*/
|
|
107
|
+
cnf?: Confirmation | undefined;
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Describes the message kusinta.iot.webrtc.v1.AppTokenClaims.
|
|
112
|
+
* Use `create(AppTokenClaimsSchema)` to create a new message.
|
|
113
|
+
*/
|
|
114
|
+
export declare const AppTokenClaimsSchema: GenMessage<AppTokenClaims>;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* RFC 7800 confirmation, the value of the "cnf" claim. A separate message
|
|
118
|
+
* because the claim is a nested JSON object in the token, not a flat string.
|
|
119
|
+
*
|
|
120
|
+
* @generated from message kusinta.iot.webrtc.v1.Confirmation
|
|
121
|
+
*/
|
|
122
|
+
export declare type Confirmation = Message<"kusinta.iot.webrtc.v1.Confirmation"> & {
|
|
123
|
+
/**
|
|
124
|
+
* JWT claim name "x5t#S256" — the proto field cannot carry the "#", so the
|
|
125
|
+
* mapping to and from the JWT is by hand on both sides.
|
|
126
|
+
*
|
|
127
|
+
* ENCODING, pinned deliberately: base64url (unpadded) of the SHA-256 digest
|
|
128
|
+
* over the peer's DER-encoded certificate. WebRTC stacks hand you the same
|
|
129
|
+
* digest in the SDP `a=fingerprint:sha-256` attribute in a DIFFERENT form —
|
|
130
|
+
* uppercase, colon-separated hex — and the two will never compare equal.
|
|
131
|
+
* Issuer and validator must both normalise to the base64url form here; left
|
|
132
|
+
* unstated, each side can derive a correct value and never match.
|
|
133
|
+
*
|
|
134
|
+
* A DTLS fingerprint names a CERTIFICATE, not a connection: WebRTC permits
|
|
135
|
+
* reusing one certificate across several peer connections, and a new
|
|
136
|
+
* connection normally brings a new certificate. It is therefore neither
|
|
137
|
+
* unique per connection nor stable across reconnects, and must not be used as
|
|
138
|
+
* a session or connection key. It is a credential — it proves the peer holds
|
|
139
|
+
* the private key for the certificate the token was issued against, which is
|
|
140
|
+
* exactly and only what a confirmation claim needs.
|
|
141
|
+
*
|
|
142
|
+
* @generated from field: string x5t_s256 = 1;
|
|
143
|
+
*/
|
|
144
|
+
x5tS256: string;
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Describes the message kusinta.iot.webrtc.v1.Confirmation.
|
|
149
|
+
* Use `create(ConfirmationSchema)` to create a new message.
|
|
150
|
+
*/
|
|
151
|
+
export declare const ConfirmationSchema: GenMessage<Confirmation>;
|
|
152
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// @generated by protoc-gen-es v2.12.0 with parameter "target=js+dts,import_extension=js"
|
|
2
|
+
// @generated from file kusinta/iot/webrtc/v1/app_token.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_access_v1_roles } from "../../access/v1/roles_pb.js";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Describes the file kusinta/iot/webrtc/v1/app_token.proto.
|
|
11
|
+
*/
|
|
12
|
+
export const file_kusinta_iot_webrtc_v1_app_token = /*@__PURE__*/
|
|
13
|
+
fileDesc("CiVrdXNpbnRhL2lvdC93ZWJydGMvdjEvYXBwX3Rva2VuLnByb3RvEhVrdXNpbnRhLmlvdC53ZWJydGMudjEi5wEKDkFwcFRva2VuQ2xhaW1zEgsKA2lzcxgBIAEoCRILCgNhdWQYAiABKAkSCwoDc3ViGAMgASgJEicKA2lhdBgEIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASJwoDZXhwGAUgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIqCgVyb2xlcxgGIAMoDjIbLmt1c2ludGEuaW90LmFjY2Vzcy52MS5Sb2xlEjAKA2NuZhgHIAEoCzIjLmt1c2ludGEuaW90LndlYnJ0Yy52MS5Db25maXJtYXRpb24iIAoMQ29uZmlybWF0aW9uEhAKCHg1dF9zMjU2GAEgASgJQgJIAWIGcHJvdG8z", [file_google_protobuf_timestamp, file_kusinta_iot_access_v1_roles]);
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Describes the message kusinta.iot.webrtc.v1.AppTokenClaims.
|
|
17
|
+
* Use `create(AppTokenClaimsSchema)` to create a new message.
|
|
18
|
+
*/
|
|
19
|
+
export const AppTokenClaimsSchema = /*@__PURE__*/
|
|
20
|
+
messageDesc(file_kusinta_iot_webrtc_v1_app_token, 0);
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Describes the message kusinta.iot.webrtc.v1.Confirmation.
|
|
24
|
+
* Use `create(ConfirmationSchema)` to create a new message.
|
|
25
|
+
*/
|
|
26
|
+
export const ConfirmationSchema = /*@__PURE__*/
|
|
27
|
+
messageDesc(file_kusinta_iot_webrtc_v1_app_token, 1);
|
|
28
|
+
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
// @generated by protoc-gen-es v2.12.0 with parameter "target=js+dts"
|
|
1
|
+
// @generated by protoc-gen-es v2.12.0 with parameter "target=js+dts,import_extension=js"
|
|
2
2
|
// @generated from file kusinta/iot/webrtc/v1/command.proto (package kusinta.iot.webrtc.v1, syntax proto3)
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
|
|
5
5
|
import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
|
|
6
6
|
import type { Message } from "@bufbuild/protobuf";
|
|
7
|
-
import type { DeviceId } from "../../identity/v1/identity_pb";
|
|
7
|
+
import type { DeviceId } from "../../identity/v1/identity_pb.js";
|
|
8
8
|
import type { Timestamp } from "@bufbuild/protobuf/wkt";
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -236,8 +236,8 @@ export declare type CommandError = Message<"kusinta.iot.webrtc.v1.CommandError">
|
|
|
236
236
|
export declare const CommandErrorSchema: GenMessage<CommandError>;
|
|
237
237
|
|
|
238
238
|
/**
|
|
239
|
-
* CommandResult travels gateway →
|
|
240
|
-
* connector → gateway (
|
|
239
|
+
* CommandResult travels gateway → app (GatewayMessage) and
|
|
240
|
+
* connector → gateway (SessionRequest via connector.proto import).
|
|
241
241
|
*
|
|
242
242
|
* @generated from message kusinta.iot.webrtc.v1.CommandResult
|
|
243
243
|
*/
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
// @generated by protoc-gen-es v2.12.0 with parameter "target=js+dts"
|
|
1
|
+
// @generated by protoc-gen-es v2.12.0 with parameter "target=js+dts,import_extension=js"
|
|
2
2
|
// @generated from file kusinta/iot/webrtc/v1/command.proto (package kusinta.iot.webrtc.v1, syntax proto3)
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
|
|
5
5
|
import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
|
|
6
6
|
import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
|
|
7
|
-
import { file_kusinta_iot_identity_v1_identity } from "../../identity/v1/identity_pb";
|
|
7
|
+
import { file_kusinta_iot_identity_v1_identity } from "../../identity/v1/identity_pb.js";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Describes the file kusinta/iot/webrtc/v1/command.proto.
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
// @generated by protoc-gen-es v2.12.0 with parameter "target=js+dts"
|
|
1
|
+
// @generated by protoc-gen-es v2.12.0 with parameter "target=js+dts,import_extension=js"
|
|
2
2
|
// @generated from file kusinta/iot/webrtc/v1/device_state.proto (package kusinta.iot.webrtc.v1, syntax proto3)
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
|
|
5
5
|
import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
|
|
6
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";
|
|
7
|
+
import type { Device } from "../../device/v1/device_pb.js";
|
|
8
|
+
import type { EffectivePermissions } from "../../access/v1/acl_pb.js";
|
|
9
9
|
import type { Timestamp } from "@bufbuild/protobuf/wkt";
|
|
10
|
-
import type { PropertyUpdate } from "../../device/v1/property_update_pb";
|
|
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.
|
|
@@ -15,7 +16,7 @@ import type { PropertyUpdate } from "../../device/v1/property_update_pb";
|
|
|
15
16
|
export declare const file_kusinta_iot_webrtc_v1_device_state: GenFile;
|
|
16
17
|
|
|
17
18
|
/**
|
|
18
|
-
* Full device state sent to the
|
|
19
|
+
* Full device state sent to the app on initial WebRTC connection.
|
|
19
20
|
*
|
|
20
21
|
* @generated from message kusinta.iot.webrtc.v1.DeviceStateSnapshot
|
|
21
22
|
*/
|
|
@@ -43,7 +44,7 @@ export declare type DeviceStateSnapshot = Message<"kusinta.iot.webrtc.v1.DeviceS
|
|
|
43
44
|
export declare const DeviceStateSnapshotSchema: GenMessage<DeviceStateSnapshot>;
|
|
44
45
|
|
|
45
46
|
/**
|
|
46
|
-
* Single property change event streamed to the
|
|
47
|
+
* Single property change event streamed to the app in real time.
|
|
47
48
|
*
|
|
48
49
|
* @generated from message kusinta.iot.webrtc.v1.DevicePropertyEvent
|
|
49
50
|
*/
|
|
@@ -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
|
+
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
// @generated by protoc-gen-es v2.12.0 with parameter "target=js+dts"
|
|
1
|
+
// @generated by protoc-gen-es v2.12.0 with parameter "target=js+dts,import_extension=js"
|
|
2
2
|
// @generated from file kusinta/iot/webrtc/v1/device_state.proto (package kusinta.iot.webrtc.v1, syntax proto3)
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
|
|
5
5
|
import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
|
|
6
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";
|
|
7
|
+
import { file_kusinta_iot_device_v1_device } from "../../device/v1/device_pb.js";
|
|
8
|
+
import { file_kusinta_iot_device_v1_property_update } from "../../device/v1/property_update_pb.js";
|
|
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("
|
|
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
|
+
|