dbdata.ts 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. export interface Appointment {
  2. _id: string;
  3. user: string;
  4. title: string;
  5. description: string;
  6. dueDate: Date;
  7. place: string;
  8. duration: number;
  9. times: AppointmentDateTimes[];
  10. inputs: DynamicJson[];
  11. }
  12. export interface AppointmentTimes {
  13. date: string;
  14. available: boolean;
  15. }
  16. export interface AuthTokenResponse {
  17. token: string;
  18. }
  19. export interface AppointmentDateTimes {
  20. date: Date;
  21. available: boolean;
  22. }
  23. export interface AppointmentInputs {
  24. name: string;
  25. type: "text" | "email" | "tel";
  26. }
  27. export interface AppointmentTimeRange {
  28. start: string;
  29. end: string;
  30. }
  31. export interface WeekdayAppointment {
  32. name: string;
  33. active: boolean;
  34. date: string;
  35. times: AppointmentTimeRange[];
  36. }
  37. export interface AppointmentList {
  38. week: number;
  39. appointments: WeekdayAppointment[];
  40. }
  41. export interface DynamicJson {
  42. [key: string]: any; // Allows any key with any value
  43. }
  44. export interface AppointmentBooking {
  45. appointment: string;
  46. time: string;
  47. inputs: DynamicJson[];
  48. }
  49. export interface WeekSelection {
  50. week: number;
  51. yearWeek: number;
  52. start: Date;
  53. end: Date;
  54. }