maleo-foundation 0.2.56__py3-none-any.whl → 0.2.58__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.
@@ -1,5 +1,7 @@
1
1
  from __future__ import annotations
2
+ from datetime import datetime
2
3
  from pydantic import BaseModel, Field
4
+ from uuid import UUID
3
5
  from maleo_foundation.enums import BaseEnums
4
6
  from maleo_foundation.types import BaseTypes
5
7
 
@@ -17,6 +19,53 @@ class BaseGeneralSchemas:
17
19
  page:int = Field(1, ge=1, description="Page number, must be >= 1.")
18
20
  limit:int = Field(10, ge=1, le=100, description="Page size, must be 1 <= limit <= 100.")
19
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 ----- ----- ----- *#
20
69
  class PrivateKey(BaseModel):
21
70
  private_key:str = Field(..., description="Private key in str format.")
22
71
 
@@ -25,9 +74,6 @@ class BaseGeneralSchemas:
25
74
 
26
75
  class KeyPair(PublicKey, PrivateKey): pass
27
76
 
28
- class Status(BaseModel):
29
- status:BaseEnums.StatusType = Field(..., description="Data's status")
30
-
31
77
  class RSAKeys(BaseModel):
32
78
  password:str = Field(..., description="Key's password")
33
79
  private:str = Field(..., description="Private key")
@@ -43,18 +43,6 @@ class BaseParameterSchemas:
43
43
  class OptionalListOfStatuses(BaseModel):
44
44
  statuses:BaseTypes.OptionalListOfStatuses = Field(None, description="Data's status")
45
45
 
46
- class IsRoot(BaseModel):
47
- is_root:BaseTypes.OptionalBoolean = Field(None, description="Whether data is root")
48
-
49
- class IsParent(BaseModel):
50
- is_parent:BaseTypes.OptionalBoolean = Field(None, description="Whether data is parent")
51
-
52
- class IsChild(BaseModel):
53
- is_child:BaseTypes.OptionalBoolean = Field(None, description="Whether data is child")
54
-
55
- class IsLeaf(BaseModel):
56
- is_leaf:BaseTypes.OptionalBoolean = Field(None, description="Whether data is leaf")
57
-
58
46
  class OptionalListOfCodes(BaseModel):
59
47
  codes:BaseTypes.OptionalListOfStrings = Field(None, description="Specific Codes")
60
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.56
3
+ Version: 0.2.58
4
4
  Summary: Foundation package for Maleo
5
5
  Author-email: Agra Bima Yuda <agra@nexmedis.com>
6
6
  License: MIT
@@ -54,11 +54,11 @@ maleo_foundation/models/responses.py,sha256=ab-DOERSqbhO25qTvQlVFmuroqsVcLAGaMDS
54
54
  maleo_foundation/models/table.py,sha256=tcOwj_Heqi6ode8rbD4eeSiixEYsAtUaUyJyqrYaMAw,1327
55
55
  maleo_foundation/models/schemas/__init__.py,sha256=Xj8Ahsqyra-fmEaVcGPok5GOOsPQlKcknHYMvbjvENA,277
56
56
  maleo_foundation/models/schemas/encryption.py,sha256=KYs2P57AqWpEROuqTuSuyt1Zk-jsIUKFeRWIfSwem74,658
57
- maleo_foundation/models/schemas/general.py,sha256=gm1Ho2mLT6_LTHNgKHBDfjkD411MBm22iZSf1SoSDW4,1417
57
+ maleo_foundation/models/schemas/general.py,sha256=W6bncs4z7tMiRL06xs4Q3mh9xHv7zXOXaDPC2VKr4vk,3430
58
58
  maleo_foundation/models/schemas/hash.py,sha256=db2uyCeUzvF2zDCcbiZMh1MxIOGOGezOMOx-M1ta4zI,441
59
59
  maleo_foundation/models/schemas/key.py,sha256=7FZxVqTL5qRK48AXL1odrMNhAwhwtCwSkBUPsJwuBII,594
60
- maleo_foundation/models/schemas/parameter.py,sha256=WO0HCdmolhwdkU92BZh1Vh-6XeUeusg5MqPogprBPdQ,3994
61
- maleo_foundation/models/schemas/result.py,sha256=Iu9ZWlX5_V3McEVNsDhOX17_5zdWI9C9_f0LhAXWnfs,5216
60
+ maleo_foundation/models/schemas/parameter.py,sha256=6jVHw538cnCK-SN8SlPVKWakeeJGn3yRNzHegR231j8,3497
61
+ maleo_foundation/models/schemas/result.py,sha256=MaWDyKGvZu0IcvKMj30lrMXojGV9Mhi4wer1QvMWcj0,3936
62
62
  maleo_foundation/models/schemas/signature.py,sha256=-5ldTnJsjwqPRbHw7PFcLKITqEXJ_qKDdRHShK75NVA,620
63
63
  maleo_foundation/models/schemas/token.py,sha256=RYq8v1T_WZIu8lcjwyV6Pp7ZjFkr_lW9x6QyDmXBsfw,563
64
64
  maleo_foundation/models/transfers/__init__.py,sha256=oJLJ3Geeme6vBw7R2Dhvdvg4ziVvzEYAGJaP-tm_90w,299
@@ -117,7 +117,7 @@ maleo_foundation/utils/loaders/credential/__init__.py,sha256=qopTKvcMVoTFwyRijeg
117
117
  maleo_foundation/utils/loaders/credential/google.py,sha256=SKsqPuFnAiCcYLf24CxKnMybhVHpgqnq1gGSlThqjts,994
118
118
  maleo_foundation/utils/loaders/key/__init__.py,sha256=hVygcC2ImHc_aVrSrOmyedR8tMUZokWUKCKOSh5ctbo,106
119
119
  maleo_foundation/utils/loaders/key/rsa.py,sha256=gDhyX6iTFtHiluuhFCozaZ3pOLKU2Y9TlrNMK_GVyGU,3796
120
- maleo_foundation-0.2.56.dist-info/METADATA,sha256=shtv4asKRzyRFxs4n9_0tOhpQrtKWRx-wEobMeHCTnU,3598
121
- maleo_foundation-0.2.56.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
122
- maleo_foundation-0.2.56.dist-info/top_level.txt,sha256=_iBos3F_bhEOdjOnzeiEYSrCucasc810xXtLBXI8cQc,17
123
- maleo_foundation-0.2.56.dist-info/RECORD,,
120
+ maleo_foundation-0.2.58.dist-info/METADATA,sha256=_V6ypomt5loZpFHzokl0RgznOfOc-qKc2oXGElSJIH8,3598
121
+ maleo_foundation-0.2.58.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
122
+ maleo_foundation-0.2.58.dist-info/top_level.txt,sha256=_iBos3F_bhEOdjOnzeiEYSrCucasc810xXtLBXI8cQc,17
123
+ maleo_foundation-0.2.58.dist-info/RECORD,,