maleo-foundation 0.2.57__tar.gz → 0.2.59__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 (129) hide show
  1. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/PKG-INFO +1 -1
  2. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/enums.py +23 -0
  3. maleo_foundation-0.2.59/maleo_foundation/models/schemas/general.py +80 -0
  4. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/schemas/parameter.py +0 -15
  5. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/schemas/result.py +0 -29
  6. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation.egg-info/PKG-INFO +1 -1
  7. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/pyproject.toml +1 -1
  8. maleo_foundation-0.2.57/maleo_foundation/models/schemas/general.py +0 -34
  9. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/README.md +0 -0
  10. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/__init__.py +0 -0
  11. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/authentication.py +0 -0
  12. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/authorization.py +0 -0
  13. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/client/__init__.py +0 -0
  14. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/client/manager.py +0 -0
  15. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/client/services/__init__.py +0 -0
  16. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/client/services/encryption/__init__.py +0 -0
  17. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/client/services/encryption/aes.py +0 -0
  18. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/client/services/encryption/rsa.py +0 -0
  19. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/client/services/hash/__init__.py +0 -0
  20. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/client/services/hash/bcrypt.py +0 -0
  21. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/client/services/hash/hmac.py +0 -0
  22. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/client/services/hash/sha256.py +0 -0
  23. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/client/services/key.py +0 -0
  24. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/client/services/signature.py +0 -0
  25. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/client/services/token.py +0 -0
  26. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/constants.py +0 -0
  27. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/expanded_types/__init__.py +0 -0
  28. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/expanded_types/client.py +0 -0
  29. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/expanded_types/encryption/__init__.py +0 -0
  30. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/expanded_types/encryption/aes.py +0 -0
  31. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/expanded_types/encryption/rsa.py +0 -0
  32. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/expanded_types/general.py +0 -0
  33. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/expanded_types/hash.py +0 -0
  34. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/expanded_types/key.py +0 -0
  35. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/expanded_types/repository.py +0 -0
  36. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/expanded_types/service.py +0 -0
  37. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/expanded_types/signature.py +0 -0
  38. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/expanded_types/token.py +0 -0
  39. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/extended_types.py +0 -0
  40. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/managers/__init__.py +0 -0
  41. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/managers/cache/__init__.py +0 -0
  42. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/managers/cache/base.py +0 -0
  43. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/managers/cache/redis.py +0 -0
  44. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/managers/client/__init__.py +0 -0
  45. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/managers/client/base.py +0 -0
  46. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/managers/client/google/__init__.py +0 -0
  47. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/managers/client/google/base.py +0 -0
  48. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/managers/client/google/parameter.py +0 -0
  49. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/managers/client/google/secret.py +0 -0
  50. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/managers/client/google/storage.py +0 -0
  51. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/managers/client/maleo.py +0 -0
  52. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/managers/db.py +0 -0
  53. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/managers/middleware.py +0 -0
  54. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/managers/service.py +0 -0
  55. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/middlewares/authentication.py +0 -0
  56. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/middlewares/base.py +0 -0
  57. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/middlewares/cors.py +0 -0
  58. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/__init__.py +0 -0
  59. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/responses.py +0 -0
  60. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/schemas/__init__.py +0 -0
  61. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/schemas/encryption.py +0 -0
  62. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/schemas/hash.py +0 -0
  63. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/schemas/key.py +0 -0
  64. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/schemas/signature.py +0 -0
  65. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/schemas/token.py +0 -0
  66. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/table.py +0 -0
  67. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/transfers/__init__.py +0 -0
  68. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/transfers/general/__init__.py +0 -0
  69. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/transfers/general/key.py +0 -0
  70. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/transfers/general/signature.py +0 -0
  71. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/transfers/general/token.py +0 -0
  72. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/transfers/parameters/__init__.py +0 -0
  73. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/transfers/parameters/client.py +0 -0
  74. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/transfers/parameters/encryption/__init__.py +0 -0
  75. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/transfers/parameters/encryption/aes.py +0 -0
  76. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/transfers/parameters/encryption/rsa.py +0 -0
  77. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/transfers/parameters/general.py +0 -0
  78. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/transfers/parameters/hash/__init__.py +0 -0
  79. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/transfers/parameters/hash/bcrypt.py +0 -0
  80. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/transfers/parameters/hash/hmac.py +0 -0
  81. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/transfers/parameters/hash/sha256.py +0 -0
  82. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/transfers/parameters/key.py +0 -0
  83. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/transfers/parameters/service.py +0 -0
  84. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/transfers/parameters/signature.py +0 -0
  85. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/transfers/parameters/token.py +0 -0
  86. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/transfers/results/__init__.py +0 -0
  87. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/transfers/results/client/__init__.py +0 -0
  88. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/transfers/results/client/controllers/__init__.py +0 -0
  89. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/transfers/results/client/controllers/http.py +0 -0
  90. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/transfers/results/client/service.py +0 -0
  91. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/transfers/results/encryption/__init__.py +0 -0
  92. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/transfers/results/encryption/aes.py +0 -0
  93. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/transfers/results/encryption/rsa.py +0 -0
  94. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/transfers/results/hash.py +0 -0
  95. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/transfers/results/key.py +0 -0
  96. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/transfers/results/service/__init__.py +0 -0
  97. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/transfers/results/service/controllers/__init__.py +0 -0
  98. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/transfers/results/service/controllers/rest.py +0 -0
  99. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/transfers/results/service/general.py +0 -0
  100. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/transfers/results/service/repository.py +0 -0
  101. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/transfers/results/signature.py +0 -0
  102. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/models/transfers/results/token.py +0 -0
  103. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/rest_controller_result.py +0 -0
  104. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/types.py +0 -0
  105. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/utils/__init__.py +0 -0
  106. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/utils/client.py +0 -0
  107. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/utils/controller.py +0 -0
  108. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/utils/dependencies/__init__.py +0 -0
  109. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/utils/dependencies/auth.py +0 -0
  110. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/utils/exceptions.py +0 -0
  111. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/utils/extractor.py +0 -0
  112. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/utils/formatter/__init__.py +0 -0
  113. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/utils/formatter/case.py +0 -0
  114. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/utils/loaders/__init__.py +0 -0
  115. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/utils/loaders/credential/__init__.py +0 -0
  116. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/utils/loaders/credential/google.py +0 -0
  117. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/utils/loaders/json.py +0 -0
  118. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/utils/loaders/key/__init__.py +0 -0
  119. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/utils/loaders/key/rsa.py +0 -0
  120. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/utils/loaders/yaml.py +0 -0
  121. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/utils/logging.py +0 -0
  122. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/utils/mergers.py +0 -0
  123. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/utils/query.py +0 -0
  124. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation/utils/repository.py +0 -0
  125. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation.egg-info/SOURCES.txt +0 -0
  126. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation.egg-info/dependency_links.txt +0 -0
  127. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation.egg-info/requires.txt +0 -0
  128. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/maleo_foundation.egg-info/top_level.txt +0 -0
  129. {maleo_foundation-0.2.57 → maleo_foundation-0.2.59}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maleo_foundation
