maleo-foundation 0.0.12__py3-none-any.whl → 0.0.16__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.
@@ -39,7 +39,10 @@ class BaseResponses:
39
39
  message:str = "Unexpected Server Error"
40
40
  description:str = "An unexpected error occurred while processing your request."
41
41
 
42
- class NoData(BaseResultSchemas.NoData): pass
42
+ class NoData(BaseResultSchemas.NoData):
43
+ code:str = "MAL-NDT-001"
44
+ message:str = "No data found"
45
+ description:str = "No data found in the resource you requested."
43
46
 
44
47
  class SingleData(BaseResultSchemas.SingleData): pass
45
48
 
@@ -72,6 +75,10 @@ class BaseResponses:
72
75
 
73
76
  #* ----- ----- Responses Class ----- ----- *#
74
77
  other_responses={
78
+ status.HTTP_200_OK: {
79
+ "description": "No Data Response",
80
+ "model": NoData
81
+ },
75
82
  status.HTTP_401_UNAUTHORIZED: {
76
83
  "description": "Unauthorized Response",
77
84
  "model": Unauthorized
@@ -30,7 +30,7 @@ class BaseClientParametersTransfers:
30
30
 
31
31
  #* Only update if we have valid sort, otherwise keep the default
32
32
  if sort:
33
- self.sort = sort
33
+ self.sorts = sort
34
34
 
35
35
  return self
36
36
 
@@ -49,7 +49,7 @@ class BaseClientParametersTransfers:
49
49
 
50
50
  #* Only update if we have valid filter, otherwise keep the default
51
51
  if filter:
52
- self.filter = filter
52
+ self.filters = filter
53
53
 
54
54
  return self
55
55
 
@@ -58,8 +58,8 @@ class BaseClientParametersTransfers:
58
58
  "page": self.page,
59
59
  "limit": self.limit,
60
60
  "search": self.search,
61
- "sort": self.sort,
62
- "filter": self.filter,
61
+ "sorts": self.sorts,
62
+ "filters": self.filters,
63
63
  }
64
64
  if hasattr(self, "statuses") and self.statuses is not None:
65
65
  params["statuses"] = self.statuses
@@ -20,7 +20,7 @@ class BaseServiceParametersTransfers:
20
20
  ):
21
21
  @field_validator("sorts")
22
22
  @classmethod
23
- def validate_sort_columns(cls, values):
23
+ def validate_sorts(cls, values):
24
24
  if not isinstance(values, list):
25
25
  return ["id.asc"]
26
26
  return [value for value in values if SORT_COLUMN_PATTERN.match(value)]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maleo_foundation
3
- Version: 0.0.12
3
+ Version: 0.0.16
4
4
  Summary: Foundation package for Maleo
5
5
  Author-email: Agra Bima Yuda <agra@nexmedis.com>
6
6
  License: MIT
@@ -18,16 +18,16 @@ maleo_foundation/middlewares/base.py,sha256=KcpODNs0DQXX8Cwc6T9dC6aiZIqxTLtuJjVA
18
18
  maleo_foundation/middlewares/cors.py,sha256=9uvBvY2N6Vxa9RP_YtESxcWo6Doi6uS0lzAG9iLY7Uc,2288
19
19
  maleo_foundation/models/__init__.py,sha256=Wh92XAduE1Sg9qi2GMhptyXig0fKcTS5AbGo3tE3tLs,348
20
20
  maleo_foundation/models/enums.py,sha256=Ob2v312JxypHEq7hTKZKOV462FEeLkIjIhpx-YF6Jdw,2203
21
- maleo_foundation/models/responses.py,sha256=z2XEHwuxU05NDJSgrA7B7e2fzEQP6Kl3ZM2BO-lDw_A,3786
21
+ maleo_foundation/models/responses.py,sha256=t8KNnn6yTXmNZwS1ouqUR0TLv9Beh6G83nsrFVdAqeg,4041
22
22
  maleo_foundation/models/schemas/__init__.py,sha256=Xj8Ahsqyra-fmEaVcGPok5GOOsPQlKcknHYMvbjvENA,277
