@searchability/admin-client 0.0.34 → 0.0.35

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(_0x5dd0f4){_0x5dd0f4[_0x5dd0f4['Ok']=0x0]='Ok',_0x5dd0f4[_0x5dd0f4['Refresh']=0x1]='Refresh',_0x5dd0f4[_0x5dd0f4['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(_0x54204d){this['isSuccess']=_0x54204d;}}class SuccessfulAccountResponse extends Response{constructor(_0x39b63b){super(!![]),this['account']=_0x39b63b;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x3f3726){super(![]),this['problem']=_0x3f3726;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x393a1a){super(!![]),this['tokens']=_0x393a1a;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x5cfb44){super(![]),this['problem']=_0x5cfb44;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x19f2f8){super(!![]),this['apiKey']=_0x19f2f8;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x8c10dc){super(![]),this['problem']=_0x8c10dc;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0xaeef37){super(!![]),this['searchService']=_0xaeef37;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x649f59){super(![]),this['problem']=_0x649f59;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x44054a){super(!![]),this['apiKeyValue']=_0x44054a;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x386ef8){super(!![]),this['obj']=_0x386ef8;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x8479b7){super(![]),this['problem']=_0x8479b7;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x400175){super(![]),this['problem']=_0x400175;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
2
+
3
+ var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x246a2b,_0x5e33ed,_0x346e0b,_0xd7516c){function _0x1a3217(_0x2415e7){return _0x2415e7 instanceof _0x346e0b?_0x2415e7:new _0x346e0b(function(_0x53bfed){_0x53bfed(_0x2415e7);});}return new(_0x346e0b||(_0x346e0b=Promise))(function(_0x17fcb1,_0x5ed5e0){function _0x5c63c5(_0x21f5f0){try{_0x34266e(_0xd7516c['next'](_0x21f5f0));}catch(_0xd1c3db){_0x5ed5e0(_0xd1c3db);}}function _0x290262(_0x191692){try{_0x34266e(_0xd7516c['throw'](_0x191692));}catch(_0x5e372e){_0x5ed5e0(_0x5e372e);}}function _0x34266e(_0x4a6ede){_0x4a6ede['done']?_0x17fcb1(_0x4a6ede['value']):_0x1a3217(_0x4a6ede['value'])['then'](_0x5c63c5,_0x290262);}_0x34266e((_0xd7516c=_0xd7516c['apply'](_0x246a2b,_0x5e33ed||[]))['next']());});};class AccountService{constructor(_0x278c47){this['fetch']=_0x278c47;}['get'](_0x52a98f,_0x54ed8a){return __awaiter$5(this,void 0,void 0,function*(){const _0xa3a5ca='Account/'+_0x52a98f+'/',_0x4995a4=yield this['fetch']['get'](_0xa3a5ca,_0x54ed8a);try{if(_0x4995a4['status']>0xc7&&_0x4995a4['status']<0x12c){const _0x519d6f=yield _0x4995a4['json']();return new SuccessfulAccountResponse(_0x519d6f);}const _0xeb224f=yield _0x4995a4['json']();return new FailedAccountResponse(_0xeb224f);}catch(_0x12bcff){if(_0x12bcff instanceof Error)return new FailedAccountResponse({'detail':_0x12bcff['message'],'title':_0x12bcff['name'],'status':0x1f4,'instance':'','type':''});throw _0x12bcff;}});}}
4
+
5
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x5687e6,_0x4852b5,_0x39f416,_0x19230e){function _0x3b4f04(_0x4cab18){return _0x4cab18 instanceof _0x39f416?_0x4cab18:new _0x39f416(function(_0x3c6c91){_0x3c6c91(_0x4cab18);});}return new(_0x39f416||(_0x39f416=Promise))(function(_0x9d7cdf,_0x25f3be){function _0x5c23b6(_0x34e246){try{_0x4d83c6(_0x19230e['next'](_0x34e246));}catch(_0x27df85){_0x25f3be(_0x27df85);}}function _0x499a08(_0xaaebd7){try{_0x4d83c6(_0x19230e['throw'](_0xaaebd7));}catch(_0xafa395){_0x25f3be(_0xafa395);}}function _0x4d83c6(_0x250b6c){_0x250b6c['done']?_0x9d7cdf(_0x250b6c['value']):_0x3b4f04(_0x250b6c['value'])['then'](_0x5c23b6,_0x499a08);}_0x4d83c6((_0x19230e=_0x19230e['apply'](_0x5687e6,_0x4852b5||[]))['next']());});};class ApiKeyService{constructor(_0x1b0c41){this['fetch']=_0x1b0c41,this['path']='api-key';}['create'](_0x3c62dd,_0x58591a,_0x24fdf8){return __awaiter$4(this,void 0,void 0,function*(){const _0x3a61c2={'account_name':_0x3c62dd,'api_key_name':_0x58591a};try{const _0xd6cf5=yield this['fetch']['post'](this['path'],_0x24fdf8,_0x3a61c2);if(_0xd6cf5['status']>0xc7&&_0xd6cf5['status']<0x12c){const _0x3d4507=yield _0xd6cf5['json']();return new SuccessfulApiKeyResponse(_0x3d4507);}const _0x534188=yield _0xd6cf5['json']();return new FailedApiKeyResponse(_0x534188);}catch(_0x3a35c3){if(_0x3a35c3 instanceof Error)return new FailedApiKeyResponse({'detail':_0x3a35c3['message'],'title':_0x3a35c3['name'],'status':0x1f4,'instance':'','type':''});throw _0x3a35c3;}});}['view'](_0x2c7c36,_0x5bf043,_0x22f0b9){return __awaiter$4(this,void 0,void 0,function*(){const _0x3ea522=this['path']+'/'+_0x2c7c36+'/'+_0x5bf043;try{const _0x12dac2=yield this['fetch']['get'](_0x3ea522,_0x22f0b9);if(_0x12dac2['status']>0xc7&&_0x12dac2['status']<0x12c){const _0x5345e8=yield _0x12dac2['json']();return new SuccessfulApiKeyValueResponse(_0x5345e8);}const _0x28b6c3=yield _0x12dac2['json']();return new FailedApiKeyValueResponse(_0x28b6c3);}catch(_0x5c4a29){if(_0x5c4a29 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x5c4a29['message'],'title':_0x5c4a29['name'],'status':0x1f4,'instance':'','type':''});throw _0x5c4a29;}});}['delete'](_0x55d3ef,_0x208bad,_0x5a5438){return __awaiter$4(this,void 0,void 0,function*(){const _0x4cd53d=this['path']+'/'+_0x55d3ef+'/'+_0x208bad;try{const _0x524daa=yield this['fetch']['delete'](_0x4cd53d,_0x5a5438);if(_0x524daa['status']>0xc7&&_0x524daa['status']<0x12c)return new SuccessfulResponse({});const _0x175a77=yield _0x524daa['json']();return new FailedResponse(_0x175a77);}catch(_0x484bbc){if(_0x484bbc instanceof Error)return new FailedResponse({'detail':_0x484bbc['message'],'title':_0x484bbc['name'],'status':0x1f4,'instance':'','type':''});throw _0x484bbc;}});}}
6
+
7
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x2f5906,_0x35d35a,_0x1cbd58,_0xea0d2f){function _0x55abb6(_0xa9b0da){return _0xa9b0da instanceof _0x1cbd58?_0xa9b0da:new _0x1cbd58(function(_0x31202a){_0x31202a(_0xa9b0da);});}return new(_0x1cbd58||(_0x1cbd58=Promise))(function(_0x2fac67,_0x2ef2c0){function _0x381a60(_0x1772d1){try{_0x4ea363(_0xea0d2f['next'](_0x1772d1));}catch(_0x5c16d9){_0x2ef2c0(_0x5c16d9);}}function _0x5a601a(_0x1ad4e2){try{_0x4ea363(_0xea0d2f['throw'](_0x1ad4e2));}catch(_0x34512e){_0x2ef2c0(_0x34512e);}}function _0x4ea363(_0x57154d){_0x57154d['done']?_0x2fac67(_0x57154d['value']):_0x55abb6(_0x57154d['value'])['then'](_0x381a60,_0x5a601a);}_0x4ea363((_0xea0d2f=_0xea0d2f['apply'](_0x2f5906,_0x35d35a||[]))['next']());});};class ListService{constructor(_0x422b34){this['fetch']=_0x422b34;}['add'](_0x125ac0,_0x3a5638,_0x12ce71){return __awaiter$3(this,void 0,void 0,function*(){const _0x495b52='List',_0x419652={'account_name':_0x125ac0,'list_name':_0x3a5638};try{const _0x32722f=yield this['fetch']['post'](_0x495b52,_0x12ce71,_0x419652);if(_0x32722f['status']>0xc7&&_0x32722f['status']<0x12c){const _0x1e63ea=yield _0x32722f['json']();return new SuccessfulAccountResponse(_0x1e63ea);}const _0x7fa05=yield _0x32722f['json']();return new FailedAccountResponse(_0x7fa05);}catch(_0x581914){if(_0x581914 instanceof Error)return new FailedAccountResponse({'detail':_0x581914['message'],'title':_0x581914['name'],'status':0x1f4,'instance':'','type':''});throw _0x581914;}});}['remove'](_0x328fdb,_0x2c0173,_0x291995){return __awaiter$3(this,void 0,void 0,function*(){const _0x480433='List/'+_0x328fdb+'/'+_0x2c0173,_0x3ac051=yield this['fetch']['delete'](_0x480433,_0x291995);try{if(_0x3ac051['status']>0xc7&&_0x3ac051['status']<0x12c){const _0x7e9713=yield _0x3ac051['json']();return new SuccessfulAccountResponse(_0x7e9713);}const _0x34280f=yield _0x3ac051['json']();return new FailedAccountResponse(_0x34280f);}catch(_0xd28de3){if(_0xd28de3 instanceof Error)return new FailedAccountResponse({'detail':_0xd28de3['message'],'title':_0xd28de3['name'],'status':0x1f4,'instance':'','type':''});throw _0xd28de3;}});}}
8
+
9
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x2254b7,_0x1f4f82,_0x538b9c,_0xaa40e7){function _0x5b186e(_0x1bed6d){return _0x1bed6d instanceof _0x538b9c?_0x1bed6d:new _0x538b9c(function(_0x12baf5){_0x12baf5(_0x1bed6d);});}return new(_0x538b9c||(_0x538b9c=Promise))(function(_0x25e623,_0x33c3be){function _0x8bef3e(_0x3fb0c9){try{_0x116aff(_0xaa40e7['next'](_0x3fb0c9));}catch(_0x3faa52){_0x33c3be(_0x3faa52);}}function _0x350f04(_0x1ac0e0){try{_0x116aff(_0xaa40e7['throw'](_0x1ac0e0));}catch(_0x380eb2){_0x33c3be(_0x380eb2);}}function _0x116aff(_0x5cedc1){_0x5cedc1['done']?_0x25e623(_0x5cedc1['value']):_0x5b186e(_0x5cedc1['value'])['then'](_0x8bef3e,_0x350f04);}_0x116aff((_0xaa40e7=_0xaa40e7['apply'](_0x2254b7,_0x1f4f82||[]))['next']());});};class Fetch{constructor(_0x16988c){this['baseUri']=_0x16988c,this['getUrl']=_0x3360f3=>{return _0x3360f3['startsWith']('/')&&(_0x3360f3=_0x3360f3['replace']('/','')),''+this['baseUri']+_0x3360f3;},!_0x16988c['endsWith']('/')&&(_0x16988c=_0x16988c+'/');}['get'](_0x2279bf,_0x4c303e){return __awaiter$2(this,void 0,void 0,function*(){const _0x24bb3d=this['getUrl'](_0x2279bf);return yield fetch(_0x24bb3d,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4c303e}});});}['post'](_0x21cce3,_0x30096f,_0xedb0a9){return __awaiter$2(this,void 0,void 0,function*(){const _0x8cfa35=this['getUrl'](_0x21cce3);return yield fetch(_0x8cfa35,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x30096f},'body':_0xedb0a9?JSON['stringify'](_0xedb0a9):null});});}['put'](_0x166919,_0x2db9f5,_0x5b8532){return __awaiter$2(this,void 0,void 0,function*(){const _0x13cffa=this['getUrl'](_0x166919);return yield fetch(_0x13cffa,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2db9f5},'body':_0x5b8532?JSON['stringify'](_0x5b8532):null});});}['delete'](_0x5ae1e6,_0x1e4936){return __awaiter$2(this,void 0,void 0,function*(){const _0x3f700b=this['getUrl'](_0x5ae1e6);return yield fetch(_0x3f700b,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1e4936}});});}}
10
+
11
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x4e813d,_0x4e4bba,_0xf4e987,_0x24baf6){function _0x5239b7(_0x1cfc7d){return _0x1cfc7d instanceof _0xf4e987?_0x1cfc7d:new _0xf4e987(function(_0x60bb5f){_0x60bb5f(_0x1cfc7d);});}return new(_0xf4e987||(_0xf4e987=Promise))(function(_0x2f544b,_0x1a411e){function _0x197a91(_0x3261aa){try{_0x4dcc93(_0x24baf6['next'](_0x3261aa));}catch(_0x4e6ea0){_0x1a411e(_0x4e6ea0);}}function _0x1795e1(_0x20636d){try{_0x4dcc93(_0x24baf6['throw'](_0x20636d));}catch(_0x12e79c){_0x1a411e(_0x12e79c);}}function _0x4dcc93(_0x114713){_0x114713['done']?_0x2f544b(_0x114713['value']):_0x5239b7(_0x114713['value'])['then'](_0x197a91,_0x1795e1);}_0x4dcc93((_0x24baf6=_0x24baf6['apply'](_0x4e813d,_0x4e4bba||[]))['next']());});};class SearchServersService{constructor(_0x43a0b8){this['fetch']=_0x43a0b8,this['path']='search-services';}['create'](_0x37e4dd,_0x148897,_0x55a73c,_0x3f330a,_0x38b66,_0xda499d){return __awaiter$1(this,void 0,void 0,function*(){const _0x3f4952={'account_name':_0x37e4dd,'search_service_name':_0x148897,'endpoint':_0x55a73c,'key':_0x3f330a,'county':_0x38b66};try{const _0x5ae6c0=yield this['fetch']['post'](this['path'],_0xda499d,_0x3f4952);if(_0x5ae6c0['status']>0xc7&&_0x5ae6c0['status']<0x12c){const _0x393dc5=yield _0x5ae6c0['json']();return new SuccessfulSearchServiceResponse(_0x393dc5);}const _0x3002e6=yield _0x5ae6c0['json']();return new FailedSearchServiceResponse(_0x3002e6);}catch(_0x5eefb3){if(_0x5eefb3 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x5eefb3['message'],'title':_0x5eefb3['name'],'status':0x1f4,'instance':'','type':''});throw _0x5eefb3;}});}}
12
+
13
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x491d89,_0x53ebc9,_0x5b0b59,_0x58b740){function _0x326b09(_0x2bbb50){return _0x2bbb50 instanceof _0x5b0b59?_0x2bbb50:new _0x5b0b59(function(_0x54e0db){_0x54e0db(_0x2bbb50);});}return new(_0x5b0b59||(_0x5b0b59=Promise))(function(_0xb225f,_0x2a2bf4){function _0x4cf5a7(_0x1af182){try{_0x231ca9(_0x58b740['next'](_0x1af182));}catch(_0x17650b){_0x2a2bf4(_0x17650b);}}function _0x5792f8(_0x257d9c){try{_0x231ca9(_0x58b740['throw'](_0x257d9c));}catch(_0xde0916){_0x2a2bf4(_0xde0916);}}function _0x231ca9(_0x4ad2b4){_0x4ad2b4['done']?_0xb225f(_0x4ad2b4['value']):_0x326b09(_0x4ad2b4['value'])['then'](_0x4cf5a7,_0x5792f8);}_0x231ca9((_0x58b740=_0x58b740['apply'](_0x491d89,_0x53ebc9||[]))['next']());});};class AdminClient{constructor(_0x100f97='https://admin.searchability.dev/'){var _0x360ba6=new Fetch(_0x100f97);this['Accounts']=new AccountService(_0x360ba6),this['Lists']=new ListService(_0x360ba6),this['ApiKeys']=new ApiKeyService(_0x360ba6),this['SearchServices']=new SearchServersService(_0x360ba6);}}class AuthClient{constructor(_0x36ade5='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x36ade5);}['login'](_0x273730){return __awaiter(this,void 0,void 0,function*(){var _0x82094f='login/'+_0x273730;try{const _0x26abac=yield yield fetch(_0x82094f);if(_0x26abac['status']>0xc7&&_0x26abac['status']<0x12c){const _0x49be4c=yield _0x26abac['json']();return new SuccessfulAuthResponse(_0x49be4c);}const _0x5a4991=yield _0x26abac['json']();return new FailedAuthResponse(_0x5a4991);}catch(_0xa2113a){if(_0xa2113a instanceof Error)return new FailedAuthResponse({'detail':_0xa2113a['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0xa2113a;}});}['refresh'](_0x31b7a8){return __awaiter(this,void 0,void 0,function*(){var _0x425935='refresh';try{const _0x3f1ebb=yield this['fetch']['post'](_0x425935,_0x31b7a8,null);if(_0x3f1ebb['status']>0xc7&&_0x3f1ebb['status']<0x12c){const _0x5d1522=yield _0x3f1ebb['json']();return new SuccessfulAuthResponse(_0x5d1522);}const _0x3cd4be=yield _0x3f1ebb['json']();return new FailedAuthResponse(_0x3cd4be);}catch(_0x319d23){if(_0x319d23 instanceof Error)return new FailedAuthResponse({'detail':_0x319d23['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x319d23;}});}['getTokenStatus'](_0x2be925){if(Date['now']()<_0x2be925['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x2be925['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
14
+
15
+ export { AdminClient, AuthClient, TokenStatus, Tokens };
@@ -1,16 +1,18 @@
1
1
  'use strict';
2
2
 
3
- exports.TokenStatus = void 0;(function(_0x3dbff4){_0x3dbff4[_0x3dbff4['Ok']=0x0]='Ok',_0x3dbff4[_0x3dbff4['Refresh']=0x1]='Refresh',_0x3dbff4[_0x3dbff4['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(_0x4d2fc4){this['isSuccess']=_0x4d2fc4;}}class SuccessfulAccountResponse extends Response{constructor(_0x7dc9c0){super(!![]),this['account']=_0x7dc9c0;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0xf90dc0){super(![]),this['problem']=_0xf90dc0;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x1d6825){super(!![]),this['tokens']=_0x1d6825;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x1d32b1){super(![]),this['problem']=_0x1d32b1;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x526950){super(!![]),this['apiKey']=_0x526950;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x2f01e8){super(![]),this['problem']=_0x2f01e8;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x4c5e35){super(!![]),this['apiKeyValue']=_0x4c5e35;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x426185){super(!![]),this['obj']=_0x426185;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x40ac68){super(![]),this['problem']=_0x40ac68;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x589c68){super(![]),this['problem']=_0x589c68;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
3
+ exports.TokenStatus = void 0;(function(_0x3cb67a){_0x3cb67a[_0x3cb67a['Ok']=0x0]='Ok',_0x3cb67a[_0x3cb67a['Refresh']=0x1]='Refresh',_0x3cb67a[_0x3cb67a['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(_0x8286dd){this['isSuccess']=_0x8286dd;}}class SuccessfulAccountResponse extends Response{constructor(_0x113c62){super(!![]),this['account']=_0x113c62;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x3a2f0c){super(![]),this['problem']=_0x3a2f0c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x31c269){super(!![]),this['tokens']=_0x31c269;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x30008d){super(![]),this['problem']=_0x30008d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x553a7a){super(!![]),this['apiKey']=_0x553a7a;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x22e941){super(![]),this['problem']=_0x22e941;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x3f6fa9){super(!![]),this['searchService']=_0x3f6fa9;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x4bb8db){super(![]),this['problem']=_0x4bb8db;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x1459b7){super(!![]),this['apiKeyValue']=_0x1459b7;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x4d3583){super(!![]),this['obj']=_0x4d3583;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x4278a6){super(![]),this['problem']=_0x4278a6;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x137894){super(![]),this['problem']=_0x137894;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
4
4
 
5
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x36070c,_0x429e58,_0x4d9b2f,_0x534a78){function _0x3b9c72(_0x46e3b9){return _0x46e3b9 instanceof _0x4d9b2f?_0x46e3b9:new _0x4d9b2f(function(_0xbf4a91){_0xbf4a91(_0x46e3b9);});}return new(_0x4d9b2f||(_0x4d9b2f=Promise))(function(_0x1f31cd,_0x3425bd){function _0x4c1d10(_0x42e7be){try{_0x32fe2d(_0x534a78['next'](_0x42e7be));}catch(_0x33032a){_0x3425bd(_0x33032a);}}function _0x1835f1(_0x283f84){try{_0x32fe2d(_0x534a78['throw'](_0x283f84));}catch(_0x4bc75e){_0x3425bd(_0x4bc75e);}}function _0x32fe2d(_0x2c6459){_0x2c6459['done']?_0x1f31cd(_0x2c6459['value']):_0x3b9c72(_0x2c6459['value'])['then'](_0x4c1d10,_0x1835f1);}_0x32fe2d((_0x534a78=_0x534a78['apply'](_0x36070c,_0x429e58||[]))['next']());});};class AccountService{constructor(_0x2e23ec){this['fetch']=_0x2e23ec;}['get'](_0x4517e8,_0x15ee02){return __awaiter$4(this,void 0,void 0,function*(){const _0x3ca3ff='Account/'+_0x4517e8+'/',_0x568024=yield this['fetch']['get'](_0x3ca3ff,_0x15ee02);try{if(_0x568024['status']>0xc7&&_0x568024['status']<0x12c){const _0x346d3d=yield _0x568024['json']();return new SuccessfulAccountResponse(_0x346d3d);}const _0x2f6d9a=yield _0x568024['json']();return new FailedAccountResponse(_0x2f6d9a);}catch(_0x28191f){if(_0x28191f instanceof Error)return new FailedAccountResponse({'detail':_0x28191f['message'],'title':_0x28191f['name'],'status':0x1f4,'instance':'','type':''});throw _0x28191f;}});}}
5
+ var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x4eb93b,_0x45421a,_0x7c1061,_0x33fca9){function _0x1e5af9(_0x4a2e0f){return _0x4a2e0f instanceof _0x7c1061?_0x4a2e0f:new _0x7c1061(function(_0x1acd0e){_0x1acd0e(_0x4a2e0f);});}return new(_0x7c1061||(_0x7c1061=Promise))(function(_0x44db4e,_0x13ea18){function _0x327c12(_0x1a921f){try{_0x273f44(_0x33fca9['next'](_0x1a921f));}catch(_0x1076b1){_0x13ea18(_0x1076b1);}}function _0x8f8323(_0x4e1c04){try{_0x273f44(_0x33fca9['throw'](_0x4e1c04));}catch(_0x4dc031){_0x13ea18(_0x4dc031);}}function _0x273f44(_0x5202ec){_0x5202ec['done']?_0x44db4e(_0x5202ec['value']):_0x1e5af9(_0x5202ec['value'])['then'](_0x327c12,_0x8f8323);}_0x273f44((_0x33fca9=_0x33fca9['apply'](_0x4eb93b,_0x45421a||[]))['next']());});};class AccountService{constructor(_0x3ddcc4){this['fetch']=_0x3ddcc4;}['get'](_0x343c96,_0x2d5d73){return __awaiter$5(this,void 0,void 0,function*(){const _0x329115='Account/'+_0x343c96+'/',_0x2460b7=yield this['fetch']['get'](_0x329115,_0x2d5d73);try{if(_0x2460b7['status']>0xc7&&_0x2460b7['status']<0x12c){const _0x485900=yield _0x2460b7['json']();return new SuccessfulAccountResponse(_0x485900);}const _0x50f0a6=yield _0x2460b7['json']();return new FailedAccountResponse(_0x50f0a6);}catch(_0x4519db){if(_0x4519db instanceof Error)return new FailedAccountResponse({'detail':_0x4519db['message'],'title':_0x4519db['name'],'status':0x1f4,'instance':'','type':''});throw _0x4519db;}});}}
6
6
 
7
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x5aaec8,_0x5d5b4b,_0x2579ff,_0x11c52e){function _0x267b06(_0x1a6efd){return _0x1a6efd instanceof _0x2579ff?_0x1a6efd:new _0x2579ff(function(_0x344d3e){_0x344d3e(_0x1a6efd);});}return new(_0x2579ff||(_0x2579ff=Promise))(function(_0x1b3779,_0x478f25){function _0x2744ca(_0x3e26ce){try{_0x1c0a54(_0x11c52e['next'](_0x3e26ce));}catch(_0x2ccd5e){_0x478f25(_0x2ccd5e);}}function _0x5073ed(_0x3ae6c5){try{_0x1c0a54(_0x11c52e['throw'](_0x3ae6c5));}catch(_0x269a52){_0x478f25(_0x269a52);}}function _0x1c0a54(_0xe3c5ea){_0xe3c5ea['done']?_0x1b3779(_0xe3c5ea['value']):_0x267b06(_0xe3c5ea['value'])['then'](_0x2744ca,_0x5073ed);}_0x1c0a54((_0x11c52e=_0x11c52e['apply'](_0x5aaec8,_0x5d5b4b||[]))['next']());});};class ApiKeyService{constructor(_0x4a7354){this['fetch']=_0x4a7354,this['path']='api-key';}['create'](_0x353bbd,_0x27e28f,_0x4e245c){return __awaiter$3(this,void 0,void 0,function*(){const _0x1a14cb={'account_name':_0x353bbd,'api_key_name':_0x27e28f};try{const _0x3575c2=yield this['fetch']['post'](this['path'],_0x4e245c,_0x1a14cb);if(_0x3575c2['status']>0xc7&&_0x3575c2['status']<0x12c){const _0x21f96b=yield _0x3575c2['json']();return new SuccessfulApiKeyResponse(_0x21f96b);}const _0x59c2d2=yield _0x3575c2['json']();return new FailedApiKeyResponse(_0x59c2d2);}catch(_0x362fa9){if(_0x362fa9 instanceof Error)return new FailedApiKeyResponse({'detail':_0x362fa9['message'],'title':_0x362fa9['name'],'status':0x1f4,'instance':'','type':''});throw _0x362fa9;}});}['view'](_0x3a1437,_0x1c2376,_0x595c96){return __awaiter$3(this,void 0,void 0,function*(){const _0x5c9b8f=this['path']+'/'+_0x3a1437+'/'+_0x1c2376;try{const _0x15306b=yield this['fetch']['get'](_0x5c9b8f,_0x595c96);if(_0x15306b['status']>0xc7&&_0x15306b['status']<0x12c){const _0x2d6848=yield _0x15306b['json']();return new SuccessfulApiKeyValueResponse(_0x2d6848);}const _0x1da988=yield _0x15306b['json']();return new FailedApiKeyValueResponse(_0x1da988);}catch(_0xa4eeb2){if(_0xa4eeb2 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0xa4eeb2['message'],'title':_0xa4eeb2['name'],'status':0x1f4,'instance':'','type':''});throw _0xa4eeb2;}});}['delete'](_0x40dc44,_0x4b8b36,_0x12caf9){return __awaiter$3(this,void 0,void 0,function*(){const _0x59276b=this['path']+'/'+_0x40dc44+'/'+_0x4b8b36;try{const _0x120150=yield this['fetch']['delete'](_0x59276b,_0x12caf9);if(_0x120150['status']>0xc7&&_0x120150['status']<0x12c)return new SuccessfulResponse({});const _0x3a80ba=yield _0x120150['json']();return new FailedResponse(_0x3a80ba);}catch(_0x27de3e){if(_0x27de3e instanceof Error)return new FailedResponse({'detail':_0x27de3e['message'],'title':_0x27de3e['name'],'status':0x1f4,'instance':'','type':''});throw _0x27de3e;}});}}
7
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x2b062d,_0x2bf958,_0x5ebd3b,_0x5cc15c){function _0x44e1fd(_0x3c9b6e){return _0x3c9b6e instanceof _0x5ebd3b?_0x3c9b6e:new _0x5ebd3b(function(_0x2fdfa9){_0x2fdfa9(_0x3c9b6e);});}return new(_0x5ebd3b||(_0x5ebd3b=Promise))(function(_0x257eff,_0xfede0e){function _0x3d38d5(_0x4782c8){try{_0x5f3c2e(_0x5cc15c['next'](_0x4782c8));}catch(_0x1d58f2){_0xfede0e(_0x1d58f2);}}function _0x3c402f(_0x5772e1){try{_0x5f3c2e(_0x5cc15c['throw'](_0x5772e1));}catch(_0x463c81){_0xfede0e(_0x463c81);}}function _0x5f3c2e(_0x501397){_0x501397['done']?_0x257eff(_0x501397['value']):_0x44e1fd(_0x501397['value'])['then'](_0x3d38d5,_0x3c402f);}_0x5f3c2e((_0x5cc15c=_0x5cc15c['apply'](_0x2b062d,_0x2bf958||[]))['next']());});};class ApiKeyService{constructor(_0x16ea49){this['fetch']=_0x16ea49,this['path']='api-key';}['create'](_0x447d3e,_0x531afd,_0x2c51fc){return __awaiter$4(this,void 0,void 0,function*(){const _0x46479b={'account_name':_0x447d3e,'api_key_name':_0x531afd};try{const _0x3aa50=yield this['fetch']['post'](this['path'],_0x2c51fc,_0x46479b);if(_0x3aa50['status']>0xc7&&_0x3aa50['status']<0x12c){const _0x1558ff=yield _0x3aa50['json']();return new SuccessfulApiKeyResponse(_0x1558ff);}const _0x56b733=yield _0x3aa50['json']();return new FailedApiKeyResponse(_0x56b733);}catch(_0x2a7126){if(_0x2a7126 instanceof Error)return new FailedApiKeyResponse({'detail':_0x2a7126['message'],'title':_0x2a7126['name'],'status':0x1f4,'instance':'','type':''});throw _0x2a7126;}});}['view'](_0x2e14af,_0x345cef,_0x1ade1b){return __awaiter$4(this,void 0,void 0,function*(){const _0x4c854b=this['path']+'/'+_0x2e14af+'/'+_0x345cef;try{const _0x31988f=yield this['fetch']['get'](_0x4c854b,_0x1ade1b);if(_0x31988f['status']>0xc7&&_0x31988f['status']<0x12c){const _0x4c78b6=yield _0x31988f['json']();return new SuccessfulApiKeyValueResponse(_0x4c78b6);}const _0x100976=yield _0x31988f['json']();return new FailedApiKeyValueResponse(_0x100976);}catch(_0x19e5bf){if(_0x19e5bf instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x19e5bf['message'],'title':_0x19e5bf['name'],'status':0x1f4,'instance':'','type':''});throw _0x19e5bf;}});}['delete'](_0x38bba8,_0x4e5566,_0x1a3a13){return __awaiter$4(this,void 0,void 0,function*(){const _0x489da6=this['path']+'/'+_0x38bba8+'/'+_0x4e5566;try{const _0x4dfeb5=yield this['fetch']['delete'](_0x489da6,_0x1a3a13);if(_0x4dfeb5['status']>0xc7&&_0x4dfeb5['status']<0x12c)return new SuccessfulResponse({});const _0x5b348a=yield _0x4dfeb5['json']();return new FailedResponse(_0x5b348a);}catch(_0x75815f){if(_0x75815f instanceof Error)return new FailedResponse({'detail':_0x75815f['message'],'title':_0x75815f['name'],'status':0x1f4,'instance':'','type':''});throw _0x75815f;}});}}
8
8
 
9
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x58be9f,_0x401f23,_0x56df56,_0x113fc9){function _0xd8f29a(_0x4cdbdf){return _0x4cdbdf instanceof _0x56df56?_0x4cdbdf:new _0x56df56(function(_0x258968){_0x258968(_0x4cdbdf);});}return new(_0x56df56||(_0x56df56=Promise))(function(_0x314376,_0x26e4a8){function _0x178d99(_0x226929){try{_0x452318(_0x113fc9['next'](_0x226929));}catch(_0x5522e3){_0x26e4a8(_0x5522e3);}}function _0x1c4318(_0x23b52e){try{_0x452318(_0x113fc9['throw'](_0x23b52e));}catch(_0x2b3327){_0x26e4a8(_0x2b3327);}}function _0x452318(_0x5a56f2){_0x5a56f2['done']?_0x314376(_0x5a56f2['value']):_0xd8f29a(_0x5a56f2['value'])['then'](_0x178d99,_0x1c4318);}_0x452318((_0x113fc9=_0x113fc9['apply'](_0x58be9f,_0x401f23||[]))['next']());});};class ListService{constructor(_0x5e2cfb){this['fetch']=_0x5e2cfb;}['add'](_0x172ab7,_0x465606,_0x30616a){return __awaiter$2(this,void 0,void 0,function*(){const _0x1dd6da='List',_0x56c7b5={'account_name':_0x172ab7,'list_name':_0x465606};try{const _0x84379b=yield this['fetch']['post'](_0x1dd6da,_0x30616a,_0x56c7b5);if(_0x84379b['status']>0xc7&&_0x84379b['status']<0x12c){const _0x4d8042=yield _0x84379b['json']();return new SuccessfulAccountResponse(_0x4d8042);}const _0x4fd562=yield _0x84379b['json']();return new FailedAccountResponse(_0x4fd562);}catch(_0x3e64d0){if(_0x3e64d0 instanceof Error)return new FailedAccountResponse({'detail':_0x3e64d0['message'],'title':_0x3e64d0['name'],'status':0x1f4,'instance':'','type':''});throw _0x3e64d0;}});}['remove'](_0x185d1c,_0x5de4d6,_0x460c9a){return __awaiter$2(this,void 0,void 0,function*(){const _0x14b3cb='List/'+_0x185d1c+'/'+_0x5de4d6,_0x53d084=yield this['fetch']['delete'](_0x14b3cb,_0x460c9a);try{if(_0x53d084['status']>0xc7&&_0x53d084['status']<0x12c){const _0x3a8772=yield _0x53d084['json']();return new SuccessfulAccountResponse(_0x3a8772);}const _0x95e8e7=yield _0x53d084['json']();return new FailedAccountResponse(_0x95e8e7);}catch(_0x2536b5){if(_0x2536b5 instanceof Error)return new FailedAccountResponse({'detail':_0x2536b5['message'],'title':_0x2536b5['name'],'status':0x1f4,'instance':'','type':''});throw _0x2536b5;}});}}
9
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x2142f4,_0x2c559e,_0x39c70d,_0x531375){function _0x3baf2f(_0x516f0f){return _0x516f0f instanceof _0x39c70d?_0x516f0f:new _0x39c70d(function(_0x4b2546){_0x4b2546(_0x516f0f);});}return new(_0x39c70d||(_0x39c70d=Promise))(function(_0x200133,_0x165aaf){function _0x318820(_0xdf372d){try{_0x5e9b02(_0x531375['next'](_0xdf372d));}catch(_0x3de044){_0x165aaf(_0x3de044);}}function _0x4701e6(_0xcc8b24){try{_0x5e9b02(_0x531375['throw'](_0xcc8b24));}catch(_0xe87646){_0x165aaf(_0xe87646);}}function _0x5e9b02(_0x26a775){_0x26a775['done']?_0x200133(_0x26a775['value']):_0x3baf2f(_0x26a775['value'])['then'](_0x318820,_0x4701e6);}_0x5e9b02((_0x531375=_0x531375['apply'](_0x2142f4,_0x2c559e||[]))['next']());});};class ListService{constructor(_0x6799c0){this['fetch']=_0x6799c0;}['add'](_0x51cdd9,_0x3a73e8,_0x4e2c84){return __awaiter$3(this,void 0,void 0,function*(){const _0x27ea8a='List',_0x51a404={'account_name':_0x51cdd9,'list_name':_0x3a73e8};try{const _0x36a093=yield this['fetch']['post'](_0x27ea8a,_0x4e2c84,_0x51a404);if(_0x36a093['status']>0xc7&&_0x36a093['status']<0x12c){const _0x36b788=yield _0x36a093['json']();return new SuccessfulAccountResponse(_0x36b788);}const _0x9ef191=yield _0x36a093['json']();return new FailedAccountResponse(_0x9ef191);}catch(_0x49ed21){if(_0x49ed21 instanceof Error)return new FailedAccountResponse({'detail':_0x49ed21['message'],'title':_0x49ed21['name'],'status':0x1f4,'instance':'','type':''});throw _0x49ed21;}});}['remove'](_0x277e37,_0x4b5d7a,_0x565909){return __awaiter$3(this,void 0,void 0,function*(){const _0x8ba123='List/'+_0x277e37+'/'+_0x4b5d7a,_0x175243=yield this['fetch']['delete'](_0x8ba123,_0x565909);try{if(_0x175243['status']>0xc7&&_0x175243['status']<0x12c){const _0x4bca1e=yield _0x175243['json']();return new SuccessfulAccountResponse(_0x4bca1e);}const _0x27be19=yield _0x175243['json']();return new FailedAccountResponse(_0x27be19);}catch(_0x1ee076){if(_0x1ee076 instanceof Error)return new FailedAccountResponse({'detail':_0x1ee076['message'],'title':_0x1ee076['name'],'status':0x1f4,'instance':'','type':''});throw _0x1ee076;}});}}
10
10
 
11
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x2df809,_0x3f2384,_0x652faa,_0x2f0c8e){function _0x28e2a0(_0x1264f1){return _0x1264f1 instanceof _0x652faa?_0x1264f1:new _0x652faa(function(_0x1d972c){_0x1d972c(_0x1264f1);});}return new(_0x652faa||(_0x652faa=Promise))(function(_0x5dbf04,_0x4dbc54){function _0x5bbe9f(_0x4f92aa){try{_0x37bada(_0x2f0c8e['next'](_0x4f92aa));}catch(_0x1f4d1b){_0x4dbc54(_0x1f4d1b);}}function _0x1a194a(_0x5a48b5){try{_0x37bada(_0x2f0c8e['throw'](_0x5a48b5));}catch(_0x5e86d2){_0x4dbc54(_0x5e86d2);}}function _0x37bada(_0x4f221f){_0x4f221f['done']?_0x5dbf04(_0x4f221f['value']):_0x28e2a0(_0x4f221f['value'])['then'](_0x5bbe9f,_0x1a194a);}_0x37bada((_0x2f0c8e=_0x2f0c8e['apply'](_0x2df809,_0x3f2384||[]))['next']());});};class Fetch{constructor(_0x38d277){this['baseUri']=_0x38d277,this['getUrl']=_0x1e37a7=>{return _0x1e37a7['startsWith']('/')&&(_0x1e37a7=_0x1e37a7['replace']('/','')),''+this['baseUri']+_0x1e37a7;},!_0x38d277['endsWith']('/')&&(_0x38d277=_0x38d277+'/');}['get'](_0x14b9be,_0x53ebb3){return __awaiter$1(this,void 0,void 0,function*(){const _0x1c75b3=this['getUrl'](_0x14b9be);return yield fetch(_0x1c75b3,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x53ebb3}});});}['post'](_0x18e705,_0x17b39d,_0xc46625){return __awaiter$1(this,void 0,void 0,function*(){const _0x2dd61b=this['getUrl'](_0x18e705);return yield fetch(_0x2dd61b,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x17b39d},'body':_0xc46625?JSON['stringify'](_0xc46625):null});});}['put'](_0x1784ff,_0x554a4f,_0x52e3ae){return __awaiter$1(this,void 0,void 0,function*(){const _0x38e127=this['getUrl'](_0x1784ff);return yield fetch(_0x38e127,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x554a4f},'body':_0x52e3ae?JSON['stringify'](_0x52e3ae):null});});}['delete'](_0x55bdf6,_0x166cae){return __awaiter$1(this,void 0,void 0,function*(){const _0x1fd79a=this['getUrl'](_0x55bdf6);return yield fetch(_0x1fd79a,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x166cae}});});}}
11
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x5d19de,_0xd4ea55,_0x517657,_0x399ee3){function _0x50e76d(_0xe8384c){return _0xe8384c instanceof _0x517657?_0xe8384c:new _0x517657(function(_0x49eb93){_0x49eb93(_0xe8384c);});}return new(_0x517657||(_0x517657=Promise))(function(_0x29cc9f,_0x4df9b6){function _0x1f1818(_0x512767){try{_0x445d00(_0x399ee3['next'](_0x512767));}catch(_0x3aa36a){_0x4df9b6(_0x3aa36a);}}function _0x1b7fa7(_0x581c86){try{_0x445d00(_0x399ee3['throw'](_0x581c86));}catch(_0x5357e9){_0x4df9b6(_0x5357e9);}}function _0x445d00(_0x417517){_0x417517['done']?_0x29cc9f(_0x417517['value']):_0x50e76d(_0x417517['value'])['then'](_0x1f1818,_0x1b7fa7);}_0x445d00((_0x399ee3=_0x399ee3['apply'](_0x5d19de,_0xd4ea55||[]))['next']());});};class Fetch{constructor(_0x4da7e3){this['baseUri']=_0x4da7e3,this['getUrl']=_0x5075bf=>{return _0x5075bf['startsWith']('/')&&(_0x5075bf=_0x5075bf['replace']('/','')),''+this['baseUri']+_0x5075bf;},!_0x4da7e3['endsWith']('/')&&(_0x4da7e3=_0x4da7e3+'/');}['get'](_0x21af8d,_0x231f67){return __awaiter$2(this,void 0,void 0,function*(){const _0x65f8fd=this['getUrl'](_0x21af8d);return yield fetch(_0x65f8fd,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x231f67}});});}['post'](_0x2f3d81,_0x3812a1,_0x1bc4ec){return __awaiter$2(this,void 0,void 0,function*(){const _0x50aa7b=this['getUrl'](_0x2f3d81);return yield fetch(_0x50aa7b,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3812a1},'body':_0x1bc4ec?JSON['stringify'](_0x1bc4ec):null});});}['put'](_0x59a6a4,_0x56668c,_0x36a777){return __awaiter$2(this,void 0,void 0,function*(){const _0x585358=this['getUrl'](_0x59a6a4);return yield fetch(_0x585358,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x56668c},'body':_0x36a777?JSON['stringify'](_0x36a777):null});});}['delete'](_0x33562a,_0x29364a){return __awaiter$2(this,void 0,void 0,function*(){const _0x167d8e=this['getUrl'](_0x33562a);return yield fetch(_0x167d8e,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x29364a}});});}}
12
12
 
