"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from dub.types import BaseModel
import pydantic
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class AnalyticsTopUrlsTypedDict(TypedDict):
    url: str
    r"""The destination URL"""
    clicks: NotRequired[float]
    r"""The number of clicks from this URL"""
    leads: NotRequired[float]
    r"""The number of leads from this URL"""
    sales: NotRequired[float]
    r"""The number of sales from this URL"""
    sale_amount: NotRequired[float]
    r"""The total amount of sales from this URL, in cents"""


class AnalyticsTopUrls(BaseModel):
    url: str
    r"""The destination URL"""

    clicks: Optional[float] = 0
    r"""The number of clicks from this URL"""

    leads: Optional[float] = 0
    r"""The number of leads from this URL"""

    sales: Optional[float] = 0
    r"""The number of sales from this URL"""

    sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0
    r"""The total amount of sales from this URL, in cents"""
