maleo-foundation 0.2.24__tar.gz → 0.2.26__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 (127) hide show
  1. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/PKG-INFO +1 -1
  2. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/enums.py +3 -2
  3. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/expanded_types/__init__.py +2 -2
  4. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/expanded_types/query.py +16 -16
  5. maleo_foundation-0.2.26/maleo_foundation/managers/client/google/__init__.py +0 -0
  6. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/transfers/results/service/__init__.py +0 -2
  7. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/utils/exceptions.py +0 -31
  8. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation.egg-info/PKG-INFO +1 -1
  9. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation.egg-info/SOURCES.txt +1 -1
  10. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/pyproject.toml +1 -1
  11. maleo_foundation-0.2.24/maleo_foundation/models/transfers/results/service/query.py +0 -51
  12. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/README.md +0 -0
  13. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/__init__.py +0 -0
  14. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/authentication.py +0 -0
  15. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/authorization.py +0 -0
  16. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/client/__init__.py +0 -0
  17. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/client/manager.py +0 -0
  18. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/client/services/__init__.py +0 -0
  19. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/client/services/encryption/__init__.py +0 -0
  20. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/client/services/encryption/aes.py +0 -0
  21. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/client/services/encryption/rsa.py +0 -0
  22. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/client/services/hash/__init__.py +0 -0
  23. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/client/services/hash/bcrypt.py +0 -0
  24. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/client/services/hash/hmac.py +0 -0
  25. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/client/services/hash/sha256.py +0 -0
  26. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/client/services/key.py +0 -0
  27. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/client/services/signature.py +0 -0
  28. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/client/services/token.py +0 -0
  29. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/constants.py +0 -0
  30. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/expanded_types/client.py +0 -0
  31. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/expanded_types/encryption/__init__.py +0 -0
  32. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/expanded_types/encryption/aes.py +0 -0
  33. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/expanded_types/encryption/rsa.py +0 -0
  34. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/expanded_types/general.py +0 -0
  35. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/expanded_types/hash.py +0 -0
  36. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/expanded_types/key.py +0 -0
  37. /maleo_foundation-0.2.24/maleo_foundation/managers/__init__.py → /maleo_foundation-0.2.26/maleo_foundation/expanded_types/repository.py +0 -0
  38. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/expanded_types/service.py +0 -0
  39. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/expanded_types/signature.py +0 -0
  40. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/expanded_types/token.py +0 -0
  41. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/extended_types.py +0 -0
  42. {maleo_foundation-0.2.24/maleo_foundation/managers/client → maleo_foundation-0.2.26/maleo_foundation/managers}/__init__.py +0 -0
  43. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/managers/cache/__init__.py +0 -0
  44. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/managers/cache/redis.py +0 -0
  45. {maleo_foundation-0.2.24/maleo_foundation/managers/client/google → maleo_foundation-0.2.26/maleo_foundation/managers/client}/__init__.py +0 -0
  46. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/managers/client/base.py +0 -0
  47. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/managers/client/google/base.py +0 -0
  48. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/managers/client/google/parameter.py +0 -0
  49. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/managers/client/google/secret.py +0 -0
  50. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/managers/client/google/storage.py +0 -0
  51. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/managers/client/maleo.py +0 -0
  52. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/managers/db.py +0 -0
  53. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/managers/middleware.py +0 -0
  54. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/managers/service.py +0 -0
  55. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/middlewares/authentication.py +0 -0
  56. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/middlewares/base.py +0 -0
  57. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/middlewares/cors.py +0 -0
  58. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/__init__.py +0 -0
  59. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/responses.py +0 -0
  60. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/schemas/__init__.py +0 -0
  61. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/schemas/encryption.py +0 -0
  62. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/schemas/general.py +0 -0
  63. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/schemas/hash.py +0 -0
  64. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/schemas/key.py +0 -0
  65. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/schemas/parameter.py +0 -0
  66. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/schemas/result.py +0 -0
  67. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/schemas/signature.py +0 -0
  68. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/schemas/token.py +0 -0
  69. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/table.py +0 -0
  70. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/transfers/__init__.py +0 -0
  71. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/transfers/general/__init__.py +0 -0
  72. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/transfers/general/key.py +0 -0
  73. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/transfers/general/signature.py +0 -0
  74. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/transfers/general/token.py +0 -0
  75. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/transfers/parameters/__init__.py +0 -0
  76. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/transfers/parameters/client.py +0 -0
  77. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/transfers/parameters/encryption/__init__.py +0 -0
  78. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/transfers/parameters/encryption/aes.py +0 -0
  79. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/transfers/parameters/encryption/rsa.py +0 -0
  80. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/transfers/parameters/general.py +0 -0
  81. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/transfers/parameters/hash/__init__.py +0 -0
  82. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/transfers/parameters/hash/bcrypt.py +0 -0
  83. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/transfers/parameters/hash/hmac.py +0 -0
  84. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/transfers/parameters/hash/sha256.py +0 -0
  85. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/transfers/parameters/key.py +0 -0
  86. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/transfers/parameters/service.py +0 -0
  87. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/transfers/parameters/signature.py +0 -0
  88. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/transfers/parameters/token.py +0 -0
  89. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/transfers/results/__init__.py +0 -0
  90. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/transfers/results/client/__init__.py +0 -0
  91. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/transfers/results/client/controllers/__init__.py +0 -0
  92. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/transfers/results/client/controllers/http.py +0 -0
  93. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/transfers/results/client/service.py +0 -0
  94. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/transfers/results/encryption/__init__.py +0 -0
  95. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/transfers/results/encryption/aes.py +0 -0
  96. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/transfers/results/encryption/rsa.py +0 -0
  97. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/transfers/results/hash.py +0 -0
  98. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/transfers/results/key.py +0 -0
  99. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/transfers/results/service/controllers/__init__.py +0 -0
  100. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/transfers/results/service/controllers/rest.py +0 -0
  101. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/transfers/results/service/general.py +0 -0
  102. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/transfers/results/service/repository.py +0 -0
  103. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/transfers/results/signature.py +0 -0
  104. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/models/transfers/results/token.py +0 -0
  105. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/types.py +0 -0
  106. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/utils/__init__.py +0 -0
  107. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/utils/controller.py +0 -0
  108. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/utils/dependencies/__init__.py +0 -0
  109. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/utils/dependencies/auth.py +0 -0
  110. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/utils/extractor.py +0 -0
  111. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/utils/formatter/__init__.py +0 -0
  112. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/utils/formatter/case.py +0 -0
  113. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/utils/loaders/__init__.py +0 -0
  114. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/utils/loaders/credential/__init__.py +0 -0
  115. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/utils/loaders/credential/google.py +0 -0
  116. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/utils/loaders/json.py +0 -0
  117. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/utils/loaders/key/__init__.py +0 -0
  118. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/utils/loaders/key/rsa.py +0 -0
  119. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/utils/loaders/yaml.py +0 -0
  120. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/utils/logging.py +0 -0
  121. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/utils/mergers.py +0 -0
  122. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/utils/query.py +0 -0
  123. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation/utils/repository.py +0 -0
  124. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation.egg-info/dependency_links.txt +0 -0
  125. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation.egg-info/requires.txt +0 -0
  126. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/maleo_foundation.egg-info/top_level.txt +0 -0
  127. {maleo_foundation-0.2.24 → maleo_foundation-0.2.26}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maleo_foundation
