mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-28 08:49:42 +02:00
Initial Commit 🚀 🚀
This commit is contained in:
commit
4f2a629340
444 changed files with 76863 additions and 0 deletions
81
api/enums.py
Normal file
81
api/enums.py
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
from enum import Enum
|
||||
|
||||
|
||||
class IntegrationAction(Enum):
|
||||
ALL_CALLS = "All Calls"
|
||||
QUALIFIED_CALLS = "Qualified Calls"
|
||||
|
||||
|
||||
class Environment(Enum):
|
||||
LOCAL = "local"
|
||||
PRODUCTION = "production"
|
||||
TEST = "test"
|
||||
|
||||
|
||||
class WorkflowRunMode(Enum):
|
||||
TWILIO = "twilio"
|
||||
STASIS = "stasis"
|
||||
WEBRTC = "webrtc"
|
||||
SMALLWEBRTC = "smallwebrtc"
|
||||
|
||||
# Historical, not used anymore. Don't
|
||||
# use and don't remove
|
||||
VOICE = "VOICE"
|
||||
CHAT = "CHAT"
|
||||
|
||||
|
||||
class StorageBackend(Enum):
|
||||
"""Storage backend enumeration.
|
||||
|
||||
Currently supported backends:
|
||||
- S3: Amazon S3
|
||||
- MINIO: MinIO
|
||||
|
||||
Future extensibility: Additional backends like GCS, Azure can be added by:
|
||||
1. Adding new enum values as strings
|
||||
2. Implementing storage logic in services/storage.py
|
||||
3. Database will automatically support new values via SQLAlchemy Enum type
|
||||
"""
|
||||
|
||||
# Currently implemented backends
|
||||
S3 = "s3" # AWS S3 for cloud deployments
|
||||
MINIO = "minio" # MinIO for local/OSS deployments
|
||||
|
||||
@classmethod
|
||||
def get_current_backend(cls):
|
||||
"""Get current backend based on ENABLE_AWS_S3 flag."""
|
||||
from api.constants import ENABLE_AWS_S3
|
||||
|
||||
if ENABLE_AWS_S3:
|
||||
return cls.S3
|
||||
else:
|
||||
return cls.MINIO
|
||||
|
||||
|
||||
class WorkflowRunStatus(Enum):
|
||||
# historical modes
|
||||
VOICE = "VOICE"
|
||||
CHAT = "CHAT"
|
||||
|
||||
|
||||
class OrganizationConfigurationKey(Enum):
|
||||
DISPOSITION_CODE_MAPPING = "DISPOSITION_CODE_MAPPING"
|
||||
DISPOSITION_MESSAGE_TEMPLATE = "DISPOSITION_MESSAGE_TEMPLATE"
|
||||
CONCURRENT_CALL_LIMIT = "CONCURRENT_CALL_LIMIT"
|
||||
TWILIO_PHONE_NUMBERS = "TWILIO_PHONE_NUMBERS"
|
||||
|
||||
|
||||
class WorkflowStatus(Enum):
|
||||
"""Workflow status values"""
|
||||
|
||||
ACTIVE = "active"
|
||||
ARCHIVED = "archived"
|
||||
# Future statuses can be added here like:
|
||||
# DRAFT = "draft"
|
||||
# PAUSED = "paused"
|
||||
|
||||
|
||||
class RedisChannel(Enum):
|
||||
"""Redis pub/sub channel names"""
|
||||
|
||||
CAMPAIGN_EVENTS = "campaign_events"
|
||||
Loading…
Add table
Add a link
Reference in a new issue