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

    Interface SupplierFactoryOptions

    Options for constructing a SupplierFactory. controller is required; every other field is optional and falls back to a sensible default. Most fields mirror the corresponding userSettings value.

    export interface SupplierFactoryOptions {
    /** Fetch controller (can be used to terminate the query). */
    controller: AbortController;
    /** Maximum number of results per supplier. Defaults to `defaultResultsLimit`. */
    limit?: number;
    /** Suppliers to query; empty (the default) queries all. */
    suppliers?: Array<SupplierClassName>;
    /** Whether to read from / write to the supplier caches. Defaults to true. */
    caching?: boolean;
    /** Fuzz-scorer name (from `FUZZ_SCORERS`) overriding each supplier's default. */
    fuzzScorerOverride?: string;
    /** When true, suppliers returning zero results skip writing a cache entry. Defaults to false. */
    doNotCacheEmptyResults?: boolean;
    /** Max age (minutes) of a query cache entry before eviction on read; 0 disables. Defaults to 0. */
    cacheTtlMinutes?: number;
    /** HTTP statuses that prevent a product-detail fetch from being cached. Defaults to [429]. */
    noCacheStatusCodes?: number[];
    /** Override (ms) for each supplier's search-time budget. Omit to keep per-supplier defaults. */
    maxAllowableSearchTimeSec?: number;
    /** When true, suppliers skip fuzzball scoring and show raw/boolean-only results. Defaults to false. */
    fuzzyFilteringDisabled?: boolean;
    /** User's ISO 3166-1 alpha-2 location; enables the shipping/restriction filters below. */
    location?: string;
    /** When true (with a `location`), drop suppliers that don't ship to the user. Defaults to false. */
    excludeNonShippingSuppliers?: boolean;
    /** When true, hide products the user can't buy (region/buyer restrictions). Defaults to false. */
    hideRestrictedProducts?: boolean;
    /** Supplier class names to exclude from the search entirely, regardless of `suppliers`. Defaults to []. */
    disabledSuppliers?: Array<SupplierClassName>;
    }
    interface SupplierFactoryOptions {
        controller: AbortController;
        limit?: number;
        suppliers?: (
            | "SupplierAladdinSci"
            | "SupplierAlchemieLabs"
            | "SupplierAllianceChemical"
            | "SupplierAmarisChemicalSolutions"
            | "SupplierAmbeed"
            | "SupplierAsesChem"
            | "SupplierBioFuranChem"
            | "SupplierBVV"
            | "SupplierCarolina"
            | "SupplierCarolinaChemical"
            | "SupplierChemsavers"
            | "SupplierConsolidatedChemical"
            | "SupplierDailyBioUSA"
            | "SupplierFtfScientific"
            | "SupplierGoldAndSilverTesting"
            | "SupplierHimedia"
            | "SupplierInnovatingScience"
            | "SupplierLaballey"
            | "SupplierLabChem"
            | "SupplierLaboratoriumDiscounter"
            | "SupplierLeroChem"
            | "SupplierLibertySci"
            | "SupplierLiMac"
            | "SupplierLoudwolf"
            | "SupplierMacklin"
            | "SupplierOnyxmet"
            | "SupplierOrbitNaturalProductDerivatives"
            | "SupplierS3Chemicals"
            | "SupplierScienceLab"
            | "SupplierSynthetika"
            | "SupplierTheLabStockroom"
            | "SupplierVWR"
            | "SupplierWarchem"
        )[];
        caching?: boolean;
        fuzzScorerOverride?: string;
        doNotCacheEmptyResults?: boolean;
        cacheTtlMinutes?: number;
        noCacheStatusCodes?: number[];
        maxAllowableSearchTimeSec?: number;
        fuzzyFilteringDisabled?: boolean;
        location?: string;
        excludeNonShippingSuppliers?: boolean;
        hideRestrictedProducts?: boolean;
        disabledSuppliers?: (
            | "SupplierAladdinSci"
            | "SupplierAlchemieLabs"
            | "SupplierAllianceChemical"
            | "SupplierAmarisChemicalSolutions"
            | "SupplierAmbeed"
            | "SupplierAsesChem"
            | "SupplierBioFuranChem"
            | "SupplierBVV"
            | "SupplierCarolina"
            | "SupplierCarolinaChemical"
            | "SupplierChemsavers"
            | "SupplierConsolidatedChemical"
            | "SupplierDailyBioUSA"
            | "SupplierFtfScientific"
            | "SupplierGoldAndSilverTesting"
            | "SupplierHimedia"
            | "SupplierInnovatingScience"
            | "SupplierLaballey"
            | "SupplierLabChem"
            | "SupplierLaboratoriumDiscounter"
            | "SupplierLeroChem"
            | "SupplierLibertySci"
            | "SupplierLiMac"
            | "SupplierLoudwolf"
            | "SupplierMacklin"
            | "SupplierOnyxmet"
            | "SupplierOrbitNaturalProductDerivatives"
            | "SupplierS3Chemicals"
            | "SupplierScienceLab"
            | "SupplierSynthetika"
            | "SupplierTheLabStockroom"
            | "SupplierVWR"
            | "SupplierWarchem"
        )[];
    }
    Index

    Properties

    controller: AbortController

    Fetch controller (can be used to terminate the query).

    limit?: number

    Maximum number of results per supplier. Defaults to defaultResultsLimit.

    suppliers?: (
        | "SupplierAladdinSci"
        | "SupplierAlchemieLabs"
        | "SupplierAllianceChemical"
        | "SupplierAmarisChemicalSolutions"
        | "SupplierAmbeed"
        | "SupplierAsesChem"
        | "SupplierBioFuranChem"
        | "SupplierBVV"
        | "SupplierCarolina"
        | "SupplierCarolinaChemical"
        | "SupplierChemsavers"
        | "SupplierConsolidatedChemical"
        | "SupplierDailyBioUSA"
        | "SupplierFtfScientific"
        | "SupplierGoldAndSilverTesting"
        | "SupplierHimedia"
        | "SupplierInnovatingScience"
        | "SupplierLaballey"
        | "SupplierLabChem"
        | "SupplierLaboratoriumDiscounter"
        | "SupplierLeroChem"
        | "SupplierLibertySci"
        | "SupplierLiMac"
        | "SupplierLoudwolf"
        | "SupplierMacklin"
        | "SupplierOnyxmet"
        | "SupplierOrbitNaturalProductDerivatives"
        | "SupplierS3Chemicals"
        | "SupplierScienceLab"
        | "SupplierSynthetika"
        | "SupplierTheLabStockroom"
        | "SupplierVWR"
        | "SupplierWarchem"
    )[]

    Suppliers to query; empty (the default) queries all.

    caching?: boolean

    Whether to read from / write to the supplier caches. Defaults to true.

    fuzzScorerOverride?: string

    Fuzz-scorer name (from FUZZ_SCORERS) overriding each supplier's default.

    doNotCacheEmptyResults?: boolean

    When true, suppliers returning zero results skip writing a cache entry. Defaults to false.

    cacheTtlMinutes?: number

    Max age (minutes) of a query cache entry before eviction on read; 0 disables. Defaults to 0.

    noCacheStatusCodes?: number[]

    HTTP statuses that prevent a product-detail fetch from being cached. Defaults to [429].

    maxAllowableSearchTimeSec?: number

    Override (ms) for each supplier's search-time budget. Omit to keep per-supplier defaults.

    fuzzyFilteringDisabled?: boolean

    When true, suppliers skip fuzzball scoring and show raw/boolean-only results. Defaults to false.

    location?: string

    User's ISO 3166-1 alpha-2 location; enables the shipping/restriction filters below.

    excludeNonShippingSuppliers?: boolean

    When true (with a location), drop suppliers that don't ship to the user. Defaults to false.

    hideRestrictedProducts?: boolean

    When true, hide products the user can't buy (region/buyer restrictions). Defaults to false.

    disabledSuppliers?: (
        | "SupplierAladdinSci"
        | "SupplierAlchemieLabs"
        | "SupplierAllianceChemical"
        | "SupplierAmarisChemicalSolutions"
        | "SupplierAmbeed"
        | "SupplierAsesChem"
        | "SupplierBioFuranChem"
        | "SupplierBVV"
        | "SupplierCarolina"
        | "SupplierCarolinaChemical"
        | "SupplierChemsavers"
        | "SupplierConsolidatedChemical"
        | "SupplierDailyBioUSA"
        | "SupplierFtfScientific"
        | "SupplierGoldAndSilverTesting"
        | "SupplierHimedia"
        | "SupplierInnovatingScience"
        | "SupplierLaballey"
        | "SupplierLabChem"
        | "SupplierLaboratoriumDiscounter"
        | "SupplierLeroChem"
        | "SupplierLibertySci"
        | "SupplierLiMac"
        | "SupplierLoudwolf"
        | "SupplierMacklin"
        | "SupplierOnyxmet"
        | "SupplierOrbitNaturalProductDerivatives"
        | "SupplierS3Chemicals"
        | "SupplierScienceLab"
        | "SupplierSynthetika"
        | "SupplierTheLabStockroom"
        | "SupplierVWR"
        | "SupplierWarchem"
    )[]

    Supplier class names to exclude from the search entirely, regardless of suppliers. Defaults to [].