""" Pydantic models mirroring oo.events.v1 proto schemas. Field names use camelCase to match the proto3 JSON mapping convention and the TypeScript payload shapes published by services/api. Keep in sync with packages/shared-types/events/oo/events/v1/. """ from __future__ import annotations from typing import Literal, Optional from pydantic import BaseModel class TaskSyncedPayload(BaseModel): userId: str source: str count: int syncedAt: str class TipServedPayload(BaseModel): userId: str tipId: str policy: str servedAt: str class TipFeedbackPayload(BaseModel): userId: str tipId: str action: Literal['done', 'dismiss', 'snooze', 'helpful', 'not_helpful'] reward: float dwellMs: Optional[int] = None createdAt: str class TipRewardFailedPayload(BaseModel): userId: str tipId: str reward: float attempts: int error: str failedAt: str class IntegrationTokenExpiredPayload(BaseModel): userId: str provider: str detectedAt: str