@searchability/admin-client 0.0.40 → 0.0.41

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(_0x29474c){_0x29474c[_0x29474c['Ok']=0x0]='Ok',_0x29474c[_0x29474c['Refresh']=0x1]='Refresh',_0x29474c[_0x29474c['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(_0x163727){this['isSuccess']=_0x163727;}}class SuccessfulAccountResponse extends Response{constructor(_0x3f71a6){super(!![]),this['account']=_0x3f71a6;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x202622){super(![]),this['problem']=_0x202622;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x3b3d2c){super(!![]),this['tokens']=_0x3b3d2c;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x984b9e){super(![]),this['problem']=_0x984b9e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x19ff41){super(!![]),this['apiKey']=_0x19ff41;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x343c3a){super(![]),this['problem']=_0x343c3a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x1d4c2e){super(!![]),this['searchService']=_0x1d4c2e;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x933194){super(![]),this['problem']=_0x933194;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x81d952){super(!![]),this['searchService']=_0x81d952;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServiceResponse extends Response{constructor(_0x5fa441){super(![]),this['problem']=_0x5fa441;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x58ebc0){super(!![]),this['apiKeyValue']=_0x58ebc0;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x47e5d8){super(!![]),this['obj']=_0x47e5d8;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x1418f8){super(![]),this['problem']=_0x1418f8;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x553317){super(![]),this['problem']=_0x553317;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
2
+
3
+ var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x7c26e3,_0x43f59c,_0x251f24,_0x3234da){function _0x3fc1a6(_0x47e672){return _0x47e672 instanceof _0x251f24?_0x47e672:new _0x251f24(function(_0x363d52){_0x363d52(_0x47e672);});}return new(_0x251f24||(_0x251f24=Promise))(function(_0x44cc75,_0x4a4074){function _0x54583c(_0x137c84){try{_0x4c3bf6(_0x3234da['next'](_0x137c84));}catch(_0x3c5959){_0x4a4074(_0x3c5959);}}function _0x211b6d(_0x3c7f60){try{_0x4c3bf6(_0x3234da['throw'](_0x3c7f60));}catch(_0x3180ea){_0x4a4074(_0x3180ea);}}function _0x4c3bf6(_0x3da63e){_0x3da63e['done']?_0x44cc75(_0x3da63e['value']):_0x3fc1a6(_0x3da63e['value'])['then'](_0x54583c,_0x211b6d);}_0x4c3bf6((_0x3234da=_0x3234da['apply'](_0x7c26e3,_0x43f59c||[]))['next']());});};class AccountService{constructor(_0x2362b8){this['fetch']=_0x2362b8;}['get'](_0x2b3bb6,_0x3400bd){return __awaiter$5(this,void 0,void 0,function*(){const _0x28c9d='Account/'+_0x2b3bb6+'/',_0x2a6b0f=yield this['fetch']['get'](_0x28c9d,_0x3400bd);try{if(_0x2a6b0f['status']>0xc7&&_0x2a6b0f['status']<0x12c){const _0x1a3adb=yield _0x2a6b0f['json']();return new SuccessfulAccountResponse(_0x1a3adb);}const _0x2ccba0=yield _0x2a6b0f['json']();return new FailedAccountResponse(_0x2ccba0);}catch(_0x45feda){if(_0x45feda instanceof Error)return new FailedAccountResponse({'detail':_0x45feda['message'],'title':_0x45feda['name'],'status':0x1f4,'instance':'','type':''});throw _0x45feda;}});}}
4
+
5
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x29a9fa,_0x1bc802,_0x4179d7,_0x3114d8){function _0x348c90(_0x50f813){return _0x50f813 instanceof _0x4179d7?_0x50f813:new _0x4179d7(function(_0x57485b){_0x57485b(_0x50f813);});}return new(_0x4179d7||(_0x4179d7=Promise))(function(_0x205e35,_0x1aef0e){function _0x390692(_0x205e29){try{_0x2294f6(_0x3114d8['next'](_0x205e29));}catch(_0x470e48){_0x1aef0e(_0x470e48);}}function _0x486719(_0x483448){try{_0x2294f6(_0x3114d8['throw'](_0x483448));}catch(_0x376a4b){_0x1aef0e(_0x376a4b);}}function _0x2294f6(_0xc3ecf8){_0xc3ecf8['done']?_0x205e35(_0xc3ecf8['value']):_0x348c90(_0xc3ecf8['value'])['then'](_0x390692,_0x486719);}_0x2294f6((_0x3114d8=_0x3114d8['apply'](_0x29a9fa,_0x1bc802||[]))['next']());});};class ApiKeyService{constructor(_0x4cdaec){this['fetch']=_0x4cdaec,this['path']='api-key';}['create'](_0x257d03,_0x54b051,_0x1b346f){return __awaiter$4(this,void 0,void 0,function*(){const _0x21b5e6={'account_name':_0x257d03,'api_key_name':_0x54b051};try{const _0x85fcd0=yield this['fetch']['post'](this['path'],_0x1b346f,_0x21b5e6);if(_0x85fcd0['status']>0xc7&&_0x85fcd0['status']<0x12c){const _0x4d56aa=yield _0x85fcd0['json']();return new SuccessfulApiKeyResponse(_0x4d56aa);}const _0x123282=yield _0x85fcd0['json']();return new FailedApiKeyResponse(_0x123282);}catch(_0x3c2424){if(_0x3c2424 instanceof Error)return new FailedApiKeyResponse({'detail':_0x3c2424['message'],'title':_0x3c2424['name'],'status':0x1f4,'instance':'','type':''});throw _0x3c2424;}});}['view'](_0x5e0205,_0x26e635,_0x458a5c){return __awaiter$4(this,void 0,void 0,function*(){const _0x47bff8=this['path']+'/'+_0x5e0205+'/'+_0x26e635;try{const _0x6b2087=yield this['fetch']['get'](_0x47bff8,_0x458a5c);if(_0x6b2087['status']>0xc7&&_0x6b2087['status']<0x12c){const _0x308e2b=yield _0x6b2087['json']();return new SuccessfulApiKeyValueResponse(_0x308e2b);}const _0x1283f8=yield _0x6b2087['json']();return new FailedApiKeyValueResponse(_0x1283f8);}catch(_0x314fff){if(_0x314fff instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x314fff['message'],'title':_0x314fff['name'],'status':0x1f4,'instance':'','type':''});throw _0x314fff;}});}['delete'](_0x39cccb,_0x269f15,_0x59c906){return __awaiter$4(this,void 0,void 0,function*(){const _0x432cea=this['path']+'/'+_0x39cccb+'/'+_0x269f15;try{const _0x2f7322=yield this['fetch']['delete'](_0x432cea,_0x59c906);if(_0x2f7322['status']>0xc7&&_0x2f7322['status']<0x12c)return new SuccessfulResponse({});const _0x38941f=yield _0x2f7322['json']();return new FailedResponse(_0x38941f);}catch(_0x17c062){if(_0x17c062 instanceof Error)return new FailedResponse({'detail':_0x17c062['message'],'title':_0x17c062['name'],'status':0x1f4,'instance':'','type':''});throw _0x17c062;}});}}
6
+
7
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x9782f2,_0x4a65fe,_0x3b4cfb,_0x24621c){function _0x240d3d(_0x1a0ea2){return _0x1a0ea2 instanceof _0x3b4cfb?_0x1a0ea2:new _0x3b4cfb(function(_0x48ab96){_0x48ab96(_0x1a0ea2);});}return new(_0x3b4cfb||(_0x3b4cfb=Promise))(function(_0x392ec7,_0x40d9ae){function _0x5a4e7f(_0x3803c5){try{_0x2a772d(_0x24621c['next'](_0x3803c5));}catch(_0x443559){_0x40d9ae(_0x443559);}}function _0x40d081(_0x2260b5){try{_0x2a772d(_0x24621c['throw'](_0x2260b5));}catch(_0x33f192){_0x40d9ae(_0x33f192);}}function _0x2a772d(_0x40c5a2){_0x40c5a2['done']?_0x392ec7(_0x40c5a2['value']):_0x240d3d(_0x40c5a2['value'])['then'](_0x5a4e7f,_0x40d081);}_0x2a772d((_0x24621c=_0x24621c['apply'](_0x9782f2,_0x4a65fe||[]))['next']());});};class ListService{constructor(_0x2ee11e){this['fetch']=_0x2ee11e;}['add'](_0x12b674,_0x422541,_0x3f897a){return __awaiter$3(this,void 0,void 0,function*(){const _0x2fd1df='List',_0x367b8b={'account_name':_0x12b674,'list_name':_0x422541};try{const _0x3944f5=yield this['fetch']['post'](_0x2fd1df,_0x3f897a,_0x367b8b);if(_0x3944f5['status']>0xc7&&_0x3944f5['status']<0x12c){const _0x5964e3=yield _0x3944f5['json']();return new SuccessfulAccountResponse(_0x5964e3);}const _0x4e4737=yield _0x3944f5['json']();return new FailedAccountResponse(_0x4e4737);}catch(_0x1da67c){if(_0x1da67c instanceof Error)return new FailedAccountResponse({'detail':_0x1da67c['message'],'title':_0x1da67c['name'],'status':0x1f4,'instance':'','type':''});throw _0x1da67c;}});}['remove'](_0xdd935,_0x5949e6,_0x24c09c){return __awaiter$3(this,void 0,void 0,function*(){const _0xbcd122='List/'+_0xdd935+'/'+_0x5949e6,_0xbc32bf=yield this['fetch']['delete'](_0xbcd122,_0x24c09c);try{if(_0xbc32bf['status']>0xc7&&_0xbc32bf['status']<0x12c){const _0x1dcec1=yield _0xbc32bf['json']();return new SuccessfulAccountResponse(_0x1dcec1);}const _0x2038f1=yield _0xbc32bf['json']();return new FailedAccountResponse(_0x2038f1);}catch(_0x2992cd){if(_0x2992cd instanceof Error)return new FailedAccountResponse({'detail':_0x2992cd['message'],'title':_0x2992cd['name'],'status':0x1f4,'instance':'','type':''});throw _0x2992cd;}});}}
8
+
9
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x436ecc,_0x5ee802,_0x39720f,_0x1f68b0){function _0x309a28(_0x2e3c56){return _0x2e3c56 instanceof _0x39720f?_0x2e3c56:new _0x39720f(function(_0x1cfd2c){_0x1cfd2c(_0x2e3c56);});}return new(_0x39720f||(_0x39720f=Promise))(function(_0x1c17ad,_0x54c994){function _0x3e8c70(_0xa297aa){try{_0x556252(_0x1f68b0['next'](_0xa297aa));}catch(_0x266d7c){_0x54c994(_0x266d7c);}}function _0x2f4abb(_0x103467){try{_0x556252(_0x1f68b0['throw'](_0x103467));}catch(_0x59f493){_0x54c994(_0x59f493);}}function _0x556252(_0x5271bc){_0x5271bc['done']?_0x1c17ad(_0x5271bc['value']):_0x309a28(_0x5271bc['value'])['then'](_0x3e8c70,_0x2f4abb);}_0x556252((_0x1f68b0=_0x1f68b0['apply'](_0x436ecc,_0x5ee802||[]))['next']());});};class Fetch{constructor(_0xe79e96){this['baseUri']=_0xe79e96,this['getUrl']=_0x1a9d02=>{return _0x1a9d02['startsWith']('/')&&(_0x1a9d02=_0x1a9d02['replace']('/','')),''+this['baseUri']+_0x1a9d02;},!_0xe79e96['endsWith']('/')&&(_0xe79e96=_0xe79e96+'/');}['get'](_0x1bd4d9,_0x25101a){return __awaiter$2(this,void 0,void 0,function*(){const _0x43dbdb=this['getUrl'](_0x1bd4d9);return yield fetch(_0x43dbdb,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x25101a}});});}['post'](_0x47f8dc,_0x41bd65,_0x2dcef1){return __awaiter$2(this,void 0,void 0,function*(){const _0x31ce69=this['getUrl'](_0x47f8dc);return yield fetch(_0x31ce69,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x41bd65},'body':_0x2dcef1?JSON['stringify'](_0x2dcef1):null});});}['put'](_0x4664bc,_0x1961e6,_0x529cf7){return __awaiter$2(this,void 0,void 0,function*(){const _0x3e6597=this['getUrl'](_0x4664bc);return yield fetch(_0x3e6597,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1961e6},'body':_0x529cf7?JSON['stringify'](_0x529cf7):null});});}['delete'](_0x21a9e6,_0x2b6398){return __awaiter$2(this,void 0,void 0,function*(){const _0x5dad26=this['getUrl'](_0x21a9e6);return yield fetch(_0x5dad26,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2b6398}});});}}
10
+
11
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x4bb500,_0x5c0bbd,_0x546c4b,_0x191509){function _0x3a8bf8(_0x166232){return _0x166232 instanceof _0x546c4b?_0x166232:new _0x546c4b(function(_0x2a0fe6){_0x2a0fe6(_0x166232);});}return new(_0x546c4b||(_0x546c4b=Promise))(function(_0xd3f1a5,_0xebcad6){function _0x62a7db(_0x321a1c){try{_0x461fbf(_0x191509['next'](_0x321a1c));}catch(_0x30d3b1){_0xebcad6(_0x30d3b1);}}function _0x1f044b(_0x51bc23){try{_0x461fbf(_0x191509['throw'](_0x51bc23));}catch(_0x2a4a3a){_0xebcad6(_0x2a4a3a);}}function _0x461fbf(_0x5183fc){_0x5183fc['done']?_0xd3f1a5(_0x5183fc['value']):_0x3a8bf8(_0x5183fc['value'])['then'](_0x62a7db,_0x1f044b);}_0x461fbf((_0x191509=_0x191509['apply'](_0x4bb500,_0x5c0bbd||[]))['next']());});};class SearchServersService{constructor(_0x3e8c95){this['fetch']=_0x3e8c95,this['path']='search-services';}['create'](_0x388f27,_0x31f50e,_0x44872f,_0x2e5a9a,_0x448a0b,_0x26135e,_0xb813e0,_0x558458){return __awaiter$1(this,void 0,void 0,function*(){const _0x3339c5={'account_name':_0x388f27,'search_service_name':_0x31f50e,'endpoint':_0x44872f,'key':_0x2e5a9a,'country':_0x448a0b,'provider':_0x26135e,'index_name':_0xb813e0};try{const _0xa6595b=yield this['fetch']['post'](this['path'],_0x558458,_0x3339c5);if(_0xa6595b['status']>0xc7&&_0xa6595b['status']<0x12c){const _0x2cfeac=yield _0xa6595b['json']();return new SuccessfulSearchServiceResponse(_0x2cfeac);}const _0x2ec447=yield _0xa6595b['json']();return new FailedSearchServiceResponse(_0x2ec447);}catch(_0x2b4ac2){if(_0x2b4ac2 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x2b4ac2['message'],'title':_0x2b4ac2['name'],'status':0x1f4,'instance':'','type':''});throw _0x2b4ac2;}});}['delete'](_0x2a1f60,_0x47d332,_0x3c6bed){return __awaiter$1(this,void 0,void 0,function*(){const _0x4a2c2a=this['path']+'/'+_0x2a1f60+'/'+_0x47d332;try{const _0x3bf763=yield this['fetch']['delete'](_0x4a2c2a,_0x3c6bed);if(_0x3bf763['status']>0xc7&&_0x3bf763['status']<0x12c)return new SuccessfulResponse({});const _0x27ba00=yield _0x3bf763['json']();return new FailedResponse(_0x27ba00);}catch(_0x4c7495){if(_0x4c7495 instanceof Error)return new FailedResponse({'detail':_0x4c7495['message'],'title':_0x4c7495['name'],'status':0x1f4,'instance':'','type':''});throw _0x4c7495;}});}['view'](_0x3ea289,_0x57ad7a,_0x5a56df){return __awaiter$1(this,void 0,void 0,function*(){const _0x35079a=this['path']+'/'+_0x3ea289+'/'+_0x57ad7a;try{const _0x182ff6=yield this['fetch']['get'](_0x35079a,_0x5a56df);if(_0x182ff6['status']>0xc7&&_0x182ff6['status']<0x12c){const _0x528479=yield _0x182ff6['json']();return new SuccessfulViewSearchServiceResponse(_0x528479);}const _0x3de575=yield _0x182ff6['json']();return new FailedViewSearchServiceResponse(_0x3de575);}catch(_0x3beb58){if(_0x3beb58 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x3beb58['message'],'title':_0x3beb58['name'],'status':0x1f4,'instance':'','type':''});throw _0x3beb58;}});}}
12
+
13
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x1f4b52,_0x4bc822,_0x1f57f5,_0x3a1e38){function _0x49cf99(_0x32ccce){return _0x32ccce instanceof _0x1f57f5?_0x32ccce:new _0x1f57f5(function(_0x5dbd7a){_0x5dbd7a(_0x32ccce);});}return new(_0x1f57f5||(_0x1f57f5=Promise))(function(_0x4adc17,_0x462789){function _0x4d2859(_0x1d5ae0){try{_0x591986(_0x3a1e38['next'](_0x1d5ae0));}catch(_0x8d5c55){_0x462789(_0x8d5c55);}}function _0x5b1d31(_0x3a1a3e){try{_0x591986(_0x3a1e38['throw'](_0x3a1a3e));}catch(_0x5554aa){_0x462789(_0x5554aa);}}function _0x591986(_0x4a6613){_0x4a6613['done']?_0x4adc17(_0x4a6613['value']):_0x49cf99(_0x4a6613['value'])['then'](_0x4d2859,_0x5b1d31);}_0x591986((_0x3a1e38=_0x3a1e38['apply'](_0x1f4b52,_0x4bc822||[]))['next']());});};class AdminClient{constructor(_0x5c9139='https://admin.searchability.dev/'){var _0x2f1a39=new Fetch(_0x5c9139);this['Accounts']=new AccountService(_0x2f1a39),this['Lists']=new ListService(_0x2f1a39),this['ApiKeys']=new ApiKeyService(_0x2f1a39),this['SearchServices']=new SearchServersService(_0x2f1a39);}}class AuthClient{constructor(_0x4e5fd5='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x4e5fd5);}['login'](_0x1e56df){return __awaiter(this,void 0,void 0,function*(){var _0x5fb48a='login/'+_0x1e56df;try{const _0x9d86e1=yield yield fetch(_0x5fb48a);if(_0x9d86e1['status']>0xc7&&_0x9d86e1['status']<0x12c){const _0x3af293=yield _0x9d86e1['json']();return new SuccessfulAuthResponse(_0x3af293);}const _0x5e13d5=yield _0x9d86e1['json']();return new FailedAuthResponse(_0x5e13d5);}catch(_0x227fb7){if(_0x227fb7 instanceof Error)return new FailedAuthResponse({'detail':_0x227fb7['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x227fb7;}});}['refresh'](_0x51ac00){return __awaiter(this,void 0,void 0,function*(){var _0x10b43d='refresh';try{const _0x4ce44d=yield this['fetch']['post'](_0x10b43d,_0x51ac00,null);if(_0x4ce44d['status']>0xc7&&_0x4ce44d['status']<0x12c){const _0x2eb36c=yield _0x4ce44d['json']();return new SuccessfulAuthResponse(_0x2eb36c);}const _0x152751=yield _0x4ce44d['json']();return new FailedAuthResponse(_0x152751);}catch(_0x392f4d){if(_0x392f4d instanceof Error)return new FailedAuthResponse({'detail':_0x392f4d['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x392f4d;}});}['getTokenStatus'](_0x3990fb){if(Date['now']()<_0x3990fb['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x3990fb['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
14
+
15
+ export { AdminClient, AuthClient, TokenStatus, Tokens };
@@ -1,18 +1,18 @@
1
1
  'use strict';
2
2
 
3
- exports.TokenStatus = void 0;(function(_0x522757){_0x522757[_0x522757['Ok']=0x0]='Ok',_0x522757[_0x522757['Refresh']=0x1]='Refresh',_0x522757[_0x522757['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(_0x41b071){this['isSuccess']=_0x41b071;}}class SuccessfulAccountResponse extends Response{constructor(_0x45a6e7){super(!![]),this['account']=_0x45a6e7;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x2ddd91){super(![]),this['problem']=_0x2ddd91;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x5bb7fb){super(!![]),this['tokens']=_0x5bb7fb;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x360acf){super(![]),this['problem']=_0x360acf;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x1d4627){super(!![]),this['apiKey']=_0x1d4627;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x1a2f5a){super(![]),this['problem']=_0x1a2f5a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x18f033){super(!![]),this['searchService']=_0x18f033;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x4a1bf8){super(![]),this['problem']=_0x4a1bf8;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x2450cb){super(!![]),this['searchService']=_0x2450cb;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServiceResponse extends Response{constructor(_0xdad910){super(![]),this['problem']=_0xdad910;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x2ca9bf){super(!![]),this['apiKeyValue']=_0x2ca9bf;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x585c09){super(!![]),this['obj']=_0x585c09;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x1aa044){super(![]),this['problem']=_0x1aa044;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x232882){super(![]),this['problem']=_0x232882;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
3
+ exports.TokenStatus = void 0;(function(_0x148b4e){_0x148b4e[_0x148b4e['Ok']=0x0]='Ok',_0x148b4e[_0x148b4e['Refresh']=0x1]='Refresh',_0x148b4e[_0x148b4e['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(_0x453c28){this['isSuccess']=_0x453c28;}}class SuccessfulAccountResponse extends Response{constructor(_0x27def2){super(!![]),this['account']=_0x27def2;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x19689c){super(![]),this['problem']=_0x19689c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x4d1eee){super(!![]),this['tokens']=_0x4d1eee;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x1c6bc7){super(![]),this['problem']=_0x1c6bc7;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x3dcd5c){super(!![]),this['apiKey']=_0x3dcd5c;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x4753ff){super(![]),this['problem']=_0x4753ff;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x4507ed){super(!![]),this['searchService']=_0x4507ed;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x112acf){super(![]),this['problem']=_0x112acf;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x3fdc6f){super(!![]),this['searchService']=_0x3fdc6f;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServiceResponse extends Response{constructor(_0x8959a7){super(![]),this['problem']=_0x8959a7;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x4c8376){super(!![]),this['apiKeyValue']=_0x4c8376;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x4c579d){super(!![]),this['obj']=_0x4c579d;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x1e4a06){super(![]),this['problem']=_0x1e4a06;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x1234f6){super(![]),this['problem']=_0x1234f6;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
4
4
 
5
- var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x3703b3,_0x49d240,_0x1c3f7c,_0x34c6b2){function _0x19565d(_0x3c0a4b){return _0x3c0a4b instanceof _0x1c3f7c?_0x3c0a4b:new _0x1c3f7c(function(_0x518ee7){_0x518ee7(_0x3c0a4b);});}return new(_0x1c3f7c||(_0x1c3f7c=Promise))(function(_0x568d5b,_0x58adf9){function _0x1eae78(_0x322c2a){try{_0x412527(_0x34c6b2['next'](_0x322c2a));}catch(_0x1c1736){_0x58adf9(_0x1c1736);}}function _0x2078d8(_0x441840){try{_0x412527(_0x34c6b2['throw'](_0x441840));}catch(_0x57e70c){_0x58adf9(_0x57e70c);}}function _0x412527(_0x4fb944){_0x4fb944['done']?_0x568d5b(_0x4fb944['value']):_0x19565d(_0x4fb944['value'])['then'](_0x1eae78,_0x2078d8);}_0x412527((_0x34c6b2=_0x34c6b2['apply'](_0x3703b3,_0x49d240||[]))['next']());});};class AccountService{constructor(_0xd39a7c){this['fetch']=_0xd39a7c;}['get'](_0x3f2288,_0x2eae2d){return __awaiter$5(this,void 0,void 0,function*(){const _0x3eb862='Account/'+_0x3f2288+'/',_0xd80d39=yield this['fetch']['get'](_0x3eb862,_0x2eae2d);try{if(_0xd80d39['status']>0xc7&&_0xd80d39['status']<0x12c){const _0x1cee04=yield _0xd80d39['json']();return new SuccessfulAccountResponse(_0x1cee04);}const _0x212e2a=yield _0xd80d39['json']();return new FailedAccountResponse(_0x212e2a);}catch(_0x220d2b){if(_0x220d2b instanceof Error)return new FailedAccountResponse({'detail':_0x220d2b['message'],'title':_0x220d2b['name'],'status':0x1f4,'instance':'','type':''});throw _0x220d2b;}});}}
5
+ var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x2c18dd,_0x4b065b,_0x19760f,_0x5944ab){function _0x231902(_0x39048d){return _0x39048d instanceof _0x19760f?_0x39048d:new _0x19760f(function(_0x35bf9a){_0x35bf9a(_0x39048d);});}return new(_0x19760f||(_0x19760f=Promise))(function(_0x71de67,_0x11e511){function _0x2ebd99(_0x2b2a60){try{_0x559d76(_0x5944ab['next'](_0x2b2a60));}catch(_0x350f86){_0x11e511(_0x350f86);}}function _0x22d60f(_0x1dda10){try{_0x559d76(_0x5944ab['throw'](_0x1dda10));}catch(_0x391157){_0x11e511(_0x391157);}}function _0x559d76(_0x45ce01){_0x45ce01['done']?_0x71de67(_0x45ce01['value']):_0x231902(_0x45ce01['value'])['then'](_0x2ebd99,_0x22d60f);}_0x559d76((_0x5944ab=_0x5944ab['apply'](_0x2c18dd,_0x4b065b||[]))['next']());});};class AccountService{constructor(_0x856b09){this['fetch']=_0x856b09;}['get'](_0x40c428,_0x4ae84c){return __awaiter$5(this,void 0,void 0,function*(){const _0x36eec8='Account/'+_0x40c428+'/',_0x537974=yield this['fetch']['get'](_0x36eec8,_0x4ae84c);try{if(_0x537974['status']>0xc7&&_0x537974['status']<0x12c){const _0x51ba43=yield _0x537974['json']();return new SuccessfulAccountResponse(_0x51ba43);}const _0x2cc66b=yield _0x537974['json']();return new FailedAccountResponse(_0x2cc66b);}catch(_0x5f1b56){if(_0x5f1b56 instanceof Error)return new FailedAccountResponse({'detail':_0x5f1b56['message'],'title':_0x5f1b56['name'],'status':0x1f4,'instance':'','type':''});throw _0x5f1b56;}});}}
6
6
 
7
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x171e7b,_0xf9ab9d,_0x27804e,_0x190b99){function _0xb958e7(_0x37f212){return _0x37f212 instanceof _0x27804e?_0x37f212:new _0x27804e(function(_0x16e869){_0x16e869(_0x37f212);});}return new(_0x27804e||(_0x27804e=Promise))(function(_0x4384c4,_0xc3ef5e){function _0x4dbe46(_0x50b215){try{_0x38d694(_0x190b99['next'](_0x50b215));}catch(_0x3a5358){_0xc3ef5e(_0x3a5358);}}function _0x284b16(_0x15123e){try{_0x38d694(_0x190b99['throw'](_0x15123e));}catch(_0x1c0c0d){_0xc3ef5e(_0x1c0c0d);}}function _0x38d694(_0x161cfe){_0x161cfe['done']?_0x4384c4(_0x161cfe['value']):_0xb958e7(_0x161cfe['value'])['then'](_0x4dbe46,_0x284b16);}_0x38d694((_0x190b99=_0x190b99['apply'](_0x171e7b,_0xf9ab9d||[]))['next']());});};class ApiKeyService{constructor(_0x2f6d33){this['fetch']=_0x2f6d33,this['path']='api-key';}['create'](_0x3ed418,_0x2bc02a,_0x4c8a0c){return __awaiter$4(this,void 0,void 0,function*(){const _0xdb6e2={'account_name':_0x3ed418,'api_key_name':_0x2bc02a};try{const _0x3e090d=yield this['fetch']['post'](this['path'],_0x4c8a0c,_0xdb6e2);if(_0x3e090d['status']>0xc7&&_0x3e090d['status']<0x12c){const _0x4f8f29=yield _0x3e090d['json']();return new SuccessfulApiKeyResponse(_0x4f8f29);}const _0x2a6520=yield _0x3e090d['json']();return new FailedApiKeyResponse(_0x2a6520);}catch(_0x2ebd61){if(_0x2ebd61 instanceof Error)return new FailedApiKeyResponse({'detail':_0x2ebd61['message'],'title':_0x2ebd61['name'],'status':0x1f4,'instance':'','type':''});throw _0x2ebd61;}});}['view'](_0x2c86bd,_0x1ec043,_0x468c4a){return __awaiter$4(this,void 0,void 0,function*(){const _0x444547=this['path']+'/'+_0x2c86bd+'/'+_0x1ec043;try{const _0x2c84b7=yield this['fetch']['get'](_0x444547,_0x468c4a);if(_0x2c84b7['status']>0xc7&&_0x2c84b7['status']<0x12c){const _0x4c55c8=yield _0x2c84b7['json']();return new SuccessfulApiKeyValueResponse(_0x4c55c8);}const _0x3637b9=yield _0x2c84b7['json']();return new FailedApiKeyValueResponse(_0x3637b9);}catch(_0x4e8193){if(_0x4e8193 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x4e8193['message'],'title':_0x4e8193['name'],'status':0x1f4,'instance':'','type':''});throw _0x4e8193;}});}['delete'](_0x419302,_0x20dc34,_0xb90fa){return __awaiter$4(this,void 0,void 0,function*(){const _0x487b05=this['path']+'/'+_0x419302+'/'+_0x20dc34;try{const _0x52c6e6=yield this['fetch']['delete'](_0x487b05,_0xb90fa);if(_0x52c6e6['status']>0xc7&&_0x52c6e6['status']<0x12c)return new SuccessfulResponse({});const _0xe8a834=yield _0x52c6e6['json']();return new FailedResponse(_0xe8a834);}catch(_0x4b515c){if(_0x4b515c instanceof Error)return new FailedResponse({'detail':_0x4b515c['message'],'title':_0x4b515c['name'],'status':0x1f4,'instance':'','type':''});throw _0x4b515c;}});}}
7
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x30b0d5,_0x1b8eae,_0x45545b,_0x1b7a2d){function _0x36085e(_0x53d83f){return _0x53d83f instanceof _0x45545b?_0x53d83f:new _0x45545b(function(_0x3345f2){_0x3345f2(_0x53d83f);});}return new(_0x45545b||(_0x45545b=Promise))(function(_0x154643,_0x2066ae){function _0x2731a9(_0x3249e7){try{_0xb8a682(_0x1b7a2d['next'](_0x3249e7));}catch(_0x37360c){_0x2066ae(_0x37360c);}}function _0x353e50(_0x4f5223){try{_0xb8a682(_0x1b7a2d['throw'](_0x4f5223));}catch(_0x226a66){_0x2066ae(_0x226a66);}}function _0xb8a682(_0x4b6454){_0x4b6454['done']?_0x154643(_0x4b6454['value']):_0x36085e(_0x4b6454['value'])['then'](_0x2731a9,_0x353e50);}_0xb8a682((_0x1b7a2d=_0x1b7a2d['apply'](_0x30b0d5,_0x1b8eae||[]))['next']());});};class ApiKeyService{constructor(_0x46c13a){this['fetch']=_0x46c13a,this['path']='api-key';}['create'](_0x2abbd2,_0x418114,_0x31264e){return __awaiter$4(this,void 0,void 0,function*(){const _0x3f374c={'account_name':_0x2abbd2,'api_key_name':_0x418114};try{const _0x5ddc18=yield this['fetch']['post'](this['path'],_0x31264e,_0x3f374c);if(_0x5ddc18['status']>0xc7&&_0x5ddc18['status']<0x12c){const _0x4e6bc6=yield _0x5ddc18['json']();return new SuccessfulApiKeyResponse(_0x4e6bc6);}const _0x5ec381=yield _0x5ddc18['json']();return new FailedApiKeyResponse(_0x5ec381);}catch(_0x46c349){if(_0x46c349 instanceof Error)return new FailedApiKeyResponse({'detail':_0x46c349['message'],'title':_0x46c349['name'],'status':0x1f4,'instance':'','type':''});throw _0x46c349;}});}['view'](_0x4763b0,_0x4133bc,_0x384b04){return __awaiter$4(this,void 0,void 0,function*(){const _0xdb4794=this['path']+'/'+_0x4763b0+'/'+_0x4133bc;try{const _0x1b0ee8=yield this['fetch']['get'](_0xdb4794,_0x384b04);if(_0x1b0ee8['status']>0xc7&&_0x1b0ee8['status']<0x12c){const _0x511123=yield _0x1b0ee8['json']();return new SuccessfulApiKeyValueResponse(_0x511123);}const _0x359336=yield _0x1b0ee8['json']();return new FailedApiKeyValueResponse(_0x359336);}catch(_0x348643){if(_0x348643 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x348643['message'],'title':_0x348643['name'],'status':0x1f4,'instance':'','type':''});throw _0x348643;}});}['delete'](_0x5d745d,_0x2c8527,_0x56a234){return __awaiter$4(this,void 0,void 0,function*(){const _0x187c25=this['path']+'/'+_0x5d745d+'/'+_0x2c8527;try{const _0xe4d208=yield this['fetch']['delete'](_0x187c25,_0x56a234);if(_0xe4d208['status']>0xc7&&_0xe4d208['status']<0x12c)return new SuccessfulResponse({});const _0x20ba82=yield _0xe4d208['json']();return new FailedResponse(_0x20ba82);}catch(_0x4f489a){if(_0x4f489a instanceof Error)return new FailedResponse({'detail':_0x4f489a['message'],'title':_0x4f489a['name'],'status':0x1f4,'instance':'','type':''});throw _0x4f489a;}});}}
8
8
 
9
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x1dc491,_0x15d212,_0x5e6ecc,_0x4ad992){function _0x436168(_0x105f85){return _0x105f85 instanceof _0x5e6ecc?_0x105f85:new _0x5e6ecc(function(_0x30b177){_0x30b177(_0x105f85);});}return new(_0x5e6ecc||(_0x5e6ecc=Promise))(function(_0x4ae0a0,_0x205bc2){function _0x5091c6(_0x3988fb){try{_0x2d1ef7(_0x4ad992['next'](_0x3988fb));}catch(_0x485593){_0x205bc2(_0x485593);}}function _0x16a8c5(_0x3a2f62){try{_0x2d1ef7(_0x4ad992['throw'](_0x3a2f62));}catch(_0x3aaf59){_0x205bc2(_0x3aaf59);}}function _0x2d1ef7(_0x5ac606){_0x5ac606['done']?_0x4ae0a0(_0x5ac606['value']):_0x436168(_0x5ac606['value'])['then'](_0x5091c6,_0x16a8c5);}_0x2d1ef7((_0x4ad992=_0x4ad992['apply'](_0x1dc491,_0x15d212||[]))['next']());});};class ListService{constructor(_0x40df2d){this['fetch']=_0x40df2d;}['add'](_0x5d85f4,_0x4c1ff7,_0x32df1e){return __awaiter$3(this,void 0,void 0,function*(){const _0x1beb22='List',_0x5d1111={'account_name':_0x5d85f4,'list_name':_0x4c1ff7};try{const _0x1b7ec4=yield this['fetch']['post'](_0x1beb22,_0x32df1e,_0x5d1111);if(_0x1b7ec4['status']>0xc7&&_0x1b7ec4['status']<0x12c){const _0x382754=yield _0x1b7ec4['json']();return new SuccessfulAccountResponse(_0x382754);}const _0x3743e1=yield _0x1b7ec4['json']();return new FailedAccountResponse(_0x3743e1);}catch(_0x4ae338){if(_0x4ae338 instanceof Error)return new FailedAccountResponse({'detail':_0x4ae338['message'],'title':_0x4ae338['name'],'status':0x1f4,'instance':'','type':''});throw _0x4ae338;}});}['remove'](_0x1082d0,_0x4dbc1c,_0x333058){return __awaiter$3(this,void 0,void 0,function*(){const _0x17c1c1='List/'+_0x1082d0+'/'+_0x4dbc1c,_0x3db567=yield this['fetch']['delete'](_0x17c1c1,_0x333058);try{if(_0x3db567['status']>0xc7&&_0x3db567['status']<0x12c){const _0x201a00=yield _0x3db567['json']();return new SuccessfulAccountResponse(_0x201a00);}const _0x33184a=yield _0x3db567['json']();return new FailedAccountResponse(_0x33184a);}catch(_0x48b428){if(_0x48b428 instanceof Error)return new FailedAccountResponse({'detail':_0x48b428['message'],'title':_0x48b428['name'],'status':0x1f4,'instance':'','type':''});throw _0x48b428;}});}}
9
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x5911fd,_0x3d9069,_0x44630f,_0xcbfbd6){function _0x279b62(_0x1ae210){return _0x1ae210 instanceof _0x44630f?_0x1ae210:new _0x44630f(function(_0x450b24){_0x450b24(_0x1ae210);});}return new(_0x44630f||(_0x44630f=Promise))(function(_0x591176,_0x2a9aba){function _0x3f6fac(_0x15c1b5){try{_0x2dedd8(_0xcbfbd6['next'](_0x15c1b5));}catch(_0x4e78a3){_0x2a9aba(_0x4e78a3);}}function _0x3e2270(_0x396e55){try{_0x2dedd8(_0xcbfbd6['throw'](_0x396e55));}catch(_0x58884c){_0x2a9aba(_0x58884c);}}function _0x2dedd8(_0x3f62d3){_0x3f62d3['done']?_0x591176(_0x3f62d3['value']):_0x279b62(_0x3f62d3['value'])['then'](_0x3f6fac,_0x3e2270);}_0x2dedd8((_0xcbfbd6=_0xcbfbd6['apply'](_0x5911fd,_0x3d9069||[]))['next']());});};class ListService{constructor(_0x5dc8a8){this['fetch']=_0x5dc8a8;}['add'](_0x5de68e,_0x19a381,_0x19e933){return __awaiter$3(this,void 0,void 0,function*(){const _0x4ee488='List',_0x318fe1={'account_name':_0x5de68e,'list_name':_0x19a381};try{const _0x506549=yield this['fetch']['post'](_0x4ee488,_0x19e933,_0x318fe1);if(_0x506549['status']>0xc7&&_0x506549['status']<0x12c){const _0x2718fe=yield _0x506549['json']();return new SuccessfulAccountResponse(_0x2718fe);}const _0x1c5dad=yield _0x506549['json']();return new FailedAccountResponse(_0x1c5dad);}catch(_0x5c5345){if(_0x5c5345 instanceof Error)return new FailedAccountResponse({'detail':_0x5c5345['message'],'title':_0x5c5345['name'],'status':0x1f4,'instance':'','type':''});throw _0x5c5345;}});}['remove'](_0x129e88,_0x199243,_0x130500){return __awaiter$3(this,void 0,void 0,function*(){const _0x25bceb='List/'+_0x129e88+'/'+_0x199243,_0x166a43=yield this['fetch']['delete'](_0x25bceb,_0x130500);try{if(_0x166a43['status']>0xc7&&_0x166a43['status']<0x12c){const _0x2ed422=yield _0x166a43['json']();return new SuccessfulAccountResponse(_0x2ed422);}const _0x5a2e0c=yield _0x166a43['json']();return new FailedAccountResponse(_0x5a2e0c);}catch(_0x6f4c58){if(_0x6f4c58 instanceof Error)return new FailedAccountResponse({'detail':_0x6f4c58['message'],'title':_0x6f4c58['name'],'status':0x1f4,'instance':'','type':''});throw _0x6f4c58;}});}}
10
10
 
11
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x94b0fc,_0x56b963,_0x3d389e,_0x5372ab){function _0x25d07d(_0x573c19){return _0x573c19 instanceof _0x3d389e?_0x573c19:new _0x3d389e(function(_0x54c545){_0x54c545(_0x573c19);});}return new(_0x3d389e||(_0x3d389e=Promise))(function(_0x3a1d22,_0x55c797){function _0x5556b7(_0x36dd72){try{_0x26aaf9(_0x5372ab['next'](_0x36dd72));}catch(_0x488f70){_0x55c797(_0x488f70);}}function _0x3c4c3d(_0x2d4e8a){try{_0x26aaf9(_0x5372ab['throw'](_0x2d4e8a));}catch(_0x5a56af){_0x55c797(_0x5a56af);}}function _0x26aaf9(_0x6220f3){_0x6220f3['done']?_0x3a1d22(_0x6220f3['value']):_0x25d07d(_0x6220f3['value'])['then'](_0x5556b7,_0x3c4c3d);}_0x26aaf9((_0x5372ab=_0x5372ab['apply'](_0x94b0fc,_0x56b963||[]))['next']());});};class Fetch{constructor(_0x309782){this['baseUri']=_0x309782,this['getUrl']=_0x3826c0=>{return _0x3826c0['startsWith']('/')&&(_0x3826c0=_0x3826c0['replace']('/','')),''+this['baseUri']+_0x3826c0;},!_0x309782['endsWith']('/')&&(_0x309782=_0x309782+'/');}['get'](_0x50571f,_0x5cf54a){return __awaiter$2(this,void 0,void 0,function*(){const _0x249472=this['getUrl'](_0x50571f);return yield fetch(_0x249472,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x5cf54a}});});}['post'](_0xcd878a,_0x551ba4,_0x3ca48c){return __awaiter$2(this,void 0,void 0,function*(){const _0x19699d=this['getUrl'](_0xcd878a);return yield fetch(_0x19699d,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x551ba4},'body':_0x3ca48c?JSON['stringify'](_0x3ca48c):null});});}['put'](_0x3e31c9,_0x24f5ef,_0x1d7516){return __awaiter$2(this,void 0,void 0,function*(){const _0x4ba5d9=this['getUrl'](_0x3e31c9);return yield fetch(_0x4ba5d9,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x24f5ef},'body':_0x1d7516?JSON['stringify'](_0x1d7516):null});});}['delete'](_0x3052db,_0x256e41){return __awaiter$2(this,void 0,void 0,function*(){const _0x3256e4=this['getUrl'](_0x3052db);return yield fetch(_0x3256e4,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x256e41}});});}}
11
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x360e10,_0x37d3d1,_0x46ccf8,_0xebde11){function _0xc1427b(_0x53c352){return _0x53c352 instanceof _0x46ccf8?_0x53c352:new _0x46ccf8(function(_0x36dd1b){_0x36dd1b(_0x53c352);});}return new(_0x46ccf8||(_0x46ccf8=Promise))(function(_0x4e1051,_0x433649){function _0x1c374f(_0x1201b6){try{_0x56658e(_0xebde11['next'](_0x1201b6));}catch(_0x51cf45){_0x433649(_0x51cf45);}}function _0x4efd84(_0x4c31fd){try{_0x56658e(_0xebde11['throw'](_0x4c31fd));}catch(_0xa62a40){_0x433649(_0xa62a40);}}function _0x56658e(_0x4e996c){_0x4e996c['done']?_0x4e1051(_0x4e996c['value']):_0xc1427b(_0x4e996c['value'])['then'](_0x1c374f,_0x4efd84);}_0x56658e((_0xebde11=_0xebde11['apply'](_0x360e10,_0x37d3d1||[]))['next']());});};class Fetch{constructor(_0x134724){this['baseUri']=_0x134724,this['getUrl']=_0x40d263=>{return _0x40d263['startsWith']('/')&&(_0x40d263=_0x40d263['replace']('/','')),''+this['baseUri']+_0x40d263;},!_0x134724['endsWith']('/')&&(_0x134724=_0x134724+'/');}['get'](_0x24194c,_0x5381f6){return __awaiter$2(this,void 0,void 0,function*(){const _0x409218=this['getUrl'](_0x24194c);return yield fetch(_0x409218,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x5381f6}});});}['post'](_0x3607c4,_0x23b596,_0x11dbba){return __awaiter$2(this,void 0,void 0,function*(){const _0x3f3f3e=this['getUrl'](_0x3607c4);return yield fetch(_0x3f3f3e,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x23b596},'body':_0x11dbba?JSON['stringify'](_0x11dbba):null});});}['put'](_0x433188,_0x16d192,_0x46f584){return __awaiter$2(this,void 0,void 0,function*(){const _0x1ed764=this['getUrl'](_0x433188);return yield fetch(_0x1ed764,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x16d192},'body':_0x46f584?JSON['stringify'](_0x46f584):null});});}['delete'](_0x99779a,_0x55c9b6){return __awaiter$2(this,void 0,void 0,function*(){const _0x532b94=this['getUrl'](_0x99779a);return yield fetch(_0x532b94,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x55c9b6}});});}}
12
12
 
