ipulse-shared-core-ftredge 1.2.0__py3-none-any.whl → 1.4.0__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.

Potentially problematic release.


This version of ipulse-shared-core-ftredge might be problematic. Click here for more details.

@@ -2,7 +2,7 @@ from pydantic import BaseModel, validator, ValidationError, Field
2
2
  from typing import Set, Optional
3
3
  import uuid
4
4
  from datetime import datetime
5
- import pulse_enums as enums
5
+ from . import pulse_enums as enums
6
6
  import dateutil.parser
7
7
 
8
8
  CLASS_VERSION= 1.0
@@ -2,7 +2,7 @@ import uuid
2
2
  from datetime import datetime
3
3
  from pydantic import BaseModel, validator, ValidationError
4
4
  from typing import Dict, Any, Set, Optional
5
- import pulse_enums as enums
5
+ from . import pulse_enums as enums
6
6
 
7
7
  import dateutil.parser
8
8
 
@@ -10,12 +10,85 @@ CLASS_VERSION = 1.0
10
10
  CLASS_REF = "resdes"
11
11
  MODULE = "core"
12
12
 
13
+ # metadata = {
14
+ # "resr_puid_or_name":"Users",
15
+ # "resr_path":"firestore/Users",
16
+ # "resr_name":"Users",
17
+ # "resr_pulse_module":MODULE,
18
+ # "resr_type":"firestore_collection",
19
+ # "resr_classifications":{ "auth_required_confidential"},
20
+ # "resr_contents":{"user_core_profile"},
21
+ # "resr_original_or_processed":"original_source",
22
+ # "resr_origin":"internal",
23
+ # "resr_origin_organisations_uids":{"20231220futureedgegroup_coreorgn"},
24
+ # }
25
+
26
+ # Annotated[str, {"resr_classification":"auth_required_restricted",
27
+ # "resr_readable_by": ["owner", "selected_by_admin"],
28
+ # "resr_updatable_by": ["admin"],
29
+ # "resr_original_or_processed" : "original_source",
30
+ # "resr_origin":"internal",
31
+ # "resr_origin_organisation_uids":["20231220futureedgegroup_coreorgn"],
32
+ # "resr_origin_description":"Original User field",
33
+ # "resr_creat_date":datetime(2023, 12, 23),
34
+ # "resr_creat_by_user":"Russlan Ramdowar;russlan@ftredge.com",
35
+ # "metadata_updt_date":datetime(2023, 12, 23),
36
+ # "metadata_updt_by_user":"Russlan Ramdowar;russlan@ftredge.com"}]
37
+
38
+ # metadata={"resr_classification":"auth_required_restricted",
39
+ # "resr_readable_by": ["owner", "selected_by_admin"],
40
+ # "resr_updatable_by": [],
41
+ # "resr_original_or_processed" : "original_source",
42
+ # "resr_origin":"internal",
43
+ # "resr_origin_organisation_uids":["20231220futureedgegroup_coreorgn"],
44
+ # "resr_origin_description":"Original User field",
45
+ # "resr_creat_date":datetime(2023, 12, 23),
46
+ # "resr_creat_by_user":"Russlan Ramdowar;russlan@ftredge.com",
47
+ # "metadata_updt_date":datetime(2023, 12, 23),
48
+ # "metadata_updt_by_user":"Russlan Ramdowar;russlan@ftredge.com"}
49
+
50
+ # metadata={"resr_classification":"auth_required_restricted",
51
+ # "resr_readable_by": ["owner", "selected_by_admin"],
52
+ # "resr_updatable_by": ["owner","admin"],
53
+ # "resr_original_or_processed" : "original_source",
54
+ # "resr_origin":"internal",
55
+ # "resr_origin_organisation_uids":["20231220futureedgegroup_coreorgn"],
56
+ # "resr_origin_description":"Original User field",
57
+ # "resr_creat_date":datetime(2023, 12, 23),
58
+ # "resr_creat_by_user":"Russlan Ramdowar;russlan@ftredge.com",
59
+ # "metadata_updt_date":datetime(2023, 12, 23),
60
+ # "metadata_updt_by_user":"Russlan Ramdowar;russlan@ftredge.com"}
61
+
62
+ # metadata={"resr_classification":"auth_required_confidential",
63
+ # "resr_readable_by": ["owner", "selected_by_admin"],
64
+ # "resr_updatable_by": ["admin"],
65
+ # "resr_original_or_processed" : "original_source",
66
+ # "resr_origin":"internal",
67
+ # "resr_origin_organisation_uids":["20231220futureedgegroup_coreorgn"],
68
+ # "resr_origin_description":"Original User field",
69
+ # "resr_creat_date":datetime(2023, 12, 23),
70
+ # "resr_creat_by_user":"Russlan Ramdowar",
71
+ # "metadata_updt_date":datetime(2023, 12, 23),
72
+ # "metadata_updt_by_user":"Russlan Ramdowar"}
73
+
74
+ # metadata={"resr_classification":"auth_required_confidential",
75
+ # "resr_readable_by": ["owner", "selected_by_admin"],
76
+ # "resr_updatable_by": ["selected_by_admin"],
77
+ # "resr_original_or_processed" : "original_source",
78
+ # "resr_origin":"internal",
79
+ # "resr_origin_organisation_uids":["20231220futureedgegroup_coreorgn"],
80
+ # "resr_origin_description":"Original User field",
81
+ # "resr_creat_date":datetime(2023, 12, 23),
82
+ # "resr_creat_by_user":"Russlan Ramdowar",
83
+ # "metadata_updt_date":datetime(2023, 12, 23),
84
+ # "metadata_updt_by_user":"Russlan Ramdowar"}
85
+
13
86
  class ResourceCatalogItem(BaseModel):
