Initiates the authorization flow for the calendar service.
Promise resolving to an ActivityLink to initiate the auth flow
Retrieves the list of calendars accessible to the authenticated user.
Returns metadata for all calendars the user has access to, including their primary calendar and any shared calendars. This list can be presented to users for calendar selection.
Authorization token from successful auth flow
Promise resolving to array of available calendars
Begins synchronizing events from a specific calendar.
Sets up real-time sync for the specified calendar, including initial event import and ongoing change notifications. The callback function will be invoked for each synced event.
Recommended Implementation (Strategy 2 - Upsert via Source/Key):
Alternative (Strategy 3 - Advanced cases):
Sync configuration options
Authorization token for calendar access
ID of the calendar to sync
Configuration options for calendar synchronization.
Controls the time range and other parameters for calendar sync operations. Used to limit sync scope and optimize performance.
OptionaltimeMin?: DateEarliest date to sync events from (inclusive)
OptionaltimeMax?: DateLatest date to sync events to (exclusive)
Function receiving (syncUpdate, ...extraArgs) for each synced event
Additional arguments to pass to the callback (type-checked, no functions allowed)
Promise that resolves when sync setup is complete
Stops synchronizing events from a specific calendar.
Disables real-time sync and cleans up any webhooks or polling mechanisms for the specified calendar. No further events will be synced after this call.
Authorization token for calendar access
ID of the calendar to stop syncing
Promise that resolves when sync is stopped
Base interface for calendar integration tools.
Defines the standard operations that all calendar tools must implement to integrate with external calendar services like Google Calendar, Outlook Calendar, etc.
Implementation Pattern:
Recommended Data Sync Strategy: Use Activity.source and Note.key for automatic upserts without manual ID tracking. See SYNC_STRATEGIES.md for detailed patterns and when to use alternative approaches.
Example