@symbiote-native/calendar 0.1.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 (141) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +189 -0
  3. package/build/angular/index.d.ts +3 -0
  4. package/build/angular/index.js +3 -0
  5. package/build/angular/services/calendar-permissions.service/index.d.ts +5 -0
  6. package/build/angular/services/calendar-permissions.service/index.js +60 -0
  7. package/build/angular/services/reminders-permissions.service/index.d.ts +5 -0
  8. package/build/angular/services/reminders-permissions.service/index.js +60 -0
  9. package/build/core/attendee.d.ts +9 -0
  10. package/build/core/attendee.js +28 -0
  11. package/build/core/calendar-permission-api.d.ts +9 -0
  12. package/build/core/calendar-permission-api.js +9 -0
  13. package/build/core/calendar.d.ts +34 -0
  14. package/build/core/calendar.js +118 -0
  15. package/build/core/enums.d.ts +141 -0
  16. package/build/core/enums.js +157 -0
  17. package/build/core/event.d.ts +14 -0
  18. package/build/core/event.js +40 -0
  19. package/build/core/index.d.ts +6 -0
  20. package/build/core/index.js +6 -0
  21. package/build/core/native-module.d.ts +154 -0
  22. package/build/core/native-module.js +3 -0
  23. package/build/core/reminder.d.ts +10 -0
  24. package/build/core/reminder.js +34 -0
  25. package/build/core/types.d.ts +184 -0
  26. package/build/core/types.js +1 -0
  27. package/build/core/utils.d.ts +7 -0
  28. package/build/core/utils.js +29 -0
  29. package/build/legacy/calendar.d.ts +23 -0
  30. package/build/legacy/calendar.js +261 -0
  31. package/build/legacy/enums.d.ts +1 -0
  32. package/build/legacy/enums.js +2 -0
  33. package/build/legacy/index.d.ts +5 -0
  34. package/build/legacy/index.js +5 -0
  35. package/build/legacy/native-module.d.ts +39 -0
  36. package/build/legacy/native-module.js +3 -0
  37. package/build/legacy/permissions.d.ts +9 -0
  38. package/build/legacy/permissions.js +33 -0
  39. package/build/legacy/reminders.d.ts +6 -0
  40. package/build/legacy/reminders.js +56 -0
  41. package/build/legacy/types.d.ts +147 -0
  42. package/build/legacy/types.js +1 -0
  43. package/build/react/index.d.ts +3 -0
  44. package/build/react/index.js +3 -0
  45. package/build/react/use-calendar-permissions.d.ts +10 -0
  46. package/build/react/use-calendar-permissions.js +7 -0
  47. package/build/react/use-reminders-permissions.d.ts +8 -0
  48. package/build/react/use-reminders-permissions.js +10 -0
  49. package/build/solid/index.d.ts +3 -0
  50. package/build/solid/index.js +3 -0
  51. package/build/solid/use-calendar-permissions.d.ts +11 -0
  52. package/build/solid/use-calendar-permissions.js +7 -0
  53. package/build/solid/use-reminders-permissions.d.ts +9 -0
  54. package/build/solid/use-reminders-permissions.js +10 -0
  55. package/build/svelte/index.d.ts +3 -0
  56. package/build/svelte/index.js +3 -0
  57. package/build/svelte/use-calendar-permissions.svelte.d.ts +10 -0
  58. package/build/svelte/use-calendar-permissions.svelte.js +7 -0
  59. package/build/svelte/use-reminders-permissions.svelte.d.ts +8 -0
  60. package/build/svelte/use-reminders-permissions.svelte.js +10 -0
  61. package/build/vue/index.d.ts +3 -0
  62. package/build/vue/index.js +3 -0
  63. package/build/vue/use-calendar-permissions.d.ts +11 -0
  64. package/build/vue/use-calendar-permissions.js +7 -0
  65. package/build/vue/use-reminders-permissions.d.ts +9 -0
  66. package/build/vue/use-reminders-permissions.js +10 -0
  67. package/build-ngc/angular/index.d.ts +3 -0
  68. package/build-ngc/angular/index.js +4 -0
  69. package/build-ngc/angular/index.js.map +1 -0
  70. package/build-ngc/angular/services/calendar-permissions.service/index.d.ts +8 -0
  71. package/build-ngc/angular/services/calendar-permissions.service/index.js +17 -0
  72. package/build-ngc/angular/services/calendar-permissions.service/index.js.map +1 -0
  73. package/build-ngc/angular/services/reminders-permissions.service/index.d.ts +8 -0
  74. package/build-ngc/angular/services/reminders-permissions.service/index.js +17 -0
  75. package/build-ngc/angular/services/reminders-permissions.service/index.js.map +1 -0
  76. package/build-ngc/core/attendee.d.ts +9 -0
  77. package/build-ngc/core/attendee.js +29 -0
  78. package/build-ngc/core/attendee.js.map +1 -0
  79. package/build-ngc/core/calendar-permission-api.d.ts +9 -0
  80. package/build-ngc/core/calendar-permission-api.js +10 -0
  81. package/build-ngc/core/calendar-permission-api.js.map +1 -0
  82. package/build-ngc/core/calendar.d.ts +34 -0
  83. package/build-ngc/core/calendar.js +119 -0
  84. package/build-ngc/core/calendar.js.map +1 -0
  85. package/build-ngc/core/enums.d.ts +141 -0
  86. package/build-ngc/core/enums.js +158 -0
  87. package/build-ngc/core/enums.js.map +1 -0
  88. package/build-ngc/core/event.d.ts +14 -0
  89. package/build-ngc/core/event.js +41 -0
  90. package/build-ngc/core/event.js.map +1 -0
  91. package/build-ngc/core/index.d.ts +6 -0
  92. package/build-ngc/core/index.js +7 -0
  93. package/build-ngc/core/index.js.map +1 -0
  94. package/build-ngc/core/native-module.d.ts +154 -0
  95. package/build-ngc/core/native-module.js +4 -0
  96. package/build-ngc/core/native-module.js.map +1 -0
  97. package/build-ngc/core/reminder.d.ts +10 -0
  98. package/build-ngc/core/reminder.js +35 -0
  99. package/build-ngc/core/reminder.js.map +1 -0
  100. package/build-ngc/core/types.d.ts +184 -0
  101. package/build-ngc/core/types.js +2 -0
  102. package/build-ngc/core/types.js.map +1 -0
  103. package/build-ngc/core/utils.d.ts +7 -0
  104. package/build-ngc/core/utils.js +30 -0
  105. package/build-ngc/core/utils.js.map +1 -0
  106. package/native-link.json +29 -0
  107. package/package.json +155 -0
  108. package/src/angular/index.ts +3 -0
  109. package/src/angular/services/calendar-permissions.service/index.ts +19 -0
  110. package/src/angular/services/reminders-permissions.service/index.ts +16 -0
  111. package/src/core/attendee.ts +43 -0
  112. package/src/core/calendar-permission-api.ts +16 -0
  113. package/src/core/calendar.ts +197 -0
  114. package/src/core/enums.ts +156 -0
  115. package/src/core/event.ts +70 -0
  116. package/src/core/index.ts +18 -0
  117. package/src/core/native-module.ts +212 -0
  118. package/src/core/reminder.ts +52 -0
  119. package/src/core/types.ts +209 -0
  120. package/src/core/utils.ts +39 -0
  121. package/src/legacy/calendar.ts +401 -0
  122. package/src/legacy/enums.ts +2 -0
  123. package/src/legacy/index.ts +5 -0
  124. package/src/legacy/native-module.ts +77 -0
  125. package/src/legacy/permissions.ts +47 -0
  126. package/src/legacy/reminders.ts +98 -0
  127. package/src/legacy/types.ts +183 -0
  128. package/src/react/index.ts +3 -0
  129. package/src/react/use-calendar-permissions.ts +25 -0
  130. package/src/react/use-reminders-permissions.ts +25 -0
  131. package/src/solid/index.ts +3 -0
  132. package/src/solid/use-calendar-permissions.ts +26 -0
  133. package/src/solid/use-reminders-permissions.ts +26 -0
  134. package/src/svelte/index.ts +3 -0
  135. package/src/svelte/svelte-ambient.d.ts +3 -0
  136. package/src/svelte/svelte-compile.test-helper.ts +7 -0
  137. package/src/svelte/use-calendar-permissions.svelte.ts +25 -0
  138. package/src/svelte/use-reminders-permissions.svelte.ts +25 -0
  139. package/src/vue/index.ts +3 -0
  140. package/src/vue/use-calendar-permissions.ts +26 -0
  141. package/src/vue/use-reminders-permissions.ts +26 -0
