refactor: apply new utilities and constants across codebase
P0 fixes: - KV Cache migration: security.ts now delegates to kv-cache.ts (74% code reduction) - Environment validation: index.ts validates env on first request - Type safety: optimistic-lock.ts removes `as any` with proper interface P1 improvements: - Constants applied to deposit-agent.ts (TRANSACTION_STATUS, TRANSACTION_TYPE) - Constants applied to callback-handler.ts (CALLBACK_PREFIXES) - Constants applied to domain-tool.ts (MESSAGE_MARKERS) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -48,12 +48,17 @@ export const KEYBOARD_TYPES = {
|
||||
*
|
||||
* Format: prefix:action:params
|
||||
* Examples:
|
||||
* - domain_reg:confirm:example.com:15000
|
||||
* - server_order:confirm:order_123
|
||||
* - domain_reg:example.com:15000
|
||||
* - server_order:userId:index
|
||||
* - server_cancel:userId
|
||||
*/
|
||||
export const CALLBACK_PREFIXES = {
|
||||
DOMAIN_REGISTER_CONFIRM: 'confirm_domain_register',
|
||||
DOMAIN_REGISTER_CANCEL: 'cancel_domain_register',
|
||||
DOMAIN_REGISTER: 'domain_reg',
|
||||
DOMAIN_CANCEL: 'domain_cancel',
|
||||
SERVER_ORDER: 'server_order',
|
||||
SERVER_CANCEL: 'server_cancel',
|
||||
CONFIRM_DOMAIN_REGISTER: 'confirm_domain_register',
|
||||
CANCEL_DOMAIN_REGISTER: 'cancel_domain_register',
|
||||
SERVER_ORDER_CONFIRM: 'confirm_server_order',
|
||||
SERVER_ORDER_CANCEL: 'cancel_server_order',
|
||||
DELETE_CONFIRM: 'confirm_delete',
|
||||
|
||||
Reference in New Issue
Block a user