All Verbs | /portal/system-settings |
---|
import Foundation
import ServiceStack
public class AppGetSystemSettings : Codable
{
public var accountId:String
public var customerId:String
required public init(){}
}
public class AppSystemSettingsInfo : Codable
{
public var endpointFields:[EndpointDataField]
/**
* Is this customer a HostedSuite customer?
*/
// @ApiMember(Description="Is this customer a HostedSuite customer?")
public var isHostedSuiteCustomer:Bool
/**
* The customer's time zone
*/
// @ApiMember(Description="The customer's time zone")
public var customerTimeZoneId:String
required public init(){}
}
public class EndpointDataField : DataField
{
public var showInSearch:Bool
public var showInLists:Bool
public var endpointType:EndpointTypes?
public var isCallerId:Bool
public var isKnob:Bool
required public init(){ super.init() }
private enum CodingKeys : String, CodingKey {
case showInSearch
case showInLists
case endpointType
case isCallerId
case isKnob
}
required public init(from decoder: Decoder) throws {
try super.init(from: decoder)
let container = try decoder.container(keyedBy: CodingKeys.self)
showInSearch = try container.decodeIfPresent(Bool.self, forKey: .showInSearch)
showInLists = try container.decodeIfPresent(Bool.self, forKey: .showInLists)
endpointType = try container.decodeIfPresent(EndpointTypes.self, forKey: .endpointType)
isCallerId = try container.decodeIfPresent(Bool.self, forKey: .isCallerId)
isKnob = try container.decodeIfPresent(Bool.self, forKey: .isKnob)
}
public override func encode(to encoder: Encoder) throws {
try super.encode(to: encoder)
var container = encoder.container(keyedBy: CodingKeys.self)
if showInSearch != nil { try container.encode(showInSearch, forKey: .showInSearch) }
if showInLists != nil { try container.encode(showInLists, forKey: .showInLists) }
if endpointType != nil { try container.encode(endpointType, forKey: .endpointType) }
if isCallerId != nil { try container.encode(isCallerId, forKey: .isCallerId) }
if isKnob != nil { try container.encode(isKnob, forKey: .isKnob) }
}
}
public class DataField : Codable
{
public var id:String
public var name:String
public var type:ValueTypes
public var uiHint:UIHints
public var uiTab:String
public var isAsync:Bool
public var disableBinding:Bool
public var structType:DataType
public var listType:DataType
public var Description:String
public var possibleValues:[String]
public var isOutput:Bool
public var customFieldValuesUrl:String
public var defaultValue:Value
public var transitionNameFormat:String
public var uniqueness:DataFieldUniqueness
public var voiceOnly:Bool
public var conditionalVisibilityField:String
public var conditionalVisibilityValue:String
public var noEvalTemplate:Bool
public var userMode:UserDataFieldModes
public var anyValueType:Bool
required public init(){}
}
public enum ValueTypes : String, Codable
{
case NotSpecified
case String
case Boolean
case Number
case List
case Struct
case Transition
case Custom
case Date
case AudioFile
case TimeZoneId
case PhoneNumber
case User
case Endpoint
case Time
case File
case FaxNumber
case EmailAccount
case Customer
case Flow
case Team
case FlowReference
case Integration
case Assistant
}
public enum UIHints : String, Codable
{
case None
case LargeText
case InlineForm
case Password
case InlineStruct
}
public class DataType : Codable
{
public var typeName:String
public var fields:[DataField]
required public init(){}
}
public class Value : Codable
{
public var boolValue:Bool?
public var stringValue:String
public var numberValue:Double?
public var listValue:[Struct]
public var structValue:Struct
required public init(){}
}
public class Struct : List<String:Value>
{
required public init(){ super.init() }
required public init(from decoder: Decoder) throws {
try super.init(from: decoder)
}
public override func encode(to encoder: Encoder) throws {
try super.encode(to: encoder)
}
}
public enum DataFieldUniqueness : String, Codable
{
case NotUnique
case Unique
case UniqueToCustomer
}
public enum UserDataFieldModes : String, Codable
{
case Hidden
case ReadOnly
case ReadWrite
}
public enum EndpointTypes : String, Codable
{
case PhoneNumber
case User
case FaxNumber
case EmailAddress
case Unused_1
case Unused_2
case Unused_3
case Unused_4
case Unused_5
case Team
case Assistant
}
Swift AppGetSystemSettings DTOs
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 /portal/system-settings HTTP/1.1
Host: team.evovoice.io
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
accountId: String,
customerId: String
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { 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 } ], isHostedSuiteCustomer: False, customerTimeZoneId: String }