maleo-enums 0.0.26__py3-none-any.whl → 0.0.28__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.
@@ -1,5 +1,5 @@
1
1
  from enum import StrEnum
2
- from typing import List, Optional, Sequence
2
+ from typing import List, Optional, Sequence, TypeVar
3
3
  from maleo.types.string import ListOfStrings
4
4
 
5
5
 
@@ -12,11 +12,23 @@ class Cardinality(StrEnum):
12
12
  return [e.value for e in cls]
13
13
 
14
14
 
15
+ CardinalityT = TypeVar("CardinalityT", bound=Cardinality)
15
16
  OptionalCardinality = Optional[Cardinality]
17
+ OptionalCardinalityT = TypeVar("OptionalCardinalityT", bound=OptionalCardinality)
16
18
  ListOfCardinalities = List[Cardinality]
19
+ ListOfCardinalitiesT = TypeVar("ListOfCardinalitiesT", bound=ListOfCardinalities)
17
20
  OptionalListOfCardinalities = Optional[ListOfCardinalities]
21
+ OptionalListOfCardinalitiesT = TypeVar(
22
+ "OptionalListOfCardinalitiesT", bound=OptionalListOfCardinalities
23
+ )
18
24
  SequenceOfCardinalities = Sequence[Cardinality]
25
+ SequenceOfCardinalitiesT = TypeVar(
26
+ "SequenceOfCardinalitiesT", bound=SequenceOfCardinalities
27
+ )
19
28
  OptionalSequenceOfCardinalities = Optional[SequenceOfCardinalities]
29
+ OptionalSequenceOfCardinalitiesT = TypeVar(
30
+ "OptionalSequenceOfCardinalitiesT", bound=OptionalSequenceOfCardinalities
31
+ )
20
32
 
21
33
 
22
34
  class Relationship(StrEnum):
@@ -46,8 +58,20 @@ class Relationship(StrEnum):
46
58
  return [e.value for e in cls]
47
59
 
48
60
 
61
+ RelationshipT = TypeVar("RelationshipT", bound=Relationship)
49
62
  OptionalRelationship = Optional[Relationship]
63
+ OptionalRelationshipT = TypeVar("OptionalRelationshipT", bound=OptionalRelationship)
50
64
  ListOfRelationships = List[Relationship]
65
+ ListOfRelationshipsT = TypeVar("ListOfRelationshipsT", bound=ListOfRelationships)
51
66
  OptionalListOfRelationships = Optional[ListOfRelationships]
67
+ OptionalListOfRelationshipsT = TypeVar(
68
+ "OptionalListOfRelationshipsT", bound=OptionalListOfRelationships
69
+ )
52
70
  SequenceOfRelationships = Sequence[Relationship]
71
+ SequenceOfRelationshipsT = TypeVar(
72
+ "SequenceOfRelationshipsT", bound=SequenceOfRelationships
73
+ )
53
74
  OptionalSequenceOfRelationships = Optional[SequenceOfRelationships]
75
+ OptionalSequenceOfRelationshipsT = TypeVar(
76
+ "OptionalSequenceOfRelationshipsT", bound=OptionalSequenceOfRelationships
77
+ )
maleo/enums/connection.py CHANGED
@@ -18,9 +18,15 @@ SchemeT = TypeVar("SchemeT", bound=Scheme)
18
18
  OptionalScheme = Optional[Scheme]
19
19
  OptionalSchemeT = TypeVar("OptionalSchemeT", bound=OptionalScheme)
20
20
  ListOfSchemes = List[Scheme]
21
+ ListOfSchemesT = TypeVar("ListOfSchemesT", bound=ListOfSchemes)
21
22
  OptionalListOfSchemes = Optional[ListOfSchemes]
23
+ OptionalListOfSchemesT = TypeVar("OptionalListOfSchemesT", bound=OptionalListOfSchemes)
22
24
  SequenceOfSchemes = Sequence[Scheme]
25
+ SequenceOfSchemesT = TypeVar("SequenceOfSchemesT", bound=SequenceOfSchemes)
23
26
  OptionalSequenceOfSchemes = Optional[SequenceOfSchemes]
27
+ OptionalSequenceOfSchemesT = TypeVar(
28
+ "OptionalSequenceOfSchemesT", bound=OptionalSequenceOfSchemes
29
+ )
24
30
 
25
31
 
26
32
  class Protocol(StrEnum):
@@ -64,9 +70,15 @@ MethodT = TypeVar("MethodT", bound=Method)
64
70
  OptionalMethod = Optional[Method]
65
71
  OptionalMethodT = TypeVar("OptionalMethodT", bound=OptionalMethod)
66
72
  ListOfMethods = List[Method]
73
+ ListOfMethodsT = TypeVar("ListOfMethodsT", bound=ListOfMethods)
67
74
  OptionalListOfMethods = Optional[ListOfMethods]
75
+ OptionalListOfMethodsT = TypeVar("OptionalListOfMethodsT", bound=OptionalListOfMethods)
68
76
  SequenceOfMethods = Sequence[Method]
77
+ SequenceOfMethodsT = TypeVar("SequenceOfMethodsT", bound=SequenceOfMethods)
69
78
  OptionalSequenceOfMethods = Optional[SequenceOfMethods]
79
+ OptionalSequenceOfMethodsT = TypeVar(
80
+ "OptionalSequenceOfMethodsT", bound=OptionalSequenceOfMethods
81
+ )
70
82
 
71
83
 
72
84
  class Header(StrEnum):
@@ -161,6 +173,12 @@ HeaderT = TypeVar("HeaderT", bound=Header)
161
173
  OptionalHeader = Optional[Header]
162
174
  OptionalHeaderT = TypeVar("OptionalHeaderT", bound=OptionalHeader)
163
175
  ListOfHeaders = List[Header]
176
+ ListOfHeadersT = TypeVar("ListOfHeadersT", bound=ListOfHeaders)
164
177
  OptionalListOfHeaders = Optional[ListOfHeaders]
178
+ OptionalListOfHeadersT = TypeVar("OptionalListOfHeadersT", bound=OptionalListOfHeaders)
165
179
  SequenceOfHeaders = Sequence[Header]
