|
|
@@ -46,9 +46,9 @@ from app.schemas.vas_task import VasTaskCreate, VasTaskUpdate, VasExpiringTaskIt
|
|
|
from app.schemas.ticket import VasTicketCreate, VasTicketOut, VasTicketStatusUpdate, VasTicketMessageCreate, VasTicketMessageOut
|
|
|
from app.schemas.slot_snapshot import SlotSnapshotCreate, SlotSnapshotOut, SlotOverviewOut
|
|
|
from app.schemas.slot_refresh_status import RefreshBase, RefreshFail, RefreshStatusOut
|
|
|
-from app.schemas.telegram import TelegramIn
|
|
|
-from app.schemas.wechat import WechatIn
|
|
|
-from app.schemas.whatsapp import WhatsappIn
|
|
|
+from app.schemas.telegram import TelegramIn, TelegramNoTokenIn
|
|
|
+from app.schemas.wechat import WechatIn, WechatNoTokenIn
|
|
|
+from app.schemas.whatsapp import WhatsappIn, WhatsappNoTokenIn
|
|
|
from app.schemas.notification_outbox import NotificationOutboxCreate, NotificationOutboxUpdate, NotificationOutboxOut
|
|
|
from app.schemas.resource import FileUploadOut
|
|
|
from app.schemas.statistics import VasStatisticsOverviewOut
|
|
|
@@ -724,6 +724,13 @@ async def tg_send_message(
|
|
|
await TelegramService.push_text(payload)
|
|
|
return success()
|
|
|
|
|
|
+@admin_required_router.post("/tg/send_message_no_token", summary="推送电报消息(无需token)", tags=["消息推送接口"], response_model=ApiResponse)
|
|
|
+async def tg_send_message_no_token(
|
|
|
+ payload: TelegramNoTokenIn
|
|
|
+):
|
|
|
+ await TelegramService.push_text_no_token(payload)
|
|
|
+ return success()
|
|
|
+
|
|
|
@admin_required_router.post("/wechat/send", summary="推送微信文本消息", tags=["消息推送接口"], response_model=ApiResponse)
|
|
|
async def wechat_send(
|
|
|
payload: WechatIn
|
|
|
@@ -731,6 +738,20 @@ async def wechat_send(
|
|
|
await WechatService.push_text(payload.api_token, payload.message)
|
|
|
return success()
|
|
|
|
|
|
+@admin_required_router.post("/wechat/send_no_token", summary="推送微信文本消息(无需token)", tags=["消息推送接口"], response_model=ApiResponse)
|
|
|
+async def wechat_send_no_token(
|
|
|
+ payload: WechatNoTokenIn
|
|
|
+):
|
|
|
+ await WechatService.push_text_no_token(payload.message)
|
|
|
+ return success()
|
|
|
+
|
|
|
+@admin_required_router.post("/wechat/send_markdown_no_token", summary="推送微信Markdown消息(无需token)", tags=["消息推送接口"], response_model=ApiResponse)
|
|
|
+async def wechat_send_markdown_no_token(
|
|
|
+ payload: WechatNoTokenIn
|
|
|
+):
|
|
|
+ await WechatService.push_markdown_no_token(payload.message)
|
|
|
+ return success()
|
|
|
+
|
|
|
@admin_required_router.post("/wechat/send_markdown", summary="推送微信Markdown消息", tags=["消息推送接口"], response_model=ApiResponse)
|
|
|
async def wechat_send_markdown(
|
|
|
payload: WechatIn
|
|
|
@@ -752,6 +773,16 @@ async def whatsapp_send(
|
|
|
)
|
|
|
return success()
|
|
|
|
|
|
+@admin_required_router.post("/whatsapp/send_no_token", summary="推送WhatsApp消息(无需token)", tags=["消息推送接口"], response_model=ApiResponse)
|
|
|
+async def whatsapp_send_no_token(
|
|
|
+ payload: WhatsappNoTokenIn
|
|
|
+):
|
|
|
+ await WhatsappService.send_text_no_token(
|
|
|
+ chat_id=payload.chat_id,
|
|
|
+ message=payload.message,
|
|
|
+ )
|
|
|
+ return success()
|
|
|
+
|
|
|
|
|
|
@admin_required_router.post("/notification/outbox/create", summary="创建通知消息", tags=["消息推送接口"], response_model=ApiResponse[NotificationOutboxOut])
|
|
|
async def notification_outbox_create(
|