3
- Version: 0.2.57
3
+ Version: 0.2.59
4
4
  Summary: Foundation package for Maleo
5
5
  Author-email: Agra Bima Yuda <agra@nexmedis.com>
6
6
  License: MIT
@@ -8,6 +8,28 @@ class BaseEnums:
8
8
  STAGING = "staging"
9
9
  PRODUCTION = "production"
10
10
 
11
+ class ServiceType(StrEnum):
12
+ BACKEND = "backend"
13
+ FRONTEND = "frontend"
14
+
15
+ class ServiceCategory(StrEnum):
16
+ CORE = "core"
17
+ AI = "ai"
18
+
19
+ class Service(StrEnum):
20
+ MALEO_STUDIO = "maleo-studio"
21
+ MALEO_NEXUS = "maleo-nexus"
22
+ MALEO_METADATA = "maleo-metadata"
23
+ MALEO_IDENTITY = "maleo-identity"
24
+ MALEO_ACCESS = "maleo-access"
25
+ MALEO_MEDIX = "maleo-medix"
26
+ MALEO_FHIR = "maleo-fhir"
27
+ MALEO_DICOM = "maleo-dicom"
28
+ MALEO_SCRIBE = "maleo-scribe"
29
+ MALEO_CDS = "maleo-cds"
30
+ MALEO_IMAGING = "maleo-imaging"
31
+ MALEO_MCU = "maleo-mcu"
32
+
11
33
  class StatusType(StrEnum):
12
34
  DELETED = "deleted"
13
35
  INACTIVE = "inactive"
@@ -16,6 +38,7 @@ class BaseEnums:
16
38
  class UserType(StrEnum):
17
39
  REGULAR = "regular"
18
40
  PROXY = "proxy"
41
+ SERVICE = "service"
19
42
 
20
43
  class SortOrder(StrEnum):
21
44
  ASC = "asc"
