@ebarooni/capacitor-calendar 8.3.0 → 8.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.
Files changed (79) hide show
  1. package/README.md +179 -71
  2. package/android/src/main/java/dev/barooni/capacitor/calendar/CapacitorCalendarPlugin.kt +42 -7
  3. package/android/src/main/java/dev/barooni/capacitor/calendar/PluginError.kt +31 -21
  4. package/android/src/main/java/dev/barooni/capacitor/calendar/implementation/CapacitorCalendar.kt +59 -15
  5. package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/CheckPermissionInput.kt +0 -4
  6. package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/CreateCalendarInput.kt +3 -1
  7. package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/DeleteCalendarInput.kt +4 -1
  8. package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/GetDefaultCalendarInput.kt +9 -0
  9. package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/ModifyCalendarInput.kt +10 -1
  10. package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/RequestPermissionInput.kt +3 -5
  11. package/android/src/main/java/dev/barooni/capacitor/calendar/models/results/CheckAllPermissionsResult.kt +3 -2
  12. package/android/src/main/java/dev/barooni/capacitor/calendar/models/results/RequestAllPermissionsResult.kt +1 -1
  13. package/android/src/main/java/dev/barooni/capacitor/calendar/models/templates/PluginCompletion.kt +8 -0
  14. package/android/src/main/java/dev/barooni/capacitor/calendar/utils/ImplementationHelper.kt +68 -31
  15. package/dist/docs.json +439 -51
  16. package/dist/esm/index.d.ts +8 -1
  17. package/dist/esm/index.js.map +1 -1
  18. package/dist/esm/schemas/enums/calendar-permission-scope.d.ts +8 -0
  19. package/dist/esm/schemas/enums/calendar-permission-scope.js +8 -0
  20. package/dist/esm/schemas/enums/calendar-permission-scope.js.map +1 -1
  21. package/dist/esm/schemas/interfaces/calendar-source.d.ts +3 -0
  22. package/dist/esm/schemas/interfaces/calendar-source.js.map +1 -1
  23. package/dist/esm/schemas/interfaces/calendar.d.ts +12 -2
  24. package/dist/esm/schemas/interfaces/calendar.js.map +1 -1
  25. package/dist/esm/schemas/interfaces/check-permission-options.d.ts +19 -0
  26. package/dist/esm/schemas/interfaces/check-permission-options.js +2 -0
  27. package/dist/esm/schemas/interfaces/check-permission-options.js.map +1 -0
  28. package/dist/esm/schemas/interfaces/create-calendar-options.d.ts +16 -5
  29. package/dist/esm/schemas/interfaces/create-calendar-options.js.map +1 -1
  30. package/dist/esm/schemas/interfaces/create-calendar-result.d.ts +12 -0
  31. package/dist/esm/schemas/interfaces/create-calendar-result.js +2 -0
  32. package/dist/esm/schemas/interfaces/create-calendar-result.js.map +1 -0
  33. package/dist/esm/schemas/interfaces/delete-calendar-options.d.ts +1 -0
  34. package/dist/esm/schemas/interfaces/delete-calendar-options.js.map +1 -1
  35. package/dist/esm/schemas/interfaces/fetch-all-calendar-sources-result.d.ts +13 -0
  36. package/dist/esm/schemas/interfaces/fetch-all-calendar-sources-result.js +2 -0
  37. package/dist/esm/schemas/interfaces/fetch-all-calendar-sources-result.js.map +1 -0
  38. package/dist/esm/schemas/interfaces/get-default-calendar-options.d.ts +13 -0
  39. package/dist/esm/schemas/interfaces/get-default-calendar-options.js +2 -0
  40. package/dist/esm/schemas/interfaces/get-default-calendar-options.js.map +1 -0
  41. package/dist/esm/schemas/interfaces/list-calendars-result.d.ts +13 -0
  42. package/dist/esm/schemas/interfaces/list-calendars-result.js +2 -0
  43. package/dist/esm/schemas/interfaces/list-calendars-result.js.map +1 -0
  44. package/dist/esm/schemas/interfaces/list-events-in-range-options.d.ts +7 -2
  45. package/dist/esm/schemas/interfaces/list-events-in-range-options.js.map +1 -1
  46. package/dist/esm/schemas/interfaces/modify-calendar-options.d.ts +8 -1
  47. package/dist/esm/schemas/interfaces/modify-calendar-options.js.map +1 -1
  48. package/dist/esm/schemas/interfaces/open-calendar-options.d.ts +5 -1
  49. package/dist/esm/schemas/interfaces/open-calendar-options.js.map +1 -1
  50. package/dist/esm/schemas/interfaces/request-permission-options.d.ts +16 -0
  51. package/dist/esm/schemas/interfaces/request-permission-options.js +2 -0
  52. package/dist/esm/schemas/interfaces/request-permission-options.js.map +1 -0
  53. package/dist/esm/schemas/interfaces/select-calendars-with-prompt-result.d.ts +14 -0
  54. package/dist/esm/schemas/interfaces/select-calendars-with-prompt-result.js +2 -0
  55. package/dist/esm/schemas/interfaces/select-calendars-with-prompt-result.js.map +1 -0
  56. package/dist/esm/sub-definitions/calendar-access.d.ts +22 -10
  57. package/dist/esm/sub-definitions/calendar-access.js.map +1 -1
  58. package/dist/esm/sub-definitions/calendar-operations.d.ts +61 -14
  59. package/dist/esm/sub-definitions/calendar-operations.js.map +1 -1
  60. package/dist/esm/sub-definitions/event-operations.d.ts +15 -1
  61. package/dist/esm/sub-definitions/event-operations.js.map +1 -1
  62. package/dist/esm/sub-definitions/reminders-access.d.ts +4 -0
  63. package/dist/esm/sub-definitions/reminders-access.js.map +1 -1
  64. package/dist/esm/web.d.ts +15 -21
  65. package/dist/esm/web.js +1 -1
  66. package/dist/esm/web.js.map +1 -1
  67. package/dist/plugin.cjs.js +9 -1
  68. package/dist/plugin.cjs.js.map +1 -1
  69. package/dist/plugin.js +9 -1
  70. package/dist/plugin.js.map +1 -1
  71. package/ios/Plugin/CapacitorCalendarPlugin.swift +19 -16
  72. package/ios/Plugin/Implementation/CapacitorCalendar.swift +64 -34
  73. package/ios/Plugin/Models/Inputs/CreateCalendarInput.swift +4 -5
  74. package/ios/Plugin/Models/Inputs/DeleteCalendarInput.swift +1 -1
  75. package/ios/Plugin/Models/Inputs/GetDefaultCalendarInput.swift +13 -0
  76. package/ios/Plugin/Models/Inputs/ModifyCalendarInput.swift +4 -1
  77. package/ios/Plugin/PluginError.swift +68 -56
  78. package/ios/Plugin/Utils/ImplementationHelper.swift +15 -12
  79. package/package.json +1 -1
@@ -13,7 +13,9 @@ import { ReminderRecurrenceFrequency } from './schemas/enums/reminder-recurrence
13
13
  import type { Calendar } from './schemas/interfaces/calendar';
14
14
  import type { CalendarEvent } from './schemas/interfaces/calendar-event';
15
15
  import type { CalendarSource } from './schemas/interfaces/calendar-source';
16
+ import type { CheckPermissionOptions } from './schemas/interfaces/check-permission-options';
16
17
  import type { CreateCalendarOptions } from './schemas/interfaces/create-calendar-options';
18
+ import type { CreateCalendarResult } from './schemas/interfaces/create-calendar-result';
17
19
  import type { CreateEventOptions } from './schemas/interfaces/create-event-options';
18
20
  import type { CreateEventWithPromptOptions } from './schemas/interfaces/create-event-with-prompt-options';
