(20241209) SMS auth and sending ready.

This commit is contained in:
2024-12-09 19:39:15 +05:30
parent d10b156c0b
commit 845827a6bc
18 changed files with 367 additions and 348 deletions
+5 -5
View File
@@ -86,7 +86,7 @@ class CoreAuthTokenModel(BaseModel):
description = "a hint about the version no. of this message",
min_length = 1,
frozen = True,
default = "1.0.0"
default = "2.0.0"
)
serviceType: Literal["email", "sms", "chat"] = Field(
@@ -109,25 +109,25 @@ class CoreAuthTokenModel(BaseModel):
frozen = True
)
firstRequestTs: AwareDatetime = Field(
firstRequestTs: AwareDatetime | None = Field(
description = "the time (utc) at which authorization was first requested",
frozen = True,
default = None
)
lastRequestTs: AwareDatetime = Field(
lastRequestTs: AwareDatetime | None = Field(
description = "the time (utc) at which authorization was last requested",
frozen = False,
default_factory = lambda: date_time.get_current_utc_date_time(as_string = False)
)
firstRefreshTs: AwareDatetime = Field(
firstRefreshTs: AwareDatetime | None = Field(
description = "the time (utc) at which the tokens were first refreshed",
frozen = False,
default = None
)
lastRefreshTs: AwareDatetime = Field(
lastRefreshTs: AwareDatetime | None = Field(
description = "the time (utc) at which the tokens were last refreshed",
frozen = False,
default = None
+20 -2
View File
@@ -83,7 +83,7 @@ class CoreMessageModel(BaseModel):
description = "a hint about the version no. of this message",
min_length = 1,
frozen = True,
default = "1.0.0"
default = "2.0.0"
)
ts: AwareDatetime = Field(
@@ -116,7 +116,7 @@ class CoreMessageModel(BaseModel):
frozen = True
)
clientMessageId: str | int = Field(
clientMessageId: str | int | None = Field(
description = "how the client identifies this message",
frozen = True
)
@@ -127,6 +127,24 @@ class CoreMessageModel(BaseModel):
default = None
)
isInward: bool = Field(
description = "to understand whether this message was an inward message or outward message",
frozen = True,
default = True
)
isBroadcast: bool = Field(
description = "to understand if this message was broadcasted or sent one-to-one",
frozen = True,
default = False
)
sentSuccessfully: bool | None = Field(
description = "when a message is an outgoing message, this indicates if the message was send successfully",
frozen = False,
default = False
)
payload: dict = Field(
description = "the actual contents of the message; will differ for each client",
frozen = True
+1 -1
View File
@@ -130,7 +130,7 @@ class CorePaymentModel(BaseModel):
description = "a hint about the version no. of this message",
min_length = 1,
frozen = True,
default = "1.0.0"
default = "2.0.0"
)
paymentStatus: Literal[
+1 -1
View File
@@ -83,7 +83,7 @@ class CoreUserInfoModel(BaseModel):
description = "a hint about the version no. of this message",
min_length = 1,
frozen = True,
default = "1.0.0"
default = "2.0.0"
)
fullName: str | None = Field(