@@ -0,0 +1,80 @@
1
+ from __future__ import annotations
2
+ from datetime import datetime
3
+ from pydantic import BaseModel, Field
4
+ from uuid import UUID
5
+ from maleo_foundation.enums import BaseEnums
6
+ from maleo_foundation.types import BaseTypes
7
+
8
+ class BaseGeneralSchemas:
9
+ class DateFilter(BaseModel):
10
+ name:str = Field(..., description="Column name.")
11
+ from_date:BaseTypes.OptionalDatetime = Field(None, description="From date.")
12
+ to_date:BaseTypes.OptionalDatetime = Field(None, description="To date.")
13
+
14
+ class SortColumn(BaseModel):
15
+ name:str = Field(..., description="Column name.")
16
+ order:BaseEnums.SortOrder = Field(..., description="Sort order.")
17
+
18
+ class SimplePagination(BaseModel):
19
+ page:int = Field(1, ge=1, description="Page number, must be >= 1.")
20
+ limit:int = Field(10, ge=1, le=100, description="Page size, must be 1 <= limit <= 100.")
21
+
22
+ #* ----- ----- ----- Data ----- ----- ----- *#
23
+ class Identifiers(BaseModel):
24
+ id:int = Field(..., ge=1, description="Data's ID, must be >= 1.")
25
+ uuid:UUID = Field(..., description="Data's UUID.")
26
+
27
+ class Timestamps(BaseModel):
28
+ created_at:datetime = Field(..., description="Data's created_at timestamp")
29
+ updated_at:datetime = Field(..., description="Data's updated_at timestamp")
30
+ deleted_at:BaseTypes.OptionalDatetime = Field(..., description="Data's deleted_at timestamp")
31
+ restored_at:BaseTypes.OptionalDatetime = Field(..., description="Data's restored_at timestamp")
32
+ deactivated_at:BaseTypes.OptionalDatetime = Field(..., description="Data's deactivated_at timestamp")
33
+ activated_at:datetime = Field(..., description="Data's activated_at timestamp")
34
+
35
+ class Status(BaseModel):
36
+ status:BaseEnums.StatusType = Field(..., description="Data's status")
37
+
38
+ class IsDefault(BaseModel):
39
+ is_default:BaseTypes.OptionalBoolean = Field(None, description="Whether data is default")
40
+
41
+ class IsRoot(BaseModel):
42
+ is_root:BaseTypes.OptionalBoolean = Field(None, description="Whether data is root")
43
+
44
+ class IsParent(BaseModel):
45
+ is_parent:BaseTypes.OptionalBoolean = Field(None, description="Whether data is parent")
46
+
47
+ class IsChild(BaseModel):
48
+ is_child:BaseTypes.OptionalBoolean = Field(None, description="Whether data is child")
49
+
50
+ class IsLeaf(BaseModel):
51
+ is_leaf:BaseTypes.OptionalBoolean = Field(None, description="Whether data is leaf")
52
+
53
+ class Order(BaseModel):
54
+ order:BaseTypes.OptionalInteger = Field(..., description="Data's order")
55
+
56
+ class Code(BaseModel):
57
+ code:str = Field(..., description="Data's code")
58
+
59
+ class Key(BaseModel):
60
+ key:str = Field(..., description="Data's key")
61
+
62
+ class Name(BaseModel):
63
+ name:str = Field(..., description="Data's name")
64
+
65
+ class Secret(BaseModel):
66
+ secret:UUID = Field(..., description="Data's secret")
67
+
68
+ #* ----- ----- ----- RSA Key ----- ----- ----- *#
69
+ class PrivateKey(BaseModel):
70
+ private_key:str = Field(..., description="Private key in str format.")
71
+
72
+ class PublicKey(BaseModel):
73
+ public_key:str = Field(..., description="Public key in str format.")
74
+
75
+ class KeyPair(PublicKey, PrivateKey): pass
76
+
77
+ class RSAKeys(BaseModel):
78
+ password:str = Field(..., description="Key's password")
79
+ private:str = Field(..., description="Private key")
80
+ public:str = Field(..., description="Public key")
@@ -43,21 +43,6 @@ class BaseParameterSchemas:
43
43
  class OptionalListOfStatuses(BaseModel):
44
44
  statuses:BaseTypes.OptionalListOfStatuses = Field(None, description="Data's status")
45
45
 
46
- class IsDefault(BaseModel):
47
- is_default:BaseTypes.OptionalBoolean = Field(None, description="Whether data is default")
48
-
49
- class IsRoot(BaseModel):
50
- is_root:BaseTypes.OptionalBoolean = Field(None, description="Whether data is root")
51
-
52
- class IsParent(BaseModel):
53
- is_parent:BaseTypes.OptionalBoolean = Field(None, description="Whether data is parent")
54
-
55
- class IsChild(BaseModel):
56
- is_child:BaseTypes.OptionalBoolean = Field(None, description="Whether data is child")
57
-
58
- class IsLeaf(BaseModel):
59
- is_leaf:BaseTypes.OptionalBoolean = Field(None, description="Whether data is leaf")
60
-
61
46
  class OptionalListOfCodes(BaseModel):
