mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-10 08:05:22 +02:00
27 lines
1,012 B
Python
27 lines
1,012 B
Python
"""Twilio telephony configuration schemas."""
|
|
|
|
from typing import List, Literal
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class TwilioConfigurationRequest(BaseModel):
|
|
"""Request schema for Twilio configuration."""
|
|
|
|
provider: Literal["twilio"] = Field(default="twilio")
|
|
account_sid: str = Field(..., description="Twilio Account SID")
|
|
auth_token: str = Field(..., description="Twilio Auth Token")
|
|
# Phone numbers are managed via the dedicated phone-numbers endpoints; the
|
|
# legacy /telephony-config POST shim still accepts them inline.
|
|
from_numbers: List[str] = Field(
|
|
default_factory=list, description="List of Twilio phone numbers"
|
|
)
|
|
|
|
|
|
class TwilioConfigurationResponse(BaseModel):
|
|
"""Response schema for Twilio configuration with masked sensitive fields."""
|
|
|
|
provider: Literal["twilio"] = Field(default="twilio")
|
|
account_sid: str # Masked (e.g., "****************def0")
|
|
auth_token: str # Masked (e.g., "****************abc1")
|
|
from_numbers: List[str]
|