ipulse-shared-core-ftredge 3.2.2__py3-none-any.whl → 3.2.3__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.
- ipulse_shared_core_ftredge/__init__.py +2 -1
- ipulse_shared_core_ftredge/models/__init__.py +1 -0
- ipulse_shared_core_ftredge/models/organisation.py +73 -57
- ipulse_shared_core_ftredge/models/user_auth.py +7 -4
- ipulse_shared_core_ftredge/models/user_profile.py +73 -38
- ipulse_shared_core_ftredge/models/user_profile_update.py +38 -29
- ipulse_shared_core_ftredge/models/user_status.py +69 -27
- {ipulse_shared_core_ftredge-3.2.2.dist-info → ipulse_shared_core_ftredge-3.2.3.dist-info}/METADATA +2 -2
- ipulse_shared_core_ftredge-3.2.3.dist-info/RECORD +13 -0
- ipulse_shared_core_ftredge-3.2.2.dist-info/RECORD +0 -13
- {ipulse_shared_core_ftredge-3.2.2.dist-info → ipulse_shared_core_ftredge-3.2.3.dist-info}/LICENCE +0 -0
- {ipulse_shared_core_ftredge-3.2.2.dist-info → ipulse_shared_core_ftredge-3.2.3.dist-info}/WHEEL +0 -0
- {ipulse_shared_core_ftredge-3.2.2.dist-info → ipulse_shared_core_ftredge-3.2.3.dist-info}/top_level.txt +0 -0
|
@@ -5,67 +5,83 @@
|
|
|
5
5
|
# pylint: disable=line-too-long
|
|
6
6
|
# pylint: disable=unused-variable
|
|
7
7
|
# pylint: disable=broad-exception-caught
|
|
8
|
-
#
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
# pylint: disable=no-self-argument # Added for Pydantic validators
|
|
9
|
+
from datetime import datetime
|
|
10
|
+
from typing import Set, Optional, ClassVar
|
|
11
|
+
from pydantic import BaseModel, field_validator, Field, ConfigDict
|
|
12
|
+
import uuid
|
|
13
|
+
import dateutil.parser
|
|
14
|
+
from ipulse_shared_base_ftredge import (
|
|
15
|
+
OrganizationRelation,
|
|
16
|
+
OrganizationIndustry
|
|
17
|
+
)
|
|
17
18
|
|
|
19
|
+
class Organisation(BaseModel):
|
|
20
|
+
"""
|
|
21
|
+
Organisation model representing business entities in the system.
|
|
22
|
+
Supports both retail and non-retail customer types with different validation rules.
|
|
23
|
+
"""
|
|
24
|
+
model_config = ConfigDict(frozen=True, extra="forbid")
|
|
25
|
+
|
|
26
|
+
# Class constants
|
|
27
|
+
VERSION: ClassVar[float] = 1.0
|
|
28
|
+
MODULE: ClassVar[str] = "core"
|
|
29
|
+
CLASS_REF: ClassVar[str] = "orgn"
|
|
18
30
|
|
|
19
|
-
#
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
# relations: Optional[Set[str]]=None
|
|
27
|
-
# description: Optional[str] = None # Updated to use Optional
|
|
28
|
-
# industries: Optional[Set[str]] = None # Updated to use Optional
|
|
29
|
-
# website: Optional[str] = None # Updated to use Optional
|
|
30
|
-
# org_admin_user_uids: Optional[Set[str]] = None # Updated to use Optional
|
|
31
|
-
# class Config:
|
|
32
|
-
# extra = "forbid"
|
|
31
|
+
# Required fields
|
|
32
|
+
puid: str = Field(
|
|
33
|
+
default_factory=lambda: f"{datetime.utcnow().strftime('%Y%m%d%H%M%S')}_{uuid.uuid4().hex[:8]}_{Organisation.MODULE}{Organisation.CLASS_REF}".lower(),
|
|
34
|
+
description="Unique identifier for the organisation"
|
|
35
|
+
)
|
|
36
|
+
name: str = Field(..., min_length=1, max_length=100)
|
|
37
|
+
relations: Set[OrganizationRelation] = Field(..., description="Organisation relations/types")
|
|
33
38
|
|
|
39
|
+
# Timestamps
|
|
40
|
+
creat_date: datetime = Field(default_factory=datetime.utcnow)
|
|
41
|
+
updt_date: datetime = Field(default_factory=datetime.utcnow)
|
|
42
|
+
|
|
43
|
+
# Optional fields
|
|
44
|
+
creat_by_user: Optional[str] = Field(None, max_length=100)
|
|
45
|
+
updt_by_user: Optional[str] = Field(None, max_length=100)
|
|
46
|
+
description: Optional[str] = Field(None, max_length=1000)
|
|
47
|
+
industries: Optional[Set[OrganizationIndustry]] = None
|
|
48
|
+
website: Optional[str] = Field(None, max_length=200)
|
|
49
|
+
org_admin_user_uids: Optional[Set[str]] = None
|
|
34
50
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
# return relations
|
|
51
|
+
@field_validator('relations')
|
|
52
|
+
@classmethod
|
|
53
|
+
def validate_relations(cls, v: Set[OrganizationRelation]) -> Set[OrganizationRelation]:
|
|
54
|
+
return v
|
|
40
55
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
# return value
|
|
52
|
-
# if isinstance(value, datetime):
|
|
53
|
-
# return value
|
|
54
|
-
# try:
|
|
55
|
-
# # Assuming Firestore returns an ISO 8601 string, adjust if necessary
|
|
56
|
-
# print("Putting Updt or Creat date in a valid format in a Validator when creating Organisation object")
|
|
57
|
-
# return dateutil.parser.isoparse(value)
|
|
58
|
-
# except (TypeError, ValueError):
|
|
59
|
-
# raise ValidationError(f"Invalid datetime format inside Organisation: {value}")
|
|
56
|
+
@field_validator('industries')
|
|
57
|
+
@classmethod
|
|
58
|
+
def validate_industries(cls, v: Optional[Set[OrganizationIndustry]], info) -> Optional[Set[OrganizationIndustry]]:
|
|
59
|
+
values = info.data
|
|
60
|
+
is_retail = values.get('relations') == {OrganizationRelation.RETAIL_CUSTOMER}
|
|
61
|
+
if is_retail and v is not None:
|
|
62
|
+
raise ValueError("Industries should not be set for retail customers")
|
|
63
|
+
elif not is_retail and v is None:
|
|
64
|
+
raise ValueError("Industries required for non-retail customers")
|
|
65
|
+
return v
|
|
60
66
|
|
|
67
|
+
@field_validator('website', 'description')
|
|
68
|
+
@classmethod
|
|
69
|
+
def validate_retail_fields(cls, v: Optional[str], info) -> Optional[str]:
|
|
70
|
+
values = info.data
|
|
71
|
+
field = info.field_name
|
|
72
|
+
is_retail = values.get('relations') == {OrganizationRelation.RETAIL_CUSTOMER}
|
|
73
|
+
if is_retail and v is not None:
|
|
74
|
+
raise ValueError(f"{field} should not be set for retail customers")
|
|
75
|
+
elif not is_retail and not v:
|
|
76
|
+
raise ValueError(f"{field} required for non-retail customers")
|
|
77
|
+
return v
|
|
61
78
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
# return value
|
|
79
|
+
@field_validator('creat_date', 'updt_date', mode='before')
|
|
80
|
+
@classmethod
|
|
81
|
+
def parse_datetime(cls, v: any) -> datetime:
|
|
82
|
+
if isinstance(v, datetime):
|
|
83
|
+
return v
|
|
84
|
+
try:
|
|
85
|
+
return dateutil.parser.isoparse(v)
|
|
86
|
+
except (TypeError, ValueError) as e:
|
|
87
|
+
raise ValueError(f"Invalid datetime format: {e}")
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
from pydantic import BaseModel
|
|
1
|
+
from pydantic import BaseModel, Field, EmailStr, ConfigDict
|
|
2
2
|
|
|
3
3
|
class UserAuth(BaseModel):
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
"""Authentication model for user credentials"""
|
|
5
|
+
model_config = ConfigDict(extra="forbid")
|
|
6
|
+
|
|
7
|
+
email: EmailStr = Field(..., description="User's email address")
|
|
8
|
+
password: str = Field(..., min_length=6, description="User's password")
|
|
9
|
+
extra_fields: dict = Field(default_factory=dict, description="Additional authentication fields")
|
|
@@ -1,41 +1,76 @@
|
|
|
1
|
-
from
|
|
2
|
-
from
|
|
3
|
-
|
|
4
|
-
from typing import Set, Optional
|
|
5
|
-
# import uuid
|
|
6
|
-
# from . import pulse_enums as enums
|
|
7
|
-
|
|
8
|
-
CLASS_ORIGIN_AUTHOR="Russlan Ramdowar;russlan@ftredge.com"
|
|
9
|
-
CLASS_ORGIN_DATE=datetime(2024, 1, 16, 20, 5)
|
|
10
|
-
|
|
11
|
-
CLASS_VERSION = 3.01
|
|
12
|
-
CLASS_REVISION_AUTHOR="Russlan Ramdowar;russlan@ftredge.com"
|
|
13
|
-
CLASS_REVISION_DATE=datetime(2024, 2, 13, 20, 15)
|
|
14
|
-
LAST_MODIFICATION="Fixed typo"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
DOMAIN="user"
|
|
18
|
-
OBJ_REF = "usprfl"
|
|
1
|
+
from datetime import datetime, date
|
|
2
|
+
from typing import Set, Optional, ClassVar
|
|
3
|
+
from pydantic import BaseModel, EmailStr, Field, ConfigDict
|
|
19
4
|
|
|
20
5
|
class UserProfile(BaseModel):
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
6
|
+
"""
|
|
7
|
+
User Profile model representing user information and metadata.
|
|
8
|
+
Contains both system-managed and user-editable fields.
|
|
9
|
+
"""
|
|
10
|
+
model_config = ConfigDict(frozen=True, extra="forbid")
|
|
11
|
+
|
|
12
|
+
# Metadata as class variables
|
|
13
|
+
VERSION: ClassVar[float] = 3.01
|
|
14
|
+
DOMAIN: ClassVar[str] = "user"
|
|
15
|
+
OBJ_REF: ClassVar[str] = "usprfl"
|
|
16
|
+
|
|
17
|
+
# System-managed fields (read-only)
|
|
18
|
+
schema_version: float = Field(
|
|
19
|
+
default=3.01,
|
|
20
|
+
description="Version of this Class == version of DB Schema",
|
|
21
|
+
frozen=True
|
|
22
|
+
)
|
|
23
|
+
email: EmailStr = Field(
|
|
24
|
+
...,
|
|
25
|
+
description="Propagated from Firebase Auth",
|
|
26
|
+
frozen=True
|
|
27
|
+
)
|
|
28
|
+
organizations_uids: Set[str] = Field(
|
|
29
|
+
default_factory=set,
|
|
30
|
+
description="Depends on Subscription Plan, Regularly Updated",
|
|
31
|
+
frozen=True
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
# Timestamps and audit fields (read-only)
|
|
35
|
+
creat_date: datetime = Field(frozen=True)
|
|
36
|
+
creat_by_user: str = Field(frozen=True)
|
|
37
|
+
updt_date: datetime = Field(frozen=True)
|
|
38
|
+
updt_by_user: str = Field(frozen=True)
|
|
34
39
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
# System identification (read-only)
|
|
41
|
+
provider_id: str = Field(frozen=True)
|
|
42
|
+
aliases: Optional[Set[str]] = Field(
|
|
43
|
+
default=None,
|
|
44
|
+
frozen=True
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
# User-editable fields
|
|
48
|
+
username: Optional[str] = Field(
|
|
49
|
+
default=None,
|
|
50
|
+
max_length=50,
|
|
51
|
+
pattern="^[a-zA-Z0-9_-]+$"
|
|
52
|
+
)
|
|
53
|
+
dob: Optional[date] = Field(
|
|
54
|
+
default=None,
|
|
55
|
+
description="Date of Birth"
|
|
56
|
+
)
|
|
57
|
+
first_name: Optional[str] = Field(
|
|
58
|
+
default=None,
|
|
59
|
+
max_length=100
|
|
60
|
+
)
|
|
61
|
+
last_name: Optional[str] = Field(
|
|
62
|
+
default=None,
|
|
63
|
+
max_length=100
|
|
64
|
+
)
|
|
65
|
+
mobile: Optional[str] = Field(
|
|
66
|
+
default=None,
|
|
67
|
+
pattern=r"^\+?[1-9]\d{1,14}$", # Added 'r' prefix for raw string
|
|
68
|
+
description="E.164 format phone number"
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
# Revision history (as model metadata)
|
|
72
|
+
CLASS_ORIGIN_AUTHOR: ClassVar[str] = "Russlan Ramdowar;russlan@ftredge.com"
|
|
73
|
+
CLASS_ORGIN_DATE: ClassVar[datetime] = datetime(2024, 1, 16, 20, 5)
|
|
74
|
+
CLASS_REVISION_AUTHOR: ClassVar[str] = "Russlan Ramdowar;russlan@ftredge.com"
|
|
75
|
+
CLASS_REVISION_DATE: ClassVar[datetime] = datetime(2024, 2, 13, 20, 15)
|
|
76
|
+
LAST_MODIFICATION: ClassVar[str] = "Updated to Pydantic v2 with improved validation"
|
|
@@ -1,36 +1,45 @@
|
|
|
1
|
-
from typing import Optional, Set
|
|
2
|
-
from pydantic import BaseModel, Field, EmailStr
|
|
1
|
+
from typing import Optional, Set, ClassVar
|
|
2
|
+
from pydantic import BaseModel, Field, EmailStr, ConfigDict
|
|
3
3
|
from datetime import date, datetime
|
|
4
4
|
|
|
5
|
+
class UserProfileUpdate(BaseModel):
|
|
6
|
+
"""
|
|
7
|
+
User Profile Update model for partial updates of user information.
|
|
8
|
+
All fields are optional to support partial updates.
|
|
9
|
+
"""
|
|
10
|
+
model_config = ConfigDict(extra="forbid")
|
|
5
11
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
CLASS_REVISION_DATE=datetime(2024, 3, 15, 20, 15)
|
|
12
|
-
LAST_MODIFICATION="Created , with all fields Optional"
|
|
12
|
+
# Metadata as class variables
|
|
13
|
+
VERSION: ClassVar[float] = 2.01
|
|
14
|
+
CLASS_ORIGIN_AUTHOR: ClassVar[str] = "Russlan Ramdowar;russlan@ftredge.com"
|
|
15
|
+
CLASS_ORGIN_DATE: ClassVar[datetime] = datetime(2024, 3, 15, 20, 15)
|
|
16
|
+
CLASS_REVISION_DATE: ClassVar[datetime] = datetime(2024, 3, 15, 20, 15)
|
|
13
17
|
|
|
14
|
-
|
|
18
|
+
# System fields
|
|
15
19
|
schema_version: Optional[float] = Field(None, description="Version of this Class == version of DB Schema")
|
|
16
20
|
email: Optional[EmailStr] = Field(None, description="Propagated from Firebase Auth")
|
|
17
|
-
organizations_uids: Optional[Set[str]] = Field(None, description="
|
|
18
|
-
creat_date: Optional[datetime] = Field(None, description="Creation date")
|
|
19
|
-
creat_by_user: Optional[str] = Field(None, description="Created by user")
|
|
20
|
-
updt_date: Optional[datetime] = Field(None, description="Update date")
|
|
21
|
-
updt_by_user: Optional[str] = Field(None, description="Updated by user")
|
|
22
|
-
aliases: Optional[Set[str]] = Field(None, description="User aliases")
|
|
23
|
-
provider_id: Optional[str] = Field(None, description="Provider ID")
|
|
24
|
-
|
|
25
|
-
username: Optional[str] = Field(None, description="Username")
|
|
26
|
-
dob: Optional[date] = Field(None, description="Date of Birth")
|
|
27
|
-
first_name: Optional[str] = Field(None, description="First Name")
|
|
28
|
-
last_name: Optional[str] = Field(None, description="Last Name")
|
|
29
|
-
mobile: Optional[str] = Field(None, description="Mobile Number")
|
|
21
|
+
organizations_uids: Optional[Set[str]] = Field(None, description="Organization memberships")
|
|
30
22
|
|
|
31
|
-
#
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
23
|
+
# Timestamps and audit
|
|
24
|
+
creat_date: Optional[datetime] = None
|
|
25
|
+
creat_by_user: Optional[str] = None
|
|
26
|
+
updt_date: Optional[datetime] = None
|
|
27
|
+
updt_by_user: Optional[str] = None
|
|
28
|
+
|
|
29
|
+
# System identification
|
|
30
|
+
aliases: Optional[Set[str]] = None
|
|
31
|
+
provider_id: Optional[str] = None
|
|
32
|
+
|
|
33
|
+
# User-editable fields
|
|
34
|
+
username: Optional[str] = Field(None, max_length=50, pattern=r"^[a-zA-Z0-9_-]+$")
|
|
35
|
+
dob: Optional[date] = None
|
|
36
|
+
first_name: Optional[str] = Field(None, max_length=100)
|
|
37
|
+
last_name: Optional[str] = Field(None, max_length=100)
|
|
38
|
+
mobile: Optional[str] = Field(None, pattern=r"^\+?[1-9]\d{1,14}$")
|
|
39
|
+
|
|
40
|
+
def model_dump(self, **kwargs):
|
|
41
|
+
kwargs.setdefault('exclude_none', True)
|
|
42
|
+
return super().model_dump(**kwargs)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
from pydantic import BaseModel, Field
|
|
2
|
-
|
|
3
1
|
from datetime import datetime
|
|
4
2
|
from dateutil.relativedelta import relativedelta
|
|
5
|
-
from typing import Set, Optional, Dict, List
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
from typing import Set, Optional, Dict, List, ClassVar
|
|
4
|
+
from pydantic import BaseModel, Field, ConfigDict
|
|
8
5
|
|
|
9
|
-
|
|
10
|
-
CLASS_ORIGIN_AUTHOR="Russlan Ramdowar;russlan@ftredge.com"
|
|
6
|
+
# ORIGINAL AUTHOR ="Russlan Ramdowar;russlan@ftredge.com"
|
|
11
7
|
CLASS_ORGIN_DATE=datetime(2024, 2, 12, 20, 5)
|
|
12
8
|
|
|
13
9
|
SCHEMA_VERSION = 2.3
|
|
@@ -26,26 +22,72 @@ DEFAULT_EXTRA_INSIGHT_CREDITS=0
|
|
|
26
22
|
|
|
27
23
|
############################################ !!!!! ALWAYS UPDATE SCHEMA VERSION , IF SCHEMA IS BEING MODIFIED !!! ############################################
|
|
28
24
|
class UserStatus(BaseModel):
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
25
|
+
"""
|
|
26
|
+
User Status model for tracking user subscription and access rights.
|
|
27
|
+
"""
|
|
28
|
+
model_config = ConfigDict(frozen=True, extra="forbid")
|
|
29
|
+
|
|
30
|
+
# Class constants
|
|
31
|
+
VERSION: ClassVar[float] = 2.3
|
|
32
|
+
DOMAIN: ClassVar[str] = "user"
|
|
33
|
+
OBJ_REF: ClassVar[str] = "usrsttus"
|
|
34
|
+
|
|
35
|
+
# Default values as class variables
|
|
36
|
+
DEFAULT_IAM_GROUPS: ClassVar[Dict[str, List[str]]] = {"pulseroot": ["full_open_read"]}
|
|
37
|
+
DEFAULT_SUBSCRIPTION_PLAN: ClassVar[str] = "subscription_free"
|
|
38
|
+
DEFAULT_SUBSCRIPTION_STATUS: ClassVar[str] = "active"
|
|
39
|
+
DEFAULT_SUBSCRIPTION_INSIGHT_CREDITS: ClassVar[int] = 10
|
|
40
|
+
DEFAULT_EXTRA_INSIGHT_CREDITS: ClassVar[int] = 0
|
|
41
|
+
|
|
42
|
+
# System-managed fields
|
|
43
|
+
schema_version: float = Field(
|
|
44
|
+
default=2.3,
|
|
45
|
+
description="Version of this Class == version of DB Schema"
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
# IAM and subscription fields
|
|
49
|
+
iam_groups: Dict[str, List[str]] = Field(
|
|
50
|
+
default_factory=lambda: UserStatus.DEFAULT_IAM_GROUPS,
|
|
51
|
+
description="User's Groups, with a default one for all authenticated Pulse users"
|
|
52
|
+
)
|
|
53
|
+
sbscrptn_plan: str = Field(
|
|
54
|
+
default_factory=lambda: UserStatus.DEFAULT_SUBSCRIPTION_PLAN,
|
|
55
|
+
description="Subscription Plan"
|
|
56
|
+
)
|
|
57
|
+
sbscrptn_status: str = Field(
|
|
58
|
+
default_factory=lambda: UserStatus.DEFAULT_SUBSCRIPTION_STATUS,
|
|
59
|
+
description="Subscription Status"
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
# Subscription dates
|
|
63
|
+
sbscrptn_start_date: datetime = Field(
|
|
64
|
+
default_factory=datetime.utcnow,
|
|
65
|
+
description="Subscription Start Date"
|
|
66
|
+
)
|
|
67
|
+
sbscrptn_end_date: datetime = Field(
|
|
68
|
+
default_factory=lambda: datetime.utcnow() + relativedelta(years=1),
|
|
69
|
+
description="Subscription End Date"
|
|
70
|
+
)
|
|
34
71
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
72
|
+
# Credits management
|
|
73
|
+
sbscrptn_insight_credits: int = Field(
|
|
74
|
+
default_factory=lambda: UserStatus.DEFAULT_SUBSCRIPTION_INSIGHT_CREDITS,
|
|
75
|
+
description="Subscription-based insight credits"
|
|
76
|
+
)
|
|
77
|
+
sbscrptn_ins_crdts_updtd_since_datetime: datetime = Field(
|
|
78
|
+
default_factory=datetime.utcnow,
|
|
79
|
+
description="Last update timestamp for subscription credits"
|
|
80
|
+
)
|
|
81
|
+
extra_insight_credits: int = Field(
|
|
82
|
+
default_factory=lambda: UserStatus.DEFAULT_EXTRA_INSIGHT_CREDITS,
|
|
83
|
+
description="Additional purchased insight credits (non-expiring)"
|
|
84
|
+
)
|
|
44
85
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
updt_date: datetime #User can Read only / Ideally shouldn't be able to see even
|
|
48
|
-
updt_by_user: str #User can Read only / Ideally shouldn't be able to see even
|
|
86
|
+
# Optional fields
|
|
87
|
+
payment_refs_uids: Optional[Set[str]] = None
|
|
49
88
|
|
|
50
|
-
|
|
51
|
-
|
|
89
|
+
# Audit fields
|
|
90
|
+
creat_date: datetime
|
|
91
|
+
creat_by_user: str
|
|
92
|
+
updt_date: datetime
|
|
93
|
+
updt_by_user: str
|
{ipulse_shared_core_ftredge-3.2.2.dist-info → ipulse_shared_core_ftredge-3.2.3.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: ipulse_shared_core_ftredge
|
|
3
|
-
Version: 3.2.
|
|
3
|
+
Version: 3.2.3
|
|
4
4
|
Summary: Shared Core models and Logger util 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
|
|
@@ -8,7 +8,7 @@ License-File: LICENCE
|
|
|
8
8
|
Requires-Dist: pydantic[email]~=2.5
|
|
9
9
|
Requires-Dist: python-dateutil~=2.8
|
|
10
10
|
Requires-Dist: pytest~=7.1
|
|
11
|
-
Requires-Dist: ipulse_shared_base_ftredge>=
|
|
11
|
+
Requires-Dist: ipulse_shared_base_ftredge>=3.4.2
|
|
12
12
|
Dynamic: author
|
|
13
13
|
Dynamic: home-page
|
|
14
14
|
Dynamic: requires-dist
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
ipulse_shared_core_ftredge/__init__.py,sha256=56WEMMN6Wj4kz5i9dHxIOykReHlB-GufLPxPozSxrHk,174
|
|
2
|
+
ipulse_shared_core_ftredge/models/__init__.py,sha256=bXVU7m3s0iu4ehvwg_e_0-_1IqWxjaZiP_edssh5ImM,200
|
|
3
|
+
ipulse_shared_core_ftredge/models/organisation.py,sha256=Y0iX7EbcxsLuYnaizzPHsu5Ed5p4KNPhbsFZmeyWqr0,3565
|
|
4
|
+
ipulse_shared_core_ftredge/models/resource_catalog_item.py,sha256=mEGX8AftzrhEHqFVXjr62CuRnXC1vK4z3bHl_XBJodU,4964
|
|
5
|
+
ipulse_shared_core_ftredge/models/user_auth.py,sha256=YgCeK0uJ-JOkPavwzogl4wGC3RpA8PVfl-5MPS4Kxhk,432
|
|
6
|
+
ipulse_shared_core_ftredge/models/user_profile.py,sha256=Z9upOzSNmZ1LmtW-69z_gyKO4DBQfkzq52NdEvfVIyI,2464
|
|
7
|
+
ipulse_shared_core_ftredge/models/user_profile_update.py,sha256=ac1vVROg01UjqiMkglMdtByClxDa2YUs3-3vlVOBY-Y,1754
|
|
8
|
+
ipulse_shared_core_ftredge/models/user_status.py,sha256=oFsoTeHQWGdLo3U3OYy3MnF8P6rIQGmRRryz8Qt7z5A,3378
|
|
9
|
+
ipulse_shared_core_ftredge-3.2.3.dist-info/LICENCE,sha256=YBtYAXNqCCOo9Mr2hfkbSPAM9CeAr2j1VZBSwQTrNwE,1060
|
|
10
|
+
ipulse_shared_core_ftredge-3.2.3.dist-info/METADATA,sha256=iwBAIJhQ5KI3mSWOqTUp4Pia8wpGWyHP_okCto-7DOU,538
|
|
11
|
+
ipulse_shared_core_ftredge-3.2.3.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
12
|
+
ipulse_shared_core_ftredge-3.2.3.dist-info/top_level.txt,sha256=8sgYrptpexkA_6_HyGvho26cVFH9kmtGvaK8tHbsGHk,27
|
|
13
|
+
ipulse_shared_core_ftredge-3.2.3.dist-info/RECORD,,
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
ipulse_shared_core_ftredge/__init__.py,sha256=-Zfpq7QDWCyfZx99nqkXpgy7WSYdpNtpBCYIeYJkGjo,139
|
|
2
|
-
ipulse_shared_core_ftredge/models/__init__.py,sha256=MeGH2ZBxkrwldUiWyUaI_TMyfq78tuSwRkN_mEfKD8U,161
|
|
3
|
-
ipulse_shared_core_ftredge/models/organisation.py,sha256=22esRGYuJmKN3papkgozleEmDNJrVwUgIzKp7annvWs,3280
|
|
4
|
-
ipulse_shared_core_ftredge/models/resource_catalog_item.py,sha256=mEGX8AftzrhEHqFVXjr62CuRnXC1vK4z3bHl_XBJodU,4964
|
|
5
|
-
ipulse_shared_core_ftredge/models/user_auth.py,sha256=35HNN7ZW4ZELCqaJrAtoSsVLFAZ1KL2S_VmuzbcEMm4,119
|
|
6
|
-
ipulse_shared_core_ftredge/models/user_profile.py,sha256=D3BB9D6XEv7IVZgsURgf0hWmUZW5rms3uiBXS0ZGLeE,1927
|
|
7
|
-
ipulse_shared_core_ftredge/models/user_profile_update.py,sha256=oKK0XsQDKkgDvjFPhX2XlqEqlKLBQ4AkvPHXEuZbFMY,1712
|
|
8
|
-
ipulse_shared_core_ftredge/models/user_status.py,sha256=8TyRd8tBK9_xb0MPKbI5pn9-lX7ovKbeiuWYYPtIOiw,3202
|
|
9
|
-
ipulse_shared_core_ftredge-3.2.2.dist-info/LICENCE,sha256=YBtYAXNqCCOo9Mr2hfkbSPAM9CeAr2j1VZBSwQTrNwE,1060
|
|
10
|
-
ipulse_shared_core_ftredge-3.2.2.dist-info/METADATA,sha256=BAzioOTNFu6Vhlq1ZFI8bVVCVwAvWrOuxICmql_JCNg,538
|
|
11
|
-
ipulse_shared_core_ftredge-3.2.2.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
12
|
-
ipulse_shared_core_ftredge-3.2.2.dist-info/top_level.txt,sha256=8sgYrptpexkA_6_HyGvho26cVFH9kmtGvaK8tHbsGHk,27
|
|
13
|
-
ipulse_shared_core_ftredge-3.2.2.dist-info/RECORD,,
|
{ipulse_shared_core_ftredge-3.2.2.dist-info → ipulse_shared_core_ftredge-3.2.3.dist-info}/LICENCE
RENAMED
|
File without changes
|
{ipulse_shared_core_ftredge-3.2.2.dist-info → ipulse_shared_core_ftredge-3.2.3.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|