|
|
|
declare module 'ical.js' {
|
|
|
|
function parse(input: string): Array<any>;
|
|
|
|
class Component {
|
|
|
|
name: string;
|
|
|
|
|
|
|
|
static fromString(str: string): Component;
|
|
|
|
|
|
|
|
constructor(jCal: Array<any> | string, parent?: Component);
|
|
|
|
|
|
|
|
toJSON(): Array<any>;
|
|
|
|
|
|
|
|
getFirstSubcomponent(name?: string): Component | null;
|
|
|
|
|
|
|
|
getFirstPropertyValue(name?: string): any;
|
|
|
|
|
|
|
|
getFirstProperty(name?: string): Property;
|
|
|
|
getAllProperties(name?: string): Array<Property>;
|
|
|
|
|
|
|
|
addProperty(property: Property): Property;
|
|
|
|
addPropertyWithValue(name: string, value: string | number | object): Property;
|
|
|
|
|
|
|
|
updatePropertyWithValue(name: string, value: string | number | object): Property;
|
|
|
|
|
|
|
|
removeAllProperties(name?: string): boolean;
|
|
|
|
|
|
|
|
addSubcomponent(component: Component): Component;
|
|
|
|
}
|
|
|
|
|
|
|
|
class Event {
|
|
|
|
uid: string;
|
|
|
|
summary: string;
|
|
|
|
startDate: Time;
|
|
|
|
endDate: Time;
|
|
|
|
description: string;
|
|
|
|
location: string;
|
|
|
|
attendees: Array<Property>;
|
|
|
|
|
|
|
|
component: Component;
|
|
|
|
|
|
|
|
constructor(component?: Component | null,
|
|
|
|
options?: {strictExceptions: boolean, exepctions: Array<Component|Event>});
|
|
|
|
}
|
|
|
|
|
|
|
|
class Property {
|
|
|
|
name: string;
|
|
|
|
type: string;
|
|
|
|
|
|
|
|
constructor(jCal: Array<any> | string, parent?: Component);
|
|
|
|
|
|
|
|
getFirstValue(): any;
|
|
|
|
getValues(): Array<any>;
|
|
|
|
|
|
|
|
setParameter(name: string, value: string | Array<string>): void;
|
|
|
|
setValue(value: string | object): void;
|
|
|
|
toJSON(): any;
|
|
|
|
}
|
|
|
|
|
|
|
|
class Time {
|
|
|
|
isDate: boolean;
|
|
|
|
|
|
|
|
static fromString(str: string): Time;
|
|
|
|
|
|
|
|
constructor(data?: {
|
|
|
|
year?: number,
|
|
|
|
month?: number,
|
|
|
|
day?: number,
|
|
|
|
hour?: number,
|
|
|
|
minute?: number,
|
|
|
|
second?: number,
|
|
|
|
isDate?: boolean
|
|
|
|
});
|
|
|
|
|
|
|
|
compare(aOther: Time): number;
|
|
|
|
|
|
|
|
clone(): Time;
|
|
|
|
|
|
|
|
adjust(
|
|
|
|
aExtraDays: number, aExtraHours: number, aExtraMinutes: number, aExtraSeconds: number, aTimeopt?: Time): void;
|
|
|
|
|
|
|
|
fromJSDate(aDate: Date | null, useUTC: boolean): void;
|
|
|
|
|
|
|
|
toJSDate(): Date;
|
|
|
|
}
|
|
|
|
}
|