The smokesignal.events web application
at main 79 lines 1.6 kB view raw
1/** 2 * Shared TypeScript types for Smokesignal frontend 3 */ 4 5// Geo location from template (coordinates come as strings from backend) 6export interface GeoLocation { 7 latitude: string | number 8 longitude: string | number 9 name?: string | null 10} 11 12// H3 bucket for map aggregation 13export interface H3Bucket { 14 key: string 15 doc_count?: number 16 event_count?: number 17 lfg_count?: number 18 total?: number 19} 20 21// Location suggestion from API 22export interface LocationSuggestion { 23 source?: string 24 name?: string 25 street?: string 26 locality?: string 27 region?: string 28 postal_code?: string 29 country?: string 30 latitude?: number 31 longitude?: number 32} 33 34// Event form location (address type) 35export interface AddressLocation { 36 type: 'address' 37 country: string 38 postalCode?: string | null 39 region?: string | null 40 locality?: string | null 41 street?: string | null 42 name?: string | null 43} 44 45// Event form location (geo type) 46export interface GeoFormLocation { 47 type: 'geo' 48 latitude: string 49 longitude: string 50 name?: string | null 51} 52 53export type FormLocation = AddressLocation | GeoFormLocation 54 55// Event form link 56export interface FormLink { 57 url: string 58 label?: string | null 59} 60 61// Event form data 62export interface EventFormData { 63 name: string 64 description: string 65 status: string 66 mode: string 67 tz: string 68 startsAt: string | null 69 endsAt: string | null 70 locations: FormLocation[] 71 links: FormLink[] 72 headerCid?: string | null 73 headerAlt?: string | null 74 headerSize?: number | null 75 thumbnailCid?: string | null 76 thumbnailAlt?: string | null 77 requireConfirmedEmail: boolean 78 sendNotifications: boolean 79}