180
+ SequenceOfHeadersT = TypeVar("SequenceOfHeadersT", bound=SequenceOfHeaders)
166
181
  OptionalSequenceOfHeaders = Optional[SequenceOfHeaders]
182
+ OptionalSequenceOfHeadersT = TypeVar(
183
+ "OptionalSequenceOfHeadersT", bound=OptionalSequenceOfHeaders
184
+ )
@@ -1,5 +1,5 @@
1
1
  from enum import StrEnum
2
- from typing import List, Optional, Sequence
2
+ from typing import List, Optional, Sequence, TypeVar
3
3
  from maleo.types.string import ListOfStrings
4
4
 
5
5
 
@@ -13,8 +13,20 @@ class Environment(StrEnum):
13
13
  return [e.value for e in cls]
14
14
 
15
15
 
16
+ EnvironmentT = TypeVar("EnvironmentT", bound=Environment)
16
17
  OptionalEnvironment = Optional[Environment]
18
+ OptionalEnvironmentT = TypeVar("OptionalEnvironmentT", bound=OptionalEnvironment)
17
19
  ListOfEnvironments = List[Environment]
20
+ ListOfEnvironmentsT = TypeVar("ListOfEnvironmentsT", bound=ListOfEnvironments)
18
21
  OptionalListOfEnvironments = Optional[ListOfEnvironments]
22
+ OptionalListOfEnvironmentsT = TypeVar(
23
+ "OptionalListOfEnvironmentsT", bound=OptionalListOfEnvironments
24
+ )
19
25
  SequenceOfEnvironments = Sequence[Environment]
26
+ SequenceOfEnvironmentsT = TypeVar(
27
+ "SequenceOfEnvironmentsT", bound=SequenceOfEnvironments
28
+ )
20
29
  OptionalSequenceOfEnvironments = Optional[SequenceOfEnvironments]
30
+ OptionalSequenceOfEnvironmentsT = TypeVar(
31
+ "OptionalSequenceOfEnvironmentsT", bound=OptionalSequenceOfEnvironments
32
+ )
maleo/enums/expiration.py CHANGED
@@ -1,5 +1,5 @@
1
1
  from enum import IntEnum
2
- from typing import List, Optional, Sequence
2
+ from typing import List, Optional, Sequence, TypeVar
3
3
  from maleo.types.integer import ListOfIntegers
4
4
 
5
5
 
@@ -25,8 +25,18 @@ class Expiration(IntEnum):
25
25
  return [e.value for e in cls]
26
26
 
27
27
 
28
+ ExpirationT = TypeVar("ExpirationT", bound=Expiration)
28
29
  OptionalExpiration = Optional[Expiration]
30
+ OptionalExpirationT = TypeVar("OptionalExpirationT", bound=OptionalExpiration)
29
31
  ListOfExpirations = List[Expiration]
32
+ ListOfExpirationsT = TypeVar("ListOfExpirationsT", bound=ListOfExpirations)
30
33
  OptionalListOfExpirations = Optional[ListOfExpirations]
34
+ OptionalListOfExpirationsT = TypeVar(
35
+ "OptionalListOfExpirationsT", bound=OptionalListOfExpirations
36
+ )
31
37
  SequenceOfExpirations = Sequence[Expiration]
38
+ SequenceOfExpirationsT = TypeVar("SequenceOfExpirationsT", bound=SequenceOfExpirations)
32
39
  OptionalSequenceOfExpirations = Optional[SequenceOfExpirations]
