From 3538c6a0ddbc32b010f264eb33d84b20293065d0 Mon Sep 17 00:00:00 2001 From: jnile Date: Sun, 23 Mar 2025 12:14:39 +0000 Subject: [PATCH 1/2] Reschedule single updated to use microsoft id --- public/swagger/swagger.json | 41 +++++++++++++++++++++----- shared | 2 +- src/components/calendar-overview.tsx | 8 +++-- src/components/reschedule-requests.tsx | 6 ++-- src/types/client.ts | 32 ++++++++++++++------ 5 files changed, 65 insertions(+), 24 deletions(-) diff --git a/public/swagger/swagger.json b/public/swagger/swagger.json index 7f553b3..244af9c 100644 --- a/public/swagger/swagger.json +++ b/public/swagger/swagger.json @@ -348,6 +348,14 @@ "type": "string" }, "required": true + }, + { + "in": "query", + "name": "isICalUId", + "schema": { + "type": "boolean" + }, + "required": true } ], "responses": { @@ -2440,7 +2448,6 @@ "description": "Request body of the details of the two meetings", "type": "object", "required": [ - "newMeeting", "oldMeeting" ], "properties": { @@ -2473,12 +2480,18 @@ "oldMeeting": { "type": "object", "required": [ - "msftMeetingID" + "msftMeetingID", + "ownerEmail" ], "properties": { + "ownerEmail": { + "type": "string", + "format": "email", + "description": "The email of the owner of the old meeting" + }, "msftMeetingID": { "type": "string", - "description": "The microsoft meeting ID of the old meeting if it exists" + "description": "The microsoft iCalUId meeting ID of the old meeting" }, "isOrganizerOptional": { "type": "boolean", @@ -2557,13 +2570,17 @@ "type": "object", "required": [ "msftMeetingID", - "meetingStartTime", - "meetingOwner" + "ownerEmail" ], "properties": { + "ownerEmail": { + "type": "string", + "format": "email", + "description": "The email of the owner of the old meeting" + }, "msftMeetingID": { "type": "string", - "description": "The microsoft meeting ID of the old meeting" + "description": "The microsoft iCalUId meeting ID of the old meeting" } } } @@ -2573,12 +2590,17 @@ "description": "Request body of the details of the old meeting", "type": "object", "required": [ - "msftMeetingID" + "msftMeetingID", + "ownerEmail" ], "properties": { + "ownerEmail": { + "type": "string", + "format": "email" + }, "msftMeetingID": { "type": "string", - "description": "The microsoft meeting ID of the old meeting" + "description": "The microsoft iCalUId meeting ID of the old meeting" } } }, @@ -2878,6 +2900,9 @@ "id": { "type": "string" }, + "iCalUId": { + "type": "string" + }, "attendees": { "type": "array", "items": { diff --git a/shared b/shared index 2c24047..ad6b08e 160000 --- a/shared +++ b/shared @@ -1 +1 @@ -Subproject commit 2c2404713126cdb23c1729b63d8f2596600af3da +Subproject commit ad6b08eda774e4a1e680ae38a80b7257e380a7bc diff --git a/src/components/calendar-overview.tsx b/src/components/calendar-overview.tsx index 07f5375..ca9d20d 100644 --- a/src/components/calendar-overview.tsx +++ b/src/components/calendar-overview.tsx @@ -151,11 +151,13 @@ export function CalendarOverview() { return (doc.body.textContent || '').trim() } - const handleReschedule = async (selectedEventID: string) => { + const handleReschedule = async (selectedEventID: string, ownerEmail: string) => { if (!selectedEventID) return + if (!ownerEmail) return try { await slotifyClient.PostAPIRescheduleRequestSingle({ msftMeetingID: selectedEventID, + ownerEmail: ownerEmail, }) toast({ title: 'Reschedule sent', @@ -509,8 +511,8 @@ export function CalendarOverview() {