fix(messaging): appointment field is 'status' not 'appointmentStatus'

Matched the working agent tool mutation — platform expects 'status'
for AppointmentCreateInput, not 'appointmentStatus'.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-20 15:44:56 +05:30
parent d857a0b270
commit 6847f5de95

View File

@@ -364,7 +364,7 @@ ${callerContext ? `\n${callerContext}` : ''}`;
const result = await platform.query<any>( const result = await platform.query<any>(
`mutation($data: AppointmentCreateInput!) { createAppointment(data: $data) { id } }`, `mutation($data: AppointmentCreateInput!) { createAppointment(data: $data) { id } }`,
{ data: { name: `WhatsApp Booking — ${patientName} (${department})`, scheduledAt, appointmentStatus: 'SCHEDULED', doctorName, department, reasonForVisit: reason } }, { data: { name: `WhatsApp Booking — ${patientName} (${department})`, scheduledAt, status: 'SCHEDULED', doctorName, department, reasonForVisit: reason } },
); );
const id = result?.createAppointment?.id; const id = result?.createAppointment?.id;
if (id) { if (id) {