/* Options: Date: 2025-06-02 03:13:44 SwiftVersion: 6.0 Version: 8.71 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://team.evovoice.io //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True //MakePropertiesOptional: True IncludeTypes: NotUsedRequest.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/not-used") public class NotUsedRequest : Codable { public var pushNotification:PushNotification? public var notifications:[NotificationInfo]? public var nodeParameter:NodeParameter? 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 UserDataFieldModes : String, Codable { case Hidden case ReadOnly case ReadWrite } 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 class PushNotification : Codable { public var type:PushNotificationTypes? public var channel:FlowChannels? public var endpointId:String? public var endpointUserName:String? public var sessionId:String? public var sender:String? public var title:String? public var body:String? public var badge:Int? public var attachmentUri:String? public var attachmentContentType:String? public var agentState:AgentStates? public var agentStateReason:AgentStateReasons? required public init(){} } public class NodeParameter : Codable { public var id:String? public var type:ValueTypes? public var source:ValueSources? public var isAsync:Bool? public var referenceId:String? public var value:Value? public var noEvalTemplate:Bool? public var listParameters:[NodeParameterMap]? public var structParameters:NodeParameterMap? public var isOutput:Bool? public var expression:String? public var listType:DataType? required public init(){} } public enum AgentStates : String, Codable { case Unknown case Ready case NotReady case LoggedOut case WrapUp case Outgoing case Other } public enum FlowChannels : String, Codable { case Voice case Chat case Fax } public enum AgentStateReasons : String, Codable { case Unknown case SetByUser case MissedCall case SetBySystem } 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 enum UIHints : String, Codable { case None case LargeText case InlineForm case Password case InlineStruct } public enum DataFieldUniqueness : String, Codable { case NotUnique case Unique case UniqueToCustomer } 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 PushNotificationTypes : String, Codable { case SessionDisconnected case SessionInvite case ChatMessage case SessionInactivated case AgentStateChanged case SessionHeld case SessionAnswered case ActiveSessionsChanged case Ping case SessionScreenChanged case Toast case SessionInfoChanged case MessageReceived case SessionHolding } public enum ValueSources : String, Codable { case Value case Flow case System case Customer case Session case Endpoint case Expression case User } public class NotificationInfo : EntityInfo { /** * The account ID this endpoint is associated with */ // @ApiMember(Description="The account ID this endpoint is associated with") public var accountId:String? /** * The name of the account this endpoint is associated with */ // @ApiMember(Description="The name of the account this endpoint is associated with") public var accountName:String? /** * The ID of the customer this endpoint is associated with */ // @ApiMember(Description="The ID of the customer this endpoint is associated with") public var customerId:String? /** * The name of the customer this endpoint is associated with */ // @ApiMember(Description="The name of the customer this endpoint is associated with") public var customerName:String? /** * The breadcrumb to the customer for this endpoint */ // @ApiMember(Description="The breadcrumb to the customer for this endpoint") public var customerBreadcrumb:[CustomerBreadcrumb]? /** * The type of notification */ // @ApiMember(Description="The type of notification") public var type:NotificationTypes? /** * The subject of the notification */ // @ApiMember(Description="The subject of the notification") public var subject:String? /** * The body of the notification */ // @ApiMember(Description="The body of the notification") public var body:String? /** * The recipients of this notification */ // @ApiMember(Description="The recipients of this notification") public var recipients:[NotificationRecipientInfo]? /** * The list of attachments */ // @ApiMember(Description="The list of attachments") public var attachments:[FileInfo]? /** * The original from for the session */ // @ApiMember(Description="The original from for the session") public var from:String? /** * The original To for the session */ // @ApiMember(Description="The original To for the session") public var to:String? /** * Was there an error? */ // @ApiMember(Description="Was there an error?") public var error:Bool? /** * The error message */ // @ApiMember(Description="The error message") public var errorMessage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case accountId case accountName case customerId case customerName case customerBreadcrumb case type case subject case body case recipients case attachments case from case to case error case errorMessage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) accountId = try container.decodeIfPresent(String.self, forKey: .accountId) accountName = try container.decodeIfPresent(String.self, forKey: .accountName) customerId = try container.decodeIfPresent(String.self, forKey: .customerId) customerName = try container.decodeIfPresent(String.self, forKey: .customerName) customerBreadcrumb = try container.decodeIfPresent([CustomerBreadcrumb].self, forKey: .customerBreadcrumb) ?? [] type = try container.decodeIfPresent(NotificationTypes.self, forKey: .type) subject = try container.decodeIfPresent(String.self, forKey: .subject) body = try container.decodeIfPresent(String.self, forKey: .body) recipients = try container.decodeIfPresent([NotificationRecipientInfo].self, forKey: .recipients) ?? [] attachments = try container.decodeIfPresent([FileInfo].self, forKey: .attachments) ?? [] from = try container.decodeIfPresent(String.self, forKey: .from) to = try container.decodeIfPresent(String.self, forKey: .to) error = try container.decodeIfPresent(Bool.self, forKey: .error) errorMessage = try container.decodeIfPresent(String.self, forKey: .errorMessage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if accountId != nil { try container.encode(accountId, forKey: .accountId) } if accountName != nil { try container.encode(accountName, forKey: .accountName) } if customerId != nil { try container.encode(customerId, forKey: .customerId) } if customerName != nil { try container.encode(customerName, forKey: .customerName) } if customerBreadcrumb != nil { try container.encode(customerBreadcrumb, forKey: .customerBreadcrumb) } if type != nil { try container.encode(type, forKey: .type) } if subject != nil { try container.encode(subject, forKey: .subject) } if body != nil { try container.encode(body, forKey: .body) } if recipients != nil { try container.encode(recipients, forKey: .recipients) } if attachments != nil { try container.encode(attachments, forKey: .attachments) } if from != nil { try container.encode(from, forKey: .from) } if to != nil { try container.encode(to, forKey: .to) } if error != nil { try container.encode(error, forKey: .error) } if errorMessage != nil { try container.encode(errorMessage, forKey: .errorMessage) } } }