13
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x1e9341,_0x3448db,_0x596d28,_0x5ab9c5){function _0x1f1499(_0x181384){return _0x181384 instanceof _0x596d28?_0x181384:new _0x596d28(function(_0x3f33ae){_0x3f33ae(_0x181384);});}return new(_0x596d28||(_0x596d28=Promise))(function(_0x55e5c5,_0x58eb06){function _0x300c12(_0x1268b8){try{_0x4551e2(_0x5ab9c5['next'](_0x1268b8));}catch(_0x57a164){_0x58eb06(_0x57a164);}}function _0x5032fa(_0x279260){try{_0x4551e2(_0x5ab9c5['throw'](_0x279260));}catch(_0x3ec2d7){_0x58eb06(_0x3ec2d7);}}function _0x4551e2(_0x5d7e8d){_0x5d7e8d['done']?_0x55e5c5(_0x5d7e8d['value']):_0x1f1499(_0x5d7e8d['value'])['then'](_0x300c12,_0x5032fa);}_0x4551e2((_0x5ab9c5=_0x5ab9c5['apply'](_0x1e9341,_0x3448db||[]))['next']());});};class SearchServersService{constructor(_0x2cd619){this['fetch']=_0x2cd619,this['path']='search-services';}['create'](_0x4f623a,_0x293351,_0x201520,_0x5186a8,_0x3adf14,_0x1cd8c7,_0x3d03aa,_0x2c3fcb){return __awaiter$1(this,void 0,void 0,function*(){const _0x458fe2={'account_name':_0x4f623a,'search_service_name':_0x293351,'endpoint':_0x201520,'key':_0x5186a8,'county':_0x3adf14,'provider':_0x1cd8c7,'index_name':_0x3d03aa};try{const _0x5c825b=yield this['fetch']['post'](this['path'],_0x2c3fcb,_0x458fe2);if(_0x5c825b['status']>0xc7&&_0x5c825b['status']<0x12c){const _0x1d1a28=yield _0x5c825b['json']();return new SuccessfulSearchServiceResponse(_0x1d1a28);}const _0x27f014=yield _0x5c825b['json']();return new FailedSearchServiceResponse(_0x27f014);}catch(_0x23ffaf){if(_0x23ffaf instanceof Error)return new FailedSearchServiceResponse({'detail':_0x23ffaf['message'],'title':_0x23ffaf['name'],'status':0x1f4,'instance':'','type':''});throw _0x23ffaf;}});}['delete'](_0x381b26,_0x4d1e03,_0x45fe8b){return __awaiter$1(this,void 0,void 0,function*(){const _0x507cec=this['path']+'/'+_0x381b26+'/'+_0x4d1e03;try{const _0x1a6912=yield this['fetch']['delete'](_0x507cec,_0x45fe8b);if(_0x1a6912['status']>0xc7&&_0x1a6912['status']<0x12c)return new SuccessfulResponse({});const _0x29053a=yield _0x1a6912['json']();return new FailedResponse(_0x29053a);}catch(_0x5b9aa9){if(_0x5b9aa9 instanceof Error)return new FailedResponse({'detail':_0x5b9aa9['message'],'title':_0x5b9aa9['name'],'status':0x1f4,'instance':'','type':''});throw _0x5b9aa9;}});}['view'](_0x27df0b,_0x5d23fe,_0xe8ec43){return __awaiter$1(this,void 0,void 0,function*(){const _0x32f259=this['path']+'/'+_0x27df0b+'/'+_0x5d23fe;try{const _0x504c6a=yield this['fetch']['get'](_0x32f259,_0xe8ec43);if(_0x504c6a['status']>0xc7&&_0x504c6a['status']<0x12c){const _0x241ca7=yield _0x504c6a['json']();return new SuccessfulViewSearchServiceResponse(_0x241ca7);}const _0x27506d=yield _0x504c6a['json']();return new FailedViewSearchServiceResponse(_0x27506d);}catch(_0x3a862c){if(_0x3a862c instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x3a862c['message'],'title':_0x3a862c['name'],'status':0x1f4,'instance':'','type':''});throw _0x3a862c;}});}}
13
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x1f36c2,_0x343702,_0x25c5c6,_0x27c1fe){function _0x157ca2(_0x49b76b){return _0x49b76b instanceof _0x25c5c6?_0x49b76b:new _0x25c5c6(function(_0x8fbec1){_0x8fbec1(_0x49b76b);});}return new(_0x25c5c6||(_0x25c5c6=Promise))(function(_0x39f854,_0x286776){function _0x3032fc(_0x59f4cc){try{_0x3a07b1(_0x27c1fe['next'](_0x59f4cc));}catch(_0x196afb){_0x286776(_0x196afb);}}function _0x4b1f3b(_0x52030b){try{_0x3a07b1(_0x27c1fe['throw'](_0x52030b));}catch(_0x2dcad7){_0x286776(_0x2dcad7);}}function _0x3a07b1(_0x14af2c){_0x14af2c['done']?_0x39f854(_0x14af2c['value']):_0x157ca2(_0x14af2c['value'])['then'](_0x3032fc,_0x4b1f3b);}_0x3a07b1((_0x27c1fe=_0x27c1fe['apply'](_0x1f36c2,_0x343702||[]))['next']());});};class SearchServersService{constructor(_0x33cbb0){this['fetch']=_0x33cbb0,this['path']='search-services';}['create'](_0x48046c,_0x1a18b3,_0x286d2e,_0xdb1542,_0x54e724,_0x3616bc,_0x424290,_0x58f46d){return __awaiter$1(this,void 0,void 0,function*(){const _0x1b6005={'account_name':_0x48046c,'search_service_name':_0x1a18b3,'endpoint':_0x286d2e,'key':_0xdb1542,'country':_0x54e724,'provider':_0x3616bc,'index_name':_0x424290};try{const _0x83f5d1=yield this['fetch']['post'](this['path'],_0x58f46d,_0x1b6005);if(_0x83f5d1['status']>0xc7&&_0x83f5d1['status']<0x12c){const _0x45ddab=yield _0x83f5d1['json']();return new SuccessfulSearchServiceResponse(_0x45ddab);}const _0x4acad2=yield _0x83f5d1['json']();return new FailedSearchServiceResponse(_0x4acad2);}catch(_0x329ff1){if(_0x329ff1 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x329ff1['message'],'title':_0x329ff1['name'],'status':0x1f4,'instance':'','type':''});throw _0x329ff1;}});}['delete'](_0x1e886e,_0xf50064,_0xcd1380){return __awaiter$1(this,void 0,void 0,function*(){const _0x147470=this['path']+'/'+_0x1e886e+'/'+_0xf50064;try{const _0x5b1937=yield this['fetch']['delete'](_0x147470,_0xcd1380);if(_0x5b1937['status']>0xc7&&_0x5b1937['status']<0x12c)return new SuccessfulResponse({});const _0x16b85d=yield _0x5b1937['json']();return new FailedResponse(_0x16b85d);}catch(_0x4cd667){if(_0x4cd667 instanceof Error)return new FailedResponse({'detail':_0x4cd667['message'],'title':_0x4cd667['name'],'status':0x1f4,'instance':'','type':''});throw _0x4cd667;}});}['view'](_0xc20e82,_0x21d28b,_0x457709){return __awaiter$1(this,void 0,void 0,function*(){const _0x16304c=this['path']+'/'+_0xc20e82+'/'+_0x21d28b;try{const _0x5116e2=yield this['fetch']['get'](_0x16304c,_0x457709);if(_0x5116e2['status']>0xc7&&_0x5116e2['status']<0x12c){const _0x31aedf=yield _0x5116e2['json']();return new SuccessfulViewSearchServiceResponse(_0x31aedf);}const _0x331974=yield _0x5116e2['json']();return new FailedViewSearchServiceResponse(_0x331974);}catch(_0x429ca1){if(_0x429ca1 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x429ca1['message'],'title':_0x429ca1['name'],'status':0x1f4,'instance':'','type':''});throw _0x429ca1;}});}}
14
14
 
