Bot & Automation

AI Assistants

/root/hermes-projects/AI Assistants

apps/whatsapp_control_api/app/schemas.py text
from __future__ import annotations

from typing import Literal

from pydantic import BaseModel, Field


class HealthResponse(BaseModel):
    status: Literal["ok"]
    app_env: str
    hermes_command: str
    signature_required: bool
    allowed_numbers_configured: int


class WebhookAcceptedResponse(BaseModel):
    status: Literal["accepted"]
    deliveries: int = Field(ge=0)


class TaskResponse(BaseModel):
    task_id: str
    status: str
    current_step: str
    progress_percent: int = Field(ge=0, le=100)


class InboundMessage(BaseModel):
    wa_message_id: str
    from_number: str
    profile_name: str | None = None
    text_body: str
    phone_number_id: str | None = None
    raw_payload: dict