Repository navigation
Expand file tree
/
Copy pathEventKit.d.ts
More file actions
612 lines (400 loc) · 16.1 KB
/
Copy pathEventKit.d.ts
File metadata and controls
612 lines (400 loc) · 16.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
/// <reference types="@nativescript/objc-node-api" />
/// <reference path="./Runtime.d.ts" />
declare const EKErrorDomain: string;
declare const EKEventStoreChangedNotification: string;
declare const EKEventStatus: {
None: 0,
Confirmed: 1,
Tentative: 2,
Canceled: 3,
};
declare const EKSpan: {
ThisEvent: 0,
FutureEvents: 1,
};
declare const EKReminderPriority: {
None: 0,
High: 1,
Medium: 5,
Low: 9,
};
declare const EKAlarmProximity: {
None: 0,
Enter: 1,
Leave: 2,
};
declare const EKEntityMask: {
Event: 1,
Reminder: 2,
};
declare const EKSourceType: {
Local: 0,
Exchange: 1,
CalDAV: 2,
MobileMe: 3,
Subscribed: 4,
Birthdays: 5,
};
declare const EKCalendarEventAvailabilityMask: {
None: 0,
Busy: 1,
Free: 2,
Tentative: 4,
Unavailable: 8,
};
declare const EKCalendarType: {
Local: 0,
CalDAV: 1,
Exchange: 2,
Subscription: 3,
Birthday: 4,
};
declare const EKParticipantScheduleStatus: {
None: 0,
Pending: 1,
Sent: 2,
Delivered: 3,
RecipientNotRecognized: 4,
NoPrivileges: 5,
DeliveryFailed: 6,
CannotDeliver: 7,
RecipientNotAllowed: 8,
};
declare const EKParticipantRole: {
Unknown: 0,
Required: 1,
Optional: 2,
Chair: 3,
NonParticipant: 4,
};
declare const EKAuthorizationStatus: {
NotDetermined: 0,
Restricted: 1,
Denied: 2,
FullAccess: 3,
WriteOnly: 4,
Authorized: 3,
};
declare const EKWeekday: {
WeekdaySunday: 1,
WeekdayMonday: 2,
WeekdayTuesday: 3,
WeekdayWednesday: 4,
WeekdayThursday: 5,
WeekdayFriday: 6,
WeekdaySaturday: 7,
Sunday: 1,
Monday: 2,
Tuesday: 3,
Wednesday: 4,
Thursday: 5,
Friday: 6,
Saturday: 7,
};
declare const EKEntityType: {
Event: 0,
Reminder: 1,
};
declare const EKParticipantType: {
Unknown: 0,
Person: 1,
Room: 2,
Resource: 3,
Group: 4,
};
declare const EKAlarmType: {
Display: 0,
Audio: 1,
Procedure: 2,
Email: 3,
};
declare const EKRecurrenceFrequency: {
Daily: 0,
Weekly: 1,
Monthly: 2,
Yearly: 3,
};
declare const EKParticipantStatus: {
Unknown: 0,
Pending: 1,
Accepted: 2,
Declined: 3,
Tentative: 4,
Delegated: 5,
Completed: 6,
InProcess: 7,
};
declare const EKErrorCode: {
EventNotMutable: 0,
NoCalendar: 1,
NoStartDate: 2,
NoEndDate: 3,
DatesInverted: 4,
InternalFailure: 5,
CalendarReadOnly: 6,
DurationGreaterThanRecurrence: 7,
AlarmGreaterThanRecurrence: 8,
StartDateTooFarInFuture: 9,
StartDateCollidesWithOtherOccurrence: 10,
ObjectBelongsToDifferentStore: 11,
InvitesCannotBeMoved: 12,
InvalidSpan: 13,
CalendarHasNoSource: 14,
CalendarSourceCannotBeModified: 15,
CalendarIsImmutable: 16,
SourceDoesNotAllowCalendarAddDelete: 17,
RecurringReminderRequiresDueDate: 18,
StructuredLocationsNotSupported: 19,
ReminderLocationsNotSupported: 20,
AlarmProximityNotSupported: 21,
CalendarDoesNotAllowEvents: 22,
CalendarDoesNotAllowReminders: 23,
SourceDoesNotAllowReminders: 24,
SourceDoesNotAllowEvents: 25,
PriorityIsInvalid: 26,
InvalidEntityType: 27,
ProcedureAlarmsNotMutable: 28,
EventStoreNotAuthorized: 29,
OSNotSupported: 30,
InvalidInviteReplyCalendar: 31,
NotificationsCollectionFlagNotSet: 32,
SourceMismatch: 33,
NotificationCollectionMismatch: 34,
NotificationSavedWithoutCollection: 35,
ReminderAlarmContainsEmailOrUrl: 36,
Last: 37,
};
declare const EKEventAvailability: {
NotSupported: -1,
Busy: 0,
Free: 1,
Tentative: 2,
Unavailable: 3,
};
declare class EKVirtualConferenceURLDescriptor extends NSObject {
initWithTitleURL(title: string | null, URL: NSURL): this;
readonly title: string;
readonly URL: NSURL;
}
declare class EKSource extends EKObject {
readonly sourceIdentifier: string;
readonly sourceType: interop.Enum<typeof EKSourceType>;
readonly title: string;
readonly calendars: NSSet;
calendarsForEntityType(entityType: interop.Enum<typeof EKEntityType>): NSSet;
readonly isDelegate: boolean;
}
declare class EKReminder extends EKCalendarItem {
static reminderWithEventStore(eventStore: EKEventStore): EKReminder;
startDateComponents: NSDateComponents;
dueDateComponents: NSDateComponents;
isCompleted: boolean;
completionDate: NSDate;
priority: number;
}
declare class EKRecurrenceDayOfWeek extends NSObject implements NSCopying, NSSecureCoding {
static dayOfWeek<This extends abstract new (...args: any) => any>(this: This, dayOfTheWeek: interop.Enum<typeof EKWeekday>): InstanceType<This>;
static dayOfWeekWeekNumber<This extends abstract new (...args: any) => any>(this: This, dayOfTheWeek: interop.Enum<typeof EKWeekday>, weekNumber: number): InstanceType<This>;
initWithDayOfTheWeekWeekNumber(dayOfTheWeek: interop.Enum<typeof EKWeekday>, weekNumber: number): this;
readonly dayOfTheWeek: interop.Enum<typeof EKWeekday>;
readonly weekNumber: number;
copyWithZone(zone: interop.PointerConvertible): interop.Object;
static readonly supportsSecureCoding: boolean;
encodeWithCoder(coder: NSCoder): void;
initWithCoder(coder: NSCoder): this;
}
declare class EKParticipant extends EKObject implements NSCopying {
readonly URL: NSURL;
readonly name: string;
readonly participantStatus: interop.Enum<typeof EKParticipantStatus>;
readonly participantRole: interop.Enum<typeof EKParticipantRole>;
readonly participantType: interop.Enum<typeof EKParticipantType>;
readonly isCurrentUser: boolean;
readonly contactPredicate: NSPredicate;
ABRecordWithAddressBook(addressBook: interop.PointerConvertible): interop.Pointer;
copyWithZone(zone: interop.PointerConvertible): interop.Object;
}
declare class EKCalendarItem extends EKObject {
readonly UUID: string;
calendar: EKCalendar;
readonly calendarItemIdentifier: string;
readonly calendarItemExternalIdentifier: string;
title: string;
location: string;
notes: string;
URL: NSURL;
readonly lastModifiedDate: NSDate;
readonly creationDate: NSDate;
timeZone: NSTimeZone;
readonly hasAlarms: boolean;
readonly hasRecurrenceRules: boolean;
readonly hasAttendees: boolean;
readonly hasNotes: boolean;
readonly attendees: NSArray;
get alarms(): NSArray;
set alarms(value: NSArray<interop.Object> | Array<interop.Object>);
addAlarm(alarm: EKAlarm): void;
removeAlarm(alarm: EKAlarm): void;
get recurrenceRules(): NSArray;
set recurrenceRules(value: NSArray<interop.Object> | Array<interop.Object>);
addRecurrenceRule(rule: EKRecurrenceRule): void;
removeRecurrenceRule(rule: EKRecurrenceRule): void;
}
declare class EKAlarm extends EKObject implements NSCopying {
static alarmWithAbsoluteDate(date: NSDate): EKAlarm;
static alarmWithRelativeOffset(offset: number): EKAlarm;
relativeOffset: number;
absoluteDate: NSDate;
structuredLocation: EKStructuredLocation;
proximity: interop.Enum<typeof EKAlarmProximity>;
copyWithZone(zone: interop.PointerConvertible): interop.Object;
}
declare class EKObject extends NSObject {
readonly hasChanges: boolean;
readonly isNew: boolean;
reset(): void;
rollback(): void;
refresh(): boolean;
}
declare class EKVirtualConferenceProvider extends NSObject implements NSExtensionRequestHandling {
fetchAvailableRoomTypesWithCompletionHandler(completionHandler: (p1: NSArray<interop.Object> | Array<interop.Object>, p2: NSError) => void | null): void;
fetchVirtualConferenceForIdentifierCompletionHandler(identifier: string, completionHandler: (p1: EKVirtualConferenceDescriptor, p2: NSError) => void | null): void;
beginRequestWithExtensionContext(context: NSExtensionContext): void;
isEqual(object: interop.Object): boolean;
readonly hash: number;
readonly superclass: interop.Object;
class(): interop.Object;
self(): this;
performSelector(aSelector: string): interop.Object;
performSelectorWithObject(aSelector: string, object: interop.Object): interop.Object;
performSelectorWithObjectWithObject(aSelector: string, object1: interop.Object, object2: interop.Object): interop.Object;
readonly isProxy: boolean;
isKindOfClass(aClass: interop.Object): boolean;
isMemberOfClass(aClass: interop.Object): boolean;
conformsToProtocol(aProtocol: interop.PointerConvertible): boolean;
respondsToSelector(aSelector: string): boolean;
retain(): this;
release(): void;
autorelease(): this;
retainCount(): number;
readonly zone: interop.Pointer;
readonly description: string;
readonly debugDescription: string;
}
declare class EKCalendar extends EKObject {
static calendarWithEventStore(eventStore: EKEventStore): EKCalendar;
static calendarForEntityTypeEventStore(entityType: interop.Enum<typeof EKEntityType>, eventStore: EKEventStore): EKCalendar;
source: EKSource;
readonly calendarIdentifier: string;
title: string;
readonly type: interop.Enum<typeof EKCalendarType>;
readonly allowsContentModifications: boolean;
readonly isSubscribed: boolean;
readonly isImmutable: boolean;
get CGColor(): interop.Pointer;
set CGColor(value: interop.PointerConvertible);
readonly supportedEventAvailabilities: interop.Enum<typeof EKCalendarEventAvailabilityMask>;
readonly allowedEntityTypes: interop.Enum<typeof EKEntityMask>;
}
declare class EKVirtualConferenceRoomTypeDescriptor extends NSObject {
initWithTitleIdentifier(title: string, identifier: string): this;
readonly title: string;
readonly identifier: string;
}
declare class EKEvent extends EKCalendarItem {
static eventWithEventStore(eventStore: EKEventStore): EKEvent;
readonly eventIdentifier: string;
isAllDay: boolean;
startDate: NSDate;
endDate: NSDate;
structuredLocation: EKStructuredLocation;
compareStartDateWithEvent(other: EKEvent): interop.Enum<typeof NSComparisonResult>;
readonly organizer: EKParticipant;
availability: interop.Enum<typeof EKEventAvailability>;
readonly status: interop.Enum<typeof EKEventStatus>;
readonly isDetached: boolean;
readonly occurrenceDate: NSDate;
refresh(): boolean;
readonly birthdayContactIdentifier: string;
readonly birthdayPersonID: number;
}
declare class EKVirtualConferenceDescriptor extends NSObject {
initWithTitleURLDescriptorsConferenceDetails(title: string | null, URLDescriptors: NSArray<interop.Object> | Array<interop.Object>, conferenceDetails: string | null): this;
readonly title: string;
readonly URLDescriptors: NSArray;
readonly conferenceDetails: string;
}
declare class EKEventStore extends NSObject {
static authorizationStatusForEntityType(entityType: interop.Enum<typeof EKEntityType>): interop.Enum<typeof EKAuthorizationStatus>;
init(): this;
initWithSources(sources: NSArray<interop.Object> | Array<interop.Object>): this;
requestFullAccessToEventsWithCompletion(completion: (p1: boolean, p2: NSError) => void): void;
requestWriteOnlyAccessToEventsWithCompletion(completion: (p1: boolean, p2: NSError) => void): void;
requestFullAccessToRemindersWithCompletion(completion: (p1: boolean, p2: NSError) => void): void;
requestAccessToEntityTypeCompletion(entityType: interop.Enum<typeof EKEntityType>, completion: (p1: boolean, p2: NSError) => void): void;
readonly eventStoreIdentifier: string;
readonly delegateSources: NSArray;
readonly sources: NSArray;
sourceWithIdentifier(identifier: string): EKSource;
readonly calendars: NSArray;
calendarsForEntityType(entityType: interop.Enum<typeof EKEntityType>): NSArray;
readonly defaultCalendarForNewEvents: EKCalendar;
defaultCalendarForNewReminders(): EKCalendar;
calendarWithIdentifier(identifier: string): EKCalendar;
saveCalendarCommitError(calendar: EKCalendar, commit: boolean, error: interop.PointerConvertible): boolean;
removeCalendarCommitError(calendar: EKCalendar, commit: boolean, error: interop.PointerConvertible): boolean;
calendarItemWithIdentifier(identifier: string): EKCalendarItem;
calendarItemsWithExternalIdentifier(externalIdentifier: string): NSArray;
saveEventSpanError(event: EKEvent, span: interop.Enum<typeof EKSpan>, error: interop.PointerConvertible): boolean;
removeEventSpanError(event: EKEvent, span: interop.Enum<typeof EKSpan>, error: interop.PointerConvertible): boolean;
saveEventSpanCommitError(event: EKEvent, span: interop.Enum<typeof EKSpan>, commit: boolean, error: interop.PointerConvertible): boolean;
removeEventSpanCommitError(event: EKEvent, span: interop.Enum<typeof EKSpan>, commit: boolean, error: interop.PointerConvertible): boolean;
eventWithIdentifier(identifier: string): EKEvent;
eventsMatchingPredicate(predicate: NSPredicate): NSArray;
enumerateEventsMatchingPredicateUsingBlock(predicate: NSPredicate, block: (p1: EKEvent, p2: interop.PointerConvertible) => void): void;
predicateForEventsWithStartDateEndDateCalendars(startDate: NSDate, endDate: NSDate, calendars: NSArray<interop.Object> | Array<interop.Object> | null): NSPredicate;
saveReminderCommitError(reminder: EKReminder, commit: boolean, error: interop.PointerConvertible): boolean;
removeReminderCommitError(reminder: EKReminder, commit: boolean, error: interop.PointerConvertible): boolean;
fetchRemindersMatchingPredicateCompletion(predicate: NSPredicate, completion: (p1: NSArray<interop.Object> | Array<interop.Object>) => void | null): interop.Object;
cancelFetchRequest(fetchIdentifier: interop.Object): void;
predicateForRemindersInCalendars(calendars: NSArray<interop.Object> | Array<interop.Object> | null): NSPredicate;
predicateForIncompleteRemindersWithDueDateStartingEndingCalendars(startDate: NSDate | null, endDate: NSDate | null, calendars: NSArray<interop.Object> | Array<interop.Object> | null): NSPredicate;
predicateForCompletedRemindersWithCompletionDateStartingEndingCalendars(startDate: NSDate | null, endDate: NSDate | null, calendars: NSArray<interop.Object> | Array<interop.Object> | null): NSPredicate;
commit(error: interop.PointerConvertible): boolean;
reset(): void;
refreshSourcesIfNecessary(): void;
}
declare class EKRecurrenceRule extends EKObject implements NSCopying {
initRecurrenceWithFrequencyIntervalEnd(type: interop.Enum<typeof EKRecurrenceFrequency>, interval: number, end: EKRecurrenceEnd | null): this;
initRecurrenceWithFrequencyIntervalDaysOfTheWeekDaysOfTheMonthMonthsOfTheYearWeeksOfTheYearDaysOfTheYearSetPositionsEnd(type: interop.Enum<typeof EKRecurrenceFrequency>, interval: number, days: NSArray<interop.Object> | Array<interop.Object> | null, monthDays: NSArray<interop.Object> | Array<interop.Object> | null, months: NSArray<interop.Object> | Array<interop.Object> | null, weeksOfTheYear: NSArray<interop.Object> | Array<interop.Object> | null, daysOfTheYear: NSArray<interop.Object> | Array<interop.Object> | null, setPositions: NSArray<interop.Object> | Array<interop.Object> | null, end: EKRecurrenceEnd | null): this;
readonly calendarIdentifier: string;
recurrenceEnd: EKRecurrenceEnd;
readonly frequency: interop.Enum<typeof EKRecurrenceFrequency>;
readonly interval: number;
readonly firstDayOfTheWeek: number;
readonly daysOfTheWeek: NSArray;
readonly daysOfTheMonth: NSArray;
readonly daysOfTheYear: NSArray;
readonly weeksOfTheYear: NSArray;
readonly monthsOfTheYear: NSArray;
readonly setPositions: NSArray;
copyWithZone(zone: interop.PointerConvertible): interop.Object;
}
declare class EKStructuredLocation extends EKObject implements NSCopying {
static locationWithTitle<This extends abstract new (...args: any) => any>(this: This, title: string): InstanceType<This>;
static locationWithMapItem<This extends abstract new (...args: any) => any>(this: This, mapItem: MKMapItem): InstanceType<This>;
title: string;
geoLocation: CLLocation;
radius: number;
copyWithZone(zone: interop.PointerConvertible): interop.Object;
}
declare class EKRecurrenceEnd extends NSObject implements NSCopying, NSSecureCoding {
static recurrenceEndWithEndDate<This extends abstract new (...args: any) => any>(this: This, endDate: NSDate): InstanceType<This>;
static recurrenceEndWithOccurrenceCount<This extends abstract new (...args: any) => any>(this: This, occurrenceCount: number): InstanceType<This>;
readonly endDate: NSDate;
readonly occurrenceCount: number;
copyWithZone(zone: interop.PointerConvertible): interop.Object;
static readonly supportsSecureCoding: boolean;
encodeWithCoder(coder: NSCoder): void;
initWithCoder(coder: NSCoder): this;
}