@ebarooni/capacitor-calendar 8.6.0 → 8.7.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 +85 -59
- package/dist/docs.json +287 -80
- package/dist/esm/index.d.ts +5 -2
- package/dist/esm/index.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/create-reminder-options.d.ts +39 -20
- 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/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-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/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/modify-reminder-options.d.ts +72 -22
- package/dist/esm/schemas/interfaces/modify-reminder-options.js.map +1 -1
- package/dist/esm/schemas/interfaces/recurrence-rule.d.ts +7 -1
- package/dist/esm/schemas/interfaces/recurrence-rule.js.map +1 -1
- package/dist/esm/schemas/interfaces/reminder.d.ts +1 -0
- package/dist/esm/schemas/interfaces/reminder.js.map +1 -1
- package/dist/esm/sub-definitions/reminders-operations.d.ts +7 -23
- package/dist/esm/sub-definitions/reminders-operations.js.map +1 -1
- package/dist/esm/web.d.ts +7 -11
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +5 -5
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +5 -5
- package/dist/plugin.js.map +1 -1
- package/ios/Plugin/Implementation/CapacitorCalendar.swift +39 -21
- package/ios/Plugin/Models/Inputs/CreateEventWithPromptInput.swift +3 -3
- package/ios/Plugin/Models/Inputs/CreateReminderInput.swift +14 -4
- package/ios/Plugin/Models/Inputs/DeleteReminderInput.swift +7 -1
- package/ios/Plugin/Models/Inputs/ModifyReminderInput.swift +66 -5
- package/ios/Plugin/Models/Structs/RecurrenceInput.swift +10 -0
- package/ios/Plugin/PluginError.swift +3 -0
- package/ios/Plugin/Utils/ImplementationHelper.swift +27 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -37,7 +37,7 @@ Full-featured Capacitor plugin for calendar and reminders access on iOS, Android
|
|
|
37
37
|
|
|
38
38
|
- **iOS** — Full support (including Reminders and advanced features)
|
|
39
39
|
- **Android** — Strong support for all core calendar features
|
|
40
|
-
- **Web** — Partial support (create
|
|
40
|
+
- **Web** — Partial support (create events as `.ics` files)
|
|
41
41
|
|
|
42
42
|
## Why this plugin?
|
|
43
43
|
|
|
@@ -65,6 +65,7 @@ See [`mcp/README.md`](mcp/README.md) for client configuration and full details.
|
|
|
65
65
|
- [Usage Examples](#usage-examples)
|
|
66
66
|
- [Documentation](#documentation)
|
|
67
67
|
- [Changelog](#changelog)
|
|
68
|
+
- [Breaking Changes](#breaking-changes)
|
|
68
69
|
- [API](#api)
|
|
69
70
|
- [Contributing](#contributing)
|
|
70
71
|
- [License](#license)
|
|
@@ -244,6 +245,10 @@ The full documentation is generated from TypeScript definitions and is available
|
|
|
244
245
|
|
|
245
246
|
See [CHANGELOG.md](CHANGELOG.md) for the latest updates and release history.
|
|
246
247
|
|
|
248
|
+
## Breaking Changes
|
|
249
|
+
|
|
250
|
+
See [BREAKING.md](BREAKING.md) for breaking changes and migration steps.
|
|
251
|
+
|
|
247
252
|
## API
|
|
248
253
|
|
|
249
254
|
<docgen-index>
|
|
@@ -893,7 +898,7 @@ Retrieves all available reminders lists.
|
|
|
893
898
|
### createReminder(...)
|
|
894
899
|
|
|
895
900
|
```typescript
|
|
896
|
-
createReminder(options: CreateReminderOptions) => Promise<
|
|
901
|
+
createReminder(options: CreateReminderOptions) => Promise<CreateReminderResult>
|
|
897
902
|
```
|
|
898
903
|
|
|
899
904
|
Creates a reminder.
|
|
@@ -902,7 +907,7 @@ Creates a reminder.
|
|
|
902
907
|
| ------------- | ----------------------------------------------------------------------- |
|
|
903
908
|
| **`options`** | <code><a href="#createreminderoptions">CreateReminderOptions</a></code> |
|
|
904
909
|
|
|
905
|
-
**Returns:** <code>Promise<
|
|
910
|
+
**Returns:** <code>Promise<<a href="#createreminderresult">CreateReminderResult</a>></code>
|
|
906
911
|
|
|
907
912
|
**Since:** 0.5.0
|
|
908
913
|
|
|
@@ -969,7 +974,7 @@ Modifies a reminder.
|
|
|
969
974
|
### getReminderById(...)
|
|
970
975
|
|
|
971
976
|
```typescript
|
|
972
|
-
getReminderById(options: GetReminderByIdOptions) => Promise<
|
|
977
|
+
getReminderById(options: GetReminderByIdOptions) => Promise<GetReminderByIdResult>
|
|
973
978
|
```
|
|
974
979
|
|
|
975
980
|
Retrieve a reminder by ID.
|
|
@@ -978,7 +983,7 @@ Retrieve a reminder by ID.
|
|
|
978
983
|
| ------------- | ------------------------------------------------------------------------- |
|
|
979
984
|
| **`options`** | <code><a href="#getreminderbyidoptions">GetReminderByIdOptions</a></code> |
|
|
980
985
|
|
|
981
|
-
**Returns:** <code>Promise<
|
|
986
|
+
**Returns:** <code>Promise<<a href="#getreminderbyidresult">GetReminderByIdResult</a>></code>
|
|
982
987
|
|
|
983
988
|
**Since:** 7.1.0
|
|
984
989
|
|
|
@@ -989,7 +994,7 @@ Retrieve a reminder by ID.
|
|
|
989
994
|
### getRemindersFromLists(...)
|
|
990
995
|
|
|
991
996
|
```typescript
|
|
992
|
-
getRemindersFromLists(options: GetRemindersFromListsOptions) => Promise<
|
|
997
|
+
getRemindersFromLists(options: GetRemindersFromListsOptions) => Promise<GetRemindersFromListsResult>
|
|
993
998
|
```
|
|
994
999
|
|
|
995
1000
|
Retrieves reminders from multiple lists.
|
|
@@ -998,7 +1003,7 @@ Retrieves reminders from multiple lists.
|
|
|
998
1003
|
| ------------- | ------------------------------------------------------------------------------------- |
|
|
999
1004
|
| **`options`** | <code><a href="#getremindersfromlistsoptions">GetRemindersFromListsOptions</a></code> |
|
|
1000
1005
|
|
|
1001
|
-
**Returns:** <code>Promise<
|
|
1006
|
+
**Returns:** <code>Promise<<a href="#getremindersfromlistsresult">GetRemindersFromListsResult</a>></code>
|
|
1002
1007
|
|
|
1003
1008
|
**Since:** 5.3.0
|
|
1004
1009
|
|
|
@@ -1373,30 +1378,37 @@ Options for {@link CalendarAccess#requestPermission}.
|
|
|
1373
1378
|
| **`commit`** | <code>boolean</code> | Whether to save the deletion to the event store immediately. Pass `false` to batch multiple changes and commit them together using `CapacitorCalendar.commit()`, which is more efficient than committing each save individually. | <code>true</code> | 8.2.0 | iOS |
|
|
1374
1379
|
| **`id`** | <code>string</code> | Identifier of the reminders list to delete. | | 8.2.0 | iOS |
|
|
1375
1380
|
|
|
1381
|
+
#### CreateReminderResult
|
|
1382
|
+
|
|
1383
|
+
| Prop | Type | Description | Since | Platform |
|
|
1384
|
+
| -------- | ------------------- | ----------------------------------------- | ----- | -------- |
|
|
1385
|
+
| **`id`** | <code>string</code> | Identifier of the newly created reminder. | 0.5.0 | iOS |
|
|
1386
|
+
|
|
1376
1387
|
#### CreateReminderOptions
|
|
1377
1388
|
|
|
1378
|
-
| Prop | Type | Description
|
|
1379
|
-
| -------------------- | --------------------------------------------------------- |
|
|
1380
|
-
| **`
|
|
1381
|
-
| **`
|
|
1382
|
-
| **`
|
|
1383
|
-
| **`
|
|
1384
|
-
| **`
|
|
1385
|
-
| **`
|
|
1386
|
-
| **`
|
|
1387
|
-
| **`notes`** | <code>string</code> |
|
|
1388
|
-
| **`
|
|
1389
|
-
| **`
|
|
1390
|
-
| **`
|
|
1391
|
-
| **`
|
|
1389
|
+
| Prop | Type | Description | Default | Since | Platform |
|
|
1390
|
+
| -------------------- | --------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | ----- | -------- |
|
|
1391
|
+
| **`alerts`** | <code>number[]</code> | Alert times in minutes relative to the reminder start. Use negative numbers for alerts before the start, and positive numbers for alerts after the start. On iOS only 2 alerts are supported. | | 7.1.0 | |
|
|
1392
|
+
| **`commit`** | <code>boolean</code> | Whether to save immediately (`true`) or batch changes for later (`false`). Pass `false` to batch multiple changes and commit them together using `CapacitorCalendar.commit()`, which is more efficient than committing each save individually. | <code>true</code> | 8.7.0 | iOS |
|
|
1393
|
+
| **`completionDate`** | <code>number</code> | | | 7.1.0 | |
|
|
1394
|
+
| **`dueDate`** | <code>number</code> | When the reminder should be completed, in milliseconds since the epoch. On iOS, if `startDate` is omitted, it is set to this value. | | 7.1.0 | |
|
|
1395
|
+
| **`isCompleted`** | <code>boolean</code> | | | 7.1.0 | |
|
|
1396
|
+
| **`listId`** | <code>string</code> | | | 7.1.0 | |
|
|
1397
|
+
| **`location`** | <code>string</code> | | | 7.1.0 | |
|
|
1398
|
+
| **`notes`** | <code>string</code> | | | 7.1.0 | |
|
|
1399
|
+
| **`priority`** | <code>number</code> | | | 7.1.0 | |
|
|
1400
|
+
| **`recurrence`** | <code><a href="#recurrencerule">RecurrenceRule</a></code> | | | 7.1.0 | iOS |
|
|
1401
|
+
| **`startDate`** | <code>number</code> | When the reminder starts, in milliseconds since the epoch. Relative `alerts` use this date. | | 7.1.0 | |
|
|
1402
|
+
| **`title`** | <code>string</code> | | | 7.1.0 | |
|
|
1403
|
+
| **`url`** | <code>string</code> | | | 7.1.0 | |
|
|
1392
1404
|
|
|
1393
1405
|
#### RecurrenceRule
|
|
1394
1406
|
|
|
1395
|
-
| Prop | Type | Description | Since |
|
|
1396
|
-
| --------------- | ------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ----- |
|
|
1397
|
-
| **`frequency`** | <code><a href="#recurrencefrequency">RecurrenceFrequency</a></code> |
|
|
1398
|
-
| **`interval`** | <code>number</code> | How often it repeats (e.g. 1 for every occurrence, 2 for every second occurrence). | 7.1.0 |
|
|
1399
|
-
| **`end`** | <code>number</code> |
|
|
1407
|
+
| Prop | Type | Description | Since | Platform |
|
|
1408
|
+
| --------------- | ------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ----- | -------- |
|
|
1409
|
+
| **`frequency`** | <code><a href="#recurrencefrequency">RecurrenceFrequency</a></code> | How often the reminder repeats. | 7.1.0 | iOS |
|
|
1410
|
+
| **`interval`** | <code>number</code> | How often it repeats (e.g. 1 for every occurrence, 2 for every second occurrence). | 7.1.0 | iOS |
|
|
1411
|
+
| **`end`** | <code>number</code> | End of the recurrence series as a Unix timestamp in milliseconds. | 7.1.0 | iOS |
|
|
1400
1412
|
|
|
1401
1413
|
#### DeleteRemindersByIdResult
|
|
1402
1414
|
|
|
@@ -1413,45 +1425,53 @@ Options for {@link CalendarAccess#requestPermission}.
|
|
|
1413
1425
|
|
|
1414
1426
|
#### DeleteReminderOptions
|
|
1415
1427
|
|
|
1416
|
-
| Prop
|
|
1417
|
-
|
|
|
1418
|
-
| **`
|
|
1428
|
+
| Prop | Type | Description | Default | Since | Platform |
|
|
1429
|
+
| ------------ | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | ----- | -------- |
|
|
1430
|
+
| **`commit`** | <code>boolean</code> | Whether to save immediately (`true`) or batch changes for later (`false`). Pass `false` to batch multiple changes and commit them together using `CapacitorCalendar.commit()`, which is more efficient than committing each save individually. | <code>true</code> | 8.7.0 | iOS |
|
|
1431
|
+
| **`id`** | <code>string</code> | | | 7.1.0 | |
|
|
1419
1432
|
|
|
1420
1433
|
#### ModifyReminderOptions
|
|
1421
1434
|
|
|
1422
|
-
| Prop | Type
|
|
1423
|
-
| -------------------- |
|
|
1424
|
-
| **`
|
|
1425
|
-
| **`
|
|
1426
|
-
| **`
|
|
1427
|
-
| **`
|
|
1428
|
-
| **`
|
|
1429
|
-
| **`
|
|
1430
|
-
| **`
|
|
1431
|
-
| **`
|
|
1432
|
-
| **`notes`** | <code>string</code> |
|
|
1433
|
-
| **`
|
|
1434
|
-
| **`
|
|
1435
|
-
| **`
|
|
1436
|
-
| **`
|
|
1435
|
+
| Prop | Type | Description | Default | Since | Platform |
|
|
1436
|
+
| -------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | ----- | -------- |
|
|
1437
|
+
| **`alerts`** | <code>number[] \| null</code> | Alert times in minutes relative to the reminder start. Use negative numbers for alerts before the start, and positive numbers for alerts after the start. Omit or pass `undefined` to leave existing alerts unchanged. Pass `null` or an empty array `[]` to clear alerts. On iOS, when both `startDate` and `dueDate` are cleared in the same call, alerts are cleared even if `alerts` is set. When clearing dates across separate batched calls, pass `alerts: null` or `[]` explicitly. On iOS only 2 alerts are supported. | | 7.1.0 | |
|
|
1438
|
+
| **`commit`** | <code>boolean</code> | Whether to save immediately (`true`) or batch changes for later (`false`). Pass `false` to batch multiple changes and commit them together using `CapacitorCalendar.commit()`, which is more efficient than committing each save individually. | <code>true</code> | 8.7.0 | iOS |
|
|
1439
|
+
| **`completionDate`** | <code>number \| null</code> | When the reminder was completed, in milliseconds since the epoch. Omit or pass `undefined` to leave the existing value unchanged. Since 8.7.0, pass `null` to clear. Clearing this date does not mark the reminder incomplete; set `isCompleted` to `false` for that. | | 7.1.0 | |
|
|
1440
|
+
| **`dueDate`** | <code>number \| null</code> | When the reminder is due, in milliseconds since the epoch. On iOS, if `startDate` is omitted and the reminder has no start, it is set to this value. Omit or pass `undefined` to leave the existing value unchanged. Since 8.7.0, pass `null` to clear. Clearing only `dueDate` leaves an existing start unchanged (including a start previously copied from due). Pass `startDate: null` together with `dueDate: null` to remove scheduling. | | 7.1.0 | |
|
|
1441
|
+
| **`id`** | <code>string</code> | | | 7.1.0 | |
|
|
1442
|
+
| **`isCompleted`** | <code>boolean</code> | | | 7.1.0 | |
|
|
1443
|
+
| **`listId`** | <code>string</code> | | | 7.1.0 | |
|
|
1444
|
+
| **`location`** | <code>string \| null</code> | Location for the reminder. Omit or pass `undefined` to leave the existing value unchanged. Since 8.7.0, pass `null` to clear. | | 7.1.0 | |
|
|
1445
|
+
| **`notes`** | <code>string \| null</code> | Notes for the reminder. Omit or pass `undefined` to leave the existing value unchanged. Since 8.7.0, pass `null` to clear. | | 7.1.0 | |
|
|
1446
|
+
| **`priority`** | <code>number</code> | | | 7.1.0 | |
|
|
1447
|
+
| **`recurrence`** | <code><a href="#recurrencerule">RecurrenceRule</a> \| null</code> | Recurrence rule for the reminder. Omit or pass `undefined` to leave the existing value unchanged. Since 8.7.0, pass `null` to clear. | | 7.1.0 | iOS |
|
|
1448
|
+
| **`startDate`** | <code>number \| null</code> | When the reminder starts, in milliseconds since the epoch. Relative `alerts` use this date. Omit or pass `undefined` to leave the existing value unchanged. Since 8.7.0, pass `null` to clear. If a due date remains, clearing start sets start to the due date (it does not keep the previous start). Pass `dueDate: null` as well to remove scheduling. | | 7.1.0 | |
|
|
1449
|
+
| **`title`** | <code>string</code> | | | 7.1.0 | |
|
|
1450
|
+
| **`url`** | <code>string \| null</code> | URL associated with the reminder. Omit or pass `undefined` to leave the existing value unchanged. Since 8.7.0, pass `null` to clear. | | 7.1.0 | |
|
|
1451
|
+
|
|
1452
|
+
#### GetReminderByIdResult
|
|
1453
|
+
|
|
1454
|
+
| Prop | Type | Description | Since | Platform |
|
|
1455
|
+
| ------------ | ----------------------------------------------------- | ---------------------------------------------------------- | ----- | -------- |
|
|
1456
|
+
| **`result`** | <code><a href="#reminder">Reminder</a> \| null</code> | The reminder for the given id, or `null` when none exists. | 7.1.0 | iOS |
|
|
1437
1457
|
|
|
1438
1458
|
#### Reminder
|
|
1439
1459
|
|
|
1440
|
-
| Prop | Type | Since |
|
|
1441
|
-
| -------------------- | ----------------------------- | ----- |
|
|
1442
|
-
| **`id`** | <code>string</code> | 7.1.0 |
|
|
1443
|
-
| **`title`** | <code>string \| null</code> | 7.1.0 |
|
|
1444
|
-
| **`listId`** | <code>string \| null</code> | 7.1.0 |
|
|
1445
|
-
| **`isCompleted`** | <code>boolean</code> | 7.1.0 |
|
|
1446
|
-
| **`priority`** | <code>number \| null</code> | 7.1.0 |
|
|
1447
|
-
| **`notes`** | <code>string \| null</code> | 7.1.0 |
|
|
1448
|
-
| **`location`** | <code>string \| null</code> | 7.1.0 |
|
|
1449
|
-
| **`url`** | <code>string \| null</code> | 7.1.0 |
|
|
1450
|
-
| **`startDate`** | <code>number \| null</code> | 7.1.0 |
|
|
1451
|
-
| **`dueDate`** | <code>number \| null</code> | 7.1.0 |
|
|
1452
|
-
| **`completionDate`** | <code>number \| null</code> | 7.1.0 |
|
|
1453
|
-
| **`recurrence`** | <code>RecurrenceRule[]</code> | 7.1.0 |
|
|
1454
|
-
| **`alerts`** | <code>number[]</code> | 7.1.0 |
|
|
1460
|
+
| Prop | Type | Since | Platform |
|
|
1461
|
+
| -------------------- | ----------------------------- | ----- | -------- |
|
|
1462
|
+
| **`id`** | <code>string</code> | 7.1.0 | |
|
|
1463
|
+
| **`title`** | <code>string \| null</code> | 7.1.0 | |
|
|
1464
|
+
| **`listId`** | <code>string \| null</code> | 7.1.0 | |
|
|
1465
|
+
| **`isCompleted`** | <code>boolean</code> | 7.1.0 | |
|
|
1466
|
+
| **`priority`** | <code>number \| null</code> | 7.1.0 | |
|
|
1467
|
+
| **`notes`** | <code>string \| null</code> | 7.1.0 | |
|
|
1468
|
+
| **`location`** | <code>string \| null</code> | 7.1.0 | |
|
|
1469
|
+
| **`url`** | <code>string \| null</code> | 7.1.0 | |
|
|
1470
|
+
| **`startDate`** | <code>number \| null</code> | 7.1.0 | |
|
|
1471
|
+
| **`dueDate`** | <code>number \| null</code> | 7.1.0 | |
|
|
1472
|
+
| **`completionDate`** | <code>number \| null</code> | 7.1.0 | |
|
|
1473
|
+
| **`recurrence`** | <code>RecurrenceRule[]</code> | 7.1.0 | iOS |
|
|
1474
|
+
| **`alerts`** | <code>number[]</code> | 7.1.0 | |
|
|
1455
1475
|
|
|
1456
1476
|
#### GetReminderByIdOptions
|
|
1457
1477
|
|
|
@@ -1459,6 +1479,12 @@ Options for {@link CalendarAccess#requestPermission}.
|
|
|
1459
1479
|
| -------- | ------------------- | ----- |
|
|
1460
1480
|
| **`id`** | <code>string</code> | 7.1.0 |
|
|
1461
1481
|
|
|
1482
|
+
#### GetRemindersFromListsResult
|
|
1483
|
+
|
|
1484
|
+
| Prop | Type | Description | Since | Platform |
|
|
1485
|
+
| ------------ | ----------------------- | ----------------------------------- | ----- | -------- |
|
|
1486
|
+
| **`result`** | <code>Reminder[]</code> | Reminders from the requested lists. | 5.3.0 | iOS |
|
|
1487
|
+
|
|
1462
1488
|
#### GetRemindersFromListsOptions
|
|
1463
1489
|
|
|
1464
1490
|
| Prop | Type | Since |
|