export namespace Models { export interface IConventionCenterBody { address: string; city: string; countryName: string; countryAbbreviation: string; displayText: string; loc: { lat: number; lng: number; }; name: string; stateAbbreviation: string; stateName: string; zipcode: string; } export interface IDeprecatedConventionCenterBody { name: string; loc: { lat: number; lng: number; }; } export interface IDeprecatedConventionCenter extends IDeprecatedConventionCenterBody { _id: string; } export interface IConventionCenter extends IConventionCenterBody { _id: string; } export interface IEventBody { name: string; startDay: string; endDay: string; } export interface IEvent extends IEventBody { _id: string; conventionCenterId: string; } export enum PropertyType { Condo = "Condo", Home = "Home", Room = "Room" } export enum PropertyBookingMode { Instant = "Instant", ReservationByRequest = "ReservationByRequest" } export interface IPropertyBookingModeInfo { name: string; } export interface IPropertyBody { name: string; type: PropertyType; numBeds: number; numBaths: number; numBedrooms: number; maxGuests: number; nightMinimum: number; profilePhotoUri: string; photoUris: string[]; description: string; bookingMode: PropertyBookingMode; address: { line1: string; line2: string; city: string; state: string; zipCode: string; }; loc: { lat: number; lng: number; }; } export interface ISyncCalendarBody { name: string; uri: string; } export interface IPropertyDatedRuleCore { startDay: string; endDay: string; nightMinimum?: number; } export interface IPropertyDatedRule extends IPropertyDatedRuleCore { _id: string; } export interface IProperty extends IPropertyBody { _id: string; dateCreatedISO: string; managerId: string; datedRules: IPropertyDatedRule[]; amenities: AmenityType[]; pricing: { weekdayDefault: number; weekendDefault: number; cleaningFee: number; customRanges: ICustomPriceRange[]; } | null; calendars: { _id: string; uri: string; name: string; }[]; } export enum AmenityType { WiFi = "WiFi", AirConditioning = "AirConditioning", Heater = "Heater", Washer = "Washer", Dryer = "Dryer", IroningSet = "Iron/Ironing Board", Towels = "Towels", BeddingAndLinens = "BeddingAndLinens", Toiletries = "Toiletries", HairDryer = "HairDryer", TV = "TV", Cable = "Cable", Streaming = "Streaming", SmokeAlarm = "SmokeAlarm", CarbonMonoxideAlarm = "CarbonMonoxideAlarm", FireExtinguisher = "FireExtinguisher", AirMattress = "AirMattress", ExteriorSecurityCamera = "ExteriorSecurityCamera", InteriorSecurityCamera = "InteriorSecurityCamera", FullKitchen = "FullKitchen", Oven = "Oven", Stove = "Stove", Refrigerator = "Refrigerator", CoffeeMaker = "CoffeeMaker", DishWasher = "DishWasher", Microwave = "Microwave", DishesAndUtensils = "DishesAndUtensils", PotsAndPans = "PotsAndPans", StreetParking = "StreetParking", Driveway = "Driveway", Garage = "Garage" } export interface IAmenityInfo { name: string } export interface ICustomPriceRange { startDay: string; endDay: string; price: number; note?: string; } export interface IFilteredProperty extends Models.IProperty { distanceToConvention?: number; pricingValue?: number; chosenDatesNightMinimum?: number; } export enum TripType { OtherPlatform = "OtherPlatform", LetsConvention = "LetsConvention", Blocked = "Blocked" } export interface ITripCore { propertyId: string; arrivalDay: string; departureDay: string; } export interface ITrip extends ITripCore { _id: string; createdAt: string; type: TripType; } export interface IOtherPlatformTrip extends ITrip { calendarId: string; } export interface ILCTripBody extends ITripCore { guestInfo: { id: string; fullName: string; email: string; phoneNumber: string; company?: string; numGuests: number; numParkingSpots: number; promoCode: string; }; } export interface ICreateTripRequest extends ILCTripBody { cardToken?: string; paymentMethod?: string; } export enum TripRequestState { Pending = "Pending", Approved = "Approved", Denied = "Denied", Cancelled = "Cancelled" }; export interface ILCTrip extends ITrip, ILCTripBody { cost: Models.IBookingCost; requestState: TripRequestState; paymentMethod?: string; stripeChargeId?: string; paymentIntentId?: string; failedPaymentCode: string | null; stripeRefundId?: string; } export enum UserType { Admin = "Admin", Guest = "Guest", Host = "Host" } export interface IUserCore { firstName: string; lastName: string; email: string; phoneNumber: string; } export interface IUserBody extends IUserCore { password: string; } export interface IUser extends IUserCore { _id: string; type: UserType; dateJoinedISO: string; hashedPassword: string; stripeCustomerId?: string; } export interface IHost extends IUser { paypalEmail?: string; } export interface IMyTrip { property: Models.IProperty; trip: Models.ILCTrip; } export interface IQuestionBody { fullName: string; email: string; phoneNumber: string; question: string; } export interface IConciergeBody { fullName: string; email: string; phoneNumber: string; desiredDates: string, desiredLocation: string, desiredBudget: string, requestType: string, maximumHeadCount: string, miscellaneous: string } export interface IQuestion extends IQuestionBody { _id: string; dateCreatedISO: string; } export interface ILoginCreds { email: string; password: string; } export interface IAuthDTO { authToken: string; user: IUser; } export interface IEvent { _id: string; startDay: string; endDay: string; name: string; } export interface IBookingCost { propertyId: string; arrivalDay: string; departureDay: string; cleaningFee: number; serviceFee: number; bookingFee: number; hostFee: number; } export interface IMessageBody { body: string; seen: boolean; senderId: string; recipientId: string; propertyId: string; dateISO: string; emailSent: boolean; } export interface IMessage extends IMessageBody { _id: string; } export interface InboxItem { otherUser: Models.IUser; lastMessage: Models.IMessage; } export interface UpdateTripPaymentMethodBody { paymentMethod: string } export interface ICalendar { _id: string; uri: string; name: string; propertyId: string; } export interface IPendingTripPayment { tripId: string; } export interface IConversation { _id: string; userIds: string[]; lastMessage: IMessage; } }