/** * Documentation URL builder for docs.idfkit.com. * * Port of `idfkit/src/idfkit/docs.py`. The two libraries must produce * byte-identical addresses, so every rule here mirrors the Python one exactly: * the same version gate, the same bundled object-type mapping, the same * schema-group fallback, and the same labels down to the em dash. * * Synchronous and free of I/O, like the rest of the `@idfkit/core` root entry. * The one place Python is not — it lazily loads the latest schema when the * caller omits one — is the single documented divergence; see * {@link ioReferenceUrl}. */ import type { Schema } from '@idfkit/schemas'; /** A resolved documentation URL with metadata. */ export interface DocsUrl { readonly url: string; /** Python spells this `doc_set`; the field-casing rule renames it here. */ readonly docSet: 'io-reference' | 'engineering-reference' | 'search'; /** Short version used in the URL path, e.g. `v25.2`. */ readonly version: string; /** Human-readable label, e.g. `Zone — I/O Reference`. */ readonly label: string; } /** * Build a docs.idfkit.com URL for an object's I/O Reference page. * * Uses a bundled mapping from the documentation search index for accurate URLs. * Falls back to schema-based group slug construction when the object type is * not in the mapping. * * Returns undefined when the object type cannot be resolved or the version has * no documentation. * * DIVERGENCE FROM PYTHON. `idfkit.docs.io_reference_url` also takes an optional * schema, but when it is omitted and the mapping misses, it loads the schema for * the latest EnergyPlus version from disk and tries the group fallback against * that. Loading a schema is I/O and asynchronous here, and the `@idfkit/core` * root entry is neither, so this returns undefined in that case instead. Pass a * schema to get the fallback. The two libraries agree whenever the object type * is in the mapping (which is every type the search index covers) and whenever * a schema is supplied. * * @param objType EnergyPlus object type name, e.g. `Zone`. * @param version EnergyPlus version, e.g. `26.1.0`. * @param schema Schema for the fallback group lookup. Without it, an object * type outside the bundled mapping resolves to undefined. * @param options `baseUrl` overrides the documentation site root, for tests. */ export declare function ioReferenceUrl(objType: string, version: string, schema?: Schema, options?: { baseUrl?: string; }): DocsUrl | undefined; /** * Build a docs.idfkit.com URL for the Engineering Reference landing page. * * Returns undefined if the version has no documentation. */ export declare function engineeringReferenceUrl(version: string, options?: { baseUrl?: string; }): DocsUrl | undefined; /** * Build a docs.idfkit.com URL for searching or browsing documentation. * * Links to the version's I/O Reference overview page, where the reader can * browse or search for the object type. Returns undefined if the version has no * documentation. */ export declare function searchUrl(query: string, version: string, options?: { baseUrl?: string; }): DocsUrl | undefined; /** * The best documentation URL for an object type. * * Tries the I/O Reference; returns undefined if the object type cannot be * resolved or the version has no documentation. Carries the same omitted-schema * divergence as {@link ioReferenceUrl}. */ export declare function docsUrlForObject(objType: string, version: string, schema?: Schema, options?: { baseUrl?: string; }): DocsUrl | undefined; //# sourceMappingURL=index.d.ts.map