余额告警独立页面与多渠道通知:钉钉/飞书/企业微信/Bark,支持通知频率策略
- 告警设置拆分为独立页面,支持钉钉/飞书/企业微信/Bark/通用Webhook 多渠道 - 通知策略:低于阈值后按间隔重复提醒,达到最大次数停止,余额恢复自动重置 - 旧 webhook 配置自动迁移为通用渠道,渠道支持测试发送 - 优化告警话术:去商户ID展示、数字千分位格式化
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import request from './request'
|
||||
import type {
|
||||
DashboardStats,
|
||||
AlertChannelInput,
|
||||
AlertNotifyChannel,
|
||||
ApiClient,
|
||||
ApiCredential,
|
||||
CallbackCredential,
|
||||
@@ -108,8 +110,18 @@ export const merchantApi = {
|
||||
request.post('/merchant/recharge/applications', data).then((r) => r.data.data as RechargeApplication),
|
||||
alertConfig: () =>
|
||||
request.get('/merchant/recharge/alert-config').then((r) => r.data.data as LowBalanceAlertConfig),
|
||||
saveAlertConfig: (data: LowBalanceAlertConfig) =>
|
||||
saveAlertConfig: (data: { enabled: boolean; threshold_points: number; notify_interval_minutes: number; max_notifications: number }) =>
|
||||
request.put('/merchant/recharge/alert-config', data).then((r) => r.data.data as LowBalanceAlertConfig),
|
||||
alertChannels: () =>
|
||||
request.get('/merchant/alert-channels').then((r) => r.data.data as AlertNotifyChannel[]),
|
||||
createAlertChannel: (data: AlertChannelInput) =>
|
||||
request.post('/merchant/alert-channels', data).then((r) => r.data.data as AlertNotifyChannel),
|
||||
updateAlertChannel: (id: number, data: AlertChannelInput) =>
|
||||
request.put(`/merchant/alert-channels/${id}`, data).then((r) => r.data.data as AlertNotifyChannel),
|
||||
deleteAlertChannel: (id: number) =>
|
||||
request.delete(`/merchant/alert-channels/${id}`).then((r) => r.data.data),
|
||||
testAlertChannel: (id: number) =>
|
||||
request.post(`/merchant/alert-channels/${id}/test`).then((r) => r.data.data),
|
||||
}
|
||||
|
||||
export const uploadApi = {
|
||||
|
||||
Reference in New Issue
Block a user