UNPKG

indexnow-submit

Version:

CLI tool to use IndexNow to notify search engines of website changes

68 lines 2.23 kB
/// <reference types="node" /> /** * Use Axios to post a URL list via IndexNow to the given search engine. * * @param key The authentication key to use for IndexNow * @param engine The domain name for the search engine * @param host The domain name for your website * @param urlList The list of URLs to post to IndexNow */ export declare function postURLlist(engine: string, host: string, key: string, urlList: Array<string>): Promise<void>; /** * Submit a single URL to an IndexNow service. If this executes with * no error it was successful. Otherwise a suitable error is thrown. * * @param engine The domain name of the search engine * @param url The URL to submit * @param key The IndexNow key to use */ export declare function submitSingleURL(engine: string, url: string, key: string): Promise<void>; /** * Generate a URL obect for the IndexNow service on the given * search engine. * @param engine The domain name for the search engine * @returns */ export declare function indexNowURL(engine: string): URL; /** * Describes Sitemap entries */ export type SitemapEntry = { /** * URL(s) for an item in the Sitemap */ loc: Array<string>; /** * Last modification date(s) */ lastmod?: Array<string>; /** * How often to expect this item to change */ changefreq?: Array<string>; /** * Prioritization */ priority?: Array<string>; image?: Array<string>; }; /** * Fetches all items from a sitemap, accodomating sitemaps that have * sub-sitemaps. The return value is an array of {SitemapEntry}. * * @param u The URL for the sitemap * @param maxAge Optional, an ISO8601 descriptor a maximum age, so we * can select recently created items. e.g. P10D means 10 days * @returns */ export declare function fetchURLsFromSitemap(u: string, maxAge?: string): Promise<Array<SitemapEntry>>; /** * Retrieve URLs from the RSS or Atom file, returning as * an array. * * @param feedURL The URL for the RSS or Atom feed * @param maxAge An ISO8601 duration string as discussed above * @returns */ export declare function fetchURLsFromRSSAtom(feedURL: string, maxAge: string): Promise<Array<string>>; //# sourceMappingURL=index.d.ts.map