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
« 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."""
3from typing import Literal
5from kwai.core.json_api import ResourceIdentifier
8class ApplicationResourceIdentifier(ResourceIdentifier):
9 """A JSON:API resource identifier for an application."""
11 type: Literal["applications"] = "applications"
14class PageResourceIdentifier(ResourceIdentifier):
15 """A JSON:API resource identifier for a page."""
17 type: Literal["pages"] = "pages"
20class NewsItemResourceIdentifier(ResourceIdentifier):
21 """A JSON:API resource identifier for a news item."""
23 type: Literal["news_items"] = "news_items"
26class UserInvitationResourceIdentifier(ResourceIdentifier):
27 """A JSON:API resource identifier for a user invitation."""
29 type: Literal["user_invitations"] = "user_invitations"
32class TeamResourceIdentifier(ResourceIdentifier):
33 """A JSON:API resource identifier for a team."""
35 type: Literal["teams"] = "teams"
38class TrainingResourceIdentifier(ResourceIdentifier):
39 """A JSON:API resource identifier for a training."""
41 type: Literal["trainings"] = "trainings"
44class TrainingDefinitionResourceIdentifier(ResourceIdentifier):
45 """A JSON:API resource identifier for a training definition."""
47 type: Literal["training_definitions"] = "training_definitions"
50class CoachResourceIdentifier(ResourceIdentifier):
51 """A JSON:API resource identifier for a coach."""
53 type: Literal["coaches"] = "coaches"