UNPKG

oralify-common

Version:
85 lines (84 loc) 2.03 kB
import { ServiceType } from './serviceType'; import { UserConciseType } from './userTypes'; export declare enum RecurrenceKey { Daily = "Daily", Weekly = "Weekly", Monthly = "Monthly", Yearly = "Yearly" } export declare enum TimeslotStatus { 'booked' = "booked", 'pending' = "pending", 'confirmed' = "confirmed", 'cancelled' = "cancelled", 'unavailable' = "unavailable", 'available' = "available" } export declare enum DayKey { Monday = "Monday", Tuesday = "Tuesday", Wednesday = "Wednesday", Thursday = "Thursday", Friday = "Friday", Saturday = "Saturday", Sunday = "Sunday" } /** Used to generate Timeslots*/ export type AvailabilitySettingsType = { id?: string; expertId?: string; startTime: string; endTime: string; dayOfWeek: DayKey[]; recurrence?: RecurrenceKey; repeatEvery?: number; breakTime?: number; isAvailable?: boolean; name?: string; color?: string; }; export type TimeSlotType = { id?: string; availabilityId?: string; creationDate: Date; serviceId: string; expertId: string; price: number; startTime: Date; endTime?: Date; status?: TimeslotStatus; }; export type ShownTimeSlotType = TimeSlotType & { expertUser: UserConciseType; service: ServiceType; }; interface StatusInfo { color: string; icon: string; nameEs: string; } export declare const statusInfoMapping: Record<TimeslotStatus, StatusInfo>; /** History */ export type AppointmentType = { id?: string; timeSlotId?: string; price: number; meetURL?: string; transactionId: string; expertId: string; curiousId: string; requestTime: Date; description?: string; startTime: Date; endTime: Date; status?: TimeslotStatus; }; export type ShownAppointmentType = AppointmentType & { curiousUser: UserConciseType; expertUser: UserConciseType; serviceInfo: { service: ServiceType; }; }; export {}; /** Unused on the meantime*/