localsbnb-mcp-server 1.0.10 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/auth/apiKeyManager.js +1 -1
  2. package/dist/auth/index.js +1 -1
  3. package/dist/auth/permissionChecker.js +1 -1
  4. package/dist/client/cacheManager.js +1 -1
  5. package/dist/client/httpClient.js +1 -1
  6. package/dist/client/index.js +1 -1
  7. package/dist/client/retryHandler.js +1 -1
  8. package/dist/config/index.js +1 -1
  9. package/dist/config/tools.js +1 -1
  10. package/dist/index.js +1 -1
  11. package/dist/package.json +2 -2
  12. package/dist/server.js +1 -1
  13. package/dist/start.mjs +1 -1
  14. package/dist/tools/channels/getChannelDetails.js +1 -1
  15. package/dist/tools/channels/index.js +1 -1
  16. package/dist/tools/channels/listChannels.js +1 -1
  17. package/dist/tools/finance/analyzeRevenue.js +1 -1
  18. package/dist/tools/finance/index.js +1 -1
  19. package/dist/tools/finance/queryFinancialData.js +1 -1
  20. package/dist/tools/finance/queryOperationalData.js +1 -1
  21. package/dist/tools/finance/queryOperationalDataV2.js +1 -1
  22. package/dist/tools/orders/cancelOrder.js +1 -1
  23. package/dist/tools/orders/getOrderDetails.js +1 -1
  24. package/dist/tools/orders/getOrderDetailsV2.js +1 -1
  25. package/dist/tools/orders/index.js +1 -1
  26. package/dist/tools/orders/ordersGetShared.js +1 -1
  27. package/dist/tools/orders/queryInHouseOrders.js +1 -1
  28. package/dist/tools/orders/queryOrders.js +1 -1
  29. package/dist/tools/orders/queryOrdersByDateRange.js +1 -1
  30. package/dist/tools/orders/queryPreArrivalOrders.js +1 -1
  31. package/dist/tools/orders/queryPreDepartureOrders.js +1 -1
  32. package/dist/tools/orders/queryTodayOrders.js +1 -1
  33. package/dist/tools/rooms/batchUpdatePrices.js +1 -1
  34. package/dist/tools/rooms/index.js +1 -1
  35. package/dist/tools/rooms/queryRoomPrices.js +1 -1
  36. package/dist/tools/rooms/queryRoomStatusNew.js +1 -1
  37. package/dist/tools/rooms/queryTodayRoomStatus.js +1 -1
  38. package/dist/tools/rooms/updateRoomPrice.js +1 -1
  39. package/dist/types/index.js +1 -1
  40. package/dist/utils/desensitize.js +1 -1
  41. package/dist/utils/errorHandler.js +1 -1
  42. package/dist/utils/index.js +1 -1
  43. package/dist/utils/logger.js +1 -1
  44. package/dist/utils/price.js +1 -1
  45. package/dist/utils/shanghaiDate.js +1 -1
  46. package/dist/utils/validator.js +1 -1
  47. package/package.json +2 -2
