mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-07-25 12:01:04 +02:00
chore: clean up PR
This commit is contained in:
parent
8628e576ca
commit
534672e659
6 changed files with 117 additions and 74 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# generated by datamodel-codegen:
|
||||
# filename: dograh-openapi-XXXXXX.json.di0tn7Gw6b
|
||||
# timestamp: 2026-07-15T13:20:43+00:00
|
||||
# filename: dograh-openapi-XXXXXX.json.lCHmKR9UAf
|
||||
# timestamp: 2026-07-20T14:09:14+00:00
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
|
@ -39,6 +39,26 @@ class CallDispositionCodes(BaseModel):
|
|||
)
|
||||
|
||||
|
||||
class FallbackDestination(RootModel[str]):
|
||||
root: Annotated[str, Field(max_length=255, title='Fallback Destination')]
|
||||
"""
|
||||
Optional provider-native fallback destination.
|
||||
"""
|
||||
|
||||
|
||||
class ContextDestinationRoute(BaseModel):
|
||||
"""
|
||||
Map one gathered-context value to an external-PBX destination.
|
||||
"""
|
||||
|
||||
context_value: Annotated[
|
||||
str, Field(max_length=255, min_length=1, title='Context Value')
|
||||
]
|
||||
destination: Annotated[
|
||||
str, Field(max_length=255, min_length=1, title='Destination')
|
||||
]
|
||||
|
||||
|
||||
class Category(Enum):
|
||||
"""
|
||||
Tool category. Must match definition.type.
|
||||
|
|
@ -199,6 +219,19 @@ class EndCallToolDefinition(BaseModel):
|
|||
"""
|
||||
|
||||
|
||||
class ExternalPBXFieldMapping(BaseModel):
|
||||
"""
|
||||
Map one gathered-context value to a provider-native field.
|
||||
"""
|
||||
|
||||
context_path: Annotated[
|
||||
str, Field(max_length=255, min_length=1, title='Context Path')
|
||||
]
|
||||
destination_field: Annotated[
|
||||
str, Field(pattern='^[A-Za-z][A-Za-z0-9_]{0,63}$', title='Destination Field')
|
||||
]
|
||||
|
||||
|
||||
class GraphConstraints(BaseModel):
|
||||
"""
|
||||
Per-node-type graph rules. WorkflowGraph enforces these at validation.
|
||||
|
|
@ -536,11 +569,12 @@ class ToolResponse(BaseModel):
|
|||
|
||||
class DestinationSource(Enum):
|
||||
"""
|
||||
Whether transfer destination is static/template or resolved by HTTP.
|
||||
Whether the destination is static/template, resolved by HTTP, or mapped from gathered context to an external-PBX destination.
|
||||
"""
|
||||
|
||||
static = 'static'
|
||||
dynamic = 'dynamic'
|
||||
context_mapping = 'context_mapping'
|
||||
|
||||
|
||||
class MessageType1(Enum):
|
||||
|
|
@ -600,6 +634,10 @@ class WorkflowConfigurationDefaults(BaseModel):
|
|||
context_compaction_enabled: Annotated[
|
||||
bool | None, Field(title='Context Compaction Enabled')
|
||||
] = False
|
||||
external_pbx_field_mappings: Annotated[
|
||||
list[ExternalPBXFieldMapping] | None,
|
||||
Field(max_length=100, title='External Pbx Field Mappings'),
|
||||
] = None
|
||||
|
||||
|
||||
class WorkflowListResponse(BaseModel):
|
||||
|
|
@ -636,6 +674,29 @@ class WorkflowResponse(BaseModel):
|
|||
workflow_uuid: Annotated[str | None, Field(title='Workflow Uuid')] = None
|
||||
|
||||
|
||||
class ContextDestinationMappingConfig(BaseModel):
|
||||
"""
|
||||
Resolve an external-PBX destination from gathered context.
|
||||
"""
|
||||
|
||||
context_path: Annotated[
|
||||
str, Field(max_length=255, min_length=1, title='Context Path')
|
||||
]
|
||||
"""
|
||||
Gathered-context path or extracted-variable name used for routing.
|
||||
"""
|
||||
routes: Annotated[
|
||||
list[ContextDestinationRoute],
|
||||
Field(max_length=100, min_length=1, title='Routes'),
|
||||
]
|
||||
fallback_destination: Annotated[
|
||||
FallbackDestination | None, Field(title='Fallback Destination')
|
||||
] = None
|
||||
"""
|
||||
Optional provider-native fallback destination.
|
||||
"""
|
||||
|
||||
|
||||
class DocumentListResponseSchema(BaseModel):
|
||||
"""
|
||||
Response schema for list of documents.
|
||||
|
|
@ -827,7 +888,7 @@ class TransferCallConfig(BaseModel):
|
|||
DestinationSource | None, Field(title='Destination Source')
|
||||
] = 'static'
|
||||
"""
|
||||
Whether transfer destination is static/template or resolved by HTTP.
|
||||
Whether the destination is static/template, resolved by HTTP, or mapped from gathered context to an external-PBX destination.
|
||||
"""
|
||||
destination: Annotated[str | None, Field(title='Destination')] = ''
|
||||
"""
|
||||
|
|
@ -857,6 +918,10 @@ class TransferCallConfig(BaseModel):
|
|||
"""
|
||||
Optional resolver that determines transfer routing at call time.
|
||||
"""
|
||||
context_mapping: ContextDestinationMappingConfig | None = None
|
||||
"""
|
||||
Optional gathered-context to external-PBX destination mapping.
|
||||
"""
|
||||
|
||||
|
||||
class TransferCallToolDefinition(BaseModel):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue