@searchability/admin-client 0.0.29 → 0.0.30

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,15 @@
1
+ var TokenStatus;(function(_0x1c24e7){_0x1c24e7[_0x1c24e7['Ok']=0x0]='Ok',_0x1c24e7[_0x1c24e7['Refresh']=0x1]='Refresh',_0x1c24e7[_0x1c24e7['Expired']=0x2]='Expired';}(TokenStatus||(TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}['getStatus'](){if(Date['now']()<this['access_expires'])return TokenStatus['Ok'];if(Date['now']()<this['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
2
+
3
+ class Response{constructor(_0x466916){this['isSuccess']=_0x466916;}}class SuccessfulAccountResponse extends Response{constructor(_0x5cd85){super(!![]),this['account']=_0x5cd85;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0xf8db75){super(![]),this['problem']=_0xf8db75;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x153196){super(!![]),this['tokens']=_0x153196;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x246ce6){super(![]),this['problem']=_0x246ce6;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x1adb57){super(!![]),this['apiKey']=_0x1adb57;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x5473d3){super(![]),this['problem']=_0x5473d3;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x4c040e){super(!![]),this['apiKeyValue']=_0x4c040e;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyValueResponse extends Response{constructor(_0x14addb){super(![]),this['problem']=_0x14addb;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
4
+
5
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x3e7003,_0x405af2,_0x23925f,_0x46a238){function _0x58d464(_0x10b50a){return _0x10b50a instanceof _0x23925f?_0x10b50a:new _0x23925f(function(_0x26fc21){_0x26fc21(_0x10b50a);});}return new(_0x23925f||(_0x23925f=Promise))(function(_0xb62bfb,_0x4ad71c){function _0x9568e1(_0x321563){try{_0x25fbf0(_0x46a238['next'](_0x321563));}catch(_0x46b800){_0x4ad71c(_0x46b800);}}function _0x16667c(_0x546efd){try{_0x25fbf0(_0x46a238['throw'](_0x546efd));}catch(_0x4864b){_0x4ad71c(_0x4864b);}}function _0x25fbf0(_0x5cbea3){_0x5cbea3['done']?_0xb62bfb(_0x5cbea3['value']):_0x58d464(_0x5cbea3['value'])['then'](_0x9568e1,_0x16667c);}_0x25fbf0((_0x46a238=_0x46a238['apply'](_0x3e7003,_0x405af2||[]))['next']());});};class AccountService{constructor(_0x56520c){this['fetch']=_0x56520c;}['get'](_0x61fa1a,_0x1bc643){return __awaiter$4(this,void 0,void 0,function*(){const _0x222dd4='Account/'+_0x61fa1a+'/',_0x163ff3=yield this['fetch']['get'](_0x222dd4,_0x1bc643);try{if(_0x163ff3['status']>0xc7&&_0x163ff3['status']<0x12c){const _0xf1ce00=yield _0x163ff3['json']();return new SuccessfulAccountResponse(_0xf1ce00);}const _0x1e35b8=yield _0x163ff3['json']();return new FailedAccountResponse(_0x1e35b8);}catch(_0x45410e){if(_0x45410e instanceof Error)return new FailedAccountResponse({'detail':_0x45410e['message'],'title':_0x45410e['name'],'status':0x1f4,'instance':'','type':''});throw _0x45410e;}});}}
6
+
7
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x3458cf,_0x2c5821,_0x777c4,_0x4dce3f){function _0x2b0df1(_0x134d8c){return _0x134d8c instanceof _0x777c4?_0x134d8c:new _0x777c4(function(_0x244a40){_0x244a40(_0x134d8c);});}return new(_0x777c4||(_0x777c4=Promise))(function(_0x501788,_0x303b35){function _0x282b89(_0x100484){try{_0x2ec946(_0x4dce3f['next'](_0x100484));}catch(_0x1cc0b1){_0x303b35(_0x1cc0b1);}}function _0x3d0962(_0x165ab0){try{_0x2ec946(_0x4dce3f['throw'](_0x165ab0));}catch(_0x47ccbe){_0x303b35(_0x47ccbe);}}function _0x2ec946(_0x2308c5){_0x2308c5['done']?_0x501788(_0x2308c5['value']):_0x2b0df1(_0x2308c5['value'])['then'](_0x282b89,_0x3d0962);}_0x2ec946((_0x4dce3f=_0x4dce3f['apply'](_0x3458cf,_0x2c5821||[]))['next']());});};class ApiKeyService{constructor(_0x549a9f){this['fetch']=_0x549a9f;}['create'](_0x32d15d,_0x15e73b,_0x409fcf){return __awaiter$3(this,void 0,void 0,function*(){const _0x2b4e18='api-key/create',_0x292642={'account_name':_0x32d15d,'api_key_name':_0x15e73b};try{const _0x5bff52=yield this['fetch']['post'](_0x2b4e18,_0x409fcf,_0x292642);if(_0x5bff52['status']>0xc7&&_0x5bff52['status']<0x12c){const _0x5929a0=yield _0x5bff52['json']();return new SuccessfulApiKeyResponse(_0x5929a0);}const _0x3dcf20=yield _0x5bff52['json']();return new FailedApiKeyResponse(_0x3dcf20);}catch(_0x3155b5){if(_0x3155b5 instanceof Error)return new FailedApiKeyResponse({'detail':_0x3155b5['message'],'title':_0x3155b5['name'],'status':0x1f4,'instance':'','type':''});throw _0x3155b5;}});}['view'](_0x1e891c,_0x14be47,_0x363848){return __awaiter$3(this,void 0,void 0,function*(){const _0x235204='api-key/'+_0x1e891c+'/'+_0x14be47;try{const _0x95d194=yield this['fetch']['get'](_0x235204,_0x363848);if(_0x95d194['status']>0xc7&&_0x95d194['status']<0x12c){const _0x13d8e6=yield _0x95d194['json']();return new SuccessfulApiKeyValueResponse(_0x13d8e6);}const _0x59da4c=yield _0x95d194['json']();return new FailedApiKeyValueResponse(_0x59da4c);}catch(_0x2005ce){if(_0x2005ce instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x2005ce['message'],'title':_0x2005ce['name'],'status':0x1f4,'instance':'','type':''});throw _0x2005ce;}});}}
8
+
9
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0xa61049,_0x1425d6,_0x433b0e,_0x1ad337){function _0x1b17d1(_0x1e3701){return _0x1e3701 instanceof _0x433b0e?_0x1e3701:new _0x433b0e(function(_0x13795c){_0x13795c(_0x1e3701);});}return new(_0x433b0e||(_0x433b0e=Promise))(function(_0x341b60,_0x3499a3){function _0x2f4a85(_0x5ccfd1){try{_0x2b8834(_0x1ad337['next'](_0x5ccfd1));}catch(_0x35b402){_0x3499a3(_0x35b402);}}function _0x412c29(_0x5c9f6d){try{_0x2b8834(_0x1ad337['throw'](_0x5c9f6d));}catch(_0xebba1e){_0x3499a3(_0xebba1e);}}function _0x2b8834(_0x4dfd97){_0x4dfd97['done']?_0x341b60(_0x4dfd97['value']):_0x1b17d1(_0x4dfd97['value'])['then'](_0x2f4a85,_0x412c29);}_0x2b8834((_0x1ad337=_0x1ad337['apply'](_0xa61049,_0x1425d6||[]))['next']());});};class ListService{constructor(_0x378e82){this['fetch']=_0x378e82;}['add'](_0x35f29f,_0x3e5900,_0x16d306){return __awaiter$2(this,void 0,void 0,function*(){const _0x23a81a='List',_0x23318d={'account_name':_0x35f29f,'list_name':_0x3e5900};try{const _0x25952e=yield this['fetch']['post'](_0x23a81a,_0x16d306,_0x23318d);if(_0x25952e['status']>0xc7&&_0x25952e['status']<0x12c){const _0xcdeddb=yield _0x25952e['json']();return new SuccessfulAccountResponse(_0xcdeddb);}const _0x1c401d=yield _0x25952e['json']();return new FailedAccountResponse(_0x1c401d);}catch(_0x1e3d6c){if(_0x1e3d6c instanceof Error)return new FailedAccountResponse({'detail':_0x1e3d6c['message'],'title':_0x1e3d6c['name'],'status':0x1f4,'instance':'','type':''});throw _0x1e3d6c;}});}['remove'](_0xeb093f,_0x5d3635,_0x30eb7e){return __awaiter$2(this,void 0,void 0,function*(){const _0x4850ec='List/'+_0xeb093f+'/'+_0x5d3635,_0x506e56=yield this['fetch']['delete'](_0x4850ec,_0x30eb7e);try{if(_0x506e56['status']>0xc7&&_0x506e56['status']<0x12c){const _0x673c5=yield _0x506e56['json']();return new SuccessfulAccountResponse(_0x673c5);}const _0x551adc=yield _0x506e56['json']();return new FailedAccountResponse(_0x551adc);}catch(_0x5c6aff){if(_0x5c6aff instanceof Error)return new FailedAccountResponse({'detail':_0x5c6aff['message'],'title':_0x5c6aff['name'],'status':0x1f4,'instance':'','type':''});throw _0x5c6aff;}});}}
10
+
11
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x38ba30,_0x2a88da,_0x204618,_0x347ba5){function _0x589648(_0x1c9a95){return _0x1c9a95 instanceof _0x204618?_0x1c9a95:new _0x204618(function(_0xd78867){_0xd78867(_0x1c9a95);});}return new(_0x204618||(_0x204618=Promise))(function(_0x418a68,_0x975baa){function _0x4e33b7(_0x5e1325){try{_0x2d8f43(_0x347ba5['next'](_0x5e1325));}catch(_0x1fa427){_0x975baa(_0x1fa427);}}function _0x3d4675(_0x355872){try{_0x2d8f43(_0x347ba5['throw'](_0x355872));}catch(_0x46e765){_0x975baa(_0x46e765);}}function _0x2d8f43(_0x20ea79){_0x20ea79['done']?_0x418a68(_0x20ea79['value']):_0x589648(_0x20ea79['value'])['then'](_0x4e33b7,_0x3d4675);}_0x2d8f43((_0x347ba5=_0x347ba5['apply'](_0x38ba30,_0x2a88da||[]))['next']());});};class Fetch{constructor(_0x23208c){this['baseUri']=_0x23208c,this['getUrl']=_0x529d17=>{return _0x529d17['startsWith']('/')&&(_0x529d17=_0x529d17['replace']('/','')),''+this['baseUri']+_0x529d17;},!_0x23208c['endsWith']('/')&&(_0x23208c=_0x23208c+'/');}['get'](_0x3563ba,_0x59d133){return __awaiter$1(this,void 0,void 0,function*(){const _0x493972=this['getUrl'](_0x3563ba);return yield fetch(_0x493972,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x59d133}});});}['post'](_0x479894,_0x53e044,_0x306ff5){return __awaiter$1(this,void 0,void 0,function*(){const _0x4dda7d=this['getUrl'](_0x479894);return yield fetch(_0x4dda7d,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x53e044},'body':_0x306ff5?JSON['stringify'](_0x306ff5):null});});}['put'](_0x1beb5a,_0x1b8658,_0x1e29a2){return __awaiter$1(this,void 0,void 0,function*(){const _0x18e583=this['getUrl'](_0x1beb5a);return yield fetch(_0x18e583,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1b8658},'body':_0x1e29a2?JSON['stringify'](_0x1e29a2):null});});}['delete'](_0x49a827,_0x270593){return __awaiter$1(this,void 0,void 0,function*(){const _0x1fdce8=this['getUrl'](_0x49a827);return yield fetch(_0x1fdce8,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x270593}});});}}
12
+
13
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x71ccfc,_0x4d099e,_0xd0085b,_0x2c51a6){function _0x445a5b(_0x22174e){return _0x22174e instanceof _0xd0085b?_0x22174e:new _0xd0085b(function(_0xfed01b){_0xfed01b(_0x22174e);});}return new(_0xd0085b||(_0xd0085b=Promise))(function(_0x21b500,_0x54be2e){function _0xf6c3c4(_0x38f151){try{_0x86b62a(_0x2c51a6['next'](_0x38f151));}catch(_0x138322){_0x54be2e(_0x138322);}}function _0x584a66(_0x2657f4){try{_0x86b62a(_0x2c51a6['throw'](_0x2657f4));}catch(_0x157ea4){_0x54be2e(_0x157ea4);}}function _0x86b62a(_0x2c0e8f){_0x2c0e8f['done']?_0x21b500(_0x2c0e8f['value']):_0x445a5b(_0x2c0e8f['value'])['then'](_0xf6c3c4,_0x584a66);}_0x86b62a((_0x2c51a6=_0x2c51a6['apply'](_0x71ccfc,_0x4d099e||[]))['next']());});};class AdminClient{constructor(_0xe23e38='https://admin.searchability.dev/'){var _0x550b93=new Fetch(_0xe23e38);this['Accounts']=new AccountService(_0x550b93),this['Lists']=new ListService(_0x550b93),this['ApiKeys']=new ApiKeyService(_0x550b93);}}class AuthClient{constructor(_0x56a394='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x56a394);}['login'](_0x594dc3){return __awaiter(this,void 0,void 0,function*(){var _0x5205aa='login/'+_0x594dc3;try{const _0x49be9c=yield yield fetch(_0x5205aa);if(_0x49be9c['status']>0xc7&&_0x49be9c['status']<0x12c){const _0x130817=yield _0x49be9c['json']();return new SuccessfulAuthResponse(_0x130817);}const _0x234576=yield _0x49be9c['json']();return new FailedAuthResponse(_0x234576);}catch(_0x5b555d){if(_0x5b555d instanceof Error)return new FailedAuthResponse({'detail':_0x5b555d['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x5b555d;}});}['refresh'](_0xc94d66){return __awaiter(this,void 0,void 0,function*(){var _0x23778b='refresh';try{const _0xc57c75=yield this['fetch']['post'](_0x23778b,_0xc94d66,null);if(_0xc57c75['status']>0xc7&&_0xc57c75['status']<0x12c){const _0x2d55c2=yield _0xc57c75['json']();return new SuccessfulAuthResponse(_0x2d55c2);}const _0x4abad2=yield _0xc57c75['json']();return new FailedAuthResponse(_0x4abad2);}catch(_0x4ebbe2){if(_0x4ebbe2 instanceof Error)return new FailedAuthResponse({'detail':_0x4ebbe2['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x4ebbe2;}});}}
14
+
15
+ export { AdminClient, AuthClient, Tokens };
@@ -1,18 +1,18 @@
1
1
  'use strict';
2
2
 
3
- exports.TokenStatus = void 0;(function(_0x24a862){_0x24a862[_0x24a862['Ok']=0x0]='Ok',_0x24a862[_0x24a862['Refresh']=0x1]='Refresh',_0x24a862[_0x24a862['Expired']=0x2]='Expired';}(exports.TokenStatus||(exports.TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}['getStatus'](){if(Date['now']()<this['access_expires'])return exports.TokenStatus['Ok'];if(Date['now']()<this['refresh_expires'])return exports.TokenStatus['Refresh'];return exports.TokenStatus['Expired'];}}
3
+ var TokenStatus;(function(_0x1bf9b6){_0x1bf9b6[_0x1bf9b6['Ok']=0x0]='Ok',_0x1bf9b6[_0x1bf9b6['Refresh']=0x1]='Refresh',_0x1bf9b6[_0x1bf9b6['Expired']=0x2]='Expired';}(TokenStatus||(TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}['getStatus'](){if(Date['now']()<this['access_expires'])return TokenStatus['Ok'];if(Date['now']()<this['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
4
4
 
5
- class Response{constructor(_0x3bce0a){this['isSuccess']=_0x3bce0a;}}class SuccessfulAccountResponse extends Response{constructor(_0x97abb5){super(!![]),this['account']=_0x97abb5;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x26fed6){super(![]),this['problem']=_0x26fed6;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x2f9d4a){super(!![]),this['tokens']=_0x2f9d4a;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x30e41a){super(![]),this['problem']=_0x30e41a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x11a573){super(!![]),this['apiKey']=_0x11a573;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x312f50){super(![]),this['problem']=_0x312f50;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x41321b){super(!![]),this['apiKeyValue']=_0x41321b;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyValueResponse extends Response{constructor(_0x2e837a){super(![]),this['problem']=_0x2e837a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
5
+ class Response{constructor(_0x2c2d04){this['isSuccess']=_0x2c2d04;}}class SuccessfulAccountResponse extends Response{constructor(_0x7dffb0){super(!![]),this['account']=_0x7dffb0;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x571a35){super(![]),this['problem']=_0x571a35;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x435cf0){super(!![]),this['tokens']=_0x435cf0;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x46cd5b){super(![]),this['problem']=_0x46cd5b;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x2c30bc){super(!![]),this['apiKey']=_0x2c30bc;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x26b4c2){super(![]),this['problem']=_0x26b4c2;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x5b1418){super(!![]),this['apiKeyValue']=_0x5b1418;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyValueResponse extends Response{constructor(_0x27b5ac){super(![]),this['problem']=_0x27b5ac;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
6
6
 
7
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x2f5bab,_0x1d0632,_0x89a6bd,_0x2a0702){function _0x47097e(_0x1d8be){return _0x1d8be instanceof _0x89a6bd?_0x1d8be:new _0x89a6bd(function(_0x267708){_0x267708(_0x1d8be);});}return new(_0x89a6bd||(_0x89a6bd=Promise))(function(_0x388da0,_0x4a8001){function _0x521832(_0x4aef24){try{_0x34a2c5(_0x2a0702['next'](_0x4aef24));}catch(_0xa65c95){_0x4a8001(_0xa65c95);}}function _0x3d23bc(_0x289fec){try{_0x34a2c5(_0x2a0702['throw'](_0x289fec));}catch(_0x4d75c4){_0x4a8001(_0x4d75c4);}}function _0x34a2c5(_0x9bece1){_0x9bece1['done']?_0x388da0(_0x9bece1['value']):_0x47097e(_0x9bece1['value'])['then'](_0x521832,_0x3d23bc);}_0x34a2c5((_0x2a0702=_0x2a0702['apply'](_0x2f5bab,_0x1d0632||[]))['next']());});};class AccountService{constructor(_0x1407cd){this['fetch']=_0x1407cd;}['get'](_0x6a7ee0,_0x398a88){return __awaiter$4(this,void 0,void 0,function*(){const _0x295606='Account/'+_0x6a7ee0+'/',_0x2d2715=yield this['fetch']['get'](_0x295606,_0x398a88);try{if(_0x2d2715['status']>0xc7&&_0x2d2715['status']<0x12c){const _0x182f27=yield _0x2d2715['json']();return new SuccessfulAccountResponse(_0x182f27);}const _0x4d5536=yield _0x2d2715['json']();return new FailedAccountResponse(_0x4d5536);}catch(_0x2a83d6){if(_0x2a83d6 instanceof Error)return new FailedAccountResponse({'detail':_0x2a83d6['message'],'title':_0x2a83d6['name'],'status':0x1f4,'instance':'','type':''});throw _0x2a83d6;}});}}
7
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x2d9c2e,_0x40d295,_0x386eb0,_0x488a67){function _0x494f28(_0x128f96){return _0x128f96 instanceof _0x386eb0?_0x128f96:new _0x386eb0(function(_0x11c7cd){_0x11c7cd(_0x128f96);});}return new(_0x386eb0||(_0x386eb0=Promise))(function(_0x4ab9c4,_0x129c3b){function _0x19d34a(_0x4994de){try{_0x16d0c7(_0x488a67['next'](_0x4994de));}catch(_0x12d082){_0x129c3b(_0x12d082);}}function _0x443d05(_0xb843bc){try{_0x16d0c7(_0x488a67['throw'](_0xb843bc));}catch(_0x2c33c5){_0x129c3b(_0x2c33c5);}}function _0x16d0c7(_0x15cce8){_0x15cce8['done']?_0x4ab9c4(_0x15cce8['value']):_0x494f28(_0x15cce8['value'])['then'](_0x19d34a,_0x443d05);}_0x16d0c7((_0x488a67=_0x488a67['apply'](_0x2d9c2e,_0x40d295||[]))['next']());});};class AccountService{constructor(_0x8da9d7){this['fetch']=_0x8da9d7;}['get'](_0x1b0ca0,_0x5e0b2a){return __awaiter$4(this,void 0,void 0,function*(){const _0x11cc04='Account/'+_0x1b0ca0+'/',_0x427737=yield this['fetch']['get'](_0x11cc04,_0x5e0b2a);try{if(_0x427737['status']>0xc7&&_0x427737['status']<0x12c){const _0xb06817=yield _0x427737['json']();return new SuccessfulAccountResponse(_0xb06817);}const _0x1f2838=yield _0x427737['json']();return new FailedAccountResponse(_0x1f2838);}catch(_0x11f26e){if(_0x11f26e instanceof Error)return new FailedAccountResponse({'detail':_0x11f26e['message'],'title':_0x11f26e['name'],'status':0x1f4,'instance':'','type':''});throw _0x11f26e;}});}}
8
8
 
9
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x540742,_0x7f802d,_0x433a44,_0x305ec2){function _0x3d9cf4(_0x25191b){return _0x25191b instanceof _0x433a44?_0x25191b:new _0x433a44(function(_0x14892c){_0x14892c(_0x25191b);});}return new(_0x433a44||(_0x433a44=Promise))(function(_0x1c9a60,_0x10e36d){function _0x24ff8e(_0xfd0b6){try{_0x2362bf(_0x305ec2['next'](_0xfd0b6));}catch(_0x5665d9){_0x10e36d(_0x5665d9);}}function _0x3e992f(_0x4d570e){try{_0x2362bf(_0x305ec2['throw'](_0x4d570e));}catch(_0x14499e){_0x10e36d(_0x14499e);}}function _0x2362bf(_0x21b157){_0x21b157['done']?_0x1c9a60(_0x21b157['value']):_0x3d9cf4(_0x21b157['value'])['then'](_0x24ff8e,_0x3e992f);}_0x2362bf((_0x305ec2=_0x305ec2['apply'](_0x540742,_0x7f802d||[]))['next']());});};class ApiKeyService{constructor(_0x4b16a4){this['fetch']=_0x4b16a4;}['create'](_0x2d79fc,_0x41fad2,_0x23c16f){return __awaiter$3(this,void 0,void 0,function*(){const _0x60df06='api-key/create',_0xc4c389={'account_name':_0x2d79fc,'api_key_name':_0x41fad2};try{const _0xec6325=yield this['fetch']['post'](_0x60df06,_0x23c16f,_0xc4c389);if(_0xec6325['status']>0xc7&&_0xec6325['status']<0x12c){const _0x36b110=yield _0xec6325['json']();return new SuccessfulApiKeyResponse(_0x36b110);}const _0x1d2c4e=yield _0xec6325['json']();return new FailedApiKeyResponse(_0x1d2c4e);}catch(_0x1b9024){if(_0x1b9024 instanceof Error)return new FailedApiKeyResponse({'detail':_0x1b9024['message'],'title':_0x1b9024['name'],'status':0x1f4,'instance':'','type':''});throw _0x1b9024;}});}['view'](_0xd0d2,_0xf99c73,_0x4b6040){return __awaiter$3(this,void 0,void 0,function*(){const _0x3cc18a='api-key/'+_0xd0d2+'/'+_0xf99c73;try{const _0x5d3664=yield this['fetch']['get'](_0x3cc18a,_0x4b6040);if(_0x5d3664['status']>0xc7&&_0x5d3664['status']<0x12c){const _0x20e52c=yield _0x5d3664['json']();return new SuccessfulApiKeyValueResponse(_0x20e52c);}const _0x33d51d=yield _0x5d3664['json']();return new FailedApiKeyValueResponse(_0x33d51d);}catch(_0x4f7ae0){if(_0x4f7ae0 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x4f7ae0['message'],'title':_0x4f7ae0['name'],'status':0x1f4,'instance':'','type':''});throw _0x4f7ae0;}});}}
9
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x11badf,_0x2906a3,_0x43a5cd,_0x13e583){function _0x2b72af(_0x4ca72){return _0x4ca72 instanceof _0x43a5cd?_0x4ca72:new _0x43a5cd(function(_0x3d9460){_0x3d9460(_0x4ca72);});}return new(_0x43a5cd||(_0x43a5cd=Promise))(function(_0x40862e,_0x1d8dd8){function _0x2bcd08(_0x11ebe6){try{_0x309410(_0x13e583['next'](_0x11ebe6));}catch(_0x5d2bca){_0x1d8dd8(_0x5d2bca);}}function _0x3550c2(_0x13c2c6){try{_0x309410(_0x13e583['throw'](_0x13c2c6));}catch(_0x3e85a6){_0x1d8dd8(_0x3e85a6);}}function _0x309410(_0xccd59a){_0xccd59a['done']?_0x40862e(_0xccd59a['value']):_0x2b72af(_0xccd59a['value'])['then'](_0x2bcd08,_0x3550c2);}_0x309410((_0x13e583=_0x13e583['apply'](_0x11badf,_0x2906a3||[]))['next']());});};class ApiKeyService{constructor(_0x3fa99e){this['fetch']=_0x3fa99e;}['create'](_0x2620e0,_0x290418,_0x1e0e88){return __awaiter$3(this,void 0,void 0,function*(){const _0x2f69e8='api-key/create',_0x546572={'account_name':_0x2620e0,'api_key_name':_0x290418};try{const _0x7c551f=yield this['fetch']['post'](_0x2f69e8,_0x1e0e88,_0x546572);if(_0x7c551f['status']>0xc7&&_0x7c551f['status']<0x12c){const _0x54f7ab=yield _0x7c551f['json']();return new SuccessfulApiKeyResponse(_0x54f7ab);}const _0x587df1=yield _0x7c551f['json']();return new FailedApiKeyResponse(_0x587df1);}catch(_0x428873){if(_0x428873 instanceof Error)return new FailedApiKeyResponse({'detail':_0x428873['message'],'title':_0x428873['name'],'status':0x1f4,'instance':'','type':''});throw _0x428873;}});}['view'](_0x5d9871,_0x34abf0,_0x1e6bd7){return __awaiter$3(this,void 0,void 0,function*(){const _0x567d9e='api-key/'+_0x5d9871+'/'+_0x34abf0;try{const _0xfcf3d0=yield this['fetch']['get'](_0x567d9e,_0x1e6bd7);if(_0xfcf3d0['status']>0xc7&&_0xfcf3d0['status']<0x12c){const _0x401061=yield _0xfcf3d0['json']();return new SuccessfulApiKeyValueResponse(_0x401061);}const _0x34c8d4=yield _0xfcf3d0['json']();return new FailedApiKeyValueResponse(_0x34c8d4);}catch(_0x2caf0a){if(_0x2caf0a instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x2caf0a['message'],'title':_0x2caf0a['name'],'status':0x1f4,'instance':'','type':''});throw _0x2caf0a;}});}}
10
10
 
11
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0xe9c276,_0x35cdf9,_0x482a17,_0xf4fc7f){function _0x285735(_0x162728){return _0x162728 instanceof _0x482a17?_0x162728:new _0x482a17(function(_0x53cfe5){_0x53cfe5(_0x162728);});}return new(_0x482a17||(_0x482a17=Promise))(function(_0x166267,_0x24d943){function _0x6c02aa(_0x26a3de){try{_0x570af7(_0xf4fc7f['next'](_0x26a3de));}catch(_0x2def88){_0x24d943(_0x2def88);}}function _0x148d16(_0x481d89){try{_0x570af7(_0xf4fc7f['throw'](_0x481d89));}catch(_0x515802){_0x24d943(_0x515802);}}function _0x570af7(_0x5129d7){_0x5129d7['done']?_0x166267(_0x5129d7['value']):_0x285735(_0x5129d7['value'])['then'](_0x6c02aa,_0x148d16);}_0x570af7((_0xf4fc7f=_0xf4fc7f['apply'](_0xe9c276,_0x35cdf9||[]))['next']());});};class ListService{constructor(_0x353ad){this['fetch']=_0x353ad;}['add'](_0x39debe,_0x279188,_0x243e7e){return __awaiter$2(this,void 0,void 0,function*(){const _0x5776cc='List',_0x4e61cf={'account_name':_0x39debe,'list_name':_0x279188};try{const _0x4c6782=yield this['fetch']['post'](_0x5776cc,_0x243e7e,_0x4e61cf);if(_0x4c6782['status']>0xc7&&_0x4c6782['status']<0x12c){const _0x3fe66e=yield _0x4c6782['json']();return new SuccessfulAccountResponse(_0x3fe66e);}const _0x2a0668=yield _0x4c6782['json']();return new FailedAccountResponse(_0x2a0668);}catch(_0x71a5ee){if(_0x71a5ee instanceof Error)return new FailedAccountResponse({'detail':_0x71a5ee['message'],'title':_0x71a5ee['name'],'status':0x1f4,'instance':'','type':''});throw _0x71a5ee;}});}['remove'](_0x1b2348,_0x280237,_0x49f43d){return __awaiter$2(this,void 0,void 0,function*(){const _0x20fdb6='List/'+_0x1b2348+'/'+_0x280237,_0x13a104=yield this['fetch']['delete'](_0x20fdb6,_0x49f43d);try{if(_0x13a104['status']>0xc7&&_0x13a104['status']<0x12c){const _0x56fbd8=yield _0x13a104['json']();return new SuccessfulAccountResponse(_0x56fbd8);}const _0x590b7e=yield _0x13a104['json']();return new FailedAccountResponse(_0x590b7e);}catch(_0x44514c){if(_0x44514c instanceof Error)return new FailedAccountResponse({'detail':_0x44514c['message'],'title':_0x44514c['name'],'status':0x1f4,'instance':'','type':''});throw _0x44514c;}});}}
11
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x3e9ac7,_0x1fa1ec,_0x458369,_0x240936){function _0x44f3c3(_0x4bfa5a){return _0x4bfa5a instanceof _0x458369?_0x4bfa5a:new _0x458369(function(_0x37cba0){_0x37cba0(_0x4bfa5a);});}return new(_0x458369||(_0x458369=Promise))(function(_0x5d1688,_0x1bc9eb){function _0x1cd838(_0x47448c){try{_0x12618a(_0x240936['next'](_0x47448c));}catch(_0x27fa4e){_0x1bc9eb(_0x27fa4e);}}function _0x2984e3(_0x248bd6){try{_0x12618a(_0x240936['throw'](_0x248bd6));}catch(_0x13f4e4){_0x1bc9eb(_0x13f4e4);}}function _0x12618a(_0x2fa779){_0x2fa779['done']?_0x5d1688(_0x2fa779['value']):_0x44f3c3(_0x2fa779['value'])['then'](_0x1cd838,_0x2984e3);}_0x12618a((_0x240936=_0x240936['apply'](_0x3e9ac7,_0x1fa1ec||[]))['next']());});};class ListService{constructor(_0x5d42e1){this['fetch']=_0x5d42e1;}['add'](_0x17cf28,_0x9ccebd,_0x27dd27){return __awaiter$2(this,void 0,void 0,function*(){const _0x33873f='List',_0x424082={'account_name':_0x17cf28,'list_name':_0x9ccebd};try{const _0x44252b=yield this['fetch']['post'](_0x33873f,_0x27dd27,_0x424082);if(_0x44252b['status']>0xc7&&_0x44252b['status']<0x12c){const _0x5612f5=yield _0x44252b['json']();return new SuccessfulAccountResponse(_0x5612f5);}const _0x5c9e9a=yield _0x44252b['json']();return new FailedAccountResponse(_0x5c9e9a);}catch(_0x6c3928){if(_0x6c3928 instanceof Error)return new FailedAccountResponse({'detail':_0x6c3928['message'],'title':_0x6c3928['name'],'status':0x1f4,'instance':'','type':''});throw _0x6c3928;}});}['remove'](_0x59ae64,_0x4f3863,_0x49b1ce){return __awaiter$2(this,void 0,void 0,function*(){const _0x332931='List/'+_0x59ae64+'/'+_0x4f3863,_0x1d52b2=yield this['fetch']['delete'](_0x332931,_0x49b1ce);try{if(_0x1d52b2['status']>0xc7&&_0x1d52b2['status']<0x12c){const _0x2c09fb=yield _0x1d52b2['json']();return new SuccessfulAccountResponse(_0x2c09fb);}const _0x4fbe12=yield _0x1d52b2['json']();return new FailedAccountResponse(_0x4fbe12);}catch(_0x4063e8){if(_0x4063e8 instanceof Error)return new FailedAccountResponse({'detail':_0x4063e8['message'],'title':_0x4063e8['name'],'status':0x1f4,'instance':'','type':''});throw _0x4063e8;}});}}
12
12
 
13
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x8e2726,_0x2a25fd,_0x1fcd89,_0x4b2795){function _0x9ff81d(_0x25ed09){return _0x25ed09 instanceof _0x1fcd89?_0x25ed09:new _0x1fcd89(function(_0x9f9cc){_0x9f9cc(_0x25ed09);});}return new(_0x1fcd89||(_0x1fcd89=Promise))(function(_0x309be9,_0x2099fd){function _0x5a1849(_0x56196c){try{_0x3f4a57(_0x4b2795['next'](_0x56196c));}catch(_0x49f9e0){_0x2099fd(_0x49f9e0);}}function _0x146975(_0x2a5c30){try{_0x3f4a57(_0x4b2795['throw'](_0x2a5c30));}catch(_0x370acb){_0x2099fd(_0x370acb);}}function _0x3f4a57(_0x1ae2f9){_0x1ae2f9['done']?_0x309be9(_0x1ae2f9['value']):_0x9ff81d(_0x1ae2f9['value'])['then'](_0x5a1849,_0x146975);}_0x3f4a57((_0x4b2795=_0x4b2795['apply'](_0x8e2726,_0x2a25fd||[]))['next']());});};class Fetch{constructor(_0x5662e9){this['baseUri']=_0x5662e9,this['getUrl']=_0x10fb04=>{return _0x10fb04['startsWith']('/')&&(_0x10fb04=_0x10fb04['replace']('/','')),''+this['baseUri']+_0x10fb04;},!_0x5662e9['endsWith']('/')&&(_0x5662e9=_0x5662e9+'/');}['get'](_0x20577f,_0x117fca){return __awaiter$1(this,void 0,void 0,function*(){const _0x2507e7=this['getUrl'](_0x20577f);return yield fetch(_0x2507e7,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x117fca}});});}['post'](_0xfaa12b,_0x338a1c,_0x32407f){return __awaiter$1(this,void 0,void 0,function*(){const _0x433a63=this['getUrl'](_0xfaa12b);return yield fetch(_0x433a63,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x338a1c},'body':_0x32407f?JSON['stringify'](_0x32407f):null});});}['put'](_0x5072bb,_0x1187ae,_0x208599){return __awaiter$1(this,void 0,void 0,function*(){const _0xcb32a7=this['getUrl'](_0x5072bb);return yield fetch(_0xcb32a7,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1187ae},'body':_0x208599?JSON['stringify'](_0x208599):null});});}['delete'](_0x3e3401,_0x3d22df){return __awaiter$1(this,void 0,void 0,function*(){const _0x479a53=this['getUrl'](_0x3e3401);return yield fetch(_0x479a53,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3d22df}});});}}
13
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x17f096,_0x2cec24,_0x6363d7,_0x16a079){function _0xd2f740(_0x392bff){return _0x392bff instanceof _0x6363d7?_0x392bff:new _0x6363d7(function(_0x1b82eb){_0x1b82eb(_0x392bff);});}return new(_0x6363d7||(_0x6363d7=Promise))(function(_0x512abc,_0x425cf2){function _0x2dbed1(_0x3ad6f3){try{_0x4f303d(_0x16a079['next'](_0x3ad6f3));}catch(_0x58f3e6){_0x425cf2(_0x58f3e6);}}function _0x38d3c2(_0x2a4a2b){try{_0x4f303d(_0x16a079['throw'](_0x2a4a2b));}catch(_0x4a521b){_0x425cf2(_0x4a521b);}}function _0x4f303d(_0x2bafaf){_0x2bafaf['done']?_0x512abc(_0x2bafaf['value']):_0xd2f740(_0x2bafaf['value'])['then'](_0x2dbed1,_0x38d3c2);}_0x4f303d((_0x16a079=_0x16a079['apply'](_0x17f096,_0x2cec24||[]))['next']());});};class Fetch{constructor(_0x1bad12){this['baseUri']=_0x1bad12,this['getUrl']=_0x456784=>{return _0x456784['startsWith']('/')&&(_0x456784=_0x456784['replace']('/','')),''+this['baseUri']+_0x456784;},!_0x1bad12['endsWith']('/')&&(_0x1bad12=_0x1bad12+'/');}['get'](_0x3c21ad,_0x611474){return __awaiter$1(this,void 0,void 0,function*(){const _0x6617b5=this['getUrl'](_0x3c21ad);return yield fetch(_0x6617b5,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x611474}});});}['post'](_0x10c858,_0x3ca4a3,_0x14a0ee){return __awaiter$1(this,void 0,void 0,function*(){const _0x29b8b7=this['getUrl'](_0x10c858);return yield fetch(_0x29b8b7,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3ca4a3},'body':_0x14a0ee?JSON['stringify'](_0x14a0ee):null});});}['put'](_0x4dfd16,_0x1d6ece,_0x10e008){return __awaiter$1(this,void 0,void 0,function*(){const _0x8b5136=this['getUrl'](_0x4dfd16);return yield fetch(_0x8b5136,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1d6ece},'body':_0x10e008?JSON['stringify'](_0x10e008):null});});}['delete'](_0x12fcb3,_0x40e84c){return __awaiter$1(this,void 0,void 0,function*(){const _0x16a52e=this['getUrl'](_0x12fcb3);return yield fetch(_0x16a52e,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x40e84c}});});}}
14
14
 
