mirror of
https://github.com/kennethnym/aris.git
synced 2026-03-20 00:51:20 +00:00
refactor: move source options into source file
Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user