/
types.ts
52 lines (42 loc) · 1.13 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import type { RRule } from 'rrule'
export type Property = { value: string; parameters: Record<string, string> }[]
export type Properties = Record<string, Property>
export type CalendarDate = {
date: Date
isAllDay: boolean
timezone: string | undefined
}
export type Component = {
properties: Properties
components: Record<string, Component[]>
}
export type CalendarEvent = {
start: CalendarDate
end: CalendarDate
modificationDate?: CalendarDate
creationDate?: CalendarDate
dtstamp: CalendarDate
uid: string
title: string
location?: string
description?: string
alarms?: Properties[]
organizers?: { value: string; parameters: Record<string, string> }[]
attendees?: { value: string; parameters: Record<string, string> }[]
status?: string
transparency?: string
recurrence?: {
rrule: RRule | undefined
exdate: CalendarDate[] | undefined
sequence: number | undefined
recurrenceId: CalendarDate | undefined
}
rest: Properties
}
export type CalendarMetadata = {
timezone: string
prodid: string | undefined
version: string | undefined
calscale: string | undefined
rest: Properties
}