Data structures/types
Struct: Configurations
public struct Configurations {
//chat viewcontroller
var lookViewPriceFont: UIFont = UIFont.systemFont(ofSize: 16.0)
var lookViewNameFont: UIFont = UIFont.boldSystemFont(ofSize: 16.0)
var itemViewPriceFont: UIFont = UIFont.systemFont(ofSize: 16.0)
var itemViewNameFont: UIFont = UIFont.boldSystemFont(ofSize: 16.0)
var itemViewReviseItFont: UIFont = UIFont.boldSystemFont(ofSize: 16.0)
var chatMessageTimestempFont: UIFont = UIFont.systemFont(ofSize: 14.0)
var chatSectionHeaderFont: UIFont = UIFont.systemFont(ofSize: 14.0)
var chatLoveItReStyleItFont: UIFont = UIFont.boldSystemFont(ofSize: 16)
//match viewcontroller
var matchActivityIndicatorFont: UIFont = UIFont.systemFont(ofSize: 16.0)
var matchActivityIndicatorColor: UIColor = .black
//--headerView
var matchExpertNameFont: UIFont = UIFont.boldSystemFont(ofSize: 16.0)
var matchExpertNameColor: UIColor = .black
var matchExpertCityNameFont: UIFont = UIFont.systemFont(ofSize: 16.0)
var matchExpertCityNameColor: UIColor = .black
//--looksCollectionCell
var matchLooksCellTitleFont: UIFont = UIFont.systemFont(ofSize: 22.0)
var matchLooksCellTitleColor: UIColor = .black
//--lookCollectionCell
var matchLookCellBorderColor: UIColor = .white
//--infoCell
var matchInfoCellHeaderFont: UIFont = UIFont.boldSystemFont(ofSize: 16.0)
var matchInfoCellHeaderColor: UIColor = .black
var matchInfoCellTitleFont: UIFont = UIFont.systemFont(ofSize: 16.0)
var matchInfoCellTitleColor: UIColor = .black
//--reviewCell
var matchReviewCellNameFont: UIFont = UIFont.systemFont(ofSize: 16.0)
var matchReviewCellNameColor: UIColor = .black
var matchReviewCellTitleFont: UIFont = UIFont.boldSystemFont(ofSize: 16.0)
var matchReviewCellTitleColor: UIColor = .black
var matchReviewCellTextFont: UIFont = UIFont.systemFont(ofSize: 16.0)
var matchReviewCellTextColor: UIColor = .black
//quiz viewcontroller
var quizCellTextFont: UIFont = UIFont.systemFont(ofSize: 14.0)
var quizHeaderFont: UIFont = UIFont.systemFont(ofSize: 22.0)
var quizHeaderColor: UIColor = .black
var quizSubHeaderFont: UIFont = UIFont.systemFont(ofSize: 16.0)
var quizSubHeaderColor: UIColor = .black
var quizButtonFont: UIFont = UIFont.systemFont(ofSize: 16.0)
var quizButtonColor: UIColor = .black
var quizButtonBackgroundColor: UIColor = .black
var quizButtonTextColor: UIColor = .white
//--dropDownCollectionViewCell
//--quizSelectAllCollectionViewCell
//--imageTagCollectionViewCell
//--checkboxCollectionViewCell
//--singleImageCollectionViewCell
//--tagCollectionViewCell
//--growingFreeTextCell
//--imageSelectionTableViewCell
//--radioButtonCollectionViewCell
var quizAnswerSelectedFont: UIFont = UIFont.boldSystemFont(ofSize: 16.0)
var quizAnswerUnselectedFont: UIFont = UIFont.systemFont(ofSize: 16.0)
var quizAnswerLabelColor: UIColor = .black
//--imageTagCollectionViewCell
//--checkboxCollectionViewCell
//--imageSelectionTableViewCell
//--radioButtonCollectionViewCell
var quizBorderSelectedColor: UIColor = .black
var quizBorderUnselectedColor: UIColor = .lightGray
//rate viewcontroller
var rateTitleFont: UIFont = UIFont.systemFont(ofSize: 22.0)
var rateTitleColor: UIColor = .black
var rateTextiewFont: UIFont = UIFont.systemFont(ofSize: 16.0)
var rateTextiewColor: UIColor = .black
var ratePlaceholderFont: UIFont = UIFont.systemFont(ofSize: 16.0)
var rateSubmitButtonFont: UIFont = UIFont.systemFont(ofSize: 14.0)
var rateDoneButtonFont: UIFont = UIFont.boldSystemFont(ofSize: 16.0)
var rateAnswerTextCellFont: UIFont = UIFont.systemFont(ofSize: 16.0)
var rateUnderscoreViewColor: UIColor = .black
//tooltip view
var tooltipTitleFont: UIFont = UIFont.systemFont(ofSize: 14.0)
//upload viewcontroller
var uploadBackgroundColor: UIColor = .darkGray
var uploadDeleteImage: UIImage?
var uploadPhotoButtonFont: UIFont = UIFont.boldSystemFont(ofSize: 16.0)
var uploadPhotoButtonColor: UIColor = .black
//sdk navigation
var navigationTitleFont: UIFont = UIFont.boldSystemFont(ofSize: 16.0)
var navigationTitleColor: UIColor = .black
var navigationSubTitleFont: UIFont = UIFont.systemFont(ofSize: 14.0)
var navigationSubTitleColor: UIColor = .black
//history / products view controler
var historyProductsSectionHeaderFont: UIFont = UIFont.systemFont(ofSize: 16.0)
var historyProductsSectionHeaderColor: UIColor = .black
//images
var deleteImage: UIImage?
public init(configuration: [ConfigurationStyle: Any]) {
...
Struct: ConfigurationStyle
public enum ConfigurationStyle {
//chat viewcontroller
case lookViewPriceFont
case lookViewNameFont
case itemViewPriceFont
case itemViewNameFont
case itemViewReviseItFont
case chatMessageTimestempFont
case chatSectionHeaderFont
case chatLoveItReStyleItFont
//rate viewcontroller
case rateTitleFont
case rateTitleColor
case rateTextiewFont
case rateTextiewColor
case ratePlaceholderFont
case rateSubmitButtonFont
case rateDoneButtonFont
case rateAnswerTextCellFont
case rateUnderscoreViewColor
//match viewcontroller
case matchActivityIndicatorFont
case matchActivityIndicatorColor
//--match headerView
case matchExpertNameFont
case matchExpertNameColor
case matchExpertCityNameFont
case matchExpertCityNameColor
//--match looksCollectionCell
case matchLooksCellTitleFont
case matchLooksCellTitleColor
//--match lookCollectionCell
case matchLookCellBorderColor
//--match infoCell
case matchInfoCellHeaderFont
case matchInfoCellHeaderColor
case matchInfoCellTitleFont
case matchInfoCellTitleColor
//--match reviewCell
case matchReviewCellNameFont
case matchReviewCellNameColor
case matchReviewCellTitleFont
case matchReviewCellTitleColor
case matchReviewCellTextFont
case matchReviewCellTextColor
//quizCollectionViewCell
case quizAnswerSelectedFont
case quizAnswerUnselectedFont
case quizAnswerLabelColor
case quizBorderUnselectedColor
case quizBorderSelectedColor
//upload viewcontroller
case uploadBackgroundColor
case uploadDeleteImage
case uploadPhotoButtonFont
case uploadPhotoButtonColor
//sdk navigation
case navigationTitleFont
case navigationSubTitleFont
case navigationTitleColor
case navigationSubTitleColor
//quiz
case quizButtonFont
case quizButtonColor
case quizHeaderFont
case quizSubHeaderFont
case quizSubHeaderColor
case quizHeaderColor
case quizButtonTextColor
//products view controler
case historyProductsSectionHeaderFont
case historyProductsSectionHeaderColor
//tooltip
case tooltipTitleFont
//Images
case deleteImage
}
Struct: ClientInfo
struct ClientInfo {
var firstName: String!
var lastName: String!
var email: String!
var birthday: String?
var phone: String?
var gender: Gender?
var currency: String?
var country: String?
}
enum Gender: String {
case male = "male"
case female = "female"
}
Struct: UserStatus
struct UserStatus {
var lastMessage: Any?
var messageCount: Int?
var quizStep: String?
var sessionStatus: String?
var unreadMessageCount: Int?
}
enum SessionStatus: String {
case quiz = 'quiz'
case match = 'match'
case styling = 'styling'
case feedback = 'feedback'
}
Class: WSQuiz
class WSQuiz: NSObject {
var questionId: Int = 0
var type: String = ""
var text: String = ""
var title: String = ""
var subtitle: String = ""
var imageUrlString: String = ""
var imageDescription: String = ""
var isSkippable: Bool = false
var includeAdditionalComments: Bool = false
var answerNumber: Int = 0
var maxNextQuestions: Int = 0
var answersArray: [WSQuizAnswer] = [WSQuizAnswer]()
}
Class: WSQuizAnswer
class WSQuizAnswer: NSObject {
var key: String = ""
var text: String = ""
var imageUrlString: String = ""
}
Class SDKError
public enum SDKError: Error {
case sdkNotInitialized
case missingClientInfoAndUserData
case missingClientId
case failToInitSDK
case failToAuthenticate
case failToGenerateToken
case failToGetUserStatus
case fail401UnAuthorized
}
Last updated