mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
list events
This commit is contained in:
@@ -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;
|
||||
}
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user