@connection-hub/sdk
Version:
SDK oficial para a API do Connection Hub
1 lines • 6.88 kB
JavaScript
'use strict';const _0x5687c2=_0x4b57;(function(_0x10c295,_0x51085b){const _0x56c4a4=_0x4b57,_0x5c981b=_0x10c295();while(!![]){try{const _0xed7a3c=parseInt(_0x56c4a4(0x179))/(-0x2122+-0x116f+0x1*0x3292)+-parseInt(_0x56c4a4(0x18e))/(0x5be+-0xa85+0x4c9)*(parseInt(_0x56c4a4(0x1b0))/(-0x1d33*0x1+-0x4*-0x235+0x1462))+-parseInt(_0x56c4a4(0x1a9))/(-0xd7f+0x1a14+-0xc91)+-parseInt(_0x56c4a4(0x190))/(0x1ca2+0xcbb*-0x1+-0xfe2)*(-parseInt(_0x56c4a4(0x19f))/(-0x1cb4+-0x20f3+0x3*0x148f))+-parseInt(_0x56c4a4(0x188))/(0x7*0x511+-0x1*-0x11c3+-0x3533)+parseInt(_0x56c4a4(0x18b))/(0x1115+0x8*-0x311+0x5*0x17f)+parseInt(_0x56c4a4(0x17c))/(0x10ff*0x2+0x409*0x6+-0x3a2b);if(_0xed7a3c===_0x51085b)break;else _0x5c981b['push'](_0x5c981b['shift']());}catch(_0x2acb7f){_0x5c981b['push'](_0x5c981b['shift']());}}}(_0x4708,0x915+0x5abf+0x731c2));const axios=require(_0x5687c2(0x18c)),AuthServiceModule=require(_0x5687c2(0x16c)),MessagingServiceModule=require(_0x5687c2(0x173)+_0x5687c2(0x1aa)),WebhookServiceModule=require(_0x5687c2(0x1b9)+_0x5687c2(0x1a0)),ConnectionServiceModule=require(_0x5687c2(0x196)+_0x5687c2(0x17d));class ConnectionHubClient{constructor(_0x2eaa29){const _0x4e7cbf=_0x5687c2,_0x1536de={};_0x1536de[_0x4e7cbf(0x1b5)]=_0x4e7cbf(0x17b)+_0x4e7cbf(0x184)+_0x4e7cbf(0x194),_0x1536de[_0x4e7cbf(0x174)]=_0x4e7cbf(0x189)+_0x4e7cbf(0x178),_0x1536de[_0x4e7cbf(0x170)]=_0x4e7cbf(0x1b4)+_0x4e7cbf(0x186),_0x1536de[_0x4e7cbf(0x1a8)]=_0x4e7cbf(0x1ba)+_0x4e7cbf(0x17a)+_0x4e7cbf(0x1a6)+'br';const _0x132f4b=_0x1536de;this[_0x4e7cbf(0x18f)+_0x4e7cbf(0x1a4)]=![],this[_0x4e7cbf(0x1a7)+_0x4e7cbf(0x1c0)]=null;if(!_0x2eaa29[_0x4e7cbf(0x183)+'n'])throw new Error(_0x132f4b[_0x4e7cbf(0x1b5)]);this[_0x4e7cbf(0x191)]=_0x2eaa29;const _0x22b6d0={};_0x22b6d0[_0x4e7cbf(0x1bd)+'pe']=_0x132f4b[_0x4e7cbf(0x174)];const _0xa5a74d=_0x22b6d0;_0x2eaa29[_0x4e7cbf(0x183)+'n']&&(_0xa5a74d[_0x132f4b[_0x4e7cbf(0x170)]]=_0x4e7cbf(0x19a)+_0x2eaa29[_0x4e7cbf(0x183)+'n']);const _0x35089e={};_0x35089e[_0x4e7cbf(0x16e)]=_0x2eaa29[_0x4e7cbf(0x1b8)]||_0x132f4b[_0x4e7cbf(0x1a8)],_0x35089e[_0x4e7cbf(0x176)]=_0xa5a74d,this[_0x4e7cbf(0x16a)]=axios[_0x4e7cbf(0x1b7)](_0x35089e),this[_0x4e7cbf(0x18d)]=new AuthServiceModule[(_0x4e7cbf(0x1ad))+'e'](this[_0x4e7cbf(0x16a)],this),this[_0x4e7cbf(0x1ab)]=new MessagingServiceModule[(_0x4e7cbf(0x1a5))+(_0x4e7cbf(0x1bf))](this[_0x4e7cbf(0x16a)],this),this[_0x4e7cbf(0x197)]=new WebhookServiceModule[(_0x4e7cbf(0x1b6))+(_0x4e7cbf(0x17f))](this[_0x4e7cbf(0x16a)],this),this[_0x4e7cbf(0x180)+'s']=new ConnectionServiceModule[(_0x4e7cbf(0x19b))+(_0x4e7cbf(0x1bb))](this[_0x4e7cbf(0x16a)],this),this[_0x4e7cbf(0x1a7)+_0x4e7cbf(0x1c0)]=this[_0x4e7cbf(0x169)+_0x4e7cbf(0x175)]();}async[_0x5687c2(0x169)+_0x5687c2(0x175)](){const _0x50a376=_0x5687c2,_0x4151b7={'nRKQE':_0x50a376(0x18a)+_0x50a376(0x1a2),'KAazj':function(_0x5e118b,_0x17fa78){return _0x5e118b===_0x17fa78;},'fqadh':function(_0x261b55,_0xc3cd0d){return _0x261b55(_0xc3cd0d);},'nSLXV':function(_0x3422f2,_0x3737f5){return _0x3422f2===_0x3737f5;}};try{if(this[_0x50a376(0x1a7)+_0x50a376(0x1c0)])return this[_0x50a376(0x1a7)+_0x50a376(0x1c0)];return this[_0x50a376(0x1a7)+_0x50a376(0x1c0)]=new Promise(async _0x317cd1=>{const _0x251dac=_0x50a376;try{const _0x2582e0=await this[_0x251dac(0x16a)][_0x251dac(0x193)](_0x4151b7[_0x251dac(0x17e)]);this[_0x251dac(0x18f)+_0x251dac(0x1a4)]=_0x4151b7[_0x251dac(0x19d)](_0x2582e0[_0x251dac(0x1ac)][_0x251dac(0x172)],!![]),_0x4151b7[_0x251dac(0x1ae)](_0x317cd1,this[_0x251dac(0x18f)+_0x251dac(0x1a4)]);}catch(_0x20e9d2){_0x4151b7[_0x251dac(0x19d)](_0x20e9d2[_0x251dac(0x199)]?.[_0x251dac(0x1be)],0x2*0xe7b+0x99*-0x13+0x1*-0x100a)||_0x4151b7[_0x251dac(0x16b)](_0x20e9d2[_0x251dac(0x199)]?.[_0x251dac(0x1be)],0x205a+-0x1a41+0x1*-0x486)?(this[_0x251dac(0x18f)+_0x251dac(0x1a4)]=![],_0x4151b7[_0x251dac(0x1ae)](_0x317cd1,![])):(this[_0x251dac(0x18f)+_0x251dac(0x1a4)]=![],_0x4151b7[_0x251dac(0x1ae)](_0x317cd1,![]));}finally{this[_0x251dac(0x1a7)+_0x251dac(0x1c0)]=null;}}),this[_0x50a376(0x1a7)+_0x50a376(0x1c0)];}catch(_0x46e0bc){return this[_0x50a376(0x18f)+_0x50a376(0x1a4)]=![],![];}}[_0x5687c2(0x1b3)+_0x5687c2(0x1a1)+'ed'](){const _0x4fd7d2=_0x5687c2;return this[_0x4fd7d2(0x18f)+_0x4fd7d2(0x1a4)];}[_0x5687c2(0x1a3)+_0x5687c2(0x1c1)](_0x10e185=!![]){const _0x2dffc2=_0x5687c2,_0x59a706={};_0x59a706[_0x2dffc2(0x177)]=_0x2dffc2(0x185)+_0x2dffc2(0x1c2)+_0x2dffc2(0x181)+_0x2dffc2(0x1af)+_0x2dffc2(0x171)+_0x2dffc2(0x1b1)+_0x2dffc2(0x182)+_0x2dffc2(0x198)+_0x2dffc2(0x195)+'.';const _0x330336=_0x59a706;if(!this[_0x2dffc2(0x18f)+_0x2dffc2(0x1a4)]&&_0x10e185)throw new Error(_0x330336[_0x2dffc2(0x177)]);return this[_0x2dffc2(0x18f)+_0x2dffc2(0x1a4)];}async[_0x5687c2(0x1bc)+_0x5687c2(0x192)](){const _0x6ca18f=_0x5687c2;if(this[_0x6ca18f(0x1a7)+_0x6ca18f(0x1c0)])return this[_0x6ca18f(0x1a7)+_0x6ca18f(0x1c0)];if(this[_0x6ca18f(0x18f)+_0x6ca18f(0x1a4)])return!![];return this[_0x6ca18f(0x169)+_0x6ca18f(0x175)]();}[_0x5687c2(0x16f)+_0x5687c2(0x19c)](_0x53637b){const _0x2d57b1=_0x5687c2,_0x5d5a66={};_0x5d5a66[_0x2d57b1(0x19e)]=_0x2d57b1(0x1b4)+_0x2d57b1(0x186);const _0x2ffda0=_0x5d5a66;this[_0x2d57b1(0x191)][_0x2d57b1(0x183)+'n']=_0x53637b,this[_0x2d57b1(0x16a)][_0x2d57b1(0x16d)][_0x2d57b1(0x176)][_0x2ffda0[_0x2d57b1(0x19e)]]=_0x2d57b1(0x19a)+_0x53637b,this[_0x2d57b1(0x18f)+_0x2d57b1(0x1a4)]=![],this[_0x2d57b1(0x1a7)+_0x2d57b1(0x1c0)]=this[_0x2d57b1(0x169)+_0x2d57b1(0x175)]();}}function _0x4708(){const _0x58311b=['Connection','oken','KAazj','fQlah','10110qsvnTg','ooks','alsValidat','date','canExecute','sValidated','MessagingS','onhub.com.','validation','YYOQZ','574140QuWzUi','aging','messaging','data','AuthServic','fqadh','tamente.\x20A','6ehODSB','ais\x20não\x20fo','HubClient','isCredenti','Authorizat','MiXwz','WebhookSer','create','apiUrl','./lib/webh','https://ap','Service','waitForVal','Content-Ty','status','ervice','Promise','Operations','o\x20iniciali','validateCr','api','nSLXV','./lib/auth','defaults','baseURL','setAccessT','ZPVgM','s\x20credenci','success','./lib/mess','xcfQq','edentials','headers','VEYoO','n/json','49492kHGVan','i.connecti','AccessToke','5782626RRqAxt','ections','nRKQE','vice','connection','zado\x20corre','ram\x20valida','accessToke','n\x20é\x20obriga','Cliente\x20nã','ion','exports','63182saevhA','applicatio','/auth/vali','1886920KNIhkr','axios','auth','881494bfaSjn','credential','1790fuFzIm','config','idation','get','tório','\x20inválidas','./lib/conn','webhooks','das\x20ou\x20são','response','Bearer\x20'];_0x4708=function(){return _0x58311b;};return _0x4708();}const _0x27272e={};function _0x4b57(_0x13e656,_0x3c0606){const _0x2bd359=_0x4708();return _0x4b57=function(_0x74c0b2,_0xcc2498){_0x74c0b2=_0x74c0b2-(-0x263b*-0x1+0x1580+-0x3a52);let _0xdec86a=_0x2bd359[_0x74c0b2];return _0xdec86a;},_0x4b57(_0x13e656,_0x3c0606);}_0x27272e[_0x5687c2(0x19b)+_0x5687c2(0x1b2)]=ConnectionHubClient,module[_0x5687c2(0x187)]=_0x27272e;