Skip to content

calendar-sdk

One TypeScript API for Google Calendar, Microsoft Graph (Outlook), and CalDAV/iCloud — without vendoring three different SDKs into your app.

An open alternative to paid unified-calendar APIs: bring your own OAuth credentials and keep your users’ tokens in your own storage.

One canonical model

Calendars, events, availability, sync cursors, and subscriptions share a single typed model across every provider. Swap createGoogleProvider for createMicrosoftProvider and the rest of your code stays identical.

Providers are adapters

The core knows nothing about any vendor API. Each provider implements one ProviderAdapter interface — adding a provider never touches the core.

Bring your own storage

Accounts, tokens, calendars, events, and cursors live behind a StorageAdapter. The default is in-memory; production apps plug in Postgres, Redis, or anything else.

Explicit capabilities

Never discover unsupported behavior by trial and error. Every account carries a capability map, and unsupported operations fail fast with CAPABILITY_UNSUPPORTED.

Resilient by default

Built-in retry with exponential backoff and jitter for rate limits and transient failures, automatic token refresh, and sensitive-value redaction in logs.

Provider-native escape hatches

Raw provider payloads are preserved on every resource (raw, extensions), so provider-only fields are never discarded.

PackageWhat it is
@calendar-sdk/coreCore: unified services (accounts, calendars, events, availability, subscriptions, sync), storage + hooks + retrying transport
@calendar-sdk/googleGoogle Calendar provider adapter
@calendar-sdk/microsoftMicrosoft Graph calendar provider adapter
@calendar-sdk/caldavCalDAV provider adapter (iCloud, Fastmail, Nextcloud, …)
@calendar-sdk/authOAuth flow, token refresh, and token-set helpers