From 41e883a0cefca80090b52e52bf57d1297ddf5966 Mon Sep 17 00:00:00 2001 From: srhinos <6531393+srhinos@users.noreply.github.com> Date: Tue, 16 Apr 2024 13:36:20 -0400 Subject: [PATCH 1/3] Fix SDK Build Manually --- src/vocode/types/action_params_request.py | 22 ++++++++--- .../types/action_update_params_request.py | 20 ++++++---- .../agent_update_params_actions_item_one.py | 31 +++++++++++---- ...eate_call_agent_params_actions_item_one.py | 38 +++++++++++++------ src/vocode/types/external_action_params.py | 15 +++++++- .../types/external_action_update_params.py | 19 ++++++++-- 6 files changed, 106 insertions(+), 39 deletions(-) diff --git a/src/vocode/types/action_params_request.py b/src/vocode/types/action_params_request.py index 81bbe0a..d454cea 100644 --- a/src/vocode/types/action_params_request.py +++ b/src/vocode/types/action_params_request.py @@ -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): @@ -36,6 +35,7 @@ class Config: smart_union = True allow_population_by_field_name = True + class ActionParamsRequest_ActionAddToConference(AddToConferenceActionParams): class Config: @@ -43,18 +43,28 @@ class Config: 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_ActionExternalAction(ExternalActionParams): + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + ActionParamsRequest = typing.Union[ TransferCallActionParams, EndConversationActionParams, DtmfActionParams, AddToConferenceActionParams, - SetHoldActionParams + SetHoldActionParams, + ExternalActionParams, ] diff --git a/src/vocode/types/action_update_params_request.py b/src/vocode/types/action_update_params_request.py index f3ad202..adfe5a0 100644 --- a/src/vocode/types/action_update_params_request.py +++ b/src/vocode/types/action_update_params_request.py @@ -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: @@ -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: @@ -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, ] diff --git a/src/vocode/types/agent_update_params_actions_item_one.py b/src/vocode/types/agent_update_params_actions_item_one.py index 377d2af..ca02634 100644 --- a/src/vocode/types/agent_update_params_actions_item_one.py +++ b/src/vocode/types/agent_update_params_actions_item_one.py @@ -4,16 +4,17 @@ 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 @@ -21,7 +22,9 @@ class Config: allow_population_by_field_name = True -class AgentUpdateParamsActionsItemOne_ActionEndConversation(EndConversationActionUpdateParams): +class AgentUpdateParamsActionsItemOne_ActionEndConversation( + EndConversationActionUpdateParams +): class Config: frozen = True @@ -35,12 +38,16 @@ 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 @@ -48,10 +55,18 @@ class Config: allow_population_by_field_name = True +class AgentUpdateParamsActionsItemOne_ActionExternalAction(ExternalActionUpdateParams): + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + + AgentUpdateParamsActionsItemOne = typing.Union[ TransferCallActionUpdateParams, EndConversationActionUpdateParams, DtmfActionUpdateParams, AddToConferenceActionUpdateParams, - SetHoldActionUpdateParams + SetHoldActionUpdateParams, + ExternalActionUpdateParams, ] diff --git a/src/vocode/types/create_call_agent_params_actions_item_one.py b/src/vocode/types/create_call_agent_params_actions_item_one.py index 59c43bc..6dbda63 100644 --- a/src/vocode/types/create_call_agent_params_actions_item_one.py +++ b/src/vocode/types/create_call_agent_params_actions_item_one.py @@ -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): @@ -21,7 +20,9 @@ class Config: allow_population_by_field_name = True -class CreateCallAgentParamsActionsItemOne_ActionEndConversation(EndConversationActionParams): +class CreateCallAgentParamsActionsItemOne_ActionEndConversation( + EndConversationActionParams +): class Config: frozen = True @@ -36,19 +37,31 @@ 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_ActionExternalAction(ExternalActionParams): + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True CreateCallAgentParamsActionsItemOne = typing.Union[ @@ -56,5 +69,6 @@ class Config: EndConversationActionParams, DtmfActionParams, AddToConferenceActionParams, - SetHoldActionParams + SetHoldActionParams, + ExternalActionParams, ] diff --git a/src/vocode/types/external_action_params.py b/src/vocode/types/external_action_params.py index effa433..99554d8 100644 --- a/src/vocode/types/external_action_params.py +++ b/src/vocode/types/external_action_params.py @@ -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 @@ -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: diff --git a/src/vocode/types/external_action_update_params.py b/src/vocode/types/external_action_update_params.py index fedad31..e0336cc 100644 --- a/src/vocode/types/external_action_update_params.py +++ b/src/vocode/types/external_action_update_params.py @@ -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: @@ -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: From e8be6e31d94976253b7ac64e992cd09ff733f5f6 Mon Sep 17 00:00:00 2001 From: srhinos <6531393+srhinos@users.noreply.github.com> Date: Tue, 16 Apr 2024 13:39:16 -0400 Subject: [PATCH 2/3] Fix Naming --- src/vocode/types/action_params_request.py | 2 +- src/vocode/types/agent_update_params_actions_item_one.py | 2 +- src/vocode/types/create_call_agent_params_actions_item_one.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vocode/types/action_params_request.py b/src/vocode/types/action_params_request.py index d454cea..ab00f95 100644 --- a/src/vocode/types/action_params_request.py +++ b/src/vocode/types/action_params_request.py @@ -52,7 +52,7 @@ class Config: allow_population_by_field_name = True -class ActionParamsRequest_ActionExternalAction(ExternalActionParams): +class ActionParamsRequest_ActionExternal(ExternalActionParams): class Config: frozen = True diff --git a/src/vocode/types/agent_update_params_actions_item_one.py b/src/vocode/types/agent_update_params_actions_item_one.py index ca02634..05da253 100644 --- a/src/vocode/types/agent_update_params_actions_item_one.py +++ b/src/vocode/types/agent_update_params_actions_item_one.py @@ -55,7 +55,7 @@ class Config: allow_population_by_field_name = True -class AgentUpdateParamsActionsItemOne_ActionExternalAction(ExternalActionUpdateParams): +class AgentUpdateParamsActionsItemOne_ActionExternal(ExternalActionUpdateParams): class Config: frozen = True smart_union = True diff --git a/src/vocode/types/create_call_agent_params_actions_item_one.py b/src/vocode/types/create_call_agent_params_actions_item_one.py index 6dbda63..672037a 100644 --- a/src/vocode/types/create_call_agent_params_actions_item_one.py +++ b/src/vocode/types/create_call_agent_params_actions_item_one.py @@ -56,7 +56,7 @@ class Config: allow_population_by_field_name = True -class CreateCallAgentParamsActionsItemOne_ActionExternalAction(ExternalActionParams): +class CreateCallAgentParamsActionsItemOne_ActionExternal(ExternalActionParams): class Config: frozen = True From bb10a4d1aa9e0c7e950da29d195f949b0541a6d7 Mon Sep 17 00:00:00 2001 From: srhinos <6531393+srhinos@users.noreply.github.com> Date: Tue, 16 Apr 2024 14:25:41 -0400 Subject: [PATCH 3/3] Add Files to fernignore --- .fernignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.fernignore b/.fernignore index 6fdfa36..bbc7e77 100644 --- a/.fernignore +++ b/.fernignore @@ -24,6 +24,7 @@ src/vocode/types/end_conversation_action_update_params.py src/vocode/types/transfer_call_action_update_params.py src/vocode/types/add_to_conference_action_update_params.py src/vocode/types/set_hold_action_update_params.py +src/vocode/types/external_action_update_params.py src/vocode/types/create_call_agent_params_actions_item_one.py src/vocode/types/action_params_request.py @@ -33,5 +34,6 @@ src/vocode/types/end_conversation_action_params.py src/vocode/types/transfer_call_action_params.py src/vocode/types/add_to_conference_action_params.py src/vocode/types/set_hold_action_params.py +src/vocode/types/external_action_params.py tests/test_client.py