75 lines
2.2 KiB
TypeScript
75 lines
2.2 KiB
TypeScript
export const QQBOT_CORE_DOMAIN_CONTRACT = {
|
|
tables: [
|
|
'qqbot_account',
|
|
'qqbot_connection_session',
|
|
'qqbot_capability_binding',
|
|
'qqbot_permission_policy',
|
|
'qqbot_command',
|
|
'qqbot_command_alias',
|
|
'qqbot_rule',
|
|
'qqbot_conversation',
|
|
'qqbot_message',
|
|
'qqbot_send_task',
|
|
'qqbot_send_log',
|
|
'qqbot_dedupe_event',
|
|
],
|
|
status: {
|
|
accountTable: 'qqbot_account',
|
|
oneBotField: 'onebot_status',
|
|
containerField: 'container_status',
|
|
webuiField: 'webui_status',
|
|
qqLoginField: 'qq_login_status',
|
|
lastErrorField: 'last_error',
|
|
connectionSessionTable: 'qqbot_connection_session',
|
|
sessionStatusField: 'status',
|
|
closeReasonField: 'close_reason',
|
|
},
|
|
command: {
|
|
commandTable: 'qqbot_command',
|
|
commandIdField: 'id',
|
|
commandKeyField: 'command_key',
|
|
operationKeyField: 'operation_key',
|
|
pluginKeyField: 'plugin_key',
|
|
enabledField: 'enabled',
|
|
cooldownField: 'cooldown_seconds',
|
|
aliasTable: 'qqbot_command_alias',
|
|
aliasCommandField: 'command_id',
|
|
aliasTextField: 'alias_text',
|
|
accountBindingTable: 'qqbot_capability_binding',
|
|
accountBindingCommandField: 'capability_key',
|
|
parserValidation: {
|
|
route: 'POST /qqbot/command/test',
|
|
commandIdField: 'commandId',
|
|
fullCommandTextField: 'text',
|
|
},
|
|
},
|
|
permission: {
|
|
policyTable: 'qqbot_permission_policy',
|
|
policyKeyField: 'policy_key',
|
|
scopeFields: ['scope_type', 'scope_value'],
|
|
effectField: 'effect',
|
|
ruleTable: 'qqbot_rule',
|
|
ruleCommandField: 'command_id',
|
|
matcherField: 'matcher_json',
|
|
actionField: 'action_json',
|
|
enabledField: 'enabled',
|
|
},
|
|
messageSend: {
|
|
conversationTable: 'qqbot_conversation',
|
|
messageTable: 'qqbot_message',
|
|
sendQueueTable: 'qqbot_send_task',
|
|
queueTaskKeyField: 'task_key',
|
|
queueStatusField: 'status',
|
|
queuePayloadField: 'payload_json',
|
|
queueReservedAtField: 'reserved_at',
|
|
queueSentAtField: 'sent_at',
|
|
sendLogTable: 'qqbot_send_log',
|
|
sendLogStatusField: 'status',
|
|
sendLogSafeSummaryField: 'safe_summary',
|
|
dedupeTable: 'qqbot_dedupe_event',
|
|
dedupeKeyField: 'dedupe_key',
|
|
dedupeExpiresAtField: 'expires_at',
|
|
rateLimitProvider: 'QqbotRateLimitService',
|
|
},
|
|
} as const;
|