artemis-model 0.1.127__tar.gz → 0.1.129__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. {artemis_model-0.1.127 → artemis_model-0.1.129}/PKG-INFO +1 -1
  2. {artemis_model-0.1.127 → artemis_model-0.1.129}/artemis_model/redis/__init__.py +11 -2
  3. {artemis_model-0.1.127 → artemis_model-0.1.129}/artemis_model/redis/zone_state.py +22 -5
  4. {artemis_model-0.1.127 → artemis_model-0.1.129}/artemis_model/zone_activity.py +1 -0
  5. {artemis_model-0.1.127 → artemis_model-0.1.129}/pyproject.toml +1 -1
  6. {artemis_model-0.1.127 → artemis_model-0.1.129}/README.md +0 -0
  7. {artemis_model-0.1.127 → artemis_model-0.1.129}/artemis_model/__init__.py +0 -0
  8. {artemis_model-0.1.127 → artemis_model-0.1.129}/artemis_model/album.py +0 -0
  9. {artemis_model-0.1.127 → artemis_model-0.1.129}/artemis_model/artist.py +0 -0
  10. {artemis_model-0.1.127 → artemis_model-0.1.129}/artemis_model/auth.py +0 -0
  11. {artemis_model-0.1.127 → artemis_model-0.1.129}/artemis_model/banned_tracks.py +0 -0
  12. {artemis_model-0.1.127 → artemis_model-0.1.129}/artemis_model/base.py +0 -0
  13. {artemis_model-0.1.127 → artemis_model-0.1.129}/artemis_model/category.py +0 -0
  14. {artemis_model-0.1.127 → artemis_model-0.1.129}/artemis_model/dj_set.py +0 -0
  15. {artemis_model-0.1.127 → artemis_model-0.1.129}/artemis_model/genre.py +0 -0
  16. {artemis_model-0.1.127 → artemis_model-0.1.129}/artemis_model/location.py +0 -0
  17. {artemis_model-0.1.127 → artemis_model-0.1.129}/artemis_model/message.py +0 -0
  18. {artemis_model-0.1.127 → artemis_model-0.1.129}/artemis_model/organization.py +0 -0
  19. {artemis_model-0.1.127 → artemis_model-0.1.129}/artemis_model/otp.py +0 -0
  20. {artemis_model-0.1.127 → artemis_model-0.1.129}/artemis_model/permission.py +0 -0
  21. {artemis_model-0.1.127 → artemis_model-0.1.129}/artemis_model/playlist.py +0 -0
  22. {artemis_model-0.1.127 → artemis_model-0.1.129}/artemis_model/redis/bucket.py +0 -0
  23. {artemis_model-0.1.127 → artemis_model-0.1.129}/artemis_model/redis/device.py +0 -0
  24. {artemis_model-0.1.127 → artemis_model-0.1.129}/artemis_model/redis/keys.py +0 -0
  25. {artemis_model-0.1.127 → artemis_model-0.1.129}/artemis_model/redis/play_history.py +0 -0
  26. {artemis_model-0.1.127 → artemis_model-0.1.129}/artemis_model/schedule.py +0 -0
  27. {artemis_model-0.1.127 → artemis_model-0.1.129}/artemis_model/setting.py +0 -0
  28. {artemis_model-0.1.127 → artemis_model-0.1.129}/artemis_model/sqs/__init__.py +0 -0
  29. {artemis_model-0.1.127 → artemis_model-0.1.129}/artemis_model/sqs/messages.py +0 -0
  30. {artemis_model-0.1.127 → artemis_model-0.1.129}/artemis_model/track.py +0 -0
  31. {artemis_model-0.1.127 → artemis_model-0.1.129}/artemis_model/user.py +0 -0
  32. {artemis_model-0.1.127 → artemis_model-0.1.129}/artemis_model/zone.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: artemis-model
3
- Version: 0.1.127
3
+ Version: 0.1.129
4
4
  Summary:
5
5
  Author: Jukeboxy
6
6
  Requires-Python: >=3.10.6,<4.0.0
@@ -1,6 +1,14 @@
1
1
  """Redis models."""
2
2
 