3
- Version: 0.2.24
3
+ Version: 0.2.26
4
4
  Summary: Foundation package for Maleo
5
5
  Author-email: Agra Bima Yuda <agra@nexmedis.com>
6
6
  License: MIT
@@ -120,6 +120,7 @@ class BaseEnums:
120
120
  TTL_6HR = int(6*60*60)
121
121
  TTL_12HR = int(12*60*60)
122
122
  TTL_1DY = int(1*24*60*60)
123
- TTL_7DY = int(7*24*60*60)
123
+ TTL_3DY = int(3*24*60*60)
124
124
  TTL_1WK = int(1*24*60*60)
125
- TTL_7WK = int(7*24*60*60)
125
+ TTL_2WK = int(2*24*60*60)
126
+ TTL_1MO = int(1*30*24*60*60)
@@ -1,11 +1,11 @@
1
1
  from __future__ import annotations
2
2
  from .general import BaseGeneralExpandedTypes
3
- from .query import ExpandedQueryTypes
3
+ from .repository import ExpandedRepositoryTypes
4
4
  from .service import ExpandedServiceTypes
5
5
  from .client import ExpandedClientTypes
6
6
 
7
7
  class BaseExpandedTypes:
8
8
  General = BaseGeneralExpandedTypes
9
- Query = ExpandedQueryTypes
9
+ Repository = ExpandedRepositoryTypes
10
10
  Service = ExpandedServiceTypes