14
87
 
15
88
  resr_puid_or_name: str #Ex: username
16
89
  resr_path: str #Ex: ipulse-401013/cloud/firesotre/Users/{user_uid}/username
17
90
  resr_name: str #Ex: username
18
- resr_pulse_module: str = None #Ex: core
91
+ resr_pulse_module: str #Ex: core
19
92
  resr_type: str
20
93
  resr_classifications: Set[str]
21
94
  resr_contents:Set[str]
@@ -29,7 +102,7 @@ class ResourceCatalogItem(BaseModel):
29
102
  resr_creat_by_user_uid: str
30
103
  resr_creat_date: datetime
31
104
  class_version:float = CLASS_VERSION
32
- resr_columns_count: int=None
105
+ resr_columns_count: int
33
106
  resr_columns: Optional[Dict[Any, Any]] = None #OPTIONAL
34
107
  resr_structure_version: Optional[str]=None # OPTIONAL
35
108
  resr_structure_updt_date: Optional[str]=None #OPTIONAL
@@ -37,12 +110,12 @@ class ResourceCatalogItem(BaseModel):
37
110
  resr_tags: Optional[Dict[Any, Any]] = None #OPTIONAL
38
111
  resr_content_updt_date: Optional[str]=None #OPTIONAL
39
112
  resr_content_updt_by_user_uid: Optional[str]=None # OPTIONAL
40
- puid: str = None #TO BE SETUP BY Validator
41
- metadata_version: float = None #TO BE SETUP BY Validator
42
- metadata_creat_date: datetime = None #TO BE SETUP BY Management Service
43
- metadata_creat_by: str = None #TO BE SETUP BY Management Service
44
- metadata_updt_date: datetime = None #TO BE SETUP BY Management Service
45
- metadata_updt_by: str = None #TO BE SETUP BY Management Service
113
+ puid: Optional[str] = None #TO BE SETUP BY Validator
114
+ metadata_version: Optional[float] = None #TO BE SETUP BY Validator
115
+ metadata_creat_date: Optional[datetime] = None #TO BE SETUP BY Management Service
116
+ metadata_creat_by: Optional[str] = None #TO BE SETUP BY Management Service
117
+ metadata_updt_date: Optional[datetime] = None #TO BE SETUP BY Management Service
118
+ metadata_updt_by: Optional[str] = None #TO BE SETUP BY Management Service
46
119
 