13
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x1f1d8a,_0x194e43,_0xc3aa87,_0x49f880){function _0x369228(_0x420894){return _0x420894 instanceof _0xc3aa87?_0x420894:new _0xc3aa87(function(_0x42c6fe){_0x42c6fe(_0x420894);});}return new(_0xc3aa87||(_0xc3aa87=Promise))(function(_0x33c519,_0x5a2fca){function _0x59e534(_0x37d7e2){try{_0x13c3e8(_0x49f880['next'](_0x37d7e2));}catch(_0x1a513f){_0x5a2fca(_0x1a513f);}}function _0x169afd(_0x33b467){try{_0x13c3e8(_0x49f880['throw'](_0x33b467));}catch(_0x49f675){_0x5a2fca(_0x49f675);}}function _0x13c3e8(_0x2233f2){_0x2233f2['done']?_0x33c519(_0x2233f2['value']):_0x369228(_0x2233f2['value'])['then'](_0x59e534,_0x169afd);}_0x13c3e8((_0x49f880=_0x49f880['apply'](_0x1f1d8a,_0x194e43||[]))['next']());});};class AdminClient{constructor(_0x2ac418='https://admin.searchability.dev/'){var _0x108ab4=new Fetch(_0x2ac418);this['Accounts']=new AccountService(_0x108ab4),this['Lists']=new ListService(_0x108ab4),this['ApiKeys']=new ApiKeyService(_0x108ab4);}}class AuthClient{constructor(_0x41e7e7='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x41e7e7);}['login'](_0x237618){return __awaiter(this,void 0,void 0,function*(){var _0xe81e1b='login/'+_0x237618;try{const _0x1c7dd2=yield yield fetch(_0xe81e1b);if(_0x1c7dd2['status']>0xc7&&_0x1c7dd2['status']<0x12c){const _0x18b8ec=yield _0x1c7dd2['json']();return new SuccessfulAuthResponse(_0x18b8ec);}const _0x16802d=yield _0x1c7dd2['json']();return new FailedAuthResponse(_0x16802d);}catch(_0x1cb3bd){if(_0x1cb3bd instanceof Error)return new FailedAuthResponse({'detail':_0x1cb3bd['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x1cb3bd;}});}['refresh'](_0x767d36){return __awaiter(this,void 0,void 0,function*(){var _0x290db1='refresh';try{const _0x11c2f0=yield this['fetch']['post'](_0x290db1,_0x767d36,null);if(_0x11c2f0['status']>0xc7&&_0x11c2f0['status']<0x12c){const _0x2537d7=yield _0x11c2f0['json']();return new SuccessfulAuthResponse(_0x2537d7);}const _0x62ce68=yield _0x11c2f0['json']();return new FailedAuthResponse(_0x62ce68);}catch(_0x33d18a){if(_0x33d18a instanceof Error)return new FailedAuthResponse({'detail':_0x33d18a['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x33d18a;}});}['getTokenStatus'](_0x1d1052){if(Date['now']()<_0x1d1052['access_expires'])return exports.TokenStatus['Ok'];if(Date['now']()<_0x1d1052['refresh_expires'])return exports.TokenStatus['Refresh'];return exports.TokenStatus['Expired'];}}
13
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x1aeade,_0x1bf14d,_0x1c3b16,_0x3837d9){function _0x2971b6(_0x296dbf){return _0x296dbf instanceof _0x1c3b16?_0x296dbf:new _0x1c3b16(function(_0x5488e6){_0x5488e6(_0x296dbf);});}return new(_0x1c3b16||(_0x1c3b16=Promise))(function(_0x3361b5,_0x5111c4){function _0x2c1101(_0x2f9985){try{_0x22308f(_0x3837d9['next'](_0x2f9985));}catch(_0x16966d){_0x5111c4(_0x16966d);}}function _0x1d1986(_0x1741ef){try{_0x22308f(_0x3837d9['throw'](_0x1741ef));}catch(_0x29bb77){_0x5111c4(_0x29bb77);}}function _0x22308f(_0xe64b75){_0xe64b75['done']?_0x3361b5(_0xe64b75['value']):_0x2971b6(_0xe64b75['value'])['then'](_0x2c1101,_0x1d1986);}_0x22308f((_0x3837d9=_0x3837d9['apply'](_0x1aeade,_0x1bf14d||[]))['next']());});};class SearchServersService{constructor(_0x217fb2){this['fetch']=_0x217fb2,this['path']='search-services';}['create'](_0x48a0a4,_0x542a9a,_0xb230f3,_0x180b31,_0x3d5453,_0x4e1b68){return __awaiter$1(this,void 0,void 0,function*(){const _0x305631={'account_name':_0x48a0a4,'search_service_name':_0x542a9a,'endpoint':_0xb230f3,'key':_0x180b31,'county':_0x3d5453};try{const _0x4902a1=yield this['fetch']['post'](this['path'],_0x4e1b68,_0x305631);if(_0x4902a1['status']>0xc7&&_0x4902a1['status']<0x12c){const _0x4f4034=yield _0x4902a1['json']();return new SuccessfulSearchServiceResponse(_0x4f4034);}const _0xc028c5=yield _0x4902a1['json']();return new FailedSearchServiceResponse(_0xc028c5);}catch(_0x1c35e5){if(_0x1c35e5 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x1c35e5['message'],'title':_0x1c35e5['name'],'status':0x1f4,'instance':'','type':''});throw _0x1c35e5;}});}}
14
+
15
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0xb229d0,_0x2f19f2,_0x110b78,_0x2e61c8){function _0x4011da(_0x24ea8f){return _0x24ea8f instanceof _0x110b78?_0x24ea8f:new _0x110b78(function(_0x2948b9){_0x2948b9(_0x24ea8f);});}return new(_0x110b78||(_0x110b78=Promise))(function(_0xc23b84,_0x443b0e){function _0x303c37(_0x5e1b2c){try{_0x7b5cb7(_0x2e61c8['next'](_0x5e1b2c));}catch(_0x3502eb){_0x443b0e(_0x3502eb);}}function _0x3ea633(_0x1cb695){try{_0x7b5cb7(_0x2e61c8['throw'](_0x1cb695));}catch(_0x29fc73){_0x443b0e(_0x29fc73);}}function _0x7b5cb7(_0x3c26d7){_0x3c26d7['done']?_0xc23b84(_0x3c26d7['value']):_0x4011da(_0x3c26d7['value'])['then'](_0x303c37,_0x3ea633);}_0x7b5cb7((_0x2e61c8=_0x2e61c8['apply'](_0xb229d0,_0x2f19f2||[]))['next']());});};class AdminClient{constructor(_0x99cf3c='https://admin.searchability.dev/'){var _0x36582c=new Fetch(_0x99cf3c);this['Accounts']=new AccountService(_0x36582c),this['Lists']=new ListService(_0x36582c),this['ApiKeys']=new ApiKeyService(_0x36582c),this['SearchServices']=new SearchServersService(_0x36582c);}}class AuthClient{constructor(_0x11cbf4='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x11cbf4);}['login'](_0x370cf0){return __awaiter(this,void 0,void 0,function*(){var _0x3313db='login/'+_0x370cf0;try{const _0x1db4ec=yield yield fetch(_0x3313db);if(_0x1db4ec['status']>0xc7&&_0x1db4ec['status']<0x12c){const _0x1201a9=yield _0x1db4ec['json']();return new SuccessfulAuthResponse(_0x1201a9);}const _0x1e7cb8=yield _0x1db4ec['json']();return new FailedAuthResponse(_0x1e7cb8);}catch(_0x176aa9){if(_0x176aa9 instanceof Error)return new FailedAuthResponse({'detail':_0x176aa9['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x176aa9;}});}['refresh'](_0x44749b){return __awaiter(this,void 0,void 0,function*(){var _0x47abf9='refresh';try{const _0x53017d=yield this['fetch']['post'](_0x47abf9,_0x44749b,null);if(_0x53017d['status']>0xc7&&_0x53017d['status']<0x12c){const _0x2c4dfe=yield _0x53017d['json']();return new SuccessfulAuthResponse(_0x2c4dfe);}const _0x370ddb=yield _0x53017d['json']();return new FailedAuthResponse(_0x370ddb);}catch(_0x212a5e){if(_0x212a5e instanceof Error)return new FailedAuthResponse({'detail':_0x212a5e['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x212a5e;}});}['getTokenStatus'](_0x2c5e8b){if(Date['now']()<_0x2c5e8b['access_expires'])return exports.TokenStatus['Ok'];if(Date['now']()<_0x2c5e8b['refresh_expires'])return exports.TokenStatus['Refresh'];return exports.TokenStatus['Expired'];}}
14
16
 
15
17
  exports.AdminClient = AdminClient;
16
18
  exports.AuthClient = AuthClient;
@@ -1,13 +1,15 @@
1
- var TokenStatus;(function(_0x17f738){_0x17f738[_0x17f738['Ok']=0x0]='Ok',_0x17f738[_0x17f738['Refresh']=0x1]='Refresh',_0x17f738[_0x17f738['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(_0x59eeb4){this['isSuccess']=_0x59eeb4;}}class SuccessfulAccountResponse extends Response{constructor(_0x3b6d30){super(!![]),this['account']=_0x3b6d30;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x3d5b58){super(![]),this['problem']=_0x3d5b58;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x5091ee){super(!![]),this['tokens']=_0x5091ee;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x72bed4){super(![]),this['problem']=_0x72bed4;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x15d1fe){super(!![]),this['apiKey']=_0x15d1fe;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x1abfb2){super(![]),this['problem']=_0x1abfb2;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x4ef6f2){super(!![]),this['apiKeyValue']=_0x4ef6f2;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x78802b){super(!![]),this['obj']=_0x78802b;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x228ceb){super(![]),this['problem']=_0x228ceb;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x15a037){super(![]),this['problem']=_0x15a037;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
1
+ var TokenStatus;(function(_0x1d8e35){_0x1d8e35[_0x1d8e35['Ok']=0x0]='Ok',_0x1d8e35[_0x1d8e35['Refresh']=0x1]='Refresh',_0x1d8e35[_0x1d8e35['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(_0x4da05a){this['isSuccess']=_0x4da05a;}}class SuccessfulAccountResponse extends Response{constructor(_0x4c1904){super(!![]),this['account']=_0x4c1904;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0xf82dff){super(![]),this['problem']=_0xf82dff;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x51bd71){super(!![]),this['tokens']=_0x51bd71;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x236518){super(![]),this['problem']=_0x236518;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x391833){super(!![]),this['apiKey']=_0x391833;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x2fd4e9){super(![]),this['problem']=_0x2fd4e9;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x1d56a3){super(!![]),this['searchService']=_0x1d56a3;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x427e9a){super(![]),this['problem']=_0x427e9a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x14a2eb){super(!![]),this['apiKeyValue']=_0x14a2eb;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x3a22a7){super(!![]),this['obj']=_0x3a22a7;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x49139f){super(![]),this['problem']=_0x49139f;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0xf89b21){super(![]),this['problem']=_0xf89b21;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
2
2
 
3
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x23cf00,_0x2c07c7,_0x4493ef,_0x8182){function _0x3eea06(_0x4ff1d3){return _0x4ff1d3 instanceof _0x4493ef?_0x4ff1d3:new _0x4493ef(function(_0x31b5a9){_0x31b5a9(_0x4ff1d3);});}return new(_0x4493ef||(_0x4493ef=Promise))(function(_0x5e41c2,_0x192e77){function _0x315323(_0x10abfd){try{_0x5b7f4c(_0x8182['next'](_0x10abfd));}catch(_0x1c648a){_0x192e77(_0x1c648a);}}function _0x40d02d(_0x425404){try{_0x5b7f4c(_0x8182['throw'](_0x425404));}catch(_0x445a9d){_0x192e77(_0x445a9d);}}function _0x5b7f4c(_0xa110e0){_0xa110e0['done']?_0x5e41c2(_0xa110e0['value']):_0x3eea06(_0xa110e0['value'])['then'](_0x315323,_0x40d02d);}_0x5b7f4c((_0x8182=_0x8182['apply'](_0x23cf00,_0x2c07c7||[]))['next']());});};class AccountService{constructor(_0xc4263b){this['fetch']=_0xc4263b;}['get'](_0x1b69ab,_0x5685ff){return __awaiter$4(this,void 0,void 0,function*(){const _0x531823='Account/'+_0x1b69ab+'/',_0x42e13e=yield this['fetch']['get'](_0x531823,_0x5685ff);try{if(_0x42e13e['status']>0xc7&&_0x42e13e['status']<0x12c){const _0x3eed20=yield _0x42e13e['json']();return new SuccessfulAccountResponse(_0x3eed20);}const _0x40e561=yield _0x42e13e['json']();return new FailedAccountResponse(_0x40e561);}catch(_0x189671){if(_0x189671 instanceof Error)return new FailedAccountResponse({'detail':_0x189671['message'],'title':_0x189671['name'],'status':0x1f4,'instance':'','type':''});throw _0x189671;}});}}
3
+ var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x126f9e,_0x2eada6,_0x2475b5,_0x2c0997){function _0x3d61f7(_0x11bc72){return _0x11bc72 instanceof _0x2475b5?_0x11bc72:new _0x2475b5(function(_0x5a1643){_0x5a1643(_0x11bc72);});}return new(_0x2475b5||(_0x2475b5=Promise))(function(_0x591fbc,_0x3360d1){function _0x394672(_0x369955){try{_0x1580ae(_0x2c0997['next'](_0x369955));}catch(_0x4757ef){_0x3360d1(_0x4757ef);}}function _0x319fb6(_0x100071){try{_0x1580ae(_0x2c0997['throw'](_0x100071));}catch(_0x44cb7d){_0x3360d1(_0x44cb7d);}}function _0x1580ae(_0x23d3d4){_0x23d3d4['done']?_0x591fbc(_0x23d3d4['value']):_0x3d61f7(_0x23d3d4['value'])['then'](_0x394672,_0x319fb6);}_0x1580ae((_0x2c0997=_0x2c0997['apply'](_0x126f9e,_0x2eada6||[]))['next']());});};class AccountService{constructor(_0x33eb37){this['fetch']=_0x33eb37;}['get'](_0x2593f2,_0x2c8708){return __awaiter$5(this,void 0,void 0,function*(){const _0x43fb46='Account/'+_0x2593f2+'/',_0x5874da=yield this['fetch']['get'](_0x43fb46,_0x2c8708);try{if(_0x5874da['status']>0xc7&&_0x5874da['status']<0x12c){const _0x80317b=yield _0x5874da['json']();return new SuccessfulAccountResponse(_0x80317b);}const _0x45c700=yield _0x5874da['json']();return new FailedAccountResponse(_0x45c700);}catch(_0x304c57){if(_0x304c57 instanceof Error)return new FailedAccountResponse({'detail':_0x304c57['message'],'title':_0x304c57['name'],'status':0x1f4,'instance':'','type':''});throw _0x304c57;}});}}
4
4
 
5
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x32ee49,_0x264836,_0x5a4aee,_0x4cfd75){function _0x5ea14e(_0x1df19d){return _0x1df19d instanceof _0x5a4aee?_0x1df19d:new _0x5a4aee(function(_0x5681b3){_0x5681b3(_0x1df19d);});}return new(_0x5a4aee||(_0x5a4aee=Promise))(function(_0xc72283,_0x477a63){function _0x4e47d5(_0x3f1f9a){try{_0x43e970(_0x4cfd75['next'](_0x3f1f9a));}catch(_0x4804c1){_0x477a63(_0x4804c1);}}function _0x696fbb(_0x48945d){try{_0x43e970(_0x4cfd75['throw'](_0x48945d));}catch(_0xcc717b){_0x477a63(_0xcc717b);}}function _0x43e970(_0x226730){_0x226730['done']?_0xc72283(_0x226730['value']):_0x5ea14e(_0x226730['value'])['then'](_0x4e47d5,_0x696fbb);}_0x43e970((_0x4cfd75=_0x4cfd75['apply'](_0x32ee49,_0x264836||[]))['next']());});};class ApiKeyService{constructor(_0x1fc300){this['fetch']=_0x1fc300,this['path']='api-key';}['create'](_0x115451,_0x5388e3,_0x32b5b4){return __awaiter$3(this,void 0,void 0,function*(){const _0x5324f9={'account_name':_0x115451,'api_key_name':_0x5388e3};try{const _0x3933a0=yield this['fetch']['post'](this['path'],_0x32b5b4,_0x5324f9);if(_0x3933a0['status']>0xc7&&_0x3933a0['status']<0x12c){const _0x20b3fd=yield _0x3933a0['json']();return new SuccessfulApiKeyResponse(_0x20b3fd);}const _0x192382=yield _0x3933a0['json']();return new FailedApiKeyResponse(_0x192382);}catch(_0x4fda5d){if(_0x4fda5d instanceof Error)return new FailedApiKeyResponse({'detail':_0x4fda5d['message'],'title':_0x4fda5d['name'],'status':0x1f4,'instance':'','type':''});throw _0x4fda5d;}});}['view'](_0x33d2e8,_0x2b7e7c,_0x112078){return __awaiter$3(this,void 0,void 0,function*(){const _0x35dfca=this['path']+'/'+_0x33d2e8+'/'+_0x2b7e7c;try{const _0x2d46fe=yield this['fetch']['get'](_0x35dfca,_0x112078);if(_0x2d46fe['status']>0xc7&&_0x2d46fe['status']<0x12c){const _0xfa7318=yield _0x2d46fe['json']();return new SuccessfulApiKeyValueResponse(_0xfa7318);}const _0x27cacb=yield _0x2d46fe['json']();return new FailedApiKeyValueResponse(_0x27cacb);}catch(_0xaae9b7){if(_0xaae9b7 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0xaae9b7['message'],'title':_0xaae9b7['name'],'status':0x1f4,'instance':'','type':''});throw _0xaae9b7;}});}['delete'](_0x51d565,_0x2088c9,_0x254df4){return __awaiter$3(this,void 0,void 0,function*(){const _0x52a8d8=this['path']+'/'+_0x51d565+'/'+_0x2088c9;try{const _0x283543=yield this['fetch']['delete'](_0x52a8d8,_0x254df4);if(_0x283543['status']>0xc7&&_0x283543['status']<0x12c)return new SuccessfulResponse({});const _0x3e67e3=yield _0x283543['json']();return new FailedResponse(_0x3e67e3);}catch(_0x372aa4){if(_0x372aa4 instanceof Error)return new FailedResponse({'detail':_0x372aa4['message'],'title':_0x372aa4['name'],'status':0x1f4,'instance':'','type':''});throw _0x372aa4;}});}}
5
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x24bdf3,_0x10e55f,_0x395259,_0x577e26){function _0x556f20(_0x4fe585){return _0x4fe585 instanceof _0x395259?_0x4fe585:new _0x395259(function(_0x45b853){_0x45b853(_0x4fe585);});}return new(_0x395259||(_0x395259=Promise))(function(_0x12a87c,_0x4c90b7){function _0x140710(_0x3d5d4a){try{_0x26d937(_0x577e26['next'](_0x3d5d4a));}catch(_0x5f5d55){_0x4c90b7(_0x5f5d55);}}function _0x230bff(_0x5983af){try{_0x26d937(_0x577e26['throw'](_0x5983af));}catch(_0x359807){_0x4c90b7(_0x359807);}}function _0x26d937(_0x14377b){_0x14377b['done']?_0x12a87c(_0x14377b['value']):_0x556f20(_0x14377b['value'])['then'](_0x140710,_0x230bff);}_0x26d937((_0x577e26=_0x577e26['apply'](_0x24bdf3,_0x10e55f||[]))['next']());});};class ApiKeyService{constructor(_0x3b8af7){this['fetch']=_0x3b8af7,this['path']='api-key';}['create'](_0x28a31a,_0x5672be,_0x314dd7){return __awaiter$4(this,void 0,void 0,function*(){const _0x45019b={'account_name':_0x28a31a,'api_key_name':_0x5672be};try{const _0x2dfbb0=yield this['fetch']['post'](this['path'],_0x314dd7,_0x45019b);if(_0x2dfbb0['status']>0xc7&&_0x2dfbb0['status']<0x12c){const _0x4d0b66=yield _0x2dfbb0['json']();return new SuccessfulApiKeyResponse(_0x4d0b66);}const _0xce7a9d=yield _0x2dfbb0['json']();return new FailedApiKeyResponse(_0xce7a9d);}catch(_0x42d5ad){if(_0x42d5ad instanceof Error)return new FailedApiKeyResponse({'detail':_0x42d5ad['message'],'title':_0x42d5ad['name'],'status':0x1f4,'instance':'','type':''});throw _0x42d5ad;}});}['view'](_0x14d722,_0x2f93d0,_0x1c89d6){return __awaiter$4(this,void 0,void 0,function*(){const _0x5dcbe0=this['path']+'/'+_0x14d722+'/'+_0x2f93d0;try{const _0x287d78=yield this['fetch']['get'](_0x5dcbe0,_0x1c89d6);if(_0x287d78['status']>0xc7&&_0x287d78['status']<0x12c){const _0x3321fb=yield _0x287d78['json']();return new SuccessfulApiKeyValueResponse(_0x3321fb);}const _0x16d94e=yield _0x287d78['json']();return new FailedApiKeyValueResponse(_0x16d94e);}catch(_0x4b4d94){if(_0x4b4d94 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x4b4d94['message'],'title':_0x4b4d94['name'],'status':0x1f4,'instance':'','type':''});throw _0x4b4d94;}});}['delete'](_0x5f1ebf,_0xc045eb,_0x32fdcc){return __awaiter$4(this,void 0,void 0,function*(){const _0x102afe=this['path']+'/'+_0x5f1ebf+'/'+_0xc045eb;try{const _0x583fb1=yield this['fetch']['delete'](_0x102afe,_0x32fdcc);if(_0x583fb1['status']>0xc7&&_0x583fb1['status']<0x12c)return new SuccessfulResponse({});const _0x4eee7b=yield _0x583fb1['json']();return new FailedResponse(_0x4eee7b);}catch(_0x242e9e){if(_0x242e9e instanceof Error)return new FailedResponse({'detail':_0x242e9e['message'],'title':_0x242e9e['name'],'status':0x1f4,'instance':'','type':''});throw _0x242e9e;}});}}
6
6
 
7
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x1af114,_0x59abfb,_0x96264f,_0x2351de){function _0x14d3d0(_0x206c4d){return _0x206c4d instanceof _0x96264f?_0x206c4d:new _0x96264f(function(_0x8abb6d){_0x8abb6d(_0x206c4d);});}return new(_0x96264f||(_0x96264f=Promise))(function(_0x2e0b1d,_0x292b9b){function _0x5089cd(_0xf6f1a5){try{_0x2ff821(_0x2351de['next'](_0xf6f1a5));}catch(_0x37fad8){_0x292b9b(_0x37fad8);}}function _0x16efa9(_0x3f1f46){try{_0x2ff821(_0x2351de['throw'](_0x3f1f46));}catch(_0x45be81){_0x292b9b(_0x45be81);}}function _0x2ff821(_0x2e8d3b){_0x2e8d3b['done']?_0x2e0b1d(_0x2e8d3b['value']):_0x14d3d0(_0x2e8d3b['value'])['then'](_0x5089cd,_0x16efa9);}_0x2ff821((_0x2351de=_0x2351de['apply'](_0x1af114,_0x59abfb||[]))['next']());});};class ListService{constructor(_0x14cf1e){this['fetch']=_0x14cf1e;}['add'](_0xea7dbc,_0x580bba,_0x4c4c58){return __awaiter$2(this,void 0,void 0,function*(){const _0x5a08a9='List',_0x326f8a={'account_name':_0xea7dbc,'list_name':_0x580bba};try{const _0x20841e=yield this['fetch']['post'](_0x5a08a9,_0x4c4c58,_0x326f8a);if(_0x20841e['status']>0xc7&&_0x20841e['status']<0x12c){const _0x180e26=yield _0x20841e['json']();return new SuccessfulAccountResponse(_0x180e26);}const _0x3c7035=yield _0x20841e['json']();return new FailedAccountResponse(_0x3c7035);}catch(_0xb64caf){if(_0xb64caf instanceof Error)return new FailedAccountResponse({'detail':_0xb64caf['message'],'title':_0xb64caf['name'],'status':0x1f4,'instance':'','type':''});throw _0xb64caf;}});}['remove'](_0xc556ab,_0x5a34e9,_0xcbdaf2){return __awaiter$2(this,void 0,void 0,function*(){const _0x3384c1='List/'+_0xc556ab+'/'+_0x5a34e9,_0x18f2d5=yield this['fetch']['delete'](_0x3384c1,_0xcbdaf2);try{if(_0x18f2d5['status']>0xc7&&_0x18f2d5['status']<0x12c){const _0x42cdb2=yield _0x18f2d5['json']();return new SuccessfulAccountResponse(_0x42cdb2);}const _0x4ec011=yield _0x18f2d5['json']();return new FailedAccountResponse(_0x4ec011);}catch(_0x17d773){if(_0x17d773 instanceof Error)return new FailedAccountResponse({'detail':_0x17d773['message'],'title':_0x17d773['name'],'status':0x1f4,'instance':'','type':''});throw _0x17d773;}});}}
7
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x12e74c,_0x252f5e,_0x5969a8,_0x13a2ab){function _0x4ac3f8(_0x483f71){return _0x483f71 instanceof _0x5969a8?_0x483f71:new _0x5969a8(function(_0x396bbb){_0x396bbb(_0x483f71);});}return new(_0x5969a8||(_0x5969a8=Promise))(function(_0x2361b9,_0x57e4cf){function _0x21a318(_0x23f071){try{_0x4a934b(_0x13a2ab['next'](_0x23f071));}catch(_0x2de3fb){_0x57e4cf(_0x2de3fb);}}function _0x52af1e(_0x536310){try{_0x4a934b(_0x13a2ab['throw'](_0x536310));}catch(_0x2821d9){_0x57e4cf(_0x2821d9);}}function _0x4a934b(_0x4fabd8){_0x4fabd8['done']?_0x2361b9(_0x4fabd8['value']):_0x4ac3f8(_0x4fabd8['value'])['then'](_0x21a318,_0x52af1e);}_0x4a934b((_0x13a2ab=_0x13a2ab['apply'](_0x12e74c,_0x252f5e||[]))['next']());});};class ListService{constructor(_0x226a20){this['fetch']=_0x226a20;}['add'](_0x16f1c4,_0x160c7d,_0x354943){return __awaiter$3(this,void 0,void 0,function*(){const _0x22a9af='List',_0x19f36f={'account_name':_0x16f1c4,'list_name':_0x160c7d};try{const _0x36d901=yield this['fetch']['post'](_0x22a9af,_0x354943,_0x19f36f);if(_0x36d901['status']>0xc7&&_0x36d901['status']<0x12c){const _0x102749=yield _0x36d901['json']();return new SuccessfulAccountResponse(_0x102749);}const _0x39b348=yield _0x36d901['json']();return new FailedAccountResponse(_0x39b348);}catch(_0x3d1d56){if(_0x3d1d56 instanceof Error)return new FailedAccountResponse({'detail':_0x3d1d56['message'],'title':_0x3d1d56['name'],'status':0x1f4,'instance':'','type':''});throw _0x3d1d56;}});}['remove'](_0x3491ea,_0x5b5853,_0x2ec697){return __awaiter$3(this,void 0,void 0,function*(){const _0x35cc93='List/'+_0x3491ea+'/'+_0x5b5853,_0x1a814a=yield this['fetch']['delete'](_0x35cc93,_0x2ec697);try{if(_0x1a814a['status']>0xc7&&_0x1a814a['status']<0x12c){const _0x2b468a=yield _0x1a814a['json']();return new SuccessfulAccountResponse(_0x2b468a);}const _0xdf4852=yield _0x1a814a['json']();return new FailedAccountResponse(_0xdf4852);}catch(_0x55b912){if(_0x55b912 instanceof Error)return new FailedAccountResponse({'detail':_0x55b912['message'],'title':_0x55b912['name'],'status':0x1f4,'instance':'','type':''});throw _0x55b912;}});}}
8
8
 
9
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x350c07,_0x56df1b,_0x319fd0,_0x48f92e){function _0x10e18e(_0x5bdf37){return _0x5bdf37 instanceof _0x319fd0?_0x5bdf37:new _0x319fd0(function(_0x398ca6){_0x398ca6(_0x5bdf37);});}return new(_0x319fd0||(_0x319fd0=Promise))(function(_0x4a5674,_0xd442b7){function _0x29ff1d(_0x139195){try{_0x4b9fc7(_0x48f92e['next'](_0x139195));}catch(_0x233931){_0xd442b7(_0x233931);}}function _0x5a15a2(_0x47f3dd){try{_0x4b9fc7(_0x48f92e['throw'](_0x47f3dd));}catch(_0x46e82b){_0xd442b7(_0x46e82b);}}function _0x4b9fc7(_0x1c1dd3){_0x1c1dd3['done']?_0x4a5674(_0x1c1dd3['value']):_0x10e18e(_0x1c1dd3['value'])['then'](_0x29ff1d,_0x5a15a2);}_0x4b9fc7((_0x48f92e=_0x48f92e['apply'](_0x350c07,_0x56df1b||[]))['next']());});};class Fetch{constructor(_0x117c79){this['baseUri']=_0x117c79,this['getUrl']=_0xa417e5=>{return _0xa417e5['startsWith']('/')&&(_0xa417e5=_0xa417e5['replace']('/','')),''+this['baseUri']+_0xa417e5;},!_0x117c79['endsWith']('/')&&(_0x117c79=_0x117c79+'/');}['get'](_0x52a774,_0x1767e2){return __awaiter$1(this,void 0,void 0,function*(){const _0xf2d2f8=this['getUrl'](_0x52a774);return yield fetch(_0xf2d2f8,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1767e2}});});}['post'](_0x5a032e,_0x377789,_0x2ec922){return __awaiter$1(this,void 0,void 0,function*(){const _0x2fd091=this['getUrl'](_0x5a032e);return yield fetch(_0x2fd091,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x377789},'body':_0x2ec922?JSON['stringify'](_0x2ec922):null});});}['put'](_0x3b841e,_0x3d1053,_0x53ba1b){return __awaiter$1(this,void 0,void 0,function*(){const _0x47b96f=this['getUrl'](_0x3b841e);return yield fetch(_0x47b96f,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3d1053},'body':_0x53ba1b?JSON['stringify'](_0x53ba1b):null});});}['delete'](_0x3942e1,_0x50a9c6){return __awaiter$1(this,void 0,void 0,function*(){const _0x217247=this['getUrl'](_0x3942e1);return yield fetch(_0x217247,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x50a9c6}});});}}
9
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x2b1569,_0x40bafc,_0x1ad1b0,_0x25805e){function _0x2c7569(_0x57cfa7){return _0x57cfa7 instanceof _0x1ad1b0?_0x57cfa7:new _0x1ad1b0(function(_0x4a9b20){_0x4a9b20(_0x57cfa7);});}return new(_0x1ad1b0||(_0x1ad1b0=Promise))(function(_0x44ab3b,_0x242a94){function _0x38054b(_0x3e6286){try{_0x4dd208(_0x25805e['next'](_0x3e6286));}catch(_0x5dd922){_0x242a94(_0x5dd922);}}function _0x7717de(_0x2dd4c3){try{_0x4dd208(_0x25805e['throw'](_0x2dd4c3));}catch(_0xc3a8ef){_0x242a94(_0xc3a8ef);}}function _0x4dd208(_0x113f79){_0x113f79['done']?_0x44ab3b(_0x113f79['value']):_0x2c7569(_0x113f79['value'])['then'](_0x38054b,_0x7717de);}_0x4dd208((_0x25805e=_0x25805e['apply'](_0x2b1569,_0x40bafc||[]))['next']());});};class Fetch{constructor(_0x5bab0c){this['baseUri']=_0x5bab0c,this['getUrl']=_0x1cfbc9=>{return _0x1cfbc9['startsWith']('/')&&(_0x1cfbc9=_0x1cfbc9['replace']('/','')),''+this['baseUri']+_0x1cfbc9;},!_0x5bab0c['endsWith']('/')&&(_0x5bab0c=_0x5bab0c+'/');}['get'](_0xb207f7,_0x2b15fd){return __awaiter$2(this,void 0,void 0,function*(){const _0x3c082d=this['getUrl'](_0xb207f7);return yield fetch(_0x3c082d,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2b15fd}});});}['post'](_0x1929a3,_0x536625,_0x2424df){return __awaiter$2(this,void 0,void 0,function*(){const _0xf11d59=this['getUrl'](_0x1929a3);return yield fetch(_0xf11d59,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x536625},'body':_0x2424df?JSON['stringify'](_0x2424df):null});});}['put'](_0x254d37,_0x2b87fb,_0x340508){return __awaiter$2(this,void 0,void 0,function*(){const _0x2b8544=this['getUrl'](_0x254d37);return yield fetch(_0x2b8544,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2b87fb},'body':_0x340508?JSON['stringify'](_0x340508):null});});}['delete'](_0x4f5d5e,_0x1cae00){return __awaiter$2(this,void 0,void 0,function*(){const _0x32dccd=this['getUrl'](_0x4f5d5e);return yield fetch(_0x32dccd,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1cae00}});});}}
10
10
 
