export interface Appointment {
    _id: string;
    user: string;
    title: string;
    description: string;
    dueDate: Date;
    place: string;
    duration: number;
    times: AppointmentTimes[];
    inputs: DynamicJson[];
}  

export interface AppointmentTimes {
    date: Date;
    available: boolean;
}

export interface AuthTokenResponse {
    token: string;
}

export interface AppointmentDateTimes {
    date: Date;
}

export interface AppointmentInputs {
    name: string;
    type: "text" | "email" | "tel";
}

export interface AppointmentTimeRange {
    start: string;
    end: string;
}


export interface WeekdayAppointment {
    name: string;
    active: boolean;
    times: AppointmentTimeRange[];
}

export interface AppointmentList {
    week: number;
    appointments: WeekdayAppointment[];
}

export interface DynamicJson {
    [key: string]: any; // Allows any key with any value
}

export interface AppointmentBooking {
    appointment: string;
    time: Date;
    inputs: DynamicJson[];
}