import { RoutesDefinition } from "./types"; type ChangeFrequency = "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | "never"; export type SitemapItem = { loc: string; priority?: number; lastmod?: string | null; changefreq?: ChangeFrequency; }; type RouteResolverResult = null | undefined | SitemapItem | Array; /** * Object-based approach for sitemap generation with compile-time exhaustiveness checking. * * Instead of builder pattern, this requires all routes to be specified in a single object. * Routes that shouldn't be in sitemap are set to null, others have RouteResolver functions. * * This approach is much faster for TypeScript compiler as it avoids recursive type operations. */ export type SitemapRouteResolvers> = { [K in keyof RouteList]: ((routeName: K) => Promise) | null; }; export type SitemapGeneratorType = { toXml: () => Promise; toJson: () => Promise; }; export type SitemapGeneratorOptions = { baseUrl?: string; defaultPriority?: number; defaultChangeFreq?: ChangeFrequency; }; export declare class SitemapGenerator> { private routeResolvers; private options; constructor(resolvers: SitemapRouteResolvers, options?: SitemapGeneratorOptions); private getSitemapItems; toXml(): Promise; toJson(): Promise; } export {};