From d8abe4d43bb0eb1edb49f84b966ea6094cb0d562 Mon Sep 17 00:00:00 2001 From: Joel Mukuthu Date: Thu, 12 Nov 2020 05:28:39 +0100 Subject: [PATCH] fix: Type fixes and updates (#217) * Types: add rsvp to AttendeeData * Types: specify possible values for status and busystatus * Types: specify possible values for transparency --- index.d.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/index.d.ts b/index.d.ts index 6fc1ddde5..1a3e22ad5 100644 --- a/index.d.ts +++ b/index.d.ts @@ -16,6 +16,7 @@ declare module 'ical-generator' { type repeatingFreq = 'SECONDLY' | 'MINUTELY' | 'DAILY' | 'WEEKLY' | 'MONTHLY' | 'YEARLY'; type status = 'CONFIRMED' | 'TENTATIVE' | 'CANCELLED'; type busystatus = 'FREE' | 'TENTATIVE' | 'BUSY' | 'OOF'; + type transparency = 'OPAQUE' | 'TRANSPARENT'; type day = 'SU' | 'MO' | 'TU' | 'WE' | 'TH' | 'FR' | 'SA'; type attendeeRole = 'CHAIR' | 'REQ-PARTICIPANT' | 'OPT-PARTICIPANT' | 'NON-PARTICIPANT'; type attendeeStatus = 'ACCEPTED' | 'TENTATIVE' | 'DECLINED' | 'DELEGATED' | 'NEEDS-ACTION'; @@ -76,11 +77,11 @@ declare module 'ical-generator' { organizer?: string | PersonData; attendees?: AttendeeData[]; alarms?: AlarmData[]; - status?: string; - busystatus?: string; + status?: status; + busystatus?: busystatus; timezone?: string; recurrenceId?: moment.Moment | Date | string; - transparency?: string; + transparency?: transparency; x?: { key: string, value: string }[]; } @@ -110,6 +111,7 @@ declare module 'ical-generator' { role?: attendeeRole; status?: attendeeStatus; type?: attendeeType; + rsvp?: attendeeRsvp, delegatedTo?: ICalAttendee; delegatedFrom?: ICalAttendee; delegatesTo?: ICalAttendee; @@ -244,8 +246,8 @@ declare module 'ical-generator' { lastModified(): moment.Moment; lastModified(lastModified: string | moment.Moment | Date): ICalEvent; toJSON(): EventData; - transparency(): string; - transparency(transparency: string): string; + transparency(): transparency; + transparency(transparency: transparency): string; } class ICalAttendee {