""" Options: Date: 2024-11-21 11:56:30 Version: 8.23 Tip: To override a DTO option, remove "#" prefix before updating BaseUrl: https://api.bokamera.se #GlobalNamespace: #AddServiceStackTypes: True #AddResponseStatus: False #AddImplicitVersion: #AddDescriptionAsComments: True IncludeTypes: CurrentUserQuery.* #ExcludeTypes: #DefaultImports: datetime,decimal,marshmallow.fields:*,servicestack:*,typing:*,dataclasses:dataclass/field,dataclasses_json:dataclass_json/LetterCase/Undefined/config,enum:Enum/IntEnum #DataClass: #DataClassJson: """ import datetime import decimal from marshmallow.fields import * from servicestack import * from typing import * from dataclasses import dataclass, field from dataclasses_json import dataclass_json, LetterCase, Undefined, config from enum import Enum, IntEnum @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class CustomFieldDataResponse: id: int = 0 column: Optional[str] = None name: Optional[str] = None description: Optional[str] = None value: Optional[str] = None # @ApiMember(Description="Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'") data_type: Optional[str] = None """ Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox' """ @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class UserProfileResponse: id: Optional[str] = None firstname: Optional[str] = None lastname: Optional[str] = None phone: Optional[str] = None email: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class AdminProfile: company_id: Optional[str] = None id: Optional[str] = None firstname: Optional[str] = None lastname: Optional[str] = None email: Optional[str] = None worker_id: Optional[str] = None phone: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class CompanyCustomerResponse: company_id: Optional[str] = None company_name: Optional[str] = None customer_id: Optional[str] = None subscribed_to_newsletter: bool = False custom_field_values: Optional[List[CustomFieldDataResponse]] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class UserFavorites: company_id: Optional[str] = None company: Optional[CompanyQueryResponse] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class CurrentUserQueryResponse: # @ApiMember(Description="The user id for your profile.") user_id: Optional[str] = None """ The user id for your profile. """ favorites: Optional[List[UserFavorites]] = None user_profile: Optional[UserProfileResponse] = None customer_profile: Optional[UserProfileResponse] = None admin_profile: Optional[AdminProfile] = None company_customers: Optional[List[CompanyCustomerResponse]] = None # @Route("/users", "GET") # @ApiResponse(Description="Returned if the service was called without an existing session", StatusCode=401) # @ValidateRequest(Validator="IsAuthenticated") @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class CurrentUserQuery(IReturn[CurrentUserQueryResponse]): # @ApiMember(DataType="boolean", Description="If you want to include the users favorites", ParameterType="query") include_favorites: bool = False """ If you want to include the users favorites """ include_company_customers: bool = False