47
120
  @validator('puid', pre=True, always=True)
48
121
  def set_puid(cls, puid, values):
@@ -2,7 +2,7 @@ from pydantic import BaseModel, EmailStr , Field, root_validator
2
2
  from datetime import datetime , date
3
3
  from typing import Set, Optional, Dict, Any, Annotated
4
4
  import uuid
5
- import pulse_enums as enums
5
+ from . import pulse_enums as enums
6
6
 
7
7
  CLASS_VERSION = 2.1
8
8
  CLASS_VERSION_AUTHOR="Russlan Ramdowar;russlan@ftredge.com"
@@ -10,74 +10,15 @@ CLASS_VERSION_DATE=datetime(2023, 12, 23, 17, 50)
10
10
  MODULE="core"
11
11
  CLASS_REF = "usrpf"
12
12
 
13
-
14
13
  class UserProfile(BaseModel):
15
- uid: Annotated[str, {"resr_classification":"auth_required_restricted",
16
- "resr_readable_by": ["owner", "selected_by_admin"],
17
- "resr_updatable_by": ["admin"],
18
- "resr_original_or_processed" : "original_source",
19
- "resr_origin":"internal",
20
- "resr_origin_organisation_uids":["20231220futureedgegroup_coreorgn"],
21
- "resr_origin_description":"Original User field",
22
- "resr_creat_date":datetime(2023, 12, 23),
23
- "resr_creat_by_user":"Russlan Ramdowar;russlan@ftredge.com",
24
- "metadata_updt_date":datetime(2023, 12, 23),
25
- "metadata_updt_by_user":"Russlan Ramdowar;russlan@ftredge.com"}] = Field(frozen=True, description="Generated by Firebase Auth",
26
- )
14
+ uid: str = Field(frozen=True, description="Generated by Firebase Auth")
27
15
 
