UNPKG

2.59 kBTypeScriptView Raw
1import { AtomAuthor, AtomCategory, AtomContent, AtomContributor, AtomLink, AtomRights, AtomSummary, AtomTitle } from './AtomCommon';
2/** An example of an entry would be a single post on a weblog. */
3export interface AtomEntry {
4 /** Identifies the entry using a universally unique and permanent URI. Suggestions on how to make a good id can be found here. Two entries in a feed can have the same value for id if they represent the same entry at different points in time. */
5 id: string;
6 /** Contains a human readable title for the entry. This value should not be blank. */
7 title: AtomTitle;
8 /** Indicates the last time the entry was modified in a significant way. This value need not change after a typo is fixed, only after a substantial modification. Generally, different entries in a feed will have different updated timestamps. */
9 updated: Date;
10 /** Names one author of the entry. An entry may have multiple authors. An entry must contain at least one author element unless there is an author element in the enclosing feed, or there is an author element in the enclosed source element. */
11 author?: AtomAuthor[];
12 /** Contains or links to the complete content of the entry. Content must be provided if there is no alternate link, and should be provided if there is no summary. */
13 content?: AtomContent;
14 /** Identifies a related Web page. The type of relation is defined by the rel attribute. An entry is limited to one alternate per type and hreflang. An entry must contain an alternate link if there is no content element. */
15 link?: AtomLink[];
16 /** Conveys a short summary, abstract, or excerpt of the entry. Summary should be provided if there either is no content provided for the entry, or that content is not inline (i.e., contains a src attribute), or if the content is encoded in base64. */
17 summary?: AtomSummary;
18 /** Specifies a category that the entry belongs to. A entry may have multiple category elements. */
19 category?: AtomCategory[];
20 /** Names one contributor to the entry. An entry may have multiple contributor elements. */
21 contributor?: AtomContributor[];
22 /** Contains the time of the initial creation or first availability of the entry. */
23 published?: Date;
24 /** Conveys information about rights, e.g. copyrights, held in and over the entry. */
25 rights?: AtomRights;
26 /** Contains metadata from the source feed if this entry is a copy. */
27 source?: AtomSource;
28}
29export interface AtomSource {
30 id: string;
31 title: string;
32 updated: Date;
33}