(20250116) Started upgrading the mail module (to eventually work on cron).
This commit is contained in:
@@ -66,9 +66,9 @@ from shared import constants
|
||||
from models.core.auth_token import CoreAuthTokenModel
|
||||
from models.api.finstitutions.trading.symbols.list import (
|
||||
TradingSymbolListRequestHeaders,
|
||||
TradingSymbolListRequestData,
|
||||
TradingSymbolListBrokerResponse
|
||||
TradingSymbolListRequestData
|
||||
)
|
||||
from models.finstitutions.trading.symbols import TradingSymbolListBrokerResponse
|
||||
|
||||
# To work with dat and time:
|
||||
import datetime
|
||||
|
||||
@@ -60,7 +60,7 @@ from utils_v2.api.async_quart import (
|
||||
)
|
||||
|
||||
# Data Models:
|
||||
from models.api.chat.auth import ChatAuthRequestHeaders, ChatAuthRequestData
|
||||
from models.api.message.chat.auth import ChatAuthRequestHeaders, ChatAuthRequestData
|
||||
from models.core.auth_token import CoreAuthTokenModel
|
||||
|
||||
# Common:
|
||||
@@ -0,0 +1,275 @@
|
||||
"""
|
||||
|
||||
AUTHOR:
|
||||
|
||||
Khushal P Soonderji
|
||||
|
||||
DATE:
|
||||
|
||||
Thursday, 16th Jan., 2025.
|
||||
|
||||
OBJECTIVE:
|
||||
|
||||
To receive callbacks (webhooks).
|
||||
|
||||
REFERENCES:
|
||||
|
||||
N/A
|
||||
|
||||
DOWNLOADS:
|
||||
|
||||
N/A
|
||||
|
||||
NOTES:
|
||||
|
||||
N/A
|
||||
|
||||
"""
|
||||
|
||||
|
||||
# *****************************************************************************************************************
|
||||
# ***** ****
|
||||
# *** IMPORT ***
|
||||
# ***** ****
|
||||
# *****************************************************************************************************************
|
||||
|
||||
|
||||
# To make sibling directories accessible for imports:
|
||||
import sys
|
||||
sys.path.append(".")
|
||||
sys.path.append("..")
|
||||
|
||||
# For using Quart:
|
||||
from quart import Blueprint, current_app, g, request, render_template
|
||||
|
||||
# My utils:
|
||||
from utils_v2.string import json
|
||||
from utils_v2.logging.context import AsyncLoggerContext
|
||||
from utils_v2.api.codes import StatusCodes, HttpCodes
|
||||
from utils_v2.api.response import ResponseModel
|
||||
from utils_v2.api.async_quart import (
|
||||
set_api_version,
|
||||
read_input,
|
||||
get_session_info,
|
||||
log_request_to_mongo,
|
||||
log_chain_to_mongo,
|
||||
should_not_be_under_maintenance,
|
||||
only_whitelisted_ips,
|
||||
limit_rate,
|
||||
validate_input,
|
||||
handle_cancelled_request
|
||||
)
|
||||
|
||||
# GMail-related utils:
|
||||
from utils_v2.goog.controllers.gmail.gmail_client import SCOPES_GMAIL_MAIL_MANAGEMENT
|
||||
|
||||
# Data Models:
|
||||
from models.core.auth_token import CoreAuthTokenModel
|
||||
from models.message.mail.oauth import OAuthMailHandleCallbackResponse
|
||||
|
||||
# Common:
|
||||
from shared import constants
|
||||
|
||||
# For asynchronous activities:
|
||||
import asyncio
|
||||
|
||||
|
||||
# *****************************************************************************************************************
|
||||
# ***** ****
|
||||
# *** MACROS / ONE-TIME INIT ***
|
||||
# ***** ****
|
||||
# *****************************************************************************************************************
|
||||
|
||||
|
||||
# Related to Quart:
|
||||
mail_oauth_callback_bp = Blueprint("mail_cb", __name__)
|
||||
|
||||
|
||||
# *****************************************************************************************************************
|
||||
# ***** ****
|
||||
# *** VARIABLES ***
|
||||
# ***** ****
|
||||
# *****************************************************************************************************************
|
||||
|
||||
|
||||
# --- Nothing Yet
|
||||
|
||||
|
||||
# *****************************************************************************************************************
|
||||
# ***** ****
|
||||
# *** FUNCTIONS ***
|
||||
# ***** ****
|
||||
# *****************************************************************************************************************
|
||||
|
||||
|
||||
@mail_oauth_callback_bp.record_once
|
||||
def init(blueprint_setup_state):
|
||||
|
||||
# This gets called when the blueprint is registered.
|
||||
# Consider this to be a one-time setup for the whole blueprint:
|
||||
pass
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@AsyncLoggerContext.log_it(
|
||||
api_version = "1.0.0",
|
||||
project = constants.PROJECT_NAME,
|
||||
log_type = constants.MODULE_NAME,
|
||||
operation = "mailOAuthClbk",
|
||||
log_input = 2,
|
||||
log_output = 1,
|
||||
sensitive_keys = ["sessionToken", "X-Session-Token"]
|
||||
)
|
||||
async def handle_mail_callback(
|
||||
client_controller,
|
||||
client_connector,
|
||||
request_url: str,
|
||||
inbound_data: dict,
|
||||
) -> OAuthMailHandleCallbackResponse:
|
||||
|
||||
"""
|
||||
This function has been kept separate only for convenience of logging.
|
||||
:param client_controller: The mail controller instance.
|
||||
:param client_connector: The instance of the third-party client to send to the mail controller.
|
||||
:param request_url: The full request URL that came in.
|
||||
:param inbound_data: The data received in the request.
|
||||
:return: The client's response.
|
||||
"""
|
||||
|
||||
return await client_controller.handle_authorization_callback(
|
||||
sql_conn = current_app.sql_writer,
|
||||
mongo_data_conn = current_app.data_mongo,
|
||||
mail_client = client_connector,
|
||||
request_url = request_url,
|
||||
inbound_data = inbound_data,
|
||||
session_token = None
|
||||
)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@mail_oauth_callback_bp.route("/callback/<mail_client>", methods = ["POST", "GET"])
|
||||
@set_api_version(api_version = "1.0.0")
|
||||
@read_input(sanitize_headers = False, sanitize_data = False)
|
||||
@log_request_to_mongo(
|
||||
attr_name = "logs_mongo",
|
||||
project = constants.PROJECT_NAME,
|
||||
log_type = constants.MODULE_NAME,
|
||||
operation = "mailOAuthClbkApi",
|
||||
log_input = True,
|
||||
log_output = True,
|
||||
sensitive_keys = None
|
||||
)
|
||||
@log_chain_to_mongo(attr_name = "logs_mongo")
|
||||
@should_not_be_under_maintenance(attr_name = "is_under_maintenance")
|
||||
@handle_cancelled_request()
|
||||
async def mail_auth_callback(
|
||||
mail_client: str = None,
|
||||
inbound_headers: dict = None,
|
||||
inbound_data: dict = None,
|
||||
inbound_files: dict = None,
|
||||
**kwargs
|
||||
):
|
||||
|
||||
"""
|
||||
This is the callback received when authorizing someone's mail client.
|
||||
:param mail_client: The mail company/brand that you want the authorization from.
|
||||
:param inbound_headers: auto-extracted by the decorators.
|
||||
:param inbound_data: auto-extracted by the decorators.
|
||||
:param inbound_files: auto-extracted by the decorators.
|
||||
:param kwargs: Any number of extra inputs supplied by the decorators.
|
||||
:return: A standard response structure.
|
||||
"""
|
||||
|
||||
# ┳┓ ┳┳┓ •┓ ┏┓┓•
|
||||
# ┣┫┏┓┓┏╋┏┓ ╋┏┓ ┃┃┃┏┓┓┃ ┃ ┃┓┏┓┏┓╋
|
||||
# ┛┗┗┛┗┻┗┗ ┗┗┛ ┛ ┗┗┻┗┗ ┗┛┗┗┗ ┛┗┗
|
||||
|
||||
# Start by assuming failure:
|
||||
client_controller = None
|
||||
client_connector = None
|
||||
client_response = None
|
||||
exception = None
|
||||
|
||||
# Figure out the client connector:
|
||||
match mail_client:
|
||||
case "gmail": client_controller, client_connector = current_app.gmail_controller, current_app.gmail_client
|
||||
case _: client_controller, client_connector = None, None
|
||||
|
||||
# Invoke the mail client:
|
||||
if client_controller is not None and client_connector is not None:
|
||||
try: client_response = await handle_mail_callback(
|
||||
client_controller,
|
||||
client_connector,
|
||||
request_url = request.url,
|
||||
inbound_data = inbound_data
|
||||
)
|
||||
except Exception as excp: exception = excp
|
||||
|
||||
# ┳┓
|
||||
# ┣┫┏┓┏┏┓┏┓┏┓┏┏┓
|
||||
# ┛┗┗ ┛┣┛┗┛┛┗┛┗
|
||||
# ┛
|
||||
|
||||
# Make the mail client a label:
|
||||
mail_client = {
|
||||
"gmail": "Gmail",
|
||||
"outlook": "Outlook"
|
||||
}.get(mail_client, mail_client)
|
||||
|
||||
# If there was some exception:
|
||||
if exception: return await render_template(
|
||||
"/message/mail/oauth/oauth_failure_v2.html",
|
||||
mail_client = mail_client,
|
||||
failure_hint = (
|
||||
f"An internal server error occurred. "
|
||||
f"Please use log-id '{kwargs.get('log_id')}' to check with the support team."
|
||||
)
|
||||
)
|
||||
|
||||
# For an invalid client:
|
||||
if client_controller is None or client_connector is None:
|
||||
return await render_template(
|
||||
"/message/mail/oauth/oauth_failure_v2.html",
|
||||
mail_client = mail_client,
|
||||
failure_hint = (
|
||||
f"Invalid client '{mail_client}' selected. "
|
||||
f"Please use log-id '{kwargs.get('log_id')}' to check with the support team."
|
||||
)
|
||||
)
|
||||
|
||||
# For a valid client whose authorization was denied/cancelled:
|
||||
if client_response.action in ["denied", "cancelled"]:
|
||||
return await render_template(
|
||||
"/message/mail/oauth/oauth_cancelled_v2.html",
|
||||
mail_client = mail_client
|
||||
)
|
||||
|
||||
# For successful authorization:
|
||||
if client_response.success:
|
||||
return await render_template(
|
||||
"/message/mail/oauth/oauth_success_v2.html",
|
||||
mail_client = mail_client
|
||||
)
|
||||
|
||||
# For failed authorization:
|
||||
return await render_template(
|
||||
"/message/mail/oauth/oauth_failure_v2.html",
|
||||
mail_client = mail_client.title(),
|
||||
failure_hint = f"Unknown error. Please use log-id '{kwargs.get('log_id')}' to check with the support team."
|
||||
)
|
||||
|
||||
|
||||
# *****************************************************************************************************************
|
||||
# ***** ****
|
||||
# *** MAIN PROGRAM ***
|
||||
# ***** ****
|
||||
# *****************************************************************************************************************
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
pass
|
||||
@@ -67,7 +67,7 @@ from utils_v2.goog.controllers.gmail.gmail_client import SCOPES_GMAIL_MAIL_MANAG
|
||||
from shared import constants
|
||||
|
||||
# Data Models:
|
||||
from models.api.mail.oauth import (
|
||||
from models.api.message.mail.oauth import (
|
||||
OAuthMailAuthorizationRequestHeaders,
|
||||
OAuthMailAuthorizationRequestData
|
||||
)
|
||||
@@ -0,0 +1,229 @@
|
||||
"""
|
||||
|
||||
AUTHOR:
|
||||
|
||||
Khushal P Soonderji
|
||||
|
||||
DATE:
|
||||
|
||||
Thursday, 16th jan., 2025.
|
||||
|
||||
OBJECTIVE:
|
||||
|
||||
To receive authorization requests (OAuth2.0) for various mail providers and accordingly respond with the
|
||||
authorization request URLs.
|
||||
|
||||
REFERENCES:
|
||||
|
||||
N/A
|
||||
|
||||
DOWNLOADS:
|
||||
|
||||
N/A
|
||||
|
||||
NOTES:
|
||||
|
||||
N/A
|
||||
|
||||
"""
|
||||
|
||||
|
||||
# *****************************************************************************************************************
|
||||
# ***** ****
|
||||
# *** IMPORT ***
|
||||
# ***** ****
|
||||
# *****************************************************************************************************************
|
||||
|
||||
|
||||
# To make sibling directories accessible for imports:
|
||||
import sys
|
||||
sys.path.append(".")
|
||||
sys.path.append("..")
|
||||
|
||||
# For using Quart:
|
||||
from quart import Blueprint, current_app, request
|
||||
|
||||
# My utils:
|
||||
from utils_v2.string import json
|
||||
from utils_v2.api.codes import StatusCodes, HttpCodes
|
||||
from utils_v2.api.response import ResponseModel
|
||||
from utils_v2.api.async_quart import (
|
||||
set_api_version,
|
||||
read_input,
|
||||
get_session_info,
|
||||
log_request_to_mongo,
|
||||
log_chain_to_mongo,
|
||||
should_not_be_under_maintenance,
|
||||
only_whitelisted_ips,
|
||||
limit_rate,
|
||||
validate_input,
|
||||
handle_cancelled_request
|
||||
)
|
||||
|
||||
# GMail-related utils:
|
||||
from utils_v2.goog.controllers.gmail.gmail_client import SCOPES_GMAIL_MAIL_MANAGEMENT
|
||||
|
||||
# Common:
|
||||
from shared import constants
|
||||
|
||||
# Data Models:
|
||||
from models.core.user import CoreUserInfoModel
|
||||
from models.api.message.mail.oauth import (
|
||||
OAuthMailAuthorizationRequestHeaders,
|
||||
OAuthMailAuthorizationRequestData
|
||||
)
|
||||
from models.core.auth_token import CoreAuthTokenModel
|
||||
|
||||
# For asynchronous activities:
|
||||
import asyncio
|
||||
|
||||
|
||||
# *****************************************************************************************************************
|
||||
# ***** ****
|
||||
# *** MACROS / ONE-TIME INIT ***
|
||||
# ***** ****
|
||||
# *****************************************************************************************************************
|
||||
|
||||
|
||||
# Related to Quart:
|
||||
mail_oauth_request_bp = Blueprint("mail_oauth", __name__)
|
||||
|
||||
|
||||
# *****************************************************************************************************************
|
||||
# ***** ****
|
||||
# *** VARIABLES ***
|
||||
# ***** ****
|
||||
# *****************************************************************************************************************
|
||||
|
||||
|
||||
# --- Nothing Yet
|
||||
|
||||
|
||||
# *****************************************************************************************************************
|
||||
# ***** ****
|
||||
# *** FUNCTIONS ***
|
||||
# ***** ****
|
||||
# *****************************************************************************************************************
|
||||
|
||||
|
||||
@mail_oauth_request_bp.record_once
|
||||
def init(blueprint_setup_state):
|
||||
|
||||
# This gets called when the blueprint is registered.
|
||||
# Consider this to be a one-time setup for the whole blueprint:
|
||||
pass
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@mail_oauth_request_bp.route("/oauth", methods = ["GET"])
|
||||
@set_api_version(api_version = "1.0.0")
|
||||
@read_input(sanitize_headers = False, sanitize_data = False)
|
||||
@get_session_info(key = "X-Session-Token", session_coro = "get_session")
|
||||
@log_request_to_mongo(
|
||||
attr_name = "logs_mongo",
|
||||
project = constants.PROJECT_NAME,
|
||||
log_type = constants.MODULE_NAME,
|
||||
operation = "mailOAuthUrlReqApi",
|
||||
log_input = True,
|
||||
log_output = True,
|
||||
sensitive_keys = ["sessionToken", "X-Session-Token"]
|
||||
)
|
||||
@log_chain_to_mongo(attr_name = "logs_mongo")
|
||||
@should_not_be_under_maintenance(attr_name = "is_under_maintenance")
|
||||
@validate_input(
|
||||
header_validator = lambda x: OAuthMailAuthorizationRequestHeaders(**x).model_dump(),
|
||||
data_validator = lambda x: OAuthMailAuthorizationRequestData(**x)
|
||||
)
|
||||
@handle_cancelled_request()
|
||||
async def request_oauth_authorization_url(
|
||||
inbound_headers: dict | OAuthMailAuthorizationRequestHeaders = None,
|
||||
inbound_data: dict | OAuthMailAuthorizationRequestData = None,
|
||||
inbound_files: dict = None,
|
||||
**kwargs
|
||||
):
|
||||
|
||||
"""
|
||||
Use this when requesting access to someone's GMail account. This API should be used from the UI. A button click
|
||||
"Connect to GMail" should hit this API, which will generate a request to gain access to the user's GMail account.
|
||||
When the URL is hit, it opens Google's own UI, and, when the user clicks "Continue", Google hits your 'redirect_url'
|
||||
to inform you about the user's action.
|
||||
:param inbound_headers: auto-extracted by the decorators.
|
||||
:param inbound_data: auto-extracted by the decorators.
|
||||
:param inbound_files: auto-extracted by the decorators.
|
||||
:param kwargs: Any number of extra inputs supplied by the decorators.
|
||||
:return: A standard response structure.
|
||||
"""
|
||||
|
||||
# ┏┓
|
||||
# ┃┃┏┓┏┓┏┓┏┓┏┓┏┏┓┏┏
|
||||
# ┣┛┛ ┗ ┣┛┛ ┗┛┗┗ ┛┛
|
||||
# ┛
|
||||
|
||||
# If the session token is invalid/expired:
|
||||
if kwargs.get("session_info") is None:
|
||||
return ResponseModel(
|
||||
status_code = StatusCodes.FAILED,
|
||||
http_code = HttpCodes.UNAUTHORIZED
|
||||
)
|
||||
|
||||
# ┳┓ ┳┳┓ •┓ ┏┓┓•
|
||||
# ┣┫┏┓┓┏╋┏┓ ╋┏┓ ┃┃┃┏┓┓┃ ┃ ┃┓┏┓┏┓╋
|
||||
# ┛┗┗┛┗┻┗┗ ┗┗┛ ┛ ┗┗┻┗┗ ┗┛┗┗┗ ┛┗┗
|
||||
|
||||
# Start by assuming failure:
|
||||
client_controller = None
|
||||
client_connector = None
|
||||
client_response = None
|
||||
|
||||
# Figure out the client connector:
|
||||
match inbound_data.mailClient:
|
||||
case "gmail": client_controller, client_connector = current_app.gmail_controller, current_app.gmail_client
|
||||
case _: client_controller, client_connector = None, None
|
||||
|
||||
# If a client connector was matched:
|
||||
if client_controller is not None and client_connector is not None:
|
||||
client_response = await client_controller.get_authorization_url(
|
||||
sql_conn = current_app.sql_writer,
|
||||
mongo_data_conn = current_app.data_mongo,
|
||||
mail_client = client_connector,
|
||||
user_info = CoreUserInfoModel(**kwargs["session_info"]),
|
||||
inbound_data = inbound_data,
|
||||
session_token = inbound_headers["X-Session-Token"]
|
||||
)
|
||||
|
||||
# ┳┓
|
||||
# ┣┫┏┓┏┏┓┏┓┏┓┏┏┓
|
||||
# ┛┗┗ ┛┣┛┗┛┛┗┛┗
|
||||
# ┛
|
||||
|
||||
# Unknown client:
|
||||
if client_controller is None or client_connector is None: return ResponseModel(
|
||||
status_code = StatusCodes.FAILED,
|
||||
http_code = HttpCodes.BAD_REQUEST,
|
||||
message = f"Unknown/unimplemented client '{inbound_data.mailClient}'."
|
||||
)
|
||||
|
||||
# Known client (could be a success or a failure):
|
||||
return ResponseModel(
|
||||
status_code = StatusCodes.OK if client_response.success else StatusCodes.FAILED,
|
||||
http_code = HttpCodes.SUCCESS if client_response.success else HttpCodes.INTERNAL_SERVER_ERROR,
|
||||
message = client_response.message,
|
||||
data = {
|
||||
"client": inbound_data.mailClient,
|
||||
"authorizationUrl": client_response.url
|
||||
} if client_response.success else None
|
||||
)
|
||||
|
||||
|
||||
# *****************************************************************************************************************
|
||||
# ***** ****
|
||||
# *** MAIN PROGRAM ***
|
||||
# ***** ****
|
||||
# *****************************************************************************************************************
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
pass
|
||||
@@ -69,7 +69,7 @@ from utils_v2.goog.models.auth_tokens import GoogleAuthTokens
|
||||
from shared import constants
|
||||
|
||||
# Data Models:
|
||||
from models.api.mail.get import MailGetRequestHeaders, MailGetRequestData
|
||||
from models.api.message.mail.get import MailGetRequestHeaders, MailGetRequestData
|
||||
from models.core.user import CoreUserInfoModel
|
||||
|
||||
# To work with datatypes:
|
||||
@@ -70,7 +70,7 @@ from utils_v2.goog.models.auth_tokens import GoogleAuthTokens
|
||||
from shared import constants
|
||||
|
||||
# Data Models:
|
||||
from models.api.mail.list import MailListRequestHeaders, MailListRequestData
|
||||
from models.api.message.mail.list import MailListRequestHeaders, MailListRequestData
|
||||
|
||||
# To work with datatypes:
|
||||
from typing import Literal
|
||||
@@ -69,7 +69,7 @@ from utils_v2.goog.models.auth_tokens import GoogleAuthTokens
|
||||
from shared import constants
|
||||
|
||||
# Data Models:
|
||||
from models.api.mail.send import MailSendRequestHeaders, MailSendRequestData
|
||||
from models.api.message.mail.send import MailSendRequestHeaders, MailSendRequestData
|
||||
from models.core.user import CoreUserInfoModel
|
||||
|
||||
# To work with datatypes:
|
||||
@@ -71,8 +71,8 @@ from shared import constants
|
||||
|
||||
# Data Models:
|
||||
from models.core.user import CoreUserInfoModel
|
||||
from models.api.mail.sync import MailSyncRequestHeaders, MailSyncRequestData
|
||||
from models.api.mail.sync import MailSyncOneResult, MailSyncManyResults
|
||||
from models.api.message.mail.sync import MailSyncRequestHeaders, MailSyncRequestData
|
||||
from models.message.mail.sync import MailSyncOneResult, MailSyncManyResults
|
||||
|
||||
# To work with datatypes:
|
||||
from typing import Literal
|
||||
@@ -69,7 +69,7 @@ from utils_v2.goog.models.auth_tokens import GoogleAuthTokens
|
||||
from shared import constants
|
||||
|
||||
# Data Models:
|
||||
from models.api.mail.tags import MailUpdateTagsRequestHeaders, MailUpdateTagsRequestData
|
||||
from models.api.message.mail.tags import MailUpdateTagsRequestHeaders, MailUpdateTagsRequestData
|
||||
from models.core.user import CoreUserInfoModel
|
||||
|
||||
# To work with datatypes:
|
||||
@@ -63,7 +63,7 @@ from utils_v2.api.async_quart import (
|
||||
from shared import constants
|
||||
|
||||
# Data Models:
|
||||
from models.api.sms.auth import SMSAuthRequestHeaders, SMSAuthRequestData
|
||||
from models.api.message.sms.auth import SMSAuthRequestHeaders, SMSAuthRequestData
|
||||
from models.core.auth_token import CoreAuthTokenModel
|
||||
|
||||
# For asynchronous activities:
|
||||
@@ -64,7 +64,7 @@ from shared import constants
|
||||
|
||||
# Data Models:
|
||||
from models.core.user import CoreUserInfoModel
|
||||
from models.api.sms.list import SMSListRequestHeaders, SMSListRequestData
|
||||
from models.api.message.sms.list import SMSListRequestHeaders, SMSListRequestData
|
||||
|
||||
# Helpers:
|
||||
from api.helpers.user import token_check
|
||||
@@ -62,8 +62,8 @@ from utils_v2.api.async_quart import (
|
||||
|
||||
# Models:
|
||||
from models.core.auth_token import CoreAuthTokenModel
|
||||
from models.api.sms.send import SMSSendRequestHeaders, SMSSendRequestData
|
||||
from models.api.sms.send import (
|
||||
from models.api.message.sms.send import SMSSendRequestHeaders, SMSSendRequestData
|
||||
from models.message.sms.send import (
|
||||
NimbusSMSIndiaMessage,
|
||||
SavvyBulkSMSKenyaMessage,
|
||||
SMSSendManyResults
|
||||
@@ -64,7 +64,7 @@ from shared import constants
|
||||
|
||||
# Data Models:
|
||||
from models.core.user import CoreUserInfoModel
|
||||
from models.api.sms.tags import SMSUpdateTagsRequestHeaders, SMSUpdateTagsRequestData
|
||||
from models.api.message.sms.tags import SMSUpdateTagsRequestHeaders, SMSUpdateTagsRequestData
|
||||
|
||||
# Helpers:
|
||||
from api.helpers.user import token_check
|
||||
Reference in New Issue
Block a user