@kusinta/iot-schema 0.1.0-beta.10 → 0.1.0-beta.11

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.10",
3
+ "version": "0.1.0-beta.11",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "files": ["src"],
@@ -21,6 +21,7 @@
21
21
  "./connector": "./src/kusinta/iot/connector/v1/connector_pb.js",
22
22
  "./connector/service": "./src/kusinta/iot/connector/v1/connector_service_pb.js",
23
23
  "./webrtc": "./src/kusinta/iot/webrtc/v1/envelope_pb.js",
24
+ "./webrtc/app-token": "./src/kusinta/iot/webrtc/v1/app_token_pb.js",
24
25
  "./registration": "./src/kusinta/iot/registration/v1/registration_pb.js",
25
26
  "./registration/service": "./src/kusinta/iot/registration/v1/registration_service_pb.js",
26
27
  "./signaling": "./src/kusinta/iot/signaling/v1/signaling_pb.js",
@@ -0,0 +1,81 @@
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
18
+ * mykusinta-api-server (which mints the token) and the gateway (which validates
19
+ * it locally against the mykusinta-api-server 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
+ *
34
+ * issuer: "mykusinta-api-server"
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
+ *
71
+ * @generated from field: kusinta.iot.access.v1.Role role = 6;
72
+ */
73
+ role: Role;
74
+ };
75
+
76
+ /**
77
+ * Describes the message kusinta.iot.webrtc.v1.AppTokenClaims.
78
+ * Use `create(AppTokenClaimsSchema)` to create a new message.
79
+ */
80
+ export declare const AppTokenClaimsSchema: GenMessage<AppTokenClaims>;
81
+
@@ -0,0 +1,21 @@
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("CiVrdXNpbnRhL2lvdC93ZWJydGMvdjEvYXBwX3Rva2VuLnByb3RvEhVrdXNpbnRhLmlvdC53ZWJydGMudjEitAEKDkFwcFRva2VuQ2xhaW1zEgsKA2lzcxgBIAEoCRILCgNhdWQYAiABKAkSCwoDc3ViGAMgASgJEicKA2lhdBgEIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASJwoDZXhwGAUgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIpCgRyb2xlGAYgASgOMhsua3VzaW50YS5pb3QuYWNjZXNzLnYxLlJvbGVCAkgBYgZwcm90bzM", [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
+
@@ -64,6 +64,10 @@ export declare const HandshakeRejectedSchema: GenMessage<HandshakeRejected>;
64
64
  */
65
65
  export declare type AppHandshake = Message<"kusinta.iot.webrtc.v1.AppHandshake"> & {
66
66
  /**
67
+ * Signed compact JWS. Its payload claims are documented by AppTokenClaims
68
+ * in app_token.proto — the shared contract between mykusinta-api-server
69
+ * (issuer) and the gateway (validator).
70
+ *
67
71
  * @generated from field: string jwt = 1;
68
72
  */
69
73
  jwt: string;