refactor(apple-calendar): improve naming and structure for EventKit data models #2487
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
refactor(apple-calendar): improve naming and structure for EventKit data models
Summary
Refactors the Apple Calendar plugin's data models to better align with Apple's EventKit API naming conventions and improve type correctness. Since
list_calendarsandlist_eventsresults will be synced to separate storage, this ensures the naming is correct before data persistence.Naming improvements:
EventFilter.calendar_tracking_id→calendar_identifier(matches Apple's API)AppleCalendar.id→calendar_identifierCalendarRef→CalendarSummarywithid→calendar_identifierexternal_identifier→calendar_item_external_identifier(matches Apple's API)Alarm.relative_offset→relative_offset_seconds(clarifies unit)Type correctness:
event_identifierchanged fromStringtoOption<String>(can be nil for unsaved events per Apple docs)calendar_item_external_identifierchanged toOption<String>Removed redundant fields:
occurrence_dateandis_detachedfromAppleEventtop level (already present inRecurrenceInfo.occurrence)Review & Testing Checklist for Human
occurrence_dateandis_detachedfields fromAppleEventOption<String>changes for identifiers don't cause issues when events are unsaved or external identifiers are unavailableRecommended test plan: Run the desktop app on macOS, enable Apple Calendar integration, and verify calendars and events are listed correctly with the new field names.
Notes