@@ -0,0 +1,141 @@
1
+ export declare enum EntityTypes {
2
+ EVENT = "event",
3
+ REMINDER = "reminder"
4
+ }
5
+ export declare enum Frequency {
6
+ DAILY = "daily",
7
+ WEEKLY = "weekly",
8
+ MONTHLY = "monthly",
9
+ YEARLY = "yearly"
10
+ }
11
+ /** `NOT_SUPPORTED`/`UNAVAILABLE` are iOS-only. */
12
+ export declare enum Availability {
13
+ NOT_SUPPORTED = "notSupported",
14
+ BUSY = "busy",
15
+ FREE = "free",
16
+ TENTATIVE = "tentative",
17
+ UNAVAILABLE = "unavailable"
18
+ }
19
+ /** @platform ios */
20
+ export declare enum CalendarType {
21
+ LOCAL = "local",
22
+ CALDAV = "caldav",
23
+ EXCHANGE = "exchange",
24
+ SUBSCRIBED = "subscribed",
25
+ BIRTHDAYS = "birthdays",
26
+ UNKNOWN = "unknown"
27
+ }
28
+ export declare enum EventStatus {
29
+ NONE = "none",
30
+ CONFIRMED = "confirmed",
31
+ TENTATIVE = "tentative",
32
+ CANCELED = "canceled"
33
+ }
34
+ /** @platform ios */
35
+ export declare enum SourceType {
36
+ LOCAL = "local",
37
+ EXCHANGE = "exchange",
38
+ CALDAV = "caldav",
39
+ MOBILEME = "mobileme",
40
+ SUBSCRIBED = "subscribed",
41
+ BIRTHDAYS = "birthdays"
42
+ }
43
+ /** iOS: UNKNOWN/REQUIRED/OPTIONAL/CHAIR/NON_PARTICIPANT. Android: the rest. */
44
+ export declare enum AttendeeRole {
45
+ UNKNOWN = "unknown",
46
+ REQUIRED = "required",
47
+ OPTIONAL = "optional",
48
+ CHAIR = "chair",
49
+ NON_PARTICIPANT = "nonParticipant",
50
+ ATTENDEE = "attendee",
51
+ ORGANIZER = "organizer",
52
+ PERFORMER = "performer",
53
+ SPEAKER = "speaker",
54
+ NONE = "none"
55
+ }
56
+ /** iOS: UNKNOWN/PENDING/DELEGATED/COMPLETED/IN_PROCESS. Android: INVITED/NONE. */
57
+ export declare enum AttendeeStatus {
58
+ UNKNOWN = "unknown",
59
+ PENDING = "pending",
60
+ ACCEPTED = "accepted",
61
+ DECLINED = "declined",
62
+ TENTATIVE = "tentative",
63
+ DELEGATED = "delegated",
64
+ COMPLETED = "completed",
65
+ IN_PROCESS = "inProcess",
66
+ INVITED = "invited",
67
+ NONE = "none"
68
+ }
69
+ /** iOS: UNKNOWN/PERSON/ROOM/GROUP. Android: OPTIONAL/REQUIRED/NONE. Both: RESOURCE. */
70
+ export declare enum AttendeeType {
71
+ UNKNOWN = "unknown",
72
+ PERSON = "person",
73
+ ROOM = "room",
74
+ GROUP = "group",
75
+ RESOURCE = "resource",
76
+ OPTIONAL = "optional",
77
+ REQUIRED = "required",
78
+ NONE = "none"
79
+ }
80
+ /** @platform android */
81
+ export declare enum AlarmMethod {
82
+ ALARM = "alarm",
83
+ ALERT = "alert",
84
+ EMAIL = "email",
85
+ SMS = "sms",
86
+ DEFAULT = "default"
87
+ }
88
+ /** @platform android */
89
+ export declare enum EventAccessLevel {
90
+ CONFIDENTIAL = "confidential",
91
+ PRIVATE = "private",
92
+ PUBLIC = "public",
93
+ DEFAULT = "default"
94
+ }
95
+ /** @platform android */
96
+ export declare enum CalendarAccessLevel {
97
+ CONTRIBUTOR = "contributor",
98
+ EDITOR = "editor",
99
+ FREEBUSY = "freebusy",
100
+ OVERRIDE = "override",
101
+ OWNER = "owner",
102
+ READ = "read",
103
+ RESPOND = "respond",
104
+ ROOT = "root",
105
+ NONE = "none"
106
+ }
107
+ /** @platform ios */
108
+ export declare enum ReminderStatus {
109
+ COMPLETED = "completed",
110
+ INCOMPLETE = "incomplete"
111
+ }
112
+ export declare enum DayOfTheWeek {
113
+ Sunday = 1,
114
+ Monday = 2,
115
+ Tuesday = 3,
116
+ Wednesday = 4,
117
+ Thursday = 5,
118
+ Friday = 6,
119
+ Saturday = 7
120
+ }
121
+ export declare enum MonthOfTheYear {
122
+ January = 1,
123
+ February = 2,
124
+ March = 3,
125
+ April = 4,
126
+ May = 5,
127
+ June = 6,
128
+ July = 7,
129
+ August = 8,
130
+ September = 9,
131
+ October = 10,
132
+ November = 11,
133
+ December = 12
134
+ }
135
+ export declare enum CalendarDialogResultActions {
136
+ done = "done",
137
+ canceled = "canceled",
138
+ deleted = "deleted",
139
+ responded = "responded",
140
+ saved = "saved"
141
+ }
@@ -0,0 +1,157 @@
1
+ export var EntityTypes;
2
+ (function (EntityTypes) {
3
+ EntityTypes["EVENT"] = "event";
4
+ EntityTypes["REMINDER"] = "reminder";
5
+ })(EntityTypes || (EntityTypes = {}));
6
+ export var Frequency;
7
+ (function (Frequency) {
8
+ Frequency["DAILY"] = "daily";
9
+ Frequency["WEEKLY"] = "weekly";
10
+ Frequency["MONTHLY"] = "monthly";
11
+ Frequency["YEARLY"] = "yearly";
12
+ })(Frequency || (Frequency = {}));
13
+ /** `NOT_SUPPORTED`/`UNAVAILABLE` are iOS-only. */
14
+ export var Availability;
15
+ (function (Availability) {
16
+ Availability["NOT_SUPPORTED"] = "notSupported";
17
+ Availability["BUSY"] = "busy";
18
+ Availability["FREE"] = "free";
19
+ Availability["TENTATIVE"] = "tentative";
20
+ Availability["UNAVAILABLE"] = "unavailable";
21
+ })(Availability || (Availability = {}));
22
+ /** @platform ios */
23
+ export var CalendarType;
24
+ (function (CalendarType) {
25
+ CalendarType["LOCAL"] = "local";
26
+ CalendarType["CALDAV"] = "caldav";
27
+ CalendarType["EXCHANGE"] = "exchange";
28
+ CalendarType["SUBSCRIBED"] = "subscribed";
29
+ CalendarType["BIRTHDAYS"] = "birthdays";
30
+ CalendarType["UNKNOWN"] = "unknown";
31
+ })(CalendarType || (CalendarType = {}));
32
+ export var EventStatus;
33
+ (function (EventStatus) {
34
+ EventStatus["NONE"] = "none";
35
+ EventStatus["CONFIRMED"] = "confirmed";
36
+ EventStatus["TENTATIVE"] = "tentative";
37
+ EventStatus["CANCELED"] = "canceled";
38
+ })(EventStatus || (EventStatus = {}));
39
+ /** @platform ios */
40
+ export var SourceType;
41
+ (function (SourceType) {
42
+ SourceType["LOCAL"] = "local";
43
+ SourceType["EXCHANGE"] = "exchange";
44
+ SourceType["CALDAV"] = "caldav";
45
+ SourceType["MOBILEME"] = "mobileme";
46
+ SourceType["SUBSCRIBED"] = "subscribed";
47
+ SourceType["BIRTHDAYS"] = "birthdays";
48
+ })(SourceType || (SourceType = {}));
49
+ /** iOS: UNKNOWN/REQUIRED/OPTIONAL/CHAIR/NON_PARTICIPANT. Android: the rest. */
50
+ export var AttendeeRole;
51
+ (function (AttendeeRole) {
52
+ AttendeeRole["UNKNOWN"] = "unknown";
53
+ AttendeeRole["REQUIRED"] = "required";
54
+ AttendeeRole["OPTIONAL"] = "optional";
55
+ AttendeeRole["CHAIR"] = "chair";
56
+ AttendeeRole["NON_PARTICIPANT"] = "nonParticipant";
57
+ AttendeeRole["ATTENDEE"] = "attendee";
58
+ AttendeeRole["ORGANIZER"] = "organizer";
59
+ AttendeeRole["PERFORMER"] = "performer";
60
+ AttendeeRole["SPEAKER"] = "speaker";
61
+ AttendeeRole["NONE"] = "none";
62
+ })(AttendeeRole || (AttendeeRole = {}));
63
+ /** iOS: UNKNOWN/PENDING/DELEGATED/COMPLETED/IN_PROCESS. Android: INVITED/NONE. */
64
+ export var AttendeeStatus;
65
+ (function (AttendeeStatus) {
66
+ AttendeeStatus["UNKNOWN"] = "unknown";
67
+ AttendeeStatus["PENDING"] = "pending";
68
+ AttendeeStatus["ACCEPTED"] = "accepted";
69
+ AttendeeStatus["DECLINED"] = "declined";
70
+ AttendeeStatus["TENTATIVE"] = "tentative";
71
+ AttendeeStatus["DELEGATED"] = "delegated";
72
+ AttendeeStatus["COMPLETED"] = "completed";
73
+ AttendeeStatus["IN_PROCESS"] = "inProcess";
74
+ AttendeeStatus["INVITED"] = "invited";
75
+ AttendeeStatus["NONE"] = "none";
76
+ })(AttendeeStatus || (AttendeeStatus = {}));
77
+ /** iOS: UNKNOWN/PERSON/ROOM/GROUP. Android: OPTIONAL/REQUIRED/NONE. Both: RESOURCE. */
78
+ export var AttendeeType;
79
+ (function (AttendeeType) {
80
+ AttendeeType["UNKNOWN"] = "unknown";
81
+ AttendeeType["PERSON"] = "person";
82
+ AttendeeType["ROOM"] = "room";
83
+ AttendeeType["GROUP"] = "group";
84
+ AttendeeType["RESOURCE"] = "resource";
85
+ AttendeeType["OPTIONAL"] = "optional";
86
+ AttendeeType["REQUIRED"] = "required";
87
+ AttendeeType["NONE"] = "none";
88
+ })(AttendeeType || (AttendeeType = {}));
89
+ /** @platform android */
90
+ export var AlarmMethod;
91
+ (function (AlarmMethod) {
92
+ AlarmMethod["ALARM"] = "alarm";
93
+ AlarmMethod["ALERT"] = "alert";
94
+ AlarmMethod["EMAIL"] = "email";
95
+ AlarmMethod["SMS"] = "sms";
96
+ AlarmMethod["DEFAULT"] = "default";
97
+ })(AlarmMethod || (AlarmMethod = {}));
98
+ /** @platform android */
99
+ export var EventAccessLevel;
100
+ (function (EventAccessLevel) {
101
+ EventAccessLevel["CONFIDENTIAL"] = "confidential";
102
+ EventAccessLevel["PRIVATE"] = "private";
103
+ EventAccessLevel["PUBLIC"] = "public";
104
+ EventAccessLevel["DEFAULT"] = "default";
105
+ })(EventAccessLevel || (EventAccessLevel = {}));
106
+ /** @platform android */
107
+ export var CalendarAccessLevel;
108
+ (function (CalendarAccessLevel) {
109
+ CalendarAccessLevel["CONTRIBUTOR"] = "contributor";
110
+ CalendarAccessLevel["EDITOR"] = "editor";
111
+ CalendarAccessLevel["FREEBUSY"] = "freebusy";
112
+ CalendarAccessLevel["OVERRIDE"] = "override";
113
+ CalendarAccessLevel["OWNER"] = "owner";
114
+ CalendarAccessLevel["READ"] = "read";
115
+ CalendarAccessLevel["RESPOND"] = "respond";
116
+ CalendarAccessLevel["ROOT"] = "root";
117
+ CalendarAccessLevel["NONE"] = "none";
118
+ })(CalendarAccessLevel || (CalendarAccessLevel = {}));
119
+ /** @platform ios */
120
+ export var ReminderStatus;
121
+ (function (ReminderStatus) {
122
+ ReminderStatus["COMPLETED"] = "completed";
123
+ ReminderStatus["INCOMPLETE"] = "incomplete";
124
+ })(ReminderStatus || (ReminderStatus = {}));
125
+ export var DayOfTheWeek;
126
+ (function (DayOfTheWeek) {
127
+ DayOfTheWeek[DayOfTheWeek["Sunday"] = 1] = "Sunday";
128
+ DayOfTheWeek[DayOfTheWeek["Monday"] = 2] = "Monday";
129
+ DayOfTheWeek[DayOfTheWeek["Tuesday"] = 3] = "Tuesday";
130
+ DayOfTheWeek[DayOfTheWeek["Wednesday"] = 4] = "Wednesday";
131
+ DayOfTheWeek[DayOfTheWeek["Thursday"] = 5] = "Thursday";
132
+ DayOfTheWeek[DayOfTheWeek["Friday"] = 6] = "Friday";
133
+ DayOfTheWeek[DayOfTheWeek["Saturday"] = 7] = "Saturday";
134
+ })(DayOfTheWeek || (DayOfTheWeek = {}));
135
+ export var MonthOfTheYear;
136
+ (function (MonthOfTheYear) {
137
+ MonthOfTheYear[MonthOfTheYear["January"] = 1] = "January";
138
+ MonthOfTheYear[MonthOfTheYear["February"] = 2] = "February";
139
+ MonthOfTheYear[MonthOfTheYear["March"] = 3] = "March";
140
+ MonthOfTheYear[MonthOfTheYear["April"] = 4] = "April";
141
+ MonthOfTheYear[MonthOfTheYear["May"] = 5] = "May";
142
+ MonthOfTheYear[MonthOfTheYear["June"] = 6] = "June";
143
+ MonthOfTheYear[MonthOfTheYear["July"] = 7] = "July";
144
+ MonthOfTheYear[MonthOfTheYear["August"] = 8] = "August";
145
+ MonthOfTheYear[MonthOfTheYear["September"] = 9] = "September";
146
+ MonthOfTheYear[MonthOfTheYear["October"] = 10] = "October";
147
+ MonthOfTheYear[MonthOfTheYear["November"] = 11] = "November";
148
+ MonthOfTheYear[MonthOfTheYear["December"] = 12] = "December";
149
+ })(MonthOfTheYear || (MonthOfTheYear = {}));
150
+ export var CalendarDialogResultActions;
151
+ (function (CalendarDialogResultActions) {
152
+ CalendarDialogResultActions["done"] = "done";
153
+ CalendarDialogResultActions["canceled"] = "canceled";
154
+ CalendarDialogResultActions["deleted"] = "deleted";
155
+ CalendarDialogResultActions["responded"] = "responded";
156
+ CalendarDialogResultActions["saved"] = "saved";
157
+ })(CalendarDialogResultActions || (CalendarDialogResultActions = {}));
@@ -0,0 +1,14 @@
1
+ import { expoCalendarNext } from './native-module';
2
+ import type { NativeExpoCalendarEvent } from './native-module';
3
+ import type { IAttendeeInput, IEventPatch, IRecurringEventOptions } from './types';
4
+ import { ExpoCalendarAttendee } from './attendee';
5
+ export declare class ExpoCalendarEvent extends expoCalendarNext.ExpoCalendarEvent {
6
+ getOccurrenceSync(options?: IRecurringEventOptions): ExpoCalendarEvent;
7
+ getAttendees(): Promise<ExpoCalendarAttendee[]>;
8
+ /** @platform android */
9
+ createAttendee(attendee: IAttendeeInput): Promise<ExpoCalendarAttendee>;
10
+ update(details: IEventPatch): Promise<void>;
11
+ delete(): Promise<void>;
12
+ static get(eventId: string): Promise<ExpoCalendarEvent>;
13
+ }
14
+ export declare function upgradeToExpoCalendarEvent(native: NativeExpoCalendarEvent): ExpoCalendarEvent;
@@ -0,0 +1,40 @@
1
+ import { UnavailabilityError } from 'expo-modules-core';
2
+ import { expoCalendarNext } from './native-module.js';
3
+ import { getNullableDetailsFields, stringifyDateValues } from './utils.js';
4
+ import { ExpoCalendarAttendee, upgradeToExpoCalendarAttendee, } from './attendee.js';
5
+ export class ExpoCalendarEvent extends expoCalendarNext.ExpoCalendarEvent {
6
+ getOccurrenceSync(options = {}) {
7
+ const occurrence = super.getOccurrenceSync(stringifyDateValues(options));
8
+ return upgradeToExpoCalendarEvent(occurrence);
9
+ }
10
+ async getAttendees() {
11
+ const attendees = await super.getAttendees();
12
+ return attendees.map(upgradeToExpoCalendarAttendee);
13
+ }
14
+ /** @platform android */
15
+ async createAttendee(attendee) {
16
+ if (!super.createAttendee) {
17
+ throw new UnavailabilityError('ExpoCalendarEvent', 'createAttendee');
18
+ }
19
+ return upgradeToExpoCalendarAttendee(await super.createAttendee(attendee));
20
+ }
21
+ async update(details) {
22
+ return super.update(stringifyDateValues(details), getNullableDetailsFields(details));
23
+ }
24
+ async delete() {
25
+ return super.delete();
26
+ }
27
+ static async get(eventId) {
28
+ return upgradeToExpoCalendarEvent(await expoCalendarNext.getEventById(eventId));
29
+ }
30
+ }
31
+ function isExpoCalendarEvent(value) {
32
+ return value instanceof ExpoCalendarEvent;
33
+ }
34
+ export function upgradeToExpoCalendarEvent(native) {
35
+ Object.setPrototypeOf(native, ExpoCalendarEvent.prototype);
36
+ if (!isExpoCalendarEvent(native)) {
37
+ throw new Error('unreachable - just reassigned the prototype to ExpoCalendarEvent');
38
+ }
39
+ return native;
40
+ }
@@ -0,0 +1,6 @@
1
+ export * from './enums';
2
+ export * from './types';
3
+ export { ExpoCalendarEvent } from './event';
4
+ export { ExpoCalendarAttendee } from './attendee';
5
+ export { ExpoCalendarReminder } from './reminder';
6
+ export { ExpoCalendar, getDefaultCalendarSync, getCalendars, createCalendar, presentPicker, listEvents, requestCalendarPermissions, getCalendarPermissions, requestRemindersPermissions, getRemindersPermissions, getSourcesSync, } from './calendar';
@@ -0,0 +1,6 @@
1
+ export * from './enums.js';
2
+ export * from './types.js';
3
+ export { ExpoCalendarEvent } from './event.js';
4
+ export { ExpoCalendarAttendee } from './attendee.js';
5
+ export { ExpoCalendarReminder } from './reminder.js';
6
+ export { ExpoCalendar, getDefaultCalendarSync, getCalendars, createCalendar, presentPicker, listEvents, requestCalendarPermissions, getCalendarPermissions, requestRemindersPermissions, getRemindersPermissions, getSourcesSync, } from './calendar.js';
@@ -0,0 +1,154 @@
1
+ import type { PermissionResponse } from 'expo-modules-core';
2
+ import type { IDialogEventResult, IOpenEventPresentationOptions, IPresentationOptions, IRecurringEventOptions, ISource } from './types';
3
+ export declare class NativeExpoCalendar {
4
+ readonly id: string;
5
+ readonly title: string;
6
+ /** @platform android */
7
+ readonly name?: string | null;
8
+ readonly source?: ISource;
9
+ /** @platform ios */
10
+ readonly sourceId?: string;
11
+ /** @platform ios */
12
+ readonly type?: string;
13
+ readonly color?: string;
14
+ /** @platform ios */
15
+ readonly entityType?: string;
16
+ readonly allowsModifications: boolean;
17
+ readonly allowedAvailabilities: string[];
18
+ /** @platform android */
19
+ readonly isVisible?: boolean;
20
+ /** @platform android */
21
+ readonly isSynced?: boolean;
22
+ /** @platform android */
23
+ readonly timeZone?: string;
24
+ /** @platform android */
25
+ readonly isPrimary?: boolean;
26
+ /** @platform android */
27
+ readonly allowedReminders?: string[];
28
+ /** @platform android */
29
+ readonly allowedAttendeeTypes?: string[];
30
+ /** @platform android */
31
+ readonly ownerAccount?: string;
32
+ /** @platform android */
33
+ readonly accessLevel?: string;
34
+ listEvents(startDate: string | Date, endDate: string | Date): Promise<NativeExpoCalendarEvent[]>;
35
+ /** @platform ios - typed as always-present, guarded at runtime. */
36
+ listReminders(startDate: string | Date | null, endDate: string | Date | null, status: string | null): Promise<NativeExpoCalendarReminder[]>;
37
+ createEvent(record: Record<string, unknown>): Promise<NativeExpoCalendarEvent>;
38
+ /** @platform ios - typed as always-present, guarded at runtime. */
39
+ createReminder(record: Record<string, unknown>): Promise<NativeExpoCalendarReminder>;
40
+ addEventWithForm(options?: Record<string, unknown>): Promise<IDialogEventResult>;
41
+ update(patch: Record<string, unknown>): Promise<void>;
42
+ delete(): Promise<void>;
43
+ }
44
+ export declare class NativeExpoCalendarEvent {
45
+ readonly id: string;
46
+ readonly calendarId?: string;
47
+ readonly title?: string;
48
+ readonly location?: string;
49
+ /** @platform ios */
50
+ readonly creationDate?: string;
51
+ /** @platform ios */
52
+ readonly lastModifiedDate?: string;
53
+ readonly timeZone?: string;
54
+ /** @platform android */
55
+ readonly endTimeZone?: string;
56
+ /** @platform ios */
57
+ readonly url?: string;
58
+ readonly notes?: string;
59
+ readonly alarms?: unknown[];
60
+ readonly recurrenceRule?: Record<string, unknown> | null;
61
+ readonly startDate?: string;
62
+ readonly endDate?: string;
63
+ /** @platform ios */
64
+ readonly originalStartDate?: string;
65
+ /** @platform ios */
66
+ readonly isDetached?: boolean;
67
+ readonly allDay: boolean;
68
+ readonly availability?: string;
69
+ readonly status?: string;
70
+ /** @platform ios */
71
+ readonly organizer?: Record<string, unknown>;
72
+ /** @platform android */
73
+ readonly organizerEmail?: string;
74
+ /** @platform android */
75
+ readonly accessLevel?: string;
76
+ /** @platform android */
77
+ readonly guestsCanModify?: boolean;
78
+ /** @platform android */
79
+ readonly guestsCanInviteOthers?: boolean;
80
+ /** @platform android */
81
+ readonly guestsCanSeeGuests?: boolean;
82
+ /** @platform android */
83
+ readonly originalId?: string;
84
+ /** @platform android */
85
+ readonly instanceId?: string;
86
+ /** @platform android - typed as always-present, guarded at runtime. */
87
+ createAttendee(record: Record<string, unknown>): Promise<NativeExpoCalendarAttendee>;
88
+ openInCalendar(options?: IOpenEventPresentationOptions | null): Promise<IDialogEventResult>;
89
+ editInCalendar(options?: IPresentationOptions | null): Promise<IDialogEventResult>;
90
+ getOccurrenceSync(options?: IRecurringEventOptions): NativeExpoCalendarEvent;
91
+ getAttendees(): Promise<NativeExpoCalendarAttendee[]>;
92
+ update(patch: Record<string, unknown>, nullableFields: string[]): Promise<void>;
93
+ delete(): Promise<void>;
94
+ }
95
+ /** @platform android - iOS registers this class with no properties or methods. */
96
+ export declare class NativeExpoCalendarAttendee {
97
+ constructor(record: Record<string, unknown>);
98
+ readonly id?: string;
99
+ readonly name?: string;
100
+ readonly role?: string;
101
+ readonly status?: string;
102
+ readonly type?: string;
103
+ readonly email?: string;
104
+ update(patch: Record<string, unknown>, nullableFields: string[]): Promise<void>;
105
+ delete(): Promise<void>;
106
+ }
107
+ /** @platform ios - Android registers this class with no properties or methods. */
108
+ export declare class NativeExpoCalendarReminder {
109
+ constructor(id: string);
110
+ readonly id?: string;
111
+ readonly calendarId?: string;
112
+ readonly title?: string;
113
+ readonly location?: string;
114
+ readonly creationDate?: string;
115
+ readonly lastModifiedDate?: string;
116
+ readonly timeZone?: string;
117
+ readonly url?: string;
118
+ readonly notes?: string;
119
+ readonly alarms?: unknown[];
120
+ readonly recurrenceRule?: Record<string, unknown> | null;
121
+ readonly allDay: boolean;
122
+ readonly startDate?: string;
123
+ readonly dueDate?: string;
124
+ readonly completed: boolean;
125
+ readonly completionDate?: string;
126
+ update(patch: Record<string, unknown>, nullableFields: string[]): Promise<void>;
127
+ delete(): Promise<void>;
128
+ }
129
+ export type INativeCalendarNextModule = {
130
+ ExpoCalendar: typeof NativeExpoCalendar;
131
+ ExpoCalendarEvent: typeof NativeExpoCalendarEvent;
132
+ ExpoCalendarAttendee: typeof NativeExpoCalendarAttendee;
133
+ ExpoCalendarReminder: typeof NativeExpoCalendarReminder;
134
+ getCalendars(type: string | null): Promise<NativeExpoCalendar[]>;
135
+ getCalendarById(id: string): Promise<NativeExpoCalendar>;
136
+ createCalendar(record: Record<string, unknown>): Promise<NativeExpoCalendar>;
137
+ listEvents(calendarIds: string[], startDate: string, endDate: string): Promise<NativeExpoCalendarEvent[]>;
138
+ getEventById(id: string): Promise<NativeExpoCalendarEvent>;
139
+ getCalendarPermissions(writeOnly?: boolean): Promise<PermissionResponse>;
140
+ requestCalendarPermissions(writeOnly?: boolean): Promise<PermissionResponse>;
141
+ /** @platform ios */
142
+ getDefaultCalendarSync?(): NativeExpoCalendar;
143
+ /** @platform ios */
144
+ presentPicker?(): Promise<NativeExpoCalendar | null>;
145
+ /** @platform ios */
146
+ getReminderById?(id: string): Promise<NativeExpoCalendarReminder>;
147
+ /** @platform ios */
148
+ getRemindersPermissions?(): Promise<PermissionResponse>;
149
+ /** @platform ios */
150
+ requestRemindersPermissions?(): Promise<PermissionResponse>;
151
+ /** @platform ios */
152
+ getSourcesSync?(): ISource[];
153
+ };
154
+ export declare const expoCalendarNext: INativeCalendarNextModule;
@@ -0,0 +1,3 @@
1
+ import { requireNativeModule } from 'expo-modules-core';
2
+ const EXPO_CALENDAR_NEXT_MODULE_NAME = 'CalendarNext';
3
+ export const expoCalendarNext = requireNativeModule(EXPO_CALENDAR_NEXT_MODULE_NAME);
@@ -0,0 +1,10 @@
1
+ import { expoCalendarNext } from './native-module';
2
+ import type { NativeExpoCalendarReminder } from './native-module';
3
+ import type { IReminderPatch } from './types';
4
+ /** @platform ios - Android registers this class with no properties or methods. */
5
+ export declare class ExpoCalendarReminder extends expoCalendarNext.ExpoCalendarReminder {
6
+ update(details: IReminderPatch): Promise<void>;
7
+ delete(): Promise<void>;
8
+ static get(reminderId: string): Promise<ExpoCalendarReminder>;
9
+ }
10
+ export declare function upgradeToExpoCalendarReminder(native: NativeExpoCalendarReminder): ExpoCalendarReminder;
@@ -0,0 +1,34 @@
1
+ import { Platform, UnavailabilityError } from 'expo-modules-core';
2
+ import { expoCalendarNext } from './native-module.js';
3
+ import { getNullableDetailsFields, stringifyDateValues } from './utils.js';
4
+ /** @platform ios - Android registers this class with no properties or methods. */
5
+ export class ExpoCalendarReminder extends expoCalendarNext.ExpoCalendarReminder {
6
+ async update(details) {
7
+ if (Platform.OS !== 'ios') {
8
+ throw new UnavailabilityError('ExpoCalendarReminder', 'update');
9
+ }
10
+ return super.update(stringifyDateValues(details), getNullableDetailsFields(details));
11
+ }
12
+ async delete() {
13
+ if (Platform.OS !== 'ios') {
14
+ throw new UnavailabilityError('ExpoCalendarReminder', 'delete');
15
+ }
16
+ return super.delete();
17
+ }
18
+ static async get(reminderId) {
19
+ if (Platform.OS !== 'ios' || !expoCalendarNext.getReminderById) {
20
+ throw new UnavailabilityError('ExpoCalendarReminder', 'get');
21
+ }
22
+ return upgradeToExpoCalendarReminder(await expoCalendarNext.getReminderById(reminderId));
23
+ }
24
+ }
25
+ function isExpoCalendarReminder(value) {
26
+ return value instanceof ExpoCalendarReminder;
27
+ }
28
+ export function upgradeToExpoCalendarReminder(native) {
29
+ Object.setPrototypeOf(native, ExpoCalendarReminder.prototype);
30
+ if (!isExpoCalendarReminder(native)) {
31
+ throw new Error('unreachable - just reassigned the prototype to ExpoCalendarReminder');
32
+ }
33
+ return native;
34
+ }