mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-07-16 11:31:04 +02:00
Initial Commit 🚀 🚀
This commit is contained in:
commit
4f2a629340
444 changed files with 76863 additions and 0 deletions
0
api/schemas/__init__.py
Normal file
0
api/schemas/__init__.py
Normal file
37
api/schemas/service_key.py
Normal file
37
api/schemas/service_key.py
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
from datetime import datetime
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class ServiceKeyBase(BaseModel):
|
||||
name: str
|
||||
|
||||
|
||||
class CreateServiceKeyRequest(ServiceKeyBase):
|
||||
expires_in_days: Optional[int] = 90
|
||||
|
||||
|
||||
class ServiceKeyResponse(ServiceKeyBase):
|
||||
id: int # Database stores as int
|
||||
key_prefix: str
|
||||
is_active: bool
|
||||
created_at: datetime
|
||||
last_used_at: Optional[datetime] = None
|
||||
expires_at: Optional[datetime] = None
|
||||
archived_at: Optional[datetime] = None
|
||||
created_by: Optional[str] = None # provider_id from auth
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
|
||||
|
||||
class CreateServiceKeyResponse(BaseModel):
|
||||
id: int # Database stores as int
|
||||
name: str
|
||||
service_key: str # Only returned on creation
|
||||
key_prefix: str
|
||||
expires_at: Optional[datetime] = None
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
18
api/schemas/user_configuration.py
Normal file
18
api/schemas/user_configuration.py
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
from datetime import datetime
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
from api.services.configuration.registry import (
|
||||
LLMConfig,
|
||||
STTConfig,
|
||||
TTSConfig,
|
||||
)
|
||||
|
||||
|
||||
class UserConfiguration(BaseModel):
|
||||
llm: LLMConfig | None = None
|
||||
stt: STTConfig | None = None
|
||||
tts: TTSConfig | None = None
|
||||
test_phone_number: str | None = None
|
||||
timezone: str | None = None
|
||||
last_validated_at: datetime | None = None
|
||||
19
api/schemas/workflow.py
Normal file
19
api/schemas/workflow.py
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
from datetime import datetime
|
||||
from typing import Any, Dict
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class WorkflowRunResponseSchema(BaseModel):
|
||||
id: int
|
||||
workflow_id: int
|
||||
name: str
|
||||
mode: str
|
||||
created_at: datetime
|
||||
is_completed: bool
|
||||
transcript_url: str | None
|
||||
recording_url: str | None
|
||||
cost_info: Dict[str, Any] | None
|
||||
definition_id: int | None # This is for backward compatibility
|
||||
initial_context: dict | None = None
|
||||
gathered_context: dict | None = None
|
||||
Loading…
Add table
Add a link
Reference in a new issue