/* Options: Date: 2024-12-03 18:11:05 SwiftVersion: 5.0 Version: 8.23 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.bokamera.se //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True IncludeTypes: CurrentUserQuery.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/users", "GET") // @ApiResponse(Description="Returned if the service was called without an existing session", StatusCode=401) // @ValidateRequest(Validator="IsAuthenticated") public class CurrentUserQuery : IReturn, Codable { public typealias Return = CurrentUserQueryResponse /** * If you want to include the users favorites */ // @ApiMember(DataType="boolean", Description="If you want to include the users favorites", ParameterType="query") public var includeFavorites:Bool public var includeCompanyCustomers:Bool required public init(){} } public class CurrentUserQueryResponse : Codable { /** * The user id for your profile. */ // @ApiMember(Description="The user id for your profile.") public var userId:String public var favorites:[UserFavorites] = [] public var userProfile:UserProfileResponse public var customerProfile:UserProfileResponse public var adminProfile:AdminProfile public var companyCustomers:[CompanyCustomerResponse] = [] required public init(){} } public class CustomFieldDataResponse : Codable { public var id:Int public var column:String public var name:String public var Description:String public var value:String /** * Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox' */ // @ApiMember(Description="Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'") public var dataType:String required public init(){} } public class UserProfileResponse : Codable { public var id:String public var firstname:String public var lastname:String public var phone:String public var email:String required public init(){} } public class AdminProfile : Codable { public var companyId:String public var id:String public var firstname:String public var lastname:String public var email:String public var workerId:String public var phone:String required public init(){} } public class CompanyCustomerResponse : Codable { public var companyId:String? public var companyName:String public var customerId:String? public var subscribedToNewsletter:Bool public var customFieldValues:[CustomFieldDataResponse] = [] required public init(){} } public class UserFavorites : Codable { public var companyId:String public var company:CompanyQueryResponse required public init(){} }