UNPKG

2.47 kBPlain TextView Raw
1//
2// Adapted from:
3// https://validator.w3.org/feed/docs/atom.html
4//
5
6import { AtomAuthor, AtomCategory, AtomContributor, AtomLink, AtomRights, AtomTitle } from './AtomCommon';
7import { AtomEntry } from './AtomEntry';
8
9/** A Feed consists of some metadata, followed by any number of entries. */
10export interface AtomFeed {
11 /** Identifies the feed using a universally unique and permanent URI. If you have a long-term, renewable lease on your Internet domain name, then you can feel free to use your website's address. */
12 id: string;
13 /** Contains a human readable title for the feed. Often the same as the title of the associated website. This value should not be blank. */
14 title: AtomTitle;
15 /** Indicates the last time the feed was modified in a significant way. */
16 updated: Date;
17 /** The entries within the feed */
18 entries: AtomEntry[];
19 /** Names one author of the feed. A feed may have multiple author elements. A feed must contain at least one author element unless all of the entry elements contain at least one author element. */
20 author?: AtomAuthor[];
21 /** Identifies a related Web page. The type of relation is defined by the rel attribute. A feed is limited to one alternate per type and hreflang. A feed should contain a link back to the feed itself. */
22 link?: AtomLink[];
23 /** Specifies a category that the feed belongs to. A feed may have multiple category elements. */
24 category?: AtomCategory[];
25 /** Names one contributor to the feed. An feed may have multiple contributor elements. */
26 contributor?: AtomContributor[];
27 /** Identifies the software used to generate the feed, for debugging and other purposes. Both the `uri` and `version` attributes are optional. */
28 generator?: AtomGenerator;
29 /** Identifies a small image which provides iconic visual identification for the feed. Icons should be square. */
30 icon?: string;
31 /** Identifies a larger image which provides visual identification for the feed. Images should be twice as wide as they are tall. */
32 logo?: string;
33 /** Conveys information about rights, e.g. copyrights, held in and over the feed. */
34 rights?: AtomRights;
35 /** Contains a human-readable description or subtitle for the feed. */
36 subtitle?: string;
37}
38
39/**
40 * Identifies the software used to generate the feed, for debugging and other purposes. Both the `uri` and `version` attributes are optional.
41 */
42export interface AtomGenerator {
43 value: string;
44 uri?: string;
45 version?: string;
46}
\No newline at end of file