Saxonberg Server API
    Preparing search index...

    Interface for objects with hierarchical details.

    interface Detailed {
        applyDetails(data: Record<string, unknown>): void;
        getDeepDetailIds(parent?: string): string[] | null;
        getDetail(id: string): string | null;
        getDetail(id: string, sense: SenseChannel, parent?: string): string | null;
        getDetail(id: string, parent: string): string | null;
        getDetailEntries(parent?: string): DetailEntry[];
        getDetailEntry(key: string): DetailEntry | null;
        getDetailIds(parent?: string): string[] | null;
        hasDetail(id: string, parent?: string): boolean;
        removeDetail(ids: string[], parent?: string): number;
        setDetail(ids: string[], description: string, parent?: string): number;
        setDetail(ids: string[], slots: DetailSlots, parent?: string): number;
    }
    Index

    Methods

    • Declarative-content applier — consumes the YAML/template shape { <key>: { keywords?: string[], description: string } } and (re-)populates this.details by calling setDetail for each entry. Aliases come from the entry's keywords array, with the map key as the first alias. Idempotent: resets the Map up front so re-application during template re-clone replaces, not appends. Quietly skips malformed entries.

      Parameters

      • data: Record<string, unknown>

      Returns void

      Invoked by the Hydrator's Phase-2 instruction dispatch from a template's details field. Instruction applier — consumes a declaration to produce derived runtime state; no paired getter (not a property). Must be idempotent across template re-clone.

    • Get a detail's per-sense description text.

      Three argument forms (deduced by the runtime, see the implementation):

      • getDetail(id) — returns the vision slot (back-compat).
      • getDetail(id, sense) — returns the named sense slot.
      • getDetail(id, sense, parent) — sense + nested parent path.
      • getDetail(id, parent) — back-compat shape; parent is a string that doesn't match a SenseChannel literal. Returns the vision slot at the nested path.

      Returns null when the detail doesn't exist or the requested sense slot is unpopulated.

      Parameters

      • id: string

      Returns string | null

    • Parameters

      Returns string | null

    • Parameters

      • id: string
      • parent: string

      Returns string | null

    • Enumerate top-level (or parent-scoped) detail entries, alias- grouped by Detail object identity. Each entry bundles every key that points at the same Detail. Used by the live-query substrate's flat details projection.

      Parameters

      • Optionalparent: string

      Returns DetailEntry[]

    • Look up the single alias-grouped entry containing key, or null if no detail resolves at that key. Used by the live- query substrate's focused-detail projection. Supports dotted paths via the same resolveParent rules as getDetail.

      Parameters

      • key: string

      Returns DetailEntry | null

    • Set detail(s) — supports multiple IDs (aliases). Two shapes:

      • Legacy: setDetail(ids, "description string", parent?) — populates the vision slot. Preserved for older call sites.
      • New: setDetail(ids, { vision, hearing, smell, touch, taste }, parent?) — per-slot population. At least one slot must be non-empty; the per-field invariant rejects an all-empty map.

      Parameters

      • ids: string[]
      • description: string
      • Optionalparent: string

      Returns number

    • Parameters

      Returns number