""" Options: Date: 2025-05-04 22:10:17 Version: 8.71 Tip: To override a DTO option, remove "#" prefix before updating BaseUrl: https://team.evovoice.io #GlobalNamespace: #AddServiceStackTypes: True #AddResponseStatus: False #AddImplicitVersion: #AddDescriptionAsComments: True IncludeTypes: GetEndpointAppConfig.* #ExcludeTypes: #DefaultImports: datetime,decimal,marshmallow.fields:*,servicestack:*,typing:*,dataclasses:dataclass/field,dataclasses_json:dataclass_json/LetterCase/Undefined/config,enum:Enum/IntEnum #DataClass: #DataClassJson: """ import datetime import decimal from marshmallow.fields import * from servicestack import * from typing import * from dataclasses import dataclass, field from dataclasses_json import dataclass_json, LetterCase, Undefined, config from enum import Enum, IntEnum class DeviceTypes(str, Enum): WEB = 'Web' I_O_S = 'iOS' ANDROID = 'Android' @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class AppSettings: enable_phone_number_management: bool = False enable_device_management: bool = False enable_dialer: bool = False enable_call_history: bool = False enable_assistants: bool = False show_file_name_in_message_center: bool = False chakra_theme: Optional[str] = None custom_css: Optional[str] = None page_title: Optional[str] = None string_mappings: Optional[str] = None logout_url: Optional[str] = None port_my_number_url: Optional[str] = None class ThirdPartyPhoneSystemTypes(str, Enum): DEMO = 'Demo' SIP = 'Sip' class TransportTypes(str, Enum): UDP = 'UDP' TLS = 'TLS' TCP = 'TCP' PERS = 'PERS' class AudioCodecTypes(IntEnum): PCMU = 0 GSM = 3 PCMA = 8 G722 = 9 G729 = 18 ILBC = 97 AMR = 98 AMRWB = 99 SPEEX = 100 DTMF = 101 SPEEXWB = 102 ISACWB = 103 ISACSWB = 104 OPUS = 105 G7221 = 121 NONE = -1 class DtmfMethods(str, Enum): RF_C2833 = 'RFC2833' INFO = 'INFO' @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class ThirdPartySipAccountSettings: number: Optional[str] = None agent: Optional[str] = None auth_name: Optional[str] = None user_name: Optional[str] = None display_name: Optional[str] = None password: Optional[str] = None user_domain: Optional[str] = None registration_expires: int = 0 transport_type: Optional[TransportTypes] = None local_i_p: Optional[str] = None local_port: int = 0 sip_server: Optional[str] = None sip_server_port: int = 0 outbound_server: Optional[str] = None outbound_server_port: int = 0 stun_server: Optional[str] = None stun_port: int = 0 audio_playback_device_name: Optional[str] = None audio_recording_device_name: Optional[str] = None audio_codecs: Optional[List[AudioCodecTypes]] = None dtmf_method: Optional[DtmfMethods] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class ThirdPartySipSettings: accounts: Optional[List[ThirdPartySipAccountSettings]] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class ThirdPartyDemoSettings: extension: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class ThirdPartyPhoneSystemSettings: type: Optional[ThirdPartyPhoneSystemTypes] = None sip_settings: Optional[ThirdPartySipSettings] = None demo_settings: Optional[ThirdPartyDemoSettings] = None class AgentStates(str, Enum): UNKNOWN = 'Unknown' READY = 'Ready' NOT_READY = 'NotReady' LOGGED_OUT = 'LoggedOut' WRAP_UP = 'WrapUp' OUTGOING = 'Outgoing' OTHER = 'Other' class AgentStateReasons(str, Enum): UNKNOWN = 'Unknown' SET_BY_USER = 'SetByUser' MISSED_CALL = 'MissedCall' SET_BY_SYSTEM = 'SetBySystem' @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class AppUserInfo: # @ApiMember(Description="The user's first name") first_name: Optional[str] = None """ The user's first name """ # @ApiMember(Description="The user's last name") last_name: Optional[str] = None """ The user's last name """ # @ApiMember(Description="Shortcut to the user's full name") name: Optional[str] = None """ Shortcut to the user's full name """ # @ApiMember(Description="The URL to the user's avatar") avatar_url: Optional[str] = None """ The URL to the user's avatar """ @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class AppConfig: # @ApiMember(Description="The ID of this endpoint") endpoint_id: Optional[str] = None """ The ID of this endpoint """ # @ApiMember(Description="The ID of the account") account_id: Optional[str] = None """ The ID of the account """ # @ApiMember(Description="The customer ID associated with this user") customer_id: Optional[str] = None """ The customer ID associated with this user """ # @ApiMember(Description="The access token for use with Twilio Voice") access_token: Optional[str] = None """ The access token for use with Twilio Voice """ # @ApiMember(Description="The access token's identity") identity: Optional[str] = None """ The access token's identity """ # @ApiMember(Description="The email address of the user") email_address: Optional[str] = None """ The email address of the user """ # @ApiMember(Description="The user's information") user_info: Optional[AppUserInfo] = None """ The user's information """ # @ApiMember(Description="The agent state (for call center users)") agent_state: Optional[AgentStates] = None """ The agent state (for call center users) """ # @ApiMember(Description="The agent state reason") agent_state_reason: Optional[AgentStateReasons] = None """ The agent state reason """ # @ApiMember(Description="The tabs for the app") tabs: Optional[List[Object]] = None """ The tabs for the app """ # @ApiMember(Description="The app settings") app_settings: Optional[AppSettings] = None """ The app settings """ # @ApiMember(Description="The phone settings for third party connectivity") third_party_phone_system_settings: Optional[ThirdPartyPhoneSystemSettings] = None """ The phone settings for third party connectivity """ # @Route("/endpoints/app/config", "GET") @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class GetEndpointAppConfig(IReturn[AppConfig]): # @ApiMember(Description="The endpoint whose config you want to get (this must be a User)") endpoint_id: Optional[str] = None """ The endpoint whose config you want to get (this must be a User) """ # @ApiMember(Description="The endpoint email address whose config you want to get (this must be a User) - EndpointId takes priority over this") endpoint_email_address: Optional[str] = None """ The endpoint email address whose config you want to get (this must be a User) - EndpointId takes priority over this """ # @ApiMember(Description="The type of device you are requesting config for") device_type: Optional[DeviceTypes] = None """ The type of device you are requesting config for """ # @ApiMember(Description="Use a specific push credential SID") push_credential_sid: Optional[str] = None """ Use a specific push credential SID """ # @ApiMember(Description="Use a specific application SID") application_sid: Optional[str] = None """ Use a specific application SID """ # @ApiMember(Description="Is this device operating in a sandbox environment? IOS only.") sandbox: bool = False """ Is this device operating in a sandbox environment? IOS only. """