""" Options: Date: 2024-11-21 05:33:01 Version: 6.00 Tip: To override a DTO option, remove "#" prefix before updating BaseUrl: https://resourcelibrary.api.ashcompanies.com #GlobalNamespace: #AddServiceStackTypes: True #AddResponseStatus: False #AddImplicitVersion: #AddDescriptionAsComments: True IncludeTypes: FavoritesRequest.* #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 BasicResourceLibraryRequest: resource_library_member_id: int = 0 @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class Tag: id: Optional[str] = None title: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class ScreenshotItem: large_filepath_s3: Optional[str] = None thumb_filepath_s3: Optional[str] = None order: Decimal = decimal.Decimal(0) description: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class ResourceCard: id: Optional[str] = None title: Optional[str] = None description: Optional[str] = None description_summary: Optional[str] = None type: Optional[str] = None content: Optional[str] = None is_complete: bool = False is_favorite: bool = False is_implicitly_complete: bool = False media_path: Optional[str] = None is_confirmable: bool = False is_wcag_compliant: bool = False duration: Optional[str] = None preview: Optional[str] = None calories: int = 0 instructor: Optional[str] = None thumbnail: Optional[str] = None difficulty: Optional[str] = None tags: Optional[List[Tag]] = None subtitles: Optional[str] = None screenshots: Optional[List[ScreenshotItem]] = None drm_encrypted: bool = False @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class Meta: resource_count: int = 0 title: Optional[str] = None class IResourceItemsLiteResponse: pass @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class ResourceItemsLiteResponse(IResourceItemsLiteResponse): resource_items: Optional[List[ResourceCard]] = None meta: Optional[Meta] = None # @Route("/favorites", "GET,POST") @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class FavoritesRequest(BasicResourceLibraryRequest, IReturn[ResourceItemsLiteResponse]): # @ApiMember(Description="Set it to true if requesting saved resources only from digital library") digital_fitness: bool = False """ Set it to true if requesting saved resources only from digital library """ # @ApiMember(Description="Set it to true if requesting saved resources only from health library") health_library: bool = False """ Set it to true if requesting saved resources only from health library """ # @ApiMember(Description="Set it to true if requesting saved resources only from vptr") vptr: bool = False """ Set it to true if requesting saved resources only from vptr """ # @ApiMember(Description="Set it to true if requesting saved resources only from wellbeing") wellbeing: bool = False """ Set it to true if requesting saved resources only from wellbeing """ # @ApiMember(Description="Set it to true if requesting saved resources only from health") health: bool = False """ Set it to true if requesting saved resources only from health """ limit: Optional[str] = None offset: Optional[str] = None