@hebcal/icalendar 5.0.6 → 5.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # hebcal-icalendar
1
+ # @hebcal/icalendar
2
2
  Jewish holidays and Hebrew calendar as iCalendar RFC 2445
3
3
 
4
4
  ## Installation
@@ -0,0 +1,99 @@
1
+ import { CalOptions, Event } from '@hebcal/core';
2
+ export type ICalEventOptions = {
3
+ dtstamp?: string;
4
+ sequence?: number;
5
+ emoji?: boolean;
6
+ utmSource?: string;
7
+ utmMedium?: string;
8
+ utmCampaign?: string;
9
+ appendHebrewToSubject?: boolean;
10
+ prodid?: string;
11
+ caldesc?: string;
12
+ title?: string;
13
+ publishedTTL?: string | boolean;
14
+ calendarColor?: string;
15
+ relcalid?: string;
16
+ yahrzeit?: boolean;
17
+ subscribe?: string | boolean;
18
+ url?: boolean;
19
+ };
20
+ export type ICalOptions = CalOptions & ICalEventOptions;
21
+ /**
22
+ * Represents an RFC 2445 iCalendar VEVENT
23
+ */
24
+ export declare class IcalEvent {
25
+ ev: Event;
26
+ options: ICalOptions;
27
+ dtstamp: string;
28
+ sequence?: number;
29
+ timed: boolean;
30
+ locationName: string | null | undefined;
31
+ startDate: string;
32
+ isoDateOnly: string;
33
+ dtargs: string;
34
+ transp: string;
35
+ busyStatus: string;
36
+ endDate: string;
37
+ subj: string;
38
+ category: string | null;
39
+ lines?: string[];
40
+ /**
41
+ * Builds an IcalEvent object from a Hebcal Event
42
+ */
43
+ constructor(ev: Event, options?: ICalOptions);
44
+ getAlarm(): string | null;
45
+ /**
46
+ * @return {string}
47
+ */
48
+ getUid(): string;
49
+ /**
50
+ * @return {string[]}
51
+ */
52
+ getLongLines(): string[];
53
+ /**
54
+ * @return {string}
55
+ */
56
+ toString(): string;
57
+ /**
58
+ * fold lines to 75 characters
59
+ * @return {string[]}
60
+ */
61
+ getLines(): string[];
62
+ /**
63
+ * fold line to 75 characters
64
+ * @param {string} line
65
+ * @return {string}
66
+ */
67
+ static fold(line: string): string;
68
+ /**
69
+ * @param {string} str
70
+ * @return {string}
71
+ */
72
+ static escape(str: string): string;
73
+ /**
74
+ * @param {Date} dt
75
+ * @return {string}
76
+ */
77
+ static formatYYYYMMDD(dt: Date): string;
78
+ /**
79
+ * Returns UTC string for iCalendar
80
+ * @param {Date} dt
81
+ * @return {string}
82
+ */
83
+ static makeDtstamp(dt: Date): string;
84
+ /** @return {string} */
85
+ static version(): string;
86
+ }
87
+ /**
88
+ * Transforms a single Event into a VEVENT string
89
+ * @return {string} multi-line result, delimited by \r\n
90
+ */
91
+ export declare function eventToIcal(ev: Event, options: ICalOptions): string;
92
+ /**
93
+ * Generates an RFC 2445 iCalendar string from an array of events
94
+ */
95
+ export declare function eventsToIcalendar(events: Event[], options: ICalOptions): Promise<string>;
96
+ /**
97
+ * Generates an RFC 2445 iCalendar string from an array of IcalEvents
98
+ */
99
+ export declare function icalEventsToString(icals: IcalEvent[], options: ICalOptions): Promise<string>;