15
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x3e6fab,_0x4f9535,_0x1fd7a0,_0x56fd27){function _0x3cc5bb(_0x5278d8){return _0x5278d8 instanceof _0x1fd7a0?_0x5278d8:new _0x1fd7a0(function(_0xf79c9d){_0xf79c9d(_0x5278d8);});}return new(_0x1fd7a0||(_0x1fd7a0=Promise))(function(_0x4bd71e,_0xc4cf31){function _0x57c77e(_0x3a615d){try{_0x22fd2e(_0x56fd27['next'](_0x3a615d));}catch(_0x3b33eb){_0xc4cf31(_0x3b33eb);}}function _0x1a4867(_0x4b6ceb){try{_0x22fd2e(_0x56fd27['throw'](_0x4b6ceb));}catch(_0x55c49b){_0xc4cf31(_0x55c49b);}}function _0x22fd2e(_0x111fcc){_0x111fcc['done']?_0x4bd71e(_0x111fcc['value']):_0x3cc5bb(_0x111fcc['value'])['then'](_0x57c77e,_0x1a4867);}_0x22fd2e((_0x56fd27=_0x56fd27['apply'](_0x3e6fab,_0x4f9535||[]))['next']());});};class AdminClient{constructor(_0x32b16f='https://admin.searchability.dev/'){var _0x2f6301=new Fetch(_0x32b16f);this['Accounts']=new AccountService(_0x2f6301),this['Lists']=new ListService(_0x2f6301),this['ApiKeys']=new ApiKeyService(_0x2f6301),this['SearchServices']=new SearchServersService(_0x2f6301);}}class AuthClient{constructor(_0x4f74a8='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x4f74a8);}['login'](_0x226e1b){return __awaiter(this,void 0,void 0,function*(){var _0x22243e='login/'+_0x226e1b;try{const _0x45e285=yield yield fetch(_0x22243e);if(_0x45e285['status']>0xc7&&_0x45e285['status']<0x12c){const _0x2fc774=yield _0x45e285['json']();return new SuccessfulAuthResponse(_0x2fc774);}const _0x2895d6=yield _0x45e285['json']();return new FailedAuthResponse(_0x2895d6);}catch(_0xe599d9){if(_0xe599d9 instanceof Error)return new FailedAuthResponse({'detail':_0xe599d9['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0xe599d9;}});}['refresh'](_0x53aea8){return __awaiter(this,void 0,void 0,function*(){var _0x28ceb9='refresh';try{const _0x16bc86=yield this['fetch']['post'](_0x28ceb9,_0x53aea8,null);if(_0x16bc86['status']>0xc7&&_0x16bc86['status']<0x12c){const _0x4d62a5=yield _0x16bc86['json']();return new SuccessfulAuthResponse(_0x4d62a5);}const _0x1b0d9f=yield _0x16bc86['json']();return new FailedAuthResponse(_0x1b0d9f);}catch(_0x34e459){if(_0x34e459 instanceof Error)return new FailedAuthResponse({'detail':_0x34e459['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x34e459;}});}['getTokenStatus'](_0x526907){if(Date['now']()<_0x526907['access_expires'])return exports.TokenStatus['Ok'];if(Date['now']()<_0x526907['refresh_expires'])return exports.TokenStatus['Refresh'];return exports.TokenStatus['Expired'];}}
15
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x25256b,_0x2ea2f6,_0x57aa76,_0x9f1bf){function _0x375648(_0x5cb395){return _0x5cb395 instanceof _0x57aa76?_0x5cb395:new _0x57aa76(function(_0x2cc334){_0x2cc334(_0x5cb395);});}return new(_0x57aa76||(_0x57aa76=Promise))(function(_0x55d6f6,_0x1b7ec0){function _0x4ba805(_0x461516){try{_0x416264(_0x9f1bf['next'](_0x461516));}catch(_0x143de5){_0x1b7ec0(_0x143de5);}}function _0x57330f(_0x1d5ea4){try{_0x416264(_0x9f1bf['throw'](_0x1d5ea4));}catch(_0x274280){_0x1b7ec0(_0x274280);}}function _0x416264(_0x4e9b6b){_0x4e9b6b['done']?_0x55d6f6(_0x4e9b6b['value']):_0x375648(_0x4e9b6b['value'])['then'](_0x4ba805,_0x57330f);}_0x416264((_0x9f1bf=_0x9f1bf['apply'](_0x25256b,_0x2ea2f6||[]))['next']());});};class AdminClient{constructor(_0x2d8a4e='https://admin.searchability.dev/'){var _0x560177=new Fetch(_0x2d8a4e);this['Accounts']=new AccountService(_0x560177),this['Lists']=new ListService(_0x560177),this['ApiKeys']=new ApiKeyService(_0x560177),this['SearchServices']=new SearchServersService(_0x560177);}}class AuthClient{constructor(_0x260346='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x260346);}['login'](_0x555665){return __awaiter(this,void 0,void 0,function*(){var _0x12011d='login/'+_0x555665;try{const _0x4edef3=yield yield fetch(_0x12011d);if(_0x4edef3['status']>0xc7&&_0x4edef3['status']<0x12c){const _0x153c91=yield _0x4edef3['json']();return new SuccessfulAuthResponse(_0x153c91);}const _0xec2a10=yield _0x4edef3['json']();return new FailedAuthResponse(_0xec2a10);}catch(_0x2e1702){if(_0x2e1702 instanceof Error)return new FailedAuthResponse({'detail':_0x2e1702['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x2e1702;}});}['refresh'](_0x5cbdde){return __awaiter(this,void 0,void 0,function*(){var _0x5a043e='refresh';try{const _0x42b7f0=yield this['fetch']['post'](_0x5a043e,_0x5cbdde,null);if(_0x42b7f0['status']>0xc7&&_0x42b7f0['status']<0x12c){const _0x284e00=yield _0x42b7f0['json']();return new SuccessfulAuthResponse(_0x284e00);}const _0x40b311=yield _0x42b7f0['json']();return new FailedAuthResponse(_0x40b311);}catch(_0x5e9a22){if(_0x5e9a22 instanceof Error)return new FailedAuthResponse({'detail':_0x5e9a22['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x5e9a22;}});}['getTokenStatus'](_0x24c260){if(Date['now']()<_0x24c260['access_expires'])return exports.TokenStatus['Ok'];if(Date['now']()<_0x24c260['refresh_expires'])return exports.TokenStatus['Refresh'];return exports.TokenStatus['Expired'];}}
16
16
 
17
17
  exports.AdminClient = AdminClient;
18
18
  exports.AuthClient = AuthClient;
@@ -1,15 +1,15 @@
1
- var TokenStatus;(function(_0xcc7f41){_0xcc7f41[_0xcc7f41['Ok']=0x0]='Ok',_0xcc7f41[_0xcc7f41['Refresh']=0x1]='Refresh',_0xcc7f41[_0xcc7f41['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(_0x5dec2e){this['isSuccess']=_0x5dec2e;}}class SuccessfulAccountResponse extends Response{constructor(_0xfaa668){super(!![]),this['account']=_0xfaa668;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x2832f8){super(![]),this['problem']=_0x2832f8;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x24f834){super(!![]),this['tokens']=_0x24f834;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x4c4235){super(![]),this['problem']=_0x4c4235;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x47f45e){super(!![]),this['apiKey']=_0x47f45e;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x3648c7){super(![]),this['problem']=_0x3648c7;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x59802f){super(!![]),this['searchService']=_0x59802f;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x57b510){super(![]),this['problem']=_0x57b510;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x3c9d2a){super(!![]),this['searchService']=_0x3c9d2a;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServiceResponse extends Response{constructor(_0xe569c0){super(![]),this['problem']=_0xe569c0;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x1bafe9){super(!![]),this['apiKeyValue']=_0x1bafe9;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x3b846a){super(!![]),this['obj']=_0x3b846a;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x5eb491){super(![]),this['problem']=_0x5eb491;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x47e230){super(![]),this['problem']=_0x47e230;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
1
+ var TokenStatus;(function(_0x2e2ba5){_0x2e2ba5[_0x2e2ba5['Ok']=0x0]='Ok',_0x2e2ba5[_0x2e2ba5['Refresh']=0x1]='Refresh',_0x2e2ba5[_0x2e2ba5['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(_0x2ba162){this['isSuccess']=_0x2ba162;}}class SuccessfulAccountResponse extends Response{constructor(_0x58a647){super(!![]),this['account']=_0x58a647;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x5df227){super(![]),this['problem']=_0x5df227;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x779662){super(!![]),this['tokens']=_0x779662;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x292bb1){super(![]),this['problem']=_0x292bb1;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x3dba2d){super(!![]),this['apiKey']=_0x3dba2d;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x4de8fc){super(![]),this['problem']=_0x4de8fc;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x115ab3){super(!![]),this['searchService']=_0x115ab3;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x4f0a87){super(![]),this['problem']=_0x4f0a87;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x14e378){super(!![]),this['searchService']=_0x14e378;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServiceResponse extends Response{constructor(_0x37cb03){super(![]),this['problem']=_0x37cb03;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x48b761){super(!![]),this['apiKeyValue']=_0x48b761;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x564026){super(!![]),this['obj']=_0x564026;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x3215d5){super(![]),this['problem']=_0x3215d5;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x5cc5bd){super(![]),this['problem']=_0x5cc5bd;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
2
2
 
3
- var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x398f8b,_0x54116c,_0xf9f5fe,_0x5df177){function _0x336dd9(_0x501eba){return _0x501eba instanceof _0xf9f5fe?_0x501eba:new _0xf9f5fe(function(_0x12045a){_0x12045a(_0x501eba);});}return new(_0xf9f5fe||(_0xf9f5fe=Promise))(function(_0x19e5e9,_0xfd472f){function _0x4bb307(_0x2be13b){try{_0x48caff(_0x5df177['next'](_0x2be13b));}catch(_0x52090b){_0xfd472f(_0x52090b);}}function _0x38a017(_0x5a1b7e){try{_0x48caff(_0x5df177['throw'](_0x5a1b7e));}catch(_0x27b423){_0xfd472f(_0x27b423);}}function _0x48caff(_0x55fbe9){_0x55fbe9['done']?_0x19e5e9(_0x55fbe9['value']):_0x336dd9(_0x55fbe9['value'])['then'](_0x4bb307,_0x38a017);}_0x48caff((_0x5df177=_0x5df177['apply'](_0x398f8b,_0x54116c||[]))['next']());});};class AccountService{constructor(_0x1f8046){this['fetch']=_0x1f8046;}['get'](_0x44d715,_0x535f6e){return __awaiter$5(this,void 0,void 0,function*(){const _0x33492c='Account/'+_0x44d715+'/',_0x2919f8=yield this['fetch']['get'](_0x33492c,_0x535f6e);try{if(_0x2919f8['status']>0xc7&&_0x2919f8['status']<0x12c){const _0x903910=yield _0x2919f8['json']();return new SuccessfulAccountResponse(_0x903910);}const _0x8d0e12=yield _0x2919f8['json']();return new FailedAccountResponse(_0x8d0e12);}catch(_0x411612){if(_0x411612 instanceof Error)return new FailedAccountResponse({'detail':_0x411612['message'],'title':_0x411612['name'],'status':0x1f4,'instance':'','type':''});throw _0x411612;}});}}
3
+ var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x16ea3b,_0x5bf13e,_0x53f57a,_0x2cc8f1){function _0x2b50a6(_0x27b4ba){return _0x27b4ba instanceof _0x53f57a?_0x27b4ba:new _0x53f57a(function(_0x3db530){_0x3db530(_0x27b4ba);});}return new(_0x53f57a||(_0x53f57a=Promise))(function(_0x1b72dc,_0x3ea459){function _0x4b3964(_0xc82d4c){try{_0x34a501(_0x2cc8f1['next'](_0xc82d4c));}catch(_0x3d875d){_0x3ea459(_0x3d875d);}}function _0x592da3(_0x11217c){try{_0x34a501(_0x2cc8f1['throw'](_0x11217c));}catch(_0x14c758){_0x3ea459(_0x14c758);}}function _0x34a501(_0xb02d61){_0xb02d61['done']?_0x1b72dc(_0xb02d61['value']):_0x2b50a6(_0xb02d61['value'])['then'](_0x4b3964,_0x592da3);}_0x34a501((_0x2cc8f1=_0x2cc8f1['apply'](_0x16ea3b,_0x5bf13e||[]))['next']());});};class AccountService{constructor(_0x5102e5){this['fetch']=_0x5102e5;}['get'](_0x41b3e3,_0x33e3f5){return __awaiter$5(this,void 0,void 0,function*(){const _0x65798c='Account/'+_0x41b3e3+'/',_0x1546fa=yield this['fetch']['get'](_0x65798c,_0x33e3f5);try{if(_0x1546fa['status']>0xc7&&_0x1546fa['status']<0x12c){const _0x13b161=yield _0x1546fa['json']();return new SuccessfulAccountResponse(_0x13b161);}const _0x1fd421=yield _0x1546fa['json']();return new FailedAccountResponse(_0x1fd421);}catch(_0x52c7e5){if(_0x52c7e5 instanceof Error)return new FailedAccountResponse({'detail':_0x52c7e5['message'],'title':_0x52c7e5['name'],'status':0x1f4,'instance':'','type':''});throw _0x52c7e5;}});}}
4
4
 
5
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x505088,_0x159649,_0x327e23,_0x41efc9){function _0x3107df(_0x15c31b){return _0x15c31b instanceof _0x327e23?_0x15c31b:new _0x327e23(function(_0x1c9aa3){_0x1c9aa3(_0x15c31b);});}return new(_0x327e23||(_0x327e23=Promise))(function(_0x2d6335,_0xa5961){function _0x10ce79(_0x1ffe35){try{_0x5e287b(_0x41efc9['next'](_0x1ffe35));}catch(_0x54cd61){_0xa5961(_0x54cd61);}}function _0x24c2f3(_0x1b10eb){try{_0x5e287b(_0x41efc9['throw'](_0x1b10eb));}catch(_0x583f33){_0xa5961(_0x583f33);}}function _0x5e287b(_0x358095){_0x358095['done']?_0x2d6335(_0x358095['value']):_0x3107df(_0x358095['value'])['then'](_0x10ce79,_0x24c2f3);}_0x5e287b((_0x41efc9=_0x41efc9['apply'](_0x505088,_0x159649||[]))['next']());});};class ApiKeyService{constructor(_0x502cc8){this['fetch']=_0x502cc8,this['path']='api-key';}['create'](_0x2c3674,_0xbff849,_0x52257a){return __awaiter$4(this,void 0,void 0,function*(){const _0x2cf981={'account_name':_0x2c3674,'api_key_name':_0xbff849};try{const _0x1bded8=yield this['fetch']['post'](this['path'],_0x52257a,_0x2cf981);if(_0x1bded8['status']>0xc7&&_0x1bded8['status']<0x12c){const _0x4a4e18=yield _0x1bded8['json']();return new SuccessfulApiKeyResponse(_0x4a4e18);}const _0x23658d=yield _0x1bded8['json']();return new FailedApiKeyResponse(_0x23658d);}catch(_0x10f879){if(_0x10f879 instanceof Error)return new FailedApiKeyResponse({'detail':_0x10f879['message'],'title':_0x10f879['name'],'status':0x1f4,'instance':'','type':''});throw _0x10f879;}});}['view'](_0x4d6dd9,_0x719b16,_0x32cb85){return __awaiter$4(this,void 0,void 0,function*(){const _0x592744=this['path']+'/'+_0x4d6dd9+'/'+_0x719b16;try{const _0x43e2a3=yield this['fetch']['get'](_0x592744,_0x32cb85);if(_0x43e2a3['status']>0xc7&&_0x43e2a3['status']<0x12c){const _0x1cc273=yield _0x43e2a3['json']();return new SuccessfulApiKeyValueResponse(_0x1cc273);}const _0x2a3f0d=yield _0x43e2a3['json']();return new FailedApiKeyValueResponse(_0x2a3f0d);}catch(_0x4d485c){if(_0x4d485c instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x4d485c['message'],'title':_0x4d485c['name'],'status':0x1f4,'instance':'','type':''});throw _0x4d485c;}});}['delete'](_0x50651b,_0x238dd0,_0x1949a4){return __awaiter$4(this,void 0,void 0,function*(){const _0x2bdab1=this['path']+'/'+_0x50651b+'/'+_0x238dd0;try{const _0x89551=yield this['fetch']['delete'](_0x2bdab1,_0x1949a4);if(_0x89551['status']>0xc7&&_0x89551['status']<0x12c)return new SuccessfulResponse({});const _0x492d04=yield _0x89551['json']();return new FailedResponse(_0x492d04);}catch(_0x346549){if(_0x346549 instanceof Error)return new FailedResponse({'detail':_0x346549['message'],'title':_0x346549['name'],'status':0x1f4,'instance':'','type':''});throw _0x346549;}});}}
5
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x49ad61,_0x1b4749,_0x2aed95,_0x2d1ee4){function _0x3c0b65(_0x1ec0f4){return _0x1ec0f4 instanceof _0x2aed95?_0x1ec0f4:new _0x2aed95(function(_0x548c6d){_0x548c6d(_0x1ec0f4);});}return new(_0x2aed95||(_0x2aed95=Promise))(function(_0x4ee647,_0x299bc5){function _0x249306(_0x3e1b93){try{_0x31066c(_0x2d1ee4['next'](_0x3e1b93));}catch(_0x13d4ba){_0x299bc5(_0x13d4ba);}}function _0x296788(_0x23457c){try{_0x31066c(_0x2d1ee4['throw'](_0x23457c));}catch(_0xe0a3df){_0x299bc5(_0xe0a3df);}}function _0x31066c(_0x1d96a5){_0x1d96a5['done']?_0x4ee647(_0x1d96a5['value']):_0x3c0b65(_0x1d96a5['value'])['then'](_0x249306,_0x296788);}_0x31066c((_0x2d1ee4=_0x2d1ee4['apply'](_0x49ad61,_0x1b4749||[]))['next']());});};class ApiKeyService{constructor(_0x417811){this['fetch']=_0x417811,this['path']='api-key';}['create'](_0x5ab070,_0x369d8b,_0x31f14e){return __awaiter$4(this,void 0,void 0,function*(){const _0x370336={'account_name':_0x5ab070,'api_key_name':_0x369d8b};try{const _0x3c6638=yield this['fetch']['post'](this['path'],_0x31f14e,_0x370336);if(_0x3c6638['status']>0xc7&&_0x3c6638['status']<0x12c){const _0x3fc69a=yield _0x3c6638['json']();return new SuccessfulApiKeyResponse(_0x3fc69a);}const _0xc9de25=yield _0x3c6638['json']();return new FailedApiKeyResponse(_0xc9de25);}catch(_0x45bd29){if(_0x45bd29 instanceof Error)return new FailedApiKeyResponse({'detail':_0x45bd29['message'],'title':_0x45bd29['name'],'status':0x1f4,'instance':'','type':''});throw _0x45bd29;}});}['view'](_0x7bfe2,_0xe5539c,_0x235bbd){return __awaiter$4(this,void 0,void 0,function*(){const _0x53f7e2=this['path']+'/'+_0x7bfe2+'/'+_0xe5539c;try{const _0x389f8e=yield this['fetch']['get'](_0x53f7e2,_0x235bbd);if(_0x389f8e['status']>0xc7&&_0x389f8e['status']<0x12c){const _0x4aeedb=yield _0x389f8e['json']();return new SuccessfulApiKeyValueResponse(_0x4aeedb);}const _0x302fe6=yield _0x389f8e['json']();return new FailedApiKeyValueResponse(_0x302fe6);}catch(_0x24d34e){if(_0x24d34e instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x24d34e['message'],'title':_0x24d34e['name'],'status':0x1f4,'instance':'','type':''});throw _0x24d34e;}});}['delete'](_0x733292,_0x4450f7,_0x55dfd5){return __awaiter$4(this,void 0,void 0,function*(){const _0x542197=this['path']+'/'+_0x733292+'/'+_0x4450f7;try{const _0x5d8ab6=yield this['fetch']['delete'](_0x542197,_0x55dfd5);if(_0x5d8ab6['status']>0xc7&&_0x5d8ab6['status']<0x12c)return new SuccessfulResponse({});const _0x27220e=yield _0x5d8ab6['json']();return new FailedResponse(_0x27220e);}catch(_0x815433){if(_0x815433 instanceof Error)return new FailedResponse({'detail':_0x815433['message'],'title':_0x815433['name'],'status':0x1f4,'instance':'','type':''});throw _0x815433;}});}}
6
6
 
7
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x18a808,_0x139ec6,_0x586863,_0x486a81){function _0x40e084(_0x1105ff){return _0x1105ff instanceof _0x586863?_0x1105ff:new _0x586863(function(_0x23bc53){_0x23bc53(_0x1105ff);});}return new(_0x586863||(_0x586863=Promise))(function(_0x2356f2,_0x468679){function _0x486d1c(_0x5799){try{_0x8c6c03(_0x486a81['next'](_0x5799));}catch(_0x350a43){_0x468679(_0x350a43);}}function _0x570a96(_0x5aaf49){try{_0x8c6c03(_0x486a81['throw'](_0x5aaf49));}catch(_0xbde17b){_0x468679(_0xbde17b);}}function _0x8c6c03(_0xda41cd){_0xda41cd['done']?_0x2356f2(_0xda41cd['value']):_0x40e084(_0xda41cd['value'])['then'](_0x486d1c,_0x570a96);}_0x8c6c03((_0x486a81=_0x486a81['apply'](_0x18a808,_0x139ec6||[]))['next']());});};class ListService{constructor(_0x279421){this['fetch']=_0x279421;}['add'](_0x555863,_0x3f5d0f,_0x5dd079){return __awaiter$3(this,void 0,void 0,function*(){const _0x34a0dc='List',_0x5aa9f4={'account_name':_0x555863,'list_name':_0x3f5d0f};try{const _0x52a3c8=yield this['fetch']['post'](_0x34a0dc,_0x5dd079,_0x5aa9f4);if(_0x52a3c8['status']>0xc7&&_0x52a3c8['status']<0x12c){const _0x21af37=yield _0x52a3c8['json']();return new SuccessfulAccountResponse(_0x21af37);}const _0x560264=yield _0x52a3c8['json']();return new FailedAccountResponse(_0x560264);}catch(_0x2d076b){if(_0x2d076b instanceof Error)return new FailedAccountResponse({'detail':_0x2d076b['message'],'title':_0x2d076b['name'],'status':0x1f4,'instance':'','type':''});throw _0x2d076b;}});}['remove'](_0x3f8715,_0x547e86,_0x277bd4){return __awaiter$3(this,void 0,void 0,function*(){const _0x8ff6c4='List/'+_0x3f8715+'/'+_0x547e86,_0x40c8e2=yield this['fetch']['delete'](_0x8ff6c4,_0x277bd4);try{if(_0x40c8e2['status']>0xc7&&_0x40c8e2['status']<0x12c){const _0xedd05c=yield _0x40c8e2['json']();return new SuccessfulAccountResponse(_0xedd05c);}const _0x13afb7=yield _0x40c8e2['json']();return new FailedAccountResponse(_0x13afb7);}catch(_0x4695f1){if(_0x4695f1 instanceof Error)return new FailedAccountResponse({'detail':_0x4695f1['message'],'title':_0x4695f1['name'],'status':0x1f4,'instance':'','type':''});throw _0x4695f1;}});}}
7
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x189882,_0x8708fb,_0x1fe262,_0x576cf2){function _0x56ea75(_0x40d06e){return _0x40d06e instanceof _0x1fe262?_0x40d06e:new _0x1fe262(function(_0x2e74fc){_0x2e74fc(_0x40d06e);});}return new(_0x1fe262||(_0x1fe262=Promise))(function(_0x368a90,_0x22c2f2){function _0xa5148e(_0x212b8c){try{_0x56bf2d(_0x576cf2['next'](_0x212b8c));}catch(_0x198c75){_0x22c2f2(_0x198c75);}}function _0x1083f2(_0x4c0590){try{_0x56bf2d(_0x576cf2['throw'](_0x4c0590));}catch(_0x317be8){_0x22c2f2(_0x317be8);}}function _0x56bf2d(_0x5e0ed1){_0x5e0ed1['done']?_0x368a90(_0x5e0ed1['value']):_0x56ea75(_0x5e0ed1['value'])['then'](_0xa5148e,_0x1083f2);}_0x56bf2d((_0x576cf2=_0x576cf2['apply'](_0x189882,_0x8708fb||[]))['next']());});};class ListService{constructor(_0x139333){this['fetch']=_0x139333;}['add'](_0x2ba8cd,_0x4b570d,_0x42a916){return __awaiter$3(this,void 0,void 0,function*(){const _0x556361='List',_0x2c3a81={'account_name':_0x2ba8cd,'list_name':_0x4b570d};try{const _0x5d1174=yield this['fetch']['post'](_0x556361,_0x42a916,_0x2c3a81);if(_0x5d1174['status']>0xc7&&_0x5d1174['status']<0x12c){const _0x30918d=yield _0x5d1174['json']();return new SuccessfulAccountResponse(_0x30918d);}const _0x5cedac=yield _0x5d1174['json']();return new FailedAccountResponse(_0x5cedac);}catch(_0x16cdd3){if(_0x16cdd3 instanceof Error)return new FailedAccountResponse({'detail':_0x16cdd3['message'],'title':_0x16cdd3['name'],'status':0x1f4,'instance':'','type':''});throw _0x16cdd3;}});}['remove'](_0x24ef97,_0x5a5c6a,_0x4c59ab){return __awaiter$3(this,void 0,void 0,function*(){const _0x39dcfd='List/'+_0x24ef97+'/'+_0x5a5c6a,_0x131590=yield this['fetch']['delete'](_0x39dcfd,_0x4c59ab);try{if(_0x131590['status']>0xc7&&_0x131590['status']<0x12c){const _0x8d675d=yield _0x131590['json']();return new SuccessfulAccountResponse(_0x8d675d);}const _0xa0b198=yield _0x131590['json']();return new FailedAccountResponse(_0xa0b198);}catch(_0x2758fc){if(_0x2758fc instanceof Error)return new FailedAccountResponse({'detail':_0x2758fc['message'],'title':_0x2758fc['name'],'status':0x1f4,'instance':'','type':''});throw _0x2758fc;}});}}
8
8
 
9
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x2bdf8d,_0x1e1c86,_0x4d3126,_0x286360){function _0x1562fc(_0x40024d){return _0x40024d instanceof _0x4d3126?_0x40024d:new _0x4d3126(function(_0x5cef9d){_0x5cef9d(_0x40024d);});}return new(_0x4d3126||(_0x4d3126=Promise))(function(_0x3e2318,_0x375510){function _0x5846da(_0x44b863){try{_0x4202a5(_0x286360['next'](_0x44b863));}catch(_0x4ecf9b){_0x375510(_0x4ecf9b);}}function _0xe9e3ee(_0x487040){try{_0x4202a5(_0x286360['throw'](_0x487040));}catch(_0x3f5493){_0x375510(_0x3f5493);}}function _0x4202a5(_0x3df88f){_0x3df88f['done']?_0x3e2318(_0x3df88f['value']):_0x1562fc(_0x3df88f['value'])['then'](_0x5846da,_0xe9e3ee);}_0x4202a5((_0x286360=_0x286360['apply'](_0x2bdf8d,_0x1e1c86||[]))['next']());});};class Fetch{constructor(_0x464e66){this['baseUri']=_0x464e66,this['getUrl']=_0x3f8f7a=>{return _0x3f8f7a['startsWith']('/')&&(_0x3f8f7a=_0x3f8f7a['replace']('/','')),''+this['baseUri']+_0x3f8f7a;},!_0x464e66['endsWith']('/')&&(_0x464e66=_0x464e66+'/');}['get'](_0x2298d4,_0x46359f){return __awaiter$2(this,void 0,void 0,function*(){const _0x3b3b92=this['getUrl'](_0x2298d4);return yield fetch(_0x3b3b92,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x46359f}});});}['post'](_0x40040c,_0x3d053d,_0x26d002){return __awaiter$2(this,void 0,void 0,function*(){const _0x4dfa81=this['getUrl'](_0x40040c);return yield fetch(_0x4dfa81,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3d053d},'body':_0x26d002?JSON['stringify'](_0x26d002):null});});}['put'](_0x5048ee,_0x38992c,_0x1a519e){return __awaiter$2(this,void 0,void 0,function*(){const _0x4b5627=this['getUrl'](_0x5048ee);return yield fetch(_0x4b5627,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x38992c},'body':_0x1a519e?JSON['stringify'](_0x1a519e):null});});}['delete'](_0x217087,_0x3ae04c){return __awaiter$2(this,void 0,void 0,function*(){const _0x55a3d1=this['getUrl'](_0x217087);return yield fetch(_0x55a3d1,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3ae04c}});});}}
9
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x10561f,_0x563865,_0x2ba145,_0x104209){function _0x1a1c80(_0x56a932){return _0x56a932 instanceof _0x2ba145?_0x56a932:new _0x2ba145(function(_0x3d3d80){_0x3d3d80(_0x56a932);});}return new(_0x2ba145||(_0x2ba145=Promise))(function(_0x678b2,_0x4ee6a1){function _0x5e9f98(_0x430de7){try{_0xbdac9e(_0x104209['next'](_0x430de7));}catch(_0x32ae56){_0x4ee6a1(_0x32ae56);}}function _0x579f7e(_0x15542d){try{_0xbdac9e(_0x104209['throw'](_0x15542d));}catch(_0x211766){_0x4ee6a1(_0x211766);}}function _0xbdac9e(_0x478897){_0x478897['done']?_0x678b2(_0x478897['value']):_0x1a1c80(_0x478897['value'])['then'](_0x5e9f98,_0x579f7e);}_0xbdac9e((_0x104209=_0x104209['apply'](_0x10561f,_0x563865||[]))['next']());});};class Fetch{constructor(_0x2e776c){this['baseUri']=_0x2e776c,this['getUrl']=_0x410e46=>{return _0x410e46['startsWith']('/')&&(_0x410e46=_0x410e46['replace']('/','')),''+this['baseUri']+_0x410e46;},!_0x2e776c['endsWith']('/')&&(_0x2e776c=_0x2e776c+'/');}['get'](_0x419241,_0x11768b){return __awaiter$2(this,void 0,void 0,function*(){const _0x6a83d5=this['getUrl'](_0x419241);return yield fetch(_0x6a83d5,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x11768b}});});}['post'](_0x4603ed,_0x57206e,_0x54ddd1){return __awaiter$2(this,void 0,void 0,function*(){const _0x513c0c=this['getUrl'](_0x4603ed);return yield fetch(_0x513c0c,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x57206e},'body':_0x54ddd1?JSON['stringify'](_0x54ddd1):null});});}['put'](_0x2d7bea,_0x752886,_0x3ef91e){return __awaiter$2(this,void 0,void 0,function*(){const _0x4427c1=this['getUrl'](_0x2d7bea);return yield fetch(_0x4427c1,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x752886},'body':_0x3ef91e?JSON['stringify'](_0x3ef91e):null});});}['delete'](_0x38aaf3,_0x4fc4e2){return __awaiter$2(this,void 0,void 0,function*(){const _0x362146=this['getUrl'](_0x38aaf3);return yield fetch(_0x362146,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4fc4e2}});});}}
10
10
 