19
21
  import type { CreateReminderOptions } from './schemas/interfaces/create-reminder-options';
@@ -28,8 +30,11 @@ import type { DeleteReminderWithPromptOptions } from './schemas/interfaces/delet
28
30
  import type { DeleteRemindersByIdOptions } from './schemas/interfaces/delete-reminders-by-id-options';
29
31
  import type { DeleteRemindersListOptions } from './schemas/interfaces/delete-reminders-list-options';
30
32
  import type { EventGuest } from './schemas/interfaces/event-guest';
33
+ import type { FetchAllCalendarSourcesResult } from './schemas/interfaces/fetch-all-calendar-sources-result';
34
+ import type { GetDefaultCalendarOptions } from './schemas/interfaces/get-default-calendar-options';
31
35
  import type { GetReminderByIdOptions } from './schemas/interfaces/get-reminder-by-id-options';
32
36
  import type { GetRemindersFromListsOptions } from './schemas/interfaces/get-reminders-from-lists-options';
37
+ import type { ListCalendarsResult } from './schemas/interfaces/list-calendars-result';
33
38
  import type { ListEventsInRangeOptions } from './schemas/interfaces/list-events-in-range-options';
34
39
  import type { ModifyCalendarOptions } from './schemas/interfaces/modify-calendar-options';
35
40
  import type { ModifyEventOptions } from './schemas/interfaces/modify-event-options';
@@ -40,7 +45,9 @@ import type { RecurrenceRule } from './schemas/interfaces/recurrence-rule';
40
45
  import type { Reminder } from './schemas/interfaces/reminder';
41
46
  import type { ReminderRecurrenceRule } from './schemas/interfaces/reminder-recurrence-rule';
42
47
  import type { RemindersList } from './schemas/interfaces/reminders-list';
48
+ import type { RequestPermissionOptions } from './schemas/interfaces/request-permission-options';
43
49
  import type { SelectCalendarsWithPromptOptions } from './schemas/interfaces/select-calendars-with-prompt-options';
50
+ import type { SelectCalendarsWithPromptResult } from './schemas/interfaces/select-calendars-with-prompt-result';
44
51
  import type { UpdateRemindersListOptions } from './schemas/interfaces/update-reminders-list-options';
45
52
  import type { UpdateRemindersListResult } from './schemas/interfaces/update-reminders-list-result';
46
53
  import type { EventEditAction } from './schemas/types/event-edit-action';
@@ -50,5 +57,5 @@ import type { DeleteEventsByIdResult } from './sub-definitions/event-operations'
50
57
  import type { DeleteRemindersByIdResult } from './sub-definitions/reminders-operations';
51
58
  declare const CapacitorCalendar: CapacitorCalendarPlugin;
52
59
  export * from './definitions';
