diff --git a/frontend/src/app.d.ts b/frontend/src/app.d.ts index d9faa97..663579e 100644 --- a/frontend/src/app.d.ts +++ b/frontend/src/app.d.ts @@ -1,53 +1,70 @@ // See https://kit.svelte.dev/docs/types#app interface Subscription { - id: string; - name: string; - details: string; - conditions: string | null; - monthly_fee: number; - hourly_rate: number; - included_hours_per_year: number | null; - included_hours_per_month: number | null; + id: number | -1; + name: string | ""; + details?: string | ""; + conditions?: string | ""; + monthly_fee?: number | -1; + hourly_rate?: number | -1; + included_hours_per_year?: number | 0; + included_hours_per_month?: number | 0; } interface Membership { - id: string; - status: string; - start_date: string; - end_date: string; - parent_member_id: number | null; - subscription_model: Subscription | null; + id: number | -1; + status: number | -1; + start_date: string | ""; + end_date: string | ""; + parent_member_id: number | -1; + subscription_model: Subscription; } interface BankAccount { - id: string; - mandate_date_signed: string; - bank: string; - account_holder_name: string; - iban: string; - bic: string; - mandate_reference: string; + id: number | -1; + mandate_date_signed: string | ""; + bank: string | ""; + account_holder_name: string | ""; + iban: string | ""; + bic: string | ""; + mandate_reference: string | ""; +} + +interface DriversLicence { + id: number | -1; + status: number | -1; + licence_number: string | ""; + issued_date: string | ""; + expiration_date: string | ""; + issuing_country: string | ""; + licence_categories: LicenceCategory[]; +} + +interface LicenceCategory { + id: number | -1; + category: string | ""; } interface User { - email: string; - first_name: string; - last_name: string; - phone: string | null; - notes: string; - address: string; - zip_code: string; - city: string; - status: number; - id: string; - role_id: number; - date_of_birth: string; + email: string | ""; + first_name: string | ""; + last_name: string | ""; + phone: string | ""; + notes: string | ""; + address: string | ""; + zip_code: string | ""; + city: string | ""; + status: number | -1; + id: number | -1; + role_id: number | -1; + date_of_birth: string | ""; + company: string | ""; + profile_picture: string | ""; + payment_status: number | -1; membership: Membership; bank_account: BankAccount; - company: string | null; - profile_picture: string | null; - payment_status: number; + drivers_licence: DriversLicence; + notes: string | ""; } declare global { @@ -55,6 +72,7 @@ declare global { // interface Error {} interface Locals { user: User; + subscriptions: Subscription[]; } // interface PageData {} // interface Platform {}