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

    Interface PriceHistoryEntry

    One price-history series for a product or one of its variants. Each row in the priceHistory IndexedDB store holds the full time-series for a single identity; a new PricePoint is appended only when the USD price differs from the last recorded value (see recordProductPrices).

    const entry: PriceHistoryEntry = {
    id: "3f9c2a…",
    productKey: "3f9c2a…",
    supplier: "Loudwolf",
    title: "Acetone 500ml",
    permalink: "https://loudwolf.com/…",
    points: [{ t: 1713301200000, usd: 19.99 }, { t: 1713387600000, usd: 21.5 }],
    updatedAt: 1713387600000,
    };
    interface PriceHistoryEntry {
        id: string;
        productKey: string;
        variantKey?: string;
        variantId?: string;
        supplier: string;
        title: string;
        permalink?: string;
        points: PricePoint[];
        updatedAt: number;
    }
    Index

    Properties

    id: string

    Series id: ${productKey} for the base product, ${productKey}::${variantKey} for a variant.

    productKey: string

    The product's stable identity key (shared by the base row and every variant row).

    variantKey?: string

    Variant discriminator used in the series id (the variant's own id when it has one, else title/size); absent on the base product row.

    variantId?: string

    The variant's own supplier id, when it is genuinely per-variant (distinct from the parent identity). Lets a variant be looked up by its exact id.

    supplier: string

    Supplier display name, kept for showing history without a live product.

    title: string

    Product/variant title for display.

    permalink?: string

    Human-facing link back to the product, when known.

    points: PricePoint[]

    Observed prices, ascending by time; appended on each USD-price change.

    updatedAt: number

    Epoch ms timestamp of the last write to this series.