@searchability/admin-client 0.0.32 → 0.0.33

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,13 @@
1
+ var TokenStatus;(function(_0x2a308b){_0x2a308b[_0x2a308b['Ok']=0x0]='Ok',_0x2a308b[_0x2a308b['Refresh']=0x1]='Refresh',_0x2a308b[_0x2a308b['Expired']=0x2]='Expired';}(TokenStatus||(TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}}class Response{constructor(_0xf8d7e3){this['isSuccess']=_0xf8d7e3;}}class SuccessfulAccountResponse extends Response{constructor(_0x775645){super(!![]),this['account']=_0x775645;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x122d4f){super(![]),this['problem']=_0x122d4f;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x38849d){super(!![]),this['tokens']=_0x38849d;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x355c1a){super(![]),this['problem']=_0x355c1a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x143438){super(!![]),this['apiKey']=_0x143438;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x7b9756){super(![]),this['problem']=_0x7b9756;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x4bf273){super(!![]),this['apiKeyValue']=_0x4bf273;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x3cf6d5){super(!![]),this['obj']=_0x3cf6d5;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x35001c){super(![]),this['problem']=_0x35001c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x2b7e91){super(![]),this['problem']=_0x2b7e91;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
2
+
3
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x5a86b6,_0x27a414,_0x3dced5,_0x54213f){function _0xaf965b(_0x56a2ae){return _0x56a2ae instanceof _0x3dced5?_0x56a2ae:new _0x3dced5(function(_0x822439){_0x822439(_0x56a2ae);});}return new(_0x3dced5||(_0x3dced5=Promise))(function(_0x1c96ed,_0x1bd900){function _0x30b491(_0x434cd9){try{_0x339cce(_0x54213f['next'](_0x434cd9));}catch(_0xfb1c9a){_0x1bd900(_0xfb1c9a);}}function _0x5c9d85(_0x3903dc){try{_0x339cce(_0x54213f['throw'](_0x3903dc));}catch(_0x512063){_0x1bd900(_0x512063);}}function _0x339cce(_0x41e149){_0x41e149['done']?_0x1c96ed(_0x41e149['value']):_0xaf965b(_0x41e149['value'])['then'](_0x30b491,_0x5c9d85);}_0x339cce((_0x54213f=_0x54213f['apply'](_0x5a86b6,_0x27a414||[]))['next']());});};class AccountService{constructor(_0x3a5d10){this['fetch']=_0x3a5d10;}['get'](_0xb7fd5d,_0x395fad){return __awaiter$4(this,void 0,void 0,function*(){const _0x9f7e1a='Account/'+_0xb7fd5d+'/',_0x267e05=yield this['fetch']['get'](_0x9f7e1a,_0x395fad);try{if(_0x267e05['status']>0xc7&&_0x267e05['status']<0x12c){const _0x8065aa=yield _0x267e05['json']();return new SuccessfulAccountResponse(_0x8065aa);}const _0x4b5c83=yield _0x267e05['json']();return new FailedAccountResponse(_0x4b5c83);}catch(_0xe673ea){if(_0xe673ea instanceof Error)return new FailedAccountResponse({'detail':_0xe673ea['message'],'title':_0xe673ea['name'],'status':0x1f4,'instance':'','type':''});throw _0xe673ea;}});}}
4
+
5
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x27f55f,_0xecb314,_0x5c02db,_0x102800){function _0x3d5fcf(_0x1a8824){return _0x1a8824 instanceof _0x5c02db?_0x1a8824:new _0x5c02db(function(_0x2b1b92){_0x2b1b92(_0x1a8824);});}return new(_0x5c02db||(_0x5c02db=Promise))(function(_0x424cc1,_0x51f70f){function _0x4a0a22(_0x2dad9a){try{_0x52ff19(_0x102800['next'](_0x2dad9a));}catch(_0xcba181){_0x51f70f(_0xcba181);}}function _0x1828b9(_0x59bc94){try{_0x52ff19(_0x102800['throw'](_0x59bc94));}catch(_0x2feda8){_0x51f70f(_0x2feda8);}}function _0x52ff19(_0x2a62f9){_0x2a62f9['done']?_0x424cc1(_0x2a62f9['value']):_0x3d5fcf(_0x2a62f9['value'])['then'](_0x4a0a22,_0x1828b9);}_0x52ff19((_0x102800=_0x102800['apply'](_0x27f55f,_0xecb314||[]))['next']());});};class ApiKeyService{constructor(_0x32c022){this['fetch']=_0x32c022,this['path']='api-key';}['create'](_0x3d4b1a,_0x2febf2,_0x1f7ae4){return __awaiter$3(this,void 0,void 0,function*(){const _0xe76f9b={'account_name':_0x3d4b1a,'api_key_name':_0x2febf2};try{const _0x2e32dc=yield this['fetch']['post'](this['path'],_0x1f7ae4,_0xe76f9b);if(_0x2e32dc['status']>0xc7&&_0x2e32dc['status']<0x12c){const _0x8eaa8c=yield _0x2e32dc['json']();return new SuccessfulApiKeyResponse(_0x8eaa8c);}const _0xcd822e=yield _0x2e32dc['json']();return new FailedApiKeyResponse(_0xcd822e);}catch(_0x5ae12d){if(_0x5ae12d instanceof Error)return new FailedApiKeyResponse({'detail':_0x5ae12d['message'],'title':_0x5ae12d['name'],'status':0x1f4,'instance':'','type':''});throw _0x5ae12d;}});}['view'](_0x518ded,_0x254109,_0x5636db){return __awaiter$3(this,void 0,void 0,function*(){const _0x1d36a5=this['path']+'/'+_0x518ded+'/'+_0x254109;try{const _0x2c0872=yield this['fetch']['get'](_0x1d36a5,_0x5636db);if(_0x2c0872['status']>0xc7&&_0x2c0872['status']<0x12c){const _0x345218=yield _0x2c0872['json']();return new SuccessfulApiKeyValueResponse(_0x345218);}const _0x5354d0=yield _0x2c0872['json']();return new FailedApiKeyValueResponse(_0x5354d0);}catch(_0x341830){if(_0x341830 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x341830['message'],'title':_0x341830['name'],'status':0x1f4,'instance':'','type':''});throw _0x341830;}});}['delete'](_0x2df9b0,_0x56f089,_0x2bfdc4){return __awaiter$3(this,void 0,void 0,function*(){const _0x2d81d3=this['path']+'/'+_0x2df9b0+'/'+_0x56f089;try{const _0x412b0f=yield this['fetch']['delete'](_0x2d81d3,_0x2bfdc4);if(_0x412b0f['status']>0xc7&&_0x412b0f['status']<0x12c){const _0x49a576=yield _0x412b0f['json']();return new SuccessfulResponse(_0x49a576);}const _0x5658e1=yield _0x412b0f['json']();return new FailedResponse(_0x5658e1);}catch(_0x2a1724){if(_0x2a1724 instanceof Error)return new FailedResponse({'detail':_0x2a1724['message'],'title':_0x2a1724['name'],'status':0x1f4,'instance':'','type':''});throw _0x2a1724;}});}}
6
+
7
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x4031b0,_0x1f1ffa,_0x5498b6,_0x39e1e5){function _0x20caae(_0x50b61b){return _0x50b61b instanceof _0x5498b6?_0x50b61b:new _0x5498b6(function(_0x223384){_0x223384(_0x50b61b);});}return new(_0x5498b6||(_0x5498b6=Promise))(function(_0x2330f,_0x5a4626){function _0x29c9b5(_0x21c3cc){try{_0x47fb65(_0x39e1e5['next'](_0x21c3cc));}catch(_0x4f7bae){_0x5a4626(_0x4f7bae);}}function _0x2ab76d(_0x2b826c){try{_0x47fb65(_0x39e1e5['throw'](_0x2b826c));}catch(_0x105b19){_0x5a4626(_0x105b19);}}function _0x47fb65(_0x3a14e0){_0x3a14e0['done']?_0x2330f(_0x3a14e0['value']):_0x20caae(_0x3a14e0['value'])['then'](_0x29c9b5,_0x2ab76d);}_0x47fb65((_0x39e1e5=_0x39e1e5['apply'](_0x4031b0,_0x1f1ffa||[]))['next']());});};class ListService{constructor(_0x113331){this['fetch']=_0x113331;}['add'](_0x3e7a64,_0x53f646,_0xc25477){return __awaiter$2(this,void 0,void 0,function*(){const _0x224b83='List',_0x38ad16={'account_name':_0x3e7a64,'list_name':_0x53f646};try{const _0x9e9ec3=yield this['fetch']['post'](_0x224b83,_0xc25477,_0x38ad16);if(_0x9e9ec3['status']>0xc7&&_0x9e9ec3['status']<0x12c){const _0x3cea10=yield _0x9e9ec3['json']();return new SuccessfulAccountResponse(_0x3cea10);}const _0x238925=yield _0x9e9ec3['json']();return new FailedAccountResponse(_0x238925);}catch(_0x348124){if(_0x348124 instanceof Error)return new FailedAccountResponse({'detail':_0x348124['message'],'title':_0x348124['name'],'status':0x1f4,'instance':'','type':''});throw _0x348124;}});}['remove'](_0x2fd63f,_0x34c869,_0x24084f){return __awaiter$2(this,void 0,void 0,function*(){const _0x4403ef='List/'+_0x2fd63f+'/'+_0x34c869,_0x1b18d7=yield this['fetch']['delete'](_0x4403ef,_0x24084f);try{if(_0x1b18d7['status']>0xc7&&_0x1b18d7['status']<0x12c){const _0x7a2824=yield _0x1b18d7['json']();return new SuccessfulAccountResponse(_0x7a2824);}const _0x25dd34=yield _0x1b18d7['json']();return new FailedAccountResponse(_0x25dd34);}catch(_0x8e46d7){if(_0x8e46d7 instanceof Error)return new FailedAccountResponse({'detail':_0x8e46d7['message'],'title':_0x8e46d7['name'],'status':0x1f4,'instance':'','type':''});throw _0x8e46d7;}});}}
8
+
9
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x3f6100,_0x1fedd3,_0xdfe76,_0xff7d93){function _0x38fa72(_0x2a045d){return _0x2a045d instanceof _0xdfe76?_0x2a045d:new _0xdfe76(function(_0x43234a){_0x43234a(_0x2a045d);});}return new(_0xdfe76||(_0xdfe76=Promise))(function(_0x42f46d,_0x650c87){function _0x2e8d16(_0x21ae29){try{_0x5a63b9(_0xff7d93['next'](_0x21ae29));}catch(_0x4850b3){_0x650c87(_0x4850b3);}}function _0x3d0034(_0x24fc94){try{_0x5a63b9(_0xff7d93['throw'](_0x24fc94));}catch(_0x6511){_0x650c87(_0x6511);}}function _0x5a63b9(_0x5deb12){_0x5deb12['done']?_0x42f46d(_0x5deb12['value']):_0x38fa72(_0x5deb12['value'])['then'](_0x2e8d16,_0x3d0034);}_0x5a63b9((_0xff7d93=_0xff7d93['apply'](_0x3f6100,_0x1fedd3||[]))['next']());});};class Fetch{constructor(_0x74f72f){this['baseUri']=_0x74f72f,this['getUrl']=_0x35f00a=>{return _0x35f00a['startsWith']('/')&&(_0x35f00a=_0x35f00a['replace']('/','')),''+this['baseUri']+_0x35f00a;},!_0x74f72f['endsWith']('/')&&(_0x74f72f=_0x74f72f+'/');}['get'](_0x2bf6f6,_0x36df34){return __awaiter$1(this,void 0,void 0,function*(){const _0x18eed9=this['getUrl'](_0x2bf6f6);return yield fetch(_0x18eed9,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x36df34}});});}['post'](_0x1ab288,_0x50ef7e,_0x4727b0){return __awaiter$1(this,void 0,void 0,function*(){const _0x48bfd6=this['getUrl'](_0x1ab288);return yield fetch(_0x48bfd6,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x50ef7e},'body':_0x4727b0?JSON['stringify'](_0x4727b0):null});});}['put'](_0x323e74,_0x45ac6c,_0x55f087){return __awaiter$1(this,void 0,void 0,function*(){const _0x58c6da=this['getUrl'](_0x323e74);return yield fetch(_0x58c6da,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x45ac6c},'body':_0x55f087?JSON['stringify'](_0x55f087):null});});}['delete'](_0x15a715,_0x13b25b){return __awaiter$1(this,void 0,void 0,function*(){const _0x1ce9b4=this['getUrl'](_0x15a715);return yield fetch(_0x1ce9b4,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x13b25b}});});}}
10
+
11
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x25a31a,_0x18450e,_0xc4cf7b,_0x12908f){function _0x3a116a(_0x3aa515){return _0x3aa515 instanceof _0xc4cf7b?_0x3aa515:new _0xc4cf7b(function(_0x9a9b97){_0x9a9b97(_0x3aa515);});}return new(_0xc4cf7b||(_0xc4cf7b=Promise))(function(_0x24808d,_0x269922){function _0x128627(_0xa3abe9){try{_0x10eb42(_0x12908f['next'](_0xa3abe9));}catch(_0x1149c9){_0x269922(_0x1149c9);}}function _0x17967a(_0x3e61e3){try{_0x10eb42(_0x12908f['throw'](_0x3e61e3));}catch(_0x3bba12){_0x269922(_0x3bba12);}}function _0x10eb42(_0x21775b){_0x21775b['done']?_0x24808d(_0x21775b['value']):_0x3a116a(_0x21775b['value'])['then'](_0x128627,_0x17967a);}_0x10eb42((_0x12908f=_0x12908f['apply'](_0x25a31a,_0x18450e||[]))['next']());});};class AdminClient{constructor(_0x2ea3e8='https://admin.searchability.dev/'){var _0x4f6485=new Fetch(_0x2ea3e8);this['Accounts']=new AccountService(_0x4f6485),this['Lists']=new ListService(_0x4f6485),this['ApiKeys']=new ApiKeyService(_0x4f6485);}}class AuthClient{constructor(_0x5a4b3f='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x5a4b3f);}['login'](_0x55ccd9){return __awaiter(this,void 0,void 0,function*(){var _0x325657='login/'+_0x55ccd9;try{const _0x4a263e=yield yield fetch(_0x325657);if(_0x4a263e['status']>0xc7&&_0x4a263e['status']<0x12c){const _0x4548c6=yield _0x4a263e['json']();return new SuccessfulAuthResponse(_0x4548c6);}const _0x5460ac=yield _0x4a263e['json']();return new FailedAuthResponse(_0x5460ac);}catch(_0x52a367){if(_0x52a367 instanceof Error)return new FailedAuthResponse({'detail':_0x52a367['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x52a367;}});}['refresh'](_0x1950e9){return __awaiter(this,void 0,void 0,function*(){var _0x269ff7='refresh';try{const _0x51e0be=yield this['fetch']['post'](_0x269ff7,_0x1950e9,null);if(_0x51e0be['status']>0xc7&&_0x51e0be['status']<0x12c){const _0x293cca=yield _0x51e0be['json']();return new SuccessfulAuthResponse(_0x293cca);}const _0x13a40f=yield _0x51e0be['json']();return new FailedAuthResponse(_0x13a40f);}catch(_0x244f38){if(_0x244f38 instanceof Error)return new FailedAuthResponse({'detail':_0x244f38['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x244f38;}});}['getTokenStatus'](_0x4ee299){if(Date['now']()<_0x4ee299['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x4ee299['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
12
+
13
+ export { AdminClient, AuthClient, TokenStatus, Tokens };
@@ -1,16 +1,16 @@
1
1
  'use strict';
2
2
 
3
- exports.TokenStatus = void 0;(function(_0x5872b0){_0x5872b0[_0x5872b0['Ok']=0x0]='Ok',_0x5872b0[_0x5872b0['Refresh']=0x1]='Refresh',_0x5872b0[_0x5872b0['Expired']=0x2]='Expired';}(exports.TokenStatus||(exports.TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}}class Response{constructor(_0x38e8d0){this['isSuccess']=_0x38e8d0;}}class SuccessfulAccountResponse extends Response{constructor(_0xc6586){super(!![]),this['account']=_0xc6586;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x4e8e97){super(![]),this['problem']=_0x4e8e97;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x12c212){super(!![]),this['tokens']=_0x12c212;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x1e7afc){super(![]),this['problem']=_0x1e7afc;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0xa2f21a){super(!![]),this['apiKey']=_0xa2f21a;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x388194){super(![]),this['problem']=_0x388194;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x41d625){super(!![]),this['apiKeyValue']=_0x41d625;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyValueResponse extends Response{constructor(_0x571896){super(![]),this['problem']=_0x571896;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
3
+ exports.TokenStatus = void 0;(function(_0x3b8b6f){_0x3b8b6f[_0x3b8b6f['Ok']=0x0]='Ok',_0x3b8b6f[_0x3b8b6f['Refresh']=0x1]='Refresh',_0x3b8b6f[_0x3b8b6f['Expired']=0x2]='Expired';}(exports.TokenStatus||(exports.TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}}class Response{constructor(_0x1a095c){this['isSuccess']=_0x1a095c;}}class SuccessfulAccountResponse extends Response{constructor(_0x3fc29b){super(!![]),this['account']=_0x3fc29b;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x54c2c7){super(![]),this['problem']=_0x54c2c7;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x5f5522){super(!![]),this['tokens']=_0x5f5522;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x558a7b){super(![]),this['problem']=_0x558a7b;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x391296){super(!![]),this['apiKey']=_0x391296;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x3dc2a3){super(![]),this['problem']=_0x3dc2a3;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x419fd9){super(!![]),this['apiKeyValue']=_0x419fd9;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x176cad){super(!![]),this['obj']=_0x176cad;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x26e0f9){super(![]),this['problem']=_0x26e0f9;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x24bb3a){super(![]),this['problem']=_0x24bb3a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
4
4
 
5
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x2fa8bf,_0x3ede50,_0x44c363,_0x402615){function _0x36255e(_0x566641){return _0x566641 instanceof _0x44c363?_0x566641:new _0x44c363(function(_0x241080){_0x241080(_0x566641);});}return new(_0x44c363||(_0x44c363=Promise))(function(_0x5345f7,_0x2c45f3){function _0x271709(_0x37915c){try{_0x1289e3(_0x402615['next'](_0x37915c));}catch(_0x506a36){_0x2c45f3(_0x506a36);}}function _0x1cfb67(_0x1910ac){try{_0x1289e3(_0x402615['throw'](_0x1910ac));}catch(_0x4415bf){_0x2c45f3(_0x4415bf);}}function _0x1289e3(_0x52c075){_0x52c075['done']?_0x5345f7(_0x52c075['value']):_0x36255e(_0x52c075['value'])['then'](_0x271709,_0x1cfb67);}_0x1289e3((_0x402615=_0x402615['apply'](_0x2fa8bf,_0x3ede50||[]))['next']());});};class AccountService{constructor(_0x4e25fd){this['fetch']=_0x4e25fd;}['get'](_0x1aa42a,_0x211dc4){return __awaiter$4(this,void 0,void 0,function*(){const _0x982225='Account/'+_0x1aa42a+'/',_0xbbddcb=yield this['fetch']['get'](_0x982225,_0x211dc4);try{if(_0xbbddcb['status']>0xc7&&_0xbbddcb['status']<0x12c){const _0x15e4a7=yield _0xbbddcb['json']();return new SuccessfulAccountResponse(_0x15e4a7);}const _0x3d313c=yield _0xbbddcb['json']();return new FailedAccountResponse(_0x3d313c);}catch(_0x880ddb){if(_0x880ddb instanceof Error)return new FailedAccountResponse({'detail':_0x880ddb['message'],'title':_0x880ddb['name'],'status':0x1f4,'instance':'','type':''});throw _0x880ddb;}});}}
5
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x1b5497,_0x54c12f,_0x24d6f7,_0x47f4fc){function _0x554ea7(_0x328597){return _0x328597 instanceof _0x24d6f7?_0x328597:new _0x24d6f7(function(_0x5dfb56){_0x5dfb56(_0x328597);});}return new(_0x24d6f7||(_0x24d6f7=Promise))(function(_0x12b1b3,_0x4f4444){function _0x21a879(_0x153d07){try{_0x301a0e(_0x47f4fc['next'](_0x153d07));}catch(_0x344aac){_0x4f4444(_0x344aac);}}function _0x50cd49(_0x48227e){try{_0x301a0e(_0x47f4fc['throw'](_0x48227e));}catch(_0x6fe054){_0x4f4444(_0x6fe054);}}function _0x301a0e(_0x41038e){_0x41038e['done']?_0x12b1b3(_0x41038e['value']):_0x554ea7(_0x41038e['value'])['then'](_0x21a879,_0x50cd49);}_0x301a0e((_0x47f4fc=_0x47f4fc['apply'](_0x1b5497,_0x54c12f||[]))['next']());});};class AccountService{constructor(_0x52d634){this['fetch']=_0x52d634;}['get'](_0x384388,_0x503745){return __awaiter$4(this,void 0,void 0,function*(){const _0x272124='Account/'+_0x384388+'/',_0x1a09dd=yield this['fetch']['get'](_0x272124,_0x503745);try{if(_0x1a09dd['status']>0xc7&&_0x1a09dd['status']<0x12c){const _0x1076c6=yield _0x1a09dd['json']();return new SuccessfulAccountResponse(_0x1076c6);}const _0x533638=yield _0x1a09dd['json']();return new FailedAccountResponse(_0x533638);}catch(_0x42cd83){if(_0x42cd83 instanceof Error)return new FailedAccountResponse({'detail':_0x42cd83['message'],'title':_0x42cd83['name'],'status':0x1f4,'instance':'','type':''});throw _0x42cd83;}});}}
6
6
 
7
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x4c1bec,_0x1e8b53,_0x3b0181,_0x41b43c){function _0x3b494f(_0x4da2ba){return _0x4da2ba instanceof _0x3b0181?_0x4da2ba:new _0x3b0181(function(_0x1ac7a5){_0x1ac7a5(_0x4da2ba);});}return new(_0x3b0181||(_0x3b0181=Promise))(function(_0x3826c9,_0x3da1c9){function _0x46b0c8(_0x3942c3){try{_0x506517(_0x41b43c['next'](_0x3942c3));}catch(_0x2e371e){_0x3da1c9(_0x2e371e);}}function _0x3ca535(_0x3d8c92){try{_0x506517(_0x41b43c['throw'](_0x3d8c92));}catch(_0x369164){_0x3da1c9(_0x369164);}}function _0x506517(_0x48b048){_0x48b048['done']?_0x3826c9(_0x48b048['value']):_0x3b494f(_0x48b048['value'])['then'](_0x46b0c8,_0x3ca535);}_0x506517((_0x41b43c=_0x41b43c['apply'](_0x4c1bec,_0x1e8b53||[]))['next']());});};class ApiKeyService{constructor(_0x58b0b2){this['fetch']=_0x58b0b2;}['create'](_0x3ff695,_0x38bbf1,_0x271ea5){return __awaiter$3(this,void 0,void 0,function*(){const _0x518b9c='api-key/create',_0x207bed={'account_name':_0x3ff695,'api_key_name':_0x38bbf1};try{const _0x22205d=yield this['fetch']['post'](_0x518b9c,_0x271ea5,_0x207bed);if(_0x22205d['status']>0xc7&&_0x22205d['status']<0x12c){const _0x365b33=yield _0x22205d['json']();return new SuccessfulApiKeyResponse(_0x365b33);}const _0x2e3eb5=yield _0x22205d['json']();return new FailedApiKeyResponse(_0x2e3eb5);}catch(_0x5c9fca){if(_0x5c9fca instanceof Error)return new FailedApiKeyResponse({'detail':_0x5c9fca['message'],'title':_0x5c9fca['name'],'status':0x1f4,'instance':'','type':''});throw _0x5c9fca;}});}['view'](_0x4fed72,_0x1fdf18,_0x34258c){return __awaiter$3(this,void 0,void 0,function*(){const _0x3a3e7c='api-key/'+_0x4fed72+'/'+_0x1fdf18;try{const _0x29fba7=yield this['fetch']['get'](_0x3a3e7c,_0x34258c);if(_0x29fba7['status']>0xc7&&_0x29fba7['status']<0x12c){const _0x3ed200=yield _0x29fba7['json']();return new SuccessfulApiKeyValueResponse(_0x3ed200);}const _0xcc3d2f=yield _0x29fba7['json']();return new FailedApiKeyValueResponse(_0xcc3d2f);}catch(_0x6b727d){if(_0x6b727d instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x6b727d['message'],'title':_0x6b727d['name'],'status':0x1f4,'instance':'','type':''});throw _0x6b727d;}});}}
7
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x359d8c,_0x174a1b,_0x168eeb,_0x3f6f86){function _0x4597dd(_0x8c243b){return _0x8c243b instanceof _0x168eeb?_0x8c243b:new _0x168eeb(function(_0x2549f8){_0x2549f8(_0x8c243b);});}return new(_0x168eeb||(_0x168eeb=Promise))(function(_0x2cff64,_0x392732){function _0x4e5c9e(_0x2b0daf){try{_0x502d1a(_0x3f6f86['next'](_0x2b0daf));}catch(_0x10057e){_0x392732(_0x10057e);}}function _0x30c721(_0x573fc4){try{_0x502d1a(_0x3f6f86['throw'](_0x573fc4));}catch(_0x49c683){_0x392732(_0x49c683);}}function _0x502d1a(_0x566642){_0x566642['done']?_0x2cff64(_0x566642['value']):_0x4597dd(_0x566642['value'])['then'](_0x4e5c9e,_0x30c721);}_0x502d1a((_0x3f6f86=_0x3f6f86['apply'](_0x359d8c,_0x174a1b||[]))['next']());});};class ApiKeyService{constructor(_0x418b39){this['fetch']=_0x418b39,this['path']='api-key';}['create'](_0x17dc23,_0x46a2a7,_0x4c5798){return __awaiter$3(this,void 0,void 0,function*(){const _0x257d4a={'account_name':_0x17dc23,'api_key_name':_0x46a2a7};try{const _0x45ddad=yield this['fetch']['post'](this['path'],_0x4c5798,_0x257d4a);if(_0x45ddad['status']>0xc7&&_0x45ddad['status']<0x12c){const _0x178794=yield _0x45ddad['json']();return new SuccessfulApiKeyResponse(_0x178794);}const _0x1e02fa=yield _0x45ddad['json']();return new FailedApiKeyResponse(_0x1e02fa);}catch(_0x388588){if(_0x388588 instanceof Error)return new FailedApiKeyResponse({'detail':_0x388588['message'],'title':_0x388588['name'],'status':0x1f4,'instance':'','type':''});throw _0x388588;}});}['view'](_0x2b4110,_0x17faa7,_0x70377d){return __awaiter$3(this,void 0,void 0,function*(){const _0x159083=this['path']+'/'+_0x2b4110+'/'+_0x17faa7;try{const _0x489c7e=yield this['fetch']['get'](_0x159083,_0x70377d);if(_0x489c7e['status']>0xc7&&_0x489c7e['status']<0x12c){const _0x1beb8c=yield _0x489c7e['json']();return new SuccessfulApiKeyValueResponse(_0x1beb8c);}const _0x5e7418=yield _0x489c7e['json']();return new FailedApiKeyValueResponse(_0x5e7418);}catch(_0x2a7f03){if(_0x2a7f03 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x2a7f03['message'],'title':_0x2a7f03['name'],'status':0x1f4,'instance':'','type':''});throw _0x2a7f03;}});}['delete'](_0x3a2964,_0x65691,_0x2c94a9){return __awaiter$3(this,void 0,void 0,function*(){const _0x21e042=this['path']+'/'+_0x3a2964+'/'+_0x65691;try{const _0x1cfa1d=yield this['fetch']['delete'](_0x21e042,_0x2c94a9);if(_0x1cfa1d['status']>0xc7&&_0x1cfa1d['status']<0x12c){const _0x24d305=yield _0x1cfa1d['json']();return new SuccessfulResponse(_0x24d305);}const _0x2f3108=yield _0x1cfa1d['json']();return new FailedResponse(_0x2f3108);}catch(_0x39e8b2){if(_0x39e8b2 instanceof Error)return new FailedResponse({'detail':_0x39e8b2['message'],'title':_0x39e8b2['name'],'status':0x1f4,'instance':'','type':''});throw _0x39e8b2;}});}}
8
8
 
9
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x46036c,_0x3f67e0,_0x164c98,_0x49b1c9){function _0x24351c(_0x50f637){return _0x50f637 instanceof _0x164c98?_0x50f637:new _0x164c98(function(_0x3be7de){_0x3be7de(_0x50f637);});}return new(_0x164c98||(_0x164c98=Promise))(function(_0x139d6e,_0x75d149){function _0x291a38(_0x174da6){try{_0x44d5dc(_0x49b1c9['next'](_0x174da6));}catch(_0x376b8f){_0x75d149(_0x376b8f);}}function _0x2ab679(_0x43cd08){try{_0x44d5dc(_0x49b1c9['throw'](_0x43cd08));}catch(_0x372f1d){_0x75d149(_0x372f1d);}}function _0x44d5dc(_0x299a58){_0x299a58['done']?_0x139d6e(_0x299a58['value']):_0x24351c(_0x299a58['value'])['then'](_0x291a38,_0x2ab679);}_0x44d5dc((_0x49b1c9=_0x49b1c9['apply'](_0x46036c,_0x3f67e0||[]))['next']());});};class ListService{constructor(_0x1fe3f3){this['fetch']=_0x1fe3f3;}['add'](_0x383190,_0x23a762,_0xd40e38){return __awaiter$2(this,void 0,void 0,function*(){const _0x338d69='List',_0x4911ba={'account_name':_0x383190,'list_name':_0x23a762};try{const _0x4c1c10=yield this['fetch']['post'](_0x338d69,_0xd40e38,_0x4911ba);if(_0x4c1c10['status']>0xc7&&_0x4c1c10['status']<0x12c){const _0xe069a0=yield _0x4c1c10['json']();return new SuccessfulAccountResponse(_0xe069a0);}const _0x107672=yield _0x4c1c10['json']();return new FailedAccountResponse(_0x107672);}catch(_0x417cbb){if(_0x417cbb instanceof Error)return new FailedAccountResponse({'detail':_0x417cbb['message'],'title':_0x417cbb['name'],'status':0x1f4,'instance':'','type':''});throw _0x417cbb;}});}['remove'](_0xd35d3b,_0x41a7d4,_0x5602cd){return __awaiter$2(this,void 0,void 0,function*(){const _0x17d6eb='List/'+_0xd35d3b+'/'+_0x41a7d4,_0x535566=yield this['fetch']['delete'](_0x17d6eb,_0x5602cd);try{if(_0x535566['status']>0xc7&&_0x535566['status']<0x12c){const _0x1f6226=yield _0x535566['json']();return new SuccessfulAccountResponse(_0x1f6226);}const _0x5000af=yield _0x535566['json']();return new FailedAccountResponse(_0x5000af);}catch(_0xb184db){if(_0xb184db instanceof Error)return new FailedAccountResponse({'detail':_0xb184db['message'],'title':_0xb184db['name'],'status':0x1f4,'instance':'','type':''});throw _0xb184db;}});}}
9
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x78792b,_0x3486bc,_0x1d1bfe,_0x5ef047){function _0x337d5f(_0x5e915b){return _0x5e915b instanceof _0x1d1bfe?_0x5e915b:new _0x1d1bfe(function(_0x4c93aa){_0x4c93aa(_0x5e915b);});}return new(_0x1d1bfe||(_0x1d1bfe=Promise))(function(_0x45e02d,_0x28faf5){function _0x5b934b(_0x769c74){try{_0x5efef4(_0x5ef047['next'](_0x769c74));}catch(_0x16ed32){_0x28faf5(_0x16ed32);}}function _0x4fb10f(_0x2b9f2b){try{_0x5efef4(_0x5ef047['throw'](_0x2b9f2b));}catch(_0x5da09a){_0x28faf5(_0x5da09a);}}function _0x5efef4(_0xaf0201){_0xaf0201['done']?_0x45e02d(_0xaf0201['value']):_0x337d5f(_0xaf0201['value'])['then'](_0x5b934b,_0x4fb10f);}_0x5efef4((_0x5ef047=_0x5ef047['apply'](_0x78792b,_0x3486bc||[]))['next']());});};class ListService{constructor(_0x5c9054){this['fetch']=_0x5c9054;}['add'](_0x90cfd3,_0x516e64,_0x1c7395){return __awaiter$2(this,void 0,void 0,function*(){const _0x842766='List',_0xc74614={'account_name':_0x90cfd3,'list_name':_0x516e64};try{const _0x22f5a2=yield this['fetch']['post'](_0x842766,_0x1c7395,_0xc74614);if(_0x22f5a2['status']>0xc7&&_0x22f5a2['status']<0x12c){const _0xb45909=yield _0x22f5a2['json']();return new SuccessfulAccountResponse(_0xb45909);}const _0x49d8d8=yield _0x22f5a2['json']();return new FailedAccountResponse(_0x49d8d8);}catch(_0x138e05){if(_0x138e05 instanceof Error)return new FailedAccountResponse({'detail':_0x138e05['message'],'title':_0x138e05['name'],'status':0x1f4,'instance':'','type':''});throw _0x138e05;}});}['remove'](_0x27f10f,_0x2e9391,_0x6a45c1){return __awaiter$2(this,void 0,void 0,function*(){const _0xa5dd23='List/'+_0x27f10f+'/'+_0x2e9391,_0x2e8ff5=yield this['fetch']['delete'](_0xa5dd23,_0x6a45c1);try{if(_0x2e8ff5['status']>0xc7&&_0x2e8ff5['status']<0x12c){const _0x3d9131=yield _0x2e8ff5['json']();return new SuccessfulAccountResponse(_0x3d9131);}const _0x183a25=yield _0x2e8ff5['json']();return new FailedAccountResponse(_0x183a25);}catch(_0x394ac7){if(_0x394ac7 instanceof Error)return new FailedAccountResponse({'detail':_0x394ac7['message'],'title':_0x394ac7['name'],'status':0x1f4,'instance':'','type':''});throw _0x394ac7;}});}}
10
10
 
11
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x336db4,_0x23d696,_0x659bb,_0x479d48){function _0x1b5222(_0x334a6d){return _0x334a6d instanceof _0x659bb?_0x334a6d:new _0x659bb(function(_0x2a051d){_0x2a051d(_0x334a6d);});}return new(_0x659bb||(_0x659bb=Promise))(function(_0x19444d,_0x4c5ff6){function _0xa45f37(_0x542b5a){try{_0x171759(_0x479d48['next'](_0x542b5a));}catch(_0xf8d04b){_0x4c5ff6(_0xf8d04b);}}function _0x2308f2(_0x2e333c){try{_0x171759(_0x479d48['throw'](_0x2e333c));}catch(_0x4b0792){_0x4c5ff6(_0x4b0792);}}function _0x171759(_0x2406a9){_0x2406a9['done']?_0x19444d(_0x2406a9['value']):_0x1b5222(_0x2406a9['value'])['then'](_0xa45f37,_0x2308f2);}_0x171759((_0x479d48=_0x479d48['apply'](_0x336db4,_0x23d696||[]))['next']());});};class Fetch{constructor(_0x11e235){this['baseUri']=_0x11e235,this['getUrl']=_0x398c08=>{return _0x398c08['startsWith']('/')&&(_0x398c08=_0x398c08['replace']('/','')),''+this['baseUri']+_0x398c08;},!_0x11e235['endsWith']('/')&&(_0x11e235=_0x11e235+'/');}['get'](_0x1197d1,_0x154732){return __awaiter$1(this,void 0,void 0,function*(){const _0x16bdc5=this['getUrl'](_0x1197d1);return yield fetch(_0x16bdc5,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x154732}});});}['post'](_0x57c09c,_0x4a400f,_0x1f42b5){return __awaiter$1(this,void 0,void 0,function*(){const _0x3dd135=this['getUrl'](_0x57c09c);return yield fetch(_0x3dd135,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4a400f},'body':_0x1f42b5?JSON['stringify'](_0x1f42b5):null});});}['put'](_0x547b96,_0x4a748e,_0x5a6e28){return __awaiter$1(this,void 0,void 0,function*(){const _0x2e6435=this['getUrl'](_0x547b96);return yield fetch(_0x2e6435,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4a748e},'body':_0x5a6e28?JSON['stringify'](_0x5a6e28):null});});}['delete'](_0x34131e,_0x53c18b){return __awaiter$1(this,void 0,void 0,function*(){const _0x159bef=this['getUrl'](_0x34131e);return yield fetch(_0x159bef,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x53c18b}});});}}
11
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x45d2d7,_0x44b144,_0x484984,_0x5c1fdd){function _0x3400de(_0x5df613){return _0x5df613 instanceof _0x484984?_0x5df613:new _0x484984(function(_0x1f9369){_0x1f9369(_0x5df613);});}return new(_0x484984||(_0x484984=Promise))(function(_0x24f8ac,_0x53d1d5){function _0x378127(_0x1e454c){try{_0x5afb25(_0x5c1fdd['next'](_0x1e454c));}catch(_0x386eec){_0x53d1d5(_0x386eec);}}function _0x3671a5(_0x6c35d3){try{_0x5afb25(_0x5c1fdd['throw'](_0x6c35d3));}catch(_0x33422e){_0x53d1d5(_0x33422e);}}function _0x5afb25(_0x50ea3c){_0x50ea3c['done']?_0x24f8ac(_0x50ea3c['value']):_0x3400de(_0x50ea3c['value'])['then'](_0x378127,_0x3671a5);}_0x5afb25((_0x5c1fdd=_0x5c1fdd['apply'](_0x45d2d7,_0x44b144||[]))['next']());});};class Fetch{constructor(_0x3782be){this['baseUri']=_0x3782be,this['getUrl']=_0x26dd15=>{return _0x26dd15['startsWith']('/')&&(_0x26dd15=_0x26dd15['replace']('/','')),''+this['baseUri']+_0x26dd15;},!_0x3782be['endsWith']('/')&&(_0x3782be=_0x3782be+'/');}['get'](_0x3df1ae,_0x25d7cd){return __awaiter$1(this,void 0,void 0,function*(){const _0xee23c0=this['getUrl'](_0x3df1ae);return yield fetch(_0xee23c0,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x25d7cd}});});}['post'](_0x2123c8,_0x73b396,_0x2e46c1){return __awaiter$1(this,void 0,void 0,function*(){const _0x5c80d2=this['getUrl'](_0x2123c8);return yield fetch(_0x5c80d2,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x73b396},'body':_0x2e46c1?JSON['stringify'](_0x2e46c1):null});});}['put'](_0x1df788,_0x1baa54,_0x1b420b){return __awaiter$1(this,void 0,void 0,function*(){const _0xb0c43=this['getUrl'](_0x1df788);return yield fetch(_0xb0c43,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1baa54},'body':_0x1b420b?JSON['stringify'](_0x1b420b):null});});}['delete'](_0x356cc9,_0x48cdf2){return __awaiter$1(this,void 0,void 0,function*(){const _0x1d64fc=this['getUrl'](_0x356cc9);return yield fetch(_0x1d64fc,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x48cdf2}});});}}
12
12
 
