feat: send ticket receipts via WhatsApp and normalize phone numbers
Add WhatsApp API integration for automated receipt delivery Enforce country codes for all phone number inputs (defaults to +60)
This commit is contained in:
@@ -116,6 +116,21 @@ export interface CreateBookingResponse {
|
||||
whatsappUrl: string
|
||||
}
|
||||
|
||||
export interface WhatsAppDeliveryResult {
|
||||
sent: boolean
|
||||
skipped: boolean
|
||||
recipientPhone: string
|
||||
apiRecipientPhone: string
|
||||
messageId?: string
|
||||
error?: string
|
||||
}
|
||||
|
||||
export interface ConfirmBookingResponse {
|
||||
booking: PublicBooking
|
||||
alreadyConfirmed: boolean
|
||||
ticketReceiptWhatsApp: WhatsAppDeliveryResult
|
||||
}
|
||||
|
||||
export function isBookingMode(value: string | null | undefined): value is BookingMode {
|
||||
return value === 'table' || value === 'seat'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user