UNPKG

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.17 kB
import { DateLike } from "../../../common/types.cjs"; import { AdminNs } from "../../../namespaces/admin/common/types.cjs"; import { AppNs } from "../../../namespaces/app/common/types.cjs"; import { ArxivNs } from "../../../namespaces/arxiv/common/types.cjs"; import { CcNs } from "../../../namespaces/cc/common/types.cjs"; import { CreativeCommonsNs } from "../../../namespaces/creativecommons/common/types.cjs"; import { DcNs } from "../../../namespaces/dc/common/types.cjs"; import { DcTermsNs } from "../../../namespaces/dcterms/common/types.cjs"; import { GeoNs } from "../../../namespaces/geo/common/types.cjs"; import { GeoRssNs } from "../../../namespaces/georss/common/types.cjs"; import { GooglePlayNs } from "../../../namespaces/googleplay/common/types.cjs"; import { ItunesNs } from "../../../namespaces/itunes/common/types.cjs"; import { MediaNs } from "../../../namespaces/media/common/types.cjs"; import { OpenSearchNs } from "../../../namespaces/opensearch/common/types.cjs"; import { PingbackNs } from "../../../namespaces/pingback/common/types.cjs"; import { PscNs } from "../../../namespaces/psc/common/types.cjs"; import { SlashNs } from "../../../namespaces/slash/common/types.cjs"; import { SyNs } from "../../../namespaces/sy/common/types.cjs"; import { ThrNs } from "../../../namespaces/thr/common/types.cjs"; import { TrackbackNs } from "../../../namespaces/trackback/common/types.cjs"; import { WfwNs } from "../../../namespaces/wfw/common/types.cjs"; import { YtNs } from "../../../namespaces/yt/common/types.cjs"; //#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 };