28
16
  puid:str = Field(default_factory=lambda: f"{datetime.utcnow().strftime('%Y%m%d%H%M')}{uuid.uuid4().hex[:8]}_{MODULE}{CLASS_REF}".lower(),
29
17
  frozen=True,
30
- description="Generated Automatically by default_factory",
31
- metadata={"resr_classification":"auth_required_restricted",
32
- "resr_readable_by": ["owner", "selected_by_admin"],
33
- "resr_updatable_by": [],
34
- "resr_original_or_processed" : "original_source",
35
- "resr_origin":"internal",
36
- "resr_origin_organisation_uids":["20231220futureedgegroup_coreorgn"],
37
- "resr_origin_description":"Original User field",
38
- "resr_creat_date":datetime(2023, 12, 23),
39
- "resr_creat_by_user":"Russlan Ramdowar;russlan@ftredge.com",
40
- "metadata_updt_date":datetime(2023, 12, 23),
41
- "metadata_updt_by_user":"Russlan Ramdowar;russlan@ftredge.com"})
42
- email: EmailStr = Field(frozen=True,
43
- description="Propagated from Firebase Auth",
44
- metadata={"resr_classification":"auth_required_restricted",
45
- "resr_readable_by": ["owner", "selected_by_admin"],
46
- "resr_updatable_by": ["owner","admin"],
47
- "resr_original_or_processed" : "original_source",
48
- "resr_origin":"internal",
49
- "resr_origin_organisation_uids":["20231220futureedgegroup_coreorgn"],
50
- "resr_origin_description":"Original User field",
51
- "resr_creat_date":datetime(2023, 12, 23),
52
- "resr_creat_by_user":"Russlan Ramdowar;russlan@ftredge.com",
53
- "metadata_updt_date":datetime(2023, 12, 23),
54
- "metadata_updt_by_user":"Russlan Ramdowar;russlan@ftredge.com"})
55
- insights_credits: int= Field(default_factory=lambda:7,
56
- description="Depends on Subscription Plan, Regularly Updated",
57
- metadata={"resr_classification":"auth_required_confidential",
58
- "resr_readable_by": ["owner", "selected_by_admin"],
59
- "resr_updatable_by": ["admin"],
60
- "resr_original_or_processed" : "original_source",
61
- "resr_origin":"internal",
62
- "resr_origin_organisation_uids":["20231220futureedgegroup_coreorgn"],
63
- "resr_origin_description":"Original User field",
64
- "resr_creat_date":datetime(2023, 12, 23),
65
- "resr_creat_by_user":"Russlan Ramdowar",
66
- "metadata_updt_date":datetime(2023, 12, 23),
67
- "metadata_updt_by_user":"Russlan Ramdowar"})
68
- organizations_uids: Set[str] = Field(
69
- description="Depends on Subscription Plan, Regularly Updated",
70
- metadata={"resr_classification":"auth_required_confidential",
71
- "resr_readable_by": ["owner", "selected_by_admin"],
72
- "resr_updatable_by": ["selected_by_admin"],
73
- "resr_original_or_processed" : "original_source",
74
- "resr_origin":"internal",
75
- "resr_origin_organisation_uids":["20231220futureedgegroup_coreorgn"],
76
- "resr_origin_description":"Original User field",
77
- "resr_creat_date":datetime(2023, 12, 23),
78
- "resr_creat_by_user":"Russlan Ramdowar",
79
- "metadata_updt_date":datetime(2023, 12, 23),
80
- "metadata_updt_by_user":"Russlan Ramdowar"})
18
+ description="Generated Automatically by default_factory")
19
+ email: EmailStr = Field(frozen=True, description="Propagated from Firebase Auth" )
20
+ insights_credits: int= Field(default_factory=lambda:7, description="Depends on Subscription Plan, Regularly Updated")
21
+ organizations_uids: Set[str] = Field( description="Depends on Subscription Plan, Regularly Updated")
81
22
  creat_date: datetime #User can Read only
82
23
  creat_by_user: str #User shouldn't see this or edit this_dump=
83
24
  updt_date: datetime #User can Read only
@@ -90,28 +31,13 @@ class UserProfile(BaseModel):
90
31
  first_name: Optional[str] = None #User can Read and Edit
91
32
  last_name: Optional[str] = None #User can Read and Edit
92
33
  mobile: Optional[str] = None #User can Read and Edit
93
- groups_names: Set[str] = None #User can Read only
34
+ groups_names: Optional[Set[str]] = None #User can Read only
94
35
  policies_uids: Optional[Set[str]] = None #User can Read only
95
36
  subscription_plan_uid: Optional[str]=None #User can Read only
96
- insights_credits_updated_since: Optional[datetime]=None #User can Read only
97
-
98
-
99
-
37
+ insights_credits_updated_since_datetime: Optional[datetime]=None #User can Read only
38
+
100
39
  class Config:
101
40
  extra = "forbid"
102
- # Custom metadata
103
- metadata = {
104
- "resr_puid_or_name":"Users",
105
- "resr_path":"firestore/Users",
106
- "resr_name":"Users",
107
- "resr_pulse_module":MODULE,
108
- "resr_type":"firestore_collection",
109
- "resr_classifications":{ "auth_required_confidential"},
110
- "resr_contents":{"user_core_profile"},
111
- "resr_original_or_processed":"original_source",
112
- "resr_origin":"internal",
113
- "resr_origin_organisations_uids":{"20231220futureedgegroup_coreorgn"},
114
- }
115
41
 
116
42
  @root_validator(pre=True)
117
43
  def check_resr_classification(cls, values: Dict[Any, Any]):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ipulse_shared_core_ftredge
3
- Version: 1.2.0
3
+ Version: 1.4.0
4
4
  Summary: Shared models for the Pulse platform project. Using AI for financial advisory and investment management.
5
5
  Home-page: https://github.com/TheFutureEdge/ipulse_shared_core
6
6
  Author: Russlan Ramdowar
