my-office-days-cli 0.1.0__tar.gz

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.
@@ -0,0 +1,25 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ test:
13
+ runs-on: ubuntu-latest
14
+ strategy:
15
+ matrix:
16
+ python-version: ["3.11", "3.12", "3.13"]
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ - uses: astral-sh/setup-uv@v6
20
+ with:
21
+ python-version: ${{ matrix.python-version }}
22
+ enable-cache: true
23
+ - run: uv sync --locked --dev
24
+ - run: uv run pytest
25
+ - run: uv build
@@ -0,0 +1,26 @@
1
+ name: Publish existing release to PyPI
2
+
3
+ on:
4
+ workflow_dispatch:
5
+
6
+ permissions:
7
+ contents: read
8
+
9
+ jobs:
10
+ publish:
11
+ runs-on: ubuntu-latest
12
+ environment:
13
+ name: pypi
14
+ url: https://pypi.org/project/my-office-days-cli/
15
+ permissions:
16
+ id-token: write
17
+ contents: read
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+ - uses: astral-sh/setup-uv@v6
21
+ with:
22
+ python-version: "3.13"
23
+ - run: uv sync --locked --dev
24
+ - run: uv run pytest
25
+ - run: uv build
26
+ - run: uv publish --trusted-publishing always
@@ -0,0 +1,41 @@
1
+ name: Release Please
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+
7
+ permissions:
8
+ contents: write
9
+ pull-requests: write
10
+
11
+ jobs:
12
+ release-please:
13
+ runs-on: ubuntu-latest
14
+ outputs:
15
+ release-created: ${{ steps.release.outputs.release_created }}
16
+ steps:
17
+ - id: release
18
+ uses: googleapis/release-please-action@v4
19
+ with:
20
+ config-file: release-please-config.json
21
+ manifest-file: .release-please-manifest.json
22
+
23
+ publish:
24
+ needs: release-please
25
+ if: ${{ needs.release-please.outputs.release-created == 'true' }}
26
+ runs-on: ubuntu-latest
27
+ environment:
28
+ name: pypi
29
+ url: https://pypi.org/project/my-office-days-cli/
30
+ permissions:
31
+ id-token: write
32
+ contents: read
33
+ steps:
34
+ - uses: actions/checkout@v4
35
+ - uses: astral-sh/setup-uv@v6
36
+ with:
37
+ python-version: "3.13"
38
+ - run: uv sync --locked --dev
39
+ - run: uv run pytest
40
+ - run: uv build
41
+ - run: uv publish --trusted-publishing always
@@ -0,0 +1,27 @@
1
+ .venv/
2
+ .pytest_cache/
3
+ __pycache__/
4
+ *.py[cod]
5
+ .env
6
+ .env.*
7
+ !.env.example
8
+
9
+ # Secrets and captures can contain bearer tokens and personal data.
10
+ config.json
11
+ credentials.json
12
+ *.har
13
+ captures/
14
+
15
+ # Keep downloaded packages and tool binaries outside Git.
16
+ *.apk
17
+ *.apks
18
+ *.aab
19
+ tools/
20
+
21
+ # Reverse-engineering material remains in the private Experiments workspace.
22
+ research/
23
+
24
+ # Distribution output.
25
+ dist/
26
+ build/
27
+ *.egg-info/
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.1.0"
3
+ }
@@ -0,0 +1,18 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0 (2026-10-09)
4
+
5
+
6
+ ### Features
7
+
8
+ * publish initial CLI ([0109797](https://github.com/cveld/my-office-days-cli/commit/0109797e593f0b8f93bd9ed9e76ae8c8232e0270))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * keep uv lock version in sync ([8c40d96](https://github.com/cveld/my-office-days-cli/commit/8c40d9608c921b90e4b93ad512906ae9878267a6))
14
+
15
+
16
+ ### Documentation
17
+
18
+ * link official Android app ([89ac485](https://github.com/cveld/my-office-days-cli/commit/89ac4853bd62218e7791fae1190dd3e89f1eb5b9))
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Carl in 't Veld
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,164 @@
1
+ Metadata-Version: 2.5
2
+ Name: my-office-days-cli
3
+ Version: 0.1.0
4
+ Summary: Personal CLI for My Office Days
5
+ Project-URL: Homepage, https://github.com/cveld/my-office-days-cli
6
+ Project-URL: Repository, https://github.com/cveld/my-office-days-cli
7
+ Project-URL: Issues, https://github.com/cveld/my-office-days-cli/issues
8
+ Author: Carl in 't Veld
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: booking,cli,my-office-days,workplace
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Environment :: Console
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Requires-Python: >=3.11
20
+ Requires-Dist: cryptography<51,>=46
21
+ Requires-Dist: httpx<1,>=0.28
22
+ Requires-Dist: keyring<26,>=25
23
+ Requires-Dist: typer<1,>=0.19
24
+ Description-Content-Type: text/markdown
25
+
26
+ # My Office Days CLI
27
+
28
+ [![CI](https://github.com/cveld/my-office-days-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/cveld/my-office-days-cli/actions/workflows/ci.yml)
29
+ [![Release Please](https://github.com/cveld/my-office-days-cli/actions/workflows/release-please.yml/badge.svg)](https://github.com/cveld/my-office-days-cli/actions/workflows/release-please.yml)
30
+ [![PyPI](https://img.shields.io/pypi/v/my-office-days-cli)](https://pypi.org/project/my-office-days-cli/)
31
+ [![Python](https://img.shields.io/pypi/pyversions/my-office-days-cli)](https://pypi.org/project/my-office-days-cli/)
32
+
33
+ A secure command-line client for your personal **My Office Days** account. View
34
+ locations and availability, inspect your bookings, and create a booking with an
35
+ explicit confirmation and read-back verification.
36
+
37
+ The API behavior implemented by this project was derived from the official
38
+ [My office days Android app on Google Play](https://play.google.com/store/apps/details?id=nl.ondmand.myofficedays&hl=en_US).
39
+
40
+ > [!IMPORTANT]
41
+ > This is an independent community project. It is not affiliated with or
42
+ > endorsed by My Office Days or On-D-Mand.
43
+
44
+ ## Highlights
45
+
46
+ - Passwordless login with the official one-time email-code flow.
47
+ - Sessions and encryption keys stay in the operating-system keyring.
48
+ - Supports the encrypted transport used by production tenants.
49
+ - Friendly booking type names such as `Lunch` and `Sport session`.
50
+ - Every booking shows a concrete plan and requires confirmation.
51
+ - JSON output makes the CLI convenient for scripts and agents.
52
+
53
+ ## Requirements
54
+
55
+ - Python 3.11 or newer
56
+ - [`uv`](https://docs.astral.sh/uv/)
57
+ - Your own authorized My Office Days account
58
+
59
+ ## Run without installing
60
+
61
+ After the first package has been published to PyPI:
62
+
63
+ ```powershell
64
+ uvx --from my-office-days-cli mod --help
65
+ ```
66
+
67
+ You can also install the command into a persistent uv tool environment:
68
+
69
+ ```powershell
70
+ uv tool install my-office-days-cli
71
+ mod --help
72
+ ```
73
+
74
+ ## Configure and log in
75
+
76
+ The base URL includes both the tenant host and customer path:
77
+
78
+ ```powershell
79
+ mod config set-base-url https://<tenant>.server.werktopkantoor.nl/<customer-id>
80
+ mod auth login
81
+ mod doctor
82
+ ```
83
+
84
+ `auth login` asks for your email address and a six-digit code. The email address
85
+ and code are not stored. The resulting session and optional encryption key are
86
+ saved in the OS keyring. Non-secret configuration is stored under
87
+ `%LOCALAPPDATA%\my-office-days-cli` on Windows.
88
+
89
+ ## Common commands
90
+
91
+ List the booking types configured by your organization:
92
+
93
+ ```powershell
94
+ mod booking-types
95
+ ```
96
+
97
+ Check availability using a friendly booking type:
98
+
99
+ ```powershell
100
+ mod availability --date 2026-10-15 --type Lunch
101
+ mod availability --date 2026-10-12 --type "Sport session"
102
+ ```
103
+
104
+ List your bookings:
105
+
106
+ ```powershell
107
+ mod bookings list
108
+ mod bookings list --date 2026-10-15
109
+ ```
110
+
111
+ Create a booking:
112
+
113
+ ```powershell
114
+ mod bookings create --date 2026-10-15 --type Lunch --slot early
115
+ ```
116
+
117
+ The CLI first checks the current state and prints the exact date, location,
118
+ timeslot, capacity, and remaining places. Nothing changes until you confirm.
119
+ Use `--yes` only when you have already reviewed that plan.
120
+
121
+ ## Security model
122
+
123
+ - Only use the CLI for an account you are authorized to access.
124
+ - Credentials never belong in config files, command output, or Git.
125
+ - Booking creation performs a read-before-write and read-back verification.
126
+ - Unknown mutation contracts fail closed rather than guessing against
127
+ production.
128
+
129
+ See [`docs/security.md`](docs/security.md) for details.
130
+
131
+ ## Development
132
+
133
+ ```powershell
134
+ git clone https://github.com/cveld/my-office-days-cli.git
135
+ cd my-office-days-cli
136
+ uv sync
137
+ uv run pytest
138
+ uv run mod --help
139
+ ```
140
+
141
+ Build the package locally:
142
+
143
+ ```powershell
144
+ uv build
145
+ uvx --from ./dist/my_office_days_cli-0.0.0-py3-none-any.whl mod --help
146
+ ```
147
+
148
+ ## Releases
149
+
150
+ [Release Please](https://github.com/googleapis/release-please) maintains the
151
+ changelog and release pull request from Conventional Commits. Merging a release
152
+ PR creates a GitHub release. The publish workflow then builds, verifies, and
153
+ publishes the package to PyPI using Trusted Publishing.
154
+
155
+ Repository maintainers must configure a PyPI Trusted Publisher for:
156
+
157
+ - owner: `cveld`
158
+ - repository: `my-office-days-cli`
159
+ - workflow: `release-please.yml`
160
+ - environment: `pypi`
161
+
162
+ ## License
163
+
164
+ Licensed under the [MIT License](LICENSE).
@@ -0,0 +1,139 @@
1
+ # My Office Days CLI
2
+
3
+ [![CI](https://github.com/cveld/my-office-days-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/cveld/my-office-days-cli/actions/workflows/ci.yml)
4
+ [![Release Please](https://github.com/cveld/my-office-days-cli/actions/workflows/release-please.yml/badge.svg)](https://github.com/cveld/my-office-days-cli/actions/workflows/release-please.yml)
5
+ [![PyPI](https://img.shields.io/pypi/v/my-office-days-cli)](https://pypi.org/project/my-office-days-cli/)
6
+ [![Python](https://img.shields.io/pypi/pyversions/my-office-days-cli)](https://pypi.org/project/my-office-days-cli/)
7
+
8
+ A secure command-line client for your personal **My Office Days** account. View
9
+ locations and availability, inspect your bookings, and create a booking with an
10
+ explicit confirmation and read-back verification.
11
+
12
+ The API behavior implemented by this project was derived from the official
13
+ [My office days Android app on Google Play](https://play.google.com/store/apps/details?id=nl.ondmand.myofficedays&hl=en_US).
14
+
15
+ > [!IMPORTANT]
16
+ > This is an independent community project. It is not affiliated with or
17
+ > endorsed by My Office Days or On-D-Mand.
18
+
19
+ ## Highlights
20
+
21
+ - Passwordless login with the official one-time email-code flow.
22
+ - Sessions and encryption keys stay in the operating-system keyring.
23
+ - Supports the encrypted transport used by production tenants.
24
+ - Friendly booking type names such as `Lunch` and `Sport session`.
25
+ - Every booking shows a concrete plan and requires confirmation.
26
+ - JSON output makes the CLI convenient for scripts and agents.
27
+
28
+ ## Requirements
29
+
30
+ - Python 3.11 or newer
31
+ - [`uv`](https://docs.astral.sh/uv/)
32
+ - Your own authorized My Office Days account
33
+
34
+ ## Run without installing
35
+
36
+ After the first package has been published to PyPI:
37
+
38
+ ```powershell
39
+ uvx --from my-office-days-cli mod --help
40
+ ```
41
+
42
+ You can also install the command into a persistent uv tool environment:
43
+
44
+ ```powershell
45
+ uv tool install my-office-days-cli
46
+ mod --help
47
+ ```
48
+
49
+ ## Configure and log in
50
+
51
+ The base URL includes both the tenant host and customer path:
52
+
53
+ ```powershell
54
+ mod config set-base-url https://<tenant>.server.werktopkantoor.nl/<customer-id>
55
+ mod auth login
56
+ mod doctor
57
+ ```
58
+
59
+ `auth login` asks for your email address and a six-digit code. The email address
60
+ and code are not stored. The resulting session and optional encryption key are
61
+ saved in the OS keyring. Non-secret configuration is stored under
62
+ `%LOCALAPPDATA%\my-office-days-cli` on Windows.
63
+
64
+ ## Common commands
65
+
66
+ List the booking types configured by your organization:
67
+
68
+ ```powershell
69
+ mod booking-types
70
+ ```
71
+
72
+ Check availability using a friendly booking type:
73
+
74
+ ```powershell
75
+ mod availability --date 2026-10-15 --type Lunch
76
+ mod availability --date 2026-10-12 --type "Sport session"
77
+ ```
78
+
79
+ List your bookings:
80
+
81
+ ```powershell
82
+ mod bookings list
83
+ mod bookings list --date 2026-10-15
84
+ ```
85
+
86
+ Create a booking:
87
+
88
+ ```powershell
89
+ mod bookings create --date 2026-10-15 --type Lunch --slot early
90
+ ```
91
+
92
+ The CLI first checks the current state and prints the exact date, location,
93
+ timeslot, capacity, and remaining places. Nothing changes until you confirm.
94
+ Use `--yes` only when you have already reviewed that plan.
95
+
96
+ ## Security model
97
+
98
+ - Only use the CLI for an account you are authorized to access.
99
+ - Credentials never belong in config files, command output, or Git.
100
+ - Booking creation performs a read-before-write and read-back verification.
101
+ - Unknown mutation contracts fail closed rather than guessing against
102
+ production.
103
+
104
+ See [`docs/security.md`](docs/security.md) for details.
105
+
106
+ ## Development
107
+
108
+ ```powershell
109
+ git clone https://github.com/cveld/my-office-days-cli.git
110
+ cd my-office-days-cli
111
+ uv sync
112
+ uv run pytest
113
+ uv run mod --help
114
+ ```
115
+
116
+ Build the package locally:
117
+
118
+ ```powershell
119
+ uv build
120
+ uvx --from ./dist/my_office_days_cli-0.0.0-py3-none-any.whl mod --help
121
+ ```
122
+
123
+ ## Releases
124
+
125
+ [Release Please](https://github.com/googleapis/release-please) maintains the
126
+ changelog and release pull request from Conventional Commits. Merging a release
127
+ PR creates a GitHub release. The publish workflow then builds, verifies, and
128
+ publishes the package to PyPI using Trusted Publishing.
129
+
130
+ Repository maintainers must configure a PyPI Trusted Publisher for:
131
+
132
+ - owner: `cveld`
133
+ - repository: `my-office-days-cli`
134
+ - workflow: `release-please.yml`
135
+ - environment: `pypi`
136
+
137
+ ## License
138
+
139
+ Licensed under the [MIT License](LICENSE).
@@ -0,0 +1,105 @@
1
+ # Bevestigd API-contract
2
+
3
+ Onderstaand contract is afgeleid uit de officiële Android-app. De read-only
4
+ calls en het maken van een boeking zijn live gevalideerd met een eigen account.
5
+
6
+ ## Basis-URL en tenantselectie
7
+
8
+ - Productie v1: `https://server.werktopkantoor.nl/`, waarna de app de
9
+ tenantprefix en customer-id toevoegt.
10
+ - Productie v2: `https://{{customer}}.server.werktopkantoor.nl/<customer>`,
11
+ waarbij underscores en koppeltekens alleen uit de hostnaam worden verwijderd.
12
+ De customer-id blijft als padsegment staan. Voorbeeldstructuur:
13
+ `https://tenant.server.werktopkantoor.nl/tenant`.
14
+ - GraphQL-pad: `connection/graphql`.
15
+ - De CLI verwacht voorlopig de volledig samengestelde tenant-basis-URL,
16
+ inclusief het customer-pad. Deze wordt lokaal ingesteld en niet in de skill
17
+ hardcoded.
18
+
19
+ Bron/bewijs: Hermes-bundle, modules rond `ConfigClient`, `apiConfigProduction`
20
+ en `GraphqlBuilder`.
21
+
22
+ ## Authenticatie
23
+
24
+ - De waarde uit app-opslagveld `employee_session` wordt letterlijk als
25
+ `Authorization`-header verzonden; er wordt geen `Bearer `-prefix toegevoegd.
26
+ - De app kent een JWT-modus waarin request- en response-inhoud aanvullend met
27
+ AES-CBC en dubbele Base64-codering wordt verwerkt. De CLI ondersteunt deze
28
+ variant voor GraphQL-calls en bewaart de ontvangen sleutel veilig.
29
+ - Login-link aanvragen: `POST /connection/rest/employee/reset` met velden
30
+ `email`, `forceEmail` en `accessTo` (standaard `app`), zonder authenticatie.
31
+ - Login-token verifiëren: `POST /connection/rest/employee/authenticate` met
32
+ `email` en `token`, zonder authenticatie.
33
+ - Beide loginrequests gebruiken `application/x-www-form-urlencoded`. Een
34
+ succesvolle resetrespons heeft `status: success` en kan `sent_to` bevatten.
35
+ Een succesvolle authenticate-respons heeft `status: success` en bevat
36
+ minimaal `guid` en `authorisation`; `key` is optioneel en activeert de
37
+ aanvullende JWT-codering.
38
+
39
+ Bron/bewijs: Hermes-bundle, `sendToken`, `verifyToken` en `createAxiosClient`.
40
+
41
+ ## GraphQL-transport
42
+
43
+ Method + path: `POST connection/graphql`
44
+
45
+ Requestbody is een JSON-array. Elk item bevat:
46
+
47
+ ```json
48
+ [{"name":"operation-name","query":"...","variables":{}}]
49
+ ```
50
+
51
+ De niet-JWT-route verstuurt deze array rechtstreeks. Bij succes leest de app
52
+ per item `data`; GraphQL-fouten staan per item onder `errors`.
53
+
54
+ Bron/bewijs: Hermes-disassembly van `GraphqlBuilder.addQuery`,
55
+ `GraphqlBuilder.execute` en de response-parser.
56
+
57
+ ## Gebouwen bekijken
58
+
59
+ Method + path: `POST connection/graphql`
60
+
61
+ GraphQL-operatie: `query buildings`; bevestigde velden zijn onder meer `guid`,
62
+ `name`, `capacity`, `position`, `available_for`, `kind`, `active` en het
63
+ adresobject.
64
+
65
+ Bron/bewijs: Hermes-bundle, querymodule `buildings`.
66
+
67
+ ## Eigen boekingen bekijken
68
+
69
+ Method + path: `POST connection/graphql`
70
+
71
+ GraphQL-operatie: `query employee($guid: String!, $booking_date: [String],
72
+ $active: [String])`. De app gebruikt:
73
+
74
+ - `guid`: de eigen employee GUID;
75
+ - `booking_date`: filters zoals `YYYY-MM-DD`, `YYYY-MM-DD_after_equal` en
76
+ `YYYY-MM-DD_before_equal`;
77
+ - `active`: `["yes"]` voor actieve boekingen.
78
+
79
+ Bevestigde boekingsvelden zijn onder meer `guid`, `booking_date`, `kind`,
80
+ `transport_kind`, `reason`, `status`, `active`, gebouw, verdieping, ruimte,
81
+ tafel en tijdslot.
82
+
83
+ Bron/bewijs: Hermes-bundle, booking fetch-module en booking-fragmenten.
84
+
85
+ ## Beschikbaarheid bekijken
86
+
87
+ GraphQL-operatie: `query booking_capacity($dates: [String], $kinds: [String],
88
+ $subKinds: [String], $employeeGuid: String)`. De read-only respons bevat per
89
+ item onder meer datum, item- en timeslotsoort, gebouw/verdieping/ruimte,
90
+ `capacity`, `remaining`, blokkadecommentaar en exceptionsoort.
91
+
92
+ Bron/bewijs: Hermes-bundle, `fetchAllRange` en querymodule
93
+ `booking_capacity`.
94
+
95
+ ## Boeking maken en annuleren
96
+
97
+ De app bevat een `create_employee_booking`-mutatie met bevestigde inputvelden en
98
+ een `booking_cancel`-mutatie met `guid` en `active`. Maken is beschikbaar met
99
+ planweergave, expliciete bevestiging en read-back-verificatie. Annuleren blijft
100
+ uitgeschakeld totdat de volledige annuleringssemantiek veilig is gevalideerd.
101
+
102
+ Laatst bevestigd: 2026-10-09, Android app build 3.12.10.
103
+
104
+ Neem geen tokens, cookies, echte namen, e-mailadressen, reserverings-ID's of
105
+ andere persoonsgegevens op.
@@ -0,0 +1,36 @@
1
+ # Project en status
2
+
3
+ ## Doel
4
+
5
+ Een CLI waarmee de gebruiker zijn eigen My Office Days-account kan bedienen,
6
+ uiteindelijk minimaal:
7
+
8
+ - eigen boekingen bekijken;
9
+ - beschikbare locaties, dagen en voorzieningen bekijken;
10
+ - een kantoor-/werkplekreservering maken;
11
+ - een eigen reservering annuleren;
12
+ - machineleesbare JSON-uitvoer leveren voor een agent-skill.
13
+
14
+ ## Huidige status
15
+
16
+ De CLI ondersteunt veilige lokale configuratie, login per e-mailcode,
17
+ versleuteld GraphQL-transport, gebouwen, boekingstypes, beschikbaarheid en eigen
18
+ boekingen. Boeking maken is live gevalideerd en gebruikt planweergave,
19
+ expliciete bevestiging en read-back-verificatie. Annuleren blijft uitgeschakeld
20
+ totdat de volledige semantiek veilig is gevalideerd.
21
+
22
+ ## Architectuur
23
+
24
+ - `src/my_office_days/cli.py`: CLI-opdrachten en presentatie.
25
+ - `src/my_office_days/config.py`: niet-geheime configuratie onder LocalAppData.
26
+ - `src/my_office_days/auth.py`: employee session en encryptiesleutel in Windows
27
+ Credential Manager via Python keyring.
28
+ - `src/my_office_days/client.py`: kleine HTTP-client met consistente fouten.
29
+ - `.github/workflows/`: CI, Release Please en publicatie naar PyPI.
30
+
31
+ ## Ontwerpkeuzes
32
+
33
+ Gebruik eerst de mobiele API in plaats van UI-automatisering: die is sneller en
34
+ minder gevoelig voor lay-outwijzigingen. Gebruik alleen het eigen account en
35
+ respecteer autorisatie, privacy en serverlimieten. UI-automatisering via ADB is
36
+ een tijdelijke onderzoeksmethode, geen gewenste productie-interface.
@@ -0,0 +1,31 @@
1
+ # Authenticatie en veiligheid
2
+
3
+ ## Lokale gegevens
4
+
5
+ - Niet-geheime configuratie:
6
+ `%LOCALAPPDATA%\my-office-days-cli\config.json`
7
+ - Employee session en eventuele encryptiesleutel: aparte entries in de
8
+ OS-keyring onder service `my-office-days-cli`.
9
+ - APK, captures en onderzoeksartefacten:
10
+ externe OneDrive-projectmap of expliciet genegeerde paden.
11
+
12
+ De CLI accepteert voor tijdelijke automatisering ook `MOD_TOKEN`, maar een
13
+ environment variable kan zichtbaar zijn voor lokale processen en logs. De
14
+ keyring heeft daarom de voorkeur.
15
+
16
+ `mod auth login` toont of bewaart het e-mailadres en de eenmalige code niet. De
17
+ employee GUID is niet geheim en wordt in `config.json` opgeslagen; de ontvangen
18
+ `authorisation` en optionele `key` gaan uitsluitend naar de OS-keyring.
19
+
20
+ ## Mutaties
21
+
22
+ Voor iedere reservering of annulering:
23
+
24
+ 1. lees eerst de actuele toestand;
25
+ 2. toon datum, locatie, voorziening en eventuele boekings-ID;
26
+ 3. vraag expliciete bevestiging;
27
+ 4. voer precies één mutatie uit;
28
+ 5. lees terug en verifieer het resultaat.
29
+
30
+ Log nooit volledige requestheaders. Redigeer `Authorization`, cookies, e-mail,
31
+ naam, personeelsnummer en andere persoonsgegevens.