refactor: move source options into source file

Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
2026-02-14 15:27:57 +00:00
parent c7a1048320
commit 2cf6536e48
3 changed files with 21 additions and 23 deletions

View File

@@ -4,10 +4,29 @@ import type {
ApiCalendarEvent,
CalendarEventData,
GoogleCalendarClient,
GoogleCalendarSourceOptions,
GoogleOAuthProvider,
} from "./types"
import { NextEventKey, type NextEvent } from "./calendar-context"
interface GoogleCalendarSourceBaseOptions {
calendarIds?: string[]
lookaheadHours?: number
}
interface GoogleCalendarSourceWithProvider extends GoogleCalendarSourceBaseOptions {
oauthProvider: GoogleOAuthProvider
client?: never
}
interface GoogleCalendarSourceWithClient extends GoogleCalendarSourceBaseOptions {
oauthProvider?: never
client: GoogleCalendarClient
}
export type GoogleCalendarSourceOptions =
| GoogleCalendarSourceWithProvider
| GoogleCalendarSourceWithClient
import { CalendarFeedItemType, type CalendarFeedItem } from "./feed-items"
import { DefaultGoogleCalendarClient } from "./google-calendar-api"