@searchability/admin-client 0.0.14 → 0.0.15

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.
@@ -0,0 +1,17 @@
1
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x35ea30,_0x8f6d1a,_0x5cab08,_0x138c90){function _0x4c817e(_0x2cbc4e){return _0x2cbc4e instanceof _0x5cab08?_0x2cbc4e:new _0x5cab08(function(_0x52d1a1){_0x52d1a1(_0x2cbc4e);});}return new(_0x5cab08||(_0x5cab08=Promise))(function(_0x3dd53e,_0x4021d7){function _0x4149cb(_0x3f20d0){try{_0x98664(_0x138c90['next'](_0x3f20d0));}catch(_0xd7500f){_0x4021d7(_0xd7500f);}}function _0x22ec3c(_0x1befda){try{_0x98664(_0x138c90['throw'](_0x1befda));}catch(_0x40ec27){_0x4021d7(_0x40ec27);}}function _0x98664(_0x2cdf1a){_0x2cdf1a['done']?_0x3dd53e(_0x2cdf1a['value']):_0x4c817e(_0x2cdf1a['value'])['then'](_0x4149cb,_0x22ec3c);}_0x98664((_0x138c90=_0x138c90['apply'](_0x35ea30,_0x8f6d1a||[]))['next']());});};class Fetch{constructor(_0x3fd208){this['baseUri']=_0x3fd208,this['getUrl']=_0x48ea22=>{return _0x48ea22['startsWith']('/')&&(_0x48ea22=_0x48ea22['replace']('/','')),''+this['baseUri']+_0x48ea22;},!_0x3fd208['endsWith']('/')&&(_0x3fd208=_0x3fd208+'/');}['get'](_0x109c44,_0x179457){return __awaiter$4(this,void 0,void 0,function*(){const _0x1995c2=this['getUrl'](_0x109c44);return yield fetch(_0x1995c2,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x179457}});});}['post'](_0x17e40c,_0x3515a4,_0x514613){return __awaiter$4(this,void 0,void 0,function*(){const _0x3a80d6=this['getUrl'](_0x17e40c);return yield fetch(_0x3a80d6,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3515a4},'body':_0x514613?JSON['stringify'](_0x514613):null});});}['put'](_0x4a2812,_0x3e160b,_0x4e10e7){return __awaiter$4(this,void 0,void 0,function*(){const _0x4469a1=this['getUrl'](_0x4a2812);return yield fetch(_0x4469a1,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3e160b},'body':_0x4e10e7?JSON['stringify'](_0x4e10e7):null});});}['delete'](_0x19b1f0,_0x2f0fcf){return __awaiter$4(this,void 0,void 0,function*(){const _0xdf286d=this['getUrl'](_0x19b1f0);return yield fetch(_0xdf286d,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2f0fcf}});});}}
2
+
3
+ undefined&&undefined['__awaiter']||function(_0x2c6747,_0x5c9f8e,_0xfd1f19,_0x41f26e){function _0x490a85(_0x110bcc){return _0x110bcc instanceof _0xfd1f19?_0x110bcc:new _0xfd1f19(function(_0x42a8b7){_0x42a8b7(_0x110bcc);});}return new(_0xfd1f19||(_0xfd1f19=Promise))(function(_0x42b56c,_0x1d02db){function _0x24160c(_0x56816e){try{_0x3b595a(_0x41f26e['next'](_0x56816e));}catch(_0x408176){_0x1d02db(_0x408176);}}function _0x231d88(_0x2b4635){try{_0x3b595a(_0x41f26e['throw'](_0x2b4635));}catch(_0x2d0f01){_0x1d02db(_0x2d0f01);}}function _0x3b595a(_0x5de2a3){_0x5de2a3['done']?_0x42b56c(_0x5de2a3['value']):_0x490a85(_0x5de2a3['value'])['then'](_0x24160c,_0x231d88);}_0x3b595a((_0x41f26e=_0x41f26e['apply'](_0x2c6747,_0x5c9f8e||[]))['next']());});};
4
+
5
+ class Response{constructor(_0x403d20){this['isSuccess']=_0x403d20;}}class SuccessfulAccountResponse extends Response{constructor(_0x3ec9c1){super(!![]),this['account']=_0x3ec9c1;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x219623){super(![]),this['problem']=_0x219623;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x23350){super(!![]),this['tokens']=_0x23350;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x2ed39f){super(![]),this['problem']=_0x2ed39f;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x4ba93c){super(!![]),this['apiKey']=_0x4ba93c;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x34d97f){super(![]),this['problem']=_0x34d97f;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
6
+
7
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x1affa8,_0x3b0a9,_0x2920c2,_0x1808b0){function _0x3e426d(_0x48a0cd){return _0x48a0cd instanceof _0x2920c2?_0x48a0cd:new _0x2920c2(function(_0x9acd01){_0x9acd01(_0x48a0cd);});}return new(_0x2920c2||(_0x2920c2=Promise))(function(_0x3e846d,_0x2e7a7e){function _0xc39f2c(_0x339d98){try{_0x2b81fe(_0x1808b0['next'](_0x339d98));}catch(_0x466e4e){_0x2e7a7e(_0x466e4e);}}function _0x24fa69(_0x5574a3){try{_0x2b81fe(_0x1808b0['throw'](_0x5574a3));}catch(_0x2b6384){_0x2e7a7e(_0x2b6384);}}function _0x2b81fe(_0x35bae6){_0x35bae6['done']?_0x3e846d(_0x35bae6['value']):_0x3e426d(_0x35bae6['value'])['then'](_0xc39f2c,_0x24fa69);}_0x2b81fe((_0x1808b0=_0x1808b0['apply'](_0x1affa8,_0x3b0a9||[]))['next']());});};class AccountService{constructor(_0x24bed3,_0x58c5f8){this['tokenManager']=_0x24bed3,this['fetch']=_0x58c5f8;}['get'](_0x570fd5,_0x5847e5){return __awaiter$3(this,void 0,void 0,function*(){const _0x401e57=yield this['tokenManager']['getOrRefreshTokens'](_0x5847e5);if(!_0x401e57['isSuccess'])return new FailedAccountResponse(_0x401e57['toProblem']());_0x5847e5=_0x401e57['toSuccess']();const _0x525e3a='Account/'+_0x570fd5+'/',_0x1d3fc3=yield this['fetch']['get'](_0x525e3a,_0x5847e5['access_token']);try{if(_0x1d3fc3['status']>0xc7&&_0x1d3fc3['status']<0x12c){const _0x29b0d3=yield _0x1d3fc3['json']();return new SuccessfulAccountResponse(_0x29b0d3);}const _0x559542=yield _0x1d3fc3['json']();return new FailedAccountResponse(_0x559542);}catch(_0x11b97f){if(_0x11b97f instanceof Error)return new FailedAccountResponse({'detail':_0x11b97f['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x11b97f;}});}}
8
+
9
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x5f292c,_0x8882f,_0x29fead,_0x4482ad){function _0x47c117(_0x3c17ba){return _0x3c17ba instanceof _0x29fead?_0x3c17ba:new _0x29fead(function(_0x46f87d){_0x46f87d(_0x3c17ba);});}return new(_0x29fead||(_0x29fead=Promise))(function(_0x492f98,_0x3663fc){function _0x31d94b(_0x1022b2){try{_0x1ff4da(_0x4482ad['next'](_0x1022b2));}catch(_0x45c8e1){_0x3663fc(_0x45c8e1);}}function _0x5c970b(_0x39caeb){try{_0x1ff4da(_0x4482ad['throw'](_0x39caeb));}catch(_0xc08e27){_0x3663fc(_0xc08e27);}}function _0x1ff4da(_0x4906a6){_0x4906a6['done']?_0x492f98(_0x4906a6['value']):_0x47c117(_0x4906a6['value'])['then'](_0x31d94b,_0x5c970b);}_0x1ff4da((_0x4482ad=_0x4482ad['apply'](_0x5f292c,_0x8882f||[]))['next']());});};class ApiKeyService{constructor(_0x4bab11,_0x34d012){this['tokenManager']=_0x4bab11,this['fetch']=_0x34d012;}['create'](_0x21ce6d,_0x2f1de7,_0x4a3257){return __awaiter$2(this,void 0,void 0,function*(){const _0x151cfb=yield this['tokenManager']['getOrRefreshTokens'](_0x4a3257);if(!_0x151cfb['isSuccess'])return new FailedApiKeyResponse(_0x151cfb['toProblem']());_0x4a3257=_0x151cfb['toSuccess']();const _0xc260fb='ApiKey/Create',_0x4935e3={'account_name':_0x21ce6d,'name':_0x2f1de7};try{const _0x180616=yield this['fetch']['post'](_0xc260fb,_0x4a3257['access_token'],_0x4935e3);if(_0x180616['status']>0xc7&&_0x180616['status']<0x12c){const _0x30a37f=yield _0x180616['json']();return new SuccessfulApiKeyResponse(_0x30a37f);}const _0x1497bf=yield _0x180616['json']();return new FailedApiKeyResponse(_0x1497bf);}catch(_0x382af8){if(_0x382af8 instanceof Error)return new FailedApiKeyResponse({'detail':_0x382af8['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x382af8;}});}}
10
+
11
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x262b6c,_0x40eca1,_0x392c3b,_0x154cd7){function _0x21313d(_0x2edc4d){return _0x2edc4d instanceof _0x392c3b?_0x2edc4d:new _0x392c3b(function(_0xf333ad){_0xf333ad(_0x2edc4d);});}return new(_0x392c3b||(_0x392c3b=Promise))(function(_0x18982c,_0x5a5e44){function _0x27c33c(_0x2711a6){try{_0x283967(_0x154cd7['next'](_0x2711a6));}catch(_0x47849f){_0x5a5e44(_0x47849f);}}function _0x411be5(_0x5c35bb){try{_0x283967(_0x154cd7['throw'](_0x5c35bb));}catch(_0x44aab6){_0x5a5e44(_0x44aab6);}}function _0x283967(_0x210ed0){_0x210ed0['done']?_0x18982c(_0x210ed0['value']):_0x21313d(_0x210ed0['value'])['then'](_0x27c33c,_0x411be5);}_0x283967((_0x154cd7=_0x154cd7['apply'](_0x262b6c,_0x40eca1||[]))['next']());});};class ListService{constructor(_0x4dafef,_0x513426){this['tokenManager']=_0x4dafef,this['fetch']=_0x513426;}['add'](_0x16f76e,_0x5ad6fc,_0x4d387a){return __awaiter$1(this,void 0,void 0,function*(){const _0x5612df=yield this['tokenManager']['getOrRefreshTokens'](_0x4d387a);if(!_0x5612df['isSuccess'])return new FailedAccountResponse(_0x5612df['toProblem']());_0x4d387a=_0x5612df['toSuccess']();const _0x57aa7a='List',_0x2d19f5={'account_name':_0x16f76e,'list_name':_0x5ad6fc};try{const _0xb367ea=yield this['fetch']['post'](_0x57aa7a,_0x4d387a['access_token'],_0x2d19f5);if(_0xb367ea['status']>0xc7&&_0xb367ea['status']<0x12c){const _0x523bed=yield _0xb367ea['json']();return new SuccessfulAccountResponse(_0x523bed);}const _0x3ac874=yield _0xb367ea['json']();return new FailedAccountResponse(_0x3ac874);}catch(_0x534ee9){if(_0x534ee9 instanceof Error)return new FailedAccountResponse({'detail':_0x534ee9['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x534ee9;}});}['remove'](_0x3c3a6a,_0x5a0f6a,_0x5b3f83){return __awaiter$1(this,void 0,void 0,function*(){const _0x395947=yield this['tokenManager']['getOrRefreshTokens'](_0x5b3f83);if(!_0x395947['isSuccess'])return new FailedAccountResponse(_0x395947['toProblem']());_0x5b3f83=_0x395947['toSuccess']();const _0x10f45c='List/'+_0x3c3a6a+'/'+_0x5a0f6a,_0x22b021=yield this['fetch']['delete'](_0x10f45c,_0x5b3f83['access_token']);try{if(_0x22b021['status']>0xc7&&_0x22b021['status']<0x12c){const _0xcdc476=yield _0x22b021['json']();return new SuccessfulAccountResponse(_0xcdc476);}const _0x413007=yield _0x22b021['json']();return new FailedAccountResponse(_0x413007);}catch(_0x4e6946){if(_0x4e6946 instanceof Error)return new FailedAccountResponse({'detail':_0x4e6946['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x4e6946;}});}}
12
+
13
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x3529a1,_0x195f21,_0x1a4bb8,_0x2e85ef){function _0x1a4c31(_0x25ad88){return _0x25ad88 instanceof _0x1a4bb8?_0x25ad88:new _0x1a4bb8(function(_0x2b2a81){_0x2b2a81(_0x25ad88);});}return new(_0x1a4bb8||(_0x1a4bb8=Promise))(function(_0x21c7d7,_0x3c8c2a){function _0x1e2935(_0x3bb09c){try{_0x474f05(_0x2e85ef['next'](_0x3bb09c));}catch(_0x563c82){_0x3c8c2a(_0x563c82);}}function _0x488e5b(_0x235f09){try{_0x474f05(_0x2e85ef['throw'](_0x235f09));}catch(_0x261c75){_0x3c8c2a(_0x261c75);}}function _0x474f05(_0x58899c){_0x58899c['done']?_0x21c7d7(_0x58899c['value']):_0x1a4c31(_0x58899c['value'])['then'](_0x1e2935,_0x488e5b);}_0x474f05((_0x2e85ef=_0x2e85ef['apply'](_0x3529a1,_0x195f21||[]))['next']());});};class TokenManager{constructor(_0x433358){this['authClient']=_0x433358;}['getOrRefreshTokens'](_0x15b708){return __awaiter(this,void 0,void 0,function*(){if(Date['now']()<_0x15b708['access_expires'])return new SuccessfulAuthResponse(_0x15b708);if(Date['now']()>_0x15b708['refresh_expires'])return yield this['authClient']['refresh'](_0x15b708['refresh_token']);return new FailedAuthResponse({'detail':'Refresh\x20token\x20expired','title':'','status':0x194,'instance':'','type':''});});}}
14
+
15
+ class AdminClient{constructor(_0x5f4113,_0x439daa='https://admin.searchability.dev/'){var _0x50bf9c=new TokenManager(_0x5f4113),_0x4677db=new Fetch(_0x439daa);this['Accounts']=new AccountService(_0x50bf9c,_0x4677db),this['Lists']=new ListService(_0x50bf9c,_0x4677db),this['ApiKeys']=new ApiKeyService(_0x50bf9c,_0x4677db);}}
16
+
17
+ export { AdminClient as default };
@@ -1,19 +1,19 @@
1
1
  'use strict';
2
2
 
3
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x360201,_0x8db91f,_0x1c1172,_0x191151){function _0x291c78(_0x42e2cd){return _0x42e2cd instanceof _0x1c1172?_0x42e2cd:new _0x1c1172(function(_0x5dcda7){_0x5dcda7(_0x42e2cd);});}return new(_0x1c1172||(_0x1c1172=Promise))(function(_0x41ca28,_0x3818ff){function _0x2238cd(_0x568128){try{_0x5f2100(_0x191151['next'](_0x568128));}catch(_0x42ad9c){_0x3818ff(_0x42ad9c);}}function _0x12f5d5(_0x41d640){try{_0x5f2100(_0x191151['throw'](_0x41d640));}catch(_0xe8cf79){_0x3818ff(_0xe8cf79);}}function _0x5f2100(_0x44cf5a){_0x44cf5a['done']?_0x41ca28(_0x44cf5a['value']):_0x291c78(_0x44cf5a['value'])['then'](_0x2238cd,_0x12f5d5);}_0x5f2100((_0x191151=_0x191151['apply'](_0x360201,_0x8db91f||[]))['next']());});};class Fetch{constructor(_0x385a43){this['baseUri']=_0x385a43,this['getUrl']=_0x5b0bfa=>{return _0x5b0bfa['startsWith']('/')&&(_0x5b0bfa=_0x5b0bfa['replace']('/','')),''+this['baseUri']+_0x5b0bfa;},!_0x385a43['endsWith']('/')&&(_0x385a43=_0x385a43+'/');}['get'](_0x10f44c,_0x16c3cc){return __awaiter$4(this,void 0,void 0,function*(){const _0x342ee7=this['getUrl'](_0x10f44c);return yield fetch(_0x342ee7,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x16c3cc}});});}['post'](_0x221f05,_0x1bbe47,_0x3e3176){return __awaiter$4(this,void 0,void 0,function*(){const _0x57050d=this['getUrl'](_0x221f05);return yield fetch(_0x57050d,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1bbe47},'body':_0x3e3176?JSON['stringify'](_0x3e3176):null});});}['put'](_0x508bdd,_0x5352e1,_0x53d103){return __awaiter$4(this,void 0,void 0,function*(){const _0x319d7c=this['getUrl'](_0x508bdd);return yield fetch(_0x319d7c,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x5352e1},'body':_0x53d103?JSON['stringify'](_0x53d103):null});});}['delete'](_0xf649f5,_0x334692){return __awaiter$4(this,void 0,void 0,function*(){const _0x152604=this['getUrl'](_0xf649f5);return yield fetch(_0x152604,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x334692}});});}}
3
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x40557c,_0x4eb2b0,_0xca3c2c,_0x451241){function _0x4a822d(_0x241bb9){return _0x241bb9 instanceof _0xca3c2c?_0x241bb9:new _0xca3c2c(function(_0x518759){_0x518759(_0x241bb9);});}return new(_0xca3c2c||(_0xca3c2c=Promise))(function(_0x3ef87b,_0x5a7b20){function _0x543178(_0x50fd99){try{_0x433bc6(_0x451241['next'](_0x50fd99));}catch(_0x379645){_0x5a7b20(_0x379645);}}function _0x107f1f(_0x27bbee){try{_0x433bc6(_0x451241['throw'](_0x27bbee));}catch(_0x484469){_0x5a7b20(_0x484469);}}function _0x433bc6(_0x16186e){_0x16186e['done']?_0x3ef87b(_0x16186e['value']):_0x4a822d(_0x16186e['value'])['then'](_0x543178,_0x107f1f);}_0x433bc6((_0x451241=_0x451241['apply'](_0x40557c,_0x4eb2b0||[]))['next']());});};class Fetch{constructor(_0x49e642){this['baseUri']=_0x49e642,this['getUrl']=_0x80ff4a=>{return _0x80ff4a['startsWith']('/')&&(_0x80ff4a=_0x80ff4a['replace']('/','')),''+this['baseUri']+_0x80ff4a;},!_0x49e642['endsWith']('/')&&(_0x49e642=_0x49e642+'/');}['get'](_0x5adffd,_0xa33c6b){return __awaiter$4(this,void 0,void 0,function*(){const _0x512ff4=this['getUrl'](_0x5adffd);return yield fetch(_0x512ff4,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0xa33c6b}});});}['post'](_0x24c3d9,_0x308df7,_0x417b9f){return __awaiter$4(this,void 0,void 0,function*(){const _0x141ac2=this['getUrl'](_0x24c3d9);return yield fetch(_0x141ac2,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x308df7},'body':_0x417b9f?JSON['stringify'](_0x417b9f):null});});}['put'](_0x5dbdfa,_0x4188da,_0x3a8d6f){return __awaiter$4(this,void 0,void 0,function*(){const _0x121e4f=this['getUrl'](_0x5dbdfa);return yield fetch(_0x121e4f,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4188da},'body':_0x3a8d6f?JSON['stringify'](_0x3a8d6f):null});});}['delete'](_0x476d4b,_0x363449){return __awaiter$4(this,void 0,void 0,function*(){const _0x4d3ce3=this['getUrl'](_0x476d4b);return yield fetch(_0x4d3ce3,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x363449}});});}}
4
4
 
