diff --git a/CHANGELOG.md b/CHANGELOG.md index 03c9953..cd776b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,4 +17,9 @@ The first release. - One action, `summary`, which returns the three counts and names nobody, offered on the platform's own screens and, once an administrator arms it, to connected apps. +- A `processing` declaration in the manifest: the purpose, the legal basis + (legitimate interest, with the interest stated), how long the data is kept + (it is not kept) and whose data it is (members and residents). The board + reads it on the consent screen, and a person can object to this processing + on its own. - Swedish and English. diff --git a/README.md b/README.md index 3bf131a..40795ea 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ is the reference. This is where this package meets each part of it. | Part | Here | | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Manifest | The `openbrf` field of [`package.json`](package.json): id, entries, permission, personal data, view, settings (all four field types) and the action. | +| Manifest | The `openbrf` field of [`package.json`](package.json): id, entries, permission, personal data, processing, view, settings (all four field types) and the action. | | Server entry | [`src/server.ts`](src/server.ts), compiled by `tsc` to `dist/server.cjs`: one CommonJS file that requires only `@nestjs/common` and `zod`, which resolve to the host's own copies. | | NestJS module | A provider with an `onModuleInit` hook, and a controller whose two routes the host mounts at `/api/plugin/occupancy/summary` and `/api/plugin/occupancy/apartments`. | | Route input | `GET apartments` takes one query parameter, read with the host's zod. Anything else is answered with 400. | @@ -87,7 +87,9 @@ The tests cover four things: against every key the manifest, the view and the action name. A Module Federation remote cannot be served by `vite dev`. To try the view in a -running instance, run `vite build --watch` and install the package there. +running instance, run `vite build --watch`, then `pnpm build:server` once the +first build has finished, and install the package there. The view build empties +`dist/`, so without the second step the package has no server bundle. ## Starting your own plugin from this one @@ -99,11 +101,13 @@ The licence is MIT-0, so you can copy any of it without keeping a notice. `useTranslation` reads in the view. 2. Rename the package and start your version at `0.1.0`. 3. Declare only what your code uses. The board sees `permissions`, - `personalData` and `actions` on the consent screen before anything is - downloaded, and a later version that asks for more is refused until the - board consents again. -4. Keep the server in one file, or bundle it into one. Keep `@nestjs/common`, - `@nestjs/core` and `zod` as peer dependencies and never bundle them, and + `personalData`, `actions` and `processing` on the consent screen before + anything is downloaded, and a later version that asks for more is refused + until the board consents again. `processing` says why the plugin handles + personal data: its purpose, legal basis, retention and whose data it is, in + Swedish and English. +4. Keep the server in one file, or bundle it into one. Keep `@nestjs/common` + and `zod` as peer dependencies and never bundle them, and import `@openbrf/plugin-sdk` for types only. The package check refuses any runtime dependency, and a bundle that requires another package or a relative path. @@ -137,8 +141,9 @@ tarball cannot be attached. To have a version listed, open a pull request in [`openbrf/catalog`](https://github.com/openbrf/catalog) that adds its entry -with the release's tarball URL, `sha512` and `bytes`. Copy the declaration from -the manifest exactly: the catalog's check compares the two. +with the release's tarball URL, `sha512` and `bytes`. Copy the fields the +catalog checks from the manifest exactly: the catalog's check compares them. It +does not compare `processing` yet. ## Licence diff --git a/package.json b/package.json index 73204f6..796d692 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,25 @@ "apartment", "residency" ], + "processing": { + "purpose": { + "sv": "Visa styrelsen hur många lägenheter, boende och medlemmar föreningen har, och hur många boende och bostadsrättshavare varje lägenhet har, räknat bland de boende som tillägget kan se. Inga namn visas.", + "en": "Show the board how many apartments, residents and members the association has, and how many residents and tenant-owners each apartment has, counting only the residents the plugin can see. No names are shown." + }, + "legalBasis": "legitimateInterest", + "legitimateInterest": { + "sv": "Styrelsens behov av en överblick över boendet för att förvalta föreningen.", + "en": "The board's need for an overview of who lives in the building in order to run the association." + }, + "retention": { + "sv": "Ingenting sparas: uppgifterna läses ur registret varje gång vyn visas.", + "en": "Nothing is kept: the data is read from the register each time the view is shown." + }, + "dataSubjects": [ + "members", + "residents" + ] + }, "view": { "module": "./View", "titleKey": "view.title"