ChemPal Documentation - v1.7.0
    Preparing search index...

    Type Alias SyntheticFields

    Synthetic columns - stuff that I add to the response body during processing.

    type SyntheticFields = {
        matchPercentage: number;
        _id?: number;
        parentProduct?: { title: string; url: string; permalink?: string };
        priceSeriesKey?: string;
        priceTrendValue?: number;
    }

    Hierarchy (View Summary)

    Index

    Properties

    matchPercentage: number

    Match percentage of the product title and the search string

    95
    
    _id?: number

    Positional index of the product within the current search-results list, assigned at render/persist time. This is NOT a stable product identifier (that is id) — it only conveys row position, so consumers that need a unique row key can use it without clobbering the real product id.

    0
    
    parentProduct?: { title: string; url: string; permalink?: string }

    Display-only back-reference to the main product, set on flattened variant rows when the "group product variants" setting is off (see flattenProductVariants). Lets the detail panel link back to the parent instead of listing variants. Never set by suppliers, never persisted or exported.

    priceSeriesKey?: string

    Display-only price-history series id for this row, stamped on flattened variant rows when the "group product variants" setting is off (see flattenProductVariants). Because flattening merges the variant onto a copy of the product and drops variants, the row can no longer recompute its own variantSeriesKey; carrying the resolved key lets the results table look up the variant's recorded series directly. Never set by suppliers, never persisted or exported.

    priceTrendValue?: number

    Display-only signed percent change of this row's price trend (rising = +, falling = −), stamped by the results table so its trend column has a value to sort by (price history isn't on the row — it's loaded separately). Absent when the row has no drawable trend. Never set by suppliers, never persisted or exported.