40
+ OptionalSequenceOfExpirationsT = TypeVar(
41
+ "OptionalSequenceOfExpirationsT", bound=OptionalSequenceOfExpirations
42
+ )
@@ -0,0 +1,56 @@
1
+ from enum import StrEnum
2
+ from typing import List, Optional, Sequence, TypeVar
3
+ from maleo.types.string import ListOfStrings
4
+
5
+
6
+ class BloodType(StrEnum):
7
+ A = "a"
8
+ B = "b"
9
+ AB = "ab"
10
+ O = "o" # noqa: E741
11
+
12
+ @classmethod
13
+ def choices(cls) -> ListOfStrings:
14
+ return [e.value for e in cls]
15
+
16
+
17
+ BloodTypeT = TypeVar("BloodTypeT", bound=BloodType)
18
+ OptionalBloodType = Optional[BloodType]
19
+ OptionalBloodTypeT = TypeVar("OptionalBloodTypeT", bound=OptionalBloodType)
20
+ ListOfBloodTypes = List[BloodType]
21
+ ListOfBloodTypesT = TypeVar("ListOfBloodTypesT", bound=ListOfBloodTypes)
22
+ OptionalListOfBloodTypes = Optional[ListOfBloodTypes]
23
+ OptionalListOfBloodTypesT = TypeVar(
24
+ "OptionalListOfBloodTypesT", bound=OptionalListOfBloodTypes
25
+ )
26
+ SequenceOfBloodTypes = Sequence[BloodType]
27
+ SequenceOfBloodTypesT = TypeVar("SequenceOfBloodTypesT", bound=SequenceOfBloodTypes)
28
+ OptionalSequenceOfBloodTypes = Optional[SequenceOfBloodTypes]
29
+ OptionalSequenceOfBloodTypesT = TypeVar(
30
+ "OptionalSequenceOfBloodTypesT", bound=OptionalSequenceOfBloodTypes
31
+ )
32
+
33
+
34
+ class Gender(StrEnum):
35
+ UNDISCLOSED = "undisclosed"
36
+ FEMALE = "female"
37
+ MALE = "male"
38
+
39
+ @classmethod
40
+ def choices(cls) -> ListOfStrings:
41
+ return [e.value for e in cls]
42
+
43
+
44
+ GenderT = TypeVar("GenderT", bound=Gender)
45
+ OptionalGender = Optional[Gender]
46
+ OptionalGenderT = TypeVar("OptionalGenderT", bound=OptionalGender)
47
+ ListOfGenders = List[Gender]
48
+ ListOfGendersT = TypeVar("ListOfGendersT", bound=ListOfGenders)
49
+ OptionalListOfGenders = Optional[ListOfGenders]
50
+ OptionalListOfGendersT = TypeVar("OptionalListOfGendersT", bound=OptionalListOfGenders)
51
+ SequenceOfGenders = Sequence[Gender]
52
+ SequenceOfGendersT = TypeVar("SequenceOfGendersT", bound=SequenceOfGenders)
53
+ OptionalSequenceOfGenders = Optional[SequenceOfGenders]
54
+ OptionalSequenceOfGendersT = TypeVar(
55
+ "OptionalSequenceOfGendersT", bound=OptionalSequenceOfGenders
56
+ )
maleo/enums/medical.py ADDED
@@ -0,0 +1,119 @@
1
+ from enum import StrEnum
2
+ from typing import List, Optional, Sequence, TypeVar
3
+ from maleo.types.string import ListOfStrings
4
+
5
+
6
+ class Role(StrEnum):
7
+ # Level 1: Director category
8
+ DIRECTOR = "director"
9
+ PRESIDENT = "president"
10
+ VICE_PRESIDENT = "vice_president"
11
+ SECRETARY = "secretary"
12
+ TREASURER = "treasurer"
13
+ # Level 1: Management category
14
+ HEAD = "head"
15
+ CEO = "ceo"
16
+ COO = "coo"
17
+ CFO = "cfo"
18
+ CCO = "cco"
19
+ # Level 1: Administration category
20
+ ADMINISTRATOR = "administrator"
21
+ ADMISSION = "admission"
22
+ CASHIER = "cashier"
23
+ CASEMIX = "casemix"
24
+ MEDICAL_RECORD = "medical_record"
25
+ # Level 1: Medical category
26
+ DOCTOR = "doctor"
27
+ NURSE = "nurse"
28
+ MIDWIFE = "midwife"
29
+ # Level 2: Doctor's specialization
30
+ INTERNIST = "internist"
31
+ PEDIATRICIAN = "pediatrician"
32
+ OBSTETRICIAN = "obstetrician"
33
+ GYNECOLOGIST = "gynecologist"
34
+ OBGYN = "obgyn"
35
+ PSYCHIATRIST = "psychiatrist"
36
+ DERMATOLOGIST = "dermatologist"
37
+ NEUROLOGIST = "neurologist"
38
+ CARDIOLOGIST = "cardiologist"
39
+ OPHTHALMOLOGIST = "ophthalmologist"
40
+ RADIOLOGIST = "radiologist"
41
+ ANESTHESIOLOGIST = "anesthesiologist"
42
+ HEMATOLOGIST = "hematologist"
43
+ ENDOCRINOLOGIST = "endocrinologist"
44
+ GASTROENTEROLOGIST = "gastroenterologist"
45
+ NEPHROLOGIST = "nephrologist"
46
+ UROLOGIST = "urologist"
47
+ PULMONOLOGIST = "pulmonologist"
48
+ RHEUMATOLOGIST = "rheumatologist"
49
+ SURGEON = "surgeon"
50
+ # Level 3: Surgeon's specialization
51
+ ORTHOPEDIC_SURGEON = "orthopedic_surgeon"
52
+ # Level 2: Nurse's specialization
53
+ SCRUB_NURSE = "scrub_nurse"
54
+ TRIAGE_NURSE = "triage_nurse"
55
+ ICU_NURSE = "icu_nurse"
56
+ NICU_NURSE = "nicu_nurse"
57
+ OR_NURSE = "or_nurse"
58
+ ER_NURSE = "er_nurse"
59
+ # Level 1: Technical category
60
+ TECHNICIAN = "technician"
61
+ LABORATORY_TECHNICIAN = "laboratory_technician"
62
+ RADIOGRAPHER = "radiographer"
63
+ SONOGRAPHER = "sonographer"
64
+ # Level 1: Therapeutic category
65
+ THERAPIST = "therapist"
66
+ PHYSIOTHERAPIST = "physiotherapist"
67
+ OCCUPATIONAL_THERAPIST = "occupational_therapist"
68
+ SPEECH_THERAPIST = "speech_therapist"
69
+ PSYCHOLOGIST = "psychologist"
70
+ # Level 1: Support category
71
+ PHARMACIST = "pharmacist"
72
+ NUTRITIONIST = "nutritionist"
73
+
74
+ @classmethod
75
+ def choices(cls) -> ListOfStrings:
76
+ return [e.value for e in cls]
77
+
78
+
79
+ RoleT = TypeVar("RoleT", bound=Role)
80
+ OptionalRole = Optional[Role]
81
+ OptionalRoleT = TypeVar("OptionalRoleT", bound=OptionalRole)
82
+ ListOfRoles = List[Role]
83
+ ListOfRolesT = TypeVar("ListOfRolesT", bound=ListOfRoles)
84
+ OptionalListOfRoles = Optional[ListOfRoles]
85
+ OptionalListOfRolesT = TypeVar("OptionalListOfRolesT", bound=OptionalListOfRoles)
86
+ SequenceOfRoles = Sequence[Role]
87
+ SequenceOfRolesT = TypeVar("SequenceOfRolesT", bound=SequenceOfRoles)
88
+ OptionalSequenceOfRoles = Optional[SequenceOfRoles]
89
+ OptionalSequenceOfRolesT = TypeVar(
90
+ "OptionalSequenceOfRolesT", bound=OptionalSequenceOfRoles
91
+ )
92
+
93
+
94
+ class Service(StrEnum):
95
+ EMERGENCY = "emergency"
96
+ INPATIENT = "inpatient"
97
+ INTENSIVE = "intensive"
98
+ OUTPATIENT = "outpatient"
99
+
100
+ @classmethod
101
+ def choices(cls) -> ListOfStrings:
102
+ return [e.value for e in cls]
103
+
104
+
105
+ ServiceT = TypeVar("ServiceT", bound=Service)
106
+ OptionalService = Optional[Service]
107
+ OptionalServiceT = TypeVar("OptionalServiceT", bound=OptionalService)
108
+ ListOfServices = List[Service]
109
+ ListOfServicesT = TypeVar("ListOfServicesT", bound=ListOfServices)
110
+ OptionalListOfServices = Optional[ListOfServices]
111
+ OptionalListOfServicesT = TypeVar(
112
+ "OptionalListOfServicesT", bound=OptionalListOfServices
113
+ )
114
+ SequenceOfServices = Sequence[Service]
115
+ SequenceOfServicesT = TypeVar("SequenceOfServicesT", bound=SequenceOfServices)
116
+ OptionalSequenceOfServices = Optional[SequenceOfServices]
117
+ OptionalSequenceOfServicesT = TypeVar(
118
+ "OptionalSequenceOfServicesT", bound=OptionalSequenceOfServices
119
+ )
maleo/enums/order.py CHANGED
@@ -1,5 +1,5 @@
1
1
  from enum import StrEnum
