Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SDK #8

Merged
merged 3 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions src/vocode/types/action_params_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@

import typing

import typing_extensions

from .add_to_conference_action_params import AddToConferenceActionParams
from .dtmf_action_params import DtmfActionParams
from .end_conversation_action_params import EndConversationActionParams
from .transfer_call_action_params import TransferCallActionParams
from .add_to_conference_action_params import AddToConferenceActionParams
from .external_action_params import ExternalActionParams
from .set_hold_action_params import SetHoldActionParams
from .transfer_call_action_params import TransferCallActionParams


class ActionParamsRequest_ActionTransferCall(TransferCallActionParams):
Expand All @@ -36,25 +35,36 @@ class Config:
smart_union = True
allow_population_by_field_name = True


class ActionParamsRequest_ActionAddToConference(AddToConferenceActionParams):

class Config:
frozen = True
smart_union = True
allow_population_by_field_name = True


class ActionParamsRequest_ActionSetHold(SetHoldActionParams):

class Config:
frozen = True
smart_union = True
allow_population_by_field_name = True



class ActionParamsRequest_ActionExternal(ExternalActionParams):

class Config:
frozen = True
smart_union = True
allow_population_by_field_name = True


ActionParamsRequest = typing.Union[
TransferCallActionParams,
EndConversationActionParams,
DtmfActionParams,
AddToConferenceActionParams,
SetHoldActionParams
SetHoldActionParams,
ExternalActionParams,
]
20 changes: 12 additions & 8 deletions src/vocode/types/action_update_params_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ class Config:
allow_population_by_field_name = True


class ActionUpdateParamsRequest_ActionEndConversation(EndConversationActionUpdateParams):
class ActionUpdateParamsRequest_ActionEndConversation(
EndConversationActionUpdateParams
):
type: typing_extensions.Literal["action_end_conversation"]

class Config:
Expand All @@ -41,7 +43,9 @@ class Config:
allow_population_by_field_name = True


class ActionUpdateParamsRequest_ActionAddToConference(AddToConferenceActionUpdateParams):
class ActionUpdateParamsRequest_ActionAddToConference(
AddToConferenceActionUpdateParams
):
type: typing_extensions.Literal["action_add_to_conference"]

class Config:
Expand Down Expand Up @@ -69,10 +73,10 @@ class Config:


ActionUpdateParamsRequest = typing.Union[
ActionUpdateParamsRequest_ActionTransferCall,
ActionUpdateParamsRequest_ActionEndConversation,
ActionUpdateParamsRequest_ActionDtmf,
ActionUpdateParamsRequest_ActionAddToConference,
ActionUpdateParamsRequest_ActionSetHold,
ActionUpdateParamsRequest_ActionExternal,
TransferCallActionUpdateParams,
EndConversationActionUpdateParams,
DtmfActionUpdateParams,
AddToConferenceActionUpdateParams,
SetHoldActionUpdateParams,
ExternalActionUpdateParams,
]
31 changes: 23 additions & 8 deletions src/vocode/types/agent_update_params_actions_item_one.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,27 @@

import typing

import typing_extensions

from .add_to_conference_action_update_params import AddToConferenceActionUpdateParams
from .dtmf_action_update_params import DtmfActionUpdateParams
from .end_conversation_action_update_params import EndConversationActionUpdateParams
from .transfer_call_action_update_params import TransferCallActionUpdateParams
from .add_to_conference_action_update_params import AddToConferenceActionUpdateParams
from .external_action_update_params import ExternalActionUpdateParams
from .set_hold_action_update_params import SetHoldActionUpdateParams
from .transfer_call_action_update_params import TransferCallActionUpdateParams


class AgentUpdateParamsActionsItemOne_ActionTransferCall(TransferCallActionUpdateParams):
class AgentUpdateParamsActionsItemOne_ActionTransferCall(
TransferCallActionUpdateParams
):

class Config:
frozen = True
smart_union = True
allow_population_by_field_name = True


class AgentUpdateParamsActionsItemOne_ActionEndConversation(EndConversationActionUpdateParams):
class AgentUpdateParamsActionsItemOne_ActionEndConversation(
EndConversationActionUpdateParams
):

class Config:
frozen = True
Expand All @@ -35,23 +38,35 @@ class Config:
smart_union = True
allow_population_by_field_name = True

class AgentUpdateParamsActionsItemOne_ActionAddToConference(AddToConferenceActionUpdateParams):

class AgentUpdateParamsActionsItemOne_ActionAddToConference(
AddToConferenceActionUpdateParams
):
class Config:
frozen = True
smart_union = True
allow_population_by_field_name = True


class AgentUpdateParamsActionsItemOne_ActionSetHold(SetHoldActionUpdateParams):
class Config:
frozen = True
smart_union = True
allow_population_by_field_name = True


