maleo-identity 0.1.8__py3-none-any.whl → 0.1.10__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/mixins/api_key.py +62 -1
- maleo/identity/mixins/organization.py +58 -2
- maleo/identity/mixins/organization_registration_code.py +85 -1
- maleo/identity/mixins/organization_relation.py +64 -1
- maleo/identity/mixins/patient.py +78 -2
- maleo/identity/mixins/user.py +75 -1
- maleo/identity/mixins/user_medical_role.py +63 -0
- maleo/identity/mixins/user_organization_role.py +65 -0
- maleo/identity/mixins/user_profile.py +77 -1
- maleo/identity/mixins/user_system_role.py +63 -0
- maleo/identity/schemas/api_key.py +36 -10
- maleo/identity/schemas/common.py +2 -2
- maleo/identity/schemas/organization.py +131 -16
- maleo/identity/schemas/organization_registration_code.py +139 -14
- maleo/identity/schemas/organization_relation.py +138 -19
- maleo/identity/schemas/patient.py +129 -19
- maleo/identity/schemas/user.py +126 -15
- maleo/identity/schemas/user_medical_role.py +134 -18
- maleo/identity/schemas/user_organization_role.py +135 -18
- maleo/identity/schemas/user_profile.py +134 -15
- maleo/identity/schemas/user_system_role.py +144 -20
- {maleo_identity-0.1.8.dist-info → maleo_identity-0.1.10.dist-info}/METADATA +7 -8
- {maleo_identity-0.1.8.dist-info → maleo_identity-0.1.10.dist-info}/RECORD +26 -23
- {maleo_identity-0.1.8.dist-info → maleo_identity-0.1.10.dist-info}/WHEEL +0 -0
- {maleo_identity-0.1.8.dist-info → maleo_identity-0.1.10.dist-info}/licenses/LICENSE +0 -0
- {maleo_identity-0.1.8.dist-info → maleo_identity-0.1.10.dist-info}/top_level.txt +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from pydantic import BaseModel, Field
|
|
2
|
-
from typing import Generic, Literal,
|
|
2
|
+
from typing import Generic, Literal, TypeVar, overload
|
|
3
3
|
from uuid import UUID
|
|
4
4
|
from maleo.enums.system import (
|
|
5
5
|
SystemRole,
|
|
@@ -14,13 +14,14 @@ from maleo.enums.status import (
|
|
|
14
14
|
)
|
|
15
15
|
from maleo.schemas.mixins.filter import convert as convert_filter
|
|
16
16
|
from maleo.schemas.mixins.identity import (
|
|
17
|
-
|
|
17
|
+
IdentifierMixin,
|
|
18
18
|
Ids,
|
|
19
19
|
UUIDs,
|
|
20
20
|
IntUserId,
|
|
21
21
|
IntUserIds,
|
|
22
22
|
)
|
|
23
23
|
from maleo.schemas.mixins.sort import convert as convert_sort
|
|
24
|
+
from maleo.schemas.operation.enums import ResourceOperationStatusUpdateType
|
|
24
25
|
from maleo.schemas.parameter import (
|
|
25
26
|
ReadSingleParameter as BaseReadSingleParameter,
|
|
26
27
|
ReadPaginatedMultipleParameter,
|
|
@@ -31,16 +32,25 @@ from maleo.types.dict import StrToAnyDict
|
|
|
31
32
|
from maleo.types.integer import OptInt, OptListOfInts
|
|
32
33
|
from maleo.types.uuid import OptListOfUUIDs
|
|
33
34
|
from ..enums.user_system_role import IdentifierType
|
|
34
|
-
from ..
|
|
35
|
+
from ..mixins.user_system_role import UserSystemRoleIdentifier
|
|
36
|
+
from ..types.user_system_role import CompositeIdentifier, IdentifierValueType
|
|
35
37
|
|
|
36
38
|
|
|
37
|
-
class
|
|
38
|
-
|
|
39
|
+
class StandardCreateData(FullSystemRoleMixin[SystemRole]):
|
|
40
|
+
pass
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class FullCreateData(
|
|
44
|
+
StandardCreateData,
|
|
39
45
|
IntUserId[int],
|
|
40
46
|
):
|
|
41
47
|
pass
|
|
42
48
|
|
|
43
49
|
|
|
50
|
+
class CreateParameter(FullCreateData):
|
|
51
|
+
pass
|
|
52
|
+
|
|
53
|
+
|
|
44
54
|
class ReadMultipleParameter(
|
|
45
55
|
ReadPaginatedMultipleParameter,
|
|
46
56
|
FullSystemRolesMixin[OptListOfSystemRoles],
|
|
@@ -72,7 +82,7 @@ class ReadMultipleParameter(
|
|
|
72
82
|
return params
|
|
73
83
|
|
|
74
84
|
|
|
75
|
-
class ReadSingleParameter(BaseReadSingleParameter[
|
|
85
|
+
class ReadSingleParameter(BaseReadSingleParameter[UserSystemRoleIdentifier]):
|
|
76
86
|
@overload
|
|
77
87
|
@classmethod
|
|
78
88
|
def new(
|
|
@@ -96,7 +106,7 @@ class ReadSingleParameter(BaseReadSingleParameter[IdentifierType, IdentifierValu
|
|
|
96
106
|
def new(
|
|
97
107
|
cls,
|
|
98
108
|
identifier_type: Literal[IdentifierType.COMPOSITE],
|
|
99
|
-
identifier_value:
|
|
109
|
+
identifier_value: CompositeIdentifier,
|
|
100
110
|
statuses: ListOfDataStatuses = list(FULL_DATA_STATUSES),
|
|
101
111
|
use_cache: bool = True,
|
|
102
112
|
) -> "ReadSingleParameter": ...
|
|
@@ -118,8 +128,9 @@ class ReadSingleParameter(BaseReadSingleParameter[IdentifierType, IdentifierValu
|
|
|
118
128
|
use_cache: bool = True,
|
|
119
129
|
) -> "ReadSingleParameter":
|
|
120
130
|
return cls(
|
|
121
|
-
|
|
122
|
-
|
|
131
|
+
identifier=UserSystemRoleIdentifier(
|
|
132
|
+
type=identifier_type, value=identifier_value
|
|
133
|
+
),
|
|
123
134
|
statuses=statuses,
|
|
124
135
|
use_cache=use_cache,
|
|
125
136
|
)
|
|
@@ -153,22 +164,135 @@ class UpdateDataMixin(BaseModel, Generic[UpdateDataT]):
|
|
|
153
164
|
|
|
154
165
|
class UpdateParameter(
|
|
155
166
|
UpdateDataMixin[UpdateDataT],
|
|
156
|
-
|
|
157
|
-
IdentifierType,
|
|
158
|
-
IdentifierValueType,
|
|
159
|
-
],
|
|
167
|
+
IdentifierMixin[UserSystemRoleIdentifier],
|
|
160
168
|
Generic[UpdateDataT],
|
|
161
169
|
):
|
|
162
|
-
|
|
170
|
+
@overload
|
|
171
|
+
@classmethod
|
|
172
|
+
def new(
|
|
173
|
+
cls,
|
|
174
|
+
identifier_type: Literal[IdentifierType.ID],
|
|
175
|
+
identifier_value: int,
|
|
176
|
+
data: UpdateDataT,
|
|
177
|
+
) -> "UpdateParameter": ...
|
|
178
|
+
@overload
|
|
179
|
+
@classmethod
|
|
180
|
+
def new(
|
|
181
|
+
cls,
|
|
182
|
+
identifier_type: Literal[IdentifierType.UUID],
|
|
183
|
+
identifier_value: UUID,
|
|
184
|
+
data: UpdateDataT,
|
|
185
|
+
) -> "UpdateParameter": ...
|
|
186
|
+
@overload
|
|
187
|
+
@classmethod
|
|
188
|
+
def new(
|
|
189
|
+
cls,
|
|
190
|
+
identifier_type: Literal[IdentifierType.COMPOSITE],
|
|
191
|
+
identifier_value: CompositeIdentifier,
|
|
192
|
+
data: UpdateDataT,
|
|
193
|
+
) -> "UpdateParameter": ...
|
|
194
|
+
@overload
|
|
195
|
+
@classmethod
|
|
196
|
+
def new(
|
|
197
|
+
cls,
|
|
198
|
+
identifier_type: IdentifierType,
|
|
199
|
+
identifier_value: IdentifierValueType,
|
|
200
|
+
data: UpdateDataT,
|
|
201
|
+
) -> "UpdateParameter": ...
|
|
202
|
+
@classmethod
|
|
203
|
+
def new(
|
|
204
|
+
cls,
|
|
205
|
+
identifier_type: IdentifierType,
|
|
206
|
+
identifier_value: IdentifierValueType,
|
|
207
|
+
data: UpdateDataT,
|
|
208
|
+
) -> "UpdateParameter":
|
|
209
|
+
return cls(
|
|
210
|
+
identifier=UserSystemRoleIdentifier(
|
|
211
|
+
type=identifier_type, value=identifier_value
|
|
212
|
+
),
|
|
213
|
+
data=data,
|
|
214
|
+
)
|
|
163
215
|
|
|
164
216
|
|
|
165
217
|
class StatusUpdateParameter(
|
|
166
|
-
BaseStatusUpdateParameter[
|
|
218
|
+
BaseStatusUpdateParameter[UserSystemRoleIdentifier],
|
|
167
219
|
):
|
|
168
|
-
|
|
220
|
+
@overload
|
|
221
|
+
@classmethod
|
|
222
|
+
def new(
|
|
223
|
+
cls,
|
|
224
|
+
identifier_type: Literal[IdentifierType.ID],
|
|
225
|
+
identifier_value: int,
|
|
226
|
+
type: ResourceOperationStatusUpdateType,
|
|
227
|
+
) -> "StatusUpdateParameter": ...
|
|
228
|
+
@overload
|
|
229
|
+
@classmethod
|
|
230
|
+
def new(
|
|
231
|
+
cls,
|
|
232
|
+
identifier_type: Literal[IdentifierType.UUID],
|
|
233
|
+
identifier_value: UUID,
|
|
234
|
+
type: ResourceOperationStatusUpdateType,
|
|
235
|
+
) -> "StatusUpdateParameter": ...
|
|
236
|
+
@overload
|
|
237
|
+
@classmethod
|
|
238
|
+
def new(
|
|
239
|
+
cls,
|
|
240
|
+
identifier_type: Literal[IdentifierType.COMPOSITE],
|
|
241
|
+
identifier_value: CompositeIdentifier,
|
|
242
|
+
type: ResourceOperationStatusUpdateType,
|
|
243
|
+
) -> "StatusUpdateParameter": ...
|
|
244
|
+
@overload
|
|
245
|
+
@classmethod
|
|
246
|
+
def new(
|
|
247
|
+
cls,
|
|
248
|
+
identifier_type: IdentifierType,
|
|
249
|
+
identifier_value: IdentifierValueType,
|
|
250
|
+
type: ResourceOperationStatusUpdateType,
|
|
251
|
+
) -> "StatusUpdateParameter": ...
|
|
252
|
+
@classmethod
|
|
253
|
+
def new(
|
|
254
|
+
cls,
|
|
255
|
+
identifier_type: IdentifierType,
|
|
256
|
+
identifier_value: IdentifierValueType,
|
|
257
|
+
type: ResourceOperationStatusUpdateType,
|
|
258
|
+
) -> "StatusUpdateParameter":
|
|
259
|
+
return cls(
|
|
260
|
+
identifier=UserSystemRoleIdentifier(
|
|
261
|
+
type=identifier_type, value=identifier_value
|
|
262
|
+
),
|
|
263
|
+
type=type,
|
|
264
|
+
)
|
|
169
265
|
|
|
170
266
|
|
|
171
|
-
class DeleteSingleParameter(
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
267
|
+
class DeleteSingleParameter(BaseDeleteSingleParameter[UserSystemRoleIdentifier]):
|
|
268
|
+
@overload
|
|
269
|
+
@classmethod
|
|
270
|
+
def new(
|
|
271
|
+
cls, identifier_type: Literal[IdentifierType.ID], identifier_value: int
|
|
272
|
+
) -> "DeleteSingleParameter": ...
|
|
273
|
+
@overload
|
|
274
|
+
@classmethod
|
|
275
|
+
def new(
|
|
276
|
+
cls, identifier_type: Literal[IdentifierType.UUID], identifier_value: UUID
|
|
277
|
+
) -> "DeleteSingleParameter": ...
|
|
278
|
+
@overload
|
|
279
|
+
@classmethod
|
|
280
|
+
def new(
|
|
281
|
+
cls,
|
|
282
|
+
identifier_type: Literal[IdentifierType.COMPOSITE],
|
|
283
|
+
identifier_value: CompositeIdentifier,
|
|
284
|
+
) -> "DeleteSingleParameter": ...
|
|
285
|
+
@overload
|
|
286
|
+
@classmethod
|
|
287
|
+
def new(
|
|
288
|
+
cls, identifier_type: IdentifierType, identifier_value: IdentifierValueType
|
|
289
|
+
) -> "DeleteSingleParameter": ...
|
|
290
|
+
@classmethod
|
|
291
|
+
def new(
|
|
292
|
+
cls, identifier_type: IdentifierType, identifier_value: IdentifierValueType
|
|
293
|
+
) -> "DeleteSingleParameter":
|
|
294
|
+
return cls(
|
|
295
|
+
identifier=UserSystemRoleIdentifier(
|
|
296
|
+
type=identifier_type, value=identifier_value
|
|
297
|
+
)
|
|
298
|
+
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: maleo-identity
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.10
|
|
4
4
|
Summary: MaleoIdentity service package
|
|
5
5
|
Author-email: Agra Bima Yuda <agra@nexmedis.com>
|
|
6
6
|
License: Proprietary
|
|
@@ -41,13 +41,12 @@ Requires-Dist: identify>=2.6.15
|
|
|
41
41
|
Requires-Dist: idna>=3.10
|
|
42
42
|
Requires-Dist: importlib_metadata>=8.7.0
|
|
43
43
|
Requires-Dist: iniconfig>=2.1.0
|
|
44
|
-
Requires-Dist: maleo-crypto>=0.0.
|
|
45
|
-
Requires-Dist: maleo-enums>=0.0.
|
|
46
|
-
Requires-Dist: maleo-logging>=0.0.
|
|
47
|
-
Requires-Dist: maleo-
|
|
48
|
-
Requires-Dist: maleo-
|
|
49
|
-
Requires-Dist: maleo-
|
|
50
|
-
Requires-Dist: maleo-utils>=0.0.46
|
|
44
|
+
Requires-Dist: maleo-crypto>=0.0.50
|
|
45
|
+
Requires-Dist: maleo-enums>=0.0.50
|
|
46
|
+
Requires-Dist: maleo-logging>=0.0.50
|
|
47
|
+
Requires-Dist: maleo-schemas>=0.1.80
|
|
48
|
+
Requires-Dist: maleo-types>=0.0.50
|
|
49
|
+
Requires-Dist: maleo-utils>=0.0.50
|
|
51
50
|
Requires-Dist: mypy_extensions>=1.1.0
|
|
52
51
|
Requires-Dist: nodeenv>=1.9.1
|
|
53
52
|
Requires-Dist: opentelemetry-api>=1.37.0
|
|
@@ -23,26 +23,29 @@ maleo/identity/enums/user_organization_role.py,sha256=jH9AIYKhxPtK-I02KVrYfZ9Wdo
|
|
|
23
23
|
maleo/identity/enums/user_profile.py,sha256=LgX7Ct-MAfx7o0W8MICzpHMfDhi7wpiJfRszn6vr1zc,272
|
|
24
24
|
maleo/identity/enums/user_system_role.py,sha256=jH9AIYKhxPtK-I02KVrYfZ9Wdo-KNCFk0rDBauwt-Ps,252
|
|
25
25
|
maleo/identity/mixins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
26
|
-
maleo/identity/mixins/api_key.py,sha256=
|
|
26
|
+
maleo/identity/mixins/api_key.py,sha256=WbRhcO_wdQnn4ow62eg4kRoPYMyNFjXvi5pivRNdP14,2093
|
|
27
27
|
maleo/identity/mixins/common.py,sha256=diWtUiPMI_ypHtDrmI5y8IArxCdomo9Gt6X69iFhyuw,905
|
|
28
|
-
maleo/identity/mixins/organization.py,sha256=
|
|
29
|
-
maleo/identity/mixins/organization_registration_code.py,sha256
|
|
30
|
-
maleo/identity/mixins/organization_relation.py,sha256=
|
|
31
|
-
maleo/identity/mixins/patient.py,sha256=
|
|
32
|
-
maleo/identity/mixins/user.py,sha256=
|
|
33
|
-
maleo/identity/mixins/
|
|
28
|
+
maleo/identity/mixins/organization.py,sha256=cJQWOWaRj5F3ITCrpLU7R8hOUM-OWZz_T7H0aV6nc2I,2440
|
|
29
|
+
maleo/identity/mixins/organization_registration_code.py,sha256=--XHacpOTCdOLou2I9wE3DiWD_H5MeIotGsg3KJCVaw,3418
|
|
30
|
+
maleo/identity/mixins/organization_relation.py,sha256=b76eiW6Qrw-Ce6qASaYOVTK4Ox7UAltvLl3sbPra9mY,2591
|
|
31
|
+
maleo/identity/mixins/patient.py,sha256=kLJKyc5KDgHvK9ljfiaZJJExnovbCWO70HdtHkdKYeQ,3120
|
|
32
|
+
maleo/identity/mixins/user.py,sha256=PrBEF9GDMewh4UUwWRKF5mVr9exEjBlczLAmbfY3gKY,3421
|
|
33
|
+
maleo/identity/mixins/user_medical_role.py,sha256=p1QHv_X9bce0zpDTzjuZP6LVNrKaE5vlFRmNDU7vRyk,2131
|
|
34
|
+
maleo/identity/mixins/user_organization_role.py,sha256=KOSGPLhcnNB7ejD-OhDsSgRAv7aiMOrhgW5-3RR8H90,2222
|
|
35
|
+
maleo/identity/mixins/user_profile.py,sha256=QbCIiuKeottVLMWg3MJQe6e7nl_RcF6K5yhtCjqf3OA,3697
|
|
36
|
+
maleo/identity/mixins/user_system_role.py,sha256=wxCX7HpT5xYuOqC-rPqnXqdEU5WEf_JLYg7l1zhQIwM,2114
|
|
34
37
|
maleo/identity/schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
35
|
-
maleo/identity/schemas/api_key.py,sha256=
|
|
36
|
-
maleo/identity/schemas/common.py,sha256=
|
|
37
|
-
maleo/identity/schemas/organization.py,sha256=
|
|
38
|
-
maleo/identity/schemas/organization_registration_code.py,sha256=
|
|
39
|
-
maleo/identity/schemas/organization_relation.py,sha256=
|
|
40
|
-
maleo/identity/schemas/patient.py,sha256=
|
|
41
|
-
maleo/identity/schemas/user.py,sha256=
|
|
42
|
-
maleo/identity/schemas/user_medical_role.py,sha256=
|
|
43
|
-
maleo/identity/schemas/user_organization_role.py,sha256=
|
|
44
|
-
maleo/identity/schemas/user_profile.py,sha256=
|
|
45
|
-
maleo/identity/schemas/user_system_role.py,sha256=
|
|
38
|
+
maleo/identity/schemas/api_key.py,sha256=3wFfQBiNQEFAF2ZStfczvFhCgM3zC4A2wfWyZshJhhA,4675
|
|
39
|
+
maleo/identity/schemas/common.py,sha256=YseA6bREI4YFdSHGXK3eS4CIibqm7ZmMBcxLKBiB64Y,8218
|
|
40
|
+
maleo/identity/schemas/organization.py,sha256=FCaQ0kEVxeGUW9AVRhrYX8_sWyfYoX1cHGK4GKN4tkg,8285
|
|
41
|
+
maleo/identity/schemas/organization_registration_code.py,sha256=5ClSTE5dGYGosiW90p4NKOG8dA3Z3Q8i3CfwS5jdJpQ,8498
|
|
42
|
+
maleo/identity/schemas/organization_relation.py,sha256=O2C6TH2hQRxk5RO0QQll7s28AcDrblx4cqLY2KW_1L0,8686
|
|
43
|
+
maleo/identity/schemas/patient.py,sha256=Wgbce_kcFt5WupsM17YhjzskZaPlZnPmXtm_asDX6fQ,8926
|
|
44
|
+
maleo/identity/schemas/user.py,sha256=GCoKDk1d5wNR50VrFxxMdvcqHqTMVR4cTHsf4mw-B10,8438
|
|
45
|
+
maleo/identity/schemas/user_medical_role.py,sha256=17w4Q6x8a1RCzeHfn9LML27BkW3ffF8aX93ZgTPiM0M,8497
|
|
46
|
+
maleo/identity/schemas/user_organization_role.py,sha256=OLMNUck6oVsulycmVBevYL2KUYAKYo6yCoAZrtbot3w,8649
|
|
47
|
+
maleo/identity/schemas/user_profile.py,sha256=CYZfxyddyBGz3LcpH192TSEd1baSc5i8Lon4r0JMW7c,8956
|
|
48
|
+
maleo/identity/schemas/user_system_role.py,sha256=yCPDBiMUECyv5T78OnuZt-_p_X0IvrndcnRuAWpgx5c,8371
|
|
46
49
|
maleo/identity/types/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
47
50
|
maleo/identity/types/api_key.py,sha256=pjWzyAh1p0DTS6v2ImYv849iF-T0PbEM8qlrwN3c-2o,190
|
|
48
51
|
maleo/identity/types/organization.py,sha256=UqOBL4v138jumjQstCAZ-2ZV1Ax8-Cr4SvL36nx8brw,63
|
|
@@ -57,8 +60,8 @@ maleo/identity/types/user_system_role.py,sha256=6KIDk7kCWBlrloNLfIElflS5N8oBYqPe
|
|
|
57
60
|
maleo/identity/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
58
61
|
maleo/identity/utils/organization.py,sha256=aEegzeoNLUptrScUB5kWrYlJj7dzTZeVXymltE5lWpE,874
|
|
59
62
|
maleo/identity/utils/user.py,sha256=1pyfmAbXkAEOo6WM2KRA_kRnFi0O_A2ZUEqv01wY-cU,794
|
|
60
|
-
maleo_identity-0.1.
|
|
61
|
-
maleo_identity-0.1.
|
|
62
|
-
maleo_identity-0.1.
|
|
63
|
-
maleo_identity-0.1.
|
|
64
|
-
maleo_identity-0.1.
|
|
63
|
+
maleo_identity-0.1.10.dist-info/licenses/LICENSE,sha256=aftGsecnk7TWVX-7KW94FqK4Syy6YSZ8PZEF7EcIp3M,2621
|
|
64
|
+
maleo_identity-0.1.10.dist-info/METADATA,sha256=QRRoqWPwC8ZUWJUv5De36A_oK3gdLO3sR0z6Cs74XIg,3546
|
|
65
|
+
maleo_identity-0.1.10.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
66
|
+
maleo_identity-0.1.10.dist-info/top_level.txt,sha256=3Tpd1siVsfYoeI9FEOJNYnffx_shzZ3wsPpTvz5bljc,6
|
|
67
|
+
maleo_identity-0.1.10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|