13
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x2b2c48,_0x14cab9,_0x5c7c72,_0xaff6f6){function _0x4c874f(_0x1e6118){return _0x1e6118 instanceof _0x5c7c72?_0x1e6118:new _0x5c7c72(function(_0x3db553){_0x3db553(_0x1e6118);});}return new(_0x5c7c72||(_0x5c7c72=Promise))(function(_0x16667d,_0x2d6000){function _0x13ea6d(_0x7577){try{_0x2ca7bb(_0xaff6f6['next'](_0x7577));}catch(_0x1eeaea){_0x2d6000(_0x1eeaea);}}function _0x2ab460(_0x4f1a26){try{_0x2ca7bb(_0xaff6f6['throw'](_0x4f1a26));}catch(_0x538067){_0x2d6000(_0x538067);}}function _0x2ca7bb(_0x157d90){_0x157d90['done']?_0x16667d(_0x157d90['value']):_0x4c874f(_0x157d90['value'])['then'](_0x13ea6d,_0x2ab460);}_0x2ca7bb((_0xaff6f6=_0xaff6f6['apply'](_0x2b2c48,_0x14cab9||[]))['next']());});};class AdminClient{constructor(_0x2bfc97='https://admin.searchability.dev/'){var _0x43c062=new Fetch(_0x2bfc97);this['Accounts']=new AccountService(_0x43c062),this['Lists']=new ListService(_0x43c062),this['ApiKeys']=new ApiKeyService(_0x43c062);}}class AuthClient{constructor(_0x4e0b81='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x4e0b81);}['login'](_0x548ace){return __awaiter(this,void 0,void 0,function*(){var _0x1616d5='login/'+_0x548ace;try{const _0x371252=yield yield fetch(_0x1616d5);if(_0x371252['status']>0xc7&&_0x371252['status']<0x12c){const _0x2f1cdb=yield _0x371252['json']();return new SuccessfulAuthResponse(_0x2f1cdb);}const _0x221ad3=yield _0x371252['json']();return new FailedAuthResponse(_0x221ad3);}catch(_0x216519){if(_0x216519 instanceof Error)return new FailedAuthResponse({'detail':_0x216519['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x216519;}});}['refresh'](_0x216a48){return __awaiter(this,void 0,void 0,function*(){var _0xac6c0f='refresh';try{const _0x3671e0=yield this['fetch']['post'](_0xac6c0f,_0x216a48,null);if(_0x3671e0['status']>0xc7&&_0x3671e0['status']<0x12c){const _0x48a5f8=yield _0x3671e0['json']();return new SuccessfulAuthResponse(_0x48a5f8);}const _0x2e1035=yield _0x3671e0['json']();return new FailedAuthResponse(_0x2e1035);}catch(_0x4ee17d){if(_0x4ee17d instanceof Error)return new FailedAuthResponse({'detail':_0x4ee17d['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x4ee17d;}});}['getTokenStatus'](_0x1f6e05){if(Date['now']()<_0x1f6e05['access_expires'])return exports.TokenStatus['Ok'];if(Date['now']()<_0x1f6e05['refresh_expires'])return exports.TokenStatus['Refresh'];return exports.TokenStatus['Expired'];}}
13
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x27d725,_0x511118,_0x253308,_0x1a3801){function _0x32fa20(_0x44ab7b){return _0x44ab7b instanceof _0x253308?_0x44ab7b:new _0x253308(function(_0x5b86b0){_0x5b86b0(_0x44ab7b);});}return new(_0x253308||(_0x253308=Promise))(function(_0xcfd942,_0x2cfd40){function _0x1c5e4d(_0x5cea95){try{_0x11504b(_0x1a3801['next'](_0x5cea95));}catch(_0x299634){_0x2cfd40(_0x299634);}}function _0x4febb1(_0x26e8a4){try{_0x11504b(_0x1a3801['throw'](_0x26e8a4));}catch(_0x4ab5e8){_0x2cfd40(_0x4ab5e8);}}function _0x11504b(_0x524946){_0x524946['done']?_0xcfd942(_0x524946['value']):_0x32fa20(_0x524946['value'])['then'](_0x1c5e4d,_0x4febb1);}_0x11504b((_0x1a3801=_0x1a3801['apply'](_0x27d725,_0x511118||[]))['next']());});};class AdminClient{constructor(_0x4bc30a='https://admin.searchability.dev/'){var _0x2af672=new Fetch(_0x4bc30a);this['Accounts']=new AccountService(_0x2af672),this['Lists']=new ListService(_0x2af672),this['ApiKeys']=new ApiKeyService(_0x2af672);}}class AuthClient{constructor(_0x278199='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x278199);}['login'](_0x395232){return __awaiter(this,void 0,void 0,function*(){var _0x39f9e0='login/'+_0x395232;try{const _0x31f661=yield yield fetch(_0x39f9e0);if(_0x31f661['status']>0xc7&&_0x31f661['status']<0x12c){const _0xfc7c52=yield _0x31f661['json']();return new SuccessfulAuthResponse(_0xfc7c52);}const _0x3e43b7=yield _0x31f661['json']();return new FailedAuthResponse(_0x3e43b7);}catch(_0xe5f69b){if(_0xe5f69b instanceof Error)return new FailedAuthResponse({'detail':_0xe5f69b['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0xe5f69b;}});}['refresh'](_0x3201b3){return __awaiter(this,void 0,void 0,function*(){var _0xc01af2='refresh';try{const _0xf57374=yield this['fetch']['post'](_0xc01af2,_0x3201b3,null);if(_0xf57374['status']>0xc7&&_0xf57374['status']<0x12c){const _0x26407c=yield _0xf57374['json']();return new SuccessfulAuthResponse(_0x26407c);}const _0x38e178=yield _0xf57374['json']();return new FailedAuthResponse(_0x38e178);}catch(_0x5f1ef6){if(_0x5f1ef6 instanceof Error)return new FailedAuthResponse({'detail':_0x5f1ef6['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x5f1ef6;}});}['getTokenStatus'](_0x362df4){if(Date['now']()<_0x362df4['access_expires'])return exports.TokenStatus['Ok'];if(Date['now']()<_0x362df4['refresh_expires'])return exports.TokenStatus['Refresh'];return exports.TokenStatus['Expired'];}}
14
14
 
15
15
  exports.AdminClient = AdminClient;
16
16
  exports.AuthClient = AuthClient;
@@ -1,13 +1,13 @@
1
- var TokenStatus;(function(_0x2869f6){_0x2869f6[_0x2869f6['Ok']=0x0]='Ok',_0x2869f6[_0x2869f6['Refresh']=0x1]='Refresh',_0x2869f6[_0x2869f6['Expired']=0x2]='Expired';}(TokenStatus||(TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}}class Response{constructor(_0x7bf789){this['isSuccess']=_0x7bf789;}}class SuccessfulAccountResponse extends Response{constructor(_0x335f9d){super(!![]),this['account']=_0x335f9d;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x146354){super(![]),this['problem']=_0x146354;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x141869){super(!![]),this['tokens']=_0x141869;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x231743){super(![]),this['problem']=_0x231743;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x4f07b1){super(!![]),this['apiKey']=_0x4f07b1;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x17c8f7){super(![]),this['problem']=_0x17c8f7;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x4379e6){super(!![]),this['apiKeyValue']=_0x4379e6;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyValueResponse extends Response{constructor(_0x494fb0){super(![]),this['problem']=_0x494fb0;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
1
+ var TokenStatus;(function(_0x1201be){_0x1201be[_0x1201be['Ok']=0x0]='Ok',_0x1201be[_0x1201be['Refresh']=0x1]='Refresh',_0x1201be[_0x1201be['Expired']=0x2]='Expired';}(TokenStatus||(TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}}class Response{constructor(_0xce9c17){this['isSuccess']=_0xce9c17;}}class SuccessfulAccountResponse extends Response{constructor(_0x4c2ada){super(!![]),this['account']=_0x4c2ada;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0xe983c2){super(![]),this['problem']=_0xe983c2;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x2c3720){super(!![]),this['tokens']=_0x2c3720;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0xf0bcb4){super(![]),this['problem']=_0xf0bcb4;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x56adda){super(!![]),this['apiKey']=_0x56adda;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x35a6cc){super(![]),this['problem']=_0x35a6cc;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x5d72f4){super(!![]),this['apiKeyValue']=_0x5d72f4;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x149f21){super(!![]),this['obj']=_0x149f21;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x2ab644){super(![]),this['problem']=_0x2ab644;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x111b0e){super(![]),this['problem']=_0x111b0e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
2
2
 
3
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x3ca976,_0x49454b,_0x2fdcbe,_0x5aa82c){function _0x422724(_0x3283d5){return _0x3283d5 instanceof _0x2fdcbe?_0x3283d5:new _0x2fdcbe(function(_0x5c019a){_0x5c019a(_0x3283d5);});}return new(_0x2fdcbe||(_0x2fdcbe=Promise))(function(_0x53d3f7,_0x59daab){function _0x43885a(_0x42150e){try{_0x5163db(_0x5aa82c['next'](_0x42150e));}catch(_0x2413f5){_0x59daab(_0x2413f5);}}function _0x37c6fa(_0x130b49){try{_0x5163db(_0x5aa82c['throw'](_0x130b49));}catch(_0x49e598){_0x59daab(_0x49e598);}}function _0x5163db(_0x566c9f){_0x566c9f['done']?_0x53d3f7(_0x566c9f['value']):_0x422724(_0x566c9f['value'])['then'](_0x43885a,_0x37c6fa);}_0x5163db((_0x5aa82c=_0x5aa82c['apply'](_0x3ca976,_0x49454b||[]))['next']());});};class AccountService{constructor(_0x2a8741){this['fetch']=_0x2a8741;}['get'](_0x2e7e72,_0x78cdb9){return __awaiter$4(this,void 0,void 0,function*(){const _0x57d5de='Account/'+_0x2e7e72+'/',_0x2f18c1=yield this['fetch']['get'](_0x57d5de,_0x78cdb9);try{if(_0x2f18c1['status']>0xc7&&_0x2f18c1['status']<0x12c){const _0x1f9de8=yield _0x2f18c1['json']();return new SuccessfulAccountResponse(_0x1f9de8);}const _0x519693=yield _0x2f18c1['json']();return new FailedAccountResponse(_0x519693);}catch(_0x324f47){if(_0x324f47 instanceof Error)return new FailedAccountResponse({'detail':_0x324f47['message'],'title':_0x324f47['name'],'status':0x1f4,'instance':'','type':''});throw _0x324f47;}});}}
3
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x4aa612,_0x324a77,_0x5a3abc,_0x32ea3f){function _0x36a9fe(_0x4c0e8a){return _0x4c0e8a instanceof _0x5a3abc?_0x4c0e8a:new _0x5a3abc(function(_0x19a494){_0x19a494(_0x4c0e8a);});}return new(_0x5a3abc||(_0x5a3abc=Promise))(function(_0x53a123,_0x2489c5){function _0x325d45(_0x42ae3a){try{_0x1e40af(_0x32ea3f['next'](_0x42ae3a));}catch(_0x565249){_0x2489c5(_0x565249);}}function _0x1a3469(_0xe3ec3f){try{_0x1e40af(_0x32ea3f['throw'](_0xe3ec3f));}catch(_0x5a05f4){_0x2489c5(_0x5a05f4);}}function _0x1e40af(_0x19bcb6){_0x19bcb6['done']?_0x53a123(_0x19bcb6['value']):_0x36a9fe(_0x19bcb6['value'])['then'](_0x325d45,_0x1a3469);}_0x1e40af((_0x32ea3f=_0x32ea3f['apply'](_0x4aa612,_0x324a77||[]))['next']());});};class AccountService{constructor(_0x1c92c1){this['fetch']=_0x1c92c1;}['get'](_0x3ae18f,_0x12258b){return __awaiter$4(this,void 0,void 0,function*(){const _0x1fa705='Account/'+_0x3ae18f+'/',_0x4f3067=yield this['fetch']['get'](_0x1fa705,_0x12258b);try{if(_0x4f3067['status']>0xc7&&_0x4f3067['status']<0x12c){const _0x54f0cf=yield _0x4f3067['json']();return new SuccessfulAccountResponse(_0x54f0cf);}const _0x14ca4f=yield _0x4f3067['json']();return new FailedAccountResponse(_0x14ca4f);}catch(_0x12a979){if(_0x12a979 instanceof Error)return new FailedAccountResponse({'detail':_0x12a979['message'],'title':_0x12a979['name'],'status':0x1f4,'instance':'','type':''});throw _0x12a979;}});}}
4
4
 
5
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x4064bd,_0xe70e67,_0x25354c,_0x283f75){function _0x3fa6a2(_0x50e9e6){return _0x50e9e6 instanceof _0x25354c?_0x50e9e6:new _0x25354c(function(_0xbfa97a){_0xbfa97a(_0x50e9e6);});}return new(_0x25354c||(_0x25354c=Promise))(function(_0x3b13a8,_0x59187a){function _0x7203ce(_0x28f540){try{_0x2c4c3b(_0x283f75['next'](_0x28f540));}catch(_0x1f1a7a){_0x59187a(_0x1f1a7a);}}function _0x6bb640(_0x589445){try{_0x2c4c3b(_0x283f75['throw'](_0x589445));}catch(_0x14685e){_0x59187a(_0x14685e);}}function _0x2c4c3b(_0x2f2adc){_0x2f2adc['done']?_0x3b13a8(_0x2f2adc['value']):_0x3fa6a2(_0x2f2adc['value'])['then'](_0x7203ce,_0x6bb640);}_0x2c4c3b((_0x283f75=_0x283f75['apply'](_0x4064bd,_0xe70e67||[]))['next']());});};class ApiKeyService{constructor(_0x6764bd){this['fetch']=_0x6764bd;}['create'](_0xd08c7f,_0x66b6a2,_0x4c26fe){return __awaiter$3(this,void 0,void 0,function*(){const _0x3a136d='api-key/create',_0x3a2c3e={'account_name':_0xd08c7f,'api_key_name':_0x66b6a2};try{const _0x37c899=yield this['fetch']['post'](_0x3a136d,_0x4c26fe,_0x3a2c3e);if(_0x37c899['status']>0xc7&&_0x37c899['status']<0x12c){const _0x1c5fc9=yield _0x37c899['json']();return new SuccessfulApiKeyResponse(_0x1c5fc9);}const _0x437bf0=yield _0x37c899['json']();return new FailedApiKeyResponse(_0x437bf0);}catch(_0x414104){if(_0x414104 instanceof Error)return new FailedApiKeyResponse({'detail':_0x414104['message'],'title':_0x414104['name'],'status':0x1f4,'instance':'','type':''});throw _0x414104;}});}['view'](_0x21e759,_0x3e6de0,_0x31f3f0){return __awaiter$3(this,void 0,void 0,function*(){const _0x565b58='api-key/'+_0x21e759+'/'+_0x3e6de0;try{const _0x3ad80a=yield this['fetch']['get'](_0x565b58,_0x31f3f0);if(_0x3ad80a['status']>0xc7&&_0x3ad80a['status']<0x12c){const _0xb1671d=yield _0x3ad80a['json']();return new SuccessfulApiKeyValueResponse(_0xb1671d);}const _0x1f0166=yield _0x3ad80a['json']();return new FailedApiKeyValueResponse(_0x1f0166);}catch(_0x28521a){if(_0x28521a instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x28521a['message'],'title':_0x28521a['name'],'status':0x1f4,'instance':'','type':''});throw _0x28521a;}});}}
5
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x3d4194,_0x243713,_0x543e9f,_0x59452e){function _0xd87569(_0xe3f0f5){return _0xe3f0f5 instanceof _0x543e9f?_0xe3f0f5:new _0x543e9f(function(_0x3e2347){_0x3e2347(_0xe3f0f5);});}return new(_0x543e9f||(_0x543e9f=Promise))(function(_0x4f0895,_0x4cd726){function _0x5caf88(_0x14d770){try{_0x3b3bcb(_0x59452e['next'](_0x14d770));}catch(_0x56e73a){_0x4cd726(_0x56e73a);}}function _0x59beea(_0x394cb3){try{_0x3b3bcb(_0x59452e['throw'](_0x394cb3));}catch(_0x435608){_0x4cd726(_0x435608);}}function _0x3b3bcb(_0xa7ecfb){_0xa7ecfb['done']?_0x4f0895(_0xa7ecfb['value']):_0xd87569(_0xa7ecfb['value'])['then'](_0x5caf88,_0x59beea);}_0x3b3bcb((_0x59452e=_0x59452e['apply'](_0x3d4194,_0x243713||[]))['next']());});};class ApiKeyService{constructor(_0x57b5eb){this['fetch']=_0x57b5eb,this['path']='api-key';}['create'](_0x28a331,_0x22e55b,_0x6ae8cd){return __awaiter$3(this,void 0,void 0,function*(){const _0xd88ad7={'account_name':_0x28a331,'api_key_name':_0x22e55b};try{const _0x2f43b1=yield this['fetch']['post'](this['path'],_0x6ae8cd,_0xd88ad7);if(_0x2f43b1['status']>0xc7&&_0x2f43b1['status']<0x12c){const _0x554423=yield _0x2f43b1['json']();return new SuccessfulApiKeyResponse(_0x554423);}const _0x43d65d=yield _0x2f43b1['json']();return new FailedApiKeyResponse(_0x43d65d);}catch(_0x3f0836){if(_0x3f0836 instanceof Error)return new FailedApiKeyResponse({'detail':_0x3f0836['message'],'title':_0x3f0836['name'],'status':0x1f4,'instance':'','type':''});throw _0x3f0836;}});}['view'](_0x1ed568,_0x2d2693,_0x534849){return __awaiter$3(this,void 0,void 0,function*(){const _0x3fa080=this['path']+'/'+_0x1ed568+'/'+_0x2d2693;try{const _0x5b52af=yield this['fetch']['get'](_0x3fa080,_0x534849);if(_0x5b52af['status']>0xc7&&_0x5b52af['status']<0x12c){const _0x120836=yield _0x5b52af['json']();return new SuccessfulApiKeyValueResponse(_0x120836);}const _0x2ebc57=yield _0x5b52af['json']();return new FailedApiKeyValueResponse(_0x2ebc57);}catch(_0x3987d9){if(_0x3987d9 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x3987d9['message'],'title':_0x3987d9['name'],'status':0x1f4,'instance':'','type':''});throw _0x3987d9;}});}['delete'](_0xaa2fa1,_0x3e9cb0,_0x2cb03f){return __awaiter$3(this,void 0,void 0,function*(){const _0x4c0a2a=this['path']+'/'+_0xaa2fa1+'/'+_0x3e9cb0;try{const _0x11c4d8=yield this['fetch']['delete'](_0x4c0a2a,_0x2cb03f);if(_0x11c4d8['status']>0xc7&&_0x11c4d8['status']<0x12c){const _0x314582=yield _0x11c4d8['json']();return new SuccessfulResponse(_0x314582);}const _0x5de6ec=yield _0x11c4d8['json']();return new FailedResponse(_0x5de6ec);}catch(_0xb76352){if(_0xb76352 instanceof Error)return new FailedResponse({'detail':_0xb76352['message'],'title':_0xb76352['name'],'status':0x1f4,'instance':'','type':''});throw _0xb76352;}});}}
6
6
 
7
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x54451d,_0x4bb625,_0x25bb7d,_0x22eb26){function _0x762a2f(_0x512991){return _0x512991 instanceof _0x25bb7d?_0x512991:new _0x25bb7d(function(_0x3f5734){_0x3f5734(_0x512991);});}return new(_0x25bb7d||(_0x25bb7d=Promise))(function(_0x47a383,_0x559df1){function _0x1a3e12(_0x12c5a0){try{_0x484308(_0x22eb26['next'](_0x12c5a0));}catch(_0x59e429){_0x559df1(_0x59e429);}}function _0x35053c(_0x236fb7){try{_0x484308(_0x22eb26['throw'](_0x236fb7));}catch(_0x2898d1){_0x559df1(_0x2898d1);}}function _0x484308(_0x130d65){_0x130d65['done']?_0x47a383(_0x130d65['value']):_0x762a2f(_0x130d65['value'])['then'](_0x1a3e12,_0x35053c);}_0x484308((_0x22eb26=_0x22eb26['apply'](_0x54451d,_0x4bb625||[]))['next']());});};class ListService{constructor(_0x25c8fa){this['fetch']=_0x25c8fa;}['add'](_0x101df0,_0x54f17a,_0x5846ed){return __awaiter$2(this,void 0,void 0,function*(){const _0x90cbff='List',_0x462115={'account_name':_0x101df0,'list_name':_0x54f17a};try{const _0x22f0d7=yield this['fetch']['post'](_0x90cbff,_0x5846ed,_0x462115);if(_0x22f0d7['status']>0xc7&&_0x22f0d7['status']<0x12c){const _0x1b51b1=yield _0x22f0d7['json']();return new SuccessfulAccountResponse(_0x1b51b1);}const _0x2402d0=yield _0x22f0d7['json']();return new FailedAccountResponse(_0x2402d0);}catch(_0x40433f){if(_0x40433f instanceof Error)return new FailedAccountResponse({'detail':_0x40433f['message'],'title':_0x40433f['name'],'status':0x1f4,'instance':'','type':''});throw _0x40433f;}});}['remove'](_0x5e175f,_0x47d64a,_0x1ef493){return __awaiter$2(this,void 0,void 0,function*(){const _0x5aa85c='List/'+_0x5e175f+'/'+_0x47d64a,_0x38e8ab=yield this['fetch']['delete'](_0x5aa85c,_0x1ef493);try{if(_0x38e8ab['status']>0xc7&&_0x38e8ab['status']<0x12c){const _0x4c341b=yield _0x38e8ab['json']();return new SuccessfulAccountResponse(_0x4c341b);}const _0x2d0802=yield _0x38e8ab['json']();return new FailedAccountResponse(_0x2d0802);}catch(_0x5d896c){if(_0x5d896c instanceof Error)return new FailedAccountResponse({'detail':_0x5d896c['message'],'title':_0x5d896c['name'],'status':0x1f4,'instance':'','type':''});throw _0x5d896c;}});}}
7
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x20cc4b,_0x503e07,_0x548a1a,_0x4462ab){function _0xde6b54(_0x367ba5){return _0x367ba5 instanceof _0x548a1a?_0x367ba5:new _0x548a1a(function(_0x21dd60){_0x21dd60(_0x367ba5);});}return new(_0x548a1a||(_0x548a1a=Promise))(function(_0x4f8b94,_0x23a348){function _0x34e3fa(_0x564225){try{_0x4906bb(_0x4462ab['next'](_0x564225));}catch(_0x360ddd){_0x23a348(_0x360ddd);}}function _0x5cf949(_0x128586){try{_0x4906bb(_0x4462ab['throw'](_0x128586));}catch(_0x1eaed0){_0x23a348(_0x1eaed0);}}function _0x4906bb(_0x296af5){_0x296af5['done']?_0x4f8b94(_0x296af5['value']):_0xde6b54(_0x296af5['value'])['then'](_0x34e3fa,_0x5cf949);}_0x4906bb((_0x4462ab=_0x4462ab['apply'](_0x20cc4b,_0x503e07||[]))['next']());});};class ListService{constructor(_0x2f6d28){this['fetch']=_0x2f6d28;}['add'](_0x39e8af,_0x31c2dd,_0x2a2800){return __awaiter$2(this,void 0,void 0,function*(){const _0x2e368a='List',_0x176c48={'account_name':_0x39e8af,'list_name':_0x31c2dd};try{const _0x38e01f=yield this['fetch']['post'](_0x2e368a,_0x2a2800,_0x176c48);if(_0x38e01f['status']>0xc7&&_0x38e01f['status']<0x12c){const _0x192bac=yield _0x38e01f['json']();return new SuccessfulAccountResponse(_0x192bac);}const _0x131bd8=yield _0x38e01f['json']();return new FailedAccountResponse(_0x131bd8);}catch(_0x394381){if(_0x394381 instanceof Error)return new FailedAccountResponse({'detail':_0x394381['message'],'title':_0x394381['name'],'status':0x1f4,'instance':'','type':''});throw _0x394381;}});}['remove'](_0x5c12c3,_0x17d93e,_0x2dd7eb){return __awaiter$2(this,void 0,void 0,function*(){const _0x4e31b4='List/'+_0x5c12c3+'/'+_0x17d93e,_0x278a7c=yield this['fetch']['delete'](_0x4e31b4,_0x2dd7eb);try{if(_0x278a7c['status']>0xc7&&_0x278a7c['status']<0x12c){const _0x7b1081=yield _0x278a7c['json']();return new SuccessfulAccountResponse(_0x7b1081);}const _0x943014=yield _0x278a7c['json']();return new FailedAccountResponse(_0x943014);}catch(_0x32e0d3){if(_0x32e0d3 instanceof Error)return new FailedAccountResponse({'detail':_0x32e0d3['message'],'title':_0x32e0d3['name'],'status':0x1f4,'instance':'','type':''});throw _0x32e0d3;}});}}
8
8
 
9
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x313890,_0x125ab4,_0x572a48,_0x887349){function _0x5e51d9(_0xd97e37){return _0xd97e37 instanceof _0x572a48?_0xd97e37:new _0x572a48(function(_0x19eba0){_0x19eba0(_0xd97e37);});}return new(_0x572a48||(_0x572a48=Promise))(function(_0x1f838e,_0x303e52){function _0x578119(_0x19a23e){try{_0x34cfa9(_0x887349['next'](_0x19a23e));}catch(_0x280d82){_0x303e52(_0x280d82);}}function _0xf1b594(_0x4aede9){try{_0x34cfa9(_0x887349['throw'](_0x4aede9));}catch(_0x30a36f){_0x303e52(_0x30a36f);}}function _0x34cfa9(_0x39ce1f){_0x39ce1f['done']?_0x1f838e(_0x39ce1f['value']):_0x5e51d9(_0x39ce1f['value'])['then'](_0x578119,_0xf1b594);}_0x34cfa9((_0x887349=_0x887349['apply'](_0x313890,_0x125ab4||[]))['next']());});};class Fetch{constructor(_0x3c1c79){this['baseUri']=_0x3c1c79,this['getUrl']=_0x7c5d4f=>{return _0x7c5d4f['startsWith']('/')&&(_0x7c5d4f=_0x7c5d4f['replace']('/','')),''+this['baseUri']+_0x7c5d4f;},!_0x3c1c79['endsWith']('/')&&(_0x3c1c79=_0x3c1c79+'/');}['get'](_0x4c3a8e,_0x156299){return __awaiter$1(this,void 0,void 0,function*(){const _0x8721f5=this['getUrl'](_0x4c3a8e);return yield fetch(_0x8721f5,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x156299}});});}['post'](_0x5e91aa,_0x347768,_0x5c68c8){return __awaiter$1(this,void 0,void 0,function*(){const _0x5bb278=this['getUrl'](_0x5e91aa);return yield fetch(_0x5bb278,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x347768},'body':_0x5c68c8?JSON['stringify'](_0x5c68c8):null});});}['put'](_0x505a3a,_0x2a86d6,_0x317474){return __awaiter$1(this,void 0,void 0,function*(){const _0x119421=this['getUrl'](_0x505a3a);return yield fetch(_0x119421,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2a86d6},'body':_0x317474?JSON['stringify'](_0x317474):null});});}['delete'](_0x4ac717,_0x32b3b7){return __awaiter$1(this,void 0,void 0,function*(){const _0x1c1608=this['getUrl'](_0x4ac717);return yield fetch(_0x1c1608,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x32b3b7}});});}}
9
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x106fcb,_0x3a940f,_0x3150ed,_0x42e0fe){function _0x28a1f6(_0x3011e9){return _0x3011e9 instanceof _0x3150ed?_0x3011e9:new _0x3150ed(function(_0x31195e){_0x31195e(_0x3011e9);});}return new(_0x3150ed||(_0x3150ed=Promise))(function(_0x414d1c,_0x19b64e){function _0x2deb2c(_0x28d17b){try{_0x44c106(_0x42e0fe['next'](_0x28d17b));}catch(_0x3bad9d){_0x19b64e(_0x3bad9d);}}function _0xcf4c90(_0x3ee820){try{_0x44c106(_0x42e0fe['throw'](_0x3ee820));}catch(_0xd165e8){_0x19b64e(_0xd165e8);}}function _0x44c106(_0x39f5ad){_0x39f5ad['done']?_0x414d1c(_0x39f5ad['value']):_0x28a1f6(_0x39f5ad['value'])['then'](_0x2deb2c,_0xcf4c90);}_0x44c106((_0x42e0fe=_0x42e0fe['apply'](_0x106fcb,_0x3a940f||[]))['next']());});};class Fetch{constructor(_0x24280c){this['baseUri']=_0x24280c,this['getUrl']=_0x44f598=>{return _0x44f598['startsWith']('/')&&(_0x44f598=_0x44f598['replace']('/','')),''+this['baseUri']+_0x44f598;},!_0x24280c['endsWith']('/')&&(_0x24280c=_0x24280c+'/');}['get'](_0x50a44e,_0x1cdcaa){return __awaiter$1(this,void 0,void 0,function*(){const _0x2d9f1d=this['getUrl'](_0x50a44e);return yield fetch(_0x2d9f1d,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1cdcaa}});});}['post'](_0x2013ff,_0x4771a4,_0x30a398){return __awaiter$1(this,void 0,void 0,function*(){const _0x4a67a4=this['getUrl'](_0x2013ff);return yield fetch(_0x4a67a4,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4771a4},'body':_0x30a398?JSON['stringify'](_0x30a398):null});});}['put'](_0x22efb1,_0x364b74,_0x2808a7){return __awaiter$1(this,void 0,void 0,function*(){const _0x161987=this['getUrl'](_0x22efb1);return yield fetch(_0x161987,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x364b74},'body':_0x2808a7?JSON['stringify'](_0x2808a7):null});});}['delete'](_0x332906,_0x50f13c){return __awaiter$1(this,void 0,void 0,function*(){const _0xdca07e=this['getUrl'](_0x332906);return yield fetch(_0xdca07e,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x50f13c}});});}}
10
10
 
