import { EventProfileMinimal } from './BusinessProfile'; import { PeriodInterval } from './common'; import { EventOccurrenceLocationType, EventOccurrenceType, EventTicketType } from './enums'; import { Media } from './Media'; import { BaseModel, PublishableModel } from './Model'; import { Pricing } from './Pricing'; import { ResourceFaq } from './ResourceFaq'; export interface Event extends PublishableModel { object: "event"; occurrence_type: EventOccurrenceType; description?: string; summary?: string; image?: Media; gallery: Media[]; attachments: Media[]; video_url?: string; currency_code?: string; price: number; price_min: number; price_max: number; comparison_price?: number; pricing?: Pricing; tags: string[]; category_handles: string[]; collection_handles: string[]; category: string[]; collection: string[]; private: boolean; hide_start_time: boolean; hide_end_time: boolean; timezone?: string; purchase_action?: string; schedule?: PeriodInterval; seo_title?: string; seo_description?: string; seo_keywords: string[]; age_restriction?: string; refund_policy?: string; count_down?: string; agenda?: EventAgenda[]; faqs?: ResourceFaq[]; tickets?: EventTicket[]; sections: EventSection[]; occurrences: EventOccurrence[]; amenities?: EventAmenityGroup[]; health_and_safety?: EventHealthAndSafetyGroup[]; organiser?: EventProfileMinimal; manager?: { name: string; email: string; phone?: string; }; } export interface EventSection { id: string; capacity?: number; occurrence: string; /** EventTicket IDs */ tickets: string[]; } export interface EventOccurrence { id: number; gid: string; object: string; name: string; description?: string; type: EventOccurrenceType; image?: Media; starts_at?: string; ends_at?: string; all_day: boolean; /** EventTicket IDs */ tickets: string[]; reserved_seating: boolean; event_map?: EventMap; position: number; capacity?: number; location?: EventOccurrenceLocation; _geo?: { lat: number; lng: number; }; } export interface EventTicket extends BaseModel { id: string; gid: string; name: string; description?: string; type: EventTicketType; pricing: Pricing; comparison_pricing?: Pricing; per_order_limit?: number; presentment_order?: number; available_quantity?: number; pickup_at_event: boolean; hide_sale_status: boolean; max_seats: number; purchase_note?: string; sale_starts_at: string; sale_ends_at: string; } export interface EventOccurrenceLocation { title?: string; full_title?: string; address_line?: string; type: EventOccurrenceLocationType; display_on_booking_page: boolean; maps_url?: string; latitude?: number; longitude?: number; value?: any; } export interface EventDiscountCheckTicket { id: string; gid: string; name: string; description?: string; quantity: number; } export interface EventDiscountCheck extends BaseModel { event: string; occurrence: string; tickets: EventDiscountCheckTicket[]; } export type UsedEventDiscount = { ok: boolean; name?: string; email?: string; }; export interface EventAgenda { id: string; position: number; name: string; from?: string; to?: string; icon?: string; description?: string; } export type EventMap = { viewport?: { zoom: number; center: number[]; }; entities?: E[]; seats: string[]; available_seats: string[]; }; export interface EventAmenityGroup { } export interface EventHealthAndSafetyGroup { }