appointment-mcp-server
Version:
Customer-focused MCP Server for appointment management with comprehensive service discovery, availability checking, and booking capabilities
175 lines • 7.52 kB
TypeScript
import { Pool } from 'pg';
export declare const pool: Pool;
export declare function ensureBusinessExists(): Promise<void>;
export declare function generateUUID(): string;
export declare function isValidUUID(uuid: string): boolean;
export declare function getBusinessDetails(): Promise<any>;
export declare function createCustomer(customerData: {
first_name?: string | null;
last_name?: string | null;
email?: string | null;
phone: string;
notes?: string | null;
}): Promise<any>;
export declare function getCustomer(customer_id: string): Promise<any>;
export declare function searchCustomers(searchTerm: string): Promise<any>;
export declare function updateCustomer(customer_id: string, updates: {
first_name?: string;
last_name?: string;
email?: string;
phone?: string;
phone_number?: string;
notes?: string;
}): Promise<any>;
export declare function getServices(): Promise<any>;
export declare function getService(service_id: string): Promise<any>;
export declare function getServiceByName(service_name: string): Promise<any[]>;
export declare function searchServicesFuzzy(service_name: string, similarity_threshold?: number): Promise<any>;
export declare function searchServicesComprehensive(search_term: string, similarity_threshold?: number): Promise<any>;
export declare function getCustomerAppointments(customer_id: string, limit?: number): Promise<any>;
export declare function getBusinessHours(): Promise<any>;
export declare function getStaff(): Promise<any>;
export declare function getCustomerReviews(customer_id: string): Promise<any>;
export declare function createReview(reviewData: {
appointment_id: string;
customer_id: string;
service_id: string;
staff_id?: string;
rating: number;
review_text?: string;
}): Promise<any>;
export declare function createCustomerIfNotExists(customerName: string, email?: string, phone?: string): Promise<any>;
export declare function createAppointment(appointmentData: {
customer_id: string;
service_id: string;
staff_id?: string;
start_time: string;
end_time: string;
notes?: string;
}): Promise<any>;
export declare function getAppointments(filters?: {
customer_id?: string;
service_id?: string;
staff_id?: string;
status?: string;
start_date?: string;
end_date?: string;
}): Promise<any>;
export declare function getAppointment(appointment_id: string): Promise<any>;
export declare function deleteAppointment(appointment_id: string): Promise<any>;
export declare function verifyDatabaseConnection(): Promise<void>;
/**
* Get staff availability for a specific date
*/
export declare function getStaffAvailability(date: string): Promise<any>;
/**
* Get available time slots for a specific service and date
*/
export declare function getAvailableTimeSlots(service_id: string, date: string): Promise<{
start_time: string;
end_time: string;
available_staff: {
id: any;
name: string;
}[];
available_slots: number;
}[]>;
/**
* Get all staff information with their services and working hours
*/
export declare function getAllStaffInfo(): Promise<any>;
/**
* Get staff member by ID with detailed information
*/
export declare function getStaffMember(staff_id: string): Promise<any>;
/**
* Get staff time off for a specific date range
*/
export declare function getStaffTimeOff(start_date?: string, end_date?: string): Promise<any>;
/**
* Check if a service is available on a specific date and time
*/
export declare function checkServiceAvailability(service_name: string, date: string, time?: string): Promise<{
available: boolean;
reason: string;
service: any;
staff: any;
existingAppointments?: undefined;
maxBookings?: undefined;
remainingSlots?: undefined;
} | {
available: boolean;
reason: string;
service: any;
staff: any;
existingAppointments: number;
maxBookings: any;
remainingSlots?: undefined;
} | {
available: boolean;
reason: string;
service: any;
staff: any;
existingAppointments: number;
maxBookings: any;
remainingSlots: number;
}>;
/**
* Get available time slots for a service on a specific date
*/
export declare function getServiceTimeSlots(service_name: string, date: string): Promise<{
available: boolean;
reason: string;
timeSlots: never[];
service?: undefined;
} | {
available: boolean;
reason: string;
timeSlots: any[];
service: any;
}>;
/**
* Check business hours for a specific date
*/
export declare function checkBusinessHours(date: string): Promise<{
isOpen: boolean;
reason: string;
hours: any;
}>;
/**
* Check for appointment conflicts comprehensively
*/
export declare function updateAppointment(appointment_id: string, customer_id: string, service_id: string, staff_id: string, start_time: string, end_time: string, status: string, notes?: string): Promise<any>;
export declare function cancelAppointment(appointment_id: string, cancellation_reason: string, cancelled_by: string): Promise<any>;
export declare function rescheduleAppointment(appointment_id: string, new_start_time: string, new_end_time: string, rescheduled_by: string): Promise<any>;
export declare function confirmAppointment(appointment_id: string, confirmed_by: string): Promise<any>;
export declare function completeAppointment(appointment_id: string, completed_by: string, completion_notes?: string): Promise<any>;
export declare function getStaffAvailabilityCalendar(staff_id: string, start_date: string, end_date: string): Promise<any>;
export declare function checkRealTimeAvailability(service_id: string, date: string, time: string): Promise<any>;
export declare function createCustomerValidated(first_name: string, last_name: string, email: string, phone: string, notes?: string): Promise<any>;
export declare function updateCustomerProfile(customer_id: string, first_name: string, last_name: string, email: string, phone: string, notes?: string): Promise<any>;
export declare function getCustomerPreferences(customer_id: string): Promise<any>;
export declare function getCustomerStatistics(customer_id: string): Promise<any>;
export declare function createBookingValidated(customer_id: string, service_id: string, staff_id: string, start_time: string, notes?: string): Promise<any>;
export declare function getBookingConfirmation(appointment_id: string): Promise<any>;
export declare function getAvailableBookingSlots(service_id: string, date: string, staff_id?: string): Promise<any>;
export declare function getServicesByPriceRange(min_price_cents?: number, max_price_cents?: number): Promise<any>;
export declare function getServicesByDuration(min_duration_minutes?: number, max_duration_minutes?: number): Promise<any>;
export declare function getServicesByStaff(staff_id: string): Promise<any>;
export declare function getServicesByTimeAvailability(date: string, time?: string): Promise<any>;
export declare function getPopularServices(limit_count?: number): Promise<any>;
export declare function checkAppointmentConflict(service_id: string, staff_id: string, customer_id: string, start_time: string, end_time: string, appointment_id?: string): Promise<{
hasConflicts: boolean;
conflicts: any[];
summary?: undefined;
} | {
hasConflicts: boolean;
conflicts: any[];
summary: {
totalConflicts: number;
errorCount: number;
warningCount: number;
canProceed: boolean;
};
}>;
//# sourceMappingURL=database.d.ts.map