mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-07-13 11:22:14 +02:00
fix: fix superadmin impersonation
This commit is contained in:
parent
d1339970a5
commit
e405457676
16 changed files with 593 additions and 172 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# generated by datamodel-codegen:
|
||||
# filename: dograh-openapi-XXXXXX.json.XNTNNgR8o4
|
||||
# timestamp: 2026-07-09T13:05:30+00:00
|
||||
# filename: dograh-openapi-XXXXXX.json.73JcjTo19T
|
||||
# timestamp: 2026-07-11T10:21:09+00:00
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
|
@ -534,6 +534,15 @@ class ToolResponse(BaseModel):
|
|||
created_by: CreatedByResponse | None = None
|
||||
|
||||
|
||||
class DestinationSource(Enum):
|
||||
"""
|
||||
Whether transfer destination is static/template or resolved by HTTP.
|
||||
"""
|
||||
|
||||
static = 'static'
|
||||
dynamic = 'dynamic'
|
||||
|
||||
|
||||
class MessageType1(Enum):
|
||||
"""
|
||||
Type of message to play before transfer.
|
||||
|
|
@ -544,52 +553,6 @@ class MessageType1(Enum):
|
|||
audio = 'audio'
|
||||
|
||||
|
||||
class TransferCallConfig(BaseModel):
|
||||
"""
|
||||
Configuration for Transfer Call tools.
|
||||
"""
|
||||
|
||||
destination: Annotated[str, Field(title='Destination')]
|
||||
"""
|
||||
Phone number, SIP endpoint, or template to transfer the call to, e.g. +1234567890, PJSIP/1234, or {{initial_context.transfer_destination}}.
|
||||
"""
|
||||
messageType: Annotated[MessageType1 | None, Field(title='Messagetype')] = 'none'
|
||||
"""
|
||||
Type of message to play before transfer.
|
||||
"""
|
||||
customMessage: Annotated[str | None, Field(title='Custommessage')] = None
|
||||
"""
|
||||
Custom message to play before transferring.
|
||||
"""
|
||||
audioRecordingId: Annotated[str | None, Field(title='Audiorecordingid')] = None
|
||||
"""
|
||||
Recording ID for audio message before transfer.
|
||||
"""
|
||||
timeout: Annotated[int | None, Field(ge=5, le=120, title='Timeout')] = 30
|
||||
"""
|
||||
Maximum seconds to wait for the destination to answer.
|
||||
"""
|
||||
|
||||
|
||||
class TransferCallToolDefinition(BaseModel):
|
||||
"""
|
||||
Tool definition for Transfer Call tools.
|
||||
"""
|
||||
|
||||
schema_version: Annotated[int | None, Field(title='Schema Version')] = 1
|
||||
"""
|
||||
Schema version.
|
||||
"""
|
||||
type: Annotated[Literal['transfer_call'], Field(title='Type')]
|
||||
"""
|
||||
Tool type.
|
||||
"""
|
||||
config: TransferCallConfig
|
||||
"""
|
||||
Transfer Call configuration.
|
||||
"""
|
||||
|
||||
|
||||
class ValidationError(BaseModel):
|
||||
loc: Annotated[list[str | int], Field(title='Location')]
|
||||
msg: Annotated[str, Field(title='Message')]
|
||||
|
|
@ -762,6 +725,47 @@ class HttpApiToolDefinition(BaseModel):
|
|||
"""
|
||||
|
||||
|
||||
class HttpTransferResolverConfig(BaseModel):
|
||||
"""
|
||||
HTTP endpoint used to resolve transfer destination at call time.
|
||||
"""
|
||||
|
||||
type: Annotated[Literal['http'], Field(title='Type')] = 'http'
|
||||
"""
|
||||
Resolver type.
|
||||
"""
|
||||
url: Annotated[str, Field(title='Url')]
|
||||
"""
|
||||
HTTP or HTTPS endpoint for transfer resolution.
|
||||
"""
|
||||
headers: Annotated[dict[str, str] | None, Field(title='Headers')] = None
|
||||
"""
|
||||
Static headers to include with every resolver request.
|
||||
"""
|
||||
credential_uuid: Annotated[str | None, Field(title='Credential Uuid')] = None
|
||||
"""
|
||||
Reference to an external credential for resolver authentication.
|
||||
"""
|
||||
timeout_ms: Annotated[int | None, Field(ge=500, le=5000, title='Timeout Ms')] = 3000
|
||||
"""
|
||||
Resolver request timeout in milliseconds.
|
||||
"""
|
||||
wait_message: Annotated[str | None, Field(title='Wait Message')] = None
|
||||
"""
|
||||
Optional short message played while Dograh resolves routing.
|
||||
"""
|
||||
parameters: Annotated[list[ToolParameter] | None, Field(title='Parameters')] = None
|
||||
"""
|
||||
Parameters the model may provide when calling this transfer tool.
|
||||
"""
|
||||
preset_parameters: Annotated[
|
||||
list[PresetToolParameter] | None, Field(title='Preset Parameters')
|
||||
] = None
|
||||
"""
|
||||
Parameters injected by Dograh from fixed values or workflow context templates.
|
||||
"""
|
||||
|
||||
|
||||
class PropertySpec(BaseModel):
|
||||
"""
|
||||
Single field on a node.
|
||||
|
|
@ -814,6 +818,66 @@ class RecordingListResponseSchema(BaseModel):
|
|||
total: Annotated[int, Field(title='Total')]
|
||||
|
||||
|
||||
class TransferCallConfig(BaseModel):
|
||||
"""
|
||||
Configuration for Transfer Call tools.
|
||||
"""
|
||||
|
||||
destination_source: Annotated[
|
||||
DestinationSource | None, Field(title='Destination Source')
|
||||
] = 'static'
|
||||
"""
|
||||
Whether transfer destination is static/template or resolved by HTTP.
|
||||
"""
|
||||
destination: Annotated[str | None, Field(title='Destination')] = ''
|
||||
"""
|
||||
Phone number, SIP endpoint, or template to transfer the call to, e.g. +1234567890, PJSIP/1234, or {{initial_context.transfer_destination}}.
|
||||
"""
|
||||
messageType: Annotated[MessageType1 | None, Field(title='Messagetype')] = 'none'
|
||||
"""
|
||||
Type of message to play before transfer.
|
||||
"""
|
||||
customMessage: Annotated[str | None, Field(title='Custommessage')] = None
|
||||
"""
|
||||
Custom message to play before transferring.
|
||||
"""
|
||||
audioRecordingId: Annotated[str | None, Field(title='Audiorecordingid')] = None
|
||||
"""
|
||||
Recording ID for audio message before transfer.
|
||||
"""
|
||||
timeout: Annotated[int | None, Field(ge=5, le=120, title='Timeout')] = 30
|
||||
"""
|
||||
Maximum seconds to wait for the destination to answer.
|
||||
"""
|
||||
parameters: Annotated[list[ToolParameter] | None, Field(title='Parameters')] = None
|
||||
"""
|
||||
Parameters the model may provide when calling this transfer tool, for example state, department, or transfer reason.
|
||||
"""
|
||||
resolver: HttpTransferResolverConfig | None = None
|
||||
"""
|
||||
Optional resolver that determines transfer routing at call time.
|
||||
"""
|
||||
|
||||
|
||||
class TransferCallToolDefinition(BaseModel):
|
||||
"""
|
||||
Tool definition for Transfer Call tools.
|
||||
"""
|
||||
|
||||
schema_version: Annotated[int | None, Field(title='Schema Version')] = 1
|
||||
"""
|
||||
Schema version.
|
||||
"""
|
||||
type: Annotated[Literal['transfer_call'], Field(title='Type')]
|
||||
"""
|
||||
Tool type.
|
||||
"""
|
||||
config: TransferCallConfig
|
||||
"""
|
||||
Transfer Call configuration.
|
||||
"""
|
||||
|
||||
|
||||
class UpdateWorkflowRequest(BaseModel):
|
||||
name: Annotated[str | None, Field(title='Name')] = None
|
||||
workflow_definition: Annotated[
|
||||
|
|
|
|||
|
|
@ -640,6 +640,57 @@ export interface components {
|
|||
/** @description HTTP API configuration. */
|
||||
config: components["schemas"]["HttpApiConfig"];
|
||||
};
|
||||
/**
|
||||
* HttpTransferResolverConfig
|
||||
* @description HTTP endpoint used to resolve transfer destination at call time.
|
||||
*/
|
||||
HttpTransferResolverConfig: {
|
||||
/**
|
||||
* Type
|
||||
* @description Resolver type.
|
||||
* @default http
|
||||
* @constant
|
||||
*/
|
||||
type: "http";
|
||||
/**
|
||||
* Url
|
||||
* @description HTTP or HTTPS endpoint for transfer resolution.
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
* Headers
|
||||
* @description Static headers to include with every resolver request.
|
||||
*/
|
||||
headers?: {
|
||||
[key: string]: string;
|
||||
} | null;
|
||||
/**
|
||||
* Credential Uuid
|
||||
* @description Reference to an external credential for resolver authentication.
|
||||
*/
|
||||
credential_uuid?: string | null;
|
||||
/**
|
||||
* Timeout Ms
|
||||
* @description Resolver request timeout in milliseconds.
|
||||
* @default 3000
|
||||
*/
|
||||
timeout_ms: number;
|
||||
/**
|
||||
* Wait Message
|
||||
* @description Optional short message played while Dograh resolves routing.
|
||||
*/
|
||||
wait_message?: string | null;
|
||||
/**
|
||||
* Parameters
|
||||
* @description Parameters the model may provide when calling this transfer tool.
|
||||
*/
|
||||
parameters?: components["schemas"]["ToolParameter"][] | null;
|
||||
/**
|
||||
* Preset Parameters
|
||||
* @description Parameters injected by Dograh from fixed values or workflow context templates.
|
||||
*/
|
||||
preset_parameters?: components["schemas"]["PresetToolParameter"][] | null;
|
||||
};
|
||||
/** InitiateCallRequest */
|
||||
InitiateCallRequest: {
|
||||
/** Workflow Id */
|
||||
|
|
@ -1034,9 +1085,17 @@ export interface components {
|
|||
* @description Configuration for Transfer Call tools.
|
||||
*/
|
||||
TransferCallConfig: {
|
||||
/**
|
||||
* Destination Source
|
||||
* @description Whether transfer destination is static/template or resolved by HTTP.
|
||||
* @default static
|
||||
* @enum {string}
|
||||
*/
|
||||
destination_source: "static" | "dynamic";
|
||||
/**
|
||||
* Destination
|
||||
* @description Phone number, SIP endpoint, or template to transfer the call to, e.g. +1234567890, PJSIP/1234, or {{initial_context.transfer_destination}}.
|
||||
* @default
|
||||
*/
|
||||
destination: string;
|
||||
/**
|
||||
|
|
@ -1062,6 +1121,13 @@ export interface components {
|
|||
* @default 30
|
||||
*/
|
||||
timeout: number;
|
||||
/**
|
||||
* Parameters
|
||||
* @description Parameters the model may provide when calling this transfer tool, for example state, department, or transfer reason.
|
||||
*/
|
||||
parameters?: components["schemas"]["ToolParameter"][] | null;
|
||||
/** @description Optional resolver that determines transfer routing at call time. */
|
||||
resolver?: components["schemas"]["HttpTransferResolverConfig"] | null;
|
||||
};
|
||||
/**
|
||||
* TransferCallToolDefinition
|
||||
|
|
@ -1245,6 +1311,7 @@ export type GraphConstraints = components['schemas']['GraphConstraints'];
|
|||
export type HttpValidationError = components['schemas']['HTTPValidationError'];
|
||||
export type HttpApiConfig = components['schemas']['HttpApiConfig'];
|
||||
export type HttpApiToolDefinition = components['schemas']['HttpApiToolDefinition'];
|
||||
export type HttpTransferResolverConfig = components['schemas']['HttpTransferResolverConfig'];
|
||||
export type InitiateCallRequest = components['schemas']['InitiateCallRequest'];
|
||||
export type McpToolConfig = components['schemas']['McpToolConfig'];
|
||||
export type McpToolDefinition = components['schemas']['McpToolDefinition'];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue