# This file was auto-generated by Fern from our API Definition.

import typing_extensions
import typing_extensions
import typing
from .range import RangeParams


class CustomAttributeFilterParams(typing_extensions.TypedDict):
    """
    Supported custom attribute query expressions for calling the
    [SearchCatalogItems](api-endpoint:Catalog-SearchCatalogItems)
    endpoint to search for items or item variations.
    """

    custom_attribute_definition_id: typing_extensions.NotRequired[typing.Optional[str]]
    """
    A query expression to filter items or item variations by matching their custom attributes'
    `custom_attribute_definition_id` property value against the the specified id.
    Exactly one of `custom_attribute_definition_id` or `key` must be specified.
    """

    key: typing_extensions.NotRequired[typing.Optional[str]]
    """
    A query expression to filter items or item variations by matching their custom attributes'
    `key` property value against the specified key.
    Exactly one of `custom_attribute_definition_id` or `key` must be specified.
    """

    string_filter: typing_extensions.NotRequired[typing.Optional[str]]
    """
    A query expression to filter items or item variations by matching their custom attributes'
    `string_value`  property value against the specified text.
    Exactly one of `string_filter`, `number_filter`, `selection_uids_filter`, or `bool_filter` must be specified.
    """

    number_filter: typing_extensions.NotRequired[RangeParams]
    """
    A query expression to filter items or item variations with their custom attributes
    containing a number value within the specified range.
    Exactly one of `string_filter`, `number_filter`, `selection_uids_filter`, or `bool_filter` must be specified.
    """

    selection_uids_filter: typing_extensions.NotRequired[typing.Optional[typing.Sequence[str]]]
    """
    A query expression to filter items or item variations by matching  their custom attributes'
    `selection_uid_values` values against the specified selection uids.
    Exactly one of `string_filter`, `number_filter`, `selection_uids_filter`, or `bool_filter` must be specified.
    """

    bool_filter: typing_extensions.NotRequired[typing.Optional[bool]]
    """
    A query expression to filter items or item variations by matching their custom attributes'
    `boolean_value` property values against the specified Boolean expression.
    Exactly one of `string_filter`, `number_filter`, `selection_uids_filter`, or `bool_filter` must be specified.
    """
