@openbrf/plugin-sdk 0.0.0-stage → 1.2.0

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 (134) hide show
  1. package/LICENSE +661 -0
  2. package/LICENSE-EXCEPTION.md +28 -0
  3. package/README.md +94 -2
  4. package/dist/abort-signal.d.ts +23 -0
  5. package/dist/abort-signal.d.ts.map +1 -0
  6. package/dist/abort-signal.js +2 -0
  7. package/dist/abort-signal.js.map +1 -0
  8. package/dist/action-refusal.d.ts +101 -0
  9. package/dist/action-refusal.d.ts.map +1 -0
  10. package/dist/action-refusal.js +96 -0
  11. package/dist/action-refusal.js.map +1 -0
  12. package/dist/action-schema.d.ts +42 -0
  13. package/dist/action-schema.d.ts.map +1 -0
  14. package/dist/action-schema.js +67 -0
  15. package/dist/action-schema.js.map +1 -0
  16. package/dist/actions.d.ts +287 -0
  17. package/dist/actions.d.ts.map +1 -0
  18. package/dist/actions.js +68 -0
  19. package/dist/actions.js.map +1 -0
  20. package/dist/api-version.d.ts +23 -0
  21. package/dist/api-version.d.ts.map +1 -0
  22. package/dist/api-version.js +27 -0
  23. package/dist/api-version.js.map +1 -0
  24. package/dist/blocks.d.ts +310 -0
  25. package/dist/blocks.d.ts.map +1 -0
  26. package/dist/blocks.js +185 -0
  27. package/dist/blocks.js.map +1 -0
  28. package/dist/catalog.d.ts +707 -0
  29. package/dist/catalog.d.ts.map +1 -0
  30. package/dist/catalog.js +567 -0
  31. package/dist/catalog.js.map +1 -0
  32. package/dist/define-plugin.d.ts +14 -0
  33. package/dist/define-plugin.d.ts.map +1 -0
  34. package/dist/define-plugin.js +15 -0
  35. package/dist/define-plugin.js.map +1 -0
  36. package/dist/entitlements.d.ts +117 -0
  37. package/dist/entitlements.d.ts.map +1 -0
  38. package/dist/entitlements.js +62 -0
  39. package/dist/entitlements.js.map +1 -0
  40. package/dist/extensions.d.ts +183 -0
  41. package/dist/extensions.d.ts.map +1 -0
  42. package/dist/extensions.js +67 -0
  43. package/dist/extensions.js.map +1 -0
  44. package/dist/finances.d.ts +294 -0
  45. package/dist/finances.d.ts.map +1 -0
  46. package/dist/finances.js +56 -0
  47. package/dist/finances.js.map +1 -0
  48. package/dist/findings.d.ts +156 -0
  49. package/dist/findings.d.ts.map +1 -0
  50. package/dist/findings.js +146 -0
  51. package/dist/findings.js.map +1 -0
  52. package/dist/host.d.ts +827 -0
  53. package/dist/host.d.ts.map +1 -0
  54. package/dist/host.js +80 -0
  55. package/dist/host.js.map +1 -0
  56. package/dist/imports.d.ts +104 -0
  57. package/dist/imports.d.ts.map +1 -0
  58. package/dist/imports.js +70 -0
  59. package/dist/imports.js.map +1 -0
  60. package/dist/index.d.ts +34 -0
  61. package/dist/index.d.ts.map +1 -0
  62. package/dist/index.js +31 -0
  63. package/dist/index.js.map +1 -0
  64. package/dist/integrity.d.ts +38 -0
  65. package/dist/integrity.d.ts.map +1 -0
  66. package/dist/integrity.js +105 -0
  67. package/dist/integrity.js.map +1 -0
  68. package/dist/localized-text.d.ts +18 -0
  69. package/dist/localized-text.d.ts.map +1 -0
  70. package/dist/localized-text.js +17 -0
  71. package/dist/localized-text.js.map +1 -0
  72. package/dist/manifest.d.ts +1122 -0
  73. package/dist/manifest.d.ts.map +1 -0
  74. package/dist/manifest.js +1118 -0
  75. package/dist/manifest.js.map +1 -0
  76. package/dist/module.d.ts +35 -0
  77. package/dist/module.d.ts.map +1 -0
  78. package/dist/module.js +2 -0
  79. package/dist/module.js.map +1 -0
  80. package/dist/package-check.d.ts +66 -0
  81. package/dist/package-check.d.ts.map +1 -0
  82. package/dist/package-check.js +755 -0
  83. package/dist/package-check.js.map +1 -0
  84. package/dist/permissions.d.ts +224 -0
  85. package/dist/permissions.d.ts.map +1 -0
  86. package/dist/permissions.js +277 -0
  87. package/dist/permissions.js.map +1 -0
  88. package/dist/recipients.d.ts +139 -0
  89. package/dist/recipients.d.ts.map +1 -0
  90. package/dist/recipients.js +223 -0
  91. package/dist/recipients.js.map +1 -0
  92. package/dist/records.d.ts +130 -0
  93. package/dist/records.d.ts.map +1 -0
  94. package/dist/records.js +85 -0
  95. package/dist/records.js.map +1 -0
  96. package/dist/require-capability.d.ts +37 -0
  97. package/dist/require-capability.d.ts.map +1 -0
  98. package/dist/require-capability.js +88 -0
  99. package/dist/require-capability.js.map +1 -0
  100. package/dist/settings-schema.d.ts +130 -0
  101. package/dist/settings-schema.d.ts.map +1 -0
  102. package/dist/settings-schema.js +272 -0
  103. package/dist/settings-schema.js.map +1 -0
  104. package/dist/standard-schema.d.ts +43 -0
  105. package/dist/standard-schema.d.ts.map +1 -0
  106. package/dist/standard-schema.js +2 -0
  107. package/dist/standard-schema.js.map +1 -0
  108. package/package.json +55 -3
  109. package/src/abort-signal.ts +22 -0
  110. package/src/action-refusal.ts +178 -0
  111. package/src/action-schema.ts +89 -0
  112. package/src/actions.ts +344 -0
  113. package/src/api-version.ts +28 -0
  114. package/src/blocks.ts +289 -0
  115. package/src/catalog.ts +679 -0
  116. package/src/define-plugin.ts +18 -0
  117. package/src/entitlements.ts +150 -0
  118. package/src/extensions.ts +212 -0
  119. package/src/finances.ts +317 -0
  120. package/src/findings.ts +163 -0
  121. package/src/host.ts +894 -0
  122. package/src/imports.ts +135 -0
  123. package/src/index.ts +316 -0
  124. package/src/integrity.ts +125 -0
  125. package/src/localized-text.ts +19 -0
  126. package/src/manifest.ts +1412 -0
  127. package/src/module.ts +38 -0
  128. package/src/package-check.ts +894 -0
  129. package/src/permissions.ts +295 -0
  130. package/src/recipients.ts +294 -0
  131. package/src/records.ts +172 -0
  132. package/src/require-capability.ts +106 -0
  133. package/src/settings-schema.ts +334 -0
  134. package/src/standard-schema.ts +39 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-check.js","sourceRoot":"","sources":["../src/package-check.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,sBAAsB,EACtB,kBAAkB,EAClB,yBAAyB,GAC1B,MAAM,eAAe,CAAC;AAEvB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C,CAAE,KAAiC;QACpC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC"}
