@ebarooni/capacitor-calendar 6.7.1 → 7.0.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.
Files changed (34) hide show
  1. package/EbarooniCapacitorCalendar.podspec +2 -2
  2. package/Package.swift +28 -0
  3. package/README.md +690 -98
  4. package/android/build.gradle +15 -11
  5. package/dist/docs.json +47 -22
  6. package/dist/esm/schemas/enums/plugin-permission.js.map +1 -1
  7. package/dist/esm/schemas/interfaces/plugin-permissions-map.d.ts +2 -4
  8. package/dist/esm/schemas/interfaces/plugin-permissions-map.js.map +1 -1
  9. package/dist/esm/schemas/interfaces/reminder-recurrence-rule.d.ts +1 -1
  10. package/dist/esm/schemas/interfaces/reminder-recurrence-rule.js.map +1 -1
  11. package/dist/esm/schemas/interfaces/reminder.d.ts +1 -1
  12. package/dist/esm/schemas/interfaces/reminder.js.map +1 -1
  13. package/dist/esm/schemas/interfaces/reminders-list.d.ts +2 -3
  14. package/dist/esm/schemas/interfaces/reminders-list.js.map +1 -1
  15. package/dist/plugin.cjs.js.map +1 -1
  16. package/dist/plugin.js.map +1 -1
  17. package/ios/{Plugin → Sources/CapacitorCalendarPlugin}/CapacitorCalendarPlugin.swift +35 -6
  18. package/ios/{Plugin → Sources/CapacitorCalendarPlugin}/CapacitorCalendarPluginError.swift +0 -8
  19. package/ios/{Plugin → Sources/CapacitorCalendarPlugin}/CapacitorReminders.swift +0 -8
  20. package/ios/{Plugin → Sources/CapacitorCalendarPlugin}/EventCreationParameters.swift +0 -8
  21. package/ios/Sources/CapacitorCalendarPlugin/EventDeleteResults.swift +6 -0
  22. package/ios/{Plugin → Sources/CapacitorCalendarPlugin}/PermissionState.swift +0 -8
  23. package/ios/Sources/CapacitorCalendarPlugin/RecurrenceParameters.swift +7 -0
  24. package/ios/{Plugin → Sources/CapacitorCalendarPlugin}/ReminderCreationParameters.swift +0 -8
  25. package/ios/{Plugin → Sources/CapacitorCalendarPlugin}/UIColorExtensions.swift +0 -8
  26. package/ios/Tests/CapacitorCalendarPluginTests/CapacitorCalendarPluginTests.swift +15 -0
  27. package/package.json +23 -26
  28. package/assets/images/text-logo.png +0 -0
  29. package/ios/Plugin/CapacitorCalendarPlugin.h +0 -10
  30. package/ios/Plugin/CapacitorCalendarPlugin.m +0 -36
  31. package/ios/Plugin/EventDeleteResults.swift +0 -14
  32. package/ios/Plugin/Info.plist +0 -24
  33. package/ios/Plugin/RecurrenceParameters.swift +0 -15
  34. /package/ios/{Plugin → Sources/CapacitorCalendarPlugin}/CapacitorCalendar.swift +0 -0
package/README.md CHANGED
@@ -1,22 +1,12 @@
1
1
  <p align="center">
2
2
  <img src="assets/images/text-logo.png" alt="capacitor-calendar-logo" height="136"/>
3
+
3
4
  <br>
4
5
  <em>
5
- The Capacitor Calendar Plugin enables full calendar functionality on iOS and Android, with added reminder support for iOS devices.
6
+ A capacitor plugin for managing calendar events on iOS and Android, with reminder support on iOS.
6
7
  </em>
7
8
  </p>
8
- <p align="center">
9
- <a href="https://capacitor-calendar.pages.dev/"><strong>https://capacitor-calendar.pages.dev</strong></a>
10
- <br>
11
- </p>
12
- <p align="center">
13
- <a href="documentation.md">Documentation</a>
14
- ·
15
- <a href="SECURITY.md#capacitor-compatibility">Capacitor Compatibility</a>
16
- ·
17
- <a href="SECURITY.md#deployment-targets">Deployment Targets</a>
18
- <br>
19
- </p>
9
+
20
10
  <p align="center">
21
11
  <img src="https://img.shields.io/maintenance/yes/2024?style=flat-square" />
22
12
  <a href="https://www.npmjs.com/package/@ebarooni/capacitor-calendar"><img src="https://img.shields.io/npm/l/@ebarooni/capacitor-calendar?style=flat-square" /></a>
@@ -28,90 +18,38 @@
28
18
  ## Table of Contents
29
19
 
