@smartkomm/plexus-cli 0.1.37 → 0.1.39
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/README.md +14 -0
- package/dist/cli.mjs +301 -188
- package/dist/skill/.managed-by-plexus-cli +1 -1
- package/dist/skill/SKILL.md +1 -0
- package/dist/skill/references/commands.md +17 -1
- package/dist/skill/references/learning-groups/import-classes-from-csv.md +87 -0
- package/dist/spec.snapshot.json +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
e79c7ddd2b7ce40782fa3813de5edb28dadf96246635c7b9cd2deacb1c445aed
|
package/dist/skill/SKILL.md
CHANGED
|
@@ -187,6 +187,7 @@ whole is the operator's (ask them; do not try).
|
|
|
187
187
|
| [finance/change-contract-grant.md](references/finance/change-contract-grant.md) | Mandant | Change a running contract's grants or reductions from a month on. |
|
|
188
188
|
| [finance/record-submission-date.md](references/finance/record-submission-date.md) | Mandant | Record a missing historic submission date of a SEPA direct debit. |
|
|
189
189
|
| [leads/list-leads.md](references/leads/list-leads.md) | Mandant | List a tenant's prospects. |
|
|
190
|
+
| [learning-groups/import-classes-from-csv.md](references/learning-groups/import-classes-from-csv.md) | Mandant | Import a school's classes from a class list (CSV + mapping file) as learning groups of a school year. |
|
|
190
191
|
| [marketing/demo-video-links.md](references/marketing/demo-video-links.md) | Plattform | Create personalised demo video links per recipient and read who watched what. |
|
|
191
192
|
| [notifications/debug-mail-delivery.md](references/notifications/debug-mail-delivery.md) | Plattform | Clear up a failed mail delivery: status, error code, self-test, retry. |
|
|
192
193
|
| [notifications/mail-level.md](references/notifications/mail-level.md) | Plattform | Set whether a school sends families only sign-in links or all mail. |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# plexus-cli command reference
|
|
2
2
|
|
|
3
3
|
Generated from the commands the CLI registers — do not edit; `plexus-cli <command> --help` prints the same.
|
|
4
|
-
|
|
4
|
+
286 commands. Every network command also takes `--env <local|staging|prod>`, `--tenant <slug>`,
|
|
5
5
|
`--json` (raw JSON instead of a table) and `--allow-prod` (required for a writing run against production).
|
|
6
6
|
|
|
7
7
|
- [Admission (offline)](#admission-offline) (1)
|
|
@@ -22,6 +22,7 @@ Generated from the commands the CLI registers — do not edit; `plexus-cli <comm
|
|
|
22
22
|
- [Introspection (own account)](#introspection-own-account) (1)
|
|
23
23
|
- [Jobs (platform operator)](#jobs-platform-operator) (4)
|
|
24
24
|
- [Marketing (platform operator)](#marketing-platform-operator) (6)
|
|
25
|
+
- [Master data (school token)](#master-data-school-token) (1)
|
|
25
26
|
- [Notifications (platform operator)](#notifications-platform-operator) (5)
|
|
26
27
|
- [Notifications (school token)](#notifications-school-token) (6)
|
|
27
28
|
- [Offer (offline)](#offer-offline) (66)
|
|
@@ -1210,6 +1211,21 @@ List the demo video catalogue (the ids a demo link can point at).
|
|
|
1210
1211
|
- **Right:** platform operator — needs a `_platform.*` right; a school's token is refused
|
|
1211
1212
|
- **Effect:** read — changes nothing on the deployment
|
|
1212
1213
|
|
|
1214
|
+
## Master data (school token)
|
|
1215
|
+
|
|
1216
|
+
### `learning-groups apply`
|
|
1217
|
+
|
|
1218
|
+
Bring a school's classes in from a file: program, school year and learning group per row, by stable key — plan unless --confirm.
|
|
1219
|
+
|
|
1220
|
+
- **Right:** school token — a module permission inside one school (the school's own administrator runs it)
|
|
1221
|
+
- **Effect:** plan by default — writes only with `--confirm` (and `--env`; on production also `--allow-prod`)
|
|
1222
|
+
|
|
1223
|
+
| Option | Description |
|
|
1224
|
+
|---|---|
|
|
1225
|
+
| `--file <value>` (required) | The class list (CSV, header row, the mapping's delimiter). |
|
|
1226
|
+
| `--mapping <value>` (required) | The mapping file (JSON): which column is code, unit, program, grade level, capacity; every other column ignored with a reason. |
|
|
1227
|
+
| `--confirm` | Write (else the plan only). |
|
|
1228
|
+
|
|
1213
1229
|
## Notifications (platform operator)
|
|
1214
1230
|
|
|
1215
1231
|
### `platform notifications list`
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Import a school's classes from a class list
|
|
2
|
+
|
|
3
|
+
**When to use:** a school hands over its class list (one class per row: code,
|
|
4
|
+
school, Bildungsgang, Fachrichtung, Stufe, places) and the classes should exist in
|
|
5
|
+
Plexus as learning groups of the current school year — before its pupils are
|
|
6
|
+
imported into them, or simply to set the year up.
|
|
7
|
+
|
|
8
|
+
## How Plexus holds a class
|
|
9
|
+
|
|
10
|
+
A class such as „Gym 7" or „FOS21.3AW" is a **learning group**. It hangs in a
|
|
11
|
+
chain: the **unit** (the school, by its key) offers a **program** (the
|
|
12
|
+
Bildungsgang with its Fachrichtung), the program has a **run** per school year
|
|
13
|
+
(„Schuljahr 2026/27"), and the run holds the learning groups — one per class,
|
|
14
|
+
with its grade level and places. A class list maps like this: class code →
|
|
15
|
+
learning group (name and identity), unit column → unit key, Bildungsgang +
|
|
16
|
+
Fachrichtung → program, the mapping's school year → run, Stufe → grade level,
|
|
17
|
+
places → capacity. A pupil's place in a class is an enrollment into that group.
|
|
18
|
+
|
|
19
|
+
## Prerequisites
|
|
20
|
+
- A token of the school's administrator with `administration.config.manage`
|
|
21
|
+
(held school-wide), or a platform operator token; `--allow-prod` on production.
|
|
22
|
+
- The units the list names exist (`org …`), each under the key the file uses.
|
|
23
|
+
- The class list as CSV with a header row, and a **mapping file** (JSON):
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"version": 1,
|
|
28
|
+
"delimiter": ";",
|
|
29
|
+
"schoolYear": { "key": "2026-27", "name": { "de": "Schuljahr 2026/27", "en": "School year 2026/27" },
|
|
30
|
+
"startDate": "2026-08-01", "endDate": "2027-07-31" },
|
|
31
|
+
"columns": { "code": "klasse", "unit": "unit", "capacity": "plaetze" },
|
|
32
|
+
"program": {
|
|
33
|
+
"nameColumns": ["bildungsgang", "fachrichtung"],
|
|
34
|
+
"kind": { "column": "bildungsgang", "values": { "Gymnasium": "school", "FOS zweijährig": "vocational" } },
|
|
35
|
+
"progressionMode": "annual_rollover",
|
|
36
|
+
"existing": { "gymnasium/Gymnasium": "gymnasium" }
|
|
37
|
+
},
|
|
38
|
+
"gradeLevel": { "column": "stufe", "values": { "Klasse 7": 7, "1. Ausbildungsjahr": null } },
|
|
39
|
+
"ignoredColumns": [{ "column": "notiz", "reason": "A note of whoever prepared the list." }]
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
- `program.nameColumns` name the program (non-empty values joined by a space).
|
|
44
|
+
`program.existing` points `<unit key>/<program name>` at a program that already
|
|
45
|
+
exists — typically the program of the school's admission offer, so the class
|
|
46
|
+
and the offer share it. Without an entry the program is `<unit key>-<name slug>`,
|
|
47
|
+
created when missing.
|
|
48
|
+
- `kind` and `gradeLevel` are a constant or `{ column, values }`; a value the map
|
|
49
|
+
does not list is refused. `null` = no grade level (a vocational year).
|
|
50
|
+
|
|
51
|
+
## Steps
|
|
52
|
+
```bash
|
|
53
|
+
# 1. The plan: every class with create / update / unchanged, nothing written.
|
|
54
|
+
plexus-cli --env <env> --tenant <slug> learning-groups apply --file ./klassen.csv --mapping ./klassen.mapping.json
|
|
55
|
+
|
|
56
|
+
# 2. Write.
|
|
57
|
+
plexus-cli --env <env> --tenant <slug> learning-groups apply --file ./klassen.csv --mapping ./klassen.mapping.json --confirm
|
|
58
|
+
# production additionally: --allow-prod
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Verify
|
|
62
|
+
```bash
|
|
63
|
+
# The same command again plans "unchanged" for every class and creates nothing.
|
|
64
|
+
plexus-cli --env <env> --tenant <slug> learning-groups apply --file ./klassen.csv --mapping ./klassen.mapping.json
|
|
65
|
+
```
|
|
66
|
+
In the app: Programme shows per school the programs with the school year and its
|
|
67
|
+
classes, each with its places.
|
|
68
|
+
|
|
69
|
+
## Idempotency / gotchas
|
|
70
|
+
- **Identity is the key, never a name.** A class is `<unit>:<school year>:<code>`
|
|
71
|
+
(the code as a slug: „FOS21.3AW" → `fos21-3aw`), a program its key, a school
|
|
72
|
+
year `<program key>-<year>`. A re-run finds every one of them again; two codes
|
|
73
|
+
on one slug („Gym 7" and „Gym-7") are refused.
|
|
74
|
+
- **The file decides a class, not a program.** A class takes the file's code,
|
|
75
|
+
grade level and capacity (a changed capacity is an `update`); an existing
|
|
76
|
+
program or school year is reused exactly as it is — an offer's program keeps
|
|
77
|
+
its name and stages.
|
|
78
|
+
- **Refused before anything is sent:** a column neither read nor in
|
|
79
|
+
`ignoredColumns`, a column the mapping names but the file lacks, an empty code
|
|
80
|
+
or unit, an unlisted mapped value, a capacity that is no whole number, a class
|
|
81
|
+
listed twice. Refused by the server, before the write: an unknown unit, a
|
|
82
|
+
program named in `existing` that does not exist, a program of another unit.
|
|
83
|
+
- A class that pupils of several Bildungsgänge share is one row with one program
|
|
84
|
+
in the list — the class list, not the pupil list, decides it.
|
|
85
|
+
|
|
86
|
+
## Related
|
|
87
|
+
- [Update a tenant's config](../config/update-tenant-config.md)
|