maleo-identity 0.1.11__tar.gz → 0.1.12__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.
Potentially problematic release.
This version of maleo-identity might be problematic. Click here for more details.
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/PKG-INFO +1 -1
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/maleo_identity.egg-info/PKG-INFO +1 -1
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/pyproject.toml +1 -1
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/constants/user_system_role.py +4 -0
- maleo_identity-0.1.12/src/enums/api_key.py +25 -0
- maleo_identity-0.1.12/src/enums/organization_relation.py +22 -0
- maleo_identity-0.1.12/src/enums/user_medical_role.py +22 -0
- maleo_identity-0.1.12/src/enums/user_organization_role.py +22 -0
- maleo_identity-0.1.12/src/enums/user_system_role.py +22 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/mixins/api_key.py +6 -1
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/mixins/organization_relation.py +6 -1
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/mixins/user_medical_role.py +6 -1
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/mixins/user_organization_role.py +6 -1
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/mixins/user_system_role.py +6 -1
- maleo_identity-0.1.11/src/enums/api_key.py +0 -13
- maleo_identity-0.1.11/src/enums/organization_relation.py +0 -12
- maleo_identity-0.1.11/src/enums/user_medical_role.py +0 -12
- maleo_identity-0.1.11/src/enums/user_organization_role.py +0 -12
- maleo_identity-0.1.11/src/enums/user_system_role.py +0 -12
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/LICENSE +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/README.md +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/maleo_identity.egg-info/SOURCES.txt +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/maleo_identity.egg-info/dependency_links.txt +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/maleo_identity.egg-info/requires.txt +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/maleo_identity.egg-info/top_level.txt +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/setup.cfg +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/__init__.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/constants/__init__.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/constants/api_key.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/constants/organization.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/constants/organization_registration_code.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/constants/organization_relation.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/constants/patient.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/constants/user.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/constants/user_medical_role.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/constants/user_organization_role.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/constants/user_profile.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/enums/__init__.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/enums/organization.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/enums/organization_registration_code.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/enums/patient.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/enums/user.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/enums/user_profile.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/mixins/__init__.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/mixins/common.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/mixins/organization.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/mixins/organization_registration_code.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/mixins/patient.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/mixins/user.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/mixins/user_profile.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/models.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/schemas/__init__.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/schemas/api_key.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/schemas/common.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/schemas/organization.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/schemas/organization_registration_code.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/schemas/organization_relation.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/schemas/patient.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/schemas/user.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/schemas/user_medical_role.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/schemas/user_organization_role.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/schemas/user_profile.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/schemas/user_system_role.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/types/__init__.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/types/api_key.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/types/organization.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/types/organization_registration_code.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/types/organization_relation.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/types/patient.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/types/user.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/types/user_medical_role.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/types/user_organization_role.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/types/user_profile.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/types/user_system_role.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/utils/__init__.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/utils/organization.py +0 -0
- {maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/utils/user.py +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from maleo.schemas.resource import Resource, ResourceIdentifier
|
|
2
|
+
from maleo.types.string import DoubleStrs
|
|
2
3
|
|
|
3
4
|
|
|
4
5
|
USER_SYSTEM_ROLE_RESOURCE = Resource(
|
|
@@ -11,3 +12,6 @@ USER_SYSTEM_ROLE_RESOURCE = Resource(
|
|
|
11
12
|
],
|
|
12
13
|
details=None,
|
|
13
14
|
)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
COMPOSITE_COLUMS: DoubleStrs = ("user_id", "system_role")
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from enum import StrEnum
|
|
2
|
+
from maleo.types.string import ListOfStrs, ManyStrs
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class IdentifierType(StrEnum):
|
|
6
|
+
ID = "id"
|
|
7
|
+
UUID = "uuid"
|
|
8
|
+
API_KEY = "api_key"
|
|
9
|
+
COMPOSITE = "composite"
|
|
10
|
+
|
|
11
|
+
@classmethod
|
|
12
|
+
def choices(cls) -> ListOfStrs:
|
|
13
|
+
return [e.value for e in cls]
|
|
14
|
+
|
|
15
|
+
@property
|
|
16
|
+
def columns(self) -> ManyStrs:
|
|
17
|
+
if self is IdentifierType.ID:
|
|
18
|
+
return ("id",)
|
|
19
|
+
elif self is IdentifierType.UUID:
|
|
20
|
+
return ("uuid",)
|
|
21
|
+
elif self is IdentifierType.API_KEY:
|
|
22
|
+
return ("api_key",)
|
|
23
|
+
elif self is IdentifierType.COMPOSITE:
|
|
24
|
+
return ("user_id", "organization_id")
|
|
25
|
+
raise ValueError(f"Unknown column(s) for identifier type: {self}")
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
from enum import StrEnum
|
|
2
|
+
from maleo.types.string import ListOfStrs, ManyStrs
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class IdentifierType(StrEnum):
|
|
6
|
+
ID = "id"
|
|
7
|
+
UUID = "uuid"
|
|
8
|
+
COMPOSITE = "composite"
|
|
9
|
+
|
|
10
|
+
@classmethod
|
|
11
|
+
def choices(cls) -> ListOfStrs:
|
|
12
|
+
return [e.value for e in cls]
|
|
13
|
+
|
|
14
|
+
@property
|
|
15
|
+
def columns(self) -> ManyStrs:
|
|
16
|
+
if self is IdentifierType.ID:
|
|
17
|
+
return ("id",)
|
|
18
|
+
elif self is IdentifierType.UUID:
|
|
19
|
+
return ("uuid",)
|
|
20
|
+
elif self is IdentifierType.COMPOSITE:
|
|
21
|
+
return ("source_id", "target_id", "relation")
|
|
22
|
+
raise ValueError(f"Unknown column(s) for identifier type: {self}")
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
from enum import StrEnum
|
|
2
|
+
from maleo.types.string import ListOfStrs, ManyStrs
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class IdentifierType(StrEnum):
|
|
6
|
+
ID = "id"
|
|
7
|
+
UUID = "uuid"
|
|
8
|
+
COMPOSITE = "composite"
|
|
9
|
+
|
|
10
|
+
@classmethod
|
|
11
|
+
def choices(cls) -> ListOfStrs:
|
|
12
|
+
return [e.value for e in cls]
|
|
13
|
+
|
|
14
|
+
@property
|
|
15
|
+
def columns(self) -> ManyStrs:
|
|
16
|
+
if self is IdentifierType.ID:
|
|
17
|
+
return ("id",)
|
|
18
|
+
elif self is IdentifierType.UUID:
|
|
19
|
+
return ("uuid",)
|
|
20
|
+
elif self is IdentifierType.COMPOSITE:
|
|
21
|
+
return ("user_id", "organization_id", "medical_role")
|
|
22
|
+
raise ValueError(f"Unknown column(s) for identifier type: {self}")
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
from enum import StrEnum
|
|
2
|
+
from maleo.types.string import ListOfStrs, ManyStrs
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class IdentifierType(StrEnum):
|
|
6
|
+
ID = "id"
|
|
7
|
+
UUID = "uuid"
|
|
8
|
+
COMPOSITE = "composite"
|
|
9
|
+
|
|
10
|
+
@classmethod
|
|
11
|
+
def choices(cls) -> ListOfStrs:
|
|
12
|
+
return [e.value for e in cls]
|
|
13
|
+
|
|
14
|
+
@property
|
|
15
|
+
def columns(self) -> ManyStrs:
|
|
16
|
+
if self is IdentifierType.ID:
|
|
17
|
+
return ("id",)
|
|
18
|
+
elif self is IdentifierType.UUID:
|
|
19
|
+
return ("uuid",)
|
|
20
|
+
elif self is IdentifierType.COMPOSITE:
|
|
21
|
+
return ("user_id", "organization_id", "organization_role")
|
|
22
|
+
raise ValueError(f"Unknown column(s) for identifier type: {self}")
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
from enum import StrEnum
|
|
2
|
+
from maleo.types.string import ListOfStrs, ManyStrs
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class IdentifierType(StrEnum):
|
|
6
|
+
ID = "id"
|
|
7
|
+
UUID = "uuid"
|
|
8
|
+
COMPOSITE = "composite"
|
|
9
|
+
|
|
10
|
+
@classmethod
|
|
11
|
+
def choices(cls) -> ListOfStrs:
|
|
12
|
+
return [e.value for e in cls]
|
|
13
|
+
|
|
14
|
+
@property
|
|
15
|
+
def columns(self) -> ManyStrs:
|
|
16
|
+
if self is IdentifierType.ID:
|
|
17
|
+
return ("id",)
|
|
18
|
+
elif self is IdentifierType.UUID:
|
|
19
|
+
return ("uuid",)
|
|
20
|
+
elif self is IdentifierType.COMPOSITE:
|
|
21
|
+
return ("user_id", "system_role")
|
|
22
|
+
raise ValueError(f"Unknown column(s) for identifier type: {self}")
|
|
@@ -2,6 +2,8 @@ from pydantic import BaseModel, Field
|
|
|
2
2
|
from typing import Annotated, Literal, TypeGuard
|
|
3
3
|
from uuid import UUID
|
|
4
4
|
from maleo.schemas.mixins.identity import Identifier
|
|
5
|
+
from maleo.types.any import ManyAny
|
|
6
|
+
from maleo.types.string import ManyStrs
|
|
5
7
|
from ..enums.api_key import IdentifierType
|
|
6
8
|
from ..types.api_key import CompositeIdentifier, IdentifierValueType
|
|
7
9
|
|
|
@@ -11,7 +13,10 @@ class APIKey(BaseModel):
|
|
|
11
13
|
|
|
12
14
|
|
|
13
15
|
class APIKeyIdentifier(Identifier[IdentifierType, IdentifierValueType]):
|
|
14
|
-
|
|
16
|
+
@property
|
|
17
|
+
def columns_and_values(self) -> tuple[ManyStrs, ManyAny]:
|
|
18
|
+
values = self.value if isinstance(self.value, tuple) else (self.value,)
|
|
19
|
+
return self.type.columns, values
|
|
15
20
|
|
|
16
21
|
|
|
17
22
|
class IdAPIKeyIdentifier(Identifier[Literal[IdentifierType.ID], int]):
|
|
@@ -2,8 +2,10 @@ from pydantic import BaseModel, Field
|
|
|
2
2
|
from typing import Annotated, Generic, Literal, TypeGuard
|
|
3
3
|
from uuid import UUID
|
|
4
4
|
from maleo.schemas.mixins.identity import Identifier
|
|
5
|
+
from maleo.types.any import ManyAny
|
|
5
6
|
from maleo.types.boolean import OptBoolT
|
|
6
7
|
from maleo.types.misc import OptListOfAnyOrStrToAnyDict
|
|
8
|
+
from maleo.types.string import ManyStrs
|
|
7
9
|
from ..enums.organization_relation import IdentifierType
|
|
8
10
|
from ..types.organization_relation import CompositeIdentifier, IdentifierValueType
|
|
9
11
|
|
|
@@ -17,7 +19,10 @@ class Meta(BaseModel):
|
|
|
17
19
|
|
|
18
20
|
|
|
19
21
|
class OrganizationRelationIdentifier(Identifier[IdentifierType, IdentifierValueType]):
|
|
20
|
-
|
|
22
|
+
@property
|
|
23
|
+
def columns_and_values(self) -> tuple[ManyStrs, ManyAny]:
|
|
24
|
+
values = self.value if isinstance(self.value, tuple) else (self.value,)
|
|
25
|
+
return self.type.columns, values
|
|
21
26
|
|
|
22
27
|
|
|
23
28
|
class IdOrganizationRelationIdentifier(Identifier[Literal[IdentifierType.ID], int]):
|
|
@@ -2,12 +2,17 @@ from pydantic import Field
|
|
|
2
2
|
from typing import Annotated, Literal, TypeGuard
|
|
3
3
|
from uuid import UUID
|
|
4
4
|
from maleo.schemas.mixins.identity import Identifier
|
|
5
|
+
from maleo.types.any import ManyAny
|
|
6
|
+
from maleo.types.string import ManyStrs
|
|
5
7
|
from ..enums.user_medical_role import IdentifierType
|
|
6
8
|
from ..types.user_medical_role import CompositeIdentifier, IdentifierValueType
|
|
7
9
|
|
|
8
10
|
|
|
9
11
|
class UserMedicalRoleIdentifier(Identifier[IdentifierType, IdentifierValueType]):
|
|
10
|
-
|
|
12
|
+
@property
|
|
13
|
+
def columns_and_values(self) -> tuple[ManyStrs, ManyAny]:
|
|
14
|
+
values = self.value if isinstance(self.value, tuple) else (self.value,)
|
|
15
|
+
return self.type.columns, values
|
|
11
16
|
|
|
12
17
|
|
|
13
18
|
class IdUserMedicalRoleIdentifier(Identifier[Literal[IdentifierType.ID], int]):
|
|
@@ -2,12 +2,17 @@ from pydantic import Field
|
|
|
2
2
|
from typing import Annotated, Literal, TypeGuard
|
|
3
3
|
from uuid import UUID
|
|
4
4
|
from maleo.schemas.mixins.identity import Identifier
|
|
5
|
+
from maleo.types.any import ManyAny
|
|
6
|
+
from maleo.types.string import ManyStrs
|
|
5
7
|
from ..enums.user_organization_role import IdentifierType
|
|
6
8
|
from ..types.user_organization_role import CompositeIdentifier, IdentifierValueType
|
|
7
9
|
|
|
8
10
|
|
|
9
11
|
class UserOrganizationRoleIdentifier(Identifier[IdentifierType, IdentifierValueType]):
|
|
10
|
-
|
|
12
|
+
@property
|
|
13
|
+
def columns_and_values(self) -> tuple[ManyStrs, ManyAny]:
|
|
14
|
+
values = self.value if isinstance(self.value, tuple) else (self.value,)
|
|
15
|
+
return self.type.columns, values
|
|
11
16
|
|
|
12
17
|
|
|
13
18
|
class IdUserOrganizationRoleIdentifier(Identifier[Literal[IdentifierType.ID], int]):
|
|
@@ -2,12 +2,17 @@ from pydantic import Field
|
|
|
2
2
|
from typing import Annotated, Literal, TypeGuard
|
|
3
3
|
from uuid import UUID
|
|
4
4
|
from maleo.schemas.mixins.identity import Identifier
|
|
5
|
+
from maleo.types.any import ManyAny
|
|
6
|
+
from maleo.types.string import ManyStrs
|
|
5
7
|
from ..enums.user_system_role import IdentifierType
|
|
6
8
|
from ..types.user_system_role import CompositeIdentifier, IdentifierValueType
|
|
7
9
|
|
|
8
10
|
|
|
9
11
|
class UserSystemRoleIdentifier(Identifier[IdentifierType, IdentifierValueType]):
|
|
10
|
-
|
|
12
|
+
@property
|
|
13
|
+
def columns_and_values(self) -> tuple[ManyStrs, ManyAny]:
|
|
14
|
+
values = self.value if isinstance(self.value, tuple) else (self.value,)
|
|
15
|
+
return self.type.columns, values
|
|
11
16
|
|
|
12
17
|
|
|
13
18
|
class IdUserSystemRoleIdentifier(Identifier[Literal[IdentifierType.ID], int]):
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
from enum import StrEnum
|
|
2
|
-
from maleo.types.string import ListOfStrs
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class IdentifierType(StrEnum):
|
|
6
|
-
ID = "id"
|
|
7
|
-
UUID = "uuid"
|
|
8
|
-
API_KEY = "api_key"
|
|
9
|
-
COMPOSITE = "composite"
|
|
10
|
-
|
|
11
|
-
@classmethod
|
|
12
|
-
def choices(cls) -> ListOfStrs:
|
|
13
|
-
return [e.value for e in cls]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{maleo_identity-0.1.11 → maleo_identity-0.1.12}/maleo_identity.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/constants/organization_registration_code.py
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/mixins/organization_registration_code.py
RENAMED
|
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
|
{maleo_identity-0.1.11 → maleo_identity-0.1.12}/src/schemas/organization_registration_code.py
RENAMED
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|