dbdata.ts 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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: AppointmentInputs[];
  11. timeSpans: AppointmentList[];
  12. }
  13. export interface AppointmentTimes {
  14. date: string;
  15. available: boolean;
  16. }
  17. export interface AuthTokenResponse {
  18. token: string;
  19. }
  20. export interface AppointmentDateTimes {
  21. date: Date;
  22. available: boolean;
  23. }
  24. export interface AppointmentInputs {
  25. name: string;
  26. type: "text" | "email" | "tel";
  27. }
  28. export interface AppointmentTimeRange {
  29. start: string;
  30. end: string;
  31. }
  32. export interface WeekdayAppointment {
  33. name: string;
  34. active: boolean;
  35. date: string;
  36. times: AppointmentTimeRange[];
  37. }
  38. export interface AppointmentList {
  39. week: number;
  40. appointments: WeekdayAppointment[];
  41. }
  42. export interface DynamicJson {
  43. [key: string]: any; // Allows any key with any value
  44. }
  45. export interface AppointmentBooking {
  46. appointment: string;
  47. time: string;
  48. inputs: DynamicJson[];
  49. }
  50. export interface WeekSelection {
  51. week: number;
  52. yearWeek: number;
  53. start: Date;
  54. end: Date;
  55. }