(20241213) Mail Module Reworked!
This commit is contained in:
+10
-4
@@ -37,7 +37,7 @@ sys.path.append("..")
|
||||
|
||||
# For making data behaviour_models:
|
||||
from pydantic import BaseModel, Field, field_validator, PastDatetime
|
||||
from typing import Optional, Literal, List
|
||||
from typing import Optional, Literal, List, Any
|
||||
|
||||
# My utils:
|
||||
from utils_v2.string import regex
|
||||
@@ -99,10 +99,10 @@ class MailListRequestHeaders(BaseModel):
|
||||
# ---------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
class MailListByAccountIdRequestData(BaseModel):
|
||||
class MailListRequestData(BaseModel):
|
||||
|
||||
tokenId: str | List[str] = Field(
|
||||
description = "the account identifier(s) (Mongo ObjectId) granted by 'MailOAuthModel.get_account_identifier'",
|
||||
tokenIds: str | List[str] = Field(
|
||||
description = "the token identifier(s) that tell you which auth-tokens were used for fetching those messages",
|
||||
frozen = True
|
||||
)
|
||||
|
||||
@@ -116,10 +116,16 @@ class MailListByAccountIdRequestData(BaseModel):
|
||||
|
||||
fromCount: int = Field(
|
||||
description = "the no. of mails to skip before picking mails to list; useful for pagination",
|
||||
ge = 0,
|
||||
default = 0,
|
||||
frozen = True
|
||||
)
|
||||
|
||||
tags: List[Any] | None = Field(
|
||||
description = "any no. of tags that you want to filter by",
|
||||
default = None
|
||||
)
|
||||
|
||||
# ┏┓ ┏•
|
||||
# ┃ ┏┓┏┓╋┓┏┓
|
||||
# ┗┛┗┛┛┗┛┗┗┫
|
||||
|
||||
Reference in New Issue
Block a user