11
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x1d3050,_0x33455b,_0x2f1357,_0x4b48b0){function _0x250908(_0x1b4a1a){return _0x1b4a1a instanceof _0x2f1357?_0x1b4a1a:new _0x2f1357(function(_0x489315){_0x489315(_0x1b4a1a);});}return new(_0x2f1357||(_0x2f1357=Promise))(function(_0x3f3554,_0x37a6ac){function _0x3875a4(_0x4ed3d5){try{_0x4f2e00(_0x4b48b0['next'](_0x4ed3d5));}catch(_0x4df48a){_0x37a6ac(_0x4df48a);}}function _0x297db5(_0x26e0a9){try{_0x4f2e00(_0x4b48b0['throw'](_0x26e0a9));}catch(_0x54b6ef){_0x37a6ac(_0x54b6ef);}}function _0x4f2e00(_0x36dc71){_0x36dc71['done']?_0x3f3554(_0x36dc71['value']):_0x250908(_0x36dc71['value'])['then'](_0x3875a4,_0x297db5);}_0x4f2e00((_0x4b48b0=_0x4b48b0['apply'](_0x1d3050,_0x33455b||[]))['next']());});};class AdminClient{constructor(_0x214b10='https://admin.searchability.dev/'){var _0x3b1ff5=new Fetch(_0x214b10);this['Accounts']=new AccountService(_0x3b1ff5),this['Lists']=new ListService(_0x3b1ff5),this['ApiKeys']=new ApiKeyService(_0x3b1ff5);}}class AuthClient{constructor(_0x2e4f8f='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x2e4f8f);}['login'](_0xe5d426){return __awaiter(this,void 0,void 0,function*(){var _0xc38f1c='login/'+_0xe5d426;try{const _0x23320f=yield yield fetch(_0xc38f1c);if(_0x23320f['status']>0xc7&&_0x23320f['status']<0x12c){const _0x1be40a=yield _0x23320f['json']();return new SuccessfulAuthResponse(_0x1be40a);}const _0x4b6261=yield _0x23320f['json']();return new FailedAuthResponse(_0x4b6261);}catch(_0xbad3ae){if(_0xbad3ae instanceof Error)return new FailedAuthResponse({'detail':_0xbad3ae['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0xbad3ae;}});}['refresh'](_0x363ccf){return __awaiter(this,void 0,void 0,function*(){var _0x25970d='refresh';try{const _0x354abb=yield this['fetch']['post'](_0x25970d,_0x363ccf,null);if(_0x354abb['status']>0xc7&&_0x354abb['status']<0x12c){const _0x2b35fd=yield _0x354abb['json']();return new SuccessfulAuthResponse(_0x2b35fd);}const _0x52df8e=yield _0x354abb['json']();return new FailedAuthResponse(_0x52df8e);}catch(_0x24b181){if(_0x24b181 instanceof Error)return new FailedAuthResponse({'detail':_0x24b181['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x24b181;}});}['getTokenStatus'](_0x2b198d){if(Date['now']()<_0x2b198d['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x2b198d['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
11
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x3f5402,_0x44550b,_0x13e77a,_0x2743a4){function _0x2c4a65(_0x4baf0c){return _0x4baf0c instanceof _0x13e77a?_0x4baf0c:new _0x13e77a(function(_0x10574c){_0x10574c(_0x4baf0c);});}return new(_0x13e77a||(_0x13e77a=Promise))(function(_0x46630b,_0x4b5f64){function _0x36a4ab(_0x4bf764){try{_0x181a59(_0x2743a4['next'](_0x4bf764));}catch(_0x30dee7){_0x4b5f64(_0x30dee7);}}function _0x345846(_0x1f1387){try{_0x181a59(_0x2743a4['throw'](_0x1f1387));}catch(_0x375c4a){_0x4b5f64(_0x375c4a);}}function _0x181a59(_0x30d7ce){_0x30d7ce['done']?_0x46630b(_0x30d7ce['value']):_0x2c4a65(_0x30d7ce['value'])['then'](_0x36a4ab,_0x345846);}_0x181a59((_0x2743a4=_0x2743a4['apply'](_0x3f5402,_0x44550b||[]))['next']());});};class SearchServersService{constructor(_0x29190b){this['fetch']=_0x29190b,this['path']='search-services';}['create'](_0x6bcb78,_0x2c03a6,_0x3bbd98,_0x3ba38d,_0x23909b,_0x29dc16){return __awaiter$1(this,void 0,void 0,function*(){const _0x3bbc8={'account_name':_0x6bcb78,'search_service_name':_0x2c03a6,'endpoint':_0x3bbd98,'key':_0x3ba38d,'county':_0x23909b};try{const _0x4c6d07=yield this['fetch']['post'](this['path'],_0x29dc16,_0x3bbc8);if(_0x4c6d07['status']>0xc7&&_0x4c6d07['status']<0x12c){const _0x8353db=yield _0x4c6d07['json']();return new SuccessfulSearchServiceResponse(_0x8353db);}const _0xb6235=yield _0x4c6d07['json']();return new FailedSearchServiceResponse(_0xb6235);}catch(_0x1d5671){if(_0x1d5671 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x1d5671['message'],'title':_0x1d5671['name'],'status':0x1f4,'instance':'','type':''});throw _0x1d5671;}});}}
12
+
13
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x1bf1f2,_0x496929,_0x1de0b2,_0x1b83c0){function _0x1c33fe(_0x22dbdc){return _0x22dbdc instanceof _0x1de0b2?_0x22dbdc:new _0x1de0b2(function(_0x358ffb){_0x358ffb(_0x22dbdc);});}return new(_0x1de0b2||(_0x1de0b2=Promise))(function(_0x2315de,_0x12c95d){function _0x59e0ca(_0x1e667b){try{_0xe56e0f(_0x1b83c0['next'](_0x1e667b));}catch(_0x354ff1){_0x12c95d(_0x354ff1);}}function _0x361da6(_0x315cd6){try{_0xe56e0f(_0x1b83c0['throw'](_0x315cd6));}catch(_0x2f8818){_0x12c95d(_0x2f8818);}}function _0xe56e0f(_0x3d4206){_0x3d4206['done']?_0x2315de(_0x3d4206['value']):_0x1c33fe(_0x3d4206['value'])['then'](_0x59e0ca,_0x361da6);}_0xe56e0f((_0x1b83c0=_0x1b83c0['apply'](_0x1bf1f2,_0x496929||[]))['next']());});};class AdminClient{constructor(_0x152b38='https://admin.searchability.dev/'){var _0x14574c=new Fetch(_0x152b38);this['Accounts']=new AccountService(_0x14574c),this['Lists']=new ListService(_0x14574c),this['ApiKeys']=new ApiKeyService(_0x14574c),this['SearchServices']=new SearchServersService(_0x14574c);}}class AuthClient{constructor(_0x5bdd5e='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x5bdd5e);}['login'](_0x19c76a){return __awaiter(this,void 0,void 0,function*(){var _0x565b3d='login/'+_0x19c76a;try{const _0x49dbbb=yield yield fetch(_0x565b3d);if(_0x49dbbb['status']>0xc7&&_0x49dbbb['status']<0x12c){const _0x575ea4=yield _0x49dbbb['json']();return new SuccessfulAuthResponse(_0x575ea4);}const _0x4724df=yield _0x49dbbb['json']();return new FailedAuthResponse(_0x4724df);}catch(_0x3a1a7e){if(_0x3a1a7e instanceof Error)return new FailedAuthResponse({'detail':_0x3a1a7e['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x3a1a7e;}});}['refresh'](_0x3d9807){return __awaiter(this,void 0,void 0,function*(){var _0x122d5c='refresh';try{const _0x2e4072=yield this['fetch']['post'](_0x122d5c,_0x3d9807,null);if(_0x2e4072['status']>0xc7&&_0x2e4072['status']<0x12c){const _0x449ec6=yield _0x2e4072['json']();return new SuccessfulAuthResponse(_0x449ec6);}const _0x6c275=yield _0x2e4072['json']();return new FailedAuthResponse(_0x6c275);}catch(_0x57105c){if(_0x57105c instanceof Error)return new FailedAuthResponse({'detail':_0x57105c['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x57105c;}});}['getTokenStatus'](_0x5e4b75){if(Date['now']()<_0x5e4b75['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x5e4b75['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
12
14
 
13
15
  export { AdminClient, AuthClient, TokenStatus, Tokens };
package/dist/types.d.ts CHANGED
@@ -18,7 +18,7 @@ declare class ApiKeyService {
18
18
  readonly fetch: Fetch;
19
19
  readonly path = "api-key";
20
20
  constructor(fetch: Fetch);
21
- create(account_name: string, api_key_Name: string, access_token: string): Promise<Response<ApiKey, Problem>>;
21
+ create(account_name: string, api_key_name: string, access_token: string): Promise<Response<ApiKey, Problem>>;
22
22
  view(account_name: string, api_key_name: string, access_token: string): Promise<Response<ApiKeyValue, Problem>>;
23
23
  delete(account_name: string, api_key_name: string, access_token: string): Promise<Response<any, Problem>>;
24
24
  }
@@ -30,11 +30,19 @@ declare class ListService {
30
30
  remove(accountName: string, listName: string, access_token: string): Promise<Response<Account, Problem>>;
31
31
  }
32
32
 
33
+ declare class SearchServersService {
34
+ readonly fetch: Fetch;
35
+ readonly path = "search-services";
36
+ constructor(fetch: Fetch);
37
+ create(account_name: string, search_service_name: string, endpoint: string, key: string, county: string, access_token: string): Promise<Response<SearchService, Problem>>;
38
+ }
39
+
33
40
  declare class AdminClient {
34
41
  constructor(baseUri?: string);
35
42
  readonly Accounts: AccountService;
36
43
  readonly Lists: ListService;
37
44
  readonly ApiKeys: ApiKeyService;
45
+ readonly SearchServices: SearchServersService;
38
46
  }
39
47
  declare class AuthClient {
40
48
  private readonly fetch;
@@ -76,6 +84,11 @@ type ApiKey = {
76
84
  name: string;
77
85
  created: number;
78
86
  };
87
+ type SearchService = {
88
+ search_service_name: string;
89
+ created: number;
90
+ country: string;
91
+ };
79
92
  type ApiKeyValue = {
80
93
  value: string;
81
94
  version: number;
@@ -134,6 +147,18 @@ declare class FailedApiKeyResponse extends Response<ApiKey, Problem> {
134
147
  toSuccess(): ApiKey;
135
148
  toProblem(): Problem;
136
149
  }
150
+ declare class SuccessfulSearchServiceResponse extends Response<SearchService, Problem> {
151
+ readonly searchService: SearchService;
152
+ constructor(searchService: SearchService);
153
+ toSuccess(): SearchService;
154
+ toProblem(): Problem;
155
+ }
156
+ declare class FailedSearchServiceResponse extends Response<SearchService, Problem> {
157
+ readonly problem: Problem;
158
+ constructor(problem: Problem);
159
+ toSuccess(): SearchService;
160
+ toProblem(): Problem;
161
+ }
137
162
  declare class SuccessfulApiKeyValueResponse extends Response<ApiKeyValue, Problem> {
138
163
  readonly apiKeyValue: ApiKeyValue;
139
164
  constructor(apiKeyValue: ApiKeyValue);
@@ -159,4 +184,4 @@ declare class FailedApiKeyValueResponse extends Response<ApiKeyValue, Problem> {
159
184
  toProblem(): Problem;
160
185
  }
161
186
 
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 };
187
+ export { type Account, AdminClient, type ApiKey, type ApiKeyValue, AuthClient, type Error, FailedAccountResponse, FailedApiKeyResponse, FailedApiKeyValueResponse, FailedAuthResponse, FailedResponse, FailedSearchServiceResponse, type List, type ListIdentity, type Problem, Response, type SearchService, SuccessfulAccountResponse, SuccessfulApiKeyResponse, SuccessfulApiKeyValueResponse, SuccessfulAuthResponse, SuccessfulResponse, SuccessfulSearchServiceResponse, TokenStatus, Tokens };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@searchability/admin-client",
3
- "version": "0.0.34",
3
+ "version": "0.0.35",
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(_0x1fa570){_0x1fa570[_0x1fa570['Ok']=0x0]='Ok',_0x1fa570[_0x1fa570['Refresh']=0x1]='Refresh',_0x1fa570[_0x1fa570['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(_0x1b72e8){this['isSuccess']=_0x1b72e8;}}class SuccessfulAccountResponse extends Response{constructor(_0x2644dd){super(!![]),this['account']=_0x2644dd;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x1c5a32){super(![]),this['problem']=_0x1c5a32;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x1e845d){super(!![]),this['tokens']=_0x1e845d;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x5b283e){super(![]),this['problem']=_0x5b283e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x1a6546){super(!![]),this['apiKey']=_0x1a6546;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x26c630){super(![]),this['problem']=_0x26c630;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x31c3dd){super(!![]),this['apiKeyValue']=_0x31c3dd;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x32e0fd){super(!![]),this['obj']=_0x32e0fd;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x155586){super(![]),this['problem']=_0x155586;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x35a6a1){super(![]),this['problem']=_0x35a6a1;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
2
-
3
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x4dde19,_0x22c40b,_0x25efd7,_0x3737c8){function _0x28d033(_0x184d21){return _0x184d21 instanceof _0x25efd7?_0x184d21:new _0x25efd7(function(_0x18e6b9){_0x18e6b9(_0x184d21);});}return new(_0x25efd7||(_0x25efd7=Promise))(function(_0x523474,_0x346225){function _0x7ada70(_0x32a6f6){try{_0x232bee(_0x3737c8['next'](_0x32a6f6));}catch(_0x22a609){_0x346225(_0x22a609);}}function _0x15be6d(_0x44aa74){try{_0x232bee(_0x3737c8['throw'](_0x44aa74));}catch(_0x30555b){_0x346225(_0x30555b);}}function _0x232bee(_0x1161ab){_0x1161ab['done']?_0x523474(_0x1161ab['value']):_0x28d033(_0x1161ab['value'])['then'](_0x7ada70,_0x15be6d);}_0x232bee((_0x3737c8=_0x3737c8['apply'](_0x4dde19,_0x22c40b||[]))['next']());});};class AccountService{constructor(_0x2d4ec6){this['fetch']=_0x2d4ec6;}['get'](_0x549209,_0x3aa058){return __awaiter$4(this,void 0,void 0,function*(){const _0x249d5f='Account/'+_0x549209+'/',_0x325ae1=yield this['fetch']['get'](_0x249d5f,_0x3aa058);try{if(_0x325ae1['status']>0xc7&&_0x325ae1['status']<0x12c){const _0x5c6dbf=yield _0x325ae1['json']();return new SuccessfulAccountResponse(_0x5c6dbf);}const _0x3c0a52=yield _0x325ae1['json']();return new FailedAccountResponse(_0x3c0a52);}catch(_0x4fa46b){if(_0x4fa46b instanceof Error)return new FailedAccountResponse({'detail':_0x4fa46b['message'],'title':_0x4fa46b['name'],'status':0x1f4,'instance':'','type':''});throw _0x4fa46b;}});}}
4
-
5
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x33f13c,_0x566018,_0x545c0d,_0x29770e){function _0x4ae24b(_0x2495a7){return _0x2495a7 instanceof _0x545c0d?_0x2495a7:new _0x545c0d(function(_0x3515cb){_0x3515cb(_0x2495a7);});}return new(_0x545c0d||(_0x545c0d=Promise))(function(_0x415829,_0x58c714){function _0x12c4c6(_0x115574){try{_0x1f21a1(_0x29770e['next'](_0x115574));}catch(_0x495135){_0x58c714(_0x495135);}}function _0x194652(_0x58c26e){try{_0x1f21a1(_0x29770e['throw'](_0x58c26e));}catch(_0x26e83b){_0x58c714(_0x26e83b);}}function _0x1f21a1(_0x595e55){_0x595e55['done']?_0x415829(_0x595e55['value']):_0x4ae24b(_0x595e55['value'])['then'](_0x12c4c6,_0x194652);}_0x1f21a1((_0x29770e=_0x29770e['apply'](_0x33f13c,_0x566018||[]))['next']());});};class ApiKeyService{constructor(_0x2024f0){this['fetch']=_0x2024f0,this['path']='api-key';}['create'](_0x2898c2,_0x521c09,_0x20129a){return __awaiter$3(this,void 0,void 0,function*(){const _0xa46dd={'account_name':_0x2898c2,'api_key_name':_0x521c09};try{const _0x368b30=yield this['fetch']['post'](this['path'],_0x20129a,_0xa46dd);if(_0x368b30['status']>0xc7&&_0x368b30['status']<0x12c){const _0x4e01fc=yield _0x368b30['json']();return new SuccessfulApiKeyResponse(_0x4e01fc);}const _0x136477=yield _0x368b30['json']();return new FailedApiKeyResponse(_0x136477);}catch(_0x5f370e){if(_0x5f370e instanceof Error)return new FailedApiKeyResponse({'detail':_0x5f370e['message'],'title':_0x5f370e['name'],'status':0x1f4,'instance':'','type':''});throw _0x5f370e;}});}['view'](_0x1184e2,_0x2ffd6a,_0x257fe7){return __awaiter$3(this,void 0,void 0,function*(){const _0x9f413c=this['path']+'/'+_0x1184e2+'/'+_0x2ffd6a;try{const _0x6a5fcd=yield this['fetch']['get'](_0x9f413c,_0x257fe7);if(_0x6a5fcd['status']>0xc7&&_0x6a5fcd['status']<0x12c){const _0x37afe5=yield _0x6a5fcd['json']();return new SuccessfulApiKeyValueResponse(_0x37afe5);}const _0x48cae3=yield _0x6a5fcd['json']();return new FailedApiKeyValueResponse(_0x48cae3);}catch(_0x3dd893){if(_0x3dd893 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x3dd893['message'],'title':_0x3dd893['name'],'status':0x1f4,'instance':'','type':''});throw _0x3dd893;}});}['delete'](_0x73fe1b,_0x338e02,_0x3697ff){return __awaiter$3(this,void 0,void 0,function*(){const _0x24423a=this['path']+'/'+_0x73fe1b+'/'+_0x338e02;try{const _0xff981f=yield this['fetch']['delete'](_0x24423a,_0x3697ff);if(_0xff981f['status']>0xc7&&_0xff981f['status']<0x12c)return new SuccessfulResponse({});const _0x301133=yield _0xff981f['json']();return new FailedResponse(_0x301133);}catch(_0xe6cad3){if(_0xe6cad3 instanceof Error)return new FailedResponse({'detail':_0xe6cad3['message'],'title':_0xe6cad3['name'],'status':0x1f4,'instance':'','type':''});throw _0xe6cad3;}});}}
6
-
7
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x2221a6,_0x48be92,_0x9cd39d,_0x549cec){function _0x5090d1(_0x587852){return _0x587852 instanceof _0x9cd39d?_0x587852:new _0x9cd39d(function(_0x4b155f){_0x4b155f(_0x587852);});}return new(_0x9cd39d||(_0x9cd39d=Promise))(function(_0x20f185,_0x5c6788){function _0x12b7eb(_0x18d6ff){try{_0x18ac5d(_0x549cec['next'](_0x18d6ff));}catch(_0x8acff1){_0x5c6788(_0x8acff1);}}function _0x4fac32(_0x5af909){try{_0x18ac5d(_0x549cec['throw'](_0x5af909));}catch(_0x1802bf){_0x5c6788(_0x1802bf);}}function _0x18ac5d(_0x4548fa){_0x4548fa['done']?_0x20f185(_0x4548fa['value']):_0x5090d1(_0x4548fa['value'])['then'](_0x12b7eb,_0x4fac32);}_0x18ac5d((_0x549cec=_0x549cec['apply'](_0x2221a6,_0x48be92||[]))['next']());});};class ListService{constructor(_0x4d3856){this['fetch']=_0x4d3856;}['add'](_0x33f017,_0x35126d,_0x3f394c){return __awaiter$2(this,void 0,void 0,function*(){const _0x1a8ca8='List',_0x52e2c9={'account_name':_0x33f017,'list_name':_0x35126d};try{const _0x3e0867=yield this['fetch']['post'](_0x1a8ca8,_0x3f394c,_0x52e2c9);if(_0x3e0867['status']>0xc7&&_0x3e0867['status']<0x12c){const _0x595eb6=yield _0x3e0867['json']();return new SuccessfulAccountResponse(_0x595eb6);}const _0x5963d6=yield _0x3e0867['json']();return new FailedAccountResponse(_0x5963d6);}catch(_0x282546){if(_0x282546 instanceof Error)return new FailedAccountResponse({'detail':_0x282546['message'],'title':_0x282546['name'],'status':0x1f4,'instance':'','type':''});throw _0x282546;}});}['remove'](_0x28e7bb,_0x253c12,_0x207608){return __awaiter$2(this,void 0,void 0,function*(){const _0x212123='List/'+_0x28e7bb+'/'+_0x253c12,_0x55a041=yield this['fetch']['delete'](_0x212123,_0x207608);try{if(_0x55a041['status']>0xc7&&_0x55a041['status']<0x12c){const _0x159828=yield _0x55a041['json']();return new SuccessfulAccountResponse(_0x159828);}const _0x2c3d8d=yield _0x55a041['json']();return new FailedAccountResponse(_0x2c3d8d);}catch(_0x159044){if(_0x159044 instanceof Error)return new FailedAccountResponse({'detail':_0x159044['message'],'title':_0x159044['name'],'status':0x1f4,'instance':'','type':''});throw _0x159044;}});}}
8
-
9
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x1ade3,_0x2245b8,_0x4fa39e,_0xe19001){function _0x26ab4f(_0x37bd36){return _0x37bd36 instanceof _0x4fa39e?_0x37bd36:new _0x4fa39e(function(_0x4f63d7){_0x4f63d7(_0x37bd36);});}return new(_0x4fa39e||(_0x4fa39e=Promise))(function(_0x37ad6f,_0x2fd3c6){function _0x4c11ea(_0x4904b7){try{_0x5c0731(_0xe19001['next'](_0x4904b7));}catch(_0x43b36b){_0x2fd3c6(_0x43b36b);}}function _0x4748fa(_0x3f1268){try{_0x5c0731(_0xe19001['throw'](_0x3f1268));}catch(_0x139155){_0x2fd3c6(_0x139155);}}function _0x5c0731(_0xca0298){_0xca0298['done']?_0x37ad6f(_0xca0298['value']):_0x26ab4f(_0xca0298['value'])['then'](_0x4c11ea,_0x4748fa);}_0x5c0731((_0xe19001=_0xe19001['apply'](_0x1ade3,_0x2245b8||[]))['next']());});};class Fetch{constructor(_0x41025b){this['baseUri']=_0x41025b,this['getUrl']=_0x1916ec=>{return _0x1916ec['startsWith']('/')&&(_0x1916ec=_0x1916ec['replace']('/','')),''+this['baseUri']+_0x1916ec;},!_0x41025b['endsWith']('/')&&(_0x41025b=_0x41025b+'/');}['get'](_0x55ddfb,_0x137860){return __awaiter$1(this,void 0,void 0,function*(){const _0x15b8c4=this['getUrl'](_0x55ddfb);return yield fetch(_0x15b8c4,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x137860}});});}['post'](_0xb20ca1,_0x38e353,_0x4262e4){return __awaiter$1(this,void 0,void 0,function*(){const _0x2be050=this['getUrl'](_0xb20ca1);return yield fetch(_0x2be050,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x38e353},'body':_0x4262e4?JSON['stringify'](_0x4262e4):null});});}['put'](_0x4e2857,_0x4cdc37,_0x565cdc){return __awaiter$1(this,void 0,void 0,function*(){const _0x400a1c=this['getUrl'](_0x4e2857);return yield fetch(_0x400a1c,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4cdc37},'body':_0x565cdc?JSON['stringify'](_0x565cdc):null});});}['delete'](_0x1d1a43,_0x33be86){return __awaiter$1(this,void 0,void 0,function*(){const _0x222f26=this['getUrl'](_0x1d1a43);return yield fetch(_0x222f26,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x33be86}});});}}
10
-
11
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x557af9,_0x40bb74,_0x96075b,_0x5ef64d){function _0x5dc0ca(_0x42535a){return _0x42535a instanceof _0x96075b?_0x42535a:new _0x96075b(function(_0xf4e430){_0xf4e430(_0x42535a);});}return new(_0x96075b||(_0x96075b=Promise))(function(_0x3a2f61,_0x438be8){function _0x1ab90c(_0x3ee85d){try{_0x12385b(_0x5ef64d['next'](_0x3ee85d));}catch(_0x58d550){_0x438be8(_0x58d550);}}function _0x19e842(_0x277497){try{_0x12385b(_0x5ef64d['throw'](_0x277497));}catch(_0x534c1c){_0x438be8(_0x534c1c);}}function _0x12385b(_0x29cbe0){_0x29cbe0['done']?_0x3a2f61(_0x29cbe0['value']):_0x5dc0ca(_0x29cbe0['value'])['then'](_0x1ab90c,_0x19e842);}_0x12385b((_0x5ef64d=_0x5ef64d['apply'](_0x557af9,_0x40bb74||[]))['next']());});};class AdminClient{constructor(_0x78c035='https://admin.searchability.dev/'){var _0x3910a7=new Fetch(_0x78c035);this['Accounts']=new AccountService(_0x3910a7),this['Lists']=new ListService(_0x3910a7),this['ApiKeys']=new ApiKeyService(_0x3910a7);}}class AuthClient{constructor(_0x29efbd='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x29efbd);}['login'](_0x4d29df){return __awaiter(this,void 0,void 0,function*(){var _0x270bc1='login/'+_0x4d29df;try{const _0x170899=yield yield fetch(_0x270bc1);if(_0x170899['status']>0xc7&&_0x170899['status']<0x12c){const _0x11a4a6=yield _0x170899['json']();return new SuccessfulAuthResponse(_0x11a4a6);}const _0x253ab1=yield _0x170899['json']();return new FailedAuthResponse(_0x253ab1);}catch(_0x4c2a82){if(_0x4c2a82 instanceof Error)return new FailedAuthResponse({'detail':_0x4c2a82['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x4c2a82;}});}['refresh'](_0x3a8311){return __awaiter(this,void 0,void 0,function*(){var _0x12b2f2='refresh';try{const _0x203f2b=yield this['fetch']['post'](_0x12b2f2,_0x3a8311,null);if(_0x203f2b['status']>0xc7&&_0x203f2b['status']<0x12c){const _0x154b54=yield _0x203f2b['json']();return new SuccessfulAuthResponse(_0x154b54);}const _0x512cee=yield _0x203f2b['json']();return new FailedAuthResponse(_0x512cee);}catch(_0x17fc25){if(_0x17fc25 instanceof Error)return new FailedAuthResponse({'detail':_0x17fc25['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x17fc25;}});}['getTokenStatus'](_0x2c193d){if(Date['now']()<_0x2c193d['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x2c193d['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
12
-
13
- export { AdminClient, AuthClient, TokenStatus, Tokens };