From 403f05e4858e38e11c64c671edd52a996c6f9a6b Mon Sep 17 00:00:00 2001 From: Holger Jensen Date: Tue, 20 Oct 2026 09:25:54 -0400 Subject: [PATCH 1/3] feat: declare openbrf.processing in the manifest The platform now asks a plugin that handles personal data to say why (ADR 0035): the purpose, the legal basis, how long the data is kept and whose data it is. Declare it for the occupancy view, copied from the fixture in openbrf/openbrf#447. --- CHANGELOG.md | 5 +++++ README.md | 8 +++++--- package.json | 19 +++++++++++++++++++ 3 files changed, 29 insertions(+), 3 deletions(-) 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 bc79f45..51230b2 100644 --- a/README.md +++ b/README.md @@ -99,9 +99,11 @@ 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. + `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`, `@nestjs/core` and `zod` as peer dependencies and never bundle them, and import `@openbrf/plugin-sdk` for types only. The package check refuses any diff --git a/package.json b/package.json index bbff7a9..29756ac 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 vilka som bor var.", + "en": "Show the board how many apartments, residents and members the association has, and who lives where." + }, + "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" From b71f3e13979155d45f67de79c1ebb5a9575be8b6 Mon Sep 17 00:00:00 2001 From: Holger Jensen Date: Tue, 20 Oct 2026 09:51:47 -0400 Subject: [PATCH 2/3] fix: say the view counts residents per apartment, never names them The processing purpose said the board sees who lives where. The view shows counts of residents and tenant-owners per apartment, only for the residents the plugin can see, and no names. The purpose is on the consent screen, so it now says that. The text matches fixtures/example-plugin in openbrf/openbrf#447. --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 29756ac..00ad1f2 100644 --- a/package.json +++ b/package.json @@ -45,8 +45,8 @@ ], "processing": { "purpose": { - "sv": "Visa styrelsen hur många lägenheter, boende och medlemmar föreningen har, och vilka som bor var.", - "en": "Show the board how many apartments, residents and members the association has, and who lives where." + "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": { From b21fe4e64d02d1a6de844cc8af264ae924e28318 Mon Sep 17 00:00:00 2001 From: Holger Jensen Date: Fri, 23 Oct 2026 15:20:04 -0400 Subject: [PATCH 3/3] docs: list processing in the manifest row and correct three README steps --- README.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 23a6b19..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 @@ -104,8 +106,8 @@ The licence is MIT-0, so you can copy any of it without keeping a notice. 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`, - `@nestjs/core` and `zod` as peer dependencies and never bundle them, and +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. @@ -139,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