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

import typing_extensions
import typing_extensions
import typing
from .loyalty_event_created_event_data import LoyaltyEventCreatedEventDataParams


class LoyaltyEventCreatedEventParams(typing_extensions.TypedDict):
    """
    Published when a [loyalty event](entity:LoyaltyEvent) is created.
    """

    merchant_id: typing_extensions.NotRequired[typing.Optional[str]]
    """
    The ID of the Square seller associated with the event.
    """

    type: typing_extensions.NotRequired[typing.Optional[str]]
    """
    The type of event. For this event, the value is `loyalty.event.created`.
    """

    event_id: typing_extensions.NotRequired[typing.Optional[str]]
    """
    The unique ID for the event, which is used for
    [idempotency support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices).
    """

    created_at: typing_extensions.NotRequired[str]
    """
    The timestamp of when the event was created, in RFC 3339 format.
    """

    data: typing_extensions.NotRequired[LoyaltyEventCreatedEventDataParams]
    """
    The data associated with the event.
    """