11
11
  Client = ExpandedClientTypes
@@ -3,16 +3,16 @@ from maleo_foundation.models.transfers.parameters.general \
3
3
  import BaseGeneralParametersTransfers
4
4
  from maleo_foundation.models.transfers.parameters.service \
5
5
  import BaseServiceParametersTransfers
6
- from maleo_foundation.models.transfers.results.service.query \
7
- import BaseServiceQueryResultsTransfers
6
+ from maleo_foundation.models.transfers.results.service.repository \
7
+ import BaseServiceRepositoryResultsTransfers
8
8
 
9
- class ExpandedQueryTypes:
9
+ class ExpandedRepositoryTypes:
10
10
  #* Unpaginated multiple data
11
11
  GetUnpaginatedMultipleParameter = BaseServiceParametersTransfers.GetUnpaginatedMultiple
12
12
  GetUnpaginatedMultipleResult = Union[
13
- BaseServiceQueryResultsTransfers.Fail,
14
- BaseServiceQueryResultsTransfers.NoData,
15
- BaseServiceQueryResultsTransfers.UnpaginatedMultipleData
13
+ BaseServiceRepositoryResultsTransfers.Fail,
14
+ BaseServiceRepositoryResultsTransfers.NoData,
15
+ BaseServiceRepositoryResultsTransfers.UnpaginatedMultipleData
16
16
  ]
