(20241209) SMS auth and sending ready.
This commit is contained in:
+13
-2
@@ -72,9 +72,10 @@ from utils_v2.goog.gmail.gmail_client import AsyncGMailClient
|
||||
|
||||
# Behaviour Models:
|
||||
from models.behaviour.mail.oauth_v3 import MailOAuthModel
|
||||
from models.behaviour.mail.sync_v2 import MailSyncModel
|
||||
from models.behaviour.mail.sync_v3 import MailSyncModel
|
||||
from models.behaviour.mail.retrieve import MailRetrieveModel
|
||||
from models.behaviour.sms.auth import SMSAuthModel
|
||||
from models.behaviour.sms.auth_v2 import SMSAuthModel
|
||||
from models.behaviour.sms.send import SMSSendModel
|
||||
from models.behaviour.ai.llm.open_ai import LLMOpenAI
|
||||
|
||||
# To make REST API calls:
|
||||
@@ -90,6 +91,7 @@ from api.blueprints.mail.sync import mail_sync_bp
|
||||
from api.blueprints.mail.list import mail_list_bp
|
||||
from api.blueprints.mail.retrieve import mail_retrieve_bp
|
||||
from api.blueprints.sms.auth import sms_auth_bp
|
||||
from api.blueprints.sms.send import sms_send_bp
|
||||
from api.blueprints.chat.auth import chat_auth_bp
|
||||
from api.blueprints.chat.webhook import chat_webhook_bp
|
||||
from api.blueprints.tech.chat_alerts import tech_chat_alert_bp
|
||||
@@ -128,6 +130,7 @@ app.register_blueprint(mail_sync_bp, url_prefix = f"/{MODULE_BASE}/mail")
|
||||
app.register_blueprint(mail_list_bp, url_prefix = f"/{MODULE_BASE}/mail")
|
||||
app.register_blueprint(mail_retrieve_bp, url_prefix = f"/{MODULE_BASE}/mail")
|
||||
app.register_blueprint(sms_auth_bp, url_prefix = f"/{MODULE_BASE}/sms")
|
||||
app.register_blueprint(sms_send_bp, url_prefix = f"/{MODULE_BASE}/sms")
|
||||
app.register_blueprint(chat_auth_bp, url_prefix = f"/{MODULE_BASE}/chat")
|
||||
app.register_blueprint(chat_webhook_bp, url_prefix = f"/{MODULE_BASE}/chat")
|
||||
app.register_blueprint(tech_chat_alert_bp, url_prefix = f"/{MODULE_BASE}/tech/alert")
|
||||
@@ -352,6 +355,14 @@ async def app_startup(**kwargs):
|
||||
debug_prefix = "SMS-Auth | ",
|
||||
debug_only_errors = True
|
||||
)
|
||||
current_app.sms_send_model = SMSSendModel(
|
||||
cache = current_app.module_cache,
|
||||
alert_url = current_app.script_data["alerts"]["url"],
|
||||
http_client = current_app.http_client,
|
||||
debug = enable_debugging,
|
||||
debug_prefix = "SMS-Send | ",
|
||||
debug_only_errors = True
|
||||
)
|
||||
|
||||
current_app.printer("Internal models ready.")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user