mirror of
https://github.com/kennethnym/aris.git
synced 2026-03-20 09:01:19 +00:00
24 lines
666 B
TypeScript
24 lines
666 B
TypeScript
|
|
import type { FeedItem } from "./feed"
|
||
|
|
|
||
|
|
export interface ItemGroup {
|
||
|
|
/** IDs of items to present together */
|
||
|
|
itemIds: string[]
|
||
|
|
/** Summary text for the group */
|
||
|
|
summary: string
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface FeedEnhancement {
|
||
|
|
/** New items to inject into the feed */
|
||
|
|
additionalItems?: FeedItem[]
|
||
|
|
/** Groups of items to present together with a summary */
|
||
|
|
groupedItems?: ItemGroup[]
|
||
|
|
/** Item IDs to remove from the feed */
|
||
|
|
suppress?: string[]
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* A function that transforms feed items and produces enhancement directives.
|
||
|
|
* Use named functions for meaningful error attribution.
|
||
|
|
*/
|
||
|
|
export type FeedPostProcessor = (items: FeedItem[]) => Promise<FeedEnhancement>
|