(20241206) Everything will be called "client" now instead of "mailClient", "chatClient", etc.

This commit is contained in:
2024-12-06 11:22:36 +05:30
parent ebe456a8fe
commit 906cc16aff
4 changed files with 6 additions and 4 deletions
+2 -1
View File
@@ -221,8 +221,9 @@ async def callback_test(
# print("TG BOT:", json.to_string(client_response)) # print("TG BOT:", json.to_string(client_response))
client_response = await set_telegram_webhook( client_response = await set_telegram_webhook(
bot_token = inbound_data.auth.botToken, bot_token = inbound_data.auth.botToken,
webhook_url = f"https://nexcom.ditscentre.in/chat/webhook/{inbound_data.auth.botToken}" webhook_url = f"https://api.thecaoffice.com/converse/chat/webhook/{inbound_data.auth.botToken}"
) )
print("WEBHOOK JSON:", json.to_string(client_response))
return "ok" return "ok"
+1 -1
View File
@@ -121,7 +121,7 @@ class ChatAuthRequestHeaders(BaseModel):
class ChatAuthRequestData(BaseModel): class ChatAuthRequestData(BaseModel):
chatClient: Literal["telegram", "whatsapp"] chatClient: Literal["telegram", "whatsapp"] = Field(alias = "client")
auth: Union[TelegramAuth] auth: Union[TelegramAuth]
# ┏┓ ┏• # ┏┓ ┏•
+2 -1
View File
@@ -100,7 +100,8 @@ class OAuthMailAuthorizationRequestData(BaseModel):
mailClient: Literal["gmail"] = Field( mailClient: Literal["gmail"] = Field(
description = "the e-mail provider like 'gmail'", description = "the e-mail provider like 'gmail'",
frozen = True frozen = True,
alias = "client"
) )
mailId: str = Field( mailId: str = Field(
+1 -1
View File
@@ -172,7 +172,7 @@ class SMSAuthRequestHeaders(BaseModel):
class SMSAuthRequestData(BaseModel): class SMSAuthRequestData(BaseModel):
smsClient: Literal["nimbusSmsIndia", "savvyBulkSmsKenya"] smsClient: Literal["nimbusSmsIndia", "savvyBulkSmsKenya"] = Field(alias = "client")
auth: Union[NimbusSMSIndiaAuth, SavvyBulkSMSKenyaAuth] auth: Union[NimbusSMSIndiaAuth, SavvyBulkSMSKenyaAuth]
# ┏┓ ┏• # ┏┓ ┏•