(20250116) Started upgrading the mail module (to eventually work on cron).
This commit is contained in:
+39
-29
@@ -80,6 +80,8 @@ from controllers_v2.message.sms.all_sms import AllSMSController
|
||||
from controllers_v2.message.sms.nimbus_sms_india import NimbusSMSIndiaController
|
||||
from controllers_v2.message.sms.savvy_bulk_sms_kenya import SavvyBulkSMSKenyaController
|
||||
# ---
|
||||
from controllers_v2.message.mail.gmail import GmailController
|
||||
# ---
|
||||
from controllers_v2.message.chat.all_chat import AllChatController
|
||||
from controllers_v2.message.chat.whatsapp_nimbus import WhatsAppNimbusController
|
||||
# ---
|
||||
@@ -98,23 +100,23 @@ import httpx
|
||||
from icecream import IceCreamDebugger
|
||||
|
||||
# Mail Blueprints:
|
||||
from api.blueprints.mail.oauth.request import mail_oauth_request_bp
|
||||
from api.blueprints.mail.oauth.callback import mail_oauth_callback_bp
|
||||
from api.blueprints.mail.sync.sync_v2 import mail_sync_bp
|
||||
from api.blueprints.mail.retrieve.list import mail_list_bp
|
||||
from api.blueprints.mail.retrieve.get import mail_get_bp
|
||||
from api.blueprints.mail.tags.update import mail_tags_update_bp
|
||||
from api.blueprints.mail.send.send import mail_send_bp
|
||||
from api.blueprints.message.mail.oauth.request_v2 import mail_oauth_request_bp
|
||||
from api.blueprints.message.mail.oauth.callback_v2 import mail_oauth_callback_bp
|
||||
from api.blueprints.message.mail.sync.sync_v2 import mail_sync_bp
|
||||
from api.blueprints.message.mail.retrieve.list import mail_list_bp
|
||||
from api.blueprints.message.mail.retrieve.get import mail_get_bp
|
||||
from api.blueprints.message.mail.tags.update import mail_tags_update_bp
|
||||
from api.blueprints.message.mail.send.send import mail_send_bp
|
||||
|
||||
# SMS Blueprints:
|
||||
from api.blueprints.sms.auth_v2 import sms_auth_bp
|
||||
from api.blueprints.sms.send_v2 import sms_send_bp
|
||||
from api.blueprints.sms.list import sms_list_bp
|
||||
from api.blueprints.sms.tags import sms_update_tags_bp
|
||||
from api.blueprints.message.sms.auth_v2 import sms_auth_bp
|
||||
from api.blueprints.message.sms.send_v2 import sms_send_bp
|
||||
from api.blueprints.message.sms.list import sms_list_bp
|
||||
from api.blueprints.message.sms.tags import sms_update_tags_bp
|
||||
|
||||
# Chat Blueprints:
|
||||
from api.blueprints.chat.auth import chat_auth_bp
|
||||
# from api.blueprints.chat.webhook import chat_webhook_bp
|
||||
from api.blueprints.message.chat.auth import chat_auth_bp
|
||||
# from api.blueprints.message.chat.webhook import chat_webhook_bp
|
||||
|
||||
# Software Blueprints:
|
||||
from api.blueprints.software.auth import sw_auth_bp
|
||||
@@ -393,22 +395,22 @@ async def app_startup(**kwargs):
|
||||
# ┃ ┏┓┏┓┏┓ ┃┃┃┏┓┏┫┏┓┃┏
|
||||
# ┗┛┗┛┛ ┗ ┛ ┗┗┛┗┻┗ ┗┛
|
||||
|
||||
current_app.core_auth_token_controller = CoreAuthTokenController(
|
||||
cache = current_app.module_cache,
|
||||
alert_url = current_app.script_data["alerts"]["url"],
|
||||
http_client = current_app.http_client,
|
||||
debug = enable_debugging,
|
||||
debug_prefix = "AuthToken (CM) | ",
|
||||
debug_only_errors = True
|
||||
)
|
||||
current_app.core_message_controller = CoreMessageController(
|
||||
cache = current_app.module_cache,
|
||||
alert_url = current_app.script_data["alerts"]["url"],
|
||||
http_client = current_app.http_client,
|
||||
debug = enable_debugging,
|
||||
debug_prefix = "Message (CM) | ",
|
||||
debug_only_errors = True
|
||||
)
|
||||
# current_app.core_auth_token_controller = CoreAuthTokenController(
|
||||
# cache = current_app.module_cache,
|
||||
# alert_url = current_app.script_data["alerts"]["url"],
|
||||
# http_client = current_app.http_client,
|
||||
# debug = enable_debugging,
|
||||
# debug_prefix = "AuthToken (CM) | ",
|
||||
# debug_only_errors = True
|
||||
# )
|
||||
# current_app.core_message_controller = CoreMessageController(
|
||||
# cache = current_app.module_cache,
|
||||
# alert_url = current_app.script_data["alerts"]["url"],
|
||||
# http_client = current_app.http_client,
|
||||
# debug = enable_debugging,
|
||||
# debug_prefix = "Message (CM) | ",
|
||||
# debug_only_errors = True
|
||||
# )
|
||||
# current_app.core_payment_controller = CorePaymentController(
|
||||
# cache = current_app.module_cache,
|
||||
# alert_url = current_app.script_data["alerts"]["url"],
|
||||
@@ -458,6 +460,14 @@ async def app_startup(**kwargs):
|
||||
debug = enable_debugging
|
||||
)
|
||||
|
||||
# Messages / Mail Controllers:
|
||||
current_app.gmail_controller = GmailController(
|
||||
cache = current_app.module_cache,
|
||||
http_client = current_app.http_client,
|
||||
alert_url = current_app.script_data["alerts"]["url"],
|
||||
debug = enable_debugging
|
||||
)
|
||||
|
||||
# Messages / Chat Controllers:
|
||||
current_app.chat_controller = AllChatController(
|
||||
cache = current_app.module_cache,
|
||||
|
||||
Reference in New Issue
Block a user