maleo-identity 0.1.37__tar.gz → 0.1.45__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.
Files changed (78) hide show
  1. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/PKG-INFO +10 -9
  2. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/maleo_identity.egg-info/PKG-INFO +10 -9
  3. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/maleo_identity.egg-info/SOURCES.txt +1 -2
  4. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/maleo_identity.egg-info/requires.txt +9 -8
  5. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/pyproject.toml +10 -9
  6. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/constants/api_key.py +1 -1
  7. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/constants/organization.py +1 -1
  8. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/constants/organization_registration_code.py +1 -1
  9. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/constants/organization_relation.py +1 -1
  10. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/constants/patient.py +1 -1
  11. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/constants/user.py +1 -1
  12. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/constants/user_medical_role.py +1 -1
  13. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/constants/user_organization_role.py +1 -1
  14. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/constants/user_profile.py +2 -2
  15. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/constants/user_system_role.py +2 -2
  16. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/enums/api_key.py +1 -1
  17. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/enums/organization.py +1 -1
  18. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/enums/organization_registration_code.py +1 -1
  19. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/enums/organization_relation.py +1 -1
  20. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/enums/patient.py +1 -1
  21. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/enums/user.py +16 -1
  22. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/enums/user_medical_role.py +14 -1
  23. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/enums/user_organization_role.py +14 -1
  24. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/enums/user_profile.py +1 -1
  25. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/enums/user_system_role.py +1 -1
  26. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/mixins/api_key.py +19 -3
  27. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/mixins/common.py +2 -2
  28. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/mixins/organization.py +3 -3
  29. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/mixins/organization_registration_code.py +4 -4
  30. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/mixins/organization_relation.py +5 -5
  31. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/mixins/patient.py +2 -2
  32. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/mixins/user.py +9 -3
  33. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/mixins/user_medical_role.py +11 -5
  34. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/mixins/user_organization_role.py +11 -5
  35. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/mixins/user_profile.py +2 -2
  36. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/mixins/user_system_role.py +3 -3
  37. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/schemas/api_key.py +22 -8
  38. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/schemas/common.py +11 -52
  39. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/schemas/organization.py +11 -11
  40. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/schemas/organization_registration_code.py +11 -11
  41. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/schemas/organization_relation.py +14 -14
  42. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/schemas/patient.py +12 -12
  43. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/schemas/user.py +53 -19
  44. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/schemas/user_medical_role.py +54 -16
  45. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/schemas/user_organization_role.py +56 -16
  46. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/schemas/user_profile.py +12 -12
  47. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/schemas/user_system_role.py +10 -10
  48. maleo_identity-0.1.45/src/types/api_key.py +8 -0
  49. maleo_identity-0.1.45/src/types/organization.py +4 -0
  50. maleo_identity-0.1.45/src/types/organization_registration_code.py +4 -0
  51. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/types/organization_relation.py +1 -1
  52. maleo_identity-0.1.45/src/types/user.py +4 -0
  53. maleo_identity-0.1.45/src/types/user_medical_role.py +8 -0
  54. maleo_identity-0.1.45/src/types/user_organization_role.py +8 -0
  55. maleo_identity-0.1.45/src/types/user_profile.py +4 -0
  56. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/types/user_system_role.py +1 -1
  57. maleo_identity-0.1.37/src/types/api_key.py +0 -7
  58. maleo_identity-0.1.37/src/types/organization.py +0 -4
  59. maleo_identity-0.1.37/src/types/organization_registration_code.py +0 -4
  60. maleo_identity-0.1.37/src/types/user.py +0 -4
  61. maleo_identity-0.1.37/src/types/user_medical_role.py +0 -7
  62. maleo_identity-0.1.37/src/types/user_organization_role.py +0 -7
  63. maleo_identity-0.1.37/src/types/user_profile.py +0 -4
  64. maleo_identity-0.1.37/src/utils/user.py +0 -32
  65. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/LICENSE +0 -0
  66. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/README.md +0 -0
  67. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/maleo_identity.egg-info/dependency_links.txt +0 -0
  68. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/maleo_identity.egg-info/top_level.txt +0 -0
  69. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/setup.cfg +0 -0
  70. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/__init__.py +0 -0
  71. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/constants/__init__.py +0 -0
  72. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/enums/__init__.py +0 -0
  73. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/mixins/__init__.py +0 -0
  74. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/schemas/__init__.py +0 -0
  75. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/types/__init__.py +0 -0
  76. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/types/patient.py +0 -0
  77. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/utils/__init__.py +0 -0
  78. {maleo_identity-0.1.37 → maleo_identity-0.1.45}/src/utils/organization.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maleo-identity
