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

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.2.0-beta.30",
3
+ "version": "0.2.0-beta.32",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "files": ["src"],
@@ -43,8 +43,9 @@ export declare const file_kusinta_iot_access_v1_roles: GenFile;
43
43
  * schema says "staff" or "a staff member" it means exactly that, as the gateway holds roles,
44
44
  * the registering administrator included; holding ROLE_RESIDENT besides changes nothing. The
45
45
  * term carries one rule about people: staff are named to whoever may list every member; a
46
- * resident is named only to the people they live with; and where anyone lives is told only
47
- * to their own household.
46
+ * resident is named only to the people they live with; and where anyone lives is told by
47
+ * user id only to their own household, and to anyone else only under a residency id
48
+ * (MembershipRelation, RESIDENCY IDS).
48
49
  *
49
50
  * @generated from enum kusinta.iot.access.v1.Role
50
51
  */
@@ -245,9 +246,19 @@ export declare const PermissionActionSchema: GenEnum<PermissionAction>;
245
246
  * property owner or the administrator out by force — they hold the building's filing
246
247
  * authority and the gateway itself — but it makes their seeing in a deliberate act on the
247
248
  * home, such as filing themselves on it, rather than something handed out by default. They
248
- * remove a resident who moves out, so they are shown each resident's homes, and since when
249
- * (webrtc.v1.ListGatewayMembers), but never a resident's name; and a staff member's own
250
- * residency is told only to the household they live in (see Role, STAFF).
249
+ * remove a resident who moves out, so they are shown every residency, and since when
250
+ * (webrtc.v1.ListGatewayMembers), but never who holds it (see RESIDENCY IDS).
251
+ *
252
+ * RESIDENCY IDS. To a caller who does not live in the home, a RESIDENT membership is told
253
+ * only under its residency id: an id the gateway mints for that residency alone, when it
254
+ * begins, holds for as long as it lasts unbroken, and never reuses. It is opaque, begins
255
+ * with "residency:", and is never a user's id or derived from one, so nothing told under it
256
+ * ties the residency to a name, a role or another membership — and nothing changes it when
257
+ * the person who holds it becomes staff or stops being staff (Role, STAFF). A relation
258
+ * change, or the residency ending, ends its id. The people of the home see one another
259
+ * under their user ids. Where a request below names a member, it says whether a residency
260
+ * id may stand for one; a request that does not say so refuses one as INVALID_REQUEST, so
261
+ * that no user is ever made under one.
251
262
  *
252
263
  * A membership recorded with no relation, made before relations existed, sees no more than
253
264
  * either relation would where it is held: on an apartment or a room, a home as service; on a
@@ -50,8 +50,9 @@ export const RoleSchema = /*@__PURE__*/
50
50
  * schema says "staff" or "a staff member" it means exactly that, as the gateway holds roles,
51
51
  * the registering administrator included; holding ROLE_RESIDENT besides changes nothing. The
52
52
  * term carries one rule about people: staff are named to whoever may list every member; a
53
- * resident is named only to the people they live with; and where anyone lives is told only
54
- * to their own household.
53
+ * resident is named only to the people they live with; and where anyone lives is told by
54
+ * user id only to their own household, and to anyone else only under a residency id
55
+ * (MembershipRelation, RESIDENCY IDS).
55
56
  *
56
57
  * @generated from enum kusinta.iot.access.v1.Role
57
58
  */
@@ -149,9 +150,19 @@ export const MembershipRelationSchema = /*@__PURE__*/
149
150
  * property owner or the administrator out by force — they hold the building's filing
150
151
  * authority and the gateway itself — but it makes their seeing in a deliberate act on the
151
152
  * home, such as filing themselves on it, rather than something handed out by default. They
152
- * remove a resident who moves out, so they are shown each resident's homes, and since when
153
- * (webrtc.v1.ListGatewayMembers), but never a resident's name; and a staff member's own
154
- * residency is told only to the household they live in (see Role, STAFF).
153
+ * remove a resident who moves out, so they are shown every residency, and since when
154
+ * (webrtc.v1.ListGatewayMembers), but never who holds it (see RESIDENCY IDS).
155
+ *
156
+ * RESIDENCY IDS. To a caller who does not live in the home, a RESIDENT membership is told
157
+ * only under its residency id: an id the gateway mints for that residency alone, when it
158
+ * begins, holds for as long as it lasts unbroken, and never reuses. It is opaque, begins
159
+ * with "residency:", and is never a user's id or derived from one, so nothing told under it
160
+ * ties the residency to a name, a role or another membership — and nothing changes it when
161
+ * the person who holds it becomes staff or stops being staff (Role, STAFF). A relation
162
+ * change, or the residency ending, ends its id. The people of the home see one another
163
+ * under their user ids. Where a request below names a member, it says whether a residency
164
+ * id may stand for one; a request that does not say so refuses one as INVALID_REQUEST, so
165
+ * that no user is ever made under one.
155
166
  *