@@ -1,14 +1,14 @@
1
1
  ipulse_shared_core_ftredge/__init__.py,sha256=66223BsecVpCCg3DdU_Gq6Qy-VotkTy3lNPyafX7NIM,92
2
2
  ipulse_shared_core_ftredge/models/__init__.py,sha256=0OO_jKiI_883loWtaMBP_IRTGlxOCSR5qeYahVgZLx8,164
3
3
  ipulse_shared_core_ftredge/models/audit_log_firestore.py,sha256=jjl9lq-3J0eKXZAdEco8vNVQBLLZq-EH6V7NSubsBWw,270
4
- ipulse_shared_core_ftredge/models/organisation.py,sha256=q4p6c7MKZOJr0rc4BoYOqeW3gb2h6nfgxOsEkn8ztWQ,2936
4
+ ipulse_shared_core_ftredge/models/organisation.py,sha256=-zezPR7aL7fJqd5ouYELmjjpJbJ2MwGI0g8564_dyIw,2943
5
5
  ipulse_shared_core_ftredge/models/pulse_enums.py,sha256=mAPpCHZ5aECMlKKin1tw5jYVyEfA-p14hEPmyl8RVWY,4345
6
- ipulse_shared_core_ftredge/models/resource_catalog_item.py,sha256=OPOhDmOJbNfGYLaktRgUUgbdiJAJntJR18-Yuu8tUzE,4749
6
+ ipulse_shared_core_ftredge/models/resource_catalog_item.py,sha256=PxeRvI8fe8KOiHr6NW2Jz_yocyLId09PW8QyTZxjHAA,9809
7
7
  ipulse_shared_core_ftredge/models/user_auth.py,sha256=35HNN7ZW4ZELCqaJrAtoSsVLFAZ1KL2S_VmuzbcEMm4,119
8
- ipulse_shared_core_ftredge/models/user_profile.py,sha256=1HZT1mZgAyfYSoEkYSb301ccl-jZptnp7xZ81UcIQkI,9142
8
+ ipulse_shared_core_ftredge/models/user_profile.py,sha256=VCDB5PYNOq5NHQMeGQkIJg9AebLMwRml_J1wF3y246k,4064
9
9
  ipulse_shared_core_ftredge/models/user_profile_update.py,sha256=e2jO24JRcnUYJvQWOARbtCW-23WPcGbsWDYw0Iow6mQ,572
10
- ipulse_shared_core_ftredge-1.2.0.dist-info/LICENCE,sha256=YBtYAXNqCCOo9Mr2hfkbSPAM9CeAr2j1VZBSwQTrNwE,1060
11
- ipulse_shared_core_ftredge-1.2.0.dist-info/METADATA,sha256=oLfZldZPqERGeOEk0jvIMgUGxzYnJk8DPmCoeqXq_QE,346
12
- ipulse_shared_core_ftredge-1.2.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
13
- ipulse_shared_core_ftredge-1.2.0.dist-info/top_level.txt,sha256=8sgYrptpexkA_6_HyGvho26cVFH9kmtGvaK8tHbsGHk,27
14
- ipulse_shared_core_ftredge-1.2.0.dist-info/RECORD,,
10
+ ipulse_shared_core_ftredge-1.4.0.dist-info/LICENCE,sha256=YBtYAXNqCCOo9Mr2hfkbSPAM9CeAr2j1VZBSwQTrNwE,1060
11
+ ipulse_shared_core_ftredge-1.4.0.dist-info/METADATA,sha256=plOPN1rCW1PWxWIWRBCZrVkMyUWY0XjeDMcaxxCrrNI,346
12
+ ipulse_shared_core_ftredge-1.4.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
13
+ ipulse_shared_core_ftredge-1.4.0.dist-info/top_level.txt,sha256=8sgYrptpexkA_6_HyGvho26cVFH9kmtGvaK8tHbsGHk,27
14
+ ipulse_shared_core_ftredge-1.4.0.dist-info/RECORD,,