2
- from typing import List, Optional, Sequence
2
+ from typing import List, Optional, Sequence, TypeVar
3
3
  from maleo.types.string import ListOfStrings
4
4
 
5
5
 
@@ -12,8 +12,16 @@ class Order(StrEnum):
12
12
  return [e.value for e in cls]
13
13
 
14
14
 
15
+ OrderT = TypeVar("OrderT", bound=Order)
15
16
  OptionalOrder = Optional[Order]
17
+ OptionalOrderT = TypeVar("OptionalOrderT", bound=OptionalOrder)
16
18
  ListOfOrders = List[Order]
19
+ ListOfOrdersT = TypeVar("ListOfOrdersT", bound=ListOfOrders)
17
20
  OptionalListOfOrders = Optional[ListOfOrders]
21
+ OptionalListOfOrdersT = TypeVar("OptionalListOfOrdersT", bound=OptionalListOfOrders)
18
22
  SequenceOfOrders = Sequence[Order]
23
+ SequenceOfOrdersT = TypeVar("SequenceOfOrdersT", bound=SequenceOfOrders)
19
24
  OptionalSequenceOfOrders = Optional[SequenceOfOrders]
25
+ OptionalSequenceOfOrdersT = TypeVar(
26
+ "OptionalSequenceOfOrdersT", bound=OptionalSequenceOfOrders
27
+ )
@@ -0,0 +1,119 @@
1
+ from enum import StrEnum
2
+ from typing import List, Optional, Sequence, TypeVar
3
+ from maleo.types.string import ListOfStrings
4
+
5
+
6
+ class OrganizationType(StrEnum):
7
+ APPLICATION = "application"
8
+ BRANCH = "branch"
9
+ CLIENT = "client"
10
+ CLINIC = "clinic"
11
+ CORPORATION = "corporation"
12
+ DEPARTMENT = "department"
13
+ DIVISION = "division"
14
+ GOVERNMENT = "government"
15
+ HOSPITAL_SYSTEM = "hospital_system"
16
+ HOSPITAL = "hospital"
17
+ INSURANCE_PROVIDER = "insurance_provider"
18
+ INTERNAL = "internal"
19
+ LABORATORY = "laboratory"
20
+ MEDICAL_GROUP = "medical_group"
21
+ NETWORK = "network"
22
+ PARTNER = "partner"
23
+ PHARMACY = "pharmacy"
24
+ PRIMARY_HEALTH_CARE = "primary_health_care"
25
+ PUBLIC_HEALTH_AGENCY = "public_health_agency"
26
+ REGIONAL_OFFICE = "regional_office"
27
+ REGULAR = "regular"
28
+ RESEARCH_INSTITUTE = "research_institute"
29
+ SUBSIDIARY = "subsidiary"
30
+ THIRD_PARTY_ADMINISTRATOR = "third_party_administrator"
31
+ UNIT = "unit"
32
+ VENDOR = "vendor"
33
+
34
+ @classmethod
35
+ def choices(cls) -> ListOfStrings:
36
+ return [e.value for e in cls]
37
+
38
+
39
+ OrganizationTypeT = TypeVar("OrganizationTypeT", bound=OrganizationType)
40
+ OptionalOrganizationType = Optional[OrganizationType]
41
+ OptionalOrganizationTypeT = TypeVar(
42
+ "OptionalOrganizationTypeT", bound=OptionalOrganizationType
43
+ )
44
+ ListOfOrganizationTypes = List[OrganizationType]
45
+ ListOfOrganizationTypesT = TypeVar(
46
+ "ListOfOrganizationTypesT", bound=ListOfOrganizationTypes
47
+ )
48
+ OptionalListOfOrganizationTypes = Optional[ListOfOrganizationTypes]
49
+ OptionalListOfOrganizationTypesT = TypeVar(
50
+ "OptionalListOfOrganizationTypesT", bound=OptionalListOfOrganizationTypes
51
+ )
52
+ SequenceOfOrganizationTypes = Sequence[OrganizationType]
53
+ SequenceOfOrganizationTypesT = TypeVar(
54
+ "SequenceOfOrganizationTypesT", bound=SequenceOfOrganizationTypes
55
+ )
56
+ OptionalSequenceOfOrganizationTypes = Optional[SequenceOfOrganizationTypes]
57
+ OptionalSequenceOfOrganizationTypesT = TypeVar(
58
+ "OptionalSequenceOfOrganizationTypesT", bound=OptionalSequenceOfOrganizationTypes
59
+ )
60
+
61
+
62
+ class Relation(StrEnum):
63
+ AFFILIATE = "affiliate"
64
+ APPLICATION = "application"
65
+ BRANCH = "branch"
66
+ CLIENT = "client"
67
+ DEPARTMENT = "department"
68
+ DIVISION = "division"
69
+ NETWORK_MEMBER = "network_member"
70
+ PARENT = "parent"
71
+ PARTNER = "partner"
72
+ SUBSIDIARY = "subsidiary"
73
+ VENDOR = "vendor"
74
+
75
+ @classmethod
76
+ def choices(cls) -> ListOfStrings:
77
+ return [e.value for e in cls]
78
+
79
+
80
+ RelationT = TypeVar("RelationT", bound=Relation)
81
+ OptionalRelation = Optional[Relation]
82
+ OptionalRelationT = TypeVar("OptionalRelationT", bound=OptionalRelation)
83
+ ListOfRelations = List[Relation]
84
+ ListOfRelationsT = TypeVar("ListOfRelationsT", bound=ListOfRelations)
85
+ OptionalListOfRelations = Optional[ListOfRelations]
86
+ OptionalListOfRelationsT = TypeVar(
87
+ "OptionalListOfRelationsT", bound=OptionalListOfRelations
88
+ )
89
+ SequenceOfRelations = Sequence[Relation]
90
+ SequenceOfRelationsT = TypeVar("SequenceOfRelationsT", bound=SequenceOfRelations)
91
+ OptionalSequenceOfRelations = Optional[SequenceOfRelations]
92
+ OptionalSequenceOfRelationsT = TypeVar(
93
+ "OptionalSequenceOfRelationsT", bound=OptionalSequenceOfRelations
94
+ )
95
+
96
+
97
+ class Role(StrEnum):
98
+ OWNER = "owner"
99
+ ADMINISTRATOR = "administrator"
100
+ USER = "user"
101
+
102
+ @classmethod
103
+ def choices(cls) -> ListOfStrings:
104
+ return [e.value for e in cls]
105
+
106
+
107
+ RoleT = TypeVar("RoleT", bound=Role)
108
+ OptionalRole = Optional[Role]
109
+ OptionalRoleT = TypeVar("OptionalRoleT", bound=OptionalRole)
110
+ ListOfRoles = List[Role]
111
+ ListOfRolesT = TypeVar("ListOfRolesT", bound=ListOfRoles)
112
+ OptionalListOfRoles = Optional[ListOfRoles]
113
+ OptionalListOfRolesT = TypeVar("OptionalListOfRolesT", bound=OptionalListOfRoles)
114
+ SequenceOfRoles = Sequence[Role]
115
+ SequenceOfRolesT = TypeVar("SequenceOfRolesT", bound=SequenceOfRoles)
116
+ OptionalSequenceOfRoles = Optional[SequenceOfRoles]
117
+ OptionalSequenceOfRolesT = TypeVar(
118
+ "OptionalSequenceOfRolesT", bound=OptionalSequenceOfRoles
119
+ )
maleo/enums/service.py CHANGED
@@ -1,5 +1,5 @@
1
1
  from enum import StrEnum