11
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x482681,_0x5b10b7,_0x4f05b0,_0x156f7f){function _0x5e796f(_0x39084b){return _0x39084b instanceof _0x4f05b0?_0x39084b:new _0x4f05b0(function(_0x4fa4cc){_0x4fa4cc(_0x39084b);});}return new(_0x4f05b0||(_0x4f05b0=Promise))(function(_0x3f4e47,_0xf5cc32){function _0x3fc4d1(_0x49a31e){try{_0x45a382(_0x156f7f['next'](_0x49a31e));}catch(_0x5de3cc){_0xf5cc32(_0x5de3cc);}}function _0x39f641(_0x193d67){try{_0x45a382(_0x156f7f['throw'](_0x193d67));}catch(_0x3b1157){_0xf5cc32(_0x3b1157);}}function _0x45a382(_0x2001b9){_0x2001b9['done']?_0x3f4e47(_0x2001b9['value']):_0x5e796f(_0x2001b9['value'])['then'](_0x3fc4d1,_0x39f641);}_0x45a382((_0x156f7f=_0x156f7f['apply'](_0x482681,_0x5b10b7||[]))['next']());});};class SearchServersService{constructor(_0x3edc1a){this['fetch']=_0x3edc1a,this['path']='search-services';}['create'](_0x5d23aa,_0x2f0de5,_0x59bb12,_0x364758,_0x1ccfad,_0x2a47bb,_0x14b1aa,_0x261257){return __awaiter$1(this,void 0,void 0,function*(){const _0x35d1fc={'account_name':_0x5d23aa,'search_service_name':_0x2f0de5,'endpoint':_0x59bb12,'key':_0x364758,'county':_0x1ccfad,'provider':_0x2a47bb,'index_name':_0x14b1aa};try{const _0x590cb4=yield this['fetch']['post'](this['path'],_0x261257,_0x35d1fc);if(_0x590cb4['status']>0xc7&&_0x590cb4['status']<0x12c){const _0x412a91=yield _0x590cb4['json']();return new SuccessfulSearchServiceResponse(_0x412a91);}const _0x4c1145=yield _0x590cb4['json']();return new FailedSearchServiceResponse(_0x4c1145);}catch(_0x6d5b38){if(_0x6d5b38 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x6d5b38['message'],'title':_0x6d5b38['name'],'status':0x1f4,'instance':'','type':''});throw _0x6d5b38;}});}['delete'](_0x58225e,_0x3b09bd,_0x297a3a){return __awaiter$1(this,void 0,void 0,function*(){const _0x5bc371=this['path']+'/'+_0x58225e+'/'+_0x3b09bd;try{const _0x4c7258=yield this['fetch']['delete'](_0x5bc371,_0x297a3a);if(_0x4c7258['status']>0xc7&&_0x4c7258['status']<0x12c)return new SuccessfulResponse({});const _0xf15f18=yield _0x4c7258['json']();return new FailedResponse(_0xf15f18);}catch(_0x5e1562){if(_0x5e1562 instanceof Error)return new FailedResponse({'detail':_0x5e1562['message'],'title':_0x5e1562['name'],'status':0x1f4,'instance':'','type':''});throw _0x5e1562;}});}['view'](_0x2ab9be,_0x286cdf,_0x29efe3){return __awaiter$1(this,void 0,void 0,function*(){const _0x1af4de=this['path']+'/'+_0x2ab9be+'/'+_0x286cdf;try{const _0x10f46f=yield this['fetch']['get'](_0x1af4de,_0x29efe3);if(_0x10f46f['status']>0xc7&&_0x10f46f['status']<0x12c){const _0xda9bef=yield _0x10f46f['json']();return new SuccessfulViewSearchServiceResponse(_0xda9bef);}const _0x45dc8e=yield _0x10f46f['json']();return new FailedViewSearchServiceResponse(_0x45dc8e);}catch(_0x2d881e){if(_0x2d881e instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x2d881e['message'],'title':_0x2d881e['name'],'status':0x1f4,'instance':'','type':''});throw _0x2d881e;}});}}
11
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x3a4598,_0x1db2de,_0x40e473,_0x922e43){function _0x5553ce(_0x58ddd7){return _0x58ddd7 instanceof _0x40e473?_0x58ddd7:new _0x40e473(function(_0x36c901){_0x36c901(_0x58ddd7);});}return new(_0x40e473||(_0x40e473=Promise))(function(_0x465c67,_0x4e425b){function _0x14aad4(_0x34323f){try{_0x116fb3(_0x922e43['next'](_0x34323f));}catch(_0x22b4be){_0x4e425b(_0x22b4be);}}function _0x213bb7(_0x4ddc2){try{_0x116fb3(_0x922e43['throw'](_0x4ddc2));}catch(_0x20b8d6){_0x4e425b(_0x20b8d6);}}function _0x116fb3(_0x4c8165){_0x4c8165['done']?_0x465c67(_0x4c8165['value']):_0x5553ce(_0x4c8165['value'])['then'](_0x14aad4,_0x213bb7);}_0x116fb3((_0x922e43=_0x922e43['apply'](_0x3a4598,_0x1db2de||[]))['next']());});};class SearchServersService{constructor(_0x4ab848){this['fetch']=_0x4ab848,this['path']='search-services';}['create'](_0x300ce7,_0x5f3086,_0x5da9c2,_0x53c4fd,_0x41e6d8,_0x29a1b0,_0x14a287,_0x83efc5){return __awaiter$1(this,void 0,void 0,function*(){const _0x58633e={'account_name':_0x300ce7,'search_service_name':_0x5f3086,'endpoint':_0x5da9c2,'key':_0x53c4fd,'country':_0x41e6d8,'provider':_0x29a1b0,'index_name':_0x14a287};try{const _0x4fd4c8=yield this['fetch']['post'](this['path'],_0x83efc5,_0x58633e);if(_0x4fd4c8['status']>0xc7&&_0x4fd4c8['status']<0x12c){const _0x249e51=yield _0x4fd4c8['json']();return new SuccessfulSearchServiceResponse(_0x249e51);}const _0x2bb06b=yield _0x4fd4c8['json']();return new FailedSearchServiceResponse(_0x2bb06b);}catch(_0x2a6c38){if(_0x2a6c38 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x2a6c38['message'],'title':_0x2a6c38['name'],'status':0x1f4,'instance':'','type':''});throw _0x2a6c38;}});}['delete'](_0x140240,_0x13930f,_0x259136){return __awaiter$1(this,void 0,void 0,function*(){const _0x168405=this['path']+'/'+_0x140240+'/'+_0x13930f;try{const _0x915472=yield this['fetch']['delete'](_0x168405,_0x259136);if(_0x915472['status']>0xc7&&_0x915472['status']<0x12c)return new SuccessfulResponse({});const _0x155970=yield _0x915472['json']();return new FailedResponse(_0x155970);}catch(_0xda9288){if(_0xda9288 instanceof Error)return new FailedResponse({'detail':_0xda9288['message'],'title':_0xda9288['name'],'status':0x1f4,'instance':'','type':''});throw _0xda9288;}});}['view'](_0xab272,_0x4f9fbc,_0x1ca0ec){return __awaiter$1(this,void 0,void 0,function*(){const _0x477395=this['path']+'/'+_0xab272+'/'+_0x4f9fbc;try{const _0x12c8b7=yield this['fetch']['get'](_0x477395,_0x1ca0ec);if(_0x12c8b7['status']>0xc7&&_0x12c8b7['status']<0x12c){const _0x5415be=yield _0x12c8b7['json']();return new SuccessfulViewSearchServiceResponse(_0x5415be);}const _0x5292d5=yield _0x12c8b7['json']();return new FailedViewSearchServiceResponse(_0x5292d5);}catch(_0x3f51a2){if(_0x3f51a2 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x3f51a2['message'],'title':_0x3f51a2['name'],'status':0x1f4,'instance':'','type':''});throw _0x3f51a2;}});}}
12
12
 
