feedsmith
Version:
Fast, all‑in‑one feed parser and generator for RSS, Atom, RDF, and JSON Feed, with support for Podcast, iTunes, Dublin Core, and OPML files.
128 lines • 4.15 kB
TypeScript
import { DateLike } from "../../../common/types.js";
import { AdminNs } from "../../../namespaces/admin/common/types.js";
import { AppNs } from "../../../namespaces/app/common/types.js";
import { ArxivNs } from "../../../namespaces/arxiv/common/types.js";
import { CcNs } from "../../../namespaces/cc/common/types.js";
import { CreativeCommonsNs } from "../../../namespaces/creativecommons/common/types.js";
import { DcNs } from "../../../namespaces/dc/common/types.js";
import { DcTermsNs } from "../../../namespaces/dcterms/common/types.js";
import { GeoNs } from "../../../namespaces/geo/common/types.js";
import { GeoRssNs } from "../../../namespaces/georss/common/types.js";
import { GooglePlayNs } from "../../../namespaces/googleplay/common/types.js";
import { ItunesNs } from "../../../namespaces/itunes/common/types.js";
import { MediaNs } from "../../../namespaces/media/common/types.js";
import { OpenSearchNs } from "../../../namespaces/opensearch/common/types.js";
import { PingbackNs } from "../../../namespaces/pingback/common/types.js";
import { PscNs } from "../../../namespaces/psc/common/types.js";
import { SlashNs } from "../../../namespaces/slash/common/types.js";
import { SyNs } from "../../../namespaces/sy/common/types.js";
import { ThrNs } from "../../../namespaces/thr/common/types.js";
import { TrackbackNs } from "../../../namespaces/trackback/common/types.js";
import { WfwNs } from "../../../namespaces/wfw/common/types.js";
import { YtNs } from "../../../namespaces/yt/common/types.js";
//#region src/feeds/atom/common/types.d.ts
declare namespace Atom {
type Text = string;
type Link<TDate extends DateLike> = {
href: string;
rel?: string;
type?: string;
hreflang?: string;
title?: string;
length?: number;
thr?: ThrNs.Link<TDate>;
};
type Person = {
name: string;
uri?: string;
email?: string;
arxiv?: ArxivNs.Author;
};
type Category = {
term: string;
scheme?: string;
label?: string;
};
type Generator = {
text: string;
uri?: string;
version?: string;
};
type Source<TDate extends DateLike> = {
authors?: Array<Person>;
categories?: Array<Category>;
contributors?: Array<Person>;
generator?: Generator;
icon?: string;
id?: string;
links?: Array<Link<TDate>>;
logo?: string;
rights?: Text;
subtitle?: Text;
title?: Text;
updated?: TDate;
};
type Entry<TDate extends DateLike> = {
authors?: Array<Person>;
categories?: Array<Category>;
content?: Text;
contributors?: Array<Person>;
id: string;
links?: Array<Link<TDate>>;
published?: TDate;
rights?: Text;
source?: Source<TDate>;
summary?: Text;
title: Text;
updated: TDate;
app?: AppNs.Entry<TDate>;
arxiv?: ArxivNs.Entry;
cc?: CcNs.ItemOrFeed;
dc?: DcNs.ItemOrFeed<TDate>;
slash?: SlashNs.Item;
itunes?: ItunesNs.Item;
googleplay?: GooglePlayNs.Item;
psc?: PscNs.Item;
media?: MediaNs.ItemOrFeed;
georss?: GeoRssNs.ItemOrFeed;
geo?: GeoNs.ItemOrFeed;
thr?: ThrNs.Item;
dcterms?: DcTermsNs.ItemOrFeed<TDate>;
creativeCommons?: CreativeCommonsNs.ItemOrFeed;
wfw?: WfwNs.Item;
yt?: YtNs.Item;
pingback?: PingbackNs.Item;
trackback?: TrackbackNs.Item;
};
type Feed<TDate extends DateLike> = {
authors?: Array<Person>;
categories?: Array<Category>;
contributors?: Array<Person>;
generator?: Generator;
icon?: string;
id: string;
links?: Array<Link<TDate>>;
logo?: string;
rights?: Text;
subtitle?: Text;
title: Text;
updated: TDate;
entries?: Array<Entry<TDate>>;
cc?: CcNs.ItemOrFeed;
dc?: DcNs.ItemOrFeed<TDate>;
sy?: SyNs.Feed<TDate>;
itunes?: ItunesNs.Feed;
googleplay?: GooglePlayNs.Feed;
media?: MediaNs.ItemOrFeed;
georss?: GeoRssNs.ItemOrFeed;
geo?: GeoNs.ItemOrFeed;
dcterms?: DcTermsNs.ItemOrFeed<TDate>;
creativeCommons?: CreativeCommonsNs.ItemOrFeed;
opensearch?: OpenSearchNs.Feed;
yt?: YtNs.Feed;
admin?: AdminNs.Feed;
pingback?: PingbackNs.Feed;
};
}
//#endregion
export { Atom };