import { PathLike } from 'fs'; export interface Options { baseUrl: string; hashrouting?: boolean; outputType?: "xml" | "txt" | "json"; lastModification?: Date; changeFrequency?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | "never"; priority?: number; } declare class SitemapData { /** * The endpoints that need to be in the sitemap * @private */ private Endpoints; /** * The routes that will end up being in the sitemap * @private */ private Routes; /** * The options used to generate the sitemap * @private */ private Options; constructor(endpoints: Array, options: Options); /** @returns {Array} The routes that will end up being in the sitemap */ getRoutes: () => Array; /** @returns {Array} The endpoints that need to be in the sitemap (used to generate the routes) */ getEndpoints: () => Array; /** * Gets the routes and serializes them into JSON * * Note: This isn't an actual valid sitemap format * @returns {Promise} A JSON string array containg all of the routes */ toJSONString: () => Promise; /** * Gets the routes and serializes them into an XML sitemap * * Note: This IS a valid sitemap format * @returns {Promise} An XML string containg all of the routes */ toXMLString: () => Promise; /** * Gets the routes and serializes them into a plain text sitemap * * Note: This IS a valid sitemap format * @returns {Promise} A plain text string containg all of the routes */ toTextString: () => Promise; /** * Writes the sitemap to the specified location. * Output is determined by the options defined when creating the SitemapData object. * * The default outputType is XML (most popular Sitemap format) * @param location The location the file should be writen to (example: "/public/sitemap.xml") * @returns {Promise} A promise that will finish once the file is done writing */ toFile: (location: PathLike) => Promise; } export default SitemapData;