3
- Version: 0.1.37
3
+ Version: 0.1.45
4
4
  Summary: MaleoIdentity service package
5
5
  Author-email: Agra Bima Yuda <agra@nexmedis.com>
6
6
  License: Proprietary
@@ -41,14 +41,15 @@ Requires-Dist: identify>=2.6.15
41
41
  Requires-Dist: idna>=3.11
42
42
  Requires-Dist: importlib_metadata>=8.7.0
43
43
  Requires-Dist: iniconfig>=2.1.0
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-metadata>=0.7.50
48
- Requires-Dist: maleo-schemas>=0.7.50
49
- Requires-Dist: maleo-types>=0.0.50
50
- Requires-Dist: maleo-utils>=0.0.50
44
+ Requires-Dist: maleo-enums>=0.0.81
45
+ Requires-Dist: maleo-metadata>=0.7.75
51
46
  Requires-Dist: mypy_extensions>=1.1.0
47
+ Requires-Dist: nexo-crypto>=0.0.4
48
+ Requires-Dist: nexo-enums>=0.0.4
49
+ Requires-Dist: nexo-logging>=0.0.4
50
+ Requires-Dist: nexo-schemas>=0.0.4
51
+ Requires-Dist: nexo-types>=0.0.4
52
+ Requires-Dist: nexo-utils>=0.0.4
52
53
  Requires-Dist: nodeenv>=1.9.1
53
54
  Requires-Dist: opentelemetry-api>=1.37.0
54
55
  Requires-Dist: opentelemetry-sdk>=1.37.0
@@ -72,7 +73,7 @@ Requires-Dist: PyJWT>=2.10.1
72
73
  Requires-Dist: pytest>=8.4.2
73
74
  Requires-Dist: python-dotenv>=1.1.1
74
75
  Requires-Dist: pytokens>=0.1.10
75
- Requires-Dist: PyYAML>=6.0.3
76
+ Requires-Dist: PyYAML>=6.0.2
76
77
  Requires-Dist: requests>=2.32.5
77
78
  Requires-Dist: rsa>=4.9.1
78
79
  Requires-Dist: sniffio>=1.3.1
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maleo-identity
3
- Version: 0.1.37
3
+ Version: 0.1.45
4
4
  Summary: MaleoIdentity service package
5
5
  Author-email: Agra Bima Yuda <agra@nexmedis.com>
6
6
  License: Proprietary
@@ -41,14 +41,15 @@ Requires-Dist: identify>=2.6.15
41
41
  Requires-Dist: idna>=3.11
42
42
  Requires-Dist: importlib_metadata>=8.7.0
43
43
  Requires-Dist: iniconfig>=2.1.0
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-metadata>=0.7.50
48
- Requires-Dist: maleo-schemas>=0.7.50
49
- Requires-Dist: maleo-types>=0.0.50
50
- Requires-Dist: maleo-utils>=0.0.50
44
+ Requires-Dist: maleo-enums>=0.0.81
45
+ Requires-Dist: maleo-metadata>=0.7.75
51
46
  Requires-Dist: mypy_extensions>=1.1.0
47
+ Requires-Dist: nexo-crypto>=0.0.4
48
+ Requires-Dist: nexo-enums>=0.0.4
49
+ Requires-Dist: nexo-logging>=0.0.4
50
+ Requires-Dist: nexo-schemas>=0.0.4
51
+ Requires-Dist: nexo-types>=0.0.4
52
+ Requires-Dist: nexo-utils>=0.0.4
52
53
  Requires-Dist: nodeenv>=1.9.1
