@taazkareem/clickup-mcp-server
Version:
ClickUp MCP Server - Powering AI Agents with full ClickUp task, document, and chat management capabilities.
1 lines • 12.5 kB
JavaScript
const a0_0x2844f7=a0_0x30b1;(function(_0x242fd4,_0x40069d){const _0x49884f=a0_0x30b1,_0x30ca6a=_0x242fd4();while(!![]){try{const _0x34fcbc=-parseInt(_0x49884f(0x153))/0x1+-parseInt(_0x49884f(0x188))/0x2*(-parseInt(_0x49884f(0x161))/0x3)+-parseInt(_0x49884f(0x163))/0x4+-parseInt(_0x49884f(0x11f))/0x5+-parseInt(_0x49884f(0x15a))/0x6+parseInt(_0x49884f(0xfb))/0x7+parseInt(_0x49884f(0x164))/0x8;if(_0x34fcbc===_0x40069d)break;else _0x30ca6a['push'](_0x30ca6a['shift']());}catch(_0x5a60e1){_0x30ca6a['push'](_0x30ca6a['shift']());}}}(a0_0x23c9,0x2c23e));import{Logger}from'../logger.js';import{sponsorService}from'../utils/sponsor-service.js';const logger=new Logger(a0_0x2844f7(0x180)+'okToo'+'l');export const listWebhooksTool={'name':'list_'+'webho'+a0_0x2844f7(0xfa),'description':a0_0x2844f7(0x14b)+'all\x20w'+a0_0x2844f7(0x17d)+'ks\x20co'+a0_0x2844f7(0xd7)+'red\x20i'+a0_0x2844f7(0x154)+a0_0x2844f7(0x149)+a0_0x2844f7(0x134)+'.','annotations':{'title':a0_0x2844f7(0x14b)+'Webho'+'oks','readOnlyHint':!![]},'inputSchema':{'type':a0_0x2844f7(0xe9)+'t','properties':{}}};export const createWebhookTool={'name':a0_0x2844f7(0x131)+a0_0x2844f7(0xec)+a0_0x2844f7(0xe0),'description':a0_0x2844f7(0x11a)+a0_0x2844f7(0x185)+a0_0x2844f7(0x10e)+a0_0x2844f7(0xda)+a0_0x2844f7(0x150)+a0_0x2844f7(0x18a)+a0_0x2844f7(0x135)+'l-tim'+'e\x20not'+'ifica'+a0_0x2844f7(0x132)+a0_0x2844f7(0x127)+a0_0x2844f7(0x186)+a0_0x2844f7(0x160)+a0_0x2844f7(0x10d)+a0_0x2844f7(0x152)+a0_0x2844f7(0x175)+a0_0x2844f7(0x16f)+a0_0x2844f7(0xf5)+a0_0x2844f7(0x122)+a0_0x2844f7(0x177)+a0_0x2844f7(0x116),'annotations':{'title':a0_0x2844f7(0x11a)+a0_0x2844f7(0x16d)+a0_0x2844f7(0xe0)},'inputSchema':{'type':a0_0x2844f7(0xe9)+'t','properties':{'endpoint':{'type':a0_0x2844f7(0xf2)+'g','description':a0_0x2844f7(0xe6)+a0_0x2844f7(0x13e)+a0_0x2844f7(0x155)+a0_0x2844f7(0x117)+'uired'+'.'},'events':{'type':a0_0x2844f7(0x12e),'items':{'type':a0_0x2844f7(0xf2)+'g'},'description':a0_0x2844f7(0x16c)+a0_0x2844f7(0x166)+a0_0x2844f7(0x162)+'quire'+a0_0x2844f7(0x14a)+a0_0x2844f7(0x13a)+'\x27]\x20fo'+a0_0x2844f7(0x13f)+'\x20even'+a0_0x2844f7(0x10a)},'space_id':{'type':a0_0x2844f7(0xf2)+'g','description':'Optio'+a0_0x2844f7(0x11b)+a0_0x2844f7(0x144)+'\x20spac'+a0_0x2844f7(0x17b)},'folder_id':{'type':'strin'+'g','description':a0_0x2844f7(0x11e)+a0_0x2844f7(0x11b)+a0_0x2844f7(0x144)+a0_0x2844f7(0x141)+a0_0x2844f7(0x143)+'.'},'list_id':{'type':'strin'+'g','description':a0_0x2844f7(0x11e)+a0_0x2844f7(0x11b)+a0_0x2844f7(0x144)+a0_0x2844f7(0x113)+a0_0x2844f7(0x11d)},'task_id':{'type':'strin'+'g','description':a0_0x2844f7(0x11e)+a0_0x2844f7(0x11b)+a0_0x2844f7(0x144)+a0_0x2844f7(0xfd)+a0_0x2844f7(0x11d)}},'required':['endpo'+a0_0x2844f7(0xde),a0_0x2844f7(0x128)+'s']}};export const updateWebhookTool={'name':a0_0x2844f7(0x110)+'e_web'+a0_0x2844f7(0xe0),'description':a0_0x2844f7(0x12a)+a0_0x2844f7(0x133)+'exist'+a0_0x2844f7(0xe1)+a0_0x2844f7(0x17d)+a0_0x2844f7(0xd8)+'ndpoi'+a0_0x2844f7(0x10f)+a0_0x2844f7(0xe4)+a0_0x2844f7(0x119)+a0_0x2844f7(0x169)+'s.','annotations':{'title':a0_0x2844f7(0x12a)+a0_0x2844f7(0x16d)+a0_0x2844f7(0xe0)},'inputSchema':{'type':a0_0x2844f7(0xe9)+'t','properties':{'webhook_id':{'type':a0_0x2844f7(0xf2)+'g','description':a0_0x2844f7(0x180)+a0_0x2844f7(0x107)+a0_0x2844f7(0x117)+a0_0x2844f7(0x138)+'.'},'endpoint':{'type':'strin'+'g','description':'New\x20d'+'estin'+a0_0x2844f7(0x174)+a0_0x2844f7(0x137)},'events':{'type':'array','items':{'type':a0_0x2844f7(0xf2)+'g'},'description':'New\x20e'+a0_0x2844f7(0x189)+a0_0x2844f7(0x13b)+'.'},'status':{'type':a0_0x2844f7(0xf2)+'g','description':a0_0x2844f7(0x14f)+'s\x20(\x27a'+a0_0x2844f7(0xd4)+a0_0x2844f7(0xd5)+a0_0x2844f7(0xed)+'ended'+a0_0x2844f7(0x17a),'enum':['activ'+'e','suspe'+a0_0x2844f7(0xdf)]}},'required':[a0_0x2844f7(0xee)+a0_0x2844f7(0x14d)]}};function a0_0x23c9(){const _0x1ca7ab=['ihr5Cgu','DwnJzxm','yxrLlca','C3rHDhu','B3iGzgu','yxjLihi','rxzLBNq','zsbxzwi','AxnbCNi','BNqGvvi','zguGyxq','B2SGDxa','B2SGB3a','C3vJy2u','yxrPB24','BMrWB2K','iI4Gvxm','DhmGyxi','ztOGBgK','EfbgzKW','jYKU','zsbjrc4','j2vUzha','zwjOB28','Dwn0Axy','igXLyxm','v2vIAg8','igzVCIa','DgvKihm','zgvSzxq','zgf0zwq','zsbHig4','ienSAwm','qwnJzxm','mZzKuvDqwwi','DMvUDca','zwnLAxy','y3rPDMu','jYbVCIa','lcb1Cgq','BMzPz3u','AYDZigu','C2z1BgW','yMHVB2S','Cu9Nwgq','DguU','uhjVDMK','Aw50','BMrLza','Ag9VAW','Aw5NihC','B2LUDcC','u1zZqMu','DMvUDhm','ignYzwe','rgvZDgK','Aw9UCYa','BgLZDa','B2jQzwm','DgfZA18','CYbezw4','zv93zwi','j3n1C3a','D2vIAg8','ig9Yiee','DgLVBIa','zgLZywi','C3rYAw4','C3qSigm','Bgv0zs4','tcbHBMq','zgf0yq','zw5KCg8','DguGysa','ihvWzge','B2TZ','mtiYmJa5nvDmsNzhva','CgrHDgu','ihrHC2S','Dg9VBey','B2SU','igfUzca','CMvHDgu','igrLBgu','DcbVBMu','j3DLyMG','AxjLzca','CYCGDg8','B2SGsuq','AwXLzdO','CNjHEsa','DhmU','zwf0zwq','vw5RBM8','uMvXDwK','zxCGD2u','BNqSigu','DxbKyxq','BgvK','BwvZC2e','igXPC3q','j2v2zw4','zxjYB3i','CMf5lG','lIbszxe','AwX0zxi','lcbVCIa','q3jLyxq','BMfSihm','x2LK','ieLelG','t3b0Aw8','nJK3ntiWtu5tALnW','ihjLCxu','zM9Yigq','igv2zw4','EsbYzw0','ihDLyMG','zsbKAxm','zxnZzNu','igzYB20','zxzLBNq','vvPxDhe','vxbKyxq','CLjLC3a','B3zLige','ufDNDgm','yxjYyxK','ugvYBwe','A2v5CW','y3jLyxq','DgLVBNm','zsbHBIa','C3bHy2u','zsbYzwe','AwvKoIa','ifvstc4','DwLYzwq','zuvYCM8','zsbBjYO','DhLWzxm','zcCGAxm','Ew91CIa','BMf0Aw8','CIbHBgW','B29Rx2K','igzVBgq','ig9YicC','zxiGsuq','y29WztO','ueKGy28','vhDTBLq','zsbHy3q','DhmNige','ihDVCMS','zc4Gvxm','tgLZDca','B29R','B2TFAwq','BNrZjYW','u3rHDhu','ihrVihi','zvjLC3a','CMvZigu','mZm0ntCXDuPkz1HL','BIb0Agu','BIbvuKW','ihn1y2m','rgvSzxq','Aw50jYW','B25Zzq','mtGWndmYDenbvxzb','zxjHDgK','zvDLyMG','qM90Aca','icDLDMu','BgX5lG','A1vWlIa','ndi2ntfzEKHNBwq','CY4GuMu','mti0nda4nfb2uurQsG','nduYmZGWmfrYu1nIBW','D24Gywm'];a0_0x23c9=function(){return _0x1ca7ab;};return a0_0x23c9();}export const deleteWebhookTool={'name':a0_0x2844f7(0x183)+a0_0x2844f7(0xec)+a0_0x2844f7(0xe0),'description':a0_0x2844f7(0x12f)+'nentl'+a0_0x2844f7(0x123)+a0_0x2844f7(0x12c)+a0_0x2844f7(0x124)+'ook.','annotations':{'title':a0_0x2844f7(0x157)+a0_0x2844f7(0x16d)+'hook','destructiveHint':!![]},'inputSchema':{'type':a0_0x2844f7(0xe9)+'t','properties':{'webhook_id':{'type':a0_0x2844f7(0xf2)+'g','description':a0_0x2844f7(0x180)+'ok\x20ID'+a0_0x2844f7(0x117)+a0_0x2844f7(0x138)+'.'}},'required':[a0_0x2844f7(0xee)+a0_0x2844f7(0x14d)]}};function a0_0x30b1(_0x42e1d0,_0x5832f8){_0x42e1d0=_0x42e1d0-0xd4;const _0x23c975=a0_0x23c9();let _0x30b14f=_0x23c975[_0x42e1d0];if(a0_0x30b1['DXpyPt']===undefined){var _0x287790=function(_0x473eb6){const _0x106e75='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x340e3c='',_0x42c8ad='';for(let _0x33d6aa=0x0,_0x4bb706,_0x1b33cc,_0x5634ab=0x0;_0x1b33cc=_0x473eb6['charAt'](_0x5634ab++);~_0x1b33cc&&(_0x4bb706=_0x33d6aa%0x4?_0x4bb706*0x40+_0x1b33cc:_0x1b33cc,_0x33d6aa++%0x4)?_0x340e3c+=String['fromCharCode'](0xff&_0x4bb706>>(-0x2*_0x33d6aa&0x6)):0x0){_0x1b33cc=_0x106e75['indexOf'](_0x1b33cc);}for(let _0x836cf4=0x0,_0x1210b9=_0x340e3c['length'];_0x836cf4<_0x1210b9;_0x836cf4++){_0x42c8ad+='%'+('00'+_0x340e3c['charCodeAt'](_0x836cf4)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x42c8ad);};a0_0x30b1['EPdZoV']=_0x287790,a0_0x30b1['EtjEcy']={},a0_0x30b1['DXpyPt']=!![];}const _0x2b99ef=_0x23c975[0x0],_0x18937f=_0x42e1d0+_0x2b99ef,_0x59be37=a0_0x30b1['EtjEcy'][_0x18937f];return!_0x59be37?(_0x30b14f=a0_0x30b1['EPdZoV'](_0x30b14f),a0_0x30b1['EtjEcy'][_0x18937f]=_0x30b14f):_0x30b14f=_0x59be37,_0x30b14f;}export async function handleManageWebhooks(_0x3d6162,_0x902daf){const _0x240ad7=a0_0x2844f7,_0x2ed840={'SVsBe':_0x240ad7(0xe8),'UZWtq':'Webho'+'ok\x20cr'+_0x240ad7(0x10b)+_0x240ad7(0x156)+_0x240ad7(0x126)+_0x240ad7(0x15f),'qOgXd':_0x240ad7(0x104)+_0x240ad7(0x140)+_0x240ad7(0x13c)+_0x240ad7(0x120)+_0x240ad7(0x105)+'for\x20u'+_0x240ad7(0xfc)+'.','TwmnT':function(_0x11037c,_0x4bff4e){return _0x11037c===_0x4bff4e;},'xPFfL':_0x240ad7(0x180)+_0x240ad7(0x171)+_0x240ad7(0x184)+_0x240ad7(0x156)+_0x240ad7(0x126)+_0x240ad7(0x15f),'qIdTL':_0x240ad7(0x183)+'e','PWgtc':'delet'+_0x240ad7(0xec)+_0x240ad7(0xe0)},{webhook:_0x571fc0}=_0x902daf,{action:_0x4b54ad,webhook_id:_0x4d8e57,endpoint:_0x473c91,events:_0x14e804,space_id:_0xe20732,folder_id:_0x68680a,list_id:_0x3b06dd,task_id:_0x3066e5,status:_0x981903,team_id:_0x4f2932}=_0x3d6162;try{switch(_0x4b54ad){case _0x2ed840[_0x240ad7(0xe3)]:{const _0x4c9a83=await _0x571fc0['getWe'+'bhook'+'s'](_0x4f2932);if(!_0x4c9a83[_0x240ad7(0x173)+'ss'])throw new Error(_0x4c9a83[_0x240ad7(0x115)]?.[_0x240ad7(0x112)+'ge']);return sponsorService[_0x240ad7(0x131)+_0x240ad7(0x151)+_0x240ad7(0x159)]({'webhooks':_0x4c9a83[_0x240ad7(0xf6)]?.['webho'+_0x240ad7(0xfa)]||[]},!![]);}case'creat'+'e':{if(!_0x473c91||!_0x14e804||!Array[_0x240ad7(0x16e)+'ay'](_0x14e804))return sponsorService['creat'+'eErro'+'rResp'+_0x240ad7(0x159)](_0x240ad7(0x15d)+_0x240ad7(0x17c)+_0x240ad7(0xe2)+_0x240ad7(0x100)+_0x240ad7(0x114)+_0x240ad7(0x148)+_0x240ad7(0x109)+_0x240ad7(0x16b)+'equir'+'ed\x20to'+_0x240ad7(0xe5)+_0x240ad7(0xf8)+_0x240ad7(0xee)+_0x240ad7(0xff));const _0x156857={'endpoint':_0x473c91,'events':_0x14e804};if(_0xe20732)_0x156857[_0x240ad7(0x134)+_0x240ad7(0x11c)]=_0xe20732;if(_0x68680a)_0x156857['folde'+'r_id']=_0x68680a;if(_0x3b06dd)_0x156857['list_'+'id']=_0x3b06dd;if(_0x3066e5)_0x156857[_0x240ad7(0xea)+'id']=_0x3066e5;const _0x155160=await _0x571fc0[_0x240ad7(0x131)+_0x240ad7(0x15c)+'ook'](_0x156857,_0x4f2932);if(!_0x155160[_0x240ad7(0x173)+'ss'])throw new Error(_0x155160[_0x240ad7(0x115)]?.[_0x240ad7(0x112)+'ge']);return sponsorService['creat'+_0x240ad7(0x151)+'onse']({'webhook':_0x155160[_0x240ad7(0xf6)]?.[_0x240ad7(0xee)+'ok'],'message':_0x2ed840[_0x240ad7(0x129)]},!![]);}case _0x240ad7(0x110)+'e':{if(!_0x4d8e57)return sponsorService[_0x240ad7(0x131)+_0x240ad7(0x139)+_0x240ad7(0x12b)+'onse'](_0x2ed840[_0x240ad7(0xdb)]);const _0x39a0c1={};if(_0x473c91)_0x39a0c1[_0x240ad7(0xf7)+_0x240ad7(0xde)]=_0x473c91;if(_0x14e804)_0x39a0c1[_0x240ad7(0x128)+'s']=_0x14e804;if(_0x981903)_0x39a0c1[_0x240ad7(0x169)+'s']=_0x981903;if(_0x2ed840[_0x240ad7(0x146)](Object[_0x240ad7(0x130)](_0x39a0c1)['lengt'+'h'],0x0))return sponsorService[_0x240ad7(0x131)+_0x240ad7(0x139)+_0x240ad7(0x12b)+_0x240ad7(0x159)](_0x240ad7(0xdd)+_0x240ad7(0x170)+_0x240ad7(0x17f)+_0x240ad7(0x103)+'\x20of\x20\x27'+_0x240ad7(0xf7)+_0x240ad7(0x158)+_0x240ad7(0x15e)+_0x240ad7(0x14e)+_0x240ad7(0x142)+_0x240ad7(0x169)+_0x240ad7(0x106)+_0x240ad7(0xf9)+_0x240ad7(0xdc));const _0x1f3689=await _0x571fc0[_0x240ad7(0x110)+_0x240ad7(0x15c)+_0x240ad7(0x14c)](_0x4d8e57,_0x39a0c1);if(!_0x1f3689['succe'+'ss'])throw new Error(_0x1f3689[_0x240ad7(0x115)]?.['messa'+'ge']);return sponsorService['creat'+_0x240ad7(0x151)+_0x240ad7(0x159)]({'webhook':_0x1f3689[_0x240ad7(0xf6)]?.[_0x240ad7(0xee)+'ok'],'message':_0x2ed840[_0x240ad7(0x179)]},!![]);}case _0x2ed840['qIdTL']:{if(!_0x4d8e57)return sponsorService[_0x240ad7(0x131)+_0x240ad7(0x139)+'rResp'+_0x240ad7(0x159)]('\x27webh'+_0x240ad7(0x140)+_0x240ad7(0x13c)+'\x20requ'+'ired\x20'+_0x240ad7(0x121)+'elete'+'.');const _0x592fa6=_0x902daf[_0x240ad7(0xfe)+_0x240ad7(0x118)]?.[_0x240ad7(0xf1)+_0x240ad7(0x111)]||[];if(_0x592fa6['inclu'+'des'](_0x2ed840[_0x240ad7(0x12d)]))return sponsorService[_0x240ad7(0x131)+_0x240ad7(0x139)+_0x240ad7(0x12b)+'onse'](_0x240ad7(0x187)+_0x240ad7(0xeb)+_0x240ad7(0x136)+'Destr'+_0x240ad7(0x17e)+_0x240ad7(0x147)+_0x240ad7(0xe7)+'(\x27'+_0x4b54ad+('\x27)\x20ar'+_0x240ad7(0x125)+'abled'+_0x240ad7(0x181)+_0x240ad7(0x13d)+'curre'+'nt\x20pe'+'rsona'+_0x240ad7(0xef)+_0x240ad7(0x145)+'nfigu'+'ratio'+'n.'));const _0x5d667f=await _0x571fc0['delet'+_0x240ad7(0x15c)+_0x240ad7(0x14c)](_0x4d8e57);if(!_0x5d667f[_0x240ad7(0x173)+'ss'])throw new Error(_0x5d667f['error']?.[_0x240ad7(0x112)+'ge']);return sponsorService[_0x240ad7(0x131)+_0x240ad7(0x151)+'onse']({'message':'Webho'+'ok\x20'+_0x4d8e57+(_0x240ad7(0x102)+_0x240ad7(0x182)+_0x240ad7(0x167)+_0x240ad7(0xd9)+'y.')},!![]);}default:return sponsorService[_0x240ad7(0x131)+_0x240ad7(0x139)+_0x240ad7(0x12b)+_0x240ad7(0x159)](_0x240ad7(0x10c)+_0x240ad7(0x165)+_0x240ad7(0xf0)+'\x22'+_0x4b54ad+(_0x240ad7(0x176)+_0x240ad7(0x178)+_0x240ad7(0xf3)+_0x240ad7(0x101)+_0x240ad7(0xd6)+_0x240ad7(0x168)+_0x240ad7(0x16a)+_0x240ad7(0xf4)));}}catch(_0x1a98ec){return logger[_0x240ad7(0x115)](_0x240ad7(0x180)+_0x240ad7(0x172)+_0x240ad7(0x15b)+'on\x20fa'+_0x240ad7(0x108)+'\x20'+_0x1a98ec['messa'+'ge']),sponsorService[_0x240ad7(0x131)+_0x240ad7(0x139)+_0x240ad7(0x12b)+_0x240ad7(0x159)](_0x1a98ec[_0x240ad7(0x112)+'ge']||String(_0x1a98ec));}}