/** * Collection — the canonical, framework-independent model for a curated * or auto-generated directory of records. * * A `Collection` declares: * - a slug (URL-safe id) and human title/description * - a `query` that filters an entry stream (stacks, platforms, categories, * licenses, kinds, excludeStatuses, free-text q) * - a `ranking` that decides order (quality, active, recency, stars, curated) * - optional `editorial` intro/selection notes and review metadata * - `seo` policy (indexable flag, optional overrides) * * `CollectionEntry` is the lightweight record shape that flows through * filter and rank — it intentionally carries only the fields needed for * selection and ordering, not the full project record (which is heavier). * * `filterEntries` and `rankEntries` are pure functions; they share no * state and never mutate their input. */ export type CollectionKind = "curated" | "generated"; export type RankingPreset = "quality" | "active" | "curated" | "recency" | "stars"; export interface CollectionQuery { stacks?: string[]; platforms?: string[]; categories?: string[]; licenses?: string[]; kinds?: string[]; excludeStatuses?: string[]; /** Minimum GitHub star count. Entries below this are excluded. */ minStars?: number; /** Minimum GitHub fork count. Entries below this are excluded. */ minForks?: number; q?: string; } export interface CollectionRanking { preset: RankingPreset; signals?: string[]; } export interface CollectionEditorial { introduction?: string; selectionNote?: string; lastReviewedAt?: string; } export interface CollectionSeo { index: boolean; title?: string; description?: string; } export interface Collection { slug: string; kind: CollectionKind; title: string; description: string; query: CollectionQuery; ranking: CollectionRanking; editorial?: CollectionEditorial; seo: CollectionSeo; } export interface CollectionEntry { slug: string; title: string; description: string; url: string; /** GitHub (or other source) repository URL. Used by the row * component to render a "View repo" link in the footer. */ repoHref?: string; /** Project's own homepage URL (e.g. marketing site). Rendered * as "Visit site" when present, alongside "View repo". */ homepageHref?: string; stack?: string; platform?: string[]; /** Legacy single-value license (GitHub-synced SPDX id). Kept for * backward compatibility with v0.4 records that only exposed one * license. Prefer `licenses` for new code paths. */ license?: string; /** Full license array (curated SPDX ids + GitHub fallback). */ licenses?: string[]; status?: string; stars?: number; forks?: number; pushedAt?: string; curationScore?: number; activityScore?: number; categories?: string[]; } export declare function filterEntries(entries: CollectionEntry[], query: CollectionQuery): CollectionEntry[]; export declare function rankEntries(entries: CollectionEntry[], ranking: CollectionRanking): CollectionEntry[]; //# sourceMappingURL=collections.d.ts.map