11
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x5c6b28,_0x3b0a52,_0x5482bf,_0x202d0f){function _0x33733c(_0x5917e7){return _0x5917e7 instanceof _0x5482bf?_0x5917e7:new _0x5482bf(function(_0x29a235){_0x29a235(_0x5917e7);});}return new(_0x5482bf||(_0x5482bf=Promise))(function(_0x58a969,_0x7b130c){function _0x373d0e(_0x4779b6){try{_0x150f18(_0x202d0f['next'](_0x4779b6));}catch(_0x3598e2){_0x7b130c(_0x3598e2);}}function _0x36059d(_0x26de4c){try{_0x150f18(_0x202d0f['throw'](_0x26de4c));}catch(_0x6210a5){_0x7b130c(_0x6210a5);}}function _0x150f18(_0x1fe269){_0x1fe269['done']?_0x58a969(_0x1fe269['value']):_0x33733c(_0x1fe269['value'])['then'](_0x373d0e,_0x36059d);}_0x150f18((_0x202d0f=_0x202d0f['apply'](_0x5c6b28,_0x3b0a52||[]))['next']());});};class AdminClient{constructor(_0x137d3d='https://admin.searchability.dev/'){var _0x13fa25=new Fetch(_0x137d3d);this['Accounts']=new AccountService(_0x13fa25),this['Lists']=new ListService(_0x13fa25),this['ApiKeys']=new ApiKeyService(_0x13fa25);}}class AuthClient{constructor(_0x3ea384='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x3ea384);}['login'](_0xcd5946){return __awaiter(this,void 0,void 0,function*(){var _0x2effb5='login/'+_0xcd5946;try{const _0xf417cc=yield yield fetch(_0x2effb5);if(_0xf417cc['status']>0xc7&&_0xf417cc['status']<0x12c){const _0x3e2e56=yield _0xf417cc['json']();return new SuccessfulAuthResponse(_0x3e2e56);}const _0xf9d867=yield _0xf417cc['json']();return new FailedAuthResponse(_0xf9d867);}catch(_0x2b629b){if(_0x2b629b instanceof Error)return new FailedAuthResponse({'detail':_0x2b629b['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x2b629b;}});}['refresh'](_0x436d12){return __awaiter(this,void 0,void 0,function*(){var _0x5c199e='refresh';try{const _0x432b7d=yield this['fetch']['post'](_0x5c199e,_0x436d12,null);if(_0x432b7d['status']>0xc7&&_0x432b7d['status']<0x12c){const _0x9df81d=yield _0x432b7d['json']();return new SuccessfulAuthResponse(_0x9df81d);}const _0xf90e20=yield _0x432b7d['json']();return new FailedAuthResponse(_0xf90e20);}catch(_0x5e60a2){if(_0x5e60a2 instanceof Error)return new FailedAuthResponse({'detail':_0x5e60a2['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x5e60a2;}});}['getTokenStatus'](_0x1f5713){if(Date['now']()<_0x1f5713['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x1f5713['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
11
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x5304a3,_0x474a1a,_0x33d29c,_0x1c1e12){function _0x186b6a(_0x2263d1){return _0x2263d1 instanceof _0x33d29c?_0x2263d1:new _0x33d29c(function(_0x51e934){_0x51e934(_0x2263d1);});}return new(_0x33d29c||(_0x33d29c=Promise))(function(_0x39527f,_0x354c3e){function _0x360ae3(_0x277cfe){try{_0x4d6066(_0x1c1e12['next'](_0x277cfe));}catch(_0x1e84d5){_0x354c3e(_0x1e84d5);}}function _0x1ebb56(_0x3099d6){try{_0x4d6066(_0x1c1e12['throw'](_0x3099d6));}catch(_0x2dc0f4){_0x354c3e(_0x2dc0f4);}}function _0x4d6066(_0x28a7dd){_0x28a7dd['done']?_0x39527f(_0x28a7dd['value']):_0x186b6a(_0x28a7dd['value'])['then'](_0x360ae3,_0x1ebb56);}_0x4d6066((_0x1c1e12=_0x1c1e12['apply'](_0x5304a3,_0x474a1a||[]))['next']());});};class AdminClient{constructor(_0x196dd1='https://admin.searchability.dev/'){var _0x58368b=new Fetch(_0x196dd1);this['Accounts']=new AccountService(_0x58368b),this['Lists']=new ListService(_0x58368b),this['ApiKeys']=new ApiKeyService(_0x58368b);}}class AuthClient{constructor(_0x5d79a6='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x5d79a6);}['login'](_0x37bdd5){return __awaiter(this,void 0,void 0,function*(){var _0x38b4cc='login/'+_0x37bdd5;try{const _0x68ef9a=yield yield fetch(_0x38b4cc);if(_0x68ef9a['status']>0xc7&&_0x68ef9a['status']<0x12c){const _0x154b57=yield _0x68ef9a['json']();return new SuccessfulAuthResponse(_0x154b57);}const _0x4ff48c=yield _0x68ef9a['json']();return new FailedAuthResponse(_0x4ff48c);}catch(_0x2562c7){if(_0x2562c7 instanceof Error)return new FailedAuthResponse({'detail':_0x2562c7['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x2562c7;}});}['refresh'](_0x23986a){return __awaiter(this,void 0,void 0,function*(){var _0x2179c8='refresh';try{const _0x5caf22=yield this['fetch']['post'](_0x2179c8,_0x23986a,null);if(_0x5caf22['status']>0xc7&&_0x5caf22['status']<0x12c){const _0x7083da=yield _0x5caf22['json']();return new SuccessfulAuthResponse(_0x7083da);}const _0x2dab13=yield _0x5caf22['json']();return new FailedAuthResponse(_0x2dab13);}catch(_0x2deb05){if(_0x2deb05 instanceof Error)return new FailedAuthResponse({'detail':_0x2deb05['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x2deb05;}});}['getTokenStatus'](_0x131755){if(Date['now']()<_0x131755['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x131755['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
12
12
 
13
13
  export { AdminClient, AuthClient, TokenStatus, Tokens };
package/dist/types.d.ts CHANGED
@@ -16,9 +16,11 @@ declare class AccountService {
16
16
 
17
17
  declare class ApiKeyService {
18
18
  readonly fetch: Fetch;
19
+ readonly path = "api-key";
19
20
  constructor(fetch: Fetch);
20
21
  create(account_name: string, api_key_Name: string, access_token: string): Promise<Response<ApiKey, Problem>>;
21
22
  view(account_name: string, api_key_name: string, access_token: string): Promise<Response<ApiKeyValue, Problem>>;
23
+ delete(account_name: string, api_key_name: string, access_token: string): Promise<Response<any, Problem>>;
22
24
  }
23
25
 
24
26
  declare class ListService {
@@ -138,6 +140,18 @@ declare class SuccessfulApiKeyValueResponse extends Response<ApiKeyValue, Proble
138
140
  toSuccess(): ApiKeyValue;
139
141
  toProblem(): Problem;
140
142
  }
143
+ declare class SuccessfulResponse extends Response<any, Problem> {
144
+ readonly obj: any;
145
+ constructor(obj: any);
146
+ toSuccess(): any;
147
+ toProblem(): Problem;
148
+ }
149
+ declare class FailedResponse extends Response<any, Problem> {
150
+ readonly problem: Problem;
151
+ constructor(problem: Problem);
152
+ toSuccess(): any;
153
+ toProblem(): Problem;
154
+ }
141
155
  declare class FailedApiKeyValueResponse extends Response<ApiKeyValue, Problem> {
142
156
  readonly problem: Problem;
143
157
  constructor(problem: Problem);
@@ -145,4 +159,4 @@ declare class FailedApiKeyValueResponse extends Response<ApiKeyValue, Problem> {
145
159
  toProblem(): Problem;
146
160
  }
147
161
 
148
- 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 };
162
+ export { type Account, AdminClient, type ApiKey, type ApiKeyValue, AuthClient, type Error, FailedAccountResponse, FailedApiKeyResponse, FailedApiKeyValueResponse, FailedAuthResponse, FailedResponse, type List, type ListIdentity, type Problem, Response, SuccessfulAccountResponse, SuccessfulApiKeyResponse, SuccessfulApiKeyValueResponse, SuccessfulAuthResponse, SuccessfulResponse, TokenStatus, Tokens };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@searchability/admin-client",
3
- "version": "0.0.32",
3
+ "version": "0.0.33",
4
4
  "description": "Searchability admin client.",
5
5
  "type": "module",
6
6
  "types": "./dist/types.d.ts",
@@ -1,13 +0,0 @@
1
- var TokenStatus;(function(_0x4f58b5){_0x4f58b5[_0x4f58b5['Ok']=0x0]='Ok',_0x4f58b5[_0x4f58b5['Refresh']=0x1]='Refresh',_0x4f58b5[_0x4f58b5['Expired']=0x2]='Expired';}(TokenStatus||(TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}}class Response{constructor(_0x114535){this['isSuccess']=_0x114535;}}class SuccessfulAccountResponse extends Response{constructor(_0x580886){super(!![]),this['account']=_0x580886;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x7a06fe){super(![]),this['problem']=_0x7a06fe;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x582d93){super(!![]),this['tokens']=_0x582d93;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x470b3d){super(![]),this['problem']=_0x470b3d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x28ccf9){super(!![]),this['apiKey']=_0x28ccf9;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x123715){super(![]),this['problem']=_0x123715;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x288cd4){super(!![]),this['apiKeyValue']=_0x288cd4;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyValueResponse extends Response{constructor(_0x5c9896){super(![]),this['problem']=_0x5c9896;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
2
-
3
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x2eceab,_0x52c012,_0x3ae064,_0x2c9afd){function _0x2cc892(_0x37b707){return _0x37b707 instanceof _0x3ae064?_0x37b707:new _0x3ae064(function(_0x403138){_0x403138(_0x37b707);});}return new(_0x3ae064||(_0x3ae064=Promise))(function(_0x1fe38d,_0x2322e9){function _0x2a5c9a(_0x18e00e){try{_0x20b9d1(_0x2c9afd['next'](_0x18e00e));}catch(_0x208dd0){_0x2322e9(_0x208dd0);}}function _0x4b3e8d(_0x45bfd9){try{_0x20b9d1(_0x2c9afd['throw'](_0x45bfd9));}catch(_0x3c5b22){_0x2322e9(_0x3c5b22);}}function _0x20b9d1(_0x4ea42e){_0x4ea42e['done']?_0x1fe38d(_0x4ea42e['value']):_0x2cc892(_0x4ea42e['value'])['then'](_0x2a5c9a,_0x4b3e8d);}_0x20b9d1((_0x2c9afd=_0x2c9afd['apply'](_0x2eceab,_0x52c012||[]))['next']());});};class AccountService{constructor(_0xad7491){this['fetch']=_0xad7491;}['get'](_0xdf26b5,_0x1f1746){return __awaiter$4(this,void 0,void 0,function*(){const _0x9694de='Account/'+_0xdf26b5+'/',_0x1bf25d=yield this['fetch']['get'](_0x9694de,_0x1f1746);try{if(_0x1bf25d['status']>0xc7&&_0x1bf25d['status']<0x12c){const _0x4ab2ad=yield _0x1bf25d['json']();return new SuccessfulAccountResponse(_0x4ab2ad);}const _0x3d376e=yield _0x1bf25d['json']();return new FailedAccountResponse(_0x3d376e);}catch(_0x12eab3){if(_0x12eab3 instanceof Error)return new FailedAccountResponse({'detail':_0x12eab3['message'],'title':_0x12eab3['name'],'status':0x1f4,'instance':'','type':''});throw _0x12eab3;}});}}
4
-
5
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x310716,_0x41e776,_0x4044f2,_0x305a47){function _0xa6f2a4(_0x5d7377){return _0x5d7377 instanceof _0x4044f2?_0x5d7377:new _0x4044f2(function(_0x583da4){_0x583da4(_0x5d7377);});}return new(_0x4044f2||(_0x4044f2=Promise))(function(_0x442074,_0x507352){function _0xa4c537(_0x3c68a7){try{_0x5b4f31(_0x305a47['next'](_0x3c68a7));}catch(_0x1b7403){_0x507352(_0x1b7403);}}function _0x3cec4c(_0x41b24b){try{_0x5b4f31(_0x305a47['throw'](_0x41b24b));}catch(_0x208225){_0x507352(_0x208225);}}function _0x5b4f31(_0x3a023f){_0x3a023f['done']?_0x442074(_0x3a023f['value']):_0xa6f2a4(_0x3a023f['value'])['then'](_0xa4c537,_0x3cec4c);}_0x5b4f31((_0x305a47=_0x305a47['apply'](_0x310716,_0x41e776||[]))['next']());});};class ApiKeyService{constructor(_0x5bf80b){this['fetch']=_0x5bf80b;}['create'](_0x35a771,_0x66eeb8,_0x3746c3){return __awaiter$3(this,void 0,void 0,function*(){const _0x213f83='api-key/create',_0x7ee802={'account_name':_0x35a771,'api_key_name':_0x66eeb8};try{const _0x35551f=yield this['fetch']['post'](_0x213f83,_0x3746c3,_0x7ee802);if(_0x35551f['status']>0xc7&&_0x35551f['status']<0x12c){const _0x567470=yield _0x35551f['json']();return new SuccessfulApiKeyResponse(_0x567470);}const _0x6221fb=yield _0x35551f['json']();return new FailedApiKeyResponse(_0x6221fb);}catch(_0x4509ea){if(_0x4509ea instanceof Error)return new FailedApiKeyResponse({'detail':_0x4509ea['message'],'title':_0x4509ea['name'],'status':0x1f4,'instance':'','type':''});throw _0x4509ea;}});}['view'](_0x53d5d5,_0x2dd48e,_0x220016){return __awaiter$3(this,void 0,void 0,function*(){const _0x1fb399='api-key/'+_0x53d5d5+'/'+_0x2dd48e;try{const _0x3247aa=yield this['fetch']['get'](_0x1fb399,_0x220016);if(_0x3247aa['status']>0xc7&&_0x3247aa['status']<0x12c){const _0x3d53bb=yield _0x3247aa['json']();return new SuccessfulApiKeyValueResponse(_0x3d53bb);}const _0x2e0000=yield _0x3247aa['json']();return new FailedApiKeyValueResponse(_0x2e0000);}catch(_0xda6790){if(_0xda6790 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0xda6790['message'],'title':_0xda6790['name'],'status':0x1f4,'instance':'','type':''});throw _0xda6790;}});}}
6
-
7
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x166c19,_0x4f8330,_0xa52885,_0x23ed43){function _0x4b651b(_0x1221fb){return _0x1221fb instanceof _0xa52885?_0x1221fb:new _0xa52885(function(_0x569622){_0x569622(_0x1221fb);});}return new(_0xa52885||(_0xa52885=Promise))(function(_0x2a737c,_0x928801){function _0x35cd24(_0x376811){try{_0x20d91b(_0x23ed43['next'](_0x376811));}catch(_0x39dc0e){_0x928801(_0x39dc0e);}}function _0x1b84e1(_0x21b210){try{_0x20d91b(_0x23ed43['throw'](_0x21b210));}catch(_0x57b97c){_0x928801(_0x57b97c);}}function _0x20d91b(_0x536bd7){_0x536bd7['done']?_0x2a737c(_0x536bd7['value']):_0x4b651b(_0x536bd7['value'])['then'](_0x35cd24,_0x1b84e1);}_0x20d91b((_0x23ed43=_0x23ed43['apply'](_0x166c19,_0x4f8330||[]))['next']());});};class ListService{constructor(_0x1a36b8){this['fetch']=_0x1a36b8;}['add'](_0x44bfc8,_0x3d7cfe,_0x4f0180){return __awaiter$2(this,void 0,void 0,function*(){const _0x17fc7f='List',_0x5a1400={'account_name':_0x44bfc8,'list_name':_0x3d7cfe};try{const _0x5d1b6c=yield this['fetch']['post'](_0x17fc7f,_0x4f0180,_0x5a1400);if(_0x5d1b6c['status']>0xc7&&_0x5d1b6c['status']<0x12c){const _0x2b8931=yield _0x5d1b6c['json']();return new SuccessfulAccountResponse(_0x2b8931);}const _0x382914=yield _0x5d1b6c['json']();return new FailedAccountResponse(_0x382914);}catch(_0x4dd227){if(_0x4dd227 instanceof Error)return new FailedAccountResponse({'detail':_0x4dd227['message'],'title':_0x4dd227['name'],'status':0x1f4,'instance':'','type':''});throw _0x4dd227;}});}['remove'](_0x534eae,_0x4eda17,_0x45d452){return __awaiter$2(this,void 0,void 0,function*(){const _0x25e5e8='List/'+_0x534eae+'/'+_0x4eda17,_0x5656e9=yield this['fetch']['delete'](_0x25e5e8,_0x45d452);try{if(_0x5656e9['status']>0xc7&&_0x5656e9['status']<0x12c){const _0x1bde21=yield _0x5656e9['json']();return new SuccessfulAccountResponse(_0x1bde21);}const _0x12b653=yield _0x5656e9['json']();return new FailedAccountResponse(_0x12b653);}catch(_0x405c88){if(_0x405c88 instanceof Error)return new FailedAccountResponse({'detail':_0x405c88['message'],'title':_0x405c88['name'],'status':0x1f4,'instance':'','type':''});throw _0x405c88;}});}}
8
-
9
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x1994a4,_0x5f2478,_0x249c13,_0x38d0b2){function _0x44c84c(_0x4189e6){return _0x4189e6 instanceof _0x249c13?_0x4189e6:new _0x249c13(function(_0xbb9c2e){_0xbb9c2e(_0x4189e6);});}return new(_0x249c13||(_0x249c13=Promise))(function(_0x3333e2,_0x1b575f){function _0x50f0f0(_0xd8b1e){try{_0x2202a6(_0x38d0b2['next'](_0xd8b1e));}catch(_0x30acc9){_0x1b575f(_0x30acc9);}}function _0x38c42b(_0x5c951e){try{_0x2202a6(_0x38d0b2['throw'](_0x5c951e));}catch(_0x446715){_0x1b575f(_0x446715);}}function _0x2202a6(_0x4185fd){_0x4185fd['done']?_0x3333e2(_0x4185fd['value']):_0x44c84c(_0x4185fd['value'])['then'](_0x50f0f0,_0x38c42b);}_0x2202a6((_0x38d0b2=_0x38d0b2['apply'](_0x1994a4,_0x5f2478||[]))['next']());});};class Fetch{constructor(_0x2574ed){this['baseUri']=_0x2574ed,this['getUrl']=_0x1a4784=>{return _0x1a4784['startsWith']('/')&&(_0x1a4784=_0x1a4784['replace']('/','')),''+this['baseUri']+_0x1a4784;},!_0x2574ed['endsWith']('/')&&(_0x2574ed=_0x2574ed+'/');}['get'](_0x14ebef,_0x5b9513){return __awaiter$1(this,void 0,void 0,function*(){const _0x3f4bde=this['getUrl'](_0x14ebef);return yield fetch(_0x3f4bde,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x5b9513}});});}['post'](_0x2bcc5d,_0x19527b,_0x2c7e44){return __awaiter$1(this,void 0,void 0,function*(){const _0x34e458=this['getUrl'](_0x2bcc5d);return yield fetch(_0x34e458,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x19527b},'body':_0x2c7e44?JSON['stringify'](_0x2c7e44):null});});}['put'](_0x2a0b53,_0xe119a,_0x4247a0){return __awaiter$1(this,void 0,void 0,function*(){const _0x182986=this['getUrl'](_0x2a0b53);return yield fetch(_0x182986,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0xe119a},'body':_0x4247a0?JSON['stringify'](_0x4247a0):null});});}['delete'](_0x3c60c2,_0x35a97a){return __awaiter$1(this,void 0,void 0,function*(){const _0x488e04=this['getUrl'](_0x3c60c2);return yield fetch(_0x488e04,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x35a97a}});});}}
10
-
11
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x1dbb78,_0x573a85,_0x16df99,_0x4ed601){function _0x1fd13f(_0x194b56){return _0x194b56 instanceof _0x16df99?_0x194b56:new _0x16df99(function(_0x83a5b8){_0x83a5b8(_0x194b56);});}return new(_0x16df99||(_0x16df99=Promise))(function(_0x480902,_0xcf82cf){function _0x11e16d(_0x5098f3){try{_0x468f58(_0x4ed601['next'](_0x5098f3));}catch(_0xaef500){_0xcf82cf(_0xaef500);}}function _0x3a728a(_0x184e44){try{_0x468f58(_0x4ed601['throw'](_0x184e44));}catch(_0x34c2f0){_0xcf82cf(_0x34c2f0);}}function _0x468f58(_0x5933ac){_0x5933ac['done']?_0x480902(_0x5933ac['value']):_0x1fd13f(_0x5933ac['value'])['then'](_0x11e16d,_0x3a728a);}_0x468f58((_0x4ed601=_0x4ed601['apply'](_0x1dbb78,_0x573a85||[]))['next']());});};class AdminClient{constructor(_0x4a01a8='https://admin.searchability.dev/'){var _0x296634=new Fetch(_0x4a01a8);this['Accounts']=new AccountService(_0x296634),this['Lists']=new ListService(_0x296634),this['ApiKeys']=new ApiKeyService(_0x296634);}}class AuthClient{constructor(_0x1825fe='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x1825fe);}['login'](_0x54b05f){return __awaiter(this,void 0,void 0,function*(){var _0x5c8292='login/'+_0x54b05f;try{const _0x5276ff=yield yield fetch(_0x5c8292);if(_0x5276ff['status']>0xc7&&_0x5276ff['status']<0x12c){const _0x18284f=yield _0x5276ff['json']();return new SuccessfulAuthResponse(_0x18284f);}const _0x41b7b8=yield _0x5276ff['json']();return new FailedAuthResponse(_0x41b7b8);}catch(_0x1cd60a){if(_0x1cd60a instanceof Error)return new FailedAuthResponse({'detail':_0x1cd60a['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x1cd60a;}});}['refresh'](_0x1ac50f){return __awaiter(this,void 0,void 0,function*(){var _0x539465='refresh';try{const _0x306955=yield this['fetch']['post'](_0x539465,_0x1ac50f,null);if(_0x306955['status']>0xc7&&_0x306955['status']<0x12c){const _0x4d9f3b=yield _0x306955['json']();return new SuccessfulAuthResponse(_0x4d9f3b);}const _0x945c1=yield _0x306955['json']();return new FailedAuthResponse(_0x945c1);}catch(_0x3c74d7){if(_0x3c74d7 instanceof Error)return new FailedAuthResponse({'detail':_0x3c74d7['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x3c74d7;}});}['getTokenStatus'](_0x3a821e){if(Date['now']()<_0x3a821e['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x3a821e['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
12
-
13
- export { AdminClient, AuthClient, TokenStatus, Tokens };