Coverage for src/kwai/api/schemas/resources.py: 100%

18 statements  

« prev     ^ index     » next       coverage.py v7.6.10, created at 2024-01-01 00:00 +0000

1"""Module that defines all JSON:API resource identifiers.""" 

2 

3from typing import Literal 

4 

5from kwai.core.json_api import ResourceIdentifier 

6 

7 

8class ApplicationResourceIdentifier(ResourceIdentifier): 

9 """A JSON:API resource identifier for an application.""" 

10 

11 type: Literal["applications"] = "applications" 

12 

13 

14class PageResourceIdentifier(ResourceIdentifier): 

15 """A JSON:API resource identifier for a page.""" 

16 

17 type: Literal["pages"] = "pages" 

18 

19 

20class NewsItemResourceIdentifier(ResourceIdentifier): 

21 """A JSON:API resource identifier for a news item.""" 

22 

23 type: Literal["news_items"] = "news_items" 

24 

25 

26class UserInvitationResourceIdentifier(ResourceIdentifier): 

27 """A JSON:API resource identifier for a user invitation.""" 

28 

29 type: Literal["user_invitations"] = "user_invitations" 

30 

31 

32class TeamResourceIdentifier(ResourceIdentifier): 

33 """A JSON:API resource identifier for a team.""" 

34 

35 type: Literal["teams"] = "teams" 

36 

37 

38class TrainingResourceIdentifier(ResourceIdentifier): 

39 """A JSON:API resource identifier for a training.""" 

40 

41 type: Literal["trainings"] = "trainings" 

42 

43 

44class TrainingDefinitionResourceIdentifier(ResourceIdentifier): 

45 """A JSON:API resource identifier for a training definition.""" 

46 

47 type: Literal["training_definitions"] = "training_definitions" 

48 

49 

50class CoachResourceIdentifier(ResourceIdentifier): 

51 """A JSON:API resource identifier for a coach.""" 

52 

53 type: Literal["coaches"] = "coaches"