2
- from typing import List, Optional, Sequence
2
+ from typing import List, Optional, Sequence, TypeVar
3
3
  from maleo.types.string import ListOfStrings
4
4
 
5
5
 
@@ -12,11 +12,23 @@ class ServiceType(StrEnum):
12
12
  return [e.value for e in cls]
13
13
 
14
14
 
15
+ ServiceTypeT = TypeVar("ServiceTypeT", bound=ServiceType)
15
16
  OptionalServiceType = Optional[ServiceType]
17
+ OptionalServiceTypeT = TypeVar("OptionalServiceTypeT", bound=OptionalServiceType)
16
18
  ListOfServiceTypes = List[ServiceType]
19
+ ListOfServiceTypesT = TypeVar("ListOfServiceTypesT", bound=ListOfServiceTypes)
17
20
  OptionalListOfServiceTypes = Optional[ListOfServiceTypes]
21
+ OptionalListOfServiceTypesT = TypeVar(
22
+ "OptionalListOfServiceTypesT", bound=OptionalListOfServiceTypes
23
+ )
18
24
  SequenceOfServiceTypes = Sequence[ServiceType]
25
+ SequenceOfServiceTypesT = TypeVar(
26
+ "SequenceOfServiceTypesT", bound=SequenceOfServiceTypes
27
+ )
19
28
  OptionalSequenceOfServiceTypes = Optional[SequenceOfServiceTypes]
29
+ OptionalSequenceOfServiceTypesT = TypeVar(
30
+ "OptionalSequenceOfServiceTypesT", bound=OptionalSequenceOfServiceTypes
31
+ )
20
32
 
21
33
 
22
34
  class Category(StrEnum):
@@ -28,14 +40,24 @@ class Category(StrEnum):
28
40
  return [e.value for e in cls]
29
41
 
30
42
 
43
+ CategoryT = TypeVar("CategoryT", bound=Category)
31
44
  OptionalCategory = Optional[Category]
45
+ OptionalCategoryT = TypeVar("OptionalCategoryT", bound=OptionalCategory)
32
46
  ListOfCategories = List[Category]
47
+ ListOfCategoriesT = TypeVar("ListOfCategoriesT", bound=ListOfCategories)
33
48
  OptionalListOfCategories = Optional[ListOfCategories]
49
+ OptionalListOfCategoriesT = TypeVar(
50
+ "OptionalListOfCategoriesT", bound=OptionalListOfCategories
51
+ )
34
52
  SequenceOfCategories = Sequence[Category]
53
+ SequenceOfCategoriesT = TypeVar("SequenceOfCategoriesT", bound=SequenceOfCategories)
35
54
  OptionalSequenceOfCategories = Optional[SequenceOfCategories]
55
+ OptionalSequenceOfCategoriesT = TypeVar(
56
+ "OptionalSequenceOfCategoriesT", bound=OptionalSequenceOfCategories
57
+ )
36
58
 
37
59
 
38
- class SimpleKey(StrEnum):
60
+ class ShortKey(StrEnum):
39
61
  STUDIO = "studio"
40
62
  NEXUS = "nexus"
41
63
  TELEMETRY = "telemetry"
@@ -44,6 +66,7 @@ class SimpleKey(StrEnum):
44
66
  ACCESS = "access"
45
67
  WORKSHOP = "workshop"
46
68
  RESEARCH = "research"
69
+ REGISTRY = "registry"
47
70
  SOAPIE = "soapie"
48
71
  MEDIX = "medix"
49
72
  DICOM = "dicom"
@@ -57,11 +80,21 @@ class SimpleKey(StrEnum):
57
80
  return [e.value for e in cls]
58
81
 
59
82
 