17
17
  SyncGetUnpaginatedMultipleFunction = Callable[
18
18
  [GetUnpaginatedMultipleParameter],
@@ -26,9 +26,9 @@ class ExpandedQueryTypes:
26
26
  #* Paginated multiple data
27
27
  GetPaginatedMultipleParameter = BaseServiceParametersTransfers.GetPaginatedMultiple
28
28
  GetPaginatedMultipleResult = Union[
29
- BaseServiceQueryResultsTransfers.Fail,
30
- BaseServiceQueryResultsTransfers.NoData,
31
- BaseServiceQueryResultsTransfers.PaginatedMultipleData
29
+ BaseServiceRepositoryResultsTransfers.Fail,
30
+ BaseServiceRepositoryResultsTransfers.NoData,
31
+ BaseServiceRepositoryResultsTransfers.PaginatedMultipleData
32
32
  ]
33
33
  SyncGetPaginatedMultipleFunction = Callable[
34
34
  [GetPaginatedMultipleParameter],
@@ -42,9 +42,9 @@ class ExpandedQueryTypes:
42
42
  #* Single data
43
43
  GetSingleParameter = BaseGeneralParametersTransfers.GetSingle
44
44
  GetSingleResult = Union[
45
- BaseServiceQueryResultsTransfers.Fail,
46
- BaseServiceQueryResultsTransfers.NoData,
47
- BaseServiceQueryResultsTransfers.SingleData
45
+ BaseServiceRepositoryResultsTransfers.Fail,
46
+ BaseServiceRepositoryResultsTransfers.NoData,
47
+ BaseServiceRepositoryResultsTransfers.SingleData
48
48
  ]
49
49
  SyncGetSingleFunction = Callable[
50
50
  [GetSingleParameter],
@@ -57,12 +57,12 @@ class ExpandedQueryTypes:
57
57
 
58
58
  #* Create or Update
59
59
  CreateOrUpdateResult = Union[
60
- BaseServiceQueryResultsTransfers.Fail,
61
- BaseServiceQueryResultsTransfers.SingleData
60
+ BaseServiceRepositoryResultsTransfers.Fail,
61
+ BaseServiceRepositoryResultsTransfers.SingleData
62
62
  ]
63
63
 
64
64
  #* Status update
65
65
  StatusUpdateResult = Union[
66
- BaseServiceQueryResultsTransfers.Fail,
67
- BaseServiceQueryResultsTransfers.SingleData
66
+ BaseServiceRepositoryResultsTransfers.Fail,
67
+ BaseServiceRepositoryResultsTransfers.SingleData
68
68
  ]
@@ -1,11 +1,9 @@
1
1
  from __future__ import annotations
2
2
  from .general import BaseServiceGeneralResultsTransfers
3
- from .query import BaseServiceQueryResultsTransfers
4
3
  from .repository import BaseServiceRepositoryResultsTransfers
5
4
  from .controllers import BaseServiceControllerResultsTransfers
6
5
 
7
6
  class BaseServiceResultsTransfers:
8
7
  General = BaseServiceGeneralResultsTransfers
9
- Query = BaseServiceQueryResultsTransfers
10
8
  Repository = BaseServiceRepositoryResultsTransfers
11
9
  Controller = BaseServiceControllerResultsTransfers
@@ -10,8 +10,6 @@ from typing import Optional
10
10
  from maleo_foundation.models.responses import BaseResponses
11
11
  from maleo_foundation.models.transfers.results.service.general \
12
12
  import BaseServiceGeneralResultsTransfers
13
- from maleo_foundation.models.transfers.results.service.query \
14
- import BaseServiceQueryResultsTransfers
15
13
  from maleo_foundation.models.transfers.results.service.repository \
16
14
  import BaseServiceRepositoryResultsTransfers
17
15
  from maleo_foundation.utils.logging import BaseLogger
@@ -44,35 +42,6 @@ class BaseExceptions:
44
42
  status_code=status.HTTP_500_INTERNAL_SERVER_ERROR
45
43
  )
46
44
 
47
- @staticmethod
48
- def database_exception_handler(
49
- operation:str,
50
- logger:Optional[BaseLogger] = None,
51
- fail_result_class:type[BaseServiceQueryResultsTransfers.Fail] = BaseServiceQueryResultsTransfers.Fail
52
- ):
53
- """Decorator to handle database-related exceptions consistently."""
54
- def decorator(func):
55
- @wraps(func)
56
- def wrapper(*args, **kwargs):
57
- try:
58
- return func(*args, **kwargs)
59
- except SQLAlchemyError as e:
60
- logger.error("Database error occurred while %s: '%s'", operation, str(e), exc_info=True)
61
- return fail_result_class(
62
- message=f"Failed {operation}",
63
- description=f"A database error occurred while {operation}. Please try again later or contact administrator.",
64
- other="Database operation failed"
65
- )
66
- except Exception as e:
67
- logger.error("Unexpected error occurred while %s: '%s'", operation, str(e), exc_info=True)
68
- return fail_result_class(
69
- message=f"Failed {operation}",
70
- description=f"An unexpected error occurred while {operation}. Please try again later or contact administrator.",
71
- other="Internal processing error"
72
- )
73
- return wrapper
74
- return decorator
75
-
76
45
  @staticmethod
77
46
  def repository_exception_handler(
78
47
  operation:str,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maleo_foundation
3
- Version: 0.2.24
3
+ Version: 0.2.26
4
4
  Summary: Foundation package for Maleo
5
5
  Author-email: Agra Bima Yuda <agra@nexmedis.com>
6
6
  License: MIT
@@ -31,6 +31,7 @@ maleo_foundation/expanded_types/general.py
31
31
  maleo_foundation/expanded_types/hash.py
32
32
  maleo_foundation/expanded_types/key.py
33
33
  maleo_foundation/expanded_types/query.py
34
+ maleo_foundation/expanded_types/repository.py
34
35
  maleo_foundation/expanded_types/service.py
35
36
  maleo_foundation/expanded_types/signature.py
36
37
  maleo_foundation/expanded_types/token.py
@@ -99,7 +100,6 @@ maleo_foundation/models/transfers/results/encryption/aes.py
99
100
  maleo_foundation/models/transfers/results/encryption/rsa.py
100
101
  maleo_foundation/models/transfers/results/service/__init__.py
101
102
  maleo_foundation/models/transfers/results/service/general.py
102
- maleo_foundation/models/transfers/results/service/query.py
103
103
  maleo_foundation/models/transfers/results/service/repository.py
104
104
  maleo_foundation/models/transfers/results/service/controllers/__init__.py
105
105
  maleo_foundation/models/transfers/results/service/controllers/rest.py
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "maleo_foundation"
7
- version = "0.2.24"
7
+ version = "0.2.26"
8
8
  description = "Foundation package for Maleo"
9
9
  authors = [
10
10
  { name = "Agra Bima Yuda", email = "agra@nexmedis.com" }
@@ -1,51 +0,0 @@
1
- from __future__ import annotations
2
- from pydantic import model_validator
3
- from maleo_foundation.models.schemas.general import BaseGeneralSchemas
4
- from maleo_foundation.models.schemas.result import BaseResultSchemas
5
-
6
- class BaseServiceQueryResultsTransfers:
7
- class Row(
8
- BaseGeneralSchemas.Status,
9
- BaseGeneralSchemas.Timestamps,
10
- BaseGeneralSchemas.Identifiers,
11
- BaseResultSchemas.BaseRow
12
- ): pass
13
-
14
- class Fail(BaseResultSchemas.Fail): pass
15
-
16
- class NotFound(BaseResultSchemas.NotFound): pass
17
-
18
- class NoData(BaseResultSchemas.NoData): pass
19
-
20
- class SingleData(BaseResultSchemas.SingleData):
21
- data:BaseServiceQueryResultsTransfers.Row
22
-
23
- class UnpaginatedMultipleData(BaseResultSchemas.UnpaginatedMultipleData):
24
- data:list[BaseServiceQueryResultsTransfers.Row]
25
-
26
- class PaginatedMultipleData(BaseResultSchemas.PaginatedMultipleData):
27
- data:list[BaseServiceQueryResultsTransfers.Row]
28
-
29
- @model_validator(mode="before")
30
- @classmethod
31
- def calculate_pagination(cls, values: dict) -> dict:
32
- """Calculates pagination metadata before validation."""
33
- total_data = values.get("total_data", 0)
34
- data = values.get("data", [])
35
-
36
- #* Get pagination values from inherited SimplePagination
37
- page = values.get("page", 1)
38
- limit = values.get("limit", 10)
39
-
40
- #* Calculate total pages
41
- total_pages = (total_data // limit) + (1 if total_data % limit > 0 else 0)
42
-
43
- #* Assign computed pagination object before validation
44
- values["pagination"] = BaseGeneralSchemas.ExtendedPagination(
45
- page=page,
46
- limit=limit,
47
- data_count=len(data),
48
- total_data=total_data,
49
- total_pages=total_pages
50
- )
51
- return values