@searchability/admin-client 0.0.28 → 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(_0x5c65db){_0x5c65db[_0x5c65db['Ok']=0x0]='Ok',_0x5c65db[_0x5c65db['Refresh']=0x1]='Refresh',_0x5c65db[_0x5c65db['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(_0x44db66){this['isSuccess']=_0x44db66;}}class SuccessfulAccountResponse extends Response{constructor(_0x4b820e){super(!![]),this['account']=_0x4b820e;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x453bc8){super(![]),this['problem']=_0x453bc8;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0xbd4d6c){super(!![]),this['tokens']=_0xbd4d6c;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x5a3ead){super(![]),this['problem']=_0x5a3ead;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x2cbefc){super(!![]),this['apiKey']=_0x2cbefc;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x1bb362){super(![]),this['problem']=_0x1bb362;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x3e538c){super(!![]),this['apiKeyValue']=_0x3e538c;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyValueResponse extends Response{constructor(_0x238317){super(![]),this['problem']=_0x238317;}['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(_0x1c5803,_0x41db83,_0xff8370,_0x4db940){function _0x42d0f5(_0x31c9e6){return _0x31c9e6 instanceof _0xff8370?_0x31c9e6:new _0xff8370(function(_0x22ef48){_0x22ef48(_0x31c9e6);});}return new(_0xff8370||(_0xff8370=Promise))(function(_0x22767a,_0xad2123){function _0x5ac09b(_0x3e9e1a){try{_0x47b5e5(_0x4db940['next'](_0x3e9e1a));}catch(_0x1cce74){_0xad2123(_0x1cce74);}}function _0x1f4cf9(_0x425cb4){try{_0x47b5e5(_0x4db940['throw'](_0x425cb4));}catch(_0x1792b7){_0xad2123(_0x1792b7);}}function _0x47b5e5(_0x5d4f4d){_0x5d4f4d['done']?_0x22767a(_0x5d4f4d['value']):_0x42d0f5(_0x5d4f4d['value'])['then'](_0x5ac09b,_0x1f4cf9);}_0x47b5e5((_0x4db940=_0x4db940['apply'](_0x1c5803,_0x41db83||[]))['next']());});};class AccountService{constructor(_0x1d6490){this['fetch']=_0x1d6490;}['get'](_0xab5efd,_0x24ac47){return __awaiter$4(this,void 0,void 0,function*(){const _0xfe923f='Account/'+_0xab5efd+'/',_0x26bfd4=yield this['fetch']['get'](_0xfe923f,_0x24ac47);try{if(_0x26bfd4['status']>0xc7&&_0x26bfd4['status']<0x12c){const _0x5f39c8=yield _0x26bfd4['json']();return new SuccessfulAccountResponse(_0x5f39c8);}const _0x3882cc=yield _0x26bfd4['json']();return new FailedAccountResponse(_0x3882cc);}catch(_0x332784){if(_0x332784 instanceof Error)return new FailedAccountResponse({'detail':_0x332784['message'],'title':_0x332784['name'],'status':0x1f4,'instance':'','type':''});throw _0x332784;}});}}
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(_0x57a117,_0x4c967b,_0x28929b,_0x1fdbd4){function _0x46681c(_0x4780b1){return _0x4780b1 instanceof _0x28929b?_0x4780b1:new _0x28929b(function(_0x509c6f){_0x509c6f(_0x4780b1);});}return new(_0x28929b||(_0x28929b=Promise))(function(_0x51de6b,_0x405ec8){function _0x52b965(_0x4ec42c){try{_0x2b1e39(_0x1fdbd4['next'](_0x4ec42c));}catch(_0x532cfa){_0x405ec8(_0x532cfa);}}function _0x522a68(_0x59efed){try{_0x2b1e39(_0x1fdbd4['throw'](_0x59efed));}catch(_0x355ee2){_0x405ec8(_0x355ee2);}}function _0x2b1e39(_0x4043e7){_0x4043e7['done']?_0x51de6b(_0x4043e7['value']):_0x46681c(_0x4043e7['value'])['then'](_0x52b965,_0x522a68);}_0x2b1e39((_0x1fdbd4=_0x1fdbd4['apply'](_0x57a117,_0x4c967b||[]))['next']());});};class ApiKeyService{constructor(_0x203fe9){this['fetch']=_0x203fe9;}['create'](_0x2032d3,_0x433f72,_0x21ab60){return __awaiter$3(this,void 0,void 0,function*(){const _0x2bf174='api-key/create',_0x4ab133={'account_name':_0x2032d3,'api_key_name':_0x433f72};try{const _0x44f428=yield this['fetch']['post'](_0x2bf174,_0x21ab60,_0x4ab133);if(_0x44f428['status']>0xc7&&_0x44f428['status']<0x12c){const _0x268fbe=yield _0x44f428['json']();return new SuccessfulApiKeyResponse(_0x268fbe);}const _0x482951=yield _0x44f428['json']();return new FailedApiKeyResponse(_0x482951);}catch(_0x54a475){if(_0x54a475 instanceof Error)return new FailedApiKeyResponse({'detail':_0x54a475['message'],'title':_0x54a475['name'],'status':0x1f4,'instance':'','type':''});throw _0x54a475;}});}['view'](_0x2870e8,_0x47337a,_0x4b1f00){return __awaiter$3(this,void 0,void 0,function*(){const _0x3c7fda='api-key/'+_0x2870e8+'/'+_0x47337a;try{const _0x3ebfb9=yield this['fetch']['get'](_0x3c7fda,_0x4b1f00);if(_0x3ebfb9['status']>0xc7&&_0x3ebfb9['status']<0x12c){const _0x69b3fa=yield _0x3ebfb9['json']();return new SuccessfulApiKeyValueResponse(_0x69b3fa);}const _0xafd0e0=yield _0x3ebfb9['json']();return new FailedApiKeyValueResponse(_0xafd0e0);}catch(_0x481b80){if(_0x481b80 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x481b80['message'],'title':_0x481b80['name'],'status':0x1f4,'instance':'','type':''});throw _0x481b80;}});}}
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(_0x4a1f2b,_0x397a9b,_0xc636a6,_0x41b9eb){function _0x268891(_0xe496e3){return _0xe496e3 instanceof _0xc636a6?_0xe496e3:new _0xc636a6(function(_0x5764cf){_0x5764cf(_0xe496e3);});}return new(_0xc636a6||(_0xc636a6=Promise))(function(_0x12e34d,_0x42e86a){function _0x4a7d92(_0xc8629d){try{_0x130f6d(_0x41b9eb['next'](_0xc8629d));}catch(_0x201e0a){_0x42e86a(_0x201e0a);}}function _0x388581(_0x39f537){try{_0x130f6d(_0x41b9eb['throw'](_0x39f537));}catch(_0x46ff98){_0x42e86a(_0x46ff98);}}function _0x130f6d(_0x4c99f4){_0x4c99f4['done']?_0x12e34d(_0x4c99f4['value']):_0x268891(_0x4c99f4['value'])['then'](_0x4a7d92,_0x388581);}_0x130f6d((_0x41b9eb=_0x41b9eb['apply'](_0x4a1f2b,_0x397a9b||[]))['next']());});};class ListService{constructor(_0x5e5bf3){this['fetch']=_0x5e5bf3;}['add'](_0x1857dd,_0x59ffed,_0x42eca9){return __awaiter$2(this,void 0,void 0,function*(){const _0x9a374f='List',_0x4d846e={'account_name':_0x1857dd,'list_name':_0x59ffed};try{const _0x5cf00f=yield this['fetch']['post'](_0x9a374f,_0x42eca9,_0x4d846e);if(_0x5cf00f['status']>0xc7&&_0x5cf00f['status']<0x12c){const _0x5b949b=yield _0x5cf00f['json']();return new SuccessfulAccountResponse(_0x5b949b);}const _0x5b4aed=yield _0x5cf00f['json']();return new FailedAccountResponse(_0x5b4aed);}catch(_0x5bdc35){if(_0x5bdc35 instanceof Error)return new FailedAccountResponse({'detail':_0x5bdc35['message'],'title':_0x5bdc35['name'],'status':0x1f4,'instance':'','type':''});throw _0x5bdc35;}});}['remove'](_0x4ec61b,_0x5a988a,_0x43d006){return __awaiter$2(this,void 0,void 0,function*(){const _0x2e0447='List/'+_0x4ec61b+'/'+_0x5a988a,_0x8e29bb=yield this['fetch']['delete'](_0x2e0447,_0x43d006);try{if(_0x8e29bb['status']>0xc7&&_0x8e29bb['status']<0x12c){const _0xef391f=yield _0x8e29bb['json']();return new SuccessfulAccountResponse(_0xef391f);}const _0x3e7d27=yield _0x8e29bb['json']();return new FailedAccountResponse(_0x3e7d27);}catch(_0x9f5d35){if(_0x9f5d35 instanceof Error)return new FailedAccountResponse({'detail':_0x9f5d35['message'],'title':_0x9f5d35['name'],'status':0x1f4,'instance':'','type':''});throw _0x9f5d35;}});}}
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(_0x4ea46f,_0x19245a,_0x45c4d2,_0x113a75){function _0x1e82ae(_0x5adc9c){return _0x5adc9c instanceof _0x45c4d2?_0x5adc9c:new _0x45c4d2(function(_0x235dc2){_0x235dc2(_0x5adc9c);});}return new(_0x45c4d2||(_0x45c4d2=Promise))(function(_0x397b0c,_0x4890f7){function _0x5e987d(_0x237a84){try{_0x2afc01(_0x113a75['next'](_0x237a84));}catch(_0x4ecee5){_0x4890f7(_0x4ecee5);}}function _0x5b2169(_0x1d732d){try{_0x2afc01(_0x113a75['throw'](_0x1d732d));}catch(_0x5eae79){_0x4890f7(_0x5eae79);}}function _0x2afc01(_0x3bcb8f){_0x3bcb8f['done']?_0x397b0c(_0x3bcb8f['value']):_0x1e82ae(_0x3bcb8f['value'])['then'](_0x5e987d,_0x5b2169);}_0x2afc01((_0x113a75=_0x113a75['apply'](_0x4ea46f,_0x19245a||[]))['next']());});};class Fetch{constructor(_0x38e15d){this['baseUri']=_0x38e15d,this['getUrl']=_0x1097a7=>{return _0x1097a7['startsWith']('/')&&(_0x1097a7=_0x1097a7['replace']('/','')),''+this['baseUri']+_0x1097a7;},!_0x38e15d['endsWith']('/')&&(_0x38e15d=_0x38e15d+'/');}['get'](_0x8d487a,_0x53bcf6){return __awaiter$1(this,void 0,void 0,function*(){const _0x52aa37=this['getUrl'](_0x8d487a);return yield fetch(_0x52aa37,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x53bcf6}});});}['post'](_0x23101f,_0x1fb8b3,_0x3af7c9){return __awaiter$1(this,void 0,void 0,function*(){const _0x492b4c=this['getUrl'](_0x23101f);return yield fetch(_0x492b4c,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1fb8b3},'body':_0x3af7c9?JSON['stringify'](_0x3af7c9):null});});}['put'](_0x451e56,_0x2a7a6f,_0x3bf198){return __awaiter$1(this,void 0,void 0,function*(){const _0x142ea4=this['getUrl'](_0x451e56);return yield fetch(_0x142ea4,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2a7a6f},'body':_0x3bf198?JSON['stringify'](_0x3bf198):null});});}['delete'](_0x3a77b4,_0x29c12b){return __awaiter$1(this,void 0,void 0,function*(){const _0x379e22=this['getUrl'](_0x3a77b4);return yield fetch(_0x379e22,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x29c12b}});});}}
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(_0x5f3571,_0x3a07dd,_0x340743,_0x2d22e6){function _0xd53999(_0x46e833){return _0x46e833 instanceof _0x340743?_0x46e833:new _0x340743(function(_0x2e3a7d){_0x2e3a7d(_0x46e833);});}return new(_0x340743||(_0x340743=Promise))(function(_0x3280a3,_0x1626b9){function _0xb88d37(_0x4d5407){try{_0x26ae58(_0x2d22e6['next'](_0x4d5407));}catch(_0x2d5149){_0x1626b9(_0x2d5149);}}function _0x45fa6f(_0x476b34){try{_0x26ae58(_0x2d22e6['throw'](_0x476b34));}catch(_0x51e175){_0x1626b9(_0x51e175);}}function _0x26ae58(_0x511038){_0x511038['done']?_0x3280a3(_0x511038['value']):_0xd53999(_0x511038['value'])['then'](_0xb88d37,_0x45fa6f);}_0x26ae58((_0x2d22e6=_0x2d22e6['apply'](_0x5f3571,_0x3a07dd||[]))['next']());});};class AdminClient{constructor(_0x758b0f='https://admin.searchability.dev/'){var _0x3cab75=new Fetch(_0x758b0f);this['Accounts']=new AccountService(_0x3cab75),this['Lists']=new ListService(_0x3cab75),this['ApiKeys']=new ApiKeyService(_0x3cab75);}}class AuthClient{constructor(_0x592003='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x592003);}['login'](_0x19b82b){return __awaiter(this,void 0,void 0,function*(){var _0x1568f0='login/'+_0x19b82b;try{const _0x1cd57b=yield yield fetch(_0x1568f0);if(_0x1cd57b['status']>0xc7&&_0x1cd57b['status']<0x12c){const _0x406a23=yield _0x1cd57b['json']();return new SuccessfulAuthResponse(_0x406a23);}const _0x37edb4=yield _0x1cd57b['json']();return new FailedAuthResponse(_0x37edb4);}catch(_0x2d8cde){if(_0x2d8cde instanceof Error)return new FailedAuthResponse({'detail':_0x2d8cde['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x2d8cde;}});}['refresh'](_0xf7275d){return __awaiter(this,void 0,void 0,function*(){var _0x14de38='refresh';try{const _0x464567=yield this['fetch']['post'](_0x14de38,_0xf7275d,null);if(_0x464567['status']>0xc7&&_0x464567['status']<0x12c){const _0x216fc7=yield _0x464567['json']();return new SuccessfulAuthResponse(_0x216fc7);}const _0x549ddd=yield _0x464567['json']();return new FailedAuthResponse(_0x549ddd);}catch(_0x324279){if(_0x324279 instanceof Error)return new FailedAuthResponse({'detail':_0x324279['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x324279;}});}}
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(_0x1c1e6b){_0x1c1e6b[_0x1c1e6b['Ok']=0x0]='Ok',_0x1c1e6b[_0x1c1e6b['Refresh']=0x1]='Refresh',_0x1c1e6b[_0x1c1e6b['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(_0x2618c5){this['isSuccess']=_0x2618c5;}}class SuccessfulAccountResponse extends Response{constructor(_0x5d134e){super(!![]),this['account']=_0x5d134e;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x47f5ff){super(![]),this['problem']=_0x47f5ff;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x4f31bc){super(!![]),this['tokens']=_0x4f31bc;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x947d4a){super(![]),this['problem']=_0x947d4a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x4c573a){super(!![]),this['apiKey']=_0x4c573a;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x27fa97){super(![]),this['problem']=_0x27fa97;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0xe9ac1){super(!![]),this['apiKeyValue']=_0xe9ac1;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyValueResponse extends Response{constructor(_0xc18ad6){super(![]),this['problem']=_0xc18ad6;}['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(_0x4ff2a8,_0x35a1ed,_0x1ef313,_0x11b828){function _0x217bd1(_0x2507d1){return _0x2507d1 instanceof _0x1ef313?_0x2507d1:new _0x1ef313(function(_0x229c0d){_0x229c0d(_0x2507d1);});}return new(_0x1ef313||(_0x1ef313=Promise))(function(_0x253029,_0x58e7fe){function _0x1ea0c0(_0x5c4aa9){try{_0x334cbf(_0x11b828['next'](_0x5c4aa9));}catch(_0xc6b221){_0x58e7fe(_0xc6b221);}}function _0x2bc91c(_0x460bbc){try{_0x334cbf(_0x11b828['throw'](_0x460bbc));}catch(_0x3dbd8d){_0x58e7fe(_0x3dbd8d);}}function _0x334cbf(_0x1364d3){_0x1364d3['done']?_0x253029(_0x1364d3['value']):_0x217bd1(_0x1364d3['value'])['then'](_0x1ea0c0,_0x2bc91c);}_0x334cbf((_0x11b828=_0x11b828['apply'](_0x4ff2a8,_0x35a1ed||[]))['next']());});};class AccountService{constructor(_0x112bce){this['fetch']=_0x112bce;}['get'](_0x468125,_0x579810){return __awaiter$4(this,void 0,void 0,function*(){const _0x38d5d8='Account/'+_0x468125+'/',_0x42b3a7=yield this['fetch']['get'](_0x38d5d8,_0x579810);try{if(_0x42b3a7['status']>0xc7&&_0x42b3a7['status']<0x12c){const _0x4aee58=yield _0x42b3a7['json']();return new SuccessfulAccountResponse(_0x4aee58);}const _0x42b97c=yield _0x42b3a7['json']();return new FailedAccountResponse(_0x42b97c);}catch(_0x1ab88a){if(_0x1ab88a instanceof Error)return new FailedAccountResponse({'detail':_0x1ab88a['message'],'title':_0x1ab88a['name'],'status':0x1f4,'instance':'','type':''});throw _0x1ab88a;}});}}
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(_0x4a1303,_0x11b202,_0x8ad526,_0x24a524){function _0x194a8f(_0x3617d7){return _0x3617d7 instanceof _0x8ad526?_0x3617d7:new _0x8ad526(function(_0x708d5d){_0x708d5d(_0x3617d7);});}return new(_0x8ad526||(_0x8ad526=Promise))(function(_0x216903,_0x19ba76){function _0x1aeb75(_0x4433e7){try{_0x256ce3(_0x24a524['next'](_0x4433e7));}catch(_0x3f2be7){_0x19ba76(_0x3f2be7);}}function _0x1bb2ab(_0xfb0882){try{_0x256ce3(_0x24a524['throw'](_0xfb0882));}catch(_0x2d2113){_0x19ba76(_0x2d2113);}}function _0x256ce3(_0x3bf824){_0x3bf824['done']?_0x216903(_0x3bf824['value']):_0x194a8f(_0x3bf824['value'])['then'](_0x1aeb75,_0x1bb2ab);}_0x256ce3((_0x24a524=_0x24a524['apply'](_0x4a1303,_0x11b202||[]))['next']());});};class ApiKeyService{constructor(_0x3ec99b){this['fetch']=_0x3ec99b;}['create'](_0x5ac415,_0x35cbf4,_0x4833eb){return __awaiter$3(this,void 0,void 0,function*(){const _0x533695='api-key/create',_0xbc9795={'account_name':_0x5ac415,'api_key_name':_0x35cbf4};try{const _0x3908f1=yield this['fetch']['post'](_0x533695,_0x4833eb,_0xbc9795);if(_0x3908f1['status']>0xc7&&_0x3908f1['status']<0x12c){const _0x168d14=yield _0x3908f1['json']();return new SuccessfulApiKeyResponse(_0x168d14);}const _0x5fadc5=yield _0x3908f1['json']();return new FailedApiKeyResponse(_0x5fadc5);}catch(_0x32b255){if(_0x32b255 instanceof Error)return new FailedApiKeyResponse({'detail':_0x32b255['message'],'title':_0x32b255['name'],'status':0x1f4,'instance':'','type':''});throw _0x32b255;}});}['view'](_0x491971,_0x273dff,_0x8c5a58){return __awaiter$3(this,void 0,void 0,function*(){const _0x2d87bf='api-key/'+_0x491971+'/'+_0x273dff;try{const _0x312e36=yield this['fetch']['get'](_0x2d87bf,_0x8c5a58);if(_0x312e36['status']>0xc7&&_0x312e36['status']<0x12c){const _0x32573f=yield _0x312e36['json']();return new SuccessfulApiKeyValueResponse(_0x32573f);}const _0xd6ba29=yield _0x312e36['json']();return new FailedApiKeyValueResponse(_0xd6ba29);}catch(_0x237f93){if(_0x237f93 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x237f93['message'],'title':_0x237f93['name'],'status':0x1f4,'instance':'','type':''});throw _0x237f93;}});}}
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(_0x547f0b,_0x4b4867,_0x112f71,_0x146e5d){function _0x391157(_0x1af33c){return _0x1af33c instanceof _0x112f71?_0x1af33c:new _0x112f71(function(_0x51b19){_0x51b19(_0x1af33c);});}return new(_0x112f71||(_0x112f71=Promise))(function(_0x29f4ea,_0xa45e07){function _0x18c5c5(_0x35cc4e){try{_0x18f69d(_0x146e5d['next'](_0x35cc4e));}catch(_0x56a690){_0xa45e07(_0x56a690);}}function _0x480de5(_0x54d47f){try{_0x18f69d(_0x146e5d['throw'](_0x54d47f));}catch(_0x1a1ab5){_0xa45e07(_0x1a1ab5);}}function _0x18f69d(_0x54f271){_0x54f271['done']?_0x29f4ea(_0x54f271['value']):_0x391157(_0x54f271['value'])['then'](_0x18c5c5,_0x480de5);}_0x18f69d((_0x146e5d=_0x146e5d['apply'](_0x547f0b,_0x4b4867||[]))['next']());});};class ListService{constructor(_0x25f54a){this['fetch']=_0x25f54a;}['add'](_0x4f950,_0x10dd11,_0x2a0e11){return __awaiter$2(this,void 0,void 0,function*(){const _0x8ca47c='List',_0x40abbe={'account_name':_0x4f950,'list_name':_0x10dd11};try{const _0x540c73=yield this['fetch']['post'](_0x8ca47c,_0x2a0e11,_0x40abbe);if(_0x540c73['status']>0xc7&&_0x540c73['status']<0x12c){const _0x26241b=yield _0x540c73['json']();return new SuccessfulAccountResponse(_0x26241b);}const _0x3884d8=yield _0x540c73['json']();return new FailedAccountResponse(_0x3884d8);}catch(_0x1c4bea){if(_0x1c4bea instanceof Error)return new FailedAccountResponse({'detail':_0x1c4bea['message'],'title':_0x1c4bea['name'],'status':0x1f4,'instance':'','type':''});throw _0x1c4bea;}});}['remove'](_0x7b1443,_0x3a9b07,_0x644008){return __awaiter$2(this,void 0,void 0,function*(){const _0x49efe3='List/'+_0x7b1443+'/'+_0x3a9b07,_0xfd7c91=yield this['fetch']['delete'](_0x49efe3,_0x644008);try{if(_0xfd7c91['status']>0xc7&&_0xfd7c91['status']<0x12c){const _0x201730=yield _0xfd7c91['json']();return new SuccessfulAccountResponse(_0x201730);}const _0x2d2e1d=yield _0xfd7c91['json']();return new FailedAccountResponse(_0x2d2e1d);}catch(_0x4725e0){if(_0x4725e0 instanceof Error)return new FailedAccountResponse({'detail':_0x4725e0['message'],'title':_0x4725e0['name'],'status':0x1f4,'instance':'','type':''});throw _0x4725e0;}});}}
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(_0xf4ec03,_0x12a65e,_0x351700,_0x4f0ca5){function _0x576dd2(_0x12c594){return _0x12c594 instanceof _0x351700?_0x12c594:new _0x351700(function(_0x177ac3){_0x177ac3(_0x12c594);});}return new(_0x351700||(_0x351700=Promise))(function(_0x2ccad2,_0x1f0eed){function _0x4f5a4b(_0x274305){try{_0x4cbf5c(_0x4f0ca5['next'](_0x274305));}catch(_0x50c4dd){_0x1f0eed(_0x50c4dd);}}function _0x23f28b(_0x424551){try{_0x4cbf5c(_0x4f0ca5['throw'](_0x424551));}catch(_0x7cb07c){_0x1f0eed(_0x7cb07c);}}function _0x4cbf5c(_0x164146){_0x164146['done']?_0x2ccad2(_0x164146['value']):_0x576dd2(_0x164146['value'])['then'](_0x4f5a4b,_0x23f28b);}_0x4cbf5c((_0x4f0ca5=_0x4f0ca5['apply'](_0xf4ec03,_0x12a65e||[]))['next']());});};class Fetch{constructor(_0x29787d){this['baseUri']=_0x29787d,this['getUrl']=_0x581dc1=>{return _0x581dc1['startsWith']('/')&&(_0x581dc1=_0x581dc1['replace']('/','')),''+this['baseUri']+_0x581dc1;},!_0x29787d['endsWith']('/')&&(_0x29787d=_0x29787d+'/');}['get'](_0x2b1561,_0x1c9fe3){return __awaiter$1(this,void 0,void 0,function*(){const _0x121310=this['getUrl'](_0x2b1561);return yield fetch(_0x121310,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1c9fe3}});});}['post'](_0x3bb5ad,_0x54acd2,_0x5ca06a){return __awaiter$1(this,void 0,void 0,function*(){const _0x31848d=this['getUrl'](_0x3bb5ad);return yield fetch(_0x31848d,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x54acd2},'body':_0x5ca06a?JSON['stringify'](_0x5ca06a):null});});}['put'](_0x5d4c4e,_0x3120f9,_0x57896b){return __awaiter$1(this,void 0,void 0,function*(){const _0x39103b=this['getUrl'](_0x5d4c4e);return yield fetch(_0x39103b,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3120f9},'body':_0x57896b?JSON['stringify'](_0x57896b):null});});}['delete'](_0x5909b9,_0x359d8f){return __awaiter$1(this,void 0,void 0,function*(){const _0x42b4f3=this['getUrl'](_0x5909b9);return yield fetch(_0x42b4f3,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x359d8f}});});}}
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(_0x20bdfe,_0x1966ca,_0x3d8fe1,_0x27f085){function _0x169b9c(_0x326506){return _0x326506 instanceof _0x3d8fe1?_0x326506:new _0x3d8fe1(function(_0x45136a){_0x45136a(_0x326506);});}return new(_0x3d8fe1||(_0x3d8fe1=Promise))(function(_0x4f7408,_0x5726d){function _0x4fe009(_0x3e66f9){try{_0x4bebaf(_0x27f085['next'](_0x3e66f9));}catch(_0x38599a){_0x5726d(_0x38599a);}}function _0x1492fb(_0x87e133){try{_0x4bebaf(_0x27f085['throw'](_0x87e133));}catch(_0x43b610){_0x5726d(_0x43b610);}}function _0x4bebaf(_0x160549){_0x160549['done']?_0x4f7408(_0x160549['value']):_0x169b9c(_0x160549['value'])['then'](_0x4fe009,_0x1492fb);}_0x4bebaf((_0x27f085=_0x27f085['apply'](_0x20bdfe,_0x1966ca||[]))['next']());});};class AdminClient{constructor(_0x177a12='https://admin.searchability.dev/'){var _0x50a565=new Fetch(_0x177a12);this['Accounts']=new AccountService(_0x50a565),this['Lists']=new ListService(_0x50a565),this['ApiKeys']=new ApiKeyService(_0x50a565);}}class AuthClient{constructor(_0x351495='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x351495);}['login'](_0x1079e8){return __awaiter(this,void 0,void 0,function*(){var _0x135813='login/'+_0x1079e8;try{const _0x1fa861=yield yield fetch(_0x135813);if(_0x1fa861['status']>0xc7&&_0x1fa861['status']<0x12c){const _0x2216c1=yield _0x1fa861['json']();return new SuccessfulAuthResponse(_0x2216c1);}const _0x6afcbd=yield _0x1fa861['json']();return new FailedAuthResponse(_0x6afcbd);}catch(_0x5bb2cf){if(_0x5bb2cf instanceof Error)return new FailedAuthResponse({'detail':_0x5bb2cf['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x5bb2cf;}});}['refresh'](_0x1b3d0f){return __awaiter(this,void 0,void 0,function*(){var _0x1dfacb='refresh';try{const _0x14e66e=yield this['fetch']['post'](_0x1dfacb,_0x1b3d0f,null);if(_0x14e66e['status']>0xc7&&_0x14e66e['status']<0x12c){const _0x498579=yield _0x14e66e['json']();return new SuccessfulAuthResponse(_0x498579);}const _0x1c6d19=yield _0x14e66e['json']();return new FailedAuthResponse(_0x1c6d19);}catch(_0x1e7402){if(_0x1e7402 instanceof Error)return new FailedAuthResponse({'detail':_0x1e7402['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x1e7402;}});}}
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.28",
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(_0x271677){_0x271677[_0x271677['Ok']=0x0]='Ok',_0x271677[_0x271677['Refresh']=0x1]='Refresh',_0x271677[_0x271677['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(_0x449166){this['isSuccess']=_0x449166;}}class SuccessfulAccountResponse extends Response{constructor(_0x5f3487){super(!![]),this['account']=_0x5f3487;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x26a7e3){super(![]),this['problem']=_0x26a7e3;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x308beb){super(!![]),this['tokens']=_0x308beb;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x4cd9e6){super(![]),this['problem']=_0x4cd9e6;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x3748ac){super(!![]),this['apiKey']=_0x3748ac;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x1fddf4){super(![]),this['problem']=_0x1fddf4;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x40f07b){super(!![]),this['apiKeyValue']=_0x40f07b;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyValueResponse extends Response{constructor(_0x4e0d3d){super(![]),this['problem']=_0x4e0d3d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
4
-
5
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x43721e,_0xeb0157,_0xe1faf1,_0x423182){function _0x555064(_0x4ce3a1){return _0x4ce3a1 instanceof _0xe1faf1?_0x4ce3a1:new _0xe1faf1(function(_0x5cc00d){_0x5cc00d(_0x4ce3a1);});}return new(_0xe1faf1||(_0xe1faf1=Promise))(function(_0x4e0e58,_0x37e791){function _0x200c65(_0x367160){try{_0x440568(_0x423182['next'](_0x367160));}catch(_0x540369){_0x37e791(_0x540369);}}function _0x3de339(_0x264f04){try{_0x440568(_0x423182['throw'](_0x264f04));}catch(_0xbb292e){_0x37e791(_0xbb292e);}}function _0x440568(_0x1afc90){_0x1afc90['done']?_0x4e0e58(_0x1afc90['value']):_0x555064(_0x1afc90['value'])['then'](_0x200c65,_0x3de339);}_0x440568((_0x423182=_0x423182['apply'](_0x43721e,_0xeb0157||[]))['next']());});};class AccountService{constructor(_0xde888d){this['fetch']=_0xde888d;}['get'](_0x6bbb34,_0x50c3c3){return __awaiter$4(this,void 0,void 0,function*(){const _0x2f6001='Account/'+_0x6bbb34+'/',_0x33ed4a=yield this['fetch']['get'](_0x2f6001,_0x50c3c3);try{if(_0x33ed4a['status']>0xc7&&_0x33ed4a['status']<0x12c){const _0x4b7c68=yield _0x33ed4a['json']();return new SuccessfulAccountResponse(_0x4b7c68);}const _0x3585da=yield _0x33ed4a['json']();return new FailedAccountResponse(_0x3585da);}catch(_0x5e5d8d){if(_0x5e5d8d instanceof Error)return new FailedAccountResponse({'detail':_0x5e5d8d['message'],'title':_0x5e5d8d['name'],'status':0x1f4,'instance':'','type':''});throw _0x5e5d8d;}});}}
6
-
7
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x31c83c,_0x45ec0d,_0x533ece,_0x149421){function _0x52f8f7(_0x3e94dc){return _0x3e94dc instanceof _0x533ece?_0x3e94dc:new _0x533ece(function(_0x54e7ec){_0x54e7ec(_0x3e94dc);});}return new(_0x533ece||(_0x533ece=Promise))(function(_0x408fcc,_0x5ad6b9){function _0x4680cd(_0x5a5473){try{_0x28530d(_0x149421['next'](_0x5a5473));}catch(_0x176e56){_0x5ad6b9(_0x176e56);}}function _0x95029b(_0x234578){try{_0x28530d(_0x149421['throw'](_0x234578));}catch(_0x51c147){_0x5ad6b9(_0x51c147);}}function _0x28530d(_0x93f19c){_0x93f19c['done']?_0x408fcc(_0x93f19c['value']):_0x52f8f7(_0x93f19c['value'])['then'](_0x4680cd,_0x95029b);}_0x28530d((_0x149421=_0x149421['apply'](_0x31c83c,_0x45ec0d||[]))['next']());});};class ApiKeyService{constructor(_0x1035a0){this['fetch']=_0x1035a0;}['create'](_0x126c4e,_0x547340,_0x2722ec){return __awaiter$3(this,void 0,void 0,function*(){const _0x3175e3='api-key/create',_0x464d8d={'account_name':_0x126c4e,'api_key_name':_0x547340};try{const _0x2930cf=yield this['fetch']['post'](_0x3175e3,_0x2722ec,_0x464d8d);if(_0x2930cf['status']>0xc7&&_0x2930cf['status']<0x12c){const _0x239e0c=yield _0x2930cf['json']();return new SuccessfulApiKeyResponse(_0x239e0c);}const _0x4cb084=yield _0x2930cf['json']();return new FailedApiKeyResponse(_0x4cb084);}catch(_0x4dad9e){if(_0x4dad9e instanceof Error)return new FailedApiKeyResponse({'detail':_0x4dad9e['message'],'title':_0x4dad9e['name'],'status':0x1f4,'instance':'','type':''});throw _0x4dad9e;}});}['view'](_0x54f04f,_0x50c70f,_0x551d22){return __awaiter$3(this,void 0,void 0,function*(){const _0x5b4ec7='api-key/'+_0x54f04f+'/'+_0x50c70f;try{const _0x85dfe2=yield this['fetch']['get'](_0x5b4ec7,_0x551d22);if(_0x85dfe2['status']>0xc7&&_0x85dfe2['status']<0x12c){const _0x4b6a49=yield _0x85dfe2['json']();return new SuccessfulApiKeyValueResponse(_0x4b6a49);}const _0x43d0d6=yield _0x85dfe2['json']();return new FailedApiKeyValueResponse(_0x43d0d6);}catch(_0x1c7e43){if(_0x1c7e43 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x1c7e43['message'],'title':_0x1c7e43['name'],'status':0x1f4,'instance':'','type':''});throw _0x1c7e43;}});}}
8
-
9
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x5baed4,_0x453c3b,_0xf42cf2,_0x1014ec){function _0x9884e1(_0x33079e){return _0x33079e instanceof _0xf42cf2?_0x33079e:new _0xf42cf2(function(_0x57bd4a){_0x57bd4a(_0x33079e);});}return new(_0xf42cf2||(_0xf42cf2=Promise))(function(_0x2b3296,_0x313db7){function _0x217c2d(_0x24792b){try{_0x4e0270(_0x1014ec['next'](_0x24792b));}catch(_0x30d6f9){_0x313db7(_0x30d6f9);}}function _0x26b2c6(_0x19d9c8){try{_0x4e0270(_0x1014ec['throw'](_0x19d9c8));}catch(_0x3ebee7){_0x313db7(_0x3ebee7);}}function _0x4e0270(_0x590990){_0x590990['done']?_0x2b3296(_0x590990['value']):_0x9884e1(_0x590990['value'])['then'](_0x217c2d,_0x26b2c6);}_0x4e0270((_0x1014ec=_0x1014ec['apply'](_0x5baed4,_0x453c3b||[]))['next']());});};class ListService{constructor(_0x4c8f13){this['fetch']=_0x4c8f13;}['add'](_0x52bf4d,_0x67c9a5,_0x38186f){return __awaiter$2(this,void 0,void 0,function*(){const _0x24d478='List',_0x483210={'account_name':_0x52bf4d,'list_name':_0x67c9a5};try{const _0x39e41c=yield this['fetch']['post'](_0x24d478,_0x38186f,_0x483210);if(_0x39e41c['status']>0xc7&&_0x39e41c['status']<0x12c){const _0x52a868=yield _0x39e41c['json']();return new SuccessfulAccountResponse(_0x52a868);}const _0x1128cd=yield _0x39e41c['json']();return new FailedAccountResponse(_0x1128cd);}catch(_0x3b6666){if(_0x3b6666 instanceof Error)return new FailedAccountResponse({'detail':_0x3b6666['message'],'title':_0x3b6666['name'],'status':0x1f4,'instance':'','type':''});throw _0x3b6666;}});}['remove'](_0x321521,_0xa2d8d4,_0x231e22){return __awaiter$2(this,void 0,void 0,function*(){const _0x1d70de='List/'+_0x321521+'/'+_0xa2d8d4,_0x57d6be=yield this['fetch']['delete'](_0x1d70de,_0x231e22);try{if(_0x57d6be['status']>0xc7&&_0x57d6be['status']<0x12c){const _0x1b1b67=yield _0x57d6be['json']();return new SuccessfulAccountResponse(_0x1b1b67);}const _0x34890f=yield _0x57d6be['json']();return new FailedAccountResponse(_0x34890f);}catch(_0x574da0){if(_0x574da0 instanceof Error)return new FailedAccountResponse({'detail':_0x574da0['message'],'title':_0x574da0['name'],'status':0x1f4,'instance':'','type':''});throw _0x574da0;}});}}
10
-
11
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x20b2b1,_0xae281,_0x47d6f5,_0x2406fd){function _0x196057(_0x4057f3){return _0x4057f3 instanceof _0x47d6f5?_0x4057f3:new _0x47d6f5(function(_0x3e86bb){_0x3e86bb(_0x4057f3);});}return new(_0x47d6f5||(_0x47d6f5=Promise))(function(_0x5297d6,_0x7bcd9c){function _0x35076b(_0x555565){try{_0x183b6(_0x2406fd['next'](_0x555565));}catch(_0xa70f1){_0x7bcd9c(_0xa70f1);}}function _0x3929d3(_0x4e37d6){try{_0x183b6(_0x2406fd['throw'](_0x4e37d6));}catch(_0x5c4510){_0x7bcd9c(_0x5c4510);}}function _0x183b6(_0x116749){_0x116749['done']?_0x5297d6(_0x116749['value']):_0x196057(_0x116749['value'])['then'](_0x35076b,_0x3929d3);}_0x183b6((_0x2406fd=_0x2406fd['apply'](_0x20b2b1,_0xae281||[]))['next']());});};class Fetch{constructor(_0x19c11a){this['baseUri']=_0x19c11a,this['getUrl']=_0x5af303=>{return _0x5af303['startsWith']('/')&&(_0x5af303=_0x5af303['replace']('/','')),''+this['baseUri']+_0x5af303;},!_0x19c11a['endsWith']('/')&&(_0x19c11a=_0x19c11a+'/');}['get'](_0x248382,_0x250255){return __awaiter$1(this,void 0,void 0,function*(){const _0x698062=this['getUrl'](_0x248382);return yield fetch(_0x698062,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x250255}});});}['post'](_0x101c03,_0x13c7c1,_0x434e7){return __awaiter$1(this,void 0,void 0,function*(){const _0x4caa09=this['getUrl'](_0x101c03);return yield fetch(_0x4caa09,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x13c7c1},'body':_0x434e7?JSON['stringify'](_0x434e7):null});});}['put'](_0x339d1e,_0x1e16d0,_0x2b649a){return __awaiter$1(this,void 0,void 0,function*(){const _0x3dd678=this['getUrl'](_0x339d1e);return yield fetch(_0x3dd678,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1e16d0},'body':_0x2b649a?JSON['stringify'](_0x2b649a):null});});}['delete'](_0x54038e,_0x4437d7){return __awaiter$1(this,void 0,void 0,function*(){const _0x32fa73=this['getUrl'](_0x54038e);return yield fetch(_0x32fa73,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4437d7}});});}}
12
-
13
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x581c55,_0x49d3aa,_0x1803e2,_0xe30fbe){function _0x2fbc32(_0x3b074c){return _0x3b074c instanceof _0x1803e2?_0x3b074c:new _0x1803e2(function(_0x266048){_0x266048(_0x3b074c);});}return new(_0x1803e2||(_0x1803e2=Promise))(function(_0x3a3f4d,_0x1a36a4){function _0x576113(_0x1a6d44){try{_0x6c7d8b(_0xe30fbe['next'](_0x1a6d44));}catch(_0xc43b97){_0x1a36a4(_0xc43b97);}}function _0x3c7a44(_0x40de85){try{_0x6c7d8b(_0xe30fbe['throw'](_0x40de85));}catch(_0x3b27c7){_0x1a36a4(_0x3b27c7);}}function _0x6c7d8b(_0x279996){_0x279996['done']?_0x3a3f4d(_0x279996['value']):_0x2fbc32(_0x279996['value'])['then'](_0x576113,_0x3c7a44);}_0x6c7d8b((_0xe30fbe=_0xe30fbe['apply'](_0x581c55,_0x49d3aa||[]))['next']());});};class AdminClient{constructor(_0x356537='https://admin.searchability.dev/'){var _0x5c930e=new Fetch(_0x356537);this['Accounts']=new AccountService(_0x5c930e),this['Lists']=new ListService(_0x5c930e),this['ApiKeys']=new ApiKeyService(_0x5c930e);}}class AuthClient{constructor(_0x5fcf17='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x5fcf17);}['login'](_0x5d355a){return __awaiter(this,void 0,void 0,function*(){var _0x27dacd='login/'+_0x5d355a;try{const _0x2d41fe=yield yield fetch(_0x27dacd);if(_0x2d41fe['status']>0xc7&&_0x2d41fe['status']<0x12c){const _0x3faba8=yield _0x2d41fe['json']();return new SuccessfulAuthResponse(_0x3faba8);}const _0x52050e=yield _0x2d41fe['json']();return new FailedAuthResponse(_0x52050e);}catch(_0x20d490){if(_0x20d490 instanceof Error)return new FailedAuthResponse({'detail':_0x20d490['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x20d490;}});}['refresh'](_0x40719f){return __awaiter(this,void 0,void 0,function*(){var _0x4cb0b5='refresh';try{const _0x6ef65a=yield this['fetch']['post'](_0x4cb0b5,_0x40719f,null);if(_0x6ef65a['status']>0xc7&&_0x6ef65a['status']<0x12c){const _0x522475=yield _0x6ef65a['json']();return new SuccessfulAuthResponse(_0x522475);}const _0x41da34=yield _0x6ef65a['json']();return new FailedAuthResponse(_0x41da34);}catch(_0x268001){if(_0x268001 instanceof Error)return new FailedAuthResponse({'detail':_0x268001['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x268001;}});}}
14
-
15
- export { AdminClient, AuthClient, TokenStatus, Tokens };