import { J as JobSort, E as EmploymentType, R as RemoteOption, S as Seniority } from './jobs-ub3gywNQ.js'; import './_spec-EgN7VmAI.js'; /** * `@cavuno/board/filters` — the canonical listing-filter vocabulary and URL * search-param parsing for jobs-listing routes. * * One greppable convention across every tenant frontend: the vocabulary * arrays mirror the hosted board; seniority URL parsing follows the hosted * semantics exactly (trim, lowercase, dedupe — hand-typed URLs are messy). * * Map parsed filters onto the wire like: * ``` * companySlug: filters.company, * seniority: filters.seniority, * remoteOption: filters.remoteOption ? [filters.remoteOption] : undefined, * ``` * Company slugs are the URL identity; the API accepts them directly via * `companySlug` — never resolve slug→id client-side. * * Display labels for seniority / sort / remote options are application-owned * chrome words — this entry only ships the wire vocabulary and * parsers. */ declare const REMOTE_OPTIONS: readonly RemoteOption[]; /** * The employment types the listing FILTER offers (the hosted filter UI's * set) — `volunteer`/`other` exist on the wire but are not filter options. */ declare const EMPLOYMENT_TYPES: readonly EmploymentType[]; /** All 8 platform seniority levels — the hosted filter renders the full set as a multi-select. */ declare const SENIORITIES: readonly Seniority[]; declare const JOB_SORTS: readonly JobSort[]; declare const DEFAULT_SORT: JobSort; interface ListingFilters { q?: string; remoteOption?: RemoteOption; employmentType?: EmploymentType; /** Multi-select (parity with the hosted board's seniority checkboxes). */ seniority?: Seniority[]; /** * Company filter as PUBLIC SLUGS (the URL identity). Multi-select tolerated * in URLs (comma-joined); the hosted UI applies single-replace. Map to the * wire as `companySlug` (`jobs.list` query / `jobs.search` filters). */ company?: string[]; /** Result ordering; absent ⇒ `relevance`. */ sort?: JobSort; } /** * Normalise raw seniority input — an array (repeated params) or a * comma-string (hand-typed URL) — to valid levels, with the hosted * semantics: trim, lowercase, drop unknowns, dedupe preserving order. */ declare function parseSeniority(raw: unknown): Seniority[] | undefined; /** * Normalise raw company-slug input — an array (repeated params) or a * comma-string (hand-typed URL) — with the hosted semantics: trim, * lowercase, drop empties, dedupe preserving order, then cap at 10 * (the wire max; keep FIRST 10). Open value set (no vocabulary). */ declare function parseCompany(raw: unknown): string[] | undefined; /** * Validate raw URL search params into the supported listing filters, * dropping unknown values (never throwing — listing URLs are public input). * * @example * parseListingFilters({ seniority: 'senior,lead', company: 'acme', sort: 'newest' }); * // { seniority: ['senior', 'lead'], company: ['acme'], sort: 'newest' } */ declare function parseListingFilters(search: Record): ListingFilters; export { DEFAULT_SORT, EMPLOYMENT_TYPES, JOB_SORTS, type ListingFilters, REMOTE_OPTIONS, SENIORITIES, parseCompany, parseListingFilters, parseSeniority };