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.

Files changed (145) hide show
  1. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/PKG-INFO +2 -2
  2. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/client/controllers/http/organization.py +91 -91
  3. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/client/services/organization.py +139 -139
  4. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/responses/organization.py +12 -12
  5. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/tables/organization.py +9 -9
  6. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/general/organization.py +4 -4
  7. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/client/organization.py +16 -16
  8. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/service/organization.py +18 -18
  9. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/results/client/organization.py +5 -5
  10. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/results/service/organization.py +5 -5
  11. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/results/client/organization.py +9 -9
  12. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/results/service/organization.py +10 -10
  13. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity.egg-info/PKG-INFO +2 -2
  14. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity.egg-info/requires.txt +1 -1
  15. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/pyproject.toml +2 -2
  16. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/README.md +0 -0
  17. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/__init__.py +0 -0
  18. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/client/__init__.py +0 -0
  19. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/client/controllers/__init__.py +0 -0
  20. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/client/controllers/http/__init__.py +0 -0
  21. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/client/controllers/http/user.py +0 -0
  22. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/client/manager.py +0 -0
  23. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/client/services/__init__.py +0 -0
  24. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/client/services/user.py +0 -0
  25. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/constants/__init__.py +0 -0
  26. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/constants/organization.py +0 -0
  27. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/constants/organization_registration_code.py +0 -0
  28. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/constants/organization_role.py +0 -0
  29. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/constants/user.py +0 -0
  30. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/constants/user_organization.py +0 -0
  31. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/constants/user_organization_role.py +0 -0
  32. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/constants/user_profile.py +0 -0
  33. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/constants/user_system_role.py +0 -0
  34. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/db.py +0 -0
  35. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/enums/__init__.py +0 -0
  36. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/enums/general.py +0 -0
  37. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/enums/organization.py +0 -0
  38. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/enums/organization_registration_code.py +0 -0
  39. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/enums/organization_role.py +0 -0
  40. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/enums/user.py +0 -0
  41. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/enums/user_organization.py +0 -0
  42. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/enums/user_organization_role.py +0 -0
  43. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/enums/user_profile.py +0 -0
  44. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/enums/user_system_role.py +0 -0
  45. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/__init__.py +0 -0
  46. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/responses/__init__.py +0 -0
  47. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/responses/organization_registration_code.py +0 -0
  48. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/responses/organization_role.py +0 -0
  49. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/responses/user.py +0 -0
  50. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/responses/user_organization.py +0 -0
  51. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/responses/user_organization_role.py +0 -0
  52. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/responses/user_profile.py +0 -0
  53. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/responses/user_system_role.py +0 -0
  54. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/schemas/__init__.py +0 -0
  55. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/schemas/general.py +0 -0
  56. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/schemas/organization.py +0 -0
  57. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/schemas/organization_registration_code.py +0 -0
  58. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/schemas/organization_role.py +0 -0
  59. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/schemas/user.py +0 -0
  60. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/schemas/user_organization.py +0 -0
  61. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/schemas/user_organization_role.py +0 -0
  62. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/schemas/user_profile.py +0 -0
  63. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/schemas/user_system_role.py +0 -0
  64. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/tables/__init__.py +0 -0
  65. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/tables/organization_registration_code.py +0 -0
  66. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/tables/organization_role.py +0 -0
  67. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/tables/user.py +0 -0
  68. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/tables/user_organization.py +0 -0
  69. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/tables/user_organization_role.py +0 -0
  70. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/tables/user_profile.py +0 -0
  71. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/tables/user_system_role.py +0 -0
  72. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/__init__.py +0 -0
  73. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/general/__init__.py +0 -0
  74. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/general/organization_registration_code.py +0 -0
  75. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/general/organization_role.py +0 -0
  76. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/general/user.py +0 -0
  77. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/general/user_organization.py +0 -0
  78. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/general/user_organization_role.py +0 -0
  79. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/general/user_profile.py +0 -0
  80. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/general/user_system_role.py +0 -0
  81. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/__init__.py +0 -0
  82. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/client/__init__.py +0 -0
  83. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/client/organization_registration_code.py +0 -0
  84. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/client/organization_role.py +0 -0
  85. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/client/user.py +0 -0
  86. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/client/user_organization.py +0 -0
  87. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/client/user_organization_role.py +0 -0
  88. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/client/user_profile.py +0 -0
  89. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/client/user_system_role.py +0 -0
  90. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/general/__init__.py +0 -0
  91. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/general/organization.py +0 -0
  92. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/general/organization_registration_code.py +0 -0
  93. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/general/organization_role.py +0 -0
  94. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/general/user.py +0 -0
  95. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/general/user_organization.py +0 -0
  96. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/general/user_organization_role.py +0 -0
  97. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/general/user_profile.py +0 -0
  98. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/general/user_system_role.py +0 -0
  99. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/service/__init__.py +0 -0
  100. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/service/organization_registration_code.py +0 -0
  101. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/service/organization_role.py +0 -0
  102. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/service/user.py +0 -0
  103. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/service/user_organization.py +0 -0
  104. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/service/user_organization_role.py +0 -0
  105. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/service/user_profile.py +0 -0
  106. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/parameters/service/user_system_role.py +0 -0
  107. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/results/__init__.py +0 -0
  108. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/results/client/__init__.py +0 -0
  109. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/results/client/organization_registration_code.py +0 -0
  110. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/results/client/organization_role.py +0 -0
  111. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/results/client/user.py +0 -0
  112. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/results/client/user_organization.py +0 -0
  113. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/results/client/user_organization_role.py +0 -0
  114. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/results/client/user_profile.py +0 -0
  115. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/results/client/user_system_role.py +0 -0
  116. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/results/service/__init__.py +0 -0
  117. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/results/service/organization_registration_code.py +0 -0
  118. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/results/service/organization_role.py +0 -0
  119. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/results/service/user.py +0 -0
  120. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/results/service/user_organization.py +0 -0
  121. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/results/service/user_organization_role.py +0 -0
  122. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/results/service/user_profile.py +0 -0
  123. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/models/transfers/results/service/user_system_role.py +0 -0
  124. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/__init__.py +0 -0
  125. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/results/__init__.py +0 -0
  126. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/results/client/__init__.py +0 -0
  127. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/results/client/organization_registration_code.py +0 -0
  128. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/results/client/organization_role.py +0 -0
  129. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/results/client/user.py +0 -0
  130. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/results/client/user_organization.py +0 -0
  131. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/results/client/user_organization_role.py +0 -0
  132. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/results/client/user_profile.py +0 -0
  133. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/results/client/user_system_role.py +0 -0
  134. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/results/service/__init__.py +0 -0
  135. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/results/service/organization_registration_code.py +0 -0
  136. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/results/service/organization_role.py +0 -0
  137. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/results/service/user.py +0 -0
  138. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/results/service/user_organization.py +0 -0
  139. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/results/service/user_organization_role.py +0 -0
  140. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/results/service/user_profile.py +0 -0
  141. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity/types/results/service/user_system_role.py +0 -0
  142. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity.egg-info/SOURCES.txt +0 -0
  143. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity.egg-info/dependency_links.txt +0 -0
  144. {maleo_identity-0.0.73 → maleo_identity-0.0.75}/maleo_identity.egg-info/top_level.txt +0 -0
  145. {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.73
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.47
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
- 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)
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
- 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)
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,
@@ -126,79 +126,79 @@ class MaleoIdentityOrganizationClientService(MaleoClientService):
126
126
  headers=headers
127
127
  )
128
128
 
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
- )
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
- 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
- )
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,
@@ -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, StructuredOrganizationTransfers
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
- 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")
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"
@@ -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
- children:List["StructuredOrganizationTransfers"] = Field(..., description="Organization children")
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
- BaseClientParametersTransfers.GetPaginatedMultiple,
38
- BaseParameterSchemas.OptionalListOfKeys,
39
- MaleoIdentityOrganizationSchemas.OptionalListOfParentIds,
40
- MaleoMetadataOrganizationTypeExpandedSchemas.OptionalListOfSimpleOrganizationTypes,
41
- BaseParameterSchemas.OptionalListOfUuids,
42
- BaseParameterSchemas.OptionalListOfIds
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
- BaseClientParametersTransfers.GetPaginatedMultipleQuery,
72
- BaseParameterSchemas.OptionalListOfKeys,
73
- MaleoIdentityOrganizationSchemas.OptionalListOfParentIds,
74
- MaleoMetadataOrganizationTypeExpandedSchemas.OptionalListOfSimpleOrganizationTypes,
75
- BaseParameterSchemas.OptionalListOfUuids,
76
- BaseParameterSchemas.OptionalListOfIds
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