protocol ConversationParamProtocol {
    func getConversations() -> [Conversation]?
    func getConversations(_ predicate: NSPredicate?) -> [Conversation]?
    func getClosedConversations() -> [Conversation]?
    func getActiveConversation() -> Conversation?
    func getOpenConversation() -> Conversation?
    func getLatestClosedConversation(_ conversationsCount: Int) -> [Conversation]?
    func createNewConversation() -> Conversation
    func getQueryType() -> String
    func isConversationRelatedToQuery(_ conversation: Conversation) -> Bool
    func getBrandID() -> String
    func getQueryUID() -> String
    func getQueryProperties() -> [String : Any]


enum ConversationQueryType: String {
    case Brand = "Brand"
    case Consumer = "Consumer"


class LPAuthenticationParams: NSObject {
  var authenticationCode: String? // Code Flow authentication or PKCE code flow authentication
  var jwt: String? // Implicit Flow authentication
  var redirectURI: String? // Code Flow authentication
  var codeVerifier: String? // Used for PKCE code flow authentication
  var issuerDisplayName: String? //Used to specify IDP in Multiple IDP Scenerio. If not using MIDP leave blank. 
  var certPinningPublicKeys: [String]? //Cert pining validation public keys
  var type: LPAuthenticationType = .signup // User authentication type with "signup" as default


enum LPAuthenticationType: Int {
    case signup // The old unauthenticated method is deprecated as of July 2019
    case unauthenticated // New unauthenticated method for users without identity
    case authenticated // Authenticated users


class LPCampaignInfo: NSObject {
    var campaignId: Int
    var engagementId: Int
    var sessionId: String? // if "nil" SDE will not be sent to Agent
    var visitorId: String? // if "nil" SDE will not be sent to Agent
    var contextId: String


enum LPConversationCloseReason: Int {
    case agent = 0
    case consumer
    case system


class LPConversationHistoryControlParam: NSObject {
  var historyConversationsStateToDisplay: LPConversationsHistoryStateToDisplay? // control what kind of conversation to show (Open/Close)
  var historyConversationsMaxDays: UInt? //get conversation that Closed/Opens in the last X days

  historyConversationMaxDaysType: LPConversationHistoryMaxDaysDateType? //Control if filter the max days by conversation start date or by conversation close date


enum LPConversationHistoryMaxDaysDateType: Int {
    case startConversationDate    // Default
    case endConversationDate


enum LPConversationsHistoryStateToDisplay: Int {
    case open
    case close


class LPConversationViewParams: NSObject {
  var conversationQuery: ConversationParamProtocol!
  var containerViewController: UIViewController? // nil = WindowMode
  var isViewOnly = false
  var conversationHistoryControlParam: LPConversationHistoryControlParam? // nil = no history control filter


class : NSObject {
    var campaignId: Int // CampaignID
    var engagementId: Int // EngagementID
    var connectorId: Int
    var engagementRevision: Int
    var conversationId: String? // Returned when there's an open conversation
    var status: String?
    var contextId: String?


class : NSObject {
    var engagementDetails: [LPEngagementDetails]? // Optional Engagement Details response in case received from the server, per the Engagement's request
    var sessionId: String?
    var visitorId: String?
    var pageId: String? // PageID of the Engagement. If not sending one in request, a new one will be generated from server in the response


class LPLog: NSObject {
    var timestamp: String?
    var className: String?
    var funcName: String?
    var text: String?
    var logLevel: LogLevel?


class : NSObject {
    var appInstallId: String // App Install ID of the Mobile Campaign of the Brand


class : NSObject {
    var entryPoints: [String]? // Entry points array of the Mobile App
    var engagementAttributes: [[String:Any]]? // Array of Engagement Attributes. SDE will not be sent to Agent if seesionID and visitorID are nil.
    var pageId: String? // PageID to send the SDEs for


class LPNotification: NSObject {
    var text: String
    var user: LPUser
    var accountID: String
    var isRemote: Bool
    var toString : String


class : NSObject {
    var sessionId: String?
    var visitorId: String?
    var pageId: String? // PageID of the Engagement. If not sending one in request, a new one will be generated from server in the response


class LPUser: NSObject {
    var firstName: String?
    var lastName: String?
    var profileImageURL: String?
    var phoneNumber: String?
    var employeeID: String?
    var uid: String?


enum LogLevel: Int {
    case TRACE
    case DEBUG
    case INFO
    case WARNING
    case ERROR
    case OFF


class : NSObject {
    var codeVerifier: String // JWE generated by LP to be added in LPAuthenticationParams to be passed in showConversation() and on reconnect().
    var codeChallenge: String // Code Challenge to be used by the brand endpoint.
    var codeChallengeMethod: String //Encryption method used for the code challenge currently will always be S256 as that is the only supported type.