@searchability/admin-client 0.0.39 → 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(_0x2af7e5){_0x2af7e5[_0x2af7e5['Ok']=0x0]='Ok',_0x2af7e5[_0x2af7e5['Refresh']=0x1]='Refresh',_0x2af7e5[_0x2af7e5['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(_0x377438){this['isSuccess']=_0x377438;}}class SuccessfulAccountResponse extends Response{constructor(_0x2ee90f){super(!![]),this['account']=_0x2ee90f;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x52ce2d){super(![]),this['problem']=_0x52ce2d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x27fbdf){super(!![]),this['tokens']=_0x27fbdf;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0xc082d){super(![]),this['problem']=_0xc082d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x206138){super(!![]),this['apiKey']=_0x206138;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x1eb8a9){super(![]),this['problem']=_0x1eb8a9;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x58d2c9){super(!![]),this['searchService']=_0x58d2c9;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x9b4f66){super(![]),this['problem']=_0x9b4f66;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x57b14c){super(!![]),this['searchService']=_0x57b14c;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServiceResponse extends Response{constructor(_0x467590){super(![]),this['problem']=_0x467590;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x1e8675){super(!![]),this['apiKeyValue']=_0x1e8675;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x4f0496){super(!![]),this['obj']=_0x4f0496;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x20f78d){super(![]),this['problem']=_0x20f78d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x23180a){super(![]),this['problem']=_0x23180a;}['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(_0x346ba7,_0x554221,_0x2d447b,_0x8523e){function _0x337d43(_0x126e36){return _0x126e36 instanceof _0x2d447b?_0x126e36:new _0x2d447b(function(_0x2366b1){_0x2366b1(_0x126e36);});}return new(_0x2d447b||(_0x2d447b=Promise))(function(_0x1b4e68,_0xcacf87){function _0x4bf3b8(_0x3dd1ed){try{_0xef01a8(_0x8523e['next'](_0x3dd1ed));}catch(_0x2a1ed2){_0xcacf87(_0x2a1ed2);}}function _0x187342(_0x50bccb){try{_0xef01a8(_0x8523e['throw'](_0x50bccb));}catch(_0x2a7885){_0xcacf87(_0x2a7885);}}function _0xef01a8(_0x1e7b1){_0x1e7b1['done']?_0x1b4e68(_0x1e7b1['value']):_0x337d43(_0x1e7b1['value'])['then'](_0x4bf3b8,_0x187342);}_0xef01a8((_0x8523e=_0x8523e['apply'](_0x346ba7,_0x554221||[]))['next']());});};class AccountService{constructor(_0x4ccf8c){this['fetch']=_0x4ccf8c;}['get'](_0x45dfc5,_0x43a1ea){return __awaiter$5(this,void 0,void 0,function*(){const _0x2925e5='Account/'+_0x45dfc5+'/',_0x48672b=yield this['fetch']['get'](_0x2925e5,_0x43a1ea);try{if(_0x48672b['status']>0xc7&&_0x48672b['status']<0x12c){const _0x34aa65=yield _0x48672b['json']();return new SuccessfulAccountResponse(_0x34aa65);}const _0x57b926=yield _0x48672b['json']();return new FailedAccountResponse(_0x57b926);}catch(_0xc397ba){if(_0xc397ba instanceof Error)return new FailedAccountResponse({'detail':_0xc397ba['message'],'title':_0xc397ba['name'],'status':0x1f4,'instance':'','type':''});throw _0xc397ba;}});}}
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(_0x3c3a26,_0x5e76b2,_0x141635,_0x1247b3){function _0x5b54d7(_0x4ad665){return _0x4ad665 instanceof _0x141635?_0x4ad665:new _0x141635(function(_0x3cbe5b){_0x3cbe5b(_0x4ad665);});}return new(_0x141635||(_0x141635=Promise))(function(_0x4a27f8,_0x23899c){function _0x1881cf(_0x8f8f05){try{_0x53f8b6(_0x1247b3['next'](_0x8f8f05));}catch(_0x6478ce){_0x23899c(_0x6478ce);}}function _0x71c603(_0x3ffc38){try{_0x53f8b6(_0x1247b3['throw'](_0x3ffc38));}catch(_0x3e85cf){_0x23899c(_0x3e85cf);}}function _0x53f8b6(_0x15a527){_0x15a527['done']?_0x4a27f8(_0x15a527['value']):_0x5b54d7(_0x15a527['value'])['then'](_0x1881cf,_0x71c603);}_0x53f8b6((_0x1247b3=_0x1247b3['apply'](_0x3c3a26,_0x5e76b2||[]))['next']());});};class ApiKeyService{constructor(_0x2336d8){this['fetch']=_0x2336d8,this['path']='api-key';}['create'](_0x5442ae,_0x94ddde,_0x365f6f){return __awaiter$4(this,void 0,void 0,function*(){const _0xf25d44={'account_name':_0x5442ae,'api_key_name':_0x94ddde};try{const _0x3d250a=yield this['fetch']['post'](this['path'],_0x365f6f,_0xf25d44);if(_0x3d250a['status']>0xc7&&_0x3d250a['status']<0x12c){const _0x100530=yield _0x3d250a['json']();return new SuccessfulApiKeyResponse(_0x100530);}const _0x42c113=yield _0x3d250a['json']();return new FailedApiKeyResponse(_0x42c113);}catch(_0x3f6afe){if(_0x3f6afe instanceof Error)return new FailedApiKeyResponse({'detail':_0x3f6afe['message'],'title':_0x3f6afe['name'],'status':0x1f4,'instance':'','type':''});throw _0x3f6afe;}});}['view'](_0x3f8800,_0x17cf3a,_0xbe47f2){return __awaiter$4(this,void 0,void 0,function*(){const _0xf11f83=this['path']+'/'+_0x3f8800+'/'+_0x17cf3a;try{const _0x342e6b=yield this['fetch']['get'](_0xf11f83,_0xbe47f2);if(_0x342e6b['status']>0xc7&&_0x342e6b['status']<0x12c){const _0x46a3a4=yield _0x342e6b['json']();return new SuccessfulApiKeyValueResponse(_0x46a3a4);}const _0x3254b7=yield _0x342e6b['json']();return new FailedApiKeyValueResponse(_0x3254b7);}catch(_0x104429){if(_0x104429 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x104429['message'],'title':_0x104429['name'],'status':0x1f4,'instance':'','type':''});throw _0x104429;}});}['delete'](_0x320a46,_0x52c877,_0x5ce27b){return __awaiter$4(this,void 0,void 0,function*(){const _0x1e2e73=this['path']+'/'+_0x320a46+'/'+_0x52c877;try{const _0x322edf=yield this['fetch']['delete'](_0x1e2e73,_0x5ce27b);if(_0x322edf['status']>0xc7&&_0x322edf['status']<0x12c)return new SuccessfulResponse({});const _0x16b26b=yield _0x322edf['json']();return new FailedResponse(_0x16b26b);}catch(_0x2fcc4a){if(_0x2fcc4a instanceof Error)return new FailedResponse({'detail':_0x2fcc4a['message'],'title':_0x2fcc4a['name'],'status':0x1f4,'instance':'','type':''});throw _0x2fcc4a;}});}}
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(_0x149dac,_0xd340,_0x4c6a68,_0x37010){function _0x1d9870(_0x1b2d67){return _0x1b2d67 instanceof _0x4c6a68?_0x1b2d67:new _0x4c6a68(function(_0x5e644d){_0x5e644d(_0x1b2d67);});}return new(_0x4c6a68||(_0x4c6a68=Promise))(function(_0x183eed,_0x36ff87){function _0x2e34db(_0xe64cd5){try{_0x49276d(_0x37010['next'](_0xe64cd5));}catch(_0x227192){_0x36ff87(_0x227192);}}function _0x484555(_0x17a646){try{_0x49276d(_0x37010['throw'](_0x17a646));}catch(_0x5918aa){_0x36ff87(_0x5918aa);}}function _0x49276d(_0xaf5845){_0xaf5845['done']?_0x183eed(_0xaf5845['value']):_0x1d9870(_0xaf5845['value'])['then'](_0x2e34db,_0x484555);}_0x49276d((_0x37010=_0x37010['apply'](_0x149dac,_0xd340||[]))['next']());});};class ListService{constructor(_0x50e580){this['fetch']=_0x50e580;}['add'](_0x1305b3,_0x316d49,_0x1f2fa5){return __awaiter$3(this,void 0,void 0,function*(){const _0x5ee00c='List',_0x8f614={'account_name':_0x1305b3,'list_name':_0x316d49};try{const _0x151677=yield this['fetch']['post'](_0x5ee00c,_0x1f2fa5,_0x8f614);if(_0x151677['status']>0xc7&&_0x151677['status']<0x12c){const _0x565909=yield _0x151677['json']();return new SuccessfulAccountResponse(_0x565909);}const _0x4ee81c=yield _0x151677['json']();return new FailedAccountResponse(_0x4ee81c);}catch(_0x10e307){if(_0x10e307 instanceof Error)return new FailedAccountResponse({'detail':_0x10e307['message'],'title':_0x10e307['name'],'status':0x1f4,'instance':'','type':''});throw _0x10e307;}});}['remove'](_0x21de23,_0x1e5380,_0x30344c){return __awaiter$3(this,void 0,void 0,function*(){const _0x32662a='List/'+_0x21de23+'/'+_0x1e5380,_0x48eea9=yield this['fetch']['delete'](_0x32662a,_0x30344c);try{if(_0x48eea9['status']>0xc7&&_0x48eea9['status']<0x12c){const _0x2bc1ea=yield _0x48eea9['json']();return new SuccessfulAccountResponse(_0x2bc1ea);}const _0x39b635=yield _0x48eea9['json']();return new FailedAccountResponse(_0x39b635);}catch(_0xff8b2d){if(_0xff8b2d instanceof Error)return new FailedAccountResponse({'detail':_0xff8b2d['message'],'title':_0xff8b2d['name'],'status':0x1f4,'instance':'','type':''});throw _0xff8b2d;}});}}
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(_0x15c2e7,_0x2cb58a,_0x17e9b3,_0x5729f6){function _0x4b786a(_0x584d2b){return _0x584d2b instanceof _0x17e9b3?_0x584d2b:new _0x17e9b3(function(_0x38d41b){_0x38d41b(_0x584d2b);});}return new(_0x17e9b3||(_0x17e9b3=Promise))(function(_0x121a9b,_0xad240e){function _0x393e91(_0x49d48f){try{_0x53b813(_0x5729f6['next'](_0x49d48f));}catch(_0x33f939){_0xad240e(_0x33f939);}}function _0x6ec8fe(_0x4d7070){try{_0x53b813(_0x5729f6['throw'](_0x4d7070));}catch(_0x241277){_0xad240e(_0x241277);}}function _0x53b813(_0x19d644){_0x19d644['done']?_0x121a9b(_0x19d644['value']):_0x4b786a(_0x19d644['value'])['then'](_0x393e91,_0x6ec8fe);}_0x53b813((_0x5729f6=_0x5729f6['apply'](_0x15c2e7,_0x2cb58a||[]))['next']());});};class Fetch{constructor(_0x42deaa){this['baseUri']=_0x42deaa,this['getUrl']=_0x4b7ad8=>{return _0x4b7ad8['startsWith']('/')&&(_0x4b7ad8=_0x4b7ad8['replace']('/','')),''+this['baseUri']+_0x4b7ad8;},!_0x42deaa['endsWith']('/')&&(_0x42deaa=_0x42deaa+'/');}['get'](_0x60248b,_0x165ae8){return __awaiter$2(this,void 0,void 0,function*(){const _0x17b4eb=this['getUrl'](_0x60248b);return yield fetch(_0x17b4eb,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x165ae8}});});}['post'](_0x530034,_0x3ff8f6,_0x550908){return __awaiter$2(this,void 0,void 0,function*(){const _0x4dc5e6=this['getUrl'](_0x530034);return yield fetch(_0x4dc5e6,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3ff8f6},'body':_0x550908?JSON['stringify'](_0x550908):null});});}['put'](_0x1fff9c,_0x274c2c,_0x2041ad){return __awaiter$2(this,void 0,void 0,function*(){const _0x559971=this['getUrl'](_0x1fff9c);return yield fetch(_0x559971,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x274c2c},'body':_0x2041ad?JSON['stringify'](_0x2041ad):null});});}['delete'](_0xdf194,_0x56c106){return __awaiter$2(this,void 0,void 0,function*(){const _0x41955b=this['getUrl'](_0xdf194);return yield fetch(_0x41955b,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x56c106}});});}}
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(_0x20bda4,_0x55da40,_0x253f0c,_0x1b0f68){function _0x3c8807(_0x45409c){return _0x45409c instanceof _0x253f0c?_0x45409c:new _0x253f0c(function(_0x315194){_0x315194(_0x45409c);});}return new(_0x253f0c||(_0x253f0c=Promise))(function(_0x13e844,_0x37a086){function _0x6394c9(_0xa0b7b){try{_0xc40df6(_0x1b0f68['next'](_0xa0b7b));}catch(_0x397a3d){_0x37a086(_0x397a3d);}}function _0x129636(_0x5e37e2){try{_0xc40df6(_0x1b0f68['throw'](_0x5e37e2));}catch(_0x12c184){_0x37a086(_0x12c184);}}function _0xc40df6(_0x4c868e){_0x4c868e['done']?_0x13e844(_0x4c868e['value']):_0x3c8807(_0x4c868e['value'])['then'](_0x6394c9,_0x129636);}_0xc40df6((_0x1b0f68=_0x1b0f68['apply'](_0x20bda4,_0x55da40||[]))['next']());});};class SearchServersService{constructor(_0x153f9d){this['fetch']=_0x153f9d,this['path']='search-services';}['create'](_0x3ae775,_0xded48f,_0x180a02,_0x4eeff8,_0x1baf0e,_0x1cc833,_0x335df9,_0xd3aa38){return __awaiter$1(this,void 0,void 0,function*(){const _0x55c3c7={'account_name':_0x3ae775,'search_service_name':_0xded48f,'endpoint':_0x180a02,'key':_0x4eeff8,'county':_0x1baf0e,'provider':_0x1cc833,'index_name':_0x335df9};try{const _0x488c69=yield this['fetch']['post'](this['path'],_0xd3aa38,_0x55c3c7);if(_0x488c69['status']>0xc7&&_0x488c69['status']<0x12c){const _0x161458=yield _0x488c69['json']();return new SuccessfulSearchServiceResponse(_0x161458);}const _0x3b9cc4=yield _0x488c69['json']();return new FailedSearchServiceResponse(_0x3b9cc4);}catch(_0x1d4ba8){if(_0x1d4ba8 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x1d4ba8['message'],'title':_0x1d4ba8['name'],'status':0x1f4,'instance':'','type':''});throw _0x1d4ba8;}});}['delete'](_0x10f2f0,_0x311af8,_0x57713e){return __awaiter$1(this,void 0,void 0,function*(){const _0x1edc29=this['path']+'/'+_0x10f2f0+'/'+_0x311af8;try{const _0x2eb291=yield this['fetch']['delete'](_0x1edc29,_0x57713e);if(_0x2eb291['status']>0xc7&&_0x2eb291['status']<0x12c)return new SuccessfulResponse({});const _0x13f625=yield _0x2eb291['json']();return new FailedResponse(_0x13f625);}catch(_0x3ed95e){if(_0x3ed95e instanceof Error)return new FailedResponse({'detail':_0x3ed95e['message'],'title':_0x3ed95e['name'],'status':0x1f4,'instance':'','type':''});throw _0x3ed95e;}});}['view'](_0x48d013,_0x57ef92,_0x5e84e2){return __awaiter$1(this,void 0,void 0,function*(){const _0x34e1e1=this['path']+'/'+_0x48d013+'/'+_0x57ef92;try{const _0x34b489=yield this['fetch']['get'](_0x34e1e1,_0x5e84e2);if(_0x34b489['status']>0xc7&&_0x34b489['status']<0x12c){const _0x20e8c9=yield _0x34b489['json']();return new SuccessfulViewSearchServiceResponse(_0x20e8c9);}const _0x4c8146=yield _0x34b489['json']();return new FailedViewSearchServiceResponse(_0x4c8146);}catch(_0x137315){if(_0x137315 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x137315['message'],'title':_0x137315['name'],'status':0x1f4,'instance':'','type':''});throw _0x137315;}});}}
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(_0x1c159f,_0x175d8a,_0x47c816,_0x58c22e){function _0x4d51(_0x417af3){return _0x417af3 instanceof _0x47c816?_0x417af3:new _0x47c816(function(_0x4ae03a){_0x4ae03a(_0x417af3);});}return new(_0x47c816||(_0x47c816=Promise))(function(_0x3ca7f7,_0x3d5a44){function _0x507661(_0x215d60){try{_0x5e56de(_0x58c22e['next'](_0x215d60));}catch(_0x5c2f1f){_0x3d5a44(_0x5c2f1f);}}function _0x46a235(_0xf9dfcd){try{_0x5e56de(_0x58c22e['throw'](_0xf9dfcd));}catch(_0x5967ee){_0x3d5a44(_0x5967ee);}}function _0x5e56de(_0x25a1f3){_0x25a1f3['done']?_0x3ca7f7(_0x25a1f3['value']):_0x4d51(_0x25a1f3['value'])['then'](_0x507661,_0x46a235);}_0x5e56de((_0x58c22e=_0x58c22e['apply'](_0x1c159f,_0x175d8a||[]))['next']());});};class AdminClient{constructor(_0x20e026='https://admin.searchability.dev/'){var _0x262b5f=new Fetch(_0x20e026);this['Accounts']=new AccountService(_0x262b5f),this['Lists']=new ListService(_0x262b5f),this['ApiKeys']=new ApiKeyService(_0x262b5f),this['SearchServices']=new SearchServersService(_0x262b5f);}}class AuthClient{constructor(_0x41981c='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x41981c);}['login'](_0x398ad5){return __awaiter(this,void 0,void 0,function*(){var _0x1de9a2='login/'+_0x398ad5;try{const _0x4eb2ea=yield yield fetch(_0x1de9a2);if(_0x4eb2ea['status']>0xc7&&_0x4eb2ea['status']<0x12c){const _0x5ca737=yield _0x4eb2ea['json']();return new SuccessfulAuthResponse(_0x5ca737);}const _0x4c305a=yield _0x4eb2ea['json']();return new FailedAuthResponse(_0x4c305a);}catch(_0x572bc5){if(_0x572bc5 instanceof Error)return new FailedAuthResponse({'detail':_0x572bc5['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x572bc5;}});}['refresh'](_0x1ee6e9){return __awaiter(this,void 0,void 0,function*(){var _0x1feefb='refresh';try{const _0x4bed10=yield this['fetch']['post'](_0x1feefb,_0x1ee6e9,null);if(_0x4bed10['status']>0xc7&&_0x4bed10['status']<0x12c){const _0x3f0080=yield _0x4bed10['json']();return new SuccessfulAuthResponse(_0x3f0080);}const _0x5d6a73=yield _0x4bed10['json']();return new FailedAuthResponse(_0x5d6a73);}catch(_0x90e9aa){if(_0x90e9aa instanceof Error)return new FailedAuthResponse({'detail':_0x90e9aa['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x90e9aa;}});}['getTokenStatus'](_0x28cce3){if(Date['now']()<_0x28cce3['access_expires'])return exports.TokenStatus['Ok'];if(Date['now']()<_0x28cce3['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(_0x10d427){_0x10d427[_0x10d427['Ok']=0x0]='Ok',_0x10d427[_0x10d427['Refresh']=0x1]='Refresh',_0x10d427[_0x10d427['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(_0x14b3d1){this['isSuccess']=_0x14b3d1;}}class SuccessfulAccountResponse extends Response{constructor(_0x124aa9){super(!![]),this['account']=_0x124aa9;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x3c84ae){super(![]),this['problem']=_0x3c84ae;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x5b7e31){super(!![]),this['tokens']=_0x5b7e31;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x2f99c3){super(![]),this['problem']=_0x2f99c3;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x42bd8f){super(!![]),this['apiKey']=_0x42bd8f;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x1dac69){super(![]),this['problem']=_0x1dac69;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x2f9c8f){super(!![]),this['searchService']=_0x2f9c8f;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x46a9d5){super(![]),this['problem']=_0x46a9d5;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x5d3554){super(!![]),this['searchService']=_0x5d3554;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServiceResponse extends Response{constructor(_0x1f170d){super(![]),this['problem']=_0x1f170d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0xad0cb0){super(!![]),this['apiKeyValue']=_0xad0cb0;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x2367cf){super(!![]),this['obj']=_0x2367cf;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x3881b6){super(![]),this['problem']=_0x3881b6;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x5ab159){super(![]),this['problem']=_0x5ab159;}['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(_0x96b5f,_0x469fcf,_0x5c6fc8,_0x304416){function _0x18f0f0(_0x150be9){return _0x150be9 instanceof _0x5c6fc8?_0x150be9:new _0x5c6fc8(function(_0x3d5fe8){_0x3d5fe8(_0x150be9);});}return new(_0x5c6fc8||(_0x5c6fc8=Promise))(function(_0x110ff6,_0x289c45){function _0x2cf66f(_0x27ba8c){try{_0xca9fe4(_0x304416['next'](_0x27ba8c));}catch(_0x246212){_0x289c45(_0x246212);}}function _0x3b1808(_0x3412f8){try{_0xca9fe4(_0x304416['throw'](_0x3412f8));}catch(_0x45a946){_0x289c45(_0x45a946);}}function _0xca9fe4(_0x33b729){_0x33b729['done']?_0x110ff6(_0x33b729['value']):_0x18f0f0(_0x33b729['value'])['then'](_0x2cf66f,_0x3b1808);}_0xca9fe4((_0x304416=_0x304416['apply'](_0x96b5f,_0x469fcf||[]))['next']());});};class AccountService{constructor(_0xb730b){this['fetch']=_0xb730b;}['get'](_0x1f282f,_0x457772){return __awaiter$5(this,void 0,void 0,function*(){const _0x327253='Account/'+_0x1f282f+'/',_0x25235a=yield this['fetch']['get'](_0x327253,_0x457772);try{if(_0x25235a['status']>0xc7&&_0x25235a['status']<0x12c){const _0x3f4da0=yield _0x25235a['json']();return new SuccessfulAccountResponse(_0x3f4da0);}const _0x23b3d9=yield _0x25235a['json']();return new FailedAccountResponse(_0x23b3d9);}catch(_0x6c2230){if(_0x6c2230 instanceof Error)return new FailedAccountResponse({'detail':_0x6c2230['message'],'title':_0x6c2230['name'],'status':0x1f4,'instance':'','type':''});throw _0x6c2230;}});}}
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(_0x351099,_0x5d8b4a,_0xdbcab0,_0x5115b9){function _0x4e8264(_0x52cf50){return _0x52cf50 instanceof _0xdbcab0?_0x52cf50:new _0xdbcab0(function(_0x1ee438){_0x1ee438(_0x52cf50);});}return new(_0xdbcab0||(_0xdbcab0=Promise))(function(_0x39e5e5,_0x2df587){function _0x2d428b(_0x433c66){try{_0x520742(_0x5115b9['next'](_0x433c66));}catch(_0x49a481){_0x2df587(_0x49a481);}}function _0x5cb3d2(_0x42e6cd){try{_0x520742(_0x5115b9['throw'](_0x42e6cd));}catch(_0x4add3c){_0x2df587(_0x4add3c);}}function _0x520742(_0x4ddf05){_0x4ddf05['done']?_0x39e5e5(_0x4ddf05['value']):_0x4e8264(_0x4ddf05['value'])['then'](_0x2d428b,_0x5cb3d2);}_0x520742((_0x5115b9=_0x5115b9['apply'](_0x351099,_0x5d8b4a||[]))['next']());});};class ApiKeyService{constructor(_0x537965){this['fetch']=_0x537965,this['path']='api-key';}['create'](_0x556705,_0x4cd592,_0x2d31b6){return __awaiter$4(this,void 0,void 0,function*(){const _0x2ce46d={'account_name':_0x556705,'api_key_name':_0x4cd592};try{const _0x5e27f6=yield this['fetch']['post'](this['path'],_0x2d31b6,_0x2ce46d);if(_0x5e27f6['status']>0xc7&&_0x5e27f6['status']<0x12c){const _0x1dad3c=yield _0x5e27f6['json']();return new SuccessfulApiKeyResponse(_0x1dad3c);}const _0x5bfd43=yield _0x5e27f6['json']();return new FailedApiKeyResponse(_0x5bfd43);}catch(_0x4c828a){if(_0x4c828a instanceof Error)return new FailedApiKeyResponse({'detail':_0x4c828a['message'],'title':_0x4c828a['name'],'status':0x1f4,'instance':'','type':''});throw _0x4c828a;}});}['view'](_0x551dc5,_0x429c8b,_0x576009){return __awaiter$4(this,void 0,void 0,function*(){const _0x3a2846=this['path']+'/'+_0x551dc5+'/'+_0x429c8b;try{const _0x71e895=yield this['fetch']['get'](_0x3a2846,_0x576009);if(_0x71e895['status']>0xc7&&_0x71e895['status']<0x12c){const _0x5d8cc9=yield _0x71e895['json']();return new SuccessfulApiKeyValueResponse(_0x5d8cc9);}const _0x13292a=yield _0x71e895['json']();return new FailedApiKeyValueResponse(_0x13292a);}catch(_0x2e25e3){if(_0x2e25e3 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x2e25e3['message'],'title':_0x2e25e3['name'],'status':0x1f4,'instance':'','type':''});throw _0x2e25e3;}});}['delete'](_0x28a04a,_0x516e31,_0x573a5d){return __awaiter$4(this,void 0,void 0,function*(){const _0x20ac0f=this['path']+'/'+_0x28a04a+'/'+_0x516e31;try{const _0x36ba03=yield this['fetch']['delete'](_0x20ac0f,_0x573a5d);if(_0x36ba03['status']>0xc7&&_0x36ba03['status']<0x12c)return new SuccessfulResponse({});const _0x2c55da=yield _0x36ba03['json']();return new FailedResponse(_0x2c55da);}catch(_0x281ea2){if(_0x281ea2 instanceof Error)return new FailedResponse({'detail':_0x281ea2['message'],'title':_0x281ea2['name'],'status':0x1f4,'instance':'','type':''});throw _0x281ea2;}});}}
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(_0x2256a3,_0xff33ff,_0x54a3a3,_0x6a4b34){function _0x4dbc9b(_0x1e00ad){return _0x1e00ad instanceof _0x54a3a3?_0x1e00ad:new _0x54a3a3(function(_0x2c4864){_0x2c4864(_0x1e00ad);});}return new(_0x54a3a3||(_0x54a3a3=Promise))(function(_0x55d178,_0x59b653){function _0x5e6c52(_0xac8e07){try{_0x54615d(_0x6a4b34['next'](_0xac8e07));}catch(_0x45a494){_0x59b653(_0x45a494);}}function _0x5ab4ca(_0x2cbfa7){try{_0x54615d(_0x6a4b34['throw'](_0x2cbfa7));}catch(_0xb1bae8){_0x59b653(_0xb1bae8);}}function _0x54615d(_0x488528){_0x488528['done']?_0x55d178(_0x488528['value']):_0x4dbc9b(_0x488528['value'])['then'](_0x5e6c52,_0x5ab4ca);}_0x54615d((_0x6a4b34=_0x6a4b34['apply'](_0x2256a3,_0xff33ff||[]))['next']());});};class ListService{constructor(_0x41a569){this['fetch']=_0x41a569;}['add'](_0x299576,_0xb2053c,_0x3997d5){return __awaiter$3(this,void 0,void 0,function*(){const _0x5dcd16='List',_0x40fa8c={'account_name':_0x299576,'list_name':_0xb2053c};try{const _0x28fa7f=yield this['fetch']['post'](_0x5dcd16,_0x3997d5,_0x40fa8c);if(_0x28fa7f['status']>0xc7&&_0x28fa7f['status']<0x12c){const _0x3c6f3e=yield _0x28fa7f['json']();return new SuccessfulAccountResponse(_0x3c6f3e);}const _0x1db98e=yield _0x28fa7f['json']();return new FailedAccountResponse(_0x1db98e);}catch(_0x5882ba){if(_0x5882ba instanceof Error)return new FailedAccountResponse({'detail':_0x5882ba['message'],'title':_0x5882ba['name'],'status':0x1f4,'instance':'','type':''});throw _0x5882ba;}});}['remove'](_0xc58d1a,_0x4a9df2,_0x3282e2){return __awaiter$3(this,void 0,void 0,function*(){const _0x153561='List/'+_0xc58d1a+'/'+_0x4a9df2,_0x5ae7e5=yield this['fetch']['delete'](_0x153561,_0x3282e2);try{if(_0x5ae7e5['status']>0xc7&&_0x5ae7e5['status']<0x12c){const _0x3a90a3=yield _0x5ae7e5['json']();return new SuccessfulAccountResponse(_0x3a90a3);}const _0x1b8583=yield _0x5ae7e5['json']();return new FailedAccountResponse(_0x1b8583);}catch(_0x4857ac){if(_0x4857ac instanceof Error)return new FailedAccountResponse({'detail':_0x4857ac['message'],'title':_0x4857ac['name'],'status':0x1f4,'instance':'','type':''});throw _0x4857ac;}});}}
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(_0x51db1b,_0x3b0353,_0x2137fe,_0x5cf87a){function _0x402bcd(_0x4d46c2){return _0x4d46c2 instanceof _0x2137fe?_0x4d46c2:new _0x2137fe(function(_0x47db8a){_0x47db8a(_0x4d46c2);});}return new(_0x2137fe||(_0x2137fe=Promise))(function(_0x3ff1d5,_0x4bad85){function _0x30ff0b(_0x28b1ad){try{_0x2a94a0(_0x5cf87a['next'](_0x28b1ad));}catch(_0x595e9f){_0x4bad85(_0x595e9f);}}function _0x590eb5(_0xaefdda){try{_0x2a94a0(_0x5cf87a['throw'](_0xaefdda));}catch(_0x24c164){_0x4bad85(_0x24c164);}}function _0x2a94a0(_0x1e278c){_0x1e278c['done']?_0x3ff1d5(_0x1e278c['value']):_0x402bcd(_0x1e278c['value'])['then'](_0x30ff0b,_0x590eb5);}_0x2a94a0((_0x5cf87a=_0x5cf87a['apply'](_0x51db1b,_0x3b0353||[]))['next']());});};class Fetch{constructor(_0x3a99b7){this['baseUri']=_0x3a99b7,this['getUrl']=_0x241fa1=>{return _0x241fa1['startsWith']('/')&&(_0x241fa1=_0x241fa1['replace']('/','')),''+this['baseUri']+_0x241fa1;},!_0x3a99b7['endsWith']('/')&&(_0x3a99b7=_0x3a99b7+'/');}['get'](_0x4454e1,_0x290ebd){return __awaiter$2(this,void 0,void 0,function*(){const _0x235c2e=this['getUrl'](_0x4454e1);return yield fetch(_0x235c2e,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x290ebd}});});}['post'](_0x497bdf,_0x4e277d,_0xb5fa2b){return __awaiter$2(this,void 0,void 0,function*(){const _0x13f5bb=this['getUrl'](_0x497bdf);return yield fetch(_0x13f5bb,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4e277d},'body':_0xb5fa2b?JSON['stringify'](_0xb5fa2b):null});});}['put'](_0xc66689,_0x136315,_0x339f29){return __awaiter$2(this,void 0,void 0,function*(){const _0x47e222=this['getUrl'](_0xc66689);return yield fetch(_0x47e222,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x136315},'body':_0x339f29?JSON['stringify'](_0x339f29):null});});}['delete'](_0x11bbdf,_0x50ff0c){return __awaiter$2(this,void 0,void 0,function*(){const _0x3a08d6=this['getUrl'](_0x11bbdf);return yield fetch(_0x3a08d6,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x50ff0c}});});}}
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(_0x5e6ba7,_0x53662e,_0x7f49a0,_0x4a90aa){function _0x2839a1(_0x2a9e21){return _0x2a9e21 instanceof _0x7f49a0?_0x2a9e21:new _0x7f49a0(function(_0x467aef){_0x467aef(_0x2a9e21);});}return new(_0x7f49a0||(_0x7f49a0=Promise))(function(_0x412a0d,_0x5993cd){function _0x5ae816(_0x3afdf8){try{_0x4c56e4(_0x4a90aa['next'](_0x3afdf8));}catch(_0x57f2d9){_0x5993cd(_0x57f2d9);}}function _0x1d8868(_0x11b68d){try{_0x4c56e4(_0x4a90aa['throw'](_0x11b68d));}catch(_0x4d5c49){_0x5993cd(_0x4d5c49);}}function _0x4c56e4(_0x4ea7f1){_0x4ea7f1['done']?_0x412a0d(_0x4ea7f1['value']):_0x2839a1(_0x4ea7f1['value'])['then'](_0x5ae816,_0x1d8868);}_0x4c56e4((_0x4a90aa=_0x4a90aa['apply'](_0x5e6ba7,_0x53662e||[]))['next']());});};class SearchServersService{constructor(_0xd0a3f){this['fetch']=_0xd0a3f,this['path']='search-services';}['create'](_0x2048c9,_0x2f6f3e,_0x1838a7,_0x5cc0e4,_0x3a45b9,_0x1e5c2,_0x4eb4bb,_0x1a0e30){return __awaiter$1(this,void 0,void 0,function*(){const _0x2abbe0={'account_name':_0x2048c9,'search_service_name':_0x2f6f3e,'endpoint':_0x1838a7,'key':_0x5cc0e4,'county':_0x3a45b9,'provider':_0x1e5c2,'index_name':_0x4eb4bb};try{const _0x4109dc=yield this['fetch']['post'](this['path'],_0x1a0e30,_0x2abbe0);if(_0x4109dc['status']>0xc7&&_0x4109dc['status']<0x12c){const _0x289bd5=yield _0x4109dc['json']();return new SuccessfulSearchServiceResponse(_0x289bd5);}const _0x504027=yield _0x4109dc['json']();return new FailedSearchServiceResponse(_0x504027);}catch(_0x562582){if(_0x562582 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x562582['message'],'title':_0x562582['name'],'status':0x1f4,'instance':'','type':''});throw _0x562582;}});}['delete'](_0x44cb24,_0x52a163,_0x53855e){return __awaiter$1(this,void 0,void 0,function*(){const _0x1efd62=this['path']+'/'+_0x44cb24+'/'+_0x52a163;try{const _0x4f4dc9=yield this['fetch']['delete'](_0x1efd62,_0x53855e);if(_0x4f4dc9['status']>0xc7&&_0x4f4dc9['status']<0x12c)return new SuccessfulResponse({});const _0x51b4ec=yield _0x4f4dc9['json']();return new FailedResponse(_0x51b4ec);}catch(_0x493d3a){if(_0x493d3a instanceof Error)return new FailedResponse({'detail':_0x493d3a['message'],'title':_0x493d3a['name'],'status':0x1f4,'instance':'','type':''});throw _0x493d3a;}});}['view'](_0xabeb7e,_0x85416e,_0x1b1bb8){return __awaiter$1(this,void 0,void 0,function*(){const _0x29c5f2=this['path']+'/'+_0xabeb7e+'/'+_0x85416e;try{const _0x4eacb0=yield this['fetch']['get'](_0x29c5f2,_0x1b1bb8);if(_0x4eacb0['status']>0xc7&&_0x4eacb0['status']<0x12c){const _0x286b5d=yield _0x4eacb0['json']();return new SuccessfulViewSearchServiceResponse(_0x286b5d);}const _0x5e57e8=yield _0x4eacb0['json']();return new FailedViewSearchServiceResponse(_0x5e57e8);}catch(_0x54c1ed){if(_0x54c1ed instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x54c1ed['message'],'title':_0x54c1ed['name'],'status':0x1f4,'instance':'','type':''});throw _0x54c1ed;}});}}
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(_0x2e586a,_0x1a81c8,_0x3fd399,_0x344338){function _0x2356a9(_0x142344){return _0x142344 instanceof _0x3fd399?_0x142344:new _0x3fd399(function(_0x278db2){_0x278db2(_0x142344);});}return new(_0x3fd399||(_0x3fd399=Promise))(function(_0x2f446a,_0x5b0cf7){function _0x1cca6d(_0x35f9fb){try{_0x23c2ce(_0x344338['next'](_0x35f9fb));}catch(_0x1da943){_0x5b0cf7(_0x1da943);}}function _0x417473(_0x1f9e0a){try{_0x23c2ce(_0x344338['throw'](_0x1f9e0a));}catch(_0x2a8903){_0x5b0cf7(_0x2a8903);}}function _0x23c2ce(_0x496b0f){_0x496b0f['done']?_0x2f446a(_0x496b0f['value']):_0x2356a9(_0x496b0f['value'])['then'](_0x1cca6d,_0x417473);}_0x23c2ce((_0x344338=_0x344338['apply'](_0x2e586a,_0x1a81c8||[]))['next']());});};class AdminClient{constructor(_0x531622='https://admin.searchability.dev/'){var _0x50fadc=new Fetch(_0x531622);this['Accounts']=new AccountService(_0x50fadc),this['Lists']=new ListService(_0x50fadc),this['ApiKeys']=new ApiKeyService(_0x50fadc),this['SearchServices']=new SearchServersService(_0x50fadc);}}class AuthClient{constructor(_0x5ee0af='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x5ee0af);}['login'](_0x4a0cb8){return __awaiter(this,void 0,void 0,function*(){var _0x6ddae4='login/'+_0x4a0cb8;try{const _0x5bc484=yield yield fetch(_0x6ddae4);if(_0x5bc484['status']>0xc7&&_0x5bc484['status']<0x12c){const _0x52e4d5=yield _0x5bc484['json']();return new SuccessfulAuthResponse(_0x52e4d5);}const _0x505522=yield _0x5bc484['json']();return new FailedAuthResponse(_0x505522);}catch(_0x41a53c){if(_0x41a53c instanceof Error)return new FailedAuthResponse({'detail':_0x41a53c['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x41a53c;}});}['refresh'](_0x44d858){return __awaiter(this,void 0,void 0,function*(){var _0x5034e0='refresh';try{const _0x36bfea=yield this['fetch']['post'](_0x5034e0,_0x44d858,null);if(_0x36bfea['status']>0xc7&&_0x36bfea['status']<0x12c){const _0x4f10dc=yield _0x36bfea['json']();return new SuccessfulAuthResponse(_0x4f10dc);}const _0x3063a3=yield _0x36bfea['json']();return new FailedAuthResponse(_0x3063a3);}catch(_0x24c87a){if(_0x24c87a instanceof Error)return new FailedAuthResponse({'detail':_0x24c87a['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x24c87a;}});}['getTokenStatus'](_0x3b68ee){if(Date['now']()<_0x3b68ee['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x3b68ee['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
  }
@@ -113,6 +113,7 @@ type Problem = {
113
113
  type Account = {
114
114
  name: string;
115
115
  owner: string;
116
+ country: string;
116
117
  created: number;
117
118
  image_path: string;
118
119
  lists: ListIdentity[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@searchability/admin-client",
3
- "version": "0.0.39",
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(_0x13d9da){_0x13d9da[_0x13d9da['Ok']=0x0]='Ok',_0x13d9da[_0x13d9da['Refresh']=0x1]='Refresh',_0x13d9da[_0x13d9da['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(_0x2819ae){this['isSuccess']=_0x2819ae;}}class SuccessfulAccountResponse extends Response{constructor(_0x1e4fe0){super(!![]),this['account']=_0x1e4fe0;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x11fd87){super(![]),this['problem']=_0x11fd87;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x4c5840){super(!![]),this['tokens']=_0x4c5840;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x543713){super(![]),this['problem']=_0x543713;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x2778c4){super(!![]),this['apiKey']=_0x2778c4;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x2533bc){super(![]),this['problem']=_0x2533bc;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x2e0398){super(!![]),this['searchService']=_0x2e0398;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x12cc35){super(![]),this['problem']=_0x12cc35;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0xb6817){super(!![]),this['searchService']=_0xb6817;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServiceResponse extends Response{constructor(_0x125479){super(![]),this['problem']=_0x125479;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x3012b1){super(!![]),this['apiKeyValue']=_0x3012b1;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x49276f){super(!![]),this['obj']=_0x49276f;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0xc6def1){super(![]),this['problem']=_0xc6def1;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x504c36){super(![]),this['problem']=_0x504c36;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
2
-
3
- var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x2f7e01,_0x45cb4b,_0x5aaa06,_0x703676){function _0x4a5c2a(_0x19402f){return _0x19402f instanceof _0x5aaa06?_0x19402f:new _0x5aaa06(function(_0x2671f7){_0x2671f7(_0x19402f);});}return new(_0x5aaa06||(_0x5aaa06=Promise))(function(_0x20a9e3,_0x628843){function _0x9beea3(_0x341815){try{_0x53ca4a(_0x703676['next'](_0x341815));}catch(_0x2ed0e3){_0x628843(_0x2ed0e3);}}function _0x383aeb(_0x28d848){try{_0x53ca4a(_0x703676['throw'](_0x28d848));}catch(_0x1d6589){_0x628843(_0x1d6589);}}function _0x53ca4a(_0x3ff8e9){_0x3ff8e9['done']?_0x20a9e3(_0x3ff8e9['value']):_0x4a5c2a(_0x3ff8e9['value'])['then'](_0x9beea3,_0x383aeb);}_0x53ca4a((_0x703676=_0x703676['apply'](_0x2f7e01,_0x45cb4b||[]))['next']());});};class AccountService{constructor(_0x559f9f){this['fetch']=_0x559f9f;}['get'](_0x346f6a,_0x487d13){return __awaiter$5(this,void 0,void 0,function*(){const _0x434eda='Account/'+_0x346f6a+'/',_0x84520=yield this['fetch']['get'](_0x434eda,_0x487d13);try{if(_0x84520['status']>0xc7&&_0x84520['status']<0x12c){const _0x25c2be=yield _0x84520['json']();return new SuccessfulAccountResponse(_0x25c2be);}const _0x3f154a=yield _0x84520['json']();return new FailedAccountResponse(_0x3f154a);}catch(_0x4789f8){if(_0x4789f8 instanceof Error)return new FailedAccountResponse({'detail':_0x4789f8['message'],'title':_0x4789f8['name'],'status':0x1f4,'instance':'','type':''});throw _0x4789f8;}});}}
4
-
5
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x40b2ba,_0xc83b62,_0x554784,_0x1eee8d){function _0x473c64(_0x510250){return _0x510250 instanceof _0x554784?_0x510250:new _0x554784(function(_0x52ba8f){_0x52ba8f(_0x510250);});}return new(_0x554784||(_0x554784=Promise))(function(_0xe2728c,_0x20d837){function _0x648e1a(_0x4ca017){try{_0x17509c(_0x1eee8d['next'](_0x4ca017));}catch(_0x322f2c){_0x20d837(_0x322f2c);}}function _0x15f8b4(_0x198df7){try{_0x17509c(_0x1eee8d['throw'](_0x198df7));}catch(_0x36623c){_0x20d837(_0x36623c);}}function _0x17509c(_0x402a7d){_0x402a7d['done']?_0xe2728c(_0x402a7d['value']):_0x473c64(_0x402a7d['value'])['then'](_0x648e1a,_0x15f8b4);}_0x17509c((_0x1eee8d=_0x1eee8d['apply'](_0x40b2ba,_0xc83b62||[]))['next']());});};class ApiKeyService{constructor(_0x4917fd){this['fetch']=_0x4917fd,this['path']='api-key';}['create'](_0x2a72de,_0x3ee0b5,_0x5bd62e){return __awaiter$4(this,void 0,void 0,function*(){const _0xef4b56={'account_name':_0x2a72de,'api_key_name':_0x3ee0b5};try{const _0x1ee4a5=yield this['fetch']['post'](this['path'],_0x5bd62e,_0xef4b56);if(_0x1ee4a5['status']>0xc7&&_0x1ee4a5['status']<0x12c){const _0x2aa7ea=yield _0x1ee4a5['json']();return new SuccessfulApiKeyResponse(_0x2aa7ea);}const _0x104305=yield _0x1ee4a5['json']();return new FailedApiKeyResponse(_0x104305);}catch(_0xfab4b0){if(_0xfab4b0 instanceof Error)return new FailedApiKeyResponse({'detail':_0xfab4b0['message'],'title':_0xfab4b0['name'],'status':0x1f4,'instance':'','type':''});throw _0xfab4b0;}});}['view'](_0x5db371,_0xeea27,_0x26e99c){return __awaiter$4(this,void 0,void 0,function*(){const _0x541e8e=this['path']+'/'+_0x5db371+'/'+_0xeea27;try{const _0x551637=yield this['fetch']['get'](_0x541e8e,_0x26e99c);if(_0x551637['status']>0xc7&&_0x551637['status']<0x12c){const _0x199dd1=yield _0x551637['json']();return new SuccessfulApiKeyValueResponse(_0x199dd1);}const _0x13c9ed=yield _0x551637['json']();return new FailedApiKeyValueResponse(_0x13c9ed);}catch(_0x4b4b4){if(_0x4b4b4 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x4b4b4['message'],'title':_0x4b4b4['name'],'status':0x1f4,'instance':'','type':''});throw _0x4b4b4;}});}['delete'](_0x3dfed0,_0x10735c,_0x533fe1){return __awaiter$4(this,void 0,void 0,function*(){const _0x36f421=this['path']+'/'+_0x3dfed0+'/'+_0x10735c;try{const _0x4431f8=yield this['fetch']['delete'](_0x36f421,_0x533fe1);if(_0x4431f8['status']>0xc7&&_0x4431f8['status']<0x12c)return new SuccessfulResponse({});const _0x2cc5aa=yield _0x4431f8['json']();return new FailedResponse(_0x2cc5aa);}catch(_0x50efdc){if(_0x50efdc instanceof Error)return new FailedResponse({'detail':_0x50efdc['message'],'title':_0x50efdc['name'],'status':0x1f4,'instance':'','type':''});throw _0x50efdc;}});}}
6
-
7
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x13b464,_0x159cde,_0x350b42,_0x22f3b5){function _0x2b46eb(_0x1e481b){return _0x1e481b instanceof _0x350b42?_0x1e481b:new _0x350b42(function(_0x1e24e4){_0x1e24e4(_0x1e481b);});}return new(_0x350b42||(_0x350b42=Promise))(function(_0x53e913,_0x218acc){function _0x12c00a(_0x5c8693){try{_0x26f858(_0x22f3b5['next'](_0x5c8693));}catch(_0x1e76f0){_0x218acc(_0x1e76f0);}}function _0x5e3071(_0x597313){try{_0x26f858(_0x22f3b5['throw'](_0x597313));}catch(_0x4cec79){_0x218acc(_0x4cec79);}}function _0x26f858(_0x16248e){_0x16248e['done']?_0x53e913(_0x16248e['value']):_0x2b46eb(_0x16248e['value'])['then'](_0x12c00a,_0x5e3071);}_0x26f858((_0x22f3b5=_0x22f3b5['apply'](_0x13b464,_0x159cde||[]))['next']());});};class ListService{constructor(_0xd245f6){this['fetch']=_0xd245f6;}['add'](_0x439cab,_0x468ccb,_0x425005){return __awaiter$3(this,void 0,void 0,function*(){const _0x2c9260='List',_0xff7748={'account_name':_0x439cab,'list_name':_0x468ccb};try{const _0x1456ae=yield this['fetch']['post'](_0x2c9260,_0x425005,_0xff7748);if(_0x1456ae['status']>0xc7&&_0x1456ae['status']<0x12c){const _0x17daf2=yield _0x1456ae['json']();return new SuccessfulAccountResponse(_0x17daf2);}const _0x348419=yield _0x1456ae['json']();return new FailedAccountResponse(_0x348419);}catch(_0x1d738b){if(_0x1d738b instanceof Error)return new FailedAccountResponse({'detail':_0x1d738b['message'],'title':_0x1d738b['name'],'status':0x1f4,'instance':'','type':''});throw _0x1d738b;}});}['remove'](_0xff57c0,_0x27a222,_0x102aff){return __awaiter$3(this,void 0,void 0,function*(){const _0x41c737='List/'+_0xff57c0+'/'+_0x27a222,_0x3e6bc8=yield this['fetch']['delete'](_0x41c737,_0x102aff);try{if(_0x3e6bc8['status']>0xc7&&_0x3e6bc8['status']<0x12c){const _0x586c71=yield _0x3e6bc8['json']();return new SuccessfulAccountResponse(_0x586c71);}const _0x315201=yield _0x3e6bc8['json']();return new FailedAccountResponse(_0x315201);}catch(_0x1284d6){if(_0x1284d6 instanceof Error)return new FailedAccountResponse({'detail':_0x1284d6['message'],'title':_0x1284d6['name'],'status':0x1f4,'instance':'','type':''});throw _0x1284d6;}});}}
8
-
9
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x4ae1e1,_0x3c4f42,_0x2a858b,_0x4982c3){function _0x3bae27(_0x449bc5){return _0x449bc5 instanceof _0x2a858b?_0x449bc5:new _0x2a858b(function(_0x5f50a1){_0x5f50a1(_0x449bc5);});}return new(_0x2a858b||(_0x2a858b=Promise))(function(_0x4815ec,_0x42c9ea){function _0x31689c(_0x5f4bb4){try{_0x244302(_0x4982c3['next'](_0x5f4bb4));}catch(_0xda5b2a){_0x42c9ea(_0xda5b2a);}}function _0x12b751(_0x5ad5e1){try{_0x244302(_0x4982c3['throw'](_0x5ad5e1));}catch(_0x596ebb){_0x42c9ea(_0x596ebb);}}function _0x244302(_0x9c25c4){_0x9c25c4['done']?_0x4815ec(_0x9c25c4['value']):_0x3bae27(_0x9c25c4['value'])['then'](_0x31689c,_0x12b751);}_0x244302((_0x4982c3=_0x4982c3['apply'](_0x4ae1e1,_0x3c4f42||[]))['next']());});};class Fetch{constructor(_0x5c517c){this['baseUri']=_0x5c517c,this['getUrl']=_0x59e7b4=>{return _0x59e7b4['startsWith']('/')&&(_0x59e7b4=_0x59e7b4['replace']('/','')),''+this['baseUri']+_0x59e7b4;},!_0x5c517c['endsWith']('/')&&(_0x5c517c=_0x5c517c+'/');}['get'](_0x11b609,_0x4b5df1){return __awaiter$2(this,void 0,void 0,function*(){const _0x45cdc6=this['getUrl'](_0x11b609);return yield fetch(_0x45cdc6,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4b5df1}});});}['post'](_0x12e9cb,_0x47c9a0,_0x50fd46){return __awaiter$2(this,void 0,void 0,function*(){const _0x476a66=this['getUrl'](_0x12e9cb);return yield fetch(_0x476a66,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x47c9a0},'body':_0x50fd46?JSON['stringify'](_0x50fd46):null});});}['put'](_0x388119,_0x42909a,_0x3379a1){return __awaiter$2(this,void 0,void 0,function*(){const _0x50ac8e=this['getUrl'](_0x388119);return yield fetch(_0x50ac8e,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x42909a},'body':_0x3379a1?JSON['stringify'](_0x3379a1):null});});}['delete'](_0x5cce5a,_0x137666){return __awaiter$2(this,void 0,void 0,function*(){const _0x3806b3=this['getUrl'](_0x5cce5a);return yield fetch(_0x3806b3,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x137666}});});}}
10
-
11
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x192cfa,_0x537c54,_0x9fab,_0x29c8e2){function _0x541923(_0x293b26){return _0x293b26 instanceof _0x9fab?_0x293b26:new _0x9fab(function(_0xf7c72e){_0xf7c72e(_0x293b26);});}return new(_0x9fab||(_0x9fab=Promise))(function(_0x1c75b0,_0x55840a){function _0x4a556(_0xdf4768){try{_0x44f0ea(_0x29c8e2['next'](_0xdf4768));}catch(_0x1a5126){_0x55840a(_0x1a5126);}}function _0x2f0700(_0x5c2fa2){try{_0x44f0ea(_0x29c8e2['throw'](_0x5c2fa2));}catch(_0x4c93a7){_0x55840a(_0x4c93a7);}}function _0x44f0ea(_0x19b160){_0x19b160['done']?_0x1c75b0(_0x19b160['value']):_0x541923(_0x19b160['value'])['then'](_0x4a556,_0x2f0700);}_0x44f0ea((_0x29c8e2=_0x29c8e2['apply'](_0x192cfa,_0x537c54||[]))['next']());});};class SearchServersService{constructor(_0xfaa4d9){this['fetch']=_0xfaa4d9,this['path']='search-services';}['create'](_0x4cd5b7,_0x5a8cb8,_0x369b5c,_0x1c4dc7,_0x35fe39,_0x804315,_0x27c6ad,_0x1e5e11){return __awaiter$1(this,void 0,void 0,function*(){const _0x3d9808={'account_name':_0x4cd5b7,'search_service_name':_0x5a8cb8,'endpoint':_0x369b5c,'key':_0x1c4dc7,'county':_0x35fe39,'provider':_0x804315,'index_name':_0x27c6ad};try{const _0x50091c=yield this['fetch']['post'](this['path'],_0x1e5e11,_0x3d9808);if(_0x50091c['status']>0xc7&&_0x50091c['status']<0x12c){const _0x4de772=yield _0x50091c['json']();return new SuccessfulSearchServiceResponse(_0x4de772);}const _0x548382=yield _0x50091c['json']();return new FailedSearchServiceResponse(_0x548382);}catch(_0x2c0210){if(_0x2c0210 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x2c0210['message'],'title':_0x2c0210['name'],'status':0x1f4,'instance':'','type':''});throw _0x2c0210;}});}['delete'](_0x4b8421,_0x12191d,_0x480695){return __awaiter$1(this,void 0,void 0,function*(){const _0x300123=this['path']+'/'+_0x4b8421+'/'+_0x12191d;try{const _0x51b39b=yield this['fetch']['delete'](_0x300123,_0x480695);if(_0x51b39b['status']>0xc7&&_0x51b39b['status']<0x12c)return new SuccessfulResponse({});const _0xeda1a3=yield _0x51b39b['json']();return new FailedResponse(_0xeda1a3);}catch(_0x36e837){if(_0x36e837 instanceof Error)return new FailedResponse({'detail':_0x36e837['message'],'title':_0x36e837['name'],'status':0x1f4,'instance':'','type':''});throw _0x36e837;}});}['view'](_0x49ffe5,_0x26d284,_0x26c6d1){return __awaiter$1(this,void 0,void 0,function*(){const _0x23106a=this['path']+'/'+_0x49ffe5+'/'+_0x26d284;try{const _0x189cc5=yield this['fetch']['get'](_0x23106a,_0x26c6d1);if(_0x189cc5['status']>0xc7&&_0x189cc5['status']<0x12c){const _0x33cb8a=yield _0x189cc5['json']();return new SuccessfulViewSearchServiceResponse(_0x33cb8a);}const _0x16cea4=yield _0x189cc5['json']();return new FailedViewSearchServiceResponse(_0x16cea4);}catch(_0x3b33c1){if(_0x3b33c1 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x3b33c1['message'],'title':_0x3b33c1['name'],'status':0x1f4,'instance':'','type':''});throw _0x3b33c1;}});}}
12
-
13
- var __awaiter=undefined&&undefined['__awaiter']||function(_0xfa6e91,_0x1ef5e0,_0x2d9b48,_0xe7d2bf){function _0x3bc91f(_0xdde2c2){return _0xdde2c2 instanceof _0x2d9b48?_0xdde2c2:new _0x2d9b48(function(_0x5aaa79){_0x5aaa79(_0xdde2c2);});}return new(_0x2d9b48||(_0x2d9b48=Promise))(function(_0x14b72d,_0x542c63){function _0x43b0cc(_0x543a6d){try{_0xb77d25(_0xe7d2bf['next'](_0x543a6d));}catch(_0x129947){_0x542c63(_0x129947);}}function _0x347068(_0x2c4643){try{_0xb77d25(_0xe7d2bf['throw'](_0x2c4643));}catch(_0x12ad45){_0x542c63(_0x12ad45);}}function _0xb77d25(_0x2e9776){_0x2e9776['done']?_0x14b72d(_0x2e9776['value']):_0x3bc91f(_0x2e9776['value'])['then'](_0x43b0cc,_0x347068);}_0xb77d25((_0xe7d2bf=_0xe7d2bf['apply'](_0xfa6e91,_0x1ef5e0||[]))['next']());});};class AdminClient{constructor(_0x281652='https://admin.searchability.dev/'){var _0x29b0a4=new Fetch(_0x281652);this['Accounts']=new AccountService(_0x29b0a4),this['Lists']=new ListService(_0x29b0a4),this['ApiKeys']=new ApiKeyService(_0x29b0a4),this['SearchServices']=new SearchServersService(_0x29b0a4);}}class AuthClient{constructor(_0x267d4e='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x267d4e);}['login'](_0xae663e){return __awaiter(this,void 0,void 0,function*(){var _0x1e2f19='login/'+_0xae663e;try{const _0x145f54=yield yield fetch(_0x1e2f19);if(_0x145f54['status']>0xc7&&_0x145f54['status']<0x12c){const _0x1e5a67=yield _0x145f54['json']();return new SuccessfulAuthResponse(_0x1e5a67);}const _0x592a7b=yield _0x145f54['json']();return new FailedAuthResponse(_0x592a7b);}catch(_0x41409b){if(_0x41409b instanceof Error)return new FailedAuthResponse({'detail':_0x41409b['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x41409b;}});}['refresh'](_0x452995){return __awaiter(this,void 0,void 0,function*(){var _0x11d698='refresh';try{const _0xf89408=yield this['fetch']['post'](_0x11d698,_0x452995,null);if(_0xf89408['status']>0xc7&&_0xf89408['status']<0x12c){const _0x4c88d3=yield _0xf89408['json']();return new SuccessfulAuthResponse(_0x4c88d3);}const _0x480972=yield _0xf89408['json']();return new FailedAuthResponse(_0x480972);}catch(_0x4c8795){if(_0x4c8795 instanceof Error)return new FailedAuthResponse({'detail':_0x4c8795['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x4c8795;}});}['getTokenStatus'](_0x1735fa){if(Date['now']()<_0x1735fa['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x1735fa['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
14
-
15
- export { AdminClient, AuthClient, TokenStatus, Tokens };