@ebarooni/capacitor-calendar 6.5.0 → 6.6.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.
Files changed (40) hide show
  1. package/README.md +61 -12
  2. package/android/build.gradle +2 -2
  3. package/android/src/main/java/dev/barooni/capacitor/calendar/CapacitorCalendar.kt +178 -119
  4. package/android/src/main/java/dev/barooni/capacitor/calendar/CapacitorCalendarPlugin.kt +73 -0
  5. package/assets/images/text-logo.png +0 -0
  6. package/dist/docs.json +461 -60
  7. package/dist/esm/definitions.d.ts +174 -34
  8. package/dist/esm/definitions.js.map +1 -1
  9. package/dist/esm/index.d.ts +18 -14
  10. package/dist/esm/index.js +12 -9
  11. package/dist/esm/index.js.map +1 -1
  12. package/dist/esm/schemas/enums/calendar-source-type.d.ts +38 -0
  13. package/dist/esm/schemas/enums/calendar-source-type.js +40 -0
  14. package/dist/esm/schemas/enums/calendar-source-type.js.map +1 -0
  15. package/dist/esm/schemas/enums/calendar-type.d.ts +28 -0
  16. package/dist/esm/schemas/enums/calendar-type.js +30 -0
  17. package/dist/esm/schemas/enums/calendar-type.js.map +1 -0
  18. package/dist/esm/schemas/enums/event-span.d.ts +16 -0
  19. package/dist/esm/schemas/enums/event-span.js +18 -0
  20. package/dist/esm/schemas/enums/event-span.js.map +1 -0
  21. package/dist/esm/schemas/interfaces/calendar-event.d.ts +14 -3
  22. package/dist/esm/schemas/interfaces/calendar-event.js.map +1 -1
  23. package/dist/esm/schemas/interfaces/calendar-source.d.ts +15 -0
  24. package/dist/esm/schemas/interfaces/calendar-source.js +2 -0
  25. package/dist/esm/schemas/interfaces/calendar-source.js.map +1 -0
  26. package/dist/esm/schemas/interfaces/calendar.d.ts +43 -2
  27. package/dist/esm/schemas/interfaces/calendar.js.map +1 -1
  28. package/dist/esm/web.d.ts +49 -9
  29. package/dist/esm/web.js +13 -2
  30. package/dist/esm/web.js.map +1 -1
  31. package/dist/plugin.cjs.js +101 -2
  32. package/dist/plugin.cjs.js.map +1 -1
  33. package/dist/plugin.js +101 -2
  34. package/dist/plugin.js.map +1 -1
  35. package/ios/Plugin/CapacitorCalendar.swift +210 -17
  36. package/ios/Plugin/CapacitorCalendarPlugin.m +4 -0
  37. package/ios/Plugin/CapacitorCalendarPlugin.swift +111 -1
  38. package/ios/Plugin/CapacitorReminders.swift +63 -9
  39. package/ios/Plugin/EventCreationParameters.swift +1 -1
  40. package/package.json +32 -20
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Represents the different types of sources from which calendars can originate.
3
+ *
4
+ * @enum CalendarSourceType
5
+ * @platform iOS
6
+ */
7
+ export var CalendarSourceType;
8
+ (function (CalendarSourceType) {
9
+ /**
10
+ * Calendars that are stored locally on the device. These calendars are not
11
+ * synced with any external service.
12
+ */
13
+ CalendarSourceType[CalendarSourceType["LOCAL"] = 0] = "LOCAL";
14
+ /**
15
+ * Calendars that are associated with an Exchange server. Exchange is a
16
+ * popular calendar and email service used by many enterprises.
17
+ */
18
+ CalendarSourceType[CalendarSourceType["EXCHANGE"] = 1] = "EXCHANGE";
19
+ /**
20
+ * Calendars that use the CalDAV protocol for synchronization.
21
+ * This includes calendars from services like Google Calendar and Yahoo Calendar.
22
+ */
23
+ CalendarSourceType[CalendarSourceType["CAL_DAV"] = 2] = "CAL_DAV";
24
+ /**
25
+ * Calendars that were previously associated with MobileMe, Apple's cloud
26
+ * service before iCloud. This source type is largely obsolete now.
27
+ */
28
+ CalendarSourceType[CalendarSourceType["MOBILE_ME"] = 3] = "MOBILE_ME";
29
+ /**
30
+ * Calendars that the user has subscribed to. These are read-only calendars
31
+ * that can be added by subscribing to a calendar URL.
32
+ */
33
+ CalendarSourceType[CalendarSourceType["SUBSCRIBED"] = 4] = "SUBSCRIBED";
34
+ /**
35
+ * The built-in Birthdays calendar, which shows birthdays of contacts from the user's address book.
36
+ * This calendar is typically read-only and is managed by the system.
37
+ */
38
+ CalendarSourceType[CalendarSourceType["BIRTHDAYS"] = 5] = "BIRTHDAYS";
39
+ })(CalendarSourceType || (CalendarSourceType = {}));
40
+ //# sourceMappingURL=calendar-source-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendar-source-type.js","sourceRoot":"","sources":["../../../../src/schemas/enums/calendar-source-type.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAN,IAAY,kBAoCX;AApCD,WAAY,kBAAkB;IAC5B;;;OAGG;IACH,6DAAK,CAAA;IAEL;;;OAGG;IACH,mEAAQ,CAAA;IAER;;;OAGG;IACH,iEAAO,CAAA;IAEP;;;OAGG;IACH,qEAAS,CAAA;IAET;;;OAGG;IACH,uEAAU,CAAA;IAEV;;;OAGG;IACH,qEAAS,CAAA;AACX,CAAC,EApCW,kBAAkB,KAAlB,kBAAkB,QAoC7B","sourcesContent":["/**\n * Represents the different types of sources from which calendars can originate.\n *\n * @enum CalendarSourceType\n * @platform iOS\n */\nexport enum CalendarSourceType {\n /**\n * Calendars that are stored locally on the device. These calendars are not\n * synced with any external service.\n */\n LOCAL,\n\n /**\n * Calendars that are associated with an Exchange server. Exchange is a\n * popular calendar and email service used by many enterprises.\n */\n EXCHANGE,\n\n /**\n * Calendars that use the CalDAV protocol for synchronization.\n * This includes calendars from services like Google Calendar and Yahoo Calendar.\n */\n CAL_DAV,\n\n /**\n * Calendars that were previously associated with MobileMe, Apple's cloud\n * service before iCloud. This source type is largely obsolete now.\n */\n MOBILE_ME,\n\n /**\n * Calendars that the user has subscribed to. These are read-only calendars\n * that can be added by subscribing to a calendar URL.\n */\n SUBSCRIBED,\n\n /**\n * The built-in Birthdays calendar, which shows birthdays of contacts from the user's address book.\n * This calendar is typically read-only and is managed by the system.\n */\n BIRTHDAYS,\n}\n"]}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * An enum representing the type of calendar.
3
+ *
4
+ * @enum CalendarType
5
+ * @platform iOS
6
+ */
7
+ export declare enum CalendarType {
8
+ /**
9
+ * This calendar is sync'd from either Mobile Me or tethered.
10
+ */
11
+ LOCAL = 0,
12
+ /**
13
+ * This calendar is from a CalDAV server.
14
+ */
15
+ CAL_DAV = 1,
16
+ /**
17
+ * This calendar comes from an Exchange server.
18
+ */
19
+ EXCHANGE = 2,
20
+ /**
21
+ * This is a locally subscribed calendar.
22
+ */
23
+ SUBSCRIPTION = 3,
24
+ /**
25
+ * This is the built-in birthday calendar.
26
+ */
27
+ BIRTHDAY = 4
28
+ }
@@ -0,0 +1,30 @@
1
+ /**
2
+ * An enum representing the type of calendar.
3
+ *
4
+ * @enum CalendarType
5
+ * @platform iOS
6
+ */
7
+ export var CalendarType;
8
+ (function (CalendarType) {
9
+ /**
10
+ * This calendar is sync'd from either Mobile Me or tethered.
11
+ */
12
+ CalendarType[CalendarType["LOCAL"] = 0] = "LOCAL";
13
+ /**
14
+ * This calendar is from a CalDAV server.
15
+ */
16
+ CalendarType[CalendarType["CAL_DAV"] = 1] = "CAL_DAV";
17
+ /**
18
+ * This calendar comes from an Exchange server.
19
+ */
20
+ CalendarType[CalendarType["EXCHANGE"] = 2] = "EXCHANGE";
21
+ /**
22
+ * This is a locally subscribed calendar.
23
+ */
24
+ CalendarType[CalendarType["SUBSCRIPTION"] = 3] = "SUBSCRIPTION";
25
+ /**
26
+ * This is the built-in birthday calendar.
27
+ */
28
+ CalendarType[CalendarType["BIRTHDAY"] = 4] = "BIRTHDAY";
29
+ })(CalendarType || (CalendarType = {}));
30
+ //# sourceMappingURL=calendar-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendar-type.js","sourceRoot":"","sources":["../../../../src/schemas/enums/calendar-type.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAN,IAAY,YAyBX;AAzBD,WAAY,YAAY;IACtB;;OAEG;IACH,iDAAK,CAAA;IAEL;;OAEG;IACH,qDAAO,CAAA;IAEP;;OAEG;IACH,uDAAQ,CAAA;IAER;;OAEG;IACH,+DAAY,CAAA;IAEZ;;OAEG;IACH,uDAAQ,CAAA;AACV,CAAC,EAzBW,YAAY,KAAZ,YAAY,QAyBvB","sourcesContent":["/**\n * An enum representing the type of calendar.\n *\n * @enum CalendarType\n * @platform iOS\n */\nexport enum CalendarType {\n /**\n * This calendar is sync'd from either Mobile Me or tethered.\n */\n LOCAL,\n\n /**\n * This calendar is from a CalDAV server.\n */\n CAL_DAV,\n\n /**\n * This calendar comes from an Exchange server.\n */\n EXCHANGE,\n\n /**\n * This is a locally subscribed calendar.\n */\n SUBSCRIPTION,\n\n /**\n * This is the built-in birthday calendar.\n */\n BIRTHDAY,\n}\n"]}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Enum representing the span of modifications.
3
+ *
4
+ * @enum EventSpan
5
+ * @platform iOS
6
+ */
7
+ export declare enum EventSpan {
8
+ /**
9
+ * The modifications should only be applied to this event.
10
+ */
11
+ THIS_EVENT = 0,
12
+ /**
13
+ * The modifications to this event should also be applied to the future instances of this event.
14
+ */
15
+ THIS_AND_FUTURE_EVENTS = 1
16
+ }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Enum representing the span of modifications.
3
+ *
4
+ * @enum EventSpan
5
+ * @platform iOS
6
+ */
7
+ export var EventSpan;
8
+ (function (EventSpan) {
9
+ /**
10
+ * The modifications should only be applied to this event.
11
+ */
12
+ EventSpan[EventSpan["THIS_EVENT"] = 0] = "THIS_EVENT";
13
+ /**
14
+ * The modifications to this event should also be applied to the future instances of this event.
15
+ */
16
+ EventSpan[EventSpan["THIS_AND_FUTURE_EVENTS"] = 1] = "THIS_AND_FUTURE_EVENTS";
17
+ })(EventSpan || (EventSpan = {}));
18
+ //# sourceMappingURL=event-span.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-span.js","sourceRoot":"","sources":["../../../../src/schemas/enums/event-span.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAN,IAAY,SAUX;AAVD,WAAY,SAAS;IACnB;;OAEG;IACH,qDAAU,CAAA;IAEV;;OAEG;IACH,6EAAsB,CAAA;AACxB,CAAC,EAVW,SAAS,KAAT,SAAS,QAUpB","sourcesContent":["/**\n * Enum representing the span of modifications.\n *\n * @enum EventSpan\n * @platform iOS\n */\nexport enum EventSpan {\n /**\n * The modifications should only be applied to this event.\n */\n THIS_EVENT,\n\n /**\n * The modifications to this event should also be applied to the future instances of this event.\n */\n THIS_AND_FUTURE_EVENTS,\n}\n"]}
@@ -15,6 +15,7 @@
15
15
  * @property {string} duration The duration of the event. (Optional)
