@ebarooni/capacitor-calendar 7.2.0 → 7.3.0
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/EbarooniCapacitorCalendar.podspec +1 -1
- package/Package.swift +2 -2
- package/README.md +901 -466
- package/android/src/main/java/dev/barooni/capacitor/calendar/CapacitorCalendarPlugin.kt +57 -7
- package/android/src/main/java/dev/barooni/capacitor/calendar/PluginError.kt +35 -19
- package/android/src/main/java/dev/barooni/capacitor/calendar/implementation/CapacitorCalendar.kt +312 -85
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/data/CalendarEvent.kt +4 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/data/EventDeleteInfo.kt +8 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/data/EventRecurrenceRule.kt +135 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/enums/EventSpan.kt +13 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/CheckPermissionInput.kt +0 -4
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/CreateCalendarInput.kt +3 -1
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/CreateEventInput.kt +1 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/CreateEventWithPromptInput.kt +5 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/DeleteCalendarInput.kt +4 -1
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/DeleteEventInput.kt +4 -1
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/DeleteEventWithPromptInput.kt +4 -1
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/DeleteEventsByIdInput.kt +2 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/GetDefaultCalendarInput.kt +9 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/ModifyCalendarInput.kt +10 -1
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/ModifyEvent.kt +3 -1
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/ModifyEventWithPromptInput.kt +3 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/RequestPermissionInput.kt +3 -5
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/results/CheckAllPermissionsResult.kt +3 -2
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/results/CreateEventResult.kt +1 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/results/CreateEventWithPromptResult.kt +1 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/results/GetDefaultCalendarResult.kt +1 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/results/ListCalendarsResult.kt +1 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/results/ListEventsInRangeResult.kt +4 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/results/RequestAllPermissionsResult.kt +1 -1
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/templates/PluginCompletion.kt +8 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/utils/ImplementationHelper.kt +468 -39
- package/dist/docs.json +3046 -1048
- package/dist/esm/definitions.d.ts +5 -5
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/index.d.ts +71 -48
- package/dist/esm/index.js +17 -17
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/schemas/enums/attendee-role.js.map +1 -1
- package/dist/esm/schemas/enums/attendee-status.js.map +1 -1
- package/dist/esm/schemas/enums/attendee-type.js.map +1 -1
- package/dist/esm/schemas/enums/calendar-permission-scope.d.ts +9 -1
- package/dist/esm/schemas/enums/calendar-permission-scope.js +9 -1
- package/dist/esm/schemas/enums/calendar-permission-scope.js.map +1 -1
- package/dist/esm/schemas/enums/event-span.d.ts +4 -0
- package/dist/esm/schemas/enums/event-span.js +4 -0
- package/dist/esm/schemas/enums/event-span.js.map +1 -1
- package/dist/esm/schemas/enums/event-status.js.map +1 -1
- package/dist/esm/schemas/enums/reminder-recurrence-frequency.d.ts +5 -5
- package/dist/esm/schemas/enums/reminder-recurrence-frequency.js +5 -5
- package/dist/esm/schemas/enums/reminder-recurrence-frequency.js.map +1 -1
- package/dist/esm/schemas/interfaces/calendar-event.d.ts +145 -70
- package/dist/esm/schemas/interfaces/calendar-event.js.map +1 -1
- package/dist/esm/schemas/interfaces/calendar-source.d.ts +4 -1
- package/dist/esm/schemas/interfaces/calendar-source.js.map +1 -1
- package/dist/esm/schemas/interfaces/calendar.d.ts +22 -4
- package/dist/esm/schemas/interfaces/calendar.js.map +1 -1
- package/dist/esm/schemas/interfaces/check-permission-options.d.ts +19 -0
- package/dist/esm/schemas/interfaces/check-permission-options.js +2 -0
- package/dist/esm/schemas/interfaces/check-permission-options.js.map +1 -0
- package/dist/esm/schemas/interfaces/create-calendar-options.d.ts +19 -6
- package/dist/esm/schemas/interfaces/create-calendar-options.js.map +1 -1
- package/dist/esm/schemas/interfaces/create-calendar-result.d.ts +12 -0
- package/dist/esm/schemas/interfaces/create-calendar-result.js +2 -0
- package/dist/esm/schemas/interfaces/create-calendar-result.js.map +1 -0
- package/dist/esm/schemas/interfaces/create-event-options.d.ts +86 -51
- package/dist/esm/schemas/interfaces/create-event-options.js.map +1 -1
- package/dist/esm/schemas/interfaces/create-event-result.d.ts +22 -0
- package/dist/esm/schemas/interfaces/create-event-result.js +2 -0
- package/dist/esm/schemas/interfaces/create-event-result.js.map +1 -0
- package/dist/esm/schemas/interfaces/create-event-with-prompt-options.d.ts +73 -36
- package/dist/esm/schemas/interfaces/create-event-with-prompt-options.js.map +1 -1
- package/dist/esm/schemas/interfaces/create-event-with-prompt-result.d.ts +23 -0
- package/dist/esm/schemas/interfaces/create-event-with-prompt-result.js +2 -0
- package/dist/esm/schemas/interfaces/create-event-with-prompt-result.js.map +1 -0
- package/dist/esm/schemas/interfaces/create-reminder-options.d.ts +42 -12
- package/dist/esm/schemas/interfaces/create-reminder-options.js.map +1 -1
- package/dist/esm/schemas/interfaces/create-reminder-result.d.ts +12 -0
- package/dist/esm/schemas/interfaces/create-reminder-result.js +2 -0
- package/dist/esm/schemas/interfaces/create-reminder-result.js.map +1 -0
- package/dist/esm/schemas/interfaces/create-reminders-list-options.d.ts +46 -0
- package/dist/esm/schemas/interfaces/create-reminders-list-options.js +2 -0
- package/dist/esm/schemas/interfaces/create-reminders-list-options.js.map +1 -0
- package/dist/esm/schemas/interfaces/create-reminders-list-result.d.ts +12 -0
- package/dist/esm/schemas/interfaces/create-reminders-list-result.js +2 -0
- package/dist/esm/schemas/interfaces/create-reminders-list-result.js.map +1 -0
- package/dist/esm/schemas/interfaces/delete-calendar-options.d.ts +1 -0
- package/dist/esm/schemas/interfaces/delete-calendar-options.js.map +1 -1
- package/dist/esm/schemas/interfaces/delete-event-options.d.ts +29 -4
- package/dist/esm/schemas/interfaces/delete-event-options.js.map +1 -1
- package/dist/esm/schemas/interfaces/delete-event-with-prompt-options.d.ts +39 -14
- package/dist/esm/schemas/interfaces/delete-event-with-prompt-options.js.map +1 -1
- package/dist/esm/schemas/interfaces/delete-events-by-id-options.d.ts +16 -4
- package/dist/esm/schemas/interfaces/delete-events-by-id-options.js.map +1 -1
- package/dist/esm/schemas/interfaces/delete-reminder-options.d.ts +10 -0
- package/dist/esm/schemas/interfaces/delete-reminder-options.js.map +1 -1
- package/dist/esm/schemas/interfaces/delete-reminder-with-prompt-result.d.ts +12 -0
- package/dist/esm/schemas/interfaces/delete-reminder-with-prompt-result.js +2 -0
- package/dist/esm/schemas/interfaces/delete-reminder-with-prompt-result.js.map +1 -0
- package/dist/esm/schemas/interfaces/delete-reminders-by-id-result.d.ts +13 -0
- package/dist/esm/schemas/interfaces/delete-reminders-by-id-result.js +2 -0
- package/dist/esm/schemas/interfaces/delete-reminders-by-id-result.js.map +1 -0
- package/dist/esm/schemas/interfaces/delete-reminders-list-options.d.ts +23 -0
- package/dist/esm/schemas/interfaces/delete-reminders-list-options.js +2 -0
- package/dist/esm/schemas/interfaces/delete-reminders-list-options.js.map +1 -0
- package/dist/esm/schemas/interfaces/event-recurrence-rule.d.ts +96 -0
- package/dist/esm/schemas/interfaces/event-recurrence-rule.js +2 -0
- package/dist/esm/schemas/interfaces/event-recurrence-rule.js.map +1 -0
- package/dist/esm/schemas/interfaces/fetch-all-calendar-sources-result.d.ts +13 -0
- package/dist/esm/schemas/interfaces/fetch-all-calendar-sources-result.js +2 -0
- package/dist/esm/schemas/interfaces/fetch-all-calendar-sources-result.js.map +1 -0
- package/dist/esm/schemas/interfaces/get-default-calendar-options.d.ts +13 -0
- package/dist/esm/schemas/interfaces/get-default-calendar-options.js +2 -0
- package/dist/esm/schemas/interfaces/get-default-calendar-options.js.map +1 -0
- package/dist/esm/schemas/interfaces/get-default-reminders-list-result.d.ts +13 -0
- package/dist/esm/schemas/interfaces/get-default-reminders-list-result.js +2 -0
- package/dist/esm/schemas/interfaces/get-default-reminders-list-result.js.map +1 -0
- package/dist/esm/schemas/interfaces/get-reminder-by-id-result.d.ts +13 -0
- package/dist/esm/schemas/interfaces/get-reminder-by-id-result.js +2 -0
- package/dist/esm/schemas/interfaces/get-reminder-by-id-result.js.map +1 -0
- package/dist/esm/schemas/interfaces/get-reminders-from-lists-result.d.ts +13 -0
- package/dist/esm/schemas/interfaces/get-reminders-from-lists-result.js +2 -0
- package/dist/esm/schemas/interfaces/get-reminders-from-lists-result.js.map +1 -0
- package/dist/esm/schemas/interfaces/get-reminders-lists-result.d.ts +13 -0
- package/dist/esm/schemas/interfaces/get-reminders-lists-result.js +2 -0
- package/dist/esm/schemas/interfaces/get-reminders-lists-result.js.map +1 -0
- package/dist/esm/schemas/interfaces/list-calendars-result.d.ts +13 -0
- package/dist/esm/schemas/interfaces/list-calendars-result.js +2 -0
- package/dist/esm/schemas/interfaces/list-calendars-result.js.map +1 -0
- package/dist/esm/schemas/interfaces/list-events-in-range-options.d.ts +7 -2
- package/dist/esm/schemas/interfaces/list-events-in-range-options.js.map +1 -1
- package/dist/esm/schemas/interfaces/list-events-in-range-result.d.ts +13 -0
- package/dist/esm/schemas/interfaces/list-events-in-range-result.js +2 -0
- package/dist/esm/schemas/interfaces/list-events-in-range-result.js.map +1 -0
- package/dist/esm/schemas/interfaces/modify-calendar-options.d.ts +13 -2
- package/dist/esm/schemas/interfaces/modify-calendar-options.js.map +1 -1
- package/dist/esm/schemas/interfaces/modify-event-options.d.ts +61 -44
- package/dist/esm/schemas/interfaces/modify-event-options.js.map +1 -1
- package/dist/esm/schemas/interfaces/modify-event-with-prompt-options.d.ts +77 -2
- package/dist/esm/schemas/interfaces/modify-event-with-prompt-options.js.map +1 -1
- package/dist/esm/schemas/interfaces/modify-reminder-options.d.ts +77 -13
- package/dist/esm/schemas/interfaces/modify-reminder-options.js.map +1 -1
- package/dist/esm/schemas/interfaces/open-calendar-options.d.ts +5 -1
- package/dist/esm/schemas/interfaces/open-calendar-options.js.map +1 -1
- package/dist/esm/schemas/interfaces/recurrence-rule.d.ts +8 -2
- package/dist/esm/schemas/interfaces/recurrence-rule.js.map +1 -1
- package/dist/esm/schemas/interfaces/reminder-recurrence-rule.d.ts +1 -1
- package/dist/esm/schemas/interfaces/reminder-recurrence-rule.js.map +1 -1
- package/dist/esm/schemas/interfaces/reminder.d.ts +4 -1
- package/dist/esm/schemas/interfaces/reminder.js.map +1 -1
- package/dist/esm/schemas/interfaces/reminders-list.d.ts +8 -2
- package/dist/esm/schemas/interfaces/reminders-list.js.map +1 -1
- package/dist/esm/schemas/interfaces/request-permission-options.d.ts +16 -0
- package/dist/esm/schemas/interfaces/request-permission-options.js +2 -0
- package/dist/esm/schemas/interfaces/request-permission-options.js.map +1 -0
- package/dist/esm/schemas/interfaces/select-calendars-with-prompt-options.d.ts +1 -1
- package/dist/esm/schemas/interfaces/select-calendars-with-prompt-options.js.map +1 -1
- package/dist/esm/schemas/interfaces/select-calendars-with-prompt-result.d.ts +14 -0
- package/dist/esm/schemas/interfaces/select-calendars-with-prompt-result.js +2 -0
- package/dist/esm/schemas/interfaces/select-calendars-with-prompt-result.js.map +1 -0
- package/dist/esm/schemas/interfaces/update-reminders-list-options.d.ts +43 -0
- package/dist/esm/schemas/interfaces/update-reminders-list-options.js +2 -0
- package/dist/esm/schemas/interfaces/update-reminders-list-options.js.map +1 -0
- package/dist/esm/schemas/interfaces/update-reminders-list-result.d.ts +12 -0
- package/dist/esm/schemas/interfaces/update-reminders-list-result.js +2 -0
- package/dist/esm/schemas/interfaces/update-reminders-list-result.js.map +1 -0
- package/dist/esm/schemas/types/event-edit-action.d.ts +1 -1
- package/dist/esm/schemas/types/event-edit-action.js.map +1 -1
- package/dist/esm/schemas/types/recurrence-frequency.d.ts +4 -0
- package/dist/esm/schemas/types/recurrence-frequency.js +2 -0
- package/dist/esm/schemas/types/recurrence-frequency.js.map +1 -0
- package/dist/esm/schemas/types/system-color-name.d.ts +6 -0
- package/dist/esm/schemas/types/system-color-name.js +2 -0
- package/dist/esm/schemas/types/system-color-name.js.map +1 -0
- package/dist/esm/sub-definitions/calendar-access.d.ts +26 -14
- package/dist/esm/sub-definitions/calendar-access.js.map +1 -1
- package/dist/esm/sub-definitions/calendar-operations.d.ts +68 -21
- package/dist/esm/sub-definitions/calendar-operations.js.map +1 -1
- package/dist/esm/sub-definitions/event-operations.d.ts +46 -25
- package/dist/esm/sub-definitions/event-operations.js.map +1 -1
- package/dist/esm/sub-definitions/reminders-access.d.ts +6 -2
- package/dist/esm/sub-definitions/reminders-access.js.map +1 -1
- package/dist/esm/sub-definitions/reminders-operations.d.ts +78 -43
- package/dist/esm/sub-definitions/reminders-operations.js.map +1 -1
- package/dist/esm/web/download-ics-file.d.ts +18 -0
- package/dist/esm/web/download-ics-file.js +33 -0
- package/dist/esm/web/download-ics-file.js.map +1 -0
- package/dist/esm/web/ics.d.ts +27 -0
- package/dist/esm/web/ics.js +294 -0
- package/dist/esm/web/ics.js.map +1 -0
- package/dist/esm/web.d.ts +70 -82
- package/dist/esm/web.js +121 -6
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +464 -35
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +464 -35
- package/dist/plugin.js.map +1 -1
- package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/CapacitorCalendarPlugin.swift +148 -81
- package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Implementation/CapacitorCalendar.swift +203 -110
- package/ios/Plugin/Info.plist +24 -0
- package/ios/Plugin/Models/Enums/EventSpan.swift +8 -0
- package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/CreateCalendarInput.swift +6 -4
- package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/CreateEventInput.swift +25 -21
- package/ios/Plugin/Models/Inputs/CreateEventWithPromptInput.swift +171 -0
- package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/CreateReminderInput.swift +14 -4
- package/ios/Plugin/Models/Inputs/CreateRemindersListInput.swift +43 -0
- package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/DeleteCalendarInput.swift +1 -1
- package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/DeleteEventInput.swift +9 -4
- package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/DeleteEventWithPromptInput.swift +9 -4
- package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/DeleteEventsByIdInput.swift +9 -4
- package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/DeleteReminderInput.swift +7 -1
- package/ios/Plugin/Models/Inputs/DeleteRemindersListInput.swift +22 -0
- package/ios/Plugin/Models/Inputs/GetDefaultCalendarInput.swift +13 -0
- package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/ModifyCalendarInput.swift +6 -3
- package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/ModifyEventInput.swift +63 -41
- package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/ModifyReminderInput.swift +66 -5
- package/ios/Plugin/Models/Inputs/UpdateRemindersListInput.swift +41 -0
- package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Results/CreateEventResult.swift +1 -0
- package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Results/CreateEventWithPromptResult.swift +1 -0
- package/ios/Plugin/Models/Results/CreateRemindersListResult.swift +15 -0
- package/ios/Plugin/Models/Results/ListEventsInRangeResult.swift +29 -0
- package/ios/Plugin/Models/Results/UpdateRemindersListResult.swift +15 -0
- package/ios/Plugin/Models/Structs/RecurrenceInput.swift +41 -0
- package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/PluginConfig.swift +30 -27
- package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/PluginError.swift +74 -56
- package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Utils/ImplementationHelper.swift +140 -24
- package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Utils/UIColorFromHexExtension.swift +5 -0
- package/package.json +36 -43
- package/dist/esm/schemas/enums/recurrence-frequency.d.ts +0 -21
- package/dist/esm/schemas/enums/recurrence-frequency.js +0 -23
- package/dist/esm/schemas/enums/recurrence-frequency.js.map +0 -1
- package/ios/Sources/CapacitorCalendarPlugin/Models/Inputs/CreateEventWithPromptInput.swift +0 -89
- package/ios/Sources/CapacitorCalendarPlugin/Models/Results/ListEventsInRangeResult.swift +0 -16
- package/ios/Tests/CapacitorCalendarPluginTests/CapacitorCalendarPluginTests.swift +0 -15
- /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Enums/CAPPermissionState.swift +0 -0
- /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Enums/CalendarPermissionScope.swift +0 -0
- /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Enums/EventEditAction.swift +0 -0
- /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/CheckPermissionInput.swift +0 -0
- /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/DeleteReminderWithPromptInput.swift +0 -0
- /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/DeleteRemindersByIdInput.swift +0 -0
- /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/GetReminderByIdInput.swift +0 -0
- /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/GetRemindersFromListsInput.swift +0 -0
- /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/ListEventsInRangeInput.swift +0 -0
- /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/ModifyEventWithPromptInput.swift +0 -0
- /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/OpenCalendarInput.swift +0 -0
- /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/RequestPermissionInput.swift +0 -0
- /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/SelectCalendarsWithPromptInput.swift +0 -0
- /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Results/CheckAllPermissionsResult.swift +0 -0
- /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Results/CheckPermissionResult.swift +0 -0
- /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Results/CreateCalendarResult.swift +0 -0
- /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Results/CreateReminderResult.swift +0 -0
- /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Results/DeleteEventWithPromptResult.swift +0 -0
- /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Results/DeleteEventsByIdResult.swift +0 -0
- /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Results/DeleteRemindersByIdResult.swift +0 -0
- /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Results/FetchAllCalendarSourcesResult.swift +0 -0
- /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Results/GetDefaultCalendarResult.swift +0 -0
- /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Results/GetReminderByIdResult.swift +0 -0
- /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Results/GetRemindersFromListsResult.swift +0 -0
- /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Results/ListCalendarsResult.swift +0 -0
- /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Results/ModifyEventWithPromptResult.swift +0 -0
- /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Results/RequestAllPermissionsResult.swift +0 -0
- /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Results/RequestPermissionResult.swift +0 -0
- /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Results/SelectCalendarsWithPromptResult.swift +0 -0
- /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Templates/JSResult.swift +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Calendar } from './calendar';
|
|
2
|
+
/**
|
|
3
|
+
* @since 7.3.0
|
|
4
|
+
*/
|
|
5
|
+
export interface SelectCalendarsWithPromptResult {
|
|
6
|
+
/**
|
|
7
|
+
* Calendars the user confirmed in the chooser.
|
|
8
|
+
* Empty when the user cancels.
|
|
9
|
+
*
|
|
10
|
+
* @platform iOS
|
|
11
|
+
* @since 7.3.0
|
|
12
|
+
*/
|
|
13
|
+
result: Calendar[];
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-calendars-with-prompt-result.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/select-calendars-with-prompt-result.ts"],"names":[],"mappings":"","sourcesContent":["import type { Calendar } from './calendar';\n\n/**\n * @since 7.3.0\n */\nexport interface SelectCalendarsWithPromptResult {\n /**\n * Calendars the user confirmed in the chooser.\n * Empty when the user cancels.\n *\n * @platform iOS\n * @since 7.3.0\n */\n result: Calendar[];\n}\n"]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { SystemColorName } from '../types/system-color-name';
|
|
2
|
+
/**
|
|
3
|
+
* @since 7.3.0
|
|
4
|
+
*/
|
|
5
|
+
export interface UpdateRemindersListOptions {
|
|
6
|
+
/**
|
|
7
|
+
* Named color (`blue`, …) or hex `#RRGGBB` / `#RRGGBBAA`.
|
|
8
|
+
* If omitted, the color is left unchanged.
|
|
9
|
+
*
|
|
10
|
+
* @example 'indigo'
|
|
11
|
+
* @example #007AFF
|
|
12
|
+
* @platform iOS
|
|
13
|
+
* @since 7.3.0
|
|
14
|
+
*/
|
|
15
|
+
color?: SystemColorName | `#${string}`;
|
|
16
|
+
/**
|
|
17
|
+
* Whether to save the update immediately.
|
|
18
|
+
* Pass `false` to batch changes and commit them with `CapacitorCalendar.commit()`.
|
|
19
|
+
*
|
|
20
|
+
* @default true
|
|
21
|
+
* @platform iOS
|
|
22
|
+
* @see {@link CalendarOperations#commit}
|
|
23
|
+
* @since 7.3.0
|
|
24
|
+
*/
|
|
25
|
+
commit?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* The identifier of the list to update.
|
|
28
|
+
*
|
|
29
|
+
* @example 'A1234567-ABCD-EFGH-IJKL-MNOPQRSTUVWX'
|
|
30
|
+
* @platform iOS
|
|
31
|
+
* @since 7.3.0
|
|
32
|
+
*/
|
|
33
|
+
id: string;
|
|
34
|
+
/**
|
|
35
|
+
* The new title of the list.
|
|
36
|
+
* If omitted, the title is left unchanged.
|
|
37
|
+
*
|
|
38
|
+
* @example 'Groceries'
|
|
39
|
+
* @platform iOS
|
|
40
|
+
* @since 7.3.0
|
|
41
|
+
*/
|
|
42
|
+
title?: string;
|
|
43
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-reminders-list-options.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/update-reminders-list-options.ts"],"names":[],"mappings":"","sourcesContent":["import type { SystemColorName } from '../types/system-color-name';\n\n/**\n * @since 7.3.0\n */\nexport interface UpdateRemindersListOptions {\n /**\n * Named color (`blue`, …) or hex `#RRGGBB` / `#RRGGBBAA`.\n * If omitted, the color is left unchanged.\n *\n * @example 'indigo'\n * @example #007AFF\n * @platform iOS\n * @since 7.3.0\n */\n color?: SystemColorName | `#${string}`;\n /**\n * Whether to save the update immediately.\n * Pass `false` to batch changes and commit them with `CapacitorCalendar.commit()`.\n *\n * @default true\n * @platform iOS\n * @see {@link CalendarOperations#commit}\n * @since 7.3.0\n */\n commit?: boolean;\n /**\n * The identifier of the list to update.\n *\n * @example 'A1234567-ABCD-EFGH-IJKL-MNOPQRSTUVWX'\n * @platform iOS\n * @since 7.3.0\n */\n id: string;\n /**\n * The new title of the list.\n * If omitted, the title is left unchanged.\n *\n * @example 'Groceries'\n * @platform iOS\n * @since 7.3.0\n */\n title?: string;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-reminders-list-result.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/update-reminders-list-result.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * @since 7.3.0\n */\nexport interface UpdateRemindersListResult {\n /**\n * Identifier of the updated reminders list.\n *\n * @platform iOS\n * @since 7.3.0\n */\n id: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-edit-action.js","sourceRoot":"","sources":["../../../../src/schemas/types/event-edit-action.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * @since 7.1.0\n */\nexport type EventEditAction =
|
|
1
|
+
{"version":3,"file":"event-edit-action.js","sourceRoot":"","sources":["../../../../src/schemas/types/event-edit-action.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * @since 7.1.0\n */\nexport type EventEditAction = 'canceled' | 'saved' | 'deleted';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recurrence-frequency.js","sourceRoot":"","sources":["../../../../src/schemas/types/recurrence-frequency.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * @since 7.3.0\n */\nexport type RecurrenceFrequency = 'daily' | 'weekly' | 'monthly' | 'yearly';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system-color-name.js","sourceRoot":"","sources":["../../../../src/schemas/types/system-color-name.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Named iOS system color.\n *\n * @since 7.3.0\n */\nexport type SystemColorName =\n | 'blue'\n | 'brown'\n | 'gray'\n | 'green'\n | 'indigo'\n | 'orange'\n | 'pink'\n | 'purple'\n | 'red'\n | 'teal'\n | 'yellow';\n"]}
|
|
@@ -1,26 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type {
|
|
1
|
+
import type { PermissionState } from '@capacitor/core';
|
|
2
|
+
import type { CalendarPermissionScope } from '../schemas/enums/calendar-permission-scope';
|
|
3
|
+
import type { CheckPermissionOptions } from '../schemas/interfaces/check-permission-options';
|
|
4
|
+
import type { RequestPermissionOptions } from '../schemas/interfaces/request-permission-options';
|
|
3
5
|
/**
|
|
4
6
|
* @since 7.1.0
|
|
5
7
|
*/
|
|
6
8
|
export interface CalendarAccess {
|
|
7
9
|
/**
|
|
8
10
|
* Retrieves the current permission state for a given scope.
|
|
11
|
+
* On Android, `readReminders` and `writeReminders` resolve to `"prompt"`.
|
|
9
12
|
*
|
|
10
13
|
* @example
|
|
11
14
|
* CapacitorCalendar.checkPermission({ scope: CalendarPermissionScope.READ_CALENDAR });
|
|
12
15
|
*
|
|
16
|
+
* @throws {Error} `Scope must be provided.` — when `scope` is missing.
|
|
17
|
+
* @throws {Error} `Invalid scope.` — when `scope` is invalid.
|
|
18
|
+
* @throws {Error} `Unhandled permission state.` — when the native status cannot be mapped.
|
|
19
|
+
*
|
|
13
20
|
* @platform Android, iOS
|
|
14
21
|
* @since 0.1.0
|
|
15
|
-
*
|
|
16
22
|
*/
|
|
17
|
-
checkPermission(options: {
|
|
18
|
-
scope: CalendarPermissionScope;
|
|
19
|
-
}): Promise<{
|
|
23
|
+
checkPermission(options: CheckPermissionOptions): Promise<{
|
|
20
24
|
result: PermissionState;
|
|
21
25
|
}>;
|
|
22
26
|
/**
|
|
23
27
|
* Retrieves the current state of all permissions.
|
|
28
|
+
* On Android, reminder keys always resolve to `"prompt"`.
|
|
29
|
+
*
|
|
30
|
+
* @throws {Error} `Unhandled permission state.` — when a native status cannot be mapped.
|
|
24
31
|
*
|
|
25
32
|
* @platform Android, iOS
|
|
26
33
|
* @since 0.1.0
|
|
@@ -30,23 +37,28 @@ export interface CalendarAccess {
|
|
|
30
37
|
}>;
|
|
31
38
|
/**
|
|
32
39
|
* Requests permission for a given scope.
|
|
40
|
+
* On Android, `readReminders` and `writeReminders` reject with `Invalid scope.`
|
|
33
41
|
*
|
|
34
42
|
* @example
|
|
35
|
-
*
|
|
43
|
+
* CapacitorCalendar.requestPermission({ scope: CalendarPermissionScope.READ_CALENDAR });
|
|
44
|
+
*
|
|
45
|
+
* @throws {Error} `Scope must be provided.` — when `scope` is missing.
|
|
46
|
+
* @throws {Error} `Invalid scope.` — when `scope` is invalid, or a reminders scope on Android.
|
|
36
47
|
*
|
|
37
|
-
* @deprecated Use {@link requestWriteOnlyCalendarAccess},
|
|
38
|
-
* {@link
|
|
48
|
+
* @deprecated Use {@link requestWriteOnlyCalendarAccess},
|
|
49
|
+
* {@link requestReadOnlyCalendarAccess} (Android),
|
|
50
|
+
* {@link requestFullCalendarAccess} (also for read on iOS),
|
|
51
|
+
* or {@link requestFullRemindersAccess} instead.
|
|
39
52
|
*
|
|
40
53
|
* @platform Android, iOS
|
|
41
54
|
* @since 0.1.0
|
|
42
55
|
*/
|
|
43
|
-
requestPermission(options: {
|
|
44
|
-
scope: CalendarPermissionScope;
|
|
45
|
-
}): Promise<{
|
|
56
|
+
requestPermission(options: RequestPermissionOptions): Promise<{
|
|
46
57
|
result: PermissionState;
|
|
47
58
|
}>;
|
|
48
59
|
/**
|
|
49
60
|
* Requests permission for all calendar and reminder permissions.
|
|
61
|
+
* On Android, only calendar permissions are requested; reminder keys stay `"prompt"`.
|
|
50
62
|
*
|
|
51
63
|
* @deprecated Use {@link requestFullCalendarAccess} or {@link requestFullRemindersAccess} instead.
|
|
52
64
|
* @platform Android, iOS
|
|
@@ -106,9 +118,9 @@ export interface CalendarAccess {
|
|
|
106
118
|
* @platform Android, iOS
|
|
107
119
|
* @since 7.1.0
|
|
108
120
|
*/
|
|
109
|
-
export
|
|
121
|
+
export type CheckAllPermissionsResult = Record<CalendarPermissionScope, PermissionState>;
|
|
110
122
|
/**
|
|
111
123
|
* @platform Android, iOS
|
|
112
124
|
* @since 7.1.0
|
|
113
125
|
*/
|
|
114
|
-
export
|
|
126
|
+
export type RequestAllPermissionsResult = CheckAllPermissionsResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-access.js","sourceRoot":"","sources":["../../../src/sub-definitions/calendar-access.ts"],"names":[],"mappings":"","sourcesContent":["import { CalendarPermissionScope } from
|
|
1
|
+
{"version":3,"file":"calendar-access.js","sourceRoot":"","sources":["../../../src/sub-definitions/calendar-access.ts"],"names":[],"mappings":"","sourcesContent":["import type { PermissionState } from '@capacitor/core';\n\nimport type { CalendarPermissionScope } from '../schemas/enums/calendar-permission-scope';\nimport type { CheckPermissionOptions } from '../schemas/interfaces/check-permission-options';\nimport type { RequestPermissionOptions } from '../schemas/interfaces/request-permission-options';\n\n/**\n * @since 7.1.0\n */\nexport interface CalendarAccess {\n /**\n * Retrieves the current permission state for a given scope.\n * On Android, `readReminders` and `writeReminders` resolve to `\"prompt\"`.\n *\n * @example\n * CapacitorCalendar.checkPermission({ scope: CalendarPermissionScope.READ_CALENDAR });\n *\n * @throws {Error} `Scope must be provided.` — when `scope` is missing.\n * @throws {Error} `Invalid scope.` — when `scope` is invalid.\n * @throws {Error} `Unhandled permission state.` — when the native status cannot be mapped.\n *\n * @platform Android, iOS\n * @since 0.1.0\n */\n checkPermission(options: CheckPermissionOptions): Promise<{ result: PermissionState }>;\n\n /**\n * Retrieves the current state of all permissions.\n * On Android, reminder keys always resolve to `\"prompt\"`.\n *\n * @throws {Error} `Unhandled permission state.` — when a native status cannot be mapped.\n *\n * @platform Android, iOS\n * @since 0.1.0\n */\n checkAllPermissions(): Promise<{ result: CheckAllPermissionsResult }>;\n\n /**\n * Requests permission for a given scope.\n * On Android, `readReminders` and `writeReminders` reject with `Invalid scope.`\n *\n * @example\n * CapacitorCalendar.requestPermission({ scope: CalendarPermissionScope.READ_CALENDAR });\n *\n * @throws {Error} `Scope must be provided.` — when `scope` is missing.\n * @throws {Error} `Invalid scope.` — when `scope` is invalid, or a reminders scope on Android.\n *\n * @deprecated Use {@link requestWriteOnlyCalendarAccess},\n * {@link requestReadOnlyCalendarAccess} (Android),\n * {@link requestFullCalendarAccess} (also for read on iOS),\n * or {@link requestFullRemindersAccess} instead.\n *\n * @platform Android, iOS\n * @since 0.1.0\n */\n requestPermission(options: RequestPermissionOptions): Promise<{ result: PermissionState }>;\n\n /**\n * Requests permission for all calendar and reminder permissions.\n * On Android, only calendar permissions are requested; reminder keys stay `\"prompt\"`.\n *\n * @deprecated Use {@link requestFullCalendarAccess} or {@link requestFullRemindersAccess} instead.\n * @platform Android, iOS\n * @since 0.1.0\n */\n requestAllPermissions(): Promise<{ result: RequestAllPermissionsResult }>;\n\n /**\n * Requests write access to the calendar.\n *\n * @permissions\n * | Platform | Required |\n * |-----------|---------------------|\n * | iOS 17+ | `NSCalendarsWriteOnlyAccessUsageDescription` |\n * | iOS 13-16 | `NSCalendarsUsageDescription` |\n * | Android | `android.permission.WRITE_CALENDAR` |\n *\n * @platform Android, iOS\n * @since 5.4.0\n */\n requestWriteOnlyCalendarAccess(): Promise<{ result: PermissionState }>;\n\n /**\n * Requests read access to the calendar.\n *\n * @permissions\n * | Platform | Required |\n * |-----------|---------------------|\n * | Android | `android.permission.READ_CALENDAR` |\n *\n * @platform Android\n * @since 5.4.0\n */\n requestReadOnlyCalendarAccess(): Promise<{ result: PermissionState }>;\n\n /**\n * Requests read and write access to the calendar.\n *\n * @permissions\n * | Platform | Required |\n * |-----------|---------------------|\n * | iOS 17+ | `NSCalendarsFullAccessUsageDescription` |\n * | iOS 13-16 | `NSCalendarsUsageDescription` |\n * | Android | `android.permission.READ_CALENDAR` & `android.permission.WRITE_CALENDAR` |\n *\n * @platform Android, iOS\n * @since 5.4.0\n */\n requestFullCalendarAccess(): Promise<{ result: PermissionState }>;\n}\n\n/**\n * @platform Android, iOS\n * @since 7.1.0\n */\nexport type CheckAllPermissionsResult = Record<CalendarPermissionScope, PermissionState>;\n\n/**\n * @platform Android, iOS\n * @since 7.1.0\n */\nexport type RequestAllPermissionsResult = CheckAllPermissionsResult;\n"]}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import type { Calendar } from
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type { DeleteCalendarOptions } from
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
1
|
+
import type { Calendar } from '../schemas/interfaces/calendar';
|
|
2
|
+
import type { CreateCalendarOptions } from '../schemas/interfaces/create-calendar-options';
|
|
3
|
+
import type { CreateCalendarResult } from '../schemas/interfaces/create-calendar-result';
|
|
4
|
+
import type { DeleteCalendarOptions } from '../schemas/interfaces/delete-calendar-options';
|
|
5
|
+
import type { FetchAllCalendarSourcesResult } from '../schemas/interfaces/fetch-all-calendar-sources-result';
|
|
6
|
+
import type { GetDefaultCalendarOptions } from '../schemas/interfaces/get-default-calendar-options';
|
|
7
|
+
import type { ListCalendarsResult } from '../schemas/interfaces/list-calendars-result';
|
|
8
|
+
import type { ModifyCalendarOptions } from '../schemas/interfaces/modify-calendar-options';
|
|
9
|
+
import type { OpenCalendarOptions } from '../schemas/interfaces/open-calendar-options';
|
|
10
|
+
import type { SelectCalendarsWithPromptOptions } from '../schemas/interfaces/select-calendars-with-prompt-options';
|
|
11
|
+
import type { SelectCalendarsWithPromptResult } from '../schemas/interfaces/select-calendars-with-prompt-result';
|
|
8
12
|
export interface CalendarOperations {
|
|
9
13
|
/**
|
|
10
|
-
*
|
|
14
|
+
* Saves pending calendar changes.
|
|
11
15
|
*
|
|
12
16
|
* @platform iOS
|
|
13
17
|
* @since 7.1.0
|
|
@@ -16,37 +20,54 @@ export interface CalendarOperations {
|
|
|
16
20
|
/**
|
|
17
21
|
* Opens a system interface to choose one or multiple calendars.
|
|
18
22
|
*
|
|
23
|
+
* Calendar access is expected. Call `requestFullCalendarAccess()` first.
|
|
24
|
+
* Without authorization the chooser can look empty.
|
|
25
|
+
*
|
|
26
|
+
* On confirm, `result` contains the calendars the user selected.
|
|
27
|
+
* On cancel, `result` is an empty array.
|
|
28
|
+
*
|
|
29
|
+
* If a chooser is already presented, a new call is rejected; the in-flight
|
|
30
|
+
* call continues until the user confirms or cancels.
|
|
31
|
+
*
|
|
19
32
|
* @platform iOS
|
|
20
33
|
* @since 0.2.0
|
|
21
34
|
*/
|
|
22
|
-
selectCalendarsWithPrompt(options?: SelectCalendarsWithPromptOptions): Promise<
|
|
23
|
-
result: Calendar[];
|
|
24
|
-
}>;
|
|
35
|
+
selectCalendarsWithPrompt(options?: SelectCalendarsWithPromptOptions): Promise<SelectCalendarsWithPromptResult>;
|
|
25
36
|
/**
|
|
26
37
|
* Retrieves a list of calendar sources.
|
|
27
38
|
*
|
|
39
|
+
* Requires calendar access. Without authorization, `result` is typically
|
|
40
|
+
* an empty array. This method does not reject solely for missing permission.
|
|
41
|
+
*
|
|
28
42
|
* @platform iOS
|
|
29
43
|
* @since 6.6.0
|
|
30
44
|
*/
|
|
31
|
-
fetchAllCalendarSources(): Promise<
|
|
32
|
-
result: CalendarSource[];
|
|
33
|
-
}>;
|
|
45
|
+
fetchAllCalendarSources(): Promise<FetchAllCalendarSourcesResult>;
|
|
34
46
|
/**
|
|
35
47
|
* Retrieves a list of all available calendars.
|
|
36
48
|
*
|
|
49
|
+
* Requires calendar read access. On Android, missing permission typically
|
|
50
|
+
* rejects. On iOS, missing authorization typically returns an empty `result`.
|
|
51
|
+
*
|
|
37
52
|
* @platform Android, iOS
|
|
38
53
|
* @since 7.1.0
|
|
39
54
|
*/
|
|
40
|
-
listCalendars(): Promise<
|
|
41
|
-
result: Calendar[];
|
|
42
|
-
}>;
|
|
55
|
+
listCalendars(): Promise<ListCalendarsResult>;
|
|
43
56
|
/**
|
|
44
57
|
* Retrieves the default calendar.
|
|
45
58
|
*
|
|
59
|
+
* Requires calendar read access. On Android, missing permission typically
|
|
60
|
+
* rejects. On iOS, missing authorization typically yields `result: null`.
|
|
61
|
+
*
|
|
62
|
+
* The system default is the primary calendar on Android and
|
|
63
|
+
* `defaultCalendarForNewEvents` on iOS. When neither exists and
|
|
64
|
+
* `useFallbackCalendar` is true, the first available calendar is returned.
|
|
65
|
+
* Otherwise the method returns `null` when there is no system default.
|
|
66
|
+
*
|
|
46
67
|
* @platform Android, iOS
|
|
47
68
|
* @since 0.3.0
|
|
48
69
|
*/
|
|
49
|
-
getDefaultCalendar(): Promise<{
|
|
70
|
+
getDefaultCalendar(options?: GetDefaultCalendarOptions): Promise<{
|
|
50
71
|
result: Calendar | null;
|
|
51
72
|
}>;
|
|
52
73
|
/**
|
|
@@ -62,15 +83,34 @@ export interface CalendarOperations {
|
|
|
62
83
|
/**
|
|
63
84
|
* Creates a calendar.
|
|
64
85
|
*
|
|
86
|
+
* `title` is required. `color` is optional and defaults to `#007AFF`.
|
|
87
|
+
* On Android, `accountName` and `ownerAccount` are required at runtime.
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* CapacitorCalendar.createCalendar({
|
|
91
|
+
* title: 'Work',
|
|
92
|
+
* accountName: 'plugin@example.com',
|
|
93
|
+
* ownerAccount: 'plugin@example.com',
|
|
94
|
+
* });
|
|
95
|
+
*
|
|
96
|
+
* @throws {Error} `Title must be provided.` — when `title` is missing.
|
|
97
|
+
* @throws {Error} `Invalid color format.` — when `color` is present but invalid.
|
|
98
|
+
* @throws {Error} `Account name must be provided.` — when `accountName` is missing on Android.
|
|
99
|
+
* @throws {Error} `Owner account must be provided.` — when `ownerAccount` is missing on Android.
|
|
100
|
+
* @throws {Error} `Calendar source not found.` — when `sourceId` is set and no EventKit source matches (iOS).
|
|
101
|
+
* @throws {Error} `Failed to retrieve calendar ID.` — when the calendar is created but no id is returned.
|
|
102
|
+
*
|
|
65
103
|
* @platform Android, iOS
|
|
66
104
|
* @since 5.2.0
|
|
67
105
|
*/
|
|
68
|
-
createCalendar(options: CreateCalendarOptions): Promise<
|
|
69
|
-
id: string;
|
|
70
|
-
}>;
|
|
106
|
+
createCalendar(options: CreateCalendarOptions): Promise<CreateCalendarResult>;
|
|
71
107
|
/**
|
|
72
108
|
* Deletes a calendar by id.
|
|
73
109
|
*
|
|
110
|
+
* @throws {Error} `Calendar ID must be provided.` — when `id` is missing.
|
|
111
|
+
* @throws {Error} `Invalid calendar ID.` — when `id` is not a numeric Android calendar id.
|
|
112
|
+
* @throws {Error} `Calendar not found.` — when no calendar exists for `id`.
|
|
113
|
+
*
|
|
74
114
|
* @platform Android, iOS
|
|
75
115
|
* @since 5.2.0
|
|
76
116
|
*/
|
|
@@ -78,6 +118,13 @@ export interface CalendarOperations {
|
|
|
78
118
|
/**
|
|
79
119
|
* Modifies a calendar with options.
|
|
80
120
|
*
|
|
121
|
+
* @throws {Error} `Calendar ID must be provided.` — when `id` is missing.
|
|
122
|
+
* @throws {Error} `Invalid calendar ID.` — when `id` is not a numeric Android calendar id.
|
|
123
|
+
* @throws {Error} `At least one of title or color must be provided.` — when both are omitted.
|
|
124
|
+
* @throws {Error} `Invalid color format.` — when `color` is present but invalid.
|
|
125
|
+
* @throws {Error} `Calendar not found.` — when no calendar exists for `id`.
|
|
126
|
+
* @throws {Error} `Calendar is not modifiable.` — when the calendar cannot be modified (iOS).
|
|
127
|
+
*
|
|
81
128
|
* @platform Android, iOS
|
|
82
129
|
* @since 7.2.0
|
|
83
130
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-operations.js","sourceRoot":"","sources":["../../../src/sub-definitions/calendar-operations.ts"],"names":[],"mappings":"","sourcesContent":["import type { Calendar } from
|
|
1
|
+
{"version":3,"file":"calendar-operations.js","sourceRoot":"","sources":["../../../src/sub-definitions/calendar-operations.ts"],"names":[],"mappings":"","sourcesContent":["import type { Calendar } from '../schemas/interfaces/calendar';\nimport type { CreateCalendarOptions } from '../schemas/interfaces/create-calendar-options';\nimport type { CreateCalendarResult } from '../schemas/interfaces/create-calendar-result';\nimport type { DeleteCalendarOptions } from '../schemas/interfaces/delete-calendar-options';\nimport type { FetchAllCalendarSourcesResult } from '../schemas/interfaces/fetch-all-calendar-sources-result';\nimport type { GetDefaultCalendarOptions } from '../schemas/interfaces/get-default-calendar-options';\nimport type { ListCalendarsResult } from '../schemas/interfaces/list-calendars-result';\nimport type { ModifyCalendarOptions } from '../schemas/interfaces/modify-calendar-options';\nimport type { OpenCalendarOptions } from '../schemas/interfaces/open-calendar-options';\nimport type { SelectCalendarsWithPromptOptions } from '../schemas/interfaces/select-calendars-with-prompt-options';\nimport type { SelectCalendarsWithPromptResult } from '../schemas/interfaces/select-calendars-with-prompt-result';\n\nexport interface CalendarOperations {\n /**\n * Saves pending calendar changes.\n *\n * @platform iOS\n * @since 7.1.0\n */\n commit(): Promise<void>;\n /**\n * Opens a system interface to choose one or multiple calendars.\n *\n * Calendar access is expected. Call `requestFullCalendarAccess()` first.\n * Without authorization the chooser can look empty.\n *\n * On confirm, `result` contains the calendars the user selected.\n * On cancel, `result` is an empty array.\n *\n * If a chooser is already presented, a new call is rejected; the in-flight\n * call continues until the user confirms or cancels.\n *\n * @platform iOS\n * @since 0.2.0\n */\n selectCalendarsWithPrompt(options?: SelectCalendarsWithPromptOptions): Promise<SelectCalendarsWithPromptResult>;\n /**\n * Retrieves a list of calendar sources.\n *\n * Requires calendar access. Without authorization, `result` is typically\n * an empty array. This method does not reject solely for missing permission.\n *\n * @platform iOS\n * @since 6.6.0\n */\n fetchAllCalendarSources(): Promise<FetchAllCalendarSourcesResult>;\n /**\n * Retrieves a list of all available calendars.\n *\n * Requires calendar read access. On Android, missing permission typically\n * rejects. On iOS, missing authorization typically returns an empty `result`.\n *\n * @platform Android, iOS\n * @since 7.1.0\n */\n listCalendars(): Promise<ListCalendarsResult>;\n /**\n * Retrieves the default calendar.\n *\n * Requires calendar read access. On Android, missing permission typically\n * rejects. On iOS, missing authorization typically yields `result: null`.\n *\n * The system default is the primary calendar on Android and\n * `defaultCalendarForNewEvents` on iOS. When neither exists and\n * `useFallbackCalendar` is true, the first available calendar is returned.\n * Otherwise the method returns `null` when there is no system default.\n *\n * @platform Android, iOS\n * @since 0.3.0\n */\n getDefaultCalendar(options?: GetDefaultCalendarOptions): Promise<{ result: Calendar | null }>;\n /**\n * Opens the calendar app.\n *\n * @example\n * CapacitorCalendar.openCalendar({ date: Date.now() });\n *\n * @platform Android, iOS\n * @since 7.1.0\n */\n openCalendar(options?: OpenCalendarOptions): Promise<void>;\n /**\n * Creates a calendar.\n *\n * `title` is required. `color` is optional and defaults to `#007AFF`.\n * On Android, `accountName` and `ownerAccount` are required at runtime.\n *\n * @example\n * CapacitorCalendar.createCalendar({\n * title: 'Work',\n * accountName: 'plugin@example.com',\n * ownerAccount: 'plugin@example.com',\n * });\n *\n * @throws {Error} `Title must be provided.` — when `title` is missing.\n * @throws {Error} `Invalid color format.` — when `color` is present but invalid.\n * @throws {Error} `Account name must be provided.` — when `accountName` is missing on Android.\n * @throws {Error} `Owner account must be provided.` — when `ownerAccount` is missing on Android.\n * @throws {Error} `Calendar source not found.` — when `sourceId` is set and no EventKit source matches (iOS).\n * @throws {Error} `Failed to retrieve calendar ID.` — when the calendar is created but no id is returned.\n *\n * @platform Android, iOS\n * @since 5.2.0\n */\n createCalendar(options: CreateCalendarOptions): Promise<CreateCalendarResult>;\n /**\n * Deletes a calendar by id.\n *\n * @throws {Error} `Calendar ID must be provided.` — when `id` is missing.\n * @throws {Error} `Invalid calendar ID.` — when `id` is not a numeric Android calendar id.\n * @throws {Error} `Calendar not found.` — when no calendar exists for `id`.\n *\n * @platform Android, iOS\n * @since 5.2.0\n */\n deleteCalendar(options: DeleteCalendarOptions): Promise<void>;\n /**\n * Modifies a calendar with options.\n *\n * @throws {Error} `Calendar ID must be provided.` — when `id` is missing.\n * @throws {Error} `Invalid calendar ID.` — when `id` is not a numeric Android calendar id.\n * @throws {Error} `At least one of title or color must be provided.` — when both are omitted.\n * @throws {Error} `Invalid color format.` — when `color` is present but invalid.\n * @throws {Error} `Calendar not found.` — when no calendar exists for `id`.\n * @throws {Error} `Calendar is not modifiable.` — when the calendar cannot be modified (iOS).\n *\n * @platform Android, iOS\n * @since 7.2.0\n */\n modifyCalendar(options: ModifyCalendarOptions): Promise<void>;\n}\n"]}
|
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type { CreateEventWithPromptOptions } from
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
8
|
-
import type { ListEventsInRangeOptions } from
|
|
9
|
-
import type {
|
|
10
|
-
import type {
|
|
1
|
+
import type { CreateEventOptions } from '../schemas/interfaces/create-event-options';
|
|
2
|
+
import type { CreateEventResult } from '../schemas/interfaces/create-event-result';
|
|
3
|
+
import type { CreateEventWithPromptOptions } from '../schemas/interfaces/create-event-with-prompt-options';
|
|
4
|
+
import type { CreateEventWithPromptResult } from '../schemas/interfaces/create-event-with-prompt-result';
|
|
5
|
+
import type { DeleteEventOptions } from '../schemas/interfaces/delete-event-options';
|
|
6
|
+
import type { DeleteEventWithPromptOptions } from '../schemas/interfaces/delete-event-with-prompt-options';
|
|
7
|
+
import type { DeleteEventsByIdOptions } from '../schemas/interfaces/delete-events-by-id-options';
|
|
8
|
+
import type { ListEventsInRangeOptions } from '../schemas/interfaces/list-events-in-range-options';
|
|
9
|
+
import type { ListEventsInRangeResult } from '../schemas/interfaces/list-events-in-range-result';
|
|
10
|
+
import type { ModifyEventOptions } from '../schemas/interfaces/modify-event-options';
|
|
11
|
+
import type { ModifyEventWithPromptOptions } from '../schemas/interfaces/modify-event-with-prompt-options';
|
|
12
|
+
import type { EventEditAction } from '../schemas/types/event-edit-action';
|
|
11
13
|
export interface EventOperations {
|
|
12
14
|
/**
|
|
13
|
-
* Opens
|
|
14
|
-
* On Android
|
|
15
|
-
*
|
|
15
|
+
* Opens a calendar UI to create an event.
|
|
16
|
+
* On Android and iOS, opens the system editor. On Android, `id` is always `null`.
|
|
17
|
+
* On Web, shows a confirm dialog, then builds an `.ics` `File` when the user confirms.
|
|
18
|
+
* See MCP `docs://web-behavior` for Web details.
|
|
16
19
|
*
|
|
17
20
|
* @example
|
|
18
21
|
* const options = {
|
|
@@ -21,12 +24,10 @@ export interface EventOperations {
|
|
|
21
24
|
* }
|
|
22
25
|
* await CapacitorCalendar.createEventWithPrompt(options)
|
|
23
26
|
*
|
|
24
|
-
* @platform Android, iOS
|
|
27
|
+
* @platform Android, iOS, Web
|
|
25
28
|
* @since 0.1.0
|
|
26
29
|
*/
|
|
27
|
-
createEventWithPrompt(options?: CreateEventWithPromptOptions): Promise<
|
|
28
|
-
id: string | null;
|
|
29
|
-
}>;
|
|
30
|
+
createEventWithPrompt(options?: CreateEventWithPromptOptions): Promise<CreateEventWithPromptResult>;
|
|
30
31
|
/**
|
|
31
32
|
* Opens a system calendar interface to modify an event.
|
|
32
33
|
* On Android always returns `null`.
|
|
@@ -46,13 +47,21 @@ export interface EventOperations {
|
|
|
46
47
|
}>;
|
|
47
48
|
/**
|
|
48
49
|
* Creates an event in the calendar.
|
|
50
|
+
* On Android and iOS, inserts into the system calendar and returns its `id`.
|
|
51
|
+
* On Web, builds an `.ics` `File` as `ics` (no calendar store). See MCP `docs://web-behavior`.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* const { id, ics } = await CapacitorCalendar.createEvent({
|
|
55
|
+
* title: 'Team standup',
|
|
56
|
+
* startDate: Date.now(),
|
|
57
|
+
* icsFileName: 'team-standup.ics',
|
|
58
|
+
* autoDownloadIcsFile: true,
|
|
59
|
+
* });
|
|
49
60
|
*
|
|
50
|
-
* @platform iOS,
|
|
61
|
+
* @platform Android, iOS, Web
|
|
51
62
|
* @since 0.4.0
|
|
52
63
|
*/
|
|
53
|
-
createEvent(options: CreateEventOptions): Promise<
|
|
54
|
-
id: string;
|
|
55
|
-
}>;
|
|
64
|
+
createEvent(options: CreateEventOptions): Promise<CreateEventResult>;
|
|
56
65
|
/**
|
|
57
66
|
* Modifies an event.
|
|
58
67
|
*
|
|
@@ -87,14 +96,26 @@ export interface EventOperations {
|
|
|
87
96
|
deleted: boolean;
|
|
88
97
|
}>;
|
|
89
98
|
/**
|
|
90
|
-
* Retrieves
|
|
99
|
+
* Retrieves events that overlap a date range.
|
|
100
|
+
*
|
|
101
|
+
* An event is included when its time interval intersects `[from, to]`, including
|
|
102
|
+
* multi-day events that span the range without starting or ending inside it.
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* const startOfDay = new Date();
|
|
106
|
+
* startOfDay.setHours(0, 0, 0, 0);
|
|
107
|
+
* const startOfNextDay = new Date(startOfDay);
|
|
108
|
+
* startOfNextDay.setDate(startOfNextDay.getDate() + 1);
|
|
109
|
+
*
|
|
110
|
+
* const { result } = await CapacitorCalendar.listEventsInRange({
|
|
111
|
+
* from: startOfDay.getTime(),
|
|
112
|
+
* to: startOfNextDay.getTime(),
|
|
113
|
+
* });
|
|
91
114
|
*
|
|
92
115
|
* @platform Android, iOS
|
|
93
116
|
* @since 0.10.0
|
|
94
117
|
*/
|
|
95
|
-
listEventsInRange(options: ListEventsInRangeOptions): Promise<
|
|
96
|
-
result: CalendarEvent[];
|
|
97
|
-
}>;
|
|
118
|
+
listEventsInRange(options: ListEventsInRangeOptions): Promise<ListEventsInRangeResult>;
|
|
98
119
|
}
|
|
99
120
|
/**
|
|
100
121
|
* @since 7.1.0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-operations.js","sourceRoot":"","sources":["../../../src/sub-definitions/event-operations.ts"],"names":[],"mappings":"","sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"event-operations.js","sourceRoot":"","sources":["../../../src/sub-definitions/event-operations.ts"],"names":[],"mappings":"","sourcesContent":["import type { CreateEventOptions } from '../schemas/interfaces/create-event-options';\nimport type { CreateEventResult } from '../schemas/interfaces/create-event-result';\nimport type { CreateEventWithPromptOptions } from '../schemas/interfaces/create-event-with-prompt-options';\nimport type { CreateEventWithPromptResult } from '../schemas/interfaces/create-event-with-prompt-result';\nimport type { DeleteEventOptions } from '../schemas/interfaces/delete-event-options';\nimport type { DeleteEventWithPromptOptions } from '../schemas/interfaces/delete-event-with-prompt-options';\nimport type { DeleteEventsByIdOptions } from '../schemas/interfaces/delete-events-by-id-options';\nimport type { ListEventsInRangeOptions } from '../schemas/interfaces/list-events-in-range-options';\nimport type { ListEventsInRangeResult } from '../schemas/interfaces/list-events-in-range-result';\nimport type { ModifyEventOptions } from '../schemas/interfaces/modify-event-options';\nimport type { ModifyEventWithPromptOptions } from '../schemas/interfaces/modify-event-with-prompt-options';\nimport type { EventEditAction } from '../schemas/types/event-edit-action';\n\nexport interface EventOperations {\n /**\n * Opens a calendar UI to create an event.\n * On Android and iOS, opens the system editor. On Android, `id` is always `null`.\n * On Web, shows a confirm dialog, then builds an `.ics` `File` when the user confirms.\n * See MCP `docs://web-behavior` for Web details.\n *\n * @example\n * const options = {\n * title: 'Test event',\n * startDate: Date.now(),\n * }\n * await CapacitorCalendar.createEventWithPrompt(options)\n *\n * @platform Android, iOS, Web\n * @since 0.1.0\n */\n createEventWithPrompt(options?: CreateEventWithPromptOptions): Promise<CreateEventWithPromptResult>;\n /**\n * Opens a system calendar interface to modify an event.\n * On Android always returns `null`.\n *\n * @example\n * const options = {\n * id: 'EVENT_ID',\n * title: 'New title',\n * }\n * await CapacitorCalendar.modifyEventWithPrompt(options);\n *\n * @platform Android, iOS\n * @since 6.6.0\n */\n modifyEventWithPrompt(options: ModifyEventWithPromptOptions): Promise<{ result: EventEditAction | null }>;\n /**\n * Creates an event in the calendar.\n * On Android and iOS, inserts into the system calendar and returns its `id`.\n * On Web, builds an `.ics` `File` as `ics` (no calendar store). See MCP `docs://web-behavior`.\n *\n * @example\n * const { id, ics } = await CapacitorCalendar.createEvent({\n * title: 'Team standup',\n * startDate: Date.now(),\n * icsFileName: 'team-standup.ics',\n * autoDownloadIcsFile: true,\n * });\n *\n * @platform Android, iOS, Web\n * @since 0.4.0\n */\n createEvent(options: CreateEventOptions): Promise<CreateEventResult>;\n /**\n * Modifies an event.\n *\n * @platform Android, iOS\n * @since 6.6.0\n */\n modifyEvent(options: ModifyEventOptions): Promise<void>;\n /**\n * Deletes multiple events.\n *\n * @deprecated Use `deleteEvent(...)`.\n * @platform Android, iOS\n * @since 0.11.0\n */\n deleteEventsById(options: DeleteEventsByIdOptions): Promise<{ result: DeleteEventsByIdResult }>;\n /**\n * Deletes an event.\n *\n * @platform Android, iOS\n * @since 7.1.0\n */\n deleteEvent(options: DeleteEventOptions): Promise<void>;\n /**\n * Opens a dialog to delete an event.\n *\n * @platform Android, iOS\n * @since 7.1.0\n */\n deleteEventWithPrompt(options: DeleteEventWithPromptOptions): Promise<{ deleted: boolean }>;\n /**\n * Retrieves events that overlap a date range.\n *\n * An event is included when its time interval intersects `[from, to]`, including\n * multi-day events that span the range without starting or ending inside it.\n *\n * @example\n * const startOfDay = new Date();\n * startOfDay.setHours(0, 0, 0, 0);\n * const startOfNextDay = new Date(startOfDay);\n * startOfNextDay.setDate(startOfNextDay.getDate() + 1);\n *\n * const { result } = await CapacitorCalendar.listEventsInRange({\n * from: startOfDay.getTime(),\n * to: startOfNextDay.getTime(),\n * });\n *\n * @platform Android, iOS\n * @since 0.10.0\n */\n listEventsInRange(options: ListEventsInRangeOptions): Promise<ListEventsInRangeResult>;\n}\n\n/**\n * @since 7.1.0\n */\nexport interface DeleteEventsByIdResult {\n /**\n * @since 7.1.0\n */\n deleted: string[];\n /**\n * @since 7.1.0\n */\n failed: string[];\n}\n"]}
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import type { PermissionState } from
|
|
1
|
+
import type { PermissionState } from '@capacitor/core';
|
|
2
2
|
/**
|
|
3
3
|
* @since 7.1.0
|
|
4
4
|
*/
|
|
5
5
|
export interface RemindersAccess {
|
|
6
6
|
/**
|
|
7
7
|
* Requests read and write access to the reminders.
|
|
8
|
+
* Resolves with `"granted"` or `"denied"` (never `"prompt"`).
|
|
9
|
+
* A grant covers both `readReminders` and `writeReminders`.
|
|
8
10
|
*
|
|
9
11
|
* @permissions
|
|
10
12
|
* | Platform | Required |
|
|
11
13
|
* |-----------|---------------------|
|
|
12
14
|
* | iOS 17+ | `NSRemindersFullAccessUsageDescription` |
|
|
13
|
-
* | iOS
|
|
15
|
+
* | iOS 13-16 | `NSRemindersUsageDescription` |
|
|
16
|
+
*
|
|
17
|
+
* @throws {Error} when EventKit fails or required Info.plist keys are missing.
|
|
14
18
|
*
|
|
15
19
|
* @platform iOS
|
|
16
20
|
* @see {@link CalendarPermissionScope}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reminders-access.js","sourceRoot":"","sources":["../../../src/sub-definitions/reminders-access.ts"],"names":[],"mappings":"","sourcesContent":["import type { PermissionState } from
|
|
1
|
+
{"version":3,"file":"reminders-access.js","sourceRoot":"","sources":["../../../src/sub-definitions/reminders-access.ts"],"names":[],"mappings":"","sourcesContent":["import type { PermissionState } from '@capacitor/core';\n\n/**\n * @since 7.1.0\n */\nexport interface RemindersAccess {\n /**\n * Requests read and write access to the reminders.\n * Resolves with `\"granted\"` or `\"denied\"` (never `\"prompt\"`).\n * A grant covers both `readReminders` and `writeReminders`.\n *\n * @permissions\n * | Platform | Required |\n * |-----------|---------------------|\n * | iOS 17+ | `NSRemindersFullAccessUsageDescription` |\n * | iOS 13-16 | `NSRemindersUsageDescription` |\n *\n * @throws {Error} when EventKit fails or required Info.plist keys are missing.\n *\n * @platform iOS\n * @see {@link CalendarPermissionScope}\n * @since 5.4.0\n */\n requestFullRemindersAccess(): Promise<{ result: PermissionState }>;\n}\n"]}
|