import type { AdminConfig, CollectionAdminConfig, CollectionDefinition, ResolvedAdminConfig, ResolvedServerConfig, ServerConfig, SingletonAdminConfig } from '../@types/index.js'; /** * Resolve a collection definition by `path`. Returns `null` either when * no config has been registered (e.g. unit tests, isolated tooling) or * when a config is registered but doesn't carry a collection at that * path. Matches the `T | null` return contract so callers can branch * without try/catch. * * If a caller genuinely *requires* a registered config to proceed, it * should reach for `getAdminConfig()` / `getServerConfig()` — those * still throw the loud "Byline has not been configured" error. */ export declare const getCollectionDefinition: (path: string) => CollectionDefinition | null; export declare const getCollectionAdminConfig: (slug: string) => CollectionAdminConfig | null; export declare const getSingletonAdminConfig: (slug: string) => SingletonAdminConfig | null; export declare function defineAdminConfig(config: AdminConfig): ResolvedAdminConfig; export declare function defineServerConfig(config: ServerConfig): ResolvedServerConfig; /** Resolve and validate server config without replacing the registered singleton. */ export declare function resolveServerConfig(config: ServerConfig): ResolvedServerConfig; /** Internal commit step used after initialization has completed successfully. */ export declare function registerServerConfig(config: ResolvedServerConfig): ResolvedServerConfig; export declare function getAdminConfig(): ResolvedAdminConfig; export declare function getServerConfig(): ResolvedServerConfig; /** * Order a set of locale codes by their position in the configured content * locale list. The order source is `i18n.content.locales` — the authoritative, * always-complete configured set — **not** `i18n.content.localeDefinitions`, * which is an optional labels overlay a host may provide for only *some* * codes (ordering off it would drop unlabelled content locales to the end). * * Codes absent from that order fall to the end, ordered alphabetically among * themselves, so the result is always deterministic and never throws. This is * deliberately origin-agnostic: a code that isn't a configured content * locale — an interface-only locale, a stale/removed code, a typo — is * preserved and sorted last rather than dropped or thrown. The function only * sorts; it never filters, so set membership is never changed. The same holds * when no server config is registered (the order is empty → plain a–z sort). * * `availableLocales` (and `_availableVersionLocales`) are *sets* — their * array order carries no meaning — so this makes that order stable and * config-driven at the read source. The payoff is canonical downstream * ordering (display switcher, hreflang `alternates`, sitemap) regardless of * the order a document declared its locales in. Read-time projection only; * nothing persisted changes. See docs/08-internationalization/index.md. */ export declare function orderByContentLocale(codes: string[]): string[]; export declare function defineBylineCore(core: unknown): void; export declare function getBylineCoreUnsafe(): unknown;