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

import typing_extensions
import typing_extensions
from .customer_custom_attribute_filter_value import CustomerCustomAttributeFilterValueParams
from .time_range import TimeRangeParams


class CustomerCustomAttributeFilterParams(typing_extensions.TypedDict):
    """
    The custom attribute filter. Use this filter in a set of [custom attribute filters](entity:CustomerCustomAttributeFilters) to search
    based on the value or last updated date of a customer-related [custom attribute](entity:CustomAttribute).
    """

    key: str
    """
    The `key` of the [custom attribute](entity:CustomAttribute) to filter by. The key is the identifier of the custom attribute
    (and the corresponding custom attribute definition) and can be retrieved using the [Customer Custom Attributes API](api:CustomerCustomAttributes).
    """

    filter: typing_extensions.NotRequired[CustomerCustomAttributeFilterValueParams]
    """
    A filter that corresponds to the data type of the target custom attribute. For example, provide the `phone` filter to
    search based on the value of a `PhoneNumber`-type custom attribute. The data type is specified by the schema field of the custom attribute definition,
    which can be retrieved using the [Customer Custom Attributes API](api:CustomerCustomAttributes).
    
    You must provide this `filter` field, the `updated_at` field, or both.
    """

    updated_at: typing_extensions.NotRequired[TimeRangeParams]
    """
    The date range for when the custom attribute was last updated. The date range can include `start_at`, `end_at`, or
    both. Range boundaries are inclusive. Dates are specified as RFC 3339 timestamps.
    
    You must provide this `updated_at` field, the `filter` field, or both.
    """
