2026-02-03 10:59:00 +09:00
|
|
|
from __future__ import annotations
|
|
|
|
|
|
2026-02-09 14:01:22 +08:00
|
|
|
from datetime import datetime
|
2026-08-25 10:54:14 +00:00
|
|
|
from typing import Annotated
|
2026-02-09 14:01:22 +08:00
|
|
|
|
2026-09-22 11:20:45 +00:00
|
|
|
from pydantic import WithJsonSchema
|
2026-04-07 16:05:38 +03:00
|
|
|
|
|
|
|
|
from fields.base import ResponseModel
|
2024-04-08 18:51:46 +08:00
|
|
|
|
2026-08-25 10:54:14 +00:00
|
|
|
UUIDString = Annotated[str, WithJsonSchema({"format": "uuid", "type": "string"})]
|
|
|
|
|
|
2025-08-25 09:26:54 +08:00
|
|
|
|
2026-02-03 10:59:00 +09:00
|
|
|
class SimpleEndUser(ResponseModel):
|
|
|
|
|
id: str
|
|
|
|
|
type: str
|
|
|
|
|
is_anonymous: bool
|
|
|
|
|
session_id: str | None = None
|
2026-02-09 14:01:22 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class EndUserDetail(ResponseModel):
|
2026-09-22 11:20:45 +00:00
|
|
|
"""Full end-user detail returned by the Service API."""
|
2026-02-09 14:01:22 +08:00
|
|
|
|
2026-08-25 10:54:14 +00:00
|
|
|
id: UUIDString
|
|
|
|
|
tenant_id: UUIDString
|
|
|
|
|
app_id: UUIDString | None = None
|
2026-02-09 14:01:22 +08:00
|
|
|
type: str
|
|
|
|
|
external_user_id: str | None = None
|
|
|
|
|
name: str | None = None
|
2026-09-22 11:20:45 +00:00
|
|
|
is_anonymous: bool
|
2026-02-09 14:01:22 +08:00
|
|
|
session_id: str
|
|
|
|
|
created_at: datetime
|
|
|
|
|
updated_at: datetime
|