60
- OptionalSimpleKey = Optional[SimpleKey]
61
- ListOfSimpleKeys = List[SimpleKey]
62
- OptionalListOfSimpleKeys = Optional[ListOfSimpleKeys]
63
- SequenceOfSimpleKeys = Sequence[SimpleKey]
64
- OptionalSequenceOfSimpleKeys = Optional[SequenceOfSimpleKeys]
83
+ ShortKeyT = TypeVar("ShortKeyT", bound=ShortKey)
84
+ OptionalShortKey = Optional[ShortKey]
85
+ OptionalShortKeyT = TypeVar("OptionalShortKeyT", bound=OptionalShortKey)
86
+ ListOfShortKeys = List[ShortKey]
87
+ ListOfShortKeysT = TypeVar("ListOfShortKeysT", bound=ListOfShortKeys)
88
+ OptionalListOfShortKeys = Optional[ListOfShortKeys]
89
+ OptionalListOfShortKeysT = TypeVar(
90
+ "OptionalListOfShortKeysT", bound=OptionalListOfShortKeys
91
+ )
92
+ SequenceOfShortKeys = Sequence[ShortKey]
93
+ SequenceOfShortKeysT = TypeVar("SequenceOfShortKeysT", bound=SequenceOfShortKeys)
94
+ OptionalSequenceOfShortKeys = Optional[SequenceOfShortKeys]
95
+ OptionalSequenceOfShortKeysT = TypeVar(
96
+ "OptionalSequenceOfShortKeysT", bound=OptionalSequenceOfShortKeys
97
+ )
65
98
 
66
99
 
67
100
  class Key(StrEnum):
@@ -73,6 +106,7 @@ class Key(StrEnum):
73
106
  ACCESS = "maleo-access"
74
107
  WORKSHOP = "maleo-workshop"
75
108
  RESEARCH = "maleo-research"
109
+ REGISTRY = "maleo-registry"
76
110
  SOAPIE = "maleo-soapie"
77
111
  MEDIX = "maleo-medix"
78
112
  DICOM = "maleo-dicom"
@@ -86,14 +120,22 @@ class Key(StrEnum):
86
120
  return [e.value for e in cls]
87
121
 
88
122
 
123
+ KeyT = TypeVar("KeyT", bound=Key)
89
124
  OptionalKey = Optional[Key]
125
+ OptionalKeyT = TypeVar("OptionalKeyT", bound=OptionalKey)
90
126
  ListOfKeys = List[Key]
127
+ ListOfKeysT = TypeVar("ListOfKeysT", bound=ListOfKeys)
91
128
  OptionalListOfKeys = Optional[ListOfKeys]
129
+ OptionalListOfKeysT = TypeVar("OptionalListOfKeysT", bound=OptionalListOfKeys)
92
130
  SequenceOfKeys = Sequence[Key]
131
+ SequenceOfKeysT = TypeVar("SequenceOfKeysT", bound=SequenceOfKeys)
93
132
  OptionalSequenceOfKeys = Optional[SequenceOfKeys]
133
+ OptionalSequenceOfKeysT = TypeVar(
134
+ "OptionalSequenceOfKeysT", bound=OptionalSequenceOfKeys
135
+ )
94
136
 
95
137
 
96
- class SimpleName(StrEnum):
138
+ class ShortName(StrEnum):
97
139
  STUDIO = "Studio"
98
140
  NEXUS = "Nexus"
99
141
  TELEMETRY = "Telemetry"
@@ -102,6 +144,7 @@ class SimpleName(StrEnum):
102
144
  ACCESS = "Access"
103
145
  WORKSHOP = "Workshop"
104
146
  RESEARCH = "Research"
147
+ REGISTRY = "Registry"
105
148
  SOAPIE = "SOAPIE"
106
149
  MEDIX = "Medix"
107
150
  DICOM = "DICON"
@@ -115,11 +158,21 @@ class SimpleName(StrEnum):
115
158
  return [e.value for e in cls]
116
159
 
117
160
 
118
- OptionalSimpleName = Optional[SimpleName]
119
- ListOfSimpleNames = List[SimpleName]
120
- OptionalListOfSimpleNames = Optional[ListOfSimpleNames]
121
- SequenceOfSimpleNames = Sequence[SimpleName]
122
- OptionalSequenceOfSimpleNames = Optional[SequenceOfSimpleNames]
161
+ ShortNameT = TypeVar("ShortNameT", bound=ShortName)
162
+ OptionalShortName = Optional[ShortName]
163
+ OptionalShortNameT = TypeVar("OptionalShortNameT", bound=OptionalShortName)
164
+ ListOfShortNames = List[ShortName]
165
+ ListOfShortNamesT = TypeVar("ListOfShortNamesT", bound=ListOfShortNames)
166
+ OptionalListOfShortNames = Optional[ListOfShortNames]
167
+ OptionalListOfShortNamesT = TypeVar(
168
+ "OptionalListOfShortNamesT", bound=OptionalListOfShortNames
169
+ )
170
+ SequenceOfShortNames = Sequence[ShortName]
171
+ SequenceOfShortNamesT = TypeVar("SequenceOfShortNamesT", bound=SequenceOfShortNames)
172
+ OptionalSequenceOfShortNames = Optional[SequenceOfShortNames]
173
+ OptionalSequenceOfShortNamesT = TypeVar(
174
+ "OptionalSequenceOfShortNamesT", bound=OptionalSequenceOfShortNames
175
+ )
123
176
 
124
177
 
125
178
  class Name(StrEnum):
@@ -131,6 +184,7 @@ class Name(StrEnum):
131
184
  ACCESS = "MaleoAccess"
132
185
  WORKSHOP = "MaleoWorkshop"
133
186
  RESEARCH = "MaleoResearch"
187
+ REGISTRY = "MaleoRegistry"
134
188
  SOAPIE = "MaleoSOAPIE"
135
189
  MEDIX = "MaleoMedix"
136
190
  DICOM = "MaleoDICON"
@@ -144,8 +198,16 @@ class Name(StrEnum):
144
198
  return [e.value for e in cls]
145
199
 
146
200
 
201
+ NameT = TypeVar("NameT", bound=Name)
147
202
  OptionalName = Optional[Name]
203
+ OptionalNameT = TypeVar("OptionalNameT", bound=OptionalName)
148
204
  ListOfNames = List[Name]
205
+ ListOfNamesT = TypeVar("ListOfNamesT", bound=ListOfNames)
149
206
  OptionalListOfNames = Optional[ListOfNames]