@@ -1 +1 @@
1
- function _0x465f(_0x57bcde,_0x258126){const _0x44a058=_0x44a0();return _0x465f=function(_0x465ffc,_0x3815f0){_0x465ffc=_0x465ffc-0x194;let _0x18aff5=_0x44a058[_0x465ffc];return _0x18aff5;},_0x465f(_0x57bcde,_0x258126);}(function(_0x4aa2e3,_0x2ea868){const _0x5de006=_0x4aa2e3();while(!![]){try{const _0x295cc7=parseInt(_0x465f(0x19a))/0x1*(-parseInt(_0x465f(0x1a2))/0x2)+parseInt(_0x465f(0x1a3))/0x3*(parseInt(_0x465f(0x1a4))/0x4)+parseInt(_0x465f(0x19e))/0x5+parseInt(_0x465f(0x1a1))/0x6+parseInt(_0x465f(0x1b2))/0x7*(-parseInt(_0x465f(0x196))/0x8)+parseInt(_0x465f(0x1b3))/0x9+-parseInt(_0x465f(0x1ac))/0xa;if(_0x295cc7===_0x2ea868)break;else _0x5de006['push'](_0x5de006['shift']());}catch(_0x8be641){_0x5de006['push'](_0x5de006['shift']());}}}(_0x44a0,0x9dab2));import{logger}from'../utils/logger.js';export class APIKeyManager{['apiKey']=null;[_0x465f(0x1b0)]=[];[_0x465f(0x1b4)]=null;[_0x465f(0x1ad)]=null;['loadFromEnv'](){this['apiKey']=process[_0x465f(0x1b9)][_0x465f(0x1aa)]||null;const _0x1cf27a=process['env'][_0x465f(0x1b8)];this[_0x465f(0x1b0)]=_0x1cf27a?_0x1cf27a[_0x465f(0x1af)](',')[_0x465f(0x1a6)](_0x27e528=>_0x27e528[_0x465f(0x195)]()):[],this[_0x465f(0x1b4)]=process[_0x465f(0x1b9)][_0x465f(0x1b6)]||null,this['campId']=process[_0x465f(0x1b9)][_0x465f(0x19d)]||null,!this[_0x465f(0x1ab)]?logger[_0x465f(0x194)](_0x465f(0x1a9)):logger[_0x465f(0x1ae)](_0x465f(0x19f),{'hasScopes':this[_0x465f(0x1b0)][_0x465f(0x1ba)]>0x0}),!this[_0x465f(0x1b4)]||!this['campId']?logger[_0x465f(0x194)](_0x465f(0x1b5)):logger[_0x465f(0x1ae)]('Hudson\x20credentials\x20loaded\x20from\x20environment');}[_0x465f(0x1a7)](_0x4ec83f){this['apiKey']=_0x4ec83f['apiKey']||null,this[_0x465f(0x1b0)]=_0x4ec83f[_0x465f(0x1b0)]||[],this[_0x465f(0x1b4)]=_0x4ec83f[_0x465f(0x1b4)]||null,this['campId']=_0x4ec83f[_0x465f(0x1ad)]||null,this[_0x465f(0x1ab)]&&logger[_0x465f(0x1ae)](_0x465f(0x1b7),{'hasScopes':this[_0x465f(0x1b0)]['length']>0x0}),this[_0x465f(0x1b4)]&&this[_0x465f(0x1ad)]&&logger[_0x465f(0x1ae)](_0x465f(0x197));}['setAPIKey'](_0x9b3554,_0x39d9d7){this['apiKey']=_0x9b3554,this[_0x465f(0x1b0)]=_0x39d9d7||[],logger[_0x465f(0x1ae)](_0x465f(0x19c),{'hasScopes':this['scopes'][_0x465f(0x1ba)]>0x0});}[_0x465f(0x1a8)](_0xbbdaeb,_0x662df5){this['hudsonAccessToken']=_0xbbdaeb,this['campId']=_0x662df5,logger[_0x465f(0x1ae)](_0x465f(0x1a5));}['getAPIKey'](){return this[_0x465f(0x1ab)]||'';}[_0x465f(0x1a0)](){return this[_0x465f(0x1ab)]!==null&&this[_0x465f(0x1ab)]!=='';}['hasScope'](_0x3c0a8f){if(this['scopes']['includes']('*'))return!![];return this['scopes']['includes'](_0x3c0a8f);}['getScopes'](){return[...this['scopes']];}[_0x465f(0x199)](){return this['apiKey']!==null;}[_0x465f(0x1b1)](){return this[_0x465f(0x1b4)]!==null&&this['campId']!==null;}[_0x465f(0x19b)](){if(!this['hudsonAccessToken'])throw new Error('APP_SECRET\x20not\x20configured.\x20Please\x20set\x20APP_SECRET\x20environment\x20variable.');return this[_0x465f(0x1b4)];}[_0x465f(0x198)](){if(!this[_0x465f(0x1ad)])throw new Error('APP_ID\x20not\x20configured.\x20Please\x20set\x20APP_ID\x20environment\x20variable.');return this[_0x465f(0x1ad)];}}function _0x44a0(){const _0x2a9afa=['length','warn','trim','83800daATYk','Hudson\x20credentials\x20loaded\x20from\x20config','getCampId','isConfigured','524698kTOlXT','getHudsonAccessToken','API\x20key\x20set','APP_ID','4638045shIoRO','API\x20key\x20loaded\x20from\x20environment','hasAPIKey','5568522oZMvzv','2UnJZJo','22986OShRVn','308MqWjpq','Hudson\x20credentials\x20set','map','loadFromConfig','setHudsonCredentials','API\x20key\x20not\x20found\x20in\x20environment\x20variables','LUKEYUN_API_KEY','apiKey','18566160wljxJG','campId','info','split','scopes','isHudsonConfigured','266JdTfcx','8815536VuFWjf','hudsonAccessToken','APP_SECRET\x20or\x20APP_ID\x20not\x20found\x20in\x20environment\x20variables','APP_SECRET','API\x20key\x20loaded\x20from\x20config','LUKEYUN_API_SCOPES','env'];_0x44a0=function(){return _0x2a9afa;};return _0x44a0();}
1
+ function _0x26d9(_0x29a545,_0x1bdfba){const _0x5e4387=_0x5e43();return _0x26d9=function(_0x26d987,_0x8bc682){_0x26d987=_0x26d987-0x95;let _0x50f5aa=_0x5e4387[_0x26d987];return _0x50f5aa;},_0x26d9(_0x29a545,_0x1bdfba);}function _0x5e43(){const _0x1a8504=['setAPIKey','getScopes','split','getCampId','info','79767VzKKGp','APP_SECRET','hudsonAccessToken','hasAPIKey','Hudson\x20credentials\x20loaded\x20from\x20config','LUKEYUN_API_SCOPES','APP_ID','API\x20key\x20loaded\x20from\x20environment','trim','includes','campId','length','API\x20key\x20set','warn','1832931JAxSRt','getHudsonAccessToken','APP_SECRET\x20or\x20APP_ID\x20not\x20found\x20in\x20environment\x20variables','Hudson\x20credentials\x20set','scopes','apiKey','loadFromEnv','APP_ID\x20not\x20configured.\x20Please\x20set\x20APP_ID\x20environment\x20variable.','isConfigured','1673960pvVQof','3242JyGaWP','6bsFmwW','getAPIKey','11BhKrvm','env','isHudsonConfigured','map','52crLjnJ','18933020iwMpCr','4271393IzNZze','132vjesYI','6444296IRGFoq','API\x20key\x20not\x20found\x20in\x20environment\x20variables'];_0x5e43=function(){return _0x1a8504;};return _0x5e43();}(function(_0x189880,_0x51a7da){const _0xd1c076=_0x189880();while(!![]){try{const _0xdf193e=parseInt(_0x26d9(0xb2))/0x1*(-parseInt(_0x26d9(0xbc))/0x2)+-parseInt(_0x26d9(0x9a))/0x3*(parseInt(_0x26d9(0xb9))/0x4)+parseInt(_0x26d9(0xb1))/0x5*(parseInt(_0x26d9(0xb3))/0x6)+-parseInt(_0x26d9(0xbb))/0x7+-parseInt(_0x26d9(0xbd))/0x8+parseInt(_0x26d9(0xa8))/0x9+parseInt(_0x26d9(0xba))/0xa*(parseInt(_0x26d9(0xb5))/0xb);if(_0xdf193e===_0x51a7da)break;else _0xd1c076['push'](_0xd1c076['shift']());}catch(_0x4afdd8){_0xd1c076['push'](_0xd1c076['shift']());}}}(_0x5e43,0x6f6c4));import{logger}from'../utils/logger.js';export class APIKeyManager{[_0x26d9(0xad)]=null;['scopes']=[];[_0x26d9(0x9c)]=null;[_0x26d9(0xa4)]=null;[_0x26d9(0xae)](){this['apiKey']=process[_0x26d9(0xb6)]['LUKEYUN_API_KEY']||null;const _0x4c1a54=process[_0x26d9(0xb6)][_0x26d9(0x9f)];this[_0x26d9(0xac)]=_0x4c1a54?_0x4c1a54[_0x26d9(0x97)](',')[_0x26d9(0xb8)](_0x5ea3d2=>_0x5ea3d2[_0x26d9(0xa2)]()):[],this[_0x26d9(0x9c)]=process[_0x26d9(0xb6)][_0x26d9(0x9b)]||null,this[_0x26d9(0xa4)]=process[_0x26d9(0xb6)][_0x26d9(0xa0)]||null,!this[_0x26d9(0xad)]?logger[_0x26d9(0xa7)](_0x26d9(0xbe)):logger[_0x26d9(0x99)](_0x26d9(0xa1),{'hasScopes':this[_0x26d9(0xac)]['length']>0x0}),!this[_0x26d9(0x9c)]||!this[_0x26d9(0xa4)]?logger[_0x26d9(0xa7)](_0x26d9(0xaa)):logger[_0x26d9(0x99)]('Hudson\x20credentials\x20loaded\x20from\x20environment');}['loadFromConfig'](_0x17a5ac){this[_0x26d9(0xad)]=_0x17a5ac['apiKey']||null,this[_0x26d9(0xac)]=_0x17a5ac[_0x26d9(0xac)]||[],this[_0x26d9(0x9c)]=_0x17a5ac['hudsonAccessToken']||null,this[_0x26d9(0xa4)]=_0x17a5ac[_0x26d9(0xa4)]||null,this[_0x26d9(0xad)]&&logger['info']('API\x20key\x20loaded\x20from\x20config',{'hasScopes':this['scopes'][_0x26d9(0xa5)]>0x0}),this[_0x26d9(0x9c)]&&this['campId']&&logger[_0x26d9(0x99)](_0x26d9(0x9e));}[_0x26d9(0x95)](_0x348ce2,_0x4938a2){this[_0x26d9(0xad)]=_0x348ce2,this[_0x26d9(0xac)]=_0x4938a2||[],logger[_0x26d9(0x99)](_0x26d9(0xa6),{'hasScopes':this['scopes'][_0x26d9(0xa5)]>0x0});}['setHudsonCredentials'](_0x15fd2d,_0x3dfa16){this['hudsonAccessToken']=_0x15fd2d,this[_0x26d9(0xa4)]=_0x3dfa16,logger[_0x26d9(0x99)](_0x26d9(0xab));}[_0x26d9(0xb4)](){return this[_0x26d9(0xad)]||'';}[_0x26d9(0x9d)](){return this[_0x26d9(0xad)]!==null&&this['apiKey']!=='';}['hasScope'](_0x28980c){if(this[_0x26d9(0xac)][_0x26d9(0xa3)]('*'))return!![];return this[_0x26d9(0xac)]['includes'](_0x28980c);}[_0x26d9(0x96)](){return[...this[_0x26d9(0xac)]];}[_0x26d9(0xb0)](){return this[_0x26d9(0xad)]!==null;}[_0x26d9(0xb7)](){return this[_0x26d9(0x9c)]!==null&&this[_0x26d9(0xa4)]!==null;}[_0x26d9(0xa9)](){if(!this[_0x26d9(0x9c)])throw new Error('APP_SECRET\x20not\x20configured.\x20Please\x20set\x20APP_SECRET\x20environment\x20variable.');return this[_0x26d9(0x9c)];}[_0x26d9(0x98)](){if(!this[_0x26d9(0xa4)])throw new Error(_0x26d9(0xaf));return this[_0x26d9(0xa4)];}}
@@ -1 +1 @@
1
- (function(_0x2a9b4e,_0x4365b6){var _0xdb8b86=_0x2a9b4e();while(!![]){try{var _0x4b0bbd=parseInt(_0x4ac7(0x77))/0x1+-parseInt(_0x4ac7(0x7d))/0x2*(parseInt(_0x4ac7(0x7b))/0x3)+-parseInt(_0x4ac7(0x75))/0x4+parseInt(_0x4ac7(0x7a))/0x5+parseInt(_0x4ac7(0x78))/0x6*(parseInt(_0x4ac7(0x7c))/0x7)+parseInt(_0x4ac7(0x79))/0x8*(parseInt(_0x4ac7(0x76))/0x9)+parseInt(_0x4ac7(0x74))/0xa;if(_0x4b0bbd===_0x4365b6)break;else _0xdb8b86['push'](_0xdb8b86['shift']());}catch(_0x514b4b){_0xdb8b86['push'](_0xdb8b86['shift']());}}}(_0x1265,0x98ff8));function _0x4ac7(_0x48d739,_0x309f74){var _0x1265e8=_0x1265();return _0x4ac7=function(_0x4ac792,_0x2efbd0){_0x4ac792=_0x4ac792-0x74;var _0x48be64=_0x1265e8[_0x4ac792];return _0x48be64;},_0x4ac7(_0x48d739,_0x309f74);}export{APIKeyManager}from'./apiKeyManager.js';export{PermissionChecker}from'./permissionChecker.js';function _0x1265(){var _0xaf0b66=['735808hMoRfS','6GCrlVk','1329440pOsIIK','326230IIblkT','3484131YZormu','1460977yvfOkr','2CAqkEL','18285000ilPLNK','4865552QxIZzP','9bXriSC'];_0x1265=function(){return _0xaf0b66;};return _0x1265();}
1
+ (function(_0x4f1810,_0x36bbd9){var _0x1df192=_0x4f1810();while(!![]){try{var _0x213f1f=parseInt(_0x1bfb(0x16a))/0x1*(-parseInt(_0x1bfb(0x15e))/0x2)+-parseInt(_0x1bfb(0x163))/0x3+-parseInt(_0x1bfb(0x167))/0x4*(parseInt(_0x1bfb(0x168))/0x5)+parseInt(_0x1bfb(0x165))/0x6*(-parseInt(_0x1bfb(0x161))/0x7)+parseInt(_0x1bfb(0x15f))/0x8*(-parseInt(_0x1bfb(0x162))/0x9)+-parseInt(_0x1bfb(0x160))/0xa*(-parseInt(_0x1bfb(0x166))/0xb)+parseInt(_0x1bfb(0x164))/0xc*(parseInt(_0x1bfb(0x169))/0xd);if(_0x213f1f===_0x36bbd9)break;else _0x1df192['push'](_0x1df192['shift']());}catch(_0x31a4ac){_0x1df192['push'](_0x1df192['shift']());}}}(_0x4ed9,0x466e7));function _0x1bfb(_0xb3e2c9,_0x5e62d9){var _0x4ed93c=_0x4ed9();return _0x1bfb=function(_0x1bfb60,_0xa44310){_0x1bfb60=_0x1bfb60-0x15e;var _0x2c9966=_0x4ed93c[_0x1bfb60];return _0x2c9966;},_0x1bfb(_0xb3e2c9,_0x5e62d9);}function _0x4ed9(){var _0x2d834c=['4GvAwtV','1133695FJRcxn','11230063UPKNis','59AOgFTC','606YYmOBU','159832NMagfo','790jKlqwo','14JpDcMD','171NSQZvn','1482402jQakAG','12khzXcJ','92844bgkZmf','79915htgGwR'];_0x4ed9=function(){return _0x2d834c;};return _0x4ed9();}export{APIKeyManager}from'./apiKeyManager.js';export{PermissionChecker}from'./permissionChecker.js';
@@ -1 +1 @@
1
- (function(_0x52bdd7,_0xa37b71){const _0x4fbadc=_0x52bdd7();while(!![]){try{const _0x23af49=parseInt(_0x42a6(0x197))/0x1+parseInt(_0x42a6(0x19d))/0x2*(-parseInt(_0x42a6(0x1ac))/0x3)+parseInt(_0x42a6(0x191))/0x4*(parseInt(_0x42a6(0x1b2))/0x5)+-parseInt(_0x42a6(0x1a4))/0x6+parseInt(_0x42a6(0x192))/0x7+-parseInt(_0x42a6(0x198))/0x8*(parseInt(_0x42a6(0x1a9))/0x9)+parseInt(_0x42a6(0x1a5))/0xa*(parseInt(_0x42a6(0x1a7))/0xb);if(_0x23af49===_0xa37b71)break;else _0x4fbadc['push'](_0x4fbadc['shift']());}catch(_0x3dbe29){_0x4fbadc['push'](_0x4fbadc['shift']());}}}(_0x3604,0x84fb3));function _0x42a6(_0x38e8d9,_0x51f166){const _0x360423=_0x3604();return _0x42a6=function(_0x42a65c,_0x293407){_0x42a65c=_0x42a65c-0x190;let _0x12f9ff=_0x360423[_0x42a65c];return _0x12f9ff;},_0x42a6(_0x38e8d9,_0x51f166);}import{MCPError,ErrorCode,getPermissionDeniedMessage}from'../utils/errorHandler.js';import{logger}from'../utils/logger.js';function toolToPermissionDomain(_0x4b3946){switch(_0x4b3946){case'query_today_orders':case _0x42a6(0x1b1):case _0x42a6(0x195):case _0x42a6(0x1ad):case'query_orders_by_date_range':case _0x42a6(0x1a6):case _0x42a6(0x193):case _0x42a6(0x196):return'orders';case'query_operational_data_v2':return _0x42a6(0x1a1);case _0x42a6(0x190):case _0x42a6(0x19c):return'room_status';case _0x42a6(0x199):return _0x42a6(0x1a2);default:return _0x42a6(0x19e);}}export class PermissionChecker{[_0x42a6(0x1aa)];constructor(_0x2ccb52){this['keyManager']=_0x2ccb52;}[_0x42a6(0x1a0)](_0x502dda,_0x416f08){if(_0x416f08[_0x42a6(0x194)]===0x0)return;if(!this[_0x42a6(0x1aa)]['hasAPIKey']()&&this[_0x42a6(0x1aa)]['isHudsonConfigured']()){logger[_0x42a6(0x1a3)](_0x42a6(0x1b0),{'tool':_0x502dda,'requiredScopes':_0x416f08});return;}const _0x4a3490=_0x416f08[_0x42a6(0x1ab)](_0x5f0d63=>this[_0x42a6(0x1aa)][_0x42a6(0x19a)](_0x5f0d63));if(!_0x4a3490){const _0x544c56=this[_0x42a6(0x1aa)][_0x42a6(0x1a8)](),_0x260492=toolToPermissionDomain(_0x502dda);logger['warn'](_0x42a6(0x19b),{'tool':_0x502dda,'required':_0x416f08,'current':_0x544c56,'domain':_0x260492});throw new MCPError(ErrorCode[_0x42a6(0x1af)],getPermissionDeniedMessage(_0x260492),{'tool':_0x502dda,'requiredScopes':_0x416f08,'currentScopes':_0x544c56,'domain':_0x260492,'source':_0x42a6(0x19f)});}logger[_0x42a6(0x1a3)](_0x42a6(0x1ae),{'tool':_0x502dda,'scopes':_0x416f08});}}function _0x3604(){const _0x51f774=['generic','路客云AI','checkPermission','finance','room_price','debug','3079548crRBHl','25220iWWpCj','get_order_details_v2','5797oxXFDb','getScopes','582291TXtxbA','keyManager','some','171uoCFqi','query_pre_departure_orders','Permission\x20check\x20passed','PERMISSION_DENIED','Permission\x20check\x20passed\x20(Hudson\x20auth\x20only)','query_pre_arrival_orders','5EcrrxE','query_today_room_status','2393000wxtIIv','1942591XZDAmU','query_orders','length','query_in_house_orders','get_order_details','362162zMujjG','104SacJgL','query_room_prices','hasScope','Permission\x20denied','query_room_status_new','23438qoNAIe'];_0x3604=function(){return _0x51f774;};return _0x3604();}
1
+ (function(_0x1151f8,_0x36f166){const _0x1dfa77=_0x1151f8();while(!![]){try{const _0x4898dd=-parseInt(_0x5bc5(0x18f))/0x1*(parseInt(_0x5bc5(0x17e))/0x2)+parseInt(_0x5bc5(0x183))/0x3*(parseInt(_0x5bc5(0x178))/0x4)+-parseInt(_0x5bc5(0x195))/0x5*(-parseInt(_0x5bc5(0x189))/0x6)+-parseInt(_0x5bc5(0x197))/0x7*(-parseInt(_0x5bc5(0x182))/0x8)+parseInt(_0x5bc5(0x180))/0x9*(parseInt(_0x5bc5(0x199))/0xa)+-parseInt(_0x5bc5(0x18b))/0xb*(parseInt(_0x5bc5(0x184))/0xc)+-parseInt(_0x5bc5(0x18e))/0xd*(parseInt(_0x5bc5(0x198))/0xe);if(_0x4898dd===_0x36f166)break;else _0x1dfa77['push'](_0x1dfa77['shift']());}catch(_0x2f5006){_0x1dfa77['push'](_0x1dfa77['shift']());}}}(_0x1a06,0xe2be9));import{MCPError,ErrorCode,getPermissionDeniedMessage}from'../utils/errorHandler.js';function _0x1a06(){const _0x2f51f6=['query_today_orders','length','hasScope','getScopes','PERMISSION_DENIED','3392405QwXHiO','generic','2116051eDdzHT','209986UTBlaM','40Tumbkd','get_order_details_v2','4TDGdeq','query_pre_arrival_orders','finance','query_room_status_new','Permission\x20check\x20passed','hasAPIKey','14KumclP','keyManager','3391425flzVwD','query_pre_departure_orders','40ZjRbte','3359514ASOWfx','7008RTFHum','room_status','get_order_details','debug','some','6emETok','checkPermission','5346EQtUtR','isHudsonConfigured','query_in_house_orders','2470GALTtA','107815cVAZno'];_0x1a06=function(){return _0x2f51f6;};return _0x1a06();}function _0x5bc5(_0x5bf110,_0x5b2c29){const _0x1a0652=_0x1a06();return _0x5bc5=function(_0x5bc52d,_0x5cbfcb){_0x5bc52d=_0x5bc52d-0x177;let _0x5180bb=_0x1a0652[_0x5bc52d];return _0x5180bb;},_0x5bc5(_0x5bf110,_0x5b2c29);}import{logger}from'../utils/logger.js';function toolToPermissionDomain(_0x3b9cbb){switch(_0x3b9cbb){case _0x5bc5(0x190):case _0x5bc5(0x179):case _0x5bc5(0x18d):case _0x5bc5(0x181):case'query_orders_by_date_range':case _0x5bc5(0x177):case'query_orders':case _0x5bc5(0x186):return'orders';case'query_operational_data_v2':return _0x5bc5(0x17a);case'query_today_room_status':case _0x5bc5(0x17b):return _0x5bc5(0x185);case'query_room_prices':return'room_price';default:return _0x5bc5(0x196);}}export class PermissionChecker{[_0x5bc5(0x17f)];constructor(_0x5655e4){this[_0x5bc5(0x17f)]=_0x5655e4;}[_0x5bc5(0x18a)](_0x56c3ac,_0x2c8db3){if(_0x2c8db3[_0x5bc5(0x191)]===0x0)return;if(!this[_0x5bc5(0x17f)][_0x5bc5(0x17d)]()&&this['keyManager'][_0x5bc5(0x18c)]()){logger[_0x5bc5(0x187)]('Permission\x20check\x20passed\x20(Hudson\x20auth\x20only)',{'tool':_0x56c3ac,'requiredScopes':_0x2c8db3});return;}const _0x1fdd37=_0x2c8db3[_0x5bc5(0x188)](_0x1891c5=>this[_0x5bc5(0x17f)][_0x5bc5(0x192)](_0x1891c5));if(!_0x1fdd37){const _0x2b4418=this['keyManager'][_0x5bc5(0x193)](),_0x1ae448=toolToPermissionDomain(_0x56c3ac);logger['warn']('Permission\x20denied',{'tool':_0x56c3ac,'required':_0x2c8db3,'current':_0x2b4418,'domain':_0x1ae448});throw new MCPError(ErrorCode[_0x5bc5(0x194)],getPermissionDeniedMessage(_0x1ae448),{'tool':_0x56c3ac,'requiredScopes':_0x2c8db3,'currentScopes':_0x2b4418,'domain':_0x1ae448,'source':'路客云AI'});}logger[_0x5bc5(0x187)](_0x5bc5(0x17c),{'tool':_0x56c3ac,'scopes':_0x2c8db3});}}
@@ -1 +1 @@
1
- function _0x1d2e(_0x46aaff,_0x5f3d40){const _0x12f92c=_0x12f9();return _0x1d2e=function(_0x1d2ef0,_0x1bf8fa){_0x1d2ef0=_0x1d2ef0-0xa8;let _0x1f4c15=_0x12f92c[_0x1d2ef0];return _0x1f4c15;},_0x1d2e(_0x46aaff,_0x5f3d40);}function _0x12f9(){const _0x145aa3=['delete','enabled','Cache\x20deleted','2152032aSjHbX','Cache\x20expired','8595064oYknUc','3506dmFhoU','3qPtiVy','get','175aClICN','expiresAt','keys','now','cache','set','3967292IOunaR','378MREpXY','map','data','Cache\x20hit','Cache\x20set','stringify','debug','205660egasSq','clear','31162734WnGVCv','join'];_0x12f9=function(){return _0x145aa3;};return _0x12f9();}(function(_0x51c7ac,_0x506baa){const _0x38c3e5=_0x51c7ac();while(!![]){try{const _0x3930ec=-parseInt(_0x1d2e(0xb6))/0x1*(-parseInt(_0x1d2e(0xb5))/0x2)+-parseInt(_0x1d2e(0xb2))/0x3+-parseInt(_0x1d2e(0xbe))/0x4+-parseInt(_0x1d2e(0xab))/0x5+-parseInt(_0x1d2e(0xbf))/0x6*(-parseInt(_0x1d2e(0xb8))/0x7)+-parseInt(_0x1d2e(0xb4))/0x8+parseInt(_0x1d2e(0xad))/0x9;if(_0x3930ec===_0x506baa)break;else _0x38c3e5['push'](_0x38c3e5['shift']());}catch(_0x461e12){_0x38c3e5['push'](_0x38c3e5['shift']());}}}(_0x12f9,0x9d646));import{config}from'../config/index.js';import{logger}from'../utils/logger.js';export class CacheManager{[_0x1d2e(0xbc)]=new Map();[_0x1d2e(0xb7)](_0x4a6c7e){if(!config[_0x1d2e(0xbc)]['enabled'])return null;const _0x40e180=this[_0x1d2e(0xbc)]['get'](_0x4a6c7e);if(!_0x40e180)return null;if(Date[_0x1d2e(0xbb)]()>_0x40e180[_0x1d2e(0xb9)])return this[_0x1d2e(0xbc)]['delete'](_0x4a6c7e),logger[_0x1d2e(0xaa)](_0x1d2e(0xb3),{'key':_0x4a6c7e}),null;return logger[_0x1d2e(0xaa)](_0x1d2e(0xc2),{'key':_0x4a6c7e}),_0x40e180[_0x1d2e(0xc1)];}[_0x1d2e(0xbd)](_0x1675a5,_0x344d20,_0x43f09d){if(!config[_0x1d2e(0xbc)][_0x1d2e(0xb0)])return;const _0x37dc91=_0x43f09d||config[_0x1d2e(0xbc)]['ttl'];this['cache'][_0x1d2e(0xbd)](_0x1675a5,{'data':_0x344d20,'expiresAt':Date[_0x1d2e(0xbb)]()+_0x37dc91}),logger[_0x1d2e(0xaa)](_0x1d2e(0xa8),{'key':_0x1675a5,'ttl':_0x37dc91});}[_0x1d2e(0xaf)](_0x845e28){this[_0x1d2e(0xbc)][_0x1d2e(0xaf)](_0x845e28),logger[_0x1d2e(0xaa)](_0x1d2e(0xb1),{'key':_0x845e28});}[_0x1d2e(0xac)](){this['cache'][_0x1d2e(0xac)](),logger['debug']('Cache\x20cleared');}static['generateKey'](_0x5cdc33,_0x3b6654){const _0x34ac89=Object[_0x1d2e(0xba)](_0x3b6654)['sort']()[_0x1d2e(0xc0)](_0x242f8e=>_0x242f8e+'='+JSON[_0x1d2e(0xa9)](_0x3b6654[_0x242f8e]))[_0x1d2e(0xae)]('&');return _0x5cdc33+':'+_0x34ac89;}}
1
+ (function(_0x389207,_0x8a9f3e){const _0x2517cc=_0x389207();while(!![]){try{const _0x685053=parseInt(_0x1a67(0xe6))/0x1+parseInt(_0x1a67(0xe1))/0x2+parseInt(_0x1a67(0xdc))/0x3*(parseInt(_0x1a67(0xf1))/0x4)+-parseInt(_0x1a67(0xe0))/0x5+-parseInt(_0x1a67(0xda))/0x6*(-parseInt(_0x1a67(0xe4))/0x7)+-parseInt(_0x1a67(0xe2))/0x8*(parseInt(_0x1a67(0xdf))/0x9)+-parseInt(_0x1a67(0xeb))/0xa;if(_0x685053===_0x8a9f3e)break;else _0x2517cc['push'](_0x2517cc['shift']());}catch(_0x4e766a){_0x2517cc['push'](_0x2517cc['shift']());}}}(_0x1f72,0xb3314));function _0x1a67(_0x26f3a1,_0x306666){const _0x1f729d=_0x1f72();return _0x1a67=function(_0x1a67a7,_0x1be450){_0x1a67a7=_0x1a67a7-0xd8;let _0x4cc11a=_0x1f729d[_0x1a67a7];return _0x4cc11a;},_0x1a67(_0x26f3a1,_0x306666);}import{config}from'../config/index.js';function _0x1f72(){const _0x56d0f5=['generateKey','525916zLiMXn','Cache\x20expired','Cache\x20cleared','clear','Cache\x20set','13000EKzEnc','expiresAt','keys','Cache\x20deleted','set','data','4JnFscN','stringify','debug','get','now','join','18PnKmVN','ttl','3273195QmwJjI','cache','delete','18ncsnuI','7321530nXFDWs','23014KDFlSy','2655464vLnejE','enabled','2881564OQKnBi'];_0x1f72=function(){return _0x56d0f5;};return _0x1f72();}import{logger}from'../utils/logger.js';export class CacheManager{[_0x1a67(0xdd)]=new Map();[_0x1a67(0xf4)](_0x4c27c7){if(!config['cache']['enabled'])return null;const _0x65b160=this[_0x1a67(0xdd)]['get'](_0x4c27c7);if(!_0x65b160)return null;if(Date[_0x1a67(0xd8)]()>_0x65b160[_0x1a67(0xec)])return this[_0x1a67(0xdd)][_0x1a67(0xde)](_0x4c27c7),logger[_0x1a67(0xf3)](_0x1a67(0xe7),{'key':_0x4c27c7}),null;return logger['debug']('Cache\x20hit',{'key':_0x4c27c7}),_0x65b160[_0x1a67(0xf0)];}['set'](_0x49f90d,_0x378d9e,_0x519f8b){if(!config['cache'][_0x1a67(0xe3)])return;const _0x427da3=_0x519f8b||config[_0x1a67(0xdd)][_0x1a67(0xdb)];this['cache'][_0x1a67(0xef)](_0x49f90d,{'data':_0x378d9e,'expiresAt':Date[_0x1a67(0xd8)]()+_0x427da3}),logger[_0x1a67(0xf3)](_0x1a67(0xea),{'key':_0x49f90d,'ttl':_0x427da3});}[_0x1a67(0xde)](_0x9cfc5d){this['cache'][_0x1a67(0xde)](_0x9cfc5d),logger[_0x1a67(0xf3)](_0x1a67(0xee),{'key':_0x9cfc5d});}[_0x1a67(0xe9)](){this[_0x1a67(0xdd)][_0x1a67(0xe9)](),logger['debug'](_0x1a67(0xe8));}static[_0x1a67(0xe5)](_0x260a67,_0x1fc45d){const _0x1044c1=Object[_0x1a67(0xed)](_0x1fc45d)['sort']()['map'](_0x457d04=>_0x457d04+'='+JSON[_0x1a67(0xf2)](_0x1fc45d[_0x457d04]))[_0x1a67(0xd9)]('&');return _0x260a67+':'+_0x1044c1;}}
@@ -1 +1 @@
1
- function _0x513a(_0x4d9582,_0x2e4fcb){const _0x4b56b0=_0x4b56();return _0x513a=function(_0x513a00,_0x35bbb1){_0x513a00=_0x513a00-0x13f;let _0x25f3ff=_0x4b56b0[_0x513a00];return _0x25f3ff;},_0x513a(_0x4d9582,_0x2e4fcb);}(function(_0x12262e,_0x48e623){const _0x6876f4=_0x12262e();while(!![]){try{const _0x7ec5ba=-parseInt(_0x513a(0x141))/0x1*(parseInt(_0x513a(0x13f))/0x2)+-parseInt(_0x513a(0x148))/0x3*(parseInt(_0x513a(0x14d))/0x4)+parseInt(_0x513a(0x14e))/0x5+parseInt(_0x513a(0x161))/0x6*(-parseInt(_0x513a(0x175))/0x7)+parseInt(_0x513a(0x177))/0x8*(-parseInt(_0x513a(0x163))/0x9)+parseInt(_0x513a(0x16f))/0xa+-parseInt(_0x513a(0x171))/0xb*(-parseInt(_0x513a(0x159))/0xc);if(_0x7ec5ba===_0x48e623)break;else _0x6876f4['push'](_0x6876f4['shift']());}catch(_0x326da4){_0x6876f4['push'](_0x6876f4['shift']());}}}(_0x4b56,0x678fd));import _0x5e57eb from'axios';import{config}from'../config/index.js';import{logger}from'../utils/logger.js';import{MCPError,ErrorCode}from'../utils/errorHandler.js';import{RetryHandler}from'./retryHandler.js';function _0x4b56(){const _0x37046c=['message','status','权限不足','error','6qNttkP','API错误:','10161UqdcZY','AUTH_INVALID','setupInterceptors','use','retryHandler','PERMISSION_DENIED','请求超时,请稍后重试','API_ERROR','handleError','response','Bearer\x20','retry','3222630ksFqIc','ECONNABORTED','2020777fJqoPy','API\x20error\x20response','headers','baseURL','33243rLEsZy','url','1416psdXLD','hudsonAccessToken','4058mvwaqN','服务器错误,请稍后重试','251ZeWQPA','路客云AI','interceptors','apiKey','Request\x20interceptor\x20error','api','params','3pQZZfv','timeout','code','请求配置错误','method','1354252lLIubp','2097610FYSrwQ','1.0.0','data','object','reject','API\x20response','API\x20request','API_NOT_FOUND','delay','config','client','48SOWkKC','API密钥无效或已过期','request','generic'];_0x4b56=function(){return _0x37046c;};return _0x4b56();}export class HTTPClient{[_0x513a(0x158)];['apiKey'];['hudsonAccessToken'];[_0x513a(0x167)];constructor(_0x17a11c,_0x4f1104){this[_0x513a(0x144)]=_0x17a11c,this[_0x513a(0x178)]=_0x4f1104,this[_0x513a(0x167)]=new RetryHandler(config['retry']['maxRetries'],config[_0x513a(0x16e)][_0x513a(0x156)]),this['client']=_0x5e57eb['create']({'baseURL':config[_0x513a(0x146)][_0x513a(0x174)],'timeout':config[_0x513a(0x146)][_0x513a(0x149)],'headers':{'Content-Type':'application/json','X-Client-Type':'mcp','X-Client-Version':process['env']['npm_package_version']||_0x513a(0x14f)}}),this[_0x513a(0x165)]();}[_0x513a(0x165)](){this[_0x513a(0x158)][_0x513a(0x143)][_0x513a(0x15b)]['use'](_0x3f5ad7=>{return this[_0x513a(0x144)]&&(_0x3f5ad7[_0x513a(0x173)]['Authorization']=_0x513a(0x16d)+this['apiKey']),this[_0x513a(0x178)]&&(_0x3f5ad7['headers']['hudson-access-token']=this[_0x513a(0x178)]),logger['debug'](_0x513a(0x154),{'method':_0x3f5ad7[_0x513a(0x14c)],'url':_0x3f5ad7[_0x513a(0x176)],'params':_0x3f5ad7[_0x513a(0x147)]}),_0x3f5ad7;},_0x234ffe=>{return logger[_0x513a(0x160)](_0x513a(0x145),_0x234ffe),Promise[_0x513a(0x152)](_0x234ffe);}),this[_0x513a(0x158)][_0x513a(0x143)][_0x513a(0x16c)][_0x513a(0x166)](_0x1b04a1=>{return logger['debug'](_0x513a(0x153),{'status':_0x1b04a1[_0x513a(0x15e)],'url':_0x1b04a1[_0x513a(0x157)][_0x513a(0x176)]}),_0x1b04a1;},async _0x32c524=>{return this['handleError'](_0x32c524);});}async[_0x513a(0x16b)](_0x15cb53){if(_0x15cb53[_0x513a(0x16c)]){const _0xdb6beb=_0x15cb53[_0x513a(0x16c)]['status'],_0xeb742d=_0x15cb53['response'][_0x513a(0x150)];logger['error'](_0x513a(0x172),{'status':_0xdb6beb,'url':_0x15cb53[_0x513a(0x157)]?.['url'],'message':_0xeb742d[_0x513a(0x15d)]});switch(_0xdb6beb){case 0x191:throw new MCPError(ErrorCode[_0x513a(0x164)],_0x513a(0x15a),_0xeb742d);case 0x193:throw new MCPError(ErrorCode[_0x513a(0x168)],_0xeb742d?.['message']||_0x513a(0x15f),{..._0xeb742d!=null&&typeof _0xeb742d===_0x513a(0x151)?_0xeb742d:{},'domain':_0x513a(0x15c),'source':_0x513a(0x142)});case 0x194:throw new MCPError(ErrorCode[_0x513a(0x155)],'资源不存在',_0xeb742d);case 0x1ad:throw new MCPError(ErrorCode['API_RATE_LIMIT'],'请求频率过高,请稍后重试',_0xeb742d);case 0x1f4:case 0x1f6:case 0x1f7:case 0x1f8:throw new MCPError(ErrorCode['API_ERROR'],_0x513a(0x140),_0xeb742d);default:throw new MCPError(ErrorCode[_0x513a(0x16a)],_0xeb742d[_0x513a(0x15d)]||_0x513a(0x162)+_0xdb6beb,_0xeb742d);}}else{if(_0x15cb53[_0x513a(0x15b)]){logger[_0x513a(0x160)]('API\x20request\x20timeout',{'url':_0x15cb53[_0x513a(0x157)]?.[_0x513a(0x176)],'timeout':config[_0x513a(0x146)][_0x513a(0x149)]});if(_0x15cb53[_0x513a(0x14a)]===_0x513a(0x170))throw new MCPError(ErrorCode['API_TIMEOUT'],_0x513a(0x169));throw new MCPError(ErrorCode[_0x513a(0x16a)],'网络错误,请检查网络连接');}else{logger[_0x513a(0x160)]('Request\x20configuration\x20error',_0x15cb53);throw new MCPError(ErrorCode['INTERNAL_ERROR'],_0x513a(0x14b));}}}async['request'](_0x2323d5){const _0x593a80={'method':_0x2323d5[_0x513a(0x14c)],'url':_0x2323d5[_0x513a(0x176)],'params':_0x2323d5[_0x513a(0x147)],'data':_0x2323d5['data'],'headers':_0x2323d5[_0x513a(0x173)]};try{const _0x604dda=await this[_0x513a(0x167)]['execute'](()=>this['client']['request'](_0x593a80));return _0x604dda['data'];}catch(_0x44b7cb){throw _0x44b7cb;}}}
1
+ (function(_0x51db1d,_0x755857){const _0x5a1ba9=_0x51db1d();while(!![]){try{const _0x554fb5=-parseInt(_0x394e(0xe1))/0x1*(parseInt(_0x394e(0x10d))/0x2)+parseInt(_0x394e(0x108))/0x3*(parseInt(_0x394e(0xfa))/0x4)+parseInt(_0x394e(0x101))/0x5+-parseInt(_0x394e(0x11a))/0x6+-parseInt(_0x394e(0xe3))/0x7*(parseInt(_0x394e(0xee))/0x8)+parseInt(_0x394e(0x10a))/0x9*(parseInt(_0x394e(0xf0))/0xa)+parseInt(_0x394e(0xfd))/0xb;if(_0x554fb5===_0x755857)break;else _0x5a1ba9['push'](_0x5a1ba9['shift']());}catch(_0x31482a){_0x5a1ba9['push'](_0x5a1ba9['shift']());}}}(_0x9a16,0x4cc69));function _0x9a16(){const _0xdc0e48=['API\x20request','env','INTERNAL_ERROR','params','Request\x20interceptor\x20error','application/json','use','execute','4bbMfwC','API_ERROR','client','3322561kiXUVl','1.0.0','API\x20request\x20timeout','API密钥无效或已过期','1870615HAcfzB','method','status','debug','create','timeout','object','385068FsjLya','资源不存在','1423323pEcFGr','API_RATE_LIMIT','hudsonAccessToken','12bkRuqc','handleError','npm_package_version','API_NOT_FOUND','Request\x20configuration\x20error','retryHandler','AUTH_INVALID','interceptors','maxRetries','API\x20error\x20response','request','API_TIMEOUT','generic','1915398MIUzEz','response','PERMISSION_DENIED','delay','请求配置错误','apiKey','Authorization','API\x20response','81672aHeMqX','url','91WxKCfm','retry','data','api','error','headers','message','hudson-access-token','网络错误,请检查网络连接','ECONNABORTED','setupInterceptors','95528BiZdfs','服务器错误,请稍后重试','30jPdcMC','config'];_0x9a16=function(){return _0xdc0e48;};return _0x9a16();}import _0x4a8010 from'axios';import{config}from'../config/index.js';import{logger}from'../utils/logger.js';function _0x394e(_0x2917e6,_0x460953){const _0x9a1691=_0x9a16();return _0x394e=function(_0x394ecf,_0x1afe1f){_0x394ecf=_0x394ecf-0xdb;let _0x29a226=_0x9a1691[_0x394ecf];return _0x29a226;},_0x394e(_0x2917e6,_0x460953);}import{MCPError,ErrorCode}from'../utils/errorHandler.js';import{RetryHandler}from'./retryHandler.js';export class HTTPClient{[_0x394e(0xfc)];[_0x394e(0xde)];['hudsonAccessToken'];[_0x394e(0x112)];constructor(_0x2bf3d2,_0x14880f){this[_0x394e(0xde)]=_0x2bf3d2,this[_0x394e(0x10c)]=_0x14880f,this[_0x394e(0x112)]=new RetryHandler(config[_0x394e(0xe4)][_0x394e(0x115)],config['retry'][_0x394e(0xdc)]),this[_0x394e(0xfc)]=_0x4a8010[_0x394e(0x105)]({'baseURL':config[_0x394e(0xe6)]['baseURL'],'timeout':config['api'][_0x394e(0x106)],'headers':{'Content-Type':_0x394e(0xf7),'X-Client-Type':'mcp','X-Client-Version':process[_0x394e(0xf3)][_0x394e(0x10f)]||_0x394e(0xfe)}}),this[_0x394e(0xed)]();}[_0x394e(0xed)](){this[_0x394e(0xfc)][_0x394e(0x114)][_0x394e(0x117)][_0x394e(0xf8)](_0x5c8530=>{return this[_0x394e(0xde)]&&(_0x5c8530[_0x394e(0xe8)][_0x394e(0xdf)]='Bearer\x20'+this[_0x394e(0xde)]),this[_0x394e(0x10c)]&&(_0x5c8530[_0x394e(0xe8)][_0x394e(0xea)]=this[_0x394e(0x10c)]),logger[_0x394e(0x104)](_0x394e(0xf2),{'method':_0x5c8530[_0x394e(0x102)],'url':_0x5c8530['url'],'params':_0x5c8530[_0x394e(0xf5)]}),_0x5c8530;},_0x3563dd=>{return logger[_0x394e(0xe7)](_0x394e(0xf6),_0x3563dd),Promise['reject'](_0x3563dd);}),this[_0x394e(0xfc)][_0x394e(0x114)][_0x394e(0x11b)][_0x394e(0xf8)](_0x3b8eb6=>{return logger['debug'](_0x394e(0xe0),{'status':_0x3b8eb6[_0x394e(0x103)],'url':_0x3b8eb6['config'][_0x394e(0xe2)]}),_0x3b8eb6;},async _0x1a215b=>{return this[_0x394e(0x10e)](_0x1a215b);});}async[_0x394e(0x10e)](_0xe788e0){if(_0xe788e0[_0x394e(0x11b)]){const _0x487c2c=_0xe788e0[_0x394e(0x11b)]['status'],_0x26907a=_0xe788e0[_0x394e(0x11b)][_0x394e(0xe5)];logger[_0x394e(0xe7)](_0x394e(0x116),{'status':_0x487c2c,'url':_0xe788e0[_0x394e(0xf1)]?.[_0x394e(0xe2)],'message':_0x26907a[_0x394e(0xe9)]});switch(_0x487c2c){case 0x191:throw new MCPError(ErrorCode[_0x394e(0x113)],_0x394e(0x100),_0x26907a);case 0x193:throw new MCPError(ErrorCode[_0x394e(0xdb)],_0x26907a?.[_0x394e(0xe9)]||'权限不足',{..._0x26907a!=null&&typeof _0x26907a===_0x394e(0x107)?_0x26907a:{},'domain':_0x394e(0x119),'source':'路客云AI'});case 0x194:throw new MCPError(ErrorCode[_0x394e(0x110)],_0x394e(0x109),_0x26907a);case 0x1ad:throw new MCPError(ErrorCode[_0x394e(0x10b)],'请求频率过高,请稍后重试',_0x26907a);case 0x1f4:case 0x1f6:case 0x1f7:case 0x1f8:throw new MCPError(ErrorCode['API_ERROR'],_0x394e(0xef),_0x26907a);default:throw new MCPError(ErrorCode[_0x394e(0xfb)],_0x26907a[_0x394e(0xe9)]||'API错误:'+_0x487c2c,_0x26907a);}}else{if(_0xe788e0[_0x394e(0x117)]){logger[_0x394e(0xe7)](_0x394e(0xff),{'url':_0xe788e0[_0x394e(0xf1)]?.['url'],'timeout':config['api'][_0x394e(0x106)]});if(_0xe788e0['code']===_0x394e(0xec))throw new MCPError(ErrorCode[_0x394e(0x118)],'请求超时,请稍后重试');throw new MCPError(ErrorCode[_0x394e(0xfb)],_0x394e(0xeb));}else{logger[_0x394e(0xe7)](_0x394e(0x111),_0xe788e0);throw new MCPError(ErrorCode[_0x394e(0xf4)],_0x394e(0xdd));}}}async[_0x394e(0x117)](_0x1c858e){const _0x3fbb69={'method':_0x1c858e[_0x394e(0x102)],'url':_0x1c858e[_0x394e(0xe2)],'params':_0x1c858e[_0x394e(0xf5)],'data':_0x1c858e[_0x394e(0xe5)],'headers':_0x1c858e[_0x394e(0xe8)]};try{const _0x2b9278=await this[_0x394e(0x112)][_0x394e(0xf9)](()=>this[_0x394e(0xfc)][_0x394e(0x117)](_0x3fbb69));return _0x2b9278[_0x394e(0xe5)];}catch(_0x4fc185){throw _0x4fc185;}}}
@@ -1 +1 @@
1
- (function(_0x230379,_0x5d88b8){var _0x1e2cb8=_0x230379();while(!![]){try{var _0x1bae30=-parseInt(_0x2ce9(0xba))/0x1+parseInt(_0x2ce9(0xb9))/0x2+-parseInt(_0x2ce9(0xb7))/0x3*(-parseInt(_0x2ce9(0xb5))/0x4)+-parseInt(_0x2ce9(0xb8))/0x5*(-parseInt(_0x2ce9(0xb4))/0x6)+-parseInt(_0x2ce9(0xb6))/0x7*(-parseInt(_0x2ce9(0xbb))/0x8)+parseInt(_0x2ce9(0xb3))/0x9*(parseInt(_0x2ce9(0xbd))/0xa)+-parseInt(_0x2ce9(0xbc))/0xb*(parseInt(_0x2ce9(0xb2))/0xc);if(_0x1bae30===_0x5d88b8)break;else _0x1e2cb8['push'](_0x1e2cb8['shift']());}catch(_0x1031cd){_0x1e2cb8['push'](_0x1e2cb8['shift']());}}}(_0x5d2c,0x235f3));function _0x5d2c(){var _0xbcb4f3=['310290vuKcGB','171539MkMgFt','29224iijLGU','574409rRPjVR','10GzZGTD','96XWskyA','477711fhbIFD','6WzdvTZ','786036nExFpM','518YKxAIk','3nwPHpl','295595KqebpG'];_0x5d2c=function(){return _0xbcb4f3;};return _0x5d2c();}export{HTTPClient}from'./httpClient.js';export{RetryHandler}from'./retryHandler.js';function _0x2ce9(_0x57a042,_0x47abab){var _0x5d2c09=_0x5d2c();return _0x2ce9=function(_0x2ce911,_0x11d756){_0x2ce911=_0x2ce911-0xb2;var _0x54cc8d=_0x5d2c09[_0x2ce911];return _0x54cc8d;},_0x2ce9(_0x57a042,_0x47abab);}export{CacheManager}from'./cacheManager.js';
1
+ function _0x4f2d(_0x534027,_0x4b07e8){var _0x36efe1=_0x36ef();return _0x4f2d=function(_0x4f2dcd,_0x421745){_0x4f2dcd=_0x4f2dcd-0x1b0;var _0x38053b=_0x36efe1[_0x4f2dcd];return _0x38053b;},_0x4f2d(_0x534027,_0x4b07e8);}function _0x36ef(){var _0x55b12e=['6479CbMcdu','291tjAFmZ','105ChCvrB','3012PMBKhz','3815sGYtIf','3127120geQcfq','7516Ptrrdo','50643aHzvKp','10cIvhKV','40yiVizr','217910fyFRzx','145272ObNNKZ'];_0x36ef=function(){return _0x55b12e;};return _0x36ef();}(function(_0x22e836,_0x18fabf){var _0x52b524=_0x22e836();while(!![]){try{var _0xb0ff2f=parseInt(_0x4f2d(0x1b1))/0x1*(-parseInt(_0x4f2d(0x1b5))/0x2)+-parseInt(_0x4f2d(0x1ba))/0x3*(-parseInt(_0x4f2d(0x1b3))/0x4)+parseInt(_0x4f2d(0x1b7))/0x5+-parseInt(_0x4f2d(0x1b8))/0x6*(-parseInt(_0x4f2d(0x1bb))/0x7)+-parseInt(_0x4f2d(0x1b2))/0x8+parseInt(_0x4f2d(0x1b4))/0x9*(parseInt(_0x4f2d(0x1b6))/0xa)+-parseInt(_0x4f2d(0x1b9))/0xb*(-parseInt(_0x4f2d(0x1b0))/0xc);if(_0xb0ff2f===_0x18fabf)break;else _0x52b524['push'](_0x52b524['shift']());}catch(_0x3bfee9){_0x52b524['push'](_0x52b524['shift']());}}}(_0x36ef,0x554df));export{HTTPClient}from'./httpClient.js';export{RetryHandler}from'./retryHandler.js';export{CacheManager}from'./cacheManager.js';
@@ -1 +1 @@
1
- (function(_0x3ad6fe,_0x5501f8){const _0x190a61=_0x3ad6fe();while(!![]){try{const _0x4b96d8=-parseInt(_0x40c6(0x1fb))/0x1*(parseInt(_0x40c6(0x1f0))/0x2)+-parseInt(_0x40c6(0x1f2))/0x3*(parseInt(_0x40c6(0x1ef))/0x4)+parseInt(_0x40c6(0x1f9))/0x5+parseInt(_0x40c6(0x1ff))/0x6+parseInt(_0x40c6(0x1fd))/0x7+parseInt(_0x40c6(0x1f8))/0x8+parseInt(_0x40c6(0x1ec))/0x9*(-parseInt(_0x40c6(0x1ed))/0xa);if(_0x4b96d8===_0x5501f8)break;else _0x190a61['push'](_0x190a61['shift']());}catch(_0x398f84){_0x190a61['push'](_0x190a61['shift']());}}}(_0x46c5,0x38db2));function _0x40c6(_0x36321c,_0x29cb47){const _0x46c52c=_0x46c5();return _0x40c6=function(_0x40c6ff,_0x1e3acf){_0x40c6ff=_0x40c6ff-0x1ea;let _0x5000ca=_0x46c52c[_0x40c6ff];return _0x5000ca;},_0x40c6(_0x36321c,_0x29cb47);}import{logger}from'../utils/logger.js';function _0x46c5(){const _0x2a7bb0=['1rfsWiD','response','2278276AoOuUN','Request\x20failed,\x20retrying...\x20(attempt\x20','2764680sqkngC','message','status','maxRetries','9SQHTBa','9758470NHRptA','sleep','1604wdrHtd','185354piemiI','ECONNRESET','3OWxPgs','pow','code','ECONNABORTED','isRetryableError','execute','2970192ZAVGPV','721425fzXDaR','baseDelay'];_0x46c5=function(){return _0x2a7bb0;};return _0x46c5();}import{AxiosError}from'axios';export class RetryHandler{[_0x40c6(0x1eb)];[_0x40c6(0x1fa)];constructor(_0x2790d0=0x3,_0x962359=0x3e8){this[_0x40c6(0x1eb)]=_0x2790d0,this[_0x40c6(0x1fa)]=_0x962359;}async[_0x40c6(0x1f7)](_0x478842){let _0x43aefb;for(let _0x2d96ef=0x0;_0x2d96ef<=this[_0x40c6(0x1eb)];_0x2d96ef++){try{return await _0x478842();}catch(_0x22f26e){_0x43aefb=_0x22f26e;if(_0x2d96ef===this[_0x40c6(0x1eb)])break;if(!this[_0x40c6(0x1f6)](_0x22f26e))throw _0x22f26e;const _0x23219c=this[_0x40c6(0x1fa)]*Math[_0x40c6(0x1f3)](0x2,_0x2d96ef);logger['warn'](_0x40c6(0x1fe)+(_0x2d96ef+0x1)+'/'+this[_0x40c6(0x1eb)]+')',{'error':_0x22f26e instanceof Error?_0x22f26e[_0x40c6(0x200)]:String(_0x22f26e),'delay':_0x23219c}),await this[_0x40c6(0x1ee)](_0x23219c);}}throw _0x43aefb;}[_0x40c6(0x1f6)](_0x2ec6db){if(_0x2ec6db instanceof AxiosError){if(_0x2ec6db[_0x40c6(0x1f4)]===_0x40c6(0x1f1)||_0x2ec6db[_0x40c6(0x1f4)]==='ETIMEDOUT'||_0x2ec6db[_0x40c6(0x1f4)]===_0x40c6(0x1f5))return!![];if(_0x2ec6db[_0x40c6(0x1fc)]&&_0x2ec6db[_0x40c6(0x1fc)]['status']>=0x1f4)return!![];if(_0x2ec6db['response']&&_0x2ec6db[_0x40c6(0x1fc)][_0x40c6(0x1ea)]===0x1ad)return!![];}return![];}[_0x40c6(0x1ee)](_0x588e0c){return new Promise(_0x51ee59=>setTimeout(_0x51ee59,_0x588e0c));}}
1
+ function _0x5b51(){const _0x1569c3=['1358833EESjRi','warn','response','1777100rprQXm','sleep','5968490NJfTJp','4InyPiT','ECONNRESET','baseDelay','237RoduqW','pow','maxRetries','ECONNABORTED','code','692478VBuqSa','283688TZuhVI','2578bMxOvr','45OInSIX','8057830xXTXNw','Request\x20failed,\x20retrying...\x20(attempt\x20','isRetryableError','18MXuJWh','status','36zliMKr'];_0x5b51=function(){return _0x1569c3;};return _0x5b51();}(function(_0x123516,_0x56c85c){const _0x5d1b49=_0x123516();while(!![]){try{const _0x56b32a=-parseInt(_0x5699(0x1d1))/0x1+-parseInt(_0x5699(0x1d3))/0x2*(parseInt(_0x5699(0x1cc))/0x3)+-parseInt(_0x5699(0x1c9))/0x4*(-parseInt(_0x5699(0x1c6))/0x5)+parseInt(_0x5699(0x1c0))/0x6*(-parseInt(_0x5699(0x1c3))/0x7)+-parseInt(_0x5699(0x1d2))/0x8*(parseInt(_0x5699(0x1d4))/0x9)+-parseInt(_0x5699(0x1c8))/0xa+-parseInt(_0x5699(0x1d5))/0xb*(-parseInt(_0x5699(0x1c2))/0xc);if(_0x56b32a===_0x56c85c)break;else _0x5d1b49['push'](_0x5d1b49['shift']());}catch(_0x22de93){_0x5d1b49['push'](_0x5d1b49['shift']());}}}(_0x5b51,0x6230e));import{logger}from'../utils/logger.js';import{AxiosError}from'axios';function _0x5699(_0x55fa58,_0x18a510){const _0x5b51d7=_0x5b51();return _0x5699=function(_0x569936,_0x451e9c){_0x569936=_0x569936-0x1c0;let _0x121619=_0x5b51d7[_0x569936];return _0x121619;},_0x5699(_0x55fa58,_0x18a510);}export class RetryHandler{[_0x5699(0x1ce)];['baseDelay'];constructor(_0x10aad3=0x3,_0x12d530=0x3e8){this[_0x5699(0x1ce)]=_0x10aad3,this[_0x5699(0x1cb)]=_0x12d530;}async['execute'](_0xcad1b6){let _0x14d3ce;for(let _0x703e50=0x0;_0x703e50<=this[_0x5699(0x1ce)];_0x703e50++){try{return await _0xcad1b6();}catch(_0x27ba35){_0x14d3ce=_0x27ba35;if(_0x703e50===this['maxRetries'])break;if(!this[_0x5699(0x1d7)](_0x27ba35))throw _0x27ba35;const _0x2a135e=this[_0x5699(0x1cb)]*Math[_0x5699(0x1cd)](0x2,_0x703e50);logger[_0x5699(0x1c4)](_0x5699(0x1d6)+(_0x703e50+0x1)+'/'+this[_0x5699(0x1ce)]+')',{'error':_0x27ba35 instanceof Error?_0x27ba35['message']:String(_0x27ba35),'delay':_0x2a135e}),await this[_0x5699(0x1c7)](_0x2a135e);}}throw _0x14d3ce;}['isRetryableError'](_0x5bdb0a){if(_0x5bdb0a instanceof AxiosError){if(_0x5bdb0a['code']===_0x5699(0x1ca)||_0x5bdb0a['code']==='ETIMEDOUT'||_0x5bdb0a[_0x5699(0x1d0)]===_0x5699(0x1cf))return!![];if(_0x5bdb0a[_0x5699(0x1c5)]&&_0x5bdb0a[_0x5699(0x1c5)][_0x5699(0x1c1)]>=0x1f4)return!![];if(_0x5bdb0a[_0x5699(0x1c5)]&&_0x5bdb0a['response'][_0x5699(0x1c1)]===0x1ad)return!![];}return![];}[_0x5699(0x1c7)](_0x1f9ea4){return new Promise(_0x5df23b=>setTimeout(_0x5df23b,_0x1f9ea4));}}
@@ -1 +1 @@
1
- (function(_0x12518f,_0x32dd1c){const _0x465a32=_0x12518f();while(!![]){try{const _0x3cd326=parseInt(_0x3f10(0x74))/0x1*(parseInt(_0x3f10(0x7d))/0x2)+-parseInt(_0x3f10(0x8a))/0x3*(parseInt(_0x3f10(0x92))/0x4)+parseInt(_0x3f10(0x7c))/0x5*(parseInt(_0x3f10(0x7e))/0x6)+parseInt(_0x3f10(0x7f))/0x7+parseInt(_0x3f10(0x91))/0x8+-parseInt(_0x3f10(0x90))/0x9+-parseInt(_0x3f10(0x87))/0xa;if(_0x3cd326===_0x32dd1c)break;else _0x465a32['push'](_0x465a32['shift']());}catch(_0x5e4472){_0x465a32['push'](_0x465a32['shift']());}}}(_0x2f53,0x3fc8e));import _0x308cdb from'dotenv';_0x308cdb[_0x3f10(0x76)]();function _0x3f10(_0x390821,_0x16d7eb){const _0x2f53c=_0x2f53();return _0x3f10=function(_0x3f10fc,_0x534d00){_0x3f10fc=_0x3f10fc-0x72;let _0x311f3d=_0x2f53c[_0x3f10fc];return _0x311f3d;},_0x3f10(_0x390821,_0x16d7eb);}const resolvedEnv=process['env'][_0x3f10(0x73)]||_0x3f10(0x8b);function resolveBaseURL(){if(process['env'][_0x3f10(0x8e)])return process[_0x3f10(0x89)][_0x3f10(0x8e)];if(resolvedEnv===_0x3f10(0x81)||resolvedEnv===_0x3f10(0x8f))return _0x3f10(0x80);return _0x3f10(0x79);}function _0x2f53(){const _0x29bd7f=['config','300000','LOG_LEVEL','https://hudson-prod.localhome.cn','1000','API_TIMEOUT','20FulmUS','6KifcBE','451734tUNsby','2377914YpjPWE','https://hudson-dev.localhome.cn','develop','true','LOCALSBNB_LOG_TO_FILES','RETRY_DELAY','PORT','CACHE_TTL','4139390SOxKPx','30000','env','26553FoLDTC','production','json','LOG_FORMAT','LUKEYUN_API_BASE_URL','development','2975670cqxILm','1020136gRIHSG','12Bzwilw','CACHE_ENABLED','NODE_ENV','88003qOkgXs','MAX_RETRIES'];_0x2f53=function(){return _0x29bd7f;};return _0x2f53();}export const config={'api':{'baseURL':resolveBaseURL(),'timeout':parseInt(process[_0x3f10(0x89)][_0x3f10(0x7b)]||_0x3f10(0x88),0xa)},'server':{'port':parseInt(process[_0x3f10(0x89)][_0x3f10(0x85)]||'3000',0xa),'env':resolvedEnv},'cache':{'enabled':process[_0x3f10(0x89)][_0x3f10(0x72)]===_0x3f10(0x82),'ttl':parseInt(process[_0x3f10(0x89)][_0x3f10(0x86)]||_0x3f10(0x77),0xa)},'retry':{'maxRetries':parseInt(process[_0x3f10(0x89)][_0x3f10(0x75)]||'3',0xa),'delay':parseInt(process['env'][_0x3f10(0x84)]||_0x3f10(0x7a),0xa)},'log':{'level':process[_0x3f10(0x89)][_0x3f10(0x78)]||'info','format':process[_0x3f10(0x89)][_0x3f10(0x8d)]||_0x3f10(0x8c),'toFiles':process[_0x3f10(0x89)][_0x3f10(0x83)]==='1'||process[_0x3f10(0x89)][_0x3f10(0x83)]===_0x3f10(0x82)}};
1
+ function _0x2427(_0x590726,_0x2d2f8a){const _0x3e4a6e=_0x3e4a();return _0x2427=function(_0x24272c,_0x5c1f63){_0x24272c=_0x24272c-0x137;let _0x493ada=_0x3e4a6e[_0x24272c];return _0x493ada;},_0x2427(_0x590726,_0x2d2f8a);}(function(_0x296972,_0x306dce){const _0x3a9ae3=_0x296972();while(!![]){try{const _0x511955=-parseInt(_0x2427(0x13b))/0x1+parseInt(_0x2427(0x13f))/0x2+parseInt(_0x2427(0x148))/0x3+parseInt(_0x2427(0x149))/0x4*(-parseInt(_0x2427(0x13c))/0x5)+parseInt(_0x2427(0x14a))/0x6*(-parseInt(_0x2427(0x153))/0x7)+-parseInt(_0x2427(0x142))/0x8+parseInt(_0x2427(0x14b))/0x9*(parseInt(_0x2427(0x13a))/0xa);if(_0x511955===_0x306dce)break;else _0x3a9ae3['push'](_0x3a9ae3['shift']());}catch(_0x5b2429){_0x3a9ae3['push'](_0x3a9ae3['shift']());}}}(_0x3e4a,0xd5b0f));function _0x3e4a(){const _0x4c8e39=['LOG_FORMAT','300000','6594GtdRYr','NODE_ENV','info','production','LOCALSBNB_LOG_TO_FILES','2090HdlJeh','48567sUhxSh','30fzvBEp','true','env','1258050MhxQeE','develop','config','12015424DCkqVG','1000','LOG_LEVEL','PORT','RETRY_DELAY','LUKEYUN_API_BASE_URL','1990191aWcXqK','1149164obkoXe','6834DLjOoI','169236qBjktb','CACHE_ENABLED','30000','development','json','API_TIMEOUT'];_0x3e4a=function(){return _0x4c8e39;};return _0x3e4a();}import _0x2413b2 from'dotenv';_0x2413b2[_0x2427(0x141)]();const resolvedEnv=process['env'][_0x2427(0x154)]||_0x2427(0x138);function resolveBaseURL(){if(process[_0x2427(0x13e)][_0x2427(0x147)])return process[_0x2427(0x13e)][_0x2427(0x147)];if(resolvedEnv===_0x2427(0x140)||resolvedEnv===_0x2427(0x14e))return'https://hudson-dev.localhome.cn';return'https://hudson-prod.localhome.cn';}export const config={'api':{'baseURL':resolveBaseURL(),'timeout':parseInt(process[_0x2427(0x13e)][_0x2427(0x150)]||_0x2427(0x14d),0xa)},'server':{'port':parseInt(process['env'][_0x2427(0x145)]||'3000',0xa),'env':resolvedEnv},'cache':{'enabled':process[_0x2427(0x13e)][_0x2427(0x14c)]==='true','ttl':parseInt(process[_0x2427(0x13e)]['CACHE_TTL']||_0x2427(0x152),0xa)},'retry':{'maxRetries':parseInt(process['env']['MAX_RETRIES']||'3',0xa),'delay':parseInt(process[_0x2427(0x13e)][_0x2427(0x146)]||_0x2427(0x143),0xa)},'log':{'level':process['env'][_0x2427(0x144)]||_0x2427(0x137),'format':process[_0x2427(0x13e)][_0x2427(0x151)]||_0x2427(0x14f),'toFiles':process[_0x2427(0x13e)][_0x2427(0x139)]==='1'||process[_0x2427(0x13e)][_0x2427(0x139)]===_0x2427(0x13d)}};
@@ -1 +1 @@
1
- (function(_0x528513,_0xbd8f22){const _0x50c828=_0x528513();while(!![]){try{const _0x353fdf=parseInt(_0x4ff2(0x1e8))/0x1+parseInt(_0x4ff2(0x1dd))/0x2+parseInt(_0x4ff2(0x1e9))/0x3+parseInt(_0x4ff2(0x200))/0x4*(-parseInt(_0x4ff2(0x20e))/0x5)+parseInt(_0x4ff2(0x1fe))/0x6+-parseInt(_0x4ff2(0x202))/0x7+-parseInt(_0x4ff2(0x218))/0x8*(parseInt(_0x4ff2(0x1f9))/0x9);if(_0x353fdf===_0xbd8f22)break;else _0x50c828['push'](_0x50c828['shift']());}catch(_0x1d5a0e){_0x50c828['push'](_0x50c828['shift']());}}}(_0x1642,0x33ab9));function _0x1642(){const _0x1c5d19=['查询开始日期\x20YYYY-MM-DD;与\x20endDate\x20配对','date','queryRoomPricesHandler','orderId','今日订单(聚合事件):同时查询预抵(orderType=11)、在住(orderType=10)、预离(orderType=12)三组,并分别返回总数与明细。支持关键词:订单、今日订单情况、待办事项、待办、今日待办、待处理订单情况、订单情况。','每页数量,默认15,最大100','锚定日期\x20YYYY-MM-DD:单日统计时即业务日;与\x20timeRange\x20联用时表示「以该日所在周」为本周/上周(默认不传则为上海当天)','query_operational_data_v2','查询天数,默认30天;与\x20timeRange\x20互斥(传\x20timeRange\x20时固定为自然周\x207\x20天)','queryOperationalDataV2Handler','query_pre_departure_orders','query_pre_arrival_orders','每页数量,默认10','查询结束日期\x20YYYY-MM-DD;与\x20startDate\x20配对','18QPxGrq','预抵订单(今日待入住)。固定调用\x20/orders/get\x20且\x20orderType=11。支持关键词:预抵、预抵订单、今日待入住、今日预订订单、今天待入住、剩余待入住、今日预抵。','this_week=本周自然周;last_week=上周自然周。与\x20startDate/endDate\x20二选一','getOrderDetailsV2Handler','页码,默认1','1047414CScYmZ','array','200inEEAG','自定义统计区间起点,需与\x20endDate\x20同时传','2619442feqFOb','orders:read','queryPreDepartureOrdersHandler','string','query_orders_by_date_range','get_order_details_v2','日期,格式:YYYY-MM-DD,默认为当天','与\x20timeRange\x20联用时为锚定日(默认上海当天)','finance:read','rooms:read','number','this_week=本周自然周;last_week=上周自然周。与仅按天数的「近30天」不同','16795eZMuEs','开始日期\x20YYYY-MM-DD,默认当天;与\x20timeRange\x20联用时表示锚定日所在周','object','查询运营数据:夜审分页、首页实时、经营分析(含入住率\x20OCC、ADR、RevPAR\x20等)。「本周」「本周入住率」「本周经营」「上周收入」等必须按自然周传参:优先传\x20timeRange\x20为\x20this_week\x20或\x20last_week(周一~周日,上海时区);或显式传\x20startDate、endDate\x20为当周起止日。勿仅用单日\x20date\x20代替「本周」——否则经营分析区间错误。单日查询可只传\x20date(或\x20startDate=endDate=同一天)。支持关键词:当前运营情况、今天数据、数据、经营情况、运营数据、本周入住率、本周经营、上周数据等。若可呈现可视化表格则使用表格呈现','queryInHouseOrdersHandler','query_in_house_orders','queryPreArrivalOrdersHandler','订单查询(日期范围事件)。支持按\x20startDate/endDate\x20或\x20timeRange(this_week/last_week)\x20查询,不与今日订单/预抵/在住/预离混用。支持关键词:订单查询、查询订单、某时间段订单。','查询今日(或指定日)房态汇总:房间状态、库存与保洁等,不含渠道房价。「查看房态日历价」指房价时请用\x20query_room_prices。支持关键词:今日房态、今日房态查询、今日房态统计、今日房态分析、今日房态报表、今日房态展示、今日房态可视化、今日房态仪表盘、今日房态报告、今日房态图表、今日房态表格、房态查询、房态','按房型日历查询房态、可售与库存等(新接口)。与「房价/渠道价」无关:用户说「查看房态日历价」「房态日历价」指近期/渠道房价时,必须调用\x20query_room_prices,勿选本工具。用户说「本周」「上周」房态日历时必须传\x20timeRange=this_week\x20或\x20last_week(自然周周一至周日,上海时区),勿用「从今天起连续\x2030\x20天」代替本周。','298352zkUxqs','queryRoomStatusNewHandler','this_week=本周自然周房价;last_week=上周自然周。与「滚动\x207\x20天」不同','query_room_prices','this_week','queryTodayRoomStatusHandler','关键字(可选)','500638sOvncW','订单ID','query_room_status_new','从\x20date\x20起连续天数;与\x20timeRange\x20互斥(传\x20timeRange\x20时固定为自然周\x207\x20天)','query_today_room_status','queryTodayOrdersHandler','预离订单(今日待退房)。固定调用\x20/orders/get\x20且\x20orderType=12。支持关键词:预离、预离订单、今日待退房、今日预离订单、今天待退房、剩余待退房、今日预离。','开始日期,格式:YYYY-MM-DD,默认为当天;与\x20timeRange\x20联用时表示锚定日所在周','last_week','this_week=锚定日所在自然周(周一至周日);last_week=上一完整自然周。与\x20startDate/endDate\x20二选一','查询房价(渠道\x20RP、可配置天数价格)。用户说「本周房价」「上周房价」时必须传\x20timeRange=this_week\x20或\x20last_week(自然周周一至周日,上海时区),不要用「近7天」或默认\x20days=7\x20代替「本周」——否则日期区间错误。用户只说「近一周」「最近7天」且无「本周」字样时,可用\x20date+days(默认从当天起\x207\x20天)。支持关键词:查看房态日历价、房态日历价、日历价、房价、近期房价、本月房间、XXX天房价、今日房价查询、房价查询','353688AVmLSe','149427sKkJPO','根据订单ID查询订单详情信息。返回中含客人姓名字段,向用户回复时必须说明客人姓名(不得省略)。支持关键词:XXX订单详情、订单详情、订单详情查询、订单详情统计、订单详情分析、订单详情报表、订单详情展示、订单详情可视化、订单详情仪表盘、订单详情报告、订单详情图表、订单详情表格。用户可先通过今日订单获得订单号再查详情'];_0x1642=function(){return _0x1c5d19;};return _0x1642();}import*as _0x494edb from'../tools/rooms/index.js';import*as _0x47d53d from'../tools/orders/index.js';import*as _0x150017 from'../tools/finance/index.js';function _0x4ff2(_0x2ba071,_0x3b6490){const _0x164223=_0x1642();return _0x4ff2=function(_0x4ff23b,_0x4ae6df){_0x4ff23b=_0x4ff23b-0x1dc;let _0x4f9798=_0x164223[_0x4ff23b];return _0x4f9798;},_0x4ff2(_0x2ba071,_0x3b6490);}export const toolDefinitions=[{'name':_0x4ff2(0x1df),'description':_0x4ff2(0x217),'inputSchema':{'type':'object','properties':{'date':{'type':_0x4ff2(0x205),'format':_0x4ff2(0x1ec),'description':_0x4ff2(0x1e4)},'days':{'type':_0x4ff2(0x20c),'default':0x1e,'minimum':0x1,'description':_0x4ff2(0x1f3)},'timeRange':{'type':_0x4ff2(0x205),'enum':[_0x4ff2(0x21c),'last_week'],'description':_0x4ff2(0x20d)},'roomCategoryIds':{'type':_0x4ff2(0x1ff),'items':{'type':'number'},'description':'房源类型ID列表(可选)'},'roomCategoryGroupIds':{'type':'array','items':{'type':'number'},'description':'房源分组ID列表(可选)'},'channelIds':{'type':'array','items':{'type':'number'},'description':'渠道ID列表(可选)'},'searchKey':{'type':_0x4ff2(0x205),'description':'模糊搜索:房源编码、房源简称、房源名称(可选)'},'pageNum':{'type':_0x4ff2(0x20c),'default':0x1,'minimum':0x1,'description':_0x4ff2(0x1fd)},'pageSize':{'type':_0x4ff2(0x20c),'default':0xf,'minimum':0x1,'maximum':0x64,'description':_0x4ff2(0x1f0)}},'required':[]},'handler':_0x494edb[_0x4ff2(0x219)],'requiredScopes':[_0x4ff2(0x20b)]},{'name':_0x4ff2(0x1e1),'description':_0x4ff2(0x216),'inputSchema':{'type':_0x4ff2(0x210),'properties':{'date':{'type':_0x4ff2(0x205),'format':_0x4ff2(0x1ec),'description':_0x4ff2(0x208)}},'required':[]},'handler':_0x494edb[_0x4ff2(0x21d)],'requiredScopes':[_0x4ff2(0x20b)]},{'name':_0x4ff2(0x21b),'description':_0x4ff2(0x1e7),'inputSchema':{'type':'object','properties':{'date':{'type':_0x4ff2(0x205),'format':_0x4ff2(0x1ec),'description':_0x4ff2(0x20f)},'days':{'type':_0x4ff2(0x20c),'default':0x7,'minimum':0x1,'maximum':0x1e,'description':_0x4ff2(0x1e0)},'timeRange':{'type':_0x4ff2(0x205),'enum':['this_week',_0x4ff2(0x1e5)],'description':_0x4ff2(0x21a)}},'required':[]},'handler':_0x494edb[_0x4ff2(0x1ed)],'requiredScopes':[_0x4ff2(0x20b)]},{'name':'query_today_orders','description':_0x4ff2(0x1ef),'inputSchema':{'type':'object','properties':{'pageNum':{'type':'number','default':0x1,'minimum':0x1,'description':_0x4ff2(0x1fd)},'pageSize':{'type':_0x4ff2(0x20c),'default':0xa,'minimum':0x1,'maximum':0x32,'description':'每页数量,默认10'},'keyword':{'type':_0x4ff2(0x205),'description':_0x4ff2(0x1dc)}},'required':[]},'handler':_0x47d53d[_0x4ff2(0x1e2)],'requiredScopes':[_0x4ff2(0x203)]},{'name':_0x4ff2(0x1f6),'description':_0x4ff2(0x1fa),'inputSchema':{'type':_0x4ff2(0x210),'properties':{'pageNum':{'type':'number','default':0x1,'minimum':0x1,'description':'页码,默认1'},'pageSize':{'type':'number','default':0xa,'minimum':0x1,'maximum':0x32,'description':'每页数量,默认10'},'keyword':{'type':_0x4ff2(0x205),'description':_0x4ff2(0x1dc)}},'required':[]},'handler':_0x47d53d[_0x4ff2(0x214)],'requiredScopes':[_0x4ff2(0x203)]},{'name':_0x4ff2(0x213),'description':'在住订单(今日已入住)。固定调用\x20/orders/get\x20且\x20orderType=10。支持关键词:在住情况、在住订单、今日在住、今日已入住、已入住、今日在住订单。','inputSchema':{'type':_0x4ff2(0x210),'properties':{'pageNum':{'type':_0x4ff2(0x20c),'default':0x1,'minimum':0x1,'description':_0x4ff2(0x1fd)},'pageSize':{'type':_0x4ff2(0x20c),'default':0xa,'minimum':0x1,'maximum':0x32,'description':_0x4ff2(0x1f7)},'keyword':{'type':_0x4ff2(0x205),'description':_0x4ff2(0x1dc)}},'required':[]},'handler':_0x47d53d[_0x4ff2(0x212)],'requiredScopes':[_0x4ff2(0x203)]},{'name':_0x4ff2(0x1f5),'description':_0x4ff2(0x1e3),'inputSchema':{'type':_0x4ff2(0x210),'properties':{'pageNum':{'type':_0x4ff2(0x20c),'default':0x1,'minimum':0x1,'description':_0x4ff2(0x1fd)},'pageSize':{'type':_0x4ff2(0x20c),'default':0xa,'minimum':0x1,'maximum':0x32,'description':_0x4ff2(0x1f7)},'keyword':{'type':_0x4ff2(0x205),'description':_0x4ff2(0x1dc)}},'required':[]},'handler':_0x47d53d[_0x4ff2(0x204)],'requiredScopes':[_0x4ff2(0x203)]},{'name':_0x4ff2(0x206),'description':_0x4ff2(0x215),'inputSchema':{'type':_0x4ff2(0x210),'properties':{'startDate':{'type':_0x4ff2(0x205),'description':_0x4ff2(0x1eb)},'endDate':{'type':_0x4ff2(0x205),'description':_0x4ff2(0x1f8)},'timeRange':{'type':'string','enum':[_0x4ff2(0x21c),'last_week'],'description':_0x4ff2(0x1fb)},'date':{'type':_0x4ff2(0x205),'format':_0x4ff2(0x1ec),'description':_0x4ff2(0x209)},'pageNum':{'type':_0x4ff2(0x20c),'default':0x1,'minimum':0x1,'description':_0x4ff2(0x1fd)},'pageSize':{'type':'number','default':0xa,'minimum':0x1,'maximum':0x32,'description':_0x4ff2(0x1f7)}},'required':[]},'handler':_0x47d53d['queryOrdersByDateRangeHandler'],'requiredScopes':[_0x4ff2(0x203)]},{'name':_0x4ff2(0x207),'description':_0x4ff2(0x1ea),'inputSchema':{'type':_0x4ff2(0x210),'properties':{'orderId':{'type':_0x4ff2(0x205),'description':_0x4ff2(0x1de)}},'required':[_0x4ff2(0x1ee)]},'handler':_0x47d53d[_0x4ff2(0x1fc)],'requiredScopes':[_0x4ff2(0x203)]},{'name':_0x4ff2(0x1f2),'description':_0x4ff2(0x211),'inputSchema':{'type':'object','properties':{'date':{'type':_0x4ff2(0x205),'format':'date','description':_0x4ff2(0x1f1)},'startDate':{'type':_0x4ff2(0x205),'format':'date','description':_0x4ff2(0x201)},'endDate':{'type':_0x4ff2(0x205),'format':_0x4ff2(0x1ec),'description':'自定义统计区间终点,需与\x20startDate\x20同时传'},'timeRange':{'type':'string','enum':[_0x4ff2(0x21c),_0x4ff2(0x1e5)],'description':_0x4ff2(0x1e6)}},'required':[]},'handler':_0x150017[_0x4ff2(0x1f4)],'requiredScopes':[_0x4ff2(0x20a)]}];
1
+ (function(_0x21f0a8,_0x5b9838){const _0x20f812=_0x21f0a8();while(!![]){try{const _0x49d940=-parseInt(_0x1a5e(0x12e))/0x1*(parseInt(_0x1a5e(0x151))/0x2)+parseInt(_0x1a5e(0x136))/0x3*(-parseInt(_0x1a5e(0x155))/0x4)+-parseInt(_0x1a5e(0x14f))/0x5*(-parseInt(_0x1a5e(0x12c))/0x6)+-parseInt(_0x1a5e(0x125))/0x7*(-parseInt(_0x1a5e(0x14c))/0x8)+parseInt(_0x1a5e(0x14b))/0x9*(-parseInt(_0x1a5e(0x122))/0xa)+parseInt(_0x1a5e(0x135))/0xb+parseInt(_0x1a5e(0x149))/0xc;if(_0x49d940===_0x5b9838)break;else _0x20f812['push'](_0x20f812['shift']());}catch(_0x44f80d){_0x20f812['push'](_0x20f812['shift']());}}}(_0x2c37,0x311cf));function _0x1a5e(_0xb0a4ae,_0x24478b){const _0x2c3739=_0x2c37();return _0x1a5e=function(_0x1a5e85,_0x176bf7){_0x1a5e85=_0x1a5e85-0x116;let _0x5cd161=_0x2c3739[_0x1a5e85];return _0x5cd161;},_0x1a5e(_0xb0a4ae,_0x24478b);}import*as _0x19d5e4 from'../tools/rooms/index.js';import*as _0x2745d4 from'../tools/orders/index.js';import*as _0x300a0a from'../tools/finance/index.js';function _0x2c37(){const _0x2a119d=['orders:read','日期,格式:YYYY-MM-DD,默认为当天','渠道ID列表(可选)','query_room_status_new','array','query_in_house_orders','last_week','queryPreDepartureOrdersHandler','在住订单(今日已入住)。固定调用\x20/orders/get\x20且\x20orderType=10。支持关键词:在住情况、在住订单、今日在住、今日已入住、已入住、今日在住订单。','this_week=本周自然周房价;last_week=上周自然周。与「滚动\x207\x20天」不同','关键字(可选)','30dybMKn','queryRoomStatusNewHandler','queryTodayRoomStatusHandler','2807ZYGYKE','预抵订单(今日待入住)。固定调用\x20/orders/get\x20且\x20orderType=11。支持关键词:预抵、预抵订单、今日待入住、今日预订订单、今天待入住、剩余待入住、今日预抵。','查询房价(渠道\x20RP、可配置天数价格)。用户说「本周房价」「上周房价」时必须传\x20timeRange=this_week\x20或\x20last_week(自然周周一至周日,上海时区),不要用「近7天」或默认\x20days=7\x20代替「本周」——否则日期区间错误。用户只说「近一周」「最近7天」且无「本周」字样时,可用\x20date+days(默认从当天起\x207\x20天)。支持关键词:查看房态日历价、房态日历价、日历价、房价、近期房价、本月房间、XXX天房价、今日房价查询、房价查询','每页数量,默认15,最大100','每页数量,默认10','今日订单(聚合事件):同时查询预抵(orderType=11)、在住(orderType=10)、预离(orderType=12)三组,并分别返回总数与明细。支持关键词:订单、今日订单情况、待办事项、待办、今日待办、待处理订单情况、订单情况。','string','2994WepinN','锚定日期\x20YYYY-MM-DD:单日统计时即业务日;与\x20timeRange\x20联用时表示「以该日所在周」为本周/上周(默认不传则为上海当天)','3056jsLptx','get_order_details_v2','this_week=锚定日所在自然周(周一至周日);last_week=上一完整自然周。与\x20startDate/endDate\x20二选一','queryOrdersByDateRangeHandler','query_room_prices','页码,默认1','订单ID','332222yPBoFE','610425tsZExD','查询今日(或指定日)房态汇总:房间状态、库存与保洁等,不含渠道房价。「查看房态日历价」指房价时请用\x20query_room_prices。支持关键词:今日房态、今日房态查询、今日房态统计、今日房态分析、今日房态报表、今日房态展示、今日房态可视化、今日房态仪表盘、今日房态报告、今日房态图表、今日房态表格、房态查询、房态','queryTodayOrdersHandler','查询开始日期\x20YYYY-MM-DD;与\x20endDate\x20配对','查询天数,默认30天;与\x20timeRange\x20互斥(传\x20timeRange\x20时固定为自然周\x207\x20天)','query_today_orders','开始日期\x20YYYY-MM-DD,默认当天;与\x20timeRange\x20联用时表示锚定日所在周','query_orders_by_date_range','与\x20timeRange\x20联用时为锚定日(默认上海当天)','预离订单(今日待退房)。固定调用\x20/orders/get\x20且\x20orderType=12。支持关键词:预离、预离订单、今日待退房、今日预离订单、今天待退房、剩余待退房、今日预离。','query_pre_departure_orders','number','this_week','自定义统计区间终点,需与\x20startDate\x20同时传','this_week=本周自然周;last_week=上周自然周。与\x20startDate/endDate\x20二选一','rooms:read','orderId','queryRoomPricesHandler','query_operational_data_v2','4009836REQatR','从\x20date\x20起连续天数;与\x20timeRange\x20互斥(传\x20timeRange\x20时固定为自然周\x207\x20天)','238851cTSFWD','472EoWTyM','object','date','995EkuYDA','queryOperationalDataV2Handler','2bhCwjk','查询结束日期\x20YYYY-MM-DD;与\x20startDate\x20配对','房源类型ID列表(可选)','按房型日历查询房态、可售与库存等(新接口)。与「房价/渠道价」无关:用户说「查看房态日历价」「房态日历价」指近期/渠道房价时,必须调用\x20query_room_prices,勿选本工具。用户说「本周」「上周」房态日历时必须传\x20timeRange=this_week\x20或\x20last_week(自然周周一至周日,上海时区),勿用「从今天起连续\x2030\x20天」代替本周。','4ydHVzi','query_today_room_status','模糊搜索:房源编码、房源简称、房源名称(可选)'];_0x2c37=function(){return _0x2a119d;};return _0x2c37();}export const toolDefinitions=[{'name':_0x1a5e(0x11a),'description':_0x1a5e(0x154),'inputSchema':{'type':_0x1a5e(0x14d),'properties':{'date':{'type':'string','format':_0x1a5e(0x14e),'description':'开始日期,格式:YYYY-MM-DD,默认为当天;与\x20timeRange\x20联用时表示锚定日所在周'},'days':{'type':_0x1a5e(0x141),'default':0x1e,'minimum':0x1,'description':_0x1a5e(0x13a)},'timeRange':{'type':_0x1a5e(0x12b),'enum':[_0x1a5e(0x142),_0x1a5e(0x11d)],'description':'this_week=本周自然周;last_week=上周自然周。与仅按天数的「近30天」不同'},'roomCategoryIds':{'type':_0x1a5e(0x11b),'items':{'type':_0x1a5e(0x141)},'description':_0x1a5e(0x153)},'roomCategoryGroupIds':{'type':_0x1a5e(0x11b),'items':{'type':_0x1a5e(0x141)},'description':'房源分组ID列表(可选)'},'channelIds':{'type':_0x1a5e(0x11b),'items':{'type':_0x1a5e(0x141)},'description':_0x1a5e(0x119)},'searchKey':{'type':_0x1a5e(0x12b),'description':_0x1a5e(0x116)},'pageNum':{'type':'number','default':0x1,'minimum':0x1,'description':_0x1a5e(0x133)},'pageSize':{'type':_0x1a5e(0x141),'default':0xf,'minimum':0x1,'maximum':0x64,'description':_0x1a5e(0x128)}},'required':[]},'handler':_0x19d5e4[_0x1a5e(0x123)],'requiredScopes':[_0x1a5e(0x145)]},{'name':_0x1a5e(0x156),'description':_0x1a5e(0x137),'inputSchema':{'type':'object','properties':{'date':{'type':_0x1a5e(0x12b),'format':_0x1a5e(0x14e),'description':_0x1a5e(0x118)}},'required':[]},'handler':_0x19d5e4[_0x1a5e(0x124)],'requiredScopes':[_0x1a5e(0x145)]},{'name':_0x1a5e(0x132),'description':_0x1a5e(0x127),'inputSchema':{'type':_0x1a5e(0x14d),'properties':{'date':{'type':'string','format':_0x1a5e(0x14e),'description':_0x1a5e(0x13c)},'days':{'type':_0x1a5e(0x141),'default':0x7,'minimum':0x1,'maximum':0x1e,'description':_0x1a5e(0x14a)},'timeRange':{'type':_0x1a5e(0x12b),'enum':[_0x1a5e(0x142),_0x1a5e(0x11d)],'description':_0x1a5e(0x120)}},'required':[]},'handler':_0x19d5e4[_0x1a5e(0x147)],'requiredScopes':['rooms:read']},{'name':_0x1a5e(0x13b),'description':_0x1a5e(0x12a),'inputSchema':{'type':_0x1a5e(0x14d),'properties':{'pageNum':{'type':'number','default':0x1,'minimum':0x1,'description':'页码,默认1'},'pageSize':{'type':_0x1a5e(0x141),'default':0xa,'minimum':0x1,'maximum':0x32,'description':_0x1a5e(0x129)},'keyword':{'type':_0x1a5e(0x12b),'description':_0x1a5e(0x121)}},'required':[]},'handler':_0x2745d4[_0x1a5e(0x138)],'requiredScopes':[_0x1a5e(0x117)]},{'name':'query_pre_arrival_orders','description':_0x1a5e(0x126),'inputSchema':{'type':'object','properties':{'pageNum':{'type':_0x1a5e(0x141),'default':0x1,'minimum':0x1,'description':'页码,默认1'},'pageSize':{'type':_0x1a5e(0x141),'default':0xa,'minimum':0x1,'maximum':0x32,'description':_0x1a5e(0x129)},'keyword':{'type':_0x1a5e(0x12b),'description':_0x1a5e(0x121)}},'required':[]},'handler':_0x2745d4['queryPreArrivalOrdersHandler'],'requiredScopes':[_0x1a5e(0x117)]},{'name':_0x1a5e(0x11c),'description':_0x1a5e(0x11f),'inputSchema':{'type':'object','properties':{'pageNum':{'type':'number','default':0x1,'minimum':0x1,'description':'页码,默认1'},'pageSize':{'type':_0x1a5e(0x141),'default':0xa,'minimum':0x1,'maximum':0x32,'description':_0x1a5e(0x129)},'keyword':{'type':_0x1a5e(0x12b),'description':'关键字(可选)'}},'required':[]},'handler':_0x2745d4['queryInHouseOrdersHandler'],'requiredScopes':[_0x1a5e(0x117)]},{'name':_0x1a5e(0x140),'description':_0x1a5e(0x13f),'inputSchema':{'type':_0x1a5e(0x14d),'properties':{'pageNum':{'type':'number','default':0x1,'minimum':0x1,'description':_0x1a5e(0x133)},'pageSize':{'type':_0x1a5e(0x141),'default':0xa,'minimum':0x1,'maximum':0x32,'description':_0x1a5e(0x129)},'keyword':{'type':'string','description':_0x1a5e(0x121)}},'required':[]},'handler':_0x2745d4[_0x1a5e(0x11e)],'requiredScopes':[_0x1a5e(0x117)]},{'name':_0x1a5e(0x13d),'description':'订单查询(日期范围事件)。支持按\x20startDate/endDate\x20或\x20timeRange(this_week/last_week)\x20查询,不与今日订单/预抵/在住/预离混用。支持关键词:订单查询、查询订单、某时间段订单。','inputSchema':{'type':'object','properties':{'startDate':{'type':_0x1a5e(0x12b),'description':_0x1a5e(0x139)},'endDate':{'type':_0x1a5e(0x12b),'description':_0x1a5e(0x152)},'timeRange':{'type':'string','enum':['this_week',_0x1a5e(0x11d)],'description':_0x1a5e(0x144)},'date':{'type':_0x1a5e(0x12b),'format':_0x1a5e(0x14e),'description':_0x1a5e(0x13e)},'pageNum':{'type':_0x1a5e(0x141),'default':0x1,'minimum':0x1,'description':'页码,默认1'},'pageSize':{'type':'number','default':0xa,'minimum':0x1,'maximum':0x32,'description':_0x1a5e(0x129)}},'required':[]},'handler':_0x2745d4[_0x1a5e(0x131)],'requiredScopes':[_0x1a5e(0x117)]},{'name':_0x1a5e(0x12f),'description':'根据订单ID查询订单详情信息。返回中含客人姓名字段,向用户回复时必须说明客人姓名(不得省略)。支持关键词:XXX订单详情、订单详情、订单详情查询、订单详情统计、订单详情分析、订单详情报表、订单详情展示、订单详情可视化、订单详情仪表盘、订单详情报告、订单详情图表、订单详情表格。用户可先通过今日订单获得订单号再查详情','inputSchema':{'type':_0x1a5e(0x14d),'properties':{'orderId':{'type':_0x1a5e(0x12b),'description':_0x1a5e(0x134)}},'required':[_0x1a5e(0x146)]},'handler':_0x2745d4['getOrderDetailsV2Handler'],'requiredScopes':[_0x1a5e(0x117)]},{'name':_0x1a5e(0x148),'description':'查询运营数据:夜审分页、首页实时、经营分析(含入住率\x20OCC、ADR、RevPAR\x20等)。「本周」「本周入住率」「本周经营」「上周收入」等必须按自然周传参:优先传\x20timeRange\x20为\x20this_week\x20或\x20last_week(周一~周日,上海时区);或显式传\x20startDate、endDate\x20为当周起止日。勿仅用单日\x20date\x20代替「本周」——否则经营分析区间错误。单日查询可只传\x20date(或\x20startDate=endDate=同一天)。支持关键词:当前运营情况、今天数据、数据、经营情况、运营数据、本周入住率、本周经营、上周数据等。若可呈现可视化表格则使用表格呈现','inputSchema':{'type':_0x1a5e(0x14d),'properties':{'date':{'type':_0x1a5e(0x12b),'format':_0x1a5e(0x14e),'description':_0x1a5e(0x12d)},'startDate':{'type':_0x1a5e(0x12b),'format':_0x1a5e(0x14e),'description':'自定义统计区间起点,需与\x20endDate\x20同时传'},'endDate':{'type':_0x1a5e(0x12b),'format':'date','description':_0x1a5e(0x143)},'timeRange':{'type':_0x1a5e(0x12b),'enum':['this_week','last_week'],'description':_0x1a5e(0x130)}},'required':[]},'handler':_0x300a0a[_0x1a5e(0x150)],'requiredScopes':['finance:read']}];
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- function _0x2b09(){const _0x5662c0=['1322584ZiDpVK','Unhandled\x20rejection','exit','catch','start','Failed\x20to\x20start\x20MCP\x20Server','Fatal\x20error','uncaughtException','1259925vmKqIa','163AwOPtW','2832435zdyuup','unhandledRejection','error','9642sBDUqH','4478nbXkaY','Uncaught\x20exception','MCP\x20Server\x20connected\x20via\x20StdIO','1659xweJKT','info','1424416SouEhD','9722871OoFYUQ'];_0x2b09=function(){return _0x5662c0;};return _0x2b09();}(function(_0x261f0a,_0x5da929){const _0xb0ebd0=_0x261f0a();while(!![]){try{const _0x283790=-parseInt(_0x25d5(0xe4))/0x1*(parseInt(_0x25d5(0xe9))/0x2)+-parseInt(_0x25d5(0xe3))/0x3+-parseInt(_0x25d5(0xee))/0x4+parseInt(_0x25d5(0xe5))/0x5+-parseInt(_0x25d5(0xe8))/0x6*(parseInt(_0x25d5(0xec))/0x7)+parseInt(_0x25d5(0xf0))/0x8+parseInt(_0x25d5(0xef))/0x9;if(_0x283790===_0x5da929)break;else _0xb0ebd0['push'](_0xb0ebd0['shift']());}catch(_0x5e28b1){_0xb0ebd0['push'](_0xb0ebd0['shift']());}}}(_0x2b09,0x46dba));import{StdioServerTransport}from'@modelcontextprotocol/sdk/server/stdio.js';import{LukeyunMCPServer}from'./server.js';import{logger}from'./utils/logger.js';async function main(){try{const _0x41fe6f=new LukeyunMCPServer();await _0x41fe6f[_0x25d5(0xf4)]();const _0xf70cb0=new StdioServerTransport();await _0x41fe6f['getServer']()['connect'](_0xf70cb0),logger[_0x25d5(0xed)](_0x25d5(0xeb));}catch(_0x27df43){logger[_0x25d5(0xe7)](_0x25d5(0xe0),_0x27df43 instanceof Error?_0x27df43:new Error(String(_0x27df43))),process[_0x25d5(0xf2)](0x1);}}function _0x25d5(_0x228100,_0x18f722){const _0x2b0933=_0x2b09();return _0x25d5=function(_0x25d5bd,_0x15234f){_0x25d5bd=_0x25d5bd-0xe0;let _0x14dce1=_0x2b0933[_0x25d5bd];return _0x14dce1;},_0x25d5(_0x228100,_0x18f722);}process['on'](_0x25d5(0xe2),_0xc0802e=>{logger['error'](_0x25d5(0xea),_0xc0802e),process[_0x25d5(0xf2)](0x1);}),process['on'](_0x25d5(0xe6),_0x259eea=>{logger['error'](_0x25d5(0xf1),new Error(String(_0x259eea))),process[_0x25d5(0xf2)](0x1);}),main()[_0x25d5(0xf3)](_0x12fec6=>{logger[_0x25d5(0xe7)](_0x25d5(0xe1),_0x12fec6 instanceof Error?_0x12fec6:new Error(String(_0x12fec6))),process[_0x25d5(0xf2)](0x1);});
2
+ function _0x44c1(){const _0x4d2064=['9177CJjUjC','140dXWGkC','Unhandled\x20rejection','Failed\x20to\x20start\x20MCP\x20Server','3577232tsTewJ','start','179934CrkZpe','unhandledRejection','catch','8229969NNqetC','MCP\x20Server\x20connected\x20via\x20StdIO','4HPcord','513572qoHZHF','error','getServer','Fatal\x20error','485836UiXBNQ','5taDhkL','connect','exit','22836640rTsvrG','Uncaught\x20exception'];_0x44c1=function(){return _0x4d2064;};return _0x44c1();}(function(_0x532c45,_0x5a9391){const _0x1896e4=_0x532c45();while(!![]){try{const _0x4163c8=-parseInt(_0x385f(0x189))/0x1*(-parseInt(_0x385f(0x178))/0x2)+parseInt(_0x385f(0x17e))/0x3+parseInt(_0x385f(0x18a))/0x4*(-parseInt(_0x385f(0x179))/0x5)+parseInt(_0x385f(0x184))/0x6*(parseInt(_0x385f(0x17f))/0x7)+parseInt(_0x385f(0x182))/0x8+parseInt(_0x385f(0x187))/0x9+-parseInt(_0x385f(0x17c))/0xa;if(_0x4163c8===_0x5a9391)break;else _0x1896e4['push'](_0x1896e4['shift']());}catch(_0x4e313d){_0x1896e4['push'](_0x1896e4['shift']());}}}(_0x44c1,0x7ff11));import{StdioServerTransport}from'@modelcontextprotocol/sdk/server/stdio.js';import{LukeyunMCPServer}from'./server.js';import{logger}from'./utils/logger.js';function _0x385f(_0x305396,_0x5eabd8){const _0x44c1b7=_0x44c1();return _0x385f=function(_0x385fd5,_0x390dde){_0x385fd5=_0x385fd5-0x176;let _0x292e73=_0x44c1b7[_0x385fd5];return _0x292e73;},_0x385f(_0x305396,_0x5eabd8);}async function main(){try{const _0x51cf72=new LukeyunMCPServer();await _0x51cf72[_0x385f(0x183)]();const _0x201d37=new StdioServerTransport();await _0x51cf72[_0x385f(0x176)]()[_0x385f(0x17a)](_0x201d37),logger['info'](_0x385f(0x188));}catch(_0x208390){logger[_0x385f(0x18b)](_0x385f(0x181),_0x208390 instanceof Error?_0x208390:new Error(String(_0x208390))),process[_0x385f(0x17b)](0x1);}}process['on']('uncaughtException',_0x37c799=>{logger[_0x385f(0x18b)](_0x385f(0x17d),_0x37c799),process[_0x385f(0x17b)](0x1);}),process['on'](_0x385f(0x185),_0x29f9c8=>{logger[_0x385f(0x18b)](_0x385f(0x180),new Error(String(_0x29f9c8))),process[_0x385f(0x17b)](0x1);}),main()[_0x385f(0x186)](_0x2e34a8=>{logger[_0x385f(0x18b)](_0x385f(0x177),_0x2e34a8 instanceof Error?_0x2e34a8:new Error(String(_0x2e34a8))),process[_0x385f(0x17b)](0x1);});
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "localsbnb-mcp-server",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "description": "LocalsBnb MCP Server",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -14,7 +14,7 @@
14
14
  "start": "node dist/index.js",
