No description
Find a file
counterweight 09560296aa
refactor: derive Permission type from generated OpenAPI schema
Issue #3: The frontend Permission enum was manually duplicated from
the backend. While full generation isn't practical, this change
ties the frontend constants to the generated OpenAPI types for
compile-time validation.

Changes:
- Update ConstantsResponse schema to use actual Permission/InviteStatus
  enums (enables OpenAPI to include enum values)
- Import enums in schemas.py (no circular dependency issue)
- Update auth-context.tsx to derive PermissionType from generated schema
- Update meta route to return enum instances instead of string values
- Permission values are now type-checked against the OpenAPI schema

If a permission is added to the backend but not to the frontend's
Permission object, TypeScript will fail to compile. This provides
a safety net without requiring a complex build-time generation step.
2025-12-21 23:55:47 +01:00
.cursor/rules Phase 1: Add pgqueuer infrastructure 2025-12-21 22:37:04 +01:00
.githooks fix pre-commit hook and code quality fixes 2025-12-21 22:14:48 +01:00
backend refactor: derive Permission type from generated OpenAPI schema 2025-12-21 23:55:47 +01:00
frontend refactor: derive Permission type from generated OpenAPI schema 2025-12-21 23:55:47 +01:00
scripts Add trap for cleanup in e2e.sh script 2025-12-21 23:17:17 +01:00
shared Phase 0: Add booking permissions and constants 2025-12-20 23:30:08 +01:00
.env.example tests passing 2025-12-18 23:33:32 +01:00
.envrc seed user 2025-12-18 22:42:32 +01:00
.gitignore Add Vitest coverage for frontend tests 2025-12-21 22:00:47 +01:00
.pre-commit-config.yaml code quality in place 2025-12-21 22:12:43 +01:00
docker-compose.yml tests passing 2025-12-18 22:08:31 +01:00
Makefile Phase 1: Add pgqueuer infrastructure 2025-12-21 22:37:04 +01:00