Skip to content

Commit

Permalink
Merge pull request #8 from vocodedev/mac/manual-documentation-fix
Browse files Browse the repository at this point in the history
Fix SDK
  • Loading branch information
Mac Wilkinson authored Apr 16, 2024
2 parents a3c6633 + bb10a4d commit ce3d953
Show file tree
Hide file tree
Showing 7 changed files with 108 additions and 39 deletions.
2 changes: 2 additions & 0 deletions .fernignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
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

0 comments on commit ce3d953

Please sign in to comment.