UNPKG

@taazkareem/clickup-mcp-server

Version:

ClickUp MCP Server - Powering AI Agents with full ClickUp task, document, and chat management capabilities.

1 lines 14.3 kB
const a0_0x4d2e58=a0_0x2b2f;function a0_0x4d56(){const _0x1a491f=['yxbWzw4','zvrHC2S','BNrFDgu','qvr2zvq','zxf1zxm','CMvZB2W','y29Yzq','odi5ndu1meLvqwPqCG','zw50lW','r0ngwhu','Bw1LBNq','BwfRzvi','BMvL','z2v0ihq','nde0mZmYmxn6q3f1sG','mtzVEhfwsem','Dg9tDhi','x2LK','Agj3AgK','y3vZDg8','z2v0','C3bVBNm','zgf0yq','rMfPBgu','DvHWuuO','ihjLCgW','BsbdBgK','ywn0Aw8','zw50uMu','sw52ywW','D2fYBG','zw50','C3rHDhu','y2TvCca','uMvHy3q','BNrZ','z2v0igm','B21Tzw4','zwfJDgK','BgvUz3q','uKvNs08','BwvUDhm','z2v0vge','C3bHy2u','BM93','AYbJB20','DxbKyxq','vgfZA1m','CgX5','nZe1mJG2mhP4uvL1CW','AwvZigy','BwvUDa','r1jZvMW','BNnL','ywnRlq','DxDQs2u','ywXS','zMv0y2G','CMvWBhK','zw50CW','Dg9ju08','mtiYodq3m09JCKDKEq','AgfUzgW','Aw9U','C3rHCNq','l3jLywm','vw5RBM8','z2v0q28','uMvWBgK','BNrszxm','q29TBwu','l2nVBw0','zcb0BYa','y3jLyxq','l3jLCgW','l2nOyxq','zxj2Awm','BwvUDca','zxjHDgK','yxnRigm','Dg9cDvC','ywDLCY8','Bg9Nt3a','qvbj','B24GDg8','y2XPzw4','zMfqBfO','DgLVBNm','DcbYzxa','l3rHC2S','zuvYCM8','yNbjEMq','B0v0s1C','vxHlzMm','nvHOtLLuwq','CgfYC2u','ntqXodaZnwTYCunsEG','Cg9UC2u','Ber1Dgm','C2TdB20','mtq0ndm3nfriy0TPCW','CMvTB3y','wu50v2i','vuvHEMW','y29TBwu','BLLLuw8','nde0ntu3mw1MCgjdtG','zunVBw0','DxnLCG','zgf0zq','DJncyxm','l21LC3m','DgvHBuK','Aw5N','zsbMCM8','zsbYzwe','zMfSBgi','zsbJB20','l3DVCMS','zgvSzxq','AwqGCMu','ignVBw0','Cg9ZDa','u3rYAw4','CMvZCg8','BgLLCW'];a0_0x4d56=function(){return _0x1a491f;};return a0_0x4d56();}(function(_0x531187,_0x6b1230){const _0x40f09d=a0_0x2b2f,_0x563739=_0x531187();while(!![]){try{const _0x6c48fa=-parseInt(_0x40f09d(0x13b))/0x1+-parseInt(_0x40f09d(0xe4))/0x2+parseInt(_0x40f09d(0x10c))/0x3+parseInt(_0x40f09d(0x12f))/0x4+parseInt(_0x40f09d(0xde))/0x5*(parseInt(_0x40f09d(0x105))/0x6)+-parseInt(_0x40f09d(0xe0))/0x7+-parseInt(_0x40f09d(0x10d))/0x8*(parseInt(_0x40f09d(0xea))/0x9);if(_0x6c48fa===_0x6b1230)break;else _0x563739['push'](_0x563739['shift']());}catch(_0x810a04){_0x563739['push'](_0x563739['shift']());}}}(a0_0x4d56,0xdd274));import{Logger}from'../../../logger.js';const logger=new Logger(a0_0x4d2e58(0x12d)+a0_0x4d2e58(0x14a)+a0_0x4d2e58(0xeb)+a0_0x4d2e58(0x139));function a0_0x2b2f(_0x4f2ce4,_0x28ad39){_0x4f2ce4=_0x4f2ce4-0xde;const _0x4d5657=a0_0x4d56();let _0x2b2f99=_0x4d5657[_0x4f2ce4];if(a0_0x2b2f['QkhQmP']===undefined){var _0x43b181=function(_0x44c4a4){const _0x4182a9='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x23e757='',_0x3d90ca='';for(let _0x141260=0x0,_0x47d797,_0x1e12b7,_0x4b3051=0x0;_0x1e12b7=_0x44c4a4['charAt'](_0x4b3051++);~_0x1e12b7&&(_0x47d797=_0x141260%0x4?_0x47d797*0x40+_0x1e12b7:_0x1e12b7,_0x141260++%0x4)?_0x23e757+=String['fromCharCode'](0xff&_0x47d797>>(-0x2*_0x141260&0x6)):0x0){_0x1e12b7=_0x4182a9['indexOf'](_0x1e12b7);}for(let _0x10f6fe=0x0,_0x78bf2d=_0x23e757['length'];_0x10f6fe<_0x78bf2d;_0x10f6fe++){_0x3d90ca+='%'+('00'+_0x23e757['charCodeAt'](_0x10f6fe)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3d90ca);};a0_0x2b2f['UABqXT']=_0x43b181,a0_0x2b2f['Kkezya']={},a0_0x2b2f['QkhQmP']=!![];}const _0xb4b7fe=_0x4d5657[0x0],_0xcdb263=_0x4f2ce4+_0xb4b7fe,_0xc8915c=a0_0x2b2f['Kkezya'][_0xcdb263];return!_0xc8915c?(_0x2b2f99=a0_0x2b2f['UABqXT'](_0x2b2f99),a0_0x2b2f['Kkezya'][_0xcdb263]=_0x2b2f99):_0x2b2f99=_0xc8915c,_0x2b2f99;}export class TaskServiceComments{constructor(_0x34b655){const _0xd6c304=a0_0x4d2e58;this[_0xd6c304(0x104)]=_0x34b655;}['parse'+a0_0x4d2e58(0x144)+a0_0x4d2e58(0x143)+a0_0x4d2e58(0xe1)](_0x29adf9,_0x26e0e4){const _0x59bc2a=a0_0x4d2e58,_0x1e2adb={'GCFXu':function(_0x11aa73,_0x1ff49c){return _0x11aa73!==_0x1ff49c;},'uXpQJ':_0x59bc2a(0x140)+'wn'};if(_0x29adf9['comme'+'nt']&&typeof _0x29adf9[_0x59bc2a(0xe8)+'nt']==='objec'+'t'&&_0x29adf9[_0x59bc2a(0xe8)+'nt']['id'])return _0x29adf9['comme'+'nt'];if(_0x29adf9['id']&&(_0x1e2adb[_0x59bc2a(0x107)](_0x29adf9['comme'+_0x59bc2a(0x100)+'xt'],undefined)||_0x29adf9[_0x59bc2a(0xe8)+'nt']!==undefined))return _0x29adf9;return{'id':_0x29adf9['id']||_0x59bc2a(0x111)+'m-'+Date['now'](),'comment':_0x29adf9[_0x59bc2a(0xe8)+'nt']||_0x26e0e4,'comment_text':_0x29adf9[_0x59bc2a(0xe8)+_0x59bc2a(0x100)+'xt']||_0x26e0e4,'user':_0x29adf9[_0x59bc2a(0xec)]||{'id':0x0,'username':_0x1e2adb[_0x59bc2a(0x116)],'email':'','color':''},'date':_0x29adf9[_0x59bc2a(0xed)]||new Date()[_0x59bc2a(0x13a)+'Strin'+'g'](),'resolved':![]};}async[a0_0x4d2e58(0x128)+a0_0x4d2e58(0xe3)+a0_0x4d2e58(0x127)](_0x2a474e,_0x2b7d29,_0x25b732,_0x4eab24=![]){const _0x17d570=a0_0x4d2e58,_0x325960={'faPlZ':function(_0xd2e982,_0xb18c0d){return _0xd2e982>_0xb18c0d;},'bpIzd':_0x17d570(0x128)+_0x17d570(0xe3)+_0x17d570(0x127),'GRsVl':_0x17d570(0x13e),'KNoXh':'Faile'+_0x17d570(0x146)+_0x17d570(0x10b)+_0x17d570(0x14d)+_0x17d570(0x123)+'ts'};this[_0x17d570(0x104)][_0x17d570(0x150)+_0x17d570(0x14c)+'on'](_0x325960[_0x17d570(0x159)],{'taskId':_0x2a474e,'start':_0x2b7d29,'startId':_0x25b732,'includeReplies':_0x4eab24});try{const _0x451951=new URLSearchParams();_0x2b7d29!==undefined&&_0x451951[_0x17d570(0xfe)+'d'](_0x325960[_0x17d570(0x132)],_0x2b7d29[_0x17d570(0x10e)+_0x17d570(0xf1)]());_0x25b732&&_0x451951['appen'+'d'](_0x17d570(0x13e)+_0x17d570(0x10f),_0x25b732);const _0x4b79ce=_0x451951['toStr'+_0x17d570(0xf1)]()?'?'+_0x451951['toStr'+'ing']():'';return await this[_0x17d570(0x104)][_0x17d570(0x109)+_0x17d570(0x102)+'t'](async()=>{const _0x14da1b=_0x17d570,_0x5dafcc=await this[_0x14da1b(0x104)][_0x14da1b(0x153)+'t'][_0x14da1b(0x112)]('/task'+'/'+_0x2a474e+(_0x14da1b(0x145)+_0x14da1b(0x11d))+_0x4b79ce),_0x4982a6=_0x5dafcc['data'][_0x14da1b(0xe8)+_0x14da1b(0x121)]||[];if(_0x4eab24&&_0x325960[_0x14da1b(0x154)](_0x4982a6[_0x14da1b(0x125)+'h'],0x0)){const _0x2fa532=await Promise[_0x14da1b(0x136)](_0x4982a6['map'](async _0x2fe819=>{const _0x361530=_0x14da1b;if(_0x2fe819['id'])try{const _0xe7a9b7=await this[_0x361530(0x104)]['clien'+'t'][_0x361530(0x112)]('/comm'+_0x361530(0x106)+_0x2fe819['id']+('/repl'+'y')),_0x3d1258=_0xe7a9b7[_0x361530(0x114)][_0x361530(0xe8)+_0x361530(0x121)]||[];return{..._0x2fe819,'replies':_0x3d1258};}catch(_0x27700b){return logger[_0x361530(0x11c)](_0x361530(0x115)+_0x361530(0x146)+_0x361530(0x137)+_0x361530(0x117)+_0x361530(0x130)+'or\x20co'+_0x361530(0x108)+'\x20'+_0x2fe819['id'],{'error':_0x27700b}),_0x2fe819;}return _0x2fe819;}));return _0x2fa532;}return _0x4982a6;});}catch(_0x4b5875){throw this['core'][_0x17d570(0x13c)+_0x17d570(0x158)+'r'](_0x4b5875,_0x325960['KNoXh']);}}async[a0_0x4d2e58(0x147)+'eTask'+a0_0x4d2e58(0x144)+'nt'](_0x2d1c85,_0x863be0,_0x2bad26=![],_0x561dca,_0x4c9cbc){const _0x3a6ed4=a0_0x4d2e58,_0x132afb={'pYMjr':function(_0x7a266,_0x76f9e8){return _0x7a266===_0x76f9e8;},'aWSNq':'Faile'+_0x3a6ed4(0x146)+'creat'+'e\x20tas'+_0x3a6ed4(0x12b)+_0x3a6ed4(0x131)};this[_0x3a6ed4(0x104)][_0x3a6ed4(0x150)+_0x3a6ed4(0x14c)+'on'](_0x3a6ed4(0x147)+_0x3a6ed4(0xff)+_0x3a6ed4(0x144)+'nt',{'taskId':_0x2d1c85,'commentText':_0x863be0,'notifyAll':_0x2bad26,'assignee':_0x561dca,'hasFormattedComment':!!_0x4c9cbc});try{const _0x4bf606={'notify_all':_0x2bad26};if(_0x561dca)_0x4bf606['assig'+_0x3a6ed4(0x10a)]=_0x561dca;if(_0x4c9cbc)_0x4bf606[_0x3a6ed4(0xe8)+'nt']=_0x4c9cbc;else _0x863be0&&(_0x4bf606[_0x3a6ed4(0xe8)+'nt_te'+'xt']=_0x863be0);const _0x55bb13=await this['core']['clien'+'t']['post'](_0x3a6ed4(0x157)+'/'+_0x2d1c85+(_0x3a6ed4(0x145)+_0x3a6ed4(0x11d)),_0x4bf606);if(_0x55bb13[_0x3a6ed4(0x114)])return this[_0x3a6ed4(0xdf)+'Comme'+'ntRes'+'ponse'](_0x55bb13[_0x3a6ed4(0x114)],_0x863be0);throw new Error(_0x3a6ed4(0x11b)+_0x3a6ed4(0xf8)+_0x3a6ed4(0x113)+_0x3a6ed4(0xf2)+_0x3a6ed4(0x118)+_0x3a6ed4(0x11f)+_0x3a6ed4(0x151));}catch(_0x4ade68){if(_0x132afb['pYMjr'](_0x4ade68['respo'+_0x3a6ed4(0x133)]?.[_0x3a6ed4(0x11e)+'s'],0xc8)||_0x4ade68[_0x3a6ed4(0xfc)+_0x3a6ed4(0x133)]?.['statu'+'s']===0xc9)return{'id':_0x3a6ed4(0xf4)+_0x3a6ed4(0x134)+Date['now'](),'comment':_0x863be0,'comment_text':_0x863be0,'user':{'id':0x0,'username':_0x3a6ed4(0x140)+'wn','email':'','color':''},'date':new Date()[_0x3a6ed4(0x13a)+_0x3a6ed4(0xfb)+'g'](),'resolved':![]};throw this['core'][_0x3a6ed4(0x13c)+_0x3a6ed4(0x158)+'r'](_0x4ade68,_0x132afb['aWSNq']);}}async['getCo'+'mment'+'Repli'+'es'](_0x5efeb1){const _0x3115a4=a0_0x4d2e58,_0x528c12={'PNZoG':_0x3115a4(0x141)+'mment'+_0x3115a4(0x142)+'es','ATveT':_0x3115a4(0x115)+'d\x20to\x20'+_0x3115a4(0x122)+_0x3115a4(0x123)+_0x3115a4(0x156)+_0x3115a4(0xfd)};this['core'][_0x3115a4(0x150)+_0x3115a4(0x14c)+'on'](_0x528c12['PNZoG'],{'commentId':_0x5efeb1});try{return await this[_0x3115a4(0x104)][_0x3115a4(0x109)+_0x3115a4(0x102)+'t'](async()=>{const _0x36d697=_0x3115a4,_0x225489=await this['core']['clien'+'t']['get']('/comm'+_0x36d697(0x106)+_0x5efeb1+(_0x36d697(0x148)+'y'));return _0x225489[_0x36d697(0x114)][_0x36d697(0xe8)+_0x36d697(0x121)]||[];});}catch(_0x1e7b49){throw this[_0x3115a4(0x104)]['handl'+'eErro'+'r'](_0x1e7b49,_0x528c12[_0x3115a4(0x101)]);}}async[a0_0x4d2e58(0x12c)+a0_0x4d2e58(0xff)+'Comme'+'nt'](_0x226fbc,_0x2098ab,_0x5d52d8,_0x4f6b7a){const _0x70f724=a0_0x4d2e58,_0x58c82f={'uwjKe':'updat'+_0x70f724(0xff)+_0x70f724(0x144)+'nt','oEtKW':function(_0xfcf0c1,_0x9b8755){return _0xfcf0c1!==_0x9b8755;},'tANvT':function(_0x3fd4f1,_0x3c238b){return _0x3fd4f1!==_0x3c238b;},'lDutc':function(_0x58a23f,_0x436749){return _0x58a23f!==_0x436749;}};this[_0x70f724(0x104)][_0x70f724(0x150)+_0x70f724(0x14c)+'on'](_0x58c82f[_0x70f724(0x135)],{'commentId':_0x226fbc,'commentText':_0x2098ab,'resolved':_0x5d52d8});try{const _0x42f875={};if(_0x58c82f[_0x70f724(0x15a)](_0x5d52d8,undefined))_0x42f875[_0x70f724(0x103)+'ved']=_0x5d52d8;if(_0x58c82f['tANvT'](_0x4f6b7a,undefined))_0x42f875[_0x70f724(0xe8)+'nt']=_0x4f6b7a;else _0x58c82f[_0x70f724(0xe2)](_0x2098ab,undefined)&&(_0x42f875[_0x70f724(0xe8)+_0x70f724(0x100)+'xt']=_0x2098ab);await this[_0x70f724(0x104)][_0x70f724(0x153)+'t']['put'](_0x70f724(0x145)+'ent/'+_0x226fbc,_0x42f875);}catch(_0x56bd73){throw this[_0x70f724(0x104)][_0x70f724(0x13c)+_0x70f724(0x158)+'r'](_0x56bd73,'Faile'+'d\x20to\x20'+_0x70f724(0x12c)+_0x70f724(0xf5)+'ment');}}async[a0_0x4d2e58(0xf7)+a0_0x4d2e58(0xff)+'Comme'+'nt'](_0x232712){const _0x460488=a0_0x4d2e58,_0x1cd134={'toBuW':_0x460488(0xf7)+_0x460488(0xff)+_0x460488(0x144)+'nt'};this[_0x460488(0x104)][_0x460488(0x150)+_0x460488(0x14c)+'on'](_0x1cd134[_0x460488(0x14e)],{'commentId':_0x232712});try{await this[_0x460488(0x104)][_0x460488(0x153)+'t'][_0x460488(0xf7)+'e'](_0x460488(0x145)+'ent/'+_0x232712);}catch(_0xd4953c){throw this['core'][_0x460488(0x13c)+_0x460488(0x158)+'r'](_0xd4953c,'Faile'+'d\x20to\x20'+_0x460488(0xf7)+_0x460488(0xf5)+_0x460488(0x131));}}async['creat'+'eComm'+a0_0x4d2e58(0x11a)+a0_0x4d2e58(0x12e)](_0x231639,_0x42194a,_0x2b364f=![],_0x401e8e,_0x538189){const _0x221076=a0_0x4d2e58,_0x450238={'UEazl':_0x221076(0x147)+_0x221076(0xeb)+'entRe'+'ply','YNtWb':function(_0xf28305,_0xdf8855){return _0xf28305===_0xdf8855;},'REgKO':_0x221076(0x140)+'wn'};this[_0x221076(0x104)][_0x221076(0x150)+_0x221076(0x14c)+'on'](_0x450238[_0x221076(0xe7)],{'commentId':_0x231639,'commentText':_0x42194a,'notifyAll':_0x2b364f,'assignee':_0x401e8e});try{const _0x18ec5d={'notify_all':_0x2b364f};if(_0x401e8e)_0x18ec5d['assig'+_0x221076(0x10a)]=_0x401e8e;if(_0x538189)_0x18ec5d[_0x221076(0xe8)+'nt']=_0x538189;else _0x42194a&&(_0x18ec5d[_0x221076(0xe8)+'nt_te'+'xt']=_0x42194a);const _0x41a668=await this[_0x221076(0x104)][_0x221076(0x153)+'t'][_0x221076(0xfa)](_0x221076(0x145)+_0x221076(0x106)+_0x231639+('/repl'+'y'),_0x18ec5d);if(_0x41a668[_0x221076(0x114)])return this[_0x221076(0xdf)+_0x221076(0x144)+'ntRes'+_0x221076(0xe1)](_0x41a668[_0x221076(0x114)],_0x42194a);throw new Error(_0x221076(0x11b)+_0x221076(0xf8)+'spons'+_0x221076(0xf2)+_0x221076(0x118)+_0x221076(0x11f)+_0x221076(0x151));}catch(_0x26bdda){if(_0x26bdda[_0x221076(0xfc)+'nse']?.['statu'+'s']===0xc8||_0x450238[_0x221076(0xe6)](_0x26bdda[_0x221076(0xfc)+_0x221076(0x133)]?.[_0x221076(0x11e)+'s'],0xc9))return{'id':_0x221076(0xf4)+_0x221076(0x134)+Date[_0x221076(0x12a)](),'comment':_0x42194a,'comment_text':_0x42194a,'user':{'id':0x0,'username':_0x450238[_0x221076(0x126)],'email':'','color':''},'date':new Date()[_0x221076(0x13a)+_0x221076(0xfb)+'g'](),'resolved':![]};throw this[_0x221076(0x104)][_0x221076(0x13c)+_0x221076(0x158)+'r'](_0x26bdda,'Faile'+'d\x20to\x20'+'creat'+_0x221076(0xf5)+_0x221076(0x14b)+_0x221076(0x138));}}async['addCo'+a0_0x4d2e58(0x108)+a0_0x4d2e58(0x120)+a0_0x4d2e58(0x13d)](_0x2173b6,_0x2005a5){const _0xdc480d=a0_0x4d2e58,_0x406824={'hbwhi':'addCo'+_0xdc480d(0x108)+_0xdc480d(0x120)+_0xdc480d(0x13d),'nYeQo':_0xdc480d(0x115)+_0xdc480d(0x146)+'add\x20r'+_0xdc480d(0x124)+_0xdc480d(0x152)+_0xdc480d(0xf9)+_0xdc480d(0x11d)};this['core'][_0xdc480d(0x150)+_0xdc480d(0x14c)+'on'](_0x406824[_0xdc480d(0x110)],{'commentId':_0x2173b6,'reaction':_0x2005a5});try{const _0x9cf24f=this['core'][_0xdc480d(0xf0)+'d'],_0x391940=this['core'][_0xdc480d(0xee)+'eUrl']+(_0xdc480d(0xf6)+'space'+'s/')+_0x9cf24f+(_0xdc480d(0x149)+_0xdc480d(0xef)+'ages/')+_0x2173b6+('/reac'+_0xdc480d(0x155));await this['core']['makeR'+_0xdc480d(0x102)+'t'](async()=>{const _0x2c3e62=_0xdc480d;await this[_0x2c3e62(0x104)]['clien'+'t'][_0x2c3e62(0xfa)](_0x391940,{'reaction':_0x2005a5});});}catch(_0x52b5b0){throw this[_0xdc480d(0x104)][_0xdc480d(0x13c)+_0xdc480d(0x158)+'r'](_0x52b5b0,_0x406824[_0xdc480d(0xe9)]);}}async[a0_0x4d2e58(0xe5)+'eComm'+'entRe'+'actio'+'n'](_0x4fe567,_0x1e4f17){const _0x542a38=a0_0x4d2e58,_0x29118e={'UxKfc':_0x542a38(0xe5)+_0x542a38(0xeb)+_0x542a38(0x11a)+_0x542a38(0x119)+'n','KDzKy':'Faile'+'d\x20to\x20'+_0x542a38(0xe5)+_0x542a38(0xf3)+'ction'+'\x20from'+_0x542a38(0xf9)+_0x542a38(0x11d)};this[_0x542a38(0x104)][_0x542a38(0x150)+_0x542a38(0x14c)+'on'](_0x29118e[_0x542a38(0x15b)],{'commentId':_0x4fe567,'reaction':_0x1e4f17});try{const _0x4c03ca=this[_0x542a38(0x104)][_0x542a38(0xf0)+'d'],_0x2adb14=encodeURIComponent(_0x1e4f17),_0x23bd9e=this[_0x542a38(0x104)]['v3Bas'+'eUrl']+(_0x542a38(0xf6)+_0x542a38(0x129)+'s/')+_0x4c03ca+(_0x542a38(0x149)+_0x542a38(0xef)+_0x542a38(0x14f))+_0x4fe567+(_0x542a38(0x13f)+_0x542a38(0x155)+'/')+_0x2adb14;await this['core'][_0x542a38(0x109)+'eques'+'t'](async()=>{const _0x1a8b1f=_0x542a38;await this[_0x1a8b1f(0x104)][_0x1a8b1f(0x153)+'t'][_0x1a8b1f(0xf7)+'e'](_0x23bd9e);});}catch(_0x2aa318){throw this['core'][_0x542a38(0x13c)+'eErro'+'r'](_0x2aa318,_0x29118e['KDzKy']);}}}