class AgentUpdateParamsActionsItemOne_ActionExternal(ExternalActionUpdateParams):
class Config:
frozen = True
smart_union = True
allow_population_by_field_name = True


AgentUpdateParamsActionsItemOne = typing.Union[
TransferCallActionUpdateParams,
EndConversationActionUpdateParams,
DtmfActionUpdateParams,
AddToConferenceActionUpdateParams,
SetHoldActionUpdateParams
SetHoldActionUpdateParams,
ExternalActionUpdateParams,
]
38 changes: 26 additions & 12 deletions src/vocode/types/create_call_agent_params_actions_item_one.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@

import typing

import typing_extensions

from .add_to_conference_action_params import AddToConferenceActionParams
from .dtmf_action_params import DtmfActionParams
from .end_conversation_action_params import EndConversationActionParams
from .transfer_call_action_params import TransferCallActionParams
from .add_to_conference_action_params import AddToConferenceActionParams
from .external_action_params import ExternalActionParams
from .set_hold_action_params import SetHoldActionParams
from .transfer_call_action_params import TransferCallActionParams


class CreateCallAgentParamsActionsItemOne_ActionTransferCall(TransferCallActionParams):
Expand All @@ -21,7 +20,9 @@ class Config:
allow_population_by_field_name = True


class CreateCallAgentParamsActionsItemOne_ActionEndConversation(EndConversationActionParams):
class CreateCallAgentParamsActionsItemOne_ActionEndConversation(
EndConversationActionParams
):

class Config:
frozen = True
Expand All @@ -36,25 +37,38 @@ class Config:
smart_union = True
allow_population_by_field_name = True

class CreateCallAgentParamsActionsItemOne_ActionAddToConference(AddToConferenceActionParams):

class CreateCallAgentParamsActionsItemOne_ActionAddToConference(
AddToConferenceActionParams
):

class Config:
frozen = True
smart_union = True
allow_population_by_field_name = True


class CreateCallAgentParamsActionsItemOne_ActionSetHold(SetHoldActionParams):

class Config:
frozen = True
smart_union = True
allow_population_by_field_name = True

class Config:
frozen = True
smart_union = True
allow_population_by_field_name = True


class CreateCallAgentParamsActionsItemOne_ActionExternal(ExternalActionParams):

class Config:
frozen = True
smart_union = True
allow_population_by_field_name = True


CreateCallAgentParamsActionsItemOne = typing.Union[
TransferCallActionParams,
EndConversationActionParams,
DtmfActionParams,
AddToConferenceActionParams,
SetHoldActionParams
SetHoldActionParams,
ExternalActionParams,
]
15 changes: 13 additions & 2 deletions src/vocode/types/external_action_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import datetime as dt
import typing

import typing_extensions

from ..core.datetime_utils import serialize_datetime
from .external_action_config import ExternalActionConfig
from .external_action_params_action_trigger import ExternalActionParamsActionTrigger
Expand All @@ -14,15 +16,24 @@


class ExternalActionParams(pydantic.BaseModel):
type: typing_extensions.Literal["action_external"]
config: ExternalActionConfig
action_trigger: typing.Optional[ExternalActionParamsActionTrigger]

def json(self, **kwargs: typing.Any) -> str:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
kwargs_with_defaults: typing.Any = {
"by_alias": True,
"exclude_unset": True,
**kwargs,
}
return super().json(**kwargs_with_defaults)

def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
kwargs_with_defaults: typing.Any = {
"by_alias": True,
"exclude_unset": True,
**kwargs,
}
return super().dict(**kwargs_with_defaults)

class Config:
Expand Down
19 changes: 16 additions & 3 deletions src/vocode/types/external_action_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
import datetime as dt
import typing

import typing_extensions

from ..core.datetime_utils import serialize_datetime
from .external_action_update_params_action_trigger import ExternalActionUpdateParamsActionTrigger
from .external_action_update_params_action_trigger import (
ExternalActionUpdateParamsActionTrigger,
)
from .external_action_update_params_config import ExternalActionUpdateParamsConfig

try:
Expand All @@ -14,15 +18,24 @@


class ExternalActionUpdateParams(pydantic.BaseModel):
type: typing_extensions.Literal["action_external"]
config: typing.Optional[ExternalActionUpdateParamsConfig]
action_trigger: typing.Optional[ExternalActionUpdateParamsActionTrigger]

def json(self, **kwargs: typing.Any) -> str:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
kwargs_with_defaults: typing.Any = {
"by_alias": True,
"exclude_unset": True,
**kwargs,
}
return super().json(**kwargs_with_defaults)

def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
kwargs_with_defaults: typing.Any = {
"by_alias": True,
"exclude_unset": True,
**kwargs,
}
return super().dict(**kwargs_with_defaults)

class Config:
Expand Down
Loading