Requires any of the roles: | SystemAdministrator, Manager, Customer |
GET | /endpoints/app/config |
---|
"use strict";
export class AppUserInfo {
/** @param {{firstName?:string,lastName?:string,name?:string,avatarUrl?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description The user's first name */
firstName;
/**
* @type {string}
* @description The user's last name */
lastName;
/**
* @type {string}
* @description Shortcut to the user's full name */
name;
/**
* @type {string}
* @description The URL to the user's avatar */
avatarUrl;
}
/** @typedef {'Unknown'|'Ready'|'NotReady'|'LoggedOut'|'WrapUp'|'Outgoing'|'Other'} */
export var AgentStates;
(function (AgentStates) {
AgentStates["Unknown"] = "Unknown"
AgentStates["Ready"] = "Ready"
AgentStates["NotReady"] = "NotReady"
AgentStates["LoggedOut"] = "LoggedOut"
AgentStates["WrapUp"] = "WrapUp"
AgentStates["Outgoing"] = "Outgoing"
AgentStates["Other"] = "Other"
})(AgentStates || (AgentStates = {}));
/** @typedef {'Unknown'|'SetByUser'|'MissedCall'|'SetBySystem'} */
export var AgentStateReasons;
(function (AgentStateReasons) {
AgentStateReasons["Unknown"] = "Unknown"
AgentStateReasons["SetByUser"] = "SetByUser"
AgentStateReasons["MissedCall"] = "MissedCall"
AgentStateReasons["SetBySystem"] = "SetBySystem"
})(AgentStateReasons || (AgentStateReasons = {}));
export class AppSettings {
/** @param {{enablePhoneNumberManagement?:boolean,enableDeviceManagement?:boolean,enableDialer?:boolean,enableCallHistory?:boolean,enableAssistants?:boolean,showFileNameInMessageCenter?:boolean,chakraTheme?:string,customCss?:string,pageTitle?:string,stringMappings?:string,logoutUrl?:string,portMyNumberUrl?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {boolean} */
enablePhoneNumberManagement;
/** @type {boolean} */
enableDeviceManagement;
/** @type {boolean} */
enableDialer;
/** @type {boolean} */
enableCallHistory;
/** @type {boolean} */
enableAssistants;
/** @type {boolean} */
showFileNameInMessageCenter;
/** @type {string} */
chakraTheme;
/** @type {string} */
customCss;
/** @type {string} */
pageTitle;
/** @type {string} */
stringMappings;
/** @type {string} */
logoutUrl;
/** @type {string} */
portMyNumberUrl;
}
/** @typedef {'Demo'|'Sip'} */
export var ThirdPartyPhoneSystemTypes;
(function (ThirdPartyPhoneSystemTypes) {
ThirdPartyPhoneSystemTypes["Demo"] = "Demo"
ThirdPartyPhoneSystemTypes["Sip"] = "Sip"
})(ThirdPartyPhoneSystemTypes || (ThirdPartyPhoneSystemTypes = {}));
/** @typedef {'UDP'|'TLS'|'TCP'|'PERS'} */
export var TransportTypes;
(function (TransportTypes) {
TransportTypes["UDP"] = "UDP"
TransportTypes["TLS"] = "TLS"
TransportTypes["TCP"] = "TCP"
TransportTypes["PERS"] = "PERS"
})(TransportTypes || (TransportTypes = {}));
/** @typedef {number} */
export var AudioCodecTypes;
(function (AudioCodecTypes) {
AudioCodecTypes[AudioCodecTypes["PCMU"] = 0] = "PCMU"
AudioCodecTypes[AudioCodecTypes["GSM"] = 3] = "GSM"
AudioCodecTypes[AudioCodecTypes["PCMA"] = 8] = "PCMA"
AudioCodecTypes[AudioCodecTypes["G722"] = 9] = "G722"
AudioCodecTypes[AudioCodecTypes["G729"] = 18] = "G729"
AudioCodecTypes[AudioCodecTypes["ILBC"] = 97] = "ILBC"
AudioCodecTypes[AudioCodecTypes["AMR"] = 98] = "AMR"
AudioCodecTypes[AudioCodecTypes["AMRWB"] = 99] = "AMRWB"
AudioCodecTypes[AudioCodecTypes["SPEEX"] = 100] = "SPEEX"
AudioCodecTypes[AudioCodecTypes["DTMF"] = 101] = "DTMF"
AudioCodecTypes[AudioCodecTypes["SPEEXWB"] = 102] = "SPEEXWB"
AudioCodecTypes[AudioCodecTypes["ISACWB"] = 103] = "ISACWB"
AudioCodecTypes[AudioCodecTypes["ISACSWB"] = 104] = "ISACSWB"
AudioCodecTypes[AudioCodecTypes["OPUS"] = 105] = "OPUS"
AudioCodecTypes[AudioCodecTypes["G7221"] = 121] = "G7221"
AudioCodecTypes[AudioCodecTypes["NONE"] = -1] = "NONE"
})(AudioCodecTypes || (AudioCodecTypes = {}));
/** @typedef {'RFC2833'|'INFO'} */
export var DtmfMethods;
(function (DtmfMethods) {
DtmfMethods["RFC2833"] = "RFC2833"
DtmfMethods["INFO"] = "INFO"
})(DtmfMethods || (DtmfMethods = {}));
export class ThirdPartySipAccountSettings {
/** @param {{number?:string,agent?:string,authName?:string,userName?:string,displayName?:string,password?:string,userDomain?:string,registrationExpires?:number,transportType?:TransportTypes,localIP?:string,localPort?:number,sipServer?:string,sipServerPort?:number,outboundServer?:string,outboundServerPort?:number,stunServer?:string,stunPort?:number,audioPlaybackDeviceName?:string,audioRecordingDeviceName?:string,audioCodecs?:AudioCodecTypes[],dtmfMethod?:DtmfMethods}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
number;
/** @type {string} */
agent;
/** @type {string} */
authName;
/** @type {string} */
userName;
/** @type {string} */
displayName;
/** @type {string} */
password;
/** @type {string} */
userDomain;
/** @type {number} */
registrationExpires;
/** @type {TransportTypes} */
transportType;
/** @type {string} */
localIP;
/** @type {number} */
localPort;
/** @type {string} */
sipServer;
/** @type {number} */
sipServerPort;
/** @type {string} */
outboundServer;
/** @type {number} */
outboundServerPort;
/** @type {string} */
stunServer;
/** @type {number} */
stunPort;
/** @type {string} */
audioPlaybackDeviceName;
/** @type {string} */
audioRecordingDeviceName;
/** @type {AudioCodecTypes[]} */
audioCodecs;
/** @type {DtmfMethods} */
dtmfMethod;
}
export class ThirdPartySipSettings {
/** @param {{accounts?:ThirdPartySipAccountSettings[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {ThirdPartySipAccountSettings[]} */
accounts;
}
export class ThirdPartyDemoSettings {
/** @param {{extension?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
extension;
}
export class ThirdPartyPhoneSystemSettings {
/** @param {{type?:ThirdPartyPhoneSystemTypes,sipSettings?:ThirdPartySipSettings,demoSettings?:ThirdPartyDemoSettings}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {ThirdPartyPhoneSystemTypes} */
type;
/** @type {ThirdPartySipSettings} */
sipSettings;
/** @type {ThirdPartyDemoSettings} */
demoSettings;
}
export class AppConfig {
/** @param {{endpointId?:string,accountId?:string,customerId?:string,accessToken?:string,identity?:string,emailAddress?:string,userInfo?:AppUserInfo,agentState?:AgentStates,agentStateReason?:AgentStateReasons,tabs?:Object[],appSettings?:AppSettings,thirdPartyPhoneSystemSettings?:ThirdPartyPhoneSystemSettings}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description The ID of this endpoint */
endpointId;
/**
* @type {string}
* @description The ID of the account */
accountId;
/**
* @type {string}
* @description The customer ID associated with this user */
customerId;
/**
* @type {string}
* @description The access token for use with Twilio Voice */
accessToken;
/**
* @type {string}
* @description The access token's identity */
identity;
/**
* @type {string}
* @description The email address of the user */
emailAddress;
/**
* @type {AppUserInfo}
* @description The user's information */
userInfo;
/**
* @type {AgentStates}
* @description The agent state (for call center users) */
agentState;
/**
* @type {AgentStateReasons}
* @description The agent state reason */
agentStateReason;
/**
* @type {Object[]}
* @description The tabs for the app */
tabs;
/**
* @type {AppSettings}
* @description The app settings */
appSettings;
/**
* @type {ThirdPartyPhoneSystemSettings}
* @description The phone settings for third party connectivity */
thirdPartyPhoneSystemSettings;
}
/** @typedef {'Web'|'iOS'|'Android'} */
export var DeviceTypes;
(function (DeviceTypes) {
DeviceTypes["Web"] = "Web"
DeviceTypes["iOS"] = "iOS"
DeviceTypes["Android"] = "Android"
})(DeviceTypes || (DeviceTypes = {}));
export class GetEndpointAppConfig {
/** @param {{endpointId?:string,endpointEmailAddress?:string,deviceType?:DeviceTypes,pushCredentialSid?:string,applicationSid?:string,sandbox?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description The endpoint whose config you want to get (this must be a User) */
endpointId;
/**
* @type {string}
* @description The endpoint email address whose config you want to get (this must be a User) - EndpointId takes priority over this */
endpointEmailAddress;
/**
* @type {DeviceTypes}
* @description The type of device you are requesting config for */
deviceType;
/**
* @type {string}
* @description Use a specific push credential SID */
pushCredentialSid;
/**
* @type {string}
* @description Use a specific application SID */
applicationSid;
/**
* @type {boolean}
* @description Is this device operating in a sandbox environment? IOS only. */
sandbox;
}
JavaScript GetEndpointAppConfig DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /endpoints/app/config HTTP/1.1 Host: team.evovoice.io Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <AppConfig xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Voice.Api.App"> <AccessToken>String</AccessToken> <AccountId>String</AccountId> <AgentState>Unknown</AgentState> <AgentStateReason>Unknown</AgentStateReason> <AppSettings xmlns:d2p1="http://schemas.datacontract.org/2004/07/Voice.Api.Customers"> <d2p1:ChakraTheme>String</d2p1:ChakraTheme> <d2p1:CustomCss>String</d2p1:CustomCss> <d2p1:EnableAssistants>false</d2p1:EnableAssistants> <d2p1:EnableCallHistory>false</d2p1:EnableCallHistory> <d2p1:EnableDeviceManagement>false</d2p1:EnableDeviceManagement> <d2p1:EnableDialer>false</d2p1:EnableDialer> <d2p1:EnablePhoneNumberManagement>false</d2p1:EnablePhoneNumberManagement> <d2p1:LogoutUrl>String</d2p1:LogoutUrl> <d2p1:PageTitle>String</d2p1:PageTitle> <d2p1:PortMyNumberUrl>String</d2p1:PortMyNumberUrl> <d2p1:ShowFileNameInMessageCenter>false</d2p1:ShowFileNameInMessageCenter> <d2p1:StringMappings>String</d2p1:StringMappings> </AppSettings> <CustomerId>String</CustomerId> <EmailAddress>String</EmailAddress> <EndpointId>String</EndpointId> <Identity>String</Identity> <Tabs xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:anyType /> </Tabs> <ThirdPartyPhoneSystemSettings xmlns:d2p1="http://schemas.datacontract.org/2004/07/Voice.Api.Endpoints"> <d2p1:DemoSettings> <d2p1:Extension>String</d2p1:Extension> </d2p1:DemoSettings> <d2p1:SipSettings> <d2p1:Accounts> <d2p1:ThirdPartyPhoneSystemSettings.ThirdPartySipSettings.ThirdPartySipAccountSettings> <d2p1:Agent>String</d2p1:Agent> <d2p1:AudioCodecs> <d2p1:ThirdPartyPhoneSystemSettings.ThirdPartySipSettings.AudioCodecTypes>PCMU</d2p1:ThirdPartyPhoneSystemSettings.ThirdPartySipSettings.AudioCodecTypes> </d2p1:AudioCodecs> <d2p1:AudioPlaybackDeviceName>String</d2p1:AudioPlaybackDeviceName> <d2p1:AudioRecordingDeviceName>String</d2p1:AudioRecordingDeviceName> <d2p1:AuthName>String</d2p1:AuthName> <d2p1:DTMFMethod>RFC2833</d2p1:DTMFMethod> <d2p1:DisplayName>String</d2p1:DisplayName> <d2p1:LocalIP>String</d2p1:LocalIP> <d2p1:LocalPort>0</d2p1:LocalPort> <d2p1:Number>String</d2p1:Number> <d2p1:OutboundServer>String</d2p1:OutboundServer> <d2p1:OutboundServerPort>0</d2p1:OutboundServerPort> <d2p1:Password>String</d2p1:Password> <d2p1:RegistrationExpires>0</d2p1:RegistrationExpires> <d2p1:SipServer>String</d2p1:SipServer> <d2p1:SipServerPort>0</d2p1:SipServerPort> <d2p1:StunPort>0</d2p1:StunPort> <d2p1:StunServer>String</d2p1:StunServer> <d2p1:TransportType>UDP</d2p1:TransportType> <d2p1:UserDomain>String</d2p1:UserDomain> <d2p1:UserName>String</d2p1:UserName> </d2p1:ThirdPartyPhoneSystemSettings.ThirdPartySipSettings.ThirdPartySipAccountSettings> </d2p1:Accounts> </d2p1:SipSettings> <d2p1:Type>Demo</d2p1:Type> </ThirdPartyPhoneSystemSettings> <UserInfo> <AvatarUrl>String</AvatarUrl> <FirstName>String</FirstName> <LastName>String</LastName> <Name>String</Name> </UserInfo> </AppConfig>