34 lines
579 B
TypeScript
34 lines
579 B
TypeScript
export interface FeedItem {
|
|
id: string;
|
|
source: string;
|
|
title: string;
|
|
url: string;
|
|
publishedAt: Date;
|
|
content?: string;
|
|
summary?: string;
|
|
}
|
|
|
|
export interface FetchInput {
|
|
url: string;
|
|
expectedFormat: "rss" | "atom";
|
|
}
|
|
|
|
export interface FetchError {
|
|
source: string;
|
|
reason: string;
|
|
code: "NETWORK" | "TIMEOUT" | "PARSE" | "UNKNOWN";
|
|
}
|
|
|
|
export interface FeedResponse {
|
|
source: string;
|
|
body: string;
|
|
contentType: string;
|
|
statusCode: number;
|
|
}
|
|
|
|
export interface FetchResult {
|
|
responses: FeedResponse[];
|
|
errors: FetchError[];
|
|
fetchedAt: Date;
|
|
}
|