207
+ OptionalListOfNamesT = TypeVar("OptionalListOfNamesT", bound=OptionalListOfNames)
150
208
  SequenceOfNames = Sequence[Name]
209
+ SequenceOfNamesT = TypeVar("SequenceOfNamesT", bound=SequenceOfNames)
151
210
  OptionalSequenceOfNames = Optional[SequenceOfNames]
211
+ OptionalSequenceOfNamesT = TypeVar(
212
+ "OptionalSequenceOfNamesT", bound=OptionalSequenceOfNames
213
+ )
maleo/enums/status.py CHANGED
@@ -1,5 +1,5 @@
1
1
  from enum import StrEnum
2
- from typing import List, Optional, Sequence
2
+ from typing import List, Optional, Sequence, TypeVar
3
3
  from maleo.types.string import ListOfStrings
4
4
 
5
5
 
@@ -13,11 +13,23 @@ class DataStatus(StrEnum):
13
13
  return [e.value for e in cls]
14
14
 
15
15
 
16
+ DataStatusT = TypeVar("DataStatusT", bound=DataStatus)
16
17
  OptionalDataStatus = Optional[DataStatus]
18
+ OptionalDataStatusT = TypeVar("OptionalDataStatusT", bound=OptionalDataStatus)
17
19
  ListOfDataStatuses = List[DataStatus]
20
+ ListOfDataStatusesT = TypeVar("ListOfDataStatusesT", bound=ListOfDataStatuses)
18
21
  OptionalListOfDataStatuses = Optional[ListOfDataStatuses]
22
+ OptionalListOfDataStatusesT = TypeVar(
23
+ "OptionalListOfDataStatusesT", bound=OptionalListOfDataStatuses
24
+ )
19
25
  SequenceOfDataStatuses = Sequence[DataStatus]
26
+ SequenceOfDataStatusesT = TypeVar(
27
+ "SequenceOfDataStatusesT", bound=SequenceOfDataStatuses
28
+ )
20
29
  OptionalSequenceOfDataStatuses = Optional[SequenceOfDataStatuses]
30
+ OptionalSequenceOfDataStatusesT = TypeVar(
31
+ "OptionalSequenceOfDataStatusesT", bound=OptionalSequenceOfDataStatuses
32
+ )
21
33
 
22
34
 
