maleo-identity 0.1.11__py3-none-any.whl → 0.1.24__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.
- maleo/identity/constants/api_key.py +2 -2
- maleo/identity/constants/organization.py +1 -1
- maleo/identity/constants/organization_registration_code.py +2 -2
- maleo/identity/constants/organization_relation.py +2 -2
- maleo/identity/constants/patient.py +1 -1
- maleo/identity/constants/user.py +1 -1
- maleo/identity/constants/user_medical_role.py +2 -2
- maleo/identity/constants/user_organization_role.py +2 -2
- maleo/identity/constants/user_profile.py +1 -1
- maleo/identity/constants/user_system_role.py +6 -2
- maleo/identity/enums/api_key.py +13 -1
- maleo/identity/enums/organization.py +4 -0
- maleo/identity/enums/organization_registration_code.py +4 -0
- maleo/identity/enums/organization_relation.py +11 -1
- maleo/identity/enums/patient.py +18 -2
- maleo/identity/enums/user.py +4 -0
- maleo/identity/enums/user_medical_role.py +11 -1
- maleo/identity/enums/user_organization_role.py +11 -1
- maleo/identity/enums/user_profile.py +4 -0
- maleo/identity/enums/user_system_role.py +24 -1
- maleo/identity/mixins/api_key.py +9 -4
- maleo/identity/mixins/organization.py +3 -1
- maleo/identity/mixins/organization_registration_code.py +40 -4
- maleo/identity/mixins/organization_relation.py +9 -4
- maleo/identity/mixins/patient.py +13 -44
- maleo/identity/mixins/user.py +3 -1
- maleo/identity/mixins/user_medical_role.py +9 -4
- maleo/identity/mixins/user_organization_role.py +9 -4
- maleo/identity/mixins/user_profile.py +3 -1
- maleo/identity/mixins/user_system_role.py +17 -6
- maleo/identity/schemas/api_key.py +21 -4
- maleo/identity/schemas/common.py +38 -24
- maleo/identity/schemas/organization.py +26 -0
- maleo/identity/schemas/organization_registration_code.py +19 -2
- maleo/identity/schemas/organization_relation.py +23 -5
- maleo/identity/schemas/patient.py +56 -31
- maleo/identity/schemas/user.py +23 -0
- maleo/identity/schemas/user_medical_role.py +25 -6
- maleo/identity/schemas/user_organization_role.py +25 -6
- maleo/identity/schemas/user_profile.py +33 -1
- maleo/identity/schemas/user_system_role.py +52 -11
- maleo/identity/types/api_key.py +2 -2
- maleo/identity/types/organization_relation.py +2 -2
- maleo/identity/types/patient.py +1 -1
- maleo/identity/types/user_medical_role.py +2 -2
- maleo/identity/types/user_organization_role.py +2 -2
- maleo/identity/types/user_system_role.py +3 -2
- {maleo_identity-0.1.11.dist-info → maleo_identity-0.1.24.dist-info}/METADATA +6 -5
- maleo_identity-0.1.24.dist-info/RECORD +66 -0
- maleo/identity/models.py +0 -337
- maleo_identity-0.1.11.dist-info/RECORD +0 -67
- {maleo_identity-0.1.11.dist-info → maleo_identity-0.1.24.dist-info}/WHEEL +0 -0
- {maleo_identity-0.1.11.dist-info → maleo_identity-0.1.24.dist-info}/licenses/LICENSE +0 -0
- {maleo_identity-0.1.11.dist-info → maleo_identity-0.1.24.dist-info}/top_level.txt +0 -0
maleo/identity/schemas/user.py
CHANGED
|
@@ -60,6 +60,20 @@ class ReadMultipleParameter(
|
|
|
60
60
|
Ids[OptListOfInts],
|
|
61
61
|
IntOrganizationIds[OptListOfInts],
|
|
62
62
|
):
|
|
63
|
+
organization_ids: Annotated[
|
|
64
|
+
OptListOfInts, Field(None, description="Organization's IDs")
|
|
65
|
+
] = None
|
|
66
|
+
ids: Annotated[OptListOfInts, Field(None, description="Ids")] = None
|
|
67
|
+
uuids: Annotated[OptListOfUUIDs, Field(None, description="UUIDs")] = None
|
|
68
|
+
user_types: Annotated[OptListOfUserTypes, Field(None, description="User Types")] = (
|
|
69
|
+
None
|
|
70
|
+
)
|
|
71
|
+
usernames: Annotated[OptListOfStrs, Field(None, description="User's Usernames")] = (
|
|
72
|
+
None
|
|
73
|
+
)
|
|
74
|
+
emails: Annotated[OptListOfStrs, Field(None, description="User's Emails")] = None
|
|
75
|
+
phones: Annotated[OptListOfStrs, Field(None, description="User's Phones")] = None
|
|
76
|
+
|
|
63
77
|
@property
|
|
64
78
|
def _query_param_fields(self) -> set[str]:
|
|
65
79
|
return {
|
|
@@ -88,6 +102,15 @@ class ReadMultipleParameter(
|
|
|
88
102
|
|
|
89
103
|
|
|
90
104
|
class ReadSingleParameter(BaseReadSingleParameter[UserIdentifier]):
|
|
105
|
+
@classmethod
|
|
106
|
+
def from_identifier(
|
|
107
|
+
cls,
|
|
108
|
+
identifier: UserIdentifier,
|
|
109
|
+
statuses: ListOfDataStatuses = FULL_DATA_STATUSES,
|
|
110
|
+
use_cache: bool = True,
|
|
111
|
+
) -> "ReadSingleParameter":
|
|
112
|
+
return cls(identifier=identifier, statuses=statuses, use_cache=use_cache)
|
|
113
|
+
|
|
91
114
|
@overload
|
|
92
115
|
@classmethod
|
|
93
116
|
def new(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from pydantic import BaseModel, Field
|
|
2
|
-
from typing import Generic, Literal, TypeVar, overload
|
|
2
|
+
from typing import Annotated, Generic, Literal, TypeVar, overload
|
|
3
3
|
from uuid import UUID
|
|
4
4
|
from maleo.enums.medical import (
|
|
5
5
|
MedicalRole,
|
|
@@ -35,7 +35,7 @@ from maleo.types.integer import OptInt, OptListOfInts
|
|
|
35
35
|
from maleo.types.uuid import OptListOfUUIDs
|
|
36
36
|
from ..enums.user_medical_role import IdentifierType
|
|
37
37
|
from ..mixins.user_medical_role import UserMedicalRoleIdentifier
|
|
38
|
-
from ..types.user_medical_role import
|
|
38
|
+
from ..types.user_medical_role import CompositeIdentifierType, IdentifierValueType
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
class CreateParameter(
|
|
@@ -54,6 +54,16 @@ class ReadMultipleParameter(
|
|
|
54
54
|
UUIDs[OptListOfUUIDs],
|
|
55
55
|
Ids[OptListOfInts],
|
|
56
56
|
):
|
|
57
|
+
ids: Annotated[OptListOfInts, Field(None, description="Ids")] = None
|
|
58
|
+
uuids: Annotated[OptListOfUUIDs, Field(None, description="UUIDs")] = None
|
|
59
|
+
user_ids: Annotated[OptListOfInts, Field(None, description="User's IDs")] = None
|
|
60
|
+
organization_ids: Annotated[
|
|
61
|
+
OptListOfInts, Field(None, description="Organization's IDs")
|
|
62
|
+
] = None
|
|
63
|
+
medical_roles: Annotated[
|
|
64
|
+
OptListOfMedicalRoles, Field(None, description="Medical Roles")
|
|
65
|
+
] = None
|
|
66
|
+
|
|
57
67
|
@property
|
|
58
68
|
def _query_param_fields(self) -> set[str]:
|
|
59
69
|
return {
|
|
@@ -80,6 +90,15 @@ class ReadMultipleParameter(
|
|
|
80
90
|
|
|
81
91
|
|
|
82
92
|
class ReadSingleParameter(BaseReadSingleParameter[UserMedicalRoleIdentifier]):
|
|
93
|
+
@classmethod
|
|
94
|
+
def from_identifier(
|
|
95
|
+
cls,
|
|
96
|
+
identifier: UserMedicalRoleIdentifier,
|
|
97
|
+
statuses: ListOfDataStatuses = FULL_DATA_STATUSES,
|
|
98
|
+
use_cache: bool = True,
|
|
99
|
+
) -> "ReadSingleParameter":
|
|
100
|
+
return cls(identifier=identifier, statuses=statuses, use_cache=use_cache)
|
|
101
|
+
|
|
83
102
|
@overload
|
|
84
103
|
@classmethod
|
|
85
104
|
def new(
|
|
@@ -103,7 +122,7 @@ class ReadSingleParameter(BaseReadSingleParameter[UserMedicalRoleIdentifier]):
|
|
|
103
122
|
def new(
|
|
104
123
|
cls,
|
|
105
124
|
identifier_type: Literal[IdentifierType.COMPOSITE],
|
|
106
|
-
identifier_value:
|
|
125
|
+
identifier_value: CompositeIdentifierType,
|
|
107
126
|
statuses: ListOfDataStatuses = list(FULL_DATA_STATUSES),
|
|
108
127
|
use_cache: bool = True,
|
|
109
128
|
) -> "ReadSingleParameter": ...
|
|
@@ -187,7 +206,7 @@ class UpdateParameter(
|
|
|
187
206
|
def new(
|
|
188
207
|
cls,
|
|
189
208
|
identifier_type: Literal[IdentifierType.COMPOSITE],
|
|
190
|
-
identifier_value:
|
|
209
|
+
identifier_value: CompositeIdentifierType,
|
|
191
210
|
data: UpdateDataT,
|
|
192
211
|
) -> "UpdateParameter": ...
|
|
193
212
|
@overload
|
|
@@ -237,7 +256,7 @@ class StatusUpdateParameter(
|
|
|
237
256
|
def new(
|
|
238
257
|
cls,
|
|
239
258
|
identifier_type: Literal[IdentifierType.COMPOSITE],
|
|
240
|
-
identifier_value:
|
|
259
|
+
identifier_value: CompositeIdentifierType,
|
|
241
260
|
type: ResourceOperationStatusUpdateType,
|
|
242
261
|
) -> "StatusUpdateParameter": ...
|
|
243
262
|
@overload
|
|
@@ -279,7 +298,7 @@ class DeleteSingleParameter(BaseDeleteSingleParameter[UserMedicalRoleIdentifier]
|
|
|
279
298
|
def new(
|
|
280
299
|
cls,
|
|
281
300
|
identifier_type: Literal[IdentifierType.COMPOSITE],
|
|
282
|
-
identifier_value:
|
|
301
|
+
identifier_value: CompositeIdentifierType,
|
|
283
302
|
) -> "DeleteSingleParameter": ...
|
|
284
303
|
@overload
|
|
285
304
|
@classmethod
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from pydantic import BaseModel, Field
|
|
2
|
-
from typing import Generic, Literal, TypeVar, overload
|
|
2
|
+
from typing import Annotated, Generic, Literal, TypeVar, overload
|
|
3
3
|
from uuid import UUID
|
|
4
4
|
from maleo.enums.organization import (
|
|
5
5
|
OrganizationRole,
|
|
@@ -35,7 +35,7 @@ from maleo.types.integer import OptInt, OptListOfInts
|
|
|
35
35
|
from maleo.types.uuid import OptListOfUUIDs
|
|
36
36
|
from ..enums.user_organization_role import IdentifierType
|
|
37
37
|
from ..mixins.user_organization_role import UserOrganizationRoleIdentifier
|
|
38
|
-
from ..types.user_organization_role import
|
|
38
|
+
from ..types.user_organization_role import CompositeIdentifierType, IdentifierValueType
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
class CreateParameter(
|
|
@@ -54,6 +54,16 @@ class ReadMultipleParameter(
|
|
|
54
54
|
UUIDs[OptListOfUUIDs],
|
|
55
55
|
Ids[OptListOfInts],
|
|
56
56
|
):
|
|
57
|
+
ids: Annotated[OptListOfInts, Field(None, description="Ids")] = None
|
|
58
|
+
uuids: Annotated[OptListOfUUIDs, Field(None, description="UUIDs")] = None
|
|
59
|
+
user_ids: Annotated[OptListOfInts, Field(None, description="User's IDs")] = None
|
|
60
|
+
organization_ids: Annotated[
|
|
61
|
+
OptListOfInts, Field(None, description="Organization's IDs")
|
|
62
|
+
] = None
|
|
63
|
+
organization_roles: Annotated[
|
|
64
|
+
OptListOfOrganizationRoles, Field(None, description="Organization Roles")
|
|
65
|
+
] = None
|
|
66
|
+
|
|
57
67
|
@property
|
|
58
68
|
def _query_param_fields(self) -> set[str]:
|
|
59
69
|
return {
|
|
@@ -80,6 +90,15 @@ class ReadMultipleParameter(
|
|
|
80
90
|
|
|
81
91
|
|
|
82
92
|
class ReadSingleParameter(BaseReadSingleParameter[UserOrganizationRoleIdentifier]):
|
|
93
|
+
@classmethod
|
|
94
|
+
def from_identifier(
|
|
95
|
+
cls,
|
|
96
|
+
identifier: UserOrganizationRoleIdentifier,
|
|
97
|
+
statuses: ListOfDataStatuses = FULL_DATA_STATUSES,
|
|
98
|
+
use_cache: bool = True,
|
|
99
|
+
) -> "ReadSingleParameter":
|
|
100
|
+
return cls(identifier=identifier, statuses=statuses, use_cache=use_cache)
|
|
101
|
+
|
|
83
102
|
@overload
|
|
84
103
|
@classmethod
|
|
85
104
|
def new(
|
|
@@ -103,7 +122,7 @@ class ReadSingleParameter(BaseReadSingleParameter[UserOrganizationRoleIdentifier
|
|
|
103
122
|
def new(
|
|
104
123
|
cls,
|
|
105
124
|
identifier_type: Literal[IdentifierType.COMPOSITE],
|
|
106
|
-
identifier_value:
|
|
125
|
+
identifier_value: CompositeIdentifierType,
|
|
107
126
|
statuses: ListOfDataStatuses = list(FULL_DATA_STATUSES),
|
|
108
127
|
use_cache: bool = True,
|
|
109
128
|
) -> "ReadSingleParameter": ...
|
|
@@ -188,7 +207,7 @@ class UpdateParameter(
|
|
|
188
207
|
def new(
|
|
189
208
|
cls,
|
|
190
209
|
identifier_type: Literal[IdentifierType.COMPOSITE],
|
|
191
|
-
identifier_value:
|
|
210
|
+
identifier_value: CompositeIdentifierType,
|
|
192
211
|
data: UpdateDataT,
|
|
193
212
|
) -> "UpdateParameter": ...
|
|
194
213
|
@overload
|
|
@@ -238,7 +257,7 @@ class StatusUpdateParameter(
|
|
|
238
257
|
def new(
|
|
239
258
|
cls,
|
|
240
259
|
identifier_type: Literal[IdentifierType.COMPOSITE],
|
|
241
|
-
identifier_value:
|
|
260
|
+
identifier_value: CompositeIdentifierType,
|
|
242
261
|
type: ResourceOperationStatusUpdateType,
|
|
243
262
|
) -> "StatusUpdateParameter": ...
|
|
244
263
|
@overload
|
|
@@ -280,7 +299,7 @@ class DeleteSingleParameter(BaseDeleteSingleParameter[UserOrganizationRoleIdenti
|
|
|
280
299
|
def new(
|
|
281
300
|
cls,
|
|
282
301
|
identifier_type: Literal[IdentifierType.COMPOSITE],
|
|
283
|
-
identifier_value:
|
|
302
|
+
identifier_value: CompositeIdentifierType,
|
|
284
303
|
) -> "DeleteSingleParameter": ...
|
|
285
304
|
@overload
|
|
286
305
|
@classmethod
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from pydantic import BaseModel, Field
|
|
2
|
-
from typing import Generic, Literal, TypeVar, overload
|
|
2
|
+
from typing import Annotated, Generic, Literal, TypeVar, overload
|
|
3
3
|
from uuid import UUID
|
|
4
4
|
from maleo.enums.identity import (
|
|
5
5
|
OptBloodType,
|
|
@@ -21,6 +21,7 @@ from maleo.schemas.mixins.identity import (
|
|
|
21
21
|
Ids,
|
|
22
22
|
UUIDs,
|
|
23
23
|
IntUserId,
|
|
24
|
+
IntUserIds,
|
|
24
25
|
IntOrganizationIds,
|
|
25
26
|
BirthDate,
|
|
26
27
|
)
|
|
@@ -78,10 +79,23 @@ class ReadMultipleParameter(
|
|
|
78
79
|
UUIDs[OptListOfUUIDs],
|
|
79
80
|
Ids[OptListOfInts],
|
|
80
81
|
IntOrganizationIds[OptListOfInts],
|
|
82
|
+
IntUserIds[OptListOfInts],
|
|
81
83
|
):
|
|
84
|
+
user_ids: Annotated[OptListOfInts, Field(None, description="User's IDs")] = None
|
|
85
|
+
organization_ids: Annotated[
|
|
86
|
+
OptListOfInts, Field(None, description="Organization's IDs")
|
|
87
|
+
] = None
|
|
88
|
+
ids: Annotated[OptListOfInts, Field(None, description="Ids")] = None
|
|
89
|
+
uuids: Annotated[OptListOfUUIDs, Field(None, description="UUIDs")] = None
|
|
90
|
+
genders: Annotated[OptListOfGenders, Field(None, description="Genders")] = None
|
|
91
|
+
blood_types: Annotated[
|
|
92
|
+
OptListOfBloodTypes, Field(None, description="Blood Types")
|
|
93
|
+
] = None
|
|
94
|
+
|
|
82
95
|
@property
|
|
83
96
|
def _query_param_fields(self) -> set[str]:
|
|
84
97
|
return {
|
|
98
|
+
"user_ids",
|
|
85
99
|
"organization_ids",
|
|
86
100
|
"ids",
|
|
87
101
|
"uuids",
|
|
@@ -105,6 +119,15 @@ class ReadMultipleParameter(
|
|
|
105
119
|
|
|
106
120
|
|
|
107
121
|
class ReadSingleParameter(BaseReadSingleParameter[UserProfileIdentifier]):
|
|
122
|
+
@classmethod
|
|
123
|
+
def from_identifier(
|
|
124
|
+
cls,
|
|
125
|
+
identifier: UserProfileIdentifier,
|
|
126
|
+
statuses: ListOfDataStatuses = FULL_DATA_STATUSES,
|
|
127
|
+
use_cache: bool = True,
|
|
128
|
+
) -> "ReadSingleParameter":
|
|
129
|
+
return cls(identifier=identifier, statuses=statuses, use_cache=use_cache)
|
|
130
|
+
|
|
108
131
|
@overload
|
|
109
132
|
@classmethod
|
|
110
133
|
def new(
|
|
@@ -132,6 +155,15 @@ class ReadSingleParameter(BaseReadSingleParameter[UserProfileIdentifier]):
|
|
|
132
155
|
statuses: ListOfDataStatuses = list(FULL_DATA_STATUSES),
|
|
133
156
|
use_cache: bool = True,
|
|
134
157
|
) -> "ReadSingleParameter": ...
|
|
158
|
+
@overload
|
|
159
|
+
@classmethod
|
|
160
|
+
def new(
|
|
161
|
+
cls,
|
|
162
|
+
identifier_type: IdentifierType,
|
|
163
|
+
identifier_value: IdentifierValueType,
|
|
164
|
+
statuses: ListOfDataStatuses = list(FULL_DATA_STATUSES),
|
|
165
|
+
use_cache: bool = True,
|
|
166
|
+
) -> "ReadSingleParameter": ...
|
|
135
167
|
@classmethod
|
|
136
168
|
def new(
|
|
137
169
|
cls,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from pydantic import BaseModel, Field
|
|
2
|
-
from typing import Generic, Literal, TypeVar, overload
|
|
2
|
+
from typing import Annotated, Generic, Literal, TypeVar, overload
|
|
3
3
|
from uuid import UUID
|
|
4
4
|
from maleo.enums.system import (
|
|
5
5
|
SystemRole,
|
|
@@ -31,9 +31,9 @@ from maleo.schemas.parameter import (
|
|
|
31
31
|
from maleo.types.dict import StrToAnyDict
|
|
32
32
|
from maleo.types.integer import OptInt, OptListOfInts
|
|
33
33
|
from maleo.types.uuid import OptListOfUUIDs
|
|
34
|
-
from ..enums.user_system_role import IdentifierType
|
|
35
|
-
from ..mixins.user_system_role import UserSystemRoleIdentifier
|
|
36
|
-
from ..types.user_system_role import
|
|
34
|
+
from ..enums.user_system_role import IdentifierType, OptListOfExpandableFields
|
|
35
|
+
from ..mixins.user_system_role import Expand, UserSystemRoleIdentifier
|
|
36
|
+
from ..types.user_system_role import CompositeIdentifierType, IdentifierValueType
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
class StandardCreateData(FullSystemRoleMixin[SystemRole]):
|
|
@@ -47,17 +47,25 @@ class FullCreateData(
|
|
|
47
47
|
pass
|
|
48
48
|
|
|
49
49
|
|
|
50
|
-
class CreateParameter(FullCreateData):
|
|
50
|
+
class CreateParameter(Expand, FullCreateData):
|
|
51
51
|
pass
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
class ReadMultipleParameter(
|
|
55
|
+
Expand,
|
|
55
56
|
ReadPaginatedMultipleParameter,
|
|
56
57
|
FullSystemRolesMixin[OptListOfSystemRoles],
|
|
57
58
|
IntUserIds[OptListOfInts],
|
|
58
59
|
UUIDs[OptListOfUUIDs],
|
|
59
60
|
Ids[OptListOfInts],
|
|
60
61
|
):
|
|
62
|
+
ids: Annotated[OptListOfInts, Field(None, description="Ids")] = None
|
|
63
|
+
uuids: Annotated[OptListOfUUIDs, Field(None, description="UUIDs")] = None
|
|
64
|
+
user_ids: Annotated[OptListOfInts, Field(None, description="User's IDs")] = None
|
|
65
|
+
system_roles: Annotated[
|
|
66
|
+
OptListOfSystemRoles, Field(None, description="System Roles")
|
|
67
|
+
] = None
|
|
68
|
+
|
|
61
69
|
@property
|
|
62
70
|
def _query_param_fields(self) -> set[str]:
|
|
63
71
|
return {
|
|
@@ -70,6 +78,7 @@ class ReadMultipleParameter(
|
|
|
70
78
|
"page",
|
|
71
79
|
"limit",
|
|
72
80
|
"use_cache",
|
|
81
|
+
"expand",
|
|
73
82
|
}
|
|
74
83
|
|
|
75
84
|
def to_query_params(self) -> StrToAnyDict:
|
|
@@ -82,7 +91,19 @@ class ReadMultipleParameter(
|
|
|
82
91
|
return params
|
|
83
92
|
|
|
84
93
|
|
|
85
|
-
class ReadSingleParameter(BaseReadSingleParameter[UserSystemRoleIdentifier]):
|
|
94
|
+
class ReadSingleParameter(Expand, BaseReadSingleParameter[UserSystemRoleIdentifier]):
|
|
95
|
+
@classmethod
|
|
96
|
+
def from_identifier(
|
|
97
|
+
cls,
|
|
98
|
+
identifier: UserSystemRoleIdentifier,
|
|
99
|
+
statuses: ListOfDataStatuses = FULL_DATA_STATUSES,
|
|
100
|
+
use_cache: bool = True,
|
|
101
|
+
expand: OptListOfExpandableFields = None,
|
|
102
|
+
) -> "ReadSingleParameter":
|
|
103
|
+
return cls(
|
|
104
|
+
identifier=identifier, statuses=statuses, use_cache=use_cache, expand=expand
|
|
105
|
+
)
|
|
106
|
+
|
|
86
107
|
@overload
|
|
87
108
|
@classmethod
|
|
88
109
|
def new(
|
|
@@ -91,6 +112,7 @@ class ReadSingleParameter(BaseReadSingleParameter[UserSystemRoleIdentifier]):
|
|
|
91
112
|
identifier_value: int,
|
|
92
113
|
statuses: ListOfDataStatuses = list(FULL_DATA_STATUSES),
|
|
93
114
|
use_cache: bool = True,
|
|
115
|
+
expand: OptListOfExpandableFields = None,
|
|
94
116
|
) -> "ReadSingleParameter": ...
|
|
95
117
|
@overload
|
|
96
118
|
@classmethod
|
|
@@ -100,15 +122,17 @@ class ReadSingleParameter(BaseReadSingleParameter[UserSystemRoleIdentifier]):
|
|
|
100
122
|
identifier_value: UUID,
|
|
101
123
|
statuses: ListOfDataStatuses = list(FULL_DATA_STATUSES),
|
|
102
124
|
use_cache: bool = True,
|
|
125
|
+
expand: OptListOfExpandableFields = None,
|
|
103
126
|
) -> "ReadSingleParameter": ...
|
|
104
127
|
@overload
|
|
105
128
|
@classmethod
|
|
106
129
|
def new(
|
|
107
130
|
cls,
|
|
108
131
|
identifier_type: Literal[IdentifierType.COMPOSITE],
|
|
109
|
-
identifier_value:
|
|
132
|
+
identifier_value: CompositeIdentifierType,
|
|
110
133
|
statuses: ListOfDataStatuses = list(FULL_DATA_STATUSES),
|
|
111
134
|
use_cache: bool = True,
|
|
135
|
+
expand: OptListOfExpandableFields = None,
|
|
112
136
|
) -> "ReadSingleParameter": ...
|
|
113
137
|
@overload
|
|
114
138
|
@classmethod
|
|
@@ -118,6 +142,7 @@ class ReadSingleParameter(BaseReadSingleParameter[UserSystemRoleIdentifier]):
|
|
|
118
142
|
identifier_value: IdentifierValueType,
|
|
119
143
|
statuses: ListOfDataStatuses = list(FULL_DATA_STATUSES),
|
|
120
144
|
use_cache: bool = True,
|
|
145
|
+
expand: OptListOfExpandableFields = None,
|
|
121
146
|
) -> "ReadSingleParameter": ...
|
|
122
147
|
@classmethod
|
|
123
148
|
def new(
|
|
@@ -126,6 +151,7 @@ class ReadSingleParameter(BaseReadSingleParameter[UserSystemRoleIdentifier]):
|
|
|
126
151
|
identifier_value: IdentifierValueType,
|
|
127
152
|
statuses: ListOfDataStatuses = list(FULL_DATA_STATUSES),
|
|
128
153
|
use_cache: bool = True,
|
|
154
|
+
expand: OptListOfExpandableFields = None,
|
|
129
155
|
) -> "ReadSingleParameter":
|
|
130
156
|
return cls(
|
|
131
157
|
identifier=UserSystemRoleIdentifier(
|
|
@@ -133,11 +159,12 @@ class ReadSingleParameter(BaseReadSingleParameter[UserSystemRoleIdentifier]):
|
|
|
133
159
|
),
|
|
134
160
|
statuses=statuses,
|
|
135
161
|
use_cache=use_cache,
|
|
162
|
+
expand=expand,
|
|
136
163
|
)
|
|
137
164
|
|
|
138
165
|
def to_query_params(self) -> StrToAnyDict:
|
|
139
166
|
return self.model_dump(
|
|
140
|
-
mode="json", include={"statuses", "use_cache"}, exclude_none=True
|
|
167
|
+
mode="json", include={"statuses", "use_cache", "expand"}, exclude_none=True
|
|
141
168
|
)
|
|
142
169
|
|
|
143
170
|
|
|
@@ -163,6 +190,7 @@ class UpdateDataMixin(BaseModel, Generic[UpdateDataT]):
|
|
|
163
190
|
|
|
164
191
|
|
|
165
192
|
class UpdateParameter(
|
|
193
|
+
Expand,
|
|
166
194
|
UpdateDataMixin[UpdateDataT],
|
|
167
195
|
IdentifierMixin[UserSystemRoleIdentifier],
|
|
168
196
|
Generic[UpdateDataT],
|
|
@@ -174,6 +202,7 @@ class UpdateParameter(
|
|
|
174
202
|
identifier_type: Literal[IdentifierType.ID],
|
|
175
203
|
identifier_value: int,
|
|
176
204
|
data: UpdateDataT,
|
|
205
|
+
expand: OptListOfExpandableFields = None,
|
|
177
206
|
) -> "UpdateParameter": ...
|
|
178
207
|
@overload
|
|
179
208
|
@classmethod
|
|
@@ -182,14 +211,16 @@ class UpdateParameter(
|
|
|
182
211
|
identifier_type: Literal[IdentifierType.UUID],
|
|
183
212
|
identifier_value: UUID,
|
|
184
213
|
data: UpdateDataT,
|
|
214
|
+
expand: OptListOfExpandableFields = None,
|
|
185
215
|
) -> "UpdateParameter": ...
|
|
186
216
|
@overload
|
|
187
217
|
@classmethod
|
|
188
218
|
def new(
|
|
189
219
|
cls,
|
|
190
220
|
identifier_type: Literal[IdentifierType.COMPOSITE],
|
|
191
|
-
identifier_value:
|
|
221
|
+
identifier_value: CompositeIdentifierType,
|
|
192
222
|
data: UpdateDataT,
|
|
223
|
+
expand: OptListOfExpandableFields = None,
|
|
193
224
|
) -> "UpdateParameter": ...
|
|
194
225
|
@overload
|
|
195
226
|
@classmethod
|
|
@@ -198,6 +229,7 @@ class UpdateParameter(
|
|
|
198
229
|
identifier_type: IdentifierType,
|
|
199
230
|
identifier_value: IdentifierValueType,
|
|
200
231
|
data: UpdateDataT,
|
|
232
|
+
expand: OptListOfExpandableFields = None,
|
|
201
233
|
) -> "UpdateParameter": ...
|
|
202
234
|
@classmethod
|
|
203
235
|
def new(
|
|
@@ -205,16 +237,19 @@ class UpdateParameter(
|
|
|
205
237
|
identifier_type: IdentifierType,
|
|
206
238
|
identifier_value: IdentifierValueType,
|
|
207
239
|
data: UpdateDataT,
|
|
240
|
+
expand: OptListOfExpandableFields = None,
|
|
208
241
|
) -> "UpdateParameter":
|
|
209
242
|
return cls(
|
|
210
243
|
identifier=UserSystemRoleIdentifier(
|
|
211
244
|
type=identifier_type, value=identifier_value
|
|
212
245
|
),
|
|
213
246
|
data=data,
|
|
247
|
+
expand=expand,
|
|
214
248
|
)
|
|
215
249
|
|
|
216
250
|
|
|
217
251
|
class StatusUpdateParameter(
|
|
252
|
+
Expand,
|
|
218
253
|
BaseStatusUpdateParameter[UserSystemRoleIdentifier],
|
|
219
254
|
):
|
|
220
255
|
@overload
|
|
@@ -224,6 +259,7 @@ class StatusUpdateParameter(
|
|
|
224
259
|
identifier_type: Literal[IdentifierType.ID],
|
|
225
260
|
identifier_value: int,
|
|
226
261
|
type: ResourceOperationStatusUpdateType,
|
|
262
|
+
expand: OptListOfExpandableFields = None,
|
|
227
263
|
) -> "StatusUpdateParameter": ...
|
|
228
264
|
@overload
|
|
229
265
|
@classmethod
|
|
@@ -232,14 +268,16 @@ class StatusUpdateParameter(
|
|
|
232
268
|
identifier_type: Literal[IdentifierType.UUID],
|
|
233
269
|
identifier_value: UUID,
|
|
234
270
|
type: ResourceOperationStatusUpdateType,
|
|
271
|
+
expand: OptListOfExpandableFields = None,
|
|
235
272
|
) -> "StatusUpdateParameter": ...
|
|
236
273
|
@overload
|
|
237
274
|
@classmethod
|
|
238
275
|
def new(
|
|
239
276
|
cls,
|
|
240
277
|
identifier_type: Literal[IdentifierType.COMPOSITE],
|
|
241
|
-
identifier_value:
|
|
278
|
+
identifier_value: CompositeIdentifierType,
|
|
242
279
|
type: ResourceOperationStatusUpdateType,
|
|
280
|
+
expand: OptListOfExpandableFields = None,
|
|
243
281
|
) -> "StatusUpdateParameter": ...
|
|
244
282
|
@overload
|
|
245
283
|
@classmethod
|
|
@@ -248,6 +286,7 @@ class StatusUpdateParameter(
|
|
|
248
286
|
identifier_type: IdentifierType,
|
|
249
287
|
identifier_value: IdentifierValueType,
|
|
250
288
|
type: ResourceOperationStatusUpdateType,
|
|
289
|
+
expand: OptListOfExpandableFields = None,
|
|
251
290
|
) -> "StatusUpdateParameter": ...
|
|
252
291
|
@classmethod
|
|
253
292
|
def new(
|
|
@@ -255,12 +294,14 @@ class StatusUpdateParameter(
|
|
|
255
294
|
identifier_type: IdentifierType,
|
|
256
295
|
identifier_value: IdentifierValueType,
|
|
257
296
|
type: ResourceOperationStatusUpdateType,
|
|
297
|
+
expand: OptListOfExpandableFields = None,
|
|
258
298
|
) -> "StatusUpdateParameter":
|
|
259
299
|
return cls(
|
|
260
300
|
identifier=UserSystemRoleIdentifier(
|
|
261
301
|
type=identifier_type, value=identifier_value
|
|
262
302
|
),
|
|
263
303
|
type=type,
|
|
304
|
+
expand=expand,
|
|
264
305
|
)
|
|
265
306
|
|
|
266
307
|
|
|
@@ -280,7 +321,7 @@ class DeleteSingleParameter(BaseDeleteSingleParameter[UserSystemRoleIdentifier])
|
|
|
280
321
|
def new(
|
|
281
322
|
cls,
|
|
282
323
|
identifier_type: Literal[IdentifierType.COMPOSITE],
|
|
283
|
-
identifier_value:
|
|
324
|
+
identifier_value: CompositeIdentifierType,
|
|
284
325
|
) -> "DeleteSingleParameter": ...
|
|
285
326
|
@overload
|
|
286
327
|
@classmethod
|
maleo/identity/types/api_key.py
CHANGED
|
@@ -3,5 +3,5 @@ from uuid import UUID
|
|
|
3
3
|
from maleo.types.integer import OptInt
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
IdentifierValueType = int | UUID | str |
|
|
6
|
+
CompositeIdentifierType = Tuple[int, OptInt]
|
|
7
|
+
IdentifierValueType = int | UUID | str | CompositeIdentifierType
|
|
@@ -3,5 +3,5 @@ from uuid import UUID
|
|
|
3
3
|
from maleo.enums.organization import OrganizationRelation
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
IdentifierValueType = int | UUID |
|
|
6
|
+
CompositeIdentifierType = Tuple[int, int, OrganizationRelation]
|
|
7
|
+
IdentifierValueType = int | UUID | CompositeIdentifierType
|
maleo/identity/types/patient.py
CHANGED
|
@@ -3,5 +3,5 @@ from uuid import UUID
|
|
|
3
3
|
from maleo.enums.medical import MedicalRole
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
IdentifierValueType = int | UUID |
|
|
6
|
+
CompositeIdentifierType = Tuple[int, int, MedicalRole]
|
|
7
|
+
IdentifierValueType = int | UUID | CompositeIdentifierType
|
|
@@ -3,5 +3,5 @@ from uuid import UUID
|
|
|
3
3
|
from maleo.enums.organization import OrganizationRole
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
IdentifierValueType = int | UUID |
|
|
6
|
+
CompositeIdentifierType = Tuple[int, int, OrganizationRole]
|
|
7
|
+
IdentifierValueType = int | UUID | CompositeIdentifierType
|
|
@@ -3,5 +3,6 @@ from uuid import UUID
|
|
|
3
3
|
from maleo.enums.system import SystemRole
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
BasicIdentifierType = int | UUID
|
|
7
|
+
CompositeIdentifierType = Tuple[int, SystemRole]
|
|
8
|
+
IdentifierValueType = BasicIdentifierType | CompositeIdentifierType
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: maleo-identity
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.24
|
|
4
4
|
Summary: MaleoIdentity service package
|
|
5
5
|
Author-email: Agra Bima Yuda <agra@nexmedis.com>
|
|
6
6
|
License: Proprietary
|
|
@@ -11,7 +11,7 @@ Requires-Dist: annotated-types>=0.7.0
|
|
|
11
11
|
Requires-Dist: anyio>=4.11.0
|
|
12
12
|
Requires-Dist: bcrypt>=5.0.0
|
|
13
13
|
Requires-Dist: black>=25.9.0
|
|
14
|
-
Requires-Dist: cachetools>=6.2.
|
|
14
|
+
Requires-Dist: cachetools>=6.2.1
|
|
15
15
|
Requires-Dist: certifi>=2025.10.5
|
|
16
16
|
Requires-Dist: cffi>=2.0.0
|
|
17
17
|
Requires-Dist: cfgv>=3.4.0
|
|
@@ -20,7 +20,7 @@ Requires-Dist: click>=8.3.0
|
|
|
20
20
|
Requires-Dist: colorama>=0.4.6
|
|
21
21
|
Requires-Dist: cryptography>=46.0.2
|
|
22
22
|
Requires-Dist: distlib>=0.4.0
|
|
23
|
-
Requires-Dist: fastapi>=0.
|
|
23
|
+
Requires-Dist: fastapi>=0.119.0
|
|
24
24
|
Requires-Dist: filelock>=3.20.0
|
|
25
25
|
Requires-Dist: google-api-core>=2.26.0
|
|
26
26
|
Requires-Dist: google-auth>=2.41.1
|
|
@@ -38,13 +38,14 @@ Requires-Dist: h11>=0.16.0
|
|
|
38
38
|
Requires-Dist: httpcore>=1.0.9
|
|
39
39
|
Requires-Dist: httpx>=0.28.1
|
|
40
40
|
Requires-Dist: identify>=2.6.15
|
|
41
|
-
Requires-Dist: idna>=3.
|
|
41
|
+
Requires-Dist: idna>=3.11
|
|
42
42
|
Requires-Dist: importlib_metadata>=8.7.0
|
|
43
43
|
Requires-Dist: iniconfig>=2.1.0
|
|
44
44
|
Requires-Dist: maleo-crypto>=0.0.50
|
|
45
45
|
Requires-Dist: maleo-enums>=0.0.50
|
|
46
46
|
Requires-Dist: maleo-logging>=0.0.50
|
|
47
|
-
Requires-Dist: maleo-
|
|
47
|
+
Requires-Dist: maleo-metadata>=0.7.50
|
|
48
|
+
Requires-Dist: maleo-schemas>=0.7.50
|
|
48
49
|
Requires-Dist: maleo-types>=0.0.50
|
|
49
50
|
Requires-Dist: maleo-utils>=0.0.50
|
|
50
51
|
Requires-Dist: mypy_extensions>=1.1.0
|