13
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x10c6e4,_0x2e189b,_0x498736,_0x30c1e8){function _0x187e90(_0x313fb7){return _0x313fb7 instanceof _0x498736?_0x313fb7:new _0x498736(function(_0x390275){_0x390275(_0x313fb7);});}return new(_0x498736||(_0x498736=Promise))(function(_0x35fbc6,_0x4c0579){function _0x486de9(_0x227e8e){try{_0x2c7d27(_0x30c1e8['next'](_0x227e8e));}catch(_0x34feec){_0x4c0579(_0x34feec);}}function _0x10b28a(_0x4095d1){try{_0x2c7d27(_0x30c1e8['throw'](_0x4095d1));}catch(_0x1be957){_0x4c0579(_0x1be957);}}function _0x2c7d27(_0x35fa37){_0x35fa37['done']?_0x35fbc6(_0x35fa37['value']):_0x187e90(_0x35fa37['value'])['then'](_0x486de9,_0x10b28a);}_0x2c7d27((_0x30c1e8=_0x30c1e8['apply'](_0x10c6e4,_0x2e189b||[]))['next']());});};class AdminClient{constructor(_0x3883b0='https://admin.searchability.dev/'){var _0x4a7d61=new Fetch(_0x3883b0);this['Accounts']=new AccountService(_0x4a7d61),this['Lists']=new ListService(_0x4a7d61),this['ApiKeys']=new ApiKeyService(_0x4a7d61),this['SearchServices']=new SearchServersService(_0x4a7d61);}}class AuthClient{constructor(_0x28c7ce='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x28c7ce);}['login'](_0x59ac26){return __awaiter(this,void 0,void 0,function*(){var _0x3f20e4='login/'+_0x59ac26;try{const _0x2667d7=yield yield fetch(_0x3f20e4);if(_0x2667d7['status']>0xc7&&_0x2667d7['status']<0x12c){const _0xb9f4ab=yield _0x2667d7['json']();return new SuccessfulAuthResponse(_0xb9f4ab);}const _0x4ad58d=yield _0x2667d7['json']();return new FailedAuthResponse(_0x4ad58d);}catch(_0x124141){if(_0x124141 instanceof Error)return new FailedAuthResponse({'detail':_0x124141['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x124141;}});}['refresh'](_0xa1a217){return __awaiter(this,void 0,void 0,function*(){var _0x13db93='refresh';try{const _0xc522b1=yield this['fetch']['post'](_0x13db93,_0xa1a217,null);if(_0xc522b1['status']>0xc7&&_0xc522b1['status']<0x12c){const _0x421431=yield _0xc522b1['json']();return new SuccessfulAuthResponse(_0x421431);}const _0x13cdb9=yield _0xc522b1['json']();return new FailedAuthResponse(_0x13cdb9);}catch(_0x157235){if(_0x157235 instanceof Error)return new FailedAuthResponse({'detail':_0x157235['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x157235;}});}['getTokenStatus'](_0x3b6e4b){if(Date['now']()<_0x3b6e4b['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x3b6e4b['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
13
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x50f70f,_0x193b3c,_0x117634,_0x212425){function _0x31ed64(_0x2ea64d){return _0x2ea64d instanceof _0x117634?_0x2ea64d:new _0x117634(function(_0x2a97ca){_0x2a97ca(_0x2ea64d);});}return new(_0x117634||(_0x117634=Promise))(function(_0x26c965,_0x24801c){function _0x4f74bf(_0xfb602f){try{_0x24ba1c(_0x212425['next'](_0xfb602f));}catch(_0x48b8e6){_0x24801c(_0x48b8e6);}}function _0x460922(_0x3e63b1){try{_0x24ba1c(_0x212425['throw'](_0x3e63b1));}catch(_0x18fae1){_0x24801c(_0x18fae1);}}function _0x24ba1c(_0x277b9e){_0x277b9e['done']?_0x26c965(_0x277b9e['value']):_0x31ed64(_0x277b9e['value'])['then'](_0x4f74bf,_0x460922);}_0x24ba1c((_0x212425=_0x212425['apply'](_0x50f70f,_0x193b3c||[]))['next']());});};class AdminClient{constructor(_0xf2496='https://admin.searchability.dev/'){var _0x316ff6=new Fetch(_0xf2496);this['Accounts']=new AccountService(_0x316ff6),this['Lists']=new ListService(_0x316ff6),this['ApiKeys']=new ApiKeyService(_0x316ff6),this['SearchServices']=new SearchServersService(_0x316ff6);}}class AuthClient{constructor(_0x1d2728='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x1d2728);}['login'](_0x1a81a2){return __awaiter(this,void 0,void 0,function*(){var _0x52e582='login/'+_0x1a81a2;try{const _0x4912b6=yield yield fetch(_0x52e582);if(_0x4912b6['status']>0xc7&&_0x4912b6['status']<0x12c){const _0x1b5473=yield _0x4912b6['json']();return new SuccessfulAuthResponse(_0x1b5473);}const _0x450b64=yield _0x4912b6['json']();return new FailedAuthResponse(_0x450b64);}catch(_0x1e488a){if(_0x1e488a instanceof Error)return new FailedAuthResponse({'detail':_0x1e488a['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x1e488a;}});}['refresh'](_0xf3020d){return __awaiter(this,void 0,void 0,function*(){var _0xbc7d1c='refresh';try{const _0x5e6e06=yield this['fetch']['post'](_0xbc7d1c,_0xf3020d,null);if(_0x5e6e06['status']>0xc7&&_0x5e6e06['status']<0x12c){const _0x20097b=yield _0x5e6e06['json']();return new SuccessfulAuthResponse(_0x20097b);}const _0x590c8e=yield _0x5e6e06['json']();return new FailedAuthResponse(_0x590c8e);}catch(_0x5d3d43){if(_0x5d3d43 instanceof Error)return new FailedAuthResponse({'detail':_0x5d3d43['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x5d3d43;}});}['getTokenStatus'](_0x15ab5a){if(Date['now']()<_0x15ab5a['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x15ab5a['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
14
14
 
15
15
  export { AdminClient, AuthClient, TokenStatus, Tokens };
package/dist/types.d.ts CHANGED
@@ -34,7 +34,7 @@ declare class SearchServersService {
34
34
  private readonly fetch;
35
35
  private readonly path;
36
36
  constructor(fetch: Fetch);
37
- create(account_name: string, search_service_name: string, endpoint: string, key: string, county: string, provider: string, index_name: string, access_token: string): Promise<Response<SearchService, Problem>>;
37
+ create(account_name: string, search_service_name: string, endpoint: string, key: string, country: string, provider: string, index_name: string, access_token: string): Promise<Response<SearchService, Problem>>;
38
38
  delete(account_name: string, search_service_name: string, access_token: string): Promise<Response<any, Problem>>;
39
39
  view(account_name: string, search_service_name: string, access_token: string): Promise<Response<SearchServiceDetails, Problem>>;
40
40
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@searchability/admin-client",
3
- "version": "0.0.40",
3
+ "version": "0.0.41",
4
4
  "description": "Searchability admin client.",
5
5
  "type": "module",
6
6
  "types": "./dist/types.d.ts",
@@ -1,15 +0,0 @@
1
- var TokenStatus;(function(_0x14c323){_0x14c323[_0x14c323['Ok']=0x0]='Ok',_0x14c323[_0x14c323['Refresh']=0x1]='Refresh',_0x14c323[_0x14c323['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(_0x45254f){this['isSuccess']=_0x45254f;}}class SuccessfulAccountResponse extends Response{constructor(_0x78e4a9){super(!![]),this['account']=_0x78e4a9;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x4b64cf){super(![]),this['problem']=_0x4b64cf;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x8b7fda){super(!![]),this['tokens']=_0x8b7fda;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x42da77){super(![]),this['problem']=_0x42da77;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x4a9ce2){super(!![]),this['apiKey']=_0x4a9ce2;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x11a863){super(![]),this['problem']=_0x11a863;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x6f69da){super(!![]),this['searchService']=_0x6f69da;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x32cc50){super(![]),this['problem']=_0x32cc50;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x48b6bc){super(!![]),this['searchService']=_0x48b6bc;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServiceResponse extends Response{constructor(_0x3bd2c2){super(![]),this['problem']=_0x3bd2c2;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0xc31e6d){super(!![]),this['apiKeyValue']=_0xc31e6d;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x4a03cf){super(!![]),this['obj']=_0x4a03cf;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x370603){super(![]),this['problem']=_0x370603;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x1469b9){super(![]),this['problem']=_0x1469b9;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
2
-
3
- var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x3c365c,_0x1d1fdd,_0x575a40,_0x7457e9){function _0x11767c(_0x479ee9){return _0x479ee9 instanceof _0x575a40?_0x479ee9:new _0x575a40(function(_0x2aab3d){_0x2aab3d(_0x479ee9);});}return new(_0x575a40||(_0x575a40=Promise))(function(_0x2d2a6e,_0x3db02d){function _0x2aa5b7(_0x1fe319){try{_0x52d05e(_0x7457e9['next'](_0x1fe319));}catch(_0x4ef43b){_0x3db02d(_0x4ef43b);}}function _0x5b55ae(_0x443872){try{_0x52d05e(_0x7457e9['throw'](_0x443872));}catch(_0x1530e9){_0x3db02d(_0x1530e9);}}function _0x52d05e(_0x272175){_0x272175['done']?_0x2d2a6e(_0x272175['value']):_0x11767c(_0x272175['value'])['then'](_0x2aa5b7,_0x5b55ae);}_0x52d05e((_0x7457e9=_0x7457e9['apply'](_0x3c365c,_0x1d1fdd||[]))['next']());});};class AccountService{constructor(_0x508759){this['fetch']=_0x508759;}['get'](_0x32c1d6,_0x846e6b){return __awaiter$5(this,void 0,void 0,function*(){const _0x126a70='Account/'+_0x32c1d6+'/',_0xc7fb8a=yield this['fetch']['get'](_0x126a70,_0x846e6b);try{if(_0xc7fb8a['status']>0xc7&&_0xc7fb8a['status']<0x12c){const _0xe505fd=yield _0xc7fb8a['json']();return new SuccessfulAccountResponse(_0xe505fd);}const _0x883870=yield _0xc7fb8a['json']();return new FailedAccountResponse(_0x883870);}catch(_0x17b89e){if(_0x17b89e instanceof Error)return new FailedAccountResponse({'detail':_0x17b89e['message'],'title':_0x17b89e['name'],'status':0x1f4,'instance':'','type':''});throw _0x17b89e;}});}}
4
-
5
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x24f60a,_0x56325e,_0x27fe92,_0x3f618b){function _0xd83249(_0x2aa8e8){return _0x2aa8e8 instanceof _0x27fe92?_0x2aa8e8:new _0x27fe92(function(_0x3867e8){_0x3867e8(_0x2aa8e8);});}return new(_0x27fe92||(_0x27fe92=Promise))(function(_0x10e844,_0x528bc1){function _0x1699fc(_0x3107a0){try{_0x5a9745(_0x3f618b['next'](_0x3107a0));}catch(_0x4eb364){_0x528bc1(_0x4eb364);}}function _0x458a9f(_0x272c3f){try{_0x5a9745(_0x3f618b['throw'](_0x272c3f));}catch(_0x54c60a){_0x528bc1(_0x54c60a);}}function _0x5a9745(_0x1cf690){_0x1cf690['done']?_0x10e844(_0x1cf690['value']):_0xd83249(_0x1cf690['value'])['then'](_0x1699fc,_0x458a9f);}_0x5a9745((_0x3f618b=_0x3f618b['apply'](_0x24f60a,_0x56325e||[]))['next']());});};class ApiKeyService{constructor(_0xb2593d){this['fetch']=_0xb2593d,this['path']='api-key';}['create'](_0x4ff407,_0x113cbc,_0x41a80b){return __awaiter$4(this,void 0,void 0,function*(){const _0x23f78d={'account_name':_0x4ff407,'api_key_name':_0x113cbc};try{const _0x5711b2=yield this['fetch']['post'](this['path'],_0x41a80b,_0x23f78d);if(_0x5711b2['status']>0xc7&&_0x5711b2['status']<0x12c){const _0x165833=yield _0x5711b2['json']();return new SuccessfulApiKeyResponse(_0x165833);}const _0x7f35f6=yield _0x5711b2['json']();return new FailedApiKeyResponse(_0x7f35f6);}catch(_0x1898cd){if(_0x1898cd instanceof Error)return new FailedApiKeyResponse({'detail':_0x1898cd['message'],'title':_0x1898cd['name'],'status':0x1f4,'instance':'','type':''});throw _0x1898cd;}});}['view'](_0x47ca9a,_0x2b7019,_0x25af99){return __awaiter$4(this,void 0,void 0,function*(){const _0x99a998=this['path']+'/'+_0x47ca9a+'/'+_0x2b7019;try{const _0x3ef048=yield this['fetch']['get'](_0x99a998,_0x25af99);if(_0x3ef048['status']>0xc7&&_0x3ef048['status']<0x12c){const _0xf76d87=yield _0x3ef048['json']();return new SuccessfulApiKeyValueResponse(_0xf76d87);}const _0x3ad5d0=yield _0x3ef048['json']();return new FailedApiKeyValueResponse(_0x3ad5d0);}catch(_0x2e0678){if(_0x2e0678 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x2e0678['message'],'title':_0x2e0678['name'],'status':0x1f4,'instance':'','type':''});throw _0x2e0678;}});}['delete'](_0x228efd,_0x4b74d2,_0x49756d){return __awaiter$4(this,void 0,void 0,function*(){const _0xa61347=this['path']+'/'+_0x228efd+'/'+_0x4b74d2;try{const _0x2e9421=yield this['fetch']['delete'](_0xa61347,_0x49756d);if(_0x2e9421['status']>0xc7&&_0x2e9421['status']<0x12c)return new SuccessfulResponse({});const _0x3cb256=yield _0x2e9421['json']();return new FailedResponse(_0x3cb256);}catch(_0x2e8de3){if(_0x2e8de3 instanceof Error)return new FailedResponse({'detail':_0x2e8de3['message'],'title':_0x2e8de3['name'],'status':0x1f4,'instance':'','type':''});throw _0x2e8de3;}});}}
6
-
7
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x30c957,_0x400e93,_0x55e393,_0x7f07ae){function _0x131311(_0x12e649){return _0x12e649 instanceof _0x55e393?_0x12e649:new _0x55e393(function(_0x48ed7c){_0x48ed7c(_0x12e649);});}return new(_0x55e393||(_0x55e393=Promise))(function(_0x4929e1,_0x41d12d){function _0x44de3d(_0x581df0){try{_0x54b3fc(_0x7f07ae['next'](_0x581df0));}catch(_0x45ce66){_0x41d12d(_0x45ce66);}}function _0x3bf082(_0x434749){try{_0x54b3fc(_0x7f07ae['throw'](_0x434749));}catch(_0x3c769f){_0x41d12d(_0x3c769f);}}function _0x54b3fc(_0x36badb){_0x36badb['done']?_0x4929e1(_0x36badb['value']):_0x131311(_0x36badb['value'])['then'](_0x44de3d,_0x3bf082);}_0x54b3fc((_0x7f07ae=_0x7f07ae['apply'](_0x30c957,_0x400e93||[]))['next']());});};class ListService{constructor(_0x119793){this['fetch']=_0x119793;}['add'](_0x3c0383,_0x710103,_0x27ac63){return __awaiter$3(this,void 0,void 0,function*(){const _0x59607e='List',_0x51bfc4={'account_name':_0x3c0383,'list_name':_0x710103};try{const _0xc1196a=yield this['fetch']['post'](_0x59607e,_0x27ac63,_0x51bfc4);if(_0xc1196a['status']>0xc7&&_0xc1196a['status']<0x12c){const _0x3928b6=yield _0xc1196a['json']();return new SuccessfulAccountResponse(_0x3928b6);}const _0x1d86f8=yield _0xc1196a['json']();return new FailedAccountResponse(_0x1d86f8);}catch(_0x326a98){if(_0x326a98 instanceof Error)return new FailedAccountResponse({'detail':_0x326a98['message'],'title':_0x326a98['name'],'status':0x1f4,'instance':'','type':''});throw _0x326a98;}});}['remove'](_0x4ff710,_0x4458b9,_0x1b0c27){return __awaiter$3(this,void 0,void 0,function*(){const _0x46f85d='List/'+_0x4ff710+'/'+_0x4458b9,_0xf8b13a=yield this['fetch']['delete'](_0x46f85d,_0x1b0c27);try{if(_0xf8b13a['status']>0xc7&&_0xf8b13a['status']<0x12c){const _0x1b8ac5=yield _0xf8b13a['json']();return new SuccessfulAccountResponse(_0x1b8ac5);}const _0x286544=yield _0xf8b13a['json']();return new FailedAccountResponse(_0x286544);}catch(_0x2cf1f4){if(_0x2cf1f4 instanceof Error)return new FailedAccountResponse({'detail':_0x2cf1f4['message'],'title':_0x2cf1f4['name'],'status':0x1f4,'instance':'','type':''});throw _0x2cf1f4;}});}}
8
-
9
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x4a7e9c,_0x376e6d,_0x4a254f,_0x12661f){function _0x14cdbe(_0x2bffbe){return _0x2bffbe instanceof _0x4a254f?_0x2bffbe:new _0x4a254f(function(_0x2f3ef6){_0x2f3ef6(_0x2bffbe);});}return new(_0x4a254f||(_0x4a254f=Promise))(function(_0x1cd18f,_0x2f64dc){function _0x2a1767(_0x1e671a){try{_0x4cadaa(_0x12661f['next'](_0x1e671a));}catch(_0x1bba3c){_0x2f64dc(_0x1bba3c);}}function _0x1d7158(_0x356ebd){try{_0x4cadaa(_0x12661f['throw'](_0x356ebd));}catch(_0x5101ca){_0x2f64dc(_0x5101ca);}}function _0x4cadaa(_0x84c34b){_0x84c34b['done']?_0x1cd18f(_0x84c34b['value']):_0x14cdbe(_0x84c34b['value'])['then'](_0x2a1767,_0x1d7158);}_0x4cadaa((_0x12661f=_0x12661f['apply'](_0x4a7e9c,_0x376e6d||[]))['next']());});};class Fetch{constructor(_0x53f6b7){this['baseUri']=_0x53f6b7,this['getUrl']=_0x576e2f=>{return _0x576e2f['startsWith']('/')&&(_0x576e2f=_0x576e2f['replace']('/','')),''+this['baseUri']+_0x576e2f;},!_0x53f6b7['endsWith']('/')&&(_0x53f6b7=_0x53f6b7+'/');}['get'](_0x3d7d91,_0x438756){return __awaiter$2(this,void 0,void 0,function*(){const _0x76cc01=this['getUrl'](_0x3d7d91);return yield fetch(_0x76cc01,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x438756}});});}['post'](_0x511786,_0x5d7cec,_0x4ff81d){return __awaiter$2(this,void 0,void 0,function*(){const _0x549ff5=this['getUrl'](_0x511786);return yield fetch(_0x549ff5,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x5d7cec},'body':_0x4ff81d?JSON['stringify'](_0x4ff81d):null});});}['put'](_0x44e6bc,_0x319713,_0x10f7a6){return __awaiter$2(this,void 0,void 0,function*(){const _0x31c1d3=this['getUrl'](_0x44e6bc);return yield fetch(_0x31c1d3,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x319713},'body':_0x10f7a6?JSON['stringify'](_0x10f7a6):null});});}['delete'](_0x2a6af1,_0x27cbd4){return __awaiter$2(this,void 0,void 0,function*(){const _0xfbf0ce=this['getUrl'](_0x2a6af1);return yield fetch(_0xfbf0ce,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x27cbd4}});});}}
10
-
11
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x46e7d5,_0x18aa8a,_0x553752,_0x3e7999){function _0x16e0b5(_0x375b5){return _0x375b5 instanceof _0x553752?_0x375b5:new _0x553752(function(_0x7d5b95){_0x7d5b95(_0x375b5);});}return new(_0x553752||(_0x553752=Promise))(function(_0x613b75,_0x219eaf){function _0x6bb290(_0x2168c7){try{_0x1c0b22(_0x3e7999['next'](_0x2168c7));}catch(_0x4d4e23){_0x219eaf(_0x4d4e23);}}function _0x3f5e4d(_0x3951ee){try{_0x1c0b22(_0x3e7999['throw'](_0x3951ee));}catch(_0x13839c){_0x219eaf(_0x13839c);}}function _0x1c0b22(_0x29f55a){_0x29f55a['done']?_0x613b75(_0x29f55a['value']):_0x16e0b5(_0x29f55a['value'])['then'](_0x6bb290,_0x3f5e4d);}_0x1c0b22((_0x3e7999=_0x3e7999['apply'](_0x46e7d5,_0x18aa8a||[]))['next']());});};class SearchServersService{constructor(_0x2e5d76){this['fetch']=_0x2e5d76,this['path']='search-services';}['create'](_0x15b76f,_0x198d98,_0x5c5182,_0x474a75,_0x52dba6,_0x30b0e2,_0x5e0443,_0x43e1b3){return __awaiter$1(this,void 0,void 0,function*(){const _0x2149f1={'account_name':_0x15b76f,'search_service_name':_0x198d98,'endpoint':_0x5c5182,'key':_0x474a75,'county':_0x52dba6,'provider':_0x30b0e2,'index_name':_0x5e0443};try{const _0x539b84=yield this['fetch']['post'](this['path'],_0x43e1b3,_0x2149f1);if(_0x539b84['status']>0xc7&&_0x539b84['status']<0x12c){const _0x1b4163=yield _0x539b84['json']();return new SuccessfulSearchServiceResponse(_0x1b4163);}const _0x6241d2=yield _0x539b84['json']();return new FailedSearchServiceResponse(_0x6241d2);}catch(_0x193296){if(_0x193296 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x193296['message'],'title':_0x193296['name'],'status':0x1f4,'instance':'','type':''});throw _0x193296;}});}['delete'](_0x16a560,_0x48e4a6,_0x486b14){return __awaiter$1(this,void 0,void 0,function*(){const _0x150a32=this['path']+'/'+_0x16a560+'/'+_0x48e4a6;try{const _0x3143b6=yield this['fetch']['delete'](_0x150a32,_0x486b14);if(_0x3143b6['status']>0xc7&&_0x3143b6['status']<0x12c)return new SuccessfulResponse({});const _0x1aeb1d=yield _0x3143b6['json']();return new FailedResponse(_0x1aeb1d);}catch(_0x1bccde){if(_0x1bccde instanceof Error)return new FailedResponse({'detail':_0x1bccde['message'],'title':_0x1bccde['name'],'status':0x1f4,'instance':'','type':''});throw _0x1bccde;}});}['view'](_0x16eaad,_0x8f3918,_0x52544c){return __awaiter$1(this,void 0,void 0,function*(){const _0x39ad1b=this['path']+'/'+_0x16eaad+'/'+_0x8f3918;try{const _0x237e50=yield this['fetch']['get'](_0x39ad1b,_0x52544c);if(_0x237e50['status']>0xc7&&_0x237e50['status']<0x12c){const _0x50b5a0=yield _0x237e50['json']();return new SuccessfulViewSearchServiceResponse(_0x50b5a0);}const _0x1d9cac=yield _0x237e50['json']();return new FailedViewSearchServiceResponse(_0x1d9cac);}catch(_0x22ae7f){if(_0x22ae7f instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x22ae7f['message'],'title':_0x22ae7f['name'],'status':0x1f4,'instance':'','type':''});throw _0x22ae7f;}});}}
12
-
13
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x3164e4,_0x394a93,_0x1584a2,_0x5d0c0f){function _0x28b871(_0x369995){return _0x369995 instanceof _0x1584a2?_0x369995:new _0x1584a2(function(_0x5c66ff){_0x5c66ff(_0x369995);});}return new(_0x1584a2||(_0x1584a2=Promise))(function(_0x13fe0f,_0x403a20){function _0x5e3376(_0x151704){try{_0x515ab5(_0x5d0c0f['next'](_0x151704));}catch(_0x2b5b33){_0x403a20(_0x2b5b33);}}function _0x507c43(_0xd5f360){try{_0x515ab5(_0x5d0c0f['throw'](_0xd5f360));}catch(_0x4fcb55){_0x403a20(_0x4fcb55);}}function _0x515ab5(_0x20f51f){_0x20f51f['done']?_0x13fe0f(_0x20f51f['value']):_0x28b871(_0x20f51f['value'])['then'](_0x5e3376,_0x507c43);}_0x515ab5((_0x5d0c0f=_0x5d0c0f['apply'](_0x3164e4,_0x394a93||[]))['next']());});};class AdminClient{constructor(_0x1bf8dd='https://admin.searchability.dev/'){var _0x307415=new Fetch(_0x1bf8dd);this['Accounts']=new AccountService(_0x307415),this['Lists']=new ListService(_0x307415),this['ApiKeys']=new ApiKeyService(_0x307415),this['SearchServices']=new SearchServersService(_0x307415);}}class AuthClient{constructor(_0x4394eb='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x4394eb);}['login'](_0x655b2){return __awaiter(this,void 0,void 0,function*(){var _0x3743b7='login/'+_0x655b2;try{const _0x50450d=yield yield fetch(_0x3743b7);if(_0x50450d['status']>0xc7&&_0x50450d['status']<0x12c){const _0x3e2f55=yield _0x50450d['json']();return new SuccessfulAuthResponse(_0x3e2f55);}const _0x8aad8c=yield _0x50450d['json']();return new FailedAuthResponse(_0x8aad8c);}catch(_0x4c3a72){if(_0x4c3a72 instanceof Error)return new FailedAuthResponse({'detail':_0x4c3a72['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x4c3a72;}});}['refresh'](_0x15dc8b){return __awaiter(this,void 0,void 0,function*(){var _0x58dd44='refresh';try{const _0x3a26be=yield this['fetch']['post'](_0x58dd44,_0x15dc8b,null);if(_0x3a26be['status']>0xc7&&_0x3a26be['status']<0x12c){const _0x4587b2=yield _0x3a26be['json']();return new SuccessfulAuthResponse(_0x4587b2);}const _0x1af5fc=yield _0x3a26be['json']();return new FailedAuthResponse(_0x1af5fc);}catch(_0x1f9f23){if(_0x1f9f23 instanceof Error)return new FailedAuthResponse({'detail':_0x1f9f23['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x1f9f23;}});}['getTokenStatus'](_0x4f290a){if(Date['now']()<_0x4f290a['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x4f290a['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
14
-
15
- export { AdminClient, AuthClient, TokenStatus, Tokens };