Derive client domain types from the shared schema contracts

Add entity/response Zod schemas to @trek/shared (place, trip, assignment, day, budget, packing, reservation), each matched against the producing server service, and re-export them from client types.ts instead of the hand-written duplicates that had drifted (name/title, amount/total_price, owner_id/user_id, cover_url/cover_image, ...). Updates the call sites and test fixtures the corrected types surfaced; type-only, no runtime behaviour change.
This commit is contained in:
Maurice
2026-05-31 15:42:39 +02:00
parent 239a68bb48
commit 3977a5ecba
52 changed files with 732 additions and 435 deletions
+2 -2
View File
@@ -35,7 +35,7 @@ interface VacayYearsResponse {
interface VacayEntriesResponse {
entries: VacayEntry[]
companyHolidays: string[]
companyHolidays: { date: string; note?: string }[]
}
interface VacayStatsResponse {
@@ -109,7 +109,7 @@ interface VacayState {
isFused: boolean
years: number[]
entries: VacayEntry[]
companyHolidays: string[]
companyHolidays: { date: string; note?: string }[]
stats: VacayStat[]
selectedYear: number
selectedUserId: number | null