maleo-enums 0.0.28__py3-none-any.whl → 0.0.30__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/enums/cardinality.py +55 -34
- maleo/enums/connection.py +71 -40
- maleo/enums/environment.py +27 -18
- maleo/enums/expiration.py +25 -16
- maleo/enums/identity.py +47 -28
- maleo/enums/medical.py +79 -32
- maleo/enums/order.py +25 -14
- maleo/enums/organization.py +144 -47
- maleo/enums/service.py +234 -93
- maleo/enums/status.py +39 -24
- maleo/enums/system.py +38 -17
- maleo/enums/user.py +33 -16
- {maleo_enums-0.0.28.dist-info → maleo_enums-0.0.30.dist-info}/METADATA +7 -2
- maleo_enums-0.0.30.dist-info/RECORD +18 -0
- maleo_enums-0.0.28.dist-info/RECORD +0 -18
- {maleo_enums-0.0.28.dist-info → maleo_enums-0.0.30.dist-info}/WHEEL +0 -0
- {maleo_enums-0.0.28.dist-info → maleo_enums-0.0.30.dist-info}/licenses/LICENSE +0 -0
- {maleo_enums-0.0.28.dist-info → maleo_enums-0.0.30.dist-info}/top_level.txt +0 -0
maleo/enums/order.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from enum import StrEnum
|
|
2
|
-
from
|
|
3
|
-
from
|
|
2
|
+
from pydantic import BaseModel, Field
|
|
3
|
+
from typing import Annotated, Generic, Sequence, TypeVar
|
|
4
|
+
from maleo.types.string import ListOfStrs
|
|
4
5
|
|
|
5
6
|
|
|
6
7
|
class Order(StrEnum):
|
|
@@ -8,20 +9,30 @@ class Order(StrEnum):
|
|
|
8
9
|
DESC = "desc"
|
|
9
10
|
|
|
10
11
|
@classmethod
|
|
11
|
-
def choices(cls) ->
|
|
12
|
+
def choices(cls) -> ListOfStrs:
|
|
12
13
|
return [e.value for e in cls]
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
OrderT = TypeVar("OrderT", bound=Order)
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
OptOrder = Order | None
|
|
18
|
+
OptOrderT = TypeVar("OptOrderT", bound=OptOrder)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class OrderMixin(BaseModel, Generic[OptOrderT]):
|
|
22
|
+
order: Annotated[OptOrderT, Field(..., description="Order")]
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
ListOfOrders = list[Order]
|
|
19
26
|
ListOfOrdersT = TypeVar("ListOfOrdersT", bound=ListOfOrders)
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
OptListOfOrders = ListOfOrders | None
|
|
28
|
+
OptListOfOrdersT = TypeVar("OptListOfOrdersT", bound=OptListOfOrders)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class OrdersMixin(BaseModel, Generic[OptListOfOrdersT]):
|
|
32
|
+
orders: Annotated[OptListOfOrdersT, Field(..., description="Orders")]
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
SeqOfOrders = Sequence[Order]
|
|
36
|
+
SeqOfOrdersT = TypeVar("SeqOfOrdersT", bound=SeqOfOrders)
|
|
37
|
+
OptSeqOfOrders = SeqOfOrders | None
|
|
38
|
+
OptSeqOfOrdersT = TypeVar("OptSeqOfOrdersT", bound=OptSeqOfOrders)
|
maleo/enums/organization.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from enum import StrEnum
|
|
2
|
-
from
|
|
3
|
-
from
|
|
2
|
+
from pydantic import BaseModel, Field
|
|
3
|
+
from typing import Annotated, Generic, Sequence, TypeVar
|
|
4
|
+
from maleo.types.string import ListOfStrs
|
|
4
5
|
|
|
5
6
|
|
|
6
7
|
class OrganizationType(StrEnum):
|
|
@@ -17,7 +18,7 @@ class OrganizationType(StrEnum):
|
|
|
17
18
|
INSURANCE_PROVIDER = "insurance_provider"
|
|
18
19
|
INTERNAL = "internal"
|
|
19
20
|
LABORATORY = "laboratory"
|
|
20
|
-
MEDICAL_GROUP = "
|
|
21
|
+
MEDICAL_GROUP = "organization_group"
|
|
21
22
|
NETWORK = "network"
|
|
22
23
|
PARTNER = "partner"
|
|
23
24
|
PHARMACY = "pharmacy"
|
|
@@ -32,34 +33,58 @@ class OrganizationType(StrEnum):
|
|
|
32
33
|
VENDOR = "vendor"
|
|
33
34
|
|
|
34
35
|
@classmethod
|
|
35
|
-
def choices(cls) ->
|
|
36
|
+
def choices(cls) -> ListOfStrs:
|
|
36
37
|
return [e.value for e in cls]
|
|
37
38
|
|
|
38
39
|
|
|
39
40
|
OrganizationTypeT = TypeVar("OrganizationTypeT", bound=OrganizationType)
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
OptOrganizationType = OrganizationType | None
|
|
42
|
+
OptOrganizationTypeT = TypeVar("OptOrganizationTypeT", bound=OptOrganizationType)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class SimpleOrganizationTypeMixin(BaseModel, Generic[OptOrganizationTypeT]):
|
|
46
|
+
type: Annotated[OptOrganizationTypeT, Field(..., description="Organization Type")]
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class FullOrganizationTypeMixin(BaseModel, Generic[OptOrganizationTypeT]):
|
|
50
|
+
organization_type: Annotated[
|
|
51
|
+
OptOrganizationTypeT, Field(..., description="Organization Type")
|
|
52
|
+
]
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
ListOfOrganizationTypes = list[OrganizationType]
|
|
45
56
|
ListOfOrganizationTypesT = TypeVar(
|
|
46
57
|
"ListOfOrganizationTypesT", bound=ListOfOrganizationTypes
|
|
47
58
|
)
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"
|
|
59
|
+
OptListOfOrganizationTypes = ListOfOrganizationTypes | None
|
|
60
|
+
OptListOfOrganizationTypesT = TypeVar(
|
|
61
|
+
"OptListOfOrganizationTypesT", bound=OptListOfOrganizationTypes
|
|
51
62
|
)
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
class SimpleOrganizationTypesMixin(BaseModel, Generic[OptListOfOrganizationTypesT]):
|
|
66
|
+
types: Annotated[
|
|
67
|
+
OptListOfOrganizationTypesT, Field(..., description="Organization Types")
|
|
68
|
+
]
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
class FullOrganizationTypesMixin(BaseModel, Generic[OptListOfOrganizationTypesT]):
|
|
72
|
+
organization_types: Annotated[
|
|
73
|
+
OptListOfOrganizationTypesT, Field(..., description="Organization Types")
|
|
74
|
+
]
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
SeqOfOrganizationTypes = Sequence[OrganizationType]
|
|
78
|
+
SeqOfOrganizationTypesT = TypeVar(
|
|
79
|
+
"SeqOfOrganizationTypesT", bound=SeqOfOrganizationTypes
|
|
55
80
|
)
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
"
|
|
81
|
+
OptSeqOfOrganizationTypes = SeqOfOrganizationTypes | None
|
|
82
|
+
OptSeqOfOrganizationTypesT = TypeVar(
|
|
83
|
+
"OptSeqOfOrganizationTypesT", bound=OptSeqOfOrganizationTypes
|
|
59
84
|
)
|
|
60
85
|
|
|
61
86
|
|
|
62
|
-
class
|
|
87
|
+
class OrganizationRelation(StrEnum):
|
|
63
88
|
AFFILIATE = "affiliate"
|
|
64
89
|
APPLICATION = "application"
|
|
65
90
|
BRANCH = "branch"
|
|
@@ -73,47 +98,119 @@ class Relation(StrEnum):
|
|
|
73
98
|
VENDOR = "vendor"
|
|
74
99
|
|
|
75
100
|
@classmethod
|
|
76
|
-
def choices(cls) ->
|
|
101
|
+
def choices(cls) -> ListOfStrs:
|
|
77
102
|
return [e.value for e in cls]
|
|
78
103
|
|
|
79
104
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
ListOfRelationsT = TypeVar("ListOfRelationsT", bound=ListOfRelations)
|
|
85
|
-
OptionalListOfRelations = Optional[ListOfRelations]
|
|
86
|
-
OptionalListOfRelationsT = TypeVar(
|
|
87
|
-
"OptionalListOfRelationsT", bound=OptionalListOfRelations
|
|
105
|
+
OrganizationRelationT = TypeVar("OrganizationRelationT", bound=OrganizationRelation)
|
|
106
|
+
OptOrganizationRelation = OrganizationRelation | None
|
|
107
|
+
OptOrganizationRelationT = TypeVar(
|
|
108
|
+
"OptOrganizationRelationT", bound=OptOrganizationRelation
|
|
88
109
|
)
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
class SimpleOrganizationRelationMixin(BaseModel, Generic[OptOrganizationRelationT]):
|
|
113
|
+
relation: Annotated[
|
|
114
|
+
OptOrganizationRelationT, Field(..., description="Organization Relation")
|
|
115
|
+
]
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
class FullOrganizationRelationMixin(BaseModel, Generic[OptOrganizationRelationT]):
|
|
119
|
+
organization_relation: Annotated[
|
|
120
|
+
OptOrganizationRelationT, Field(..., description="Organization Relation")
|
|
121
|
+
]
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
ListOfOrganizationRelations = list[OrganizationRelation]
|
|
125
|
+
ListOfOrganizationRelationsT = TypeVar(
|
|
126
|
+
"ListOfOrganizationRelationsT", bound=ListOfOrganizationRelations
|
|
127
|
+
)
|
|
128
|
+
OptListOfOrganizationRelations = ListOfOrganizationRelations | None
|
|
129
|
+
OptListOfOrganizationRelationsT = TypeVar(
|
|
130
|
+
"OptListOfOrganizationRelationsT", bound=OptListOfOrganizationRelations
|
|
94
131
|
)
|
|
95
132
|
|
|
96
133
|
|
|
97
|
-
class
|
|
134
|
+
class SimpleOrganizationRelationsMixin(
|
|
135
|
+
BaseModel, Generic[OptListOfOrganizationRelationsT]
|
|
136
|
+
):
|
|
137
|
+
relations: Annotated[
|
|
138
|
+
OptListOfOrganizationRelationsT,
|
|
139
|
+
Field(..., description="Organization Relations"),
|
|
140
|
+
]
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
class FullOrganizationRelationsMixin(
|
|
144
|
+
BaseModel, Generic[OptListOfOrganizationRelationsT]
|
|
145
|
+
):
|
|
146
|
+
organization_relations: Annotated[
|
|
147
|
+
OptListOfOrganizationRelationsT,
|
|
148
|
+
Field(..., description="Organization Relations"),
|
|
149
|
+
]
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
SeqOfOrganizationRelations = Sequence[OrganizationRelation]
|
|
153
|
+
SeqOfOrganizationRelationsT = TypeVar(
|
|
154
|
+
"SeqOfOrganizationRelationsT", bound=SeqOfOrganizationRelations
|
|
155
|
+
)
|
|
156
|
+
OptSeqOfOrganizationRelations = SeqOfOrganizationRelations | None
|
|
157
|
+
OptSeqOfOrganizationRelationsT = TypeVar(
|
|
158
|
+
"OptSeqOfOrganizationRelationsT", bound=OptSeqOfOrganizationRelations
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
class OrganizationRole(StrEnum):
|
|
98
163
|
OWNER = "owner"
|
|
99
164
|
ADMINISTRATOR = "administrator"
|
|
100
165
|
USER = "user"
|
|
101
166
|
|
|
102
167
|
@classmethod
|
|
103
|
-
def choices(cls) ->
|
|
168
|
+
def choices(cls) -> ListOfStrs:
|
|
104
169
|
return [e.value for e in cls]
|
|
105
170
|
|
|
106
171
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
172
|
+
OrganizationRoleT = TypeVar("OrganizationRoleT", bound=OrganizationRole)
|
|
173
|
+
OptOrganizationRole = OrganizationRole | None
|
|
174
|
+
OptOrganizationRoleT = TypeVar("OptOrganizationRoleT", bound=OptOrganizationRole)
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
class SimpleOrganizationRoleMixin(BaseModel, Generic[OptOrganizationRoleT]):
|
|
178
|
+
role: Annotated[OptOrganizationRoleT, Field(..., description="Organization Role")]
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
class FullOrganizationRoleMixin(BaseModel, Generic[OptOrganizationRoleT]):
|
|
182
|
+
organization_role: Annotated[
|
|
183
|
+
OptOrganizationRoleT, Field(..., description="Organization Role")
|
|
184
|
+
]
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
ListOfOrganizationRoles = list[OrganizationRole]
|
|
188
|
+
ListOfOrganizationRolesT = TypeVar(
|
|
189
|
+
"ListOfOrganizationRolesT", bound=ListOfOrganizationRoles
|
|
190
|
+
)
|
|
191
|
+
OptListOfOrganizationRoles = ListOfOrganizationRoles | None
|
|
192
|
+
OptListOfOrganizationRolesT = TypeVar(
|
|
193
|
+
"OptListOfOrganizationRolesT", bound=OptListOfOrganizationRoles
|
|
194
|
+
)
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
class SimpleOrganizationRolesMixin(BaseModel, Generic[OptListOfOrganizationRolesT]):
|
|
198
|
+
roles: Annotated[
|
|
199
|
+
OptListOfOrganizationRolesT, Field(..., description="Organization Roles")
|
|
200
|
+
]
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
class FullOrganizationRolesMixin(BaseModel, Generic[OptListOfOrganizationRolesT]):
|
|
204
|
+
organization_roles: Annotated[
|
|
205
|
+
OptListOfOrganizationRolesT, Field(..., description="Organization Roles")
|
|
206
|
+
]
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
SeqOfOrganizationRoles = Sequence[OrganizationRole]
|
|
210
|
+
SeqOfOrganizationRolesT = TypeVar(
|
|
211
|
+
"SeqOfOrganizationRolesT", bound=SeqOfOrganizationRoles
|
|
212
|
+
)
|
|
213
|
+
OptSeqOfOrganizationRoles = SeqOfOrganizationRoles | None
|
|
214
|
+
OptSeqOfOrganizationRolesT = TypeVar(
|
|
215
|
+
"OptSeqOfOrganizationRolesT", bound=OptSeqOfOrganizationRoles
|
|
119
216
|
)
|