15
15
  "test": "jest",
16
16
  "test:watch": "jest --watch",
17
- "test:api": "node test-api.js",
17
+ "test:api": "node scripts/dev/test-api.js",
18
18
  "lint": "eslint src --ext .ts",
19
19
  "lint:fix": "eslint src --ext .ts --fix",
20
20
  "format": "prettier --write \"src/**/*.ts\"",
package/dist/server.js CHANGED
@@ -1 +1 @@
1
- (function(_0x238c50,_0x1e1aff){const _0x36d7c3=_0x238c50();while(!![]){try{const _0x28f3e5=parseInt(_0x2fe7(0xd7))/0x1*(-parseInt(_0x2fe7(0xc1))/0x2)+-parseInt(_0x2fe7(0xc2))/0x3+parseInt(_0x2fe7(0xd2))/0x4*(parseInt(_0x2fe7(0xe1))/0x5)+parseInt(_0x2fe7(0xca))/0x6+parseInt(_0x2fe7(0xe7))/0x7+-parseInt(_0x2fe7(0xcb))/0x8+parseInt(_0x2fe7(0xd9))/0x9;if(_0x28f3e5===_0x1e1aff)break;else _0x36d7c3['push'](_0x36d7c3['shift']());}catch(_0x5a55f2){_0x36d7c3['push'](_0x36d7c3['shift']());}}}(_0x4ad5,0xbc7d2));function _0x2fe7(_0x392bfe,_0x52d385){const _0x4ad59d=_0x4ad5();return _0x2fe7=function(_0x2fe7ef,_0x55a22f){_0x2fe7ef=_0x2fe7ef-0xbe;let _0x3c73ef=_0x4ad59d[_0x2fe7ef];return _0x3c73ef;},_0x2fe7(_0x392bfe,_0x52d385);}import{Server}from'@modelcontextprotocol/sdk/server/index.js';import{ListToolsRequestSchema,CallToolRequestSchema}from'@modelcontextprotocol/sdk/types.js';import{toolDefinitions}from'./config/tools.js';import{APIKeyManager}from'./auth/apiKeyManager.js';import{PermissionChecker}from'./auth/permissionChecker.js';import{HTTPClient}from'./client/httpClient.js';import{logger}from'./utils/logger.js';function _0x4ad5(){const _0xd6cbda=['handler','hasAPIKey','759474YFpfea','5840016sdHaRG','API\x20client\x20not\x20initialized','arguments','find','start','length','setRequestHandler','64XwaJpr','At\x20least\x20one\x20authentication\x20method\x20(API\x20key\x20or\x20Hudson\x20token)\x20must\x20be\x20configured.','Tool\x20not\x20found:\x20','server','params','361bGspdF','error','7791174PzxVZV','requiredScopes','loadFromEnv','1.0.0','MCP\x20Server\x20handlers\x20setup\x20completed','info','initialize','campId','406460qXkrYx','name','MCP\x20Server\x20initialized','checkPermission','isHudsonConfigured','apiClient','853839XfAEsW','map','getCampId','env','npm_package_version','apiKeyManager','Tool\x20called','setupHandlers','permissionChecker','description','3268XDFnTB','968964KOncka','MCP\x20Server\x20error','getAPIKey','getServer','onerror','No\x20authentication\x20configured.\x20Please\x20set\x20either\x20LUKEYUN_API_KEY\x20or\x20APP_SECRET\x20and\x20APP_ID\x20environment\x20variables.'];_0x4ad5=function(){return _0xd6cbda;};return _0x4ad5();}export class LukeyunMCPServer{[_0x2fe7(0xd5)];[_0x2fe7(0xec)];[_0x2fe7(0xbf)];[_0x2fe7(0xe6)]=null;[_0x2fe7(0xe0)]=null;constructor(){this[_0x2fe7(0xd5)]=new Server({'name':'lukeyun-pms','version':process[_0x2fe7(0xea)][_0x2fe7(0xeb)]||_0x2fe7(0xdc)},{'capabilities':{'tools':{}}}),this[_0x2fe7(0xec)]=new APIKeyManager(),this[_0x2fe7(0xbf)]=new PermissionChecker(this[_0x2fe7(0xec)]),this[_0x2fe7(0xbe)]();}async[_0x2fe7(0xdf)](){this[_0x2fe7(0xec)][_0x2fe7(0xdb)]();if(!this['apiKeyManager']['isConfigured']()&&!this[_0x2fe7(0xec)][_0x2fe7(0xe5)]())throw new Error(_0x2fe7(0xc7));this[_0x2fe7(0xe0)]=this[_0x2fe7(0xec)][_0x2fe7(0xe5)]()?this[_0x2fe7(0xec)][_0x2fe7(0xe9)]():null;const _0x27f851=this['apiKeyManager'][_0x2fe7(0xc4)](),_0x5e6632=this['apiKeyManager'][_0x2fe7(0xe5)]()?this[_0x2fe7(0xec)]['getHudsonAccessToken']():undefined;if(!_0x5e6632&&!_0x27f851)throw new Error(_0x2fe7(0xd3));this[_0x2fe7(0xe6)]=new HTTPClient(_0x27f851,_0x5e6632),logger[_0x2fe7(0xde)](_0x2fe7(0xe3),{'hasAPIKey':this[_0x2fe7(0xec)][_0x2fe7(0xc9)](),'hasHudsonAuth':this[_0x2fe7(0xec)][_0x2fe7(0xe5)](),'hasCampId':!!this[_0x2fe7(0xe0)],'scopes':this[_0x2fe7(0xec)]['getScopes']()});}[_0x2fe7(0xbe)](){this[_0x2fe7(0xd5)][_0x2fe7(0xd1)](ListToolsRequestSchema,async()=>{return{'tools':toolDefinitions[_0x2fe7(0xe8)](_0x1c7711=>({'name':_0x1c7711[_0x2fe7(0xe2)],'description':_0x1c7711[_0x2fe7(0xc0)],'inputSchema':_0x1c7711['inputSchema']}))};}),this['server']['setRequestHandler'](CallToolRequestSchema,async _0x1953e6=>{const _0x5d0fb5=_0x1953e6[_0x2fe7(0xd6)]||{},_0x54b6ba=_0x5d0fb5[_0x2fe7(0xe2)],_0xf464f3=_0x5d0fb5[_0x2fe7(0xcd)]||{};logger[_0x2fe7(0xde)](_0x2fe7(0xed),{'tool':_0x54b6ba,'args':_0xf464f3});const _0x1dca83=toolDefinitions[_0x2fe7(0xce)](_0x767f25=>_0x767f25[_0x2fe7(0xe2)]===_0x54b6ba);if(!_0x1dca83)throw new Error(_0x2fe7(0xd4)+_0x54b6ba);_0x1dca83['requiredScopes']&&_0x1dca83[_0x2fe7(0xda)][_0x2fe7(0xd0)]>0x0&&this[_0x2fe7(0xbf)][_0x2fe7(0xe4)](_0x54b6ba,_0x1dca83[_0x2fe7(0xda)]);if(!this[_0x2fe7(0xe6)])throw new Error(_0x2fe7(0xcc));const _0x2aec99={'apiClient':this[_0x2fe7(0xe6)],'logger':logger,'permissionChecker':this[_0x2fe7(0xbf)],'campId':this[_0x2fe7(0xe0)]||undefined};try{const _0x40786e=await _0x1dca83[_0x2fe7(0xc8)](_0xf464f3||{},_0x2aec99);return _0x40786e;}catch(_0x2a6678){logger[_0x2fe7(0xd8)]('Tool\x20execution\x20error',_0x2a6678 instanceof Error?_0x2a6678:new Error(String(_0x2a6678)));throw _0x2a6678;}}),this[_0x2fe7(0xd5)][_0x2fe7(0xc6)]=_0x2a8671=>{logger[_0x2fe7(0xd8)](_0x2fe7(0xc3),_0x2a8671);},logger[_0x2fe7(0xde)](_0x2fe7(0xdd),{'toolCount':toolDefinitions[_0x2fe7(0xd0)]});}async[_0x2fe7(0xcf)](){await this[_0x2fe7(0xdf)](),logger['info']('MCP\x20Server\x20started');}[_0x2fe7(0xc5)](){return this[_0x2fe7(0xd5)];}}
1
+ (function(_0x44fe87,_0x3658fc){const _0x5acc99=_0x44fe87();while(!![]){try{const _0x8d359a=-parseInt(_0x585d(0x1c9))/0x1*(-parseInt(_0x585d(0x1e2))/0x2)+-parseInt(_0x585d(0x1e0))/0x3*(-parseInt(_0x585d(0x1b8))/0x4)+-parseInt(_0x585d(0x1da))/0x5*(parseInt(_0x585d(0x1bb))/0x6)+-parseInt(_0x585d(0x1df))/0x7*(-parseInt(_0x585d(0x1ca))/0x8)+parseInt(_0x585d(0x1b9))/0x9+parseInt(_0x585d(0x1d1))/0xa+parseInt(_0x585d(0x1d2))/0xb*(-parseInt(_0x585d(0x1d4))/0xc);if(_0x8d359a===_0x3658fc)break;else _0x5acc99['push'](_0x5acc99['shift']());}catch(_0x53f07c){_0x5acc99['push'](_0x5acc99['shift']());}}}(_0x2af5,0x6befe));import{Server}from'@modelcontextprotocol/sdk/server/index.js';import{ListToolsRequestSchema,CallToolRequestSchema}from'@modelcontextprotocol/sdk/types.js';import{toolDefinitions}from'./config/tools.js';import{APIKeyManager}from'./auth/apiKeyManager.js';function _0x2af5(){const _0x5ae75c=['764wAERox','inputSchema','info','apiKeyManager','isHudsonConfigured','length','isConfigured','handler','80iEgqtl','6549435HrmgcC','initialize','510UVfBeb','Tool\x20not\x20found:\x20','checkPermission','requiredScopes','apiClient','setRequestHandler','API\x20client\x20not\x20initialized','error','description','map','npm_package_version','name','permissionChecker','No\x20authentication\x20configured.\x20Please\x20set\x20either\x20LUKEYUN_API_KEY\x20or\x20APP_SECRET\x20and\x20APP_ID\x20environment\x20variables.','283kxVTCb','689704DgdVSN','1.0.0','getCampId','getServer','lukeyun-pms','start','getHudsonAccessToken','5288520ArYEWS','121WglieO','campId','1021668hSTDUV','loadFromEnv','env','onerror','setupHandlers','MCP\x20Server\x20started','44305BQeJYo','arguments','server','find','Tool\x20execution\x20error','49GrVQkT','24549mjhfwD','MCP\x20Server\x20error'];_0x2af5=function(){return _0x5ae75c;};return _0x2af5();}import{PermissionChecker}from'./auth/permissionChecker.js';import{HTTPClient}from'./client/httpClient.js';import{logger}from'./utils/logger.js';function _0x585d(_0xd72846,_0x2cc103){const _0x2af58b=_0x2af5();return _0x585d=function(_0x585dba,_0xa09381){_0x585dba=_0x585dba-0x1b5;let _0x254f46=_0x2af58b[_0x585dba];return _0x254f46;},_0x585d(_0xd72846,_0x2cc103);}export class LukeyunMCPServer{[_0x585d(0x1dc)];[_0x585d(0x1e5)];[_0x585d(0x1c7)];[_0x585d(0x1bf)]=null;['campId']=null;constructor(){this[_0x585d(0x1dc)]=new Server({'name':_0x585d(0x1ce),'version':process[_0x585d(0x1d6)][_0x585d(0x1c5)]||_0x585d(0x1cb)},{'capabilities':{'tools':{}}}),this[_0x585d(0x1e5)]=new APIKeyManager(),this[_0x585d(0x1c7)]=new PermissionChecker(this[_0x585d(0x1e5)]),this[_0x585d(0x1d8)]();}async[_0x585d(0x1ba)](){this[_0x585d(0x1e5)][_0x585d(0x1d5)]();if(!this[_0x585d(0x1e5)][_0x585d(0x1b6)]()&&!this[_0x585d(0x1e5)][_0x585d(0x1e6)]())throw new Error(_0x585d(0x1c8));this[_0x585d(0x1d3)]=this[_0x585d(0x1e5)][_0x585d(0x1e6)]()?this['apiKeyManager'][_0x585d(0x1cc)]():null;const _0x345f9b=this[_0x585d(0x1e5)]['getAPIKey'](),_0x2538e6=this[_0x585d(0x1e5)][_0x585d(0x1e6)]()?this[_0x585d(0x1e5)][_0x585d(0x1d0)]():undefined;if(!_0x2538e6&&!_0x345f9b)throw new Error('At\x20least\x20one\x20authentication\x20method\x20(API\x20key\x20or\x20Hudson\x20token)\x20must\x20be\x20configured.');this['apiClient']=new HTTPClient(_0x345f9b,_0x2538e6),logger[_0x585d(0x1e4)]('MCP\x20Server\x20initialized',{'hasAPIKey':this[_0x585d(0x1e5)]['hasAPIKey'](),'hasHudsonAuth':this[_0x585d(0x1e5)][_0x585d(0x1e6)](),'hasCampId':!!this['campId'],'scopes':this['apiKeyManager']['getScopes']()});}[_0x585d(0x1d8)](){this[_0x585d(0x1dc)][_0x585d(0x1c0)](ListToolsRequestSchema,async()=>{return{'tools':toolDefinitions[_0x585d(0x1c4)](_0x271016=>({'name':_0x271016[_0x585d(0x1c6)],'description':_0x271016[_0x585d(0x1c3)],'inputSchema':_0x271016[_0x585d(0x1e3)]}))};}),this['server'][_0x585d(0x1c0)](CallToolRequestSchema,async _0x3047e3=>{const _0x144b82=_0x3047e3['params']||{},_0x3379ef=_0x144b82[_0x585d(0x1c6)],_0x325129=_0x144b82[_0x585d(0x1db)]||{};logger['info']('Tool\x20called',{'tool':_0x3379ef,'args':_0x325129});const _0x4be338=toolDefinitions[_0x585d(0x1dd)](_0x391219=>_0x391219[_0x585d(0x1c6)]===_0x3379ef);if(!_0x4be338)throw new Error(_0x585d(0x1bc)+_0x3379ef);_0x4be338['requiredScopes']&&_0x4be338[_0x585d(0x1be)][_0x585d(0x1b5)]>0x0&&this[_0x585d(0x1c7)][_0x585d(0x1bd)](_0x3379ef,_0x4be338['requiredScopes']);if(!this[_0x585d(0x1bf)])throw new Error(_0x585d(0x1c1));const _0x155ea0={'apiClient':this['apiClient'],'logger':logger,'permissionChecker':this[_0x585d(0x1c7)],'campId':this[_0x585d(0x1d3)]||undefined};try{const _0x238258=await _0x4be338[_0x585d(0x1b7)](_0x325129||{},_0x155ea0);return _0x238258;}catch(_0x5ac82e){logger[_0x585d(0x1c2)](_0x585d(0x1de),_0x5ac82e instanceof Error?_0x5ac82e:new Error(String(_0x5ac82e)));throw _0x5ac82e;}}),this[_0x585d(0x1dc)][_0x585d(0x1d7)]=_0xaa53f6=>{logger[_0x585d(0x1c2)](_0x585d(0x1e1),_0xaa53f6);},logger[_0x585d(0x1e4)]('MCP\x20Server\x20handlers\x20setup\x20completed',{'toolCount':toolDefinitions[_0x585d(0x1b5)]});}async[_0x585d(0x1cf)](){await this['initialize'](),logger['info'](_0x585d(0x1d9));}[_0x585d(0x1cd)](){return this[_0x585d(0x1dc)];}}
package/dist/start.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- (function(_0x47648e,_0x5f003c){const _0x44abc6=_0x47648e();while(!![]){try{const _0x464354=-parseInt(_0x3905(0x1f6))/0x1+-parseInt(_0x3905(0x1fe))/0x2*(-parseInt(_0x3905(0x1ff))/0x3)+parseInt(_0x3905(0x1fa))/0x4+parseInt(_0x3905(0x201))/0x5*(-parseInt(_0x3905(0x1f9))/0x6)+parseInt(_0x3905(0x1fb))/0x7+parseInt(_0x3905(0x1f8))/0x8*(-parseInt(_0x3905(0x1fc))/0x9)+parseInt(_0x3905(0x1f5))/0xa;if(_0x464354===_0x5f003c)break;else _0x44abc6['push'](_0x44abc6['shift']());}catch(_0x2ef1de){_0x44abc6['push'](_0x44abc6['shift']());}}}(_0x4051,0x1f4d9));function _0x3905(_0x477418,_0x3206a0){const _0x405116=_0x4051();return _0x3905=function(_0x39052d,_0x324832){_0x39052d=_0x39052d-0x1ef;let _0x2354f8=_0x405116[_0x39052d];return _0x2354f8;},_0x3905(_0x477418,_0x3206a0);}import{StdioServerTransport}from'@modelcontextprotocol/sdk/server/stdio.js';import{LukeyunMCPServer}from'./server.js';import{logger}from'./utils/logger.js';async function main(){try{const _0x5ba198=new LukeyunMCPServer();await _0x5ba198['start']();const _0x131b44=new StdioServerTransport();await _0x5ba198[_0x3905(0x1f1)]()['connect'](_0x131b44),logger[_0x3905(0x203)](_0x3905(0x1f7));}catch(_0x2a3abc){logger[_0x3905(0x1f2)](_0x3905(0x1fd),_0x2a3abc instanceof Error?_0x2a3abc:new Error(String(_0x2a3abc))),process[_0x3905(0x1f3)](0x1);}}process['on']('uncaughtException',_0x598915=>{logger[_0x3905(0x1f2)](_0x3905(0x200),_0x598915),process[_0x3905(0x1f3)](0x1);}),process['on'](_0x3905(0x1f4),_0x59baed=>{logger['error'](_0x3905(0x1ef),new Error(String(_0x59baed))),process[_0x3905(0x1f3)](0x1);}),main()[_0x3905(0x1f0)](_0x57e543=>{logger[_0x3905(0x1f2)](_0x3905(0x202),_0x57e543 instanceof Error?_0x57e543:new Error(String(_0x57e543))),process[_0x3905(0x1f3)](0x1);});function _0x4051(){const _0xa88a77=['Failed\x20to\x20start\x20MCP\x20Server','10ucmLxY','64401LsyCdA','Uncaught\x20exception','40poqtYZ','Fatal\x20error','info','Unhandled\x20rejection','catch','getServer','error','exit','unhandledRejection','614120jovaPs','209397ZuJHfz','MCP\x20Server\x20connected\x20via\x20StdIO','206728GGsJtI','73152nFiOix','242960IdIbri','1620528OkrAdz','9ZsXjvR'];_0x4051=function(){return _0xa88a77;};return _0x4051();}
2
+ (function(_0x594fe6,_0x533508){const _0x571f43=_0x594fe6();while(!![]){try{const _0x491b66=-parseInt(_0x1258(0x167))/0x1*(-parseInt(_0x1258(0x157))/0x2)+-parseInt(_0x1258(0x15d))/0x3+-parseInt(_0x1258(0x162))/0x4*(-parseInt(_0x1258(0x15f))/0x5)+-parseInt(_0x1258(0x15b))/0x6+-parseInt(_0x1258(0x156))/0x7+parseInt(_0x1258(0x15c))/0x8*(-parseInt(_0x1258(0x15e))/0x9)+parseInt(_0x1258(0x163))/0xa*(parseInt(_0x1258(0x160))/0xb);if(_0x491b66===_0x533508)break;else _0x571f43['push'](_0x571f43['shift']());}catch(_0x3f26c8){_0x571f43['push'](_0x571f43['shift']());}}}(_0xb0ec,0xb85bc));import{StdioServerTransport}from'@modelcontextprotocol/sdk/server/stdio.js';import{LukeyunMCPServer}from'./server.js';import{logger}from'./utils/logger.js';function _0x1258(_0x2f6872,_0x3fd096){const _0xb0ecaf=_0xb0ec();return _0x1258=function(_0x125871,_0x154d9f){_0x125871=_0x125871-0x156;let _0x288329=_0xb0ecaf[_0x125871];return _0x288329;},_0x1258(_0x2f6872,_0x3fd096);}async function main(){try{const _0x290e6a=new LukeyunMCPServer();await _0x290e6a[_0x1258(0x159)]();const _0x25129a=new StdioServerTransport();await _0x290e6a['getServer']()['connect'](_0x25129a),logger['info']('MCP\x20Server\x20connected\x20via\x20StdIO');}catch(_0x5db9ae){logger[_0x1258(0x165)](_0x1258(0x15a),_0x5db9ae instanceof Error?_0x5db9ae:new Error(String(_0x5db9ae))),process[_0x1258(0x168)](0x1);}}process['on'](_0x1258(0x164),_0x47c64a=>{logger['error'](_0x1258(0x166),_0x47c64a),process[_0x1258(0x168)](0x1);}),process['on'](_0x1258(0x169),_0x37aefc=>{logger[_0x1258(0x165)](_0x1258(0x161),new Error(String(_0x37aefc))),process[_0x1258(0x168)](0x1);}),main()[_0x1258(0x16a)](_0x23ed2d=>{logger[_0x1258(0x165)](_0x1258(0x158),_0x23ed2d instanceof Error?_0x23ed2d:new Error(String(_0x23ed2d))),process[_0x1258(0x168)](0x1);});function _0xb0ec(){const _0x2b633e=['8PJZRUF','4125966ZZOCpN','7966818FkxKwg','2950WtPPeB','21769kgXApj','Unhandled\x20rejection','8776MLSDBC','17930mKgBVo','uncaughtException','error','Uncaught\x20exception','3pwrLfA','exit','unhandledRejection','catch','7680379wgWUsB','134548GYUqIH','Fatal\x20error','start','Failed\x20to\x20start\x20MCP\x20Server','5590656ckaVgi'];_0xb0ec=function(){return _0x2b633e;};return _0xb0ec();}
@@ -1 +1 @@
1
- (function(_0x19b36a,_0x3d560b){const _0x46e782=_0x19b36a();while(!![]){try{const _0x466b2a=parseInt(_0x3e99(0x131))/0x1+parseInt(_0x3e99(0x132))/0x2*(parseInt(_0x3e99(0x13d))/0x3)+-parseInt(_0x3e99(0x130))/0x4+parseInt(_0x3e99(0x135))/0x5+parseInt(_0x3e99(0x13e))/0x6+parseInt(_0x3e99(0x138))/0x7+-parseInt(_0x3e99(0x12f))/0x8*(parseInt(_0x3e99(0x133))/0x9);if(_0x466b2a===_0x3d560b)break;else _0x46e782['push'](_0x46e782['shift']());}catch(_0x528400){_0x46e782['push'](_0x46e782['shift']());}}}(_0x25c9,0x2945b));function _0x25c9(){const _0x3a3ace=['info','1041265vDMFxG','get_channel_details','Channel\x20details\x20retrieved','915509GbMnsH','channelId','storeId','channels:read','data','934644eAMljd','546420HwupOx','request','48LpVZXQ','98344TcrAoQ','209425twiTvy','2mRcRgk','1136169BKCERO'];_0x25c9=function(){return _0x3a3ace;};return _0x25c9();}import{validateGetChannelDetailsParams}from'../../utils/validator.js';import{handleError,createSuccessResult}from'../../utils/errorHandler.js';function _0x3e99(_0x4035f3,_0x1973e1){const _0x25c989=_0x25c9();return _0x3e99=function(_0x3e9955,_0xa8fb24){_0x3e9955=_0x3e9955-0x12f;let _0x103daa=_0x25c989[_0x3e9955];return _0x103daa;},_0x3e99(_0x4035f3,_0x1973e1);}export const getChannelDetailsHandler=async(_0x473d2,_0x5889c4)=>{try{const {apiClient:_0x3e692e,logger:_0x1a2137,permissionChecker:_0x473970}=_0x5889c4;_0x473970['checkPermission'](_0x3e99(0x136),[_0x3e99(0x13b)]);const _0x2f79af=validateGetChannelDetailsParams(_0x473d2);_0x1a2137[_0x3e99(0x134)]('Getting\x20channel\x20details',{'storeId':_0x2f79af['storeId'],'channelId':_0x2f79af['channelId']});const _0x627118=await _0x3e692e[_0x3e99(0x13f)]({'method':'GET','url':'/api/v1/channels/'+_0x2f79af[_0x3e99(0x139)],'params':{'store_id':_0x2f79af[_0x3e99(0x13a)]}});return _0x1a2137[_0x3e99(0x134)](_0x3e99(0x137),{'channelId':_0x2f79af[_0x3e99(0x139)]}),createSuccessResult(_0x627118[_0x3e99(0x13c)]);}catch(_0x5782da){return handleError(_0x5782da);}};
1
+ function _0x2e3d(){const _0x15c3c4=['/api/v1/channels/','877700RfZGBV','info','Getting\x20channel\x20details','2710giFTVK','GET','34332441ngqPEo','1387757aPcjQl','220KrkfCN','1295opaBgF','80450SHBLsa','request','67288Rhcapm','channelId','Channel\x20details\x20retrieved','99VkvtmL','storeId','59016azYjWL','14730uGPXDY'];_0x2e3d=function(){return _0x15c3c4;};return _0x2e3d();}(function(_0x163b9b,_0x5cd83b){const _0x2c5085=_0x163b9b();while(!![]){try{const _0x239cc3=-parseInt(_0x594a(0x92))/0x1+parseInt(_0x594a(0x8c))/0x2+-parseInt(_0x594a(0x89))/0x3*(parseInt(_0x594a(0x93))/0x4)+-parseInt(_0x594a(0x8f))/0x5*(-parseInt(_0x594a(0x8a))/0x6)+-parseInt(_0x594a(0x94))/0x7*(parseInt(_0x594a(0x84))/0x8)+-parseInt(_0x594a(0x87))/0x9*(-parseInt(_0x594a(0x95))/0xa)+parseInt(_0x594a(0x91))/0xb;if(_0x239cc3===_0x5cd83b)break;else _0x2c5085['push'](_0x2c5085['shift']());}catch(_0x26e13c){_0x2c5085['push'](_0x2c5085['shift']());}}}(_0x2e3d,0xe8bf6));import{validateGetChannelDetailsParams}from'../../utils/validator.js';import{handleError,createSuccessResult}from'../../utils/errorHandler.js';function _0x594a(_0x5b67e4,_0x1a3cdf){const _0x2e3d3a=_0x2e3d();return _0x594a=function(_0x594a11,_0x550ed8){_0x594a11=_0x594a11-0x84;let _0x51b379=_0x2e3d3a[_0x594a11];return _0x51b379;},_0x594a(_0x5b67e4,_0x1a3cdf);}export const getChannelDetailsHandler=async(_0x5560c1,_0x58e0d4)=>{try{const {apiClient:_0x2919a1,logger:_0x36c0de,permissionChecker:_0x1cc93c}=_0x58e0d4;_0x1cc93c['checkPermission']('get_channel_details',['channels:read']);const _0x1e26ef=validateGetChannelDetailsParams(_0x5560c1);_0x36c0de['info'](_0x594a(0x8e),{'storeId':_0x1e26ef[_0x594a(0x88)],'channelId':_0x1e26ef[_0x594a(0x85)]});const _0x5330ce=await _0x2919a1[_0x594a(0x96)]({'method':_0x594a(0x90),'url':_0x594a(0x8b)+_0x1e26ef[_0x594a(0x85)],'params':{'store_id':_0x1e26ef[_0x594a(0x88)]}});return _0x36c0de[_0x594a(0x8d)](_0x594a(0x86),{'channelId':_0x1e26ef['channelId']}),createSuccessResult(_0x5330ce['data']);}catch(_0x14a778){return handleError(_0x14a778);}};
@@ -1 +1 @@
1
- 'use strict';(function(_0x77f59,_0x6a3948){var _0x308876=_0x77f59();while(!![]){try{var _0x2c256b=-parseInt(_0x5bc9(0x11a))/0x1+parseInt(_0x5bc9(0x119))/0x2+-parseInt(_0x5bc9(0x11f))/0x3*(parseInt(_0x5bc9(0x121))/0x4)+-parseInt(_0x5bc9(0x120))/0x5+-parseInt(_0x5bc9(0x11e))/0x6*(parseInt(_0x5bc9(0x122))/0x7)+parseInt(_0x5bc9(0x11b))/0x8+parseInt(_0x5bc9(0x11d))/0x9*(parseInt(_0x5bc9(0x11c))/0xa);if(_0x2c256b===_0x6a3948)break;else _0x308876['push'](_0x308876['shift']());}catch(_0x1559ee){_0x308876['push'](_0x308876['shift']());}}}(_0x42ca,0x6a915));function _0x5bc9(_0x1a3968,_0x1c5e47){var _0x42ca82=_0x42ca();return _0x5bc9=function(_0x5bc974,_0x220d60){_0x5bc974=_0x5bc974-0x119;var _0x2e2997=_0x42ca82[_0x5bc974];return _0x2e2997;},_0x5bc9(_0x1a3968,_0x1c5e47);}function _0x42ca(){var _0x148fce=['2988dYCvyS','879342qVHRfF','475278YlZdlc','1357060NKNdac','4zPhTsL','7lvRwOO','440782anoDHL','218422HtwSFS','1343832rnchrj','25390NKfPZi'];_0x42ca=function(){return _0x148fce;};return _0x42ca();}
1
+ 'use strict';(function(_0x5ec0e4,_0x4e5bcd){var _0xa69b6d=_0x5ec0e4();while(!![]){try{var _0x32f1f6=-parseInt(_0x5205(0x141))/0x1+parseInt(_0x5205(0x13a))/0x2*(parseInt(_0x5205(0x13c))/0x3)+-parseInt(_0x5205(0x13d))/0x4*(parseInt(_0x5205(0x13f))/0x5)+parseInt(_0x5205(0x142))/0x6+parseInt(_0x5205(0x13b))/0x7+parseInt(_0x5205(0x13e))/0x8+parseInt(_0x5205(0x140))/0x9*(-parseInt(_0x5205(0x139))/0xa);if(_0x32f1f6===_0x4e5bcd)break;else _0xa69b6d['push'](_0xa69b6d['shift']());}catch(_0xf4126c){_0xa69b6d['push'](_0xa69b6d['shift']());}}}(_0x5914,0x8e2b5));function _0x5205(_0x5a2eff,_0x100a7d){var _0x591414=_0x5914();return _0x5205=function(_0x520502,_0x142b08){_0x520502=_0x520502-0x139;var _0x110191=_0x591414[_0x520502];return _0x110191;},_0x5205(_0x5a2eff,_0x100a7d);}function _0x5914(){var _0x891e81=['1508596BXlNSo','6510264uBrqWp','15SILrWS','12303qhMfaR','995655BYHeVb','4544910ZaXlrM','970SOQyDB','1770OlAsWj','4397736QWRIcF','2178qDdmDi'];_0x5914=function(){return _0x891e81;};return _0x5914();}
@@ -1 +1 @@
1
- (function(_0x387253,_0x2e80b0){const _0x2e36c8=_0x387253();while(!![]){try{const _0x3d1fa5=parseInt(_0x2f8e(0x10e))/0x1+-parseInt(_0x2f8e(0x104))/0x2*(parseInt(_0x2f8e(0x10c))/0x3)+-parseInt(_0x2f8e(0x10b))/0x4*(parseInt(_0x2f8e(0x113))/0x5)+parseInt(_0x2f8e(0x100))/0x6*(-parseInt(_0x2f8e(0x106))/0x7)+-parseInt(_0x2f8e(0x103))/0x8+-parseInt(_0x2f8e(0x111))/0x9*(parseInt(_0x2f8e(0x112))/0xa)+-parseInt(_0x2f8e(0x108))/0xb*(-parseInt(_0x2f8e(0xfe))/0xc);if(_0x3d1fa5===_0x2e80b0)break;else _0x2e36c8['push'](_0x2e36c8['shift']());}catch(_0x290ce0){_0x2e36c8['push'](_0x2e36c8['shift']());}}}(_0x46c6,0xa0cc5));function _0x2f8e(_0x39f76a,_0x4ee341){const _0x46c68f=_0x46c6();return _0x2f8e=function(_0x2f8ee8,_0x5d18d6){_0x2f8ee8=_0x2f8ee8-0xfe;let _0x588772=_0x46c68f[_0x2f8ee8];return _0x588772;},_0x2f8e(_0x39f76a,_0x4ee341);}function _0x46c6(){const _0x47db5b=['checkPermission','info','9UwBnGe','4028300ImvkVr','5KKgVKu','Channels\x20listed\x20successfully','channels','storeId','182544AtrMtu','list_channels','24fOItzp','Listing\x20channels','length','4947024drnKDW','2BAJtiy','channels:read','721819asdVgl','request','1331GZdMAr','/api/v1/channels','GET','167540nfWuaF','619494qabAWm','data','500036qCSYmo'];_0x46c6=function(){return _0x47db5b;};return _0x46c6();}import{validateListChannelsParams}from'../../utils/validator.js';import{handleError,createSuccessResult}from'../../utils/errorHandler.js';export const listChannelsHandler=async(_0x83cb6c,_0x2abb7f)=>{try{const {apiClient:_0x60b606,logger:_0x350cfd,permissionChecker:_0x33df26}=_0x2abb7f;_0x33df26[_0x2f8e(0x10f)](_0x2f8e(0xff),[_0x2f8e(0x105)]);const _0x2ca612=validateListChannelsParams(_0x83cb6c);_0x350cfd[_0x2f8e(0x110)](_0x2f8e(0x101),{'storeId':_0x2ca612[_0x2f8e(0x116)]});const _0x2d6bca=await _0x60b606[_0x2f8e(0x107)]({'method':_0x2f8e(0x10a),'url':_0x2f8e(0x109),'params':{'store_id':_0x2ca612[_0x2f8e(0x116)]}});return _0x350cfd[_0x2f8e(0x110)](_0x2f8e(0x114),{'channelCount':_0x2d6bca[_0x2f8e(0x10d)][_0x2f8e(0x115)][_0x2f8e(0x102)]}),createSuccessResult(_0x2d6bca[_0x2f8e(0x10d)]);}catch(_0x57c571){return handleError(_0x57c571);}};
1
+ function _0x59ad(){const _0x4db976=['9693jlfvvu','channels:read','186985fVJrsw','info','list_channels','storeId','1246300KFrbuZ','GET','462588vkWshq','data','/api/v1/channels','request','1044KJFqIT','6584Wgqwcq','1244cgRQZr','716805pcrqoB','102ggExBM','3572940jIfJDY'];_0x59ad=function(){return _0x4db976;};return _0x59ad();}(function(_0x80da38,_0x5044cb){const _0x5968c7=_0x80da38();while(!![]){try{const _0x3f03a7=parseInt(_0x3cd3(0x1a8))/0x1+-parseInt(_0x3cd3(0x1b3))/0x2+parseInt(_0x3cd3(0x1ab))/0x3*(parseInt(_0x3cd3(0x1a7))/0x4)+-parseInt(_0x3cd3(0x1ad))/0x5*(parseInt(_0x3cd3(0x1a9))/0x6)+-parseInt(_0x3cd3(0x1aa))/0x7+-parseInt(_0x3cd3(0x1a6))/0x8*(-parseInt(_0x3cd3(0x1b7))/0x9)+parseInt(_0x3cd3(0x1b1))/0xa;if(_0x3f03a7===_0x5044cb)break;else _0x5968c7['push'](_0x5968c7['shift']());}catch(_0x17db6c){_0x5968c7['push'](_0x5968c7['shift']());}}}(_0x59ad,0x89c39));import{validateListChannelsParams}from'../../utils/validator.js';function _0x3cd3(_0x78fb62,_0x4075e0){const _0x59ad8c=_0x59ad();return _0x3cd3=function(_0x3cd378,_0x4574f4){_0x3cd378=_0x3cd378-0x1a6;let _0x413970=_0x59ad8c[_0x3cd378];return _0x413970;},_0x3cd3(_0x78fb62,_0x4075e0);}import{handleError,createSuccessResult}from'../../utils/errorHandler.js';export const listChannelsHandler=async(_0x46e9f4,_0x1c422b)=>{try{const {apiClient:_0x3e3a60,logger:_0x34c9a7,permissionChecker:_0x383f63}=_0x1c422b;_0x383f63['checkPermission'](_0x3cd3(0x1af),[_0x3cd3(0x1ac)]);const _0x4ba280=validateListChannelsParams(_0x46e9f4);_0x34c9a7[_0x3cd3(0x1ae)]('Listing\x20channels',{'storeId':_0x4ba280[_0x3cd3(0x1b0)]});const _0x488665=await _0x3e3a60[_0x3cd3(0x1b6)]({'method':_0x3cd3(0x1b2),'url':_0x3cd3(0x1b5),'params':{'store_id':_0x4ba280[_0x3cd3(0x1b0)]}});return _0x34c9a7[_0x3cd3(0x1ae)]('Channels\x20listed\x20successfully',{'channelCount':_0x488665[_0x3cd3(0x1b4)]['channels']['length']}),createSuccessResult(_0x488665[_0x3cd3(0x1b4)]);}catch(_0x230bd6){return handleError(_0x230bd6);}};
@@ -1 +1 @@
1
- function _0xb6b1(){const _0x4bd79a=['GET','6UXXgIM','836862YAATVv','33804QeHWLx','Analyzing\x20revenue','21isCXrb','startDate','9TErdJk','forecastDays','17gKJSqx','603dyGEqH','request','storeId','224796WcETdL','endDate','127658QQCnDZ','3268632vZAHah','6675785WvMDES','finance:read','info','data','9265770lGmjtP','Revenue\x20analysis\x20completed','checkPermission','204eOQpxv','/api/v1/finance/analyze'];_0xb6b1=function(){return _0x4bd79a;};return _0xb6b1();}(function(_0xdd3371,_0x199686){const _0x1b2687=_0xdd3371();while(!![]){try{const _0x25fa37=parseInt(_0x579a(0x7e))/0x1*(parseInt(_0x579a(0x84))/0x2)+-parseInt(_0x579a(0x7f))/0x3*(-parseInt(_0x579a(0x92))/0x4)+parseInt(_0x579a(0x86))/0x5*(parseInt(_0x579a(0x90))/0x6)+-parseInt(_0x579a(0x7a))/0x7*(parseInt(_0x579a(0x85))/0x8)+parseInt(_0x579a(0x7c))/0x9*(-parseInt(_0x579a(0x8a))/0xa)+-parseInt(_0x579a(0x82))/0xb+-parseInt(_0x579a(0x8d))/0xc*(parseInt(_0x579a(0x91))/0xd);if(_0x25fa37===_0x199686)break;else _0x1b2687['push'](_0x1b2687['shift']());}catch(_0x36fe39){_0x1b2687['push'](_0x1b2687['shift']());}}}(_0xb6b1,0xcff51));function _0x579a(_0xe6c9f3,_0x11603c){const _0xb6b1f4=_0xb6b1();return _0x579a=function(_0x579a07,_0x1f543c){_0x579a07=_0x579a07-0x79;let _0x544234=_0xb6b1f4[_0x579a07];return _0x544234;},_0x579a(_0xe6c9f3,_0x11603c);}import{validateAnalyzeRevenueParams}from'../../utils/validator.js';import{handleError,createSuccessResult}from'../../utils/errorHandler.js';export const analyzeRevenueHandler=async(_0x2635f5,_0x5bb6c7)=>{try{const {apiClient:_0x3aef1e,logger:_0x567b35,permissionChecker:_0xec413f}=_0x5bb6c7;_0xec413f[_0x579a(0x8c)]('analyze_revenue',[_0x579a(0x87)]);const _0x4c3104=validateAnalyzeRevenueParams(_0x2635f5);_0x567b35[_0x579a(0x88)](_0x579a(0x79),_0x4c3104);const _0xe2615c=await _0x3aef1e[_0x579a(0x80)]({'method':_0x579a(0x8f),'url':_0x579a(0x8e),'params':{'store_id':_0x4c3104[_0x579a(0x81)],'start_date':_0x4c3104[_0x579a(0x7b)],'end_date':_0x4c3104[_0x579a(0x83)],'forecast_days':_0x4c3104[_0x579a(0x7d)]}});return _0x567b35[_0x579a(0x88)](_0x579a(0x8b)),createSuccessResult(_0xe2615c[_0x579a(0x89)]);}catch(_0x398c58){return handleError(_0x398c58);}};
1
+ function _0x5c6a(_0x455868,_0x4f7851){const _0x5b79ca=_0x5b79();return _0x5c6a=function(_0x5c6a57,_0x251a93){_0x5c6a57=_0x5c6a57-0x19f;let _0x3e00d6=_0x5b79ca[_0x5c6a57];return _0x3e00d6;},_0x5c6a(_0x455868,_0x4f7851);}(function(_0x455a90,_0x593bc3){const _0x49ff82=_0x455a90();while(!![]){try{const _0x54c39=-parseInt(_0x5c6a(0x1a0))/0x1+parseInt(_0x5c6a(0x1a9))/0x2+-parseInt(_0x5c6a(0x1ac))/0x3+-parseInt(_0x5c6a(0x1b0))/0x4+-parseInt(_0x5c6a(0x1a2))/0x5+parseInt(_0x5c6a(0x1a3))/0x6*(-parseInt(_0x5c6a(0x1ab))/0x7)+-parseInt(_0x5c6a(0x1b3))/0x8*(-parseInt(_0x5c6a(0x1ad))/0x9);if(_0x54c39===_0x593bc3)break;else _0x49ff82['push'](_0x49ff82['shift']());}catch(_0xeb2aa1){_0x49ff82['push'](_0x49ff82['shift']());}}}(_0x5b79,0x7e0a8));import{validateAnalyzeRevenueParams}from'../../utils/validator.js';import{handleError,createSuccessResult}from'../../utils/errorHandler.js';function _0x5b79(){const _0x238744=['analyze_revenue','237424qOidcv','Analyzing\x20revenue','7NiYJsN','1945095qGhjIg','4428117oqMThQ','/api/v1/finance/analyze','Revenue\x20analysis\x20completed','1624356rNrhgQ','checkPermission','finance:read','40zkXOBN','info','398915PEAgkc','storeId','1992585OpqhIk','1263762sncGvc','endDate','data','startDate','GET'];_0x5b79=function(){return _0x238744;};return _0x5b79();}export const analyzeRevenueHandler=async(_0x4b613f,_0x1c3e22)=>{try{const {apiClient:_0x59fa37,logger:_0x4d11aa,permissionChecker:_0x89594d}=_0x1c3e22;_0x89594d[_0x5c6a(0x1b1)](_0x5c6a(0x1a8),[_0x5c6a(0x1b2)]);const _0x19e422=validateAnalyzeRevenueParams(_0x4b613f);_0x4d11aa[_0x5c6a(0x19f)](_0x5c6a(0x1aa),_0x19e422);const _0x439e1c=await _0x59fa37['request']({'method':_0x5c6a(0x1a7),'url':_0x5c6a(0x1ae),'params':{'store_id':_0x19e422[_0x5c6a(0x1a1)],'start_date':_0x19e422[_0x5c6a(0x1a6)],'end_date':_0x19e422[_0x5c6a(0x1a4)],'forecast_days':_0x19e422['forecastDays']}});return _0x4d11aa[_0x5c6a(0x19f)](_0x5c6a(0x1af)),createSuccessResult(_0x439e1c[_0x5c6a(0x1a5)]);}catch(_0x5252e2){return handleError(_0x5252e2);}};
@@ -1 +1 @@
1
- function _0x1cc6(){var _0x22a051=['2561836fyWOvq','5364390jxVRSG','470nVPfDV','136yOyeku','751720JWxfdd','448657GOkKpq','4129475WyIdPX','9EtNNuD','5BBEsMg','13116wsHXAF','2180013TlnZML'];_0x1cc6=function(){return _0x22a051;};return _0x1cc6();}(function(_0x3b5620,_0x3e4b75){var _0x53c90c=_0x3b5620();while(!![]){try{var _0x49d6d9=parseInt(_0x4332(0x1d7))/0x1*(-parseInt(_0x4332(0x1dc))/0x2)+-parseInt(_0x4332(0x1d8))/0x3+parseInt(_0x4332(0x1d9))/0x4+-parseInt(_0x4332(0x1d6))/0x5*(parseInt(_0x4332(0x1da))/0x6)+parseInt(_0x4332(0x1df))/0x7+-parseInt(_0x4332(0x1dd))/0x8*(parseInt(_0x4332(0x1e0))/0x9)+-parseInt(_0x4332(0x1db))/0xa*(-parseInt(_0x4332(0x1de))/0xb);if(_0x49d6d9===_0x3e4b75)break;else _0x53c90c['push'](_0x53c90c['shift']());}catch(_0x3b6d9e){_0x53c90c['push'](_0x53c90c['shift']());}}}(_0x1cc6,0x84070));function _0x4332(_0x25e31c,_0x2772c9){var _0x1cc6d4=_0x1cc6();return _0x4332=function(_0x43326c,_0x423b51){_0x43326c=_0x43326c-0x1d6;var _0x4c5e3c=_0x1cc6d4[_0x43326c];return _0x4c5e3c;},_0x4332(_0x25e31c,_0x2772c9);}export{queryOperationalDataV2Handler}from'./queryOperationalDataV2.js';
1
+ (function(_0x1efa5f,_0x1f5a1a){var _0x4b8c96=_0x1efa5f();while(!![]){try{var _0x7108a6=parseInt(_0x2681(0x1da))/0x1+parseInt(_0x2681(0x1d8))/0x2*(parseInt(_0x2681(0x1d5))/0x3)+parseInt(_0x2681(0x1d6))/0x4+parseInt(_0x2681(0x1d9))/0x5+-parseInt(_0x2681(0x1d7))/0x6*(-parseInt(_0x2681(0x1d4))/0x7)+parseInt(_0x2681(0x1db))/0x8*(-parseInt(_0x2681(0x1dd))/0x9)+-parseInt(_0x2681(0x1dc))/0xa;if(_0x7108a6===_0x1f5a1a)break;else _0x4b8c96['push'](_0x4b8c96['shift']());}catch(_0x38f7c4){_0x4b8c96['push'](_0x4b8c96['shift']());}}}(_0x36c4,0x927d4));function _0x2681(_0x527a27,_0x26df95){var _0x36c479=_0x36c4();return _0x2681=function(_0x268171,_0x4f1738){_0x268171=_0x268171-0x1d4;var _0x105537=_0x36c479[_0x268171];return _0x105537;},_0x2681(_0x527a27,_0x26df95);}export{queryOperationalDataV2Handler}from'./queryOperationalDataV2.js';function _0x36c4(){var _0x33d79a=['384176tgdXtg','635272lIqOPx','13693830FdBBRD','9ninDSz','1155938OEwtfK','376284kuPdcx','275704dyFkGZ','6QCFXqU','14jjHAaJ','2762900ioyLaB'];_0x36c4=function(){return _0x33d79a;};return _0x36c4();}
@@ -1 +1 @@
1
- (function(_0x31e8f5,_0x504611){const _0x5c58f0=_0x31e8f5();while(!![]){try{const _0x490936=parseInt(_0x548e(0x7e))/0x1+parseInt(_0x548e(0x7d))/0x2*(-parseInt(_0x548e(0x80))/0x3)+-parseInt(_0x548e(0x6e))/0x4*(parseInt(_0x548e(0x6b))/0x5)+parseInt(_0x548e(0x7a))/0x6*(parseInt(_0x548e(0x71))/0x7)+-parseInt(_0x548e(0x72))/0x8+parseInt(_0x548e(0x76))/0x9*(-parseInt(_0x548e(0x6f))/0xa)+parseInt(_0x548e(0x77))/0xb*(parseInt(_0x548e(0x6c))/0xc);if(_0x490936===_0x504611)break;else _0x5c58f0['push'](_0x5c58f0['shift']());}catch(_0x3c5766){_0x5c58f0['push'](_0x5c58f0['shift']());}}}(_0x2f00,0x9f76a));function _0x548e(_0x5486f5,_0x3e4bdd){const _0x2f00cd=_0x2f00();return _0x548e=function(_0x548e80,_0x10eb17){_0x548e80=_0x548e80-0x6b;let _0x3318ff=_0x2f00cd[_0x548e80];return _0x3318ff;},_0x548e(_0x5486f5,_0x3e4bdd);}import{validateQueryFinancialDataParams}from'../../utils/validator.js';function _0x2f00(){const _0x4ed635=['72tDYnKn','checkPermission','343948fZOrwg','10QOIUNS','info','59962exFEgd','5482256CTYZmT','data','GET','startDate','6689277VInBws','5467297PmSITy','Querying\x20financial\x20data','finance:read','66esnTNW','/api/v1/finance/data','endDate','6dnUhao','1027429mekeuL','Financial\x20data\x20queried\x20successfully','1248237XjCmkY','45aCzhCr'];_0x2f00=function(){return _0x4ed635;};return _0x2f00();}import{handleError,createSuccessResult}from'../../utils/errorHandler.js';export const queryFinancialDataHandler=async(_0x5ee8ca,_0x5048a9)=>{try{const {apiClient:_0x5095c5,logger:_0x2cdfac,permissionChecker:_0x1685f1}=_0x5048a9;_0x1685f1[_0x548e(0x6d)]('query_financial_data',[_0x548e(0x79)]);const _0x1ea166=validateQueryFinancialDataParams(_0x5ee8ca);_0x2cdfac[_0x548e(0x70)](_0x548e(0x78),_0x1ea166);const _0xf71f62=await _0x5095c5['request']({'method':_0x548e(0x74),'url':_0x548e(0x7b),'params':{'store_id':_0x1ea166['storeId'],'start_date':_0x1ea166[_0x548e(0x75)],'end_date':_0x1ea166[_0x548e(0x7c)],'category':_0x1ea166['category']}});return _0x2cdfac[_0x548e(0x70)](_0x548e(0x7f)),createSuccessResult(_0xf71f62[_0x548e(0x73)]);}catch(_0x2e8d2e){return handleError(_0x2e8d2e);}};
1
+ function _0x5832(){const _0x50c27c=['data','569948XmZdjL','129540lWXdNj','468gAeJui','760407qiqviR','3884928aaxEkX','endDate','info','Querying\x20financial\x20data','229911YPZLaO','10803090dKEcMk','6RtiWiJ','7SQOBEQ','checkPermission','query_financial_data','15069224VAeYIl','5AciLHv','GET','Financial\x20data\x20queried\x20successfully','630JyAXGM','/api/v1/finance/data'];_0x5832=function(){return _0x50c27c;};return _0x5832();}function _0x2766(_0x737724,_0x456d3d){const _0x5832b0=_0x5832();return _0x2766=function(_0x276630,_0x1b05c0){_0x276630=_0x276630-0xf5;let _0x25d61c=_0x5832b0[_0x276630];return _0x25d61c;},_0x2766(_0x737724,_0x456d3d);}(function(_0x48023b,_0x44e890){const _0x313449=_0x48023b();while(!![]){try{const _0x27067d=-parseInt(_0x2766(0xfb))/0x1+-parseInt(_0x2766(0x105))/0x2*(-parseInt(_0x2766(0xfe))/0x3)+parseInt(_0x2766(0xff))/0x4+parseInt(_0x2766(0xf5))/0x5*(parseInt(_0x2766(0x104))/0x6)+-parseInt(_0x2766(0x106))/0x7*(parseInt(_0x2766(0x109))/0x8)+-parseInt(_0x2766(0xf8))/0x9*(parseInt(_0x2766(0xfc))/0xa)+-parseInt(_0x2766(0x103))/0xb*(-parseInt(_0x2766(0xfd))/0xc);if(_0x27067d===_0x44e890)break;else _0x313449['push'](_0x313449['shift']());}catch(_0x4ce4ba){_0x313449['push'](_0x313449['shift']());}}}(_0x5832,0xf0f20));import{validateQueryFinancialDataParams}from'../../utils/validator.js';import{handleError,createSuccessResult}from'../../utils/errorHandler.js';export const queryFinancialDataHandler=async(_0x8b4321,_0x417f17)=>{try{const {apiClient:_0x55ea19,logger:_0x25812d,permissionChecker:_0x2138a9}=_0x417f17;_0x2138a9[_0x2766(0x107)](_0x2766(0x108),['finance:read']);const _0x19fc59=validateQueryFinancialDataParams(_0x8b4321);_0x25812d[_0x2766(0x101)](_0x2766(0x102),_0x19fc59);const _0x4b4328=await _0x55ea19['request']({'method':_0x2766(0xf6),'url':_0x2766(0xf9),'params':{'store_id':_0x19fc59['storeId'],'start_date':_0x19fc59['startDate'],'end_date':_0x19fc59[_0x2766(0x100)],'category':_0x19fc59['category']}});return _0x25812d[_0x2766(0x101)](_0x2766(0xf7)),createSuccessResult(_0x4b4328[_0x2766(0xfa)]);}catch(_0x27f99c){return handleError(_0x27f99c);}};
@@ -1 +1 @@
1
- (function(_0x229f96,_0x1e2c4f){const _0x5ec673=_0x229f96();while(!![]){try{const _0xcf5f09=parseInt(_0x3be4(0x1c8))/0x1*(-parseInt(_0x3be4(0x1cb))/0x2)+-parseInt(_0x3be4(0x1bc))/0x3+parseInt(_0x3be4(0x1c9))/0x4+-parseInt(_0x3be4(0x1cd))/0x5+parseInt(_0x3be4(0x1c6))/0x6+-parseInt(_0x3be4(0x1c3))/0x7*(parseInt(_0x3be4(0x1c2))/0x8)+parseInt(_0x3be4(0x1b8))/0x9;if(_0xcf5f09===_0x1e2c4f)break;else _0x5ec673['push'](_0x5ec673['shift']());}catch(_0x1c519b){_0x5ec673['push'](_0x5ec673['shift']());}}}(_0x51ee,0x63945));function _0x3be4(_0x4a4191,_0x6333bb){const _0x51ee34=_0x51ee();return _0x3be4=function(_0x3be437,_0xfafd99){_0x3be437=_0x3be437-0x1b8;let _0x42f25f=_0x51ee34[_0x3be437];return _0x42f25f;},_0x3be4(_0x4a4191,_0x6333bb);}import{validateQueryOperationalDataParams}from'../../utils/validator.js';function _0x51ee(){const _0x9e3307=['data','type','2466138IhrDQY','query_operational_data','5erZIxK','924152Czsobw','startDate','283408wrnPfv','Operational\x20data\x20queried\x20successfully','2275580LwdbcF','17065179yJrBuW','GET','info','Querying\x20operational\x20data','1988727RwxDur','checkPermission','/api/v1/operational/data','storeId','request','endDate','65680SqAfpC','259CroETq'];_0x51ee=function(){return _0x9e3307;};return _0x51ee();}import{handleError,createSuccessResult}from'../../utils/errorHandler.js';export const queryOperationalDataHandler=async(_0x40cb9a,_0x3aceb0)=>{try{const {apiClient:_0x4ca447,logger:_0x35330e,permissionChecker:_0x175c31}=_0x3aceb0;_0x175c31[_0x3be4(0x1bd)](_0x3be4(0x1c7),['finance:read']);const _0x2d90ff=validateQueryOperationalDataParams(_0x40cb9a);_0x35330e[_0x3be4(0x1ba)](_0x3be4(0x1bb),_0x2d90ff);const _0x11f3e0=await _0x4ca447[_0x3be4(0x1c0)]({'method':_0x3be4(0x1b9),'url':_0x3be4(0x1be),'params':{'store_id':_0x2d90ff[_0x3be4(0x1bf)],'start_date':_0x2d90ff[_0x3be4(0x1ca)],'end_date':_0x2d90ff[_0x3be4(0x1c1)],'type':_0x2d90ff[_0x3be4(0x1c5)]}});return _0x35330e['info'](_0x3be4(0x1cc)),createSuccessResult(_0x11f3e0[_0x3be4(0x1c4)]);}catch(_0x171bcf){return handleError(_0x171bcf);}};
1
+ (function(_0x5ef3db,_0x53d352){const _0x2ebf8f=_0x5ef3db();while(!![]){try{const _0x1fe076=parseInt(_0x4cc9(0x129))/0x1+parseInt(_0x4cc9(0x13a))/0x2+-parseInt(_0x4cc9(0x12f))/0x3*(-parseInt(_0x4cc9(0x128))/0x4)+-parseInt(_0x4cc9(0x139))/0x5+parseInt(_0x4cc9(0x134))/0x6*(-parseInt(_0x4cc9(0x13b))/0x7)+-parseInt(_0x4cc9(0x136))/0x8*(parseInt(_0x4cc9(0x132))/0x9)+parseInt(_0x4cc9(0x131))/0xa*(parseInt(_0x4cc9(0x12b))/0xb);if(_0x1fe076===_0x53d352)break;else _0x2ebf8f['push'](_0x2ebf8f['shift']());}catch(_0x3da214){_0x2ebf8f['push'](_0x2ebf8f['shift']());}}}(_0x1370,0x7d912));function _0x4cc9(_0x4c6b2a,_0x4f565c){const _0x1370ef=_0x1370();return _0x4cc9=function(_0x4cc982,_0x2d3e06){_0x4cc982=_0x4cc982-0x126;let _0x23afd9=_0x1370ef[_0x4cc982];return _0x23afd9;},_0x4cc9(_0x4c6b2a,_0x4f565c);}import{validateQueryOperationalDataParams}from'../../utils/validator.js';function _0x1370(){const _0x1c045c=['type','4952352LTyOWw','request','query_operational_data','4366310COapns','886194QVONPm','2728138rOsMLS','endDate','startDate','finance:read','1948252vImoXx','566549ZKqdFW','/api/v1/operational/data','41063xbwhKc','Operational\x20data\x20queried\x20successfully','checkPermission','GET','3IySIMA','info','2410kQeaMo','9pIWAUb','storeId','6Stfimu'];_0x1370=function(){return _0x1c045c;};return _0x1370();}import{handleError,createSuccessResult}from'../../utils/errorHandler.js';export const queryOperationalDataHandler=async(_0x36d655,_0x300e3c)=>{try{const {apiClient:_0x4f8267,logger:_0x49a6f6,permissionChecker:_0x4c68da}=_0x300e3c;_0x4c68da[_0x4cc9(0x12d)](_0x4cc9(0x138),[_0x4cc9(0x127)]);const _0x275ef7=validateQueryOperationalDataParams(_0x36d655);_0x49a6f6[_0x4cc9(0x130)]('Querying\x20operational\x20data',_0x275ef7);const _0x230843=await _0x4f8267[_0x4cc9(0x137)]({'method':_0x4cc9(0x12e),'url':_0x4cc9(0x12a),'params':{'store_id':_0x275ef7[_0x4cc9(0x133)],'start_date':_0x275ef7[_0x4cc9(0x126)],'end_date':_0x275ef7[_0x4cc9(0x13c)],'type':_0x275ef7[_0x4cc9(0x135)]}});return _0x49a6f6['info'](_0x4cc9(0x12c)),createSuccessResult(_0x230843['data']);}catch(_0x4a3ffc){return handleError(_0x4a3ffc);}};