2026-04-29 11:39:57 +05:30
|
|
|
"""Vobiz telephony configuration schemas."""
|
|
|
|
|
|
2026-05-02 15:53:58 +05:30
|
|
|
from typing import List, Literal, Optional
|
2026-04-29 11:39:57 +05:30
|
|
|
|
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class VobizConfigurationRequest(BaseModel):
|
|
|
|
|
"""Request schema for Vobiz configuration."""
|
|
|
|
|
|
|
|
|
|
provider: Literal["vobiz"] = Field(default="vobiz")
|
|
|
|
|
auth_id: str = Field(..., description="Vobiz Account ID (e.g., MA_SYQRLN1K)")
|
|
|
|
|
auth_token: str = Field(..., description="Vobiz Auth Token")
|
2026-05-02 15:53:58 +05:30
|
|
|
application_id: Optional[str] = Field(
|
|
|
|
|
default=None,
|
2026-04-29 11:39:57 +05:30
|
|
|
description=(
|
|
|
|
|
"Vobiz Application ID. The application's answer_url is updated "
|
2026-05-02 15:53:58 +05:30
|
|
|
"when inbound workflows are attached to numbers on this account. "
|
|
|
|
|
"If omitted, an application is auto-created on save and its id "
|
|
|
|
|
"is stored on the configuration."
|
2026-04-29 11:39:57 +05:30
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
from_numbers: List[str] = Field(
|
|
|
|
|
default_factory=list,
|
|
|
|
|
description="List of Vobiz phone numbers (E.164 without + prefix)",
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class VobizConfigurationResponse(BaseModel):
|
|
|
|
|
"""Response schema for Vobiz configuration with masked sensitive fields."""
|
|
|
|
|
|
|
|
|
|
provider: Literal["vobiz"] = Field(default="vobiz")
|
|
|
|
|
auth_id: str # Masked
|
|
|
|
|
auth_token: str # Masked
|
2026-05-02 15:53:58 +05:30
|
|
|
application_id: Optional[str] = None
|
2026-04-29 11:39:57 +05:30
|
|
|
from_numbers: List[str]
|