# generated by fastapi-codegen:
# filename: openapi.yaml
# timestamp: 2025-06-29T08:55:02+00:00
from __future__ import annotations
from datetime import datetime
from enum import Enum
from typing import List
from pydantic import BaseModel, Field, RootModel
class EventRecord(BaseModel):
agent: str = Field(
...,
examples=[
'Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Mobile/15E148 Safari/604.1'
],
)
browsertype: str = Field(..., examples=['Chrome'])
channel: str = Field(..., examples=['Whatsapp'])
click: str = Field(..., examples=['Minimize'])
clicks: int = Field(..., examples=[1])
code: str = Field(..., examples=[None])
company: str = Field(..., examples=['a89d82faf093c43c9c28659d'])
contact: str = Field(..., examples=['MailChimp'])
cost: float = Field(..., examples=[1.1])
costcurrency: str = Field(..., examples=['EUR'])
currency: str = Field(..., examples=['EUR'])
deal: str = Field(..., examples=['afe76fe60defa9000288e4ff'])
deal_name: str = Field(..., alias='deal name', examples=['My deal'])
delay: int = Field(..., examples=[473])
denyreason: str = Field(..., examples=['Deal is expired'])
device: str = Field(..., examples=['a75984d7a1d1a4379'])
devicetype: str = Field(..., examples=['Mobile'])
email: str = Field(..., examples=['a89d82faf093c43c9c28659d'])
emailaddrsha256: str = Field(
...,
examples=['cc63f389e0957aeacc9db39b8a0c2e7792aae3eb76af8909d30d9eab1f7309ac'],
)
flow: str = Field(..., examples=['afe76fe60defa9000288e4ff'])
flowstep: str = Field(..., examples=['FriendImpression'])
flowtype: str = Field(..., examples=['Start'])
impression: str = Field(..., examples=['Widget'])
ip: str = Field(..., examples=['0.0.0.0'])
latitude: str = Field(..., examples=[51.4353])
longitude: str = Field(..., examples=[-0.3096])
optin: str = Field(..., examples=['Redeal'])
os: str = Field(..., examples=['iOS'])
resolution: str = Field(..., examples=['360x760'])
revenue: float = Field(..., examples=[10.5])
role: str = Field(..., examples=['Ambassador'])
session: str = Field(..., examples=['a909d7aff093c4423ccee7cc'])
site: str = Field(..., examples=['a909d7aff093c4423ccee7cc'])
site_name: str = Field(..., alias='site name', examples=['My site'])
timestamp: datetime = Field(..., examples=['2016-08-29T09:12:33.001Z'])
total: float = Field(..., examples=[12.6])
user: str = Field(..., examples=['a909d7aff093c4423ccee7cc'])
userlanguage: str = Field(..., examples=['de-DE'])
class Type(Enum):
all = 'all'
clicks = 'clicks'
contacts = 'contacts'
class EventsGetResponse(RootModel[List[EventRecord]]):
root: List[EventRecord]