23
23
  maleo_foundation/models/schemas/general.py,sha256=-SI19QtHvusbJnj5m5-Kua4jjHkYGoi3FWOJ9RUvobQ,6466
24
24
  maleo_foundation/models/schemas/parameter.py,sha256=1og_crWds6YLS-8Ha5EbAi3ZaNMzNFiIZ06v_HO3b9k,875
25
25
  maleo_foundation/models/schemas/result.py,sha256=fzzq5mbJSwTXt6r-m9Yz9XNx36gGtroaj7dCCySKSFo,1870
26
26
  maleo_foundation/models/transfers/__init__.py,sha256=B8oCZHE3NTsrJ_rviSXaDsuc-gc25jpjuhJO40lpQiE,222
27
27
  maleo_foundation/models/transfers/parameters/__init__.py,sha256=oKW4RPIEISISRjsJzD8lsCGY1HhZRTzshPpWHcJu86k,353
28
- maleo_foundation/models/transfers/parameters/client.py,sha256=blvG0ICEwlo1KU_3Gu2hkoiEIC6JgzGQkASWj6oe070,2281
28
+ maleo_foundation/models/transfers/parameters/client.py,sha256=Q43A-Z7JPXcxb_v7iUKoA1_WV8AMdEaeSl9Z39WSF_8,2287
29
29
  maleo_foundation/models/transfers/parameters/general.py,sha256=TDDUAc7GsKA9jhpan5BqoGVpOcwJPHpV34atXEd0D60,532
30
- maleo_foundation/models/transfers/parameters/service.py,sha256=2KDOSRHgQMPHbtUK_zvEX9UhwjZtOpcttuJCbxRgwpE,5365
30
+ maleo_foundation/models/transfers/parameters/service.py,sha256=4_khFthR0JD5FklRYQNCG_8gMJmLTfAno7kQFEK1An4,5358
31
31
  maleo_foundation/models/transfers/results/__init__.py,sha256=0_8uJ1IQW87RZ4nIxzWkQVi3Fxb7B8myZTngXfoxgNc,241
32
32
  maleo_foundation/models/transfers/results/client/__init__.py,sha256=xBRuY0NUIPpQEGQ2qoBnqLZGX4W1YSrQ0VnDf5OYJBo,290
33
33
  maleo_foundation/models/transfers/results/client/service.py,sha256=TO_U53vmUEnFWiiyuu33ao3BUidt6KFxvk3GC9uo8JE,1108
@@ -47,7 +47,7 @@ maleo_foundation/utils/exceptions.py,sha256=mcvBwHm6uWpVQkPtO1T2j-GaTYEiyPOeGxiD
47
47
  maleo_foundation/utils/logger.py,sha256=ICrFi0MxuAjDy8KTRL7pex1miwzZqZX-HHArgN3niJM,2453
48
48
  maleo_foundation/utils/formatter/__init__.py,sha256=iKf5YCbEdg1qKnFHyKqqcQbqAqEeRUf8mhI3v3dQoj8,78
49
49
  maleo_foundation/utils/formatter/case.py,sha256=TmvvlfzGdC_omMTB5vAa40TZBxQ3hnr-SYeo0M52Rlg,1352
50
- maleo_foundation-0.0.12.dist-info/METADATA,sha256=PxCPsR-oCipfb9OQZ3ZWVp3tjQ0S6Qwuy5ZOxyAzSjU,3160
51
- maleo_foundation-0.0.12.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
52
- maleo_foundation-0.0.12.dist-info/top_level.txt,sha256=_iBos3F_bhEOdjOnzeiEYSrCucasc810xXtLBXI8cQc,17
53
- maleo_foundation-0.0.12.dist-info/RECORD,,
50
+ maleo_foundation-0.0.16.dist-info/METADATA,sha256=Nxwg4nNdtsBs5KasmToCcKqEzsPYu2TgoXp2DIRQMS0,3160
51
+ maleo_foundation-0.0.16.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
52
+ maleo_foundation-0.0.16.dist-info/top_level.txt,sha256=_iBos3F_bhEOdjOnzeiEYSrCucasc810xXtLBXI8cQc,17
53
+ maleo_foundation-0.0.16.dist-info/RECORD,,