2025-09-09 14:37:32 +05:30
|
|
|
from enum import Enum
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class IntegrationAction(Enum):
|
|
|
|
|
ALL_CALLS = "All Calls"
|
|
|
|
|
QUALIFIED_CALLS = "Qualified Calls"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Environment(Enum):
|
|
|
|
|
LOCAL = "local"
|
|
|
|
|
PRODUCTION = "production"
|
|
|
|
|
TEST = "test"
|
|
|
|
|
|
|
|
|
|
|
2026-01-12 10:10:30 +05:30
|
|
|
class CallType(Enum):
|
|
|
|
|
INBOUND = "inbound"
|
|
|
|
|
OUTBOUND = "outbound"
|
|
|
|
|
|
|
|
|
|
|
2025-09-09 14:37:32 +05:30
|
|
|
class WorkflowRunMode(Enum):
|
2026-02-17 19:32:03 +05:30
|
|
|
ARI = "ari"
|
2026-04-25 20:41:46 +05:30
|
|
|
PLIVO = "plivo"
|
2025-09-09 14:37:32 +05:30
|
|
|
TWILIO = "twilio"
|
2025-10-27 15:29:57 +05:30
|
|
|
VONAGE = "vonage"
|
2025-11-28 09:36:04 +05:30
|
|
|
VOBIZ = "vobiz"
|
2026-01-03 08:32:21 +02:00
|
|
|
CLOUDONIX = "cloudonix"
|
2026-03-25 18:01:41 +05:30
|
|
|
TELNYX = "telnyx"
|
2025-09-09 14:37:32 +05:30
|
|
|
WEBRTC = "webrtc"
|
|
|
|
|
SMALLWEBRTC = "smallwebrtc"
|
2026-05-21 15:20:02 +05:30
|
|
|
TEXTCHAT = "textchat"
|
2025-09-09 14:37:32 +05:30
|
|
|
|
|
|
|
|
# Historical, not used anymore. Don't
|
|
|
|
|
# use and don't remove
|
2026-02-17 19:32:03 +05:30
|
|
|
STASIS = "stasis"
|
2025-09-09 14:37:32 +05:30
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
2025-12-11 15:42:28 +05:30
|
|
|
class WorkflowRunState(Enum):
|
|
|
|
|
INITIALIZED = "initialized" # Workflow run created, ready for connection
|
2025-12-22 14:08:30 +05:30
|
|
|
RUNNING = "running" # Websocket connected and pipeline active
|
|
|
|
|
COMPLETED = "completed" # Workflow run finished
|
2025-12-11 15:42:28 +05:30
|
|
|
|
|
|
|
|
|
2025-09-09 14:37:32 +05:30
|
|
|
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"
|
2025-11-15 17:32:37 +05:30
|
|
|
TELEPHONY_CONFIGURATION = (
|
|
|
|
|
"TELEPHONY_CONFIGURATION" # Stores all providers + active one
|
|
|
|
|
)
|
|
|
|
|
TWILIO_CONFIGURATION = (
|
|
|
|
|
"TWILIO_CONFIGURATION" # Deprecated - for backward compatibility
|
|
|
|
|
)
|
2026-03-23 11:36:39 +05:30
|
|
|
LANGFUSE_CREDENTIALS = (
|
|
|
|
|
"LANGFUSE_CREDENTIALS" # Org-level Langfuse tracing credentials
|
|
|
|
|
)
|
2026-06-09 16:10:26 +05:30
|
|
|
MODEL_CONFIGURATION_V2 = (
|
|
|
|
|
"MODEL_CONFIGURATION_V2" # Org-level v2 AI model configuration
|
|
|
|
|
)
|
|
|
|
|
ORGANIZATION_PREFERENCES = "ORGANIZATION_PREFERENCES" # Org-level defaults such as timezone/test call number
|
|
|
|
|
MODEL_CONFIGURATION_PREFERENCES = "MODEL_CONFIGURATION_PREFERENCES" # Deprecated; read fallback for old org preferences
|
2025-09-09 14:37:32 +05:30
|
|
|
|
|
|
|
|
|
feat: UI refresh and user onboarding (#430)
* docs: design spec for lead-gen surfaces (Credits & Billing, Hire-an-Expert, Top-up, Enterprise)
Add brainstorming spec for: sidebar OBSERVE→MANAGE rename + Credits & Billing
link + Hire-an-Expert footer button; new /billing page with extracted Dograh
Model Credits card + CTAs; Top-up / Hire-an-Expert / Enterprise intake modals
with inline math captcha; and a workflow-builder Hire-an-Expert nudge. Frontend
only; submissions fire PostHog events via a submitLead() seam for a future
MongoDB endpoint. Also gitignore .superpowers/ brainstorm mockups.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* docs: implementation plan for user-onboarding lead-gen surfaces
14 bite-sized tasks: PostHog events, shared helpers (field options,
work-email blocklist, submitLead seam, math captcha), three intake modals
(enterprise/hire/top-up), LeadFormsProvider context, AppLayout mount, sidebar
MANAGE rename + Credits & Billing link + footer Hire button, extracted
DograhCreditsCard, /billing page, credits removal from Agent Runs, builder
nudge, and a full verification/dogfood pass.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(lead-gen): register PostHog events for lead-gen surfaces
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(lead-gen): shared field options, work-email validation, and submit seam
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(lead-gen): inline math captcha field
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(lead-gen): enterprise intake modal
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(lead-gen): hire-an-expert modal with enterprise link
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(lead-gen): top-up modal with >20k volume-pricing gate
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(lead-gen): shared lead-forms context provider
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(lead-gen): mount LeadFormsProvider in app layout
Wrap the sidebar branch of AppLayout with LeadFormsProvider so the shared
lead modals are available to the sidebar, billing card, and builder nudge.
Includes eslint import-order auto-fixes in TopUpModal and LeadFormsContext.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(lead-gen): rename OBSERVE to MANAGE, add Credits & Billing link and Hire-an-Expert footer button
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(lead-gen): extract DograhCreditsCard with top-up + hire CTAs
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(lead-gen): add Credits & Billing page
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* refactor(lead-gen): move Dograh Model Credits card out of Agent Runs to /billing
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(lead-gen): delayed Hire-an-Expert nudge on the workflow builder
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* ci(ui): add lint:lead-flow guard script
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(ui): restructure lead forms, self-serve Buy Credits, dialog blur
Revised lead-capture surfaces and credits bar:
- Dialog overlay gains backdrop blur (bg-black/60 backdrop-blur-sm).
- Shared primitives: LeadModalShell (icon/eyebrow header, scrollable body,
sticky footer, trust-line slot), PhoneField (react-international-phone,
dark, E.164 out), FormTrustLine ("Average response: under 10 minutes...").
- HireExpertModal: Name, Company, Job title, agent goal, Phone (required),
monthly volume. EnterpriseModal: + work email (required logged-out),
conditional deployment (yes/no/maybe, source-gated), agent goal.
OnboardingModal: drop useCase. Phone mandatory except onboarding.
- Volume buckets match the backend qualifier (0-5k/5k-100k/100k+/not-sure).
- Delete TopUpModal; DograhCreditsCard now self-serve Buy Credits (amount
chips $5/$10/$25/$50/$100 + custom min $5 → startTopUp seam) + Hire an
Expert + dashed custom-pricing link opening Enterprise (billing_custom_pricing).
- PostHog events: drop topup_*, add buy_credits_clicked,
buy_credits_amount_selected, custom_pricing_clicked. LeadFormsContext
drops topup; LeadKind/LeadSource updated.
- Introduce a single --cta warm accent token (CTAs + focus rings only).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(ui): split-screen auth + enterprise CTA + dark theme default
- AuthShell: dark two-column auth layout (brand/value panel with CSS-only
waveform motif + proof points + Bland-style enterprise CTA block on the
left, zinc-900 form card on the right; single-column on mobile).
- AuthEnterpriseCTA: "Talk to our team" → dograh.com/contact?intent=enterprise.
- stack-theme: dark StackTheme token overrides synced to globals.css.
- page.tsx: wrap StackHandler (non-fullPage) in AuthShell + StackTheme;
local-auth fallback preserved inside the shell. BackButton slimmed for the card.
- Dark locked as default: <html className="dark">, next-themes ThemeProvider
(defaultTheme="dark", enableSystem=false); inline no-FOUC script defaults dark.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* ui rezig, onboarding, billing, hire us & on prem cues
* ui changes
* chore: update comment
* chore: untrack docs/superpowers and gitignore it
* feat: refactor user configuration table
* feat(ui): 'check your email' confirmation on lead forms
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* added email and country in form submissions
* chore: update leads api
* fix: wrap dograh model config in card
---------
Co-authored-by: Pritesh <pritesh@dograh.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 19:49:33 +05:30
|
|
|
class UserConfigurationKey(Enum):
|
|
|
|
|
"""Keys for the per-user keyed JSON store (user_configurations)."""
|
|
|
|
|
|
|
|
|
|
MODEL_CONFIGURATION = (
|
|
|
|
|
"MODEL_CONFIGURATION" # Legacy per-user v1 AI model configuration
|
|
|
|
|
)
|
|
|
|
|
ONBOARDING = "ONBOARDING" # Post-signup onboarding state (gate, tooltips, actions)
|
|
|
|
|
|
|
|
|
|
|
2025-09-09 14:37:32 +05:30
|
|
|
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"
|
2026-04-04 14:26:47 +05:30
|
|
|
WORKER_SYNC = "worker_sync"
|
2025-12-22 14:08:30 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
class TriggerState(Enum):
|
|
|
|
|
"""Agent trigger state values"""
|
|
|
|
|
|
|
|
|
|
ACTIVE = "active"
|
|
|
|
|
ARCHIVED = "archived"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class WebhookCredentialType(Enum):
|
|
|
|
|
"""Webhook credential authentication types"""
|
|
|
|
|
|
|
|
|
|
NONE = "none" # No authentication
|
|
|
|
|
API_KEY = "api_key" # API key in header
|
|
|
|
|
BEARER_TOKEN = "bearer_token" # Bearer token auth
|
|
|
|
|
BASIC_AUTH = "basic_auth" # Username/password
|
|
|
|
|
CUSTOM_HEADER = "custom_header" # Custom header key-value
|
2026-01-02 13:11:02 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
class ToolCategory(Enum):
|
|
|
|
|
"""Tool category types"""
|
|
|
|
|
|
|
|
|
|
HTTP_API = "http_api" # Custom HTTP API calls (implemented)
|
2026-01-14 16:40:40 +05:30
|
|
|
END_CALL = "end_call" # End call tool
|
2026-02-16 14:33:33 +05:30
|
|
|
TRANSFER_CALL = "transfer_call" # Transfer call to phone number (Twilio only)
|
2026-04-02 14:07:03 +05:30
|
|
|
CALCULATOR = "calculator" # Built-in calculator tool
|
2026-02-16 14:33:33 +05:30
|
|
|
NATIVE = "native" # Built-in integrations (future: dtmf_input)
|
2026-01-02 13:11:02 +05:30
|
|
|
INTEGRATION = "integration" # Third-party integrations (future: Google Calendar, Salesforce, etc.)
|
2026-05-19 07:40:00 -03:00
|
|
|
MCP = "mcp" # Customer-provided MCP server exposing a tool catalog
|
2026-01-02 13:11:02 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
class ToolStatus(Enum):
|
|
|
|
|
"""Tool status values"""
|
|
|
|
|
|
|
|
|
|
ACTIVE = "active" # Tool is available for use
|
|
|
|
|
ARCHIVED = "archived" # Tool is soft-deleted
|
|
|
|
|
DRAFT = "draft" # Tool is being configured (not ready for use)
|
2026-04-10 17:52:21 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
class PostHogEvent(str, Enum):
|
|
|
|
|
"""PostHog event names — backend events only."""
|
|
|
|
|
|
|
|
|
|
WORKFLOW_CREATED = "workflow_created"
|
|
|
|
|
WORKFLOW_PUBLISHED = "workflow_published"
|
|
|
|
|
WORKFLOW_DUPLICATED = "workflow_duplicated"
|
|
|
|
|
CALL_STARTED = "call_started"
|
|
|
|
|
CALL_COMPLETED = "call_completed"
|
|
|
|
|
CALL_FAILED = "call_failed"
|
|
|
|
|
TELEPHONY_CONFIGURED = "telephony_configured"
|
|
|
|
|
KNOWLEDGE_BASE_CREATED = "knowledge_base_created"
|
|
|
|
|
TOOL_CREATED = "tool_created"
|
|
|
|
|
AGENT_EMBEDDED = "agent_embedded"
|
2026-04-24 12:02:52 +05:30
|
|
|
SIGNED_UP = "signed_up"
|
|
|
|
|
SIGNED_IN = "signed_in"
|