@kusinta/iot-schema 0.2.0-beta.6 → 0.2.0-beta.60
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 +44 -29
- package/src/kusinta/iot/access/v1/acl_pb.d.ts +146 -2
- package/src/kusinta/iot/access/v1/acl_pb.js +19 -2
- package/src/kusinta/iot/access/v1/roles_pb.d.ts +160 -4
- package/src/kusinta/iot/access/v1/roles_pb.js +128 -5
- package/src/kusinta/iot/accountlink/v1/account_link_pb.d.ts +591 -0
- package/src/kusinta/iot/accountlink/v1/account_link_pb.js +160 -0
- package/src/kusinta/iot/climate/v1/climate_pb.d.ts +1695 -0
- package/src/kusinta/iot/climate/v1/climate_pb.js +292 -0
- package/src/kusinta/iot/commissioning/v1/commissioning_pb.d.ts +1642 -0
- package/src/kusinta/iot/commissioning/v1/commissioning_pb.js +339 -0
- package/src/kusinta/iot/common/v1/pairing_pb.d.ts +24 -4
- package/src/kusinta/iot/common/v1/pairing_pb.js +1 -1
- package/src/kusinta/iot/common/v1/types_pb.d.ts +235 -0
- package/src/kusinta/iot/common/v1/types_pb.js +84 -2
- package/src/kusinta/iot/connector/v1/connector_pb.d.ts +713 -3
- package/src/kusinta/iot/connector/v1/connector_pb.js +107 -16
- package/src/kusinta/iot/device/v1/cluster_state_pb.d.ts +213 -1
- package/src/kusinta/iot/device/v1/cluster_state_pb.js +37 -2
- package/src/kusinta/iot/device/v1/descriptor_pb.d.ts +32 -4
- package/src/kusinta/iot/device/v1/descriptor_pb.js +2 -1
- package/src/kusinta/iot/device/v1/device_event_pb.d.ts +89 -5
- package/src/kusinta/iot/device/v1/device_event_pb.js +1 -1
- package/src/kusinta/iot/device/v1/device_pb.d.ts +444 -11
- package/src/kusinta/iot/device/v1/device_pb.js +74 -2
- package/src/kusinta/iot/device/v1/properties_pb.d.ts +26 -5
- package/src/kusinta/iot/device/v1/properties_pb.js +1 -1
- package/src/kusinta/iot/device/v1/property_update_pb.d.ts +46 -2
- package/src/kusinta/iot/device/v1/property_update_pb.js +2 -1
- package/src/kusinta/iot/heating/v1/heating_pb.d.ts +659 -0
- package/src/kusinta/iot/heating/v1/heating_pb.js +119 -0
- package/src/kusinta/iot/link/v1/link_pb.d.ts +438 -0
- package/src/kusinta/iot/link/v1/link_pb.js +121 -0
- package/src/kusinta/iot/planning/v1/planning_pb.d.ts +199 -0
- package/src/kusinta/iot/planning/v1/planning_pb.js +48 -0
- package/src/kusinta/iot/planning/v1/planning_service_pb.d.ts +121 -0
- package/src/kusinta/iot/planning/v1/planning_service_pb.js +38 -0
- package/src/kusinta/iot/registration/v1/registration_pb.d.ts +18 -0
- package/src/kusinta/iot/registration/v1/registration_pb.js +1 -1
- package/src/kusinta/iot/reporting/v1/reporting_pb.d.ts +1263 -0
- package/src/kusinta/iot/reporting/v1/reporting_pb.js +238 -0
- package/src/kusinta/iot/reporting/v1/reporting_service_pb.d.ts +63 -0
- package/src/kusinta/iot/reporting/v1/reporting_service_pb.js +24 -0
- package/src/kusinta/iot/signaling/v1/signaling_pb.d.ts +939 -7
- package/src/kusinta/iot/signaling/v1/signaling_pb.js +163 -4
- package/src/kusinta/iot/signaling/v1/signaling_service_pb.d.ts +24 -1
- package/src/kusinta/iot/signaling/v1/signaling_service_pb.js +1 -1
- package/src/kusinta/iot/space/v1/space_pb.d.ts +218 -3
- package/src/kusinta/iot/space/v1/space_pb.js +25 -2
- package/src/kusinta/iot/vendor/homematic/v1/homematic_pb.d.ts +15 -0
- package/src/kusinta/iot/vendor/homematic/v1/homematic_pb.js +1 -1
- package/src/kusinta/iot/vendor/lorawan/v1/lorawan_pb.d.ts +69 -0
- package/src/kusinta/iot/vendor/lorawan/v1/lorawan_pb.js +19 -0
- package/src/kusinta/iot/vendor/v1/vendor_options_pb.d.ts +5 -4
- package/src/kusinta/iot/vendor/v1/vendor_options_pb.js +5 -4
- package/src/kusinta/iot/webrtc/v1/app_token_pb.d.ts +48 -5
- package/src/kusinta/iot/webrtc/v1/app_token_pb.js +1 -1
- package/src/kusinta/iot/webrtc/v1/command_pb.d.ts +56 -0
- package/src/kusinta/iot/webrtc/v1/command_pb.js +1 -1
- package/src/kusinta/iot/webrtc/v1/device_state_pb.d.ts +179 -5
- package/src/kusinta/iot/webrtc/v1/device_state_pb.js +34 -5
- package/src/kusinta/iot/webrtc/v1/envelope_pb.d.ts +603 -13
- package/src/kusinta/iot/webrtc/v1/envelope_pb.js +61 -4
- package/src/kusinta/iot/webrtc/v1/household_pb.d.ts +613 -0
- package/src/kusinta/iot/webrtc/v1/household_pb.js +134 -0
- package/src/kusinta/iot/webrtc/v1/invite_pb.d.ts +502 -0
- package/src/kusinta/iot/webrtc/v1/invite_pb.js +108 -0
- package/src/kusinta/iot/webrtc/v1/management_pb.d.ts +2595 -75
- package/src/kusinta/iot/webrtc/v1/management_pb.js +382 -5
- package/src/kusinta/iot/webrtc/v1/members_pb.d.ts +582 -0
- package/src/kusinta/iot/webrtc/v1/members_pb.js +113 -0
- package/src/kusinta/iot/webrtc/v1/permission_push_pb.d.ts +66 -4
- package/src/kusinta/iot/webrtc/v1/permission_push_pb.js +9 -1
|
@@ -0,0 +1,591 @@
|
|
|
1
|
+
// @generated by protoc-gen-es v2.12.0 with parameter "target=js+dts,import_extension=js"
|
|
2
|
+
// @generated from file kusinta/iot/accountlink/v1/account_link.proto (package kusinta.iot.accountlink.v1, syntax proto3)
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
|
|
5
|
+
import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
|
|
6
|
+
import type { Message } from "@bufbuild/protobuf";
|
|
7
|
+
import type { Duration, Timestamp } from "@bufbuild/protobuf/wkt";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Describes the file kusinta/iot/accountlink/v1/account_link.proto.
|
|
11
|
+
*/
|
|
12
|
+
export declare const file_kusinta_iot_accountlink_v1_account_link: GenFile;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* A home's link at one service, as its residents see it: never its tokens or the account's
|
|
16
|
+
* name.
|
|
17
|
+
*
|
|
18
|
+
* @generated from message kusinta.iot.accountlink.v1.AccountLink
|
|
19
|
+
*/
|
|
20
|
+
export declare type AccountLink = Message<"kusinta.iot.accountlink.v1.AccountLink"> & {
|
|
21
|
+
/**
|
|
22
|
+
* @generated from field: kusinta.iot.accountlink.v1.LinkedService service = 1;
|
|
23
|
+
*/
|
|
24
|
+
service: LinkedService;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @generated from field: kusinta.iot.accountlink.v1.AccountLinkStatus status = 2;
|
|
28
|
+
*/
|
|
29
|
+
status: AccountLinkStatus;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @generated from field: google.protobuf.Timestamp linked_since = 3;
|
|
33
|
+
*/
|
|
34
|
+
linkedSince?: Timestamp | undefined;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Describes the message kusinta.iot.accountlink.v1.AccountLink.
|
|
39
|
+
* Use `create(AccountLinkSchema)` to create a new message.
|
|
40
|
+
*/
|
|
41
|
+
export declare const AccountLinkSchema: GenMessage<AccountLink>;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* A home's links, in reply to ListAccountLinks. A service with no link is not listed.
|
|
45
|
+
*
|
|
46
|
+
* @generated from message kusinta.iot.accountlink.v1.AccountLinks
|
|
47
|
+
*/
|
|
48
|
+
export declare type AccountLinks = Message<"kusinta.iot.accountlink.v1.AccountLinks"> & {
|
|
49
|
+
/**
|
|
50
|
+
* @generated from field: repeated kusinta.iot.accountlink.v1.AccountLink links = 1;
|
|
51
|
+
*/
|
|
52
|
+
links: AccountLink[];
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Describes the message kusinta.iot.accountlink.v1.AccountLinks.
|
|
57
|
+
* Use `create(AccountLinksSchema)` to create a new message.
|
|
58
|
+
*/
|
|
59
|
+
export declare const AccountLinksSchema: GenMessage<AccountLinks>;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* A single-use nonce for one home's link, in reply to RequestAccountLinkNonce: a compact JWS
|
|
63
|
+
* carrying AccountLinkNonceClaims, signed by the gateway. It passes between the gateway, the
|
|
64
|
+
* app and the api-server only; the service sees its hash (see the file comment). It names no
|
|
65
|
+
* home: the gateway records which home each jti was issued for.
|
|
66
|
+
*
|
|
67
|
+
* @generated from message kusinta.iot.accountlink.v1.AccountLinkNonce
|
|
68
|
+
*/
|
|
69
|
+
export declare type AccountLinkNonce = Message<"kusinta.iot.accountlink.v1.AccountLinkNonce"> & {
|
|
70
|
+
/**
|
|
71
|
+
* @generated from field: string nonce = 1;
|
|
72
|
+
*/
|
|
73
|
+
nonce: string;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* As the claims' exp.
|
|
77
|
+
*
|
|
78
|
+
* @generated from field: google.protobuf.Timestamp expires_at = 2;
|
|
79
|
+
*/
|
|
80
|
+
expiresAt?: Timestamp | undefined;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Describes the message kusinta.iot.accountlink.v1.AccountLinkNonce.
|
|
85
|
+
* Use `create(AccountLinkNonceSchema)` to create a new message.
|
|
86
|
+
*/
|
|
87
|
+
export declare const AccountLinkNonceSchema: GenMessage<AccountLinkNonce>;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* The contract for the claims of AccountLinkNonce.nonce, shared by the gateway, which signs
|
|
91
|
+
* it, and the api-server, which verifies it. NOT sent on the wire, like
|
|
92
|
+
* webrtc.v1.AppTokenClaims: registered claims are flat JWT strings and NumericDates.
|
|
93
|
+
*
|
|
94
|
+
* Signed with the private key of the gateway's client certificate — the one it connects to
|
|
95
|
+
* the api-server with, a P-256 key — as ES256. The JWS header carries "x5t#S256", the
|
|
96
|
+
* thumbprint of that certificate, so the api-server finds it across a renewal. A verifier
|
|
97
|
+
* MUST refuse any other "alg".
|
|
98
|
+
*
|
|
99
|
+
* Before it calls the service, the api-server MUST verify that the gateway named by iss is
|
|
100
|
+
* registered and neither deleted nor wiped, that the certificate the thumbprint names is its
|
|
101
|
+
* current certificate — or the one it replaced, for no more than 10 minutes after the
|
|
102
|
+
* renewal — and the signature by it, aud, svc and exp, and that sub is the user posting the
|
|
103
|
+
* code. When the grant comes back, the gateway MUST verify the signature by its own key —
|
|
104
|
+
* its current one, or the one it replaced for no more than 10 minutes after the renewal —
|
|
105
|
+
* that iss is itself, aud and exp, and then accept the nonce once, by its jti, for the home
|
|
106
|
+
* it recorded for that jti, and only while that user is still a household admin of the
|
|
107
|
+
* home. Both sides allow at most 60 seconds of clock skew on exp. A gateway that restarts
|
|
108
|
+
* mid-link may have lost its jti record and answer REJECTED; the household links again.
|
|
109
|
+
*
|
|
110
|
+
* @generated from message kusinta.iot.accountlink.v1.AccountLinkNonceClaims
|
|
111
|
+
*/
|
|
112
|
+
export declare type AccountLinkNonceClaims = Message<"kusinta.iot.accountlink.v1.AccountLinkNonceClaims"> & {
|
|
113
|
+
/**
|
|
114
|
+
* The gateway's id (identity.v1.GatewayId value).
|
|
115
|
+
*
|
|
116
|
+
* @generated from field: string iss = 1;
|
|
117
|
+
*/
|
|
118
|
+
iss: string;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Always "account-link".
|
|
122
|
+
*
|
|
123
|
+
* @generated from field: string aud = 2;
|
|
124
|
+
*/
|
|
125
|
+
aud: string;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* The user it was issued to (identity.v1.UserId value).
|
|
129
|
+
*
|
|
130
|
+
* @generated from field: string sub = 3;
|
|
131
|
+
*/
|
|
132
|
+
sub: string;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* @generated from field: google.protobuf.Timestamp iat = 4;
|
|
136
|
+
*/
|
|
137
|
+
iat?: Timestamp | undefined;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* No more than 10 minutes after iat.
|
|
141
|
+
*
|
|
142
|
+
* @generated from field: google.protobuf.Timestamp exp = 5;
|
|
143
|
+
*/
|
|
144
|
+
exp?: Timestamp | undefined;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Unique among the gateway's nonces, and not guessable.
|
|
148
|
+
*
|
|
149
|
+
* @generated from field: string jti = 6;
|
|
150
|
+
*/
|
|
151
|
+
jti: string;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* The service, by its claim value (see LinkedService).
|
|
155
|
+
*
|
|
156
|
+
* @generated from field: string svc = 8;
|
|
157
|
+
*/
|
|
158
|
+
svc: string;
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Describes the message kusinta.iot.accountlink.v1.AccountLinkNonceClaims.
|
|
163
|
+
* Use `create(AccountLinkNonceClaimsSchema)` to create a new message.
|
|
164
|
+
*/
|
|
165
|
+
export declare const AccountLinkNonceClaimsSchema: GenMessage<AccountLinkNonceClaims>;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* An access token and what it allows: all a reader of the service needs, without the means
|
|
169
|
+
* to renew it.
|
|
170
|
+
*
|
|
171
|
+
* @generated from message kusinta.iot.accountlink.v1.AccessGrant
|
|
172
|
+
*/
|
|
173
|
+
export declare type AccessGrant = Message<"kusinta.iot.accountlink.v1.AccessGrant"> & {
|
|
174
|
+
/**
|
|
175
|
+
* @generated from field: string access_token = 1;
|
|
176
|
+
*/
|
|
177
|
+
accessToken: string;
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* @generated from field: google.protobuf.Timestamp expires_at = 2;
|
|
181
|
+
*/
|
|
182
|
+
expiresAt?: Timestamp | undefined;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* As granted, space-separated.
|
|
186
|
+
*
|
|
187
|
+
* @generated from field: string scope = 3;
|
|
188
|
+
*/
|
|
189
|
+
scope: string;
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Describes the message kusinta.iot.accountlink.v1.AccessGrant.
|
|
194
|
+
* Use `create(AccessGrantSchema)` to create a new message.
|
|
195
|
+
*/
|
|
196
|
+
export declare const AccessGrantSchema: GenMessage<AccessGrant>;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* A grant with its refresh token, which stays on the gateway.
|
|
200
|
+
*
|
|
201
|
+
* @generated from message kusinta.iot.accountlink.v1.TokenGrant
|
|
202
|
+
*/
|
|
203
|
+
export declare type TokenGrant = Message<"kusinta.iot.accountlink.v1.TokenGrant"> & {
|
|
204
|
+
/**
|
|
205
|
+
* @generated from field: kusinta.iot.accountlink.v1.AccessGrant access = 1;
|
|
206
|
+
*/
|
|
207
|
+
access?: AccessGrant | undefined;
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* @generated from field: string refresh_token = 2;
|
|
211
|
+
*/
|
|
212
|
+
refreshToken: string;
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Describes the message kusinta.iot.accountlink.v1.TokenGrant.
|
|
217
|
+
* Use `create(TokenGrantSchema)` to create a new message.
|
|
218
|
+
*/
|
|
219
|
+
export declare const TokenGrantSchema: GenMessage<TokenGrant>;
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* A home's account linked, api-server → gateway. Answered with an AccountLinkResult carrying
|
|
223
|
+
* the same request_id. With no answer within 30 seconds, the api-server sends an
|
|
224
|
+
* AccountLinkCancelled, revokes the grant, and tells the app the link failed.
|
|
225
|
+
*
|
|
226
|
+
* @generated from message kusinta.iot.accountlink.v1.AccountLinked
|
|
227
|
+
*/
|
|
228
|
+
export declare type AccountLinked = Message<"kusinta.iot.accountlink.v1.AccountLinked"> & {
|
|
229
|
+
/**
|
|
230
|
+
* Minted by the api-server, opaque, unique among its links in flight.
|
|
231
|
+
*
|
|
232
|
+
* @generated from field: string request_id = 1;
|
|
233
|
+
*/
|
|
234
|
+
requestId: string;
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* The nonce exactly as the app passed it as the OAuth state.
|
|
238
|
+
*
|
|
239
|
+
* @generated from field: string nonce = 2;
|
|
240
|
+
*/
|
|
241
|
+
nonce: string;
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* @generated from field: kusinta.iot.accountlink.v1.TokenGrant grant = 3;
|
|
245
|
+
*/
|
|
246
|
+
grant?: TokenGrant | undefined;
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Describes the message kusinta.iot.accountlink.v1.AccountLinked.
|
|
251
|
+
* Use `create(AccountLinkedSchema)` to create a new message.
|
|
252
|
+
*/
|
|
253
|
+
export declare const AccountLinkedSchema: GenMessage<AccountLinked>;
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* The api-server gave up waiting for an AccountLinkResult, api-server → gateway. A gateway
|
|
257
|
+
* that stored the grant for that request_id deletes it, and answers nothing.
|
|
258
|
+
*
|
|
259
|
+
* @generated from message kusinta.iot.accountlink.v1.AccountLinkCancelled
|
|
260
|
+
*/
|
|
261
|
+
export declare type AccountLinkCancelled = Message<"kusinta.iot.accountlink.v1.AccountLinkCancelled"> & {
|
|
262
|
+
/**
|
|
263
|
+
* As AccountLinked.request_id.
|
|
264
|
+
*
|
|
265
|
+
* @generated from field: string request_id = 1;
|
|
266
|
+
*/
|
|
267
|
+
requestId: string;
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Describes the message kusinta.iot.accountlink.v1.AccountLinkCancelled.
|
|
272
|
+
* Use `create(AccountLinkCancelledSchema)` to create a new message.
|
|
273
|
+
*/
|
|
274
|
+
export declare const AccountLinkCancelledSchema: GenMessage<AccountLinkCancelled>;
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* @generated from message kusinta.iot.accountlink.v1.AccountLinkResult
|
|
278
|
+
*/
|
|
279
|
+
export declare type AccountLinkResult = Message<"kusinta.iot.accountlink.v1.AccountLinkResult"> & {
|
|
280
|
+
/**
|
|
281
|
+
* As AccountLinked.request_id.
|
|
282
|
+
*
|
|
283
|
+
* @generated from field: string request_id = 1;
|
|
284
|
+
*/
|
|
285
|
+
requestId: string;
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* @generated from field: kusinta.iot.accountlink.v1.AccountLinkOutcome outcome = 2;
|
|
289
|
+
*/
|
|
290
|
+
outcome: AccountLinkOutcome;
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Describes the message kusinta.iot.accountlink.v1.AccountLinkResult.
|
|
295
|
+
* Use `create(AccountLinkResultSchema)` to create a new message.
|
|
296
|
+
*/
|
|
297
|
+
export declare const AccountLinkResultSchema: GenMessage<AccountLinkResult>;
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Asks the api-server to refresh a grant, gateway → api-server. Answered with a TokenRefreshed
|
|
301
|
+
* carrying the same request_id.
|
|
302
|
+
*
|
|
303
|
+
* The gateway refreshes only when it needs a current access token for a read — for a read
|
|
304
|
+
* by a connector, while a connector session reading through the link is open — and not
|
|
305
|
+
* before the access token is near its expiry, with a random margin, so that gateways do not
|
|
306
|
+
* refresh together; and it has at most one refresh of a grant in flight. A gateway with no
|
|
307
|
+
* answer asks again with the same request_id and refresh token, for up to 10 minutes; after
|
|
308
|
+
* that it sends the old token no more, and the household links again.
|
|
309
|
+
*
|
|
310
|
+
* The api-server MUST keep its answer, keyed by the requesting gateway's identity and a hash
|
|
311
|
+
* of the refresh token, for 10 minutes, and answer a repeated request from it without asking
|
|
312
|
+
* the service: a service may rotate the refresh token, and a second exchange of the old one
|
|
313
|
+
* would end the link. It is held in the memory of the process that answered — the one
|
|
314
|
+
* holding the gateway's stream — and never shared, persisted or logged; it goes at the end of
|
|
315
|
+
* the 10 minutes or of the process. A restart, or the stream moving to another process,
|
|
316
|
+
* within them loses it, and a retry then exchanges the old token again: where the service
|
|
317
|
+
* rotates refresh tokens the link ends and the household links again. That is accepted.
|
|
318
|
+
*
|
|
319
|
+
* @generated from message kusinta.iot.accountlink.v1.RefreshToken
|
|
320
|
+
*/
|
|
321
|
+
export declare type RefreshToken = Message<"kusinta.iot.accountlink.v1.RefreshToken"> & {
|
|
322
|
+
/**
|
|
323
|
+
* Minted by the gateway, opaque, unique among its requests in flight.
|
|
324
|
+
*
|
|
325
|
+
* @generated from field: string request_id = 1;
|
|
326
|
+
*/
|
|
327
|
+
requestId: string;
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* @generated from field: kusinta.iot.accountlink.v1.LinkedService service = 2;
|
|
331
|
+
*/
|
|
332
|
+
service: LinkedService;
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* @generated from field: string refresh_token = 3;
|
|
336
|
+
*/
|
|
337
|
+
refreshToken: string;
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Describes the message kusinta.iot.accountlink.v1.RefreshToken.
|
|
342
|
+
* Use `create(RefreshTokenSchema)` to create a new message.
|
|
343
|
+
*/
|
|
344
|
+
export declare const RefreshTokenSchema: GenMessage<RefreshToken>;
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* @generated from message kusinta.iot.accountlink.v1.TokenRefreshed
|
|
348
|
+
*/
|
|
349
|
+
export declare type TokenRefreshed = Message<"kusinta.iot.accountlink.v1.TokenRefreshed"> & {
|
|
350
|
+
/**
|
|
351
|
+
* As RefreshToken.request_id.
|
|
352
|
+
*
|
|
353
|
+
* @generated from field: string request_id = 1;
|
|
354
|
+
*/
|
|
355
|
+
requestId: string;
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* OK: grant replaces the gateway's. REJECTED: the service refused the refresh token, the
|
|
359
|
+
* link is gone, and the household links again. UNAVAILABLE: ask again after retry_after.
|
|
360
|
+
*
|
|
361
|
+
* @generated from field: kusinta.iot.accountlink.v1.TokenOutcome outcome = 2;
|
|
362
|
+
*/
|
|
363
|
+
outcome: TokenOutcome;
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* OK only, and always whole: where the service issued no new refresh token, the api-server
|
|
367
|
+
* fills in the one it was sent.
|
|
368
|
+
*
|
|
369
|
+
* @generated from field: kusinta.iot.accountlink.v1.TokenGrant grant = 3;
|
|
370
|
+
*/
|
|
371
|
+
grant?: TokenGrant | undefined;
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* See TokenOutcome.
|
|
375
|
+
*
|
|
376
|
+
* @generated from field: google.protobuf.Duration retry_after = 4;
|
|
377
|
+
*/
|
|
378
|
+
retryAfter?: Duration | undefined;
|
|
379
|
+
};
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* Describes the message kusinta.iot.accountlink.v1.TokenRefreshed.
|
|
383
|
+
* Use `create(TokenRefreshedSchema)` to create a new message.
|
|
384
|
+
*/
|
|
385
|
+
export declare const TokenRefreshedSchema: GenMessage<TokenRefreshed>;
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* Asks the api-server to revoke a grant, gateway → api-server: when a household unlinks or
|
|
389
|
+
* hands its home over, or a link is replaced. Answered with a TokenRevoked carrying the same
|
|
390
|
+
* request_id.
|
|
391
|
+
*
|
|
392
|
+
* The gateway reads no more through the grant once it asks. It keeps only the refresh token,
|
|
393
|
+
* and only to ask again: after retry_after on UNAVAILABLE, until OK or REJECTED, and for no
|
|
394
|
+
* more than 7 days. That pending revocation is stored encrypted, so it survives a restart,
|
|
395
|
+
* and it outlives a household handover's wipe and a gateway-wide wipe, which delete the
|
|
396
|
+
* grant itself: it is the only means left of ending the link at the service.
|
|
397
|
+
*
|
|
398
|
+
* A service with no means of revoking a grant is answered REJECTED by the api-server without
|
|
399
|
+
* asking the service. The gateway drops the token as for any REJECTED, and the grant stays
|
|
400
|
+
* valid at the service until it expires or the account holder removes the access there. So an
|
|
401
|
+
* app never tells the household that the service revoked the access, only that the home no
|
|
402
|
+
* longer holds it; where the service has no revocation, it may say that the access is removed
|
|
403
|
+
* at the service by the account holder.
|
|
404
|
+
*
|
|
405
|
+
* @generated from message kusinta.iot.accountlink.v1.RevokeToken
|
|
406
|
+
*/
|
|
407
|
+
export declare type RevokeToken = Message<"kusinta.iot.accountlink.v1.RevokeToken"> & {
|
|
408
|
+
/**
|
|
409
|
+
* Minted by the gateway, opaque, unique among its requests in flight.
|
|
410
|
+
*
|
|
411
|
+
* @generated from field: string request_id = 1;
|
|
412
|
+
*/
|
|
413
|
+
requestId: string;
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* @generated from field: kusinta.iot.accountlink.v1.LinkedService service = 2;
|
|
417
|
+
*/
|
|
418
|
+
service: LinkedService;
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* @generated from field: string refresh_token = 3;
|
|
422
|
+
*/
|
|
423
|
+
refreshToken: string;
|
|
424
|
+
};
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* Describes the message kusinta.iot.accountlink.v1.RevokeToken.
|
|
428
|
+
* Use `create(RevokeTokenSchema)` to create a new message.
|
|
429
|
+
*/
|
|
430
|
+
export declare const RevokeTokenSchema: GenMessage<RevokeToken>;
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* @generated from message kusinta.iot.accountlink.v1.TokenRevoked
|
|
434
|
+
*/
|
|
435
|
+
export declare type TokenRevoked = Message<"kusinta.iot.accountlink.v1.TokenRevoked"> & {
|
|
436
|
+
/**
|
|
437
|
+
* As RevokeToken.request_id.
|
|
438
|
+
*
|
|
439
|
+
* @generated from field: string request_id = 1;
|
|
440
|
+
*/
|
|
441
|
+
requestId: string;
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* OK: revoked. REJECTED: the service no longer knew the token, which is as good — or it has
|
|
445
|
+
* no means of revoking one, which the api-server answers without asking it (RevokeToken);
|
|
446
|
+
* either way the gateway drops the token. UNAVAILABLE: ask again after retry_after.
|
|
447
|
+
*
|
|
448
|
+
* @generated from field: kusinta.iot.accountlink.v1.TokenOutcome outcome = 2;
|
|
449
|
+
*/
|
|
450
|
+
outcome: TokenOutcome;
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* See TokenOutcome.
|
|
454
|
+
*
|
|
455
|
+
* @generated from field: google.protobuf.Duration retry_after = 3;
|
|
456
|
+
*/
|
|
457
|
+
retryAfter?: Duration | undefined;
|
|
458
|
+
};
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* Describes the message kusinta.iot.accountlink.v1.TokenRevoked.
|
|
462
|
+
* Use `create(TokenRevokedSchema)` to create a new message.
|
|
463
|
+
*/
|
|
464
|
+
export declare const TokenRevokedSchema: GenMessage<TokenRevoked>;
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* @generated from enum kusinta.iot.accountlink.v1.AccountLinkStatus
|
|
468
|
+
*/
|
|
469
|
+
export enum AccountLinkStatus {
|
|
470
|
+
/**
|
|
471
|
+
* @generated from enum value: ACCOUNT_LINK_STATUS_UNSPECIFIED = 0;
|
|
472
|
+
*/
|
|
473
|
+
UNSPECIFIED = 0,
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* @generated from enum value: ACCOUNT_LINK_STATUS_LINKED = 1;
|
|
477
|
+
*/
|
|
478
|
+
LINKED = 1,
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* A refresh was REJECTED, or went unanswered past its retry window: the household links
|
|
482
|
+
* again.
|
|
483
|
+
*
|
|
484
|
+
* @generated from enum value: ACCOUNT_LINK_STATUS_NEEDS_RELINK = 2;
|
|
485
|
+
*/
|
|
486
|
+
NEEDS_RELINK = 2,
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* Describes the enum kusinta.iot.accountlink.v1.AccountLinkStatus.
|
|
491
|
+
*/
|
|
492
|
+
export declare const AccountLinkStatusSchema: GenEnum<AccountLinkStatus>;
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* The services a home's account can be linked at. Each value names the fixed string that
|
|
496
|
+
* stands for it in a nonce's "svc" claim, which never changes with the value's name.
|
|
497
|
+
*
|
|
498
|
+
* @generated from enum kusinta.iot.accountlink.v1.LinkedService
|
|
499
|
+
*/
|
|
500
|
+
export enum LinkedService {
|
|
501
|
+
/**
|
|
502
|
+
* @generated from enum value: LINKED_SERVICE_UNSPECIFIED = 0;
|
|
503
|
+
*/
|
|
504
|
+
UNSPECIFIED = 0,
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* NIBE's myUplink. Claim value "myuplink".
|
|
508
|
+
*
|
|
509
|
+
* @generated from enum value: LINKED_SERVICE_MYUPLINK = 1;
|
|
510
|
+
*/
|
|
511
|
+
MYUPLINK = 1,
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* Describes the enum kusinta.iot.accountlink.v1.LinkedService.
|
|
516
|
+
*/
|
|
517
|
+
export declare const LinkedServiceSchema: GenEnum<LinkedService>;
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* @generated from enum kusinta.iot.accountlink.v1.AccountLinkOutcome
|
|
521
|
+
*/
|
|
522
|
+
export enum AccountLinkOutcome {
|
|
523
|
+
/**
|
|
524
|
+
* Sender did not set an outcome, or sent one this schema does not know: read as REJECTED.
|
|
525
|
+
*
|
|
526
|
+
* @generated from enum value: ACCOUNT_LINK_OUTCOME_UNSPECIFIED = 0;
|
|
527
|
+
*/
|
|
528
|
+
UNSPECIFIED = 0,
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* Stored. A link the home already had at the same service is replaced. The gateway keeps
|
|
532
|
+
* the replaced grant, unused, and revokes it (RevokeToken) only once 60 seconds have passed
|
|
533
|
+
* since this answer with no AccountLinkCancelled for its request_id; on a cancel within
|
|
534
|
+
* them, it deletes the new grant and restores the replaced one.
|
|
535
|
+
*
|
|
536
|
+
* @generated from enum value: ACCOUNT_LINK_OUTCOME_LINKED = 1;
|
|
537
|
+
*/
|
|
538
|
+
LINKED = 1,
|
|
539
|
+
|
|
540
|
+
/**
|
|
541
|
+
* The nonce failed the gateway's checks (AccountLinkNonceClaims). Nothing is stored, and
|
|
542
|
+
* the api-server revokes the grant.
|
|
543
|
+
*
|
|
544
|
+
* @generated from enum value: ACCOUNT_LINK_OUTCOME_REJECTED = 2;
|
|
545
|
+
*/
|
|
546
|
+
REJECTED = 2,
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
/**
|
|
550
|
+
* Describes the enum kusinta.iot.accountlink.v1.AccountLinkOutcome.
|
|
551
|
+
*/
|
|
552
|
+
export declare const AccountLinkOutcomeSchema: GenEnum<AccountLinkOutcome>;
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
* On UNAVAILABLE the api-server sets retry_after: the service's own wait where it gave one,
|
|
556
|
+
* spread across the gateways asking. A gateway waits at least retry_after and at least 30
|
|
557
|
+
* seconds, unset reading as 30, and doubles its wait on each further UNAVAILABLE for the
|
|
558
|
+
* same token, up to an hour, with a random margin.
|
|
559
|
+
*
|
|
560
|
+
* @generated from enum kusinta.iot.accountlink.v1.TokenOutcome
|
|
561
|
+
*/
|
|
562
|
+
export enum TokenOutcome {
|
|
563
|
+
/**
|
|
564
|
+
* Sender did not set an outcome, or sent one this schema does not know: read as
|
|
565
|
+
* UNAVAILABLE.
|
|
566
|
+
*
|
|
567
|
+
* @generated from enum value: TOKEN_OUTCOME_UNSPECIFIED = 0;
|
|
568
|
+
*/
|
|
569
|
+
UNSPECIFIED = 0,
|
|
570
|
+
|
|
571
|
+
/**
|
|
572
|
+
* @generated from enum value: TOKEN_OUTCOME_OK = 1;
|
|
573
|
+
*/
|
|
574
|
+
OK = 1,
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* @generated from enum value: TOKEN_OUTCOME_REJECTED = 2;
|
|
578
|
+
*/
|
|
579
|
+
REJECTED = 2,
|
|
580
|
+
|
|
581
|
+
/**
|
|
582
|
+
* @generated from enum value: TOKEN_OUTCOME_UNAVAILABLE = 3;
|
|
583
|
+
*/
|
|
584
|
+
UNAVAILABLE = 3,
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* Describes the enum kusinta.iot.accountlink.v1.TokenOutcome.
|
|
589
|
+
*/
|
|
590
|
+
export declare const TokenOutcomeSchema: GenEnum<TokenOutcome>;
|
|
591
|
+
|