62
47
  codes:BaseTypes.OptionalListOfStrings = Field(None, description="Specific Codes")
63
48
 
@@ -1,7 +1,5 @@
1
1
  from pydantic import BaseModel, Field
2
- from datetime import datetime
3
2
  from typing import Dict, Optional, Union, Any
4
- from uuid import UUID
5
3
  from maleo_foundation.models.schemas.general import BaseGeneralSchemas
6
4
  from maleo_foundation.types import BaseTypes
7
5
 
@@ -16,33 +14,6 @@ class ResultMetadata(BaseModel):
16
14
  field_expansion:Optional[Union[str, Dict[str, FieldExpansionMetadata]]] = Field(None, description="Field expansion metadata")
17
15
 
18
16
  class BaseResultSchemas:
19
- class Identifiers(BaseModel):
20
- id:int = Field(..., ge=1, description="Data's ID, must be >= 1.")
21
- uuid:UUID = Field(..., description="Data's UUID.")
22
-
23
- class Timestamps(BaseModel):
24
- created_at:datetime = Field(..., description="Data's created_at timestamp")
25
- updated_at:datetime = Field(..., description="Data's updated_at timestamp")
26
- deleted_at:BaseTypes.OptionalDatetime = Field(..., description="Data's deleted_at timestamp")
27
- restored_at:BaseTypes.OptionalDatetime = Field(..., description="Data's restored_at timestamp")
28
- deactivated_at:BaseTypes.OptionalDatetime = Field(..., description="Data's deactivated_at timestamp")
29
- activated_at:datetime = Field(..., description="Data's activated_at timestamp")
30
-
31
- class Order(BaseModel):
32
- order:BaseTypes.OptionalInteger = Field(..., description="Data's order")
33
-
34
- class Code(BaseModel):
35
- code:str = Field(..., description="Data's code")
36
-
37
- class Key(BaseModel):
38
- key:str = Field(..., description="Data's key")
39
-
40
- class Name(BaseModel):
41
- name:str = Field(..., description="Data's name")
42
-
43
- class Secret(BaseModel):
44
- secret:UUID = Field(..., description="Data's secret")
45
-
46
17
  class ExtendedPagination(BaseGeneralSchemas.SimplePagination):
47
18
  data_count:int = Field(..., description="Fetched data count")
48
19
  total_data:int = Field(..., description="Total data count")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maleo_foundation
3
- Version: 0.2.57
3
+ Version: 0.2.59
4
4
  Summary: Foundation package for Maleo
5
5
  Author-email: Agra Bima Yuda <agra@nexmedis.com>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "maleo_foundation"
7
- version = "0.2.57"
7
+ version = "0.2.59"
8
8
  description = "Foundation package for Maleo"
9
9
  authors = [
10
10
  { name = "Agra Bima Yuda", email = "agra@nexmedis.com" }
@@ -1,34 +0,0 @@
1
- from __future__ import annotations
2
- from pydantic import BaseModel, Field
3
- from maleo_foundation.enums import BaseEnums
4
- from maleo_foundation.types import BaseTypes
5
-
6
- class BaseGeneralSchemas:
7
- class DateFilter(BaseModel):
8
- name:str = Field(..., description="Column name.")
9
- from_date:BaseTypes.OptionalDatetime = Field(None, description="From date.")
10
- to_date:BaseTypes.OptionalDatetime = Field(None, description="To date.")
11
-
12
- class SortColumn(BaseModel):
13
- name:str = Field(..., description="Column name.")
14
- order:BaseEnums.SortOrder = Field(..., description="Sort order.")
15
-
16
- class SimplePagination(BaseModel):
17
- page:int = Field(1, ge=1, description="Page number, must be >= 1.")
18
- limit:int = Field(10, ge=1, le=100, description="Page size, must be 1 <= limit <= 100.")
19
-
20
- class PrivateKey(BaseModel):
21
- private_key:str = Field(..., description="Private key in str format.")
22
-
23
- class PublicKey(BaseModel):
24
- public_key:str = Field(..., description="Public key in str format.")
25
-
26
- class KeyPair(PublicKey, PrivateKey): pass
27
-
28
- class Status(BaseModel):
29
- status:BaseEnums.StatusType = Field(..., description="Data's status")
30
-
31
- class RSAKeys(BaseModel):
32
- password:str = Field(..., description="Key's password")
33
- private:str = Field(..., description="Private key")
34
- public:str = Field(..., description="Public key")