23
35
  FULL_DATA_STATUSES: SequenceOfDataStatuses = (
maleo/enums/system.py ADDED
@@ -0,0 +1,36 @@
1
+ from enum import StrEnum
2
+ from typing import List, Optional, Sequence, TypeVar
3
+ from maleo.types.string import ListOfStrings
4
+
5
+
6
+ class Role(StrEnum):
7
+ ADMINISTRATOR = "administrator"
8
+ ANALYST = "analyst"
9
+ ENGINEER = "engineer"
10
+ GUEST = "guest"
11
+ MANAGER = "manager"
12
+ OFFICER = "officer"
13
+ OPERATIONS = "operations"
14
+ SECURITY = "security"
15
+ SUPPORT = "support"
16
+ TESTER = "tester"
17
+ USER = "user"
18
+
19
+ @classmethod
20
+ def choices(cls) -> ListOfStrings:
21
+ return [e.value for e in cls]
22
+
23
+
24
+ RoleT = TypeVar("RoleT", bound=Role)
25
+ OptionalRole = Optional[Role]
26
+ OptionalRoleT = TypeVar("OptionalRoleT", bound=OptionalRole)
27
+ ListOfRoles = List[Role]
28
+ ListOfRolesT = TypeVar("ListOfRolesT", bound=ListOfRoles)
29
+ OptionalListOfRoles = Optional[ListOfRoles]
30
+ OptionalListOfRolesT = TypeVar("OptionalListOfRolesT", bound=OptionalListOfRoles)
31
+ SequenceOfRoles = Sequence[Role]
32
+ SequenceOfRolesT = TypeVar("SequenceOfRolesT", bound=SequenceOfRoles)
33
+ OptionalSequenceOfRoles = Optional[SequenceOfRoles]
34
+ OptionalSequenceOfRolesT = TypeVar(
35
+ "OptionalSequenceOfRolesT", bound=OptionalSequenceOfRoles
36
+ )
maleo/enums/user.py ADDED
@@ -0,0 +1,30 @@
1
+ from enum import StrEnum
2
+ from typing import List, Optional, Sequence, TypeVar
3
+ from maleo.types.string import ListOfStrings
4
+
5
+
6
+ class UserType(StrEnum):
7
+ PROXY = "proxy"
8
+ REGULAR = "regular"
9
+ SERVICE = "service"
10
+
11
+ @classmethod
12
+ def choices(cls) -> ListOfStrings:
13
+ return [e.value for e in cls]
14
+
15
+
16
+ UserTypeT = TypeVar("UserTypeT", bound=UserType)
17
+ OptionalUserType = Optional[UserType]
18
+ OptionalUserTypeT = TypeVar("OptionalUserTypeT", bound=OptionalUserType)
19
+ ListOfUserTypes = List[UserType]
20
+ ListOfUserTypesT = TypeVar("ListOfUserTypesT", bound=ListOfUserTypes)
21
+ OptionalListOfUserTypes = Optional[ListOfUserTypes]
22
+ OptionalListOfUserTypesT = TypeVar(
23
+ "OptionalListOfUserTypesT", bound=OptionalListOfUserTypes
24
+ )
25
+ SequenceOfUserTypes = Sequence[UserType]
26
+ SequenceOfUserTypesT = TypeVar("SequenceOfUserTypesT", bound=SequenceOfUserTypes)
27
+ OptionalSequenceOfUserTypes = Optional[SequenceOfUserTypes]
28
+ OptionalSequenceOfUserTypesT = TypeVar(
29
+ "OptionalSequenceOfUserTypesT", bound=OptionalSequenceOfUserTypes
30
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maleo-enums
3
- Version: 0.0.26
3
+ Version: 0.0.28
4
4
  Summary: Enums package for MaleoSuite
5
5
  Author-email: Agra Bima Yuda <agra@nexmedis.com>
6
6
  License: Proprietary
@@ -14,7 +14,7 @@ Requires-Dist: colorama>=0.4.6
14
14
  Requires-Dist: distlib>=0.4.0
15
15
  Requires-Dist: filelock>=3.19.1
16
16
  Requires-Dist: identify>=2.6.13
17
- Requires-Dist: maleo-types>=0.0.6
17
+ Requires-Dist: maleo-types>=0.0.8
18
18
  Requires-Dist: mypy_extensions>=1.1.0
19
19
  Requires-Dist: nodeenv>=1.9.1
20
20
  Requires-Dist: packaging>=25.0
@@ -0,0 +1,18 @@
1
+ maleo/enums/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ maleo/enums/cardinality.py,sha256=wppve9-XPamNkzHzdz6LrYc3yA2VDyAW903rR_XTrNc,2960
3
+ maleo/enums/connection.py,sha256=A-wY0Hs2_7P9gK1keW43qYXveN0T8rpxJehVK_Vh_sE,5795
4
+ maleo/enums/environment.py,sha256=ObcvUtEkLlFraqtK4Iio4i26s7oeEE2qEl5cS4OrEJw,1124
5
+ maleo/enums/expiration.py,sha256=axr_JcbQwtIVhREB8KlmhrF1HoN9NXtUryj2eGQMi90,1488
6
+ maleo/enums/identity.py,sha256=51SeXgfwc8nwjKxltdQReC3NBWxdf-QT_sQ-XH20f7E,1892
7
+ maleo/enums/medical.py,sha256=Rm37AjrwXcoJrQZBnv3t752nSk6twDVeUrDJA0jV_6g,3870
8
+ maleo/enums/order.py,sha256=gezF1U_9J4iNddL_v6a-ZL5EkuQOUJOioz80vARSoIc,898
9
+ maleo/enums/organization.py,sha256=H9-REufqLAZgtDRvmvWQW7FRTGu0LechZ1oQZ7F2Ggw,3955
10
+ maleo/enums/service.py,sha256=Gg1CH5nZvPgZFJuwJTTLiiKovVvNO0o3e8605bTW7ig,6700
11
+ maleo/enums/status.py,sha256=nu623nBlEMeVf-Dv5dyQVnqCqwCjZaYWckBFhxoFWdc,1333
12
+ maleo/enums/system.py,sha256=2sTdJyKjksqxJo1lpbQIrArD-ZC5xCkTGs5yi_Bps-k,1109
13
+ maleo/enums/user.py,sha256=BJb0axPyX_QxcC8g2_-8rLrPcfmoNUpxvpdxi5lFqwU,1025
14
+ maleo_enums-0.0.28.dist-info/licenses/LICENSE,sha256=aftGsecnk7TWVX-7KW94FqK4Syy6YSZ8PZEF7EcIp3M,2621
15
+ maleo_enums-0.0.28.dist-info/METADATA,sha256=vQiZYFhcFh8wGJpW7Kk8tECmtqDK4MwnqS0iflbm5ac,1345
16
+ maleo_enums-0.0.28.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
17
+ maleo_enums-0.0.28.dist-info/top_level.txt,sha256=3Tpd1siVsfYoeI9FEOJNYnffx_shzZ3wsPpTvz5bljc,6
18
+ maleo_enums-0.0.28.dist-info/RECORD,,
maleo/enums/role.py DELETED
@@ -1,29 +0,0 @@
1
- from enum import StrEnum
2
- from maleo.types.string import ListOfStrings
3
-
4
-
5
- class Organization(StrEnum):
6
- OWNER = "owner"
7
- ADMINISTRATOR = "administrator"
8
- USER = "user"
9
-
10
- @classmethod
11
- def choices(cls) -> ListOfStrings:
12
- return [e.value for e in cls]
13
-
14
-
15
- class System(StrEnum):
16
- ADMINISTRATOR = "administrator"
17
- ANALYST = "analyst"
18
- ENGINEER = "engineer"
19
- SUPPORT = "support"
20
- MANAGER = "manager"
21
- OFFICER = "officer"
22
- OPERATIONS = "operations"
23
- SECURITY = "security"
24
- TESTER = "tester"
25
- USER = "user"
26
-
27
- @classmethod
28
- def choices(cls) -> ListOfStrings:
29
- return [e.value for e in cls]
@@ -1,14 +0,0 @@
1
- maleo/enums/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- maleo/enums/cardinality.py,sha256=XTf3li1y9i5HUSDYyYntaOT8AN7nFMjFWBFiyQIyODc,1829
3
- maleo/enums/connection.py,sha256=jXww92ACMyvVPn1fGte7tbpj64LuyjzWKCeu835x2o0,4793
4
- maleo/enums/environment.py,sha256=uyHMsJIGTujJ_d_maM3RO6A79W9uhhScRlgWiT48R40,569
5
- maleo/enums/expiration.py,sha256=G7iDMQIOTQzUkx_nQFe04p-nwGz2OYqZJo98H63AO6U,957
6
- maleo/enums/order.py,sha256=XxwsoKnptfetEu-R0SQNqFsJPCP8qrhYycRFZE43b74,463
7
- maleo/enums/role.py,sha256=DXu-53YgdJYyCncoR55Pj38N4-70HZYTFh3qRQ2V4CA,644
8
- maleo/enums/service.py,sha256=gyVmRDe5L05XD07OnPn3ZgdUyme7Ie2g3-WdffmiMCI,3766
9
- maleo/enums/status.py,sha256=qWT5pcJ-29Jd6FUs_vlUThGHzMXRQV1sfqGzVx_ExIM,784
10
- maleo_enums-0.0.26.dist-info/licenses/LICENSE,sha256=aftGsecnk7TWVX-7KW94FqK4Syy6YSZ8PZEF7EcIp3M,2621
11
- maleo_enums-0.0.26.dist-info/METADATA,sha256=bUEjhJHoYIpdwwM5w1a6DJgc2nDElcY7ory3ZaMli-8,1345
12
- maleo_enums-0.0.26.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
13
- maleo_enums-0.0.26.dist-info/top_level.txt,sha256=3Tpd1siVsfYoeI9FEOJNYnffx_shzZ3wsPpTvz5bljc,6
14
- maleo_enums-0.0.26.dist-info/RECORD,,