30
20
  - [Installation](#installation)
31
- - [Stable](#stable)
32
- - [Capacitor 6](#capacitor-6)
33
- - [Capacitor 5](#capacitor-5)
34
- - [Development](#development)
35
- - [Setup](#setup)
36
- - [Install](#install-1)
37
- - [Demo](#demo--click-for-details-)
38
- - [Permissions](#permissions)
39
- - [API](#-api)
21
+ - [Demo](#demo)
22
+ - [Setup](#setup)
40
23
  - [Documentation](#-documentation)
41
- - [Contributions](#-contributions)
24
+ - [API](#-api)
25
+ - [Changelog](#changelog)
26
+ - [Contributing](#contributing)
27
+ - [License](#license)
42
28
 
43
29
  ## Installation
44
30
 
45
- To use this package, follow the instructions for installing either the stable or development release.
46
- Stable releases are recommended for production, while development releases provide access to the latest features and
47
- fixes which are still under development.
48
-
49
- ### Stable
50
-
51
- The stable releases are published to the npm package registry.
52
-
53
- #### Capacitor 6
54
-
55
- ```bash
56
- npm install @ebarooni/capacitor-calendar@latest
57
- npx cap sync
58
- ```
59
-
60
- #### Capacitor 5
61
-
62
- > [!IMPORTANT]
63
- > This plugin no longer receives updates for Capacitor v5 and only supports the latest version.
64
-
65
- ```bash
66
- npm install @ebarooni/capacitor-calendar@^5
67
- npx cap sync
68
- ```
69
-
70
- ### Development
71
-
72
- Development releases are published to the GitHub package registry. These releases are automatically generated from the
73
- latest state of the `develop branch every time a pull request is merged into it.
74
-
75
- > [!WARNING]
76
- > Development releases are not recommended for production use as they may contain untested or experimental changes.
77
-
78
- #### Setup
79
-
80
- Create an `.npmrc` file and place it in the root of your project with the following content:
81
-
82
- ```
83
- //npm.pkg.github.com/:_authToken=$GITHUB_PAT
84
- @ebarooni:registry=https://npm.pkg.github.com
85
- always-auth=true
86
- ```
87
-
88
- Replace `$GITHUB_PAT` with your own personal access token with at least `read:packages` scope.
89
-
90
- #### Install
91
-
92
31
  ```bash
93
32
  npm install @ebarooni/capacitor-calendar
94
33
  npx cap sync
95
34
  ```
96
35
 
97
- ## [Demo (click for details)](./example/README.md)
36
+ ## Demo
98
37
 
99
- | iOS 17 | Android 14 |
100
- | :------------------------------------: | :----------------------------------------: |
101
- | ![](./example/src/assets/ios-demo.gif) | ![](./example/src/assets/android-demo.gif) |
38
+ | iOS 17 | Android 14 |
39
+ | :-----------------------------: | :---------------------------------: |
40
+ | ![](./assets/demo/ios-demo.gif) | ![](./assets/demo/android-demo.gif) |
102
41
 
103
- On iOS, `readCalendar` permission is not needed when you a
42
+ ## Setup
104
43
 
105
- re creating an event using the native prompt.
106
- The video is just for showing the functionality, otherwise the `createEventWithPrompt` method works without the `readCalendar` authorization.
44
+ - [iOS](./docs/ios.md)
45
+ - [Android](./docs/android.md)
107
46
 
108
- ## Permissions
47
+ ## 📚 Documentation
109
48
 
110
- To be able to use the plugin, you will need to add the required usage descriptions to your app. The required platform-specific
111
- usage descriptions can be found below:
49
+ For comprehensive explanations, usage examples, and additional information, please refer to the following resources:
112
50
 
113
- - [iOS](./docs/usage-descriptions/ios.md)
114
- - [Android](./docs/usage-descriptions/android.md)
51
+ - **[Online Documentation](https://ebarooni.github.io/capacitor-calendar/)**
52
+ - **[Type Definitions and Examples](src/definitions.ts)**
115
53
 
116
54
  ## 📋 API
117
55
 
@@ -152,22 +90,676 @@ usage descriptions can be found below:
152
90
 
153
91
  </docgen-index>
154
92
 
155
- ## 📚 Documentation
93
+ <docgen-api>
94
+ <!--Update the source file JSDoc comments and rerun docgen to update the docs below-->
156
95
 
157
- For comprehensive explanations, usage examples, and additional information, please refer to the following resources:
96
+ ### checkPermission(...)
158
97
 
159
- - **[Online Documentation](https://ebarooni.github.io/capacitor-calendar/)**
160
- - **[API Reference](docs/api-reference.md)**
161
- - **[Type Definitions and Examples](src/definitions.ts)**
98
+ ```typescript
99
+ checkPermission(options: { alias: PluginPermission; }) => Promise<{ result: PermissionState; }>
100
+ ```
101
+
102
+ Checks the current authorization status of a specific permission.
103
+
104
+ | Param | Type | Description |
105
+ | ------------- | ------------------------------------------------------------------------- | ----------------------------------------- |
106
+ | **`options`** | <code>{ alias: <a href="#pluginpermission">PluginPermission</a>; }</code> | An object with the name of the permission |
107
+
108
+ **Returns:** <code>Promise&lt;{ result: <a href="#permissionstate">PermissionState</a>; }&gt;</code>
109
+
110
+ **Since:** 0.1.0
111
+
112
+ --------------------
113
+
114
+
115
+ ### checkAllPermissions()
116
+
117
+ ```typescript
118
+ checkAllPermissions() => Promise<PluginPermissionsMap>
119
+ ```
120
+
121
+ Checks the current authorization status of all the required permissions for the plugin.
122
+
123
+ **Returns:** <code>Promise&lt;<a href="#pluginpermissionsmap">PluginPermissionsMap</a>&gt;</code>
124
+
125
+ **Since:** 0.1.0
126
+
127
+ --------------------
128
+
129
+
130
+ ### requestPermission(...)
131
+
132
+ ```typescript
133
+ requestPermission(options: { alias: PluginPermission; }) => Promise<{ result: PermissionState; }>
134
+ ```
135
+
136
+ Requests authorization to a specific permission, if not already granted.
137
+ If the permission is already granted, it will directly return the status.
138
+
139
+ | Param | Type | Description |
140
+ | ------------- | ------------------------------------------------------------------------- | ----------------------------------------- |
141
+ | **`options`** | <code>{ alias: <a href="#pluginpermission">PluginPermission</a>; }</code> | An object with the name of the permission |
142
+
143
+ **Returns:** <code>Promise&lt;{ result: <a href="#permissionstate">PermissionState</a>; }&gt;</code>
144
+
145
+ **Since:** 0.1.0
146
+
147
+ --------------------
148
+
149
+
150
+ ### requestAllPermissions()
151
+
152
+ ```typescript
153
+ requestAllPermissions() => Promise<PluginPermissionsMap>
154
+ ```
155
+
156
+ Requests authorization to all the required permissions for the plugin, if they have not already been granted.
157
+
158
+ **Returns:** <code>Promise&lt;<a href="#pluginpermissionsmap">PluginPermissionsMap</a>&gt;</code>
159
+
160
+ **Since:** 0.1.0
161
+
162
+ --------------------
163
+
164
+
165
+ ### createEventWithPrompt(...)
166
+
167
+ ```typescript
168
+ createEventWithPrompt(options: { title: string; calendarId?: string; location?: string; startDate?: number; endDate?: number; isAllDay?: boolean; alertOffsetInMinutes?: number | number[]; url?: string; notes?: string; eventIdOptional?: boolean; }) => Promise<{ result: string[]; }>
169
+ ```
170
+
171
+ Creates an event in the calendar by using the native calendar.
172
+ On iOS opens a native sheet and on Android opens an intent.
173
+
174
+ | Param | Type | Description |
175
+ | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- |
176
+ | **`options`** | <code>{ title: string; calendarId?: string; location?: string; startDate?: number; endDate?: number; isAllDay?: boolean; alertOffsetInMinutes?: number \| number[]; url?: string; notes?: string; eventIdOptional?: boolean; }</code> | Options for creating the event. |
177
+
178
+ **Returns:** <code>Promise&lt;{ result: string[]; }&gt;</code>
179
+
180
+ **Since:** 0.1.0
181
+
182
+ --------------------
183
+
184
+
185
+ ### selectCalendarsWithPrompt(...)
186
+
187
+ ```typescript
188
+ selectCalendarsWithPrompt(options: { displayStyle: CalendarChooserDisplayStyle; selectionStyle: CalendarChooserSelectionStyle; }) => Promise<{ result: Calendar[]; }>
189
+ ```
190
+
191
+ Presents a prompt to the user to select calendars. This method is available only on iOS.
192
+
193
+ | Param | Type | Description |
194
+ | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
195
+ | **`options`** | <code>{ displayStyle: <a href="#calendarchooserdisplaystyle">CalendarChooserDisplayStyle</a>; selectionStyle: <a href="#calendarchooserselectionstyle">CalendarChooserSelectionStyle</a>; }</code> | - Options for customizing the display and selection styles of the calendar chooser. |
196
+
197
+ **Returns:** <code>Promise&lt;{ result: Calendar[]; }&gt;</code>
198
+
199
+ **Since:** 0.2.0
200
+
201
+ --------------------
202
+
203
+
204
+ ### listCalendars()
205
+
206
+ ```typescript
207
+ listCalendars() => Promise<{ result: Calendar[]; }>
208
+ ```
209
+
210
+ Retrieves a list of calendars available on the device.
211
+
212
+ **Returns:** <code>Promise&lt;{ result: Calendar[]; }&gt;</code>
213
+
214
+ --------------------
215
+
216
+
217
+ ### getDefaultCalendar()
218
+
219
+ ```typescript
220
+ getDefaultCalendar() => Promise<{ result: Calendar | null; }>
221
+ ```
222
+
223
+ Retrieves the default calendar set on the device.
224
+
225
+ **Returns:** <code>Promise&lt;{ result: <a href="#calendar">Calendar</a> | null; }&gt;</code>
226
+
227
+ **Since:** 0.3.0
228
+
229
+ --------------------
230
+
231
+
232
+ ### createEvent(...)
233
+
234
+ ```typescript
235
+ createEvent(options: { title: string; calendarId?: string; location?: string; startDate?: number; endDate?: number; isAllDay?: boolean; alertOffsetInMinutes?: number | number[]; url?: string; notes?: string; }) => Promise<{ result: string; }>
236
+ ```
237
+
238
+ Creates an event with the provided options.
239
+
240
+ | Param | Type | Description |
241
+ | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- |
242
+ | **`options`** | <code>{ title: string; calendarId?: string; location?: string; startDate?: number; endDate?: number; isAllDay?: boolean; alertOffsetInMinutes?: number \| number[]; url?: string; notes?: string; }</code> | Options for creating the event. |
243
+
244
+ **Returns:** <code>Promise&lt;{ result: string; }&gt;</code>
245
+
246
+ **Since:** 0.4.0
247
+
248
+ --------------------
249
+
250
+
251
+ ### getDefaultRemindersList()
252
+
253
+ ```typescript
254
+ getDefaultRemindersList() => Promise<{ result: RemindersList; }>
255
+ ```
256
+
257
+ Retrieves the default reminders list set on the device.
258
+
259
+ **Returns:** <code>Promise&lt;{ result: <a href="#calendar">Calendar</a>; }&gt;</code>
260
+
261
+ --------------------
262
+
263
+
264
+ ### getRemindersLists()
265
+
266
+ ```typescript
267
+ getRemindersLists() => Promise<{ result: RemindersList[]; }>
268
+ ```
269
+
270
+ Retrieves all available reminders lists on the device.
271
+
272
+ **Returns:** <code>Promise&lt;{ result: Calendar[]; }&gt;</code>
273
+
274
+ --------------------
275
+
276
+
277
+ ### createReminder(...)
278
+
279
+ ```typescript
280
+ createReminder(options: { title: string; listId?: string; priority?: number; isCompleted?: boolean; startDate?: number; dueDate?: number; completionDate?: number; notes?: string; url?: string; location?: string; recurrence?: ReminderRecurrenceRule; }) => Promise<{ result: string; }>
281
+ ```
282
+
283
+ Creates a reminder with the provided options.
284
+
285
+ | Param | Type | Description |
286
+ | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
287
+ | **`options`** | <code>{ title: string; listId?: string; priority?: number; isCompleted?: boolean; startDate?: number; dueDate?: number; completionDate?: number; notes?: string; url?: string; location?: string; recurrence?: <a href="#reminderrecurrencerule">ReminderRecurrenceRule</a>; }</code> | - Options for creating the reminder. |
288
+
289
+ **Returns:** <code>Promise&lt;{ result: string; }&gt;</code>
290
+
291
+ **Since:** 0.5.0
292
+
293
+ --------------------
294
+
295
+
296
+ ### openCalendar(...)
297
+
298
+ ```typescript
299
+ openCalendar(options: { date?: number; }) => Promise<void>
300
+ ```
301
+
302
+ Opens the calendar app. Since the user leaves your app, use this method with caution.
303
+ It will open the calendar on today's date if no date is provided.
304
+
305
+ | Param | Type | Description |
306
+ | ------------- | ------------------------------- | ----------------------------------- |
307
+ | **`options`** | <code>{ date?: number; }</code> | - Options for opening the calendar. |
308
+
309
+ --------------------
310
+
311
+
312
+ ### openReminders()
313
+
314
+ ```typescript
315
+ openReminders() => Promise<void>
316
+ ```
317
+
318
+ Opens the reminders app. Since the user leaves your app, use this method with caution.
319
+
320
+ --------------------
321
+
322
+
323
+ ### listEventsInRange(...)
324
+
325
+ ```typescript
326
+ listEventsInRange(options: { startDate: number; endDate: number; }) => Promise<{ result: CalendarEvent[]; }>
327
+ ```
328
+
329
+ Retrieves the list of calendar events present in the given date range.
330
+
331
+ | Param | Type | Description |
332
+ | ------------- | ---------------------------------------------------- | ------------------------------------ |
333
+ | **`options`** | <code>{ startDate: number; endDate: number; }</code> | Options for defining the date range. |
334
+
335
+ **Returns:** <code>Promise&lt;{ result: CalendarEvent[]; }&gt;</code>
336
+
337
+ **Since:** 0.10.0
338
+
339
+ --------------------
340
+
341
+
342
+ ### deleteEventsById(...)
343
+
344
+ ```typescript
345
+ deleteEventsById(options: { ids: string[]; }) => Promise<{ result: { deleted: string[]; failed: string[]; }; }>
346
+ ```
347
+
348
+ Deletes events from the calendar given their IDs.
349
+
350
+ | Param | Type | Description |
351
+ | ------------- | ------------------------------- | ------------------------------- |
352
+ | **`options`** | <code>{ ids: string[]; }</code> | Options for defining event IDs. |
353
+
354
+ **Returns:** <code>Promise&lt;{ result: { deleted: string[]; failed: string[]; }; }&gt;</code>
355
+
356
+ **Since:** 0.11.0
357
+
358
+ --------------------
359
+
360
+
361
+ ### createCalendar(...)
362
+
363
+ ```typescript
364
+ createCalendar(options: { title: string; color?: string; sourceId?: string; }) => Promise<{ result: string; }>
365
+ ```
366
+
367
+ Creates a calendar
368
+
369
+ | Param | Type | Description |
370
+ | ------------- | ------------------------------------------------------------------ | -------------------------------- |
371
+ | **`options`** | <code>{ title: string; color?: string; sourceId?: string; }</code> | Options for creating a calendar. |
372
+
373
+ **Returns:** <code>Promise&lt;{ result: string; }&gt;</code>
374
+
375
+ **Since:** 5.2.0
376
+
377
+ --------------------
378
+
379
+
380
+ ### deleteCalendar(...)
381
+
382
+ ```typescript
383
+ deleteCalendar(options: { id: string; }) => Promise<void>
384
+ ```
385
+
386
+ Deletes a calendar by id
387
+
388
+ | Param | Type | Description |
389
+ | ------------- | ---------------------------- | -------------------------------- |
390
+ | **`options`** | <code>{ id: string; }</code> | Options for deleting a calendar. |
391
+
392
+ **Since:** 5.2.0
393
+
394
+ --------------------
395
+
396
+
397
+ ### getRemindersFromLists(...)
398
+
399
+ ```typescript
400
+ getRemindersFromLists(options?: { listIds: string[]; } | undefined) => Promise<{ result: Reminder[]; }>
401
+ ```
402
+
403
+ Retrieves the list of reminders present in the given date range.
404
+
405
+ | Param | Type | Description |
406
+ | ------------- | ----------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
407
+ | **`options`** | <code>{ listIds: string[]; }</code> | Options for defining the date range. It Will fetch all reminders from all available lists if not provided. (Optional) |
408
+
409
+ **Returns:** <code>Promise&lt;{ result: Reminder[]; }&gt;</code>
410
+
411
+ **Since:** 5.3.0
412
+
413
+ --------------------
414
+
415
+
416
+ ### deleteRemindersById(...)
417
+
418
+ ```typescript
419
+ deleteRemindersById(options: { ids: string[]; }) => Promise<{ result: { deleted: string[]; failed: string[]; }; }>
420
+ ```
421
+
422
+ Deletes reminders given their IDs.
423
+
424
+ | Param | Type | Description |
425
+ | ------------- | ------------------------------- | ---------------------------------- |
426
+ | **`options`** | <code>{ ids: string[]; }</code> | Options for defining reminder IDs. |
427
+
428
+ **Returns:** <code>Promise&lt;{ result: { deleted: string[]; failed: string[]; }; }&gt;</code>
429
+
430
+ **Since:** 5.3.0
431
+
432
+ --------------------
433
+
434
+
435
+ ### requestWriteOnlyCalendarAccess()
436
+
437
+ ```typescript
438
+ requestWriteOnlyCalendarAccess() => Promise<{ result: PermissionState; }>
439
+ ```
440
+
441
+ Requests write access for the calendar. If its already granted, it will directly return the state.
442
+
443
+ **Returns:** <code>Promise&lt;{ result: <a href="#permissionstate">PermissionState</a>; }&gt;</code>
444
+
445
+ **Since:** 5.4.0
446
+
447
+ --------------------
448
+
449
+
450
+ ### requestReadOnlyCalendarAccess()
451
+
452
+ ```typescript
453
+ requestReadOnlyCalendarAccess() => Promise<{ result: PermissionState; }>
454
+ ```
455
+
456
+ Requests read access for the calendar. If its already granted, it will directly return the state.
457
+
458
+ **Returns:** <code>Promise&lt;{ result: <a href="#permissionstate">PermissionState</a>; }&gt;</code>
459
+
460
+ **Since:** 5.4.0
461
+
462
+ --------------------
463
+
464
+
465
+ ### requestFullCalendarAccess()
466
+
467
+ ```typescript
468
+ requestFullCalendarAccess() => Promise<{ result: PermissionState; }>
469
+ ```
470
+
471
+ Requests read and write access for the calendar. If its already granted, it will directly return the state.
472
+
473
+ **Returns:** <code>Promise&lt;{ result: <a href="#permissionstate">PermissionState</a>; }&gt;</code>
474
+
475
+ **Since:** 5.4.0
476
+
477
+ --------------------
478
+
479
+
480
+ ### requestFullRemindersAccess()
481
+
482
+ ```typescript
483
+ requestFullRemindersAccess() => Promise<{ result: PermissionState; }>
484
+ ```
485
+
486
+ Requests read and write access for the reminders. If its already granted, it will directly return the state.
487
+
488
+ **Returns:** <code>Promise&lt;{ result: <a href="#permissionstate">PermissionState</a>; }&gt;</code>
489
+
490
+ **Since:** 5.4.0
491
+
492
+ --------------------
493
+
494
+
495
+ ### modifyEventWithPrompt(...)
496
+
497
+ ```typescript
498
+ modifyEventWithPrompt(options: { id: string; update?: { title?: string; calendarId?: string; location?: string; startDate?: number; endDate?: number; isAllDay?: boolean; alertOffsetInMinutes?: number | number[]; url?: string; notes?: string; }; }) => Promise<{ result: string[]; }>
499
+ ```
500
+
501
+ Opens a native prompt to modify an event given its id.
502
+
503
+ | Param | Type | Description |
504
+ | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- |
505
+ | **`options`** | <code>{ id: string; update?: { title?: string; calendarId?: string; location?: string; startDate?: number; endDate?: number; isAllDay?: boolean; alertOffsetInMinutes?: number \| number[]; url?: string; notes?: string; }; }</code> | The options for modifying an event. |
506
+
507
+ **Returns:** <code>Promise&lt;{ result: string[]; }&gt;</code>
508
+
509
+ **Since:** 6.6.0
510
+
511
+ --------------------
512
+
513
+
514
+ ### modifyEvent(...)
515
+
516
+ ```typescript
517
+ modifyEvent(options: { id: string; span?: EventSpan; update: { title?: string; calendarId?: string; location?: string; startDate?: number; endDate?: number; isAllDay?: boolean; alertOffsetInMinutes?: number | number[]; url?: string; notes?: string; }; }) => Promise<void>
518
+ ```
519
+
520
+ Modifies an event given its id and update details.
521
+
522
+ | Param | Type | Description |
523
+ | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
524
+ | **`options`** | <code>{ id: string; span?: <a href="#eventspan">EventSpan</a>; update: { title?: string; calendarId?: string; location?: string; startDate?: number; endDate?: number; isAllDay?: boolean; alertOffsetInMinutes?: number \| number[]; url?: string; notes?: string; }; }</code> | The options for updating an event. |
525
+
526
+ **Since:** 6.6.0
527
+
528
+ --------------------
529
+
530
+
531
+ ### fetchAllCalendarSources()
532
+
533
+ ```typescript
534
+ fetchAllCalendarSources() => Promise<{ result: CalendarSource[]; }>
535
+ ```
536
+
537
+ Retrieves a list of calendar sources.
538
+
539
+ **Returns:** <code>Promise&lt;{ result: CalendarSource[]; }&gt;</code>
540
+
541
+ **Since:** 6.6.0
542
+
543
+ --------------------
544
+
545
+
546
+ ### fetchAllRemindersSources()
547
+
548
+ ```typescript
549
+ fetchAllRemindersSources() => Promise<{ result: CalendarSource[]; }>
550
+ ```
551
+
552
+ Retrieves a list of reminders sources.
553
+
554
+ **Returns:** <code>Promise&lt;{ result: CalendarSource[]; }&gt;</code>
555
+
556
+ **Since:** 6.6.0
557
+
558
+ --------------------
559
+
560
+
561
+ ### modifyReminder(...)
562
+
563
+ ```typescript
564
+ modifyReminder(options: { id: string; update: { title?: string; listId?: string; priority?: number; isCompleted?: boolean; startDate?: number; dueDate?: number; completionDate?: number; notes?: string; url?: string; location?: string; recurrence?: ReminderRecurrenceRule; }; }) => Promise<void>
565
+ ```
566
+
567
+ Modifies a reminder given its id and update details.
568
+
569
+ | Param | Type | Description |
570
+ | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
571
+ | **`options`** | <code>{ id: string; update: { title?: string; listId?: string; priority?: number; isCompleted?: boolean; startDate?: number; dueDate?: number; completionDate?: number; notes?: string; url?: string; location?: string; recurrence?: <a href="#reminderrecurrencerule">ReminderRecurrenceRule</a>; }; }</code> | The options for updating a reminder. |
572
+
573
+ **Since:** 6.7.0
574
+
575
+ --------------------
576
+
577
+
578
+ ### Interfaces
579
+
580
+
581
+ #### Calendar
582
+
583
+ Represents a calendar object.
584
+
585
+ | Prop | Type |
586
+ | -------------------------------- | --------------------------------------------------------- |
587
+ | **`id`** | <code>string</code> |
588
+ | **`title`** | <code>string</code> |
589
+ | **`color`** | <code>string</code> |
590
+ | **`isImmutable`** | <code>boolean</code> |
591
+ | **`allowsContentModifications`** | <code>boolean</code> |
592
+ | **`type`** | <code><a href="#calendartype">CalendarType</a></code> |
593
+ | **`isSubscribed`** | <code>boolean</code> |
594
+ | **`source`** | <code><a href="#calendarsource">CalendarSource</a></code> |
595
+
596
+
597
+ #### CalendarSource
598
+
599
+ Represents the account a calendar belongs to
600
+
601
+ | Prop | Type |
602
+ | ----------- | ----------------------------------------------------------------- |
603
+ | **`type`** | <code><a href="#calendarsourcetype">CalendarSourceType</a></code> |
604
+ | **`id`** | <code>string</code> |
605
+ | **`title`** | <code>string</code> |
606
+
607
+
608
+ #### ReminderRecurrenceRule
609
+
610
+ | Prop | Type | Description |
611
+ | --------------- | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
612
+ | **`frequency`** | <code><a href="#reminderrecurrencefrequency">ReminderRecurrenceFrequency</a></code> | How frequent should the reminder repeat. |
613
+ | **`interval`** | <code>number</code> | The interval should be a number greater than 0. For values lower than 1 the method will throw an error. |
614
+ | **`end`** | <code>number</code> | When provided, the reminder will stop repeating at the given time. |
615
+
616
+
617
+ #### CalendarEvent
618
+
619
+ Represents an event in the calendar.
620
+
621
+ | Prop | Type |
622
+ | ---------------------- | ------------------------------------------------------ |
623
+ | **`id`** | <code>string</code> |
624
+ | **`title`** | <code>string</code> |
625
+ | **`location`** | <code>string</code> |
626
+ | **`eventColor`** | <code>string</code> |
627
+ | **`organizer`** | <code>string</code> |
628
+ | **`description`** | <code>string</code> |
629
+ | **`startDate`** | <code>number</code> |
630
+ | **`endDate`** | <code>number</code> |
631
+ | **`eventTimezone`** | <code>{ region: string; abbreviation: string; }</code> |
632
+ | **`eventEndTimezone`** | <code>{ region: string; abbreviation: string; }</code> |
633
+ | **`duration`** | <code>string</code> |
634
+ | **`isAllDay`** | <code>boolean</code> |
635
+ | **`calendarId`** | <code>string</code> |
636
+ | **`url`** | <code>string</code> |
637
+
638
+
639
+ #### Reminder
640
+
641
+ Represents a reminder in a reminders list.
642
+
643
+ | Prop | Type |
644
+ | -------------------- | ------------------------------------- |
645
+ | **`id`** | <code>string</code> |
646
+ | **`title`** | <code>string</code> |
647
+ | **`listId`** | <code>string</code> |
648
+ | **`isCompleted`** | <code>boolean</code> |
649
+ | **`priority`** | <code>number</code> |
650
+ | **`notes`** | <code>string</code> |
651
+ | **`location`** | <code>string</code> |
652
+ | **`url`** | <code>string</code> |
653
+ | **`startDate`** | <code>number</code> |
654
+ | **`dueDate`** | <code>number</code> |
655
+ | **`completionDate`** | <code>number</code> |
656
+ | **`recurrence`** | <code>ReminderRecurrenceRule[]</code> |
657
+
658
+
659
+ ### Type Aliases
660
+
661
+
662
+ #### PermissionState
663
+
664
+ <code>'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'</code>
665
+
666
+
667
+ #### PluginPermissionsMap
668
+
669
+ <code><a href="#record">Record</a>&lt;string, <a href="#permissionstate">PermissionState</a>&gt;</code>
670
+
671
+
672
+ #### Record
673
+
674
+ Construct a type with a set of properties K of type T
675
+
676
+ <code>{
162
677
  [P in K]: T;
163
678
  }</code>
679
+
680
+
681
+ #### RemindersList
682
+
683
+ <code><a href="#calendar">Calendar</a></code>
684
+
685
+
686
+ ### Enums
687
+
688
+
689
+ #### PluginPermission
690
+
691
+ | Members | Value | Description |
692
+ | --------------------- | ----------------------------- | ------------------------------------------------------ |
693
+ | **`READ_CALENDAR`** | <code>"readCalendar"</code> | Represents the permission state for reading calendar. |
694
+ | **`WRITE_CALENDAR`** | <code>"writeCalendar"</code> | Represents the permission state for writing calendar. |
695
+ | **`READ_REMINDERS`** | <code>"readReminders"</code> | Represents the permission state for reading reminders. |
696
+ | **`WRITE_REMINDERS`** | <code>"writeReminders"</code> | Represents the permission state for writing reminders. |
697
+
698
+
699
+ #### CalendarType
700
+
701
+ | Members | Description |
702
+ | ------------------ | ---------------------------------------------------------- |
703
+ | **`LOCAL`** | This calendar is sync'd from either Mobile Me or tethered. |
704
+ | **`CAL_DAV`** | This calendar is from a CalDAV server. |
705
+ | **`EXCHANGE`** | This calendar comes from an Exchange server. |
706
+ | **`SUBSCRIPTION`** | This is a locally subscribed calendar. |
707
+ | **`BIRTHDAY`** | This is the built-in birthday calendar. |
708
+
709
+
710
+ #### CalendarSourceType
711
+
712
+ | Members | Description |
713
+ | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
714
+ | **`LOCAL`** | Calendars that are stored locally on the device. These calendars are not synced with any external service. |
715
+ | **`EXCHANGE`** | Calendars that are associated with an Exchange server. Exchange is a popular calendar and email service used by many enterprises. |
716
+ | **`CAL_DAV`** | Calendars that use the CalDAV protocol for synchronization. This includes calendars from services like Google <a href="#calendar">Calendar</a> and Yahoo <a href="#calendar">Calendar</a>. |
717
+ | **`MOBILE_ME`** | Calendars that were previously associated with MobileMe, Apple's cloud service before iCloud. This source type is largely obsolete now. |
718
+ | **`SUBSCRIBED`** | Calendars that the user has subscribed to. These are read-only calendars that can be added by subscribing to a calendar URL. |
719
+ | **`BIRTHDAYS`** | The built-in Birthdays calendar, which shows birthdays of contacts from the user's address book. This calendar is typically read-only and is managed by the system. |
720
+
721
+
722
+ #### CalendarChooserDisplayStyle
723
+
724
+ | Members | Description |
725
+ | ----------------------------- | -------------------------------------------------------- |
726
+ | **`ALL_CALENDARS`** | Display all calendars available for selection. |
727
+ | **`WRITABLE_CALENDARS_ONLY`** | Display only writable calendars available for selection. |
728
+
729
+
730
+ #### CalendarChooserSelectionStyle
731
+
732
+ | Members | Description |
733
+ | -------------- | ------------------------------------------------------- |
734
+ | **`SINGLE`** | Allows only a single selection in the calendar chooser. |
735
+ | **`MULTIPLE`** | Allows multiple selections in the calendar chooser. |
736
+
737
+
738
+ #### ReminderRecurrenceFrequency
739
+
740
+ | Members | Description |
741
+ | ------------- | --------------------------------------- |
742
+ | **`DAILY`** | The reminder repeats on a daily basis |
743
+ | **`WEEKLY`** | The reminder repeats on a weekly basis |
744
+ | **`MONTHLY`** | The reminder repeats on a monthly basis |
745
+ | **`YEARLY`** | The reminder repeats on a yearly basis |
746
+
747
+
748
+ #### EventSpan
749
+
750
+ | Members | Description |
751
+ | ---------------------------- | --------------------------------------------------------------------------------------------- |
752
+ | **`THIS_EVENT`** | The modifications should only be applied to this event. |
753
+ | **`THIS_AND_FUTURE_EVENTS`** | The modifications to this event should also be applied to the future instances of this event. |
754
+
755
+ </docgen-api>
756
+
757
+ ## Changelog
758
+
759
+ See [CHANGELOG.md](CHANGELOG.md)
760
+
761
+ ## Contributing
762
+
763
+ See [CONTRIBUTING.md](CONTRIBUTING.md)
764
+
765
+ ## License
164
766
 
165
- ## 💙 Contributions
166
-
167
- > [!NOTE]
168
- > Thank you for your interest in contributing to the project! At the moment, the focus is on reaching the first major
169
- > release. Until then, the contributions will not be accepted. This approach allows to set a solid
170
- > foundation and maintain consistency throughout the development process.
171
- >
172
- > Community input is highly valued, and you are encouraged to engage with the project by providing feedback and suggestions.
173
- > Feel free to open issues for bugs you've discovered or enhancements you'd like to see.
174
- >
175
- > Stay tuned for updates. Looking forward to collaborating with you in the future once contributions are opened up!
767
+ See [LICENSE.txt](LICENSE.txt)