ultisuite-client/lib/agenda/agenda-types.ts
R3D347HR4Y 3bbf3691b0
Some checks failed
E2E / Playwright e2e (push) Has been cancelled
bordel c'est beau
2026-06-11 10:10:39 +02:00

82 lines
1.7 KiB
TypeScript

export interface AgendaCalendar {
id: string
display_name: string
color: string
path: string
}
export interface AgendaEventAttendee {
email: string
name?: string
/** PARTSTAT : NEEDS-ACTION | ACCEPTED | DECLINED | TENTATIVE */
status?: string
role?: string
}
/** Événement tel que renvoyé par l'API (`/calendar/{id}/events`). */
export interface AgendaApiEvent {
uid: string
summary: string
description: string
location: string
/** ICS : `YYYYMMDD` (journée entière) ou `YYYYMMDDTHHMMSSZ` (UTC). */
start: string
end: string
all_day: boolean
path?: string
etag?: string
organizer?: string
attendees?: AgendaEventAttendee[]
meet_url?: string
color?: string
rrule?: string
exdates?: string[]
raw_ics?: string
}
export interface AgendaEventsResponse {
events: AgendaApiEvent[]
}
export interface AgendaCalendarsResponse {
calendars: AgendaCalendar[]
}
/** Occurrence affichable (événement simple ou instance d'une récurrence). */
export interface AgendaEvent {
/** Clé unique d'occurrence : `path@startMs`. */
key: string
calendarId: string
path: string
etag: string
uid: string
title: string
description: string
location: string
meetUrl: string
organizer: string
attendees: AgendaEventAttendee[]
start: Date
end: Date
allDay: boolean
/** Couleur résolue : événement sinon agenda. */
color: string
rrule: string
recurring: boolean
/** Données API du master, pour l'édition aller-retour. */
master: AgendaApiEvent
}
export interface AgendaEventDraft {
title: string
start: Date
end: Date
allDay: boolean
calendarId: string
description?: string
location?: string
attendees?: AgendaEventAttendee[]
rrule?: string
color?: string
}