artemis-model 0.1.168__py3-none-any.whl → 0.1.170__py3-none-any.whl

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.

Potentially problematic release.


This version of artemis-model might be problematic. Click here for more details.

artemis_model/auth.py CHANGED
@@ -111,3 +111,41 @@ class OAuthCsrfStateSync(CustomSyncBase, OAuthCsrfStateMixin):
111
111
 
112
112
  class OAuthCsrfState(CustomBase, OAuthCsrfStateMixin):
113
113
  pass
114
+
115
+
116
+ class OrionWebplayerCodeMixin(TimeStampMixin):
117
+ """Orion webplayer code mixin."""
118
+
119
+ id: Mapped[uuid.UUID] = mapped_column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
120
+ code_hash: Mapped[str] = mapped_column(unique=True, nullable=False) # Argon2id of normalized code
121
+ name: Mapped[str] = mapped_column(nullable=False)
122
+ zone_id: Mapped[int] = mapped_column(nullable=False, index=True)
123
+
124
+
125
+ class OrionWebplayerCodeSync(CustomSyncBase, OrionWebplayerCodeMixin):
126
+ pass
127
+
128
+
129
+ class OrionWebplayerCode(CustomBase, OrionWebplayerCodeMixin):
130
+ pass
131
+
132
+
133
+ class OrionRefreshTokenMixin(TimeStampMixin):
134
+ """
135
+ Lookup by token_id (indexed), verify secret against secret_hash.
136
+ Refresh token presented by client is: '<token_id>.<secret>'
137
+ """
138
+ id: Mapped[uuid.UUID] = mapped_column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
139
+
140
+ code_id: Mapped[uuid.UUID] = mapped_column(
141
+ UUID(as_uuid=True),
142
+ ForeignKey("orion_webplayer_code.id", ondelete="CASCADE"),
143
+ index=True,
144
+ nullable=False,
145
+ )
146
+
147
+ # Public, random identifier embedded in the token string; used for DB lookup
148
+ token_id: Mapped[uuid.UUID] = mapped_column(UUID(as_uuid=True), unique=True, index=True, nullable=False)
149
+
150
+ # Argon2id (or bcrypt) hash of the secret part; not used for lookups, no index needed
151
+ secret_hash: Mapped[str] = mapped_column(nullable=False)
@@ -26,6 +26,7 @@ class Action(str, Enum):
26
26
  PLAYER_MODE_CHANGE = "player-mode-change"
27
27
  BAN_TRACK = "ban-track"
28
28
  ZONE_ACTIVITY = "zone-activity"
29
+ STOP_MUSIC = "stop-music"
29
30
 
30
31
 
31
32
  class BaseMessage(BaseModel):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: artemis-model
3
- Version: 0.1.168
3
+ Version: 0.1.170
4
4
  Summary:
5
5
  Author: Jukeboxy
6
6
  Requires-Python: >=3.10.6,<4.0.0
@@ -2,7 +2,7 @@ artemis_model/__init__.py,sha256=zjzjYdT0t_8rCTCpDRJ0P4UKhVezRz10zUQnYOfd9WU,102
2
2
  artemis_model/album.py,sha256=9uw9HVNHVBjl-0Dgv-o5MHXhUPwedvbnbzzY3A1cKQg,2077
3
3
  artemis_model/approved_playlist_list.py,sha256=JJ2n15JA7kBbsKrQA-GpfriMEjCHZmWcFhFAKfNcPxY,1869
4
4
  artemis_model/artist.py,sha256=vjXlFN2mOEidAzUzxmsAP5GnVTvJUuhFdhQaH214lgw,1563
5
- artemis_model/auth.py,sha256=0Yg_6N1nj4U31F86u1PE0leIa3D64QlYrsDlavulN6s,4033
5
+ artemis_model/auth.py,sha256=ExAkPWjbcsIQBkr-g2oEnWAjNQAs4dmzOt8vTU1zFuU,5436
6
6
  artemis_model/banned_tracks.py,sha256=uU-F-6DL2EshPAUwLTTHjYZ7UEz4vm0Wfcif2F0lSKw,664
7
7
  artemis_model/base.py,sha256=zC20m8a1Sa11oEY0ay1iIRQeybGYvXY5p3Vr-pxoKnQ,6802
8
8
  artemis_model/category.py,sha256=ERZC8YBTtmF72ykSiVEtf_Ws3mPuN28ECfTxWF7H8tE,1662
@@ -25,12 +25,12 @@ artemis_model/redis/zone_state.py,sha256=A5z2ss1-zq6_UHavs6mBgxsllXLz5hYbKCNRAjD
25
25
  artemis_model/schedule.py,sha256=CkLHWz-BwvUY2EQCfoU4SymgCariPzoQdtRLITqBPmk,2451
26
26
  artemis_model/setting.py,sha256=xe5SHDziY8RzFxzB1GzousxI1FXYhyXZ5proEseS60g,1190
27
27
  artemis_model/sqs/__init__.py,sha256=nHpXQns64qQ5Cqjyo6w9fDGO_wWhprqn1bhKf3eWnio,17
28
- artemis_model/sqs/messages.py,sha256=XCSafXtySz3dX48q2HlFXrIt-tAyG7OXelhmBnHNVd4,2980
28
+ artemis_model/sqs/messages.py,sha256=Tb7HBTyN9kjcV3PIJmP0U3M7ZqDX3jjf-qIPjUck0iM,3010
29
29
  artemis_model/track.py,sha256=QwUF0QKVn1I64648B-NI75-IzGQvnLt9B0emD4GnS6E,3757
30
30
  artemis_model/user.py,sha256=eqIdCiBJRNLjCwPPCn-gQ6si0O5JUBGfp9oWJL5zVW4,2131
31
31
  artemis_model/zone.py,sha256=iGRUtzUwKh9LHT3MOfzzg1DnkPBts_ZBzZVTi2EmIgs,2282
32
32
  artemis_model/zone_activity.py,sha256=BY4iODavY9ceJ5oRChdjjxf26S3U30Yb7Pxm5YRFpCo,1590
33
33
  artemis_model/zone_state.py,sha256=3zMTeU4M6ysnwZQR4nzv1LxzqfnVAjOpJBvfbzfbpq0,2669
34
- artemis_model-0.1.168.dist-info/METADATA,sha256=GZ1hiWF4YRFCixW5wcsEl5rfuzFBQcBbW1fZ6yuUZ1A,3496
35
- artemis_model-0.1.168.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
36
- artemis_model-0.1.168.dist-info/RECORD,,
34
+ artemis_model-0.1.170.dist-info/METADATA,sha256=5nTJ82UxbmfHcgAZ-27PHQj98tD8uK5mk8d9FJqeEUY,3496
35
+ artemis_model-0.1.170.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
36
+ artemis_model-0.1.170.dist-info/RECORD,,