/**
 * @zync/calendar — calendar-module public surface.
 *
 * Types, crypto helpers, provider interface + implementations, serializers, range utils.
 */

// Types
export type {
  CalendarSource,
  SyncStatus,
  CalendarProvider,
  SchedulingProvider,
  PostBookingAction,
  CalendarEventObject,
  CalendarConnectionObject,
  SchedulingConnectionObject,
  CalendarSourceFilters,
} from './types'

// Crypto helpers are server-only (wrap @zync/auth → Workers runtime). They live
// in the `@zync/calendar/server` subpath, NOT this barrel, so browser type-only
// imports don't transitively compile Workers-typed source. See ./server.ts.

// Provider interface
export type {
  CalendarSyncProvider,
  ExternalEvent,
  CalendarListItem,
  TokenRefreshResult,
} from './provider'

// Provider implementations
export { GoogleCalendarProvider, buildGoogleOAuthUrl, exchangeGoogleCode } from './providers/google'
export { OutlookCalendarProvider, buildOutlookOAuthUrl, exchangeOutlookCode } from './providers/outlook'

// Serializers
export { serializeCalendarEvent, taskToCalendarEvent } from './serialize'
export type { TaskCalendarInput, CalendarEventRow } from './serialize'

// Range helpers
export { parseRange, RangeError } from './range'