15
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x3b7dac,_0x306c63,_0x440f24,_0x18b50e){function _0x4fd278(_0x3a43b2){return _0x3a43b2 instanceof _0x440f24?_0x3a43b2:new _0x440f24(function(_0x5e8fc3){_0x5e8fc3(_0x3a43b2);});}return new(_0x440f24||(_0x440f24=Promise))(function(_0x550810,_0xaba3b9){function _0x1d588f(_0x6146f){try{_0x444776(_0x18b50e['next'](_0x6146f));}catch(_0x3e5f67){_0xaba3b9(_0x3e5f67);}}function _0x3ac8d0(_0x251e49){try{_0x444776(_0x18b50e['throw'](_0x251e49));}catch(_0xd4853c){_0xaba3b9(_0xd4853c);}}function _0x444776(_0x19b716){_0x19b716['done']?_0x550810(_0x19b716['value']):_0x4fd278(_0x19b716['value'])['then'](_0x1d588f,_0x3ac8d0);}_0x444776((_0x18b50e=_0x18b50e['apply'](_0x3b7dac,_0x306c63||[]))['next']());});};class AdminClient{constructor(_0x42ed7a='https://admin.searchability.dev/'){var _0x56057a=new Fetch(_0x42ed7a);this['Accounts']=new AccountService(_0x56057a),this['Lists']=new ListService(_0x56057a),this['ApiKeys']=new ApiKeyService(_0x56057a);}}class AuthClient{constructor(_0x2ec1f8='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x2ec1f8);}['login'](_0x1411c9){return __awaiter(this,void 0,void 0,function*(){var _0x1ba043='login/'+_0x1411c9;try{const _0x8659c=yield yield fetch(_0x1ba043);if(_0x8659c['status']>0xc7&&_0x8659c['status']<0x12c){const _0xb644dd=yield _0x8659c['json']();return new SuccessfulAuthResponse(_0xb644dd);}const _0x1f0879=yield _0x8659c['json']();return new FailedAuthResponse(_0x1f0879);}catch(_0x392498){if(_0x392498 instanceof Error)return new FailedAuthResponse({'detail':_0x392498['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x392498;}});}['refresh'](_0x39c659){return __awaiter(this,void 0,void 0,function*(){var _0x2a4f21='refresh';try{const _0x1c6db8=yield this['fetch']['post'](_0x2a4f21,_0x39c659,null);if(_0x1c6db8['status']>0xc7&&_0x1c6db8['status']<0x12c){const _0x4b292a=yield _0x1c6db8['json']();return new SuccessfulAuthResponse(_0x4b292a);}const _0xc04d03=yield _0x1c6db8['json']();return new FailedAuthResponse(_0xc04d03);}catch(_0x4e8359){if(_0x4e8359 instanceof Error)return new FailedAuthResponse({'detail':_0x4e8359['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x4e8359;}});}}
15
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x58c7ab,_0x30fa30,_0x4cad52,_0x31fd13){function _0x4ba7e6(_0x185b4f){return _0x185b4f instanceof _0x4cad52?_0x185b4f:new _0x4cad52(function(_0x1a5895){_0x1a5895(_0x185b4f);});}return new(_0x4cad52||(_0x4cad52=Promise))(function(_0x254d7b,_0x1d821f){function _0xbb638e(_0x591079){try{_0xf7ea8d(_0x31fd13['next'](_0x591079));}catch(_0x211b1d){_0x1d821f(_0x211b1d);}}function _0x58c6e7(_0x39ccd9){try{_0xf7ea8d(_0x31fd13['throw'](_0x39ccd9));}catch(_0x37b429){_0x1d821f(_0x37b429);}}function _0xf7ea8d(_0x179024){_0x179024['done']?_0x254d7b(_0x179024['value']):_0x4ba7e6(_0x179024['value'])['then'](_0xbb638e,_0x58c6e7);}_0xf7ea8d((_0x31fd13=_0x31fd13['apply'](_0x58c7ab,_0x30fa30||[]))['next']());});};class AdminClient{constructor(_0x34c5b='https://admin.searchability.dev/'){var _0x543891=new Fetch(_0x34c5b);this['Accounts']=new AccountService(_0x543891),this['Lists']=new ListService(_0x543891),this['ApiKeys']=new ApiKeyService(_0x543891);}}class AuthClient{constructor(_0x3473ee='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x3473ee);}['login'](_0x28515a){return __awaiter(this,void 0,void 0,function*(){var _0x3f8213='login/'+_0x28515a;try{const _0x34772c=yield yield fetch(_0x3f8213);if(_0x34772c['status']>0xc7&&_0x34772c['status']<0x12c){const _0x113711=yield _0x34772c['json']();return new SuccessfulAuthResponse(_0x113711);}const _0x3cdaa3=yield _0x34772c['json']();return new FailedAuthResponse(_0x3cdaa3);}catch(_0xfb0e37){if(_0xfb0e37 instanceof Error)return new FailedAuthResponse({'detail':_0xfb0e37['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0xfb0e37;}});}['refresh'](_0x461ec0){return __awaiter(this,void 0,void 0,function*(){var _0x5ad108='refresh';try{const _0x50268f=yield this['fetch']['post'](_0x5ad108,_0x461ec0,null);if(_0x50268f['status']>0xc7&&_0x50268f['status']<0x12c){const _0x1bc290=yield _0x50268f['json']();return new SuccessfulAuthResponse(_0x1bc290);}const _0x9f020c=yield _0x50268f['json']();return new FailedAuthResponse(_0x9f020c);}catch(_0x290c4f){if(_0x290c4f instanceof Error)return new FailedAuthResponse({'detail':_0x290c4f['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x290c4f;}});}}
16
16
 
17
17
  exports.AdminClient = AdminClient;
18
18
  exports.AuthClient = AuthClient;
@@ -1,15 +1,15 @@
1
- var TokenStatus;(function(_0x1150ac){_0x1150ac[_0x1150ac['Ok']=0x0]='Ok',_0x1150ac[_0x1150ac['Refresh']=0x1]='Refresh',_0x1150ac[_0x1150ac['Expired']=0x2]='Expired';}(TokenStatus||(TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}['getStatus'](){if(Date['now']()<this['access_expires'])return TokenStatus['Ok'];if(Date['now']()<this['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
1
+ var TokenStatus;(function(_0x47160f){_0x47160f[_0x47160f['Ok']=0x0]='Ok',_0x47160f[_0x47160f['Refresh']=0x1]='Refresh',_0x47160f[_0x47160f['Expired']=0x2]='Expired';}(TokenStatus||(TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}['getStatus'](){if(Date['now']()<this['access_expires'])return TokenStatus['Ok'];if(Date['now']()<this['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
2
2
 
3
- class Response{constructor(_0x1f20ea){this['isSuccess']=_0x1f20ea;}}class SuccessfulAccountResponse extends Response{constructor(_0x4c64c6){super(!![]),this['account']=_0x4c64c6;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x554609){super(![]),this['problem']=_0x554609;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x446159){super(!![]),this['tokens']=_0x446159;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x3c829a){super(![]),this['problem']=_0x3c829a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x3f5489){super(!![]),this['apiKey']=_0x3f5489;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x189a1c){super(![]),this['problem']=_0x189a1c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x5bb313){super(!![]),this['apiKeyValue']=_0x5bb313;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyValueResponse extends Response{constructor(_0x29cd1e){super(![]),this['problem']=_0x29cd1e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
3
+ class Response{constructor(_0x385136){this['isSuccess']=_0x385136;}}class SuccessfulAccountResponse extends Response{constructor(_0x34cc1a){super(!![]),this['account']=_0x34cc1a;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x5cd2e5){super(![]),this['problem']=_0x5cd2e5;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x1798b2){super(!![]),this['tokens']=_0x1798b2;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x5edca3){super(![]),this['problem']=_0x5edca3;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x20ba05){super(!![]),this['apiKey']=_0x20ba05;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x1706a1){super(![]),this['problem']=_0x1706a1;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x388290){super(!![]),this['apiKeyValue']=_0x388290;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyValueResponse extends Response{constructor(_0x1791fa){super(![]),this['problem']=_0x1791fa;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
4
4
 
5
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x5d41a8,_0x39af39,_0xd0b88d,_0x38cfe1){function _0x1d3b8f(_0x10d38a){return _0x10d38a instanceof _0xd0b88d?_0x10d38a:new _0xd0b88d(function(_0x106847){_0x106847(_0x10d38a);});}return new(_0xd0b88d||(_0xd0b88d=Promise))(function(_0x5d22b7,_0x28ee9b){function _0x405cdd(_0x5a018d){try{_0x2fb834(_0x38cfe1['next'](_0x5a018d));}catch(_0x46d32c){_0x28ee9b(_0x46d32c);}}function _0x6b9491(_0x580e88){try{_0x2fb834(_0x38cfe1['throw'](_0x580e88));}catch(_0x185b4e){_0x28ee9b(_0x185b4e);}}function _0x2fb834(_0x41607c){_0x41607c['done']?_0x5d22b7(_0x41607c['value']):_0x1d3b8f(_0x41607c['value'])['then'](_0x405cdd,_0x6b9491);}_0x2fb834((_0x38cfe1=_0x38cfe1['apply'](_0x5d41a8,_0x39af39||[]))['next']());});};class AccountService{constructor(_0x28935b){this['fetch']=_0x28935b;}['get'](_0x464bf7,_0x3ae7dd){return __awaiter$4(this,void 0,void 0,function*(){const _0x2170ba='Account/'+_0x464bf7+'/',_0x127417=yield this['fetch']['get'](_0x2170ba,_0x3ae7dd);try{if(_0x127417['status']>0xc7&&_0x127417['status']<0x12c){const _0x595b68=yield _0x127417['json']();return new SuccessfulAccountResponse(_0x595b68);}const _0x2ec558=yield _0x127417['json']();return new FailedAccountResponse(_0x2ec558);}catch(_0x1416db){if(_0x1416db instanceof Error)return new FailedAccountResponse({'detail':_0x1416db['message'],'title':_0x1416db['name'],'status':0x1f4,'instance':'','type':''});throw _0x1416db;}});}}
5
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x4280e2,_0x7049b0,_0x562aa8,_0x4f5d4f){function _0x32ee92(_0x3c82a6){return _0x3c82a6 instanceof _0x562aa8?_0x3c82a6:new _0x562aa8(function(_0x441a7){_0x441a7(_0x3c82a6);});}return new(_0x562aa8||(_0x562aa8=Promise))(function(_0x50623e,_0x234436){function _0x524873(_0x569282){try{_0x3dbeb(_0x4f5d4f['next'](_0x569282));}catch(_0x25b078){_0x234436(_0x25b078);}}function _0x5188dd(_0x1b6ae3){try{_0x3dbeb(_0x4f5d4f['throw'](_0x1b6ae3));}catch(_0x55b3b6){_0x234436(_0x55b3b6);}}function _0x3dbeb(_0x429bb4){_0x429bb4['done']?_0x50623e(_0x429bb4['value']):_0x32ee92(_0x429bb4['value'])['then'](_0x524873,_0x5188dd);}_0x3dbeb((_0x4f5d4f=_0x4f5d4f['apply'](_0x4280e2,_0x7049b0||[]))['next']());});};class AccountService{constructor(_0x78d364){this['fetch']=_0x78d364;}['get'](_0x15509e,_0x5252a3){return __awaiter$4(this,void 0,void 0,function*(){const _0x2fee14='Account/'+_0x15509e+'/',_0xc42ffe=yield this['fetch']['get'](_0x2fee14,_0x5252a3);try{if(_0xc42ffe['status']>0xc7&&_0xc42ffe['status']<0x12c){const _0x1a131d=yield _0xc42ffe['json']();return new SuccessfulAccountResponse(_0x1a131d);}const _0x338d2f=yield _0xc42ffe['json']();return new FailedAccountResponse(_0x338d2f);}catch(_0x59bca4){if(_0x59bca4 instanceof Error)return new FailedAccountResponse({'detail':_0x59bca4['message'],'title':_0x59bca4['name'],'status':0x1f4,'instance':'','type':''});throw _0x59bca4;}});}}
6
6
 
7
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x4d05c8,_0x2bc23d,_0xaae974,_0x574880){function _0x219e88(_0x5d54cf){return _0x5d54cf instanceof _0xaae974?_0x5d54cf:new _0xaae974(function(_0x2c984d){_0x2c984d(_0x5d54cf);});}return new(_0xaae974||(_0xaae974=Promise))(function(_0x5e9ca1,_0x493220){function _0x5cdc6a(_0xb55c2f){try{_0x4c019e(_0x574880['next'](_0xb55c2f));}catch(_0x575eb8){_0x493220(_0x575eb8);}}function _0x4146dd(_0x1fb448){try{_0x4c019e(_0x574880['throw'](_0x1fb448));}catch(_0x16cdd5){_0x493220(_0x16cdd5);}}function _0x4c019e(_0x3b240a){_0x3b240a['done']?_0x5e9ca1(_0x3b240a['value']):_0x219e88(_0x3b240a['value'])['then'](_0x5cdc6a,_0x4146dd);}_0x4c019e((_0x574880=_0x574880['apply'](_0x4d05c8,_0x2bc23d||[]))['next']());});};class ApiKeyService{constructor(_0x193cc2){this['fetch']=_0x193cc2;}['create'](_0x4f44da,_0xb456aa,_0x3f5a02){return __awaiter$3(this,void 0,void 0,function*(){const _0x53f089='api-key/create',_0x5de28c={'account_name':_0x4f44da,'api_key_name':_0xb456aa};try{const _0x1aa0a9=yield this['fetch']['post'](_0x53f089,_0x3f5a02,_0x5de28c);if(_0x1aa0a9['status']>0xc7&&_0x1aa0a9['status']<0x12c){const _0x2742d0=yield _0x1aa0a9['json']();return new SuccessfulApiKeyResponse(_0x2742d0);}const _0x52468f=yield _0x1aa0a9['json']();return new FailedApiKeyResponse(_0x52468f);}catch(_0x451572){if(_0x451572 instanceof Error)return new FailedApiKeyResponse({'detail':_0x451572['message'],'title':_0x451572['name'],'status':0x1f4,'instance':'','type':''});throw _0x451572;}});}['view'](_0xd26af8,_0x4f4d2e,_0x2807ef){return __awaiter$3(this,void 0,void 0,function*(){const _0x3edc1f='api-key/'+_0xd26af8+'/'+_0x4f4d2e;try{const _0x3c3025=yield this['fetch']['get'](_0x3edc1f,_0x2807ef);if(_0x3c3025['status']>0xc7&&_0x3c3025['status']<0x12c){const _0x183480=yield _0x3c3025['json']();return new SuccessfulApiKeyValueResponse(_0x183480);}const _0x557c1c=yield _0x3c3025['json']();return new FailedApiKeyValueResponse(_0x557c1c);}catch(_0x8112dc){if(_0x8112dc instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x8112dc['message'],'title':_0x8112dc['name'],'status':0x1f4,'instance':'','type':''});throw _0x8112dc;}});}}
7
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x45af0f,_0x1df582,_0xdafade,_0x2f8c80){function _0x6d3666(_0x204b18){return _0x204b18 instanceof _0xdafade?_0x204b18:new _0xdafade(function(_0x4d18ae){_0x4d18ae(_0x204b18);});}return new(_0xdafade||(_0xdafade=Promise))(function(_0x4f80a3,_0x40ace9){function _0x5c33a6(_0x4f800a){try{_0x53889a(_0x2f8c80['next'](_0x4f800a));}catch(_0x1e85fe){_0x40ace9(_0x1e85fe);}}function _0x58192b(_0x5f4d10){try{_0x53889a(_0x2f8c80['throw'](_0x5f4d10));}catch(_0x26b5eb){_0x40ace9(_0x26b5eb);}}function _0x53889a(_0x48a31e){_0x48a31e['done']?_0x4f80a3(_0x48a31e['value']):_0x6d3666(_0x48a31e['value'])['then'](_0x5c33a6,_0x58192b);}_0x53889a((_0x2f8c80=_0x2f8c80['apply'](_0x45af0f,_0x1df582||[]))['next']());});};class ApiKeyService{constructor(_0xaff066){this['fetch']=_0xaff066;}['create'](_0x396ff3,_0x4c6208,_0x41f440){return __awaiter$3(this,void 0,void 0,function*(){const _0x51ef43='api-key/create',_0x3d420c={'account_name':_0x396ff3,'api_key_name':_0x4c6208};try{const _0xa521fb=yield this['fetch']['post'](_0x51ef43,_0x41f440,_0x3d420c);if(_0xa521fb['status']>0xc7&&_0xa521fb['status']<0x12c){const _0x274450=yield _0xa521fb['json']();return new SuccessfulApiKeyResponse(_0x274450);}const _0x4169f0=yield _0xa521fb['json']();return new FailedApiKeyResponse(_0x4169f0);}catch(_0x474fd1){if(_0x474fd1 instanceof Error)return new FailedApiKeyResponse({'detail':_0x474fd1['message'],'title':_0x474fd1['name'],'status':0x1f4,'instance':'','type':''});throw _0x474fd1;}});}['view'](_0x47f0fc,_0x114d15,_0x569630){return __awaiter$3(this,void 0,void 0,function*(){const _0x3fefd3='api-key/'+_0x47f0fc+'/'+_0x114d15;try{const _0x54c022=yield this['fetch']['get'](_0x3fefd3,_0x569630);if(_0x54c022['status']>0xc7&&_0x54c022['status']<0x12c){const _0x56ef50=yield _0x54c022['json']();return new SuccessfulApiKeyValueResponse(_0x56ef50);}const _0x12fcad=yield _0x54c022['json']();return new FailedApiKeyValueResponse(_0x12fcad);}catch(_0x44e260){if(_0x44e260 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x44e260['message'],'title':_0x44e260['name'],'status':0x1f4,'instance':'','type':''});throw _0x44e260;}});}}
8
8
 
9
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x55188f,_0xf274c5,_0x1eb372,_0x34c3ed){function _0x24fcac(_0x2c5253){return _0x2c5253 instanceof _0x1eb372?_0x2c5253:new _0x1eb372(function(_0x385da2){_0x385da2(_0x2c5253);});}return new(_0x1eb372||(_0x1eb372=Promise))(function(_0x34189e,_0x3ad294){function _0x5d47d0(_0x552560){try{_0x1154f7(_0x34c3ed['next'](_0x552560));}catch(_0x2bb1fd){_0x3ad294(_0x2bb1fd);}}function _0x4c8c80(_0x1a7cc2){try{_0x1154f7(_0x34c3ed['throw'](_0x1a7cc2));}catch(_0x504cb0){_0x3ad294(_0x504cb0);}}function _0x1154f7(_0x3626f9){_0x3626f9['done']?_0x34189e(_0x3626f9['value']):_0x24fcac(_0x3626f9['value'])['then'](_0x5d47d0,_0x4c8c80);}_0x1154f7((_0x34c3ed=_0x34c3ed['apply'](_0x55188f,_0xf274c5||[]))['next']());});};class ListService{constructor(_0x3d36fe){this['fetch']=_0x3d36fe;}['add'](_0x9406c2,_0x996ff1,_0x2db87b){return __awaiter$2(this,void 0,void 0,function*(){const _0x1e63f6='List',_0x27bee2={'account_name':_0x9406c2,'list_name':_0x996ff1};try{const _0x348c40=yield this['fetch']['post'](_0x1e63f6,_0x2db87b,_0x27bee2);if(_0x348c40['status']>0xc7&&_0x348c40['status']<0x12c){const _0x53f8fa=yield _0x348c40['json']();return new SuccessfulAccountResponse(_0x53f8fa);}const _0x5ace0c=yield _0x348c40['json']();return new FailedAccountResponse(_0x5ace0c);}catch(_0x3284b6){if(_0x3284b6 instanceof Error)return new FailedAccountResponse({'detail':_0x3284b6['message'],'title':_0x3284b6['name'],'status':0x1f4,'instance':'','type':''});throw _0x3284b6;}});}['remove'](_0x59771c,_0x398bfa,_0x5a3f5e){return __awaiter$2(this,void 0,void 0,function*(){const _0x297b09='List/'+_0x59771c+'/'+_0x398bfa,_0x98ae3=yield this['fetch']['delete'](_0x297b09,_0x5a3f5e);try{if(_0x98ae3['status']>0xc7&&_0x98ae3['status']<0x12c){const _0x3ac4b0=yield _0x98ae3['json']();return new SuccessfulAccountResponse(_0x3ac4b0);}const _0x1ae6f0=yield _0x98ae3['json']();return new FailedAccountResponse(_0x1ae6f0);}catch(_0x38f820){if(_0x38f820 instanceof Error)return new FailedAccountResponse({'detail':_0x38f820['message'],'title':_0x38f820['name'],'status':0x1f4,'instance':'','type':''});throw _0x38f820;}});}}
9
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x3c980d,_0x1031e7,_0xf46f6,_0x4c12ce){function _0x1f71ce(_0x373b16){return _0x373b16 instanceof _0xf46f6?_0x373b16:new _0xf46f6(function(_0x489b6f){_0x489b6f(_0x373b16);});}return new(_0xf46f6||(_0xf46f6=Promise))(function(_0x304113,_0x339ffc){function _0x18bd90(_0x1053b7){try{_0xb2a4c9(_0x4c12ce['next'](_0x1053b7));}catch(_0x250e5c){_0x339ffc(_0x250e5c);}}function _0x447f27(_0xa4935f){try{_0xb2a4c9(_0x4c12ce['throw'](_0xa4935f));}catch(_0xb15ea0){_0x339ffc(_0xb15ea0);}}function _0xb2a4c9(_0x186855){_0x186855['done']?_0x304113(_0x186855['value']):_0x1f71ce(_0x186855['value'])['then'](_0x18bd90,_0x447f27);}_0xb2a4c9((_0x4c12ce=_0x4c12ce['apply'](_0x3c980d,_0x1031e7||[]))['next']());});};class ListService{constructor(_0x242c02){this['fetch']=_0x242c02;}['add'](_0x1edb71,_0x2bba0,_0x1c812f){return __awaiter$2(this,void 0,void 0,function*(){const _0x3767ed='List',_0x3141c9={'account_name':_0x1edb71,'list_name':_0x2bba0};try{const _0x4bb236=yield this['fetch']['post'](_0x3767ed,_0x1c812f,_0x3141c9);if(_0x4bb236['status']>0xc7&&_0x4bb236['status']<0x12c){const _0x4cae6c=yield _0x4bb236['json']();return new SuccessfulAccountResponse(_0x4cae6c);}const _0x323bbe=yield _0x4bb236['json']();return new FailedAccountResponse(_0x323bbe);}catch(_0x22997f){if(_0x22997f instanceof Error)return new FailedAccountResponse({'detail':_0x22997f['message'],'title':_0x22997f['name'],'status':0x1f4,'instance':'','type':''});throw _0x22997f;}});}['remove'](_0x2f4a4f,_0x1181bd,_0x5354bc){return __awaiter$2(this,void 0,void 0,function*(){const _0x38f41f='List/'+_0x2f4a4f+'/'+_0x1181bd,_0x56f4f2=yield this['fetch']['delete'](_0x38f41f,_0x5354bc);try{if(_0x56f4f2['status']>0xc7&&_0x56f4f2['status']<0x12c){const _0x68e4da=yield _0x56f4f2['json']();return new SuccessfulAccountResponse(_0x68e4da);}const _0x5778e1=yield _0x56f4f2['json']();return new FailedAccountResponse(_0x5778e1);}catch(_0x5c3a4d){if(_0x5c3a4d instanceof Error)return new FailedAccountResponse({'detail':_0x5c3a4d['message'],'title':_0x5c3a4d['name'],'status':0x1f4,'instance':'','type':''});throw _0x5c3a4d;}});}}
10
10
 
11
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0xfa835,_0x3311ba,_0x2bb8da,_0x109105){function _0x11bcfa(_0x5521a1){return _0x5521a1 instanceof _0x2bb8da?_0x5521a1:new _0x2bb8da(function(_0x56d2df){_0x56d2df(_0x5521a1);});}return new(_0x2bb8da||(_0x2bb8da=Promise))(function(_0x26d77f,_0x5d4a4b){function _0x306bd6(_0xbe467b){try{_0x214a78(_0x109105['next'](_0xbe467b));}catch(_0x350a0c){_0x5d4a4b(_0x350a0c);}}function _0x17fbba(_0x418b0c){try{_0x214a78(_0x109105['throw'](_0x418b0c));}catch(_0x47c378){_0x5d4a4b(_0x47c378);}}function _0x214a78(_0xa7acf3){_0xa7acf3['done']?_0x26d77f(_0xa7acf3['value']):_0x11bcfa(_0xa7acf3['value'])['then'](_0x306bd6,_0x17fbba);}_0x214a78((_0x109105=_0x109105['apply'](_0xfa835,_0x3311ba||[]))['next']());});};class Fetch{constructor(_0x3a736f){this['baseUri']=_0x3a736f,this['getUrl']=_0x260665=>{return _0x260665['startsWith']('/')&&(_0x260665=_0x260665['replace']('/','')),''+this['baseUri']+_0x260665;},!_0x3a736f['endsWith']('/')&&(_0x3a736f=_0x3a736f+'/');}['get'](_0xc01641,_0x40bc31){return __awaiter$1(this,void 0,void 0,function*(){const _0x240a47=this['getUrl'](_0xc01641);return yield fetch(_0x240a47,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x40bc31}});});}['post'](_0x9d5238,_0x18ae0b,_0x3b8dd9){return __awaiter$1(this,void 0,void 0,function*(){const _0x3a701b=this['getUrl'](_0x9d5238);return yield fetch(_0x3a701b,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x18ae0b},'body':_0x3b8dd9?JSON['stringify'](_0x3b8dd9):null});});}['put'](_0x402e62,_0x1df9ed,_0x56a404){return __awaiter$1(this,void 0,void 0,function*(){const _0x5068c6=this['getUrl'](_0x402e62);return yield fetch(_0x5068c6,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1df9ed},'body':_0x56a404?JSON['stringify'](_0x56a404):null});});}['delete'](_0x5dbd12,_0x579147){return __awaiter$1(this,void 0,void 0,function*(){const _0xc8e487=this['getUrl'](_0x5dbd12);return yield fetch(_0xc8e487,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x579147}});});}}
11
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x20dcf2,_0x10d45a,_0x5cb95e,_0x4f825c){function _0x3c5a6e(_0x3ecb53){return _0x3ecb53 instanceof _0x5cb95e?_0x3ecb53:new _0x5cb95e(function(_0x359fcc){_0x359fcc(_0x3ecb53);});}return new(_0x5cb95e||(_0x5cb95e=Promise))(function(_0xd483c4,_0x537b97){function _0x17fae0(_0x143d6a){try{_0x3e2b8a(_0x4f825c['next'](_0x143d6a));}catch(_0xab7f79){_0x537b97(_0xab7f79);}}function _0x9de2c(_0x44dd38){try{_0x3e2b8a(_0x4f825c['throw'](_0x44dd38));}catch(_0x1d1c4e){_0x537b97(_0x1d1c4e);}}function _0x3e2b8a(_0x81494a){_0x81494a['done']?_0xd483c4(_0x81494a['value']):_0x3c5a6e(_0x81494a['value'])['then'](_0x17fae0,_0x9de2c);}_0x3e2b8a((_0x4f825c=_0x4f825c['apply'](_0x20dcf2,_0x10d45a||[]))['next']());});};class Fetch{constructor(_0x22f27f){this['baseUri']=_0x22f27f,this['getUrl']=_0x1aed2d=>{return _0x1aed2d['startsWith']('/')&&(_0x1aed2d=_0x1aed2d['replace']('/','')),''+this['baseUri']+_0x1aed2d;},!_0x22f27f['endsWith']('/')&&(_0x22f27f=_0x22f27f+'/');}['get'](_0x185e52,_0x1d14b2){return __awaiter$1(this,void 0,void 0,function*(){const _0x2696f1=this['getUrl'](_0x185e52);return yield fetch(_0x2696f1,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1d14b2}});});}['post'](_0x2a5d93,_0x1441f2,_0x434904){return __awaiter$1(this,void 0,void 0,function*(){const _0x379ca7=this['getUrl'](_0x2a5d93);return yield fetch(_0x379ca7,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1441f2},'body':_0x434904?JSON['stringify'](_0x434904):null});});}['put'](_0x4ac521,_0x429587,_0x2e9cb3){return __awaiter$1(this,void 0,void 0,function*(){const _0x4383a5=this['getUrl'](_0x4ac521);return yield fetch(_0x4383a5,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x429587},'body':_0x2e9cb3?JSON['stringify'](_0x2e9cb3):null});});}['delete'](_0x2b6f6e,_0x3d6da0){return __awaiter$1(this,void 0,void 0,function*(){const _0x290aab=this['getUrl'](_0x2b6f6e);return yield fetch(_0x290aab,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3d6da0}});});}}
12
12
 
13
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x50256d,_0x63e679,_0x389287,_0xa6de5){function _0x26eaf6(_0xc2bd50){return _0xc2bd50 instanceof _0x389287?_0xc2bd50:new _0x389287(function(_0x33b19e){_0x33b19e(_0xc2bd50);});}return new(_0x389287||(_0x389287=Promise))(function(_0x510d52,_0x1815a8){function _0x4036ab(_0x30a554){try{_0xb37dbe(_0xa6de5['next'](_0x30a554));}catch(_0xa0600d){_0x1815a8(_0xa0600d);}}function _0x50e174(_0x218d5b){try{_0xb37dbe(_0xa6de5['throw'](_0x218d5b));}catch(_0x35d012){_0x1815a8(_0x35d012);}}function _0xb37dbe(_0x2bde12){_0x2bde12['done']?_0x510d52(_0x2bde12['value']):_0x26eaf6(_0x2bde12['value'])['then'](_0x4036ab,_0x50e174);}_0xb37dbe((_0xa6de5=_0xa6de5['apply'](_0x50256d,_0x63e679||[]))['next']());});};class AdminClient{constructor(_0x4c7fad='https://admin.searchability.dev/'){var _0x7c5480=new Fetch(_0x4c7fad);this['Accounts']=new AccountService(_0x7c5480),this['Lists']=new ListService(_0x7c5480),this['ApiKeys']=new ApiKeyService(_0x7c5480);}}class AuthClient{constructor(_0x44f7ae='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x44f7ae);}['login'](_0x38f036){return __awaiter(this,void 0,void 0,function*(){var _0xfa8bfe='login/'+_0x38f036;try{const _0x570aed=yield yield fetch(_0xfa8bfe);if(_0x570aed['status']>0xc7&&_0x570aed['status']<0x12c){const _0x209e53=yield _0x570aed['json']();return new SuccessfulAuthResponse(_0x209e53);}const _0x5d8a0f=yield _0x570aed['json']();return new FailedAuthResponse(_0x5d8a0f);}catch(_0x13cdd4){if(_0x13cdd4 instanceof Error)return new FailedAuthResponse({'detail':_0x13cdd4['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x13cdd4;}});}['refresh'](_0x139ec1){return __awaiter(this,void 0,void 0,function*(){var _0x36a48d='refresh';try{const _0x1cac57=yield this['fetch']['post'](_0x36a48d,_0x139ec1,null);if(_0x1cac57['status']>0xc7&&_0x1cac57['status']<0x12c){const _0xbd093b=yield _0x1cac57['json']();return new SuccessfulAuthResponse(_0xbd093b);}const _0x834822=yield _0x1cac57['json']();return new FailedAuthResponse(_0x834822);}catch(_0x27bda8){if(_0x27bda8 instanceof Error)return new FailedAuthResponse({'detail':_0x27bda8['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x27bda8;}});}}
13
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x296032,_0x2e2282,_0x4bea99,_0x485035){function _0x33bb3f(_0x57720e){return _0x57720e instanceof _0x4bea99?_0x57720e:new _0x4bea99(function(_0x57f2ca){_0x57f2ca(_0x57720e);});}return new(_0x4bea99||(_0x4bea99=Promise))(function(_0x207bfd,_0xb4259a){function _0x5bc174(_0x497c1d){try{_0x746e92(_0x485035['next'](_0x497c1d));}catch(_0x194c1b){_0xb4259a(_0x194c1b);}}function _0x30a1f9(_0x4b65e8){try{_0x746e92(_0x485035['throw'](_0x4b65e8));}catch(_0x46e28a){_0xb4259a(_0x46e28a);}}function _0x746e92(_0x393aef){_0x393aef['done']?_0x207bfd(_0x393aef['value']):_0x33bb3f(_0x393aef['value'])['then'](_0x5bc174,_0x30a1f9);}_0x746e92((_0x485035=_0x485035['apply'](_0x296032,_0x2e2282||[]))['next']());});};class AdminClient{constructor(_0xaa3cfe='https://admin.searchability.dev/'){var _0x55e277=new Fetch(_0xaa3cfe);this['Accounts']=new AccountService(_0x55e277),this['Lists']=new ListService(_0x55e277),this['ApiKeys']=new ApiKeyService(_0x55e277);}}class AuthClient{constructor(_0xf3b3f6='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0xf3b3f6);}['login'](_0x33fc5b){return __awaiter(this,void 0,void 0,function*(){var _0x23b8a2='login/'+_0x33fc5b;try{const _0x6430bb=yield yield fetch(_0x23b8a2);if(_0x6430bb['status']>0xc7&&_0x6430bb['status']<0x12c){const _0x41f43c=yield _0x6430bb['json']();return new SuccessfulAuthResponse(_0x41f43c);}const _0x29a5fd=yield _0x6430bb['json']();return new FailedAuthResponse(_0x29a5fd);}catch(_0x5542f5){if(_0x5542f5 instanceof Error)return new FailedAuthResponse({'detail':_0x5542f5['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x5542f5;}});}['refresh'](_0x1c7335){return __awaiter(this,void 0,void 0,function*(){var _0x3c0b56='refresh';try{const _0x4a0864=yield this['fetch']['post'](_0x3c0b56,_0x1c7335,null);if(_0x4a0864['status']>0xc7&&_0x4a0864['status']<0x12c){const _0x1f87bd=yield _0x4a0864['json']();return new SuccessfulAuthResponse(_0x1f87bd);}const _0x3835a7=yield _0x4a0864['json']();return new FailedAuthResponse(_0x3835a7);}catch(_0x6e12d1){if(_0x6e12d1 instanceof Error)return new FailedAuthResponse({'detail':_0x6e12d1['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x6e12d1;}});}}
14
14
 
15
- export { AdminClient, AuthClient, TokenStatus, Tokens };
15
+ export { AdminClient, AuthClient, Tokens };
package/dist/types.d.ts CHANGED
@@ -1,3 +1,33 @@
1
+ declare class Fetch {
2
+ readonly baseUri: string;
3
+ constructor(baseUri: string);
4
+ private getUrl;
5
+ get(path: string, accessToken: string): Promise<globalThis.Response>;
6
+ post(path: string, accessToken: string, body: any): Promise<globalThis.Response>;
7
+ put(path: string, accessToken: string, body: any): Promise<globalThis.Response>;
8
+ delete(path: string, accessToken: string): Promise<globalThis.Response>;
9
+ }
10
+
11
+ declare class AccountService {
12
+ readonly fetch: Fetch;
13
+ constructor(fetch: Fetch);
14
+ get(accountName: string, access_token: string): Promise<Response<Account, Problem>>;
15
+ }
16
+
17
+ declare class ApiKeyService {
18
+ readonly fetch: Fetch;
19
+ constructor(fetch: Fetch);
20
+ create(account_name: string, api_key_Name: string, access_token: string): Promise<Response<ApiKey, Problem>>;
21
+ view(account_name: string, api_key_name: string, access_token: string): Promise<Response<ApiKeyValue, Problem>>;
22
+ }
23
+
24
+ declare class ListService {
25
+ readonly fetch: Fetch;
26
+ constructor(fetch: Fetch);
27
+ add(accountName: string, listName: string, access_token: string): Promise<Response<Account, Problem>>;
28
+ remove(accountName: string, listName: string, access_token: string): Promise<Response<Account, Problem>>;
29
+ }
30
+
1
31
  declare enum TokenStatus {
2
32
  Ok = 0,
3
33
  Refresh = 1,
@@ -11,6 +41,19 @@ declare class Tokens {
11
41
  getStatus(): TokenStatus;
12
42
  }
13
43
 
44
+ declare class AdminClient {
45
+ constructor(baseUri?: string);
46
+ readonly Accounts: AccountService;
47
+ readonly Lists: ListService;
48
+ readonly ApiKeys: ApiKeyService;
49
+ }
50
+ declare class AuthClient {
51
+ private readonly fetch;
52
+ constructor(baseUri?: string);
53
+ login(apiKey: string): Promise<Response<Tokens, Problem>>;
54
+ refresh(refreshToken: string): Promise<Response<Tokens, Problem>>;
55
+ }
56
+
14
57
  declare abstract class Response<S, F> {
15
58
  readonly isSuccess: boolean;
16
59
  constructor(isSuccess: boolean);
@@ -103,4 +146,4 @@ declare class FailedApiKeyValueResponse extends Response<ApiKeyValue, Problem> {
103
146
  toProblem(): Problem;
104
147
  }
105
148
 
106
- export { type Account, type ApiKey, type ApiKeyValue, type Error, FailedAccountResponse, FailedApiKeyResponse, FailedApiKeyValueResponse, FailedAuthResponse, type List, type ListIdentity, type Problem, Response, SuccessfulAccountResponse, SuccessfulApiKeyResponse, SuccessfulApiKeyValueResponse, SuccessfulAuthResponse, TokenStatus, Tokens };
149
+ export { type Account, AdminClient, type ApiKey, type ApiKeyValue, AuthClient, type Error, FailedAccountResponse, FailedApiKeyResponse, FailedApiKeyValueResponse, FailedAuthResponse, type List, type ListIdentity, type Problem, Response, SuccessfulAccountResponse, SuccessfulApiKeyResponse, SuccessfulApiKeyValueResponse, SuccessfulAuthResponse, TokenStatus, Tokens };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@searchability/admin-client",
3
- "version": "0.0.29",
3
+ "version": "0.0.30",
4
4
  "description": "Searchability admin client.",
5
5
  "type": "module",
6
6
  "types": "./dist/types.d.ts",
@@ -1,15 +0,0 @@
1
- var TokenStatus;(function(_0x43a3e9){_0x43a3e9[_0x43a3e9['Ok']=0x0]='Ok',_0x43a3e9[_0x43a3e9['Refresh']=0x1]='Refresh',_0x43a3e9[_0x43a3e9['Expired']=0x2]='Expired';}(TokenStatus||(TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}['getStatus'](){if(Date['now']()<this['access_expires'])return TokenStatus['Ok'];if(Date['now']()<this['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
2
-
3
- class Response{constructor(_0x389d22){this['isSuccess']=_0x389d22;}}class SuccessfulAccountResponse extends Response{constructor(_0x4f3bad){super(!![]),this['account']=_0x4f3bad;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x29c16c){super(![]),this['problem']=_0x29c16c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x2e67be){super(!![]),this['tokens']=_0x2e67be;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x1b4c1f){super(![]),this['problem']=_0x1b4c1f;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x370faa){super(!![]),this['apiKey']=_0x370faa;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x32a7e4){super(![]),this['problem']=_0x32a7e4;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x30c94f){super(!![]),this['apiKeyValue']=_0x30c94f;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyValueResponse extends Response{constructor(_0x30b6ea){super(![]),this['problem']=_0x30b6ea;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
4
-
5
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x163416,_0x37ca36,_0x42c69d,_0x3a8135){function _0x462c76(_0x1d24e1){return _0x1d24e1 instanceof _0x42c69d?_0x1d24e1:new _0x42c69d(function(_0x5be231){_0x5be231(_0x1d24e1);});}return new(_0x42c69d||(_0x42c69d=Promise))(function(_0x15d1e3,_0x44dba2){function _0x45157f(_0x1cf6fe){try{_0xa7f89b(_0x3a8135['next'](_0x1cf6fe));}catch(_0x267a65){_0x44dba2(_0x267a65);}}function _0x3ad566(_0x72306e){try{_0xa7f89b(_0x3a8135['throw'](_0x72306e));}catch(_0x564b31){_0x44dba2(_0x564b31);}}function _0xa7f89b(_0x43f9f0){_0x43f9f0['done']?_0x15d1e3(_0x43f9f0['value']):_0x462c76(_0x43f9f0['value'])['then'](_0x45157f,_0x3ad566);}_0xa7f89b((_0x3a8135=_0x3a8135['apply'](_0x163416,_0x37ca36||[]))['next']());});};class AccountService{constructor(_0x2d68d0){this['fetch']=_0x2d68d0;}['get'](_0x5f0a41,_0xabde2d){return __awaiter$4(this,void 0,void 0,function*(){const _0x33ebf5='Account/'+_0x5f0a41+'/',_0x5da5c3=yield this['fetch']['get'](_0x33ebf5,_0xabde2d);try{if(_0x5da5c3['status']>0xc7&&_0x5da5c3['status']<0x12c){const _0x39a793=yield _0x5da5c3['json']();return new SuccessfulAccountResponse(_0x39a793);}const _0x26fb69=yield _0x5da5c3['json']();return new FailedAccountResponse(_0x26fb69);}catch(_0x353b23){if(_0x353b23 instanceof Error)return new FailedAccountResponse({'detail':_0x353b23['message'],'title':_0x353b23['name'],'status':0x1f4,'instance':'','type':''});throw _0x353b23;}});}}
6
-
7
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x262fab,_0x3b86d1,_0x36bb2c,_0x30026e){function _0x24d99b(_0x42893e){return _0x42893e instanceof _0x36bb2c?_0x42893e:new _0x36bb2c(function(_0x57451f){_0x57451f(_0x42893e);});}return new(_0x36bb2c||(_0x36bb2c=Promise))(function(_0x4ec620,_0xc7ee48){function _0x3c4453(_0x122421){try{_0x337185(_0x30026e['next'](_0x122421));}catch(_0x4fffbf){_0xc7ee48(_0x4fffbf);}}function _0x1654b6(_0x1b8a48){try{_0x337185(_0x30026e['throw'](_0x1b8a48));}catch(_0x3862f7){_0xc7ee48(_0x3862f7);}}function _0x337185(_0x345526){_0x345526['done']?_0x4ec620(_0x345526['value']):_0x24d99b(_0x345526['value'])['then'](_0x3c4453,_0x1654b6);}_0x337185((_0x30026e=_0x30026e['apply'](_0x262fab,_0x3b86d1||[]))['next']());});};class ApiKeyService{constructor(_0x470dff){this['fetch']=_0x470dff;}['create'](_0x4243c1,_0x37444f,_0x10bc13){return __awaiter$3(this,void 0,void 0,function*(){const _0x40f228='api-key/create',_0x310721={'account_name':_0x4243c1,'api_key_name':_0x37444f};try{const _0x1208ac=yield this['fetch']['post'](_0x40f228,_0x10bc13,_0x310721);if(_0x1208ac['status']>0xc7&&_0x1208ac['status']<0x12c){const _0x1afcb1=yield _0x1208ac['json']();return new SuccessfulApiKeyResponse(_0x1afcb1);}const _0x391294=yield _0x1208ac['json']();return new FailedApiKeyResponse(_0x391294);}catch(_0x318f02){if(_0x318f02 instanceof Error)return new FailedApiKeyResponse({'detail':_0x318f02['message'],'title':_0x318f02['name'],'status':0x1f4,'instance':'','type':''});throw _0x318f02;}});}['view'](_0x892f2a,_0x2e80dd,_0x586b6f){return __awaiter$3(this,void 0,void 0,function*(){const _0x4081ea='api-key/'+_0x892f2a+'/'+_0x2e80dd;try{const _0x476d94=yield this['fetch']['get'](_0x4081ea,_0x586b6f);if(_0x476d94['status']>0xc7&&_0x476d94['status']<0x12c){const _0x40d3fc=yield _0x476d94['json']();return new SuccessfulApiKeyValueResponse(_0x40d3fc);}const _0xb89bae=yield _0x476d94['json']();return new FailedApiKeyValueResponse(_0xb89bae);}catch(_0x56eb97){if(_0x56eb97 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x56eb97['message'],'title':_0x56eb97['name'],'status':0x1f4,'instance':'','type':''});throw _0x56eb97;}});}}
8
-
9
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0xb11936,_0x1cc8a0,_0x594241,_0x314622){function _0x149d4e(_0xbb8957){return _0xbb8957 instanceof _0x594241?_0xbb8957:new _0x594241(function(_0x2912e7){_0x2912e7(_0xbb8957);});}return new(_0x594241||(_0x594241=Promise))(function(_0x271a6d,_0x1c1b28){function _0x468794(_0x72817){try{_0x280f3f(_0x314622['next'](_0x72817));}catch(_0x501bc6){_0x1c1b28(_0x501bc6);}}function _0x214605(_0x3b33f6){try{_0x280f3f(_0x314622['throw'](_0x3b33f6));}catch(_0xf9d0b9){_0x1c1b28(_0xf9d0b9);}}function _0x280f3f(_0x46dfcf){_0x46dfcf['done']?_0x271a6d(_0x46dfcf['value']):_0x149d4e(_0x46dfcf['value'])['then'](_0x468794,_0x214605);}_0x280f3f((_0x314622=_0x314622['apply'](_0xb11936,_0x1cc8a0||[]))['next']());});};class ListService{constructor(_0x25ab11){this['fetch']=_0x25ab11;}['add'](_0x25220a,_0x1a9635,_0x34d08f){return __awaiter$2(this,void 0,void 0,function*(){const _0x47d0fb='List',_0x38218a={'account_name':_0x25220a,'list_name':_0x1a9635};try{const _0x3defd6=yield this['fetch']['post'](_0x47d0fb,_0x34d08f,_0x38218a);if(_0x3defd6['status']>0xc7&&_0x3defd6['status']<0x12c){const _0x2366c0=yield _0x3defd6['json']();return new SuccessfulAccountResponse(_0x2366c0);}const _0xbbee2e=yield _0x3defd6['json']();return new FailedAccountResponse(_0xbbee2e);}catch(_0x25d9de){if(_0x25d9de instanceof Error)return new FailedAccountResponse({'detail':_0x25d9de['message'],'title':_0x25d9de['name'],'status':0x1f4,'instance':'','type':''});throw _0x25d9de;}});}['remove'](_0x3fb81e,_0x5a93de,_0x383896){return __awaiter$2(this,void 0,void 0,function*(){const _0x11070d='List/'+_0x3fb81e+'/'+_0x5a93de,_0x49c4b1=yield this['fetch']['delete'](_0x11070d,_0x383896);try{if(_0x49c4b1['status']>0xc7&&_0x49c4b1['status']<0x12c){const _0x32e640=yield _0x49c4b1['json']();return new SuccessfulAccountResponse(_0x32e640);}const _0x22044b=yield _0x49c4b1['json']();return new FailedAccountResponse(_0x22044b);}catch(_0x37b73b){if(_0x37b73b instanceof Error)return new FailedAccountResponse({'detail':_0x37b73b['message'],'title':_0x37b73b['name'],'status':0x1f4,'instance':'','type':''});throw _0x37b73b;}});}}
10
-
11
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x3a0aa6,_0x36ed0c,_0x17723a,_0x46ca6d){function _0x4ec0df(_0x183fd7){return _0x183fd7 instanceof _0x17723a?_0x183fd7:new _0x17723a(function(_0x3df152){_0x3df152(_0x183fd7);});}return new(_0x17723a||(_0x17723a=Promise))(function(_0x2ba4f6,_0x4db1ac){function _0x52373e(_0x56955b){try{_0x29ac38(_0x46ca6d['next'](_0x56955b));}catch(_0x4ecf2a){_0x4db1ac(_0x4ecf2a);}}function _0x32ec8f(_0x145113){try{_0x29ac38(_0x46ca6d['throw'](_0x145113));}catch(_0x94e5d7){_0x4db1ac(_0x94e5d7);}}function _0x29ac38(_0x28e7aa){_0x28e7aa['done']?_0x2ba4f6(_0x28e7aa['value']):_0x4ec0df(_0x28e7aa['value'])['then'](_0x52373e,_0x32ec8f);}_0x29ac38((_0x46ca6d=_0x46ca6d['apply'](_0x3a0aa6,_0x36ed0c||[]))['next']());});};class Fetch{constructor(_0x160807){this['baseUri']=_0x160807,this['getUrl']=_0x46c389=>{return _0x46c389['startsWith']('/')&&(_0x46c389=_0x46c389['replace']('/','')),''+this['baseUri']+_0x46c389;},!_0x160807['endsWith']('/')&&(_0x160807=_0x160807+'/');}['get'](_0x3ac39a,_0x1e75c0){return __awaiter$1(this,void 0,void 0,function*(){const _0x317ba4=this['getUrl'](_0x3ac39a);return yield fetch(_0x317ba4,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1e75c0}});});}['post'](_0x425840,_0x16cdee,_0x193835){return __awaiter$1(this,void 0,void 0,function*(){const _0x36a868=this['getUrl'](_0x425840);return yield fetch(_0x36a868,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x16cdee},'body':_0x193835?JSON['stringify'](_0x193835):null});});}['put'](_0x29feda,_0x1a402b,_0x3774a3){return __awaiter$1(this,void 0,void 0,function*(){const _0xa6f6c7=this['getUrl'](_0x29feda);return yield fetch(_0xa6f6c7,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1a402b},'body':_0x3774a3?JSON['stringify'](_0x3774a3):null});});}['delete'](_0x45a5dc,_0x26022a){return __awaiter$1(this,void 0,void 0,function*(){const _0x1aa108=this['getUrl'](_0x45a5dc);return yield fetch(_0x1aa108,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x26022a}});});}}
12
-
13
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x45f20e,_0x33786d,_0x178a37,_0x3d5cfc){function _0x2442f6(_0x52bfcd){return _0x52bfcd instanceof _0x178a37?_0x52bfcd:new _0x178a37(function(_0x2672d3){_0x2672d3(_0x52bfcd);});}return new(_0x178a37||(_0x178a37=Promise))(function(_0xd8f452,_0x352ed3){function _0x27dd72(_0x4e416b){try{_0x57a39c(_0x3d5cfc['next'](_0x4e416b));}catch(_0x31a93d){_0x352ed3(_0x31a93d);}}function _0xb6de21(_0x16cca2){try{_0x57a39c(_0x3d5cfc['throw'](_0x16cca2));}catch(_0x1ab15c){_0x352ed3(_0x1ab15c);}}function _0x57a39c(_0x33d849){_0x33d849['done']?_0xd8f452(_0x33d849['value']):_0x2442f6(_0x33d849['value'])['then'](_0x27dd72,_0xb6de21);}_0x57a39c((_0x3d5cfc=_0x3d5cfc['apply'](_0x45f20e,_0x33786d||[]))['next']());});};class AdminClient{constructor(_0x1757f8='https://admin.searchability.dev/'){var _0x40b818=new Fetch(_0x1757f8);this['Accounts']=new AccountService(_0x40b818),this['Lists']=new ListService(_0x40b818),this['ApiKeys']=new ApiKeyService(_0x40b818);}}class AuthClient{constructor(_0x4eb9c1='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x4eb9c1);}['login'](_0x278e02){return __awaiter(this,void 0,void 0,function*(){var _0x1ccb4b='login/'+_0x278e02;try{const _0x3916f7=yield yield fetch(_0x1ccb4b);if(_0x3916f7['status']>0xc7&&_0x3916f7['status']<0x12c){const _0x3544f6=yield _0x3916f7['json']();return new SuccessfulAuthResponse(_0x3544f6);}const _0x4c600c=yield _0x3916f7['json']();return new FailedAuthResponse(_0x4c600c);}catch(_0x2c559c){if(_0x2c559c instanceof Error)return new FailedAuthResponse({'detail':_0x2c559c['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x2c559c;}});}['refresh'](_0x20f420){return __awaiter(this,void 0,void 0,function*(){var _0x581872='refresh';try{const _0x1d73fc=yield this['fetch']['post'](_0x581872,_0x20f420,null);if(_0x1d73fc['status']>0xc7&&_0x1d73fc['status']<0x12c){const _0x301718=yield _0x1d73fc['json']();return new SuccessfulAuthResponse(_0x301718);}const _0x14c393=yield _0x1d73fc['json']();return new FailedAuthResponse(_0x14c393);}catch(_0x41740f){if(_0x41740f instanceof Error)return new FailedAuthResponse({'detail':_0x41740f['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x41740f;}});}}
14
-
15
- export { AdminClient, AuthClient, TokenStatus, Tokens };