xn-auth 0.2.36__tar.gz → 0.2.37__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xn-auth
3
- Version: 0.2.36
3
+ Version: 0.2.37
4
4
  Summary: Auth adapter for XN-Api framework
5
5
  Author-email: Artemiev <mixartemev@gmail.com>
6
6
  License: MIT
@@ -6,6 +6,14 @@ class Lang(IntEnum):
6
6
  en = 2
7
7
 
8
8
 
9
+ class PeerType(IntEnum):
10
+ bot = 1
11
+ channel = 2
12
+ group = 3
13
+ supergroup = 4
14
+ user = 5
15
+
16
+
9
17
  class RoleScope(IntEnum):
10
18
  READ = 4 # read all
11
19
  WRITE = 2 # read and write own
@@ -30,7 +30,7 @@ from x_model.models import Model, TsTrait
30
30
  from tortoise import Model as TortModel
31
31
  from x_model.types import BaseUpd
32
32
 
33
- from x_auth.enums import Lang, Role
33
+ from x_auth.enums import Lang, Role, PeerType
34
34
  from x_auth.types import AuthUser
35
35
 
36
36
 
@@ -226,7 +226,7 @@ class Peer(TortModel):
226
226
  username_id: int
227
227
  session: ForeignKeyRelation[Session] = ForeignKeyField("models.Session", "peers")
228
228
  session_id: int
229
- type = CharField(127)
229
+ type: PeerType = IntEnumField(PeerType)
230
230
  phone_number = BigIntField(null=True) # todo: rm (already moved to Username.phone)
231
231
  last_update_on: datetime | None = DatetimeSecField(auto_now=True)
232
232
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xn-auth
3
- Version: 0.2.36
3
+ Version: 0.2.37
4
4
  Summary: Auth adapter for XN-Api framework
5
5
  Author-email: Artemiev <mixartemev@gmail.com>
6
6
  License: MIT
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes