/** * One `` of a feed or of one of its entries. * * `rel` is lower-cased, since it is a controlled value, while `href`, `type` * and `title` are kept as the publisher wrote them. */ export interface AtomLink { href: string; /** * The relation, lower-cased, or an empty string where the link states none. */ rel: string; /** * The media type the link advertises, or `null` where it advertises none. * * A publisher may advertise the type of the data inside the file rather than of the file: * ČÚZK writes `application/gml+xml` on a link that serves `application/zip`. */ type: string | null; title: string | null; /** * The byte count the link claims, or `null` where it claims none or claims a non-numeric one. * * Never taken as the size of a download. * Denmark's feed understates its file by 23 times, so every byte count a fetcher * records is counted off the delivered body instead. */ length: number | null; } /** * One `` of a feed. */ export interface AtomEntry { /** * The entry's ``, which is a URI rather than a name. */ id: string; title: string; /** * The entry's ``, as the feed spells it, or an empty string where it states none. * * Whether this describes the data or the feed is a property of the publisher: Denmark's is * older than the file it serves, while ČÚZK's equals the file's `Last-Modified` to the second. * A fetcher that reads it for freshness has to have measured that agreement first. */ updated: string; /** * The entry's ``, or `null` where it states none. */ rights: string | null; links: readonly AtomLink[]; /** * The entry's `inspire_dls:spatial_dataset_identifier_code`, or `null` for a * feed that's not an INSPIRE predefined-dataset feed. */ identifierCode: string | null; } /** * A feed's own links and its entries. */ export interface AtomFeed { /** * The feed's own links. * These sit outside every entry. */ links: readonly AtomLink[]; entries: readonly AtomEntry[]; } /** * Read a feed's links and entries out of its markup. * * The reader streams because a service document may be large: ČÚZK's lists one entry per municipality. * * @param chunks The feed's bytes or text, in order. * A Node `Readable` satisfies this. * @throws When the markup is malformed, through the parser, so an unreadable feed raises * rather than reading as a feed with fewer entries. */ export declare function readAtomFeed(chunks: AsyncIterable): Promise; /** * The feed's text as the one chunk {@linkcode readAtomFeed} takes. * * For a caller that already holds the whole document, such as a test * or a feed read through a buffering client. */ export declare function feedChunks(text: string): AsyncIterable; /** * The first link carrying `rel`, or `null` where the collection holds none. * * A feed's entry commonly holds several: ČÚZK writes a `describedby` link to its ISO 19139 * record beside the `alternate` link that's the data, and either would download as a dataset. */ export declare function linkWithRel(links: readonly AtomLink[], rel: string): AtomLink | null; //# sourceMappingURL=atom.d.ts.map