@coozzy/cal-dav
Advanced tools
Comparing version 2.2.0 to 2.2.3
@@ -10,4 +10,4 @@ import * as ICAL from 'ical.js'; | ||
listAllEvents(): Promise<ICAL.Event[]>; | ||
createEvent(eventUrl: string, id: string, title: string, description: string, location: string, startDate: ICAL.TimeJsonData, endDate: ICAL.TimeJsonData, attendees: Attendee[], categories: string[], organizerEmail: string, prodid: string): Promise<void>; | ||
updateEvent(eventUrl: string, event: ICAL.Event, title: string, description: string, location: string, startDate: ICAL.TimeJsonData, endDate: ICAL.TimeJsonData, attendees: Attendee[], categories: string[], organizerEmail: string, prodid: string): Promise<void>; | ||
createEvent(eventUrl: string, id: string, title: string, description: string, location: string, startDate: ICAL.TimeJsonData, endDate: ICAL.TimeJsonData, attendees: Attendee[], categories: string[], organizerEmail: string, prodid: string, privateEvent: boolean): Promise<void>; | ||
updateEvent(eventUrl: string, event: ICAL.Event, title: string, description: string, location: string, startDate: ICAL.TimeJsonData, endDate: ICAL.TimeJsonData, attendees: Attendee[], categories: string[], organizerEmail: string, prodid: string, privateEvent: boolean): Promise<void>; | ||
listEventsInTimeRange(startDate: Date, endDate?: Date): Promise<ICAL.Event[]>; | ||
@@ -27,4 +27,4 @@ multiGetEvents(eventUrls: string[]): Promise<ICAL.Event[]>; | ||
multiGetEvents: (eventUrls: string[]) => Promise<ICAL.Event[]>; | ||
createEvent: (eventUrl: string, id: string, title: string, description: string, location: string, startDate: ICAL.TimeJsonData, endDate: ICAL.TimeJsonData, attendees: Attendee[], categories: string[], organizerEmail: string, prodid: string) => Promise<void>; | ||
updateEvent: (eventUrl: string, event: ICAL.Event, title: string, description: string, location: string, startDate: ICAL.TimeJsonData, endDate: ICAL.TimeJsonData, attendees: Attendee[], categories: string[], organizerEmail: string, prodid: string) => Promise<void>; | ||
createEvent: (eventUrl: string, id: string, title: string, description: string, location: string, startDate: ICAL.TimeJsonData, endDate: ICAL.TimeJsonData, attendees: Attendee[], categories: string[], organizerEmail: string, prodid: string, privateEvent: boolean) => Promise<void>; | ||
updateEvent: (eventUrl: string, event: ICAL.Event, title: string, description: string, location: string, startDate: ICAL.TimeJsonData, endDate: ICAL.TimeJsonData, attendees: Attendee[], categories: string[], organizerEmail: string, prodid: string, privateEvent: boolean) => Promise<void>; | ||
createEventWithString: (event: string, eventUid: string) => Promise<void>; | ||
@@ -31,0 +31,0 @@ static parseEvent: (eventData: string) => ICAL.Event; |
@@ -96,3 +96,3 @@ "use strict"; | ||
}; | ||
this.createEvent = async (eventUrl, id, title, description, location, startDate, endDate, attendees, categories, organizerEmail, prodid) => { | ||
this.createEvent = async (eventUrl, id, title, description, location, startDate, endDate, attendees, categories, organizerEmail, prodid, privateEvent) => { | ||
try { | ||
@@ -110,2 +110,5 @@ // wrap request data in VCALENDAR | ||
event.endDate = new ICAL.Time(endDate); | ||
if (privateEvent) { | ||
event.component.addPropertyWithValue('CLASS', 'PRIVATE'); | ||
} | ||
if (categories.length) { | ||
@@ -136,3 +139,3 @@ for (const category of categories) { | ||
}; | ||
this.updateEvent = async (eventUrl, event, title, description, location, startDate, endDate, attendees, categories, organizerEmail, prodid) => { | ||
this.updateEvent = async (eventUrl, event, title, description, location, startDate, endDate, attendees, categories, organizerEmail, prodid, privateEvent) => { | ||
try { | ||
@@ -146,2 +149,6 @@ event.summary = title; | ||
event.component.removeAllProperties('attendee'); | ||
event.component.removeAllProperties('class'); | ||
if (privateEvent) { | ||
event.component.addPropertyWithValue('CLASS', 'PRIVATE'); | ||
} | ||
if (categories.length) { | ||
@@ -148,0 +155,0 @@ for (const category of categories) { |
{ | ||
"name": "@coozzy/cal-dav", | ||
"version": "2.2.0", | ||
"version": "2.2.3", | ||
"description": "Simple cal dav client.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -27,3 +27,4 @@ import * as ICAL from 'ical.js'; | ||
organizerEmail: string, | ||
prodid: string): Promise<void>; | ||
prodid: string, | ||
privateEvent: boolean): Promise<void>; | ||
@@ -40,3 +41,4 @@ updateEvent(eventUrl: string, | ||
organizerEmail: string, | ||
prodid: string): Promise<void>; | ||
prodid: string, | ||
privateEvent: boolean): Promise<void>; | ||
@@ -151,3 +153,3 @@ listEventsInTimeRange(startDate: Date, endDate?: Date): Promise<ICAL.Event[]>; | ||
createEvent = async(eventUrl: string, id: string, title: string, description: string, location: string, startDate: ICAL.TimeJsonData, endDate: ICAL.TimeJsonData, attendees: Attendee[], categories: string[], organizerEmail: string, prodid: string): Promise<void> => { | ||
createEvent = async(eventUrl: string, id: string, title: string, description: string, location: string, startDate: ICAL.TimeJsonData, endDate: ICAL.TimeJsonData, attendees: Attendee[], categories: string[], organizerEmail: string, prodid: string, privateEvent: boolean): Promise<void> => { | ||
try{ | ||
@@ -166,2 +168,6 @@ // wrap request data in VCALENDAR | ||
if (privateEvent) { | ||
event.component.addPropertyWithValue('CLASS', 'PRIVATE'); | ||
} | ||
if(categories.length){ | ||
@@ -196,3 +202,3 @@ for(const category of categories){ | ||
updateEvent = async(eventUrl: string, event: ICAL.Event, title: string, description: string, location: string, startDate: ICAL.TimeJsonData, endDate: ICAL.TimeJsonData, attendees: Attendee[], categories: string[], organizerEmail: string, prodid: string): Promise<void> => { | ||
updateEvent = async(eventUrl: string, event: ICAL.Event, title: string, description: string, location: string, startDate: ICAL.TimeJsonData, endDate: ICAL.TimeJsonData, attendees: Attendee[], categories: string[], organizerEmail: string, prodid: string, privateEvent: boolean): Promise<void> => { | ||
try{ | ||
@@ -207,2 +213,6 @@ event.summary = title; | ||
event.component.removeAllProperties('attendee'); | ||
event.component.removeAllProperties('class'); | ||
if (privateEvent) { | ||
event.component.addPropertyWithValue('CLASS', 'PRIVATE'); | ||
} | ||
@@ -209,0 +219,0 @@ if(categories.length){ |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
62174
1340
1