chore: update meessage

This commit is contained in:
engigu
2026-03-25 07:31:45 +08:00
parent 793947f868
commit a6d7677c98
8 changed files with 415 additions and 38 deletions
+8
View File
@@ -299,6 +299,8 @@ export const api = {
getBindings: () => request<NotifyBinding[]>('/notify/bindings'),
saveBinding: (data: Partial<NotifyBinding>) =>
request<NotifyBinding>('/notify/bindings', { method: 'POST', body: JSON.stringify(data) }),
saveBindingsBatch: (data: { type: string; data_id: string; bindings: Partial<NotifyBinding>[] }) =>
request('/notify/bindings/batch', { method: 'POST', body: JSON.stringify(data) }),
deleteBinding: (id: string) => request('/notify/bindings/' + id, { method: 'DELETE' }),
send: (data: { channel_id: string; title: string; text: string }) =>
request<NotifyResult>('/notify/send', { method: 'POST', body: JSON.stringify(data) })
@@ -595,10 +597,16 @@ export interface NotifyBinding {
event: string
way_id: string
data_id: string
extra?: string
created_at?: string
updated_at?: string
}
export interface BindingExtra {
enable_log: boolean
log_limit: number
}
export interface NotifyResult {
success: boolean
error?: string