maleo-identity 0.0.54__py3-none-any.whl → 0.0.58__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 maleo-identity might be problematic. Click here for more details.
- maleo_identity/client/controllers/http/organization.py +300 -63
- maleo_identity/client/controllers/http/user.py +253 -52
- maleo_identity/client/services/organization.py +184 -418
- maleo_identity/client/services/user.py +159 -345
- maleo_identity/constants/organization_registration_code.py +14 -0
- maleo_identity/constants/organization_role.py +4 -2
- maleo_identity/constants/user.py +3 -0
- maleo_identity/constants/user_organization.py +19 -4
- maleo_identity/constants/user_organization_role.py +8 -4
- maleo_identity/constants/user_system_role.py +1 -10
- maleo_identity/enums/organization.py +2 -1
- maleo_identity/enums/organization_registration_code.py +8 -0
- maleo_identity/enums/organization_role.py +2 -1
- maleo_identity/enums/user.py +2 -0
- maleo_identity/enums/user_organization.py +8 -2
- maleo_identity/enums/user_organization_role.py +8 -1
- maleo_identity/enums/user_system_role.py +0 -5
- maleo_identity/models/responses/organization_registration_code.py +46 -0
- maleo_identity/models/responses/user.py +13 -1
- maleo_identity/models/schemas/general.py +3 -0
- maleo_identity/models/schemas/organization_registration_code.py +21 -0
- maleo_identity/models/schemas/user.py +13 -5
- maleo_identity/models/tables/__init__.py +2 -0
- maleo_identity/models/tables/organization.py +28 -2
- maleo_identity/models/tables/organization_registration_code.py +37 -0
- maleo_identity/models/tables/organization_role.py +35 -4
- maleo_identity/models/tables/user.py +17 -3
- maleo_identity/models/tables/user_organization.py +52 -4
- maleo_identity/models/tables/user_organization_role.py +63 -4
- maleo_identity/models/tables/user_profile.py +11 -4
- maleo_identity/models/tables/user_system_role.py +12 -5
- maleo_identity/models/transfers/general/organization.py +6 -1
- maleo_identity/models/transfers/general/organization_registration_code.py +19 -0
- maleo_identity/models/transfers/general/organization_role.py +5 -1
- maleo_identity/models/transfers/general/user.py +6 -1
- maleo_identity/models/transfers/general/user_organization.py +5 -1
- maleo_identity/models/transfers/general/user_organization_role.py +10 -10
- maleo_identity/models/transfers/general/user_system_role.py +6 -3
- maleo_identity/models/transfers/parameters/client/organization_registration_code.py +24 -0
- maleo_identity/models/transfers/parameters/general/organization_registration_code.py +33 -0
- maleo_identity/models/transfers/parameters/general/user.py +28 -1
- maleo_identity/models/transfers/parameters/service/organization_registration_code.py +19 -0
- maleo_identity/models/transfers/results/client/organization_registration_code.py +15 -0
- maleo_identity/models/transfers/results/client/user.py +7 -1
- maleo_identity/models/transfers/results/general/user.py +7 -1
- maleo_identity/models/transfers/results/repository/user.py +7 -1
- maleo_identity/models/transfers/results/service/__init__.py +0 -0
- maleo_identity/models/transfers/results/service/organization_registration_code.py +15 -0
- maleo_identity/types/results/client/organization_registration_code.py +20 -0
- maleo_identity/types/results/client/user.py +5 -0
- maleo_identity/types/results/general/user.py +5 -0
- maleo_identity/types/results/repository/user.py +5 -0
- maleo_identity/types/results/service/__init__.py +0 -0
- maleo_identity/types/results/service/organization_registration_code.py +21 -0
- {maleo_identity-0.0.54.dist-info → maleo_identity-0.0.58.dist-info}/METADATA +3 -3
- {maleo_identity-0.0.54.dist-info → maleo_identity-0.0.58.dist-info}/RECORD +58 -43
- {maleo_identity-0.0.54.dist-info → maleo_identity-0.0.58.dist-info}/WHEEL +0 -0
- {maleo_identity-0.0.54.dist-info → maleo_identity-0.0.58.dist-info}/top_level.txt +0 -0
|
@@ -1,10 +1,69 @@
|
|
|
1
1
|
from sqlalchemy import Column, ForeignKey
|
|
2
|
+
from sqlalchemy.orm import relationship
|
|
2
3
|
from sqlalchemy.types import Integer
|
|
3
4
|
from maleo_identity.db import MaleoIdentityMetadataManager
|
|
5
|
+
from maleo_foundation.models.table import DataTable
|
|
4
6
|
|
|
5
|
-
class
|
|
6
|
-
__tablename__ = "user_organization_roles"
|
|
7
|
+
class UserOrganizationRolesMixin:
|
|
7
8
|
#* Foreign Key UserOrganizationsTable
|
|
8
|
-
user_organization_id = Column(
|
|
9
|
+
user_organization_id = Column(
|
|
10
|
+
Integer,
|
|
11
|
+
ForeignKey(
|
|
12
|
+
"user_organizations.id",
|
|
13
|
+
ondelete="CASCADE",
|
|
14
|
+
onupdate="CASCADE"
|
|
15
|
+
),
|
|
16
|
+
nullable=False
|
|
17
|
+
)
|
|
18
|
+
|
|
9
19
|
#* Foreign Key OrganizationRolesTable
|
|
10
|
-
organization_role_id = Column(
|
|
20
|
+
organization_role_id = Column(
|
|
21
|
+
Integer,
|
|
22
|
+
ForeignKey(
|
|
23
|
+
"organization_roles.id",
|
|
24
|
+
ondelete="CASCADE",
|
|
25
|
+
onupdate="CASCADE"
|
|
26
|
+
),
|
|
27
|
+
nullable=False
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
class UserOrganizationRolesTable(
|
|
31
|
+
UserOrganizationRolesMixin,
|
|
32
|
+
DataTable,
|
|
33
|
+
MaleoIdentityMetadataManager.Base
|
|
34
|
+
):
|
|
35
|
+
__tablename__ = "user_organization_roles"
|
|
36
|
+
|
|
37
|
+
user_organization = relationship(
|
|
38
|
+
"UserOrganizationsTable",
|
|
39
|
+
back_populates="user_organization_roles",
|
|
40
|
+
cascade="all",
|
|
41
|
+
lazy="select",
|
|
42
|
+
uselist=False
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
user = relationship(
|
|
46
|
+
"UsersTable",
|
|
47
|
+
secondary="user_organizations",
|
|
48
|
+
primaryjoin="UserOrganizationRolesTable.user_organization_id == UserOrganizationsTable.id",
|
|
49
|
+
secondaryjoin="UserOrganizationsTable.user_id == UsersTable.id",
|
|
50
|
+
uselist=False,
|
|
51
|
+
viewonly=True
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
organization = relationship(
|
|
55
|
+
"OrganizationsTable",
|
|
56
|
+
secondary="user_organizations",
|
|
57
|
+
primaryjoin="UserOrganizationRolesTable.user_organization_id == UserOrganizationsTable.id",
|
|
58
|
+
secondaryjoin="UserOrganizationsTable.organization_id == OrganizationsTable.id",
|
|
59
|
+
uselist=False,
|
|
60
|
+
viewonly=True
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
organization_role = relationship(
|
|
64
|
+
"OrganizationRolesTable",
|
|
65
|
+
back_populates="user_organization_roles",
|
|
66
|
+
cascade="all",
|
|
67
|
+
lazy="select",
|
|
68
|
+
uselist=False
|
|
69
|
+
)
|
|
@@ -4,12 +4,11 @@ from sqlalchemy.types import String, Enum, Integer, Date, Text
|
|
|
4
4
|
from maleo_metadata.enums.blood_type import MaleoMetadataBloodTypeEnums
|
|
5
5
|
from maleo_metadata.enums.gender import MaleoMetadataGenderEnums
|
|
6
6
|
from maleo_identity.db import MaleoIdentityMetadataManager
|
|
7
|
+
from maleo_foundation.models.table import DataTable
|
|
7
8
|
|
|
8
|
-
class
|
|
9
|
-
__tablename__ = "user_profiles"
|
|
9
|
+
class UserProfilesMixin:
|
|
10
10
|
#* Foreign Key and Relationship to UsersTable
|
|
11
11
|
user_id = Column(Integer, ForeignKey("users.id", ondelete="CASCADE", onupdate="CASCADE"), nullable=False)
|
|
12
|
-
user = relationship("UsersTable", back_populates="profile")
|
|
13
12
|
id_card = Column(name="id_card", type_=String(16))
|
|
14
13
|
leading_title = Column(name="leading_title", type_=String(25))
|
|
15
14
|
first_name = Column(name="first_name", type_=String(50), nullable=False)
|
|
@@ -21,4 +20,12 @@ class UserProfilesTable(MaleoIdentityMetadataManager.Base):
|
|
|
21
20
|
birth_date = Column(name="birth_date", type_=Date)
|
|
22
21
|
gender = Column(name="gender", type_=Enum(MaleoMetadataGenderEnums.Gender, name="gender"))
|
|
23
22
|
blood_type = Column(name="blood_type", type_=Enum(MaleoMetadataBloodTypeEnums.BloodType, name="blood_type"))
|
|
24
|
-
avatar_name = Column(name="avatar_name", type_=Text, nullable=False)
|
|
23
|
+
avatar_name = Column(name="avatar_name", type_=Text, nullable=False)
|
|
24
|
+
|
|
25
|
+
class UserProfilesTable(
|
|
26
|
+
UserProfilesMixin,
|
|
27
|
+
DataTable,
|
|
28
|
+
MaleoIdentityMetadataManager.Base
|
|
29
|
+
):
|
|
30
|
+
__tablename__ = "user_profiles"
|
|
31
|
+
user = relationship("UsersTable", back_populates="profile")
|
|
@@ -3,15 +3,22 @@ from sqlalchemy.orm import relationship
|
|
|
3
3
|
from sqlalchemy.types import Enum, Integer
|
|
4
4
|
from maleo_metadata.enums.system_role import MaleoMetadataSystemRoleEnums
|
|
5
5
|
from maleo_identity.db import MaleoIdentityMetadataManager
|
|
6
|
+
from maleo_foundation.models.table import DataTable
|
|
6
7
|
|
|
7
|
-
class
|
|
8
|
-
__tablename__ = "user_system_roles"
|
|
9
|
-
#* Foreign Key and Relationship to UsersTable
|
|
8
|
+
class UserSystemRolesMixin:
|
|
10
9
|
user_id = Column(Integer, ForeignKey("users.id", ondelete="CASCADE", onupdate="CASCADE"), nullable=False)
|
|
11
|
-
user_details = relationship("UsersTable", back_populates="system_roles")
|
|
12
10
|
system_role = Column(
|
|
13
11
|
name="system_role",
|
|
14
12
|
type_=Enum(MaleoMetadataSystemRoleEnums.SystemRole, name="system_role"),
|
|
15
13
|
default=MaleoMetadataSystemRoleEnums.SystemRole.USER,
|
|
16
14
|
nullable=False
|
|
17
|
-
)
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
class UserSystemRolesTable(
|
|
18
|
+
UserSystemRolesMixin,
|
|
19
|
+
DataTable,
|
|
20
|
+
MaleoIdentityMetadataManager.Base
|
|
21
|
+
):
|
|
22
|
+
__tablename__ = "user_system_roles"
|
|
23
|
+
#* Foreign Key and Relationship to UsersTable
|
|
24
|
+
user = relationship("UsersTable", back_populates="system_roles")
|
|
@@ -3,8 +3,10 @@ from typing import List, Optional
|
|
|
3
3
|
from maleo_foundation.models.schemas.general import BaseGeneralSchemas
|
|
4
4
|
from maleo_metadata.models.expanded_schemas.organization_type import MaleoMetadataOrganizationTypeExpandedSchemas
|
|
5
5
|
from maleo_identity.models.schemas.organization import MaleoIdentityOrganizationSchemas
|
|
6
|
+
from .organization_registration_code import OptionalOrganizationRegistrationCodeTransfers
|
|
6
7
|
|
|
7
8
|
class OrganizationTransfers(
|
|
9
|
+
OptionalOrganizationRegistrationCodeTransfers,
|
|
8
10
|
MaleoIdentityOrganizationSchemas.Name,
|
|
9
11
|
MaleoIdentityOrganizationSchemas.Key,
|
|
10
12
|
MaleoIdentityOrganizationSchemas.OptionalParentId,
|
|
@@ -16,8 +18,11 @@ class OrganizationTransfers(
|
|
|
16
18
|
):
|
|
17
19
|
pass
|
|
18
20
|
|
|
21
|
+
class ExpandedOrganization(BaseModel):
|
|
22
|
+
organization:OrganizationTransfers = Field(..., description="Organization's details")
|
|
23
|
+
|
|
19
24
|
class OptionalExpandedOrganization(BaseModel):
|
|
20
|
-
|
|
25
|
+
organization:Optional[OrganizationTransfers] = Field(None, description="Organization's details")
|
|
21
26
|
|
|
22
27
|
class StructuredOrganizationTransfers(OrganizationTransfers):
|
|
23
28
|
children:List["StructuredOrganizationTransfers"] = Field(..., description="Organization children")
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from pydantic import BaseModel, Field
|
|
2
|
+
from typing import Optional
|
|
3
|
+
from maleo_foundation.models.schemas.general import BaseGeneralSchemas
|
|
4
|
+
from maleo_identity.models.schemas.general import MaleoIdentityGeneralSchemas
|
|
5
|
+
from maleo_identity.models.schemas.organization_registration_code import MaleoIdentityOrganizationRegistrationCodeSchemas
|
|
6
|
+
|
|
7
|
+
class OrganizationRegistrationCodeTransfers(
|
|
8
|
+
MaleoIdentityOrganizationRegistrationCodeSchemas.CurrentUses,
|
|
9
|
+
MaleoIdentityOrganizationRegistrationCodeSchemas.MaxUses,
|
|
10
|
+
MaleoIdentityOrganizationRegistrationCodeSchemas.Code,
|
|
11
|
+
MaleoIdentityGeneralSchemas.OrganizationId,
|
|
12
|
+
BaseGeneralSchemas.Status,
|
|
13
|
+
BaseGeneralSchemas.Timestamps,
|
|
14
|
+
BaseGeneralSchemas.Identifiers
|
|
15
|
+
):
|
|
16
|
+
pass
|
|
17
|
+
|
|
18
|
+
class OptionalOrganizationRegistrationCodeTransfers(BaseModel):
|
|
19
|
+
registration_code:Optional[OrganizationRegistrationCodeTransfers] = Field(..., description="Registration codes")
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from pydantic import BaseModel, Field
|
|
1
2
|
from maleo_foundation.models.schemas.general import BaseGeneralSchemas
|
|
2
3
|
from maleo_identity.models.schemas.general import MaleoIdentityGeneralSchemas
|
|
3
4
|
from maleo_identity.models.schemas.organization_role import MaleoIdentityOrganizationRoleSchemas
|
|
@@ -13,4 +14,7 @@ class OrganizationRoleTransfers(
|
|
|
13
14
|
BaseGeneralSchemas.Status,
|
|
14
15
|
BaseGeneralSchemas.Timestamps,
|
|
15
16
|
BaseGeneralSchemas.Identifiers
|
|
16
|
-
): pass
|
|
17
|
+
): pass
|
|
18
|
+
|
|
19
|
+
class ExpandedOrganizationRole(BaseModel):
|
|
20
|
+
organization_role:OrganizationRoleTransfers = Field(..., description="Organization role")
|
|
@@ -4,9 +4,11 @@ from maleo_foundation.models.schemas.general import BaseGeneralSchemas
|
|
|
4
4
|
from maleo_metadata.models.expanded_schemas.user_type import MaleoMetadataUserTypeExpandedSchemas
|
|
5
5
|
from maleo_identity.models.schemas.user import MaleoIdentityUserSchemas
|
|
6
6
|
from maleo_identity.models.transfers.general.user_profile import OptionalExpandedUserProfile
|
|
7
|
+
from .user_system_role import ListOfExpandedUserSystemRole
|
|
7
8
|
|
|
8
9
|
class UserTransfers(
|
|
9
10
|
OptionalExpandedUserProfile,
|
|
11
|
+
ListOfExpandedUserSystemRole,
|
|
10
12
|
MaleoIdentityUserSchemas.Phone,
|
|
11
13
|
MaleoIdentityUserSchemas.Email,
|
|
12
14
|
MaleoIdentityUserSchemas.Username,
|
|
@@ -17,7 +19,10 @@ class UserTransfers(
|
|
|
17
19
|
BaseGeneralSchemas.Identifiers
|
|
18
20
|
): pass
|
|
19
21
|
|
|
22
|
+
class ExpandedUser(BaseModel):
|
|
23
|
+
user:UserTransfers = Field(..., description="User's details")
|
|
24
|
+
|
|
20
25
|
class OptionalExpandedUser(BaseModel):
|
|
21
|
-
|
|
26
|
+
user:Optional[UserTransfers] = Field(None, description="User's details")
|
|
22
27
|
|
|
23
28
|
class PasswordTransfers(MaleoIdentityUserSchemas.Password): pass
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from pydantic import BaseModel, Field
|
|
1
2
|
from maleo_foundation.models.schemas.general import BaseGeneralSchemas
|
|
2
3
|
from maleo_identity.models.schemas.general import MaleoIdentityGeneralSchemas
|
|
3
4
|
from maleo_identity.models.transfers.general.organization import OptionalExpandedOrganization
|
|
@@ -11,4 +12,7 @@ class UserOrganizationTransfers(
|
|
|
11
12
|
BaseGeneralSchemas.Status,
|
|
12
13
|
BaseGeneralSchemas.Timestamps,
|
|
13
14
|
BaseGeneralSchemas.Identifiers
|
|
14
|
-
): pass
|
|
15
|
+
): pass
|
|
16
|
+
|
|
17
|
+
class ExpandedUserOrganization(BaseModel):
|
|
18
|
+
user_organization:UserOrganizationTransfers = Field(..., description="User's details")
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
from maleo_foundation.models.schemas.general import BaseGeneralSchemas
|
|
2
2
|
from maleo_identity.models.schemas.general import MaleoIdentityGeneralSchemas
|
|
3
3
|
from maleo_identity.models.schemas.user_organization_role import MaleoIdentityUserOrganizationRoleSchemas
|
|
4
|
-
from maleo_identity.models.transfers.general.organization import
|
|
5
|
-
from maleo_identity.models.transfers.general.
|
|
4
|
+
from maleo_identity.models.transfers.general.organization import ExpandedOrganization
|
|
5
|
+
from maleo_identity.models.transfers.general.organization_role import ExpandedOrganizationRole
|
|
6
|
+
from maleo_identity.models.transfers.general.user import ExpandedUser
|
|
7
|
+
from maleo_identity.models.transfers.general.user_organization import ExpandedUserOrganization
|
|
6
8
|
|
|
7
9
|
class UserOrganizationRoleTransfers(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
OptionalExpandedUser,
|
|
15
|
-
MaleoIdentityGeneralSchemas.UserId,
|
|
10
|
+
ExpandedOrganizationRole,
|
|
11
|
+
ExpandedOrganization,
|
|
12
|
+
# MaleoIdentityGeneralSchemas.OrganizationId,
|
|
13
|
+
ExpandedUser,
|
|
14
|
+
# MaleoIdentityGeneralSchemas.UserId,
|
|
15
|
+
ExpandedUserOrganization,
|
|
16
16
|
BaseGeneralSchemas.Status,
|
|
17
17
|
BaseGeneralSchemas.Timestamps,
|
|
18
18
|
BaseGeneralSchemas.Identifiers
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
+
from pydantic import BaseModel, Field
|
|
2
|
+
from typing import List
|
|
1
3
|
from maleo_foundation.models.schemas.general import BaseGeneralSchemas
|
|
2
4
|
from maleo_metadata.models.expanded_schemas.system_role import MaleoMetadataSystemRoleExpandedSchemas
|
|
3
5
|
from maleo_identity.models.schemas.general import MaleoIdentityGeneralSchemas
|
|
4
|
-
from maleo_identity.models.transfers.general.user import OptionalExpandedUser
|
|
5
6
|
|
|
6
7
|
class UserSystemRoleTransfers(
|
|
7
8
|
MaleoMetadataSystemRoleExpandedSchemas.OptionalExpandedSystemRole,
|
|
8
9
|
MaleoMetadataSystemRoleExpandedSchemas.SimpleSystemRole,
|
|
9
|
-
OptionalExpandedUser,
|
|
10
10
|
MaleoIdentityGeneralSchemas.UserId,
|
|
11
11
|
BaseGeneralSchemas.Status,
|
|
12
12
|
BaseGeneralSchemas.Timestamps,
|
|
13
13
|
BaseGeneralSchemas.Identifiers
|
|
14
|
-
): pass
|
|
14
|
+
): pass
|
|
15
|
+
|
|
16
|
+
class ListOfExpandedUserSystemRole(BaseModel):
|
|
17
|
+
system_roles:List[UserSystemRoleTransfers] = Field([], description="List of user's system roles")
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from maleo_foundation.models.schemas.parameter import BaseParameterSchemas
|
|
3
|
+
from maleo_foundation.models.transfers.parameters.client import BaseClientParametersTransfers
|
|
4
|
+
from maleo_identity.models.schemas.general import MaleoIdentityGeneralSchemas
|
|
5
|
+
|
|
6
|
+
class MaleoIdentityOrganizationRegistrationCodeClientParametersTransfers:
|
|
7
|
+
class GetMultipleFromOrganization(
|
|
8
|
+
BaseClientParametersTransfers.GetPaginatedMultiple,
|
|
9
|
+
MaleoIdentityGeneralSchemas.OrganizationId
|
|
10
|
+
): pass
|
|
11
|
+
|
|
12
|
+
class GetMultiple(
|
|
13
|
+
BaseClientParametersTransfers.GetPaginatedMultiple,
|
|
14
|
+
MaleoIdentityGeneralSchemas.OptionalListOfOrganizationIds
|
|
15
|
+
): pass
|
|
16
|
+
|
|
17
|
+
class GetMultipleFromOrganizationQuery(
|
|
18
|
+
BaseClientParametersTransfers.GetPaginatedMultipleQuery
|
|
19
|
+
): pass
|
|
20
|
+
|
|
21
|
+
class GetMultipleQuery(
|
|
22
|
+
BaseClientParametersTransfers.GetPaginatedMultipleQuery,
|
|
23
|
+
MaleoIdentityGeneralSchemas.OptionalListOfOrganizationIds
|
|
24
|
+
): pass
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from maleo_foundation.models.schemas.parameter import BaseParameterSchemas
|
|
3
|
+
from maleo_foundation.models.transfers.parameters.general import BaseGeneralParametersTransfers
|
|
4
|
+
from maleo_identity.models.schemas.general import MaleoIdentityGeneralSchemas
|
|
5
|
+
from maleo_identity.models.schemas.organization_registration_code import MaleoIdentityOrganizationRegistrationCodeSchemas
|
|
6
|
+
|
|
7
|
+
class MaleoIdentityOrganizationRegistrationCodeGeneralParametersTransfers:
|
|
8
|
+
class GetSingleQuery(BaseGeneralParametersTransfers.GetSingleQuery): pass
|
|
9
|
+
|
|
10
|
+
class GetSingle(
|
|
11
|
+
BaseParameterSchemas.OptionalListOfStatuses,
|
|
12
|
+
BaseParameterSchemas.IdentifierValue,
|
|
13
|
+
MaleoIdentityOrganizationRegistrationCodeSchemas.IdentifierType
|
|
14
|
+
): pass
|
|
15
|
+
|
|
16
|
+
class CreateFromOrganizationData(
|
|
17
|
+
MaleoIdentityOrganizationRegistrationCodeSchemas.MaxUses
|
|
18
|
+
): pass
|
|
19
|
+
|
|
20
|
+
class CreateData(
|
|
21
|
+
MaleoIdentityGeneralSchemas.OrganizationId,
|
|
22
|
+
MaleoIdentityOrganizationRegistrationCodeSchemas.MaxUses
|
|
23
|
+
): pass
|
|
24
|
+
|
|
25
|
+
class Create(CreateData): pass
|
|
26
|
+
|
|
27
|
+
class UpdateData(MaleoIdentityOrganizationRegistrationCodeSchemas.MaxUses): pass
|
|
28
|
+
|
|
29
|
+
class Update(
|
|
30
|
+
UpdateData,
|
|
31
|
+
BaseParameterSchemas.IdentifierValue,
|
|
32
|
+
MaleoIdentityOrganizationRegistrationCodeSchemas.IdentifierType
|
|
33
|
+
): pass
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
from maleo_foundation.models.schemas.parameter import BaseParameterSchemas
|
|
3
|
+
from maleo_metadata.models.expanded_schemas.blood_type import MaleoMetadataBloodTypeExpandedSchemas
|
|
4
|
+
from maleo_metadata.models.expanded_schemas.gender import MaleoMetadataGenderExpandedSchemas
|
|
3
5
|
from maleo_metadata.models.expanded_schemas.user_type import MaleoMetadataUserTypeExpandedSchemas
|
|
6
|
+
from maleo_identity.models.schemas.general import MaleoIdentityGeneralSchemas
|
|
4
7
|
from maleo_identity.models.schemas.user import MaleoIdentityUserSchemas
|
|
8
|
+
from maleo_identity.models.schemas.user_profile import MaleoIdentityUserProfileSchemas
|
|
5
9
|
|
|
6
10
|
class MaleoIdentityUserGeneralParametersTransfers:
|
|
7
11
|
class GetSingleQuery(
|
|
@@ -34,7 +38,7 @@ class MaleoIdentityUserGeneralParametersTransfers:
|
|
|
34
38
|
MaleoIdentityUserSchemas.Password,
|
|
35
39
|
UpdateData,
|
|
36
40
|
MaleoMetadataUserTypeExpandedSchemas.SimpleUserType,
|
|
37
|
-
|
|
41
|
+
MaleoIdentityGeneralSchemas.OptionalOrganizationId
|
|
38
42
|
): pass
|
|
39
43
|
|
|
40
44
|
class Update(
|
|
@@ -47,4 +51,27 @@ class MaleoIdentityUserGeneralParametersTransfers:
|
|
|
47
51
|
class Create(
|
|
48
52
|
CreateOrUpdateQuery,
|
|
49
53
|
CreateData
|
|
54
|
+
): pass
|
|
55
|
+
|
|
56
|
+
class Register(
|
|
57
|
+
CreateOrUpdateQuery,
|
|
58
|
+
MaleoIdentityUserProfileSchemas.OptionalAvatarName,
|
|
59
|
+
MaleoIdentityUserProfileSchemas.OptionalAvatarContentType,
|
|
60
|
+
MaleoIdentityUserProfileSchemas.OptionalAvatar,
|
|
61
|
+
MaleoMetadataBloodTypeExpandedSchemas.OptionalSimpleBloodType,
|
|
62
|
+
MaleoMetadataGenderExpandedSchemas.OptionalSimpleGender,
|
|
63
|
+
MaleoIdentityUserProfileSchemas.BirthDate,
|
|
64
|
+
MaleoIdentityUserProfileSchemas.BirthPlace,
|
|
65
|
+
MaleoIdentityUserProfileSchemas.EndingTitle,
|
|
66
|
+
MaleoIdentityUserProfileSchemas.LastName,
|
|
67
|
+
MaleoIdentityUserProfileSchemas.MiddleName,
|
|
68
|
+
MaleoIdentityUserProfileSchemas.FirstName,
|
|
69
|
+
MaleoIdentityUserProfileSchemas.LeadingTitle,
|
|
70
|
+
MaleoIdentityUserProfileSchemas.OptionalIdCard,
|
|
71
|
+
MaleoIdentityUserSchemas.PasswordConfirmation,
|
|
72
|
+
MaleoIdentityUserSchemas.Password,
|
|
73
|
+
MaleoIdentityUserSchemas.Phone,
|
|
74
|
+
MaleoIdentityUserSchemas.Email,
|
|
75
|
+
MaleoIdentityUserSchemas.Username,
|
|
76
|
+
MaleoIdentityUserSchemas.RegistrationCode
|
|
50
77
|
): pass
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from maleo_foundation.models.schemas.parameter import BaseParameterSchemas
|
|
3
|
+
from maleo_foundation.models.transfers.parameters.service import BaseServiceParametersTransfers
|
|
4
|
+
from maleo_identity.models.schemas.general import MaleoIdentityGeneralSchemas
|
|
5
|
+
|
|
6
|
+
class MaleoIdentityOrganizationRegistrationCodeServiceParametersTransfers:
|
|
7
|
+
class GetMultipleFromOrganizationQuery(
|
|
8
|
+
BaseServiceParametersTransfers.GetPaginatedMultipleQuery
|
|
9
|
+
): pass
|
|
10
|
+
|
|
11
|
+
class GetMultipleQuery(
|
|
12
|
+
BaseServiceParametersTransfers.GetPaginatedMultipleQuery,
|
|
13
|
+
MaleoIdentityGeneralSchemas.OptionalListOfOrganizationIds
|
|
14
|
+
): pass
|
|
15
|
+
|
|
16
|
+
class GetMultiple(
|
|
17
|
+
BaseServiceParametersTransfers.GetPaginatedMultiple,
|
|
18
|
+
MaleoIdentityGeneralSchemas.OptionalListOfOrganizationIds
|
|
19
|
+
): pass
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from pydantic import Field
|
|
3
|
+
from maleo_foundation.models.transfers.results.client.service import BaseClientServiceResultsTransfers
|
|
4
|
+
from maleo_identity.models.transfers.general.organization_registration_code import OrganizationRegistrationCodeTransfers
|
|
5
|
+
|
|
6
|
+
class MaleoIdentityOrganizationRegistrationCodeClientResultsTransfers:
|
|
7
|
+
class Fail(BaseClientServiceResultsTransfers.Fail): pass
|
|
8
|
+
|
|
9
|
+
class NoData(BaseClientServiceResultsTransfers.NoData): pass
|
|
10
|
+
|
|
11
|
+
class SingleData(BaseClientServiceResultsTransfers.SingleData):
|
|
12
|
+
data:OrganizationRegistrationCodeTransfers = Field(..., description="Single organization registration code data")
|
|
13
|
+
|
|
14
|
+
class MultipleData(BaseClientServiceResultsTransfers.PaginatedMultipleData):
|
|
15
|
+
data:list[OrganizationRegistrationCodeTransfers] = Field(..., description="Multiple organization registration codes data")
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
from pydantic import Field
|
|
3
|
+
from typing import Optional
|
|
3
4
|
from maleo_foundation.models.transfers.results.client import BaseClientServiceResultsTransfers
|
|
5
|
+
from maleo_identity.models.schemas.user import MaleoIdentityUserSchemas
|
|
4
6
|
from maleo_identity.models.transfers.general.user import UserTransfers, PasswordTransfers
|
|
5
7
|
|
|
6
8
|
class MaleoIdentityUserClientResultsTransfers:
|
|
@@ -15,4 +17,8 @@ class MaleoIdentityUserClientResultsTransfers:
|
|
|
15
17
|
data:list[UserTransfers] = Field(..., description="Multiple users data")
|
|
16
18
|
|
|
17
19
|
class SinglePassword(BaseClientServiceResultsTransfers.SingleData):
|
|
18
|
-
data:PasswordTransfers = Field(..., description="Single user password")
|
|
20
|
+
data:PasswordTransfers = Field(..., description="Single user password")
|
|
21
|
+
|
|
22
|
+
class SingleRegisterData(BaseClientServiceResultsTransfers.SingleData):
|
|
23
|
+
data:UserTransfers = Field(..., description="Single user data")
|
|
24
|
+
metadata:Optional[MaleoIdentityUserSchemas.RegisterResultMetadata] = Field(None, description="Optional metadata")
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
from pydantic import Field
|
|
3
|
+
from typing import Optional
|
|
3
4
|
from maleo_foundation.models.transfers.results.service.general import BaseServiceGeneralResultsTransfers
|
|
5
|
+
from maleo_identity.models.schemas.user import MaleoIdentityUserSchemas
|
|
4
6
|
from maleo_identity.models.transfers.general.user import UserTransfers, PasswordTransfers
|
|
5
7
|
|
|
6
8
|
class MaleoIdentityUserGeneralResultsTransfers:
|
|
@@ -15,4 +17,8 @@ class MaleoIdentityUserGeneralResultsTransfers:
|
|
|
15
17
|
data:list[UserTransfers] = Field(..., description="Multiple users data")
|
|
16
18
|
|
|
17
19
|
class SinglePassword(BaseServiceGeneralResultsTransfers.SingleData):
|
|
18
|
-
data:PasswordTransfers = Field(..., description="Single user password")
|
|
20
|
+
data:PasswordTransfers = Field(..., description="Single user password")
|
|
21
|
+
|
|
22
|
+
class SingleRegisterData(BaseServiceGeneralResultsTransfers.SingleData):
|
|
23
|
+
data:UserTransfers = Field(..., description="Single user data")
|
|
24
|
+
metadata:Optional[MaleoIdentityUserSchemas.RegisterResultMetadata] = Field(None, description="Optional metadata")
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
from pydantic import Field
|
|
3
|
+
from typing import Optional
|
|
3
4
|
from maleo_foundation.models.transfers.results.service.repository import BaseServiceRepositoryResultsTransfers
|
|
5
|
+
from maleo_identity.models.schemas.user import MaleoIdentityUserSchemas
|
|
4
6
|
from maleo_identity.models.transfers.general.user import UserTransfers, PasswordTransfers
|
|
5
7
|
|
|
6
8
|
class MaleoIdentityUserRepositoryResultsTransfers:
|
|
@@ -15,4 +17,8 @@ class MaleoIdentityUserRepositoryResultsTransfers:
|
|
|
15
17
|
data:list[UserTransfers] = Field(..., description="Single users data")
|
|
16
18
|
|
|
17
19
|
class SinglePassword(BaseServiceRepositoryResultsTransfers.SingleData):
|
|
18
|
-
data:PasswordTransfers = Field(..., description="Single password data")
|
|
20
|
+
data:PasswordTransfers = Field(..., description="Single password data")
|
|
21
|
+
|
|
22
|
+
class SingleRegisterData(BaseServiceRepositoryResultsTransfers.SingleData):
|
|
23
|
+
data:UserTransfers = Field(..., description="Single user data")
|
|
24
|
+
metadata:Optional[MaleoIdentityUserSchemas.RegisterResultMetadata] = Field(None, description="Optional metadata")
|
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from pydantic import Field
|
|
3
|
+
from maleo_foundation.models.transfers.results.service.general import BaseServiceGeneralResultsTransfers
|
|
4
|
+
from maleo_identity.models.transfers.general.organization_registration_code import OrganizationRegistrationCodeTransfers
|
|
5
|
+
|
|
6
|
+
class MaleoIdentityOrganizationRegistrationCodeServiceResultsTransfers:
|
|
7
|
+
class Fail(BaseServiceGeneralResultsTransfers.Fail): pass
|
|
8
|
+
|
|
9
|
+
class NoData(BaseServiceGeneralResultsTransfers.NoData): pass
|
|
10
|
+
|
|
11
|
+
class SingleData(BaseServiceGeneralResultsTransfers.SingleData):
|
|
12
|
+
data:OrganizationRegistrationCodeTransfers = Field(..., description="Single organization registration code data")
|
|
13
|
+
|
|
14
|
+
class MultipleData(BaseServiceGeneralResultsTransfers.PaginatedMultipleData):
|
|
15
|
+
data:list[OrganizationRegistrationCodeTransfers] = Field(..., description="Multiple organization registration codes data")
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from typing import Union
|
|
2
|
+
from maleo_identity.models.transfers.results.client.organization_registration_code \
|
|
3
|
+
import MaleoIdentityOrganizationRegistrationCodeClientResultsTransfers
|
|
4
|
+
|
|
5
|
+
class MaleoIdentityOrganizationRegistrationCodeClientResultsTypes:
|
|
6
|
+
GetMultiple = Union[
|
|
7
|
+
MaleoIdentityOrganizationRegistrationCodeClientResultsTransfers.Fail,
|
|
8
|
+
MaleoIdentityOrganizationRegistrationCodeClientResultsTransfers.NoData,
|
|
9
|
+
MaleoIdentityOrganizationRegistrationCodeClientResultsTransfers.MultipleData
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
GetSingle = Union[
|
|
13
|
+
MaleoIdentityOrganizationRegistrationCodeClientResultsTransfers.Fail,
|
|
14
|
+
MaleoIdentityOrganizationRegistrationCodeClientResultsTransfers.SingleData
|
|
15
|
+
]
|
|
16
|
+
|
|
17
|
+
Create = Union[
|
|
18
|
+
MaleoIdentityOrganizationRegistrationCodeClientResultsTransfers.Fail,
|
|
19
|
+
MaleoIdentityOrganizationRegistrationCodeClientResultsTransfers.SingleData
|
|
20
|
+
]
|
|
@@ -21,4 +21,9 @@ class MaleoIdentityUserClientResultsTypes:
|
|
|
21
21
|
GetSinglePassword = Union[
|
|
22
22
|
MaleoIdentityUserClientResultsTransfers.Fail,
|
|
23
23
|
MaleoIdentityUserClientResultsTransfers.SinglePassword
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
Register = Union[
|
|
27
|
+
MaleoIdentityUserClientResultsTransfers.Fail,
|
|
28
|
+
MaleoIdentityUserClientResultsTransfers.SingleRegisterData
|
|
24
29
|
]
|
|
@@ -22,4 +22,9 @@ class MaleoIdentityUserGeneralResultsTypes:
|
|
|
22
22
|
GetSinglePassword = Union[
|
|
23
23
|
MaleoIdentityUserGeneralResultsTransfers.Fail,
|
|
24
24
|
MaleoIdentityUserGeneralResultsTransfers.SinglePassword
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
Register = Union[
|
|
28
|
+
MaleoIdentityUserGeneralResultsTransfers.Fail,
|
|
29
|
+
MaleoIdentityUserGeneralResultsTransfers.SingleRegisterData
|
|
25
30
|
]
|
|
@@ -22,4 +22,9 @@ class MaleoIdentityUserRepositoryResultsTypes:
|
|
|
22
22
|
GetSinglePassword = Union[
|
|
23
23
|
MaleoIdentityUserRepositoryResultsTransfers.Fail,
|
|
24
24
|
MaleoIdentityUserRepositoryResultsTransfers.SinglePassword
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
Register = Union[
|
|
28
|
+
MaleoIdentityUserRepositoryResultsTransfers.Fail,
|
|
29
|
+
MaleoIdentityUserRepositoryResultsTransfers.SingleRegisterData
|
|
25
30
|
]
|
|
File without changes
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
from typing import Union
|
|
2
|
+
from maleo_identity.models.transfers.results.service.organization_registration_code \
|
|
3
|
+
import MaleoIdentityOrganizationRegistrationCodeServiceResultsTransfers
|
|
4
|
+
|
|
5
|
+
class MaleoIdentityOrganizationRegistrationCodeServiceResultsTypes:
|
|
6
|
+
GetMultiple = Union[
|
|
7
|
+
MaleoIdentityOrganizationRegistrationCodeServiceResultsTransfers.Fail,
|
|
8
|
+
MaleoIdentityOrganizationRegistrationCodeServiceResultsTransfers.NoData,
|
|
9
|
+
MaleoIdentityOrganizationRegistrationCodeServiceResultsTransfers.MultipleData
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
GetSingle = Union[
|
|
13
|
+
MaleoIdentityOrganizationRegistrationCodeServiceResultsTransfers.Fail,
|
|
14
|
+
MaleoIdentityOrganizationRegistrationCodeServiceResultsTransfers.NoData,
|
|
15
|
+
MaleoIdentityOrganizationRegistrationCodeServiceResultsTransfers.SingleData
|
|
16
|
+
]
|
|
17
|
+
|
|
18
|
+
CreateOrUpdate = Union[
|
|
19
|
+
MaleoIdentityOrganizationRegistrationCodeServiceResultsTransfers.Fail,
|
|
20
|
+
MaleoIdentityOrganizationRegistrationCodeServiceResultsTransfers.SingleData
|
|
21
|
+
]
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: maleo-identity
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.58
|
|
4
4
|
Summary: MaleoIdentity service package
|
|
5
5
|
Author-email: Agra Bima Yuda <agra@nexmedis.com>
|
|
6
6
|
License: MIT
|
|
7
7
|
Requires-Python: >=3.7
|
|
8
8
|
Description-Content-Type: text/markdown
|
|
9
|
-
Requires-Dist: maleo_foundation>=0.2.
|
|
10
|
-
Requires-Dist: maleo_metadata>=0.1.
|
|
9
|
+
Requires-Dist: maleo_foundation>=0.2.90
|
|
10
|
+
Requires-Dist: maleo_metadata>=0.1.26
|
|
11
11
|
|
|
12
12
|
# README #
|
|
13
13
|
|