maleo-identity 0.0.73__tar.gz → 0.0.75__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.0.73 → maleo_identity-0.0.75}/PKG-INFO +2 -2
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/client/controllers/http/organization.py +91 -91
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/client/services/organization.py +139 -139
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/responses/organization.py +12 -12
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/tables/organization.py +9 -9
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/general/organization.py +4 -4
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/client/organization.py +16 -16
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/service/organization.py +18 -18
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/results/client/organization.py +5 -5
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/results/service/organization.py +5 -5
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/results/client/organization.py +9 -9
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/results/service/organization.py +10 -10
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity.egg-info/PKG-INFO +2 -2
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity.egg-info/requires.txt +1 -1
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/pyproject.toml +2 -2
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/README.md +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/__init__.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/client/__init__.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/client/controllers/__init__.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/client/controllers/http/__init__.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/client/controllers/http/user.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/client/manager.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/client/services/__init__.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/client/services/user.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/constants/__init__.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/constants/organization.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/constants/organization_registration_code.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/constants/organization_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/constants/user.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/constants/user_organization.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/constants/user_organization_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/constants/user_profile.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/constants/user_system_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/db.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/enums/__init__.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/enums/general.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/enums/organization.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/enums/organization_registration_code.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/enums/organization_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/enums/user.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/enums/user_organization.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/enums/user_organization_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/enums/user_profile.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/enums/user_system_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/__init__.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/responses/__init__.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/responses/organization_registration_code.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/responses/organization_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/responses/user.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/responses/user_organization.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/responses/user_organization_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/responses/user_profile.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/responses/user_system_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/schemas/__init__.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/schemas/general.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/schemas/organization.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/schemas/organization_registration_code.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/schemas/organization_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/schemas/user.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/schemas/user_organization.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/schemas/user_organization_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/schemas/user_profile.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/schemas/user_system_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/tables/__init__.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/tables/organization_registration_code.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/tables/organization_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/tables/user.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/tables/user_organization.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/tables/user_organization_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/tables/user_profile.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/tables/user_system_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/__init__.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/general/__init__.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/general/organization_registration_code.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/general/organization_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/general/user.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/general/user_organization.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/general/user_organization_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/general/user_profile.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/general/user_system_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/__init__.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/client/__init__.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/client/organization_registration_code.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/client/organization_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/client/user.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/client/user_organization.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/client/user_organization_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/client/user_profile.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/client/user_system_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/general/__init__.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/general/organization.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/general/organization_registration_code.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/general/organization_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/general/user.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/general/user_organization.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/general/user_organization_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/general/user_profile.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/general/user_system_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/service/__init__.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/service/organization_registration_code.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/service/organization_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/service/user.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/service/user_organization.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/service/user_organization_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/service/user_profile.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/service/user_system_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/results/__init__.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/results/client/__init__.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/results/client/organization_registration_code.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/results/client/organization_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/results/client/user.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/results/client/user_organization.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/results/client/user_organization_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/results/client/user_profile.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/results/client/user_system_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/results/service/__init__.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/results/service/organization_registration_code.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/results/service/organization_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/results/service/user.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/results/service/user_organization.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/results/service/user_organization_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/results/service/user_profile.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/results/service/user_system_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/__init__.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/results/__init__.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/results/client/__init__.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/results/client/organization_registration_code.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/results/client/organization_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/results/client/user.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/results/client/user_organization.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/results/client/user_organization_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/results/client/user_profile.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/results/client/user_system_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/results/service/__init__.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/results/service/organization_registration_code.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/results/service/organization_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/results/service/user.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/results/service/user_organization.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/results/service/user_organization_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/results/service/user_profile.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/results/service/user_system_role.py +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity.egg-info/SOURCES.txt +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity.egg-info/dependency_links.txt +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity.egg-info/top_level.txt +0 -0
- {maleo_identity-0.0.73 → maleo_identity-0.0.75}/setup.cfg +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: maleo-identity
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.75
|
|
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
9
|
Requires-Dist: maleo_foundation>=0.3.31
|
|
10
|
-
Requires-Dist: maleo_metadata>=0.1.
|
|
10
|
+
Requires-Dist: maleo_metadata>=0.1.51
|
|
11
11
|
|
|
12
12
|
# README #
|
|
13
13
|
|
|
@@ -71,53 +71,53 @@ class MaleoIdentityOrganizationHTTPController(MaleoClientHTTPController):
|
|
|
71
71
|
response = await client.get(url=url, params=params, headers=headers, auth=auth)
|
|
72
72
|
return BaseClientHTTPControllerResults(response=response)
|
|
73
73
|
|
|
74
|
-
async def get_structured_organizations(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
) -> BaseClientHTTPControllerResults:
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
74
|
+
# async def get_structured_organizations(
|
|
75
|
+
# self,
|
|
76
|
+
# parameters:MaleoIdentityOrganizationClientParametersTransfers.GetMultipleStructured,
|
|
77
|
+
# authorization:Optional[Authorization] = None,
|
|
78
|
+
# headers:Optional[Dict[str, str]] = None
|
|
79
|
+
# ) -> BaseClientHTTPControllerResults:
|
|
80
|
+
# """Fetch structured organizations from MaleoIdentity"""
|
|
81
|
+
# async with self._manager.get_client() as client:
|
|
82
|
+
# #* Define URL
|
|
83
|
+
# url = f"{self._manager.url}/v1/organizations/structured"
|
|
84
|
+
|
|
85
|
+
# #* Parse parameters to query params
|
|
86
|
+
# params = (
|
|
87
|
+
# MaleoIdentityOrganizationClientParametersTransfers
|
|
88
|
+
# .GetMultipleStructuredQuery
|
|
89
|
+
# .model_validate(
|
|
90
|
+
# parameters.model_dump()
|
|
91
|
+
# )
|
|
92
|
+
# .model_dump(
|
|
93
|
+
# exclude={"sort_columns", "date_filters"},
|
|
94
|
+
# exclude_none=True
|
|
95
|
+
# )
|
|
96
|
+
# )
|
|
97
|
+
|
|
98
|
+
# #* Create headers
|
|
99
|
+
# base_headers = {
|
|
100
|
+
# "Content-Type": "application/json"
|
|
101
|
+
# }
|
|
102
|
+
# if headers is not None:
|
|
103
|
+
# headers = deep_merge(
|
|
104
|
+
# base_headers,
|
|
105
|
+
# headers
|
|
106
|
+
# )
|
|
107
|
+
# else:
|
|
108
|
+
# headers = base_headers
|
|
109
|
+
|
|
110
|
+
# #* Create auth
|
|
111
|
+
# token = None
|
|
112
|
+
# if authorization and authorization.scheme == "Bearer":
|
|
113
|
+
# token = authorization.credentials
|
|
114
|
+
# elif self._service_manager.token:
|
|
115
|
+
# token = self._service_manager.token
|
|
116
|
+
# auth = BearerAuth(token) if token else None
|
|
117
|
+
|
|
118
|
+
# #* Send request and wait for response
|
|
119
|
+
# response = await client.get(url=url, params=params, headers=headers, auth=auth)
|
|
120
|
+
# return BaseClientHTTPControllerResults(response=response)
|
|
121
121
|
|
|
122
122
|
async def get_organization(
|
|
123
123
|
self,
|
|
@@ -164,50 +164,50 @@ class MaleoIdentityOrganizationHTTPController(MaleoClientHTTPController):
|
|
|
164
164
|
response = await client.get(url=url, params=params, headers=headers, auth=auth)
|
|
165
165
|
return BaseClientHTTPControllerResults(response=response)
|
|
166
166
|
|
|
167
|
-
async def get_structured_organization(
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
) -> BaseClientHTTPControllerResults:
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
167
|
+
# async def get_structured_organization(
|
|
168
|
+
# self,
|
|
169
|
+
# parameters:MaleoIdentityOrganizationGeneralParametersTransfers.GetSingle,
|
|
170
|
+
# authorization:Optional[Authorization] = None,
|
|
171
|
+
# headers:Optional[Dict[str, str]] = None
|
|
172
|
+
# ) -> BaseClientHTTPControllerResults:
|
|
173
|
+
# """Fetch structured organization from MaleoIdentity"""
|
|
174
|
+
# async with self._manager.get_client() as client:
|
|
175
|
+
# #* Define URL
|
|
176
|
+
# url = f"{self._manager.url}/v1/organizations/{parameters.identifier}/{parameters.value}/structured"
|
|
177
|
+
|
|
178
|
+
# #* Parse parameters to query params
|
|
179
|
+
# params = (
|
|
180
|
+
# MaleoIdentityOrganizationGeneralParametersTransfers
|
|
181
|
+
# .GetSingleQuery
|
|
182
|
+
# .model_validate(
|
|
183
|
+
# parameters.model_dump()
|
|
184
|
+
# )
|
|
185
|
+
# .model_dump(exclude_none=True)
|
|
186
|
+
# )
|
|
187
|
+
|
|
188
|
+
# #* Create headers
|
|
189
|
+
# base_headers = {
|
|
190
|
+
# "Content-Type": "application/json"
|
|
191
|
+
# }
|
|
192
|
+
# if headers is not None:
|
|
193
|
+
# headers = deep_merge(
|
|
194
|
+
# base_headers,
|
|
195
|
+
# headers
|
|
196
|
+
# )
|
|
197
|
+
# else:
|
|
198
|
+
# headers = base_headers
|
|
199
|
+
|
|
200
|
+
# #* Create auth
|
|
201
|
+
# token = None
|
|
202
|
+
# if authorization and authorization.scheme == "Bearer":
|
|
203
|
+
# token = authorization.credentials
|
|
204
|
+
# elif self._service_manager.token:
|
|
205
|
+
# token = self._service_manager.token
|
|
206
|
+
# auth = BearerAuth(token) if token else None
|
|
207
|
+
|
|
208
|
+
# #* Send request and wait for response
|
|
209
|
+
# response = await client.get(url=url, params=params, headers=headers, auth=auth)
|
|
210
|
+
# return BaseClientHTTPControllerResults(response=response)
|
|
211
211
|
|
|
212
212
|
async def get_organization_children(
|
|
213
213
|
self,
|
{maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/client/services/organization.py
RENAMED
|
@@ -126,79 +126,79 @@ class MaleoIdentityOrganizationClientService(MaleoClientService):
|
|
|
126
126
|
headers=headers
|
|
127
127
|
)
|
|
128
128
|
|
|
129
|
-
async def get_structured_organizations(
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
) -> MaleoIdentityOrganizationClientResultsTypes.GetMultipleStructured:
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
129
|
+
# async def get_structured_organizations(
|
|
130
|
+
# self,
|
|
131
|
+
# parameters:MaleoIdentityOrganizationClientParametersTransfers.GetMultipleStructured,
|
|
132
|
+
# controller_type:MaleoIdentityGeneralEnums.ClientControllerType = MaleoIdentityGeneralEnums.ClientControllerType.HTTP,
|
|
133
|
+
# authorization:Optional[Authorization] = None,
|
|
134
|
+
# headers:Optional[Dict[str, str]] = None
|
|
135
|
+
# ) -> MaleoIdentityOrganizationClientResultsTypes.GetMultipleStructured:
|
|
136
|
+
# """Retrieve structured organizations from MaleoIdentity"""
|
|
137
|
+
# @BaseExceptions.service_exception_handler(
|
|
138
|
+
# operation="retrieving structured organizations",
|
|
139
|
+
# logger=self._logger,
|
|
140
|
+
# fail_result_class=MaleoIdentityOrganizationClientResultsTransfers.Fail
|
|
141
|
+
# )
|
|
142
|
+
# async def _impl(
|
|
143
|
+
# parameters:MaleoIdentityOrganizationClientParametersTransfers.GetMultipleStructured,
|
|
144
|
+
# controller_type:MaleoIdentityGeneralEnums.ClientControllerType = MaleoIdentityGeneralEnums.ClientControllerType.HTTP,
|
|
145
|
+
# authorization:Optional[Authorization] = None,
|
|
146
|
+
# headers:Optional[Dict[str, str]] = None
|
|
147
|
+
# ):
|
|
148
|
+
# #* Validate chosen controller type
|
|
149
|
+
# if not isinstance(
|
|
150
|
+
# controller_type,
|
|
151
|
+
# MaleoIdentityGeneralEnums.ClientControllerType
|
|
152
|
+
# ):
|
|
153
|
+
# message = "Invalid controller type"
|
|
154
|
+
# description = "The provided controller type did not exists"
|
|
155
|
+
# return MaleoIdentityOrganizationClientResultsTransfers.Fail(
|
|
156
|
+
# message=message,
|
|
157
|
+
# description=description
|
|
158
|
+
# )
|
|
159
|
+
# #* Retrieve structured organizations using chosen controller
|
|
160
|
+
# if controller_type == MaleoIdentityGeneralEnums.ClientControllerType.HTTP:
|
|
161
|
+
# controller_result = (
|
|
162
|
+
# await self._controllers.http
|
|
163
|
+
# .get_structured_organizations(
|
|
164
|
+
# parameters=parameters,
|
|
165
|
+
# authorization=authorization,
|
|
166
|
+
# headers=headers
|
|
167
|
+
# )
|
|
168
|
+
# )
|
|
169
|
+
# else:
|
|
170
|
+
# message = "Invalid controller type"
|
|
171
|
+
# description = "The provided controller type has not been implemented"
|
|
172
|
+
# return MaleoIdentityOrganizationClientResultsTransfers.Fail(
|
|
173
|
+
# message=message,
|
|
174
|
+
# description=description
|
|
175
|
+
# )
|
|
176
|
+
# #* Return proper response
|
|
177
|
+
# if not controller_result.success:
|
|
178
|
+
# return (
|
|
179
|
+
# MaleoIdentityOrganizationClientResultsTransfers
|
|
180
|
+
# .Fail
|
|
181
|
+
# .model_validate(controller_result.content)
|
|
182
|
+
# )
|
|
183
|
+
# else:
|
|
184
|
+
# if controller_result.content["data"] is None:
|
|
185
|
+
# return (
|
|
186
|
+
# MaleoIdentityOrganizationClientResultsTransfers
|
|
187
|
+
# .NoData
|
|
188
|
+
# .model_validate(controller_result.content)
|
|
189
|
+
# )
|
|
190
|
+
# else:
|
|
191
|
+
# return (
|
|
192
|
+
# MaleoIdentityOrganizationClientResultsTransfers
|
|
193
|
+
# .MultipleStructured
|
|
194
|
+
# .model_validate(controller_result.content)
|
|
195
|
+
# )
|
|
196
|
+
# return await _impl(
|
|
197
|
+
# parameters=parameters,
|
|
198
|
+
# controller_type=controller_type,
|
|
199
|
+
# authorization=authorization,
|
|
200
|
+
# headers=headers
|
|
201
|
+
# )
|
|
202
202
|
|
|
203
203
|
async def get_organization(
|
|
204
204
|
self,
|
|
@@ -267,72 +267,72 @@ class MaleoIdentityOrganizationClientService(MaleoClientService):
|
|
|
267
267
|
headers=headers
|
|
268
268
|
)
|
|
269
269
|
|
|
270
|
-
async def get_structured_organization(
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
) -> MaleoIdentityOrganizationClientResultsTypes.GetSingleStructured:
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
270
|
+
# async def get_structured_organization(
|
|
271
|
+
# self,
|
|
272
|
+
# parameters:MaleoIdentityOrganizationGeneralParametersTransfers.GetSingle,
|
|
273
|
+
# controller_type:MaleoIdentityGeneralEnums.ClientControllerType = MaleoIdentityGeneralEnums.ClientControllerType.HTTP,
|
|
274
|
+
# authorization:Optional[Authorization] = None,
|
|
275
|
+
# headers:Optional[Dict[str, str]] = None
|
|
276
|
+
# ) -> MaleoIdentityOrganizationClientResultsTypes.GetSingleStructured:
|
|
277
|
+
# """Retrieve structured organization from MaleoIdentity"""
|
|
278
|
+
# @BaseExceptions.service_exception_handler(
|
|
279
|
+
# operation="retrieving structured organization",
|
|
280
|
+
# logger=self._logger,
|
|
281
|
+
# fail_result_class=MaleoIdentityOrganizationClientResultsTransfers.Fail
|
|
282
|
+
# )
|
|
283
|
+
# async def _impl(
|
|
284
|
+
# parameters:MaleoIdentityOrganizationGeneralParametersTransfers.GetSingle,
|
|
285
|
+
# controller_type:MaleoIdentityGeneralEnums.ClientControllerType = MaleoIdentityGeneralEnums.ClientControllerType.HTTP,
|
|
286
|
+
# authorization:Optional[Authorization] = None,
|
|
287
|
+
# headers:Optional[Dict[str, str]] = None
|
|
288
|
+
# ):
|
|
289
|
+
# #* Validate chosen controller type
|
|
290
|
+
# if not isinstance(
|
|
291
|
+
# controller_type,
|
|
292
|
+
# MaleoIdentityGeneralEnums.ClientControllerType
|
|
293
|
+
# ):
|
|
294
|
+
# message = "Invalid controller type"
|
|
295
|
+
# description = "The provided controller type did not exists"
|
|
296
|
+
# return MaleoIdentityOrganizationClientResultsTransfers.Fail(
|
|
297
|
+
# message=message,
|
|
298
|
+
# description=description
|
|
299
|
+
# )
|
|
300
|
+
# #* Retrieve structured organization using chosen controller
|
|
301
|
+
# if controller_type == MaleoIdentityGeneralEnums.ClientControllerType.HTTP:
|
|
302
|
+
# controller_result = (
|
|
303
|
+
# await self._controllers.http
|
|
304
|
+
# .get_structured_organization(
|
|
305
|
+
# parameters=parameters,
|
|
306
|
+
# authorization=authorization,
|
|
307
|
+
# headers=headers
|
|
308
|
+
# )
|
|
309
|
+
# )
|
|
310
|
+
# else:
|
|
311
|
+
# message = "Invalid controller type"
|
|
312
|
+
# description = "The provided controller type has not been implemented"
|
|
313
|
+
# return MaleoIdentityOrganizationClientResultsTransfers.Fail(
|
|
314
|
+
# message=message,
|
|
315
|
+
# description=description
|
|
316
|
+
# )
|
|
317
|
+
# #* Return proper response
|
|
318
|
+
# if not controller_result.success:
|
|
319
|
+
# return (
|
|
320
|
+
# MaleoIdentityOrganizationClientResultsTransfers
|
|
321
|
+
# .Fail
|
|
322
|
+
# .model_validate(controller_result.content)
|
|
323
|
+
# )
|
|
324
|
+
# else:
|
|
325
|
+
# return (
|
|
326
|
+
# MaleoIdentityOrganizationClientResultsTransfers
|
|
327
|
+
# .SingleStructured
|
|
328
|
+
# .model_validate(controller_result.content)
|
|
329
|
+
# )
|
|
330
|
+
# return await _impl(
|
|
331
|
+
# parameters=parameters,
|
|
332
|
+
# controller_type=controller_type,
|
|
333
|
+
# authorization=authorization,
|
|
334
|
+
# headers=headers
|
|
335
|
+
# )
|
|
336
336
|
|
|
337
337
|
async def get_organization_children(
|
|
338
338
|
self,
|
{maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/responses/organization.py
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from pydantic import Field
|
|
2
2
|
from maleo_foundation.models.responses import BaseResponses
|
|
3
3
|
from maleo_identity.enums.organization import MaleoIdentityOrganizationEnums
|
|
4
|
-
from maleo_identity.models.transfers.general.organization import OrganizationTransfers
|
|
4
|
+
from maleo_identity.models.transfers.general.organization import OrganizationTransfers
|
|
5
5
|
|
|
6
6
|
class MaleoIdentityOrganizationResponses:
|
|
7
7
|
class InvalidIdentifierType(BaseResponses.BadRequest):
|
|
@@ -27,17 +27,17 @@ class MaleoIdentityOrganizationResponses:
|
|
|
27
27
|
description:str = "Requested organizations found in database"
|
|
28
28
|
data:list[OrganizationTransfers] = Field(..., description="Organizations")
|
|
29
29
|
|
|
30
|
-
class GetSingleStructured(BaseResponses.SingleData):
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
class GetMultipleStructured(BaseResponses.PaginatedMultipleData):
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
30
|
+
# class GetSingleStructured(BaseResponses.SingleData):
|
|
31
|
+
# code:str = "IDT-ORG-005"
|
|
32
|
+
# message:str = "Structured organization found"
|
|
33
|
+
# description:str = "Requested structured organization found in database"
|
|
34
|
+
# data:StructuredOrganizationTransfers = Field(..., description="Structured organization")
|
|
35
|
+
|
|
36
|
+
# class GetMultipleStructured(BaseResponses.PaginatedMultipleData):
|
|
37
|
+
# code:str = "IDT-ORG-006"
|
|
38
|
+
# message:str = "Structured organizations found"
|
|
39
|
+
# description:str = "Requested structured organizations found in database"
|
|
40
|
+
# data:list[StructuredOrganizationTransfers] = Field(..., description="Structured organizations")
|
|
41
41
|
|
|
42
42
|
class CreateFailed(BaseResponses.BadRequest):
|
|
43
43
|
code:str = "IDT-ORG-007"
|
{maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/tables/organization.py
RENAMED
|
@@ -27,16 +27,16 @@ class OrganizationsTable(
|
|
|
27
27
|
parent = relationship(
|
|
28
28
|
"OrganizationsTable",
|
|
29
29
|
remote_side="OrganizationsTable.id",
|
|
30
|
-
back_populates="children"
|
|
31
|
-
)
|
|
32
|
-
children = relationship(
|
|
33
|
-
"OrganizationsTable",
|
|
34
|
-
back_populates="parent",
|
|
35
|
-
cascade="all",
|
|
36
|
-
lazy="select",
|
|
37
|
-
foreign_keys="[OrganizationsTable.parent_id]",
|
|
38
|
-
order_by="OrganizationsTable.id"
|
|
30
|
+
# back_populates="children"
|
|
39
31
|
)
|
|
32
|
+
# children = relationship(
|
|
33
|
+
# "OrganizationsTable",
|
|
34
|
+
# back_populates="parent",
|
|
35
|
+
# cascade="all",
|
|
36
|
+
# lazy="select",
|
|
37
|
+
# foreign_keys="[OrganizationsTable.parent_id]",
|
|
38
|
+
# order_by="OrganizationsTable.id"
|
|
39
|
+
# )
|
|
40
40
|
registration_code = relationship(
|
|
41
41
|
"OrganizationRegistrationCodesTable",
|
|
42
42
|
back_populates="organization",
|
|
@@ -24,8 +24,8 @@ class ExpandedOrganization(BaseModel):
|
|
|
24
24
|
class OptionalExpandedOrganization(BaseModel):
|
|
25
25
|
organization:Optional[OrganizationTransfers] = Field(None, description="Organization's details")
|
|
26
26
|
|
|
27
|
-
class StructuredOrganizationTransfers(OrganizationTransfers):
|
|
28
|
-
|
|
27
|
+
# class StructuredOrganizationTransfers(OrganizationTransfers):
|
|
28
|
+
# children:List["StructuredOrganizationTransfers"] = Field(..., description="Organization children")
|
|
29
29
|
|
|
30
|
-
# this is required for forward reference resolution
|
|
31
|
-
StructuredOrganizationTransfers.model_rebuild()
|
|
30
|
+
# # this is required for forward reference resolution
|
|
31
|
+
# StructuredOrganizationTransfers.model_rebuild()
|
|
@@ -33,14 +33,14 @@ class MaleoIdentityOrganizationClientParametersTransfers:
|
|
|
33
33
|
BaseParameterSchemas.OptionalListOfIds
|
|
34
34
|
): pass
|
|
35
35
|
|
|
36
|
-
class GetMultipleStructured(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
): pass
|
|
36
|
+
# class GetMultipleStructured(
|
|
37
|
+
# BaseClientParametersTransfers.GetPaginatedMultiple,
|
|
38
|
+
# BaseParameterSchemas.OptionalListOfKeys,
|
|
39
|
+
# MaleoIdentityOrganizationSchemas.OptionalListOfParentIds,
|
|
40
|
+
# MaleoMetadataOrganizationTypeExpandedSchemas.OptionalListOfSimpleOrganizationTypes,
|
|
41
|
+
# BaseParameterSchemas.OptionalListOfUuids,
|
|
42
|
+
# BaseParameterSchemas.OptionalListOfIds
|
|
43
|
+
# ): pass
|
|
44
44
|
|
|
45
45
|
class GetMultipleQuery(
|
|
46
46
|
MaleoIdentityOrganizationSchemas.Expand,
|
|
@@ -67,11 +67,11 @@ class MaleoIdentityOrganizationClientParametersTransfers:
|
|
|
67
67
|
BaseParameterSchemas.OptionalListOfIds
|
|
68
68
|
): pass
|
|
69
69
|
|
|
70
|
-
class GetMultipleStructuredQuery(
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
): pass
|
|
70
|
+
# class GetMultipleStructuredQuery(
|
|
71
|
+
# BaseClientParametersTransfers.GetPaginatedMultipleQuery,
|
|
72
|
+
# BaseParameterSchemas.OptionalListOfKeys,
|
|
73
|
+
# MaleoIdentityOrganizationSchemas.OptionalListOfParentIds,
|
|
74
|
+
# MaleoMetadataOrganizationTypeExpandedSchemas.OptionalListOfSimpleOrganizationTypes,
|
|
75
|
+
# BaseParameterSchemas.OptionalListOfUuids,
|
|
76
|
+
# BaseParameterSchemas.OptionalListOfIds
|
|
77
|
+
# ): pass
|