53
54
  Requires-Dist: opentelemetry-api>=1.37.0
54
55
  Requires-Dist: opentelemetry-sdk>=1.37.0
@@ -72,7 +73,7 @@ Requires-Dist: PyJWT>=2.10.1
72
73
  Requires-Dist: pytest>=8.4.2
73
74
  Requires-Dist: python-dotenv>=1.1.1
74
75
  Requires-Dist: pytokens>=0.1.10
75
- Requires-Dist: PyYAML>=6.0.3
76
+ Requires-Dist: PyYAML>=6.0.2
76
77
  Requires-Dist: requests>=2.32.5
77
78
  Requires-Dist: rsa>=4.9.1
78
79
  Requires-Dist: sniffio>=1.3.1
@@ -65,5 +65,4 @@ src/types/user_organization_role.py
65
65
  src/types/user_profile.py
66
66
  src/types/user_system_role.py
67
67
  src/utils/__init__.py
68
- src/utils/organization.py
69
- src/utils/user.py
68
+ src/utils/organization.py
@@ -32,14 +32,15 @@ identify>=2.6.15
32
32
  idna>=3.11
33
33
  importlib_metadata>=8.7.0
34
34
  iniconfig>=2.1.0
35
- maleo-crypto>=0.0.50
36
- maleo-enums>=0.0.50
37
- maleo-logging>=0.0.50
38
- maleo-metadata>=0.7.50
39
- maleo-schemas>=0.7.50
40
- maleo-types>=0.0.50
41
- maleo-utils>=0.0.50
35
+ maleo-enums>=0.0.81
36
+ maleo-metadata>=0.7.75
42
37
  mypy_extensions>=1.1.0
38
+ nexo-crypto>=0.0.4
39
+ nexo-enums>=0.0.4
40
+ nexo-logging>=0.0.4
41
+ nexo-schemas>=0.0.4
42
+ nexo-types>=0.0.4
43
+ nexo-utils>=0.0.4
43
44
  nodeenv>=1.9.1
44
45
  opentelemetry-api>=1.37.0
45
46
  opentelemetry-sdk>=1.37.0
@@ -63,7 +64,7 @@ PyJWT>=2.10.1
63
64
  pytest>=8.4.2
64
65
  python-dotenv>=1.1.1
65
66
  pytokens>=0.1.10
66
- PyYAML>=6.0.3
67
+ PyYAML>=6.0.2
67
68
  requests>=2.32.5
68
69
  rsa>=4.9.1
69
70
  sniffio>=1.3.1
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "maleo-identity"
7
- version = "0.1.37"
7
+ version = "0.1.45"
8
8
  description = "MaleoIdentity service package"
