maleo-identity 0.0.15__py3-none-any.whl → 0.0.17__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 +69 -1
- maleo_identity/client/controllers/http/user.py +36 -2
- maleo_identity/client/services/organization.py +140 -2
- maleo_identity/client/services/user.py +74 -5
- maleo_identity/constants/__init__.py +7 -3
- maleo_identity/constants/organization_role.py +20 -0
- maleo_identity/constants/user_organization_role.py +31 -0
- maleo_identity/enums/__init__.py +8 -4
- maleo_identity/enums/organization_role.py +6 -0
- maleo_identity/enums/user_organization_role.py +8 -0
- maleo_identity/models/responses/__init__.py +8 -4
- maleo_identity/models/responses/organization_role.py +25 -0
- maleo_identity/models/responses/user_organization_role.py +25 -0
- maleo_identity/models/schemas/general/__init__.py +8 -4
- maleo_identity/models/schemas/general/organization_role.py +29 -0
- maleo_identity/models/schemas/general/user_organization_role.py +35 -0
- maleo_identity/models/schemas/parameters/__init__.py +8 -4
- maleo_identity/models/schemas/parameters/organization_role.py +7 -0
- maleo_identity/models/schemas/parameters/user_organization_role.py +8 -0
- maleo_identity/models/schemas/results/__init__.py +8 -4
- maleo_identity/models/schemas/results/organization_role.py +10 -0
- maleo_identity/models/schemas/results/user_organization_role.py +11 -0
- maleo_identity/models/tables/__init__.py +5 -1
- maleo_identity/models/tables/organization_role.py +12 -0
- maleo_identity/models/tables/user_organization_role.py +10 -0
- maleo_identity/models/transfers/general/__init__.py +5 -1
- maleo_identity/models/transfers/general/organization_role.py +15 -0
- maleo_identity/models/transfers/general/user_organization_role.py +18 -0
- maleo_identity/models/transfers/parameters/client/__init__.py +8 -4
- maleo_identity/models/transfers/parameters/client/organization_role.py +31 -0
- maleo_identity/models/transfers/parameters/client/user_organization_role.py +34 -0
- maleo_identity/models/transfers/parameters/general/__init__.py +8 -4
- maleo_identity/models/transfers/parameters/general/organization_role.py +16 -0
- maleo_identity/models/transfers/parameters/general/user_organization_role.py +16 -0
- maleo_identity/models/transfers/parameters/service/__init__.py +8 -4
- maleo_identity/models/transfers/parameters/service/organization_role.py +24 -0
- maleo_identity/models/transfers/parameters/service/user_organization_role.py +26 -0
- maleo_identity/models/transfers/results/general/__init__.py +8 -4
- maleo_identity/models/transfers/results/general/organization_role.py +15 -0
- maleo_identity/models/transfers/results/general/user_organization_role.py +15 -0
- maleo_identity/models/transfers/results/query/__init__.py +7 -3
- maleo_identity/models/transfers/results/query/organization_role.py +19 -0
- maleo_identity/models/transfers/results/query/user_organization_role.py +19 -0
- maleo_identity/types/results/client/__init__.py +8 -4
- maleo_identity/types/results/client/organization_role.py +14 -0
- maleo_identity/types/results/client/user_organization_role.py +14 -0
- maleo_identity/types/results/general/__init__.py +8 -4
- maleo_identity/types/results/general/organization_role.py +15 -0
- maleo_identity/types/results/general/user_organization_role.py +15 -0
- maleo_identity/types/results/query/__init__.py +8 -4
- maleo_identity/types/results/query/organization_role.py +15 -0
- maleo_identity/types/results/query/user_organization_role.py +15 -0
- {maleo_identity-0.0.15.dist-info → maleo_identity-0.0.17.dist-info}/METADATA +3 -3
- {maleo_identity-0.0.15.dist-info → maleo_identity-0.0.17.dist-info}/RECORD +56 -24
- {maleo_identity-0.0.15.dist-info → maleo_identity-0.0.17.dist-info}/WHEEL +0 -0
- {maleo_identity-0.0.15.dist-info → maleo_identity-0.0.17.dist-info}/top_level.txt +0 -0
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
from maleo_foundation.managers.client.base import BearerAuth
|
|
2
2
|
from maleo_foundation.managers.client.maleo import MaleoClientHTTPController
|
|
3
3
|
from maleo_foundation.models.transfers.results.client.controllers.http import BaseClientHTTPControllerResults
|
|
4
|
+
from maleo_identity.models.transfers.parameters.general.organization_role import MaleoIdentityOrganizationRoleGeneralParametersTransfers
|
|
4
5
|
from maleo_identity.models.transfers.parameters.general.organization import MaleoIdentityOrganizationGeneralParametersTransfers
|
|
5
6
|
from maleo_identity.models.transfers.parameters.general.user_organization import MaleoIdentityUserOrganizationGeneralParametersTransfers
|
|
7
|
+
from maleo_identity.models.transfers.parameters.general.user_organization_role import MaleoIdentityUserOrganizationRoleGeneralParametersTransfers
|
|
8
|
+
from maleo_identity.models.transfers.parameters.client.organization_role import MaleoIdentityOrganizationRoleClientParametersTransfers
|
|
6
9
|
from maleo_identity.models.transfers.parameters.client.organization import MaleoIdentityOrganizationClientParametersTransfers
|
|
7
10
|
from maleo_identity.models.transfers.parameters.client.user_organization import MaleoIdentityUserOrganizationClientParametersTransfers
|
|
11
|
+
from maleo_identity.models.transfers.parameters.client.user_organization_role import MaleoIdentityUserOrganizationRoleClientParametersTransfers
|
|
8
12
|
|
|
9
13
|
class MaleoIdentityOrganizationHTTPController(MaleoClientHTTPController):
|
|
10
14
|
async def get_organizations(self, parameters:MaleoIdentityOrganizationClientParametersTransfers.GetMultiple) -> BaseClientHTTPControllerResults:
|
|
@@ -77,6 +81,38 @@ class MaleoIdentityOrganizationHTTPController(MaleoClientHTTPController):
|
|
|
77
81
|
response = await client.put(url=url, json=json, params=params, auth=auth)
|
|
78
82
|
return BaseClientHTTPControllerResults(response=response)
|
|
79
83
|
|
|
84
|
+
async def get_organization_roles(self, parameters:MaleoIdentityOrganizationRoleClientParametersTransfers.GetMultipleFromOrganization) -> BaseClientHTTPControllerResults:
|
|
85
|
+
"""Get organization's roles from MaleoIdentity"""
|
|
86
|
+
async with self._manager.get_client() as client:
|
|
87
|
+
#* Define URL
|
|
88
|
+
url = f"{self._manager.url.api}/v1/organizations/{parameters.organization_id}/roles/"
|
|
89
|
+
|
|
90
|
+
#* Parse parameters to query params
|
|
91
|
+
params = MaleoIdentityOrganizationRoleClientParametersTransfers.GetMultipleFromOrganizationQuery.model_validate(parameters.model_dump()).model_dump(exclude_none=True)
|
|
92
|
+
|
|
93
|
+
#* Create auth
|
|
94
|
+
auth = BearerAuth(token=self._service_manager.token)
|
|
95
|
+
|
|
96
|
+
#* Send request and wait for response
|
|
97
|
+
response = await client.get(url=url, params=params, auth=auth)
|
|
98
|
+
return BaseClientHTTPControllerResults(response=response)
|
|
99
|
+
|
|
100
|
+
async def get_organization_role(self, parameters:MaleoIdentityOrganizationRoleGeneralParametersTransfers.GetSingle) -> BaseClientHTTPControllerResults:
|
|
101
|
+
"""Get organization's role from MaleoIdentity"""
|
|
102
|
+
async with self._manager.get_client() as client:
|
|
103
|
+
#* Define URL
|
|
104
|
+
url = f"{self._manager.url.api}/v1/organizations/{parameters.organization_id}/roles/{parameters.key}"
|
|
105
|
+
|
|
106
|
+
#* Parse parameters to query params
|
|
107
|
+
params = MaleoIdentityOrganizationRoleGeneralParametersTransfers.GetSingleQuery.model_validate(parameters.model_dump()).model_dump(exclude_none=True)
|
|
108
|
+
|
|
109
|
+
#* Create auth
|
|
110
|
+
auth = BearerAuth(token=self._service_manager.token)
|
|
111
|
+
|
|
112
|
+
#* Send request and wait for response
|
|
113
|
+
response = await client.get(url=url, params=params, auth=auth)
|
|
114
|
+
return BaseClientHTTPControllerResults(response=response)
|
|
115
|
+
|
|
80
116
|
async def get_organization_users(self, parameters:MaleoIdentityUserOrganizationClientParametersTransfers.GetMultipleFromOrganization) -> BaseClientHTTPControllerResults:
|
|
81
117
|
"""Get organization's users from MaleoIdentity"""
|
|
82
118
|
async with self._manager.get_client() as client:
|
|
@@ -94,7 +130,7 @@ class MaleoIdentityOrganizationHTTPController(MaleoClientHTTPController):
|
|
|
94
130
|
return BaseClientHTTPControllerResults(response=response)
|
|
95
131
|
|
|
96
132
|
async def get_organization_user(self, parameters:MaleoIdentityUserOrganizationGeneralParametersTransfers.GetSingle) -> BaseClientHTTPControllerResults:
|
|
97
|
-
"""Get
|
|
133
|
+
"""Get organization's user from MaleoIdentity"""
|
|
98
134
|
async with self._manager.get_client() as client:
|
|
99
135
|
#* Define URL
|
|
100
136
|
url = f"{self._manager.url.api}/v1/organizations/{parameters.organization_id}/users/{parameters.user_id}"
|
|
@@ -105,6 +141,38 @@ class MaleoIdentityOrganizationHTTPController(MaleoClientHTTPController):
|
|
|
105
141
|
#* Create auth
|
|
106
142
|
auth = BearerAuth(token=self._service_manager.token)
|
|
107
143
|
|
|
144
|
+
#* Send request and wait for response
|
|
145
|
+
response = await client.get(url=url, params=params, auth=auth)
|
|
146
|
+
return BaseClientHTTPControllerResults(response=response)
|
|
147
|
+
|
|
148
|
+
async def get_organization_user_roles(self, parameters:MaleoIdentityUserOrganizationRoleClientParametersTransfers.GetMultipleFromUserOrOrganization) -> BaseClientHTTPControllerResults:
|
|
149
|
+
"""Get organization's user roles from MaleoIdentity"""
|
|
150
|
+
async with self._manager.get_client() as client:
|
|
151
|
+
#* Define URL
|
|
152
|
+
url = f"{self._manager.url.api}/v1/organizations/{parameters.organization_id}/users/{parameters.user_id}/roles/"
|
|
153
|
+
|
|
154
|
+
#* Parse parameters to query params
|
|
155
|
+
params = MaleoIdentityUserOrganizationRoleClientParametersTransfers.GetMultipleFromUserOrOrganizationQuery.model_validate(parameters.model_dump()).model_dump(exclude_none=True)
|
|
156
|
+
|
|
157
|
+
#* Create auth
|
|
158
|
+
auth = BearerAuth(token=self._service_manager.token)
|
|
159
|
+
|
|
160
|
+
#* Send request and wait for response
|
|
161
|
+
response = await client.get(url=url, params=params, auth=auth)
|
|
162
|
+
return BaseClientHTTPControllerResults(response=response)
|
|
163
|
+
|
|
164
|
+
async def get_organization_user_role(self, parameters:MaleoIdentityUserOrganizationRoleGeneralParametersTransfers.GetSingle) -> BaseClientHTTPControllerResults:
|
|
165
|
+
"""Get organization's user role from MaleoIdentity"""
|
|
166
|
+
async with self._manager.get_client() as client:
|
|
167
|
+
#* Define URL
|
|
168
|
+
url = f"{self._manager.url.api}/v1/organizations/{parameters.organization_id}/users/{parameters.user_id}/roles/{parameters.key}"
|
|
169
|
+
|
|
170
|
+
#* Parse parameters to query params
|
|
171
|
+
params = MaleoIdentityUserOrganizationRoleGeneralParametersTransfers.GetSingleQuery.model_validate(parameters.model_dump()).model_dump(exclude_none=True)
|
|
172
|
+
|
|
173
|
+
#* Create auth
|
|
174
|
+
auth = BearerAuth(token=self._service_manager.token)
|
|
175
|
+
|
|
108
176
|
#* Send request and wait for response
|
|
109
177
|
response = await client.get(url=url, params=params, auth=auth)
|
|
110
178
|
return BaseClientHTTPControllerResults(response=response)
|
|
@@ -4,9 +4,11 @@ from maleo_foundation.models.transfers.results.client.controllers.http import Ba
|
|
|
4
4
|
from maleo_identity.models.transfers.parameters.general.user import MaleoIdentityUserGeneralParametersTransfers
|
|
5
5
|
from maleo_identity.models.transfers.parameters.general.user_organization import MaleoIdentityUserOrganizationGeneralParametersTransfers
|
|
6
6
|
from maleo_identity.models.transfers.parameters.general.user_system_role import MaleoIdentityUserSystemRoleGeneralParametersTransfers
|
|
7
|
+
from maleo_identity.models.transfers.parameters.general.user_organization_role import MaleoIdentityUserOrganizationRoleGeneralParametersTransfers
|
|
7
8
|
from maleo_identity.models.transfers.parameters.client.user import MaleoIdentityUserClientParametersTransfers
|
|
8
9
|
from maleo_identity.models.transfers.parameters.client.user_organization import MaleoIdentityUserOrganizationClientParametersTransfers
|
|
9
10
|
from maleo_identity.models.transfers.parameters.client.user_system_role import MaleoIdentityUserSystemRoleClientParametersTransfers
|
|
11
|
+
from maleo_identity.models.transfers.parameters.client.user_organization_role import MaleoIdentityUserOrganizationRoleClientParametersTransfers
|
|
10
12
|
|
|
11
13
|
class MaleoIdentityUserHTTPController(MaleoClientHTTPController):
|
|
12
14
|
async def get_users(self, parameters:MaleoIdentityUserClientParametersTransfers.GetMultiple) -> BaseClientHTTPControllerResults:
|
|
@@ -125,7 +127,7 @@ class MaleoIdentityUserHTTPController(MaleoClientHTTPController):
|
|
|
125
127
|
return BaseClientHTTPControllerResults(response=response)
|
|
126
128
|
|
|
127
129
|
async def get_user_organizations(self, parameters:MaleoIdentityUserOrganizationClientParametersTransfers.GetMultipleFromUser) -> BaseClientHTTPControllerResults:
|
|
128
|
-
"""Get user's
|
|
130
|
+
"""Get user's organization roles from MaleoIdentity"""
|
|
129
131
|
async with self._manager.get_client() as client:
|
|
130
132
|
#* Define URL
|
|
131
133
|
url = f"{self._manager.url.api}/v1/users/{parameters.user_id}/organizations/"
|
|
@@ -141,7 +143,7 @@ class MaleoIdentityUserHTTPController(MaleoClientHTTPController):
|
|
|
141
143
|
return BaseClientHTTPControllerResults(response=response)
|
|
142
144
|
|
|
143
145
|
async def get_user_organization(self, parameters:MaleoIdentityUserOrganizationGeneralParametersTransfers.GetSingle) -> BaseClientHTTPControllerResults:
|
|
144
|
-
"""Get user's organization from MaleoIdentity"""
|
|
146
|
+
"""Get user's organization role from MaleoIdentity"""
|
|
145
147
|
async with self._manager.get_client() as client:
|
|
146
148
|
#* Define URL
|
|
147
149
|
url = f"{self._manager.url.api}/v1/users/{parameters.user_id}/organizations/{parameters.organization_id}"
|
|
@@ -152,6 +154,38 @@ class MaleoIdentityUserHTTPController(MaleoClientHTTPController):
|
|
|
152
154
|
#* Create auth
|
|
153
155
|
auth = BearerAuth(token=self._service_manager.token)
|
|
154
156
|
|
|
157
|
+
#* Send request and wait for response
|
|
158
|
+
response = await client.get(url=url, params=params, auth=auth)
|
|
159
|
+
return BaseClientHTTPControllerResults(response=response)
|
|
160
|
+
|
|
161
|
+
async def get_user_organization_roles(self, parameters:MaleoIdentityUserOrganizationRoleClientParametersTransfers.GetMultipleFromUserOrOrganization) -> BaseClientHTTPControllerResults:
|
|
162
|
+
"""Get user's organization roles from MaleoIdentity"""
|
|
163
|
+
async with self._manager.get_client() as client:
|
|
164
|
+
#* Define URL
|
|
165
|
+
url = f"{self._manager.url.api}/v1/users/{parameters.user_id}/organizations/{parameters.organization_id}/roles/"
|
|
166
|
+
|
|
167
|
+
#* Parse parameters to query params
|
|
168
|
+
params = MaleoIdentityUserOrganizationRoleClientParametersTransfers.GetMultipleFromUserOrOrganizationQuery.model_validate(parameters.model_dump()).model_dump(exclude_none=True)
|
|
169
|
+
|
|
170
|
+
#* Create auth
|
|
171
|
+
auth = BearerAuth(token=self._service_manager.token)
|
|
172
|
+
|
|
173
|
+
#* Send request and wait for response
|
|
174
|
+
response = await client.get(url=url, params=params, auth=auth)
|
|
175
|
+
return BaseClientHTTPControllerResults(response=response)
|
|
176
|
+
|
|
177
|
+
async def get_user_organization_role(self, parameters:MaleoIdentityUserOrganizationRoleGeneralParametersTransfers.GetSingle) -> BaseClientHTTPControllerResults:
|
|
178
|
+
"""Get user's organization role from MaleoIdentity"""
|
|
179
|
+
async with self._manager.get_client() as client:
|
|
180
|
+
#* Define URL
|
|
181
|
+
url = f"{self._manager.url.api}/v1/users/{parameters.user_id}/organizations/{parameters.organization_id}/roles/{parameters.key}"
|
|
182
|
+
|
|
183
|
+
#* Parse parameters to query params
|
|
184
|
+
params = MaleoIdentityUserOrganizationRoleGeneralParametersTransfers.GetSingleQuery.model_validate(parameters.model_dump()).model_dump(exclude_none=True)
|
|
185
|
+
|
|
186
|
+
#* Create auth
|
|
187
|
+
auth = BearerAuth(token=self._service_manager.token)
|
|
188
|
+
|
|
155
189
|
#* Send request and wait for response
|
|
156
190
|
response = await client.get(url=url, params=params, auth=auth)
|
|
157
191
|
return BaseClientHTTPControllerResults(response=response)
|
|
@@ -2,14 +2,22 @@ from maleo_foundation.managers.client.base import ClientService
|
|
|
2
2
|
from maleo_foundation.utils.exceptions import BaseExceptions
|
|
3
3
|
from maleo_identity.client.controllers import MaleoIdentityOrganizationControllers
|
|
4
4
|
from maleo_identity.enums.general import MaleoIdentityGeneralEnums
|
|
5
|
+
from maleo_identity.models.transfers.parameters.general.organization_role import MaleoIdentityOrganizationRoleGeneralParametersTransfers
|
|
5
6
|
from maleo_identity.models.transfers.parameters.general.organization import MaleoIdentityOrganizationGeneralParametersTransfers
|
|
6
7
|
from maleo_identity.models.transfers.parameters.general.user_organization import MaleoIdentityUserOrganizationGeneralParametersTransfers
|
|
8
|
+
from maleo_identity.models.transfers.parameters.general.user_organization_role import MaleoIdentityUserOrganizationRoleGeneralParametersTransfers
|
|
9
|
+
from maleo_identity.models.transfers.parameters.client.organization_role import MaleoIdentityOrganizationRoleClientParametersTransfers
|
|
7
10
|
from maleo_identity.models.transfers.parameters.client.organization import MaleoIdentityOrganizationClientParametersTransfers
|
|
8
11
|
from maleo_identity.models.transfers.parameters.client.user_organization import MaleoIdentityUserOrganizationClientParametersTransfers
|
|
12
|
+
from maleo_identity.models.transfers.parameters.client.user_organization_role import MaleoIdentityUserOrganizationRoleClientParametersTransfers
|
|
13
|
+
from maleo_identity.models.transfers.results.general.organization_role import MaleoIdentityOrganizationRoleGeneralResultsTransfers
|
|
9
14
|
from maleo_identity.models.transfers.results.general.organization import MaleoIdentityOrganizationGeneralResultsTransfers
|
|
10
15
|
from maleo_identity.models.transfers.results.general.user_organization import MaleoIdentityUserOrganizationGeneralResultsTransfers
|
|
16
|
+
from maleo_identity.models.transfers.results.general.user_organization_role import MaleoIdentityUserOrganizationRoleGeneralResultsTransfers
|
|
17
|
+
from maleo_identity.types.results.client.organization_role import MaleoIdentityOrganizationRoleClientResultsTypes
|
|
11
18
|
from maleo_identity.types.results.client.organization import MaleoIdentityOrganizationClientResultsTypes
|
|
12
19
|
from maleo_identity.types.results.client.user_organization import MaleoIdentityUserOrganizationClientResultsTypes
|
|
20
|
+
from maleo_identity.types.results.client.user_organization_role import MaleoIdentityUserOrganizationRoleClientResultsTypes
|
|
13
21
|
|
|
14
22
|
class MaleoIdentityOrganizationClientService(ClientService):
|
|
15
23
|
def __init__(self, logger, controllers:MaleoIdentityOrganizationControllers):
|
|
@@ -164,7 +172,7 @@ class MaleoIdentityOrganizationClientService(ClientService):
|
|
|
164
172
|
message = "Invalid controller type"
|
|
165
173
|
description = "The provided controller type did not exists"
|
|
166
174
|
return MaleoIdentityUserOrganizationGeneralResultsTransfers.Fail(message=message, description=description)
|
|
167
|
-
#*
|
|
175
|
+
#* Retrieve organization's users using chosen controller
|
|
168
176
|
if controller_type == MaleoIdentityGeneralEnums.ClientControllerType.HTTP:
|
|
169
177
|
controller_result = await self._controllers.http.get_organization_users(parameters=parameters)
|
|
170
178
|
else:
|
|
@@ -198,7 +206,7 @@ class MaleoIdentityOrganizationClientService(ClientService):
|
|
|
198
206
|
message = "Invalid controller type"
|
|
199
207
|
description = "The provided controller type did not exists"
|
|
200
208
|
return MaleoIdentityUserOrganizationGeneralResultsTransfers.Fail(message=message, description=description)
|
|
201
|
-
#*
|
|
209
|
+
#* Retrieve organization's user using chosen controller
|
|
202
210
|
if controller_type == MaleoIdentityGeneralEnums.ClientControllerType.HTTP:
|
|
203
211
|
controller_result = await self._controllers.http.get_organization_user(parameters=parameters)
|
|
204
212
|
else:
|
|
@@ -210,4 +218,134 @@ class MaleoIdentityOrganizationClientService(ClientService):
|
|
|
210
218
|
return MaleoIdentityUserOrganizationGeneralResultsTransfers.Fail.model_validate(controller_result.content)
|
|
211
219
|
else:
|
|
212
220
|
return MaleoIdentityUserOrganizationGeneralResultsTransfers.SingleData.model_validate(controller_result.content)
|
|
221
|
+
return await _impl()
|
|
222
|
+
|
|
223
|
+
async def get_organization_roles(
|
|
224
|
+
self,
|
|
225
|
+
parameters:MaleoIdentityOrganizationRoleClientParametersTransfers.GetMultipleFromOrganization,
|
|
226
|
+
controller_type:MaleoIdentityGeneralEnums.ClientControllerType = MaleoIdentityGeneralEnums.ClientControllerType.HTTP
|
|
227
|
+
) -> MaleoIdentityOrganizationRoleClientResultsTypes.GetMultiple:
|
|
228
|
+
"""Retrieve organization's roles from MaleoIdentity"""
|
|
229
|
+
@BaseExceptions.service_exception_handler(
|
|
230
|
+
operation="retrieving organization's roles",
|
|
231
|
+
logger=self._logger,
|
|
232
|
+
fail_result_class=MaleoIdentityOrganizationRoleGeneralResultsTransfers.Fail
|
|
233
|
+
)
|
|
234
|
+
async def _impl():
|
|
235
|
+
#* Validate chosen controller type
|
|
236
|
+
if not isinstance(controller_type, MaleoIdentityGeneralEnums.ClientControllerType):
|
|
237
|
+
message = "Invalid controller type"
|
|
238
|
+
description = "The provided controller type did not exists"
|
|
239
|
+
return MaleoIdentityOrganizationRoleGeneralResultsTransfers.Fail(message=message, description=description)
|
|
240
|
+
#* Retrieve organization's roles using chosen controller
|
|
241
|
+
if controller_type == MaleoIdentityGeneralEnums.ClientControllerType.HTTP:
|
|
242
|
+
controller_result = await self._controllers.http.get_organization_roles(parameters=parameters)
|
|
243
|
+
else:
|
|
244
|
+
message = "Invalid controller type"
|
|
245
|
+
description = "The provided controller type has not been implemented"
|
|
246
|
+
return MaleoIdentityOrganizationRoleGeneralResultsTransfers.Fail(message=message, description=description)
|
|
247
|
+
#* Return proper response
|
|
248
|
+
if not controller_result.success:
|
|
249
|
+
return MaleoIdentityOrganizationRoleGeneralResultsTransfers.Fail.model_validate(controller_result.content)
|
|
250
|
+
else:
|
|
251
|
+
if controller_result.content["data"] is None:
|
|
252
|
+
return MaleoIdentityOrganizationRoleGeneralResultsTransfers.NoData.model_validate(controller_result.content)
|
|
253
|
+
else:
|
|
254
|
+
return MaleoIdentityOrganizationRoleGeneralResultsTransfers.MultipleData.model_validate(controller_result.content)
|
|
255
|
+
return await _impl()
|
|
256
|
+
|
|
257
|
+
async def get_organization_role(
|
|
258
|
+
self,
|
|
259
|
+
parameters:MaleoIdentityOrganizationRoleGeneralParametersTransfers.GetSingle,
|
|
260
|
+
controller_type:MaleoIdentityGeneralEnums.ClientControllerType = MaleoIdentityGeneralEnums.ClientControllerType.HTTP
|
|
261
|
+
) -> MaleoIdentityOrganizationRoleClientResultsTypes.GetSingle:
|
|
262
|
+
"""Retrieve organization's role from MaleoIdentity"""
|
|
263
|
+
@BaseExceptions.service_exception_handler(
|
|
264
|
+
operation="retrieving organization's role",
|
|
265
|
+
logger=self._logger,
|
|
266
|
+
fail_result_class=MaleoIdentityOrganizationRoleGeneralResultsTransfers.Fail
|
|
267
|
+
)
|
|
268
|
+
async def _impl():
|
|
269
|
+
#* Validate chosen controller type
|
|
270
|
+
if not isinstance(controller_type, MaleoIdentityGeneralEnums.ClientControllerType):
|
|
271
|
+
message = "Invalid controller type"
|
|
272
|
+
description = "The provided controller type did not exists"
|
|
273
|
+
return MaleoIdentityOrganizationRoleGeneralResultsTransfers.Fail(message=message, description=description)
|
|
274
|
+
#* Retrieve organization's role using chosen controller
|
|
275
|
+
if controller_type == MaleoIdentityGeneralEnums.ClientControllerType.HTTP:
|
|
276
|
+
controller_result = await self._controllers.http.get_organization_role(parameters=parameters)
|
|
277
|
+
else:
|
|
278
|
+
message = "Invalid controller type"
|
|
279
|
+
description = "The provided controller type has not been implemented"
|
|
280
|
+
return MaleoIdentityOrganizationRoleGeneralResultsTransfers.Fail(message=message, description=description)
|
|
281
|
+
#* Return proper response
|
|
282
|
+
if not controller_result.success:
|
|
283
|
+
return MaleoIdentityOrganizationRoleGeneralResultsTransfers.Fail.model_validate(controller_result.content)
|
|
284
|
+
else:
|
|
285
|
+
return MaleoIdentityOrganizationRoleGeneralResultsTransfers.SingleData.model_validate(controller_result.content)
|
|
286
|
+
return await _impl()
|
|
287
|
+
|
|
288
|
+
async def get_organization_user_roles(
|
|
289
|
+
self,
|
|
290
|
+
parameters:MaleoIdentityUserOrganizationRoleClientParametersTransfers.GetMultipleFromUserOrOrganization,
|
|
291
|
+
controller_type:MaleoIdentityGeneralEnums.ClientControllerType = MaleoIdentityGeneralEnums.ClientControllerType.HTTP
|
|
292
|
+
) -> MaleoIdentityUserOrganizationRoleClientResultsTypes.GetMultiple:
|
|
293
|
+
"""Retrieve organization's user roles from MaleoIdentity"""
|
|
294
|
+
@BaseExceptions.service_exception_handler(
|
|
295
|
+
operation="retrieving organization's user roles",
|
|
296
|
+
logger=self._logger,
|
|
297
|
+
fail_result_class=MaleoIdentityUserOrganizationRoleGeneralResultsTransfers.Fail
|
|
298
|
+
)
|
|
299
|
+
async def _impl():
|
|
300
|
+
#* Validate chosen controller type
|
|
301
|
+
if not isinstance(controller_type, MaleoIdentityGeneralEnums.ClientControllerType):
|
|
302
|
+
message = "Invalid controller type"
|
|
303
|
+
description = "The provided controller type did not exists"
|
|
304
|
+
return MaleoIdentityUserOrganizationRoleGeneralResultsTransfers.Fail(message=message, description=description)
|
|
305
|
+
#* Retrieve organization's user roles using chosen controller
|
|
306
|
+
if controller_type == MaleoIdentityGeneralEnums.ClientControllerType.HTTP:
|
|
307
|
+
controller_result = await self._controllers.http.get_organization_user_roles(parameters=parameters)
|
|
308
|
+
else:
|
|
309
|
+
message = "Invalid controller type"
|
|
310
|
+
description = "The provided controller type has not been implemented"
|
|
311
|
+
return MaleoIdentityUserOrganizationRoleGeneralResultsTransfers.Fail(message=message, description=description)
|
|
312
|
+
#* Return proper response
|
|
313
|
+
if not controller_result.success:
|
|
314
|
+
return MaleoIdentityUserOrganizationRoleGeneralResultsTransfers.Fail.model_validate(controller_result.content)
|
|
315
|
+
else:
|
|
316
|
+
if controller_result.content["data"] is None:
|
|
317
|
+
return MaleoIdentityUserOrganizationRoleGeneralResultsTransfers.NoData.model_validate(controller_result.content)
|
|
318
|
+
else:
|
|
319
|
+
return MaleoIdentityUserOrganizationRoleGeneralResultsTransfers.MultipleData.model_validate(controller_result.content)
|
|
320
|
+
return await _impl()
|
|
321
|
+
|
|
322
|
+
async def get_organization_user_role(
|
|
323
|
+
self,
|
|
324
|
+
parameters:MaleoIdentityUserOrganizationRoleGeneralParametersTransfers.GetSingle,
|
|
325
|
+
controller_type:MaleoIdentityGeneralEnums.ClientControllerType = MaleoIdentityGeneralEnums.ClientControllerType.HTTP
|
|
326
|
+
) -> MaleoIdentityUserOrganizationClientResultsTypes.GetSingle:
|
|
327
|
+
"""Retrieve organization's user role from MaleoIdentity"""
|
|
328
|
+
@BaseExceptions.service_exception_handler(
|
|
329
|
+
operation="retrieving organization's user role",
|
|
330
|
+
logger=self._logger,
|
|
331
|
+
fail_result_class=MaleoIdentityUserOrganizationRoleGeneralResultsTransfers.Fail
|
|
332
|
+
)
|
|
333
|
+
async def _impl():
|
|
334
|
+
#* Validate chosen controller type
|
|
335
|
+
if not isinstance(controller_type, MaleoIdentityGeneralEnums.ClientControllerType):
|
|
336
|
+
message = "Invalid controller type"
|
|
337
|
+
description = "The provided controller type did not exists"
|
|
338
|
+
return MaleoIdentityUserOrganizationRoleGeneralResultsTransfers.Fail(message=message, description=description)
|
|
339
|
+
#* Retrieve organization's user role using chosen controller
|
|
340
|
+
if controller_type == MaleoIdentityGeneralEnums.ClientControllerType.HTTP:
|
|
341
|
+
controller_result = await self._controllers.http.get_organization_user_role(parameters=parameters)
|
|
342
|
+
else:
|
|
343
|
+
message = "Invalid controller type"
|
|
344
|
+
description = "The provided controller type has not been implemented"
|
|
345
|
+
return MaleoIdentityUserOrganizationRoleGeneralResultsTransfers.Fail(message=message, description=description)
|
|
346
|
+
#* Return proper response
|
|
347
|
+
if not controller_result.success:
|
|
348
|
+
return MaleoIdentityUserOrganizationRoleGeneralResultsTransfers.Fail.model_validate(controller_result.content)
|
|
349
|
+
else:
|
|
350
|
+
return MaleoIdentityUserOrganizationRoleGeneralResultsTransfers.SingleData.model_validate(controller_result.content)
|
|
213
351
|
return await _impl()
|
|
@@ -6,15 +6,19 @@ from maleo_identity.enums.general import MaleoIdentityGeneralEnums
|
|
|
6
6
|
from maleo_identity.models.transfers.parameters.general.user import MaleoIdentityUserGeneralParametersTransfers
|
|
7
7
|
from maleo_identity.models.transfers.parameters.general.user_organization import MaleoIdentityUserOrganizationGeneralParametersTransfers
|
|
8
8
|
from maleo_identity.models.transfers.parameters.general.user_system_role import MaleoIdentityUserSystemRoleGeneralParametersTransfers
|
|
9
|
+
from maleo_identity.models.transfers.parameters.general.user_organization_role import MaleoIdentityUserOrganizationRoleGeneralParametersTransfers
|
|
9
10
|
from maleo_identity.models.transfers.parameters.client.user import MaleoIdentityUserClientParametersTransfers
|
|
10
11
|
from maleo_identity.models.transfers.parameters.client.user_organization import MaleoIdentityUserOrganizationClientParametersTransfers
|
|
11
12
|
from maleo_identity.models.transfers.parameters.client.user_system_role import MaleoIdentityUserSystemRoleClientParametersTransfers
|
|
13
|
+
from maleo_identity.models.transfers.parameters.client.user_organization_role import MaleoIdentityUserOrganizationRoleClientParametersTransfers
|
|
12
14
|
from maleo_identity.models.transfers.results.general.user import MaleoIdentityUserGeneralResultsTransfers
|
|
13
15
|
from maleo_identity.models.transfers.results.general.user_organization import MaleoIdentityUserOrganizationGeneralResultsTransfers
|
|
14
16
|
from maleo_identity.models.transfers.results.general.user_system_role import MaleoIdentityUserSystemRoleGeneralResultsTransfers
|
|
17
|
+
from maleo_identity.models.transfers.results.general.user_organization_role import MaleoIdentityUserOrganizationRoleGeneralResultsTransfers
|
|
15
18
|
from maleo_identity.types.results.client.user import MaleoIdentityUserClientResultsTypes
|
|
16
19
|
from maleo_identity.types.results.client.user_organization import MaleoIdentityUserOrganizationClientResultsTypes
|
|
17
20
|
from maleo_identity.types.results.client.user_system_role import MaleoIdentityUserSystemRoleClientResultsTypes
|
|
21
|
+
from maleo_identity.types.results.client.user_organization_role import MaleoIdentityUserOrganizationRoleClientResultsTypes
|
|
18
22
|
|
|
19
23
|
class MaleoIdentityUserClientService(ClientService):
|
|
20
24
|
def __init__(self, logger, controllers:MaleoIdentityUserControllers):
|
|
@@ -169,7 +173,7 @@ class MaleoIdentityUserClientService(ClientService):
|
|
|
169
173
|
message = "Invalid controller type"
|
|
170
174
|
description = "The provided controller type did not exists"
|
|
171
175
|
return MaleoIdentityUserGeneralResultsTransfers.Fail(message=message, description=description)
|
|
172
|
-
#* Retrieve user using chosen controller
|
|
176
|
+
#* Retrieve user's password using chosen controller
|
|
173
177
|
if controller_type == MaleoIdentityGeneralEnums.ClientControllerType.HTTP:
|
|
174
178
|
controller_result = await self._controllers.http.get_password(parameters=parameters)
|
|
175
179
|
else:
|
|
@@ -200,7 +204,7 @@ class MaleoIdentityUserClientService(ClientService):
|
|
|
200
204
|
message = "Invalid controller type"
|
|
201
205
|
description = "The provided controller type did not exists"
|
|
202
206
|
return MaleoIdentityUserOrganizationGeneralResultsTransfers.Fail(message=message, description=description)
|
|
203
|
-
#* Retrieve
|
|
207
|
+
#* Retrieve user's organizations using chosen controller
|
|
204
208
|
if controller_type == MaleoIdentityGeneralEnums.ClientControllerType.HTTP:
|
|
205
209
|
controller_result = await self._controllers.http.get_user_organizations(parameters=parameters)
|
|
206
210
|
else:
|
|
@@ -234,7 +238,7 @@ class MaleoIdentityUserClientService(ClientService):
|
|
|
234
238
|
message = "Invalid controller type"
|
|
235
239
|
description = "The provided controller type did not exists"
|
|
236
240
|
return MaleoIdentityUserOrganizationGeneralResultsTransfers.Fail(message=message, description=description)
|
|
237
|
-
#* Retrieve user using chosen controller
|
|
241
|
+
#* Retrieve user's organization using chosen controller
|
|
238
242
|
if controller_type == MaleoIdentityGeneralEnums.ClientControllerType.HTTP:
|
|
239
243
|
controller_result = await self._controllers.http.get_user_organization(parameters=parameters)
|
|
240
244
|
else:
|
|
@@ -265,7 +269,7 @@ class MaleoIdentityUserClientService(ClientService):
|
|
|
265
269
|
message = "Invalid controller type"
|
|
266
270
|
description = "The provided controller type did not exists"
|
|
267
271
|
return MaleoIdentityUserSystemRoleGeneralResultsTransfers.Fail(message=message, description=description)
|
|
268
|
-
#* Retrieve
|
|
272
|
+
#* Retrieve user's system roles using chosen controller
|
|
269
273
|
if controller_type == MaleoIdentityGeneralEnums.ClientControllerType.HTTP:
|
|
270
274
|
controller_result = await self._controllers.http.get_user_system_roles(parameters=parameters)
|
|
271
275
|
else:
|
|
@@ -299,7 +303,7 @@ class MaleoIdentityUserClientService(ClientService):
|
|
|
299
303
|
message = "Invalid controller type"
|
|
300
304
|
description = "The provided controller type did not exists"
|
|
301
305
|
return MaleoIdentityUserSystemRoleGeneralResultsTransfers.Fail(message=message, description=description)
|
|
302
|
-
#* Retrieve user using chosen controller
|
|
306
|
+
#* Retrieve user's system role using chosen controller
|
|
303
307
|
if controller_type == MaleoIdentityGeneralEnums.ClientControllerType.HTTP:
|
|
304
308
|
controller_result = await self._controllers.http.get_user_system_role(parameters=parameters)
|
|
305
309
|
else:
|
|
@@ -311,4 +315,69 @@ class MaleoIdentityUserClientService(ClientService):
|
|
|
311
315
|
return MaleoIdentityUserSystemRoleGeneralResultsTransfers.Fail.model_validate(controller_result.content)
|
|
312
316
|
else:
|
|
313
317
|
return MaleoIdentityUserSystemRoleGeneralResultsTransfers.SingleData.model_validate(controller_result.content)
|
|
318
|
+
return await _impl()
|
|
319
|
+
|
|
320
|
+
async def get_user_organization_roles(
|
|
321
|
+
self,
|
|
322
|
+
parameters:MaleoIdentityUserOrganizationRoleClientParametersTransfers.GetMultipleFromUserOrOrganization,
|
|
323
|
+
controller_type:MaleoIdentityGeneralEnums.ClientControllerType = MaleoIdentityGeneralEnums.ClientControllerType.HTTP
|
|
324
|
+
) -> MaleoIdentityUserOrganizationRoleClientResultsTypes.GetMultiple:
|
|
325
|
+
"""Retrieve user's organization roles from MaleoIdentity"""
|
|
326
|
+
@BaseExceptions.service_exception_handler(
|
|
327
|
+
operation="retrieving user's organization roles",
|
|
328
|
+
logger=self._logger,
|
|
329
|
+
fail_result_class=MaleoIdentityUserOrganizationRoleGeneralResultsTransfers.Fail
|
|
330
|
+
)
|
|
331
|
+
async def _impl():
|
|
332
|
+
#* Validate chosen controller type
|
|
333
|
+
if not isinstance(controller_type, MaleoIdentityGeneralEnums.ClientControllerType):
|
|
334
|
+
message = "Invalid controller type"
|
|
335
|
+
description = "The provided controller type did not exists"
|
|
336
|
+
return MaleoIdentityUserOrganizationRoleGeneralResultsTransfers.Fail(message=message, description=description)
|
|
337
|
+
#* Retrieve user's organization roles using chosen controller
|
|
338
|
+
if controller_type == MaleoIdentityGeneralEnums.ClientControllerType.HTTP:
|
|
339
|
+
controller_result = await self._controllers.http.get_user_organization_roles(parameters=parameters)
|
|
340
|
+
else:
|
|
341
|
+
message = "Invalid controller type"
|
|
342
|
+
description = "The provided controller type has not been implemented"
|
|
343
|
+
return MaleoIdentityUserOrganizationRoleGeneralResultsTransfers.Fail(message=message, description=description)
|
|
344
|
+
#* Return proper response
|
|
345
|
+
if not controller_result.success:
|
|
346
|
+
return MaleoIdentityUserOrganizationRoleGeneralResultsTransfers.Fail.model_validate(controller_result.content)
|
|
347
|
+
else:
|
|
348
|
+
if controller_result.content["data"] is None:
|
|
349
|
+
return MaleoIdentityUserOrganizationRoleGeneralResultsTransfers.NoData.model_validate(controller_result.content)
|
|
350
|
+
else:
|
|
351
|
+
return MaleoIdentityUserOrganizationRoleGeneralResultsTransfers.MultipleData.model_validate(controller_result.content)
|
|
352
|
+
return await _impl()
|
|
353
|
+
|
|
354
|
+
async def get_user_organization_role(
|
|
355
|
+
self,
|
|
356
|
+
parameters:MaleoIdentityUserOrganizationRoleGeneralParametersTransfers.GetSingle,
|
|
357
|
+
controller_type:MaleoIdentityGeneralEnums.ClientControllerType = MaleoIdentityGeneralEnums.ClientControllerType.HTTP
|
|
358
|
+
) -> MaleoIdentityUserOrganizationClientResultsTypes.GetSingle:
|
|
359
|
+
"""Retrieve user's organization role from MaleoIdentity"""
|
|
360
|
+
@BaseExceptions.service_exception_handler(
|
|
361
|
+
operation="retrieving user's organization role",
|
|
362
|
+
logger=self._logger,
|
|
363
|
+
fail_result_class=MaleoIdentityUserOrganizationRoleGeneralResultsTransfers.Fail
|
|
364
|
+
)
|
|
365
|
+
async def _impl():
|
|
366
|
+
#* Validate chosen controller type
|
|
367
|
+
if not isinstance(controller_type, MaleoIdentityGeneralEnums.ClientControllerType):
|
|
368
|
+
message = "Invalid controller type"
|
|
369
|
+
description = "The provided controller type did not exists"
|
|
370
|
+
return MaleoIdentityUserOrganizationRoleGeneralResultsTransfers.Fail(message=message, description=description)
|
|
371
|
+
#* Retrieve user's organization role using chosen controller
|
|
372
|
+
if controller_type == MaleoIdentityGeneralEnums.ClientControllerType.HTTP:
|
|
373
|
+
controller_result = await self._controllers.http.get_user_organization_role(parameters=parameters)
|
|
374
|
+
else:
|
|
375
|
+
message = "Invalid controller type"
|
|
376
|
+
description = "The provided controller type has not been implemented"
|
|
377
|
+
return MaleoIdentityUserOrganizationRoleGeneralResultsTransfers.Fail(message=message, description=description)
|
|
378
|
+
#* Return proper response
|
|
379
|
+
if not controller_result.success:
|
|
380
|
+
return MaleoIdentityUserOrganizationRoleGeneralResultsTransfers.Fail.model_validate(controller_result.content)
|
|
381
|
+
else:
|
|
382
|
+
return MaleoIdentityUserOrganizationRoleGeneralResultsTransfers.SingleData.model_validate(controller_result.content)
|
|
314
383
|
return await _impl()
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
from .organization import MaleoIdentityOrganizationConstants
|
|
3
|
+
from .organization_role import MaleoIdentityOrganizationRoleConstants
|
|
3
4
|
from .user import MaleoIdentityUserConstants
|
|
5
|
+
from .user_organization_role import MaleoIdentityUserOrganizationRoleConstants
|
|
6
|
+
from .user_organization import MaleoIdentityUserOrganizationConstants
|
|
4
7
|
from .user_profile import MaleoIdentityUserProfileConstants
|
|
5
8
|
from .user_system_role import MaleoIdentityUserSystemRoleConstants
|
|
6
|
-
from .user_organization import MaleoIdentityUserOrganizationConstants
|
|
7
9
|
|
|
8
10
|
class MaleoIdentityConstants:
|
|
9
11
|
Organization = MaleoIdentityOrganizationConstants
|
|
12
|
+
OrganizationRole = MaleoIdentityOrganizationRoleConstants
|
|
10
13
|
User = MaleoIdentityUserConstants
|
|
14
|
+
UserOrganizationRole = MaleoIdentityUserOrganizationRoleConstants
|
|
15
|
+
UserOrganization = MaleoIdentityUserOrganizationConstants
|
|
11
16
|
UserProfile = MaleoIdentityUserProfileConstants
|
|
12
|
-
UserSystemRole = MaleoIdentityUserSystemRoleConstants
|
|
13
|
-
UserOrganization = MaleoIdentityUserOrganizationConstants
|
|
17
|
+
UserSystemRole = MaleoIdentityUserSystemRoleConstants
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from typing import Dict, List
|
|
2
|
+
from maleo_identity.enums.organization import MaleoIdentityOrganizationEnums
|
|
3
|
+
from maleo_identity.enums.organization_role import MaleoIdentityOrganizationRoleEnums
|
|
4
|
+
|
|
5
|
+
class MaleoIdentityOrganizationRoleConstants:
|
|
6
|
+
EXPANDABLE_FIELDS_DEPENDENCIES_MAP:Dict[
|
|
7
|
+
MaleoIdentityOrganizationRoleEnums.ExpandableFields,
|
|
8
|
+
List[MaleoIdentityOrganizationRoleEnums.ExpandableFields]
|
|
9
|
+
] = {
|
|
10
|
+
MaleoIdentityOrganizationRoleEnums.ExpandableFields.ORGANIZATION: [
|
|
11
|
+
MaleoIdentityOrganizationRoleEnums.ExpandableFields.ORGANIZATION_TYPE
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
ORGANIZATION_EXPANDABLE_FIELDS_MAP:Dict[
|
|
16
|
+
MaleoIdentityOrganizationRoleEnums.ExpandableFields,
|
|
17
|
+
MaleoIdentityOrganizationEnums.ExpandableFields
|
|
18
|
+
] = {
|
|
19
|
+
MaleoIdentityOrganizationRoleEnums.ExpandableFields.ORGANIZATION_TYPE: MaleoIdentityOrganizationEnums.ExpandableFields.ORGANIZATION_TYPE
|
|
20
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
from typing import Dict, List
|
|
2
|
+
from maleo_identity.enums.user import MaleoIdentityUserEnums
|
|
3
|
+
from maleo_identity.enums.organization import MaleoIdentityOrganizationEnums
|
|
4
|
+
from maleo_identity.enums.user_organization_role import MaleoIdentityUserOrganizationRoleEnums
|
|
5
|
+
|
|
6
|
+
class MaleoIdentityUserOrganizationRoleConstants:
|
|
7
|
+
EXPANDABLE_FIELDS_DEPENDENCIES_MAP:Dict[
|
|
8
|
+
MaleoIdentityUserOrganizationRoleEnums.ExpandableFields,
|
|
9
|
+
List[MaleoIdentityUserOrganizationRoleEnums.ExpandableFields]
|
|
10
|
+
] = {
|
|
11
|
+
MaleoIdentityUserOrganizationRoleEnums.ExpandableFields.USER: [
|
|
12
|
+
MaleoIdentityUserOrganizationRoleEnums.ExpandableFields.USER_TYPE
|
|
13
|
+
],
|
|
14
|
+
MaleoIdentityUserOrganizationRoleEnums.ExpandableFields.ORGANIZATION: [
|
|
15
|
+
MaleoIdentityUserOrganizationRoleEnums.ExpandableFields.ORGANIZATION_TYPE
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
USER_EXPANDABLE_FIELDS_MAP:Dict[
|
|
20
|
+
MaleoIdentityUserOrganizationRoleEnums.ExpandableFields,
|
|
21
|
+
MaleoIdentityUserEnums.ExpandableFields
|
|
22
|
+
] = {
|
|
23
|
+
MaleoIdentityUserOrganizationRoleEnums.ExpandableFields.USER_TYPE: MaleoIdentityUserEnums.ExpandableFields.USER_TYPE
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
ORGANIZATION_EXPANDABLE_FIELDS_MAP:Dict[
|
|
27
|
+
MaleoIdentityUserOrganizationRoleEnums.ExpandableFields,
|
|
28
|
+
MaleoIdentityOrganizationEnums.ExpandableFields
|
|
29
|
+
] = {
|
|
30
|
+
MaleoIdentityUserOrganizationRoleEnums.ExpandableFields.ORGANIZATION_TYPE: MaleoIdentityOrganizationEnums.ExpandableFields.ORGANIZATION_TYPE
|
|
31
|
+
}
|
maleo_identity/enums/__init__.py
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
from .general import MaleoIdentityGeneralEnums
|
|
3
|
+
from .organization_role import MaleoIdentityOrganizationRoleEnums
|
|
4
|
+
from .organization import MaleoIdentityOrganizationEnums
|
|
5
|
+
from .user_organization_role import MaleoIdentityUserOrganizationRoleEnums
|
|
6
|
+
from .user_organization import MaleoIdentityUserOrganizationEnums
|
|
3
7
|
from .user_profile import MaleoIdentityUserProfileEnums
|
|
4
8
|
from .user_system_role import MaleoIdentityUserSystemRoleEnums
|
|
5
|
-
from .user_organization import MaleoIdentityUserOrganizationEnums
|
|
6
|
-
from .organization import MaleoIdentityOrganizationEnums
|
|
7
9
|
from .user import MaleoIdentityUserEnums
|
|
8
10
|
|
|
9
11
|
class MaleoIdentityEnums:
|
|
10
12
|
General = MaleoIdentityGeneralEnums
|
|
13
|
+
OrganizationRole = MaleoIdentityOrganizationRoleEnums
|
|
14
|
+
Organization = MaleoIdentityOrganizationEnums
|
|
15
|
+
UserOrganizationRole = MaleoIdentityOrganizationRoleEnums
|
|
16
|
+
UserOrganization = MaleoIdentityUserOrganizationEnums
|
|
11
17
|
UserProfile = MaleoIdentityUserProfileEnums
|
|
12
18
|
UserSystemRole = MaleoIdentityUserSystemRoleEnums
|
|
13
|
-
UserOrganization = MaleoIdentityUserOrganizationEnums
|
|
14
|
-
Organization = MaleoIdentityOrganizationEnums
|
|
15
19
|
User = MaleoIdentityUserEnums
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
|
+
from .organization_role import MaleoIdentityOrganizationRoleResponses
|
|
2
3
|
from .organization import MaleoIdentityOrganizationResponses
|
|
3
|
-
from .
|
|
4
|
+
from .user_organization_role import MaleoIdentityUserOrganizationRoleResponses
|
|
5
|
+
from .user_organization import MaleoIdentityUserOrganizationResponses
|
|
4
6
|
from .user_profile import MaleoIdentityUserProfileResponses
|
|
5
7
|
from .user_system_role import MaleoIdentityUserSystemRoleResponses
|
|
6
|
-
from .
|
|
8
|
+
from .user import MaleoIdentityUserResponses
|
|
7
9
|
|
|
8
10
|
class MaleoIdentityResponses:
|
|
11
|
+
OrganizationRole = MaleoIdentityOrganizationRoleResponses
|
|
9
12
|
Organization = MaleoIdentityOrganizationResponses
|
|
10
|
-
|
|
13
|
+
UserOrganizationRole = MaleoIdentityUserOrganizationRoleResponses
|
|
14
|
+
UserOrganization = MaleoIdentityUserOrganizationResponses
|
|
11
15
|
UserProfile = MaleoIdentityUserProfileResponses
|
|
12
16
|
UserSystemRole = MaleoIdentityUserSystemRoleResponses
|
|
13
|
-
|
|
17
|
+
User = MaleoIdentityUserResponses
|