feat(ui): add message cache management page and dashboard enhancements
- Introduced MessageCachePage for browsing and managing cached webhook events. - Enhanced DashboardPage to display runtime stats and message cache information. - Added new API types for message cache events and system stats. - Integrated SwaggerPage for API documentation and live request testing.
This commit is contained in:
@@ -78,8 +78,8 @@ Table whatsapp_account {
|
||||
deleted_at timestamp [null]
|
||||
|
||||
indexes {
|
||||
(user_id) [name: 'idx_whatsapp_accounts_user_id']
|
||||
(deleted_at) [name: 'idx_whatsapp_accounts_deleted_at']
|
||||
(user_id) [name: 'idx_whatsapp_account_user_id']
|
||||
(deleted_at) [name: 'idx_whatsapp_account_deleted_at']
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,26 +123,27 @@ Table session {
|
||||
}
|
||||
|
||||
Table message_cache {
|
||||
id varchar(36) [primary key, note: 'UUID']
|
||||
account_id varchar(36) [not null]
|
||||
message_id varchar(255) [unique, not null]
|
||||
chat_id varchar(255) [not null]
|
||||
from_me boolean [not null]
|
||||
timestamp timestamp [not null]
|
||||
message_type varchar(50) [not null, note: 'text, image, video, etc.']
|
||||
content text [not null, note: 'JSON encoded message content']
|
||||
id varchar(128) [primary key]
|
||||
account_id varchar(64) [not null, default: '']
|
||||
event_type varchar(100) [not null]
|
||||
event_data text [not null, note: 'JSON encoded event payload']
|
||||
message_id varchar(255) [not null, default: '']
|
||||
from_number varchar(64) [not null, default: '']
|
||||
to_number varchar(64) [not null, default: '']
|
||||
reason text [not null, default: '']
|
||||
attempts integer [not null, default: 0]
|
||||
timestamp timestamp [not null, default: `now()`]
|
||||
last_attempt timestamp [null]
|
||||
created_at timestamp [not null, default: `now()`]
|
||||
|
||||
indexes {
|
||||
(account_id) [name: 'idx_message_cache_account_id']
|
||||
(chat_id) [name: 'idx_message_cache_chat_id']
|
||||
(from_me) [name: 'idx_message_cache_from_me']
|
||||
(timestamp) [name: 'idx_message_cache_timestamp']
|
||||
(event_type) [name: 'idx_message_cache_event_type']
|
||||
}
|
||||
}
|
||||
|
||||
// Reference documentation
|
||||
Ref: api_keys.user_id > users.id [delete: cascade]
|
||||
Ref: hooks.user_id > users.id [delete: cascade]
|
||||
Ref: whatsapp_accounts.user_id > users.id [delete: cascade]
|
||||
Ref: whatsapp_account.user_id > users.id [delete: cascade]
|
||||
Ref: sessions.user_id > users.id [delete: cascade]
|
||||
|
||||
Reference in New Issue
Block a user