9
9
  authors = [
10
10
  { name = "Agra Bima Yuda", email = "agra@nexmedis.com" }
@@ -47,14 +47,15 @@ dependencies = [
47
47
  "idna>=3.11",
48
48
  "importlib_metadata>=8.7.0",
49
49
  "iniconfig>=2.1.0",
50
- "maleo-crypto>=0.0.50",
51
- "maleo-enums>=0.0.50",
52
- "maleo-logging>=0.0.50",
53
- "maleo-metadata>=0.7.50",
54
- "maleo-schemas>=0.7.50",
55
- "maleo-types>=0.0.50",
56
- "maleo-utils>=0.0.50",
50
+ "maleo-enums>=0.0.81",
51
+ "maleo-metadata>=0.7.75",
57
52
  "mypy_extensions>=1.1.0",
53
+ "nexo-crypto>=0.0.4",
54
+ "nexo-enums>=0.0.4",
55
+ "nexo-logging>=0.0.4",
56
+ "nexo-schemas>=0.0.4",
57
+ "nexo-types>=0.0.4",
58
+ "nexo-utils>=0.0.4",
58
59
  "nodeenv>=1.9.1",
59
60
  "opentelemetry-api>=1.37.0",
60
61
  "opentelemetry-sdk>=1.37.0",
@@ -78,7 +79,7 @@ dependencies = [
78
79
  "pytest>=8.4.2",
79
80
  "python-dotenv>=1.1.1",
80
81
  "pytokens>=0.1.10",
81
- "PyYAML>=6.0.3",
82
+ "PyYAML>=6.0.2",
82
83
  "requests>=2.32.5",
83
84
  "rsa>=4.9.1",
84
85
  "sniffio>=1.3.1",
@@ -1,4 +1,4 @@
1
- from maleo.schemas.resource import Resource, ResourceIdentifier
1
+ from nexo.schemas.resource import Resource, ResourceIdentifier
2
2
 
3
3
 
4
4
  API_KEY_RESOURCE = Resource(
@@ -1,4 +1,4 @@
1
- from maleo.schemas.resource import Resource, ResourceIdentifier
1
+ from nexo.schemas.resource import Resource, ResourceIdentifier
2
2
 
3
3
 
4
4
  ORGANIZATION_RESOURCE = Resource(
@@ -1,4 +1,4 @@
1
- from maleo.schemas.resource import Resource, ResourceIdentifier
1
+ from nexo.schemas.resource import Resource, ResourceIdentifier
2
2
 
3
3
 
4
4
  ORGANIZATION_REGISTRATION_CODE_RESOURCE = Resource(
@@ -1,4 +1,4 @@
1
- from maleo.schemas.resource import Resource, ResourceIdentifier
1
+ from nexo.schemas.resource import Resource, ResourceIdentifier
2
2
 
3
3
 
4
4
  ORGANIZATION_RELATION_RESOURCE = Resource(
@@ -1,4 +1,4 @@
1
- from maleo.schemas.resource import Resource, ResourceIdentifier
1
+ from nexo.schemas.resource import Resource, ResourceIdentifier
2
2
 
3
3
 
4
4
  PATIENT_RESOURCE = Resource(
@@ -1,4 +1,4 @@
1
- from maleo.schemas.resource import Resource, ResourceIdentifier
1
+ from nexo.schemas.resource import Resource, ResourceIdentifier
2
2
 
3
3
 
4
4
  USER_RESOURCE = Resource(
@@ -1,4 +1,4 @@
1
- from maleo.schemas.resource import Resource, ResourceIdentifier
1
+ from nexo.schemas.resource import Resource, ResourceIdentifier
2
2
 
3
3
 
4
4
  USER_MEDICAL_ROLE_RESOURCE = Resource(
@@ -1,4 +1,4 @@
1
- from maleo.schemas.resource import Resource, ResourceIdentifier
1
+ from nexo.schemas.resource import Resource, ResourceIdentifier
2
2
 
3
3
 
4
4
  USER_ORGANIZATION_ROLE_RESOURCE = Resource(
@@ -1,5 +1,5 @@
1
- from maleo.schemas.resource import Resource, ResourceIdentifier
2
- from maleo.types.string import SeqOfStrs
1
+ from nexo.schemas.resource import Resource, ResourceIdentifier
2
+ from nexo.types.string import SeqOfStrs
3
3
 
4
4
 
5
5
  USER_PROFILE_RESOURCE = Resource(
@@ -1,5 +1,5 @@
1
- from maleo.schemas.resource import Resource, ResourceIdentifier
2
- from maleo.types.string import DoubleStrs
1
+ from nexo.schemas.resource import Resource, ResourceIdentifier
2
+ from nexo.types.string import DoubleStrs
3
3
 
4
4
 
5
5
  USER_SYSTEM_ROLE_RESOURCE = Resource(
@@ -1,5 +1,5 @@
1
1
  from enum import StrEnum
2
- from maleo.types.string import ListOfStrs, ManyStrs
2
+ from nexo.types.string import ListOfStrs, ManyStrs
3
3
 
4
4
 
5
5
  class IdentifierType(StrEnum):
@@ -1,5 +1,5 @@
1
1
  from enum import StrEnum
2
- from maleo.types.string import ListOfStrs
2
+ from nexo.types.string import ListOfStrs
3
3
 
4
4
 
5
5
  class Granularity(StrEnum):
@@ -1,5 +1,5 @@
1
1
  from enum import StrEnum
2
- from maleo.types.string import ListOfStrs
2
+ from nexo.types.string import ListOfStrs
3
3
 
4
4
 
5
5
  class IdentifierType(StrEnum):
@@ -1,5 +1,5 @@
1
1
  from enum import StrEnum
2
- from maleo.types.string import ListOfStrs, ManyStrs
2
+ from nexo.types.string import ListOfStrs, ManyStrs
3
3
 
4
4
 
5
5
  class IdentifierType(StrEnum):
@@ -1,5 +1,5 @@
1
1
  from enum import StrEnum
2
- from maleo.types.string import ListOfStrs
2
+ from nexo.types.string import ListOfStrs
3
3
 
4
4
 
5
5
  class IdentifierType(StrEnum):
@@ -1,5 +1,5 @@
1
1
  from enum import StrEnum
2
- from maleo.types.string import ListOfStrs
2
+ from nexo.types.string import ListOfStrs
3
3
 
4
4
 
5
5
  class Granularity(StrEnum):
@@ -24,3 +24,18 @@ class IdentifierType(StrEnum):
24
24
  @property
25
25
  def column(self) -> str:
26
26
  return self.value
27
+
28
+
29
+ class ExpandableField(StrEnum):
30
+ USER_TYPE = "user_type"
31
+ BLOOD_TYPE = "blood_type"
32
+ GENDER = "gender"
33
+
34
+ @classmethod
35
+ def choices(cls) -> ListOfStrs:
36
+ return [e.value for e in cls]
37
+
38
+
39
+ OptExpandableField = ExpandableField | None
40
+ ListOfExpandableFields = list[ExpandableField]
41
+ OptListOfExpandableFields = ListOfExpandableFields | None
@@ -1,5 +1,5 @@
1
1
  from enum import StrEnum
2
- from maleo.types.string import ListOfStrs, ManyStrs
2
+ from nexo.types.string import ListOfStrs, ManyStrs
3
3
 
4
4
 
5
5
  class IdentifierType(StrEnum):
@@ -20,3 +20,16 @@ class IdentifierType(StrEnum):
20
20
  elif self is IdentifierType.COMPOSITE:
21
21
  return ("user_id", "organization_id", "medical_role")
22
22
  raise ValueError(f"Unknown column(s) for identifier type: {self}")
23
+
24
+
25
+ class ExpandableField(StrEnum):
26
+ MEDICAL_ROLE = "medical_role"
27
+
28
+ @classmethod
29
+ def choices(cls) -> ListOfStrs:
30
+ return [e.value for e in cls]
31
+
32
+
33
+ OptExpandableField = ExpandableField | None
34
+ ListOfExpandableFields = list[ExpandableField]
35
+ OptListOfExpandableFields = ListOfExpandableFields | None
@@ -1,5 +1,5 @@
1
1
  from enum import StrEnum
2
- from maleo.types.string import ListOfStrs, ManyStrs
2
+ from nexo.types.string import ListOfStrs, ManyStrs
3
3
 
4
4
 
5
5
  class IdentifierType(StrEnum):
@@ -20,3 +20,16 @@ class IdentifierType(StrEnum):
20
20
  elif self is IdentifierType.COMPOSITE:
21
21
  return ("user_id", "organization_id", "organization_role")
22
22
  raise ValueError(f"Unknown column(s) for identifier type: {self}")
23
+
24
+
25
+ class ExpandableField(StrEnum):
26
+ ORGANIZATION_ROLE = "organization_role"
27
+
28
+ @classmethod
29
+ def choices(cls) -> ListOfStrs:
30
+ return [e.value for e in cls]
31
+
32
+
33
+ OptExpandableField = ExpandableField | None
34
+ ListOfExpandableFields = list[ExpandableField]
35
+ OptListOfExpandableFields = ListOfExpandableFields | None
@@ -1,5 +1,5 @@
1
1
  from enum import StrEnum
2
- from maleo.types.string import ListOfStrs
2
+ from nexo.types.string import ListOfStrs
3
3
 
4
4
 
5
5
  class IdentifierType(StrEnum):
@@ -1,5 +1,5 @@
1
1
  from enum import StrEnum
2
- from maleo.types.string import ListOfStrs, ManyStrs
2
+ from nexo.types.string import ListOfStrs, ManyStrs
3
3
 
4
4
 
5
5
  class IdentifierType(StrEnum):
@@ -1,9 +1,9 @@
1
1
  from pydantic import BaseModel, Field
2
2
  from typing import Annotated, Literal, TypeGuard
3
3
  from uuid import UUID
4
- from maleo.schemas.mixins.identity import Identifier
5
- from maleo.types.any import ManyAny
6
- from maleo.types.string import ManyStrs
4
+ from nexo.schemas.mixins.identity import Identifier
5
+ from nexo.types.any import ManyAny
6
+ from nexo.types.string import ManyStrs
7
7
  from ..enums.api_key import IdentifierType
8
8
  from ..types.api_key import CompositeIdentifierType, IdentifierValueType
9
9
 
@@ -34,6 +34,13 @@ class UUIDAPIKeyIdentifier(Identifier[Literal[IdentifierType.UUID], UUID]):
34
34
  ] = IdentifierType.UUID
35
35
 
36
36
 
37
+ class APIKeyAPIKeyIdentifier(Identifier[Literal[IdentifierType.API_KEY], str]):
38
+ type: Annotated[
39
+ Literal[IdentifierType.API_KEY],
40
+ Field(IdentifierType.API_KEY, description="Identifier's type"),
41
+ ] = IdentifierType.API_KEY
42
+
43
+
37
44
  class CompositeAPIKeyIdentifier(
38
45
  Identifier[Literal[IdentifierType.COMPOSITE], CompositeIdentifierType]
39
46
  ):
@@ -50,6 +57,7 @@ AnyAPIKeyIdentifier = (
50
57
  APIKeyIdentifier
51
58
  | IdAPIKeyIdentifier
52
59
  | UUIDAPIKeyIdentifier
60
+ | APIKeyAPIKeyIdentifier
53
61
  | CompositeAPIKeyIdentifier
54
62
  )
55
63
 
@@ -60,6 +68,14 @@ def is_id_identifier(
60
68
  return identifier.type is IdentifierType.ID and isinstance(identifier.value, int)
61
69
 
62
70
 
71
+ def is_api_key_identifier(
72
+ identifier: AnyAPIKeyIdentifier,
73
+ ) -> TypeGuard[APIKeyAPIKeyIdentifier]:
74
+ return identifier.type is IdentifierType.API_KEY and isinstance(
75
+ identifier.value, str
76
+ )
77
+
78
+
63
79
  def is_uuid_identifier(
64
80
  identifier: AnyAPIKeyIdentifier,
65
81
  ) -> TypeGuard[UUIDAPIKeyIdentifier]:
@@ -1,12 +1,12 @@
1
1
  from pydantic import Field
2
2
  from typing import Annotated, Generic
3
- from maleo.schemas.mixins.identity import (
3
+ from nexo.schemas.mixins.identity import (
4
4
  IdCard as BaseIdCard,
5
5
  FullName as BaseFullName,
6
6
  BirthPlace as BaseBirthPlace,
7
7
  PlaceOfBirth as BasePlaceOfBirth,
8
8
  )
9
- from maleo.types.string import OptStrT
9
+ from nexo.types.string import OptStrT
10
10
 
11
11
 
12
12
  class IdCard(BaseIdCard[OptStrT], Generic[OptStrT]):
@@ -1,9 +1,9 @@
1
1
  from pydantic import BaseModel, Field
2
2
  from typing import Annotated, Generic, Literal, TypeGuard
3
3
  from uuid import UUID
4
- from maleo.schemas.mixins.identity import Identifier, Key as BaseKey, Name as BaseName
5
- from maleo.types.string import OptStrT
6
- from maleo.types.uuid import OptUUIDT
4
+ from nexo.schemas.mixins.identity import Identifier, Key as BaseKey, Name as BaseName
5
+ from nexo.types.string import OptStrT
6
+ from nexo.types.uuid import OptUUIDT
7
7
  from ..enums.organization import IdentifierType
8
8
  from ..types.organization import IdentifierValueType
9
9
 
@@ -1,10 +1,10 @@
1
1
  from pydantic import BaseModel, Field, model_validator
2
2
  from typing import Annotated, Generic, Literal, Self, TypeGuard
3
3
  from uuid import UUID
4
- from maleo.schemas.mixins.identity import Identifier
5
- from maleo.types.integer import OptIntT
6
- from maleo.types.misc import OptIntOrStr
7
- from maleo.types.string import OptStrT
4
+ from nexo.schemas.mixins.identity import Identifier
5
+ from nexo.types.integer import OptIntT
6
+ from nexo.types.misc import OptIntOrStr
7
+ from nexo.types.string import OptStrT
8
8
  from ..enums.organization_registration_code import IdentifierType
9
9
  from ..types.organization_registration_code import IdentifierValueType
10
10
 
@@ -1,11 +1,11 @@
1
1
  from pydantic import BaseModel, Field
2
2
  from typing import Annotated, Generic, Literal, TypeGuard
3
3
  from uuid import UUID
4
- from maleo.schemas.mixins.identity import Identifier
5
- from maleo.types.any import ManyAny
6
- from maleo.types.boolean import OptBoolT
7
- from maleo.types.misc import OptListOfAnyOrStrToAnyDict
8
- from maleo.types.string import ManyStrs
4
+ from nexo.schemas.mixins.identity import Identifier
5
+ from nexo.types.any import ManyAny
6
+ from nexo.types.boolean import OptBoolT
7
+ from nexo.types.misc import OptListOfAnyOrStrToAnyDict
8
+ from nexo.types.string import ManyStrs
9
9
  from ..enums.organization_relation import IdentifierType, OptListOfExpandableFields
10
10
  from ..types.organization_relation import CompositeIdentifierType, IdentifierValueType
11
11
 
@@ -1,8 +1,8 @@
1
1
  from pydantic import BaseModel, Field, model_validator
2
2
  from typing import Annotated, Generic, Literal, Self, TypeGuard
3
3
  from uuid import UUID
4
- from maleo.schemas.mixins.identity import Identifier, Passport as BasePassport
5
- from maleo.types.string import OptStr, OptStrT
4
+ from nexo.schemas.mixins.identity import Identifier, Passport as BasePassport
5
+ from nexo.types.string import OptStr, OptStrT
6
6
  from ..enums.patient import IdentifierType, OptListOfExpandableFields
7
7
  from ..types.patient import IdentifierValueType
8
8
  from .common import IdCard
@@ -1,9 +1,9 @@
1
1
  from pydantic import BaseModel, Field
2
2
  from typing import Annotated, Generic, Literal, TypeGuard
3
3
  from uuid import UUID
4
- from maleo.schemas.mixins.identity import Identifier
5
- from maleo.types.string import OptStrT, OptListOfStrsT
6
- from ..enums.user import IdentifierType
4
+ from nexo.schemas.mixins.identity import Identifier
5
+ from nexo.types.string import OptStrT, OptListOfStrsT
6
+ from ..enums.user import IdentifierType, OptListOfExpandableFields
7
7
  from ..types.user import IdentifierValueType
8
8
 
9
9
 
@@ -37,6 +37,12 @@ class Password(BaseModel):
37
37
  password: Annotated[str, Field(..., description="Password", max_length=255)]
38
38
 
39
39
 
40
+ class Expand(BaseModel):
41
+ expand: Annotated[
42
+ OptListOfExpandableFields, Field(None, description="Expanded field(s)")
43
+ ] = None
44
+
45
+
40
46
  class UserIdentifier(Identifier[IdentifierType, IdentifierValueType]):
41
47
  @property
42
48
  def column_and_value(self) -> tuple[str, IdentifierValueType]:
@@ -1,13 +1,19 @@
1
- from pydantic import Field
1
+ from pydantic import BaseModel, Field
2
2
  from typing import Annotated, Literal, TypeGuard
3
3
  from uuid import UUID
4
- from maleo.schemas.mixins.identity import Identifier
5
- from maleo.types.any import ManyAny
6
- from maleo.types.string import ManyStrs
7
- from ..enums.user_medical_role import IdentifierType
4
+ from nexo.schemas.mixins.identity import Identifier
5
+ from nexo.types.any import ManyAny
6
+ from nexo.types.string import ManyStrs
7
+ from ..enums.user_medical_role import IdentifierType, OptListOfExpandableFields
8
8
  from ..types.user_medical_role import CompositeIdentifierType, IdentifierValueType
9
9
 
10
10
 
11
+ class Expand(BaseModel):
12
+ expand: Annotated[
13
+ OptListOfExpandableFields, Field(None, description="Expanded field(s)")
14
+ ] = None
15
+
16
+
11
17
  class UserMedicalRoleIdentifier(Identifier[IdentifierType, IdentifierValueType]):
12
18
  @property
13
19
  def columns_and_values(self) -> tuple[ManyStrs, ManyAny]:
@@ -1,13 +1,19 @@
1
- from pydantic import Field
1
+ from pydantic import BaseModel, Field
2
2
  from typing import Annotated, Literal, TypeGuard
3
3
  from uuid import UUID
4
- from maleo.schemas.mixins.identity import Identifier
5
- from maleo.types.any import ManyAny
6
- from maleo.types.string import ManyStrs
7
- from ..enums.user_organization_role import IdentifierType
4
+ from nexo.schemas.mixins.identity import Identifier
5
+ from nexo.types.any import ManyAny
6
+ from nexo.types.string import ManyStrs
7
+ from ..enums.user_organization_role import IdentifierType, OptListOfExpandableFields
8
8
  from ..types.user_organization_role import CompositeIdentifierType, IdentifierValueType
9
9
 
10
10
 
11
+ class Expand(BaseModel):
12
+ expand: Annotated[
13
+ OptListOfExpandableFields, Field(None, description="Expanded field(s)")
14
+ ] = None
15
+
16
+
11
17
  class UserOrganizationRoleIdentifier(Identifier[IdentifierType, IdentifierValueType]):
12
18
  @property
13
19
  def columns_and_values(self) -> tuple[ManyStrs, ManyAny]:
@@ -1,8 +1,8 @@
1
1
  from pydantic import BaseModel, Field
2
2
  from typing import Annotated, Generic, Literal, TypeGuard
3
3
  from uuid import UUID
4
- from maleo.schemas.mixins.identity import Identifier
5
- from maleo.types.string import OptStrT
4
+ from nexo.schemas.mixins.identity import Identifier
5
+ from nexo.types.string import OptStrT
6
6
  from ..enums.user_profile import IdentifierType, OptListOfExpandableFields
7
7
  from ..types.user_profile import IdentifierValueType
8
8
 
@@ -1,9 +1,9 @@
1
1
  from pydantic import BaseModel, Field
2
2
  from typing import Annotated, Literal, TypeGuard
3
3
  from uuid import UUID
4
- from maleo.schemas.mixins.identity import Identifier
5
- from maleo.types.any import ManyAny
6
- from maleo.types.string import ManyStrs
4
+ from nexo.schemas.mixins.identity import Identifier
5
+ from nexo.types.any import ManyAny
6
+ from nexo.types.string import ManyStrs
7
7
  from ..enums.user_system_role import IdentifierType, OptListOfExpandableFields
8
8
  from ..types.user_system_role import CompositeIdentifierType, IdentifierValueType
9
9