16
16
  * @property {boolean} isAllDay Indicates if the event is all day. (Optional)
17
17
  * @property {string} calendarId The calendar that the event belongs to. (Optional)
18
+ * @property {string} url The URL of the event. (Optional)
18
19
  */
19
20
  export interface CalendarEvent {
20
21
  /**
@@ -30,7 +31,7 @@ export interface CalendarEvent {
30
31
  */
31
32
  location?: string;
32
33
  /**
33
- * @platform Android
34
+ * @platform iOS, Android
34
35
  */
35
36
  eventColor?: string;
36
37
  /**
@@ -52,11 +53,17 @@ export interface CalendarEvent {
52
53
  /**
53
54
  * @platform iOS, Android
54
55
  */
55
- eventTimezone?: string;
56
+ eventTimezone?: {
57
+ region: string;
58
+ abbreviation: string;
59
+ };
56
60
  /**
57
61
  * @platform iOS, Android
58
62
  */
59
- eventEndTimezone?: string;
63
+ eventEndTimezone?: {
64
+ region: string;
65
+ abbreviation: string;
66
+ };
60
67
  /**
61
68
  * @platform Android
62
69
  */
@@ -69,4 +76,8 @@ export interface CalendarEvent {
69
76
  * @platform iOS, Android
70
77
  */
71
78
  calendarId: string;
79
+ /**
80
+ * @platform iOS
81
+ */
82
+ url: string;
72
83
  }
@@ -1 +1 @@
1
- {"version":3,"file":"calendar-event.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/calendar-event.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Represents an event in the calendar.\n *\n * @interface CalendarEvent\n * @property {string} id The unique identifier of the event.\n * @property {string} title The title or name of the event. (Optional)\n * @property {string} location The location of the event. (Optional)\n * @property {string} eventColor The color of the individual event. (Optional)\n * @property {string} organizer The organizer of the event. (Optional)\n * @property {string} description The description of the event. (Optional)\n * @property {number} startDate The start date of the event. (Optional)\n * @property {number} endDate The end date of the event. (Optional)\n * @property {string} eventTimezone The timezone of the start date. (optional)\n * @property {string} eventEndTimezone The timezone of the end date. (optional)\n * @property {string} duration The duration of the event. (Optional)\n * @property {boolean} isAllDay Indicates if the event is all day. (Optional)\n * @property {string} calendarId The calendar that the event belongs to. (Optional)\n */\nexport interface CalendarEvent {\n /**\n * @platform iOS, Android\n */\n id: string;\n\n /**\n * @platform iOS, Android\n */\n title?: string;\n\n /**\n * @platform iOS, Android\n */\n location?: string;\n\n /**\n * @platform Android\n */\n eventColor?: string;\n\n /**\n * @platform iOS, Android\n */\n organizer?: string;\n\n /**\n * @platform iOS, Android\n */\n description?: string;\n\n /**\n * @platform iOS, Android\n */\n startDate?: number;\n\n /**\n * @platform iOS, Android\n */\n endDate?: number;\n\n /**\n * @platform iOS, Android\n */\n eventTimezone?: string;\n\n /**\n * @platform iOS, Android\n */\n eventEndTimezone?: string;\n\n /**\n * @platform Android\n */\n duration?: string;\n\n /**\n * @platform iOS, Android\n */\n isAllDay?: boolean;\n\n /**\n * @platform iOS, Android\n */\n calendarId: string;\n}\n"]}
1
+ {"version":3,"file":"calendar-event.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/calendar-event.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Represents an event in the calendar.\n *\n * @interface CalendarEvent\n * @property {string} id The unique identifier of the event.\n * @property {string} title The title or name of the event. (Optional)\n * @property {string} location The location of the event. (Optional)\n * @property {string} eventColor The color of the individual event. (Optional)\n * @property {string} organizer The organizer of the event. (Optional)\n * @property {string} description The description of the event. (Optional)\n * @property {number} startDate The start date of the event. (Optional)\n * @property {number} endDate The end date of the event. (Optional)\n * @property {string} eventTimezone The timezone of the start date. (optional)\n * @property {string} eventEndTimezone The timezone of the end date. (optional)\n * @property {string} duration The duration of the event. (Optional)\n * @property {boolean} isAllDay Indicates if the event is all day. (Optional)\n * @property {string} calendarId The calendar that the event belongs to. (Optional)\n * @property {string} url The URL of the event. (Optional)\n */\nexport interface CalendarEvent {\n /**\n * @platform iOS, Android\n */\n id: string;\n\n /**\n * @platform iOS, Android\n */\n title?: string;\n\n /**\n * @platform iOS, Android\n */\n location?: string;\n\n /**\n * @platform iOS, Android\n */\n eventColor?: string;\n\n /**\n * @platform iOS, Android\n */\n organizer?: string;\n\n /**\n * @platform iOS, Android\n */\n description?: string;\n\n /**\n * @platform iOS, Android\n */\n startDate?: number;\n\n /**\n * @platform iOS, Android\n */\n endDate?: number;\n\n /**\n * @platform iOS, Android\n */\n eventTimezone?: {\n region: string;\n abbreviation: string;\n };\n\n /**\n * @platform iOS, Android\n */\n eventEndTimezone?: {\n region: string;\n abbreviation: string;\n };\n\n /**\n * @platform Android\n */\n duration?: string;\n\n /**\n * @platform iOS, Android\n */\n isAllDay?: boolean;\n\n /**\n * @platform iOS, Android\n */\n calendarId: string;\n\n /**\n * @platform iOS\n */\n url: string;\n}\n"]}
@@ -0,0 +1,15 @@
1
+ import { CalendarSourceType } from "../enums/calendar-source-type";
2
+ /**
3
+ * Represents the account a calendar belongs to
4
+ *
5
+ * @enum CalendarSource
6
+ * @platform iOS
7
+ * @property {CalendarSourceType} type The type of the source object.
8
+ * @property {string} id A unique identifier for the source object.
9
+ * @property {string} title The name of the source object.
10
+ */
11
+ export interface CalendarSource {
12
+ type: CalendarSourceType;
13
+ id: string;
14
+ title: string;
15
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=calendar-source.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendar-source.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/calendar-source.ts"],"names":[],"mappings":"","sourcesContent":["import { CalendarSourceType } from \"../enums/calendar-source-type\";\n\n/**\n * Represents the account a calendar belongs to\n *\n * @enum CalendarSource\n * @platform iOS\n * @property {CalendarSourceType} type The type of the source object.\n * @property {string} id A unique identifier for the source object.\n * @property {string} title The name of the source object.\n */\nexport interface CalendarSource {\n type: CalendarSourceType;\n id: string;\n title: string;\n}\n"]}
@@ -1,12 +1,53 @@
1
+ import { CalendarSource } from "./calendar-source";
2
+ import { CalendarType } from "../enums/calendar-type";
1
3
  /**
2
4
  * Represents a calendar object.
3
5
  *
4
6
  * @interface Calendar
5
7
  * @platform iOS, Android
6
- * @property {string} id - The unique identifier of the calendar.
7
- * @property {string} title - The title or name of the calendar.
8
+ * @property {string} id The unique identifier of the calendar.
9
+ * @property {string} title The title or name of the calendar.
10
+ * @property {string} color The color of the calendar.
11
+ * @property {boolean} isImmutable Indicating whether the calendar's properties
12
+ * can be modified.
13
+ * @property {boolean} allowsContentModifications Indicating whether the calendar's
14
+ * items (events or reminders) can be modified.
15
+ * @property {CalendarType} type The type of the calendar. On iOS the type is of type
16
+ * CalendarSourceType.
17
+ * @property {boolean} isSubscribed Indicating whether the calendar is a subscribed calendar.
18
+ * @property {CalendarSource} source The source of the calendar.
8
19
  */
