2026-03-10 19:19:23 +00:00
|
|
|
import type { FeedSource } from "@aelis/core"
|
2026-03-22 17:57:54 +00:00
|
|
|
import type { type } from "arktype"
|
|
|
|
|
|
|
|
|
|
export type ConfigSchema = ReturnType<typeof type>
|
2026-02-18 00:41:20 +00:00
|
|
|
|
|
|
|
|
export interface FeedSourceProvider {
|
2026-03-19 23:32:29 +00:00
|
|
|
/** The source ID this provider is responsible for (e.g., "aelis.location"). */
|
|
|
|
|
readonly sourceId: string
|
2026-03-22 17:57:54 +00:00
|
|
|
/** Arktype schema for validating user-provided config. Omit if the source has no config. */
|
|
|
|
|
readonly configSchema?: ConfigSchema
|
2026-03-22 16:28:19 +00:00
|
|
|
feedSourceForUser(userId: string, config: unknown): Promise<FeedSource>
|
2026-02-18 00:41:20 +00:00
|
|
|
}
|