@@ -0,0 +1,224 @@
1
+ /**
2
+ * What a plugin may ask the host for.
3
+ *
4
+ * The list is deliberately short and read-only. A backend plugin runs at full
5
+ * process privilege (ADR 0003 - there is no sandbox in v1), so these
6
+ * permissions are not a security boundary against hostile code; they are the
7
+ * declaration the board consents to before an install, and the boundary the
8
+ * SDK enforces against an honest plugin reaching further than it said it
9
+ * would. Curation of the catalog is what stands between an instance and
10
+ * hostile code, and the revisit trigger in ADR 0003 records when that changes.
11
+ *
12
+ * No permission grants write access to the register in v0. A plugin that
13
+ * needs to change resident data is a core feature request, not a plugin.
14
+ *
15
+ * A new value here is a new member of the catalog's permission list, and an
16
+ * instance that does not know it refuses the whole catalog index that carries
17
+ * it. The catalog therefore lists an entry asking for one of the content
18
+ * permissions below only in an index that older instances do not read: the
19
+ * version 2 index (ADR 0032).
20
+ */
21
+ export declare const PLUGIN_PERMISSIONS: readonly [
22
+ /**
23
+ * Apartments, names, who is a resident, who is a member, and when a person
24
+ * moved in or out. Never contact details, never personal identity numbers,
25
+ * and never a person flagged with protected personal data - those are
26
+ * excluded from every plugin read regardless of permission (plan section
27
+ * 4.4).
28
+ *
29
+ * Board positions are not in it. Who sits on the board is a core capability,
30
+ * read nowhere in the host object a plugin is given.
31
+ */
32
+ "addressBook:read",
33
+ /**
34
+ * Additionally email and phone. Separate from addressBook:read because
35
+ * contact data is board-only in the core product, so a plugin asking for it
36
+ * is asking for markedly more than one that only needs to know who lives
37
+ * where.
38
+ */
39
+ "addressBook:readContact",
40
+ /** Send mail through the instance's configured SMTP server. */
41
+ "mail:send",
42
+ /**
43
+ * Send text messages through the instance's configured SMS provider.
44
+ *
45
+ * Separate from mail:send because the two do not cost the association the
46
+ * same thing. Mail leaves through a server the instance is already set up
47
+ * for; a text message is billed per message against a provider contract the
48
+ * board signed, and an instance that has bought none cannot send one at all.
49
+ */
50
+ "sms:send",
51
+ /** Register background workers and enqueue or schedule jobs. */
52
+ "jobs:schedule",
53
+ /**
54
+ * The fee notification runs and their notices, and the charges to members,
55
+ * as the board's own documents state them, and the events that say one was
56
+ * issued, recorded, corrected or removed.
57
+ *
58
+ * Masked as the files the board hands over are, and further: the names on a
59
+ * notice whose household holds a person with protected personal data are
60
+ * withheld, as on the fee notice file, and a charge on such a person withholds
61
+ * who and where entirely, where the debiting list withholds only where. A
62
+ * plugin is further from the board than the economic manager is, and the
63
+ * address book's rule that a protected person never reaches a plugin holds
64
+ * here too. A personal identity number is never returned, and there is no
65
+ * payment state to return: core records none.
66
+ */
67
+ "finances:read",
68
+ /**
69
+ * Record that a fee notice or a charge was delivered: by which route, when,
70
+ * and under which reference the receiving system knows it. A receipt and
71
+ * never a paid flag. Separate from finances:read because it writes, and the
72
+ * board consents to a plugin that only reads the books knowing that it cannot
73
+ * add anything to them.
74
+ */
75
+ "finances:recordDelivery",
76
+ /**
77
+ * Add blocks to the association's website.
78
+ *
79
+ * What such a block renders is published to anybody who reads the page,
80
+ * account or not, which is why it is a permission the board consents to
81
+ * rather than something a manifest may simply declare. The host prints what
82
+ * the block renders through an allowlist of elements, so it is never a
83
+ * script, a stylesheet or a resource from another host - but the words in it
84
+ * are the plugin's to choose.
85
+ */
86
+ "site:blocks",
87
+ /**
88
+ * The association's published news items: the title, the body's text, when
89
+ * each was published and whether it is for the members or for anyone.
90
+ *
91
+ * Not a register permission. It reads what the board has already
92
+ * published, and never who wrote an item, a comment on it or who read it
93
+ * (ADR 0032). The text is the board's and may name somebody, which is why a
94
+ * plugin holding it declares `freeText`.
95
+ */
96
+ "news:read",
97
+ /**
98
+ * The published events and their occurrences, and the notice of every
99
+ * general meeting that has been called and not yet held.
100
+ *
101
+ * Never a sign-up, a roll-call, an attendance or a proxy: how many places
102
+ * are left at an occurrence is the most it says about who is coming. Like
103
+ * news:read, it reads the board's text and declares `freeText`.
104
+ */
105
+ "calendar:read",
106
+ /**
107
+ * The bookable resources the house offers, and when each is taken. Never by
108
+ * whom: no booker, no apartment, no booking's identifier, and two bookings
109
+ * that touch are one interval (ADR 0032).
110
+ */
111
+ "bookings:readAvailability",
112
+ /**
113
+ * A stored picture, by its id: one held for anyone or for the members, whose
114
+ * upload declared that it shows no identifiable person (ADR 0032).
115
+ *
116
+ * Never a document, never a household's or the board's file, and never a
117
+ * picture of people: a photograph of a person needs a publication consent,
118
+ * and the consent the core records is for the website, not for wherever a
119
+ * plugin puts the picture. A picture is still a photograph, which is why a
120
+ * plugin holding it declares `photograph`.
121
+ */
122
+ "media:read",
123
+ /**
124
+ * The association's addresses: the street and number of each entrance, and
125
+ * nothing about who lives at them. Not addressBook:read, which reads the
126
+ * apartments and the people in them.
127
+ */
128
+ "addresses:read",
129
+ /**
130
+ * Install and update themes on the instance (ADR 0046).
131
+ *
132
+ * A theme is data and passes the same install lint however it arrives, so
133
+ * this grants no way past the theme gate: what a board consents to is a
134
+ * plugin putting themes on the instance's theme screen, for an
135
+ * administrator to preview and activate there. Each install is made for a
136
+ * person in the web interface who may install themes, never by the plugin on
137
+ * its own.
138
+ */
139
+ "themes:install",
140
+ /**
141
+ * Hand a member list to the core for the board to review (ADR 0043).
142
+ *
143
+ * The one way a plugin brings data towards the register, and it writes
144
+ * nothing: the core holds the file as an import proposal on its own import
145
+ * screen, and a board member previews, decides and applies it there, or
146
+ * rejects it. It grants no read of the register and raises no route's
147
+ * capability floor, so the plugin learns nothing about what the file would
148
+ * do. It does hold the file, though, which can carry every personal identity
149
+ * number in the cooperative and rows about persons with protected personal
150
+ * data, so a manifest declaring it declares those categories too.
151
+ */
152
+ "addressBook:proposeImport"];
153
+ export type PluginPermission = (typeof PLUGIN_PERMISSIONS)[number];
154
+ export declare function isPluginPermission(value: string): value is PluginPermission;
155
+ /**
156
+ * Whether a permission lets a plugin read the register, or the finances that
157
+ * carry the names of the people in it.
158
+ *
159
+ * Every permission is classified, and the record is typed against
160
+ * `PluginPermission`, so a permission added to the list above fails to compile
161
+ * until somebody has said which it is. That is the point of a classification
162
+ * over a list of the refused: the rules that keep a plugin with a device route
163
+ * or a website block away from the register (ADR 0006, ADR 0031) hold a new
164
+ * permission that reads it out unless somebody remembers to add it to each.
165
+ * `finances:recordDelivery` writes a receipt and returns no one's details, so
166
+ * it is not a read. The content permissions (`news:read`, `calendar:read`,
167
+ * `bookings:readAvailability`, `media:read`, `addresses:read`) read what the
168
+ * website publishes, never the register, so a plugin with a device route may
169
+ * hold them; the host withholds text that names a resident from such a plugin.
170
+ */
171
+ export declare const PERMISSION_REGISTER_ACCESS: {
172
+ readonly "addressBook:read": "reads";
173
+ readonly "addressBook:readContact": "reads";
174
+ readonly "mail:send": "none";
175
+ readonly "sms:send": "none";
176
+ readonly "jobs:schedule": "none";
177
+ readonly "finances:read": "reads";
178
+ readonly "finances:recordDelivery": "none";
179
+ readonly "site:blocks": "none";
180
+ readonly "themes:install": "none";
181
+ readonly "news:read": "none";
182
+ readonly "calendar:read": "none";
183
+ readonly "bookings:readAvailability": "none";
184
+ readonly "media:read": "none";
185
+ readonly "addresses:read": "none";
186
+ readonly "addressBook:proposeImport": "none";
187
+ };
188
+ /** The permissions that read the register, in the order of the list above. */
189
+ export declare const REGISTER_READING_PERMISSIONS: readonly PluginPermission[];
190
+ /** Whether any of the permissions a manifest asks for reads the register. */
191
+ export declare function readsRegister(permissions: readonly string[]): boolean;
192
+ /**
193
+ * Categories of personal data a plugin declares it will process.
194
+ *
195
+ * Shown on the consent screen before an install, and stored with the
196
+ * installation as the snapshot the board agreed to. Installing the plugin
197
+ * writes them into the association's record of processing activities (GDPR
198
+ * art. 30) as the categories that processing touches. It is a declaration, not
199
+ * an enforcement point: what the plugin can actually reach follows from its
200
+ * permissions above and from the actions it is allowed to call.
201
+ *
202
+ * Not only the register. A plugin that dispatches core actions handles
203
+ * whatever those actions return: an assistant passing issue reports and
204
+ * minutes to a model provider handles free text, and one reading charges
205
+ * handles financial data. So the list is ACTION_PERSONAL_DATA, in its order.
206
+ *
207
+ * Two of them only one kind of plugin may declare. A personal identity number
208
+ * is never returned to a plugin, and a person with protected personal data
209
+ * (skyddade personuppgifter) never appears in one's reads at all, so for any
210
+ * other plugin a declaration naming either would describe something that
211
+ * cannot happen. A plugin that proposes an import carries the member list the
212
+ * other way, and that list can hold both (ADR 0043): the manifest refuses
213
+ * either category without `addressBook:proposeImport`, and requires both with
214
+ * it.
215
+ */
216
+ export declare const PLUGIN_PERSONAL_DATA_CATEGORIES: readonly ["name", "apartment", "residency", "email", "phone", "postalAddress", "personalIdentityNumber", "account", "financial", "health", "photograph", "freeText", "auditTrail", "protected"];
217
+ /**
218
+ * The personal data categories a plugin that proposes an import must declare,
219
+ * and the two no other plugin may.
220
+ */
221
+ export declare const PROPOSE_IMPORT_PERSONAL_DATA: readonly ["name", "apartment", "residency", "email", "phone", "personalIdentityNumber", "protected"];
222
+ export declare const PROPOSE_IMPORT_ONLY_PERSONAL_DATA: readonly ["personalIdentityNumber", "protected"];
223
+ export type PluginPersonalDataCategory = (typeof PLUGIN_PERSONAL_DATA_CATEGORIES)[number];
224
+ //# sourceMappingURL=permissions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../src/permissions.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,kBAAkB;AAC7B;;;;;;;;;GASG;AACH,kBAAkB;AAClB;;;;;GAKG;AACH,yBAAyB;AACzB,+DAA+D;AAC/D,WAAW;AACX;;;;;;;GAOG;AACH,UAAU;AACV,gEAAgE;AAChE,eAAe;AACf;;;;;;;;;;;;;GAaG;AACH,eAAe;AACf;;;;;;GAMG;AACH,yBAAyB;AACzB;;;;;;;;;GASG;AACH,aAAa;AACb;;;;;;;;GAQG;AACH,WAAW;AACX;;;;;;;GAOG;AACH,eAAe;AACf;;;;GAIG;AACH,2BAA2B;AAC3B;;;;;;;;;GASG;AACH,YAAY;AACZ;;;;GAIG;AACH,gBAAgB;AAChB;;;;;;;;;GASG;AACH,gBAAgB;AAChB;;;;;;;;;;;GAWG;AACH,2BAA2B,CACnB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnE,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,gBAAgB,CAE3E;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,0BAA0B;iCACjB,OAAO;wCACA,OAAO;0BACrB,MAAM;yBACP,MAAM;8BACD,MAAM;8BACN,OAAO;wCACG,MAAM;4BAClB,MAAM;+BACH,MAAM;0BACX,MAAM;8BACF,MAAM;0CACM,MAAM;2BACrB,MAAM;+BACF,MAAM;0CAIK,MAAM;CAC0B,CAAC;AAEhE,8EAA8E;AAC9E,eAAO,MAAM,4BAA4B,EAAE,SAAS,gBAAgB,EAGjE,CAAC;AAEJ,6EAA6E;AAC7E,wBAAgB,aAAa,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAIrE;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,+BAA+B,iMAoCM,CAAC;AAEnD;;;GAGG;AACH,eAAO,MAAM,4BAA4B,sGAQiB,CAAC;AAE3D,eAAO,MAAM,iCAAiC,kDAGY,CAAC;AAE3D,MAAM,MAAM,0BAA0B,GACpC,CAAC,OAAO,+BAA+B,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -0,0 +1,277 @@
1
+ /**
2
+ * What a plugin may ask the host for.
3
+ *
4
+ * The list is deliberately short and read-only. A backend plugin runs at full
5
+ * process privilege (ADR 0003 - there is no sandbox in v1), so these
6
+ * permissions are not a security boundary against hostile code; they are the
7
+ * declaration the board consents to before an install, and the boundary the
8
+ * SDK enforces against an honest plugin reaching further than it said it
9
+ * would. Curation of the catalog is what stands between an instance and
10
+ * hostile code, and the revisit trigger in ADR 0003 records when that changes.
11
+ *
12
+ * No permission grants write access to the register in v0. A plugin that
13
+ * needs to change resident data is a core feature request, not a plugin.
14
+ *
15
+ * A new value here is a new member of the catalog's permission list, and an
16
+ * instance that does not know it refuses the whole catalog index that carries
17
+ * it. The catalog therefore lists an entry asking for one of the content
18
+ * permissions below only in an index that older instances do not read: the
19
+ * version 2 index (ADR 0032).
20
+ */
21
+ export const PLUGIN_PERMISSIONS = [
22
+ /**
23
+ * Apartments, names, who is a resident, who is a member, and when a person
24
+ * moved in or out. Never contact details, never personal identity numbers,
25
+ * and never a person flagged with protected personal data - those are
26
+ * excluded from every plugin read regardless of permission (plan section
27
+ * 4.4).
28
+ *
29
+ * Board positions are not in it. Who sits on the board is a core capability,
30
+ * read nowhere in the host object a plugin is given.
31
+ */
32
+ "addressBook:read",
33
+ /**
34
+ * Additionally email and phone. Separate from addressBook:read because
35
+ * contact data is board-only in the core product, so a plugin asking for it
36
+ * is asking for markedly more than one that only needs to know who lives
37
+ * where.
38
+ */
39
+ "addressBook:readContact",
40
+ /** Send mail through the instance's configured SMTP server. */
41
+ "mail:send",
42
+ /**
43
+ * Send text messages through the instance's configured SMS provider.
44
+ *
45
+ * Separate from mail:send because the two do not cost the association the
46
+ * same thing. Mail leaves through a server the instance is already set up
47
+ * for; a text message is billed per message against a provider contract the
48
+ * board signed, and an instance that has bought none cannot send one at all.
49
+ */
50
+ "sms:send",
51
+ /** Register background workers and enqueue or schedule jobs. */
52
+ "jobs:schedule",
53
+ /**
54
+ * The fee notification runs and their notices, and the charges to members,
55
+ * as the board's own documents state them, and the events that say one was
56
+ * issued, recorded, corrected or removed.
57
+ *
58
+ * Masked as the files the board hands over are, and further: the names on a
59
+ * notice whose household holds a person with protected personal data are
60
+ * withheld, as on the fee notice file, and a charge on such a person withholds
61
+ * who and where entirely, where the debiting list withholds only where. A
62
+ * plugin is further from the board than the economic manager is, and the
63
+ * address book's rule that a protected person never reaches a plugin holds
64
+ * here too. A personal identity number is never returned, and there is no
65
+ * payment state to return: core records none.
66
+ */
67
+ "finances:read",
68
+ /**
69
+ * Record that a fee notice or a charge was delivered: by which route, when,
70
+ * and under which reference the receiving system knows it. A receipt and
71
+ * never a paid flag. Separate from finances:read because it writes, and the
72
+ * board consents to a plugin that only reads the books knowing that it cannot
73
+ * add anything to them.
74
+ */
75
+ "finances:recordDelivery",
76
+ /**
77
+ * Add blocks to the association's website.
78
+ *
79
+ * What such a block renders is published to anybody who reads the page,
80
+ * account or not, which is why it is a permission the board consents to
81
+ * rather than something a manifest may simply declare. The host prints what
82
+ * the block renders through an allowlist of elements, so it is never a
83
+ * script, a stylesheet or a resource from another host - but the words in it
84
+ * are the plugin's to choose.
85
+ */
86
+ "site:blocks",
87
+ /**
88
+ * The association's published news items: the title, the body's text, when
89
+ * each was published and whether it is for the members or for anyone.
90
+ *
91
+ * Not a register permission. It reads what the board has already
92
+ * published, and never who wrote an item, a comment on it or who read it
93
+ * (ADR 0032). The text is the board's and may name somebody, which is why a
94
+ * plugin holding it declares `freeText`.
95
+ */
96
+ "news:read",
97
+ /**
98
+ * The published events and their occurrences, and the notice of every
99
+ * general meeting that has been called and not yet held.
100
+ *
101
+ * Never a sign-up, a roll-call, an attendance or a proxy: how many places
102
+ * are left at an occurrence is the most it says about who is coming. Like
103
+ * news:read, it reads the board's text and declares `freeText`.
104
+ */
105
+ "calendar:read",
106
+ /**
107
+ * The bookable resources the house offers, and when each is taken. Never by
108
+ * whom: no booker, no apartment, no booking's identifier, and two bookings
109
+ * that touch are one interval (ADR 0032).
110
+ */
111
+ "bookings:readAvailability",
112
+ /**
113
+ * A stored picture, by its id: one held for anyone or for the members, whose
114
+ * upload declared that it shows no identifiable person (ADR 0032).
115
+ *
116
+ * Never a document, never a household's or the board's file, and never a
117
+ * picture of people: a photograph of a person needs a publication consent,
118
+ * and the consent the core records is for the website, not for wherever a
119
+ * plugin puts the picture. A picture is still a photograph, which is why a
120
+ * plugin holding it declares `photograph`.
121
+ */
122
+ "media:read",
123
+ /**
124
+ * The association's addresses: the street and number of each entrance, and
125
+ * nothing about who lives at them. Not addressBook:read, which reads the
126
+ * apartments and the people in them.
127
+ */
128
+ "addresses:read",
129
+ /**
130
+ * Install and update themes on the instance (ADR 0046).
131
+ *
132
+ * A theme is data and passes the same install lint however it arrives, so
133
+ * this grants no way past the theme gate: what a board consents to is a
134
+ * plugin putting themes on the instance's theme screen, for an
135
+ * administrator to preview and activate there. Each install is made for a
136
+ * person in the web interface who may install themes, never by the plugin on
137
+ * its own.
138
+ */
139
+ "themes:install",
140
+ /**
141
+ * Hand a member list to the core for the board to review (ADR 0043).
142
+ *
143
+ * The one way a plugin brings data towards the register, and it writes
144
+ * nothing: the core holds the file as an import proposal on its own import
145
+ * screen, and a board member previews, decides and applies it there, or
146
+ * rejects it. It grants no read of the register and raises no route's
147
+ * capability floor, so the plugin learns nothing about what the file would
148
+ * do. It does hold the file, though, which can carry every personal identity
149
+ * number in the cooperative and rows about persons with protected personal
150
+ * data, so a manifest declaring it declares those categories too.
151
+ */
152
+ "addressBook:proposeImport",
153
+ ];
154
+ export function isPluginPermission(value) {
155
+ return PLUGIN_PERMISSIONS.includes(value);
156
+ }
157
+ /**
158
+ * Whether a permission lets a plugin read the register, or the finances that
159
+ * carry the names of the people in it.
160
+ *
161
+ * Every permission is classified, and the record is typed against
162
+ * `PluginPermission`, so a permission added to the list above fails to compile
163
+ * until somebody has said which it is. That is the point of a classification
164
+ * over a list of the refused: the rules that keep a plugin with a device route
165
+ * or a website block away from the register (ADR 0006, ADR 0031) hold a new
166
+ * permission that reads it out unless somebody remembers to add it to each.
167
+ * `finances:recordDelivery` writes a receipt and returns no one's details, so
168
+ * it is not a read. The content permissions (`news:read`, `calendar:read`,
169
+ * `bookings:readAvailability`, `media:read`, `addresses:read`) read what the
170
+ * website publishes, never the register, so a plugin with a device route may
171
+ * hold them; the host withholds text that names a resident from such a plugin.
172
+ */
173
+ export const PERMISSION_REGISTER_ACCESS = {
174
+ "addressBook:read": "reads",
175
+ "addressBook:readContact": "reads",
176
+ "mail:send": "none",
177
+ "sms:send": "none",
178
+ "jobs:schedule": "none",
179
+ "finances:read": "reads",
180
+ "finances:recordDelivery": "none",
181
+ "site:blocks": "none",
182
+ "themes:install": "none",
183
+ "news:read": "none",
184
+ "calendar:read": "none",
185
+ "bookings:readAvailability": "none",
186
+ "media:read": "none",
187
+ "addresses:read": "none",
188
+ // Reads nothing from the register, but holds the member list it proposes.
189
+ // The rules that keep a device route or a website block away from it name
190
+ // this permission alongside `readsRegister` (ADR 0043).
191
+ "addressBook:proposeImport": "none",
192
+ };
193
+ /** The permissions that read the register, in the order of the list above. */
194
+ export const REGISTER_READING_PERMISSIONS = PLUGIN_PERMISSIONS.filter((permission) => PERMISSION_REGISTER_ACCESS[permission] === "reads");
195
+ /** Whether any of the permissions a manifest asks for reads the register. */
196
+ export function readsRegister(permissions) {
197
+ return permissions.some((permission) => REGISTER_READING_PERMISSIONS.includes(permission));
198
+ }
199
+ /**
200
+ * Categories of personal data a plugin declares it will process.
201
+ *
202
+ * Shown on the consent screen before an install, and stored with the
203
+ * installation as the snapshot the board agreed to. Installing the plugin
204
+ * writes them into the association's record of processing activities (GDPR
205
+ * art. 30) as the categories that processing touches. It is a declaration, not
206
+ * an enforcement point: what the plugin can actually reach follows from its
207
+ * permissions above and from the actions it is allowed to call.
208
+ *
209
+ * Not only the register. A plugin that dispatches core actions handles
210
+ * whatever those actions return: an assistant passing issue reports and
211
+ * minutes to a model provider handles free text, and one reading charges
212
+ * handles financial data. So the list is ACTION_PERSONAL_DATA, in its order.
213
+ *
214
+ * Two of them only one kind of plugin may declare. A personal identity number
215
+ * is never returned to a plugin, and a person with protected personal data
216
+ * (skyddade personuppgifter) never appears in one's reads at all, so for any
217
+ * other plugin a declaration naming either would describe something that
218
+ * cannot happen. A plugin that proposes an import carries the member list the
219
+ * other way, and that list can hold both (ADR 0043): the manifest refuses
220
+ * either category without `addressBook:proposeImport`, and requires both with
221
+ * it.
222
+ */
223
+ export const PLUGIN_PERSONAL_DATA_CATEGORIES = [
224
+ /** Given and family name. */
225
+ "name",
226
+ /** Which apartment and address a person is connected to. */
227
+ "apartment",
228
+ /** Move-in and move-out dates, and whether the person is a member. */
229
+ "residency",
230
+ "email",
231
+ "phone",
232
+ /** A postal address of the person's own, not the apartment's. */
233
+ "postalAddress",
234
+ /**
235
+ * Personal identity number (personnummer). Only with
236
+ * `addressBook:proposeImport`.
237
+ */
238
+ "personalIdentityNumber",
239
+ /** Sign-in credentials and sessions. */
240
+ "account",
241
+ /** Charges, debiting basis and what a person owes or has paid. */
242
+ "financial",
243
+ /**
244
+ * Health, an art. 9 special category. Declared by a plugin that handles text
245
+ * people wrote themselves, where it may be volunteered.
246
+ */
247
+ "health",
248
+ /** A photograph, whether or not anybody is recognisable in it. */
249
+ "photograph",
250
+ /** Text a person wrote themselves, which may name anybody. */
251
+ "freeText",
252
+ /** The audit log's record of who did what to whose data. */
253
+ "auditTrail",
254
+ /**
255
+ * Rows about a person with protected personal data (skyddade
256
+ * personuppgifter). Only with `addressBook:proposeImport`.
257
+ */
258
+ "protected",
259
+ ];
260
+ /**
261
+ * The personal data categories a plugin that proposes an import must declare,
262
+ * and the two no other plugin may.
263
+ */
264
+ export const PROPOSE_IMPORT_PERSONAL_DATA = [
265
+ "name",
266
+ "apartment",
267
+ "residency",
268
+ "email",
269
+ "phone",
270
+ "personalIdentityNumber",
271
+ "protected",
272
+ ];
273
+ export const PROPOSE_IMPORT_ONLY_PERSONAL_DATA = [
274
+ "personalIdentityNumber",
275
+ "protected",
276
+ ];
277
+ //# sourceMappingURL=permissions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"permissions.js","sourceRoot":"","sources":["../src/permissions.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC;;;;;;;;;OASG;IACH,kBAAkB;IAClB;;;;;OAKG;IACH,yBAAyB;IACzB,+DAA+D;IAC/D,WAAW;IACX;;;;;;;OAOG;IACH,UAAU;IACV,gEA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