9
20
  export interface Calendar {
21
+ /**
22
+ * @platform iOS, Android
23
+ */
10
24
  id: string;
25
+ /**
26
+ * @platform iOS, Android
27
+ */
11
28
  title: string;
29
+ /**
30
+ * @platform iOS, Android
31
+ */
32
+ color: string;
33
+ /**
34
+ * @platform iOS
35
+ */
36
+ isImmutable?: boolean;
37
+ /**
38
+ * @platform iOS
39
+ */
40
+ allowsContentModifications?: boolean;
41
+ /**
42
+ * @platform iOS, Android
43
+ */
44
+ type?: CalendarType;
45
+ /**
46
+ * @platform iOS
47
+ */
48
+ isSubscribed?: boolean;
49
+ /**
50
+ * @platform iOS
51
+ */
52
+ source?: CalendarSource;
12
53
  }
@@ -1 +1 @@
1
- {"version":3,"file":"calendar.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/calendar.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Represents a calendar object.\n *\n * @interface Calendar\n * @platform iOS, Android\n * @property {string} id - The unique identifier of the calendar.\n * @property {string} title - The title or name of the calendar.\n */\nexport interface Calendar {\n id: string;\n title: string;\n}\n"]}
1
+ {"version":3,"file":"calendar.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/calendar.ts"],"names":[],"mappings":"","sourcesContent":["import { CalendarSource } from \"./calendar-source\";\nimport { CalendarType } from \"../enums/calendar-type\";\n\n/**\n * Represents a calendar object.\n *\n * @interface Calendar\n * @platform iOS, Android\n * @property {string} id The unique identifier of the calendar.\n * @property {string} title The title or name of the calendar.\n * @property {string} color The color of the calendar.\n * @property {boolean} isImmutable Indicating whether the calendar's properties\n * can be modified.\n * @property {boolean} allowsContentModifications Indicating whether the calendar's\n * items (events or reminders) can be modified.\n * @property {CalendarType} type The type of the calendar. On iOS the type is of type\n * CalendarSourceType.\n * @property {boolean} isSubscribed Indicating whether the calendar is a subscribed calendar.\n * @property {CalendarSource} source The source of the calendar.\n */\nexport interface Calendar {\n /**\n * @platform iOS, Android\n */\n id: string;\n\n /**\n * @platform iOS, Android\n */\n title: string;\n\n /**\n * @platform iOS, Android\n */\n color: string;\n\n /**\n * @platform iOS\n */\n isImmutable?: boolean;\n\n /**\n * @platform iOS\n */\n allowsContentModifications?: boolean;\n\n /**\n * @platform iOS, Android\n */\n type?: CalendarType;\n\n /**\n * @platform iOS\n */\n isSubscribed?: boolean;\n\n /**\n * @platform iOS\n */\n source?: CalendarSource;\n}\n"]}
package/dist/esm/web.d.ts CHANGED
@@ -1,12 +1,14 @@
1
- import { PermissionState, WebPlugin } from '@capacitor/core';
2
- import { CapacitorCalendarPlugin } from './definitions';
3
- import { PluginPermission } from './schemas/enums/plugin-permission';
4
- import { ReminderRecurrenceRule } from './schemas/interfaces/reminder-recurrence-rule';
5
- import type { Calendar } from './schemas/interfaces/calendar';
6
- import type { RemindersList } from './schemas/interfaces/reminders-list';
7
- import type { PluginPermissionsMap } from './schemas/interfaces/plugin-permissions-map';
8
- import type { CalendarEvent } from './schemas/interfaces/calendar-event';
9
- import type { Reminder } from './schemas/interfaces/reminder';
1
+ import { PermissionState, WebPlugin } from "@capacitor/core";
2
+ import { CapacitorCalendarPlugin } from "./definitions";
3
+ import { PluginPermission } from "./schemas/enums/plugin-permission";
4
+ import { ReminderRecurrenceRule } from "./schemas/interfaces/reminder-recurrence-rule";
5
+ import { EventSpan } from "./schemas/enums/event-span";
6
+ import type { Calendar } from "./schemas/interfaces/calendar";
7
+ import type { RemindersList } from "./schemas/interfaces/reminders-list";
8
+ import type { PluginPermissionsMap } from "./schemas/interfaces/plugin-permissions-map";
9
+ import type { CalendarEvent } from "./schemas/interfaces/calendar-event";
10
+ import type { Reminder } from "./schemas/interfaces/reminder";
11
+ import type { CalendarSource } from "./schemas/interfaces/calendar-source";
10
12
  export declare class CapacitorCalendarWeb extends WebPlugin implements CapacitorCalendarPlugin {
11
13
  checkPermission(_options: {
12
14
  alias: PluginPermission;
@@ -97,6 +99,7 @@ export declare class CapacitorCalendarWeb extends WebPlugin implements Capacitor
97
99
  createCalendar(_options: {
98
100
  title: string;
99
101
  color?: string;
102
+ sourceId?: string;
100
103
  }): Promise<{
101
104
  result: string;
102
105
  }>;
@@ -128,4 +131,41 @@ export declare class CapacitorCalendarWeb extends WebPlugin implements Capacitor
128
131
  requestFullRemindersAccess(): Promise<{
129
132
  result: PermissionState;
130
133
  }>;
134
+ modifyEventWithPrompt(_options: {
135
+ id: string;
136
+ update?: {
137
+ title?: string;
138
+ calendarId?: string;
139
+ location?: string;
140
+ startDate?: number;
141
+ endDate?: number;
142
+ isAllDay?: boolean;
143
+ alertOffsetInMinutes?: number | number[];
144
+ url?: string;
145
+ notes?: string;
146
+ };
147
+ }): Promise<{
148
+ result: string[];
149
+ }>;
150
+ modifyEvent(_options: {
151
+ id: string;
152
+ span?: EventSpan;
153
+ update: {
154
+ title?: string;
155
+ calendarId?: string;
156
+ location?: string;
157
+ startDate?: number;
158
+ endDate?: number;
159
+ isAllDay?: boolean;
160
+ alertOffsetInMinutes?: number | number[];
161
+ url?: string;
162
+ notes?: string;
163
+ };
164
+ }): Promise<void>;
165
+ fetchAllCalendarSources(): Promise<{
166
+ result: CalendarSource[];
167
+ }>;
168
+ fetchAllRemindersSources(): Promise<{
169
+ result: CalendarSource[];
170
+ }>;
131
171
  }
package/dist/esm/web.js CHANGED
@@ -1,5 +1,4 @@
1
- /* eslint-disable @typescript-eslint/no-unused-vars */
2
- import { WebPlugin } from '@capacitor/core';
1
+ import { WebPlugin } from "@capacitor/core";
3
2
  export class CapacitorCalendarWeb extends WebPlugin {
4
3
  checkPermission(_options) {
5
4
  throw this.unimplemented(`${this.checkPermission.name} is not implemented on the web`);
@@ -73,5 +72,17 @@ export class CapacitorCalendarWeb extends WebPlugin {
73
72
  requestFullRemindersAccess() {
74
73
  throw this.unimplemented(`${this.requestFullRemindersAccess.name} is not implemented on the web`);
75
74
  }
75
+ modifyEventWithPrompt(_options) {
76
+ throw this.unimplemented(`${this.modifyEventWithPrompt.name} is not implemented on the web`);
77
+ }
78
+ modifyEvent(_options) {
79
+ throw this.unimplemented(`${this.modifyEvent.name} is not implemented on the web`);
80
+ }
81
+ fetchAllCalendarSources() {
82
+ throw this.unimplemented(`${this.fetchAllCalendarSources.name} is not implemented on the web`);
83
+ }
84
+ fetchAllRemindersSources() {
85
+ throw this.unimplemented(`${this.fetchAllRemindersSources.name} is not implemented on the web`);
86
+ }
76
87
  }
77
88
  //# sourceMappingURL=web.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,OAAO,EAAmB,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAU7D,MAAM,OAAO,oBAAqB,SAAQ,SAAS;IAC1C,eAAe,CAAC,QAAqC;QAC1D,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,gCAAgC,CAAC,CAAC;IACzF,CAAC;IAEM,mBAAmB;QACxB,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,mBAAmB,CAAC,IAAI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xG,CAAC;IAEM,6BAA6B;QAClC,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,6BAA6B,CAAC,IAAI,gCAAgC,CAAC,CAAC;IACvG,CAAC;IAEM,yBAAyB;QAC9B,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,yBAAyB,CAAC,IAAI,gCAAgC,CAAC,CAAC;IACnG,CAAC;IAEM,0BAA0B;QAC/B,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,0BAA0B,CAAC,IAAI,gCAAgC,CAAC,CAAC;IACpG,CAAC;CACF","sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { PermissionState, WebPlugin } from '@capacitor/core';\nimport { CapacitorCalendarPlugin } from './definitions';\nimport { PluginPermission } from './schemas/enums/plugin-permission';\nimport { ReminderRecurrenceRule } from './schemas/interfaces/reminder-recurrence-rule';\nimport type { Calendar } from './schemas/interfaces/calendar';\nimport type { RemindersList } from './schemas/interfaces/reminders-list';\nimport type { PluginPermissionsMap } from './schemas/interfaces/plugin-permissions-map';\nimport type { CalendarEvent } from './schemas/interfaces/calendar-event';\nimport type { Reminder } from './schemas/interfaces/reminder';\n\nexport class CapacitorCalendarWeb extends WebPlugin implements CapacitorCalendarPlugin {\n public checkPermission(_options: { alias: PluginPermission }): Promise<{ result: PermissionState }> {\n throw this.unimplemented(`${this.checkPermission.name} is not implemented on the web`);\n }\n\n public checkAllPermissions(): Promise<PluginPermissionsMap> {\n throw this.unimplemented(`${this.checkAllPermissions.name} is not implemented on the web`);\n }\n\n public requestPermission(_options: { alias: PluginPermission }): Promise<{ result: PermissionState }> {\n throw this.unimplemented(`${this.requestPermission.name} is not implemented on the web`);\n }\n\n public requestAllPermissions(): Promise<PluginPermissionsMap> {\n throw this.unimplemented(`${this.requestAllPermissions.name} is not implemented on the web`);\n }\n\n public createEventWithPrompt(_options: {\n title: string;\n calendarId?: string;\n location?: string;\n startDate?: number;\n endDate?: number;\n isAllDay?: boolean;\n alertOffsetInMinutes?: number | number[];\n url?: string;\n notes?: string;\n }): Promise<{ result: string[] }> {\n throw this.unimplemented(`${this.createEventWithPrompt.name} is not implemented on the web`);\n }\n\n public selectCalendarsWithPrompt(): Promise<{ result: Calendar[] }> {\n throw this.unimplemented(`${this.selectCalendarsWithPrompt.name} is not implemented on the web`);\n }\n\n public listCalendars(): Promise<{ result: Calendar[] }> {\n throw this.unimplemented(`${this.listCalendars.name} is not implemented on the web`);\n }\n\n public getDefaultCalendar(): Promise<{ result: Calendar | null }> {\n throw this.unimplemented(`${this.getDefaultCalendar.name} is not implemented on the web`);\n }\n\n public createEvent(_options: {\n title: string;\n calendarId?: string;\n location?: string;\n startDate?: number;\n endDate?: number;\n isAllDay?: boolean;\n alertOffsetInMinutes?: number | number[];\n url?: string;\n notes?: string;\n }): Promise<{\n result: string;\n }> {\n throw this.unimplemented(`${this.createEvent.name} is not implemented on the web`);\n }\n\n public createReminder(_options: {\n title: string;\n listId?: string;\n priority?: number;\n isCompleted?: boolean;\n startDate?: number;\n dueDate?: number;\n completionDate?: number;\n notes?: string;\n url?: string;\n location?: string;\n recurrence?: ReminderRecurrenceRule;\n }): Promise<{ result: string }> {\n throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);\n }\n\n public getDefaultRemindersList(): Promise<{ result: RemindersList }> {\n throw this.unimplemented(`${this.getDefaultRemindersList.name} is not implemented on the web`);\n }\n\n public getRemindersLists(): Promise<{ result: RemindersList[] }> {\n throw this.unimplemented(`${this.getRemindersLists.name} is not implemented on the web`);\n }\n\n public openCalendar(_options: { date?: number }): Promise<void> {\n throw this.unimplemented(`${this.openCalendar.name} is not implemented on the web`);\n }\n\n public openReminders(): Promise<void> {\n throw this.unimplemented(`${this.openReminders.name} is not implemented on the web`);\n }\n\n public listEventsInRange(_options: { startDate: number; endDate: number }): Promise<{ result: CalendarEvent[] }> {\n throw this.unimplemented(`${this.listEventsInRange.name} is not implemented on the web`);\n }\n\n public deleteEventsById(_options: { ids: string[] }): Promise<{\n result: { deleted: string[]; failed: string[] };\n }> {\n throw this.unimplemented(`${this.deleteEventsById.name} is not implemented on the web`);\n }\n\n public createCalendar(_options: { title: string; color?: string }): Promise<{ result: string }> {\n throw this.unimplemented(`${this.createCalendar.name} is not implemented on the web`);\n }\n\n public deleteCalendar(_options: { id: string }): Promise<void> {\n throw this.unimplemented(`${this.deleteCalendar.name} is not implemented on the web`);\n }\n\n public getRemindersFromLists(_options?: { listIds: string[] }): Promise<{ result: Reminder[] }> {\n throw this.unimplemented(`${this.getRemindersFromLists.name} is not implemented on the web`);\n }\n\n public deleteRemindersById(_options: {\n ids: string[];\n }): Promise<{ result: { deleted: string[]; failed: string[] } }> {\n throw this.unimplemented(`${this.deleteRemindersById.name} is not implemented on the web`);\n }\n\n public requestWriteOnlyCalendarAccess(): Promise<{ result: PermissionState }> {\n throw this.unimplemented(`${this.requestWriteOnlyCalendarAccess.name} is not implemented on the web`);\n }\n\n public requestReadOnlyCalendarAccess(): Promise<{ result: PermissionState }> {\n throw this.unimplemented(`${this.requestReadOnlyCalendarAccess.name} is not implemented on the web`);\n }\n\n public requestFullCalendarAccess(): Promise<{ result: PermissionState }> {\n throw this.unimplemented(`${this.requestFullCalendarAccess.name} is not implemented on the web`);\n }\n\n public requestFullRemindersAccess(): Promise<{ result: PermissionState }> {\n throw this.unimplemented(`${this.requestFullRemindersAccess.name} is not implemented on the web`);\n }\n}\n"]}
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAY7D,MAAM,OAAO,oBACX,SAAQ,SAAS;IAGV,eAAe,CAAC,QAEtB;QACC,MAAM,IAAI,CAAC,aAAa,CACtB,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,gCAAgC,CAC7D,CAAC;IACJ,CAAC;IAEM,mBAAmB;QACxB,MAAM,IAAI,CAAC,aAAa,CACtB,GA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AI,gCAAgC,CAC5E,CAAC;IACJ,CAAC;IAEM,6BAA6B;QAClC,MAAM,IAAI,CAAC,aAAa,CACtB,GAAG,IAAI,CAAC,6BAA6B,CAAC,IAAI,gCAAgC,CAC3E,CAAC;IACJ,CAAC;IAEM,yBAAyB;QAC9B,MAAM,IAAI,CAAC,aAAa,CACtB,GAAG,IAAI,CAAC,yBAAyB,CAAC,IAAI,gCAAgC,CACvE,CAAC;IACJ,CAAC;IAEM,0BAA0B;QAC/B,MAAM,IAAI,CAAC,aAAa,CACtB,GAAG,IAAI,CAAC,0BAA0B,CAAC,IAAI,gCAAgC,CACxE,CAAC;IACJ,CAAC;IAEM,qBAAqB,CAAC,QAa5B;QACC,MAAM,IAAI,CAAC,aAAa,CACtB,GAAG,IAAI,CAAC,qBAAqB,CAAC,IAAI,gCAAgC,CACnE,CAAC;IACJ,CAAC;IAEM,WAAW,CAAC,QAclB;QACC,MAAM,IAAI,CAAC,aAAa,CACtB,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,gCAAgC,CACzD,CAAC;IACJ,CAAC;IAEM,uBAAuB;QAC5B,MAAM,IAAI,CAAC,aAAa,CACtB,GAAG,IAAI,CAAC,uBAAuB,CAAC,IAAI,gCAAgC,CACrE,CAAC;IACJ,CAAC;IAEM,wBAAwB;QAC7B,MAAM,IAAI,CAAC,aAAa,CACtB,GAAG,IAAI,CAAC,wBAAwB,CAAC,IAAI,gCAAgC,CACtE,CAAC;IACJ,CAAC;CACF","sourcesContent":["import { PermissionState, WebPlugin } from \"@capacitor/core\";\nimport { CapacitorCalendarPlugin } from \"./definitions\";\nimport { PluginPermission } from \"./schemas/enums/plugin-permission\";\nimport { ReminderRecurrenceRule } from \"./schemas/interfaces/reminder-recurrence-rule\";\nimport { EventSpan } from \"./schemas/enums/event-span\";\nimport type { Calendar } from \"./schemas/interfaces/calendar\";\nimport type { RemindersList } from \"./schemas/interfaces/reminders-list\";\nimport type { PluginPermissionsMap } from \"./schemas/interfaces/plugin-permissions-map\";\nimport type { CalendarEvent } from \"./schemas/interfaces/calendar-event\";\nimport type { Reminder } from \"./schemas/interfaces/reminder\";\nimport type { CalendarSource } from \"./schemas/interfaces/calendar-source\";\n\nexport class CapacitorCalendarWeb\n extends WebPlugin\n implements CapacitorCalendarPlugin\n{\n public checkPermission(_options: {\n alias: PluginPermission;\n }): Promise<{ result: PermissionState }> {\n throw this.unimplemented(\n `${this.checkPermission.name} is not implemented on the web`,\n );\n }\n\n public checkAllPermissions(): Promise<PluginPermissionsMap> {\n throw this.unimplemented(\n `${this.checkAllPermissions.name} is not implemented on the web`,\n );\n }\n\n public requestPermission(_options: {\n alias: PluginPermission;\n }): Promise<{ result: PermissionState }> {\n throw this.unimplemented(\n `${this.requestPermission.name} is not implemented on the web`,\n );\n }\n\n public requestAllPermissions(): Promise<PluginPermissionsMap> {\n throw this.unimplemented(\n `${this.requestAllPermissions.name} is not implemented on the web`,\n );\n }\n\n public createEventWithPrompt(_options: {\n title: string;\n calendarId?: string;\n location?: string;\n startDate?: number;\n endDate?: number;\n isAllDay?: boolean;\n alertOffsetInMinutes?: number | number[];\n url?: string;\n notes?: string;\n }): Promise<{ result: string[] }> {\n throw this.unimplemented(\n `${this.createEventWithPrompt.name} is not implemented on the web`,\n );\n }\n\n public selectCalendarsWithPrompt(): Promise<{ result: Calendar[] }> {\n throw this.unimplemented(\n `${this.selectCalendarsWithPrompt.name} is not implemented on the web`,\n );\n }\n\n public listCalendars(): Promise<{ result: Calendar[] }> {\n throw this.unimplemented(\n `${this.listCalendars.name} is not implemented on the web`,\n );\n }\n\n public getDefaultCalendar(): Promise<{ result: Calendar | null }> {\n throw this.unimplemented(\n `${this.getDefaultCalendar.name} is not implemented on the web`,\n );\n }\n\n public createEvent(_options: {\n title: string;\n calendarId?: string;\n location?: string;\n startDate?: number;\n endDate?: number;\n isAllDay?: boolean;\n alertOffsetInMinutes?: number | number[];\n url?: string;\n notes?: string;\n }): Promise<{\n result: string;\n }> {\n throw this.unimplemented(\n `${this.createEvent.name} is not implemented on the web`,\n );\n }\n\n public createReminder(_options: {\n title: string;\n listId?: string;\n priority?: number;\n isCompleted?: boolean;\n startDate?: number;\n dueDate?: number;\n completionDate?: number;\n notes?: string;\n url?: string;\n location?: string;\n recurrence?: ReminderRecurrenceRule;\n }): Promise<{ result: string }> {\n throw this.unimplemented(\n `${this.createReminder.name} is not implemented on the web`,\n );\n }\n\n public getDefaultRemindersList(): Promise<{ result: RemindersList }> {\n throw this.unimplemented(\n `${this.getDefaultRemindersList.name} is not implemented on the web`,\n );\n }\n\n public getRemindersLists(): Promise<{ result: RemindersList[] }> {\n throw this.unimplemented(\n `${this.getRemindersLists.name} is not implemented on the web`,\n );\n }\n\n public openCalendar(_options: { date?: number }): Promise<void> {\n throw this.unimplemented(\n `${this.openCalendar.name} is not implemented on the web`,\n );\n }\n\n public openReminders(): Promise<void> {\n throw this.unimplemented(\n `${this.openReminders.name} is not implemented on the web`,\n );\n }\n\n public listEventsInRange(_options: {\n startDate: number;\n endDate: number;\n }): Promise<{ result: CalendarEvent[] }> {\n throw this.unimplemented(\n `${this.listEventsInRange.name} is not implemented on the web`,\n );\n }\n\n public deleteEventsById(_options: { ids: string[] }): Promise<{\n result: { deleted: string[]; failed: string[] };\n }> {\n throw this.unimplemented(\n `${this.deleteEventsById.name} is not implemented on the web`,\n );\n }\n\n public createCalendar(_options: {\n title: string;\n color?: string;\n sourceId?: string;\n }): Promise<{ result: string }> {\n throw this.unimplemented(\n `${this.createCalendar.name} is not implemented on the web`,\n );\n }\n\n public deleteCalendar(_options: { id: string }): Promise<void> {\n throw this.unimplemented(\n `${this.deleteCalendar.name} is not implemented on the web`,\n );\n }\n\n public getRemindersFromLists(_options?: {\n listIds: string[];\n }): Promise<{ result: Reminder[] }> {\n throw this.unimplemented(\n `${this.getRemindersFromLists.name} is not implemented on the web`,\n );\n }\n\n public deleteRemindersById(_options: {\n ids: string[];\n }): Promise<{ result: { deleted: string[]; failed: string[] } }> {\n throw this.unimplemented(\n `${this.deleteRemindersById.name} is not implemented on the web`,\n );\n }\n\n public requestWriteOnlyCalendarAccess(): Promise<{\n result: PermissionState;\n }> {\n throw this.unimplemented(\n `${this.requestWriteOnlyCalendarAccess.name} is not implemented on the web`,\n );\n }\n\n public requestReadOnlyCalendarAccess(): Promise<{ result: PermissionState }> {\n throw this.unimplemented(\n `${this.requestReadOnlyCalendarAccess.name} is not implemented on the web`,\n );\n }\n\n public requestFullCalendarAccess(): Promise<{ result: PermissionState }> {\n throw this.unimplemented(\n `${this.requestFullCalendarAccess.name} is not implemented on the web`,\n );\n }\n\n public requestFullRemindersAccess(): Promise<{ result: PermissionState }> {\n throw this.unimplemented(\n `${this.requestFullRemindersAccess.name} is not implemented on the web`,\n );\n }\n\n public modifyEventWithPrompt(_options: {\n id: string;\n update?: {\n title?: string;\n calendarId?: string;\n location?: string;\n startDate?: number;\n endDate?: number;\n isAllDay?: boolean;\n alertOffsetInMinutes?: number | number[];\n url?: string;\n notes?: string;\n };\n }): Promise<{ result: string[] }> {\n throw this.unimplemented(\n `${this.modifyEventWithPrompt.name} is not implemented on the web`,\n );\n }\n\n public modifyEvent(_options: {\n id: string;\n span?: EventSpan;\n update: {\n title?: string;\n calendarId?: string;\n location?: string;\n startDate?: number;\n endDate?: number;\n isAllDay?: boolean;\n alertOffsetInMinutes?: number | number[];\n url?: string;\n notes?: string;\n };\n }): Promise<void> {\n throw this.unimplemented(\n `${this.modifyEvent.name} is not implemented on the web`,\n );\n }\n\n public fetchAllCalendarSources(): Promise<{ result: CalendarSource[] }> {\n throw this.unimplemented(\n `${this.fetchAllCalendarSources.name} is not implemented on the web`,\n );\n }\n\n public fetchAllRemindersSources(): Promise<{ result: CalendarSource[] }> {\n throw this.unimplemented(\n `${this.fetchAllRemindersSources.name} is not implemented on the web`,\n );\n }\n}\n"]}
@@ -124,11 +124,98 @@ exports.ReminderRecurrenceFrequency = void 0;
124
124
  ReminderRecurrenceFrequency[ReminderRecurrenceFrequency["YEARLY"] = 3] = "YEARLY";
125
125
  })(exports.ReminderRecurrenceFrequency || (exports.ReminderRecurrenceFrequency = {}));
