@coveo/headless
    Preparing search index...

    Variable ProductTemplatesHelpersConst

    ProductTemplatesHelpers: {
        fieldMustMatch: (
            fieldName: string,
            valuesToMatch: string[],
        ) => ProductTemplateCondition;
        fieldMustNotMatch: (
            fieldName: string,
            disallowedValues: string[],
        ) => ProductTemplateCondition;
        fieldsMustBeDefined: (fieldNames: string[]) => ProductTemplateCondition;
        fieldsMustNotBeDefined: (fieldNames: string[]) => ProductTemplateCondition;
        getProductProperty: (
            product: Product | ChildProduct,
            property: string,
        ) => {} | null;
    } = ...

    Type Declaration

    • fieldMustMatch: (fieldName: string, valuesToMatch: string[]) => ProductTemplateCondition

      Creates a condition that verifies whether the value of a field is equal to any of the specified values (casing insensitive).

    • fieldMustNotMatch: (fieldName: string, disallowedValues: string[]) => ProductTemplateCondition

      Creates a condition that verifies whether the value of a field is not equal to any of the specified values (case insensitive).

    • fieldsMustBeDefined: (fieldNames: string[]) => ProductTemplateCondition

      Creates a condition that verifies if the specified fields are defined.

    • fieldsMustNotBeDefined: (fieldNames: string[]) => ProductTemplateCondition

      Creates a condition that verifies if the specified fields are not defined.

    • getProductProperty: (product: Product | ChildProduct, property: string) => {} | null

      Extracts a property from a product object.