5
- undefined&&undefined['__awaiter']||function(_0x469a10,_0x44213b,_0x205add,_0x3235dd){function _0x3052bf(_0x28f402){return _0x28f402 instanceof _0x205add?_0x28f402:new _0x205add(function(_0x189fa9){_0x189fa9(_0x28f402);});}return new(_0x205add||(_0x205add=Promise))(function(_0x4093ba,_0x1996c4){function _0x2e715d(_0x959255){try{_0x2eead7(_0x3235dd['next'](_0x959255));}catch(_0x3fdb90){_0x1996c4(_0x3fdb90);}}function _0x350e88(_0x125af8){try{_0x2eead7(_0x3235dd['throw'](_0x125af8));}catch(_0x54beb0){_0x1996c4(_0x54beb0);}}function _0x2eead7(_0x14253e){_0x14253e['done']?_0x4093ba(_0x14253e['value']):_0x3052bf(_0x14253e['value'])['then'](_0x2e715d,_0x350e88);}_0x2eead7((_0x3235dd=_0x3235dd['apply'](_0x469a10,_0x44213b||[]))['next']());});};
5
+ undefined&&undefined['__awaiter']||function(_0x3d5721,_0x9991d8,_0x579d02,_0x2ebf90){function _0x5aaacd(_0x15b5d6){return _0x15b5d6 instanceof _0x579d02?_0x15b5d6:new _0x579d02(function(_0x53e9fb){_0x53e9fb(_0x15b5d6);});}return new(_0x579d02||(_0x579d02=Promise))(function(_0x5d3c14,_0x4b4eeb){function _0x9a42f6(_0x1d339e){try{_0x2b19f2(_0x2ebf90['next'](_0x1d339e));}catch(_0x145840){_0x4b4eeb(_0x145840);}}function _0x1ba21e(_0x4d6e3a){try{_0x2b19f2(_0x2ebf90['throw'](_0x4d6e3a));}catch(_0x3d51d4){_0x4b4eeb(_0x3d51d4);}}function _0x2b19f2(_0x512fe9){_0x512fe9['done']?_0x5d3c14(_0x512fe9['value']):_0x5aaacd(_0x512fe9['value'])['then'](_0x9a42f6,_0x1ba21e);}_0x2b19f2((_0x2ebf90=_0x2ebf90['apply'](_0x3d5721,_0x9991d8||[]))['next']());});};
6
6
 