3
- from .zone_state import ZoneState, NowPlaying, SessionId, BucketId, PushedPlaylist, PushedPlaylistDetails
3
+ from .zone_state import (
4
+ ZoneState,
5
+ NowPlaying,
6
+ SessionId,
7
+ BucketId,
8
+ PlaylistSimple,
9
+ PushedPlaylistDetails,
10
+ ScheduleDetails,
11
+ )
4
12
  from .device import ActiveDevice
5
13
  from .bucket import RedisTrackBucketItem
6
14
  from .play_history import RedisTrackPlayHistoryItem
@@ -19,8 +27,9 @@ __all__ = [
19
27
  "SessionId",
20
28
  "BucketId",
21
29
  "ActiveDevice",
22
- "PushedPlaylist",
30
+ "PlaylistSimple",
23
31
  "PushedPlaylistDetails",
32
+ "ScheduleDetails",
24
33
  "KEY_ZONE_PLAY_HISTORY_TEMPLATE",
25
34
  "KEY_ZONE_PUSH_PLAYLIST_BUCKET_TEMPLATE",
26
35
  "KEY_ZONE_SCHEDULE_BUCKET_TEMPLATE",
@@ -28,8 +28,8 @@ BucketId = Annotated[
28
28
  ]
29
29
 
30
30
 
31
- class PushedPlaylist(BaseModel):
32
- """Pushed playlist schema."""
31
+ class PlaylistSimple(BaseModel):
32
+ """Simple playlist schema."""
33
33
 
34
34
  id: int = Field(
35
35
  description="The id of the pushed playlist. It's generated as a timestamp value of the current time."
@@ -39,6 +39,19 @@ class PushedPlaylist(BaseModel):
39
39
  )
40
40
 
41
41
 
42
+ class ScheduleDetails(BaseModel):
43
+ """Schedule details schema."""
44
+
45
+ start_ts_utc: int | None = Field(
46
+ default=None,
47
+ description="The start timestamp of the schedule in UTC",
48
+ )
49
+ playlist_ids: list[int] | None = Field(
50
+ default=None,
51
+ description="The playlist ids of the schedule",
52
+ )
53
+
54
+
42
55
  class PushedPlaylistDetails(BaseModel):
43
56
  """Player details schema."""
44
57
 
@@ -49,7 +62,7 @@ class PushedPlaylistDetails(BaseModel):
49
62
  Every pushplaylist action has a session id. Here we map these session ids to the bucket id.
50
63
  """,
51
64
  )
52
- playlists: list[PushedPlaylist] | None = Field(
65
+ playlists: list[PlaylistSimple] | None = Field(
53
66
  default=None,
54
67
  description="The playlists of the pushed playlist",
55
68
  )
@@ -62,7 +75,6 @@ class PushedPlaylistDetails(BaseModel):
62
75
  description="The expiry type of the pushed playlist",
63
76
  )
64
77
 
65
-
66
78
  @field_validator("redis_details", mode="before")
67
79
  @classmethod
68
80
  def default_empty_dict_if_none(cls, v):
@@ -89,6 +101,10 @@ class ZoneState(BaseModel):
89
101
  default=None,
90
102
  description="The details of the pushed playlist",
91
103
  )
104
+ schedule_details: ScheduleDetails | None = Field(
105
+ default=None,
106
+ description="The details of the schedule",
107
+ )
92
108
 
93
109
 
94
110
  __all__ = [
@@ -96,6 +112,7 @@ __all__ = [
96
112
  "NowPlaying",
97
113
  "SessionId",
98
114
  "BucketId",
99
- "PushedPlaylist",
115
+ "PlaylistSimple",
100
116
  "PushedPlaylistDetails",
117
+ "ScheduleDetails",
101
118
  ]
@@ -35,6 +35,7 @@ class PlayerActivityMixin(TimeStampMixin, AuditMixin):
35
35
  Index("idx_player_activity_player_created", "player_id", PlayerActivityMixin.created_at.desc())
36
36
  Index("idx_player_activity_created", PlayerActivityMixin.created_at.desc())
37
37
 
38
+
38
39
  class PlayerActivitySync(CustomSyncBase, PlayerActivityMixin):
39
40
  """Sync model for Player Activity"""
40
41
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "artemis-model"
3
- version = "0.1.127"
3
+ version = "0.1.129"
4
4
  description = ""
5
5
  authors = ["Jukeboxy"]
6
6
  readme = "README.md"