diretto/src/store/types.ts

35 lines
533 B
TypeScript

import { Dict } from "@/types";
export interface AppState {
sources: EventFeed[];
status: Dict<FetchStatus>;
}
export interface EventFeed {
url: string;
info?: FeedInfo;
}
export interface FeedInfo {
title: string;
}
export interface FeedEvent {
source: string; // Source URL
data: FeedEventData;
}
export interface FeedEventData {
guid: string;
title: string;
link?: string;
creator: string;
published?: Date;
}
export interface FetchStatus {
fetched: boolean;
error?: Error;
events?: Event[];
}