maleo-foundation 0.2.12__py3-none-any.whl → 0.2.13__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.
- maleo_foundation/models/transfers/parameters/client.py +17 -16
- maleo_foundation/models/transfers/parameters/service.py +4 -32
- {maleo_foundation-0.2.12.dist-info → maleo_foundation-0.2.13.dist-info}/METADATA +1 -1
- {maleo_foundation-0.2.12.dist-info → maleo_foundation-0.2.13.dist-info}/RECORD +6 -6
- {maleo_foundation-0.2.12.dist-info → maleo_foundation-0.2.13.dist-info}/WHEEL +0 -0
- {maleo_foundation-0.2.12.dist-info → maleo_foundation-0.2.13.dist-info}/top_level.txt +0 -0
@@ -10,8 +10,7 @@ class BaseClientParametersTransfers:
|
|
10
10
|
BaseParameterSchemas.SortColumns,
|
11
11
|
BaseGeneralSchemas.Search,
|
12
12
|
BaseGeneralSchemas.Statuses,
|
13
|
-
BaseParameterSchemas.DateFilters
|
14
|
-
BaseGeneralSchemas.Ids,
|
13
|
+
BaseParameterSchemas.DateFilters
|
15
14
|
):
|
16
15
|
pass
|
17
16
|
|
@@ -51,15 +50,16 @@ class BaseClientParametersTransfers:
|
|
51
50
|
self.filters = filter
|
52
51
|
|
53
52
|
return self
|
54
|
-
|
55
|
-
|
56
|
-
|
53
|
+
|
54
|
+
@property
|
55
|
+
def query_params(self) -> dict[str, Any]:
|
56
|
+
raw_params = {
|
57
|
+
"filters": self.filters,
|
58
|
+
"statuses": self.statuses,
|
57
59
|
"search": self.search,
|
58
60
|
"sorts": self.sorts,
|
59
|
-
"filters": self.filters,
|
60
61
|
}
|
61
|
-
|
62
|
-
params["statuses"] = self.statuses
|
62
|
+
params = {k: v for k, v in raw_params.items() if v not in (None, [], "")}
|
63
63
|
return params
|
64
64
|
|
65
65
|
class GetPaginatedMultiple(
|
@@ -104,15 +104,16 @@ class BaseClientParametersTransfers:
|
|
104
104
|
self.filters = filter
|
105
105
|
|
106
106
|
return self
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
"
|
107
|
+
|
108
|
+
@property
|
109
|
+
def query_params(self) -> dict[str, Any]:
|
110
|
+
raw_params = {
|
111
|
+
"filters": self.filters,
|
112
|
+
"statuses": self.statuses,
|
112
113
|
"search": self.search,
|
113
114
|
"sorts": self.sorts,
|
114
|
-
"
|
115
|
+
"page": self.page,
|
116
|
+
"limit": self.limit
|
115
117
|
}
|
116
|
-
|
117
|
-
params["statuses"] = self.statuses
|
118
|
+
params = {k: v for k, v in raw_params.items() if v not in (None, [], "")}
|
118
119
|
return params
|
@@ -1,19 +1,17 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
from datetime import datetime
|
3
|
-
from pydantic import
|
4
|
-
from typing import
|
3
|
+
from pydantic import model_validator
|
4
|
+
from typing import Self
|
5
5
|
from maleo_foundation.enums import BaseEnums
|
6
6
|
from maleo_foundation.models.schemas.general import BaseGeneralSchemas
|
7
7
|
from maleo_foundation.models.schemas.parameter import BaseParameterSchemas
|
8
|
-
from maleo_foundation.types import BaseTypes
|
9
8
|
|
10
9
|
class BaseServiceParametersTransfers:
|
11
10
|
class GetUnpaginatedMultipleQuery(
|
12
11
|
BaseParameterSchemas.Sorts,
|
13
12
|
BaseGeneralSchemas.Search,
|
14
13
|
BaseGeneralSchemas.Statuses,
|
15
|
-
BaseParameterSchemas.Filters
|
16
|
-
BaseGeneralSchemas.Ids
|
14
|
+
BaseParameterSchemas.Filters
|
17
15
|
): pass
|
18
16
|
|
19
17
|
class GetUnpaginatedMultiple(
|
@@ -131,30 +129,4 @@ class BaseServiceParametersTransfers:
|
|
131
129
|
|
132
130
|
#* Update date_filters
|
133
131
|
self.date_filters = date_filters
|
134
|
-
return self
|
135
|
-
|
136
|
-
class UniqueFieldCheck(BaseModel):
|
137
|
-
operation:BaseEnums.OperationType = Field(..., description="Operation to be conducted")
|
138
|
-
field:BaseEnums.IdentifierTypes = Field(..., description="Field to be checked")
|
139
|
-
new_value:BaseTypes.OptionalAny = Field(..., description="New field's value")
|
140
|
-
old_value:BaseTypes.OptionalAny = Field(None, description="Old field's value")
|
141
|
-
nullable:bool = Field(False, description="Whether to allow null field's value")
|
142
|
-
suggestion:BaseTypes.OptionalString = Field(None, description="Suggestion on discrepancy")
|
143
|
-
|
144
|
-
UniqueFieldChecks = list[UniqueFieldCheck]
|
145
|
-
|
146
|
-
status_update_criterias:dict[
|
147
|
-
BaseEnums.StatusUpdateAction,
|
148
|
-
Optional[list[BaseEnums.StatusType]]
|
149
|
-
] = {
|
150
|
-
BaseEnums.StatusUpdateAction.DELETE: None,
|
151
|
-
BaseEnums.StatusUpdateAction.RESTORE: None,
|
152
|
-
BaseEnums.StatusUpdateAction.DEACTIVATE: [
|
153
|
-
BaseEnums.StatusType.INACTIVE,
|
154
|
-
BaseEnums.StatusType.ACTIVE,
|
155
|
-
],
|
156
|
-
BaseEnums.StatusUpdateAction.ACTIVATE: [
|
157
|
-
BaseEnums.StatusType.INACTIVE,
|
158
|
-
BaseEnums.StatusType.ACTIVE,
|
159
|
-
]
|
160
|
-
}
|
132
|
+
return self
|
@@ -62,10 +62,10 @@ maleo_foundation/models/transfers/general/key.py,sha256=tLKkXbwNu7Oc1MdKa8-Y7TlB
|
|
62
62
|
maleo_foundation/models/transfers/general/signature.py,sha256=J9xQy2HjpCQOnES7RJqsUnDgjFPuakQ1mxyfdTdstSE,297
|
63
63
|
maleo_foundation/models/transfers/general/token.py,sha256=QckgF39hRAFU9GNXZsQ20kfaGom5Ppw5ShYaqDbeje8,2698
|
64
64
|
maleo_foundation/models/transfers/parameters/__init__.py,sha256=oKW4RPIEISISRjsJzD8lsCGY1HhZRTzshPpWHcJu86k,353
|
65
|
-
maleo_foundation/models/transfers/parameters/client.py,sha256=
|
65
|
+
maleo_foundation/models/transfers/parameters/client.py,sha256=3X1iCThKr72_vds4gdldB0YxTlXoLTF1rGbsXyjyBpg,4051
|
66
66
|
maleo_foundation/models/transfers/parameters/general.py,sha256=WoekZJCIoAllhXdRIJkNRdNq0QEIn0bteiHJLtzkCxU,579
|
67
67
|
maleo_foundation/models/transfers/parameters/key.py,sha256=ZhWcbPJZvl8AF_qlecG-4-9_Ym6EbU7nngRo3AtbScY,432
|
68
|
-
maleo_foundation/models/transfers/parameters/service.py,sha256=
|
68
|
+
maleo_foundation/models/transfers/parameters/service.py,sha256=kG9C0it_pvX0kg2tYQeKl645IrosBkxSjr5vpQbIkx4,5494
|
69
69
|
maleo_foundation/models/transfers/parameters/signature.py,sha256=ysYkALwqNXn13HP8xUOnPlboL9pgFLmQ9f7OpZe9dDw,483
|
70
70
|
maleo_foundation/models/transfers/parameters/token.py,sha256=kIUhz86-9qEiWxZXIva33-iIdHDS9ca-_7SDvgOxitw,623
|
71
71
|
maleo_foundation/models/transfers/parameters/encryption/__init__.py,sha256=w1-J_cVp8vPUVaAkTEpTTZ5S6R2wKxpqKj1Eu2cj-w0,322
|
@@ -110,7 +110,7 @@ maleo_foundation/utils/loaders/credential/__init__.py,sha256=qopTKvcMVoTFwyRijeg
|
|
110
110
|
maleo_foundation/utils/loaders/credential/google.py,sha256=deksZXT5wPhEsSMHbZ3x05WHXxCjLDt76Ns-1Tmhp7g,948
|
111
111
|
maleo_foundation/utils/loaders/key/__init__.py,sha256=hVygcC2ImHc_aVrSrOmyedR8tMUZokWUKCKOSh5ctbo,106
|
112
112
|
maleo_foundation/utils/loaders/key/rsa.py,sha256=gDhyX6iTFtHiluuhFCozaZ3pOLKU2Y9TlrNMK_GVyGU,3796
|
113
|
-
maleo_foundation-0.2.
|
114
|
-
maleo_foundation-0.2.
|
115
|
-
maleo_foundation-0.2.
|
116
|
-
maleo_foundation-0.2.
|
113
|
+
maleo_foundation-0.2.13.dist-info/METADATA,sha256=wK3PlGk86D86G3yybnLnCm3UBhY_4ENQ8V3P7GIGaNw,3419
|
114
|
+
maleo_foundation-0.2.13.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
|
115
|
+
maleo_foundation-0.2.13.dist-info/top_level.txt,sha256=_iBos3F_bhEOdjOnzeiEYSrCucasc810xXtLBXI8cQc,17
|
116
|
+
maleo_foundation-0.2.13.dist-info/RECORD,,
|
File without changes
|
File without changes
|