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.

225 lines 5.4 kB
import { DateLike } from "../../../common/types.js"; //#region src/namespaces/podcast/common/types.d.ts declare namespace PodcastNs { /** @internal Common properties shared by Item and LiveItem. */ type BaseItem = { transcripts?: Array<Transcript>; chapters?: Chapters; soundbites?: Array<Soundbite>; persons?: Array<Person>; locations?: Array<Location>; season?: Season; episode?: Episode; license?: License; alternateEnclosures?: Array<AlternateEnclosure>; values?: Array<Value>; images?: Array<Image>; socialInteracts?: Array<SocialInteract>; txts?: Array<Txt>; chat?: Chat; /** @deprecated Use `locations` (array) instead. Multiple podcast:location elements are allowed per specification. */ location?: Location; /** @deprecated Use `values` (array) instead. Multiple podcast:value elements are allowed per specification. */ value?: Value; /** @deprecated Use `chat` (singular) instead. Only one podcast:chat element is allowed per specification. */ chats?: Array<Chat>; }; type Transcript = { url: string; type: string; language?: string; rel?: string; }; type Locked = { value: boolean; owner?: string; }; type Funding = { url: string; display?: string; }; type Chapters = { url: string; type: string; }; type Soundbite = { startTime: number; duration: number; display?: string; }; type Person = { display: string; role?: string; group?: string; img?: string; href?: string; }; type Location = { display: string; rel?: string; geo?: string; osm?: string; country?: string; }; type Season = { number: number; name?: string; }; type Episode = { number: number; display?: string; }; type Trailer<TDate extends DateLike> = { display: string; url: string; pubDate: TDate; length?: number; type?: string; season?: number; }; type License = { display: string; url?: string; }; type AlternateEnclosure = { type: string; length?: number; bitrate?: number; height?: number; lang?: string; title?: string; rel?: string; codecs?: string; default?: boolean; sources?: Array<Source>; integrity?: Integrity; }; type Source = { uri: string; contentType?: string; }; type Integrity = { type: string; value: string; }; type Value = { type: string; method: string; suggested?: number; valueRecipients?: Array<ValueRecipient>; valueTimeSplits?: Array<ValueTimeSplit>; }; type ValueRecipient = { name?: string; customKey?: string; customValue?: string; type: string; address: string; split: number; fee?: boolean; }; /** @internal Legacy type for parsing podcast:images with srcset attribute. */ type Images = { srcset?: string; }; type Image = { href: string; alt?: string; aspectRatio?: string; width?: number; height?: number; type?: string; purpose?: string; }; type LiveItem<TDate extends DateLike> = BaseItem & { status: string; start: TDate; end?: TDate; contentLinks?: Array<ContentLink>; }; type ContentLink = { href: string; display?: string; }; type SocialInteract = { uri?: string; protocol: string; accountId?: string; accountUrl?: string; priority?: number; }; type Chat = { server: string; protocol: string; accountId?: string; space?: string; }; type Block = { value: boolean; id?: string; }; type Txt = { display: string; purpose?: string; }; type RemoteItem = { feedGuid: string; feedUrl?: string; itemGuid?: string; medium?: string; title?: string; }; type Podroll = { remoteItems?: Array<RemoteItem>; }; type UpdateFrequency<TDate extends DateLike> = { display: string; complete?: boolean; dtstart?: TDate; rrule?: string; }; type Podping = { usesPodping?: boolean; }; type Publisher = { remoteItem?: RemoteItem; }; type ValueTimeSplit = { startTime: number; duration: number; remoteStartTime?: number; remotePercentage?: number; remoteItem?: RemoteItem; valueRecipients?: Array<ValueRecipient>; }; type Item = BaseItem; type Feed<TDate extends DateLike> = { locked?: Locked; fundings?: Array<Funding>; persons?: Array<Person>; locations?: Array<Location>; trailers?: Array<Trailer<TDate>>; license?: License; guid?: string; values?: Array<Value>; medium?: string; images?: Array<Image>; liveItems?: Array<LiveItem<TDate>>; blocks?: Array<Block>; txts?: Array<Txt>; remoteItems?: Array<RemoteItem>; podroll?: Podroll; updateFrequency?: UpdateFrequency<TDate>; podping?: Podping; chat?: Chat; publisher?: Publisher; /** @deprecated Use `locations` (array) instead. Multiple podcast:location elements are allowed per specification. */ location?: Location; /** @deprecated Use `values` (array) instead. Multiple podcast:value elements are allowed per specification. */ value?: Value; /** @deprecated Use `chat` (singular) instead. Only one podcast:chat element is allowed per specification. */ chats?: Array<Chat>; }; } //#endregion export { PodcastNs };