126
126
 
127
- const CapacitorCalendar = core.registerPlugin('CapacitorCalendar', {
127
+ /**
128
+ * Enum representing the span of modifications.
129
+ *
130
+ * @enum EventSpan
131
+ * @platform iOS
132
+ */
133
+ exports.EventSpan = void 0;
134
+ (function (EventSpan) {
135
+ /**
136
+ * The modifications should only be applied to this event.
137
+ */
138
+ EventSpan[EventSpan["THIS_EVENT"] = 0] = "THIS_EVENT";
139
+ /**
140
+ * The modifications to this event should also be applied to the future instances of this event.
141
+ */
142
+ EventSpan[EventSpan["THIS_AND_FUTURE_EVENTS"] = 1] = "THIS_AND_FUTURE_EVENTS";
143
+ })(exports.EventSpan || (exports.EventSpan = {}));
144
+
145
+ /**
146
+ * Represents the different types of sources from which calendars can originate.
147
+ *
148
+ * @enum CalendarSourceType
149
+ * @platform iOS
150
+ */
151
+ exports.CalendarSourceType = void 0;
152
+ (function (CalendarSourceType) {
153
+ /**
154
+ * Calendars that are stored locally on the device. These calendars are not
155
+ * synced with any external service.
156
+ */
157
+ CalendarSourceType[CalendarSourceType["LOCAL"] = 0] = "LOCAL";
158
+ /**
159
+ * Calendars that are associated with an Exchange server. Exchange is a
160
+ * popular calendar and email service used by many enterprises.
161
+ */
162
+ CalendarSourceType[CalendarSourceType["EXCHANGE"] = 1] = "EXCHANGE";
163
+ /**
164
+ * Calendars that use the CalDAV protocol for synchronization.
165
+ * This includes calendars from services like Google Calendar and Yahoo Calendar.
166
+ */
167
+ CalendarSourceType[CalendarSourceType["CAL_DAV"] = 2] = "CAL_DAV";
168
+ /**
169
+ * Calendars that were previously associated with MobileMe, Apple's cloud
170
+ * service before iCloud. This source type is largely obsolete now.
171
+ */
172
+ CalendarSourceType[CalendarSourceType["MOBILE_ME"] = 3] = "MOBILE_ME";
173
+ /**
174
+ * Calendars that the user has subscribed to. These are read-only calendars
175
+ * that can be added by subscribing to a calendar URL.
176
+ */
177
+ CalendarSourceType[CalendarSourceType["SUBSCRIBED"] = 4] = "SUBSCRIBED";
178
+ /**
179
+ * The built-in Birthdays calendar, which shows birthdays of contacts from the user's address book.
180
+ * This calendar is typically read-only and is managed by the system.
181
+ */
182
+ CalendarSourceType[CalendarSourceType["BIRTHDAYS"] = 5] = "BIRTHDAYS";
183
+ })(exports.CalendarSourceType || (exports.CalendarSourceType = {}));
184
+
185
+ /**
186
+ * An enum representing the type of calendar.
187
+ *
188
+ * @enum CalendarType
189
+ * @platform iOS
190
+ */
191
+ exports.CalendarType = void 0;
192
+ (function (CalendarType) {
193
+ /**
194
+ * This calendar is sync'd from either Mobile Me or tethered.
195
+ */
196
+ CalendarType[CalendarType["LOCAL"] = 0] = "LOCAL";
197
+ /**
198
+ * This calendar is from a CalDAV server.
199
+ */
200
+ CalendarType[CalendarType["CAL_DAV"] = 1] = "CAL_DAV";
201
+ /**
202
+ * This calendar comes from an Exchange server.
203
+ */
204
+ CalendarType[CalendarType["EXCHANGE"] = 2] = "EXCHANGE";
205
+ /**
206
+ * This is a locally subscribed calendar.
207
+ */
208
+ CalendarType[CalendarType["SUBSCRIPTION"] = 3] = "SUBSCRIPTION";
209
+ /**
210
+ * This is the built-in birthday calendar.
211
+ */
212
+ CalendarType[CalendarType["BIRTHDAY"] = 4] = "BIRTHDAY";
213
+ })(exports.CalendarType || (exports.CalendarType = {}));
214
+
215
+ const CapacitorCalendar = core.registerPlugin("CapacitorCalendar", {
128
216
  web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.CapacitorCalendarWeb()),
129
217
  });
130
218
 
131
- /* eslint-disable @typescript-eslint/no-unused-vars */
132
219
  class CapacitorCalendarWeb extends core.WebPlugin {
133
220
  checkPermission(_options) {
134
221
  throw this.unimplemented(`${this.checkPermission.name} is not implemented on the web`);
@@ -202,6 +289,18 @@ class CapacitorCalendarWeb extends core.WebPlugin {
202
289
  requestFullRemindersAccess() {
203
290
  throw this.unimplemented(`${this.requestFullRemindersAccess.name} is not implemented on the web`);
204
291
  }
292
+ modifyEventWithPrompt(_options) {
293
+ throw this.unimplemented(`${this.modifyEventWithPrompt.name} is not implemented on the web`);
294
+ }
295
+ modifyEvent(_options) {
296
+ throw this.unimplemented(`${this.modifyEvent.name} is not implemented on the web`);
297
+ }
298
+ fetchAllCalendarSources() {
299
+ throw this.unimplemented(`${this.fetchAllCalendarSources.name} is not implemented on the web`);
300
+ }
301
+ fetchAllRemindersSources() {
302
+ throw this.unimplemented(`${this.fetchAllRemindersSources.name} is not implemented on the web`);
303
+ }
205
304
  }
206
305
 
207
306
  var web = /*#__PURE__*/Object.freeze({