Required role: | User |
GET | /app/config |
---|
export class NodeParameterMap
{
[key:string] : NodeParameter;
public constructor(init?: Partial<NodeParameterMap>) { (Object as any).assign(this, init); }
}
export class AppUserInfo
{
/** @description The user's first name */
// @ApiMember(Description="The user's first name")
public firstName: string;
/** @description The user's last name */
// @ApiMember(Description="The user's last name")
public lastName: string;
/** @description Shortcut to the user's full name */
// @ApiMember(Description="Shortcut to the user's full name")
public name: string;
/** @description The URL to the user's avatar */
// @ApiMember(Description="The URL to the user's avatar")
public avatarUrl: string;
public constructor(init?: Partial<AppUserInfo>) { (Object as any).assign(this, init); }
}
export enum AgentStates
{
Unknown = 'Unknown',
Ready = 'Ready',
NotReady = 'NotReady',
LoggedOut = 'LoggedOut',
WrapUp = 'WrapUp',
Outgoing = 'Outgoing',
Other = 'Other',
}
export enum AgentStateReasons
{
Unknown = 'Unknown',
SetByUser = 'SetByUser',
MissedCall = 'MissedCall',
SetBySystem = 'SetBySystem',
}
export class AppSettings
{
public enablePhoneNumberManagement: boolean;
public enableDeviceManagement: boolean;
public enableDialer: boolean;
public enableCallHistory: boolean;
public enableAssistants: boolean;
public showFileNameInMessageCenter: boolean;
public chakraTheme: string;
public customCss: string;
public pageTitle: string;
public stringMappings: string;
public logoutUrl: string;
public portMyNumberUrl: string;
public constructor(init?: Partial<AppSettings>) { (Object as any).assign(this, init); }
}
export enum ThirdPartyPhoneSystemTypes
{
Demo = 'Demo',
Sip = 'Sip',
}
export enum TransportTypes
{
UDP = 'UDP',
TLS = 'TLS',
TCP = 'TCP',
PERS = 'PERS',
}
export enum AudioCodecTypes
{
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,
}
export enum DtmfMethods
{
RFC2833 = 'RFC2833',
INFO = 'INFO',
}
export class ThirdPartySipAccountSettings
{
public number: string;
public agent: string;
public authName: string;
public userName: string;
public displayName: string;
public password: string;
public userDomain: string;
public registrationExpires: number;
public transportType: TransportTypes;
public localIP: string;
public localPort: number;
public sipServer: string;
public sipServerPort: number;
public outboundServer: string;
public outboundServerPort: number;
public stunServer: string;
public stunPort: number;
public audioPlaybackDeviceName: string;
public audioRecordingDeviceName: string;
public audioCodecs: AudioCodecTypes[];
public dtmfMethod: DtmfMethods;
public constructor(init?: Partial<ThirdPartySipAccountSettings>) { (Object as any).assign(this, init); }
}
export class ThirdPartySipSettings
{
public accounts: ThirdPartySipAccountSettings[];
public constructor(init?: Partial<ThirdPartySipSettings>) { (Object as any).assign(this, init); }
}
export class ThirdPartyDemoSettings
{
public extension: string;
public constructor(init?: Partial<ThirdPartyDemoSettings>) { (Object as any).assign(this, init); }
}
export class ThirdPartyPhoneSystemSettings
{
public type: ThirdPartyPhoneSystemTypes;
public sipSettings: ThirdPartySipSettings;
public demoSettings: ThirdPartyDemoSettings;
public constructor(init?: Partial<ThirdPartyPhoneSystemSettings>) { (Object as any).assign(this, init); }
}
export class AppConfig
{
/** @description The ID of this endpoint */
// @ApiMember(Description="The ID of this endpoint")
public endpointId: string;
/** @description The ID of the account */
// @ApiMember(Description="The ID of the account")
public accountId: string;
/** @description The customer ID associated with this user */
// @ApiMember(Description="The customer ID associated with this user")
public customerId: string;
/** @description The access token for use with Twilio Voice */
// @ApiMember(Description="The access token for use with Twilio Voice")
public accessToken: string;
/** @description The access token's identity */
// @ApiMember(Description="The access token's identity")
public identity: string;
/** @description The email address of the user */
// @ApiMember(Description="The email address of the user")
public emailAddress: string;
/** @description The user's information */
// @ApiMember(Description="The user's information")
public userInfo: AppUserInfo;
/** @description The agent state (for call center users) */
// @ApiMember(Description="The agent state (for call center users)")
public agentState: AgentStates;
/** @description The agent state reason */
// @ApiMember(Description="The agent state reason")
public agentStateReason: AgentStateReasons;
/** @description The tabs for the app */
// @ApiMember(Description="The tabs for the app")
public tabs: Object[];
/** @description The app settings */
// @ApiMember(Description="The app settings")
public appSettings: AppSettings;
/** @description The phone settings for third party connectivity */
// @ApiMember(Description="The phone settings for third party connectivity")
public thirdPartyPhoneSystemSettings: ThirdPartyPhoneSystemSettings;
public constructor(init?: Partial<AppConfig>) { (Object as any).assign(this, init); }
}
export enum DeviceTypes
{
Web = 'Web',
iOS = 'iOS',
Android = 'Android',
}
/** @description Gets the config for the app including webRTC token */
// @Api(Description="Gets the config for the app including webRTC token")
export class GetAppConfig implements IGet
{
/** @description The type of device you are requesting config for */
// @ApiMember(Description="The type of device you are requesting config for")
public deviceType: DeviceTypes;
/** @description Use a specific push credential SID */
// @ApiMember(Description="Use a specific push credential SID")
public pushCredentialSid: string;
/** @description Use a specific application SID */
// @ApiMember(Description="Use a specific application SID")
public applicationSid: string;
/** @description Is this device operating in a sandbox environment? IOS only. */
// @ApiMember(Description="Is this device operating in a sandbox environment? IOS only.")
public sandbox: boolean;
public constructor(init?: Partial<GetAppConfig>) { (Object as any).assign(this, init); }
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /app/config HTTP/1.1 Host: team.evovoice.io Accept: text/jsv
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { endpointId: String, accountId: String, customerId: String, accessToken: String, identity: String, emailAddress: String, userInfo: { firstName: String, lastName: String, name: String, avatarUrl: String }, agentState: Unknown, agentStateReason: Unknown, tabs: [ { } ], appSettings: { enablePhoneNumberManagement: False, enableDeviceManagement: False, enableDialer: False, enableCallHistory: False, enableAssistants: False, showFileNameInMessageCenter: False, chakraTheme: String, customCss: String, pageTitle: String, stringMappings: String, logoutUrl: String, portMyNumberUrl: String }, thirdPartyPhoneSystemSettings: { type: Demo, sipSettings: { accounts: [ { number: String, agent: String, authName: String, userName: String, displayName: String, password: String, userDomain: String, registrationExpires: 0, transportType: UDP, localIP: String, localPort: 0, sipServer: String, sipServerPort: 0, outboundServer: String, outboundServerPort: 0, stunServer: String, stunPort: 0, audioPlaybackDeviceName: String, audioRecordingDeviceName: String, audioCodecs: [ PCMU ], dtmfMethod: RFC2833 } ] }, demoSettings: { extension: String } } }