import { BoardSdk } from './index.mjs'; import './_spec-EgN7VmAI.mjs'; import './search-DKS7OIn2.mjs'; import './board-q0svBKW3.mjs'; import './jobs-CfrxlDMU.mjs'; import './seo-CI3wLKUW.mjs'; import './blog-T7gQ0ciz.mjs'; /** * Sitemap primitives — the pure XML + bucket-filename logic behind a board * frontend's `/sitemap.xml` index and `/sitemap/:file` bucket routes. * Mirrors the hosted board's 8-bucket model (`board-sitemap.loader.ts`): a * sitemap index points at one file per content bucket, each an ordinary * ``. * * The XML byte layout transcribes the hosted serializers * (`sitemap-xml.utils.ts` — `serializeBoardSitemap` / * `serializeBoardSitemapIndex`) and is tested byte-equal against * them . `changefreq`/`priority` are deliberately not supported: * the hosted builders never emit them. * * Network enumeration lives in `walker.ts`; this module is pure so the * chunking + filename round-trip is unit-tested without a board. */ declare const SITEMAP_BUCKETS: readonly ["marketing", "jobs-categories", "jobs-skills", "jobs-locations", "jobs-details", "companies", "salaries", "blog"]; type SitemapBucket = (typeof SITEMAP_BUCKETS)[number]; /** Matches the hosted chunk size so the two corpora line up bucket-for-bucket. */ declare const SITEMAP_CHUNK_SIZE = 45000; declare function xmlEscape(value: string): string; /** * Chunk 0 (or no chunk) → the bare bucket filename; chunks 1+ append `-2`, * `-3`, … so the common single-chunk case has the cleanest URL. The scheme * is the filename component of the hosted `getBoardSitemapBucketPath`. */ declare function bucketFilename(bucket: SitemapBucket, chunkIndex?: number): string; /** Inverse of `bucketFilename`; returns null for unknown buckets / non-xml. */ declare function parseBucketFilename(filename: string): { bucket: SitemapBucket; chunkIndex: number; } | null; declare function chunk(items: readonly T[], size: number): T[][]; /** * One `` entry. A bare string is shorthand for `{ url }` — the walker * emits plain URL strings; hosted-shaped entries carry `lastModified` (and * `images` on job-detail entries: the company logo). */ interface SitemapUrlEntry { url: string; /** A `Date` serializes to ISO 8601; a string passes through as-is. */ lastModified?: Date | string; /** Google image-sitemap extension URLs (adds the `xmlns:image` namespace). */ images?: readonly string[]; } interface SitemapIndexEntry { url: string; lastModified?: Date | string; } declare function renderUrlset(entries: readonly (string | SitemapUrlEntry)[]): string; declare function renderSitemapIndex(entries: readonly (string | SitemapIndexEntry)[]): string; /** Matches the hosted thin-content floor: a listing page needs ≥5 jobs to index. */ declare const MIN_JOBS_PER_INDEXED_PAGE = 5; /** * Which buckets the index lists. * * Mirror path: exactly the buckets the board publishes, in the canonical * `SITEMAP_BUCKETS` order (the board omits empty ones). * * Legacy fallback (404): blog is gated by its feature; the rest emit an empty * urlset when a board lacks that content (valid, just zero URLs). */ declare function listedBuckets(board: BoardSdk): Promise; /** * One listed bucket, with the freshness stamp the board publishes for it. * * `lastModified` is present only on the mirror path, and only for the buckets * the board tracks one for — the legacy fallback has no such stamp, so it * yields bucket names alone. Feed these straight to `renderSitemapIndex` and * each `` gets a ``. */ interface ListedSitemapBucket { bucket: SitemapBucket; /** ISO 8601 timestamp of the newest content in the bucket, when known. */ lastModified?: string; } /** * Like `listedBuckets`, but keeps each bucket's `lastModified`. Same two * paths, same ordering, same error rules — the only difference is that the * freshness stamp survives. */ declare function listedBucketEntries(board: BoardSdk): Promise; declare function buildBucketUrls(board: BoardSdk, origin: string, bucket: SitemapBucket): Promise; /** * Like `buildBucketUrls`, but keeps each URL's `lastModified` where the board * publishes one. The result feeds `renderUrlset` directly, so every `` * that has a freshness stamp gets a `` — the signal crawlers use to * prioritise recrawl across a large sitemap. * * On the legacy fallback path the catalog endpoints expose no per-URL stamp, * so entries come back as `{ url }` only — identical output to * `buildBucketUrls`, just in the wider shape. */ declare function buildBucketEntries(board: BoardSdk, origin: string, bucket: SitemapBucket): Promise; export { type ListedSitemapBucket, MIN_JOBS_PER_INDEXED_PAGE, SITEMAP_BUCKETS, SITEMAP_CHUNK_SIZE, type SitemapBucket, type SitemapIndexEntry, type SitemapUrlEntry, bucketFilename, buildBucketEntries, buildBucketUrls, chunk, listedBucketEntries, listedBuckets, parseBucketFilename, renderSitemapIndex, renderUrlset, xmlEscape };