@ -27,12 +27,28 @@ export type AdminClubsResponse = AdminClub[];
/ * *
* GET / admin / facilities / { club_id } - Detailed facility view
* Based on VENUE_ADMIN_DESIGN . md and Access Avery correction 2025 - 11 - 05 12 :14 UTC
* Updated : 2025 - 11 - 13 to match new API shape
* /
export interface AdminClubDetail {
club : {
facility : {
facility_id : number ;
name : string ;
timezone : string ;
address : {
address_line_1 : string | null ;
address_line_2 : string | null ;
city : string | null ;
zip : string | null ;
canton : string | null ;
country : string | null ;
} ;
settings : {
contact : {
email : string | null ;
phone : string | null ;
website : string | null ;
} ;
} ;
} ;
courts : import ( './courts' ) . Court [ ] ;
slot_definitions : AdminSlotDefinition [ ] ;
@ -55,39 +71,23 @@ export interface AdminSlotDefinition {
capacity : number ;
valid_from : string ; // Date string "YYYY-MM-DD"
valid_to : string | null ; // Date string or null
rule : Record < string , any > ; // Slot generation rules (JSONB)
created_at : string ; // ISO 8601 timestamp
updated_at : string ; // ISO 8601 timestamp
}
export interface AdminSlot {
slot_i d: number ; // slot_instance_id
slot_i nstance_i d: number ;
court_id : number ;
court_name : string ;
facility_id : number ;
starts_at : string ; // ISO 8601 timestamp
ends_at : string ; // ISO 8601 timestamp
booking : AdminSlotBooking ;
meta : AdminSlotMeta ;
updated_at : string ; // ISO 8601 timestamp
etag : string ;
}
export interface AdminSlotBooking {
available : boolean ; // Mapped from status
status : 'available' | 'pending' | 'booked' | 'cancelled' ;
capacity : number ;
booked_count : number ;
players : AdminPlayer [ ] ;
}
export interface AdminPlayer {
display_name : string ;
app_user_id? : number ; // Optional for guests
position : number ;
is_guest : boolean ;
}
export interface AdminSlotMeta {
tags? : string [ ] ; // Optional annotations like ["maintenance"]
provider : 'local' | 'fairplay' ;
status : string ; // e.g., "cancelled", "available", "booked"
display_status : string ; // e.g., "cancelled"
reason? : string | null ; // e.g., "materialiser_retired"
source : string ; // e.g., "internal"
}
export interface AdminProviderInfo {