feat(caldav): export CalDavFeedItemType const (#46)

Replace hardcoded "caldav-event" string with a
CalDavFeedItemType const object, matching the pattern
used by google-calendar and weatherkit packages.

Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
2026-03-01 18:42:40 +00:00
committed by GitHub
parent 2d7544500d
commit d616fd52d3
3 changed files with 12 additions and 3 deletions

View File

@@ -4,10 +4,10 @@ import { TimeRelevance, UnknownActionError } from "@aris/core"
import { DAVClient } from "tsdav"
import type { CalDavDAVClient, CalDavEventData, CalDavFeedItem } from "./types.ts"
import { CalDavEventStatus } from "./types.ts"
import { CalDavCalendarKey, type CalendarContext } from "./calendar-context.ts"
import { parseICalEvents } from "./ical-parser.ts"
import { CalDavEventStatus, CalDavFeedItemType } from "./types.ts"
// -- Source options --
@@ -340,7 +340,7 @@ export function computeSignals(
function createFeedItem(event: CalDavEventData, now: Date, timeZone?: string): CalDavFeedItem {
return {
id: `caldav-event-${event.uid}${event.recurrenceId ? `-${event.recurrenceId}` : ""}`,
type: "caldav-event",
type: CalDavFeedItemType.Event,
timestamp: now,
data: event,
signals: computeSignals(event, now, timeZone),