list events

This commit is contained in:
Peter Maquiran
2024-05-29 15:45:34 +01:00
parent caa11d6be7
commit 38d36a6e49
22 changed files with 629 additions and 198 deletions
+18
View File
@@ -0,0 +1,18 @@
export interface SharedCalendar {
TypeShare: number;
OwnerUserId: number;
Id: number;
CalendarId: string;
CalendarName: string;
CalendarRoleId: string;
}
export interface OwnCalendar {
Id: number;
CalendarId: string;
CalendarName: string;
CalendarRoleId: string;
}
+22
View File
@@ -0,0 +1,22 @@
import { z } from 'zod';
// Define the schema for a single event
const eventListSchema = z.array(z.object({
HasAttachments: z.boolean(),
IsAllDayEvent: z.boolean(),
EventId: z.string(),
Subject: z.string(),
Location: z.string().nullable(),
CalendarId: z.string(),
CalendarName: z.string(),
StartDate: z.string(), // Ideally, you would validate this with a date regex or a specific date type if using Zod's date feature
EndDate: z.string(), // Same as above
Schedule: z.string(),
RequiredAttendees: z.string().nullable(),
OptionalAttendees: z.string().nullable(),
HumanDate: z.string(),
TimeZone: z.string(),
IsPrivate: z.boolean()
}));
export type EventList = z.infer<typeof eventListSchema>