7
- class Response{constructor(_0x523b80){this['isSuccess']=_0x523b80;}}class SuccessfulAccountResponse extends Response{constructor(_0x5345bf){super(!![]),this['account']=_0x5345bf;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x2e5cb6){super(![]),this['problem']=_0x2e5cb6;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x43aa15){super(!![]),this['tokens']=_0x43aa15;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x1ad294){super(![]),this['problem']=_0x1ad294;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x576fbb){super(!![]),this['apiKey']=_0x576fbb;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x34195b){super(![]),this['problem']=_0x34195b;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
7
+ class Response{constructor(_0xd192c8){this['isSuccess']=_0xd192c8;}}class SuccessfulAccountResponse extends Response{constructor(_0x352ece){super(!![]),this['account']=_0x352ece;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x138f52){super(![]),this['problem']=_0x138f52;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x277e21){super(!![]),this['tokens']=_0x277e21;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x10e166){super(![]),this['problem']=_0x10e166;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x3a6a27){super(!![]),this['apiKey']=_0x3a6a27;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0xb47c7){super(![]),this['problem']=_0xb47c7;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
8
8
 
9
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x55bad0,_0x502d5f,_0x2578ab,_0x231fde){function _0xb90d33(_0x53f6af){return _0x53f6af instanceof _0x2578ab?_0x53f6af:new _0x2578ab(function(_0x39133d){_0x39133d(_0x53f6af);});}return new(_0x2578ab||(_0x2578ab=Promise))(function(_0x24a620,_0x3c8c93){function _0x328172(_0xf9950a){try{_0x4d54f1(_0x231fde['next'](_0xf9950a));}catch(_0x30e5e8){_0x3c8c93(_0x30e5e8);}}function _0x346d13(_0x562ddd){try{_0x4d54f1(_0x231fde['throw'](_0x562ddd));}catch(_0x2c2181){_0x3c8c93(_0x2c2181);}}function _0x4d54f1(_0x3e034d){_0x3e034d['done']?_0x24a620(_0x3e034d['value']):_0xb90d33(_0x3e034d['value'])['then'](_0x328172,_0x346d13);}_0x4d54f1((_0x231fde=_0x231fde['apply'](_0x55bad0,_0x502d5f||[]))['next']());});};class AccountService{constructor(_0x1895b1,_0x22df74){this['tokenManager']=_0x1895b1,this['fetch']=_0x22df74;}['get'](_0x4978af,_0x16349a){return __awaiter$3(this,void 0,void 0,function*(){const _0x19d467=yield this['tokenManager']['getOrRefreshTokens'](_0x16349a);if(!_0x19d467['isSuccess'])return new FailedAccountResponse(_0x19d467['toProblem']());_0x16349a=_0x19d467['toSuccess']();const _0x3ffc31='Account/'+_0x4978af+'/',_0x5a37ad=yield this['fetch']['get'](_0x3ffc31,_0x16349a['access_token']);try{if(_0x5a37ad['status']>0xc7&&_0x5a37ad['status']<0x12c){const _0x2304c8=yield _0x5a37ad['json']();return new SuccessfulAccountResponse(_0x2304c8);}const _0x13a277=yield _0x5a37ad['json']();return new FailedAccountResponse(_0x13a277);}catch(_0x4b0948){if(_0x4b0948 instanceof Error)return new FailedAccountResponse({'detail':_0x4b0948['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x4b0948;}});}}
9
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0xc3f8e8,_0x58c3d1,_0x40d577,_0x4efd0f){function _0x48b9f7(_0x1024f9){return _0x1024f9 instanceof _0x40d577?_0x1024f9:new _0x40d577(function(_0x41c513){_0x41c513(_0x1024f9);});}return new(_0x40d577||(_0x40d577=Promise))(function(_0x272d80,_0x44a79e){function _0x2bdc25(_0x2ed9a6){try{_0x471c9(_0x4efd0f['next'](_0x2ed9a6));}catch(_0x3f77f3){_0x44a79e(_0x3f77f3);}}function _0x1240cd(_0x53b21d){try{_0x471c9(_0x4efd0f['throw'](_0x53b21d));}catch(_0x1265e9){_0x44a79e(_0x1265e9);}}function _0x471c9(_0x58a024){_0x58a024['done']?_0x272d80(_0x58a024['value']):_0x48b9f7(_0x58a024['value'])['then'](_0x2bdc25,_0x1240cd);}_0x471c9((_0x4efd0f=_0x4efd0f['apply'](_0xc3f8e8,_0x58c3d1||[]))['next']());});};class AccountService{constructor(_0x4058f5,_0x139cdf){this['tokenManager']=_0x4058f5,this['fetch']=_0x139cdf;}['get'](_0x532062,_0x18ab89){return __awaiter$3(this,void 0,void 0,function*(){const _0x43ec38=yield this['tokenManager']['getOrRefreshTokens'](_0x18ab89);if(!_0x43ec38['isSuccess'])return new FailedAccountResponse(_0x43ec38['toProblem']());_0x18ab89=_0x43ec38['toSuccess']();const _0x4f86d4='Account/'+_0x532062+'/',_0x1606cf=yield this['fetch']['get'](_0x4f86d4,_0x18ab89['access_token']);try{if(_0x1606cf['status']>0xc7&&_0x1606cf['status']<0x12c){const _0x381827=yield _0x1606cf['json']();return new SuccessfulAccountResponse(_0x381827);}const _0x277b21=yield _0x1606cf['json']();return new FailedAccountResponse(_0x277b21);}catch(_0x23b37e){if(_0x23b37e instanceof Error)return new FailedAccountResponse({'detail':_0x23b37e['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x23b37e;}});}}
10
10
 
11
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x101773,_0x258ad5,_0x4052de,_0x3e44ff){function _0x95cbf(_0x2a1339){return _0x2a1339 instanceof _0x4052de?_0x2a1339:new _0x4052de(function(_0x59ed31){_0x59ed31(_0x2a1339);});}return new(_0x4052de||(_0x4052de=Promise))(function(_0x563c05,_0x176d75){function _0x576892(_0x559406){try{_0x52ec57(_0x3e44ff['next'](_0x559406));}catch(_0x420b92){_0x176d75(_0x420b92);}}function _0x387f0e(_0x53cdcf){try{_0x52ec57(_0x3e44ff['throw'](_0x53cdcf));}catch(_0x3a6784){_0x176d75(_0x3a6784);}}function _0x52ec57(_0x2001b1){_0x2001b1['done']?_0x563c05(_0x2001b1['value']):_0x95cbf(_0x2001b1['value'])['then'](_0x576892,_0x387f0e);}_0x52ec57((_0x3e44ff=_0x3e44ff['apply'](_0x101773,_0x258ad5||[]))['next']());});};class ApiKeyService{constructor(_0x2d4aba,_0x43cd89){this['tokenManager']=_0x2d4aba,this['fetch']=_0x43cd89;}['create'](_0x316a40,_0x8ca3ad,_0x101253){return __awaiter$2(this,void 0,void 0,function*(){const _0x5dfa43=yield this['tokenManager']['getOrRefreshTokens'](_0x101253);if(!_0x5dfa43['isSuccess'])return new FailedApiKeyResponse(_0x5dfa43['toProblem']());_0x101253=_0x5dfa43['toSuccess']();const _0x42da92='ApiKey/Create',_0xaba211={'account_name':_0x316a40,'name':_0x8ca3ad};try{const _0x2f90eb=yield this['fetch']['post'](_0x42da92,_0x101253['access_token'],_0xaba211);if(_0x2f90eb['status']>0xc7&&_0x2f90eb['status']<0x12c){const _0x5bea00=yield _0x2f90eb['json']();return new SuccessfulApiKeyResponse(_0x5bea00);}const _0x3a1a3b=yield _0x2f90eb['json']();return new FailedApiKeyResponse(_0x3a1a3b);}catch(_0x45579f){if(_0x45579f instanceof Error)return new FailedApiKeyResponse({'detail':_0x45579f['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x45579f;}});}}
11
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x4ff64a,_0x49f29a,_0x5e7827,_0x5f0785){function _0x26dcae(_0x3c2d68){return _0x3c2d68 instanceof _0x5e7827?_0x3c2d68:new _0x5e7827(function(_0x5f3fdd){_0x5f3fdd(_0x3c2d68);});}return new(_0x5e7827||(_0x5e7827=Promise))(function(_0x1086a9,_0xf58854){function _0x5ba92d(_0x577732){try{_0x5c0162(_0x5f0785['next'](_0x577732));}catch(_0x1d7395){_0xf58854(_0x1d7395);}}function _0x9bf94b(_0x478d0a){try{_0x5c0162(_0x5f0785['throw'](_0x478d0a));}catch(_0x5c0ff0){_0xf58854(_0x5c0ff0);}}function _0x5c0162(_0xb403bf){_0xb403bf['done']?_0x1086a9(_0xb403bf['value']):_0x26dcae(_0xb403bf['value'])['then'](_0x5ba92d,_0x9bf94b);}_0x5c0162((_0x5f0785=_0x5f0785['apply'](_0x4ff64a,_0x49f29a||[]))['next']());});};class ApiKeyService{constructor(_0x459e29,_0x371ecc){this['tokenManager']=_0x459e29,this['fetch']=_0x371ecc;}['create'](_0x32e4fb,_0x3dd63c,_0x513331){return __awaiter$2(this,void 0,void 0,function*(){const _0x276b72=yield this['tokenManager']['getOrRefreshTokens'](_0x513331);if(!_0x276b72['isSuccess'])return new FailedApiKeyResponse(_0x276b72['toProblem']());_0x513331=_0x276b72['toSuccess']();const _0x2f8b6d='ApiKey/Create',_0xb66e76={'account_name':_0x32e4fb,'name':_0x3dd63c};try{const _0x39eb7f=yield this['fetch']['post'](_0x2f8b6d,_0x513331['access_token'],_0xb66e76);if(_0x39eb7f['status']>0xc7&&_0x39eb7f['status']<0x12c){const _0x2cf186=yield _0x39eb7f['json']();return new SuccessfulApiKeyResponse(_0x2cf186);}const _0x218846=yield _0x39eb7f['json']();return new FailedApiKeyResponse(_0x218846);}catch(_0xb0b95d){if(_0xb0b95d instanceof Error)return new FailedApiKeyResponse({'detail':_0xb0b95d['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0xb0b95d;}});}}
12
12
 
13
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x2a4c38,_0x52692c,_0x5d729f,_0x143c00){function _0x970cbc(_0x34aa86){return _0x34aa86 instanceof _0x5d729f?_0x34aa86:new _0x5d729f(function(_0x5a45b8){_0x5a45b8(_0x34aa86);});}return new(_0x5d729f||(_0x5d729f=Promise))(function(_0x13f2c5,_0xa09ded){function _0x247409(_0x15dc70){try{_0x5e3a91(_0x143c00['next'](_0x15dc70));}catch(_0x4731d7){_0xa09ded(_0x4731d7);}}function _0x5d1b6e(_0x47c800){try{_0x5e3a91(_0x143c00['throw'](_0x47c800));}catch(_0x2bc3ee){_0xa09ded(_0x2bc3ee);}}function _0x5e3a91(_0x413a4){_0x413a4['done']?_0x13f2c5(_0x413a4['value']):_0x970cbc(_0x413a4['value'])['then'](_0x247409,_0x5d1b6e);}_0x5e3a91((_0x143c00=_0x143c00['apply'](_0x2a4c38,_0x52692c||[]))['next']());});};class ListService{constructor(_0x8e9c55,_0x47a807){this['tokenManager']=_0x8e9c55,this['fetch']=_0x47a807;}['add'](_0x4e811d,_0x46fb0a,_0x1b16ec){return __awaiter$1(this,void 0,void 0,function*(){const _0x2e8a19=yield this['tokenManager']['getOrRefreshTokens'](_0x1b16ec);if(!_0x2e8a19['isSuccess'])return new FailedAccountResponse(_0x2e8a19['toProblem']());_0x1b16ec=_0x2e8a19['toSuccess']();const _0x4d87a0='List',_0x1eb6a6={'account_name':_0x4e811d,'list_name':_0x46fb0a};try{const _0x17c4d0=yield this['fetch']['post'](_0x4d87a0,_0x1b16ec['access_token'],_0x1eb6a6);if(_0x17c4d0['status']>0xc7&&_0x17c4d0['status']<0x12c){const _0x277f20=yield _0x17c4d0['json']();return new SuccessfulAccountResponse(_0x277f20);}const _0x25da10=yield _0x17c4d0['json']();return new FailedAccountResponse(_0x25da10);}catch(_0x17e08f){if(_0x17e08f instanceof Error)return new FailedAccountResponse({'detail':_0x17e08f['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x17e08f;}});}['remove'](_0x189cd0,_0x3a7ea5,_0x1f2271){return __awaiter$1(this,void 0,void 0,function*(){const _0x1f7949=yield this['tokenManager']['getOrRefreshTokens'](_0x1f2271);if(!_0x1f7949['isSuccess'])return new FailedAccountResponse(_0x1f7949['toProblem']());_0x1f2271=_0x1f7949['toSuccess']();const _0x11fde3='List/'+_0x189cd0+'/'+_0x3a7ea5,_0x56da4a=yield this['fetch']['delete'](_0x11fde3,_0x1f2271['access_token']);try{if(_0x56da4a['status']>0xc7&&_0x56da4a['status']<0x12c){const _0x47b2b8=yield _0x56da4a['json']();return new SuccessfulAccountResponse(_0x47b2b8);}const _0x51eacd=yield _0x56da4a['json']();return new FailedAccountResponse(_0x51eacd);}catch(_0x2d40ac){if(_0x2d40ac instanceof Error)return new FailedAccountResponse({'detail':_0x2d40ac['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x2d40ac;}});}}
13
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x2452d0,_0x3eb67b,_0xaa5814,_0x3f1913){function _0x344516(_0x40d85c){return _0x40d85c instanceof _0xaa5814?_0x40d85c:new _0xaa5814(function(_0x71e495){_0x71e495(_0x40d85c);});}return new(_0xaa5814||(_0xaa5814=Promise))(function(_0x8d4413,_0x1e37c9){function _0x4e8511(_0x3f11d9){try{_0x489570(_0x3f1913['next'](_0x3f11d9));}catch(_0x327531){_0x1e37c9(_0x327531);}}function _0x16265a(_0x4686e4){try{_0x489570(_0x3f1913['throw'](_0x4686e4));}catch(_0x45f587){_0x1e37c9(_0x45f587);}}function _0x489570(_0x474beb){_0x474beb['done']?_0x8d4413(_0x474beb['value']):_0x344516(_0x474beb['value'])['then'](_0x4e8511,_0x16265a);}_0x489570((_0x3f1913=_0x3f1913['apply'](_0x2452d0,_0x3eb67b||[]))['next']());});};class ListService{constructor(_0x4b79b0,_0x12976a){this['tokenManager']=_0x4b79b0,this['fetch']=_0x12976a;}['add'](_0x12ebbc,_0x564d9e,_0x9e5391){return __awaiter$1(this,void 0,void 0,function*(){const _0x15f9bf=yield this['tokenManager']['getOrRefreshTokens'](_0x9e5391);if(!_0x15f9bf['isSuccess'])return new FailedAccountResponse(_0x15f9bf['toProblem']());_0x9e5391=_0x15f9bf['toSuccess']();const _0x56faa3='List',_0x4c1d3d={'account_name':_0x12ebbc,'list_name':_0x564d9e};try{const _0x32817f=yield this['fetch']['post'](_0x56faa3,_0x9e5391['access_token'],_0x4c1d3d);if(_0x32817f['status']>0xc7&&_0x32817f['status']<0x12c){const _0x5bb8bd=yield _0x32817f['json']();return new SuccessfulAccountResponse(_0x5bb8bd);}const _0x6f9397=yield _0x32817f['json']();return new FailedAccountResponse(_0x6f9397);}catch(_0x3eff2a){if(_0x3eff2a instanceof Error)return new FailedAccountResponse({'detail':_0x3eff2a['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x3eff2a;}});}['remove'](_0x3f1758,_0x5c9dc9,_0x2397fe){return __awaiter$1(this,void 0,void 0,function*(){const _0x70fac1=yield this['tokenManager']['getOrRefreshTokens'](_0x2397fe);if(!_0x70fac1['isSuccess'])return new FailedAccountResponse(_0x70fac1['toProblem']());_0x2397fe=_0x70fac1['toSuccess']();const _0x35cf07='List/'+_0x3f1758+'/'+_0x5c9dc9,_0x25903d=yield this['fetch']['delete'](_0x35cf07,_0x2397fe['access_token']);try{if(_0x25903d['status']>0xc7&&_0x25903d['status']<0x12c){const _0x31c413=yield _0x25903d['json']();return new SuccessfulAccountResponse(_0x31c413);}const _0x149be6=yield _0x25903d['json']();return new FailedAccountResponse(_0x149be6);}catch(_0x994c87){if(_0x994c87 instanceof Error)return new FailedAccountResponse({'detail':_0x994c87['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x994c87;}});}}
14
14
 
15
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x240269,_0x323f68,_0x30ed02,_0x3518d7){function _0x26a787(_0x666dae){return _0x666dae instanceof _0x30ed02?_0x666dae:new _0x30ed02(function(_0x238582){_0x238582(_0x666dae);});}return new(_0x30ed02||(_0x30ed02=Promise))(function(_0x1da66f,_0x797d9d){function _0x2d4212(_0x31c2d5){try{_0x16162c(_0x3518d7['next'](_0x31c2d5));}catch(_0x56dbf8){_0x797d9d(_0x56dbf8);}}function _0x529892(_0x3ab8a0){try{_0x16162c(_0x3518d7['throw'](_0x3ab8a0));}catch(_0x46d3fd){_0x797d9d(_0x46d3fd);}}function _0x16162c(_0x542926){_0x542926['done']?_0x1da66f(_0x542926['value']):_0x26a787(_0x542926['value'])['then'](_0x2d4212,_0x529892);}_0x16162c((_0x3518d7=_0x3518d7['apply'](_0x240269,_0x323f68||[]))['next']());});};class TokenManager{constructor(_0x2d3358){this['authClient']=_0x2d3358;}['getOrRefreshTokens'](_0x2921e3){return __awaiter(this,void 0,void 0,function*(){if(Date['now']()<_0x2921e3['access_expires'])return new SuccessfulAuthResponse(_0x2921e3);if(Date['now']()>_0x2921e3['refresh_expires'])return yield this['authClient']['refresh'](_0x2921e3['refresh_token']);return new FailedAuthResponse({'detail':'Refresh\x20token\x20expired','title':'','status':0x194,'instance':'','type':''});});}}
15
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0xfc3f59,_0x366c4b,_0x50b25b,_0x837feb){function _0x26c5ff(_0xe52cd2){return _0xe52cd2 instanceof _0x50b25b?_0xe52cd2:new _0x50b25b(function(_0x426c91){_0x426c91(_0xe52cd2);});}return new(_0x50b25b||(_0x50b25b=Promise))(function(_0x40a1c3,_0x5e0193){function _0x1ab839(_0x362601){try{_0x4a4205(_0x837feb['next'](_0x362601));}catch(_0x5afd9a){_0x5e0193(_0x5afd9a);}}function _0x5052a6(_0x3fbd26){try{_0x4a4205(_0x837feb['throw'](_0x3fbd26));}catch(_0x12e052){_0x5e0193(_0x12e052);}}function _0x4a4205(_0x5dfcde){_0x5dfcde['done']?_0x40a1c3(_0x5dfcde['value']):_0x26c5ff(_0x5dfcde['value'])['then'](_0x1ab839,_0x5052a6);}_0x4a4205((_0x837feb=_0x837feb['apply'](_0xfc3f59,_0x366c4b||[]))['next']());});};class TokenManager{constructor(_0xd31079){this['authClient']=_0xd31079;}['getOrRefreshTokens'](_0x29b972){return __awaiter(this,void 0,void 0,function*(){if(Date['now']()<_0x29b972['access_expires'])return new SuccessfulAuthResponse(_0x29b972);if(Date['now']()>_0x29b972['refresh_expires'])return yield this['authClient']['refresh'](_0x29b972['refresh_token']);return new FailedAuthResponse({'detail':'Refresh\x20token\x20expired','title':'','status':0x194,'instance':'','type':''});});}}
16
16
 
17
- class AdminClient{constructor(_0x2cff21,_0x38355f='https://admin.searchability.dev/'){var _0x20d1a5=new TokenManager(_0x2cff21),_0x17ef83=new Fetch(_0x38355f);this['Accounts']=new AccountService(_0x20d1a5,_0x17ef83),this['Lists']=new ListService(_0x20d1a5,_0x17ef83),this['ApiKeys']=new ApiKeyService(_0x20d1a5,_0x17ef83);}}
17
+ class AdminClient{constructor(_0x4f97f0,_0xf18d61='https://admin.searchability.dev/'){var _0x46fcf1=new TokenManager(_0x4f97f0),_0x26c886=new Fetch(_0xf18d61);this['Accounts']=new AccountService(_0x46fcf1,_0x26c886),this['Lists']=new ListService(_0x46fcf1,_0x26c886),this['ApiKeys']=new ApiKeyService(_0x46fcf1,_0x26c886);}}
18
18
 
19
19
  module.exports = AdminClient;
@@ -1,17 +1,17 @@
1
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0xe8dd00,_0x4094b7,_0x4c7755,_0x52c64c){function _0xc08f35(_0x14adb3){return _0x14adb3 instanceof _0x4c7755?_0x14adb3:new _0x4c7755(function(_0x35d33c){_0x35d33c(_0x14adb3);});}return new(_0x4c7755||(_0x4c7755=Promise))(function(_0x51b491,_0x10a8b3){function _0x3d59ff(_0x5d23e5){try{_0x56013d(_0x52c64c['next'](_0x5d23e5));}catch(_0xac0276){_0x10a8b3(_0xac0276);}}function _0x39194d(_0x25c77d){try{_0x56013d(_0x52c64c['throw'](_0x25c77d));}catch(_0x3173d4){_0x10a8b3(_0x3173d4);}}function _0x56013d(_0x734016){_0x734016['done']?_0x51b491(_0x734016['value']):_0xc08f35(_0x734016['value'])['then'](_0x3d59ff,_0x39194d);}_0x56013d((_0x52c64c=_0x52c64c['apply'](_0xe8dd00,_0x4094b7||[]))['next']());});};class Fetch{constructor(_0x5c80ae){this['baseUri']=_0x5c80ae,this['getUrl']=_0xe73074=>{return _0xe73074['startsWith']('/')&&(_0xe73074=_0xe73074['replace']('/','')),''+this['baseUri']+_0xe73074;},!_0x5c80ae['endsWith']('/')&&(_0x5c80ae=_0x5c80ae+'/');}['get'](_0x2360b1,_0xf88b46){return __awaiter$4(this,void 0,void 0,function*(){const _0x29496d=this['getUrl'](_0x2360b1);return yield fetch(_0x29496d,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0xf88b46}});});}['post'](_0x31adc1,_0x1941dd,_0x35c473){return __awaiter$4(this,void 0,void 0,function*(){const _0x1e27b8=this['getUrl'](_0x31adc1);return yield fetch(_0x1e27b8,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1941dd},'body':_0x35c473?JSON['stringify'](_0x35c473):null});});}['put'](_0x7073d2,_0x445c88,_0x417185){return __awaiter$4(this,void 0,void 0,function*(){const _0x132978=this['getUrl'](_0x7073d2);return yield fetch(_0x132978,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x445c88},'body':_0x417185?JSON['stringify'](_0x417185):null});});}['delete'](_0x24e98d,_0x2580dc){return __awaiter$4(this,void 0,void 0,function*(){const _0x4103c4=this['getUrl'](_0x24e98d);return yield fetch(_0x4103c4,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2580dc}});});}}
1
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0xe391a6,_0x454e27,_0x514c6e,_0x402fa9){function _0xd50388(_0x4a9272){return _0x4a9272 instanceof _0x514c6e?_0x4a9272:new _0x514c6e(function(_0x2d58e3){_0x2d58e3(_0x4a9272);});}return new(_0x514c6e||(_0x514c6e=Promise))(function(_0x53da61,_0x4eb3c6){function _0x5603e2(_0x4ec0b6){try{_0x448dca(_0x402fa9['next'](_0x4ec0b6));}catch(_0x27c2b5){_0x4eb3c6(_0x27c2b5);}}function _0x3681fa(_0x486c9){try{_0x448dca(_0x402fa9['throw'](_0x486c9));}catch(_0x36f386){_0x4eb3c6(_0x36f386);}}function _0x448dca(_0x10a04c){_0x10a04c['done']?_0x53da61(_0x10a04c['value']):_0xd50388(_0x10a04c['value'])['then'](_0x5603e2,_0x3681fa);}_0x448dca((_0x402fa9=_0x402fa9['apply'](_0xe391a6,_0x454e27||[]))['next']());});};class Fetch{constructor(_0x55c8bc){this['baseUri']=_0x55c8bc,this['getUrl']=_0x36329e=>{return _0x36329e['startsWith']('/')&&(_0x36329e=_0x36329e['replace']('/','')),''+this['baseUri']+_0x36329e;},!_0x55c8bc['endsWith']('/')&&(_0x55c8bc=_0x55c8bc+'/');}['get'](_0x10b939,_0x38c2e1){return __awaiter$4(this,void 0,void 0,function*(){const _0x1914da=this['getUrl'](_0x10b939);return yield fetch(_0x1914da,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x38c2e1}});});}['post'](_0x6a9774,_0x3cfc58,_0x1c2021){return __awaiter$4(this,void 0,void 0,function*(){const _0x2c5516=this['getUrl'](_0x6a9774);return yield fetch(_0x2c5516,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3cfc58},'body':_0x1c2021?JSON['stringify'](_0x1c2021):null});});}['put'](_0x47343f,_0x2e9815,_0x1abf28){return __awaiter$4(this,void 0,void 0,function*(){const _0x568369=this['getUrl'](_0x47343f);return yield fetch(_0x568369,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2e9815},'body':_0x1abf28?JSON['stringify'](_0x1abf28):null});});}['delete'](_0x4c6a94,_0xbc98d0){return __awaiter$4(this,void 0,void 0,function*(){const _0x4a35a6=this['getUrl'](_0x4c6a94);return yield fetch(_0x4a35a6,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0xbc98d0}});});}}
2
2
 
3
- undefined&&undefined['__awaiter']||function(_0x39dedc,_0x2183eb,_0xea053c,_0x540ad3){function _0x332c29(_0x1141e2){return _0x1141e2 instanceof _0xea053c?_0x1141e2:new _0xea053c(function(_0x4cee2a){_0x4cee2a(_0x1141e2);});}return new(_0xea053c||(_0xea053c=Promise))(function(_0xb10c39,_0x2659b2){function _0x1e826b(_0x2b680d){try{_0x2eb57b(_0x540ad3['next'](_0x2b680d));}catch(_0x1a9d89){_0x2659b2(_0x1a9d89);}}function _0x596442(_0x587d90){try{_0x2eb57b(_0x540ad3['throw'](_0x587d90));}catch(_0x10c8f7){_0x2659b2(_0x10c8f7);}}function _0x2eb57b(_0x41c128){_0x41c128['done']?_0xb10c39(_0x41c128['value']):_0x332c29(_0x41c128['value'])['then'](_0x1e826b,_0x596442);}_0x2eb57b((_0x540ad3=_0x540ad3['apply'](_0x39dedc,_0x2183eb||[]))['next']());});};
3
+ undefined&&undefined['__awaiter']||function(_0x5d0aa2,_0xa435e6,_0x4b6313,_0xc460da){function _0x1f9c13(_0x3e5688){return _0x3e5688 instanceof _0x4b6313?_0x3e5688:new _0x4b6313(function(_0x165c2e){_0x165c2e(_0x3e5688);});}return new(_0x4b6313||(_0x4b6313=Promise))(function(_0x186b0b,_0x30a263){function _0x52948d(_0x255fec){try{_0x430ff2(_0xc460da['next'](_0x255fec));}catch(_0x403d64){_0x30a263(_0x403d64);}}function _0x3f8869(_0x3938df){try{_0x430ff2(_0xc460da['throw'](_0x3938df));}catch(_0xea4e23){_0x30a263(_0xea4e23);}}function _0x430ff2(_0x52abe4){_0x52abe4['done']?_0x186b0b(_0x52abe4['value']):_0x1f9c13(_0x52abe4['value'])['then'](_0x52948d,_0x3f8869);}_0x430ff2((_0xc460da=_0xc460da['apply'](_0x5d0aa2,_0xa435e6||[]))['next']());});};
4
4
 
5
- class Response{constructor(_0x17ca74){this['isSuccess']=_0x17ca74;}}class SuccessfulAccountResponse extends Response{constructor(_0x218ddb){super(!![]),this['account']=_0x218ddb;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x118cbe){super(![]),this['problem']=_0x118cbe;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x5457cb){super(!![]),this['tokens']=_0x5457cb;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x5d0942){super(![]),this['problem']=_0x5d0942;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x575b34){super(!![]),this['apiKey']=_0x575b34;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x5e6ea1){super(![]),this['problem']=_0x5e6ea1;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
5
+ class Response{constructor(_0x36313e){this['isSuccess']=_0x36313e;}}class SuccessfulAccountResponse extends Response{constructor(_0x1147bc){super(!![]),this['account']=_0x1147bc;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x361bc3){super(![]),this['problem']=_0x361bc3;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x24a8b6){super(!![]),this['tokens']=_0x24a8b6;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x40438a){super(![]),this['problem']=_0x40438a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x1cb92c){super(!![]),this['apiKey']=_0x1cb92c;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x823f08){super(![]),this['problem']=_0x823f08;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
6
6
 
7
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x3e15c5,_0x18a7f1,_0x27ef55,_0x112f2b){function _0x3feb03(_0x13d9a2){return _0x13d9a2 instanceof _0x27ef55?_0x13d9a2:new _0x27ef55(function(_0x4901d3){_0x4901d3(_0x13d9a2);});}return new(_0x27ef55||(_0x27ef55=Promise))(function(_0x4c78c2,_0x208869){function _0x4cf103(_0x5d42e0){try{_0x134a13(_0x112f2b['next'](_0x5d42e0));}catch(_0x14a121){_0x208869(_0x14a121);}}function _0x2ac7a0(_0x387afa){try{_0x134a13(_0x112f2b['throw'](_0x387afa));}catch(_0x351ecd){_0x208869(_0x351ecd);}}function _0x134a13(_0x13602c){_0x13602c['done']?_0x4c78c2(_0x13602c['value']):_0x3feb03(_0x13602c['value'])['then'](_0x4cf103,_0x2ac7a0);}_0x134a13((_0x112f2b=_0x112f2b['apply'](_0x3e15c5,_0x18a7f1||[]))['next']());});};class AccountService{constructor(_0x1986b1,_0x20d729){this['tokenManager']=_0x1986b1,this['fetch']=_0x20d729;}['get'](_0x48fe1b,_0x3c6069){return __awaiter$3(this,void 0,void 0,function*(){const _0x4a700d=yield this['tokenManager']['getOrRefreshTokens'](_0x3c6069);if(!_0x4a700d['isSuccess'])return new FailedAccountResponse(_0x4a700d['toProblem']());_0x3c6069=_0x4a700d['toSuccess']();const _0x333c7a='Account/'+_0x48fe1b+'/',_0x4a05a0=yield this['fetch']['get'](_0x333c7a,_0x3c6069['access_token']);try{if(_0x4a05a0['status']>0xc7&&_0x4a05a0['status']<0x12c){const _0x5d7840=yield _0x4a05a0['json']();return new SuccessfulAccountResponse(_0x5d7840);}const _0x106b19=yield _0x4a05a0['json']();return new FailedAccountResponse(_0x106b19);}catch(_0x2db68b){if(_0x2db68b instanceof Error)return new FailedAccountResponse({'detail':_0x2db68b['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x2db68b;}});}}
7
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x48393b,_0x2b3745,_0x39068f,_0x4bc6b1){function _0x117415(_0x2a0a7a){return _0x2a0a7a instanceof _0x39068f?_0x2a0a7a:new _0x39068f(function(_0x16abc3){_0x16abc3(_0x2a0a7a);});}return new(_0x39068f||(_0x39068f=Promise))(function(_0x3d3a8e,_0x36081b){function _0x98f1c0(_0x534bab){try{_0x250024(_0x4bc6b1['next'](_0x534bab));}catch(_0x560afb){_0x36081b(_0x560afb);}}function _0x24d8ae(_0x33f7e4){try{_0x250024(_0x4bc6b1['throw'](_0x33f7e4));}catch(_0x1a1fd8){_0x36081b(_0x1a1fd8);}}function _0x250024(_0xa49522){_0xa49522['done']?_0x3d3a8e(_0xa49522['value']):_0x117415(_0xa49522['value'])['then'](_0x98f1c0,_0x24d8ae);}_0x250024((_0x4bc6b1=_0x4bc6b1['apply'](_0x48393b,_0x2b3745||[]))['next']());});};class AccountService{constructor(_0x1eadb8,_0x256490){this['tokenManager']=_0x1eadb8,this['fetch']=_0x256490;}['get'](_0x4a1401,_0x290c76){return __awaiter$3(this,void 0,void 0,function*(){const _0xdc7ff4=yield this['tokenManager']['getOrRefreshTokens'](_0x290c76);if(!_0xdc7ff4['isSuccess'])return new FailedAccountResponse(_0xdc7ff4['toProblem']());_0x290c76=_0xdc7ff4['toSuccess']();const _0x15b9cd='Account/'+_0x4a1401+'/',_0x5d0b4b=yield this['fetch']['get'](_0x15b9cd,_0x290c76['access_token']);try{if(_0x5d0b4b['status']>0xc7&&_0x5d0b4b['status']<0x12c){const _0x5e0244=yield _0x5d0b4b['json']();return new SuccessfulAccountResponse(_0x5e0244);}const _0xcdc9dc=yield _0x5d0b4b['json']();return new FailedAccountResponse(_0xcdc9dc);}catch(_0x7ed400){if(_0x7ed400 instanceof Error)return new FailedAccountResponse({'detail':_0x7ed400['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x7ed400;}});}}
8
8
 
9
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x4d46fb,_0x19f17d,_0x3a047b,_0x7b792b){function _0x3a1ed8(_0x52ce1a){return _0x52ce1a instanceof _0x3a047b?_0x52ce1a:new _0x3a047b(function(_0x1b218b){_0x1b218b(_0x52ce1a);});}return new(_0x3a047b||(_0x3a047b=Promise))(function(_0x221361,_0x3986e8){function _0x9395b2(_0x3e9f5c){try{_0x161579(_0x7b792b['next'](_0x3e9f5c));}catch(_0xc5aa00){_0x3986e8(_0xc5aa00);}}function _0x1c46cc(_0x5b01e4){try{_0x161579(_0x7b792b['throw'](_0x5b01e4));}catch(_0x491701){_0x3986e8(_0x491701);}}function _0x161579(_0x36f44e){_0x36f44e['done']?_0x221361(_0x36f44e['value']):_0x3a1ed8(_0x36f44e['value'])['then'](_0x9395b2,_0x1c46cc);}_0x161579((_0x7b792b=_0x7b792b['apply'](_0x4d46fb,_0x19f17d||[]))['next']());});};class ApiKeyService{constructor(_0x24a937,_0x489cfd){this['tokenManager']=_0x24a937,this['fetch']=_0x489cfd;}['create'](_0x3e7072,_0x2185c6,_0x488c4f){return __awaiter$2(this,void 0,void 0,function*(){const _0x3ac8cc=yield this['tokenManager']['getOrRefreshTokens'](_0x488c4f);if(!_0x3ac8cc['isSuccess'])return new FailedApiKeyResponse(_0x3ac8cc['toProblem']());_0x488c4f=_0x3ac8cc['toSuccess']();const _0x1d1a89='ApiKey/Create',_0x3f783f={'account_name':_0x3e7072,'name':_0x2185c6};try{const _0x364b40=yield this['fetch']['post'](_0x1d1a89,_0x488c4f['access_token'],_0x3f783f);if(_0x364b40['status']>0xc7&&_0x364b40['status']<0x12c){const _0x34efb4=yield _0x364b40['json']();return new SuccessfulApiKeyResponse(_0x34efb4);}const _0x280eee=yield _0x364b40['json']();return new FailedApiKeyResponse(_0x280eee);}catch(_0x1b1678){if(_0x1b1678 instanceof Error)return new FailedApiKeyResponse({'detail':_0x1b1678['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x1b1678;}});}}
9
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x20ea2c,_0x2e18b5,_0x5d2f1e,_0x8c49c6){function _0x5d54b2(_0x4e2fdf){return _0x4e2fdf instanceof _0x5d2f1e?_0x4e2fdf:new _0x5d2f1e(function(_0x1b285a){_0x1b285a(_0x4e2fdf);});}return new(_0x5d2f1e||(_0x5d2f1e=Promise))(function(_0x5f5798,_0x47c992){function _0x530ee0(_0x40c873){try{_0x322249(_0x8c49c6['next'](_0x40c873));}catch(_0x26d7ab){_0x47c992(_0x26d7ab);}}function _0x2378cf(_0x467548){try{_0x322249(_0x8c49c6['throw'](_0x467548));}catch(_0x4259c3){_0x47c992(_0x4259c3);}}function _0x322249(_0x14f669){_0x14f669['done']?_0x5f5798(_0x14f669['value']):_0x5d54b2(_0x14f669['value'])['then'](_0x530ee0,_0x2378cf);}_0x322249((_0x8c49c6=_0x8c49c6['apply'](_0x20ea2c,_0x2e18b5||[]))['next']());});};class ApiKeyService{constructor(_0x572c48,_0x128887){this['tokenManager']=_0x572c48,this['fetch']=_0x128887;}['create'](_0x969187,_0x4c7959,_0x1e6084){return __awaiter$2(this,void 0,void 0,function*(){const _0x3669b2=yield this['tokenManager']['getOrRefreshTokens'](_0x1e6084);if(!_0x3669b2['isSuccess'])return new FailedApiKeyResponse(_0x3669b2['toProblem']());_0x1e6084=_0x3669b2['toSuccess']();const _0x404d5a='ApiKey/Create',_0x13d66e={'account_name':_0x969187,'name':_0x4c7959};try{const _0x5eb41c=yield this['fetch']['post'](_0x404d5a,_0x1e6084['access_token'],_0x13d66e);if(_0x5eb41c['status']>0xc7&&_0x5eb41c['status']<0x12c){const _0x3201d7=yield _0x5eb41c['json']();return new SuccessfulApiKeyResponse(_0x3201d7);}const _0x4c6aa2=yield _0x5eb41c['json']();return new FailedApiKeyResponse(_0x4c6aa2);}catch(_0x58adbc){if(_0x58adbc instanceof Error)return new FailedApiKeyResponse({'detail':_0x58adbc['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x58adbc;}});}}
10
10
 
11
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x51132b,_0x162984,_0x449b02,_0x15a919){function _0x21612d(_0x4e5f66){return _0x4e5f66 instanceof _0x449b02?_0x4e5f66:new _0x449b02(function(_0x46a5b8){_0x46a5b8(_0x4e5f66);});}return new(_0x449b02||(_0x449b02=Promise))(function(_0x3540d7,_0x1e27af){function _0x1e88b5(_0x422f9c){try{_0x2a626c(_0x15a919['next'](_0x422f9c));}catch(_0x1a2b54){_0x1e27af(_0x1a2b54);}}function _0x48efd9(_0x3ba3a7){try{_0x2a626c(_0x15a919['throw'](_0x3ba3a7));}catch(_0x2be45d){_0x1e27af(_0x2be45d);}}function _0x2a626c(_0x42d3e4){_0x42d3e4['done']?_0x3540d7(_0x42d3e4['value']):_0x21612d(_0x42d3e4['value'])['then'](_0x1e88b5,_0x48efd9);}_0x2a626c((_0x15a919=_0x15a919['apply'](_0x51132b,_0x162984||[]))['next']());});};class ListService{constructor(_0x1ba414,_0x2b8030){this['tokenManager']=_0x1ba414,this['fetch']=_0x2b8030;}['add'](_0x4f10d9,_0x5ab332,_0x1f6920){return __awaiter$1(this,void 0,void 0,function*(){const _0x30ad45=yield this['tokenManager']['getOrRefreshTokens'](_0x1f6920);if(!_0x30ad45['isSuccess'])return new FailedAccountResponse(_0x30ad45['toProblem']());_0x1f6920=_0x30ad45['toSuccess']();const _0x418845='List',_0x22835e={'account_name':_0x4f10d9,'list_name':_0x5ab332};try{const _0x23991c=yield this['fetch']['post'](_0x418845,_0x1f6920['access_token'],_0x22835e);if(_0x23991c['status']>0xc7&&_0x23991c['status']<0x12c){const _0xd02f2d=yield _0x23991c['json']();return new SuccessfulAccountResponse(_0xd02f2d);}const _0x42d7ae=yield _0x23991c['json']();return new FailedAccountResponse(_0x42d7ae);}catch(_0xf77691){if(_0xf77691 instanceof Error)return new FailedAccountResponse({'detail':_0xf77691['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0xf77691;}});}['remove'](_0x4bf452,_0x5253eb,_0x20f387){return __awaiter$1(this,void 0,void 0,function*(){const _0x30422c=yield this['tokenManager']['getOrRefreshTokens'](_0x20f387);if(!_0x30422c['isSuccess'])return new FailedAccountResponse(_0x30422c['toProblem']());_0x20f387=_0x30422c['toSuccess']();const _0x4fbb70='List/'+_0x4bf452+'/'+_0x5253eb,_0x279c82=yield this['fetch']['delete'](_0x4fbb70,_0x20f387['access_token']);try{if(_0x279c82['status']>0xc7&&_0x279c82['status']<0x12c){const _0x259ad6=yield _0x279c82['json']();return new SuccessfulAccountResponse(_0x259ad6);}const _0x14a318=yield _0x279c82['json']();return new FailedAccountResponse(_0x14a318);}catch(_0x104c7f){if(_0x104c7f instanceof Error)return new FailedAccountResponse({'detail':_0x104c7f['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x104c7f;}});}}
11
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x163567,_0x1b50fc,_0x4b1c35,_0x42b115){function _0x411ba7(_0x2fc545){return _0x2fc545 instanceof _0x4b1c35?_0x2fc545:new _0x4b1c35(function(_0x5e0d53){_0x5e0d53(_0x2fc545);});}return new(_0x4b1c35||(_0x4b1c35=Promise))(function(_0x52f34a,_0x5a4944){function _0x4be41c(_0x5254c3){try{_0x7885f4(_0x42b115['next'](_0x5254c3));}catch(_0x40caed){_0x5a4944(_0x40caed);}}function _0x5cf241(_0x29d469){try{_0x7885f4(_0x42b115['throw'](_0x29d469));}catch(_0x7632de){_0x5a4944(_0x7632de);}}function _0x7885f4(_0x50bde0){_0x50bde0['done']?_0x52f34a(_0x50bde0['value']):_0x411ba7(_0x50bde0['value'])['then'](_0x4be41c,_0x5cf241);}_0x7885f4((_0x42b115=_0x42b115['apply'](_0x163567,_0x1b50fc||[]))['next']());});};class ListService{constructor(_0x5eb57d,_0x177976){this['tokenManager']=_0x5eb57d,this['fetch']=_0x177976;}['add'](_0x3b1c19,_0x3c00e8,_0x105d7a){return __awaiter$1(this,void 0,void 0,function*(){const _0x5a88c7=yield this['tokenManager']['getOrRefreshTokens'](_0x105d7a);if(!_0x5a88c7['isSuccess'])return new FailedAccountResponse(_0x5a88c7['toProblem']());_0x105d7a=_0x5a88c7['toSuccess']();const _0x28b095='List',_0x5ce0c9={'account_name':_0x3b1c19,'list_name':_0x3c00e8};try{const _0x25028b=yield this['fetch']['post'](_0x28b095,_0x105d7a['access_token'],_0x5ce0c9);if(_0x25028b['status']>0xc7&&_0x25028b['status']<0x12c){const _0x84d4c0=yield _0x25028b['json']();return new SuccessfulAccountResponse(_0x84d4c0);}const _0x41b370=yield _0x25028b['json']();return new FailedAccountResponse(_0x41b370);}catch(_0x53de12){if(_0x53de12 instanceof Error)return new FailedAccountResponse({'detail':_0x53de12['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x53de12;}});}['remove'](_0x51228e,_0xd08c70,_0x5f5d67){return __awaiter$1(this,void 0,void 0,function*(){const _0x5f3ca9=yield this['tokenManager']['getOrRefreshTokens'](_0x5f5d67);if(!_0x5f3ca9['isSuccess'])return new FailedAccountResponse(_0x5f3ca9['toProblem']());_0x5f5d67=_0x5f3ca9['toSuccess']();const _0x12cd03='List/'+_0x51228e+'/'+_0xd08c70,_0x4b1701=yield this['fetch']['delete'](_0x12cd03,_0x5f5d67['access_token']);try{if(_0x4b1701['status']>0xc7&&_0x4b1701['status']<0x12c){const _0x154f46=yield _0x4b1701['json']();return new SuccessfulAccountResponse(_0x154f46);}const _0x246940=yield _0x4b1701['json']();return new FailedAccountResponse(_0x246940);}catch(_0x341fc2){if(_0x341fc2 instanceof Error)return new FailedAccountResponse({'detail':_0x341fc2['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x341fc2;}});}}
12
12
 
13
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x2462b7,_0x326170,_0x43a3d3,_0x837eac){function _0x37322e(_0x4ad21f){return _0x4ad21f instanceof _0x43a3d3?_0x4ad21f:new _0x43a3d3(function(_0x5a96a6){_0x5a96a6(_0x4ad21f);});}return new(_0x43a3d3||(_0x43a3d3=Promise))(function(_0x2aa0a6,_0x3c6eb8){function _0x3d42de(_0x3e8cd6){try{_0x49b51e(_0x837eac['next'](_0x3e8cd6));}catch(_0x46a3b1){_0x3c6eb8(_0x46a3b1);}}function _0x59dea2(_0x19fec7){try{_0x49b51e(_0x837eac['throw'](_0x19fec7));}catch(_0x40f97c){_0x3c6eb8(_0x40f97c);}}function _0x49b51e(_0x3fc397){_0x3fc397['done']?_0x2aa0a6(_0x3fc397['value']):_0x37322e(_0x3fc397['value'])['then'](_0x3d42de,_0x59dea2);}_0x49b51e((_0x837eac=_0x837eac['apply'](_0x2462b7,_0x326170||[]))['next']());});};class TokenManager{constructor(_0x2304cd){this['authClient']=_0x2304cd;}['getOrRefreshTokens'](_0x194436){return __awaiter(this,void 0,void 0,function*(){if(Date['now']()<_0x194436['access_expires'])return new SuccessfulAuthResponse(_0x194436);if(Date['now']()>_0x194436['refresh_expires'])return yield this['authClient']['refresh'](_0x194436['refresh_token']);return new FailedAuthResponse({'detail':'Refresh\x20token\x20expired','title':'','status':0x194,'instance':'','type':''});});}}
13
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x2c68d5,_0x2f641b,_0x9b3315,_0x20d1ab){function _0x5176fb(_0x530933){return _0x530933 instanceof _0x9b3315?_0x530933:new _0x9b3315(function(_0x30ae66){_0x30ae66(_0x530933);});}return new(_0x9b3315||(_0x9b3315=Promise))(function(_0x16abef,_0x127653){function _0x213739(_0x1a3bba){try{_0x50e864(_0x20d1ab['next'](_0x1a3bba));}catch(_0xf2d8bd){_0x127653(_0xf2d8bd);}}function _0x5c75ba(_0x3725a2){try{_0x50e864(_0x20d1ab['throw'](_0x3725a2));}catch(_0x4b5730){_0x127653(_0x4b5730);}}function _0x50e864(_0x2e5c26){_0x2e5c26['done']?_0x16abef(_0x2e5c26['value']):_0x5176fb(_0x2e5c26['value'])['then'](_0x213739,_0x5c75ba);}_0x50e864((_0x20d1ab=_0x20d1ab['apply'](_0x2c68d5,_0x2f641b||[]))['next']());});};class TokenManager{constructor(_0x135fae){this['authClient']=_0x135fae;}['getOrRefreshTokens'](_0x5f2099){return __awaiter(this,void 0,void 0,function*(){if(Date['now']()<_0x5f2099['access_expires'])return new SuccessfulAuthResponse(_0x5f2099);if(Date['now']()>_0x5f2099['refresh_expires'])return yield this['authClient']['refresh'](_0x5f2099['refresh_token']);return new FailedAuthResponse({'detail':'Refresh\x20token\x20expired','title':'','status':0x194,'instance':'','type':''});});}}
14
14
 
15
- class AdminClient{constructor(_0x488819,_0x3f07f7='https://admin.searchability.dev/'){var _0x3e6a16=new TokenManager(_0x488819),_0x1e27ce=new Fetch(_0x3f07f7);this['Accounts']=new AccountService(_0x3e6a16,_0x1e27ce),this['Lists']=new ListService(_0x3e6a16,_0x1e27ce),this['ApiKeys']=new ApiKeyService(_0x3e6a16,_0x1e27ce);}}
15
+ class AdminClient{constructor(_0x127ac7,_0x20a834='https://admin.searchability.dev/'){var _0x2eab34=new TokenManager(_0x127ac7),_0x3dc468=new Fetch(_0x20a834);this['Accounts']=new AccountService(_0x2eab34,_0x3dc468),this['Lists']=new ListService(_0x2eab34,_0x3dc468),this['ApiKeys']=new ApiKeyService(_0x2eab34,_0x3dc468);}}
16
16
 
17
17
  export { AdminClient as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@searchability/admin-client",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "description": "Searchability admin client.",
5
5
  "type": "module",
6
6
  "types": "./dist/types.d.ts",
@@ -1,17 +0,0 @@
1
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x4e84ea,_0xf1ae15,_0x5ebedb,_0x37e57f){function _0x25091a(_0x5a828a){return _0x5a828a instanceof _0x5ebedb?_0x5a828a:new _0x5ebedb(function(_0x23cd2a){_0x23cd2a(_0x5a828a);});}return new(_0x5ebedb||(_0x5ebedb=Promise))(function(_0x1d9633,_0x9bfd9f){function _0x57e1b1(_0x353301){try{_0x32539a(_0x37e57f['next'](_0x353301));}catch(_0x317117){_0x9bfd9f(_0x317117);}}function _0x621b27(_0x4353d1){try{_0x32539a(_0x37e57f['throw'](_0x4353d1));}catch(_0x53021c){_0x9bfd9f(_0x53021c);}}function _0x32539a(_0x227d17){_0x227d17['done']?_0x1d9633(_0x227d17['value']):_0x25091a(_0x227d17['value'])['then'](_0x57e1b1,_0x621b27);}_0x32539a((_0x37e57f=_0x37e57f['apply'](_0x4e84ea,_0xf1ae15||[]))['next']());});};class Fetch{constructor(_0xdc4de7){this['baseUri']=_0xdc4de7,this['getUrl']=_0x2abbc1=>{return _0x2abbc1['startsWith']('/')&&(_0x2abbc1=_0x2abbc1['replace']('/','')),''+this['baseUri']+_0x2abbc1;},!_0xdc4de7['endsWith']('/')&&(_0xdc4de7=_0xdc4de7+'/');}['get'](_0x396f4d,_0x2c9a93){return __awaiter$4(this,void 0,void 0,function*(){const _0x3881bc=this['getUrl'](_0x396f4d);return yield fetch(_0x3881bc,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2c9a93}});});}['post'](_0x2878fd,_0x57ee2f,_0x485dcb){return __awaiter$4(this,void 0,void 0,function*(){const _0x44b0f8=this['getUrl'](_0x2878fd);return yield fetch(_0x44b0f8,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x57ee2f},'body':_0x485dcb?JSON['stringify'](_0x485dcb):null});});}['put'](_0x417918,_0x13e259,_0x52cbff){return __awaiter$4(this,void 0,void 0,function*(){const _0x2a6e72=this['getUrl'](_0x417918);return yield fetch(_0x2a6e72,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x13e259},'body':_0x52cbff?JSON['stringify'](_0x52cbff):null});});}['delete'](_0x17d527,_0x16b3f6){return __awaiter$4(this,void 0,void 0,function*(){const _0xe72478=this['getUrl'](_0x17d527);return yield fetch(_0xe72478,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x16b3f6}});});}}
2
-
3
- undefined&&undefined['__awaiter']||function(_0x3c5743,_0x2a5bda,_0x2a811c,_0x37e568){function _0x265efa(_0x1e4cc0){return _0x1e4cc0 instanceof _0x2a811c?_0x1e4cc0:new _0x2a811c(function(_0x17b452){_0x17b452(_0x1e4cc0);});}return new(_0x2a811c||(_0x2a811c=Promise))(function(_0x4ee972,_0x19d76a){function _0x72288b(_0x4b77ac){try{_0x1babee(_0x37e568['next'](_0x4b77ac));}catch(_0x181f5d){_0x19d76a(_0x181f5d);}}function _0x64e6fc(_0x43fe64){try{_0x1babee(_0x37e568['throw'](_0x43fe64));}catch(_0x9604f4){_0x19d76a(_0x9604f4);}}function _0x1babee(_0x1a369d){_0x1a369d['done']?_0x4ee972(_0x1a369d['value']):_0x265efa(_0x1a369d['value'])['then'](_0x72288b,_0x64e6fc);}_0x1babee((_0x37e568=_0x37e568['apply'](_0x3c5743,_0x2a5bda||[]))['next']());});};
4
-
5
- class Response{constructor(_0x43331a){this['isSuccess']=_0x43331a;}}class SuccessfulAccountResponse extends Response{constructor(_0x18ad8b){super(!![]),this['account']=_0x18ad8b;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x5ca6f4){super(![]),this['problem']=_0x5ca6f4;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x428d76){super(!![]),this['tokens']=_0x428d76;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x3c7aff){super(![]),this['problem']=_0x3c7aff;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x59428c){super(!![]),this['apiKey']=_0x59428c;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x41ce9d){super(![]),this['problem']=_0x41ce9d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
6
-
7
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x4f376a,_0x5311cc,_0x30b08f,_0x20c2b9){function _0x511ffd(_0x3bbfa0){return _0x3bbfa0 instanceof _0x30b08f?_0x3bbfa0:new _0x30b08f(function(_0x2d564a){_0x2d564a(_0x3bbfa0);});}return new(_0x30b08f||(_0x30b08f=Promise))(function(_0x3c352e,_0x1c70f4){function _0x42aa75(_0x4addaf){try{_0x41526a(_0x20c2b9['next'](_0x4addaf));}catch(_0x14ddb5){_0x1c70f4(_0x14ddb5);}}function _0x410df6(_0x5b85c4){try{_0x41526a(_0x20c2b9['throw'](_0x5b85c4));}catch(_0x358f66){_0x1c70f4(_0x358f66);}}function _0x41526a(_0x218f7b){_0x218f7b['done']?_0x3c352e(_0x218f7b['value']):_0x511ffd(_0x218f7b['value'])['then'](_0x42aa75,_0x410df6);}_0x41526a((_0x20c2b9=_0x20c2b9['apply'](_0x4f376a,_0x5311cc||[]))['next']());});};class AccountService{constructor(_0x20b91a,_0x4f3228){this['tokenManager']=_0x20b91a,this['fetch']=_0x4f3228;}['get'](_0x494659,_0x4aec94){return __awaiter$3(this,void 0,void 0,function*(){const _0x2ddcc5=yield this['tokenManager']['getOrRefreshTokens'](_0x4aec94);if(!_0x2ddcc5['isSuccess'])return new FailedAccountResponse(_0x2ddcc5['toProblem']());_0x4aec94=_0x2ddcc5['toSuccess']();const _0x4a3b83='Account/'+_0x494659+'/',_0xda1603=yield this['fetch']['get'](_0x4a3b83,_0x4aec94['access_token']);try{if(_0xda1603['status']>0xc7&&_0xda1603['status']<0x12c){const _0x2f5b00=yield _0xda1603['json']();return new SuccessfulAccountResponse(_0x2f5b00);}const _0x5c764b=yield _0xda1603['json']();return new FailedAccountResponse(_0x5c764b);}catch(_0x64176b){if(_0x64176b instanceof Error)return new FailedAccountResponse({'detail':_0x64176b['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x64176b;}});}}
8
-
9
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x51da42,_0x131116,_0x56006e,_0x77b2e6){function _0x1bf265(_0x309a61){return _0x309a61 instanceof _0x56006e?_0x309a61:new _0x56006e(function(_0x403746){_0x403746(_0x309a61);});}return new(_0x56006e||(_0x56006e=Promise))(function(_0x9d8b54,_0x3aa3c0){function _0x417410(_0x34e5b4){try{_0x4cbccb(_0x77b2e6['next'](_0x34e5b4));}catch(_0x1ef813){_0x3aa3c0(_0x1ef813);}}function _0x7fb333(_0x49e7d7){try{_0x4cbccb(_0x77b2e6['throw'](_0x49e7d7));}catch(_0x55dd2e){_0x3aa3c0(_0x55dd2e);}}function _0x4cbccb(_0x56496d){_0x56496d['done']?_0x9d8b54(_0x56496d['value']):_0x1bf265(_0x56496d['value'])['then'](_0x417410,_0x7fb333);}_0x4cbccb((_0x77b2e6=_0x77b2e6['apply'](_0x51da42,_0x131116||[]))['next']());});};class ApiKeyService{constructor(_0x1e3c54,_0x8ef509){this['tokenManager']=_0x1e3c54,this['fetch']=_0x8ef509;}['create'](_0x593e2f,_0x588c69,_0x8aa8ba){return __awaiter$2(this,void 0,void 0,function*(){const _0x17495b=yield this['tokenManager']['getOrRefreshTokens'](_0x8aa8ba);if(!_0x17495b['isSuccess'])return new FailedApiKeyResponse(_0x17495b['toProblem']());_0x8aa8ba=_0x17495b['toSuccess']();const _0x1b5956='ApiKey/Create',_0x23a328={'account_name':_0x593e2f,'name':_0x588c69};try{const _0x5b37db=yield this['fetch']['post'](_0x1b5956,_0x8aa8ba['access_token'],_0x23a328);if(_0x5b37db['status']>0xc7&&_0x5b37db['status']<0x12c){const _0x466da3=yield _0x5b37db['json']();return new SuccessfulApiKeyResponse(_0x466da3);}const _0x423da7=yield _0x5b37db['json']();return new FailedApiKeyResponse(_0x423da7);}catch(_0x23f0f9){if(_0x23f0f9 instanceof Error)return new FailedApiKeyResponse({'detail':_0x23f0f9['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x23f0f9;}});}}
10
-
11
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x5e0757,_0x3c8ce0,_0x3d072d,_0x2877c8){function _0x4a402e(_0x53564c){return _0x53564c instanceof _0x3d072d?_0x53564c:new _0x3d072d(function(_0x5eb723){_0x5eb723(_0x53564c);});}return new(_0x3d072d||(_0x3d072d=Promise))(function(_0x2e1a62,_0x5e95f7){function _0x3d3da9(_0x1438b4){try{_0xc6b981(_0x2877c8['next'](_0x1438b4));}catch(_0x1d0224){_0x5e95f7(_0x1d0224);}}function _0x114c30(_0x204a18){try{_0xc6b981(_0x2877c8['throw'](_0x204a18));}catch(_0x3885f2){_0x5e95f7(_0x3885f2);}}function _0xc6b981(_0x4a62a5){_0x4a62a5['done']?_0x2e1a62(_0x4a62a5['value']):_0x4a402e(_0x4a62a5['value'])['then'](_0x3d3da9,_0x114c30);}_0xc6b981((_0x2877c8=_0x2877c8['apply'](_0x5e0757,_0x3c8ce0||[]))['next']());});};class ListService{constructor(_0x31195b,_0x3223f6){this['tokenManager']=_0x31195b,this['fetch']=_0x3223f6;}['add'](_0x18f358,_0x29ee43,_0x9da558){return __awaiter$1(this,void 0,void 0,function*(){const _0x398951=yield this['tokenManager']['getOrRefreshTokens'](_0x9da558);if(!_0x398951['isSuccess'])return new FailedAccountResponse(_0x398951['toProblem']());_0x9da558=_0x398951['toSuccess']();const _0xc97b90='List',_0xb94bca={'account_name':_0x18f358,'list_name':_0x29ee43};try{const _0x2dd70d=yield this['fetch']['post'](_0xc97b90,_0x9da558['access_token'],_0xb94bca);if(_0x2dd70d['status']>0xc7&&_0x2dd70d['status']<0x12c){const _0x4ddfb9=yield _0x2dd70d['json']();return new SuccessfulAccountResponse(_0x4ddfb9);}const _0x3adc14=yield _0x2dd70d['json']();return new FailedAccountResponse(_0x3adc14);}catch(_0x5a33cc){if(_0x5a33cc instanceof Error)return new FailedAccountResponse({'detail':_0x5a33cc['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x5a33cc;}});}['remove'](_0x370b30,_0x5c6161,_0x4ce7f3){return __awaiter$1(this,void 0,void 0,function*(){const _0x264bcc=yield this['tokenManager']['getOrRefreshTokens'](_0x4ce7f3);if(!_0x264bcc['isSuccess'])return new FailedAccountResponse(_0x264bcc['toProblem']());_0x4ce7f3=_0x264bcc['toSuccess']();const _0x353b1e='List/'+_0x370b30+'/'+_0x5c6161,_0x1dfcc2=yield this['fetch']['delete'](_0x353b1e,_0x4ce7f3['access_token']);try{if(_0x1dfcc2['status']>0xc7&&_0x1dfcc2['status']<0x12c){const _0x4b9015=yield _0x1dfcc2['json']();return new SuccessfulAccountResponse(_0x4b9015);}const _0x587ff6=yield _0x1dfcc2['json']();return new FailedAccountResponse(_0x587ff6);}catch(_0x3c7314){if(_0x3c7314 instanceof Error)return new FailedAccountResponse({'detail':_0x3c7314['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x3c7314;}});}}
12
-
13
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x369b4f,_0x5dc0bf,_0x3f6822,_0x31ca5e){function _0x200084(_0x4b9218){return _0x4b9218 instanceof _0x3f6822?_0x4b9218:new _0x3f6822(function(_0x445189){_0x445189(_0x4b9218);});}return new(_0x3f6822||(_0x3f6822=Promise))(function(_0x32d081,_0x504273){function _0x5bc432(_0x2eff04){try{_0x2b4be2(_0x31ca5e['next'](_0x2eff04));}catch(_0x4cd0e5){_0x504273(_0x4cd0e5);}}function _0x5e1489(_0x2af077){try{_0x2b4be2(_0x31ca5e['throw'](_0x2af077));}catch(_0xf19cee){_0x504273(_0xf19cee);}}function _0x2b4be2(_0x31ca81){_0x31ca81['done']?_0x32d081(_0x31ca81['value']):_0x200084(_0x31ca81['value'])['then'](_0x5bc432,_0x5e1489);}_0x2b4be2((_0x31ca5e=_0x31ca5e['apply'](_0x369b4f,_0x5dc0bf||[]))['next']());});};class TokenManager{constructor(_0x24ef69){this['authClient']=_0x24ef69;}['getOrRefreshTokens'](_0x5a28de){return __awaiter(this,void 0,void 0,function*(){if(Date['now']()<_0x5a28de['access_expires'])return new SuccessfulAuthResponse(_0x5a28de);if(Date['now']()>_0x5a28de['refresh_expires'])return yield this['authClient']['refresh'](_0x5a28de['refresh_token']);return new FailedAuthResponse({'detail':'Refresh\x20token\x20expired','title':'','status':0x194,'instance':'','type':''});});}}
14
-
15
- class AdminClient{constructor(_0x221e31,_0x2c5098='https://admin.searchability.dev/'){var _0x269c06=new TokenManager(_0x221e31),_0xa2c5b6=new Fetch(_0x2c5098);this['Accounts']=new AccountService(_0x269c06,_0xa2c5b6),this['Lists']=new ListService(_0x269c06,_0xa2c5b6),this['ApiKeys']=new ApiKeyService(_0x269c06,_0xa2c5b6);}}
16
-
17
- export { AdminClient as default };