UNPKG

feedsmith

Version:

Robust and fast parser and generator for RSS, Atom, JSON Feed, and RDF feeds, with support for Podcast, iTunes, Dublin Core, and OPML files.

92 lines (91 loc) 2.47 kB
import type { ParseFunction as CommonParseFunction } from '../../../common/types.js'; import type { ItemOrFeed as DcItemOrFeed } from '../../../namespaces/dc/types.js'; import type { ItemOrFeed as GeoRssItemOrFeed } from '../../../namespaces/georss/types.js'; import type { Feed as ItunesFeed, Item as ItunesItem } from '../../../namespaces/itunes/types.js'; import type { ItemOrFeed as MediaItemOrFeed } from '../../../namespaces/media/types.js'; import type { Item as SlashItem } from '../../../namespaces/slash/types.js'; import type { Feed as SyFeed } from '../../../namespaces/sy/types.js'; import type { Item as ThrItem, Link as ThrLink } from '../../../namespaces/thr/types.js'; export type ParseFunction<R> = CommonParseFunction<R, { prefix?: string; partial?: boolean; }>; export type Text = string; export type Link = { href?: string; rel?: string; type?: string; hreflang?: string; title?: string; length?: number; thr?: ThrLink; }; export type Person = { name?: string; uri?: string; email?: string; }; export type Category = { term?: string; scheme?: string; label?: string; }; export type Generator = { text?: string; uri?: string; version?: string; }; export type Source = { authors?: Array<Person>; categories?: Array<Category>; contributors?: Array<Person>; generator?: Generator; icon?: string; id?: string; links?: Array<Link>; logo?: string; rights?: Text; subtitle?: Text; title?: Text; updated?: string; }; export type Entry = { authors?: Array<Person>; categories?: Array<Category>; content?: Text; contributors?: Array<Person>; id?: string; links?: Array<Link>; published?: string; rights?: Text; source?: Source; summary?: Text; title?: Text; updated?: string; dc?: DcItemOrFeed; slash?: SlashItem; itunes?: ItunesItem; media?: MediaItemOrFeed; georss?: GeoRssItemOrFeed; thr?: ThrItem; }; export type Feed = { authors?: Array<Person>; categories?: Array<Category>; contributors?: Array<Person>; generator?: Generator; icon?: string; id?: string; links?: Array<Link>; logo?: string; rights?: Text; subtitle?: Text; title?: Text; updated?: string; entries?: Array<Entry>; dc?: DcItemOrFeed; sy?: SyFeed; itunes?: ItunesFeed; media?: MediaItemOrFeed; georss?: GeoRssItemOrFeed; };