@ebarooni/capacitor-calendar 5.3.0 → 5.4.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 +4 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/CapacitorCalendarPlugin.kt +97 -0
- package/dist/docs.json +162 -10
- package/dist/esm/definitions.d.ts +66 -10
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/web.d.ts +12 -0
- package/dist/esm/web.js +12 -0
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +12 -0
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +12 -0
- package/dist/plugin.js.map +1 -1
- package/ios/Plugin/CapacitorCalendar.swift +2 -2
- package/ios/Plugin/CapacitorCalendarPlugin.m +4 -0
- package/ios/Plugin/CapacitorCalendarPlugin.swift +41 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -93,6 +93,10 @@ permissions can be found below:
|
|
|
93
93
|
* [`deleteCalendar(...)`](#deletecalendar)
|
|
94
94
|
* [`getRemindersFromLists(...)`](#getremindersfromlists)
|
|
95
95
|
* [`deleteRemindersById(...)`](#deleteremindersbyid)
|
|
96
|
+
* [`requestWriteOnlyCalendarAccess()`](#requestwriteonlycalendaraccess)
|
|
97
|
+
* [`requestReadOnlyCalendarAccess()`](#requestreadonlycalendaraccess)
|
|
98
|
+
* [`requestFullCalendarAccess()`](#requestfullcalendaraccess)
|
|
99
|
+
* [`requestFullRemindersAccess()`](#requestfullremindersaccess)
|
|
96
100
|
* [Interfaces](#interfaces)
|
|
97
101
|
* [Type Aliases](#type-aliases)
|
|
98
102
|
* [Enums](#enums)
|
|
@@ -29,6 +29,13 @@ import com.getcapacitor.annotation.PermissionCallback
|
|
|
29
29
|
Manifest.permission.WRITE_CALENDAR,
|
|
30
30
|
],
|
|
31
31
|
),
|
|
32
|
+
Permission(
|
|
33
|
+
alias = "readWriteCalendar",
|
|
34
|
+
strings = [
|
|
35
|
+
Manifest.permission.WRITE_CALENDAR,
|
|
36
|
+
Manifest.permission.READ_CALENDAR,
|
|
37
|
+
],
|
|
38
|
+
),
|
|
32
39
|
],
|
|
33
40
|
)
|
|
34
41
|
class CapacitorCalendarPlugin : Plugin() {
|
|
@@ -131,6 +138,48 @@ class CapacitorCalendarPlugin : Plugin() {
|
|
|
131
138
|
}
|
|
132
139
|
}
|
|
133
140
|
|
|
141
|
+
@PluginMethod(returnType = PluginMethod.RETURN_PROMISE)
|
|
142
|
+
fun requestWriteOnlyCalendarAccess(call: PluginCall) {
|
|
143
|
+
val permissionName = "writeCalendar"
|
|
144
|
+
try {
|
|
145
|
+
return requestPermissionForAlias(
|
|
146
|
+
permissionName,
|
|
147
|
+
call,
|
|
148
|
+
"requestWriteOnlyCalendarAccessCallback",
|
|
149
|
+
)
|
|
150
|
+
} catch (_: Exception) {
|
|
151
|
+
throw Exception("${::requestPermissionCallback.name} Could not authorize $permissionName")
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
@PluginMethod(returnType = PluginMethod.RETURN_PROMISE)
|
|
156
|
+
fun requestReadOnlyCalendarAccess(call: PluginCall) {
|
|
157
|
+
val permissionName = "readCalendar"
|
|
158
|
+
try {
|
|
159
|
+
return requestPermissionForAlias(
|
|
160
|
+
permissionName,
|
|
161
|
+
call,
|
|
162
|
+
"requestReadOnlyCalendarAccessCallback",
|
|
163
|
+
)
|
|
164
|
+
} catch (_: Exception) {
|
|
165
|
+
throw Exception("${::requestPermissionCallback.name} Could not authorize $permissionName")
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
@PluginMethod(returnType = PluginMethod.RETURN_PROMISE)
|
|
170
|
+
fun requestFullCalendarAccess(call: PluginCall) {
|
|
171
|
+
val permissionName = "readWriteCalendar"
|
|
172
|
+
try {
|
|
173
|
+
return requestPermissionForAlias(
|
|
174
|
+
permissionName,
|
|
175
|
+
call,
|
|
176
|
+
"requestFullCalendarAccessCallback",
|
|
177
|
+
)
|
|
178
|
+
} catch (_: Exception) {
|
|
179
|
+
throw Exception("${::requestPermissionCallback.name} Could not authorize $permissionName")
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
134
183
|
@PermissionCallback
|
|
135
184
|
private fun requestPermissionCallback(call: PluginCall) {
|
|
136
185
|
val permissionName = call.getString("alias")
|
|
@@ -143,6 +192,42 @@ class CapacitorCalendarPlugin : Plugin() {
|
|
|
143
192
|
}
|
|
144
193
|
}
|
|
145
194
|
|
|
195
|
+
@PermissionCallback
|
|
196
|
+
private fun requestWriteOnlyCalendarAccessCallback(call: PluginCall) {
|
|
197
|
+
val permissionName = "writeCalendar"
|
|
198
|
+
try {
|
|
199
|
+
val ret = JSObject()
|
|
200
|
+
ret.put("result", getPermissionState(permissionName))
|
|
201
|
+
call.resolve(ret)
|
|
202
|
+
} catch (_: Exception) {
|
|
203
|
+
throw Exception("${::requestPermissionCallback.name} Could not authorize $permissionName")
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
@PermissionCallback
|
|
208
|
+
private fun requestReadOnlyCalendarAccessCallback(call: PluginCall) {
|
|
209
|
+
val permissionName = "readCalendar"
|
|
210
|
+
try {
|
|
211
|
+
val ret = JSObject()
|
|
212
|
+
ret.put("result", getPermissionState(permissionName))
|
|
213
|
+
call.resolve(ret)
|
|
214
|
+
} catch (_: Exception) {
|
|
215
|
+
throw Exception("${::requestPermissionCallback.name} Could not authorize $permissionName")
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
@PermissionCallback
|
|
220
|
+
private fun requestFullCalendarAccessCallbackCallback(call: PluginCall) {
|
|
221
|
+
val permissionName = "readWriteCalendar"
|
|
222
|
+
try {
|
|
223
|
+
val ret = JSObject()
|
|
224
|
+
ret.put("result", getPermissionState(permissionName))
|
|
225
|
+
call.resolve(ret)
|
|
226
|
+
} catch (_: Exception) {
|
|
227
|
+
throw Exception("${::requestPermissionCallback.name} Could not authorize $permissionName")
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
146
231
|
@PluginMethod(returnType = PluginMethod.RETURN_PROMISE)
|
|
147
232
|
fun requestAllPermissions(call: PluginCall) {
|
|
148
233
|
try {
|
|
@@ -291,4 +376,16 @@ class CapacitorCalendarPlugin : Plugin() {
|
|
|
291
376
|
call.unimplemented("[CapacitorCalendar.${::deleteCalendar.name}] Not implemented on Android")
|
|
292
377
|
return
|
|
293
378
|
}
|
|
379
|
+
|
|
380
|
+
@PluginMethod(returnType = PluginMethod.RETURN_PROMISE)
|
|
381
|
+
fun getRemindersFromLists(call: PluginCall) {
|
|
382
|
+
call.unimplemented("[CapacitorCalendar.${::getRemindersFromLists.name}] Not implemented on Android")
|
|
383
|
+
return
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
@PluginMethod(returnType = PluginMethod.RETURN_PROMISE)
|
|
387
|
+
fun deleteRemindersById(call: PluginCall) {
|
|
388
|
+
call.unimplemented("[CapacitorCalendar.${::deleteRemindersById.name}] Not implemented on Android")
|
|
389
|
+
return
|
|
390
|
+
}
|
|
294
391
|
}
|
package/dist/docs.json
CHANGED
|
@@ -18,7 +18,12 @@
|
|
|
18
18
|
"returns": "Promise<{ result: PermissionState; }>",
|
|
19
19
|
"tags": [
|
|
20
20
|
{
|
|
21
|
-
"name": "method"
|
|
21
|
+
"name": "method",
|
|
22
|
+
"text": "checkPermission"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "since",
|
|
26
|
+
"text": "0.1.0"
|
|
22
27
|
},
|
|
23
28
|
{
|
|
24
29
|
"name": "platform",
|
|
@@ -30,11 +35,11 @@
|
|
|
30
35
|
},
|
|
31
36
|
{
|
|
32
37
|
"name": "returns",
|
|
33
|
-
"text": ";{ result: PermissionState }>}
|
|
38
|
+
"text": ";{ result: PermissionState }>} A promise that resolves with the current status of the requested permission."
|
|
34
39
|
},
|
|
35
40
|
{
|
|
36
41
|
"name": "example",
|
|
37
|
-
"text": "const
|
|
42
|
+
"text": "const { result } = await this.checkPermission({ alias: 'readCalendar' });"
|
|
38
43
|
}
|
|
39
44
|
],
|
|
40
45
|
"docs": "Checks the current authorization status of a specific permission.",
|
|
@@ -51,7 +56,12 @@
|
|
|
51
56
|
"returns": "Promise<PluginPermissionsMap>",
|
|
52
57
|
"tags": [
|
|
53
58
|
{
|
|
54
|
-
"name": "method"
|
|
59
|
+
"name": "method",
|
|
60
|
+
"text": "checkAllPermissions"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "since",
|
|
64
|
+
"text": "0.1.0"
|
|
55
65
|
},
|
|
56
66
|
{
|
|
57
67
|
"name": "platform",
|
|
@@ -59,7 +69,7 @@
|
|
|
59
69
|
},
|
|
60
70
|
{
|
|
61
71
|
"name": "returns",
|
|
62
|
-
"text": ";PluginPermissionsMap>}
|
|
72
|
+
"text": ";PluginPermissionsMap>} A promise that resolves with an object containing all the permissions and their status."
|
|
63
73
|
},
|
|
64
74
|
{
|
|
65
75
|
"name": "example",
|
|
@@ -85,7 +95,12 @@
|
|
|
85
95
|
"returns": "Promise<{ result: PermissionState; }>",
|
|
86
96
|
"tags": [
|
|
87
97
|
{
|
|
88
|
-
"name": "method"
|
|
98
|
+
"name": "method",
|
|
99
|
+
"text": "requestPermission"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "since",
|
|
103
|
+
"text": "0.1.0"
|
|
89
104
|
},
|
|
90
105
|
{
|
|
91
106
|
"name": "platform",
|
|
@@ -97,11 +112,11 @@
|
|
|
97
112
|
},
|
|
98
113
|
{
|
|
99
114
|
"name": "returns",
|
|
100
|
-
"text": ";{ result: PermissionState }>}
|
|
115
|
+
"text": ";{ result: PermissionState }>} A promise that resolves with the new permission status after the request is made."
|
|
101
116
|
},
|
|
102
117
|
{
|
|
103
118
|
"name": "example",
|
|
104
|
-
"text": "const result = await this.requestPermission({ alias: 'readCalendar' });"
|
|
119
|
+
"text": "const { result } = await this.requestPermission({ alias: 'readCalendar' });"
|
|
105
120
|
}
|
|
106
121
|
],
|
|
107
122
|
"docs": "Requests authorization to a specific permission, if not already granted.\nIf the permission is already granted, it will directly return the status.",
|
|
@@ -118,7 +133,12 @@
|
|
|
118
133
|
"returns": "Promise<PluginPermissionsMap>",
|
|
119
134
|
"tags": [
|
|
120
135
|
{
|
|
121
|
-
"name": "method"
|
|
136
|
+
"name": "method",
|
|
137
|
+
"text": "requestAllPermissions"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"name": "since",
|
|
141
|
+
"text": "0.1.0"
|
|
122
142
|
},
|
|
123
143
|
{
|
|
124
144
|
"name": "platform",
|
|
@@ -126,7 +146,7 @@
|
|
|
126
146
|
},
|
|
127
147
|
{
|
|
128
148
|
"name": "returns",
|
|
129
|
-
"text": ";PluginPermissionsMap>}
|
|
149
|
+
"text": ";PluginPermissionsMap>} A promise that resolves with the new permission statuses after the request is made."
|
|
130
150
|
},
|
|
131
151
|
{
|
|
132
152
|
"name": "example",
|
|
@@ -774,6 +794,138 @@
|
|
|
774
794
|
"docs": "Deletes reminders given their IDs.",
|
|
775
795
|
"complexTypes": [],
|
|
776
796
|
"slug": "deleteremindersbyid"
|
|
797
|
+
},
|
|
798
|
+
{
|
|
799
|
+
"name": "requestWriteOnlyCalendarAccess",
|
|
800
|
+
"signature": "() => Promise<{ result: PermissionState; }>",
|
|
801
|
+
"parameters": [],
|
|
802
|
+
"returns": "Promise<{ result: PermissionState; }>",
|
|
803
|
+
"tags": [
|
|
804
|
+
{
|
|
805
|
+
"name": "method",
|
|
806
|
+
"text": "requestWriteOnlyCalendarAccess"
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
"name": "since",
|
|
810
|
+
"text": "5.4.0"
|
|
811
|
+
},
|
|
812
|
+
{
|
|
813
|
+
"name": "platform",
|
|
814
|
+
"text": "iOS, Android"
|
|
815
|
+
},
|
|
816
|
+
{
|
|
817
|
+
"name": "returns",
|
|
818
|
+
"text": "A promise that resolves with the state of the write access permission."
|
|
819
|
+
},
|
|
820
|
+
{
|
|
821
|
+
"name": "example",
|
|
822
|
+
"text": "const { result } = await this.requestWriteOnlyCalendarAccess();"
|
|
823
|
+
}
|
|
824
|
+
],
|
|
825
|
+
"docs": "Requests write access for the calendar. If its already granted, it will directly return the state.",
|
|
826
|
+
"complexTypes": [
|
|
827
|
+
"PermissionState"
|
|
828
|
+
],
|
|
829
|
+
"slug": "requestwriteonlycalendaraccess"
|
|
830
|
+
},
|
|
831
|
+
{
|
|
832
|
+
"name": "requestReadOnlyCalendarAccess",
|
|
833
|
+
"signature": "() => Promise<{ result: PermissionState; }>",
|
|
834
|
+
"parameters": [],
|
|
835
|
+
"returns": "Promise<{ result: PermissionState; }>",
|
|
836
|
+
"tags": [
|
|
837
|
+
{
|
|
838
|
+
"name": "method",
|
|
839
|
+
"text": "requestReadOnlyCalendarAccess"
|
|
840
|
+
},
|
|
841
|
+
{
|
|
842
|
+
"name": "since",
|
|
843
|
+
"text": "5.4.0"
|
|
844
|
+
},
|
|
845
|
+
{
|
|
846
|
+
"name": "platform",
|
|
847
|
+
"text": "Android"
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
"name": "returns",
|
|
851
|
+
"text": "A promise that resolves with the state of the read access permission."
|
|
852
|
+
},
|
|
853
|
+
{
|
|
854
|
+
"name": "example",
|
|
855
|
+
"text": "const { result } = await this.requestReadOnlyCalendarAccess();"
|
|
856
|
+
}
|
|
857
|
+
],
|
|
858
|
+
"docs": "Requests read access for the calendar. If its already granted, it will directly return the state.",
|
|
859
|
+
"complexTypes": [
|
|
860
|
+
"PermissionState"
|
|
861
|
+
],
|
|
862
|
+
"slug": "requestreadonlycalendaraccess"
|
|
863
|
+
},
|
|
864
|
+
{
|
|
865
|
+
"name": "requestFullCalendarAccess",
|
|
866
|
+
"signature": "() => Promise<{ result: PermissionState; }>",
|
|
867
|
+
"parameters": [],
|
|
868
|
+
"returns": "Promise<{ result: PermissionState; }>",
|
|
869
|
+
"tags": [
|
|
870
|
+
{
|
|
871
|
+
"name": "method",
|
|
872
|
+
"text": "requestFullCalendarAccess"
|
|
873
|
+
},
|
|
874
|
+
{
|
|
875
|
+
"name": "since",
|
|
876
|
+
"text": "5.4.0"
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
"name": "platform",
|
|
880
|
+
"text": "iOS, Android"
|
|
881
|
+
},
|
|
882
|
+
{
|
|
883
|
+
"name": "returns",
|
|
884
|
+
"text": "A promise that resolves with the state of read and write access permission."
|
|
885
|
+
},
|
|
886
|
+
{
|
|
887
|
+
"name": "example",
|
|
888
|
+
"text": "const { result } = await this.requestFullCalendarAccess();"
|
|
889
|
+
}
|
|
890
|
+
],
|
|
891
|
+
"docs": "Requests read and write access for the calendar. If its already granted, it will directly return the state.",
|
|
892
|
+
"complexTypes": [
|
|
893
|
+
"PermissionState"
|
|
894
|
+
],
|
|
895
|
+
"slug": "requestfullcalendaraccess"
|
|
896
|
+
},
|
|
897
|
+
{
|
|
898
|
+
"name": "requestFullRemindersAccess",
|
|
899
|
+
"signature": "() => Promise<{ result: PermissionState; }>",
|
|
900
|
+
"parameters": [],
|
|
901
|
+
"returns": "Promise<{ result: PermissionState; }>",
|
|
902
|
+
"tags": [
|
|
903
|
+
{
|
|
904
|
+
"name": "method",
|
|
905
|
+
"text": "requestFullRemindersAccess"
|
|
906
|
+
},
|
|
907
|
+
{
|
|
908
|
+
"name": "since",
|
|
909
|
+
"text": "5.4.0"
|
|
910
|
+
},
|
|
911
|
+
{
|
|
912
|
+
"name": "platform",
|
|
913
|
+
"text": "iOS"
|
|
914
|
+
},
|
|
915
|
+
{
|
|
916
|
+
"name": "returns",
|
|
917
|
+
"text": "A promise that resolves with the state of read and write access permission."
|
|
918
|
+
},
|
|
919
|
+
{
|
|
920
|
+
"name": "example",
|
|
921
|
+
"text": "const { result } = await this.requestFullRemindersAccess();"
|
|
922
|
+
}
|
|
923
|
+
],
|
|
924
|
+
"docs": "Requests read and write access for the reminders. If its already granted, it will directly return the state.",
|
|
925
|
+
"complexTypes": [
|
|
926
|
+
"PermissionState"
|
|
927
|
+
],
|
|
928
|
+
"slug": "requestfullremindersaccess"
|
|
777
929
|
}
|
|
778
930
|
],
|
|
779
931
|
"properties": []
|
|
@@ -12,12 +12,13 @@ export interface CapacitorCalendarPlugin {
|
|
|
12
12
|
/**
|
|
13
13
|
* Checks the current authorization status of a specific permission.
|
|
14
14
|
*
|
|
15
|
-
* @method
|
|
15
|
+
* @method checkPermission
|
|
16
|
+
* @since 0.1.0
|
|
16
17
|
* @platform iOS, Android
|
|
17
18
|
* @param options An object with the name of the permission
|
|
18
|
-
* @returns {Promise<{ result: PermissionState }>}
|
|
19
|
+
* @returns {Promise<{ result: PermissionState }>} A promise that resolves with the current status of the requested permission.
|
|
19
20
|
* @example
|
|
20
|
-
* const
|
|
21
|
+
* const { result } = await this.checkPermission({ alias: 'readCalendar' });
|
|
21
22
|
*/
|
|
22
23
|
checkPermission(options: {
|
|
23
24
|
alias: PluginPermission;
|
|
@@ -27,9 +28,10 @@ export interface CapacitorCalendarPlugin {
|
|
|
27
28
|
/**
|
|
28
29
|
* Checks the current authorization status of all the required permissions for the plugin.
|
|
29
30
|
*
|
|
30
|
-
* @method
|
|
31
|
+
* @method checkAllPermissions
|
|
32
|
+
* @since 0.1.0
|
|
31
33
|
* @platform iOS, Android
|
|
32
|
-
* @returns {Promise<PluginPermissionsMap>}
|
|
34
|
+
* @returns {Promise<PluginPermissionsMap>} A promise that resolves with an object containing all the permissions and their status.
|
|
33
35
|
* @example
|
|
34
36
|
* const permissionsStatus = await this.checkAllPermissions();
|
|
35
37
|
*/
|
|
@@ -38,12 +40,13 @@ export interface CapacitorCalendarPlugin {
|
|
|
38
40
|
* Requests authorization to a specific permission, if not already granted.
|
|
39
41
|
* If the permission is already granted, it will directly return the status.
|
|
40
42
|
*
|
|
41
|
-
* @method
|
|
43
|
+
* @method requestPermission
|
|
44
|
+
* @since 0.1.0
|
|
42
45
|
* @platform iOS, Android
|
|
43
46
|
* @param options An object with the name of the permission
|
|
44
|
-
* @returns {Promise<{ result: PermissionState }>}
|
|
47
|
+
* @returns {Promise<{ result: PermissionState }>} A promise that resolves with the new permission status after the request is made.
|
|
45
48
|
* @example
|
|
46
|
-
* const result = await this.requestPermission({ alias: 'readCalendar' });
|
|
49
|
+
* const { result } = await this.requestPermission({ alias: 'readCalendar' });
|
|
47
50
|
*/
|
|
48
51
|
requestPermission(options: {
|
|
49
52
|
alias: PluginPermission;
|
|
@@ -53,9 +56,10 @@ export interface CapacitorCalendarPlugin {
|
|
|
53
56
|
/**
|
|
54
57
|
* Requests authorization to all the required permissions for the plugin, if they have not already been granted.
|
|
55
58
|
*
|
|
56
|
-
* @method
|
|
59
|
+
* @method requestAllPermissions
|
|
60
|
+
* @since 0.1.0
|
|
57
61
|
* @platform iOS, Android
|
|
58
|
-
* @returns {Promise<PluginPermissionsMap>}
|
|
62
|
+
* @returns {Promise<PluginPermissionsMap>} A promise that resolves with the new permission statuses after the request is made.
|
|
59
63
|
* @example
|
|
60
64
|
* const permissionResults = await this.requestAllPermissions();
|
|
61
65
|
*/
|
|
@@ -490,4 +494,56 @@ export interface CapacitorCalendarPlugin {
|
|
|
490
494
|
failed: string[];
|
|
491
495
|
};
|
|
492
496
|
}>;
|
|
497
|
+
/**
|
|
498
|
+
* Requests write access for the calendar. If its already granted, it will directly return the state.
|
|
499
|
+
*
|
|
500
|
+
* @method requestWriteOnlyCalendarAccess
|
|
501
|
+
* @since 5.4.0
|
|
502
|
+
* @platform iOS, Android
|
|
503
|
+
* @returns {Promise<{ result: PermissionState }>} A promise that resolves with the state of the write access permission.
|
|
504
|
+
* @example
|
|
505
|
+
* const { result } = await this.requestWriteOnlyCalendarAccess();
|
|
506
|
+
*/
|
|
507
|
+
requestWriteOnlyCalendarAccess(): Promise<{
|
|
508
|
+
result: PermissionState;
|
|
509
|
+
}>;
|
|
510
|
+
/**
|
|
511
|
+
* Requests read access for the calendar. If its already granted, it will directly return the state.
|
|
512
|
+
*
|
|
513
|
+
* @method requestReadOnlyCalendarAccess
|
|
514
|
+
* @since 5.4.0
|
|
515
|
+
* @platform Android
|
|
516
|
+
* @returns {Promise<{ result: PermissionState }>} A promise that resolves with the state of the read access permission.
|
|
517
|
+
* @example
|
|
518
|
+
* const { result } = await this.requestReadOnlyCalendarAccess();
|
|
519
|
+
*/
|
|
520
|
+
requestReadOnlyCalendarAccess(): Promise<{
|
|
521
|
+
result: PermissionState;
|
|
522
|
+
}>;
|
|
523
|
+
/**
|
|
524
|
+
* Requests read and write access for the calendar. If its already granted, it will directly return the state.
|
|
525
|
+
*
|
|
526
|
+
* @method requestFullCalendarAccess
|
|
527
|
+
* @since 5.4.0
|
|
528
|
+
* @platform iOS, Android
|
|
529
|
+
* @returns {Promise<{ result: PermissionState }>} A promise that resolves with the state of read and write access permission.
|
|
530
|
+
* @example
|
|
531
|
+
* const { result } = await this.requestFullCalendarAccess();
|
|
532
|
+
*/
|
|
533
|
+
requestFullCalendarAccess(): Promise<{
|
|
534
|
+
result: PermissionState;
|
|
535
|
+
}>;
|
|
536
|
+
/**
|
|
537
|
+
* Requests read and write access for the reminders. If its already granted, it will directly return the state.
|
|
538
|
+
*
|
|
539
|
+
* @method requestFullRemindersAccess
|
|
540
|
+
* @since 5.4.0
|
|
541
|
+
* @platform iOS
|
|
542
|
+
* @returns {Promise<{ result: PermissionState }>} A promise that resolves with the state of read and write access permission.
|
|
543
|
+
* @example
|
|
544
|
+
* const { result } = await this.requestFullRemindersAccess();
|
|
545
|
+
*/
|
|
546
|
+
requestFullRemindersAccess(): Promise<{
|
|
547
|
+
result: PermissionState;
|
|
548
|
+
}>;
|
|
493
549
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import { CalendarChooserDisplayStyle } from './schemas/enums/calendar-chooser-display-style';\nimport { CalendarChooserSelectionStyle } from './schemas/enums/calendar-chooser-selection-style';\nimport { PluginPermission } from './schemas/enums/plugin-permission';\nimport type { PermissionState } from '@capacitor/core';\nimport type { Calendar } from './schemas/interfaces/calendar';\nimport type { RemindersList } from './schemas/interfaces/reminders-list';\nimport type { PluginPermissionsMap } from './schemas/interfaces/plugin-permissions-map';\nimport type { ReminderRecurrenceRule } from './schemas/interfaces/reminder-recurrence-rule';\nimport type { CalendarEvent } from './schemas/interfaces/calendar-event';\nimport type { Reminder } from './schemas/interfaces/reminder';\n\nexport interface CapacitorCalendarPlugin {\n /**\n * Checks the current authorization status of a specific permission.\n *\n * @method\n * @platform iOS, Android\n * @param options An object with the name of the permission\n * @returns {Promise<{ result: PermissionState }>} – A promise that resolves with the current status of the requested permission.\n * @example\n * const status = await this.checkPermission({ alias: 'readCalendar' });\n */\n checkPermission(options: { alias: PluginPermission }): Promise<{ result: PermissionState }>;\n\n /**\n * Checks the current authorization status of all the required permissions for the plugin.\n *\n * @method\n * @platform iOS, Android\n * @returns {Promise<PluginPermissionsMap>} – A promise that resolves with an object containing all the permissions and their status.\n * @example\n * const permissionsStatus = await this.checkAllPermissions();\n */\n checkAllPermissions(): Promise<PluginPermissionsMap>;\n\n /**\n * Requests authorization to a specific permission, if not already granted.\n * If the permission is already granted, it will directly return the status.\n *\n * @method\n * @platform iOS, Android\n * @param options An object with the name of the permission\n * @returns {Promise<{ result: PermissionState }>} – A promise that resolves with the new permission status after the request is made.\n * @example\n * const result = await this.requestPermission({ alias: 'readCalendar' });\n */\n requestPermission(options: { alias: PluginPermission }): Promise<{ result: PermissionState }>;\n\n /**\n * Requests authorization to all the required permissions for the plugin, if they have not already been granted.\n *\n * @method\n * @platform iOS, Android\n * @returns {Promise<PluginPermissionsMap>} – A promise that resolves with the new permission statuses after the request is made.\n * @example\n * const permissionResults = await this.requestAllPermissions();\n */\n requestAllPermissions(): Promise<PluginPermissionsMap>;\n\n /**\n * Creates an event in the calendar by using the native calendar.\n * On iOS opens a native sheet and on Android opens an intent.\n *\n * @method createEventWithPrompt\n * @since 0.1.0\n * @platform iOS, Android\n * @permissions\n * <h3>Runtime Permissions:</h3>\n * <ul>\n * <li><strong>Android:</strong> readCalendar</li>\n * </ul>\n * @param {object} options - Options for creating the event.\n * @param {string} options.title - The title of the event.\n * @param {string} options.calendarId - The id of the destination calendar. (Optional)\n * @param {string} [options.location] - The location of the event. (Optional)\n * @param {number} [options.startDate] - The start date and time of the event. (Optional)\n * @param {number} [options.endDate] - The end date and time of the event. (Optional)\n * @param {boolean} [options.isAllDay] - Weather the event is for the entire day or not. (Optional)\n * @param {number} [options.alertOffsetInMinutes] - Ignored on Android. If a number >= 0 is provided,\n * an alert will be set for the event this many minutes *before* the event.\n * Negative values are ignored. (Optional)\n * @returns {Promise<{ result: string[] }>} A promise that resolves with an array of the ids of created events.\n * @example\n * if (capacitor.getPlatform() === 'android') {\n * await this.requestPermission({ alias: 'readCalendar' });\n * { result } = result = await this.createEventWithPrompt({\n * title: 'Title',\n * alertOffsetInMinutes: 5,\n * });\n * } else {\n * { result } = result = await this.createEventWithPrompt({\n * title: 'Title',\n * alertOffsetInMinutes: 5,\n * });\n * }\n */\n createEventWithPrompt(options: {\n title: string;\n calendarId?: string;\n location?: string;\n startDate?: number;\n endDate?: number;\n isAllDay?: boolean;\n alertOffsetInMinutes?: number;\n }): Promise<{ result: string[] }>;\n\n /**\n * Presents a prompt to the user to select calendars. This method is available only on iOS.\n *\n * @method selectCalendarsWithPrompt\n * @since 0.2.0\n * @platform iOS\n * @permissions\n * <h3>Runtime Permissions:</h3>\n * <ul>\n * <li><strong>iOS:</strong> writeCalendar</li>\n * </ul>\n * @param {object} options - Options for customizing the display and selection styles of the calendar chooser.\n * @param {CalendarChooserDisplayStyle} options.displayStyle - To show all or only writeable calendars.\n * @param {CalendarChooserSelectionStyle} [options.selectionStyle] - To be able to select multiple calendars or only one.\n * @returns { Promise<{ result: Calendar[] }> } A promise that resolves with an array of selected calendars,\n * where each calendar object contains an ID and a title.\n * @example\n * if (capacitor.getPlatform() === 'ios') {\n * const { result } = await selectCalendarsWithPrompt();\n * console.log(result); // [{ id: '1', title: 'Work Calendar' }]\n * }\n */\n selectCalendarsWithPrompt(options: {\n displayStyle: CalendarChooserDisplayStyle;\n selectionStyle: CalendarChooserSelectionStyle;\n }): Promise<{ result: Calendar[] }>;\n\n /**\n * Retrieves a list of calendars available on the device.\n *\n * @async\n * @method listCalendars\n * @platform iOS, Android\n * @returns {Promise<{ result: Calendar[] }>} A promise that resolves with an array of calendars available on the device.\n * Each calendar object in the array contains an ID and a title.\n * @example\n * const { result } = await listCalendars();\n * console.log(result); // [{ id: '1', title: 'Work Calendar' }, { id: '2', title: 'Personal Calendar' }]\n */\n listCalendars(): Promise<{ result: Calendar[] }>;\n\n /**\n * Retrieves the default calendar set on the device.\n *\n * @method getDefaultCalendar\n * @platform iOS, Android\n * @returns {Promise<{ result: Calendar }>} A promise that resolves with the default calendar set on the device.\n * The returned calendar object contains an ID and a title.\n * @example\n * const { result } = await getDefaultCalendar();\n * console.log(result); // { id: '1', title: 'Default Calendar' }\n */\n getDefaultCalendar(): Promise<{ result: Calendar }>;\n\n /**\n * Creates an event with the provided options.\n *\n * @method createEvent\n * @platform iOS, Android\n * @permissions\n * <h3>Runtime Permissions:</h3>\n * <ul>\n * <li><strong>iOS:</strong> writeCalendar</li>\n * <li><strong>Android:</strong> readCalendar, writeCalendar</li>\n * </ul>\n * @param {object} options - Options for creating the event.\n * @param {string} options.title - The title of the event.\n * @param {string} options.calendarId - The id of the destination calendar. (Optional)\n * @param {string} [options.location] - The location of the event. (Optional)\n * @param {number} [options.startDate] - The start date and time of the event. (Optional)\n * @param {number} [options.endDate] - The end date and time of the event. (Optional)\n * @param {boolean} [options.isAllDay] - Weather the event is for the entire day or not. (Optional)\n * @param {number} [options.alertOffsetInMinutes] - If a number >= 0 is provided, an alert will be set for the event this many\n * minutes *before* the event. Negative values are ignored. (Optional)\n * @returns {Promise<{ result: string }>} A promise that resolves with the id of the created event.\n * @example\n * const now = Date.now();\n * const eventOptions = {\n * title: 'Team Meeting',\n * location: 'Conference Room A',\n * startDate: now,\n * endDate: now + 2 * 60 * 60 * 1000,\n * isAllDay: false,\n * alertOffsetInMinutes: 5,\n * };\n * const { result } = await createEvent(eventOptions);\n */\n createEvent(options: {\n title: string;\n calendarId?: string;\n location?: string;\n startDate?: number;\n endDate?: number;\n isAllDay?: boolean;\n alertOffsetInMinutes?: number;\n }): Promise<{ result: string }>;\n\n /**\n * Retrieves the default reminders list set on the device.\n *\n * @method getDefaultRemindersList\n * @platform iOS\n * @returns {Promise<{ result: RemindersList }>} A promise that resolves with the default reminder list set on the device.\n * The returned reminders list object contains an ID and a title.\n * @example\n * const { result } = await getDefaultRemindersList();\n * console.log(result); // { id: '1', title: 'Default Reminders List' }\n */\n getDefaultRemindersList(): Promise<{ result: RemindersList }>;\n\n /**\n * Retrieves all available reminders lists on the device.\n *\n * @async\n * @method getRemindersLists\n * @platform iOS\n * @returns {Promise<{ result: RemindersList[] }>} A promise that resolves with an array of reminders lists available on the device.\n * Each reminders list object in the array contains an ID and a title.\n * @example\n * const { result } = await getRemindersLists();\n * console.log(result); // [{ id: '1', title: 'Groceries' }, { id: '2', title: 'Subscriptions' }]\n */\n getRemindersLists(): Promise<{ result: RemindersList[] }>;\n\n /**\n * Creates a reminder with the provided options.\n *\n * @method createReminder\n * @since 0.5.0\n * @platform iOS\n * @permissions\n * <h3>Runtime Permissions:</h3>\n * <ul>\n * <li><strong>iOS:</strong> writeReminders</li>\n * </ul>\n * @param {object} options - Options for creating the reminder.\n * @param {string} options.title - The title of the reminder.\n * @param {string} options.listId - The id of the destination reminders list. (Optional)\n * @param {number} [options.priority] - The priority of the reminder. A number between one and nine where nine\n * has the least priority and 0 means no priority at all. Values outside of this range will be rounded to the\n * nearest border. (Optional)\n * @param {boolean} [options.isCompleted] - Whether the reminder is completed already or not. (Optional)\n * @param {number} [options.startDate] - The start date of the reminder. (Optional)\n * @param {number} [options.dueDate] - The due date of the reminder. (Optional)\n * @param {number} [options.completionDate] - The date at which the reminder was completed. (Optional)\n * @param {string} [options.notes] - Additional notes about the reminder. (Optional)\n * @param {string} [options.url] - A URL to save under the reminder. (Optional)\n * @param {string} [options.location] - A location to save under the reminder. (Optional)\n * @param {string} [options.recurrence] - The rules for the recurrence of the reminder. (Optional)\n * @returns {Promise<{ result: string }>} A Promise that resolves with the id of the created reminder\n * @example\n * const now = Date.now();\n * const rules: ReminderRecurrenceRule = {\n * frequency: ReminderRecurrenceFrequency.MONTHLY,\n * interval: 10,\n * end: Date.now()\n * }\n * const reminderOptions = {\n * title: 'Buy cucumber',\n * listId: 'ABC12',\n * priority: 5,\n * isCompleted: false,\n * startDateComponents: now,\n * notes: 'Also buy tomatoes',\n * url: 'https://capacitor-calendar.pages.dev/',\n * location: 'My Local Supermarket',\n * recurrence: rules\n * };\n * const { result } = await createReminder(reminderOptions);\n * console.log(result); // 'ID_1'\n */\n createReminder(options: {\n title: string;\n listId?: string;\n priority?: number;\n isCompleted?: boolean;\n startDate?: number;\n dueDate?: number;\n completionDate?: number;\n notes?: string;\n url?: string;\n location?: string;\n recurrence?: ReminderRecurrenceRule;\n }): Promise<{ result: string }>;\n\n /**\n * Opens the calendar app. Since the user leaves your app, use this method with caution.\n * It will open the calendar on today's date if no date is provided.\n *\n * @method openCalendar\n * @platform iOS, Android\n * @param {object} options - Options for opening the calendar.\n * @param {number} options.date - The date at which the calendar should be opened. (Optional)\n * @returns {Promise<void>}\n * @example\n * void CapacitorCalendar.openCalendar({ date: Date.now() });\n */\n openCalendar(options: { date?: number }): Promise<void>;\n\n /**\n * Opens the reminders app. Since the user leaves your app, use this method with caution.\n *\n * @method openReminders\n * @platform iOS\n * @returns {Promise<void>}\n * @example\n * void CapacitorCalendar.openReminders();\n */\n openReminders(): Promise<void>;\n\n /**\n * Retrieves the list of calendar events present in the given date range.\n *\n * @method listEventsInRange\n * @since 0.10.0\n * @platform iOS, Android\n * @permissions\n * <h3>Runtime Permissions:</h3>\n * <ul>\n * <li><strong>iOS:</strong> readCalendar</li>\n * <li><strong>Android:</strong> readCalendar</li>\n * </ul>\n * @param {object} options Options for defining the date range.\n * @param {number} options.startDate The start of the date range.\n * @param {number} options.endDate The end of the date range.\n * @returns {Promise<{ result: CalendarEvent[] }>} A Promise that resolves with the list of events.\n * @example\n * const { result } = await CapacitorCalendar.listEventsInRange({\n * startDate: Date.now(),\n * endDate: Date.now() + 6 * 7 * 24 * 60 * 60 * 1000, // 6 weeks from now\n * })\n */\n listEventsInRange(options: { startDate: number; endDate: number }): Promise<{ result: CalendarEvent[] }>;\n\n /**\n * Deletes events from the calendar given their IDs.\n *\n * @method deleteEventsById\n * @since 0.11.0\n * @platform iOS, Android\n * @permissions\n * <h3>Runtime Permissions:</h3>\n * <ul>\n * <li><strong>iOS:</strong> writeCalendar</li>\n * <li><strong>Android:</strong> writeCalendar</li>\n * </ul>\n * @param {object} options Options for defining event IDs.\n * @param {number} options.ids An array of event IDs to be deleted.\n * @returns {Promise<{ deleted: string[], failed: string[] }>}\n * A promise that resolves to an object with two properties:\n * - deleted: string[] - An array of IDs that were successfully deleted.\n * - failed: string[] - An array of IDs that could not be deleted.\n * @example\n * const idsToDelete = ['ID_1', 'ID_2', 'ID_DOES_NOT_EXIST'];\n * const { result } = await CapacitorCalendar.deleteEventsById(idsToDelete)\n * console.log(result.deleted) // ['ID_1', 'ID_2']\n * console.log(result.failed) // ['ID_DOES_NOT_EXIST']\n */\n deleteEventsById(options: { ids: string[] }): Promise<{ result: { deleted: string[]; failed: string[] } }>;\n\n /**\n * Creates a calendar\n *\n * @method createCalendar\n * @since 5.2.0\n * @platform iOS\n * @permissions\n * <h3>Runtime Permissions:</h3>\n * <ul>\n * <li><strong>iOS:</strong> readCalendar, writeCalendar</li>\n * </ul>\n * @param {object} options Options for creating a calendar.\n * @param {string} options.title The title of the calendar to create.\n * @param {string} options.color The color of the calendar to create.\n * The color should be a HEX string. (Optional)\n * @returns {Promise<{ result: string }>} The id of the created calendar.\n * @example\n * { result } = await CapacitorCalendar.createCalendar({\n * title: 'New Calendar',\n * color: '#1d00fc',\n * });\n * console.log(result); // 'CALENDAR_ID'\n */\n createCalendar(options: { title: string; color?: string }): Promise<{ result: string }>;\n\n /**\n * Deletes a calendar by id\n *\n * @method deleteCalendar\n * @since 5.2.0\n * @platform iOS\n * @permissions\n * <h3>Runtime Permissions:</h3>\n * <ul>\n * <li><strong>iOS:</strong> readCalendar, writeCalendar</li>\n * </ul>\n * @param {object} options Options for deleting a calendar.\n * @param {string} options.id The id of the calendar to delete.\n * @example\n * await CapacitorCalendar.deleteCalendar({ id: 'ID_1' });\n */\n deleteCalendar(options: { id: string }): Promise<void>;\n\n /**\n * Retrieves the list of reminders present in the given date range.\n *\n * @method getRemindersFromLists\n * @since 5.3.0\n * @platform iOS\n * @permissions\n * <h3>Runtime Permissions:</h3>\n * <ul>\n * <li><strong>iOS:</strong> readReminders</li>\n * </ul>\n * @param {object} options Options for defining the date range.\n * It Will fetch all reminders from all available lists if not provided. (Optional)\n * @param {string[]} options.listIds An array of reminder list ids.\n * @returns {Promise<{ result: Reminder[] }>} A Promise that resolves with the list of reminders.\n * @example\n * const now = Date.now();\n * const { result } = await CapacitorCalendar.getRemindersFromLists({\n * listIds: ['LIST_ID_1', 'LIST_ID_2'],\n * });\n */\n getRemindersFromLists(options?: { listIds: string[] }): Promise<{ result: Reminder[] }>;\n\n /**\n * Deletes reminders given their IDs.\n *\n * @method deleteRemindersById\n * @since 5.3.0\n * @platform iOS\n * @permissions\n * <h3>Runtime Permissions:</h3>\n * <ul>\n * <li><strong>iOS:</strong> writeReminders</li>\n * </ul>\n * @param {object} options Options for defining reminder IDs.\n * @param {number} options.ids An array of reminder IDs to be deleted.\n * @returns {Promise<{ deleted: string[], failed: string[] }>}\n * A promise that resolves to an object with two properties:\n * - deleted: string[] - An array of IDs that were successfully deleted.\n * - failed: string[] - An array of IDs that could not be deleted.\n * @example\n * const idsToDelete = ['ID_1', 'ID_2', 'ID_DOES_NOT_EXIST'];\n * const { result } = await CapacitorCalendar.deleteRemindersById(idsToDelete)\n * console.log(result.deleted) // ['ID_1', 'ID_2']\n * console.log(result.failed) // ['ID_DOES_NOT_EXIST']\n */\n deleteRemindersById(options: { ids: string[] }): Promise<{ result: { deleted: string[]; failed: string[] } }>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import { CalendarChooserDisplayStyle } from './schemas/enums/calendar-chooser-display-style';\nimport { CalendarChooserSelectionStyle } from './schemas/enums/calendar-chooser-selection-style';\nimport { PluginPermission } from './schemas/enums/plugin-permission';\nimport type { PermissionState } from '@capacitor/core';\nimport type { Calendar } from './schemas/interfaces/calendar';\nimport type { RemindersList } from './schemas/interfaces/reminders-list';\nimport type { PluginPermissionsMap } from './schemas/interfaces/plugin-permissions-map';\nimport type { ReminderRecurrenceRule } from './schemas/interfaces/reminder-recurrence-rule';\nimport type { CalendarEvent } from './schemas/interfaces/calendar-event';\nimport type { Reminder } from './schemas/interfaces/reminder';\n\nexport interface CapacitorCalendarPlugin {\n /**\n * Checks the current authorization status of a specific permission.\n *\n * @method checkPermission\n * @since 0.1.0\n * @platform iOS, Android\n * @param options An object with the name of the permission\n * @returns {Promise<{ result: PermissionState }>} A promise that resolves with the current status of the requested permission.\n * @example\n * const { result } = await this.checkPermission({ alias: 'readCalendar' });\n */\n checkPermission(options: { alias: PluginPermission }): Promise<{ result: PermissionState }>;\n\n /**\n * Checks the current authorization status of all the required permissions for the plugin.\n *\n * @method checkAllPermissions\n * @since 0.1.0\n * @platform iOS, Android\n * @returns {Promise<PluginPermissionsMap>} A promise that resolves with an object containing all the permissions and their status.\n * @example\n * const permissionsStatus = await this.checkAllPermissions();\n */\n checkAllPermissions(): Promise<PluginPermissionsMap>;\n\n /**\n * Requests authorization to a specific permission, if not already granted.\n * If the permission is already granted, it will directly return the status.\n *\n * @method requestPermission\n * @since 0.1.0\n * @platform iOS, Android\n * @param options An object with the name of the permission\n * @returns {Promise<{ result: PermissionState }>} A promise that resolves with the new permission status after the request is made.\n * @example\n * const { result } = await this.requestPermission({ alias: 'readCalendar' });\n */\n requestPermission(options: { alias: PluginPermission }): Promise<{ result: PermissionState }>;\n\n /**\n * Requests authorization to all the required permissions for the plugin, if they have not already been granted.\n *\n * @method requestAllPermissions\n * @since 0.1.0\n * @platform iOS, Android\n * @returns {Promise<PluginPermissionsMap>} A promise that resolves with the new permission statuses after the request is made.\n * @example\n * const permissionResults = await this.requestAllPermissions();\n */\n requestAllPermissions(): Promise<PluginPermissionsMap>;\n\n /**\n * Creates an event in the calendar by using the native calendar.\n * On iOS opens a native sheet and on Android opens an intent.\n *\n * @method createEventWithPrompt\n * @since 0.1.0\n * @platform iOS, Android\n * @permissions\n * <h3>Runtime Permissions:</h3>\n * <ul>\n * <li><strong>Android:</strong> readCalendar</li>\n * </ul>\n * @param {object} options - Options for creating the event.\n * @param {string} options.title - The title of the event.\n * @param {string} options.calendarId - The id of the destination calendar. (Optional)\n * @param {string} [options.location] - The location of the event. (Optional)\n * @param {number} [options.startDate] - The start date and time of the event. (Optional)\n * @param {number} [options.endDate] - The end date and time of the event. (Optional)\n * @param {boolean} [options.isAllDay] - Weather the event is for the entire day or not. (Optional)\n * @param {number} [options.alertOffsetInMinutes] - Ignored on Android. If a number >= 0 is provided,\n * an alert will be set for the event this many minutes *before* the event.\n * Negative values are ignored. (Optional)\n * @returns {Promise<{ result: string[] }>} A promise that resolves with an array of the ids of created events.\n * @example\n * if (capacitor.getPlatform() === 'android') {\n * await this.requestPermission({ alias: 'readCalendar' });\n * { result } = result = await this.createEventWithPrompt({\n * title: 'Title',\n * alertOffsetInMinutes: 5,\n * });\n * } else {\n * { result } = result = await this.createEventWithPrompt({\n * title: 'Title',\n * alertOffsetInMinutes: 5,\n * });\n * }\n */\n createEventWithPrompt(options: {\n title: string;\n calendarId?: string;\n location?: string;\n startDate?: number;\n endDate?: number;\n isAllDay?: boolean;\n alertOffsetInMinutes?: number;\n }): Promise<{ result: string[] }>;\n\n /**\n * Presents a prompt to the user to select calendars. This method is available only on iOS.\n *\n * @method selectCalendarsWithPrompt\n * @since 0.2.0\n * @platform iOS\n * @permissions\n * <h3>Runtime Permissions:</h3>\n * <ul>\n * <li><strong>iOS:</strong> writeCalendar</li>\n * </ul>\n * @param {object} options - Options for customizing the display and selection styles of the calendar chooser.\n * @param {CalendarChooserDisplayStyle} options.displayStyle - To show all or only writeable calendars.\n * @param {CalendarChooserSelectionStyle} [options.selectionStyle] - To be able to select multiple calendars or only one.\n * @returns { Promise<{ result: Calendar[] }> } A promise that resolves with an array of selected calendars,\n * where each calendar object contains an ID and a title.\n * @example\n * if (capacitor.getPlatform() === 'ios') {\n * const { result } = await selectCalendarsWithPrompt();\n * console.log(result); // [{ id: '1', title: 'Work Calendar' }]\n * }\n */\n selectCalendarsWithPrompt(options: {\n displayStyle: CalendarChooserDisplayStyle;\n selectionStyle: CalendarChooserSelectionStyle;\n }): Promise<{ result: Calendar[] }>;\n\n /**\n * Retrieves a list of calendars available on the device.\n *\n * @async\n * @method listCalendars\n * @platform iOS, Android\n * @returns {Promise<{ result: Calendar[] }>} A promise that resolves with an array of calendars available on the device.\n * Each calendar object in the array contains an ID and a title.\n * @example\n * const { result } = await listCalendars();\n * console.log(result); // [{ id: '1', title: 'Work Calendar' }, { id: '2', title: 'Personal Calendar' }]\n */\n listCalendars(): Promise<{ result: Calendar[] }>;\n\n /**\n * Retrieves the default calendar set on the device.\n *\n * @method getDefaultCalendar\n * @platform iOS, Android\n * @returns {Promise<{ result: Calendar }>} A promise that resolves with the default calendar set on the device.\n * The returned calendar object contains an ID and a title.\n * @example\n * const { result } = await getDefaultCalendar();\n * console.log(result); // { id: '1', title: 'Default Calendar' }\n */\n getDefaultCalendar(): Promise<{ result: Calendar }>;\n\n /**\n * Creates an event with the provided options.\n *\n * @method createEvent\n * @platform iOS, Android\n * @permissions\n * <h3>Runtime Permissions:</h3>\n * <ul>\n * <li><strong>iOS:</strong> writeCalendar</li>\n * <li><strong>Android:</strong> readCalendar, writeCalendar</li>\n * </ul>\n * @param {object} options - Options for creating the event.\n * @param {string} options.title - The title of the event.\n * @param {string} options.calendarId - The id of the destination calendar. (Optional)\n * @param {string} [options.location] - The location of the event. (Optional)\n * @param {number} [options.startDate] - The start date and time of the event. (Optional)\n * @param {number} [options.endDate] - The end date and time of the event. (Optional)\n * @param {boolean} [options.isAllDay] - Weather the event is for the entire day or not. (Optional)\n * @param {number} [options.alertOffsetInMinutes] - If a number >= 0 is provided, an alert will be set for the event this many\n * minutes *before* the event. Negative values are ignored. (Optional)\n * @returns {Promise<{ result: string }>} A promise that resolves with the id of the created event.\n * @example\n * const now = Date.now();\n * const eventOptions = {\n * title: 'Team Meeting',\n * location: 'Conference Room A',\n * startDate: now,\n * endDate: now + 2 * 60 * 60 * 1000,\n * isAllDay: false,\n * alertOffsetInMinutes: 5,\n * };\n * const { result } = await createEvent(eventOptions);\n */\n createEvent(options: {\n title: string;\n calendarId?: string;\n location?: string;\n startDate?: number;\n endDate?: number;\n isAllDay?: boolean;\n alertOffsetInMinutes?: number;\n }): Promise<{ result: string }>;\n\n /**\n * Retrieves the default reminders list set on the device.\n *\n * @method getDefaultRemindersList\n * @platform iOS\n * @returns {Promise<{ result: RemindersList }>} A promise that resolves with the default reminder list set on the device.\n * The returned reminders list object contains an ID and a title.\n * @example\n * const { result } = await getDefaultRemindersList();\n * console.log(result); // { id: '1', title: 'Default Reminders List' }\n */\n getDefaultRemindersList(): Promise<{ result: RemindersList }>;\n\n /**\n * Retrieves all available reminders lists on the device.\n *\n * @async\n * @method getRemindersLists\n * @platform iOS\n * @returns {Promise<{ result: RemindersList[] }>} A promise that resolves with an array of reminders lists available on the device.\n * Each reminders list object in the array contains an ID and a title.\n * @example\n * const { result } = await getRemindersLists();\n * console.log(result); // [{ id: '1', title: 'Groceries' }, { id: '2', title: 'Subscriptions' }]\n */\n getRemindersLists(): Promise<{ result: RemindersList[] }>;\n\n /**\n * Creates a reminder with the provided options.\n *\n * @method createReminder\n * @since 0.5.0\n * @platform iOS\n * @permissions\n * <h3>Runtime Permissions:</h3>\n * <ul>\n * <li><strong>iOS:</strong> writeReminders</li>\n * </ul>\n * @param {object} options - Options for creating the reminder.\n * @param {string} options.title - The title of the reminder.\n * @param {string} options.listId - The id of the destination reminders list. (Optional)\n * @param {number} [options.priority] - The priority of the reminder. A number between one and nine where nine\n * has the least priority and 0 means no priority at all. Values outside of this range will be rounded to the\n * nearest border. (Optional)\n * @param {boolean} [options.isCompleted] - Whether the reminder is completed already or not. (Optional)\n * @param {number} [options.startDate] - The start date of the reminder. (Optional)\n * @param {number} [options.dueDate] - The due date of the reminder. (Optional)\n * @param {number} [options.completionDate] - The date at which the reminder was completed. (Optional)\n * @param {string} [options.notes] - Additional notes about the reminder. (Optional)\n * @param {string} [options.url] - A URL to save under the reminder. (Optional)\n * @param {string} [options.location] - A location to save under the reminder. (Optional)\n * @param {string} [options.recurrence] - The rules for the recurrence of the reminder. (Optional)\n * @returns {Promise<{ result: string }>} A Promise that resolves with the id of the created reminder\n * @example\n * const now = Date.now();\n * const rules: ReminderRecurrenceRule = {\n * frequency: ReminderRecurrenceFrequency.MONTHLY,\n * interval: 10,\n * end: Date.now()\n * }\n * const reminderOptions = {\n * title: 'Buy cucumber',\n * listId: 'ABC12',\n * priority: 5,\n * isCompleted: false,\n * startDateComponents: now,\n * notes: 'Also buy tomatoes',\n * url: 'https://capacitor-calendar.pages.dev/',\n * location: 'My Local Supermarket',\n * recurrence: rules\n * };\n * const { result } = await createReminder(reminderOptions);\n * console.log(result); // 'ID_1'\n */\n createReminder(options: {\n title: string;\n listId?: string;\n priority?: number;\n isCompleted?: boolean;\n startDate?: number;\n dueDate?: number;\n completionDate?: number;\n notes?: string;\n url?: string;\n location?: string;\n recurrence?: ReminderRecurrenceRule;\n }): Promise<{ result: string }>;\n\n /**\n * Opens the calendar app. Since the user leaves your app, use this method with caution.\n * It will open the calendar on today's date if no date is provided.\n *\n * @method openCalendar\n * @platform iOS, Android\n * @param {object} options - Options for opening the calendar.\n * @param {number} options.date - The date at which the calendar should be opened. (Optional)\n * @returns {Promise<void>}\n * @example\n * void CapacitorCalendar.openCalendar({ date: Date.now() });\n */\n openCalendar(options: { date?: number }): Promise<void>;\n\n /**\n * Opens the reminders app. Since the user leaves your app, use this method with caution.\n *\n * @method openReminders\n * @platform iOS\n * @returns {Promise<void>}\n * @example\n * void CapacitorCalendar.openReminders();\n */\n openReminders(): Promise<void>;\n\n /**\n * Retrieves the list of calendar events present in the given date range.\n *\n * @method listEventsInRange\n * @since 0.10.0\n * @platform iOS, Android\n * @permissions\n * <h3>Runtime Permissions:</h3>\n * <ul>\n * <li><strong>iOS:</strong> readCalendar</li>\n * <li><strong>Android:</strong> readCalendar</li>\n * </ul>\n * @param {object} options Options for defining the date range.\n * @param {number} options.startDate The start of the date range.\n * @param {number} options.endDate The end of the date range.\n * @returns {Promise<{ result: CalendarEvent[] }>} A Promise that resolves with the list of events.\n * @example\n * const { result } = await CapacitorCalendar.listEventsInRange({\n * startDate: Date.now(),\n * endDate: Date.now() + 6 * 7 * 24 * 60 * 60 * 1000, // 6 weeks from now\n * })\n */\n listEventsInRange(options: { startDate: number; endDate: number }): Promise<{ result: CalendarEvent[] }>;\n\n /**\n * Deletes events from the calendar given their IDs.\n *\n * @method deleteEventsById\n * @since 0.11.0\n * @platform iOS, Android\n * @permissions\n * <h3>Runtime Permissions:</h3>\n * <ul>\n * <li><strong>iOS:</strong> writeCalendar</li>\n * <li><strong>Android:</strong> writeCalendar</li>\n * </ul>\n * @param {object} options Options for defining event IDs.\n * @param {number} options.ids An array of event IDs to be deleted.\n * @returns {Promise<{ deleted: string[], failed: string[] }>}\n * A promise that resolves to an object with two properties:\n * - deleted: string[] - An array of IDs that were successfully deleted.\n * - failed: string[] - An array of IDs that could not be deleted.\n * @example\n * const idsToDelete = ['ID_1', 'ID_2', 'ID_DOES_NOT_EXIST'];\n * const { result } = await CapacitorCalendar.deleteEventsById(idsToDelete)\n * console.log(result.deleted) // ['ID_1', 'ID_2']\n * console.log(result.failed) // ['ID_DOES_NOT_EXIST']\n */\n deleteEventsById(options: { ids: string[] }): Promise<{ result: { deleted: string[]; failed: string[] } }>;\n\n /**\n * Creates a calendar\n *\n * @method createCalendar\n * @since 5.2.0\n * @platform iOS\n * @permissions\n * <h3>Runtime Permissions:</h3>\n * <ul>\n * <li><strong>iOS:</strong> readCalendar, writeCalendar</li>\n * </ul>\n * @param {object} options Options for creating a calendar.\n * @param {string} options.title The title of the calendar to create.\n * @param {string} options.color The color of the calendar to create.\n * The color should be a HEX string. (Optional)\n * @returns {Promise<{ result: string }>} The id of the created calendar.\n * @example\n * { result } = await CapacitorCalendar.createCalendar({\n * title: 'New Calendar',\n * color: '#1d00fc',\n * });\n * console.log(result); // 'CALENDAR_ID'\n */\n createCalendar(options: { title: string; color?: string }): Promise<{ result: string }>;\n\n /**\n * Deletes a calendar by id\n *\n * @method deleteCalendar\n * @since 5.2.0\n * @platform iOS\n * @permissions\n * <h3>Runtime Permissions:</h3>\n * <ul>\n * <li><strong>iOS:</strong> readCalendar, writeCalendar</li>\n * </ul>\n * @param {object} options Options for deleting a calendar.\n * @param {string} options.id The id of the calendar to delete.\n * @example\n * await CapacitorCalendar.deleteCalendar({ id: 'ID_1' });\n */\n deleteCalendar(options: { id: string }): Promise<void>;\n\n /**\n * Retrieves the list of reminders present in the given date range.\n *\n * @method getRemindersFromLists\n * @since 5.3.0\n * @platform iOS\n * @permissions\n * <h3>Runtime Permissions:</h3>\n * <ul>\n * <li><strong>iOS:</strong> readReminders</li>\n * </ul>\n * @param {object} options Options for defining the date range.\n * It Will fetch all reminders from all available lists if not provided. (Optional)\n * @param {string[]} options.listIds An array of reminder list ids.\n * @returns {Promise<{ result: Reminder[] }>} A Promise that resolves with the list of reminders.\n * @example\n * const now = Date.now();\n * const { result } = await CapacitorCalendar.getRemindersFromLists({\n * listIds: ['LIST_ID_1', 'LIST_ID_2'],\n * });\n */\n getRemindersFromLists(options?: { listIds: string[] }): Promise<{ result: Reminder[] }>;\n\n /**\n * Deletes reminders given their IDs.\n *\n * @method deleteRemindersById\n * @since 5.3.0\n * @platform iOS\n * @permissions\n * <h3>Runtime Permissions:</h3>\n * <ul>\n * <li><strong>iOS:</strong> writeReminders</li>\n * </ul>\n * @param {object} options Options for defining reminder IDs.\n * @param {number} options.ids An array of reminder IDs to be deleted.\n * @returns {Promise<{ deleted: string[], failed: string[] }>}\n * A promise that resolves to an object with two properties:\n * - deleted: string[] - An array of IDs that were successfully deleted.\n * - failed: string[] - An array of IDs that could not be deleted.\n * @example\n * const idsToDelete = ['ID_1', 'ID_2', 'ID_DOES_NOT_EXIST'];\n * const { result } = await CapacitorCalendar.deleteRemindersById(idsToDelete)\n * console.log(result.deleted) // ['ID_1', 'ID_2']\n * console.log(result.failed) // ['ID_DOES_NOT_EXIST']\n */\n deleteRemindersById(options: { ids: string[] }): Promise<{ result: { deleted: string[]; failed: string[] } }>;\n\n /**\n * Requests write access for the calendar. If its already granted, it will directly return the state.\n *\n * @method requestWriteOnlyCalendarAccess\n * @since 5.4.0\n * @platform iOS, Android\n * @returns {Promise<{ result: PermissionState }>} A promise that resolves with the state of the write access permission.\n * @example\n * const { result } = await this.requestWriteOnlyCalendarAccess();\n */\n requestWriteOnlyCalendarAccess(): Promise<{ result: PermissionState }>;\n\n /**\n * Requests read access for the calendar. If its already granted, it will directly return the state.\n *\n * @method requestReadOnlyCalendarAccess\n * @since 5.4.0\n * @platform Android\n * @returns {Promise<{ result: PermissionState }>} A promise that resolves with the state of the read access permission.\n * @example\n * const { result } = await this.requestReadOnlyCalendarAccess();\n */\n requestReadOnlyCalendarAccess(): Promise<{ result: PermissionState }>;\n\n /**\n * Requests read and write access for the calendar. If its already granted, it will directly return the state.\n *\n * @method requestFullCalendarAccess\n * @since 5.4.0\n * @platform iOS, Android\n * @returns {Promise<{ result: PermissionState }>} A promise that resolves with the state of read and write access permission.\n * @example\n * const { result } = await this.requestFullCalendarAccess();\n */\n requestFullCalendarAccess(): Promise<{ result: PermissionState }>;\n\n /**\n * Requests read and write access for the reminders. If its already granted, it will directly return the state.\n *\n * @method requestFullRemindersAccess\n * @since 5.4.0\n * @platform iOS\n * @returns {Promise<{ result: PermissionState }>} A promise that resolves with the state of read and write access permission.\n * @example\n * const { result } = await this.requestFullRemindersAccess();\n */\n requestFullRemindersAccess(): Promise<{ result: PermissionState }>;\n}\n"]}
|
package/dist/esm/web.d.ts
CHANGED
|
@@ -112,4 +112,16 @@ export declare class CapacitorCalendarWeb extends WebPlugin implements Capacitor
|
|
|
112
112
|
failed: string[];
|
|
113
113
|
};
|
|
114
114
|
}>;
|
|
115
|
+
requestWriteOnlyCalendarAccess(): Promise<{
|
|
116
|
+
result: PermissionState;
|
|
117
|
+
}>;
|
|
118
|
+
requestReadOnlyCalendarAccess(): Promise<{
|
|
119
|
+
result: PermissionState;
|
|
120
|
+
}>;
|
|
121
|
+
requestFullCalendarAccess(): Promise<{
|
|
122
|
+
result: PermissionState;
|
|
123
|
+
}>;
|
|
124
|
+
requestFullRemindersAccess(): Promise<{
|
|
125
|
+
result: PermissionState;
|
|
126
|
+
}>;
|
|
115
127
|
}
|
package/dist/esm/web.js
CHANGED
|
@@ -61,5 +61,17 @@ export class CapacitorCalendarWeb extends WebPlugin {
|
|
|
61
61
|
deleteRemindersById(_options) {
|
|
62
62
|
throw this.unimplemented(`${this.deleteRemindersById.name} is not implemented on the web`);
|
|
63
63
|
}
|
|
64
|
+
requestWriteOnlyCalendarAccess() {
|
|
65
|
+
throw this.unimplemented(`${this.requestWriteOnlyCalendarAccess.name} is not implemented on the web`);
|
|
66
|
+
}
|
|
67
|
+
requestReadOnlyCalendarAccess() {
|
|
68
|
+
throw this.unimplemented(`${this.requestReadOnlyCalendarAccess.name} is not implemented on the web`);
|
|
69
|
+
}
|
|
70
|
+
requestFullCalendarAccess() {
|
|
71
|
+
throw this.unimplemented(`${this.requestFullCalendarAccess.name} is not implemented on the web`);
|
|
72
|
+
}
|
|
73
|
+
requestFullRemindersAccess() {
|
|
74
|
+
throw this.unimplemented(`${this.requestFullRemindersAccess.name} is not implemented on the web`);
|
|
75
|
+
}
|
|
64
76
|
}
|
|
65
77
|
//# sourceMappingURL=web.js.map
|
package/dist/esm/web.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,OAAO,EAAmB,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAU7D,MAAM,OAAO,oBAAqB,SAAQ,SAAS;IAC1C,eAAe,CAAC,QAAqC;QAC1D,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,gCAAgC,CAAC,CAAC;IACzF,CAAC;IAEM,mBAAmB;QACxB,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,mBAAmB,CAAC,IAAI,gCAAgC,CAAC,CAAC;IAC7F,CAAC;IAEM,iBAAiB,CAAC,QAAqC;QAC5D,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,gCAAgC,CAAC,CAAC;IAC3F,CAAC;IAEM,qBAAqB;QAC1B,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,qBAAqB,CAAC,IAAI,gCAAgC,CAAC,CAAC;IAC/F,CAAC;IAEM,qBAAqB,CAAC,QAQ5B;QACC,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,qBAAqB,CAAC,IAAI,gCAAgC,CAAC,CAAC;IAC/F,CAAC;IAEM,yBAAyB;QAC9B,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,yBAAyB,CAAC,IAAI,gCAAgC,CAAC,CAAC;IACnG,CAAC;IAEM,aAAa;QAClB,MA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AC1F,CAAC;IAEM,cAAc,CAAC,QAA2C;QAC/D,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,gCAAgC,CAAC,CAAC;IACxF,CAAC;IAEM,cAAc,CAAC,QAAwB;QAC5C,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,gCAAgC,CAAC,CAAC;IACxF,CAAC;IAEM,qBAAqB,CAAC,QAAgC;QAC3D,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,qBAAqB,CAAC,IAAI,gCAAgC,CAAC,CAAC;IAC/F,CAAC;IAEM,mBAAmB,CAAC,QAE1B;QACC,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,mBAAmB,CAAC,IAAI,gCAAgC,CAAC,CAAC;IAC7F,CAAC;CACF","sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { PermissionState, WebPlugin } from '@capacitor/core';\nimport { CapacitorCalendarPlugin } from './definitions';\nimport { PluginPermission } from './schemas/enums/plugin-permission';\nimport { ReminderRecurrenceRule } from './schemas/interfaces/reminder-recurrence-rule';\nimport type { Calendar } from './schemas/interfaces/calendar';\nimport type { RemindersList } from './schemas/interfaces/reminders-list';\nimport type { PluginPermissionsMap } from './schemas/interfaces/plugin-permissions-map';\nimport type { CalendarEvent } from './schemas/interfaces/calendar-event';\nimport type { Reminder } from './schemas/interfaces/reminder';\n\nexport class CapacitorCalendarWeb extends WebPlugin implements CapacitorCalendarPlugin {\n public checkPermission(_options: { alias: PluginPermission }): Promise<{ result: PermissionState }> {\n throw this.unimplemented(`${this.checkPermission.name} is not implemented on the web`);\n }\n\n public checkAllPermissions(): Promise<PluginPermissionsMap> {\n throw this.unimplemented(`${this.checkAllPermissions.name} is not implemented on the web`);\n }\n\n public requestPermission(_options: { alias: PluginPermission }): Promise<{ result: PermissionState }> {\n throw this.unimplemented(`${this.requestPermission.name} is not implemented on the web`);\n }\n\n public requestAllPermissions(): Promise<PluginPermissionsMap> {\n throw this.unimplemented(`${this.requestAllPermissions.name} is not implemented on the web`);\n }\n\n public createEventWithPrompt(_options: {\n title: string;\n calendarId?: string;\n location?: string;\n startDate?: number;\n endDate?: number;\n isAllDay?: boolean;\n alertOffsetInMinutes?: number;\n }): Promise<{ result: string[] }> {\n throw this.unimplemented(`${this.createEventWithPrompt.name} is not implemented on the web`);\n }\n\n public selectCalendarsWithPrompt(): Promise<{ result: Calendar[] }> {\n throw this.unimplemented(`${this.selectCalendarsWithPrompt.name} is not implemented on the web`);\n }\n\n public listCalendars(): Promise<{ result: Calendar[] }> {\n throw this.unimplemented(`${this.listCalendars.name} is not implemented on the web`);\n }\n\n public getDefaultCalendar(): Promise<{ result: Calendar }> {\n throw this.unimplemented(`${this.getDefaultCalendar.name} is not implemented on the web`);\n }\n\n public createEvent(_options: {\n title: string;\n calendarId?: string;\n location?: string;\n startDate?: number;\n endDate?: number;\n isAllDay?: boolean;\n alertOffsetInMinutes?: number;\n }): Promise<{\n result: string;\n }> {\n throw this.unimplemented(`${this.createEvent.name} is not implemented on the web`);\n }\n\n public createReminder(_options: {\n title: string;\n listId?: string;\n priority?: number;\n isCompleted?: boolean;\n startDate?: number;\n dueDate?: number;\n completionDate?: number;\n notes?: string;\n url?: string;\n location?: string;\n recurrence?: ReminderRecurrenceRule;\n }): Promise<{ result: string }> {\n throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);\n }\n\n public getDefaultRemindersList(): Promise<{ result: RemindersList }> {\n throw this.unimplemented(`${this.getDefaultRemindersList.name} is not implemented on the web`);\n }\n\n public getRemindersLists(): Promise<{ result: RemindersList[] }> {\n throw this.unimplemented(`${this.getRemindersLists.name} is not implemented on the web`);\n }\n\n public openCalendar(_options: { date?: number }): Promise<void> {\n throw this.unimplemented(`${this.openCalendar.name} is not implemented on the web`);\n }\n\n public openReminders(): Promise<void> {\n throw this.unimplemented(`${this.openReminders.name} is not implemented on the web`);\n }\n\n public listEventsInRange(_options: { startDate: number; endDate: number }): Promise<{ result: CalendarEvent[] }> {\n throw this.unimplemented(`${this.listEventsInRange.name} is not implemented on the web`);\n }\n\n public deleteEventsById(_options: { ids: string[] }): Promise<{\n result: { deleted: string[]; failed: string[] };\n }> {\n throw this.unimplemented(`${this.deleteEventsById.name} is not implemented on the web`);\n }\n\n public createCalendar(_options: { title: string; color?: string }): Promise<{ result: string }> {\n throw this.unimplemented(`${this.createCalendar.name} is not implemented on the web`);\n }\n\n public deleteCalendar(_options: { id: string }): Promise<void> {\n throw this.unimplemented(`${this.deleteCalendar.name} is not implemented on the web`);\n }\n\n public getRemindersFromLists(_options?: { listIds: string[] }): Promise<{ result: Reminder[] }> {\n throw this.unimplemented(`${this.getRemindersFromLists.name} is not implemented on the web`);\n }\n\n public deleteRemindersById(_options: {\n ids: string[];\n }): Promise<{ result: { deleted: string[]; failed: string[] } }> {\n throw this.unimplemented(`${this.deleteRemindersById.name} is not implemented on the web`);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,OAAO,EAAmB,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAU7D,MAAM,OAAO,oBAAqB,SAAQ,SAAS;IAC1C,eAAe,CAAC,QAAqC;QAC1D,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,gCAAgC,CAAC,CAAC;IACzF,CAAC;IAEM,mBAAmB;QACxB,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,mBAAmB,CAAC,IAAI,gCAAgC,CAAC,CAAC;IAC7F,CAAC;IAEM,iBAAiB,CAAC,QAAqC;QAC5D,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,gCAAgC,CAAC,CAAC;IAC3F,CAAC;IAEM,qBAAqB;QAC1B,MAAM,IAAI,C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yB,CAAC,IAAI,gCAAgC,CAAC,CAAC;IACnG,CAAC;IAEM,0BAA0B;QAC/B,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,0BAA0B,CAAC,IAAI,gCAAgC,CAAC,CAAC;IACpG,CAAC;CACF","sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { PermissionState, WebPlugin } from '@capacitor/core';\nimport { CapacitorCalendarPlugin } from './definitions';\nimport { PluginPermission } from './schemas/enums/plugin-permission';\nimport { ReminderRecurrenceRule } from './schemas/interfaces/reminder-recurrence-rule';\nimport type { Calendar } from './schemas/interfaces/calendar';\nimport type { RemindersList } from './schemas/interfaces/reminders-list';\nimport type { PluginPermissionsMap } from './schemas/interfaces/plugin-permissions-map';\nimport type { CalendarEvent } from './schemas/interfaces/calendar-event';\nimport type { Reminder } from './schemas/interfaces/reminder';\n\nexport class CapacitorCalendarWeb extends WebPlugin implements CapacitorCalendarPlugin {\n public checkPermission(_options: { alias: PluginPermission }): Promise<{ result: PermissionState }> {\n throw this.unimplemented(`${this.checkPermission.name} is not implemented on the web`);\n }\n\n public checkAllPermissions(): Promise<PluginPermissionsMap> {\n throw this.unimplemented(`${this.checkAllPermissions.name} is not implemented on the web`);\n }\n\n public requestPermission(_options: { alias: PluginPermission }): Promise<{ result: PermissionState }> {\n throw this.unimplemented(`${this.requestPermission.name} is not implemented on the web`);\n }\n\n public requestAllPermissions(): Promise<PluginPermissionsMap> {\n throw this.unimplemented(`${this.requestAllPermissions.name} is not implemented on the web`);\n }\n\n public createEventWithPrompt(_options: {\n title: string;\n calendarId?: string;\n location?: string;\n startDate?: number;\n endDate?: number;\n isAllDay?: boolean;\n alertOffsetInMinutes?: number;\n }): Promise<{ result: string[] }> {\n throw this.unimplemented(`${this.createEventWithPrompt.name} is not implemented on the web`);\n }\n\n public selectCalendarsWithPrompt(): Promise<{ result: Calendar[] }> {\n throw this.unimplemented(`${this.selectCalendarsWithPrompt.name} is not implemented on the web`);\n }\n\n public listCalendars(): Promise<{ result: Calendar[] }> {\n throw this.unimplemented(`${this.listCalendars.name} is not implemented on the web`);\n }\n\n public getDefaultCalendar(): Promise<{ result: Calendar }> {\n throw this.unimplemented(`${this.getDefaultCalendar.name} is not implemented on the web`);\n }\n\n public createEvent(_options: {\n title: string;\n calendarId?: string;\n location?: string;\n startDate?: number;\n endDate?: number;\n isAllDay?: boolean;\n alertOffsetInMinutes?: number;\n }): Promise<{\n result: string;\n }> {\n throw this.unimplemented(`${this.createEvent.name} is not implemented on the web`);\n }\n\n public createReminder(_options: {\n title: string;\n listId?: string;\n priority?: number;\n isCompleted?: boolean;\n startDate?: number;\n dueDate?: number;\n completionDate?: number;\n notes?: string;\n url?: string;\n location?: string;\n recurrence?: ReminderRecurrenceRule;\n }): Promise<{ result: string }> {\n throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);\n }\n\n public getDefaultRemindersList(): Promise<{ result: RemindersList }> {\n throw this.unimplemented(`${this.getDefaultRemindersList.name} is not implemented on the web`);\n }\n\n public getRemindersLists(): Promise<{ result: RemindersList[] }> {\n throw this.unimplemented(`${this.getRemindersLists.name} is not implemented on the web`);\n }\n\n public openCalendar(_options: { date?: number }): Promise<void> {\n throw this.unimplemented(`${this.openCalendar.name} is not implemented on the web`);\n }\n\n public openReminders(): Promise<void> {\n throw this.unimplemented(`${this.openReminders.name} is not implemented on the web`);\n }\n\n public listEventsInRange(_options: { startDate: number; endDate: number }): Promise<{ result: CalendarEvent[] }> {\n throw this.unimplemented(`${this.listEventsInRange.name} is not implemented on the web`);\n }\n\n public deleteEventsById(_options: { ids: string[] }): Promise<{\n result: { deleted: string[]; failed: string[] };\n }> {\n throw this.unimplemented(`${this.deleteEventsById.name} is not implemented on the web`);\n }\n\n public createCalendar(_options: { title: string; color?: string }): Promise<{ result: string }> {\n throw this.unimplemented(`${this.createCalendar.name} is not implemented on the web`);\n }\n\n public deleteCalendar(_options: { id: string }): Promise<void> {\n throw this.unimplemented(`${this.deleteCalendar.name} is not implemented on the web`);\n }\n\n public getRemindersFromLists(_options?: { listIds: string[] }): Promise<{ result: Reminder[] }> {\n throw this.unimplemented(`${this.getRemindersFromLists.name} is not implemented on the web`);\n }\n\n public deleteRemindersById(_options: {\n ids: string[];\n }): Promise<{ result: { deleted: string[]; failed: string[] } }> {\n throw this.unimplemented(`${this.deleteRemindersById.name} is not implemented on the web`);\n }\n\n public requestWriteOnlyCalendarAccess(): Promise<{ result: PermissionState }> {\n throw this.unimplemented(`${this.requestWriteOnlyCalendarAccess.name} is not implemented on the web`);\n }\n\n public requestReadOnlyCalendarAccess(): Promise<{ result: PermissionState }> {\n throw this.unimplemented(`${this.requestReadOnlyCalendarAccess.name} is not implemented on the web`);\n }\n\n public requestFullCalendarAccess(): Promise<{ result: PermissionState }> {\n throw this.unimplemented(`${this.requestFullCalendarAccess.name} is not implemented on the web`);\n }\n\n public requestFullRemindersAccess(): Promise<{ result: PermissionState }> {\n throw this.unimplemented(`${this.requestFullRemindersAccess.name} is not implemented on the web`);\n }\n}\n"]}
|
package/dist/plugin.cjs.js
CHANGED
|
@@ -190,6 +190,18 @@ class CapacitorCalendarWeb extends core.WebPlugin {
|
|
|
190
190
|
deleteRemindersById(_options) {
|
|
191
191
|
throw this.unimplemented(`${this.deleteRemindersById.name} is not implemented on the web`);
|
|
192
192
|
}
|
|
193
|
+
requestWriteOnlyCalendarAccess() {
|
|
194
|
+
throw this.unimplemented(`${this.requestWriteOnlyCalendarAccess.name} is not implemented on the web`);
|
|
195
|
+
}
|
|
196
|
+
requestReadOnlyCalendarAccess() {
|
|
197
|
+
throw this.unimplemented(`${this.requestReadOnlyCalendarAccess.name} is not implemented on the web`);
|
|
198
|
+
}
|
|
199
|
+
requestFullCalendarAccess() {
|
|
200
|
+
throw this.unimplemented(`${this.requestFullCalendarAccess.name} is not implemented on the web`);
|
|
201
|
+
}
|
|
202
|
+
requestFullRemindersAccess() {
|
|
203
|
+
throw this.unimplemented(`${this.requestFullRemindersAccess.name} is not implemented on the web`);
|
|
204
|
+
}
|
|
193
205
|
}
|
|
194
206
|
|
|
195
207
|
var web = /*#__PURE__*/Object.freeze({
|
package/dist/plugin.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.cjs.js","sources":["esm/schemas/enums/calendar-chooser-display-style.js","esm/schemas/enums/calendar-chooser-selection-style.js","esm/schemas/enums/plugin-permission.js","esm/schemas/enums/reminder-recurrence-frequency.js","esm/index.js","esm/web.js"],"sourcesContent":["/**\n * Enum representing the display styles for the calendar chooser.\n *\n * @enum CalendarChooserDisplayStyle\n * @platform iOS\n */\nexport var CalendarChooserDisplayStyle;\n(function (CalendarChooserDisplayStyle) {\n /**\n * Display all calendars available for selection.\n */\n CalendarChooserDisplayStyle[CalendarChooserDisplayStyle[\"ALL_CALENDARS\"] = 0] = \"ALL_CALENDARS\";\n /**\n * Display only writable calendars available for selection.\n */\n CalendarChooserDisplayStyle[CalendarChooserDisplayStyle[\"WRITABLE_CALENDARS_ONLY\"] = 1] = \"WRITABLE_CALENDARS_ONLY\";\n})(CalendarChooserDisplayStyle || (CalendarChooserDisplayStyle = {}));\n//# sourceMappingURL=calendar-chooser-display-style.js.map","/**\n * Enum representing the selection style for the calendar chooser.\n *\n * @enum CalendarChooserSelectionStyle\n * @platform iOS\n */\nexport var CalendarChooserSelectionStyle;\n(function (CalendarChooserSelectionStyle) {\n /**\n * Allows only a single selection in the calendar chooser.\n */\n CalendarChooserSelectionStyle[CalendarChooserSelectionStyle[\"SINGLE\"] = 0] = \"SINGLE\";\n /**\n * Allows multiple selections in the calendar chooser.\n */\n CalendarChooserSelectionStyle[CalendarChooserSelectionStyle[\"MULTIPLE\"] = 1] = \"MULTIPLE\";\n})(CalendarChooserSelectionStyle || (CalendarChooserSelectionStyle = {}));\n//# sourceMappingURL=calendar-chooser-selection-style.js.map","/**\n * Enum representing the available runtime permissions for the plugin.\n *\n * @enum PluginPermission\n * @platform iOS, Android\n */\nexport var PluginPermission;\n(function (PluginPermission) {\n /**\n * Represents the permission state for reading calendar.\n *\n * @platform iOS, Android\n * @permissions\n * <h3>Manifest Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> NSCalendarsFullAccessUsageDescription</li>\n * <li><strong>13 ≤ iOS ≤ 16:</strong> NSCalendarsUsageDescription</li>\n * <li><strong>Android:</strong> android.permission.READ_CALENDAR</li>\n * </ul>\n */\n PluginPermission[\"READ_CALENDAR\"] = \"readCalendar\";\n /**\n * Represents the permission state for writing calendar.\n *\n * @platform iOS, Android\n * @permissions\n * <h3>Manifest Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> NSCalendarsWriteOnlyAccessUsageDescription</li>\n * <li><strong>13 ≤ iOS ≤ 16:</strong> NSCalendarsUsageDescription</li>\n * <li><strong>Android:</strong> android.permission.WRITE_CALENDAR</li>\n * </ul>\n */\n PluginPermission[\"WRITE_CALENDAR\"] = \"writeCalendar\";\n /**\n * Represents the permission state for reading reminders.\n *\n * @platform iOS\n * @permissions\n * <h3>Manifest Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> NSRemindersFullAccessUsageDescription</li>\n * <li><strong>10 ≤ iOS ≤ 16:</strong> NSRemindersUsageDescription</li>\n * </ul>\n */\n PluginPermission[\"READ_REMINDERS\"] = \"readReminders\";\n /**\n * Represents the permission state for writing reminders.\n *\n * @platform iOS\n * @permissions\n * <h3>Manifest Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> NSRemindersFullAccessUsageDescription</li>\n * <li><strong>13 ≤ iOS ≤ 16:</strong> NSRemindersUsageDescription</li>\n * </ul>\n */\n PluginPermission[\"WRITE_REMINDERS\"] = \"writeReminders\";\n})(PluginPermission || (PluginPermission = {}));\n//# sourceMappingURL=plugin-permission.js.map","/**\n * Enum representing the repeating frequency of the reminder.\n *\n * @enum ReminderRecurrenceFrequency\n * @platform iOS\n */\nexport var ReminderRecurrenceFrequency;\n(function (ReminderRecurrenceFrequency) {\n /**\n * The reminder repeats on a daily basis\n */\n ReminderRecurrenceFrequency[ReminderRecurrenceFrequency[\"DAILY\"] = 0] = \"DAILY\";\n /**\n * The reminder repeats on a weekly basis\n */\n ReminderRecurrenceFrequency[ReminderRecurrenceFrequency[\"WEEKLY\"] = 1] = \"WEEKLY\";\n /**\n * The reminder repeats on a monthly basis\n */\n ReminderRecurrenceFrequency[ReminderRecurrenceFrequency[\"MONTHLY\"] = 2] = \"MONTHLY\";\n /**\n * The reminder repeats on a yearly basis\n */\n ReminderRecurrenceFrequency[ReminderRecurrenceFrequency[\"YEARLY\"] = 3] = \"YEARLY\";\n})(ReminderRecurrenceFrequency || (ReminderRecurrenceFrequency = {}));\n//# sourceMappingURL=reminder-recurrence-frequency.js.map","import { registerPlugin } from '@capacitor/core';\nimport { CalendarChooserDisplayStyle } from './schemas/enums/calendar-chooser-display-style';\nimport { CalendarChooserSelectionStyle } from './schemas/enums/calendar-chooser-selection-style';\nimport { PluginPermission } from './schemas/enums/plugin-permission';\nimport { ReminderRecurrenceFrequency } from './schemas/enums/reminder-recurrence-frequency';\nconst CapacitorCalendar = registerPlugin('CapacitorCalendar', {\n web: () => import('./web').then((m) => new m.CapacitorCalendarWeb()),\n});\nexport * from './definitions';\nexport { CalendarChooserSelectionStyle, CalendarChooserDisplayStyle, PluginPermission, ReminderRecurrenceFrequency, CapacitorCalendar, };\n//# sourceMappingURL=index.js.map","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { WebPlugin } from '@capacitor/core';\nexport class CapacitorCalendarWeb extends WebPlugin {\n checkPermission(_options) {\n throw this.unimplemented(`${this.checkPermission.name} is not implemented on the web`);\n }\n checkAllPermissions() {\n throw this.unimplemented(`${this.checkAllPermissions.name} is not implemented on the web`);\n }\n requestPermission(_options) {\n throw this.unimplemented(`${this.requestPermission.name} is not implemented on the web`);\n }\n requestAllPermissions() {\n throw this.unimplemented(`${this.requestAllPermissions.name} is not implemented on the web`);\n }\n createEventWithPrompt(_options) {\n throw this.unimplemented(`${this.createEventWithPrompt.name} is not implemented on the web`);\n }\n selectCalendarsWithPrompt() {\n throw this.unimplemented(`${this.selectCalendarsWithPrompt.name} is not implemented on the web`);\n }\n listCalendars() {\n throw this.unimplemented(`${this.listCalendars.name} is not implemented on the web`);\n }\n getDefaultCalendar() {\n throw this.unimplemented(`${this.getDefaultCalendar.name} is not implemented on the web`);\n }\n createEvent(_options) {\n throw this.unimplemented(`${this.createEvent.name} is not implemented on the web`);\n }\n createReminder(_options) {\n throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);\n }\n getDefaultRemindersList() {\n throw this.unimplemented(`${this.getDefaultRemindersList.name} is not implemented on the web`);\n }\n getRemindersLists() {\n throw this.unimplemented(`${this.getRemindersLists.name} is not implemented on the web`);\n }\n openCalendar(_options) {\n throw this.unimplemented(`${this.openCalendar.name} is not implemented on the web`);\n }\n openReminders() {\n throw this.unimplemented(`${this.openReminders.name} is not implemented on the web`);\n }\n listEventsInRange(_options) {\n throw this.unimplemented(`${this.listEventsInRange.name} is not implemented on the web`);\n }\n deleteEventsById(_options) {\n throw this.unimplemented(`${this.deleteEventsById.name} is not implemented on the web`);\n }\n createCalendar(_options) {\n throw this.unimplemented(`${this.createCalendar.name} is not implemented on the web`);\n }\n deleteCalendar(_options) {\n throw this.unimplemented(`${this.deleteCalendar.name} is not implemented on the web`);\n }\n getRemindersFromLists(_options) {\n throw this.unimplemented(`${this.getRemindersFromLists.name} is not implemented on the web`);\n }\n deleteRemindersById(_options) {\n throw this.unimplemented(`${this.deleteRemindersById.name} is not implemented on the web`);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["CalendarChooserDisplayStyle","CalendarChooserSelectionStyle","PluginPermission","ReminderRecurrenceFrequency","registerPlugin","WebPlugin"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACWA,6CAA4B;AACvC,CAAC,UAAU,2BAA2B,EAAE;AACxC;AACA;AACA;AACA,IAAI,2BAA2B,CAAC,2B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CAAC,CAAC;AAC9F,KAAK;AACL,IAAI,qBAAqB,CAAC,QAAQ,EAAE;AACpC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC,CAAC;AACrG,KAAK;AACL,IAAI,mBAAmB,CAAC,QAAQ,EAAE;AAClC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,CAAC,EAAE,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC,CAAC;AACnG,KAAK;AACL;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/schemas/enums/calendar-chooser-display-style.js","esm/schemas/enums/calendar-chooser-selection-style.js","esm/schemas/enums/plugin-permission.js","esm/schemas/enums/reminder-recurrence-frequency.js","esm/index.js","esm/web.js"],"sourcesContent":["/**\n * Enum representing the display styles for the calendar chooser.\n *\n * @enum CalendarChooserDisplayStyle\n * @platform iOS\n */\nexport var CalendarChooserDisplayStyle;\n(function (CalendarChooserDisplayStyle) {\n /**\n * Display all calendars available for selection.\n */\n CalendarChooserDisplayStyle[CalendarChooserDisplayStyle[\"ALL_CALENDARS\"] = 0] = \"ALL_CALENDARS\";\n /**\n * Display only writable calendars available for selection.\n */\n CalendarChooserDisplayStyle[CalendarChooserDisplayStyle[\"WRITABLE_CALENDARS_ONLY\"] = 1] = \"WRITABLE_CALENDARS_ONLY\";\n})(CalendarChooserDisplayStyle || (CalendarChooserDisplayStyle = {}));\n//# sourceMappingURL=calendar-chooser-display-style.js.map","/**\n * Enum representing the selection style for the calendar chooser.\n *\n * @enum CalendarChooserSelectionStyle\n * @platform iOS\n */\nexport var CalendarChooserSelectionStyle;\n(function (CalendarChooserSelectionStyle) {\n /**\n * Allows only a single selection in the calendar chooser.\n */\n CalendarChooserSelectionStyle[CalendarChooserSelectionStyle[\"SINGLE\"] = 0] = \"SINGLE\";\n /**\n * Allows multiple selections in the calendar chooser.\n */\n CalendarChooserSelectionStyle[CalendarChooserSelectionStyle[\"MULTIPLE\"] = 1] = \"MULTIPLE\";\n})(CalendarChooserSelectionStyle || (CalendarChooserSelectionStyle = {}));\n//# sourceMappingURL=calendar-chooser-selection-style.js.map","/**\n * Enum representing the available runtime permissions for the plugin.\n *\n * @enum PluginPermission\n * @platform iOS, Android\n */\nexport var PluginPermission;\n(function (PluginPermission) {\n /**\n * Represents the permission state for reading calendar.\n *\n * @platform iOS, Android\n * @permissions\n * <h3>Manifest Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> NSCalendarsFullAccessUsageDescription</li>\n * <li><strong>13 ≤ iOS ≤ 16:</strong> NSCalendarsUsageDescription</li>\n * <li><strong>Android:</strong> android.permission.READ_CALENDAR</li>\n * </ul>\n */\n PluginPermission[\"READ_CALENDAR\"] = \"readCalendar\";\n /**\n * Represents the permission state for writing calendar.\n *\n * @platform iOS, Android\n * @permissions\n * <h3>Manifest Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> NSCalendarsWriteOnlyAccessUsageDescription</li>\n * <li><strong>13 ≤ iOS ≤ 16:</strong> NSCalendarsUsageDescription</li>\n * <li><strong>Android:</strong> android.permission.WRITE_CALENDAR</li>\n * </ul>\n */\n PluginPermission[\"WRITE_CALENDAR\"] = \"writeCalendar\";\n /**\n * Represents the permission state for reading reminders.\n *\n * @platform iOS\n * @permissions\n * <h3>Manifest Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> NSRemindersFullAccessUsageDescription</li>\n * <li><strong>10 ≤ iOS ≤ 16:</strong> NSRemindersUsageDescription</li>\n * </ul>\n */\n PluginPermission[\"READ_REMINDERS\"] = \"readReminders\";\n /**\n * Represents the permission state for writing reminders.\n *\n * @platform iOS\n * @permissions\n * <h3>Manifest Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> NSRemindersFullAccessUsageDescription</li>\n * <li><strong>13 ≤ iOS ≤ 16:</strong> NSRemindersUsageDescription</li>\n * </ul>\n */\n PluginPermission[\"WRITE_REMINDERS\"] = \"writeReminders\";\n})(PluginPermission || (PluginPermission = {}));\n//# sourceMappingURL=plugin-permission.js.map","/**\n * Enum representing the repeating frequency of the reminder.\n *\n * @enum ReminderRecurrenceFrequency\n * @platform iOS\n */\nexport var ReminderRecurrenceFrequency;\n(function (ReminderRecurrenceFrequency) {\n /**\n * The reminder repeats on a daily basis\n */\n ReminderRecurrenceFrequency[ReminderRecurrenceFrequency[\"DAILY\"] = 0] = \"DAILY\";\n /**\n * The reminder repeats on a weekly basis\n */\n ReminderRecurrenceFrequency[ReminderRecurrenceFrequency[\"WEEKLY\"] = 1] = \"WEEKLY\";\n /**\n * The reminder repeats on a monthly basis\n */\n ReminderRecurrenceFrequency[ReminderRecurrenceFrequency[\"MONTHLY\"] = 2] = \"MONTHLY\";\n /**\n * The reminder repeats on a yearly basis\n */\n ReminderRecurrenceFrequency[ReminderRecurrenceFrequency[\"YEARLY\"] = 3] = \"YEARLY\";\n})(ReminderRecurrenceFrequency || (ReminderRecurrenceFrequency = {}));\n//# sourceMappingURL=reminder-recurrence-frequency.js.map","import { registerPlugin } from '@capacitor/core';\nimport { CalendarChooserDisplayStyle } from './schemas/enums/calendar-chooser-display-style';\nimport { CalendarChooserSelectionStyle } from './schemas/enums/calendar-chooser-selection-style';\nimport { PluginPermission } from './schemas/enums/plugin-permission';\nimport { ReminderRecurrenceFrequency } from './schemas/enums/reminder-recurrence-frequency';\nconst CapacitorCalendar = registerPlugin('CapacitorCalendar', {\n web: () => import('./web').then((m) => new m.CapacitorCalendarWeb()),\n});\nexport * from './definitions';\nexport { CalendarChooserSelectionStyle, CalendarChooserDisplayStyle, PluginPermission, ReminderRecurrenceFrequency, CapacitorCalendar, };\n//# sourceMappingURL=index.js.map","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { WebPlugin } from '@capacitor/core';\nexport class CapacitorCalendarWeb extends WebPlugin {\n checkPermission(_options) {\n throw this.unimplemented(`${this.checkPermission.name} is not implemented on the web`);\n }\n checkAllPermissions() {\n throw this.unimplemented(`${this.checkAllPermissions.name} is not implemented on the web`);\n }\n requestPermission(_options) {\n throw this.unimplemented(`${this.requestPermission.name} is not implemented on the web`);\n }\n requestAllPermissions() {\n throw this.unimplemented(`${this.requestAllPermissions.name} is not implemented on the web`);\n }\n createEventWithPrompt(_options) {\n throw this.unimplemented(`${this.createEventWithPrompt.name} is not implemented on the web`);\n }\n selectCalendarsWithPrompt() {\n throw this.unimplemented(`${this.selectCalendarsWithPrompt.name} is not implemented on the web`);\n }\n listCalendars() {\n throw this.unimplemented(`${this.listCalendars.name} is not implemented on the web`);\n }\n getDefaultCalendar() {\n throw this.unimplemented(`${this.getDefaultCalendar.name} is not implemented on the web`);\n }\n createEvent(_options) {\n throw this.unimplemented(`${this.createEvent.name} is not implemented on the web`);\n }\n createReminder(_options) {\n throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);\n }\n getDefaultRemindersList() {\n throw this.unimplemented(`${this.getDefaultRemindersList.name} is not implemented on the web`);\n }\n getRemindersLists() {\n throw this.unimplemented(`${this.getRemindersLists.name} is not implemented on the web`);\n }\n openCalendar(_options) {\n throw this.unimplemented(`${this.openCalendar.name} is not implemented on the web`);\n }\n openReminders() {\n throw this.unimplemented(`${this.openReminders.name} is not implemented on the web`);\n }\n listEventsInRange(_options) {\n throw this.unimplemented(`${this.listEventsInRange.name} is not implemented on the web`);\n }\n deleteEventsById(_options) {\n throw this.unimplemented(`${this.deleteEventsById.name} is not implemented on the web`);\n }\n createCalendar(_options) {\n throw this.unimplemented(`${this.createCalendar.name} is not implemented on the web`);\n }\n deleteCalendar(_options) {\n throw this.unimplemented(`${this.deleteCalendar.name} is not implemented on the web`);\n }\n getRemindersFromLists(_options) {\n throw this.unimplemented(`${this.getRemindersFromLists.name} is not implemented on the web`);\n }\n deleteRemindersById(_options) {\n throw this.unimplemented(`${this.deleteRemindersById.name} is not implemented on the web`);\n }\n requestWriteOnlyCalendarAccess() {\n throw this.unimplemented(`${this.requestWriteOnlyCalendarAccess.name} is not implemented on the web`);\n }\n requestReadOnlyCalendarAccess() {\n throw this.unimplemented(`${this.requestReadOnlyCalendarAccess.name} is not implemented on the web`);\n }\n requestFullCalendarAccess() {\n throw this.unimplemented(`${this.requestFullCalendarAccess.name} is not implemented on the web`);\n }\n requestFullRemindersAccess() {\n throw this.unimplemented(`${this.requestFullRemindersAccess.name} is not implemented on the web`);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["CalendarChooserDisplayStyle","CalendarChooserSelectionStyle","PluginPermission","ReminderRecurrenceFrequency","registerPlugin","WebPlugin"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACWA,6CAA4B;AACvC,CAAC,UAAU,2BAA2B,EAAE;AACxC;AACA;AACA;AACA,IAAI,2BAA2B,CAAC,2BAA2B,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,GAAG,eAAe,CAAC;AACpG;AACA;AACA;AACA,IAAI,2BAA2B,CAAC,2BAA2B,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC,GAAG,yBAAyB,CAAC;AACxH,CAAC,EAAEA,mCAA2B,KAAKA,mCAA2B,GAAG,EAAE,CAAC,CAAC;;AChBrE;AACA;AACA;AACA;AACA;AACA;AACWC,+CAA8B;AACzC,CAAC,UAAU,6BAA6B,EAAE;AAC1C;AACA;AACA;AACA,IAAI,6BAA6B,CAAC,6BAA6B,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;AAC1F;AACA;AACA;AACA,IAAI,6BAA6B,CAAC,6BAA6B,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;AAC9F,CAAC,EAAEA,qCAA6B,KAAKA,qCAA6B,GAAG,EAAE,CAAC,CAAC;;AChBzE;AACA;AACA;AACA;AACA;AACA;AACWC,kCAAiB;AAC5B,CAAC,UAAU,gBAAgB,EAAE;AAC7B;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;AACL,IAAI,yBAAyB,GAAG;AAChC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,CAAC,EAAE,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC,CAAC;AACzG,KAAK;AACL,IAAI,0BAA0B,GAAG;AACjC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,CAAC,EAAE,IAAI,CAAC,0BAA0B,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC,CAAC;AAC1G,KAAK;AACL;;;;;;;;;"}
|
package/dist/plugin.js
CHANGED
|
@@ -189,6 +189,18 @@ var capacitorCapacitorCalendar = (function (exports, core) {
|
|
|
189
189
|
deleteRemindersById(_options) {
|
|
190
190
|
throw this.unimplemented(`${this.deleteRemindersById.name} is not implemented on the web`);
|
|
191
191
|
}
|
|
192
|
+
requestWriteOnlyCalendarAccess() {
|
|
193
|
+
throw this.unimplemented(`${this.requestWriteOnlyCalendarAccess.name} is not implemented on the web`);
|
|
194
|
+
}
|
|
195
|
+
requestReadOnlyCalendarAccess() {
|
|
196
|
+
throw this.unimplemented(`${this.requestReadOnlyCalendarAccess.name} is not implemented on the web`);
|
|
197
|
+
}
|
|
198
|
+
requestFullCalendarAccess() {
|
|
199
|
+
throw this.unimplemented(`${this.requestFullCalendarAccess.name} is not implemented on the web`);
|
|
200
|
+
}
|
|
201
|
+
requestFullRemindersAccess() {
|
|
202
|
+
throw this.unimplemented(`${this.requestFullRemindersAccess.name} is not implemented on the web`);
|
|
203
|
+
}
|
|
192
204
|
}
|
|
193
205
|
|
|
194
206
|
var web = /*#__PURE__*/Object.freeze({
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["esm/schemas/enums/calendar-chooser-display-style.js","esm/schemas/enums/calendar-chooser-selection-style.js","esm/schemas/enums/plugin-permission.js","esm/schemas/enums/reminder-recurrence-frequency.js","esm/index.js","esm/web.js"],"sourcesContent":["/**\n * Enum representing the display styles for the calendar chooser.\n *\n * @enum CalendarChooserDisplayStyle\n * @platform iOS\n */\nexport var CalendarChooserDisplayStyle;\n(function (CalendarChooserDisplayStyle) {\n /**\n * Display all calendars available for selection.\n */\n CalendarChooserDisplayStyle[CalendarChooserDisplayStyle[\"ALL_CALENDARS\"] = 0] = \"ALL_CALENDARS\";\n /**\n * Display only writable calendars available for selection.\n */\n CalendarChooserDisplayStyle[CalendarChooserDisplayStyle[\"WRITABLE_CALENDARS_ONLY\"] = 1] = \"WRITABLE_CALENDARS_ONLY\";\n})(CalendarChooserDisplayStyle || (CalendarChooserDisplayStyle = {}));\n//# sourceMappingURL=calendar-chooser-display-style.js.map","/**\n * Enum representing the selection style for the calendar chooser.\n *\n * @enum CalendarChooserSelectionStyle\n * @platform iOS\n */\nexport var CalendarChooserSelectionStyle;\n(function (CalendarChooserSelectionStyle) {\n /**\n * Allows only a single selection in the calendar chooser.\n */\n CalendarChooserSelectionStyle[CalendarChooserSelectionStyle[\"SINGLE\"] = 0] = \"SINGLE\";\n /**\n * Allows multiple selections in the calendar chooser.\n */\n CalendarChooserSelectionStyle[CalendarChooserSelectionStyle[\"MULTIPLE\"] = 1] = \"MULTIPLE\";\n})(CalendarChooserSelectionStyle || (CalendarChooserSelectionStyle = {}));\n//# sourceMappingURL=calendar-chooser-selection-style.js.map","/**\n * Enum representing the available runtime permissions for the plugin.\n *\n * @enum PluginPermission\n * @platform iOS, Android\n */\nexport var PluginPermission;\n(function (PluginPermission) {\n /**\n * Represents the permission state for reading calendar.\n *\n * @platform iOS, Android\n * @permissions\n * <h3>Manifest Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> NSCalendarsFullAccessUsageDescription</li>\n * <li><strong>13 ≤ iOS ≤ 16:</strong> NSCalendarsUsageDescription</li>\n * <li><strong>Android:</strong> android.permission.READ_CALENDAR</li>\n * </ul>\n */\n PluginPermission[\"READ_CALENDAR\"] = \"readCalendar\";\n /**\n * Represents the permission state for writing calendar.\n *\n * @platform iOS, Android\n * @permissions\n * <h3>Manifest Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> NSCalendarsWriteOnlyAccessUsageDescription</li>\n * <li><strong>13 ≤ iOS ≤ 16:</strong> NSCalendarsUsageDescription</li>\n * <li><strong>Android:</strong> android.permission.WRITE_CALENDAR</li>\n * </ul>\n */\n PluginPermission[\"WRITE_CALENDAR\"] = \"writeCalendar\";\n /**\n * Represents the permission state for reading reminders.\n *\n * @platform iOS\n * @permissions\n * <h3>Manifest Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> NSRemindersFullAccessUsageDescription</li>\n * <li><strong>10 ≤ iOS ≤ 16:</strong> NSRemindersUsageDescription</li>\n * </ul>\n */\n PluginPermission[\"READ_REMINDERS\"] = \"readReminders\";\n /**\n * Represents the permission state for writing reminders.\n *\n * @platform iOS\n * @permissions\n * <h3>Manifest Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> NSRemindersFullAccessUsageDescription</li>\n * <li><strong>13 ≤ iOS ≤ 16:</strong> NSRemindersUsageDescription</li>\n * </ul>\n */\n PluginPermission[\"WRITE_REMINDERS\"] = \"writeReminders\";\n})(PluginPermission || (PluginPermission = {}));\n//# sourceMappingURL=plugin-permission.js.map","/**\n * Enum representing the repeating frequency of the reminder.\n *\n * @enum ReminderRecurrenceFrequency\n * @platform iOS\n */\nexport var ReminderRecurrenceFrequency;\n(function (ReminderRecurrenceFrequency) {\n /**\n * The reminder repeats on a daily basis\n */\n ReminderRecurrenceFrequency[ReminderRecurrenceFrequency[\"DAILY\"] = 0] = \"DAILY\";\n /**\n * The reminder repeats on a weekly basis\n */\n ReminderRecurrenceFrequency[ReminderRecurrenceFrequency[\"WEEKLY\"] = 1] = \"WEEKLY\";\n /**\n * The reminder repeats on a monthly basis\n */\n ReminderRecurrenceFrequency[ReminderRecurrenceFrequency[\"MONTHLY\"] = 2] = \"MONTHLY\";\n /**\n * The reminder repeats on a yearly basis\n */\n ReminderRecurrenceFrequency[ReminderRecurrenceFrequency[\"YEARLY\"] = 3] = \"YEARLY\";\n})(ReminderRecurrenceFrequency || (ReminderRecurrenceFrequency = {}));\n//# sourceMappingURL=reminder-recurrence-frequency.js.map","import { registerPlugin } from '@capacitor/core';\nimport { CalendarChooserDisplayStyle } from './schemas/enums/calendar-chooser-display-style';\nimport { CalendarChooserSelectionStyle } from './schemas/enums/calendar-chooser-selection-style';\nimport { PluginPermission } from './schemas/enums/plugin-permission';\nimport { ReminderRecurrenceFrequency } from './schemas/enums/reminder-recurrence-frequency';\nconst CapacitorCalendar = registerPlugin('CapacitorCalendar', {\n web: () => import('./web').then((m) => new m.CapacitorCalendarWeb()),\n});\nexport * from './definitions';\nexport { CalendarChooserSelectionStyle, CalendarChooserDisplayStyle, PluginPermission, ReminderRecurrenceFrequency, CapacitorCalendar, };\n//# sourceMappingURL=index.js.map","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { WebPlugin } from '@capacitor/core';\nexport class CapacitorCalendarWeb extends WebPlugin {\n checkPermission(_options) {\n throw this.unimplemented(`${this.checkPermission.name} is not implemented on the web`);\n }\n checkAllPermissions() {\n throw this.unimplemented(`${this.checkAllPermissions.name} is not implemented on the web`);\n }\n requestPermission(_options) {\n throw this.unimplemented(`${this.requestPermission.name} is not implemented on the web`);\n }\n requestAllPermissions() {\n throw this.unimplemented(`${this.requestAllPermissions.name} is not implemented on the web`);\n }\n createEventWithPrompt(_options) {\n throw this.unimplemented(`${this.createEventWithPrompt.name} is not implemented on the web`);\n }\n selectCalendarsWithPrompt() {\n throw this.unimplemented(`${this.selectCalendarsWithPrompt.name} is not implemented on the web`);\n }\n listCalendars() {\n throw this.unimplemented(`${this.listCalendars.name} is not implemented on the web`);\n }\n getDefaultCalendar() {\n throw this.unimplemented(`${this.getDefaultCalendar.name} is not implemented on the web`);\n }\n createEvent(_options) {\n throw this.unimplemented(`${this.createEvent.name} is not implemented on the web`);\n }\n createReminder(_options) {\n throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);\n }\n getDefaultRemindersList() {\n throw this.unimplemented(`${this.getDefaultRemindersList.name} is not implemented on the web`);\n }\n getRemindersLists() {\n throw this.unimplemented(`${this.getRemindersLists.name} is not implemented on the web`);\n }\n openCalendar(_options) {\n throw this.unimplemented(`${this.openCalendar.name} is not implemented on the web`);\n }\n openReminders() {\n throw this.unimplemented(`${this.openReminders.name} is not implemented on the web`);\n }\n listEventsInRange(_options) {\n throw this.unimplemented(`${this.listEventsInRange.name} is not implemented on the web`);\n }\n deleteEventsById(_options) {\n throw this.unimplemented(`${this.deleteEventsById.name} is not implemented on the web`);\n }\n createCalendar(_options) {\n throw this.unimplemented(`${this.createCalendar.name} is not implemented on the web`);\n }\n deleteCalendar(_options) {\n throw this.unimplemented(`${this.deleteCalendar.name} is not implemented on the web`);\n }\n getRemindersFromLists(_options) {\n throw this.unimplemented(`${this.getRemindersFromLists.name} is not implemented on the web`);\n }\n deleteRemindersById(_options) {\n throw this.unimplemented(`${this.deleteRemindersById.name} is not implemented on the web`);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["CalendarChooserDisplayStyle","CalendarChooserSelectionStyle","PluginPermission","ReminderRecurrenceFrequency","registerPlugin","WebPlugin"],"mappings":";;;IAAA;IACA;IACA;IACA;IACA;IACA;AACWA,iDAA4B;IACvC,CAAC,UAAU,2BAA2B,EAAE;IACxC;IACA;IACA;IACA,IAAI,2BAA2B,CAAC,2BAA2B,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,GAAG,eAAe,CAAC;IACpG;IACA;IACA;IACA,IAAI,2BAA2B,CAAC,2BAA2B,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC,GAAG,yBAAyB,CAAC;IACxH,CAAC,EAAEA,mCAA2B,KAAKA,mCAA2B,GAAG,EAAE,CAAC,CAAC;;IChBrE;IACA;IACA;IACA;IACA;IACA;AACWC,mDAA8B;IACzC,CAAC,UAAU,6BAA6B,EAAE;IAC1C;IAC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AC,8BAA8B,CAAC,CAAC,CAAC;IACnG,KAAK;IACL;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/schemas/enums/calendar-chooser-display-style.js","esm/schemas/enums/calendar-chooser-selection-style.js","esm/schemas/enums/plugin-permission.js","esm/schemas/enums/reminder-recurrence-frequency.js","esm/index.js","esm/web.js"],"sourcesContent":["/**\n * Enum representing the display styles for the calendar chooser.\n *\n * @enum CalendarChooserDisplayStyle\n * @platform iOS\n */\nexport var CalendarChooserDisplayStyle;\n(function (CalendarChooserDisplayStyle) {\n /**\n * Display all calendars available for selection.\n */\n CalendarChooserDisplayStyle[CalendarChooserDisplayStyle[\"ALL_CALENDARS\"] = 0] = \"ALL_CALENDARS\";\n /**\n * Display only writable calendars available for selection.\n */\n CalendarChooserDisplayStyle[CalendarChooserDisplayStyle[\"WRITABLE_CALENDARS_ONLY\"] = 1] = \"WRITABLE_CALENDARS_ONLY\";\n})(CalendarChooserDisplayStyle || (CalendarChooserDisplayStyle = {}));\n//# sourceMappingURL=calendar-chooser-display-style.js.map","/**\n * Enum representing the selection style for the calendar chooser.\n *\n * @enum CalendarChooserSelectionStyle\n * @platform iOS\n */\nexport var CalendarChooserSelectionStyle;\n(function (CalendarChooserSelectionStyle) {\n /**\n * Allows only a single selection in the calendar chooser.\n */\n CalendarChooserSelectionStyle[CalendarChooserSelectionStyle[\"SINGLE\"] = 0] = \"SINGLE\";\n /**\n * Allows multiple selections in the calendar chooser.\n */\n CalendarChooserSelectionStyle[CalendarChooserSelectionStyle[\"MULTIPLE\"] = 1] = \"MULTIPLE\";\n})(CalendarChooserSelectionStyle || (CalendarChooserSelectionStyle = {}));\n//# sourceMappingURL=calendar-chooser-selection-style.js.map","/**\n * Enum representing the available runtime permissions for the plugin.\n *\n * @enum PluginPermission\n * @platform iOS, Android\n */\nexport var PluginPermission;\n(function (PluginPermission) {\n /**\n * Represents the permission state for reading calendar.\n *\n * @platform iOS, Android\n * @permissions\n * <h3>Manifest Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> NSCalendarsFullAccessUsageDescription</li>\n * <li><strong>13 ≤ iOS ≤ 16:</strong> NSCalendarsUsageDescription</li>\n * <li><strong>Android:</strong> android.permission.READ_CALENDAR</li>\n * </ul>\n */\n PluginPermission[\"READ_CALENDAR\"] = \"readCalendar\";\n /**\n * Represents the permission state for writing calendar.\n *\n * @platform iOS, Android\n * @permissions\n * <h3>Manifest Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> NSCalendarsWriteOnlyAccessUsageDescription</li>\n * <li><strong>13 ≤ iOS ≤ 16:</strong> NSCalendarsUsageDescription</li>\n * <li><strong>Android:</strong> android.permission.WRITE_CALENDAR</li>\n * </ul>\n */\n PluginPermission[\"WRITE_CALENDAR\"] = \"writeCalendar\";\n /**\n * Represents the permission state for reading reminders.\n *\n * @platform iOS\n * @permissions\n * <h3>Manifest Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> NSRemindersFullAccessUsageDescription</li>\n * <li><strong>10 ≤ iOS ≤ 16:</strong> NSRemindersUsageDescription</li>\n * </ul>\n */\n PluginPermission[\"READ_REMINDERS\"] = \"readReminders\";\n /**\n * Represents the permission state for writing reminders.\n *\n * @platform iOS\n * @permissions\n * <h3>Manifest Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> NSRemindersFullAccessUsageDescription</li>\n * <li><strong>13 ≤ iOS ≤ 16:</strong> NSRemindersUsageDescription</li>\n * </ul>\n */\n PluginPermission[\"WRITE_REMINDERS\"] = \"writeReminders\";\n})(PluginPermission || (PluginPermission = {}));\n//# sourceMappingURL=plugin-permission.js.map","/**\n * Enum representing the repeating frequency of the reminder.\n *\n * @enum ReminderRecurrenceFrequency\n * @platform iOS\n */\nexport var ReminderRecurrenceFrequency;\n(function (ReminderRecurrenceFrequency) {\n /**\n * The reminder repeats on a daily basis\n */\n ReminderRecurrenceFrequency[ReminderRecurrenceFrequency[\"DAILY\"] = 0] = \"DAILY\";\n /**\n * The reminder repeats on a weekly basis\n */\n ReminderRecurrenceFrequency[ReminderRecurrenceFrequency[\"WEEKLY\"] = 1] = \"WEEKLY\";\n /**\n * The reminder repeats on a monthly basis\n */\n ReminderRecurrenceFrequency[ReminderRecurrenceFrequency[\"MONTHLY\"] = 2] = \"MONTHLY\";\n /**\n * The reminder repeats on a yearly basis\n */\n ReminderRecurrenceFrequency[ReminderRecurrenceFrequency[\"YEARLY\"] = 3] = \"YEARLY\";\n})(ReminderRecurrenceFrequency || (ReminderRecurrenceFrequency = {}));\n//# sourceMappingURL=reminder-recurrence-frequency.js.map","import { registerPlugin } from '@capacitor/core';\nimport { CalendarChooserDisplayStyle } from './schemas/enums/calendar-chooser-display-style';\nimport { CalendarChooserSelectionStyle } from './schemas/enums/calendar-chooser-selection-style';\nimport { PluginPermission } from './schemas/enums/plugin-permission';\nimport { ReminderRecurrenceFrequency } from './schemas/enums/reminder-recurrence-frequency';\nconst CapacitorCalendar = registerPlugin('CapacitorCalendar', {\n web: () => import('./web').then((m) => new m.CapacitorCalendarWeb()),\n});\nexport * from './definitions';\nexport { CalendarChooserSelectionStyle, CalendarChooserDisplayStyle, PluginPermission, ReminderRecurrenceFrequency, CapacitorCalendar, };\n//# sourceMappingURL=index.js.map","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { WebPlugin } from '@capacitor/core';\nexport class CapacitorCalendarWeb extends WebPlugin {\n checkPermission(_options) {\n throw this.unimplemented(`${this.checkPermission.name} is not implemented on the web`);\n }\n checkAllPermissions() {\n throw this.unimplemented(`${this.checkAllPermissions.name} is not implemented on the web`);\n }\n requestPermission(_options) {\n throw this.unimplemented(`${this.requestPermission.name} is not implemented on the web`);\n }\n requestAllPermissions() {\n throw this.unimplemented(`${this.requestAllPermissions.name} is not implemented on the web`);\n }\n createEventWithPrompt(_options) {\n throw this.unimplemented(`${this.createEventWithPrompt.name} is not implemented on the web`);\n }\n selectCalendarsWithPrompt() {\n throw this.unimplemented(`${this.selectCalendarsWithPrompt.name} is not implemented on the web`);\n }\n listCalendars() {\n throw this.unimplemented(`${this.listCalendars.name} is not implemented on the web`);\n }\n getDefaultCalendar() {\n throw this.unimplemented(`${this.getDefaultCalendar.name} is not implemented on the web`);\n }\n createEvent(_options) {\n throw this.unimplemented(`${this.createEvent.name} is not implemented on the web`);\n }\n createReminder(_options) {\n throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);\n }\n getDefaultRemindersList() {\n throw this.unimplemented(`${this.getDefaultRemindersList.name} is not implemented on the web`);\n }\n getRemindersLists() {\n throw this.unimplemented(`${this.getRemindersLists.name} is not implemented on the web`);\n }\n openCalendar(_options) {\n throw this.unimplemented(`${this.openCalendar.name} is not implemented on the web`);\n }\n openReminders() {\n throw this.unimplemented(`${this.openReminders.name} is not implemented on the web`);\n }\n listEventsInRange(_options) {\n throw this.unimplemented(`${this.listEventsInRange.name} is not implemented on the web`);\n }\n deleteEventsById(_options) {\n throw this.unimplemented(`${this.deleteEventsById.name} is not implemented on the web`);\n }\n createCalendar(_options) {\n throw this.unimplemented(`${this.createCalendar.name} is not implemented on the web`);\n }\n deleteCalendar(_options) {\n throw this.unimplemented(`${this.deleteCalendar.name} is not implemented on the web`);\n }\n getRemindersFromLists(_options) {\n throw this.unimplemented(`${this.getRemindersFromLists.name} is not implemented on the web`);\n }\n deleteRemindersById(_options) {\n throw this.unimplemented(`${this.deleteRemindersById.name} is not implemented on the web`);\n }\n requestWriteOnlyCalendarAccess() {\n throw this.unimplemented(`${this.requestWriteOnlyCalendarAccess.name} is not implemented on the web`);\n }\n requestReadOnlyCalendarAccess() {\n throw this.unimplemented(`${this.requestReadOnlyCalendarAccess.name} is not implemented on the web`);\n }\n requestFullCalendarAccess() {\n throw this.unimplemented(`${this.requestFullCalendarAccess.name} is not implemented on the web`);\n }\n requestFullRemindersAccess() {\n throw this.unimplemented(`${this.requestFullRemindersAccess.name} is not implemented on the web`);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["CalendarChooserDisplayStyle","CalendarChooserSelectionStyle","PluginPermission","ReminderRecurrenceFrequency","registerPlugin","WebPlugin"],"mappings":";;;IAAA;IACA;IACA;IACA;IACA;IACA;AACWA,iDAA4B;IACvC,CAAC,UAAU,2BAA2B,EAAE;IACxC;IACA;IACA;IACA,IAAI,2BAA2B,CAAC,2BAA2B,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,GAAG,eAAe,CAAC;IACpG;IACA;IACA;IACA,IAAI,2BAA2B,CAAC,2BAA2B,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC,GAAG,yBAAyB,CAAC;IACxH,CAAC,EAAEA,mCAA2B,KAAKA,mCAA2B,GAAG,EAAE,CAAC,CAAC;;IChBrE;IACA;IACA;IACA;IACA;IACA;AACWC,mDAA8B;IACzC,CAAC,UAAU,6BAA6B,EAAE;IAC1C;IACA;IACA;IACA,IAAI,6BAA6B,CAAC,6BAA6B,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;IAC1F;IACA;IACA;IACA,IAAI,6BAA6B,CAAC,6BAA6B,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;IAC9F,CAAC,EAAEA,qCAA6B,KAAKA,qCAA6B,GAAG,EAAE,CAAC,CAAC;;IChBzE;IACA;IACA;IACA;IACA;IACA;AACWC,sCAAiB;IAC5B,CAAC,UAAU,gBAAgB,EAAE;IAC7B;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,IAAI,gBAAgB,CAAC,eAAe,CAAC,GAAG,cAAc,CAAC;IACvD;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,IAAI,gBAAgB,CAAC,gBAAgB,CAAC,GAAG,eAAe,CAAC;IACzD;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,IAAI,gBAAgB,CAAC,gBAAgB,CAAC,GAAG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;;;;;;;;;;;;;"}
|
|
@@ -343,8 +343,8 @@ public class CapacitorCalendar: NSObject, EKEventEditViewDelegate, EKCalendarCho
|
|
|
343
343
|
) {
|
|
344
344
|
controller.dismiss(animated: true) {
|
|
345
345
|
if action == .saved {
|
|
346
|
-
if let event = controller.event {
|
|
347
|
-
self.currentCreateEventContinuation?.resume(returning: [
|
|
346
|
+
if let event = controller.event, let eventId = event.eventIdentifier {
|
|
347
|
+
self.currentCreateEventContinuation?.resume(returning: [eventId])
|
|
348
348
|
} else {
|
|
349
349
|
self.currentCreateEventContinuation?.resume(throwing: CapacitorCalendarPluginError.undefinedEvent)
|
|
350
350
|
return
|
|
@@ -24,4 +24,8 @@ CAP_PLUGIN(CapacitorCalendarPlugin, "CapacitorCalendar",
|
|
|
24
24
|
CAP_PLUGIN_METHOD(deleteCalendar, CAPPluginReturnNone);
|
|
25
25
|
CAP_PLUGIN_METHOD(getRemindersFromLists, CAPPluginReturnPromise);
|
|
26
26
|
CAP_PLUGIN_METHOD(deleteRemindersById, CAPPluginReturnPromise);
|
|
27
|
+
CAP_PLUGIN_METHOD(requestWriteOnlyCalendarAccess, CAPPluginReturnPromise);
|
|
28
|
+
CAP_PLUGIN_METHOD(requestFullCalendarAccess, CAPPluginReturnPromise);
|
|
29
|
+
CAP_PLUGIN_METHOD(requestFullRemindersAccess, CAPPluginReturnPromise);
|
|
30
|
+
CAP_PLUGIN_METHOD(requestReadOnlyCalendarAccess, CAPPluginReturnPromise);
|
|
27
31
|
)
|
|
@@ -420,4 +420,45 @@ public class CapacitorCalendarPlugin: CAPPlugin {
|
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
|
+
|
|
424
|
+
@objc public func requestWriteOnlyCalendarAccess(_ call: CAPPluginCall) {
|
|
425
|
+
Task {
|
|
426
|
+
do {
|
|
427
|
+
let result = try await calendar.requestWriteAccessToEvents()
|
|
428
|
+
call.resolve(result)
|
|
429
|
+
} catch {
|
|
430
|
+
call.reject("[CapacitorCalendar.\(#function)] Could not authorize write access")
|
|
431
|
+
return
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
@objc public func requestReadOnlyCalendarAccess(_ call: CAPPluginCall) {
|
|
437
|
+
call.unimplemented("[CapacitorCalendar.\(#function)] Not implemented on iOS")
|
|
438
|
+
return
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
@objc public func requestFullCalendarAccess(_ call: CAPPluginCall) {
|
|
442
|
+
Task {
|
|
443
|
+
do {
|
|
444
|
+
let result = try await calendar.requestFullAccessToEvents()
|
|
445
|
+
call.resolve(["result": result])
|
|
446
|
+
} catch {
|
|
447
|
+
call.reject("[CapacitorCalendar.\(#function)] Could not authorize full calendar access")
|
|
448
|
+
return
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
@objc public func requestFullRemindersAccess(_ call: CAPPluginCall) {
|
|
454
|
+
Task {
|
|
455
|
+
do {
|
|
456
|
+
let result = try await reminders.requestFullAccessToReminders()
|
|
457
|
+
call.resolve(["result": result])
|
|
458
|
+
} catch {
|
|
459
|
+
call.reject("[CapacitorCalendar.\(#function)] Could not authorize full reminders access")
|
|
460
|
+
return
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
}
|
|
423
464
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ebarooni/capacitor-calendar",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.4.0",
|
|
4
4
|
"description": "The Capacitor Calendar Plugin enables full calendar functionality on iOS and Android, with added reminder support for iOS devices.",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|