53
- export type { CheckAllPermissionsResult, CreateRemindersListOptions, CreateRemindersListResult, DeleteRemindersListOptions, RequestAllPermissionsResult, CreateEventWithPromptOptions, ModifyEventWithPromptOptions, EventEditAction, CreateEventOptions, EventGuest, ModifyEventOptions, SelectCalendarsWithPromptOptions, Calendar, RemindersList, CalendarSource, OpenCalendarOptions, CreateCalendarOptions, DeleteCalendarOptions, ReminderRecurrenceRule, RecurrenceRule, CreateReminderOptions, DeleteRemindersByIdOptions, DeleteRemindersByIdResult, DeleteReminderOptions, ModifyReminderOptions, GetReminderByIdOptions, Reminder, GetRemindersFromListsOptions, DeleteEventsByIdOptions, DeleteEventsByIdResult, DeleteEventOptions, DeleteEventWithPromptOptions, ListEventsInRangeOptions, CalendarEvent, ModifyCalendarOptions, DeleteReminderWithPromptOptions, UpdateRemindersListOptions, UpdateRemindersListResult, };
60
+ export type { Calendar, CalendarEvent, CalendarSource, CheckAllPermissionsResult, CheckPermissionOptions, CreateCalendarOptions, CreateCalendarResult, CreateEventOptions, CreateEventWithPromptOptions, CreateReminderOptions, CreateRemindersListOptions, CreateRemindersListResult, DeleteCalendarOptions, DeleteEventOptions, DeleteEventWithPromptOptions, DeleteEventsByIdOptions, DeleteEventsByIdResult, DeleteReminderOptions, DeleteReminderWithPromptOptions, DeleteRemindersByIdOptions, DeleteRemindersByIdResult, DeleteRemindersListOptions, EventEditAction, EventGuest, FetchAllCalendarSourcesResult, GetDefaultCalendarOptions, GetReminderByIdOptions, GetRemindersFromListsOptions, ListCalendarsResult, ListEventsInRangeOptions, ModifyCalendarOptions, ModifyEventOptions, ModifyEventWithPromptOptions, ModifyReminderOptions, OpenCalendarOptions, RecurrenceRule, Reminder, ReminderRecurrenceRule, RemindersList, RequestAllPermissionsResult, RequestPermissionOptions, SelectCalendarsWithPromptOptions, SelectCalendarsWithPromptResult, UpdateRemindersListOptions, UpdateRemindersListResult, };
54
61
  export { CalendarPermissionScope, EventAvailability, EventSpan, CalendarChooserDisplayStyle, CalendarType, CalendarSourceType, ReminderRecurrenceFrequency, RecurrenceFrequency, EventStatus, AttendeeRole, AttendeeType, AttendeeStatus, CapacitorCalendar, };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGjD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAC7F,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AAwC5F,MAAM,iBAAiB,GAAG,cAAc,CAA0B,mBAAmB,EAAE;IACrF,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,oBAAoB,EAAE,CAAC;CACrE,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAyC9B,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,EACT,2BAA2B,EAC3B,YAAY,EACZ,kBAAkB,EAClB,2BAA2B,EAE3B,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,iBAAiB,GAClB,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { CapacitorCalendarPlugin } from './definitions';\nimport { AttendeeRole } from './schemas/enums/attendee-role';\nimport { AttendeeStatus } from './schemas/enums/attendee-status';\nimport { AttendeeType } from './schemas/enums/attendee-type';\nimport { CalendarChooserDisplayStyle } from './schemas/enums/calendar-chooser-display-style';\nimport { CalendarPermissionScope } from './schemas/enums/calendar-permission-scope';\nimport { CalendarSourceType } from './schemas/enums/calendar-source-type';\nimport { CalendarType } from './schemas/enums/calendar-type';\nimport { EventAvailability } from './schemas/enums/event-availability';\nimport { EventSpan } from './schemas/enums/event-span';\nimport { EventStatus } from './schemas/enums/event-status';\nimport { ReminderRecurrenceFrequency } from './schemas/enums/reminder-recurrence-frequency';\nimport type { Calendar } from './schemas/interfaces/calendar';\nimport type { CalendarEvent } from './schemas/interfaces/calendar-event';\nimport type { CalendarSource } from './schemas/interfaces/calendar-source';\nimport type { CreateCalendarOptions } from './schemas/interfaces/create-calendar-options';\nimport type { CreateEventOptions } from './schemas/interfaces/create-event-options';\nimport type { CreateEventWithPromptOptions } from './schemas/interfaces/create-event-with-prompt-options';\nimport type { CreateReminderOptions } from './schemas/interfaces/create-reminder-options';\nimport type { CreateRemindersListOptions } from './schemas/interfaces/create-reminders-list-options';\nimport type { CreateRemindersListResult } from './schemas/interfaces/create-reminders-list-result';\nimport type { DeleteCalendarOptions } from './schemas/interfaces/delete-calendar-options';\nimport type { DeleteEventOptions } from './schemas/interfaces/delete-event-options';\nimport type { DeleteEventWithPromptOptions } from './schemas/interfaces/delete-event-with-prompt-options';\nimport type { DeleteEventsByIdOptions } from './schemas/interfaces/delete-events-by-id-options';\nimport type { DeleteReminderOptions } from './schemas/interfaces/delete-reminder-options';\nimport type { DeleteReminderWithPromptOptions } from './schemas/interfaces/delete-reminder-with-prompt-options';\nimport type { DeleteRemindersByIdOptions } from './schemas/interfaces/delete-reminders-by-id-options';\nimport type { DeleteRemindersListOptions } from './schemas/interfaces/delete-reminders-list-options';\nimport type { EventGuest } from './schemas/interfaces/event-guest';\nimport type { GetReminderByIdOptions } from './schemas/interfaces/get-reminder-by-id-options';\nimport type { GetRemindersFromListsOptions } from './schemas/interfaces/get-reminders-from-lists-options';\nimport type { ListEventsInRangeOptions } from './schemas/interfaces/list-events-in-range-options';\nimport type { ModifyCalendarOptions } from './schemas/interfaces/modify-calendar-options';\nimport type { ModifyEventOptions } from './schemas/interfaces/modify-event-options';\nimport type { ModifyEventWithPromptOptions } from './schemas/interfaces/modify-event-with-prompt-options';\nimport type { ModifyReminderOptions } from './schemas/interfaces/modify-reminder-options';\nimport type { OpenCalendarOptions } from './schemas/interfaces/open-calendar-options';\nimport type { RecurrenceRule } from './schemas/interfaces/recurrence-rule';\nimport type { Reminder } from './schemas/interfaces/reminder';\nimport type { ReminderRecurrenceRule } from './schemas/interfaces/reminder-recurrence-rule';\nimport type { RemindersList } from './schemas/interfaces/reminders-list';\nimport type { SelectCalendarsWithPromptOptions } from './schemas/interfaces/select-calendars-with-prompt-options';\nimport type { UpdateRemindersListOptions } from './schemas/interfaces/update-reminders-list-options';\nimport type { UpdateRemindersListResult } from './schemas/interfaces/update-reminders-list-result';\nimport type { EventEditAction } from './schemas/types/event-edit-action';\nimport type { RecurrenceFrequency } from './schemas/types/recurrence-frequency';\nimport type { CheckAllPermissionsResult, RequestAllPermissionsResult } from './sub-definitions/calendar-access';\nimport type { DeleteEventsByIdResult } from './sub-definitions/event-operations';\nimport type { DeleteRemindersByIdResult } from './sub-definitions/reminders-operations';\n\nconst CapacitorCalendar = registerPlugin<CapacitorCalendarPlugin>('CapacitorCalendar', {\n web: () => import('./web').then((m) => new m.CapacitorCalendarWeb()),\n});\n\nexport * from './definitions';\nexport type {\n CheckAllPermissionsResult,\n CreateRemindersListOptions,\n CreateRemindersListResult,\n DeleteRemindersListOptions,\n RequestAllPermissionsResult,\n CreateEventWithPromptOptions,\n ModifyEventWithPromptOptions,\n EventEditAction,\n CreateEventOptions,\n EventGuest,\n ModifyEventOptions,\n SelectCalendarsWithPromptOptions,\n Calendar,\n RemindersList,\n CalendarSource,\n OpenCalendarOptions,\n CreateCalendarOptions,\n DeleteCalendarOptions,\n ReminderRecurrenceRule,\n RecurrenceRule,\n CreateReminderOptions,\n DeleteRemindersByIdOptions,\n DeleteRemindersByIdResult,\n DeleteReminderOptions,\n ModifyReminderOptions,\n GetReminderByIdOptions,\n Reminder,\n GetRemindersFromListsOptions,\n DeleteEventsByIdOptions,\n DeleteEventsByIdResult,\n DeleteEventOptions,\n DeleteEventWithPromptOptions,\n ListEventsInRangeOptions,\n CalendarEvent,\n ModifyCalendarOptions,\n DeleteReminderWithPromptOptions,\n UpdateRemindersListOptions,\n UpdateRemindersListResult,\n};\nexport {\n CalendarPermissionScope,\n EventAvailability,\n EventSpan,\n CalendarChooserDisplayStyle,\n CalendarType,\n CalendarSourceType,\n ReminderRecurrenceFrequency,\n RecurrenceFrequency,\n EventStatus,\n AttendeeRole,\n AttendeeType,\n AttendeeStatus,\n CapacitorCalendar,\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGjD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAC7F,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AA+C5F,MAAM,iBAAiB,GAAG,cAAc,CAA0B,mBAAmB,EAAE;IACrF,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,oBAAoB,EAAE,CAAC;CACrE,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAgD9B,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,EACT,2BAA2B,EAC3B,YAAY,EACZ,kBAAkB,EAClB,2BAA2B,EAE3B,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,iBAAiB,GAClB,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { CapacitorCalendarPlugin } from './definitions';\nimport { AttendeeRole } from './schemas/enums/attendee-role';\nimport { AttendeeStatus } from './schemas/enums/attendee-status';\nimport { AttendeeType } from './schemas/enums/attendee-type';\nimport { CalendarChooserDisplayStyle } from './schemas/enums/calendar-chooser-display-style';\nimport { CalendarPermissionScope } from './schemas/enums/calendar-permission-scope';\nimport { CalendarSourceType } from './schemas/enums/calendar-source-type';\nimport { CalendarType } from './schemas/enums/calendar-type';\nimport { EventAvailability } from './schemas/enums/event-availability';\nimport { EventSpan } from './schemas/enums/event-span';\nimport { EventStatus } from './schemas/enums/event-status';\nimport { ReminderRecurrenceFrequency } from './schemas/enums/reminder-recurrence-frequency';\nimport type { Calendar } from './schemas/interfaces/calendar';\nimport type { CalendarEvent } from './schemas/interfaces/calendar-event';\nimport type { CalendarSource } from './schemas/interfaces/calendar-source';\nimport type { CheckPermissionOptions } from './schemas/interfaces/check-permission-options';\nimport type { CreateCalendarOptions } from './schemas/interfaces/create-calendar-options';\nimport type { CreateCalendarResult } from './schemas/interfaces/create-calendar-result';\nimport type { CreateEventOptions } from './schemas/interfaces/create-event-options';\nimport type { CreateEventWithPromptOptions } from './schemas/interfaces/create-event-with-prompt-options';\nimport type { CreateReminderOptions } from './schemas/interfaces/create-reminder-options';\nimport type { CreateRemindersListOptions } from './schemas/interfaces/create-reminders-list-options';\nimport type { CreateRemindersListResult } from './schemas/interfaces/create-reminders-list-result';\nimport type { DeleteCalendarOptions } from './schemas/interfaces/delete-calendar-options';\nimport type { DeleteEventOptions } from './schemas/interfaces/delete-event-options';\nimport type { DeleteEventWithPromptOptions } from './schemas/interfaces/delete-event-with-prompt-options';\nimport type { DeleteEventsByIdOptions } from './schemas/interfaces/delete-events-by-id-options';\nimport type { DeleteReminderOptions } from './schemas/interfaces/delete-reminder-options';\nimport type { DeleteReminderWithPromptOptions } from './schemas/interfaces/delete-reminder-with-prompt-options';\nimport type { DeleteRemindersByIdOptions } from './schemas/interfaces/delete-reminders-by-id-options';\nimport type { DeleteRemindersListOptions } from './schemas/interfaces/delete-reminders-list-options';\nimport type { EventGuest } from './schemas/interfaces/event-guest';\nimport type { FetchAllCalendarSourcesResult } from './schemas/interfaces/fetch-all-calendar-sources-result';\nimport type { GetDefaultCalendarOptions } from './schemas/interfaces/get-default-calendar-options';\nimport type { GetReminderByIdOptions } from './schemas/interfaces/get-reminder-by-id-options';\nimport type { GetRemindersFromListsOptions } from './schemas/interfaces/get-reminders-from-lists-options';\nimport type { ListCalendarsResult } from './schemas/interfaces/list-calendars-result';\nimport type { ListEventsInRangeOptions } from './schemas/interfaces/list-events-in-range-options';\nimport type { ModifyCalendarOptions } from './schemas/interfaces/modify-calendar-options';\nimport type { ModifyEventOptions } from './schemas/interfaces/modify-event-options';\nimport type { ModifyEventWithPromptOptions } from './schemas/interfaces/modify-event-with-prompt-options';\nimport type { ModifyReminderOptions } from './schemas/interfaces/modify-reminder-options';\nimport type { OpenCalendarOptions } from './schemas/interfaces/open-calendar-options';\nimport type { RecurrenceRule } from './schemas/interfaces/recurrence-rule';\nimport type { Reminder } from './schemas/interfaces/reminder';\nimport type { ReminderRecurrenceRule } from './schemas/interfaces/reminder-recurrence-rule';\nimport type { RemindersList } from './schemas/interfaces/reminders-list';\nimport type { RequestPermissionOptions } from './schemas/interfaces/request-permission-options';\nimport type { SelectCalendarsWithPromptOptions } from './schemas/interfaces/select-calendars-with-prompt-options';\nimport type { SelectCalendarsWithPromptResult } from './schemas/interfaces/select-calendars-with-prompt-result';\nimport type { UpdateRemindersListOptions } from './schemas/interfaces/update-reminders-list-options';\nimport type { UpdateRemindersListResult } from './schemas/interfaces/update-reminders-list-result';\nimport type { EventEditAction } from './schemas/types/event-edit-action';\nimport type { RecurrenceFrequency } from './schemas/types/recurrence-frequency';\nimport type { CheckAllPermissionsResult, RequestAllPermissionsResult } from './sub-definitions/calendar-access';\nimport type { DeleteEventsByIdResult } from './sub-definitions/event-operations';\nimport type { DeleteRemindersByIdResult } from './sub-definitions/reminders-operations';\n\nconst CapacitorCalendar = registerPlugin<CapacitorCalendarPlugin>('CapacitorCalendar', {\n web: () => import('./web').then((m) => new m.CapacitorCalendarWeb()),\n});\n\nexport * from './definitions';\nexport type {\n Calendar,\n CalendarEvent,\n CalendarSource,\n CheckAllPermissionsResult,\n CheckPermissionOptions,\n CreateCalendarOptions,\n CreateCalendarResult,\n CreateEventOptions,\n CreateEventWithPromptOptions,\n CreateReminderOptions,\n CreateRemindersListOptions,\n CreateRemindersListResult,\n DeleteCalendarOptions,\n DeleteEventOptions,\n DeleteEventWithPromptOptions,\n DeleteEventsByIdOptions,\n DeleteEventsByIdResult,\n DeleteReminderOptions,\n DeleteReminderWithPromptOptions,\n DeleteRemindersByIdOptions,\n DeleteRemindersByIdResult,\n DeleteRemindersListOptions,\n EventEditAction,\n EventGuest,\n FetchAllCalendarSourcesResult,\n GetDefaultCalendarOptions,\n GetReminderByIdOptions,\n GetRemindersFromListsOptions,\n ListCalendarsResult,\n ListEventsInRangeOptions,\n ModifyCalendarOptions,\n ModifyEventOptions,\n ModifyEventWithPromptOptions,\n ModifyReminderOptions,\n OpenCalendarOptions,\n RecurrenceRule,\n Reminder,\n ReminderRecurrenceRule,\n RemindersList,\n RequestAllPermissionsResult,\n RequestPermissionOptions,\n SelectCalendarsWithPromptOptions,\n SelectCalendarsWithPromptResult,\n UpdateRemindersListOptions,\n UpdateRemindersListResult,\n};\nexport {\n CalendarPermissionScope,\n EventAvailability,\n EventSpan,\n CalendarChooserDisplayStyle,\n CalendarType,\n CalendarSourceType,\n ReminderRecurrenceFrequency,\n RecurrenceFrequency,\n EventStatus,\n AttendeeRole,\n AttendeeType,\n AttendeeStatus,\n CapacitorCalendar,\n};\n"]}
@@ -21,6 +21,10 @@ export declare enum CalendarPermissionScope {
21
21
  /**
22
22
  * Permission required for reading reminders.
23
23
  *
24
+ * On Android, reminders are not supported. `checkPermission` and
25
+ * `checkAllPermissions` return `"prompt"` for this scope.
26
+ * `requestPermission` rejects with `Invalid scope.`.
27
+ *
24
28
  * @permissions
25
29
  * | Platform | Required |
26
30
  * |-----------|---------------------|
@@ -47,6 +51,10 @@ export declare enum CalendarPermissionScope {
47
51
  /**
48
52
  * Permission required for adding or modifying reminders.
49
53
  *
54
+ * On Android, reminders are not supported. `checkPermission` and
55
+ * `checkAllPermissions` return `"prompt"` for this scope.
56
+ * `requestPermission` rejects with `Invalid scope.`.
57
+ *
50
58
  * @permissions
51
59
  * | Platform | Required |
52
60
  * |-----------|---------------------|
@@ -22,6 +22,10 @@ export var CalendarPermissionScope;
22
22
  /**
23
23
  * Permission required for reading reminders.
24
24
  *
25
+ * On Android, reminders are not supported. `checkPermission` and
26
+ * `checkAllPermissions` return `"prompt"` for this scope.
27
+ * `requestPermission` rejects with `Invalid scope.`.
28
+ *
25
29
  * @permissions
26
30
  * | Platform | Required |
27
31
  * |-----------|---------------------|
@@ -48,6 +52,10 @@ export var CalendarPermissionScope;
48
52
  /**
49
53
  * Permission required for adding or modifying reminders.
50
54
  *
55
+ * On Android, reminders are not supported. `checkPermission` and
56
+ * `checkAllPermissions` return `"prompt"` for this scope.
57
+ * `requestPermission` rejects with `Invalid scope.`.
58
+ *
51
59
  * @permissions
52
60
  * | Platform | Required |
53
61
  * |-----------|---------------------|
@@ -1 +1 @@
1
- {"version":3,"file":"calendar-permission-scope.js","sourceRoot":"","sources":["../../../../src/schemas/enums/calendar-permission-scope.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAN,IAAY,uBAsDX;AAtDD,WAAY,uBAAuB;IACjC;;;;;;;;;;;;OAYG;IACH,yDAA8B,CAAA;IAC9B;;;;;;;;;;OAUG;IACH,2DAAgC,CAAA;IAChC;;;;;;;;;;;;OAYG;IACH,2DAAgC,CAAA;IAChC;;;;;;;;;;;OAWG;IACH,6DAAkC,CAAA;AACpC,CAAC,EAtDW,uBAAuB,KAAvB,uBAAuB,QAsDlC","sourcesContent":["/**\n * Enum defining available calendar and reminders related permissions.\n *\n * @since 7.1.0\n */\nexport enum CalendarPermissionScope {\n /**\n * Permission required for reading calendar events.\n *\n * @permissions\n * | Platform | Required |\n * |-----------|---------------------|\n * | iOS 17+ | `NSCalendarsFullAccessUsageDescription` |\n * | iOS 13-16 | `NSCalendarsUsageDescription` |\n * | Android | `android.permission.READ_CALENDAR` |\n *\n * @platform Android, iOS\n * @since 7.1.0\n */\n READ_CALENDAR = 'readCalendar',\n /**\n * Permission required for reading reminders.\n *\n * @permissions\n * | Platform | Required |\n * |-----------|---------------------|\n * | iOS 17+ | `NSRemindersFullAccessUsageDescription` |\n * | iOS 10-16 | `NSRemindersUsageDescription` |\n * @platform iOS\n * @since 7.1.0\n */\n READ_REMINDERS = 'readReminders',\n /**\n * Permission required for adding or modifying calendar events.\n *\n * @permissions\n * | Platform | Required |\n * |-----------|---------------------|\n * | iOS 17+ | `NSCalendarsWriteOnlyAccessUsageDescription` |\n * | iOS 13-16 | `NSCalendarsUsageDescription` |\n * | Android | `android.permission.WRITE_CALENDAR` |\n *\n * @platform Android, iOS\n * @since 7.1.0\n */\n WRITE_CALENDAR = 'writeCalendar',\n /**\n * Permission required for adding or modifying reminders.\n *\n * @permissions\n * | Platform | Required |\n * |-----------|---------------------|\n * | iOS 17+ | `NSRemindersFullAccessUsageDescription` |\n * | iOS 13-16 | `NSRemindersUsageDescription` |\n *\n * @platform iOS\n * @since 7.1.0\n */\n WRITE_REMINDERS = 'writeReminders',\n}\n"]}
1
+ {"version":3,"file":"calendar-permission-scope.js","sourceRoot":"","sources":["../../../../src/schemas/enums/calendar-permission-scope.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAN,IAAY,uBA8DX;AA9DD,WAAY,uBAAuB;IACjC;;;;;;;;;;;;OAYG;IACH,yDAA8B,CAAA;IAC9B;;;;;;;;;;;;;;OAcG;IACH,2DAAgC,CAAA;IAChC;;;;;;;;;;;;OAYG;IACH,2DAAgC,CAAA;IAChC;;;;;;;;;;;;;;;OAeG;IACH,6DAAkC,CAAA;AACpC,CAAC,EA9DW,uBAAuB,KAAvB,uBAAuB,QA8DlC","sourcesContent":["/**\n * Enum defining available calendar and reminders related permissions.\n *\n * @since 7.1.0\n */\nexport enum CalendarPermissionScope {\n /**\n * Permission required for reading calendar events.\n *\n * @permissions\n * | Platform | Required |\n * |-----------|---------------------|\n * | iOS 17+ | `NSCalendarsFullAccessUsageDescription` |\n * | iOS 13-16 | `NSCalendarsUsageDescription` |\n * | Android | `android.permission.READ_CALENDAR` |\n *\n * @platform Android, iOS\n * @since 7.1.0\n */\n READ_CALENDAR = 'readCalendar',\n /**\n * Permission required for reading reminders.\n *\n * On Android, reminders are not supported. `checkPermission` and\n * `checkAllPermissions` return `\"prompt\"` for this scope.\n * `requestPermission` rejects with `Invalid scope.`.\n *\n * @permissions\n * | Platform | Required |\n * |-----------|---------------------|\n * | iOS 17+ | `NSRemindersFullAccessUsageDescription` |\n * | iOS 10-16 | `NSRemindersUsageDescription` |\n * @platform iOS\n * @since 7.1.0\n */\n READ_REMINDERS = 'readReminders',\n /**\n * Permission required for adding or modifying calendar events.\n *\n * @permissions\n * | Platform | Required |\n * |-----------|---------------------|\n * | iOS 17+ | `NSCalendarsWriteOnlyAccessUsageDescription` |\n * | iOS 13-16 | `NSCalendarsUsageDescription` |\n * | Android | `android.permission.WRITE_CALENDAR` |\n *\n * @platform Android, iOS\n * @since 7.1.0\n */\n WRITE_CALENDAR = 'writeCalendar',\n /**\n * Permission required for adding or modifying reminders.\n *\n * On Android, reminders are not supported. `checkPermission` and\n * `checkAllPermissions` return `\"prompt\"` for this scope.\n * `requestPermission` rejects with `Invalid scope.`.\n *\n * @permissions\n * | Platform | Required |\n * |-----------|---------------------|\n * | iOS 17+ | `NSRemindersFullAccessUsageDescription` |\n * | iOS 13-16 | `NSRemindersUsageDescription` |\n *\n * @platform iOS\n * @since 7.1.0\n */\n WRITE_REMINDERS = 'writeReminders',\n}\n"]}
@@ -4,14 +4,17 @@ import type { CalendarSourceType } from '../enums/calendar-source-type';
4
4
  */
5
5
  export interface CalendarSource {
6
6
  /**
7
+ * @platform iOS
7
8
  * @since 7.1.0
8
9
  */
9
10
  type: CalendarSourceType;
10
11
  /**
12
+ * @platform iOS
11
13
  * @since 7.1.0
12
14
  */
13
15
  id: string;
14
16
  /**
17
+ * @platform iOS
15
18
  * @since 7.1.0
16
19
  */
17
20
  title: string;
@@ -1 +1 @@
1
- {"version":3,"file":"calendar-source.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/calendar-source.ts"],"names":[],"mappings":"","sourcesContent":["import type { CalendarSourceType } from '../enums/calendar-source-type';\n\n/**\n * @since 7.1.0\n */\nexport interface CalendarSource {\n /**\n * @since 7.1.0\n */\n type: CalendarSourceType;\n /**\n * @since 7.1.0\n */\n id: string;\n /**\n * @since 7.1.0\n */\n title: string;\n}\n"]}
1
+ {"version":3,"file":"calendar-source.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/calendar-source.ts"],"names":[],"mappings":"","sourcesContent":["import type { CalendarSourceType } from '../enums/calendar-source-type';\n\n/**\n * @since 7.1.0\n */\nexport interface CalendarSource {\n /**\n * @platform iOS\n * @since 7.1.0\n */\n type: CalendarSourceType;\n /**\n * @platform iOS\n * @since 7.1.0\n */\n id: string;\n /**\n * @platform iOS\n * @since 7.1.0\n */\n title: string;\n}\n"]}
@@ -10,10 +10,13 @@ export interface Calendar {
10
10
  */
11
11
  id: string;
12
12
  /**
13
+ * Display title of the calendar.
14
+ * May be `null` when the platform does not provide a title.
15
+ *
13
16
  * @platform Android, iOS
14
17
  * @since 7.1.0
15
18
  */
16
- title: string;
19
+ title: string | null;
17
20
  /**
18
21
  * Internal name of the calendar (`CalendarContract.Calendars.NAME`).
19
22
  *
@@ -22,10 +25,17 @@ export interface Calendar {
22
25
  */
23
26
  internalTitle: string | null;
24
27
  /**
28
+ * Calendar color as a hex string.
29
+ *
30
+ * Format: `#RRGGBB` when opaque; `#RRGGBBAA` when alpha is below fully opaque.
31
+ * May be `null` when the platform does not provide a color.
32
+ *
25
33
  * @platform Android, iOS
34
+ * @example #0000FF
35
+ * @example #0000FF80
26
36
  * @since 7.1.0
27
37
  */
28
- color: string;
38
+ color: string | null;
29
39
  /**
30
40
  * @platform iOS
31
41
  * @since 7.1.0
@@ -1 +1 @@
1
- {"version":3,"file":"calendar.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/calendar.ts"],"names":[],"mappings":"","sourcesContent":["import type { CalendarType } from '../enums/calendar-type';\n\nimport type { CalendarSource } from './calendar-source';\n\n/**\n * @since 7.1.0\n */\nexport interface Calendar {\n /**\n * @platform Android, iOS\n * @since 7.1.0\n */\n id: string;\n /**\n * @platform Android, iOS\n * @since 7.1.0\n */\n title: string;\n /**\n * Internal name of the calendar (`CalendarContract.Calendars.NAME`).\n *\n * @platform Android\n * @since 7.1.0\n */\n internalTitle: string | null;\n /**\n * @platform Android, iOS\n * @since 7.1.0\n */\n color: string;\n /**\n * @platform iOS\n * @since 7.1.0\n */\n isImmutable: boolean | null;\n /**\n * @platform iOS\n * @since 7.1.0\n */\n allowsContentModifications: boolean | null;\n /**\n * @platform iOS\n * @since 7.1.0\n */\n type: CalendarType | null;\n /**\n * @platform iOS\n * @since 7.1.0\n */\n isSubscribed: boolean | null;\n /**\n * @platform iOS\n * @since 7.1.0\n */\n source: CalendarSource | null;\n /**\n * Indicates if the events from this calendar should be shown.\n *\n * @platform Android\n * @since 7.1.0\n */\n visible: boolean | null;\n /**\n * The account under which the calendar is registered.\n *\n * @platform Android\n * @since 7.1.0\n */\n accountName: string | null;\n /**\n * The owner of the calendar.\n *\n * @platform Android\n * @since 7.1.0\n */\n ownerAccount: string | null;\n /**\n * Maximum number of reminders allowed per event.\n *\n * @platform Android\n * @since 7.1.0\n */\n maxReminders: number | null;\n /**\n * @platform Android\n * @since 7.1.0\n */\n location: string | null;\n}\n"]}
1
+ {"version":3,"file":"calendar.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/calendar.ts"],"names":[],"mappings":"","sourcesContent":["import type { CalendarType } from '../enums/calendar-type';\n\nimport type { CalendarSource } from './calendar-source';\n\n/**\n * @since 7.1.0\n */\nexport interface Calendar {\n /**\n * @platform Android, iOS\n * @since 7.1.0\n */\n id: string;\n /**\n * Display title of the calendar.\n * May be `null` when the platform does not provide a title.\n *\n * @platform Android, iOS\n * @since 7.1.0\n */\n title: string | null;\n /**\n * Internal name of the calendar (`CalendarContract.Calendars.NAME`).\n *\n * @platform Android\n * @since 7.1.0\n */\n internalTitle: string | null;\n /**\n * Calendar color as a hex string.\n *\n * Format: `#RRGGBB` when opaque; `#RRGGBBAA` when alpha is below fully opaque.\n * May be `null` when the platform does not provide a color.\n *\n * @platform Android, iOS\n * @example #0000FF\n * @example #0000FF80\n * @since 7.1.0\n */\n color: string | null;\n /**\n * @platform iOS\n * @since 7.1.0\n */\n isImmutable: boolean | null;\n /**\n * @platform iOS\n * @since 7.1.0\n */\n allowsContentModifications: boolean | null;\n /**\n * @platform iOS\n * @since 7.1.0\n */\n type: CalendarType | null;\n /**\n * @platform iOS\n * @since 7.1.0\n */\n isSubscribed: boolean | null;\n /**\n * @platform iOS\n * @since 7.1.0\n */\n source: CalendarSource | null;\n /**\n * Indicates if the events from this calendar should be shown.\n *\n * @platform Android\n * @since 7.1.0\n */\n visible: boolean | null;\n /**\n * The account under which the calendar is registered.\n *\n * @platform Android\n * @since 7.1.0\n */\n accountName: string | null;\n /**\n * The owner of the calendar.\n *\n * @platform Android\n * @since 7.1.0\n */\n ownerAccount: string | null;\n /**\n * Maximum number of reminders allowed per event.\n *\n * @platform Android\n * @since 7.1.0\n */\n maxReminders: number | null;\n /**\n * @platform Android\n * @since 7.1.0\n */\n location: string | null;\n}\n"]}
@@ -0,0 +1,19 @@
1
+ import type { CalendarPermissionScope } from '../enums/calendar-permission-scope';
2
+ /**
3
+ * Options for {@link CalendarAccess#checkPermission}.
4
+ *
5
+ * @since 8.3.1
6
+ */
7
+ export interface CheckPermissionOptions {
8
+ /**
9
+ * The permission scope to check.
10
+ *
11
+ * On Android, `readReminders` and `writeReminders` resolve to `"prompt"`
12
+ * (reminders are not supported on Android).
13
+ *
14
+ * @example CalendarPermissionScope.READ_CALENDAR
15
+ * @platform Android, iOS
16
+ * @since 8.3.1
17
+ */
18
+ scope: CalendarPermissionScope;
19
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=check-permission-options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-permission-options.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/check-permission-options.ts"],"names":[],"mappings":"","sourcesContent":["import type { CalendarPermissionScope } from '../enums/calendar-permission-scope';\n\n/**\n * Options for {@link CalendarAccess#checkPermission}.\n *\n * @since 8.3.1\n */\nexport interface CheckPermissionOptions {\n /**\n * The permission scope to check.\n *\n * On Android, `readReminders` and `writeReminders` resolve to `\"prompt\"`\n * (reminders are not supported on Android).\n *\n * @example CalendarPermissionScope.READ_CALENDAR\n * @platform Android, iOS\n * @since 8.3.1\n */\n scope: CalendarPermissionScope;\n}\n"]}
@@ -8,29 +8,40 @@ export interface CreateCalendarOptions {
8
8
  */
9
9
  title: string;
10
10
  /**
11
- * The color of the calendar.
12
- * Should be provided on Android.
11
+ * The color of the calendar as `#RRGGBB` or `#RRGGBBAA`.
12
+ *
13
+ * When omitted, Android and iOS use `#007AFF` (light-mode iOS system blue).
13
14
  *
14
15
  * @platform Android, iOS
15
- * @example #0000FF
16
+ * @example #007AFF
17
+ * @default #007AFF
16
18
  * @since 5.2.0
17
19
  */
18
20
  color?: string;
19
21
  /**
22
+ * The EventKit source (account) where the calendar should be created.
23
+ *
24
+ * If provided, it must match an existing source from `fetchAllCalendarSources()`.
25
+ * If omitted, iCloud is used when available, otherwise the local source.
26
+ *
20
27
  * @platform iOS
21
28
  * @since 5.2.0
22
29
  */
23
30
  sourceId?: string;
24
31
  /**
25
- * Only needed on Android. Typically set to an email address.
32
+ * The account under which the calendar is registered.
33
+ * Required on Android. Typically an email address.
26
34
  *
35
+ * @example plugin@example.com
27
36
  * @platform Android
28
37
  * @since 7.1.0
29
38
  */
30
39
  accountName?: string;
31
40
  /**
32
- * Only needed on Android. Typically set to an email address.
41
+ * The owner of the calendar.
42
+ * Required on Android. Typically an email address.
33
43
  *
44
+ * @example plugin@example.com
34
45
  * @platform Android
35
46
  * @since 7.1.0
36
47
  */
@@ -1 +1 @@
1
- {"version":3,"file":"create-calendar-options.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/create-calendar-options.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * @since 5.2.0\n */\nexport interface CreateCalendarOptions {\n /**\n * @platform Android, iOS\n * @since 5.2.0\n */\n title: string;\n /**\n * The color of the calendar.\n * Should be provided on Android.\n *\n * @platform Android, iOS\n * @example #0000FF\n * @since 5.2.0\n */\n color?: string;\n /**\n * @platform iOS\n * @since 5.2.0\n */\n sourceId?: string;\n /**\n * Only needed on Android. Typically set to an email address.\n *\n * @platform Android\n * @since 7.1.0\n */\n accountName?: string;\n /**\n * Only needed on Android. Typically set to an email address.\n *\n * @platform Android\n * @since 7.1.0\n */\n ownerAccount?: string;\n}\n"]}
1
+ {"version":3,"file":"create-calendar-options.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/create-calendar-options.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * @since 5.2.0\n */\nexport interface CreateCalendarOptions {\n /**\n * @platform Android, iOS\n * @since 5.2.0\n */\n title: string;\n /**\n * The color of the calendar as `#RRGGBB` or `#RRGGBBAA`.\n *\n * When omitted, Android and iOS use `#007AFF` (light-mode iOS system blue).\n *\n * @platform Android, iOS\n * @example #007AFF\n * @default #007AFF\n * @since 5.2.0\n */\n color?: string;\n /**\n * The EventKit source (account) where the calendar should be created.\n *\n * If provided, it must match an existing source from `fetchAllCalendarSources()`.\n * If omitted, iCloud is used when available, otherwise the local source.\n *\n * @platform iOS\n * @since 5.2.0\n */\n sourceId?: string;\n /**\n * The account under which the calendar is registered.\n * Required on Android. Typically an email address.\n *\n * @example plugin@example.com\n * @platform Android\n * @since 7.1.0\n */\n accountName?: string;\n /**\n * The owner of the calendar.\n * Required on Android. Typically an email address.\n *\n * @example plugin@example.com\n * @platform Android\n * @since 7.1.0\n */\n ownerAccount?: string;\n}\n"]}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @since 8.4.0
3
+ */
4
+ export interface CreateCalendarResult {
5
+ /**
6
+ * Identifier of the newly created calendar.
7
+ *
8
+ * @platform Android, iOS
9
+ * @since 8.4.0
10
+ */
11
+ id: string;
12
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=create-calendar-result.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-calendar-result.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/create-calendar-result.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * @since 8.4.0\n */\nexport interface CreateCalendarResult {\n /**\n * Identifier of the newly created calendar.\n *\n * @platform Android, iOS\n * @since 8.4.0\n */\n id: string;\n}\n"]}
@@ -3,6 +3,7 @@
3
3
  */
4
4
  export interface DeleteCalendarOptions {
5
5
  /**
6
+ * @platform Android, iOS
6
7
  * @since 7.1.0
7
8
  */
8
9
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"delete-calendar-options.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/delete-calendar-options.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * @since 7.1.0\n */\nexport interface DeleteCalendarOptions {\n /**\n * @since 7.1.0\n */\n id: string;\n}\n"]}
1
+ {"version":3,"file":"delete-calendar-options.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/delete-calendar-options.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * @since 7.1.0\n */\nexport interface DeleteCalendarOptions {\n /**\n * @platform Android, iOS\n * @since 7.1.0\n */\n id: string;\n}\n"]}
@@ -0,0 +1,13 @@
1
+ import type { CalendarSource } from './calendar-source';
2
+ /**
3
+ * @since 8.4.0
4
+ */
5
+ export interface FetchAllCalendarSourcesResult {
6
+ /**
7
+ * All calendar sources (accounts) known to EventKit.
8
+ *
9
+ * @platform iOS
10
+ * @since 8.4.0
11
+ */
12
+ result: CalendarSource[];
13
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=fetch-all-calendar-sources-result.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch-all-calendar-sources-result.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/fetch-all-calendar-sources-result.ts"],"names":[],"mappings":"","sourcesContent":["import type { CalendarSource } from './calendar-source';\n\n/**\n * @since 8.4.0\n */\nexport interface FetchAllCalendarSourcesResult {\n /**\n * All calendar sources (accounts) known to EventKit.\n *\n * @platform iOS\n * @since 8.4.0\n */\n result: CalendarSource[];\n}\n"]}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @since 8.4.0
3
+ */
4
+ export interface GetDefaultCalendarOptions {
5
+ /**
6
+ * When there is no system default calendar, use the first available calendar.
7
+ *
8
+ * @default false
9
+ * @platform Android, iOS
10
+ * @since 8.4.0
11
+ */
12
+ useFallbackCalendar?: boolean;
13
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=get-default-calendar-options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-default-calendar-options.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/get-default-calendar-options.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * @since 8.4.0\n */\nexport interface GetDefaultCalendarOptions {\n /**\n * When there is no system default calendar, use the first available calendar.\n *\n * @default false\n * @platform Android, iOS\n * @since 8.4.0\n */\n useFallbackCalendar?: boolean;\n}\n"]}
@@ -0,0 +1,13 @@
1
+ import type { Calendar } from './calendar';
2
+ /**
3
+ * @since 8.4.0
4
+ */
5
+ export interface ListCalendarsResult {
6
+ /**
7
+ * All available calendars.
8
+ *
9
+ * @platform Android, iOS
10
+ * @since 8.4.0
11
+ */
12
+ result: Calendar[];
13
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=list-calendars-result.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-calendars-result.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/list-calendars-result.ts"],"names":[],"mappings":"","sourcesContent":["import type { Calendar } from './calendar';\n\n/**\n * @since 8.4.0\n */\nexport interface ListCalendarsResult {\n /**\n * All available calendars.\n *\n * @platform Android, iOS\n * @since 8.4.0\n */\n result: Calendar[];\n}\n"]}
@@ -3,14 +3,19 @@
3
3
  */
4
4
  export interface ListEventsInRangeOptions {
5
5
  /**
6
- * The timestamp in milliseconds.
6
+ * The start of the range, in milliseconds since the epoch.
7
+ * Events still in progress at this time are included.
7
8
  *
9
+ * @example 1719792000000
8
10
  * @since 7.1.0
9
11
  */
10
12
  from: number;
11
13
  /**
12
- * The timestamp in milliseconds.
14
+ * The end of the range, in milliseconds since the epoch.
15
+ * Events that begin at or after this time are typically excluded; prefer the
16
+ * next day's start when querying a single calendar day.
13
17
  *
18
+ * @example 1719878400000
14
19
  * @since 7.1.0
15
20
  */
16
21
  to: number;
@@ -1 +1 @@
1
- {"version":3,"file":"list-events-in-range-options.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/list-events-in-range-options.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * @since 7.1.0\n */\nexport interface ListEventsInRangeOptions {\n /**\n * The timestamp in milliseconds.\n *\n * @since 7.1.0\n */\n from: number;\n /**\n * The timestamp in milliseconds.\n *\n * @since 7.1.0\n */\n to: number;\n}\n"]}
1
+ {"version":3,"file":"list-events-in-range-options.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/list-events-in-range-options.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * @since 7.1.0\n */\nexport interface ListEventsInRangeOptions {\n /**\n * The start of the range, in milliseconds since the epoch.\n * Events still in progress at this time are included.\n *\n * @example 1719792000000\n * @since 7.1.0\n */\n from: number;\n /**\n * The end of the range, in milliseconds since the epoch.\n * Events that begin at or after this time are typically excluded; prefer the\n * next day's start when querying a single calendar day.\n *\n * @example 1719878400000\n * @since 7.1.0\n */\n to: number;\n}\n"]}
@@ -8,13 +8,20 @@ export interface ModifyCalendarOptions {
8
8
  */
9
9
  id: string;
10
10
  /**
11
+ * Display title of the calendar.
12
+ *
13
+ * On Android this updates both `CALENDAR_DISPLAY_NAME` (`title`) and
14
+ * `Calendars.NAME` (`internalTitle`).
15
+ *
11
16
  * @platform Android, iOS
12
17
  * @since 7.2.0
13
18
  */
14
19
  title?: string;
15
20
  /**
21
+ * The color of the calendar as `#RRGGBB` or `#RRGGBBAA`.
22
+ *
16
23
  * @platform Android, iOS
17
- * @example #0000FF
24
+ * @example #007AFF
18
25
  * @since 7.2.0
19
26
  */
20
27
  color?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"modify-calendar-options.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/modify-calendar-options.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * @since 7.2.0\n */\nexport interface ModifyCalendarOptions {\n /**\n * @platform Android, iOS\n * @since 7.2.0\n */\n id: string;\n /**\n * @platform Android, iOS\n * @since 7.2.0\n */\n title?: string;\n /**\n * @platform Android, iOS\n * @example #0000FF\n * @since 7.2.0\n */\n color?: string;\n}\n"]}
1
+ {"version":3,"file":"modify-calendar-options.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/modify-calendar-options.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * @since 7.2.0\n */\nexport interface ModifyCalendarOptions {\n /**\n * @platform Android, iOS\n * @since 7.2.0\n */\n id: string;\n /**\n * Display title of the calendar.\n *\n * On Android this updates both `CALENDAR_DISPLAY_NAME` (`title`) and\n * `Calendars.NAME` (`internalTitle`).\n *\n * @platform Android, iOS\n * @since 7.2.0\n */\n title?: string;\n /**\n * The color of the calendar as `#RRGGBB` or `#RRGGBBAA`.\n *\n * @platform Android, iOS\n * @example #007AFF\n * @since 7.2.0\n */\n color?: string;\n}\n"]}
@@ -3,8 +3,12 @@
3
3
  */
4
4
  export interface OpenCalendarOptions {
5
5
  /**
6
+ * The date to open the calendar at, in milliseconds since the epoch.
7
+ *
8
+ * @example Date.now()
6
9
  * @default Date.now()
10
+ * @platform Android, iOS
7
11
  * @since 7.1.0
8
12
  */
9
- date: number;
13
+ date?: number;
10
14
  }
@@ -1 +1 @@
1
- {"version":3,"file":"open-calendar-options.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/open-calendar-options.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * @since 7.1.0\n */\nexport interface OpenCalendarOptions {\n /**\n * @default Date.now()\n * @since 7.1.0\n */\n date: number;\n}\n"]}
1
+ {"version":3,"file":"open-calendar-options.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/open-calendar-options.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * @since 7.1.0\n */\nexport interface OpenCalendarOptions {\n /**\n * The date to open the calendar at, in milliseconds since the epoch.\n *\n * @example Date.now()\n * @default Date.now()\n * @platform Android, iOS\n * @since 7.1.0\n */\n date?: number;\n}\n"]}
@@ -0,0 +1,16 @@
1
+ import type { CalendarPermissionScope } from '../enums/calendar-permission-scope';
2
+ /**
3
+ * Options for {@link CalendarAccess#requestPermission}.
4
+ *
5
+ * @since 8.3.1
6
+ */
7
+ export interface RequestPermissionOptions {
8
+ /**
9
+ * The permission scope to request.
10
+ *
11
+ * @example CalendarPermissionScope.READ_CALENDAR
12
+ * @platform Android, iOS
13
+ * @since 8.3.1
14
+ */
15
+ scope: CalendarPermissionScope;
16
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=request-permission-options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request-permission-options.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/request-permission-options.ts"],"names":[],"mappings":"","sourcesContent":["import type { CalendarPermissionScope } from '../enums/calendar-permission-scope';\n\n/**\n * Options for {@link CalendarAccess#requestPermission}.\n *\n * @since 8.3.1\n */\nexport interface RequestPermissionOptions {\n /**\n * The permission scope to request.\n *\n * @example CalendarPermissionScope.READ_CALENDAR\n * @platform Android, iOS\n * @since 8.3.1\n */\n scope: CalendarPermissionScope;\n}\n"]}
@@ -0,0 +1,14 @@
1
+ import type { Calendar } from './calendar';
2
+ /**
3
+ * @since 8.4.0
4
+ */
5
+ export interface SelectCalendarsWithPromptResult {
6
+ /**
7
+ * Calendars the user confirmed in the chooser.
8
+ * Empty when the user cancels.
9
+ *
10
+ * @platform iOS
11
+ * @since 8.4.0
12
+ */
13
+ result: Calendar[];
14
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=select-calendars-with-prompt-result.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-calendars-with-prompt-result.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/select-calendars-with-prompt-result.ts"],"names":[],"mappings":"","sourcesContent":["import type { Calendar } from './calendar';\n\n/**\n * @since 8.4.0\n */\nexport interface SelectCalendarsWithPromptResult {\n /**\n * Calendars the user confirmed in the chooser.\n * Empty when the user cancels.\n *\n * @platform iOS\n * @since 8.4.0\n */\n result: Calendar[];\n}\n"]}
@@ -1,26 +1,33 @@
1
1
  import type { PermissionState } from '@capacitor/core';
2
2
  import type { CalendarPermissionScope } from '../schemas/enums/calendar-permission-scope';
3
+ import type { CheckPermissionOptions } from '../schemas/interfaces/check-permission-options';
4
+ import type { RequestPermissionOptions } from '../schemas/interfaces/request-permission-options';
3
5
  /**
4
6
  * @since 7.1.0
5
7
  */
6
8
  export interface CalendarAccess {
7
9
  /**
8
10
  * Retrieves the current permission state for a given scope.
11
+ * On Android, `readReminders` and `writeReminders` resolve to `"prompt"`.
9
12
  *
10
13
  * @example
11
14
  * CapacitorCalendar.checkPermission({ scope: CalendarPermissionScope.READ_CALENDAR });
12
15
  *
16
+ * @throws {Error} `Scope must be provided.` — when `scope` is missing.
17
+ * @throws {Error} `Invalid scope.` — when `scope` is invalid.
18
+ * @throws {Error} `Unhandled permission state.` — when the native status cannot be mapped.
19
+ *
13
20
  * @platform Android, iOS
14
21
  * @since 0.1.0
15
- *
16
22
  */
17
- checkPermission(options: {
18
- scope: CalendarPermissionScope;
19
- }): Promise<{
23
+ checkPermission(options: CheckPermissionOptions): Promise<{
20
24
  result: PermissionState;
21
25
  }>;
22
26
  /**
23
27
  * Retrieves the current state of all permissions.
28
+ * On Android, reminder keys always resolve to `"prompt"`.
29
+ *
30
+ * @throws {Error} `Unhandled permission state.` — when a native status cannot be mapped.
24
31
  *
25
32
  * @platform Android, iOS
26
33
  * @since 0.1.0
@@ -30,23 +37,28 @@ export interface CalendarAccess {
30
37
  }>;
31
38
  /**
32
39
  * Requests permission for a given scope.
40
+ * On Android, `readReminders` and `writeReminders` reject with `Invalid scope.`
33
41
  *
34
42
  * @example
35
- * this.requestPermission({ scope: CalendarPermissionScope.READ_CALENDAR });
43
+ * CapacitorCalendar.requestPermission({ scope: CalendarPermissionScope.READ_CALENDAR });
44
+ *
45
+ * @throws {Error} `Scope must be provided.` — when `scope` is missing.
46
+ * @throws {Error} `Invalid scope.` — when `scope` is invalid, or a reminders scope on Android.
36
47
  *
37
- * @deprecated Use {@link requestWriteOnlyCalendarAccess}, {@link requestReadOnlyCalendarAccess},
38
- * {@link requestFullCalendarAccess} or {@link requestFullRemindersAccess} instead.
48
+ * @deprecated Use {@link requestWriteOnlyCalendarAccess},
49
+ * {@link requestReadOnlyCalendarAccess} (Android),
50
+ * {@link requestFullCalendarAccess} (also for read on iOS),
51
+ * or {@link requestFullRemindersAccess} instead.
39
52
  *
40
53
  * @platform Android, iOS
41
54
  * @since 0.1.0
42
55
  */
43
- requestPermission(options: {
44
- scope: CalendarPermissionScope;
45
- }): Promise<{
56
+ requestPermission(options: RequestPermissionOptions): Promise<{
46
57
  result: PermissionState;
47
58
  }>;
48
59
  /**
49
60
  * Requests permission for all calendar and reminder permissions.
61
+ * On Android, only calendar permissions are requested; reminder keys stay `"prompt"`.
50
62
  *
51
63
  * @deprecated Use {@link requestFullCalendarAccess} or {@link requestFullRemindersAccess} instead.
52
64
  * @platform Android, iOS