@ebarooni/capacitor-calendar 7.0.0 → 7.1.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/README.md +803 -317
- package/android/src/main/java/dev/barooni/capacitor/calendar/CapacitorCalendarPlugin.kt +267 -317
- package/android/src/main/java/dev/barooni/capacitor/calendar/PluginError.kt +47 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/implementation/CapacitorCalendar.kt +348 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/data/CalendarEvent.kt +25 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/data/CalendarInfo.kt +14 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/data/EventGuest.kt +9 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/enums/CalendarPermissionScope.kt +15 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/CheckPermissionInput.kt +20 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/CreateCalendarInput.kt +18 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/CreateEventInput.kt +27 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/CreateEventWithPromptInput.kt +36 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/DeleteCalendarInput.kt +10 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/DeleteEventInput.kt +10 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/DeleteEventWithPromptInput.kt +14 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/DeleteEventsByIdInput.kt +11 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/ListEventsInRangeInput.kt +14 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/ModifyEvent.kt +25 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/ModifyEventWithPromptInput.kt +37 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/OpenCalendarInput.kt +10 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/RequestAllPermissionsInput.kt +9 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/RequestPermissionInput.kt +40 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/results/CheckAllPermissionsResult.kt +17 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/results/CheckPermissionResult.kt +15 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/results/CreateCalendarResult.kt +21 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/results/CreateEventResult.kt +21 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/results/CreateEventWithPromptResult.kt +12 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/results/DeleteEventWithPromptResult.kt +14 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/results/DeleteEventsByIdResult.kt +27 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/results/GetDefaultCalendarResult.kt +34 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/results/ListCalendarsResult.kt +39 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/results/ListEventsInRangeResult.kt +58 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/results/ModifyEventWithPromptResult.kt +12 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/results/RequestAllPermissionsResult.kt +30 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/results/RequestPermissionResult.kt +42 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/templates/JSResult.kt +7 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/utils/ImplementationHelper.kt +387 -0
- package/dist/docs.json +3762 -1105
- package/dist/esm/definitions.d.ts +6 -759
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/index.d.ts +40 -12
- package/dist/esm/index.js +11 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/schemas/enums/attendee-role.d.ts +50 -0
- package/dist/esm/schemas/enums/attendee-role.js +52 -0
- package/dist/esm/schemas/enums/attendee-role.js.map +1 -0
- package/dist/esm/schemas/enums/attendee-status.d.ts +55 -0
- package/dist/esm/schemas/enums/attendee-status.js +57 -0
- package/dist/esm/schemas/enums/attendee-status.js.map +1 -0
- package/dist/esm/schemas/enums/attendee-type.d.ts +45 -0
- package/dist/esm/schemas/enums/attendee-type.js +47 -0
- package/dist/esm/schemas/enums/attendee-type.js.map +1 -0
- package/dist/esm/schemas/enums/calendar-chooser-display-style.d.ts +3 -6
- package/dist/esm/schemas/enums/calendar-chooser-display-style.js +3 -6
- package/dist/esm/schemas/enums/calendar-chooser-display-style.js.map +1 -1
- package/dist/esm/schemas/enums/calendar-permission-scope.d.ts +60 -0
- package/dist/esm/schemas/enums/calendar-permission-scope.js +62 -0
- package/dist/esm/schemas/enums/calendar-permission-scope.js.map +1 -0
- package/dist/esm/schemas/enums/calendar-source-type.d.ts +7 -16
- package/dist/esm/schemas/enums/calendar-source-type.js +7 -16
- package/dist/esm/schemas/enums/calendar-source-type.js.map +1 -1
- package/dist/esm/schemas/enums/calendar-type.d.ts +6 -9
- package/dist/esm/schemas/enums/calendar-type.js +6 -9
- package/dist/esm/schemas/enums/calendar-type.js.map +1 -1
- package/dist/esm/schemas/enums/event-availability.d.ts +30 -0
- package/dist/esm/schemas/enums/event-availability.js +32 -0
- package/dist/esm/schemas/enums/event-availability.js.map +1 -0
- package/dist/esm/schemas/enums/event-span.d.ts +3 -6
- package/dist/esm/schemas/enums/event-span.js +3 -6
- package/dist/esm/schemas/enums/event-span.js.map +1 -1
- package/dist/esm/schemas/enums/event-status.d.ts +26 -0
- package/dist/esm/schemas/enums/event-status.js +28 -0
- package/dist/esm/schemas/enums/event-status.js.map +1 -0
- package/dist/esm/schemas/enums/recurrence-frequency.d.ts +21 -0
- package/dist/esm/schemas/enums/recurrence-frequency.js +23 -0
- package/dist/esm/schemas/enums/recurrence-frequency.js.map +1 -0
- package/dist/esm/schemas/enums/reminder-recurrence-frequency.d.ts +5 -8
- package/dist/esm/schemas/enums/reminder-recurrence-frequency.js +5 -8
- package/dist/esm/schemas/enums/reminder-recurrence-frequency.js.map +1 -1
- package/dist/esm/schemas/interfaces/calendar-event.d.ts +116 -48
- package/dist/esm/schemas/interfaces/calendar-event.js.map +1 -1
- package/dist/esm/schemas/interfaces/calendar-source.d.ts +10 -7
- package/dist/esm/schemas/interfaces/calendar-source.js.map +1 -1
- package/dist/esm/schemas/interfaces/calendar.d.ts +59 -25
- package/dist/esm/schemas/interfaces/calendar.js.map +1 -1
- package/dist/esm/schemas/interfaces/create-calendar-options.d.ts +38 -0
- package/dist/esm/schemas/interfaces/create-calendar-options.js +2 -0
- package/dist/esm/schemas/interfaces/create-calendar-options.js.map +1 -0
- package/dist/esm/schemas/interfaces/create-event-options.d.ts +96 -0
- package/dist/esm/schemas/interfaces/create-event-options.js +2 -0
- package/dist/esm/schemas/interfaces/create-event-options.js.map +1 -0
- package/dist/esm/schemas/interfaces/create-event-with-prompt-options.d.ts +70 -0
- package/dist/esm/schemas/interfaces/create-event-with-prompt-options.js +2 -0
- package/dist/esm/schemas/interfaces/create-event-with-prompt-options.js.map +1 -0
- package/dist/esm/schemas/interfaces/create-reminder-options.d.ts +54 -0
- package/dist/esm/schemas/interfaces/create-reminder-options.js +2 -0
- package/dist/esm/schemas/interfaces/create-reminder-options.js.map +1 -0
- package/dist/esm/schemas/interfaces/delete-calendar-options.d.ts +9 -0
- package/dist/esm/schemas/interfaces/delete-calendar-options.js +2 -0
- package/dist/esm/schemas/interfaces/delete-calendar-options.js.map +1 -0
- package/dist/esm/schemas/interfaces/delete-event-options.d.ts +18 -0
- package/dist/esm/schemas/interfaces/delete-event-options.js +2 -0
- package/dist/esm/schemas/interfaces/delete-event-options.js.map +1 -0
- package/dist/esm/schemas/interfaces/delete-event-with-prompt-options.d.ts +48 -0
- package/dist/esm/schemas/interfaces/delete-event-with-prompt-options.js +2 -0
- package/dist/esm/schemas/interfaces/delete-event-with-prompt-options.js.map +1 -0
- package/dist/esm/schemas/interfaces/delete-events-by-id-options.d.ts +18 -0
- package/dist/esm/schemas/interfaces/delete-events-by-id-options.js +2 -0
- package/dist/esm/schemas/interfaces/delete-events-by-id-options.js.map +1 -0
- package/dist/esm/schemas/interfaces/delete-reminder-options.d.ts +9 -0
- package/dist/esm/schemas/interfaces/delete-reminder-options.js +2 -0
- package/dist/esm/schemas/interfaces/delete-reminder-options.js.map +1 -0
- package/dist/esm/schemas/interfaces/delete-reminders-by-id-options.d.ts +9 -0
- package/dist/esm/schemas/interfaces/delete-reminders-by-id-options.js +2 -0
- package/dist/esm/schemas/interfaces/delete-reminders-by-id-options.js.map +1 -0
- package/dist/esm/schemas/interfaces/event-guest.d.ts +13 -0
- package/dist/esm/schemas/interfaces/event-guest.js +2 -0
- package/dist/esm/schemas/interfaces/event-guest.js.map +1 -0
- package/dist/esm/schemas/interfaces/get-reminder-by-id-options.d.ts +6 -0
- package/dist/esm/schemas/interfaces/get-reminder-by-id-options.js +2 -0
- package/dist/esm/schemas/interfaces/get-reminder-by-id-options.js.map +1 -0
- package/dist/esm/schemas/interfaces/get-reminders-from-lists-options.d.ts +9 -0
- package/dist/esm/schemas/interfaces/get-reminders-from-lists-options.js +2 -0
- package/dist/esm/schemas/interfaces/get-reminders-from-lists-options.js.map +1 -0
- package/dist/esm/schemas/interfaces/list-events-in-range-options.d.ts +17 -0
- package/dist/esm/schemas/interfaces/list-events-in-range-options.js +2 -0
- package/dist/esm/schemas/interfaces/list-events-in-range-options.js.map +1 -0
- package/dist/esm/schemas/interfaces/modify-event-options.d.ts +103 -0
- package/dist/esm/schemas/interfaces/modify-event-options.js +2 -0
- package/dist/esm/schemas/interfaces/modify-event-options.js.map +1 -0
- package/dist/esm/schemas/interfaces/modify-event-with-prompt-options.d.ts +13 -0
- package/dist/esm/schemas/interfaces/modify-event-with-prompt-options.js +2 -0
- package/dist/esm/schemas/interfaces/modify-event-with-prompt-options.js.map +1 -0
- package/dist/esm/schemas/interfaces/modify-reminder-options.d.ts +58 -0
- package/dist/esm/schemas/interfaces/modify-reminder-options.js +2 -0
- package/dist/esm/schemas/interfaces/modify-reminder-options.js.map +1 -0
- package/dist/esm/schemas/interfaces/open-calendar-options.d.ts +10 -0
- package/dist/esm/schemas/interfaces/open-calendar-options.js +2 -0
- package/dist/esm/schemas/interfaces/open-calendar-options.js.map +1 -0
- package/dist/esm/schemas/interfaces/recurrence-rule.d.ts +22 -0
- package/dist/esm/schemas/interfaces/recurrence-rule.js +2 -0
- package/dist/esm/schemas/interfaces/recurrence-rule.js.map +1 -0
- package/dist/esm/schemas/interfaces/reminder-recurrence-rule.d.ts +6 -24
- package/dist/esm/schemas/interfaces/reminder-recurrence-rule.js.map +1 -1
- package/dist/esm/schemas/interfaces/reminder.d.ts +29 -38
- package/dist/esm/schemas/interfaces/reminder.js.map +1 -1
- package/dist/esm/schemas/interfaces/reminders-list.d.ts +3 -0
- package/dist/esm/schemas/interfaces/reminders-list.js.map +1 -1
- package/dist/esm/schemas/interfaces/select-calendars-with-prompt-options.d.ts +18 -0
- package/dist/esm/schemas/interfaces/select-calendars-with-prompt-options.js +2 -0
- package/dist/esm/schemas/interfaces/select-calendars-with-prompt-options.js.map +1 -0
- package/dist/esm/schemas/types/event-edit-action.d.ts +4 -0
- package/dist/esm/schemas/types/event-edit-action.js +2 -0
- package/dist/esm/schemas/types/event-edit-action.js.map +1 -0
- package/dist/esm/sub-definitions/calendar-access.d.ts +114 -0
- package/dist/esm/sub-definitions/calendar-access.js +2 -0
- package/dist/esm/sub-definitions/calendar-access.js.map +1 -0
- package/dist/esm/sub-definitions/calendar-operations.d.ts +77 -0
- package/dist/esm/sub-definitions/calendar-operations.js +2 -0
- package/dist/esm/sub-definitions/calendar-operations.js.map +1 -0
- package/dist/esm/sub-definitions/event-operations.d.ts +111 -0
- package/dist/esm/sub-definitions/event-operations.js +2 -0
- package/dist/esm/sub-definitions/event-operations.js.map +1 -0
- package/dist/esm/sub-definitions/reminders-access.d.ts +22 -0
- package/dist/esm/sub-definitions/reminders-access.js +2 -0
- package/dist/esm/sub-definitions/reminders-access.js.map +1 -0
- package/dist/esm/sub-definitions/reminders-operations.d.ts +110 -0
- package/dist/esm/sub-definitions/reminders-operations.js +2 -0
- package/dist/esm/sub-definitions/reminders-operations.js.map +1 -0
- package/dist/esm/web.d.ts +86 -151
- package/dist/esm/web.js +67 -49
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +392 -172
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +392 -172
- package/dist/plugin.js.map +1 -1
- package/ios/Sources/CapacitorCalendarPlugin/CapacitorCalendarPlugin.swift +202 -531
- package/ios/Sources/CapacitorCalendarPlugin/Implementation/CapacitorCalendar.swift +554 -0
- package/ios/Sources/CapacitorCalendarPlugin/{PermissionState.swift → Models/Enums/CAPPermissionState.swift} +1 -3
- package/ios/Sources/CapacitorCalendarPlugin/Models/Enums/CalendarPermissionScope.swift +6 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Enums/EventEditAction.swift +20 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Inputs/CheckPermissionInput.swift +19 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Inputs/CreateCalendarInput.swift +32 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Inputs/CreateEventInput.swift +61 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Inputs/CreateEventWithPromptInput.swift +89 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Inputs/CreateReminderInput.swift +116 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Inputs/DeleteCalendarInput.swift +16 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Inputs/DeleteEventInput.swift +27 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Inputs/DeleteEventWithPromptInput.swift +57 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Inputs/DeleteEventsByIdInput.swift +27 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Inputs/DeleteReminderInput.swift +16 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Inputs/DeleteRemindersByIdInput.swift +16 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Inputs/GetReminderByIdInput.swift +16 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Inputs/GetRemindersFromListsInput.swift +24 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Inputs/ListEventsInRangeInput.swift +25 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Inputs/ModifyEventInput.swift +117 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Inputs/ModifyEventWithPromptInput.swift +83 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Inputs/ModifyReminderInput.swift +118 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Inputs/OpenCalendarInput.swift +17 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Inputs/RequestPermissionInput.swift +19 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Inputs/SelectCalendarsWithPromptInput.swift +32 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Results/CheckAllPermissionsResult.swift +15 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Results/CheckPermissionResult.swift +16 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Results/CreateCalendarResult.swift +18 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Results/CreateEventResult.swift +18 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Results/CreateEventWithPromptResult.swift +15 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Results/CreateReminderResult.swift +16 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Results/DeleteEventWithPromptResult.swift +15 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Results/DeleteEventsByIdResult.swift +23 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Results/DeleteRemindersByIdResult.swift +23 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Results/FetchAllCalendarSourcesResult.swift +16 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Results/GetDefaultCalendarResult.swift +16 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Results/GetReminderByIdResult.swift +20 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Results/GetRemindersFromListsResult.swift +16 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Results/ListCalendarsResult.swift +16 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Results/ListEventsInRangeResult.swift +16 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Results/ModifyEventWithPromptResult.swift +16 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Results/RequestAllPermissionsResult.swift +20 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Results/RequestPermissionResult.swift +15 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Results/SelectCalendarsWithPromptResult.swift +16 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Templates/JSResult.swift +5 -0
- package/ios/Sources/CapacitorCalendarPlugin/PluginConfig.swift +42 -0
- package/ios/Sources/CapacitorCalendarPlugin/PluginError.swift +87 -0
- package/ios/Sources/CapacitorCalendarPlugin/Utils/ImplementationHelper.swift +361 -0
- package/ios/Sources/CapacitorCalendarPlugin/Utils/UIColorFromHexExtension.swift +32 -0
- package/package.json +58 -59
- package/android/src/main/java/dev/barooni/capacitor/calendar/CapacitorCalendar.kt +0 -358
- package/dist/esm/schemas/enums/calendar-chooser-selection-style.d.ts +0 -16
- package/dist/esm/schemas/enums/calendar-chooser-selection-style.js +0 -18
- package/dist/esm/schemas/enums/calendar-chooser-selection-style.js.map +0 -1
- package/dist/esm/schemas/enums/plugin-permission.d.ts +0 -58
- package/dist/esm/schemas/enums/plugin-permission.js +0 -60
- package/dist/esm/schemas/enums/plugin-permission.js.map +0 -1
- package/dist/esm/schemas/interfaces/plugin-permissions-map.d.ts +0 -2
- package/dist/esm/schemas/interfaces/plugin-permissions-map.js +0 -2
- package/dist/esm/schemas/interfaces/plugin-permissions-map.js.map +0 -1
- package/ios/Sources/CapacitorCalendarPlugin/CapacitorCalendar.swift +0 -635
- package/ios/Sources/CapacitorCalendarPlugin/CapacitorCalendarPluginError.swift +0 -14
- package/ios/Sources/CapacitorCalendarPlugin/CapacitorReminders.swift +0 -448
- package/ios/Sources/CapacitorCalendarPlugin/EventCreationParameters.swift +0 -14
- package/ios/Sources/CapacitorCalendarPlugin/EventDeleteResults.swift +0 -6
- package/ios/Sources/CapacitorCalendarPlugin/RecurrenceParameters.swift +0 -7
- package/ios/Sources/CapacitorCalendarPlugin/ReminderCreationParameters.swift +0 -15
- package/ios/Sources/CapacitorCalendarPlugin/UIColorExtensions.swift +0 -20
- /package/{LICENSE.txt → LICENSE} +0 -0
|
@@ -1,67 +1,58 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { RecurrenceRule } from "./recurrence-rule";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* @interface Reminder
|
|
6
|
-
* @property {string} id The unique identifier of the reminder.
|
|
7
|
-
* @property {string} title The title or name of the reminder. (Optional)
|
|
8
|
-
* @property {string} listId The list that the reminder belongs to. (Optional)
|
|
9
|
-
* @property {boolean} isCompleted Whether the reminder is completed already or not.
|
|
10
|
-
* @property {number} priority The priority of the reminder. (Optional)
|
|
11
|
-
* @property {string} notes The notes of the reminder. (Optional)
|
|
12
|
-
* @property {string} url The url of the reminder. (Optional)
|
|
13
|
-
* @property {number} startDate The start date of the reminder. (Optional)
|
|
14
|
-
* @property {number} dueDate The due date of the reminder. (Optional)
|
|
15
|
-
* @property {number} completionDate The completion date of the reminder. (Optional)
|
|
16
|
-
* @property {ReminderRecurrenceRule[]} recurrence The recurrence rules of the reminder. (Optional)
|
|
3
|
+
* @since 7.1.0
|
|
17
4
|
*/
|
|
18
5
|
export interface Reminder {
|
|
19
6
|
/**
|
|
20
|
-
* @
|
|
7
|
+
* @since 7.1.0
|
|
21
8
|
*/
|
|
22
9
|
id: string;
|
|
23
10
|
/**
|
|
24
|
-
* @
|
|
11
|
+
* @since 7.1.0
|
|
25
12
|
*/
|
|
26
|
-
title
|
|
13
|
+
title: string | null;
|
|
27
14
|
/**
|
|
28
|
-
* @
|
|
15
|
+
* @since 7.1.0
|
|
29
16
|
*/
|
|
30
|
-
listId
|
|
17
|
+
listId: string | null;
|
|
31
18
|
/**
|
|
32
|
-
* @
|
|
19
|
+
* @since 7.1.0
|
|
33
20
|
*/
|
|
34
|
-
isCompleted
|
|
21
|
+
isCompleted: boolean;
|
|
35
22
|
/**
|
|
36
|
-
* @
|
|
23
|
+
* @since 7.1.0
|
|
37
24
|
*/
|
|
38
|
-
priority
|
|
25
|
+
priority: number | null;
|
|
39
26
|
/**
|
|
40
|
-
* @
|
|
27
|
+
* @since 7.1.0
|
|
41
28
|
*/
|
|
42
|
-
notes
|
|
29
|
+
notes: string | null;
|
|
43
30
|
/**
|
|
44
|
-
* @
|
|
31
|
+
* @since 7.1.0
|
|
45
32
|
*/
|
|
46
|
-
location
|
|
33
|
+
location: string | null;
|
|
47
34
|
/**
|
|
48
|
-
* @
|
|
35
|
+
* @since 7.1.0
|
|
49
36
|
*/
|
|
50
|
-
url
|
|
37
|
+
url: string | null;
|
|
51
38
|
/**
|
|
52
|
-
* @
|
|
39
|
+
* @since 7.1.0
|
|
53
40
|
*/
|
|
54
|
-
startDate
|
|
41
|
+
startDate: number | null;
|
|
55
42
|
/**
|
|
56
|
-
* @
|
|
43
|
+
* @since 7.1.0
|
|
57
44
|
*/
|
|
58
|
-
dueDate
|
|
45
|
+
dueDate: number | null;
|
|
59
46
|
/**
|
|
60
|
-
* @
|
|
47
|
+
* @since 7.1.0
|
|
61
48
|
*/
|
|
62
|
-
completionDate
|
|
49
|
+
completionDate: number | null;
|
|
63
50
|
/**
|
|
64
|
-
* @
|
|
51
|
+
* @since 7.1.0
|
|
65
52
|
*/
|
|
66
|
-
recurrence
|
|
53
|
+
recurrence: RecurrenceRule[];
|
|
54
|
+
/**
|
|
55
|
+
* @since 7.1.0
|
|
56
|
+
*/
|
|
57
|
+
alerts: number[];
|
|
67
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reminder.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/reminder.ts"],"names":[],"mappings":"","sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"reminder.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/reminder.ts"],"names":[],"mappings":"","sourcesContent":["import type { RecurrenceRule } from \"./recurrence-rule\";\n\n/**\n * @since 7.1.0\n */\nexport interface Reminder {\n /**\n * @since 7.1.0\n */\n id: string;\n /**\n * @since 7.1.0\n */\n title: string | null;\n /**\n * @since 7.1.0\n */\n listId: string | null;\n /**\n * @since 7.1.0\n */\n isCompleted: boolean;\n /**\n * @since 7.1.0\n */\n priority: number | null;\n /**\n * @since 7.1.0\n */\n notes: string | null;\n /**\n * @since 7.1.0\n */\n location: string | null;\n /**\n * @since 7.1.0\n */\n url: string | null;\n /**\n * @since 7.1.0\n */\n startDate: number | null;\n /**\n * @since 7.1.0\n */\n dueDate: number | null;\n /**\n * @since 7.1.0\n */\n completionDate: number | null;\n /**\n * @since 7.1.0\n */\n recurrence: RecurrenceRule[];\n /**\n * @since 7.1.0\n */\n alerts: number[];\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reminders-list.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/reminders-list.ts"],"names":[],"mappings":"","sourcesContent":["import { Calendar } from \"./calendar\";\n\nexport type RemindersList = Calendar;\n"]}
|
|
1
|
+
{"version":3,"file":"reminders-list.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/reminders-list.ts"],"names":[],"mappings":"","sourcesContent":["import { Calendar } from \"./calendar\";\n\n/**\n * @since 7.1.0\n */\nexport type RemindersList = Calendar;\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CalendarChooserDisplayStyle } from "../enums/calendar-chooser-display-style";
|
|
2
|
+
/**
|
|
3
|
+
* @since 7.1.0
|
|
4
|
+
*/
|
|
5
|
+
export interface SelectCalendarsWithPromptOptions {
|
|
6
|
+
/**
|
|
7
|
+
* @default CalendarChooserDisplayStyle.ALL_CALENDARS
|
|
8
|
+
* @since 7.1.0
|
|
9
|
+
*/
|
|
10
|
+
displayStyle?: CalendarChooserDisplayStyle;
|
|
11
|
+
/**
|
|
12
|
+
* Allow multiple selections.
|
|
13
|
+
*
|
|
14
|
+
* @default false
|
|
15
|
+
* @since 7.1.0
|
|
16
|
+
*/
|
|
17
|
+
multiple?: boolean;
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-calendars-with-prompt-options.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/select-calendars-with-prompt-options.ts"],"names":[],"mappings":"","sourcesContent":["import { CalendarChooserDisplayStyle } from \"../enums/calendar-chooser-display-style\";\n\n/**\n * @since 7.1.0\n */\nexport interface SelectCalendarsWithPromptOptions {\n /**\n * @default CalendarChooserDisplayStyle.ALL_CALENDARS\n * @since 7.1.0\n */\n displayStyle?: CalendarChooserDisplayStyle;\n /**\n * Allow multiple selections.\n *\n * @default false\n * @since 7.1.0\n */\n multiple?: boolean;\n}\n"]}
|
|
@@ -0,0 +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 = \"canceled\" | \"saved\" | \"deleted\";\n"]}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { CalendarPermissionScope } from "../schemas/enums/calendar-permission-scope";
|
|
2
|
+
import type { PermissionState } from "@capacitor/core";
|
|
3
|
+
/**
|
|
4
|
+
* @since 7.1.0
|
|
5
|
+
*/
|
|
6
|
+
export interface CalendarAccess {
|
|
7
|
+
/**
|
|
8
|
+
* Retrieves the current permission state for a given scope.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* CapacitorCalendar.checkPermission({ scope: CalendarPermissionScope.READ_CALENDAR });
|
|
12
|
+
*
|
|
13
|
+
* @platform Android, iOS
|
|
14
|
+
* @since 0.1.0
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
checkPermission(options: {
|
|
18
|
+
scope: CalendarPermissionScope;
|
|
19
|
+
}): Promise<{
|
|
20
|
+
result: PermissionState;
|
|
21
|
+
}>;
|
|
22
|
+
/**
|
|
23
|
+
* Retrieves the current state of all permissions.
|
|
24
|
+
*
|
|
25
|
+
* @platform Android, iOS
|
|
26
|
+
* @since 0.1.0
|
|
27
|
+
*/
|
|
28
|
+
checkAllPermissions(): Promise<{
|
|
29
|
+
result: CheckAllPermissionsResult;
|
|
30
|
+
}>;
|
|
31
|
+
/**
|
|
32
|
+
* Requests permission for a given scope.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* this.requestPermission({ scope: CalendarPermissionScope.READ_CALENDAR });
|
|
36
|
+
*
|
|
37
|
+
* @deprecated Use {@link requestWriteOnlyCalendarAccess}, {@link requestReadOnlyCalendarAccess},
|
|
38
|
+
* {@link requestFullCalendarAccess} or {@link requestFullRemindersAccess} instead.
|
|
39
|
+
*
|
|
40
|
+
* @platform Android, iOS
|
|
41
|
+
* @since 0.1.0
|
|
42
|
+
*/
|
|
43
|
+
requestPermission(options: {
|
|
44
|
+
scope: CalendarPermissionScope;
|
|
45
|
+
}): Promise<{
|
|
46
|
+
result: PermissionState;
|
|
47
|
+
}>;
|
|
48
|
+
/**
|
|
49
|
+
* Requests permission for all calendar and reminder permissions.
|
|
50
|
+
*
|
|
51
|
+
* @deprecated Use {@link requestFullCalendarAccess} or {@link requestFullRemindersAccess} instead.
|
|
52
|
+
* @platform Android, iOS
|
|
53
|
+
* @since 0.1.0
|
|
54
|
+
*/
|
|
55
|
+
requestAllPermissions(): Promise<{
|
|
56
|
+
result: RequestAllPermissionsResult;
|
|
57
|
+
}>;
|
|
58
|
+
/**
|
|
59
|
+
* Requests write access to the calendar.
|
|
60
|
+
*
|
|
61
|
+
* @permissions
|
|
62
|
+
* | Platform | Required |
|
|
63
|
+
* |-----------|---------------------|
|
|
64
|
+
* | iOS 17+ | `NSCalendarsWriteOnlyAccessUsageDescription` |
|
|
65
|
+
* | iOS 13-16 | `NSCalendarsUsageDescription` |
|
|
66
|
+
* | Android | `android.permission.WRITE_CALENDAR` |
|
|
67
|
+
*
|
|
68
|
+
* @platform Android, iOS
|
|
69
|
+
* @since 5.4.0
|
|
70
|
+
*/
|
|
71
|
+
requestWriteOnlyCalendarAccess(): Promise<{
|
|
72
|
+
result: PermissionState;
|
|
73
|
+
}>;
|
|
74
|
+
/**
|
|
75
|
+
* Requests read access to the calendar.
|
|
76
|
+
*
|
|
77
|
+
* @permissions
|
|
78
|
+
* | Platform | Required |
|
|
79
|
+
* |-----------|---------------------|
|
|
80
|
+
* | Android | `android.permission.READ_CALENDAR` |
|
|
81
|
+
*
|
|
82
|
+
* @platform Android
|
|
83
|
+
* @since 5.4.0
|
|
84
|
+
*/
|
|
85
|
+
requestReadOnlyCalendarAccess(): Promise<{
|
|
86
|
+
result: PermissionState;
|
|
87
|
+
}>;
|
|
88
|
+
/**
|
|
89
|
+
* Requests read and write access to the calendar.
|
|
90
|
+
*
|
|
91
|
+
* @permissions
|
|
92
|
+
* | Platform | Required |
|
|
93
|
+
* |-----------|---------------------|
|
|
94
|
+
* | iOS 17+ | `NSCalendarsFullAccessUsageDescription` |
|
|
95
|
+
* | iOS 13-16 | `NSCalendarsUsageDescription` |
|
|
96
|
+
* | Android | `android.permission.READ_CALENDAR` & `android.permission.WRITE_CALENDAR` |
|
|
97
|
+
*
|
|
98
|
+
* @platform Android, iOS
|
|
99
|
+
* @since 5.4.0
|
|
100
|
+
*/
|
|
101
|
+
requestFullCalendarAccess(): Promise<{
|
|
102
|
+
result: PermissionState;
|
|
103
|
+
}>;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* @platform Android, iOS
|
|
107
|
+
* @since 7.1.0
|
|
108
|
+
*/
|
|
109
|
+
export declare type CheckAllPermissionsResult = Record<CalendarPermissionScope, PermissionState>;
|
|
110
|
+
/**
|
|
111
|
+
* @platform Android, iOS
|
|
112
|
+
* @since 7.1.0
|
|
113
|
+
*/
|
|
114
|
+
export declare type RequestAllPermissionsResult = CheckAllPermissionsResult;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar-access.js","sourceRoot":"","sources":["../../../src/sub-definitions/calendar-access.ts"],"names":[],"mappings":"","sourcesContent":["import { CalendarPermissionScope } from \"../schemas/enums/calendar-permission-scope\";\nimport type { PermissionState } from \"@capacitor/core\";\n\n/**\n * @since 7.1.0\n */\nexport interface CalendarAccess {\n /**\n * Retrieves the current permission state for a given scope.\n *\n * @example\n * CapacitorCalendar.checkPermission({ scope: CalendarPermissionScope.READ_CALENDAR });\n *\n * @platform Android, iOS\n * @since 0.1.0\n *\n */\n checkPermission(options: {\n scope: CalendarPermissionScope;\n }): Promise<{ result: PermissionState }>;\n\n /**\n * Retrieves the current state of all permissions.\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 *\n * @example\n * this.requestPermission({ scope: CalendarPermissionScope.READ_CALENDAR });\n *\n * @deprecated Use {@link requestWriteOnlyCalendarAccess}, {@link requestReadOnlyCalendarAccess},\n * {@link requestFullCalendarAccess} or {@link requestFullRemindersAccess} instead.\n *\n * @platform Android, iOS\n * @since 0.1.0\n */\n requestPermission(options: {\n scope: CalendarPermissionScope;\n }): Promise<{ result: PermissionState }>;\n\n /**\n * Requests permission for all calendar and reminder permissions.\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<\n CalendarPermissionScope,\n PermissionState\n>;\n\n/**\n * @platform Android, iOS\n * @since 7.1.0\n */\nexport type RequestAllPermissionsResult = CheckAllPermissionsResult;\n"]}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { Calendar } from "../schemas/interfaces/calendar";
|
|
2
|
+
import type { CalendarSource } from "../schemas/interfaces/calendar-source";
|
|
3
|
+
import type { CreateCalendarOptions } from "../schemas/interfaces/create-calendar-options";
|
|
4
|
+
import type { DeleteCalendarOptions } from "../schemas/interfaces/delete-calendar-options";
|
|
5
|
+
import type { OpenCalendarOptions } from "../schemas/interfaces/open-calendar-options";
|
|
6
|
+
import type { SelectCalendarsWithPromptOptions } from "../schemas/interfaces/select-calendars-with-prompt-options";
|
|
7
|
+
export interface CalendarOperations {
|
|
8
|
+
/**
|
|
9
|
+
* Save the changes to the calendar.
|
|
10
|
+
*
|
|
11
|
+
* @platform iOS
|
|
12
|
+
* @since 7.1.0
|
|
13
|
+
*/
|
|
14
|
+
commit(): Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* Opens a system interface to choose one or multiple calendars.
|
|
17
|
+
*
|
|
18
|
+
* @platform iOS
|
|
19
|
+
* @since 0.2.0
|
|
20
|
+
*/
|
|
21
|
+
selectCalendarsWithPrompt(options?: SelectCalendarsWithPromptOptions): Promise<{
|
|
22
|
+
result: Calendar[];
|
|
23
|
+
}>;
|
|
24
|
+
/**
|
|
25
|
+
* Retrieves a list of calendar sources.
|
|
26
|
+
*
|
|
27
|
+
* @platform iOS
|
|
28
|
+
* @since 6.6.0
|
|
29
|
+
*/
|
|
30
|
+
fetchAllCalendarSources(): Promise<{
|
|
31
|
+
result: CalendarSource[];
|
|
32
|
+
}>;
|
|
33
|
+
/**
|
|
34
|
+
* Retrieves a list of all available calendars.
|
|
35
|
+
*
|
|
36
|
+
* @platform Android, iOS
|
|
37
|
+
* @since 7.1.0
|
|
38
|
+
*/
|
|
39
|
+
listCalendars(): Promise<{
|
|
40
|
+
result: Calendar[];
|
|
41
|
+
}>;
|
|
42
|
+
/**
|
|
43
|
+
* Retrieves the default calendar.
|
|
44
|
+
*
|
|
45
|
+
* @platform Android, iOS
|
|
46
|
+
* @since 0.3.0
|
|
47
|
+
*/
|
|
48
|
+
getDefaultCalendar(): Promise<{
|
|
49
|
+
result: Calendar | null;
|
|
50
|
+
}>;
|
|
51
|
+
/**
|
|
52
|
+
* Opens the calendar app.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* CapacitorCalendar.openCalendar({ date: Date.now() });
|
|
56
|
+
*
|
|
57
|
+
* @platform Android, iOS
|
|
58
|
+
* @since 7.1.0
|
|
59
|
+
*/
|
|
60
|
+
openCalendar(options?: OpenCalendarOptions): Promise<void>;
|
|
61
|
+
/**
|
|
62
|
+
* Creates a calendar.
|
|
63
|
+
*
|
|
64
|
+
* @platform Android, iOS
|
|
65
|
+
* @since 5.2.0
|
|
66
|
+
*/
|
|
67
|
+
createCalendar(options: CreateCalendarOptions): Promise<{
|
|
68
|
+
id: string;
|
|
69
|
+
}>;
|
|
70
|
+
/**
|
|
71
|
+
* Deletes a calendar by id.
|
|
72
|
+
*
|
|
73
|
+
* @platform Android, iOS
|
|
74
|
+
* @since 5.2.0
|
|
75
|
+
*/
|
|
76
|
+
deleteCalendar(options: DeleteCalendarOptions): Promise<void>;
|
|
77
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
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 { CalendarSource } from \"../schemas/interfaces/calendar-source\";\nimport type { CreateCalendarOptions } from \"../schemas/interfaces/create-calendar-options\";\nimport type { DeleteCalendarOptions } from \"../schemas/interfaces/delete-calendar-options\";\nimport type { OpenCalendarOptions } from \"../schemas/interfaces/open-calendar-options\";\nimport type { SelectCalendarsWithPromptOptions } from \"../schemas/interfaces/select-calendars-with-prompt-options\";\n\nexport interface CalendarOperations {\n /**\n * Save the changes to the calendar.\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 * @platform iOS\n * @since 0.2.0\n */\n selectCalendarsWithPrompt(\n options?: SelectCalendarsWithPromptOptions,\n ): Promise<{ result: Calendar[] }>;\n /**\n * Retrieves a list of calendar sources.\n *\n * @platform iOS\n * @since 6.6.0\n */\n fetchAllCalendarSources(): Promise<{ result: CalendarSource[] }>;\n /**\n * Retrieves a list of all available calendars.\n *\n * @platform Android, iOS\n * @since 7.1.0\n */\n listCalendars(): Promise<{ result: Calendar[] }>;\n /**\n * Retrieves the default calendar.\n *\n * @platform Android, iOS\n * @since 0.3.0\n */\n getDefaultCalendar(): 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 * @platform Android, iOS\n * @since 5.2.0\n */\n createCalendar(options: CreateCalendarOptions): Promise<{ id: string }>;\n /**\n * Deletes a calendar by id.\n *\n * @platform Android, iOS\n * @since 5.2.0\n */\n deleteCalendar(options: DeleteCalendarOptions): Promise<void>;\n}\n"]}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import type { CalendarEvent } from "../schemas/interfaces/calendar-event";
|
|
2
|
+
import type { CreateEventOptions } from "../schemas/interfaces/create-event-options";
|
|
3
|
+
import type { CreateEventWithPromptOptions } from "../schemas/interfaces/create-event-with-prompt-options";
|
|
4
|
+
import type { DeleteEventOptions } from "../schemas/interfaces/delete-event-options";
|
|
5
|
+
import type { DeleteEventWithPromptOptions } from "../schemas/interfaces/delete-event-with-prompt-options";
|
|
6
|
+
import type { DeleteEventsByIdOptions } from "../schemas/interfaces/delete-events-by-id-options";
|
|
7
|
+
import type { EventEditAction } from "../schemas/types/event-edit-action";
|
|
8
|
+
import type { ListEventsInRangeOptions } from "../schemas/interfaces/list-events-in-range-options";
|
|
9
|
+
import type { ModifyEventOptions } from "../schemas/interfaces/modify-event-options";
|
|
10
|
+
import type { ModifyEventWithPromptOptions } from "../schemas/interfaces/modify-event-with-prompt-options";
|
|
11
|
+
export interface EventOperations {
|
|
12
|
+
/**
|
|
13
|
+
* Opens the system calendar interface to create a new event.
|
|
14
|
+
* On Android always returns `null`.
|
|
15
|
+
* Fetch the events to find the ID of the newly created event.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* const options = {
|
|
19
|
+
* title: 'Test event',
|
|
20
|
+
* startDate: Date.now(),
|
|
21
|
+
* }
|
|
22
|
+
* await CapacitorCalendar.createEventWithPrompt(options)
|
|
23
|
+
*
|
|
24
|
+
* @platform Android, iOS
|
|
25
|
+
* @since 0.1.0
|
|
26
|
+
*/
|
|
27
|
+
createEventWithPrompt(options?: CreateEventWithPromptOptions): Promise<{
|
|
28
|
+
id: string | null;
|
|
29
|
+
}>;
|
|
30
|
+
/**
|
|
31
|
+
* Opens a system calendar interface to modify an event.
|
|
32
|
+
* On Android always returns `null`.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* const options = {
|
|
36
|
+
* id: 'EVENT_ID',
|
|
37
|
+
* title: 'New title',
|
|
38
|
+
* }
|
|
39
|
+
* await CapacitorCalendar.modifyEventWithPrompt(options);
|
|
40
|
+
*
|
|
41
|
+
* @platform Android, iOS
|
|
42
|
+
* @since 6.6.0
|
|
43
|
+
*/
|
|
44
|
+
modifyEventWithPrompt(options: ModifyEventWithPromptOptions): Promise<{
|
|
45
|
+
result: EventEditAction | null;
|
|
46
|
+
}>;
|
|
47
|
+
/**
|
|
48
|
+
* Creates an event in the calendar.
|
|
49
|
+
*
|
|
50
|
+
* @platform iOS, Android
|
|
51
|
+
* @since 0.4.0
|
|
52
|
+
*/
|
|
53
|
+
createEvent(options: CreateEventOptions): Promise<{
|
|
54
|
+
id: string;
|
|
55
|
+
}>;
|
|
56
|
+
/**
|
|
57
|
+
* Modifies an event.
|
|
58
|
+
*
|
|
59
|
+
* @platform Android, iOS
|
|
60
|
+
* @since 6.6.0
|
|
61
|
+
*/
|
|
62
|
+
modifyEvent(options: ModifyEventOptions): Promise<void>;
|
|
63
|
+
/**
|
|
64
|
+
* Deletes multiple events.
|
|
65
|
+
*
|
|
66
|
+
* @deprecated Use `deleteEvent(...)`.
|
|
67
|
+
* @platform Android, iOS
|
|
68
|
+
* @since 0.11.0
|
|
69
|
+
*/
|
|
70
|
+
deleteEventsById(options: DeleteEventsByIdOptions): Promise<{
|
|
71
|
+
result: DeleteEventsByIdResult;
|
|
72
|
+
}>;
|
|
73
|
+
/**
|
|
74
|
+
* Deletes an event.
|
|
75
|
+
*
|
|
76
|
+
* @platform Android, iOS
|
|
77
|
+
* @since 7.1.0
|
|
78
|
+
*/
|
|
79
|
+
deleteEvent(options: DeleteEventOptions): Promise<void>;
|
|
80
|
+
/**
|
|
81
|
+
* Opens a dialog to delete an event.
|
|
82
|
+
*
|
|
83
|
+
* @platform Android, iOS
|
|
84
|
+
* @since 7.1.0
|
|
85
|
+
*/
|
|
86
|
+
deleteEventWithPrompt(options: DeleteEventWithPromptOptions): Promise<{
|
|
87
|
+
deleted: boolean;
|
|
88
|
+
}>;
|
|
89
|
+
/**
|
|
90
|
+
* Retrieves the events within a date range.
|
|
91
|
+
*
|
|
92
|
+
* @platform Android, iOS
|
|
93
|
+
* @since 0.10.0
|
|
94
|
+
*/
|
|
95
|
+
listEventsInRange(options: ListEventsInRangeOptions): Promise<{
|
|
96
|
+
result: CalendarEvent[];
|
|
97
|
+
}>;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* @since 7.1.0
|
|
101
|
+
*/
|
|
102
|
+
export interface DeleteEventsByIdResult {
|
|
103
|
+
/**
|
|
104
|
+
* @since 7.1.0
|
|
105
|
+
*/
|
|
106
|
+
deleted: string[];
|
|
107
|
+
/**
|
|
108
|
+
* @since 7.1.0
|
|
109
|
+
*/
|
|
110
|
+
failed: string[];
|
|
111
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-operations.js","sourceRoot":"","sources":["../../../src/sub-definitions/event-operations.ts"],"names":[],"mappings":"","sourcesContent":["import type { CalendarEvent } from \"../schemas/interfaces/calendar-event\";\nimport type { CreateEventOptions } from \"../schemas/interfaces/create-event-options\";\nimport type { CreateEventWithPromptOptions } from \"../schemas/interfaces/create-event-with-prompt-options\";\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 { EventEditAction } from \"../schemas/types/event-edit-action\";\nimport type { ListEventsInRangeOptions } from \"../schemas/interfaces/list-events-in-range-options\";\nimport type { ModifyEventOptions } from \"../schemas/interfaces/modify-event-options\";\nimport type { ModifyEventWithPromptOptions } from \"../schemas/interfaces/modify-event-with-prompt-options\";\n\nexport interface EventOperations {\n /**\n * Opens the system calendar interface to create a new event.\n * On Android always returns `null`.\n * Fetch the events to find the ID of the newly created event.\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\n * @since 0.1.0\n */\n createEventWithPrompt(\n options?: CreateEventWithPromptOptions,\n ): Promise<{ id: string | null }>;\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(\n options: ModifyEventWithPromptOptions,\n ): Promise<{ result: EventEditAction | null }>;\n /**\n * Creates an event in the calendar.\n *\n * @platform iOS, Android\n * @since 0.4.0\n */\n createEvent(options: CreateEventOptions): Promise<{ id: string }>;\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(\n options: DeleteEventsByIdOptions,\n ): 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(\n options: DeleteEventWithPromptOptions,\n ): Promise<{ deleted: boolean }>;\n /**\n * Retrieves the events within a date range.\n *\n * @platform Android, iOS\n * @since 0.10.0\n */\n listEventsInRange(\n options: ListEventsInRangeOptions,\n ): Promise<{ result: CalendarEvent[] }>;\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"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { PermissionState } from "@capacitor/core";
|
|
2
|
+
/**
|
|
3
|
+
* @since 7.1.0
|
|
4
|
+
*/
|
|
5
|
+
export interface RemindersAccess {
|
|
6
|
+
/**
|
|
7
|
+
* Requests read and write access to the reminders.
|
|
8
|
+
*
|
|
9
|
+
* @permissions
|
|
10
|
+
* | Platform | Required |
|
|
11
|
+
* |-----------|---------------------|
|
|
12
|
+
* | iOS 17+ | `NSRemindersFullAccessUsageDescription` |
|
|
13
|
+
* | iOS 10-16 | `NSRemindersUsageDescription` |
|
|
14
|
+
*
|
|
15
|
+
* @platform iOS
|
|
16
|
+
* @see {@link CalendarPermissionScope}
|
|
17
|
+
* @since 5.4.0
|
|
18
|
+
*/
|
|
19
|
+
requestFullRemindersAccess(): Promise<{
|
|
20
|
+
result: PermissionState;
|
|
21
|
+
}>;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
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 *\n * @permissions\n * | Platform | Required |\n * |-----------|---------------------|\n * | iOS 17+ | `NSRemindersFullAccessUsageDescription` |\n * | iOS 10-16 | `NSRemindersUsageDescription` |\n *\n * @platform iOS\n * @see {@link CalendarPermissionScope}\n * @since 5.4.0\n */\n requestFullRemindersAccess(): Promise<{ result: PermissionState }>;\n}\n"]}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { CalendarSource } from "../schemas/interfaces/calendar-source";
|
|
2
|
+
import type { CreateReminderOptions } from "../schemas/interfaces/create-reminder-options";
|
|
3
|
+
import type { DeleteReminderOptions } from "../schemas/interfaces/delete-reminder-options";
|
|
4
|
+
import type { DeleteRemindersByIdOptions } from "../schemas/interfaces/delete-reminders-by-id-options";
|
|
5
|
+
import type { GetReminderByIdOptions } from "../schemas/interfaces/get-reminder-by-id-options";
|
|
6
|
+
import type { GetRemindersFromListsOptions } from "../schemas/interfaces/get-reminders-from-lists-options";
|
|
7
|
+
import type { ModifyReminderOptions } from "../schemas/interfaces/modify-reminder-options";
|
|
8
|
+
import type { Reminder } from "../schemas/interfaces/reminder";
|
|
9
|
+
import type { RemindersList } from "../schemas/interfaces/reminders-list";
|
|
10
|
+
export interface RemindersOperations {
|
|
11
|
+
/**
|
|
12
|
+
* Retrieves a list of calendar sources.
|
|
13
|
+
*
|
|
14
|
+
* @deprecated Duplicates {@link CalendarOperations#fetchAllCalendarSources}
|
|
15
|
+
* @platform iOS
|
|
16
|
+
* @since 6.6.0
|
|
17
|
+
*/
|
|
18
|
+
fetchAllRemindersSources(): Promise<{
|
|
19
|
+
result: CalendarSource[];
|
|
20
|
+
}>;
|
|
21
|
+
/**
|
|
22
|
+
* Opens the reminders app.
|
|
23
|
+
*
|
|
24
|
+
* @platform iOS
|
|
25
|
+
* @since 7.1.0
|
|
26
|
+
*/
|
|
27
|
+
openReminders(): Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Retrieves the default reminders list.
|
|
30
|
+
*
|
|
31
|
+
* @platform iOS
|
|
32
|
+
* @since 7.1.0
|
|
33
|
+
*/
|
|
34
|
+
getDefaultRemindersList(): Promise<{
|
|
35
|
+
result: RemindersList | null;
|
|
36
|
+
}>;
|
|
37
|
+
/**
|
|
38
|
+
* Retrieves all available reminders lists.
|
|
39
|
+
*
|
|
40
|
+
* @platform iOS
|
|
41
|
+
* @since 7.1.0
|
|
42
|
+
*/
|
|
43
|
+
getRemindersLists(): Promise<{
|
|
44
|
+
result: RemindersList[];
|
|
45
|
+
}>;
|
|
46
|
+
/**
|
|
47
|
+
* Creates a reminder.
|
|
48
|
+
*
|
|
49
|
+
* @platform iOS
|
|
50
|
+
* @since 0.5.0
|
|
51
|
+
*/
|
|
52
|
+
createReminder(options: CreateReminderOptions): Promise<{
|
|
53
|
+
id: string;
|
|
54
|
+
}>;
|
|
55
|
+
/**
|
|
56
|
+
* Deletes multiple reminders.
|
|
57
|
+
*
|
|
58
|
+
* @deprecated Use `deleteReminder(...)`.
|
|
59
|
+
* @platform iOS
|
|
60
|
+
* @since 5.3.0
|
|
61
|
+
*/
|
|
62
|
+
deleteRemindersById(options: DeleteRemindersByIdOptions): Promise<{
|
|
63
|
+
result: DeleteRemindersByIdResult;
|
|
64
|
+
}>;
|
|
65
|
+
/**
|
|
66
|
+
* Deletes a reminder.
|
|
67
|
+
*
|
|
68
|
+
* @platform iOS
|
|
69
|
+
* @since 7.1.0
|
|
70
|
+
*/
|
|
71
|
+
deleteReminder(options: DeleteReminderOptions): Promise<void>;
|
|
72
|
+
/**
|
|
73
|
+
* Modifies a reminder.
|
|
74
|
+
*
|
|
75
|
+
* @platform iOS
|
|
76
|
+
* @since 6.7.0
|
|
77
|
+
*/
|
|
78
|
+
modifyReminder(options: ModifyReminderOptions): Promise<void>;
|
|
79
|
+
/**
|
|
80
|
+
* Retrieve a reminder by ID.
|
|
81
|
+
*
|
|
82
|
+
* @platform iOS
|
|
83
|
+
* @since 7.1.0
|
|
84
|
+
*/
|
|
85
|
+
getReminderById(options: GetReminderByIdOptions): Promise<{
|
|
86
|
+
result: Reminder | null;
|
|
87
|
+
}>;
|
|
88
|
+
/**
|
|
89
|
+
* Retrieves reminders from multiple lists.
|
|
90
|
+
*
|
|
91
|
+
* @platform iOS
|
|
92
|
+
* @since 5.3.0
|
|
93
|
+
*/
|
|
94
|
+
getRemindersFromLists(options: GetRemindersFromListsOptions): Promise<{
|
|
95
|
+
result: Reminder[];
|
|
96
|
+
}>;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* @since 7.1.0
|
|
100
|
+
*/
|
|
101
|
+
export interface DeleteRemindersByIdResult {
|
|
102
|
+
/**
|
|
103
|
+
* @since 7.1.0
|
|
104
|
+
*/
|
|
105
|
+
deleted: string[];
|
|
106
|
+
/**
|
|
107
|
+
* @since 7.1.0
|
|
108
|
+
*/
|
|
109
|
+
failed: string[];
|
|
110
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reminders-operations.js","sourceRoot":"","sources":["../../../src/sub-definitions/reminders-operations.ts"],"names":[],"mappings":"","sourcesContent":["import type { CalendarSource } from \"../schemas/interfaces/calendar-source\";\nimport type { CreateReminderOptions } from \"../schemas/interfaces/create-reminder-options\";\nimport type { DeleteReminderOptions } from \"../schemas/interfaces/delete-reminder-options\";\nimport type { DeleteRemindersByIdOptions } from \"../schemas/interfaces/delete-reminders-by-id-options\";\nimport type { GetReminderByIdOptions } from \"../schemas/interfaces/get-reminder-by-id-options\";\nimport type { GetRemindersFromListsOptions } from \"../schemas/interfaces/get-reminders-from-lists-options\";\nimport type { ModifyReminderOptions } from \"../schemas/interfaces/modify-reminder-options\";\nimport type { Reminder } from \"../schemas/interfaces/reminder\";\nimport type { RemindersList } from \"../schemas/interfaces/reminders-list\";\n\nexport interface RemindersOperations {\n /**\n * Retrieves a list of calendar sources.\n *\n * @deprecated Duplicates {@link CalendarOperations#fetchAllCalendarSources}\n * @platform iOS\n * @since 6.6.0\n */\n fetchAllRemindersSources(): Promise<{ result: CalendarSource[] }>;\n /**\n * Opens the reminders app.\n *\n * @platform iOS\n * @since 7.1.0\n */\n openReminders(): Promise<void>;\n /**\n * Retrieves the default reminders list.\n *\n * @platform iOS\n * @since 7.1.0\n */\n getDefaultRemindersList(): Promise<{ result: RemindersList | null }>;\n /**\n * Retrieves all available reminders lists.\n *\n * @platform iOS\n * @since 7.1.0\n */\n getRemindersLists(): Promise<{ result: RemindersList[] }>;\n /**\n * Creates a reminder.\n *\n * @platform iOS\n * @since 0.5.0\n */\n createReminder(options: CreateReminderOptions): Promise<{ id: string }>;\n /**\n * Deletes multiple reminders.\n *\n * @deprecated Use `deleteReminder(...)`.\n * @platform iOS\n * @since 5.3.0\n */\n deleteRemindersById(\n options: DeleteRemindersByIdOptions,\n ): Promise<{ result: DeleteRemindersByIdResult }>;\n /**\n * Deletes a reminder.\n *\n * @platform iOS\n * @since 7.1.0\n */\n deleteReminder(options: DeleteReminderOptions): Promise<void>;\n /**\n * Modifies a reminder.\n *\n * @platform iOS\n * @since 6.7.0\n */\n modifyReminder(options: ModifyReminderOptions): Promise<void>;\n /**\n * Retrieve a reminder by ID.\n *\n * @platform iOS\n * @since 7.1.0\n */\n getReminderById(\n options: GetReminderByIdOptions,\n ): Promise<{ result: Reminder | null }>;\n /**\n * Retrieves reminders from multiple lists.\n *\n * @platform iOS\n * @since 5.3.0\n */\n getRemindersFromLists(\n options: GetRemindersFromListsOptions,\n ): Promise<{ result: Reminder[] }>;\n}\n\n/**\n * @since 7.1.0\n */\nexport interface DeleteRemindersByIdResult {\n /**\n * @since 7.1.0\n */\n deleted: string[];\n /**\n * @since 7.1.0\n */\n failed: string[];\n}\n"]}
|