Requires any of the roles: | SystemAdministrator, Manager, Customer |
PATCHY | /system/settings |
---|
namespace Voice.Api
open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<AllowNullLiteral>]
type EntityInfo() =
///<summary>
///The ID of the object
///</summary>
[<ApiMember(Description="The ID of the object")>]
member val Id:String = null with get,set
///<summary>
///The date the object was created
///</summary>
[<ApiMember(Description="The date the object was created")>]
member val DateCreated:String = null with get,set
///<summary>
///The date the object was last modified
///</summary>
[<ApiMember(Description="The date the object was last modified")>]
member val DateLastModified:String = null with get,set
///<summary>
///The user that created this object
///</summary>
[<ApiMember(Description="The user that created this object")>]
member val CreatedBy:String = null with get,set
///<summary>
///The user that last modified this object
///</summary>
[<ApiMember(Description="The user that last modified this object")>]
member val LastModifiedBy:String = null with get,set
type ValueTypes =
| NotSpecified = 0
| String = 1
| Boolean = 2
| Number = 3
| List = 4
| Struct = 5
| Transition = 6
| Custom = 7
| Date = 8
| AudioFile = 9
| TimeZoneId = 10
| PhoneNumber = 11
| User = 12
| Endpoint = 13
| Time = 14
| File = 15
| FaxNumber = 16
| EmailAccount = 17
| Customer = 18
| Flow = 19
| Team = 20
| FlowReference = 21
| Integration = 22
| Assistant = 23
type UIHints =
| None = 0
| LargeText = 1
| InlineForm = 2
| Password = 3
| InlineStruct = 4
[<AllowNullLiteral>]
type DataType() =
member val TypeName:String = null with get,set
member val Fields:ResizeArray<DataField> = null with get,set
[<AllowNullLiteral>]
type Struct() =
inherit Dictionary<String, Value>()
[<AllowNullLiteral>]
type Value() =
member val BoolValue:Nullable<Boolean> = new Nullable<Boolean>() with get,set
member val StringValue:String = null with get,set
member val NumberValue:Nullable<Double> = new Nullable<Double>() with get,set
member val ListValue:ResizeArray<Struct> = null with get,set
member val StructValue:Struct = null with get,set
type DataFieldUniqueness =
| NotUnique = 0
| Unique = 1
| UniqueToCustomer = 2
type UserDataFieldModes =
| Hidden = 0
| ReadOnly = 1
| ReadWrite = 2
[<AllowNullLiteral>]
type DataField() =
member val Id:String = null with get,set
member val Name:String = null with get,set
member val Type:ValueTypes = new ValueTypes() with get,set
member val UIHint:UIHints = new UIHints() with get,set
member val UITab:String = null with get,set
member val IsAsync:Boolean = new Boolean() with get,set
member val DisableBinding:Boolean = new Boolean() with get,set
member val StructType:DataType = null with get,set
member val ListType:DataType = null with get,set
member val Description:String = null with get,set
member val PossibleValues:ResizeArray<String> = null with get,set
member val IsOutput:Boolean = new Boolean() with get,set
member val CustomFieldValuesUrl:String = null with get,set
member val DefaultValue:Value = null with get,set
member val TransitionNameFormat:String = null with get,set
member val Uniqueness:DataFieldUniqueness = new DataFieldUniqueness() with get,set
member val VoiceOnly:Boolean = new Boolean() with get,set
member val ConditionalVisibilityField:String = null with get,set
member val ConditionalVisibilityValue:String = null with get,set
member val NoEvalTemplate:Boolean = new Boolean() with get,set
member val UserMode:UserDataFieldModes = new UserDataFieldModes() with get,set
member val AnyValueType:Boolean = new Boolean() with get,set
[<AllowNullLiteral>]
type SystemSettingsField() =
inherit DataField()
member val Value:Value = null with get,set
[<AllowNullLiteral>]
type CustomerDataField() =
inherit DataField()
member val ShowInSearch:Boolean = new Boolean() with get,set
type EndpointTypes =
| PhoneNumber = 0
| User = 1
| FaxNumber = 2
| EmailAddress = 3
| Unused_1 = 4
| Unused_2 = 5
| Unused_3 = 6
| Unused_4 = 7
| Unused_5 = 8
| Team = 9
| Assistant = 10
[<AllowNullLiteral>]
type EndpointDataField() =
inherit DataField()
member val ShowInSearch:Boolean = new Boolean() with get,set
member val ShowInLists:Boolean = new Boolean() with get,set
member val EndpointType:Nullable<EndpointTypes> = new Nullable<EndpointTypes>() with get,set
member val IsCallerId:Boolean = new Boolean() with get,set
member val IsKnob:Boolean = new Boolean() with get,set
[<AllowNullLiteral>]
type EmailAccount() =
member val Id:String = null with get,set
member val Server:String = null with get,set
member val UserName:String = null with get,set
member val Port:Int32 = new Int32() with get,set
member val EmailAddress:String = null with get,set
member val DisplayName:String = null with get,set
member val Password:String = null with get,set
type TagColors =
| Magenta = 0
| Red = 1
| Volcano = 2
| Orange = 3
| Gold = 4
| Lime = 5
| Green = 6
| Cyan = 7
| Blue = 8
| GeekBlue = 9
| Purple = 10
[<AllowNullLiteral>]
type Tag() =
member val Id:String = null with get,set
member val Name:String = null with get,set
member val Color:TagColors = new TagColors() with get,set
type TwilioSipRegions =
| NorthAmericaVirginia = 0
| NorthAmericaOregon = 1
| EuropeIreland = 2
| EuropeFrankfurt = 3
| AsiaPacificSingapore = 4
| AsiaPacificTokyo = 5
| AsiaPacificSydney = 6
| SouthAmericaSanPaolo = 7
[<AllowNullLiteral>]
type SystemSettingsInfo() =
inherit EntityInfo()
///<summary>
///Use to override the system time for testing
///</summary>
[<ApiMember(Description="Use to override the system time for testing")>]
member val OverrideSystemTime:Boolean = new Boolean() with get,set
///<summary>
///The system override time zone
///</summary>
[<ApiMember(Description="The system override time zone")>]
member val OverrideSystemTimeZoneId:String = null with get,set
///<summary>
///The system override date/time
///</summary>
[<ApiMember(Description="The system override date/time")>]
member val OverrideSystemDateTime:String = null with get,set
///<summary>
///The list of system settings fields
///</summary>
[<ApiMember(Description="The list of system settings fields")>]
member val SystemFields:ResizeArray<SystemSettingsField> = null with get,set
///<summary>
///The list of customer metadata fields
///</summary>
[<ApiMember(Description="The list of customer metadata fields")>]
member val CustomerFields:ResizeArray<CustomerDataField> = null with get,set
///<summary>
///The list of endpoint metadata fields
///</summary>
[<ApiMember(Description="The list of endpoint metadata fields")>]
member val EndpointFields:ResizeArray<EndpointDataField> = null with get,set
///<summary>
///The list of email accounts
///</summary>
[<ApiMember(Description="The list of email accounts")>]
member val EmailAccounts:ResizeArray<EmailAccount> = null with get,set
///<summary>
///The list of tags in the system
///</summary>
[<ApiMember(Description="The list of tags in the system")>]
member val Tags:ResizeArray<Tag> = null with get,set
///<summary>
///Documentation for the account
///</summary>
[<ApiMember(Description="Documentation for the account")>]
member val Documentation:String = null with get,set
///<summary>
///The number of days recordings are retained
///</summary>
[<ApiMember(Description="The number of days recordings are retained")>]
member val RecordingRetentionDays:Int32 = new Int32() with get,set
///<summary>
///Enable the SIP refer beta
///</summary>
[<ApiMember(Description="Enable the SIP refer beta")>]
member val EnableSipRefer:Boolean = new Boolean() with get,set
///<summary>
///The number of seconds after which we automatically logoff a not ready agent
///</summary>
[<ApiMember(Description="The number of seconds after which we automatically logoff a not ready agent")>]
member val AutoAgentLogoffSeconds:Int32 = new Int32() with get,set
///<summary>
///The default SIP region for new devices
///</summary>
[<ApiMember(Description="The default SIP region for new devices")>]
member val DefaultSipRegion:Nullable<TwilioSipRegions> = new Nullable<TwilioSipRegions>() with get,set
///<summary>
///Updates the system settings
///</summary>
[<Api(Description="Updates the system settings")>]
[<AllowNullLiteral>]
type PatchSystemSettings() =
interface IPatch
///<summary>
///Use to override the system time for testing
///</summary>
[<ApiMember(Description="Use to override the system time for testing")>]
member val OverrideSystemTime:Nullable<Boolean> = new Nullable<Boolean>() with get,set
///<summary>
///The system override time zone
///</summary>
[<ApiMember(Description="The system override time zone")>]
member val OverrideSystemTimeZoneId:String = null with get,set
///<summary>
///The system override date/time
///</summary>
[<ApiMember(Description="The system override date/time")>]
member val OverrideSystemDateTime:String = null with get,set
///<summary>
///The account ID of the system settings
///</summary>
[<ApiMember(Description="The account ID of the system settings")>]
member val AccountId:String = null with get,set
///<summary>
///The list of system settings fields
///</summary>
[<ApiMember(Description="The list of system settings fields")>]
member val SystemFields:ResizeArray<SystemSettingsField> = null with get,set
///<summary>
///The list of customer fields
///</summary>
[<ApiMember(Description="The list of customer fields")>]
member val CustomerFields:ResizeArray<CustomerDataField> = null with get,set
///<summary>
///The list of endpoint fields
///</summary>
[<ApiMember(Description="The list of endpoint fields")>]
member val EndpointFields:ResizeArray<EndpointDataField> = null with get,set
///<summary>
///The list of email accounts
///</summary>
[<ApiMember(Description="The list of email accounts")>]
member val EmailAccounts:ResizeArray<EmailAccount> = null with get,set
///<summary>
///The list of tags
///</summary>
[<ApiMember(Description="The list of tags")>]
member val Tags:ResizeArray<Tag> = null with get,set
///<summary>
///Documentation for the account
///</summary>
[<ApiMember(Description="Documentation for the account")>]
member val Documentation:String = null with get,set
///<summary>
///The number of days recordings are retained
///</summary>
[<ApiMember(Description="The number of days recordings are retained")>]
member val RecordingRetentionDays:Nullable<Int32> = new Nullable<Int32>() with get,set
///<summary>
///Enable the SIP refer beta
///</summary>
[<ApiMember(Description="Enable the SIP refer beta")>]
member val EnableSipRefer:Nullable<Boolean> = new Nullable<Boolean>() with get,set
///<summary>
///The number of seconds after which we automatically logoff a not ready agent
///</summary>
[<ApiMember(Description="The number of seconds after which we automatically logoff a not ready agent")>]
member val AutoAgentLogoffSeconds:Nullable<Int32> = new Nullable<Int32>() with get,set
///<summary>
///The default SIP region for new devices
///</summary>
[<ApiMember(Description="The default SIP region for new devices")>]
member val DefaultSipRegion:Nullable<TwilioSipRegions> = new Nullable<TwilioSipRegions>() with get,set
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.
POST /system/settings HTTP/1.1
Host: team.evovoice.io
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
overrideSystemTime: False,
overrideSystemTimeZoneId: String,
overrideSystemDateTime: String,
accountId: String,
systemFields:
[
{
value:
{
boolValue: False,
stringValue: String,
numberValue: 0,
listValue:
[
null
]
},
id: String,
name: String,
type: NotSpecified,
uiHint: None,
uiTab: String,
isAsync: False,
disableBinding: False,
description: String,
possibleValues:
[
String
],
isOutput: False,
customFieldValuesUrl: String,
defaultValue:
{
boolValue: False,
stringValue: String,
numberValue: 0,
listValue:
[
null
]
},
transitionNameFormat: String,
uniqueness: NotUnique,
voiceOnly: False,
conditionalVisibilityField: String,
conditionalVisibilityValue: String,
noEvalTemplate: False,
userMode: Hidden,
anyValueType: False
}
],
customerFields:
[
{
showInSearch: False,
id: String,
name: String,
type: NotSpecified,
uiHint: None,
uiTab: String,
isAsync: False,
disableBinding: False,
description: String,
possibleValues:
[
String
],
isOutput: False,
customFieldValuesUrl: String,
defaultValue:
{
boolValue: False,
stringValue: String,
numberValue: 0,
listValue:
[
null
]
},
transitionNameFormat: String,
uniqueness: NotUnique,
voiceOnly: False,
conditionalVisibilityField: String,
conditionalVisibilityValue: String,
noEvalTemplate: False,
userMode: Hidden,
anyValueType: False
}
],
endpointFields:
[
{
showInSearch: False,
showInLists: False,
endpointType: PhoneNumber,
isCallerId: False,
isKnob: False,
id: String,
name: String,
type: NotSpecified,
uiHint: None,
uiTab: String,
isAsync: False,
disableBinding: False,
description: String,
possibleValues:
[
String
],
isOutput: False,
customFieldValuesUrl: String,
defaultValue:
{
boolValue: False,
stringValue: String,
numberValue: 0,
listValue:
[
null
]
},
transitionNameFormat: String,
uniqueness: NotUnique,
voiceOnly: False,
conditionalVisibilityField: String,
conditionalVisibilityValue: String,
noEvalTemplate: False,
userMode: Hidden,
anyValueType: False
}
],
emailAccounts:
[
{
id: String,
server: String,
userName: String,
port: 0,
emailAddress: String,
displayName: String,
password: String
}
],
tags:
[
{
id: String,
name: String,
color: Magenta
}
],
documentation: String,
recordingRetentionDays: 0,
enableSipRefer: False,
autoAgentLogoffSeconds: 0,
defaultSipRegion: NorthAmericaVirginia
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { overrideSystemTime: False, overrideSystemTimeZoneId: String, overrideSystemDateTime: String, systemFields: [ { value: { boolValue: False, stringValue: String, numberValue: 0, listValue: [ null ] }, id: String, name: String, type: NotSpecified, uiHint: None, uiTab: String, isAsync: False, disableBinding: False, description: String, possibleValues: [ String ], isOutput: False, customFieldValuesUrl: String, defaultValue: { boolValue: False, stringValue: String, numberValue: 0, listValue: [ null ] }, transitionNameFormat: String, uniqueness: NotUnique, voiceOnly: False, conditionalVisibilityField: String, conditionalVisibilityValue: String, noEvalTemplate: False, userMode: Hidden, anyValueType: False } ], customerFields: [ { showInSearch: False, id: String, name: String, type: NotSpecified, uiHint: None, uiTab: String, isAsync: False, disableBinding: False, description: String, possibleValues: [ String ], isOutput: False, customFieldValuesUrl: String, defaultValue: { boolValue: False, stringValue: String, numberValue: 0, listValue: [ null ] }, transitionNameFormat: String, uniqueness: NotUnique, voiceOnly: False, conditionalVisibilityField: String, conditionalVisibilityValue: String, noEvalTemplate: False, userMode: Hidden, anyValueType: False } ], endpointFields: [ { showInSearch: False, showInLists: False, endpointType: PhoneNumber, isCallerId: False, isKnob: False, id: String, name: String, type: NotSpecified, uiHint: None, uiTab: String, isAsync: False, disableBinding: False, description: String, possibleValues: [ String ], isOutput: False, customFieldValuesUrl: String, defaultValue: { boolValue: False, stringValue: String, numberValue: 0, listValue: [ null ] }, transitionNameFormat: String, uniqueness: NotUnique, voiceOnly: False, conditionalVisibilityField: String, conditionalVisibilityValue: String, noEvalTemplate: False, userMode: Hidden, anyValueType: False } ], emailAccounts: [ { id: String, server: String, userName: String, port: 0, emailAddress: String, displayName: String, password: String } ], tags: [ { id: String, name: String, color: Magenta } ], documentation: String, recordingRetentionDays: 0, enableSipRefer: False, autoAgentLogoffSeconds: 0, defaultSipRegion: NorthAmericaVirginia, id: String, dateCreated: String, dateLastModified: String, createdBy: String, lastModifiedBy: String }