@@ -511,6 +511,7 @@ Return ONLY valid JSON - no explanations.`,
511511 metadata,
512512 availability,
513513 eventTypeIdParam,
514+ eventTypeId,
514515 bookingStatus,
515516 eventLength,
516517 scheduleName,
@@ -520,7 +521,10 @@ Return ONLY valid JSON - no explanations.`,
520521
521522 const result : Record < string , unknown > = { ...rest }
522523
523- // Build attendee object for create booking
524+ if ( eventTypeId ) {
525+ result . eventTypeId = Number ( eventTypeId )
526+ }
527+
524528 if ( operation === 'calcom_create_booking' ) {
525529 result . attendee = {
526530 name : attendeeName ,
@@ -533,13 +537,11 @@ Return ONLY valid JSON - no explanations.`,
533537 result . attendeeTimeZone = undefined
534538 result . attendeePhone = undefined
535539
536- // Parse guests as array
537540 if ( guests ) {
538541 result . guests = guests . split ( ',' ) . map ( ( g : string ) => g . trim ( ) )
539542 }
540543 }
541544
542- // Parse JSON fields
543545 if ( metadata ) {
544546 try {
545547 result . metadata = typeof metadata === 'string' ? JSON . parse ( metadata ) : metadata
@@ -557,9 +559,8 @@ Return ONLY valid JSON - no explanations.`,
557559 }
558560 }
559561
560- // Map renamed fields
561562 if ( eventTypeIdParam ) {
562- result . id = eventTypeIdParam
563+ result . eventTypeId = Number ( eventTypeIdParam )
563564 }
564565
565566 if ( bookingStatus ) {
@@ -585,7 +586,6 @@ Return ONLY valid JSON - no explanations.`,
585586 inputs : {
586587 operation : { type : 'string' , description : 'Operation to perform' } ,
587588 credential : { type : 'string' , description : 'Cal.com OAuth credential' } ,
588- // Booking inputs
589589 eventTypeId : { type : 'number' , description : 'Event type ID' } ,
590590 start : { type : 'string' , description : 'Start time (ISO 8601)' } ,
591591 end : { type : 'string' , description : 'End time (ISO 8601)' } ,
@@ -600,7 +600,6 @@ Return ONLY valid JSON - no explanations.`,
600600 cancellationReason : { type : 'string' , description : 'Reason for cancellation' } ,
601601 reschedulingReason : { type : 'string' , description : 'Reason for rescheduling' } ,
602602 bookingStatus : { type : 'string' , description : 'Filter by booking status' } ,
603- // Event type inputs
604603 eventTypeIdParam : { type : 'number' , description : 'Event type ID for get/update/delete' } ,
605604 title : { type : 'string' , description : 'Event type title' } ,
606605 slug : { type : 'string' , description : 'URL-friendly slug' } ,
@@ -613,20 +612,17 @@ Return ONLY valid JSON - no explanations.`,
613612 eventTypeScheduleId : { type : 'number' , description : 'Schedule ID for event type' } ,
614613 disableGuests : { type : 'boolean' , description : 'Disable guest additions' } ,
615614 sortCreatedAt : { type : 'string' , description : 'Sort order for event types' } ,
616- // Schedule inputs
617615 scheduleId : { type : 'number' , description : 'Schedule ID' } ,
618616 scheduleName : { type : 'string' , description : 'Schedule name' } ,
619617 timeZone : { type : 'string' , description : 'Time zone' } ,
620618 isDefault : { type : 'boolean' , description : 'Set as default schedule' } ,
621619 availability : { type : 'json' , description : 'Availability configuration' } ,
622- // Slots inputs
623620 eventTypeSlug : { type : 'string' , description : 'Event type slug' } ,
624621 username : { type : 'string' , description : 'Cal.com username' } ,
625622 duration : { type : 'number' , description : 'Slot duration in minutes' } ,
626623 } ,
627624 outputs : {
628625 success : { type : 'boolean' , description : 'Whether operation succeeded' } ,
629- // Booking outputs
630626 bookingUid : { type : 'string' , description : 'Booking unique identifier' } ,
631627 bookingId : { type : 'number' , description : 'Booking ID' } ,
632628 status : { type : 'string' , description : 'Booking or event status' } ,
@@ -637,25 +633,20 @@ Return ONLY valid JSON - no explanations.`,
637633 hosts : { type : 'json' , description : 'List of hosts' } ,
638634 location : { type : 'string' , description : 'Meeting location' } ,
639635 meetingUrl : { type : 'string' , description : 'Video meeting URL' } ,
640- // List outputs
641636 bookings : { type : 'json' , description : 'List of bookings' } ,
642637 eventTypes : { type : 'json' , description : 'List of event types' } ,
643638 schedules : { type : 'json' , description : 'List of schedules' } ,
644639 slots : { type : 'json' , description : 'Available time slots' } ,
645- // Event type outputs
646640 id : { type : 'number' , description : 'Event type or schedule ID' } ,
647641 slug : { type : 'string' , description : 'Event type slug' } ,
648642 lengthInMinutes : { type : 'number' , description : 'Event duration' } ,
649643 description : { type : 'string' , description : 'Event type description' } ,
650- // Schedule outputs
651644 name : { type : 'string' , description : 'Schedule name' } ,
652645 timeZone : { type : 'string' , description : 'Schedule time zone' } ,
653646 isDefault : { type : 'boolean' , description : 'Whether schedule is default' } ,
654647 availability : { type : 'json' , description : 'Availability configuration' } ,
655- // Delete output
656648 deleted : { type : 'boolean' , description : 'Whether deletion succeeded' } ,
657649 message : { type : 'string' , description : 'Status or error message' } ,
658- // Trigger outputs
659650 triggerEvent : { type : 'string' , description : 'Webhook event type' } ,
660651 createdAt : { type : 'string' , description : 'Webhook event timestamp' } ,
661652 payload : { type : 'json' , description : 'Complete webhook payload data' } ,
0 commit comments