A Node.js wrapper for Apple's EventKit framework. Note: only supports macOS
- roadmap
- NSPredicate provide calendar
- EKEvent implement IAdaptable
- cdecl Event(withIdentifier: string)
notes: cdecl refers to this undocumented swift attribute
-
native package (contains swift files that compile to dynamic libraries. these dynamic libraries contain exported symbols which are used for interfacing)
- EventStore.swift
- implement init()
- implement cdecl init(sources: [EKSources])
- implement cdecl freePointer
- implement cdecl sources()
- implement cdecl calendars(for: EKEntityType)
-
implement predicateForEvents(startDate: Date, endDate: Date, calendars: [EKCalendars]) -
implement cdecl requestAccess function - implement cdecl events(matching: predicate)
- #1 implement cdecl event(withIdentifier: String)
- models
- use codable protocol on models to enable serialisation
- define EKCalendarModel
- implement toBuiltin method
- implement init from builtin type
- define EKSourceModel
- implement init from builtin type
- implement toBuiltin method
- define EKEventModel
- implement toBuiltin method
- implement init from builtin type
- define NSPredicateModel
- define CGColorModel
- implement init from builtin
-
implement conversion of CGColor components property to rgb
- EventStore.swift
-
EventKitJS wrapper
- implement darwin os check
- implement static getter exposing EventStore
- implement static method to check calendar/reminder permissions
- EventStore class
- implement constructor for both default EKEventStore() instantiation and EKEventStore(sources: [EKSources]) instantiation with sources argument
- implement sources() method
- implement calendars(for: EKEntityType) method
- implement predicateForEvents(startDate: Date, endDate: Date, calendars: [EKCalendars])
- implement events(matching: NSPredicate) method
- #1 implement event(withIdentifier identifier: String) method
- models
- define a model that represents calendar/reminder permission status
- define CStringPointer
- define EKCalendar
- implement IAdaptable
- define EKCalendarType
- implement IAdaptable
- define CGColor
- implement IAdaptable
- define EKSource
- implement IAdaptable
- define EKEntityMask.ts
- implement IAdaptable
- define EKEvent
- implement IAdaptable
- extend from EKCalendarItem
- define abstract EKCalendarItem
- define NSPredicate
- implement IAdaptable
- define EKEntityType
- implement IAdaptable
- define EKSourceType
- implement IAdaptable
- interfaces
- IAdaptable.ts (for implementing two way conversions between swift types and nodejs types) - each model is responsible for implementing conversion upon their primitive unique fields
- define fromSwiftModel(object: any): any
- define toSwiftModel(): any
- IAdaptable.ts (for implementing two way conversions between swift types and nodejs types) - each model is responsible for implementing conversion upon their primitive unique fields
- adapters
- ModelsAdapter.ts
- implement static function adaptModelToSwift()
- takes model instance as argument, or an array of said model instances
- returns resulting new object or array of objects with toSwiftModel applied
- implement static function adaptModelFromSwift()
- takes new instance of T or [T] as model argument
- takes any object or [any object] as object argument
- returns instance of T or [T] with fromSwiftModel applied
- implement static function adaptModelToSwift()
- ModelsAdapter.ts
- DateAdapter.ts
- NOTE: default encoding of swift date model to json is ms since 2001/1/1
- implement static function toSwiftDate(date: Date)
- implement static function fromSwiftDate(date: number)
-
Other
- abstract the dynamic library build process (for the sake of usability).. maybe prebuild and distribute binaries?
- setup packaging and publish to npm