@ebarooni/capacitor-calendar 7.1.0 → 7.2.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 +62 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/CapacitorCalendarPlugin.kt +17 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/PluginError.kt +2 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/implementation/CapacitorCalendar.kt +15 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/ModifyCalendarInput.kt +13 -0
- package/dist/docs.json +202 -0
- package/dist/esm/index.d.ts +3 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/schemas/interfaces/delete-reminder-with-prompt-options.d.ts +35 -0
- package/dist/esm/schemas/interfaces/delete-reminder-with-prompt-options.js +2 -0
- package/dist/esm/schemas/interfaces/delete-reminder-with-prompt-options.js.map +1 -0
- package/dist/esm/schemas/interfaces/modify-calendar-options.d.ts +21 -0
- package/dist/esm/schemas/interfaces/modify-calendar-options.js +2 -0
- package/dist/esm/schemas/interfaces/modify-calendar-options.js.map +1 -0
- package/dist/esm/sub-definitions/calendar-operations.d.ts +8 -0
- package/dist/esm/sub-definitions/calendar-operations.js.map +1 -1
- package/dist/esm/sub-definitions/reminders-operations.d.ts +10 -0
- package/dist/esm/sub-definitions/reminders-operations.js.map +1 -1
- package/dist/esm/web.d.ts +6 -0
- package/dist/esm/web.js +6 -0
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +6 -0
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +6 -0
- package/dist/plugin.js.map +1 -1
- package/ios/Sources/CapacitorCalendarPlugin/CapacitorCalendarPlugin.swift +26 -0
- package/ios/Sources/CapacitorCalendarPlugin/Implementation/CapacitorCalendar.swift +42 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Inputs/DeleteReminderWithPromptInput.swift +46 -0
- package/ios/Sources/CapacitorCalendarPlugin/Models/Inputs/ModifyCalendarInput.swift +32 -0
- package/ios/Sources/CapacitorCalendarPlugin/PluginConfig.swift +3 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -91,6 +91,7 @@ See [CHANGELOG.md](CHANGELOG.md) for the latest updates and release history.
|
|
|
91
91
|
* [`openCalendar(...)`](#opencalendar)
|
|
92
92
|
* [`createCalendar(...)`](#createcalendar)
|
|
93
93
|
* [`deleteCalendar(...)`](#deletecalendar)
|
|
94
|
+
* [`modifyCalendar(...)`](#modifycalendar)
|
|
94
95
|
* [`fetchAllRemindersSources()`](#fetchallreminderssources)
|
|
95
96
|
* [`openReminders()`](#openreminders)
|
|
96
97
|
* [`getDefaultRemindersList()`](#getdefaultreminderslist)
|
|
@@ -101,6 +102,7 @@ See [CHANGELOG.md](CHANGELOG.md) for the latest updates and release history.
|
|
|
101
102
|
* [`modifyReminder(...)`](#modifyreminder)
|
|
102
103
|
* [`getReminderById(...)`](#getreminderbyid)
|
|
103
104
|
* [`getRemindersFromLists(...)`](#getremindersfromlists)
|
|
105
|
+
* [`deleteReminderWithPrompt(...)`](#deletereminderwithprompt)
|
|
104
106
|
* [Interfaces](#interfaces)
|
|
105
107
|
* [Type Aliases](#type-aliases)
|
|
106
108
|
* [Enums](#enums)
|
|
@@ -567,6 +569,25 @@ Deletes a calendar by id.
|
|
|
567
569
|
--------------------
|
|
568
570
|
|
|
569
571
|
|
|
572
|
+
### modifyCalendar(...)
|
|
573
|
+
|
|
574
|
+
```typescript
|
|
575
|
+
modifyCalendar(options: ModifyCalendarOptions) => Promise<void>
|
|
576
|
+
```
|
|
577
|
+
|
|
578
|
+
Modifies a calendar with options.
|
|
579
|
+
|
|
580
|
+
| Param | Type |
|
|
581
|
+
| ------------- | ----------------------------------------------------------------------- |
|
|
582
|
+
| **`options`** | <code><a href="#modifycalendaroptions">ModifyCalendarOptions</a></code> |
|
|
583
|
+
|
|
584
|
+
**Since:** 7.2.0
|
|
585
|
+
|
|
586
|
+
**Platform:** Android, iOS
|
|
587
|
+
|
|
588
|
+
--------------------
|
|
589
|
+
|
|
590
|
+
|
|
570
591
|
### fetchAllRemindersSources()
|
|
571
592
|
|
|
572
593
|
```typescript
|
|
@@ -755,6 +776,27 @@ Retrieves reminders from multiple lists.
|
|
|
755
776
|
--------------------
|
|
756
777
|
|
|
757
778
|
|
|
779
|
+
### deleteReminderWithPrompt(...)
|
|
780
|
+
|
|
781
|
+
```typescript
|
|
782
|
+
deleteReminderWithPrompt(options: DeleteReminderWithPromptOptions) => Promise<{ deleted: boolean; }>
|
|
783
|
+
```
|
|
784
|
+
|
|
785
|
+
Opens a dialog to delete a reminder.
|
|
786
|
+
|
|
787
|
+
| Param | Type |
|
|
788
|
+
| ------------- | ------------------------------------------------------------------------------------------- |
|
|
789
|
+
| **`options`** | <code><a href="#deletereminderwithpromptoptions">DeleteReminderWithPromptOptions</a></code> |
|
|
790
|
+
|
|
791
|
+
**Returns:** <code>Promise<{ deleted: boolean; }></code>
|
|
792
|
+
|
|
793
|
+
**Since:** 7.2.0
|
|
794
|
+
|
|
795
|
+
**Platform:** iOS
|
|
796
|
+
|
|
797
|
+
--------------------
|
|
798
|
+
|
|
799
|
+
|
|
758
800
|
### Interfaces
|
|
759
801
|
|
|
760
802
|
|
|
@@ -977,6 +1019,15 @@ Retrieves reminders from multiple lists.
|
|
|
977
1019
|
| **`id`** | <code>string</code> | 7.1.0 |
|
|
978
1020
|
|
|
979
1021
|
|
|
1022
|
+
#### ModifyCalendarOptions
|
|
1023
|
+
|
|
1024
|
+
| Prop | Type | Since | Platform |
|
|
1025
|
+
| ----------- | ------------------- | ----- | ------------ |
|
|
1026
|
+
| **`id`** | <code>string</code> | 7.2.0 | Android, iOS |
|
|
1027
|
+
| **`title`** | <code>string</code> | 7.2.0 | Android, iOS |
|
|
1028
|
+
| **`color`** | <code>string</code> | 7.2.0 | Android, iOS |
|
|
1029
|
+
|
|
1030
|
+
|
|
980
1031
|
#### CreateReminderOptions
|
|
981
1032
|
|
|
982
1033
|
| Prop | Type | Since |
|
|
@@ -1078,6 +1129,17 @@ Retrieves reminders from multiple lists.
|
|
|
1078
1129
|
| **`listIds`** | <code>string[]</code> | 7.1.0 |
|
|
1079
1130
|
|
|
1080
1131
|
|
|
1132
|
+
#### DeleteReminderWithPromptOptions
|
|
1133
|
+
|
|
1134
|
+
| Prop | Type | Description | Default | Since |
|
|
1135
|
+
| ----------------------- | ------------------- | ----------------------------------- | --------------------- | ----- |
|
|
1136
|
+
| **`id`** | <code>string</code> | | | 7.2.0 |
|
|
1137
|
+
| **`title`** | <code>string</code> | Title of the dialog. | | 7.2.0 |
|
|
1138
|
+
| **`message`** | <code>string</code> | Message of the dialog. | | 7.2.0 |
|
|
1139
|
+
| **`confirmButtonText`** | <code>string</code> | Text to show on the confirm button. | <code>'Delete'</code> | 7.2.0 |
|
|
1140
|
+
| **`cancelButtonText`** | <code>string</code> | Text to show on the cancel button. | <code>'Cancel'</code> | 7.2.0 |
|
|
1141
|
+
|
|
1142
|
+
|
|
1081
1143
|
### Type Aliases
|
|
1082
1144
|
|
|
1083
1145
|
|
|
@@ -20,6 +20,7 @@ import dev.barooni.capacitor.calendar.models.inputs.DeleteEventInput
|
|
|
20
20
|
import dev.barooni.capacitor.calendar.models.inputs.DeleteEventWithPromptInput
|
|
21
21
|
import dev.barooni.capacitor.calendar.models.inputs.DeleteEventsByIdInput
|
|
22
22
|
import dev.barooni.capacitor.calendar.models.inputs.ListEventsInRangeInput
|
|
23
|
+
import dev.barooni.capacitor.calendar.models.inputs.ModifyCalendarInput
|
|
23
24
|
import dev.barooni.capacitor.calendar.models.inputs.ModifyEvent
|
|
24
25
|
import dev.barooni.capacitor.calendar.models.inputs.ModifyEventWithPromptInput
|
|
25
26
|
import dev.barooni.capacitor.calendar.models.inputs.OpenCalendarInput
|
|
@@ -423,4 +424,20 @@ class CapacitorCalendarPlugin : Plugin() {
|
|
|
423
424
|
call.reject(error.message)
|
|
424
425
|
}
|
|
425
426
|
}
|
|
427
|
+
|
|
428
|
+
@PluginMethod
|
|
429
|
+
fun modifyCalendar(call: PluginCall) {
|
|
430
|
+
try {
|
|
431
|
+
val input = ModifyCalendarInput(call)
|
|
432
|
+
implementation.modifyCalendar(input)
|
|
433
|
+
call.resolve()
|
|
434
|
+
} catch (error: Exception) {
|
|
435
|
+
call.reject(error.message)
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
@PluginMethod
|
|
440
|
+
fun deleteReminderWithPrompt(call: PluginCall) {
|
|
441
|
+
call.unimplemented(PluginError.Unimplemented(::deleteReminderWithPrompt.name).message)
|
|
442
|
+
}
|
|
426
443
|
}
|
|
@@ -37,6 +37,8 @@ sealed class PluginError(
|
|
|
37
37
|
|
|
38
38
|
data object ToDateMissing : PluginError("To date must be provided.")
|
|
39
39
|
|
|
40
|
+
data object FailedToModify : PluginError("Failed to modify.")
|
|
41
|
+
|
|
40
42
|
data class Unimplemented(
|
|
41
43
|
val methodName: String,
|
|
42
44
|
) : PluginError("$methodName is not implemented on Android.")
|
package/android/src/main/java/dev/barooni/capacitor/calendar/implementation/CapacitorCalendar.kt
CHANGED
|
@@ -21,6 +21,7 @@ import dev.barooni.capacitor.calendar.models.inputs.DeleteEventInput
|
|
|
21
21
|
import dev.barooni.capacitor.calendar.models.inputs.DeleteEventWithPromptInput
|
|
22
22
|
import dev.barooni.capacitor.calendar.models.inputs.DeleteEventsByIdInput
|
|
23
23
|
import dev.barooni.capacitor.calendar.models.inputs.ListEventsInRangeInput
|
|
24
|
+
import dev.barooni.capacitor.calendar.models.inputs.ModifyCalendarInput
|
|
24
25
|
import dev.barooni.capacitor.calendar.models.inputs.ModifyEvent
|
|
25
26
|
import dev.barooni.capacitor.calendar.models.inputs.ModifyEventWithPromptInput
|
|
26
27
|
import dev.barooni.capacitor.calendar.models.inputs.OpenCalendarInput
|
|
@@ -345,4 +346,18 @@ class CapacitorCalendar(
|
|
|
345
346
|
cursor?.close()
|
|
346
347
|
return ListEventsInRangeResult(events)
|
|
347
348
|
}
|
|
349
|
+
|
|
350
|
+
fun modifyCalendar(input: ModifyCalendarInput) {
|
|
351
|
+
val cr = plugin.context.contentResolver
|
|
352
|
+
val values =
|
|
353
|
+
ContentValues().apply {
|
|
354
|
+
input.title?.let { put(CalendarContract.Calendars.CALENDAR_DISPLAY_NAME, it) }
|
|
355
|
+
input.color?.let { put(CalendarContract.Calendars.CALENDAR_COLOR, it) }
|
|
356
|
+
}
|
|
357
|
+
val uri: Uri = ContentUris.withAppendedId(CalendarContract.Calendars.CONTENT_URI, input.id)
|
|
358
|
+
val rowsUpdated = cr.update(uri, values, null, null)
|
|
359
|
+
if (rowsUpdated < 1) {
|
|
360
|
+
throw PluginError.FailedToModify
|
|
361
|
+
}
|
|
362
|
+
}
|
|
348
363
|
}
|
package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/ModifyCalendarInput.kt
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
package dev.barooni.capacitor.calendar.models.inputs
|
|
2
|
+
|
|
3
|
+
import com.getcapacitor.PluginCall
|
|
4
|
+
import dev.barooni.capacitor.calendar.PluginError
|
|
5
|
+
import dev.barooni.capacitor.calendar.utils.ImplementationHelper
|
|
6
|
+
|
|
7
|
+
data class ModifyCalendarInput(
|
|
8
|
+
private val call: PluginCall,
|
|
9
|
+
) {
|
|
10
|
+
val id = call.getString("id")?.toLong() ?: throw PluginError.MissingId
|
|
11
|
+
val title = call.getString("title")
|
|
12
|
+
val color = call.getString("color")?.let { ImplementationHelper.hexToColorInt(it) }
|
|
13
|
+
}
|
package/dist/docs.json
CHANGED
|
@@ -653,6 +653,33 @@
|
|
|
653
653
|
],
|
|
654
654
|
"slug": "deletecalendar"
|
|
655
655
|
},
|
|
656
|
+
{
|
|
657
|
+
"name": "modifyCalendar",
|
|
658
|
+
"signature": "(options: ModifyCalendarOptions) => Promise<void>",
|
|
659
|
+
"parameters": [
|
|
660
|
+
{
|
|
661
|
+
"name": "options",
|
|
662
|
+
"docs": "",
|
|
663
|
+
"type": "ModifyCalendarOptions"
|
|
664
|
+
}
|
|
665
|
+
],
|
|
666
|
+
"returns": "Promise<void>",
|
|
667
|
+
"tags": [
|
|
668
|
+
{
|
|
669
|
+
"name": "platform",
|
|
670
|
+
"text": "Android, iOS"
|
|
671
|
+
},
|
|
672
|
+
{
|
|
673
|
+
"name": "since",
|
|
674
|
+
"text": "7.2.0"
|
|
675
|
+
}
|
|
676
|
+
],
|
|
677
|
+
"docs": "Modifies a calendar with options.",
|
|
678
|
+
"complexTypes": [
|
|
679
|
+
"ModifyCalendarOptions"
|
|
680
|
+
],
|
|
681
|
+
"slug": "modifycalendar"
|
|
682
|
+
},
|
|
656
683
|
{
|
|
657
684
|
"name": "fetchAllRemindersSources",
|
|
658
685
|
"signature": "() => Promise<{ result: CalendarSource[]; }>",
|
|
@@ -907,6 +934,33 @@
|
|
|
907
934
|
"GetRemindersFromListsOptions"
|
|
908
935
|
],
|
|
909
936
|
"slug": "getremindersfromlists"
|
|
937
|
+
},
|
|
938
|
+
{
|
|
939
|
+
"name": "deleteReminderWithPrompt",
|
|
940
|
+
"signature": "(options: DeleteReminderWithPromptOptions) => Promise<{ deleted: boolean; }>",
|
|
941
|
+
"parameters": [
|
|
942
|
+
{
|
|
943
|
+
"name": "options",
|
|
944
|
+
"docs": "",
|
|
945
|
+
"type": "DeleteReminderWithPromptOptions"
|
|
946
|
+
}
|
|
947
|
+
],
|
|
948
|
+
"returns": "Promise<{ deleted: boolean; }>",
|
|
949
|
+
"tags": [
|
|
950
|
+
{
|
|
951
|
+
"name": "platform",
|
|
952
|
+
"text": "iOS"
|
|
953
|
+
},
|
|
954
|
+
{
|
|
955
|
+
"name": "since",
|
|
956
|
+
"text": "7.2.0"
|
|
957
|
+
}
|
|
958
|
+
],
|
|
959
|
+
"docs": "Opens a dialog to delete a reminder.",
|
|
960
|
+
"complexTypes": [
|
|
961
|
+
"DeleteReminderWithPromptOptions"
|
|
962
|
+
],
|
|
963
|
+
"slug": "deletereminderwithprompt"
|
|
910
964
|
}
|
|
911
965
|
],
|
|
912
966
|
"properties": []
|
|
@@ -3094,6 +3148,72 @@
|
|
|
3094
3148
|
}
|
|
3095
3149
|
]
|
|
3096
3150
|
},
|
|
3151
|
+
{
|
|
3152
|
+
"name": "ModifyCalendarOptions",
|
|
3153
|
+
"slug": "modifycalendaroptions",
|
|
3154
|
+
"docs": "",
|
|
3155
|
+
"tags": [
|
|
3156
|
+
{
|
|
3157
|
+
"text": "7.2.0",
|
|
3158
|
+
"name": "since"
|
|
3159
|
+
}
|
|
3160
|
+
],
|
|
3161
|
+
"methods": [],
|
|
3162
|
+
"properties": [
|
|
3163
|
+
{
|
|
3164
|
+
"name": "id",
|
|
3165
|
+
"tags": [
|
|
3166
|
+
{
|
|
3167
|
+
"text": "Android, iOS",
|
|
3168
|
+
"name": "platform"
|
|
3169
|
+
},
|
|
3170
|
+
{
|
|
3171
|
+
"text": "7.2.0",
|
|
3172
|
+
"name": "since"
|
|
3173
|
+
}
|
|
3174
|
+
],
|
|
3175
|
+
"docs": "",
|
|
3176
|
+
"complexTypes": [],
|
|
3177
|
+
"type": "string"
|
|
3178
|
+
},
|
|
3179
|
+
{
|
|
3180
|
+
"name": "title",
|
|
3181
|
+
"tags": [
|
|
3182
|
+
{
|
|
3183
|
+
"text": "Android, iOS",
|
|
3184
|
+
"name": "platform"
|
|
3185
|
+
},
|
|
3186
|
+
{
|
|
3187
|
+
"text": "7.2.0",
|
|
3188
|
+
"name": "since"
|
|
3189
|
+
}
|
|
3190
|
+
],
|
|
3191
|
+
"docs": "",
|
|
3192
|
+
"complexTypes": [],
|
|
3193
|
+
"type": "string | undefined"
|
|
3194
|
+
},
|
|
3195
|
+
{
|
|
3196
|
+
"name": "color",
|
|
3197
|
+
"tags": [
|
|
3198
|
+
{
|
|
3199
|
+
"text": "Android, iOS",
|
|
3200
|
+
"name": "platform"
|
|
3201
|
+
},
|
|
3202
|
+
{
|
|
3203
|
+
"text": "#0000FF",
|
|
3204
|
+
"name": "example"
|
|
3205
|
+
},
|
|
3206
|
+
{
|
|
3207
|
+
"text": "7.2.0",
|
|
3208
|
+
"name": "since"
|
|
3209
|
+
}
|
|
3210
|
+
],
|
|
3211
|
+
"docs": "",
|
|
3212
|
+
"complexTypes": [],
|
|
3213
|
+
"type": "string | undefined"
|
|
3214
|
+
}
|
|
3215
|
+
]
|
|
3216
|
+
},
|
|
3097
3217
|
{
|
|
3098
3218
|
"name": "CreateReminderOptions",
|
|
3099
3219
|
"slug": "createreminderoptions",
|
|
@@ -3786,6 +3906,88 @@
|
|
|
3786
3906
|
"type": "string[]"
|
|
3787
3907
|
}
|
|
3788
3908
|
]
|
|
3909
|
+
},
|
|
3910
|
+
{
|
|
3911
|
+
"name": "DeleteReminderWithPromptOptions",
|
|
3912
|
+
"slug": "deletereminderwithpromptoptions",
|
|
3913
|
+
"docs": "",
|
|
3914
|
+
"tags": [
|
|
3915
|
+
{
|
|
3916
|
+
"text": "7.2.0",
|
|
3917
|
+
"name": "since"
|
|
3918
|
+
}
|
|
3919
|
+
],
|
|
3920
|
+
"methods": [],
|
|
3921
|
+
"properties": [
|
|
3922
|
+
{
|
|
3923
|
+
"name": "id",
|
|
3924
|
+
"tags": [
|
|
3925
|
+
{
|
|
3926
|
+
"text": "7.2.0",
|
|
3927
|
+
"name": "since"
|
|
3928
|
+
}
|
|
3929
|
+
],
|
|
3930
|
+
"docs": "",
|
|
3931
|
+
"complexTypes": [],
|
|
3932
|
+
"type": "string"
|
|
3933
|
+
},
|
|
3934
|
+
{
|
|
3935
|
+
"name": "title",
|
|
3936
|
+
"tags": [
|
|
3937
|
+
{
|
|
3938
|
+
"text": "7.2.0",
|
|
3939
|
+
"name": "since"
|
|
3940
|
+
}
|
|
3941
|
+
],
|
|
3942
|
+
"docs": "Title of the dialog.",
|
|
3943
|
+
"complexTypes": [],
|
|
3944
|
+
"type": "string"
|
|
3945
|
+
},
|
|
3946
|
+
{
|
|
3947
|
+
"name": "message",
|
|
3948
|
+
"tags": [
|
|
3949
|
+
{
|
|
3950
|
+
"text": "7.2.0",
|
|
3951
|
+
"name": "since"
|
|
3952
|
+
}
|
|
3953
|
+
],
|
|
3954
|
+
"docs": "Message of the dialog.",
|
|
3955
|
+
"complexTypes": [],
|
|
3956
|
+
"type": "string"
|
|
3957
|
+
},
|
|
3958
|
+
{
|
|
3959
|
+
"name": "confirmButtonText",
|
|
3960
|
+
"tags": [
|
|
3961
|
+
{
|
|
3962
|
+
"text": "'Delete'",
|
|
3963
|
+
"name": "default"
|
|
3964
|
+
},
|
|
3965
|
+
{
|
|
3966
|
+
"text": "7.2.0",
|
|
3967
|
+
"name": "since"
|
|
3968
|
+
}
|
|
3969
|
+
],
|
|
3970
|
+
"docs": "Text to show on the confirm button.",
|
|
3971
|
+
"complexTypes": [],
|
|
3972
|
+
"type": "string | undefined"
|
|
3973
|
+
},
|
|
3974
|
+
{
|
|
3975
|
+
"name": "cancelButtonText",
|
|
3976
|
+
"tags": [
|
|
3977
|
+
{
|
|
3978
|
+
"text": "'Cancel'",
|
|
3979
|
+
"name": "default"
|
|
3980
|
+
},
|
|
3981
|
+
{
|
|
3982
|
+
"text": "7.2.0",
|
|
3983
|
+
"name": "since"
|
|
3984
|
+
}
|
|
3985
|
+
],
|
|
3986
|
+
"docs": "Text to show on the cancel button.",
|
|
3987
|
+
"complexTypes": [],
|
|
3988
|
+
"type": "string | undefined"
|
|
3989
|
+
}
|
|
3990
|
+
]
|
|
3789
3991
|
}
|
|
3790
3992
|
],
|
|
3791
3993
|
"enums": [
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ import type { DeleteEventWithPromptOptions } from "./schemas/interfaces/delete-e
|
|
|
20
20
|
import type { DeleteEventsByIdOptions } from "./schemas/interfaces/delete-events-by-id-options";
|
|
21
21
|
import type { DeleteEventsByIdResult } from "./sub-definitions/event-operations";
|
|
22
22
|
import type { DeleteReminderOptions } from "./schemas/interfaces/delete-reminder-options";
|
|
23
|
+
import type { DeleteReminderWithPromptOptions } from "./schemas/interfaces/delete-reminder-with-prompt-options";
|
|
23
24
|
import type { DeleteRemindersByIdOptions } from "./schemas/interfaces/delete-reminders-by-id-options";
|
|
24
25
|
import type { DeleteRemindersByIdResult } from "./sub-definitions/reminders-operations";
|
|
25
26
|
import { EventAvailability } from "./schemas/enums/event-availability";
|
|
@@ -30,6 +31,7 @@ import { EventStatus } from "./schemas/enums/event-status";
|
|
|
30
31
|
import type { GetReminderByIdOptions } from "./schemas/interfaces/get-reminder-by-id-options";
|
|
31
32
|
import type { GetRemindersFromListsOptions } from "./schemas/interfaces/get-reminders-from-lists-options";
|
|
32
33
|
import type { ListEventsInRangeOptions } from "./schemas/interfaces/list-events-in-range-options";
|
|
34
|
+
import type { ModifyCalendarOptions } from "./schemas/interfaces/modify-calendar-options";
|
|
33
35
|
import type { ModifyEventOptions } from "./schemas/interfaces/modify-event-options";
|
|
34
36
|
import type { ModifyEventWithPromptOptions } from "./schemas/interfaces/modify-event-with-prompt-options";
|
|
35
37
|
import type { ModifyReminderOptions } from "./schemas/interfaces/modify-reminder-options";
|
|
@@ -43,5 +45,5 @@ import type { RemindersList } from "./schemas/interfaces/reminders-list";
|
|
|
43
45
|
import type { SelectCalendarsWithPromptOptions } from "./schemas/interfaces/select-calendars-with-prompt-options";
|
|
44
46
|
declare const CapacitorCalendar: CapacitorCalendarPlugin;
|
|
45
47
|
export * from "./definitions";
|
|
46
|
-
export type { CheckAllPermissionsResult, RequestAllPermissionsResult, CreateEventWithPromptOptions, ModifyEventWithPromptOptions, EventEditAction, CreateEventOptions, EventGuest, ModifyEventOptions, SelectCalendarsWithPromptOptions, Calendar, RemindersList, CalendarSource, OpenCalendarOptions, CreateCalendarOptions, DeleteCalendarOptions, ReminderRecurrenceRule, RecurrenceRule, CreateReminderOptions, DeleteRemindersByIdOptions, DeleteRemindersByIdResult, DeleteReminderOptions, ModifyReminderOptions, GetReminderByIdOptions, Reminder, GetRemindersFromListsOptions, DeleteEventsByIdOptions, DeleteEventsByIdResult, DeleteEventOptions, DeleteEventWithPromptOptions, ListEventsInRangeOptions, CalendarEvent, };
|
|
48
|
+
export type { CheckAllPermissionsResult, RequestAllPermissionsResult, CreateEventWithPromptOptions, ModifyEventWithPromptOptions, EventEditAction, CreateEventOptions, EventGuest, ModifyEventOptions, SelectCalendarsWithPromptOptions, Calendar, RemindersList, CalendarSource, OpenCalendarOptions, CreateCalendarOptions, DeleteCalendarOptions, ReminderRecurrenceRule, RecurrenceRule, CreateReminderOptions, DeleteRemindersByIdOptions, DeleteRemindersByIdResult, DeleteReminderOptions, ModifyReminderOptions, GetReminderByIdOptions, Reminder, GetRemindersFromListsOptions, DeleteEventsByIdOptions, DeleteEventsByIdResult, DeleteEventOptions, DeleteEventWithPromptOptions, ListEventsInRangeOptions, CalendarEvent, ModifyCalendarOptions, DeleteReminderWithPromptOptions, };
|
|
47
49
|
export { CalendarPermissionScope, EventAvailability, EventSpan, CalendarChooserDisplayStyle, CalendarType, CalendarSourceType, ReminderRecurrenceFrequency, RecurrenceFrequency, EventStatus, AttendeeRole, AttendeeType, AttendeeStatus, CapacitorCalendar, };
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAE7F,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAEpF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAE7F,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAEpF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAe7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAGvE,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAS3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAG3E,OAAO,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AAI5F,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,MAAM,iBAAiB,GAAG,cAAc,CACtC,mBAAmB,EACnB;IACE,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,oBAAoB,EAAE,CAAC;CACrE,CACF,CAAC;AAEF,cAAc,eAAe,CAAC;AAoC9B,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,EACT,2BAA2B,EAC3B,YAAY,EACZ,kBAAkB,EAClB,2BAA2B,EAC3B,mBAAmB,EACnB,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,iBAAiB,GAClB,CAAC","sourcesContent":["import type {\n CheckAllPermissionsResult,\n RequestAllPermissionsResult,\n} from \"./sub-definitions/calendar-access\";\nimport { AttendeeRole } from \"./schemas/enums/attendee-role\";\nimport { AttendeeStatus } from \"./schemas/enums/attendee-status\";\nimport { AttendeeType } from \"./schemas/enums/attendee-type\";\nimport type { Calendar } from \"./schemas/interfaces/calendar\";\nimport { CalendarChooserDisplayStyle } from \"./schemas/enums/calendar-chooser-display-style\";\nimport type { CalendarEvent } from \"./schemas/interfaces/calendar-event\";\nimport { CalendarPermissionScope } from \"./schemas/enums/calendar-permission-scope\";\nimport type { CalendarSource } from \"./schemas/interfaces/calendar-source\";\nimport { CalendarSourceType } from \"./schemas/enums/calendar-source-type\";\nimport { CalendarType } from \"./schemas/enums/calendar-type\";\nimport type { CapacitorCalendarPlugin } from \"./definitions\";\nimport type { CreateCalendarOptions } from \"./schemas/interfaces/create-calendar-options\";\nimport type { CreateEventOptions } from \"./schemas/interfaces/create-event-options\";\nimport type { CreateEventWithPromptOptions } from \"./schemas/interfaces/create-event-with-prompt-options\";\nimport type { CreateReminderOptions } from \"./schemas/interfaces/create-reminder-options\";\nimport type { DeleteCalendarOptions } from \"./schemas/interfaces/delete-calendar-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 { DeleteEventsByIdResult } from \"./sub-definitions/event-operations\";\nimport type { DeleteReminderOptions } from \"./schemas/interfaces/delete-reminder-options\";\nimport type { DeleteReminderWithPromptOptions } from \"./schemas/interfaces/delete-reminder-with-prompt-options\";\nimport type { DeleteRemindersByIdOptions } from \"./schemas/interfaces/delete-reminders-by-id-options\";\nimport type { DeleteRemindersByIdResult } from \"./sub-definitions/reminders-operations\";\nimport { EventAvailability } from \"./schemas/enums/event-availability\";\nimport type { EventEditAction } from \"./schemas/types/event-edit-action\";\nimport { EventGuest } from \"./schemas/interfaces/event-guest\";\nimport { EventSpan } from \"./schemas/enums/event-span\";\nimport { EventStatus } from \"./schemas/enums/event-status\";\nimport type { GetReminderByIdOptions } from \"./schemas/interfaces/get-reminder-by-id-options\";\nimport type { GetRemindersFromListsOptions } from \"./schemas/interfaces/get-reminders-from-lists-options\";\nimport type { ListEventsInRangeOptions } from \"./schemas/interfaces/list-events-in-range-options\";\nimport type { ModifyCalendarOptions } from \"./schemas/interfaces/modify-calendar-options\";\nimport type { ModifyEventOptions } from \"./schemas/interfaces/modify-event-options\";\nimport type { ModifyEventWithPromptOptions } from \"./schemas/interfaces/modify-event-with-prompt-options\";\nimport type { ModifyReminderOptions } from \"./schemas/interfaces/modify-reminder-options\";\nimport type { OpenCalendarOptions } from \"./schemas/interfaces/open-calendar-options\";\nimport { RecurrenceFrequency } from \"./schemas/enums/recurrence-frequency\";\nimport type { RecurrenceRule } from \"./schemas/interfaces/recurrence-rule\";\nimport type { Reminder } from \"./schemas/interfaces/reminder\";\nimport { ReminderRecurrenceFrequency } from \"./schemas/enums/reminder-recurrence-frequency\";\nimport type { ReminderRecurrenceRule } from \"./schemas/interfaces/reminder-recurrence-rule\";\nimport type { RemindersList } from \"./schemas/interfaces/reminders-list\";\nimport type { SelectCalendarsWithPromptOptions } from \"./schemas/interfaces/select-calendars-with-prompt-options\";\nimport { registerPlugin } from \"@capacitor/core\";\n\nconst CapacitorCalendar = registerPlugin<CapacitorCalendarPlugin>(\n \"CapacitorCalendar\",\n {\n web: () => import(\"./web\").then((m) => new m.CapacitorCalendarWeb()),\n },\n);\n\nexport * from \"./definitions\";\nexport type {\n CheckAllPermissionsResult,\n RequestAllPermissionsResult,\n CreateEventWithPromptOptions,\n ModifyEventWithPromptOptions,\n EventEditAction,\n CreateEventOptions,\n EventGuest,\n ModifyEventOptions,\n SelectCalendarsWithPromptOptions,\n Calendar,\n RemindersList,\n CalendarSource,\n OpenCalendarOptions,\n CreateCalendarOptions,\n DeleteCalendarOptions,\n ReminderRecurrenceRule,\n RecurrenceRule,\n CreateReminderOptions,\n DeleteRemindersByIdOptions,\n DeleteRemindersByIdResult,\n DeleteReminderOptions,\n ModifyReminderOptions,\n GetReminderByIdOptions,\n Reminder,\n GetRemindersFromListsOptions,\n DeleteEventsByIdOptions,\n DeleteEventsByIdResult,\n DeleteEventOptions,\n DeleteEventWithPromptOptions,\n ListEventsInRangeOptions,\n CalendarEvent,\n ModifyCalendarOptions,\n DeleteReminderWithPromptOptions,\n};\nexport {\n CalendarPermissionScope,\n EventAvailability,\n EventSpan,\n CalendarChooserDisplayStyle,\n CalendarType,\n CalendarSourceType,\n ReminderRecurrenceFrequency,\n RecurrenceFrequency,\n EventStatus,\n AttendeeRole,\n AttendeeType,\n AttendeeStatus,\n CapacitorCalendar,\n};\n"]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @since 7.2.0
|
|
3
|
+
*/
|
|
4
|
+
export interface DeleteReminderWithPromptOptions {
|
|
5
|
+
/**
|
|
6
|
+
* @since 7.2.0
|
|
7
|
+
*/
|
|
8
|
+
id: string;
|
|
9
|
+
/**
|
|
10
|
+
* Title of the dialog.
|
|
11
|
+
*
|
|
12
|
+
* @since 7.2.0
|
|
13
|
+
*/
|
|
14
|
+
title: string;
|
|
15
|
+
/**
|
|
16
|
+
* Message of the dialog.
|
|
17
|
+
*
|
|
18
|
+
* @since 7.2.0
|
|
19
|
+
*/
|
|
20
|
+
message: string;
|
|
21
|
+
/**
|
|
22
|
+
* Text to show on the confirm button.
|
|
23
|
+
*
|
|
24
|
+
* @default 'Delete'
|
|
25
|
+
* @since 7.2.0
|
|
26
|
+
*/
|
|
27
|
+
confirmButtonText?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Text to show on the cancel button.
|
|
30
|
+
*
|
|
31
|
+
* @default 'Cancel'
|
|
32
|
+
* @since 7.2.0
|
|
33
|
+
*/
|
|
34
|
+
cancelButtonText?: string;
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-reminder-with-prompt-options.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/delete-reminder-with-prompt-options.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * @since 7.2.0\n */\nexport interface DeleteReminderWithPromptOptions {\n /**\n * @since 7.2.0\n */\n id: string;\n /**\n * Title of the dialog.\n *\n * @since 7.2.0\n */\n title: string;\n /**\n * Message of the dialog.\n *\n * @since 7.2.0\n */\n message: string;\n /**\n * Text to show on the confirm button.\n *\n * @default 'Delete'\n * @since 7.2.0\n */\n confirmButtonText?: string;\n /**\n * Text to show on the cancel button.\n *\n * @default 'Cancel'\n * @since 7.2.0\n */\n cancelButtonText?: string;\n}\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @since 7.2.0
|
|
3
|
+
*/
|
|
4
|
+
export interface ModifyCalendarOptions {
|
|
5
|
+
/**
|
|
6
|
+
* @platform Android, iOS
|
|
7
|
+
* @since 7.2.0
|
|
8
|
+
*/
|
|
9
|
+
id: string;
|
|
10
|
+
/**
|
|
11
|
+
* @platform Android, iOS
|
|
12
|
+
* @since 7.2.0
|
|
13
|
+
*/
|
|
14
|
+
title?: string;
|
|
15
|
+
/**
|
|
16
|
+
* @platform Android, iOS
|
|
17
|
+
* @example #0000FF
|
|
18
|
+
* @since 7.2.0
|
|
19
|
+
*/
|
|
20
|
+
color?: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modify-calendar-options.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/modify-calendar-options.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * @since 7.2.0\n */\nexport interface ModifyCalendarOptions {\n /**\n * @platform Android, iOS\n * @since 7.2.0\n */\n id: string;\n /**\n * @platform Android, iOS\n * @since 7.2.0\n */\n title?: string;\n /**\n * @platform Android, iOS\n * @example #0000FF\n * @since 7.2.0\n */\n color?: string;\n}\n"]}
|
|
@@ -2,6 +2,7 @@ import type { Calendar } from "../schemas/interfaces/calendar";
|
|
|
2
2
|
import type { CalendarSource } from "../schemas/interfaces/calendar-source";
|
|
3
3
|
import type { CreateCalendarOptions } from "../schemas/interfaces/create-calendar-options";
|
|
4
4
|
import type { DeleteCalendarOptions } from "../schemas/interfaces/delete-calendar-options";
|
|
5
|
+
import type { ModifyCalendarOptions } from "../schemas/interfaces/modify-calendar-options";
|
|
5
6
|
import type { OpenCalendarOptions } from "../schemas/interfaces/open-calendar-options";
|
|
6
7
|
import type { SelectCalendarsWithPromptOptions } from "../schemas/interfaces/select-calendars-with-prompt-options";
|
|
7
8
|
export interface CalendarOperations {
|
|
@@ -74,4 +75,11 @@ export interface CalendarOperations {
|
|
|
74
75
|
* @since 5.2.0
|
|
75
76
|
*/
|
|
76
77
|
deleteCalendar(options: DeleteCalendarOptions): Promise<void>;
|
|
78
|
+
/**
|
|
79
|
+
* Modifies a calendar with options.
|
|
80
|
+
*
|
|
81
|
+
* @platform Android, iOS
|
|
82
|
+
* @since 7.2.0
|
|
83
|
+
*/
|
|
84
|
+
modifyCalendar(options: ModifyCalendarOptions): Promise<void>;
|
|
77
85
|
}
|
|
@@ -1 +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"]}
|
|
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 { ModifyCalendarOptions } from \"../schemas/interfaces/modify-calendar-options\";\nimport type { OpenCalendarOptions } from \"../schemas/interfaces/open-calendar-options\";\nimport type { SelectCalendarsWithPromptOptions } from \"../schemas/interfaces/select-calendars-with-prompt-options\";\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 * Modifies a calendar with options.\n *\n * @platform Android, iOS\n * @since 7.2.0\n */\n modifyCalendar(options: ModifyCalendarOptions): Promise<void>;\n}\n"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { CalendarSource } from "../schemas/interfaces/calendar-source";
|
|
2
2
|
import type { CreateReminderOptions } from "../schemas/interfaces/create-reminder-options";
|
|
3
3
|
import type { DeleteReminderOptions } from "../schemas/interfaces/delete-reminder-options";
|
|
4
|
+
import type { DeleteReminderWithPromptOptions } from "../schemas/interfaces/delete-reminder-with-prompt-options";
|
|
4
5
|
import type { DeleteRemindersByIdOptions } from "../schemas/interfaces/delete-reminders-by-id-options";
|
|
5
6
|
import type { GetReminderByIdOptions } from "../schemas/interfaces/get-reminder-by-id-options";
|
|
6
7
|
import type { GetRemindersFromListsOptions } from "../schemas/interfaces/get-reminders-from-lists-options";
|
|
@@ -94,6 +95,15 @@ export interface RemindersOperations {
|
|
|
94
95
|
getRemindersFromLists(options: GetRemindersFromListsOptions): Promise<{
|
|
95
96
|
result: Reminder[];
|
|
96
97
|
}>;
|
|
98
|
+
/**
|
|
99
|
+
* Opens a dialog to delete a reminder.
|
|
100
|
+
*
|
|
101
|
+
* @platform iOS
|
|
102
|
+
* @since 7.2.0
|
|
103
|
+
*/
|
|
104
|
+
deleteReminderWithPrompt(options: DeleteReminderWithPromptOptions): Promise<{
|
|
105
|
+
deleted: boolean;
|
|
106
|
+
}>;
|
|
97
107
|
}
|
|
98
108
|
/**
|
|
99
109
|
* @since 7.1.0
|
|
@@ -1 +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"]}
|
|
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 { DeleteReminderWithPromptOptions } from \"../schemas/interfaces/delete-reminder-with-prompt-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 * Opens a dialog to delete a reminder.\n *\n * @platform iOS\n * @since 7.2.0\n */\n deleteReminderWithPrompt(\n options: DeleteReminderWithPromptOptions,\n ): Promise<{ deleted: boolean }>;\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"]}
|
package/dist/esm/web.d.ts
CHANGED
|
@@ -15,12 +15,14 @@ import type { DeleteEventWithPromptOptions } from "./schemas/interfaces/delete-e
|
|
|
15
15
|
import type { DeleteEventsByIdOptions } from "./schemas/interfaces/delete-events-by-id-options";
|
|
16
16
|
import type { DeleteEventsByIdResult } from "./sub-definitions/event-operations";
|
|
17
17
|
import type { DeleteReminderOptions } from "./schemas/interfaces/delete-reminder-options";
|
|
18
|
+
import type { DeleteReminderWithPromptOptions } from "./schemas/interfaces/delete-reminder-with-prompt-options";
|
|
18
19
|
import type { DeleteRemindersByIdOptions } from "./schemas/interfaces/delete-reminders-by-id-options";
|
|
19
20
|
import type { DeleteRemindersByIdResult } from "./sub-definitions/reminders-operations";
|
|
20
21
|
import type { EventEditAction } from "./schemas/types/event-edit-action";
|
|
21
22
|
import type { GetReminderByIdOptions } from "./schemas/interfaces/get-reminder-by-id-options";
|
|
22
23
|
import type { GetRemindersFromListsOptions } from "./schemas/interfaces/get-reminders-from-lists-options";
|
|
23
24
|
import type { ListEventsInRangeOptions } from "./schemas/interfaces/list-events-in-range-options";
|
|
25
|
+
import type { ModifyCalendarOptions } from "./schemas/interfaces/modify-calendar-options";
|
|
24
26
|
import type { ModifyEventOptions } from "./schemas/interfaces/modify-event-options";
|
|
25
27
|
import type { ModifyEventWithPromptOptions } from "./schemas/interfaces/modify-event-with-prompt-options";
|
|
26
28
|
import type { ModifyReminderOptions } from "./schemas/interfaces/modify-reminder-options";
|
|
@@ -119,5 +121,9 @@ export declare class CapacitorCalendarWeb extends WebPlugin implements Capacitor
|
|
|
119
121
|
listEventsInRange(_options: ListEventsInRangeOptions): Promise<{
|
|
120
122
|
result: CalendarEvent[];
|
|
121
123
|
}>;
|
|
124
|
+
modifyCalendar(_options: ModifyCalendarOptions): Promise<void>;
|
|
125
|
+
deleteReminderWithPrompt(_options: DeleteReminderWithPromptOptions): Promise<{
|
|
126
|
+
deleted: boolean;
|
|
127
|
+
}>;
|
|
122
128
|
private throwUnimplemented;
|
|
123
129
|
}
|