156
167
  * A membership recorded with no relation, made before relations existed, sees no more than
157
168
  * either relation would where it is held: on an apartment or a room, a home as service; on a
@@ -113,10 +113,11 @@ export declare type Space = Message<"kusinta.iot.space.v1.Space"> & {
113
113
  * hold it, and who, without saying where anyone lives;
114
114
  * * anyone else sees none, residents of a building or floor included.
115
115
  *
116
- * Whoever it is listed to, a member who is staff (access.v1.Role, STAFF) and lives in a
117
- * home has that RESIDENT membership left out for every caller who does not live in that
118
- * home, a property owner and an administrator included: a staff member's residency is
119
- * told only to its household. Their SERVICE memberships are listed as any member's.
116
+ * To a caller who does not live in the home, a RESIDENT member is listed under the
117
+ * residency's id (access.v1.MembershipRelation, RESIDENCY IDS) and never by name, so that
118
+ * a home's residents are told apart from one another and from anyone's other memberships
119
+ * without saying who they are. The people of the home see one another under their user
120
+ * ids.
120
121
  *
121
122
  * @generated from field: repeated kusinta.iot.space.v1.SpaceMember members = 13;
122
123
  */
@@ -144,6 +145,9 @@ export declare const SpaceSchema: GenMessage<Space>;
144
145
  */
145
146
  export declare type SpaceMember = Message<"kusinta.iot.space.v1.SpaceMember"> & {
146
147
  /**
148
+ * The member's user id, or for a RESIDENT member listed to a caller who does not live in
149
+ * the home, the residency's id (Space.members).
150
+ *
147
151
  * @generated from field: kusinta.iot.identity.v1.UserId user_id = 1;
148
152
  */
149
153
  userId?: UserId | undefined;
@@ -59,7 +59,9 @@ export declare type CreateInvite = Message<"kusinta.iot.webrtc.v1.CreateInvite">
59
59
  *
60
60
  * One pending invite per space and address: a second for the same address on the same
61
61
  * space is refused as FAILED_PRECONDITION with metadata {"reason": "already_invited",
62
- * "invite_id": <the pending one>}, so the app can offer to resend that one instead.
62
+ * "invite_id": <the pending one>}, so the app can offer to resend that one instead. A
63
+ * household invite and one made by a property owner or an administrator are counted
64
+ * apart, so the refusal never names an invite the caller is not shown (ListSpaceInvites).
63
65
  *
64
66
  * The gateway keeps the address only while the invite is pending, and drops it once the
65
67
  * invite is redeemed, revoked or expired.
@@ -198,6 +198,11 @@ export declare const DeleteSpaceSchema: GenMessage<DeleteSpace>;
198
198
  * Who may change who belongs to a home is restricted by the gateway; a caller not allowed is
199
199
  * refused as NOT_ENTITLED. Residents see who is filed on their home in Space.members.
200
200
  *
201
+ * A membership the caller is not told of under this user id (a residency, to anyone outside
202
+ * its household: access.v1.MembershipRelation, RESIDENCY IDS) is never changed through it:
203
+ * assigning onto it is refused as NOT_ENTITLED, and RemoveUserFromSpace answers as for one
204
+ * that does not exist. user_id is never a residency id.
205
+ *
201
206
  * @generated from message kusinta.iot.webrtc.v1.AssignUserToSpace
202
207
  */
203
208
  export declare type AssignUserToSpace = Message<"kusinta.iot.webrtc.v1.AssignUserToSpace"> & {
@@ -231,7 +236,14 @@ export declare const AssignUserToSpaceSchema: GenMessage<AssignUserToSpace>;
231
236
  * Removes a user's membership of a space. Losing reach also drops whatever the
232
237
  * user was streaming from it, announced by LivePermissionUpdate.
233
238
  *
234
- * Removing someone else from a home is guarded as assigning is.
239
+ * Removing someone else from a home is guarded as assigning is. A membership the caller is
240
+ * not told of under the user id given (see AssignUserToSpace) is answered as one that does
241
+ * not exist, and stays.
242
+ *
243
+ * user_id may be a residency id (access.v1.MembershipRelation, RESIDENCY IDS): it then ends
244
+ * that residency, if space_id is its home, and answers as for one that does not exist
245
+ * otherwise. This is how a property owner or an administrator ends the residency of
246
+ * someone who moved out.
235
247
  *
236
248
  * @generated from message kusinta.iot.webrtc.v1.RemoveUserFromSpace
237
249
  */
@@ -19,13 +19,16 @@ export declare const file_kusinta_iot_webrtc_v1_members: GenFile;
19
19
  * NOT_ENTITLED.
20
20
  *
21
21
  * Those two roles answer for the whole property, and a resident who moves out is removed by
22
- * them (RemoveFromGateway), so every member is listed to them. Each is told apart as the rule
23
- * for staff allows (access.v1.Role, STAFF):
24
- * * a resident by their memberships — the homes they live in, and since when
25
- * (MemberSpace.since) — never by name or address;
26
- * * staff by name and email address (MemberDetail.name, MemberDetail.email), and by their
27
- * memberships save where they live: a staff member's residency is left out of every
28
- * entry but the caller's own, since a residency is told only to its household.
22
+ * them (RemoveUserFromSpace or RemoveFromGateway), so every member is listed to them, as the
23
+ * rule for staff allows (access.v1.Role, STAFF):
24
+ * * every residency as an entry of its own, under its residency id: the one RESIDENT
25
+ * membership and since when (MemberSpace.since), with no name, no email and no roles;
26
+ * * every user under their user id, while they hold a role or a membership other than a
27
+ * residency: their roles save ROLE_RESIDENT, and those other memberships. Staff are
28
+ * given by name and email address (MemberDetail.name, MemberDetail.email); anyone else
29
+ * by neither;
30
+ * * the caller themselves as one entry under their user id, with everything they hold.
31
+ * So becoming staff, or stopping, changes a user's entry and never a residency's.
29
32
  * Seeing into a home's life — its devices, readings and history — still takes filing on it.
30
33
  *
31
34
  * @generated from message kusinta.iot.webrtc.v1.ListGatewayMembers
@@ -44,6 +47,11 @@ export declare const ListGatewayMembersSchema: GenMessage<ListGatewayMembers>;
44
47
  * ManagementAck. Only a caller holding ROLE_GATEWAY_ADMIN may; any other role named is
45
48
  * INVALID_REQUEST.
46
49
  *
50
+ * user_id is never a residency id (INVALID_REQUEST): the member's entry would then appear
51
+ * under their user id, named, and tie the residency to them. A resident becomes staff by
52
+ * an act of their own — redeeming a SERVICE invite (invite.proto) — and is promoted from
53
+ * the entry that gives.
54
+ *
47
55
  * Granting a role already held, or taking away one not held, changes nothing and is
48
56
  * acknowledged. A caller may take a role away from themselves: the registering
49
57
  * administrator always remains, so the gateway cannot be left without one. Naming
@@ -87,16 +95,22 @@ export declare type SetMemberRole = Message<"kusinta.iot.webrtc.v1.SetMemberRole
87
95
  export declare const SetMemberRoleSchema: GenMessage<SetMemberRole>;
88
96
 
89
97
  /**
90
- * Removes a member from the whole gateway in one step: every membership they hold, every
91
- * role the gateway holds for them, every pending invite they created and every join request
92
- * of their own. Answered with ManagementAck. Their open sessions end, and the api-server drops
93
- * them from the gateway. Join requests made through their invites end where those were
94
- * invites a resident made, as when a residency ends, and stay otherwise.
98
+ * Removes a member from the gateway in one step: every membership they hold, every role the
99
+ * gateway holds for them, every pending invite they created and every join request of their
100
+ * own. Answered with ManagementAck. Their open sessions end, and the api-server drops them
101
+ * from the gateway. Join requests made through their invites end where those were invites
102
+ * a resident made, as when a residency ends, and stay otherwise.
103
+ *
104
+ * What a caller is not told of under the id given stays: by a user id, a caller who does not
105
+ * live in a home they hold leaves that residency in place, and ends only the rest; the user
106
+ * then stays a member, a resident of it. By a residency id, it ends that residency alone, as
107
+ * RemoveUserFromSpace would, with the invites the holder made as its resident.
95
108
  *
96
109
  * A caller holding ROLE_GATEWAY_ADMIN may remove anyone but the registering administrator
97
110
  * ("registering_admin"). A caller holding ROLE_PROPERTY_OWNER, and not ROLE_GATEWAY_ADMIN,
98
111
  * may remove only a member who holds neither ROLE_PROPERTY_OWNER nor ROLE_GATEWAY_ADMIN;
99
- * anyone else, the registering administrator included, is refused NOT_ENTITLED.
112
+ * anyone else, the registering administrator included, is refused NOT_ENTITLED. A residency
113
+ * id is never refused for its holder's roles, since it tells none.
100
114
  *
101
115
  * @generated from message kusinta.iot.webrtc.v1.RemoveFromGateway
102
116
  */
@@ -116,8 +130,9 @@ export declare const RemoveFromGatewaySchema: GenMessage<RemoveFromGateway>;
116
130
  /**
117
131
  * Sets, moves or clears when a technician's access ends. Answered with ManagementAck. A
118
132
  * caller holding ROLE_GATEWAY_ADMIN or ROLE_PROPERTY_OWNER may. Only for a member holding
119
- * ROLE_TECHNICIAN and no other role but ROLE_RESIDENT ("not_a_technician" otherwise): an end
120
- * date never reaches a property owner or an administrator.
133
+ * ROLE_TECHNICIAN and no other role but ROLE_RESIDENT ("not_a_technician" otherwise, and for a
134
+ * residency id, which names no technician): an end date never reaches a property owner or
135
+ * an administrator.
121
136
  *
122
137
  * access_until is the instant the access ends; a time not after now is INVALID_REQUEST. The
123
138
  * app chooses it, typically the end of a chosen day where the building is. Within a quarter
@@ -221,12 +236,15 @@ export declare type GatewayMembers = Message<"kusinta.iot.webrtc.v1.GatewayMembe
221
236
  export declare const GatewayMembersSchema: GenMessage<GatewayMembers>;
222
237
 
223
238
  /**
224
- * One member, as an administrator or a property owner sees them.
239
+ * One member, as an administrator or a property owner sees them: a user, or a residency
240
+ * (ListGatewayMembers).
225
241
  *
226
242
  * @generated from message kusinta.iot.webrtc.v1.MemberDetail
227
243
  */
228
244
  export declare type MemberDetail = Message<"kusinta.iot.webrtc.v1.MemberDetail"> & {
229
245
  /**
246
+ * The user's id, or on a residency's entry its residency id.
247
+ *
230
248
  * @generated from field: kusinta.iot.identity.v1.UserId user_id = 1;
231
249
  */
232
250
  userId?: UserId | undefined;
@@ -235,8 +253,8 @@ export declare type MemberDetail = Message<"kusinta.iot.webrtc.v1.MemberDetail">
235
253
  * The name they gave their account, as the gateway last learnt it: from AppTokenClaims.name
236
254
  * when they connect, or from signaling.v1.RedeemInvite.display_name when they redeem with
237
255
  * none learnt yet. Self-chosen, so the app shows it as such. Given only for a member who is
238
- * staff (access.v1.Role, STAFF), and on the caller's own entry; empty for every other
239
- * resident, and when none is learnt. The gateway keeps it only while they are a member,
256
+ * staff (access.v1.Role, STAFF), and on the caller's own entry; empty for anyone else, on
257
+ * every residency's entry, and when none is learnt. The gateway keeps it only while they are a member,
240
258
  * and drops it when they stop being one.
241
259
  *
242
260
  * @generated from field: string name = 2;
@@ -245,15 +263,17 @@ export declare type MemberDetail = Message<"kusinta.iot.webrtc.v1.MemberDetail">
245
263
 
246
264
  /**
247
265
  * Every role they hold here, the registering administrator's ROLE_GATEWAY_ADMIN included,
248
- * each once.
266
+ * each once — save that ROLE_RESIDENT is left out of every entry but the caller's own,
267
+ * since it would say they live in the building. None on a residency's entry.
249
268
  *
250
269
  * @generated from field: repeated kusinta.iot.access.v1.Role roles = 3;
251
270
  */
252
271
  roles: Role[];
253
272
 
254
273
  /**
255
- * Every space they are filed on, save that a staff member's RESIDENT memberships are left
256
- * out of every entry but the caller's own. A member with none left is still listed.
274
+ * Every space they are filed on but where they live, which is listed under each
275
+ * residency's id; on the caller's own entry, every one. On a residency's entry, that
276
+ * residency alone.
257
277
  *
258
278
  * @generated from field: repeated kusinta.iot.webrtc.v1.MemberSpace memberships = 4;
259
279
  */
@@ -277,8 +297,8 @@ export declare type MemberDetail = Message<"kusinta.iot.webrtc.v1.MemberDetail">
277
297
 
278
298
  /**
279
299
  * Their verified email address, as AppTokenClaims.email last gave it, so that staff who
280
- * gave the same name can be told apart. Given only for a member who is staff; empty for a
281
- * resident, and when none is learnt. The gateway keeps it only while they hold a staff
300
+ * gave the same name can be told apart. Given only for a member who is staff; empty for
301
+ * anyone else, on every residency's entry, and when none is learnt. The gateway keeps it only while they hold a staff
282
302
  * role.
283
303
  *
284
304
  * @generated from field: string email = 7;