@searchability/admin-client 0.0.34 → 0.0.36

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(_0x5f2294){_0x5f2294[_0x5f2294['Ok']=0x0]='Ok',_0x5f2294[_0x5f2294['Refresh']=0x1]='Refresh',_0x5f2294[_0x5f2294['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(_0x4a6c84){this['isSuccess']=_0x4a6c84;}}class SuccessfulAccountResponse extends Response{constructor(_0xcc286a){super(!![]),this['account']=_0xcc286a;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x3d4dbc){super(![]),this['problem']=_0x3d4dbc;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x3b8cdf){super(!![]),this['tokens']=_0x3b8cdf;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x3c5310){super(![]),this['problem']=_0x3c5310;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x1f3cfa){super(!![]),this['apiKey']=_0x1f3cfa;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x39e96f){super(![]),this['problem']=_0x39e96f;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x5c0eeb){super(!![]),this['searchService']=_0x5c0eeb;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x31f151){super(![]),this['problem']=_0x31f151;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x1f4d35){super(!![]),this['searchService']=_0x1f4d35;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServiceResponse extends Response{constructor(_0x320dcc){super(![]),this['problem']=_0x320dcc;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x146152){super(!![]),this['apiKeyValue']=_0x146152;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x3c00c1){super(!![]),this['obj']=_0x3c00c1;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x2a07d4){super(![]),this['problem']=_0x2a07d4;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x15b5f7){super(![]),this['problem']=_0x15b5f7;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
2
+
3
+ var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x40fff2,_0x5d31a7,_0x54facf,_0x12d942){function _0x219c8e(_0x23db20){return _0x23db20 instanceof _0x54facf?_0x23db20:new _0x54facf(function(_0x107166){_0x107166(_0x23db20);});}return new(_0x54facf||(_0x54facf=Promise))(function(_0x5644a0,_0x7d823a){function _0x49610a(_0x35c485){try{_0x190120(_0x12d942['next'](_0x35c485));}catch(_0x23cafc){_0x7d823a(_0x23cafc);}}function _0xde7da5(_0x2490eb){try{_0x190120(_0x12d942['throw'](_0x2490eb));}catch(_0x48b934){_0x7d823a(_0x48b934);}}function _0x190120(_0xcdd4d6){_0xcdd4d6['done']?_0x5644a0(_0xcdd4d6['value']):_0x219c8e(_0xcdd4d6['value'])['then'](_0x49610a,_0xde7da5);}_0x190120((_0x12d942=_0x12d942['apply'](_0x40fff2,_0x5d31a7||[]))['next']());});};class AccountService{constructor(_0x1035b0){this['fetch']=_0x1035b0;}['get'](_0x158994,_0x3c6b05){return __awaiter$5(this,void 0,void 0,function*(){const _0x16393d='Account/'+_0x158994+'/',_0xe1e68e=yield this['fetch']['get'](_0x16393d,_0x3c6b05);try{if(_0xe1e68e['status']>0xc7&&_0xe1e68e['status']<0x12c){const _0x3cc500=yield _0xe1e68e['json']();return new SuccessfulAccountResponse(_0x3cc500);}const _0x3cd678=yield _0xe1e68e['json']();return new FailedAccountResponse(_0x3cd678);}catch(_0x5cdc03){if(_0x5cdc03 instanceof Error)return new FailedAccountResponse({'detail':_0x5cdc03['message'],'title':_0x5cdc03['name'],'status':0x1f4,'instance':'','type':''});throw _0x5cdc03;}});}}
4
+
5
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x3af5fa,_0x494f2e,_0x45fdfc,_0x43256c){function _0x400f1f(_0xb018bf){return _0xb018bf instanceof _0x45fdfc?_0xb018bf:new _0x45fdfc(function(_0x5b72d2){_0x5b72d2(_0xb018bf);});}return new(_0x45fdfc||(_0x45fdfc=Promise))(function(_0x439fb5,_0x3838ac){function _0x2db72a(_0x511426){try{_0x1ab680(_0x43256c['next'](_0x511426));}catch(_0x14edd9){_0x3838ac(_0x14edd9);}}function _0x4491c4(_0x4cbd7f){try{_0x1ab680(_0x43256c['throw'](_0x4cbd7f));}catch(_0xb2d604){_0x3838ac(_0xb2d604);}}function _0x1ab680(_0x2a8905){_0x2a8905['done']?_0x439fb5(_0x2a8905['value']):_0x400f1f(_0x2a8905['value'])['then'](_0x2db72a,_0x4491c4);}_0x1ab680((_0x43256c=_0x43256c['apply'](_0x3af5fa,_0x494f2e||[]))['next']());});};class ApiKeyService{constructor(_0x24a5c1){this['fetch']=_0x24a5c1,this['path']='api-key';}['create'](_0x320132,_0x56b1d4,_0x55cf33){return __awaiter$4(this,void 0,void 0,function*(){const _0x504e3e={'account_name':_0x320132,'api_key_name':_0x56b1d4};try{const _0x237652=yield this['fetch']['post'](this['path'],_0x55cf33,_0x504e3e);if(_0x237652['status']>0xc7&&_0x237652['status']<0x12c){const _0x288670=yield _0x237652['json']();return new SuccessfulApiKeyResponse(_0x288670);}const _0x224d37=yield _0x237652['json']();return new FailedApiKeyResponse(_0x224d37);}catch(_0x1d5b5d){if(_0x1d5b5d instanceof Error)return new FailedApiKeyResponse({'detail':_0x1d5b5d['message'],'title':_0x1d5b5d['name'],'status':0x1f4,'instance':'','type':''});throw _0x1d5b5d;}});}['view'](_0x2b90a8,_0x678016,_0x31a199){return __awaiter$4(this,void 0,void 0,function*(){const _0x1c8d47=this['path']+'/'+_0x2b90a8+'/'+_0x678016;try{const _0x191a69=yield this['fetch']['get'](_0x1c8d47,_0x31a199);if(_0x191a69['status']>0xc7&&_0x191a69['status']<0x12c){const _0x4f9493=yield _0x191a69['json']();return new SuccessfulApiKeyValueResponse(_0x4f9493);}const _0x94a6ec=yield _0x191a69['json']();return new FailedApiKeyValueResponse(_0x94a6ec);}catch(_0x34b572){if(_0x34b572 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x34b572['message'],'title':_0x34b572['name'],'status':0x1f4,'instance':'','type':''});throw _0x34b572;}});}['delete'](_0x167f39,_0x568559,_0x5c3ce9){return __awaiter$4(this,void 0,void 0,function*(){const _0x20d356=this['path']+'/'+_0x167f39+'/'+_0x568559;try{const _0x4403af=yield this['fetch']['delete'](_0x20d356,_0x5c3ce9);if(_0x4403af['status']>0xc7&&_0x4403af['status']<0x12c)return new SuccessfulResponse({});const _0x2130ec=yield _0x4403af['json']();return new FailedResponse(_0x2130ec);}catch(_0x18cc97){if(_0x18cc97 instanceof Error)return new FailedResponse({'detail':_0x18cc97['message'],'title':_0x18cc97['name'],'status':0x1f4,'instance':'','type':''});throw _0x18cc97;}});}}
6
+
7
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0xff0d5a,_0x5568f6,_0x43ed08,_0x4cd698){function _0xc5eac6(_0xa7ec4a){return _0xa7ec4a instanceof _0x43ed08?_0xa7ec4a:new _0x43ed08(function(_0x31e939){_0x31e939(_0xa7ec4a);});}return new(_0x43ed08||(_0x43ed08=Promise))(function(_0x596cc5,_0x9294b4){function _0x551e3e(_0x52e8af){try{_0x43bace(_0x4cd698['next'](_0x52e8af));}catch(_0x40f861){_0x9294b4(_0x40f861);}}function _0x579488(_0x487ebf){try{_0x43bace(_0x4cd698['throw'](_0x487ebf));}catch(_0x21e0f3){_0x9294b4(_0x21e0f3);}}function _0x43bace(_0x30d503){_0x30d503['done']?_0x596cc5(_0x30d503['value']):_0xc5eac6(_0x30d503['value'])['then'](_0x551e3e,_0x579488);}_0x43bace((_0x4cd698=_0x4cd698['apply'](_0xff0d5a,_0x5568f6||[]))['next']());});};class ListService{constructor(_0xcec776){this['fetch']=_0xcec776;}['add'](_0x5b0e94,_0x2115ed,_0x58c3ac){return __awaiter$3(this,void 0,void 0,function*(){const _0x101da9='List',_0x4499df={'account_name':_0x5b0e94,'list_name':_0x2115ed};try{const _0x496637=yield this['fetch']['post'](_0x101da9,_0x58c3ac,_0x4499df);if(_0x496637['status']>0xc7&&_0x496637['status']<0x12c){const _0x148322=yield _0x496637['json']();return new SuccessfulAccountResponse(_0x148322);}const _0x4dc355=yield _0x496637['json']();return new FailedAccountResponse(_0x4dc355);}catch(_0x4a81d7){if(_0x4a81d7 instanceof Error)return new FailedAccountResponse({'detail':_0x4a81d7['message'],'title':_0x4a81d7['name'],'status':0x1f4,'instance':'','type':''});throw _0x4a81d7;}});}['remove'](_0x34df1e,_0x10804e,_0x40c53c){return __awaiter$3(this,void 0,void 0,function*(){const _0x3789f5='List/'+_0x34df1e+'/'+_0x10804e,_0x3d2c8e=yield this['fetch']['delete'](_0x3789f5,_0x40c53c);try{if(_0x3d2c8e['status']>0xc7&&_0x3d2c8e['status']<0x12c){const _0x32cd07=yield _0x3d2c8e['json']();return new SuccessfulAccountResponse(_0x32cd07);}const _0x115a6d=yield _0x3d2c8e['json']();return new FailedAccountResponse(_0x115a6d);}catch(_0x523ad9){if(_0x523ad9 instanceof Error)return new FailedAccountResponse({'detail':_0x523ad9['message'],'title':_0x523ad9['name'],'status':0x1f4,'instance':'','type':''});throw _0x523ad9;}});}}
8
+
9
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x5c2aee,_0x36d134,_0x3ca33c,_0x3df68d){function _0x1ffe40(_0x348f8d){return _0x348f8d instanceof _0x3ca33c?_0x348f8d:new _0x3ca33c(function(_0xa74770){_0xa74770(_0x348f8d);});}return new(_0x3ca33c||(_0x3ca33c=Promise))(function(_0x5a0f9e,_0x138a75){function _0x2ba2e0(_0x1fc600){try{_0x4bed4a(_0x3df68d['next'](_0x1fc600));}catch(_0x4e3184){_0x138a75(_0x4e3184);}}function _0x51c812(_0x120934){try{_0x4bed4a(_0x3df68d['throw'](_0x120934));}catch(_0x57cde7){_0x138a75(_0x57cde7);}}function _0x4bed4a(_0x15e270){_0x15e270['done']?_0x5a0f9e(_0x15e270['value']):_0x1ffe40(_0x15e270['value'])['then'](_0x2ba2e0,_0x51c812);}_0x4bed4a((_0x3df68d=_0x3df68d['apply'](_0x5c2aee,_0x36d134||[]))['next']());});};class Fetch{constructor(_0x49d843){this['baseUri']=_0x49d843,this['getUrl']=_0x440564=>{return _0x440564['startsWith']('/')&&(_0x440564=_0x440564['replace']('/','')),''+this['baseUri']+_0x440564;},!_0x49d843['endsWith']('/')&&(_0x49d843=_0x49d843+'/');}['get'](_0x6c31e7,_0x233c95){return __awaiter$2(this,void 0,void 0,function*(){const _0x358180=this['getUrl'](_0x6c31e7);return yield fetch(_0x358180,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x233c95}});});}['post'](_0x43dab7,_0x306840,_0x23dbd8){return __awaiter$2(this,void 0,void 0,function*(){const _0x20a593=this['getUrl'](_0x43dab7);return yield fetch(_0x20a593,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x306840},'body':_0x23dbd8?JSON['stringify'](_0x23dbd8):null});});}['put'](_0x4d40bf,_0x585c51,_0x3d89f7){return __awaiter$2(this,void 0,void 0,function*(){const _0x2ade85=this['getUrl'](_0x4d40bf);return yield fetch(_0x2ade85,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x585c51},'body':_0x3d89f7?JSON['stringify'](_0x3d89f7):null});});}['delete'](_0x2ec81f,_0x273426){return __awaiter$2(this,void 0,void 0,function*(){const _0x1d3bac=this['getUrl'](_0x2ec81f);return yield fetch(_0x1d3bac,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x273426}});});}}
10
+
11
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x3a75c1,_0x92572a,_0x4a2b91,_0x1eaa2c){function _0x25c54a(_0x59f91d){return _0x59f91d instanceof _0x4a2b91?_0x59f91d:new _0x4a2b91(function(_0x3cf4af){_0x3cf4af(_0x59f91d);});}return new(_0x4a2b91||(_0x4a2b91=Promise))(function(_0x177726,_0x2345de){function _0x1d4a44(_0x17eee2){try{_0x18eefa(_0x1eaa2c['next'](_0x17eee2));}catch(_0x15d37b){_0x2345de(_0x15d37b);}}function _0x5eb1ed(_0x55749c){try{_0x18eefa(_0x1eaa2c['throw'](_0x55749c));}catch(_0x21a430){_0x2345de(_0x21a430);}}function _0x18eefa(_0x5e2c04){_0x5e2c04['done']?_0x177726(_0x5e2c04['value']):_0x25c54a(_0x5e2c04['value'])['then'](_0x1d4a44,_0x5eb1ed);}_0x18eefa((_0x1eaa2c=_0x1eaa2c['apply'](_0x3a75c1,_0x92572a||[]))['next']());});};class SearchServersService{constructor(_0x16f456){this['fetch']=_0x16f456,this['path']='search-services';}['create'](_0x40b8be,_0x10b7c2,_0x2b4e2f,_0x47d7ca,_0x568478,_0x1a96b3){return __awaiter$1(this,void 0,void 0,function*(){const _0x52aa1b={'account_name':_0x40b8be,'search_service_name':_0x10b7c2,'endpoint':_0x2b4e2f,'key':_0x47d7ca,'county':_0x568478};try{const _0x4b4eca=yield this['fetch']['post'](this['path'],_0x1a96b3,_0x52aa1b);if(_0x4b4eca['status']>0xc7&&_0x4b4eca['status']<0x12c){const _0x273ba1=yield _0x4b4eca['json']();return new SuccessfulSearchServiceResponse(_0x273ba1);}const _0x42f8ed=yield _0x4b4eca['json']();return new FailedSearchServiceResponse(_0x42f8ed);}catch(_0x3536fa){if(_0x3536fa instanceof Error)return new FailedSearchServiceResponse({'detail':_0x3536fa['message'],'title':_0x3536fa['name'],'status':0x1f4,'instance':'','type':''});throw _0x3536fa;}});}['delete'](_0x3642c2,_0x38067d,_0x146398){return __awaiter$1(this,void 0,void 0,function*(){const _0x2f3125=this['path']+'/'+_0x3642c2+'/'+_0x38067d;try{const _0x1f62ca=yield this['fetch']['delete'](_0x2f3125,_0x146398);if(_0x1f62ca['status']>0xc7&&_0x1f62ca['status']<0x12c)return new SuccessfulResponse({});const _0xb31541=yield _0x1f62ca['json']();return new FailedResponse(_0xb31541);}catch(_0x162cfd){if(_0x162cfd instanceof Error)return new FailedResponse({'detail':_0x162cfd['message'],'title':_0x162cfd['name'],'status':0x1f4,'instance':'','type':''});throw _0x162cfd;}});}['view'](_0x3ad077,_0x37e197,_0x545a1d){return __awaiter$1(this,void 0,void 0,function*(){const _0x414cc3=this['path']+'/'+_0x3ad077+'/'+_0x37e197;try{const _0x4462ba=yield this['fetch']['get'](_0x414cc3,_0x545a1d);if(_0x4462ba['status']>0xc7&&_0x4462ba['status']<0x12c){const _0x56e259=yield _0x4462ba['json']();return new SuccessfulViewSearchServiceResponse(_0x56e259);}const _0x12add6=yield _0x4462ba['json']();return new FailedViewSearchServiceResponse(_0x12add6);}catch(_0x4914a5){if(_0x4914a5 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x4914a5['message'],'title':_0x4914a5['name'],'status':0x1f4,'instance':'','type':''});throw _0x4914a5;}});}}
12
+
13
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x5785ff,_0x3dd1bc,_0x4f443a,_0x34fd7d){function _0x4424a5(_0x449295){return _0x449295 instanceof _0x4f443a?_0x449295:new _0x4f443a(function(_0xa03dfb){_0xa03dfb(_0x449295);});}return new(_0x4f443a||(_0x4f443a=Promise))(function(_0x31f2b7,_0x8ea7c0){function _0x369099(_0xc1b33e){try{_0x102182(_0x34fd7d['next'](_0xc1b33e));}catch(_0x4c9bd2){_0x8ea7c0(_0x4c9bd2);}}function _0x1644af(_0x49482e){try{_0x102182(_0x34fd7d['throw'](_0x49482e));}catch(_0x3d30e0){_0x8ea7c0(_0x3d30e0);}}function _0x102182(_0xddfa98){_0xddfa98['done']?_0x31f2b7(_0xddfa98['value']):_0x4424a5(_0xddfa98['value'])['then'](_0x369099,_0x1644af);}_0x102182((_0x34fd7d=_0x34fd7d['apply'](_0x5785ff,_0x3dd1bc||[]))['next']());});};class AdminClient{constructor(_0x546cf2='https://admin.searchability.dev/'){var _0x53007d=new Fetch(_0x546cf2);this['Accounts']=new AccountService(_0x53007d),this['Lists']=new ListService(_0x53007d),this['ApiKeys']=new ApiKeyService(_0x53007d),this['SearchServices']=new SearchServersService(_0x53007d);}}class AuthClient{constructor(_0x2d962f='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x2d962f);}['login'](_0x4e0a29){return __awaiter(this,void 0,void 0,function*(){var _0x1875ac='login/'+_0x4e0a29;try{const _0x49e7d7=yield yield fetch(_0x1875ac);if(_0x49e7d7['status']>0xc7&&_0x49e7d7['status']<0x12c){const _0x2eb268=yield _0x49e7d7['json']();return new SuccessfulAuthResponse(_0x2eb268);}const _0x2adfcc=yield _0x49e7d7['json']();return new FailedAuthResponse(_0x2adfcc);}catch(_0x1ad283){if(_0x1ad283 instanceof Error)return new FailedAuthResponse({'detail':_0x1ad283['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x1ad283;}});}['refresh'](_0x470157){return __awaiter(this,void 0,void 0,function*(){var _0x196d16='refresh';try{const _0x53b583=yield this['fetch']['post'](_0x196d16,_0x470157,null);if(_0x53b583['status']>0xc7&&_0x53b583['status']<0x12c){const _0x49b8cc=yield _0x53b583['json']();return new SuccessfulAuthResponse(_0x49b8cc);}const _0x16b1c8=yield _0x53b583['json']();return new FailedAuthResponse(_0x16b1c8);}catch(_0x2b2dc6){if(_0x2b2dc6 instanceof Error)return new FailedAuthResponse({'detail':_0x2b2dc6['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x2b2dc6;}});}['getTokenStatus'](_0x3083a8){if(Date['now']()<_0x3083a8['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x3083a8['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
14
+
15
+ export { AdminClient, AuthClient, TokenStatus, Tokens };
@@ -1,16 +1,18 @@
1
1
  'use strict';
2
2
 
3
- exports.TokenStatus = void 0;(function(_0x3dbff4){_0x3dbff4[_0x3dbff4['Ok']=0x0]='Ok',_0x3dbff4[_0x3dbff4['Refresh']=0x1]='Refresh',_0x3dbff4[_0x3dbff4['Expired']=0x2]='Expired';}(exports.TokenStatus||(exports.TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}}class Response{constructor(_0x4d2fc4){this['isSuccess']=_0x4d2fc4;}}class SuccessfulAccountResponse extends Response{constructor(_0x7dc9c0){super(!![]),this['account']=_0x7dc9c0;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0xf90dc0){super(![]),this['problem']=_0xf90dc0;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x1d6825){super(!![]),this['tokens']=_0x1d6825;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x1d32b1){super(![]),this['problem']=_0x1d32b1;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x526950){super(!![]),this['apiKey']=_0x526950;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x2f01e8){super(![]),this['problem']=_0x2f01e8;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x4c5e35){super(!![]),this['apiKeyValue']=_0x4c5e35;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x426185){super(!![]),this['obj']=_0x426185;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x40ac68){super(![]),this['problem']=_0x40ac68;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x589c68){super(![]),this['problem']=_0x589c68;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
3
+ exports.TokenStatus = void 0;(function(_0x83be56){_0x83be56[_0x83be56['Ok']=0x0]='Ok',_0x83be56[_0x83be56['Refresh']=0x1]='Refresh',_0x83be56[_0x83be56['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(_0x1be141){this['isSuccess']=_0x1be141;}}class SuccessfulAccountResponse extends Response{constructor(_0x18c8ee){super(!![]),this['account']=_0x18c8ee;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x4241de){super(![]),this['problem']=_0x4241de;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x1a03c0){super(!![]),this['tokens']=_0x1a03c0;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x339f87){super(![]),this['problem']=_0x339f87;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x4f2f75){super(!![]),this['apiKey']=_0x4f2f75;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x3846b9){super(![]),this['problem']=_0x3846b9;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x4881ab){super(!![]),this['searchService']=_0x4881ab;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x1b4ef8){super(![]),this['problem']=_0x1b4ef8;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x4d8b41){super(!![]),this['searchService']=_0x4d8b41;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServiceResponse extends Response{constructor(_0x234986){super(![]),this['problem']=_0x234986;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x4eeff0){super(!![]),this['apiKeyValue']=_0x4eeff0;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x16d389){super(!![]),this['obj']=_0x16d389;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x49303d){super(![]),this['problem']=_0x49303d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x259fd0){super(![]),this['problem']=_0x259fd0;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
4
4
 
5
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x36070c,_0x429e58,_0x4d9b2f,_0x534a78){function _0x3b9c72(_0x46e3b9){return _0x46e3b9 instanceof _0x4d9b2f?_0x46e3b9:new _0x4d9b2f(function(_0xbf4a91){_0xbf4a91(_0x46e3b9);});}return new(_0x4d9b2f||(_0x4d9b2f=Promise))(function(_0x1f31cd,_0x3425bd){function _0x4c1d10(_0x42e7be){try{_0x32fe2d(_0x534a78['next'](_0x42e7be));}catch(_0x33032a){_0x3425bd(_0x33032a);}}function _0x1835f1(_0x283f84){try{_0x32fe2d(_0x534a78['throw'](_0x283f84));}catch(_0x4bc75e){_0x3425bd(_0x4bc75e);}}function _0x32fe2d(_0x2c6459){_0x2c6459['done']?_0x1f31cd(_0x2c6459['value']):_0x3b9c72(_0x2c6459['value'])['then'](_0x4c1d10,_0x1835f1);}_0x32fe2d((_0x534a78=_0x534a78['apply'](_0x36070c,_0x429e58||[]))['next']());});};class AccountService{constructor(_0x2e23ec){this['fetch']=_0x2e23ec;}['get'](_0x4517e8,_0x15ee02){return __awaiter$4(this,void 0,void 0,function*(){const _0x3ca3ff='Account/'+_0x4517e8+'/',_0x568024=yield this['fetch']['get'](_0x3ca3ff,_0x15ee02);try{if(_0x568024['status']>0xc7&&_0x568024['status']<0x12c){const _0x346d3d=yield _0x568024['json']();return new SuccessfulAccountResponse(_0x346d3d);}const _0x2f6d9a=yield _0x568024['json']();return new FailedAccountResponse(_0x2f6d9a);}catch(_0x28191f){if(_0x28191f instanceof Error)return new FailedAccountResponse({'detail':_0x28191f['message'],'title':_0x28191f['name'],'status':0x1f4,'instance':'','type':''});throw _0x28191f;}});}}
5
+ var __awaiter$5=undefined&&undefined['__awaiter']||function(_0xe31740,_0x23d3fc,_0x22a63a,_0x13120d){function _0x2dbb6f(_0x44c510){return _0x44c510 instanceof _0x22a63a?_0x44c510:new _0x22a63a(function(_0x3c4db4){_0x3c4db4(_0x44c510);});}return new(_0x22a63a||(_0x22a63a=Promise))(function(_0x2f7c70,_0x243ca8){function _0x2bc3ac(_0x327b2f){try{_0x55a472(_0x13120d['next'](_0x327b2f));}catch(_0xd09a7f){_0x243ca8(_0xd09a7f);}}function _0x1cd77a(_0xfb2e33){try{_0x55a472(_0x13120d['throw'](_0xfb2e33));}catch(_0x375e0f){_0x243ca8(_0x375e0f);}}function _0x55a472(_0x22c6d0){_0x22c6d0['done']?_0x2f7c70(_0x22c6d0['value']):_0x2dbb6f(_0x22c6d0['value'])['then'](_0x2bc3ac,_0x1cd77a);}_0x55a472((_0x13120d=_0x13120d['apply'](_0xe31740,_0x23d3fc||[]))['next']());});};class AccountService{constructor(_0x447f0c){this['fetch']=_0x447f0c;}['get'](_0x2ec113,_0x302c21){return __awaiter$5(this,void 0,void 0,function*(){const _0x33c0b7='Account/'+_0x2ec113+'/',_0x3d4d5d=yield this['fetch']['get'](_0x33c0b7,_0x302c21);try{if(_0x3d4d5d['status']>0xc7&&_0x3d4d5d['status']<0x12c){const _0x15cef7=yield _0x3d4d5d['json']();return new SuccessfulAccountResponse(_0x15cef7);}const _0x1503c6=yield _0x3d4d5d['json']();return new FailedAccountResponse(_0x1503c6);}catch(_0x1e534e){if(_0x1e534e instanceof Error)return new FailedAccountResponse({'detail':_0x1e534e['message'],'title':_0x1e534e['name'],'status':0x1f4,'instance':'','type':''});throw _0x1e534e;}});}}
6
6
 
7
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x5aaec8,_0x5d5b4b,_0x2579ff,_0x11c52e){function _0x267b06(_0x1a6efd){return _0x1a6efd instanceof _0x2579ff?_0x1a6efd:new _0x2579ff(function(_0x344d3e){_0x344d3e(_0x1a6efd);});}return new(_0x2579ff||(_0x2579ff=Promise))(function(_0x1b3779,_0x478f25){function _0x2744ca(_0x3e26ce){try{_0x1c0a54(_0x11c52e['next'](_0x3e26ce));}catch(_0x2ccd5e){_0x478f25(_0x2ccd5e);}}function _0x5073ed(_0x3ae6c5){try{_0x1c0a54(_0x11c52e['throw'](_0x3ae6c5));}catch(_0x269a52){_0x478f25(_0x269a52);}}function _0x1c0a54(_0xe3c5ea){_0xe3c5ea['done']?_0x1b3779(_0xe3c5ea['value']):_0x267b06(_0xe3c5ea['value'])['then'](_0x2744ca,_0x5073ed);}_0x1c0a54((_0x11c52e=_0x11c52e['apply'](_0x5aaec8,_0x5d5b4b||[]))['next']());});};class ApiKeyService{constructor(_0x4a7354){this['fetch']=_0x4a7354,this['path']='api-key';}['create'](_0x353bbd,_0x27e28f,_0x4e245c){return __awaiter$3(this,void 0,void 0,function*(){const _0x1a14cb={'account_name':_0x353bbd,'api_key_name':_0x27e28f};try{const _0x3575c2=yield this['fetch']['post'](this['path'],_0x4e245c,_0x1a14cb);if(_0x3575c2['status']>0xc7&&_0x3575c2['status']<0x12c){const _0x21f96b=yield _0x3575c2['json']();return new SuccessfulApiKeyResponse(_0x21f96b);}const _0x59c2d2=yield _0x3575c2['json']();return new FailedApiKeyResponse(_0x59c2d2);}catch(_0x362fa9){if(_0x362fa9 instanceof Error)return new FailedApiKeyResponse({'detail':_0x362fa9['message'],'title':_0x362fa9['name'],'status':0x1f4,'instance':'','type':''});throw _0x362fa9;}});}['view'](_0x3a1437,_0x1c2376,_0x595c96){return __awaiter$3(this,void 0,void 0,function*(){const _0x5c9b8f=this['path']+'/'+_0x3a1437+'/'+_0x1c2376;try{const _0x15306b=yield this['fetch']['get'](_0x5c9b8f,_0x595c96);if(_0x15306b['status']>0xc7&&_0x15306b['status']<0x12c){const _0x2d6848=yield _0x15306b['json']();return new SuccessfulApiKeyValueResponse(_0x2d6848);}const _0x1da988=yield _0x15306b['json']();return new FailedApiKeyValueResponse(_0x1da988);}catch(_0xa4eeb2){if(_0xa4eeb2 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0xa4eeb2['message'],'title':_0xa4eeb2['name'],'status':0x1f4,'instance':'','type':''});throw _0xa4eeb2;}});}['delete'](_0x40dc44,_0x4b8b36,_0x12caf9){return __awaiter$3(this,void 0,void 0,function*(){const _0x59276b=this['path']+'/'+_0x40dc44+'/'+_0x4b8b36;try{const _0x120150=yield this['fetch']['delete'](_0x59276b,_0x12caf9);if(_0x120150['status']>0xc7&&_0x120150['status']<0x12c)return new SuccessfulResponse({});const _0x3a80ba=yield _0x120150['json']();return new FailedResponse(_0x3a80ba);}catch(_0x27de3e){if(_0x27de3e instanceof Error)return new FailedResponse({'detail':_0x27de3e['message'],'title':_0x27de3e['name'],'status':0x1f4,'instance':'','type':''});throw _0x27de3e;}});}}
7
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x2aaf98,_0x4407b5,_0x20edda,_0xb26d96){function _0x2595ab(_0x3b217e){return _0x3b217e instanceof _0x20edda?_0x3b217e:new _0x20edda(function(_0x26ba04){_0x26ba04(_0x3b217e);});}return new(_0x20edda||(_0x20edda=Promise))(function(_0x362790,_0x9d255f){function _0x402f83(_0x326587){try{_0x32bd3e(_0xb26d96['next'](_0x326587));}catch(_0x11f1b3){_0x9d255f(_0x11f1b3);}}function _0x2091e9(_0x2ba9ea){try{_0x32bd3e(_0xb26d96['throw'](_0x2ba9ea));}catch(_0x4fe8ac){_0x9d255f(_0x4fe8ac);}}function _0x32bd3e(_0x27d113){_0x27d113['done']?_0x362790(_0x27d113['value']):_0x2595ab(_0x27d113['value'])['then'](_0x402f83,_0x2091e9);}_0x32bd3e((_0xb26d96=_0xb26d96['apply'](_0x2aaf98,_0x4407b5||[]))['next']());});};class ApiKeyService{constructor(_0x32bda1){this['fetch']=_0x32bda1,this['path']='api-key';}['create'](_0x2f9b7d,_0x2ff0a8,_0x50269d){return __awaiter$4(this,void 0,void 0,function*(){const _0x5262cc={'account_name':_0x2f9b7d,'api_key_name':_0x2ff0a8};try{const _0x4770b6=yield this['fetch']['post'](this['path'],_0x50269d,_0x5262cc);if(_0x4770b6['status']>0xc7&&_0x4770b6['status']<0x12c){const _0x32d7e5=yield _0x4770b6['json']();return new SuccessfulApiKeyResponse(_0x32d7e5);}const _0x1495a6=yield _0x4770b6['json']();return new FailedApiKeyResponse(_0x1495a6);}catch(_0x83c14b){if(_0x83c14b instanceof Error)return new FailedApiKeyResponse({'detail':_0x83c14b['message'],'title':_0x83c14b['name'],'status':0x1f4,'instance':'','type':''});throw _0x83c14b;}});}['view'](_0x1c4063,_0x3e8a8e,_0x55b5f4){return __awaiter$4(this,void 0,void 0,function*(){const _0x4936fa=this['path']+'/'+_0x1c4063+'/'+_0x3e8a8e;try{const _0x191dfd=yield this['fetch']['get'](_0x4936fa,_0x55b5f4);if(_0x191dfd['status']>0xc7&&_0x191dfd['status']<0x12c){const _0x28da2f=yield _0x191dfd['json']();return new SuccessfulApiKeyValueResponse(_0x28da2f);}const _0x55c86c=yield _0x191dfd['json']();return new FailedApiKeyValueResponse(_0x55c86c);}catch(_0x1c9ccd){if(_0x1c9ccd instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x1c9ccd['message'],'title':_0x1c9ccd['name'],'status':0x1f4,'instance':'','type':''});throw _0x1c9ccd;}});}['delete'](_0x1d8642,_0x1bfaec,_0x3eb3df){return __awaiter$4(this,void 0,void 0,function*(){const _0x31361b=this['path']+'/'+_0x1d8642+'/'+_0x1bfaec;try{const _0x459aea=yield this['fetch']['delete'](_0x31361b,_0x3eb3df);if(_0x459aea['status']>0xc7&&_0x459aea['status']<0x12c)return new SuccessfulResponse({});const _0x479e3c=yield _0x459aea['json']();return new FailedResponse(_0x479e3c);}catch(_0x5b2969){if(_0x5b2969 instanceof Error)return new FailedResponse({'detail':_0x5b2969['message'],'title':_0x5b2969['name'],'status':0x1f4,'instance':'','type':''});throw _0x5b2969;}});}}
8
8
 
9
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x58be9f,_0x401f23,_0x56df56,_0x113fc9){function _0xd8f29a(_0x4cdbdf){return _0x4cdbdf instanceof _0x56df56?_0x4cdbdf:new _0x56df56(function(_0x258968){_0x258968(_0x4cdbdf);});}return new(_0x56df56||(_0x56df56=Promise))(function(_0x314376,_0x26e4a8){function _0x178d99(_0x226929){try{_0x452318(_0x113fc9['next'](_0x226929));}catch(_0x5522e3){_0x26e4a8(_0x5522e3);}}function _0x1c4318(_0x23b52e){try{_0x452318(_0x113fc9['throw'](_0x23b52e));}catch(_0x2b3327){_0x26e4a8(_0x2b3327);}}function _0x452318(_0x5a56f2){_0x5a56f2['done']?_0x314376(_0x5a56f2['value']):_0xd8f29a(_0x5a56f2['value'])['then'](_0x178d99,_0x1c4318);}_0x452318((_0x113fc9=_0x113fc9['apply'](_0x58be9f,_0x401f23||[]))['next']());});};class ListService{constructor(_0x5e2cfb){this['fetch']=_0x5e2cfb;}['add'](_0x172ab7,_0x465606,_0x30616a){return __awaiter$2(this,void 0,void 0,function*(){const _0x1dd6da='List',_0x56c7b5={'account_name':_0x172ab7,'list_name':_0x465606};try{const _0x84379b=yield this['fetch']['post'](_0x1dd6da,_0x30616a,_0x56c7b5);if(_0x84379b['status']>0xc7&&_0x84379b['status']<0x12c){const _0x4d8042=yield _0x84379b['json']();return new SuccessfulAccountResponse(_0x4d8042);}const _0x4fd562=yield _0x84379b['json']();return new FailedAccountResponse(_0x4fd562);}catch(_0x3e64d0){if(_0x3e64d0 instanceof Error)return new FailedAccountResponse({'detail':_0x3e64d0['message'],'title':_0x3e64d0['name'],'status':0x1f4,'instance':'','type':''});throw _0x3e64d0;}});}['remove'](_0x185d1c,_0x5de4d6,_0x460c9a){return __awaiter$2(this,void 0,void 0,function*(){const _0x14b3cb='List/'+_0x185d1c+'/'+_0x5de4d6,_0x53d084=yield this['fetch']['delete'](_0x14b3cb,_0x460c9a);try{if(_0x53d084['status']>0xc7&&_0x53d084['status']<0x12c){const _0x3a8772=yield _0x53d084['json']();return new SuccessfulAccountResponse(_0x3a8772);}const _0x95e8e7=yield _0x53d084['json']();return new FailedAccountResponse(_0x95e8e7);}catch(_0x2536b5){if(_0x2536b5 instanceof Error)return new FailedAccountResponse({'detail':_0x2536b5['message'],'title':_0x2536b5['name'],'status':0x1f4,'instance':'','type':''});throw _0x2536b5;}});}}
9
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x1807ed,_0x52a975,_0x4677aa,_0xeea0fe){function _0x5d4b1f(_0x4c304f){return _0x4c304f instanceof _0x4677aa?_0x4c304f:new _0x4677aa(function(_0x29175b){_0x29175b(_0x4c304f);});}return new(_0x4677aa||(_0x4677aa=Promise))(function(_0x436f05,_0x2caf8d){function _0xf77ea(_0x23a383){try{_0x12c7b2(_0xeea0fe['next'](_0x23a383));}catch(_0x16d1f4){_0x2caf8d(_0x16d1f4);}}function _0x2a3e7f(_0x253059){try{_0x12c7b2(_0xeea0fe['throw'](_0x253059));}catch(_0x4bae2a){_0x2caf8d(_0x4bae2a);}}function _0x12c7b2(_0x19167e){_0x19167e['done']?_0x436f05(_0x19167e['value']):_0x5d4b1f(_0x19167e['value'])['then'](_0xf77ea,_0x2a3e7f);}_0x12c7b2((_0xeea0fe=_0xeea0fe['apply'](_0x1807ed,_0x52a975||[]))['next']());});};class ListService{constructor(_0x49fd21){this['fetch']=_0x49fd21;}['add'](_0x597e8b,_0x28517e,_0x6417b3){return __awaiter$3(this,void 0,void 0,function*(){const _0x4d097c='List',_0x141f4d={'account_name':_0x597e8b,'list_name':_0x28517e};try{const _0x263783=yield this['fetch']['post'](_0x4d097c,_0x6417b3,_0x141f4d);if(_0x263783['status']>0xc7&&_0x263783['status']<0x12c){const _0x73ef23=yield _0x263783['json']();return new SuccessfulAccountResponse(_0x73ef23);}const _0x5b9d83=yield _0x263783['json']();return new FailedAccountResponse(_0x5b9d83);}catch(_0x3dea54){if(_0x3dea54 instanceof Error)return new FailedAccountResponse({'detail':_0x3dea54['message'],'title':_0x3dea54['name'],'status':0x1f4,'instance':'','type':''});throw _0x3dea54;}});}['remove'](_0x57913b,_0x492601,_0x8c80a6){return __awaiter$3(this,void 0,void 0,function*(){const _0x4d69e6='List/'+_0x57913b+'/'+_0x492601,_0x2172a7=yield this['fetch']['delete'](_0x4d69e6,_0x8c80a6);try{if(_0x2172a7['status']>0xc7&&_0x2172a7['status']<0x12c){const _0x3b493d=yield _0x2172a7['json']();return new SuccessfulAccountResponse(_0x3b493d);}const _0x5f568f=yield _0x2172a7['json']();return new FailedAccountResponse(_0x5f568f);}catch(_0x76a4a0){if(_0x76a4a0 instanceof Error)return new FailedAccountResponse({'detail':_0x76a4a0['message'],'title':_0x76a4a0['name'],'status':0x1f4,'instance':'','type':''});throw _0x76a4a0;}});}}
10
10
 
11
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x2df809,_0x3f2384,_0x652faa,_0x2f0c8e){function _0x28e2a0(_0x1264f1){return _0x1264f1 instanceof _0x652faa?_0x1264f1:new _0x652faa(function(_0x1d972c){_0x1d972c(_0x1264f1);});}return new(_0x652faa||(_0x652faa=Promise))(function(_0x5dbf04,_0x4dbc54){function _0x5bbe9f(_0x4f92aa){try{_0x37bada(_0x2f0c8e['next'](_0x4f92aa));}catch(_0x1f4d1b){_0x4dbc54(_0x1f4d1b);}}function _0x1a194a(_0x5a48b5){try{_0x37bada(_0x2f0c8e['throw'](_0x5a48b5));}catch(_0x5e86d2){_0x4dbc54(_0x5e86d2);}}function _0x37bada(_0x4f221f){_0x4f221f['done']?_0x5dbf04(_0x4f221f['value']):_0x28e2a0(_0x4f221f['value'])['then'](_0x5bbe9f,_0x1a194a);}_0x37bada((_0x2f0c8e=_0x2f0c8e['apply'](_0x2df809,_0x3f2384||[]))['next']());});};class Fetch{constructor(_0x38d277){this['baseUri']=_0x38d277,this['getUrl']=_0x1e37a7=>{return _0x1e37a7['startsWith']('/')&&(_0x1e37a7=_0x1e37a7['replace']('/','')),''+this['baseUri']+_0x1e37a7;},!_0x38d277['endsWith']('/')&&(_0x38d277=_0x38d277+'/');}['get'](_0x14b9be,_0x53ebb3){return __awaiter$1(this,void 0,void 0,function*(){const _0x1c75b3=this['getUrl'](_0x14b9be);return yield fetch(_0x1c75b3,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x53ebb3}});});}['post'](_0x18e705,_0x17b39d,_0xc46625){return __awaiter$1(this,void 0,void 0,function*(){const _0x2dd61b=this['getUrl'](_0x18e705);return yield fetch(_0x2dd61b,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x17b39d},'body':_0xc46625?JSON['stringify'](_0xc46625):null});});}['put'](_0x1784ff,_0x554a4f,_0x52e3ae){return __awaiter$1(this,void 0,void 0,function*(){const _0x38e127=this['getUrl'](_0x1784ff);return yield fetch(_0x38e127,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x554a4f},'body':_0x52e3ae?JSON['stringify'](_0x52e3ae):null});});}['delete'](_0x55bdf6,_0x166cae){return __awaiter$1(this,void 0,void 0,function*(){const _0x1fd79a=this['getUrl'](_0x55bdf6);return yield fetch(_0x1fd79a,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x166cae}});});}}
11
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x3374b8,_0x55ed6a,_0x53ccdc,_0x1b0b66){function _0x18b292(_0x594fa9){return _0x594fa9 instanceof _0x53ccdc?_0x594fa9:new _0x53ccdc(function(_0xf2ac7){_0xf2ac7(_0x594fa9);});}return new(_0x53ccdc||(_0x53ccdc=Promise))(function(_0x5e9ae2,_0x4e754a){function _0x29cd69(_0x42b20a){try{_0x158fd3(_0x1b0b66['next'](_0x42b20a));}catch(_0x223785){_0x4e754a(_0x223785);}}function _0x4824d6(_0x342d4d){try{_0x158fd3(_0x1b0b66['throw'](_0x342d4d));}catch(_0x58b3f3){_0x4e754a(_0x58b3f3);}}function _0x158fd3(_0x3531ac){_0x3531ac['done']?_0x5e9ae2(_0x3531ac['value']):_0x18b292(_0x3531ac['value'])['then'](_0x29cd69,_0x4824d6);}_0x158fd3((_0x1b0b66=_0x1b0b66['apply'](_0x3374b8,_0x55ed6a||[]))['next']());});};class Fetch{constructor(_0x2a2e90){this['baseUri']=_0x2a2e90,this['getUrl']=_0x449cc7=>{return _0x449cc7['startsWith']('/')&&(_0x449cc7=_0x449cc7['replace']('/','')),''+this['baseUri']+_0x449cc7;},!_0x2a2e90['endsWith']('/')&&(_0x2a2e90=_0x2a2e90+'/');}['get'](_0x31fe7d,_0x147f4c){return __awaiter$2(this,void 0,void 0,function*(){const _0x5dae8e=this['getUrl'](_0x31fe7d);return yield fetch(_0x5dae8e,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x147f4c}});});}['post'](_0x3750ac,_0x562f44,_0x184e94){return __awaiter$2(this,void 0,void 0,function*(){const _0x15f467=this['getUrl'](_0x3750ac);return yield fetch(_0x15f467,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x562f44},'body':_0x184e94?JSON['stringify'](_0x184e94):null});});}['put'](_0x5a9a0b,_0x53dce1,_0x323923){return __awaiter$2(this,void 0,void 0,function*(){const _0x1348a7=this['getUrl'](_0x5a9a0b);return yield fetch(_0x1348a7,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x53dce1},'body':_0x323923?JSON['stringify'](_0x323923):null});});}['delete'](_0x51a01f,_0x3f8c1d){return __awaiter$2(this,void 0,void 0,function*(){const _0x16f9a0=this['getUrl'](_0x51a01f);return yield fetch(_0x16f9a0,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3f8c1d}});});}}
12
12
 
13
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x1f1d8a,_0x194e43,_0xc3aa87,_0x49f880){function _0x369228(_0x420894){return _0x420894 instanceof _0xc3aa87?_0x420894:new _0xc3aa87(function(_0x42c6fe){_0x42c6fe(_0x420894);});}return new(_0xc3aa87||(_0xc3aa87=Promise))(function(_0x33c519,_0x5a2fca){function _0x59e534(_0x37d7e2){try{_0x13c3e8(_0x49f880['next'](_0x37d7e2));}catch(_0x1a513f){_0x5a2fca(_0x1a513f);}}function _0x169afd(_0x33b467){try{_0x13c3e8(_0x49f880['throw'](_0x33b467));}catch(_0x49f675){_0x5a2fca(_0x49f675);}}function _0x13c3e8(_0x2233f2){_0x2233f2['done']?_0x33c519(_0x2233f2['value']):_0x369228(_0x2233f2['value'])['then'](_0x59e534,_0x169afd);}_0x13c3e8((_0x49f880=_0x49f880['apply'](_0x1f1d8a,_0x194e43||[]))['next']());});};class AdminClient{constructor(_0x2ac418='https://admin.searchability.dev/'){var _0x108ab4=new Fetch(_0x2ac418);this['Accounts']=new AccountService(_0x108ab4),this['Lists']=new ListService(_0x108ab4),this['ApiKeys']=new ApiKeyService(_0x108ab4);}}class AuthClient{constructor(_0x41e7e7='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x41e7e7);}['login'](_0x237618){return __awaiter(this,void 0,void 0,function*(){var _0xe81e1b='login/'+_0x237618;try{const _0x1c7dd2=yield yield fetch(_0xe81e1b);if(_0x1c7dd2['status']>0xc7&&_0x1c7dd2['status']<0x12c){const _0x18b8ec=yield _0x1c7dd2['json']();return new SuccessfulAuthResponse(_0x18b8ec);}const _0x16802d=yield _0x1c7dd2['json']();return new FailedAuthResponse(_0x16802d);}catch(_0x1cb3bd){if(_0x1cb3bd instanceof Error)return new FailedAuthResponse({'detail':_0x1cb3bd['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x1cb3bd;}});}['refresh'](_0x767d36){return __awaiter(this,void 0,void 0,function*(){var _0x290db1='refresh';try{const _0x11c2f0=yield this['fetch']['post'](_0x290db1,_0x767d36,null);if(_0x11c2f0['status']>0xc7&&_0x11c2f0['status']<0x12c){const _0x2537d7=yield _0x11c2f0['json']();return new SuccessfulAuthResponse(_0x2537d7);}const _0x62ce68=yield _0x11c2f0['json']();return new FailedAuthResponse(_0x62ce68);}catch(_0x33d18a){if(_0x33d18a instanceof Error)return new FailedAuthResponse({'detail':_0x33d18a['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x33d18a;}});}['getTokenStatus'](_0x1d1052){if(Date['now']()<_0x1d1052['access_expires'])return exports.TokenStatus['Ok'];if(Date['now']()<_0x1d1052['refresh_expires'])return exports.TokenStatus['Refresh'];return exports.TokenStatus['Expired'];}}
13
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x4cb43b,_0x2b94c9,_0x2b047b,_0x24697a){function _0x9260b0(_0x52256){return _0x52256 instanceof _0x2b047b?_0x52256:new _0x2b047b(function(_0x45fb49){_0x45fb49(_0x52256);});}return new(_0x2b047b||(_0x2b047b=Promise))(function(_0x397597,_0x254324){function _0x4aeb1c(_0x92d9f5){try{_0x5e624f(_0x24697a['next'](_0x92d9f5));}catch(_0x2d1879){_0x254324(_0x2d1879);}}function _0x4a07e9(_0x5f04d3){try{_0x5e624f(_0x24697a['throw'](_0x5f04d3));}catch(_0x21b53f){_0x254324(_0x21b53f);}}function _0x5e624f(_0x400891){_0x400891['done']?_0x397597(_0x400891['value']):_0x9260b0(_0x400891['value'])['then'](_0x4aeb1c,_0x4a07e9);}_0x5e624f((_0x24697a=_0x24697a['apply'](_0x4cb43b,_0x2b94c9||[]))['next']());});};class SearchServersService{constructor(_0x2240dc){this['fetch']=_0x2240dc,this['path']='search-services';}['create'](_0x149872,_0x50f16f,_0x317a59,_0x2cb639,_0xaa248,_0xb7ff69){return __awaiter$1(this,void 0,void 0,function*(){const _0x4b2e4f={'account_name':_0x149872,'search_service_name':_0x50f16f,'endpoint':_0x317a59,'key':_0x2cb639,'county':_0xaa248};try{const _0x3be8ac=yield this['fetch']['post'](this['path'],_0xb7ff69,_0x4b2e4f);if(_0x3be8ac['status']>0xc7&&_0x3be8ac['status']<0x12c){const _0x120c44=yield _0x3be8ac['json']();return new SuccessfulSearchServiceResponse(_0x120c44);}const _0x355100=yield _0x3be8ac['json']();return new FailedSearchServiceResponse(_0x355100);}catch(_0x48d5e1){if(_0x48d5e1 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x48d5e1['message'],'title':_0x48d5e1['name'],'status':0x1f4,'instance':'','type':''});throw _0x48d5e1;}});}['delete'](_0x184ef4,_0x484fb2,_0x447af0){return __awaiter$1(this,void 0,void 0,function*(){const _0x43e782=this['path']+'/'+_0x184ef4+'/'+_0x484fb2;try{const _0x74e689=yield this['fetch']['delete'](_0x43e782,_0x447af0);if(_0x74e689['status']>0xc7&&_0x74e689['status']<0x12c)return new SuccessfulResponse({});const _0x444b16=yield _0x74e689['json']();return new FailedResponse(_0x444b16);}catch(_0x21fc6f){if(_0x21fc6f instanceof Error)return new FailedResponse({'detail':_0x21fc6f['message'],'title':_0x21fc6f['name'],'status':0x1f4,'instance':'','type':''});throw _0x21fc6f;}});}['view'](_0x17e91b,_0xc1c7e9,_0x4084fc){return __awaiter$1(this,void 0,void 0,function*(){const _0x1ee708=this['path']+'/'+_0x17e91b+'/'+_0xc1c7e9;try{const _0x11c238=yield this['fetch']['get'](_0x1ee708,_0x4084fc);if(_0x11c238['status']>0xc7&&_0x11c238['status']<0x12c){const _0x57992c=yield _0x11c238['json']();return new SuccessfulViewSearchServiceResponse(_0x57992c);}const _0xd3081c=yield _0x11c238['json']();return new FailedViewSearchServiceResponse(_0xd3081c);}catch(_0x591073){if(_0x591073 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x591073['message'],'title':_0x591073['name'],'status':0x1f4,'instance':'','type':''});throw _0x591073;}});}}
14
+
15
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x11b941,_0x55e87d,_0x45f91f,_0x9501a9){function _0xf6bb40(_0xeaa73e){return _0xeaa73e instanceof _0x45f91f?_0xeaa73e:new _0x45f91f(function(_0x3dfe85){_0x3dfe85(_0xeaa73e);});}return new(_0x45f91f||(_0x45f91f=Promise))(function(_0x439e64,_0x4dff19){function _0x175b55(_0x3affcb){try{_0x485636(_0x9501a9['next'](_0x3affcb));}catch(_0x32a2ee){_0x4dff19(_0x32a2ee);}}function _0x13c68b(_0x3b9c2f){try{_0x485636(_0x9501a9['throw'](_0x3b9c2f));}catch(_0x34b436){_0x4dff19(_0x34b436);}}function _0x485636(_0x1a1cbe){_0x1a1cbe['done']?_0x439e64(_0x1a1cbe['value']):_0xf6bb40(_0x1a1cbe['value'])['then'](_0x175b55,_0x13c68b);}_0x485636((_0x9501a9=_0x9501a9['apply'](_0x11b941,_0x55e87d||[]))['next']());});};class AdminClient{constructor(_0x3326c2='https://admin.searchability.dev/'){var _0x32bbbc=new Fetch(_0x3326c2);this['Accounts']=new AccountService(_0x32bbbc),this['Lists']=new ListService(_0x32bbbc),this['ApiKeys']=new ApiKeyService(_0x32bbbc),this['SearchServices']=new SearchServersService(_0x32bbbc);}}class AuthClient{constructor(_0x159837='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x159837);}['login'](_0x2f7d34){return __awaiter(this,void 0,void 0,function*(){var _0x50e6a7='login/'+_0x2f7d34;try{const _0x28f33f=yield yield fetch(_0x50e6a7);if(_0x28f33f['status']>0xc7&&_0x28f33f['status']<0x12c){const _0x23fb1e=yield _0x28f33f['json']();return new SuccessfulAuthResponse(_0x23fb1e);}const _0x77ad82=yield _0x28f33f['json']();return new FailedAuthResponse(_0x77ad82);}catch(_0x12056d){if(_0x12056d instanceof Error)return new FailedAuthResponse({'detail':_0x12056d['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x12056d;}});}['refresh'](_0x5ae22c){return __awaiter(this,void 0,void 0,function*(){var _0x1c5823='refresh';try{const _0x189789=yield this['fetch']['post'](_0x1c5823,_0x5ae22c,null);if(_0x189789['status']>0xc7&&_0x189789['status']<0x12c){const _0x30a78c=yield _0x189789['json']();return new SuccessfulAuthResponse(_0x30a78c);}const _0xf101fd=yield _0x189789['json']();return new FailedAuthResponse(_0xf101fd);}catch(_0x3810e4){if(_0x3810e4 instanceof Error)return new FailedAuthResponse({'detail':_0x3810e4['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x3810e4;}});}['getTokenStatus'](_0x42636a){if(Date['now']()<_0x42636a['access_expires'])return exports.TokenStatus['Ok'];if(Date['now']()<_0x42636a['refresh_expires'])return exports.TokenStatus['Refresh'];return exports.TokenStatus['Expired'];}}
14
16
 
15
17
  exports.AdminClient = AdminClient;
16
18
  exports.AuthClient = AuthClient;
@@ -1,13 +1,15 @@
1
- var TokenStatus;(function(_0x17f738){_0x17f738[_0x17f738['Ok']=0x0]='Ok',_0x17f738[_0x17f738['Refresh']=0x1]='Refresh',_0x17f738[_0x17f738['Expired']=0x2]='Expired';}(TokenStatus||(TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}}class Response{constructor(_0x59eeb4){this['isSuccess']=_0x59eeb4;}}class SuccessfulAccountResponse extends Response{constructor(_0x3b6d30){super(!![]),this['account']=_0x3b6d30;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x3d5b58){super(![]),this['problem']=_0x3d5b58;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x5091ee){super(!![]),this['tokens']=_0x5091ee;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x72bed4){super(![]),this['problem']=_0x72bed4;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x15d1fe){super(!![]),this['apiKey']=_0x15d1fe;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x1abfb2){super(![]),this['problem']=_0x1abfb2;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x4ef6f2){super(!![]),this['apiKeyValue']=_0x4ef6f2;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x78802b){super(!![]),this['obj']=_0x78802b;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x228ceb){super(![]),this['problem']=_0x228ceb;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x15a037){super(![]),this['problem']=_0x15a037;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
1
+ var TokenStatus;(function(_0x5e1afa){_0x5e1afa[_0x5e1afa['Ok']=0x0]='Ok',_0x5e1afa[_0x5e1afa['Refresh']=0x1]='Refresh',_0x5e1afa[_0x5e1afa['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(_0x4dd1e5){this['isSuccess']=_0x4dd1e5;}}class SuccessfulAccountResponse extends Response{constructor(_0x59af0f){super(!![]),this['account']=_0x59af0f;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x36efd0){super(![]),this['problem']=_0x36efd0;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x3bd90c){super(!![]),this['tokens']=_0x3bd90c;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x4e235d){super(![]),this['problem']=_0x4e235d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x2f2735){super(!![]),this['apiKey']=_0x2f2735;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x563270){super(![]),this['problem']=_0x563270;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x2f0fd9){super(!![]),this['searchService']=_0x2f0fd9;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x4dbe0e){super(![]),this['problem']=_0x4dbe0e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x2686a3){super(!![]),this['searchService']=_0x2686a3;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServiceResponse extends Response{constructor(_0x402281){super(![]),this['problem']=_0x402281;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0xa6a162){super(!![]),this['apiKeyValue']=_0xa6a162;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x14b931){super(!![]),this['obj']=_0x14b931;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x4a4d0c){super(![]),this['problem']=_0x4a4d0c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x250990){super(![]),this['problem']=_0x250990;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
2
2
 
3
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x23cf00,_0x2c07c7,_0x4493ef,_0x8182){function _0x3eea06(_0x4ff1d3){return _0x4ff1d3 instanceof _0x4493ef?_0x4ff1d3:new _0x4493ef(function(_0x31b5a9){_0x31b5a9(_0x4ff1d3);});}return new(_0x4493ef||(_0x4493ef=Promise))(function(_0x5e41c2,_0x192e77){function _0x315323(_0x10abfd){try{_0x5b7f4c(_0x8182['next'](_0x10abfd));}catch(_0x1c648a){_0x192e77(_0x1c648a);}}function _0x40d02d(_0x425404){try{_0x5b7f4c(_0x8182['throw'](_0x425404));}catch(_0x445a9d){_0x192e77(_0x445a9d);}}function _0x5b7f4c(_0xa110e0){_0xa110e0['done']?_0x5e41c2(_0xa110e0['value']):_0x3eea06(_0xa110e0['value'])['then'](_0x315323,_0x40d02d);}_0x5b7f4c((_0x8182=_0x8182['apply'](_0x23cf00,_0x2c07c7||[]))['next']());});};class AccountService{constructor(_0xc4263b){this['fetch']=_0xc4263b;}['get'](_0x1b69ab,_0x5685ff){return __awaiter$4(this,void 0,void 0,function*(){const _0x531823='Account/'+_0x1b69ab+'/',_0x42e13e=yield this['fetch']['get'](_0x531823,_0x5685ff);try{if(_0x42e13e['status']>0xc7&&_0x42e13e['status']<0x12c){const _0x3eed20=yield _0x42e13e['json']();return new SuccessfulAccountResponse(_0x3eed20);}const _0x40e561=yield _0x42e13e['json']();return new FailedAccountResponse(_0x40e561);}catch(_0x189671){if(_0x189671 instanceof Error)return new FailedAccountResponse({'detail':_0x189671['message'],'title':_0x189671['name'],'status':0x1f4,'instance':'','type':''});throw _0x189671;}});}}
3
+ var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x43d272,_0x5eab7b,_0x50f63c,_0x1264ef){function _0x3e5e95(_0x47c7ae){return _0x47c7ae instanceof _0x50f63c?_0x47c7ae:new _0x50f63c(function(_0x1051f8){_0x1051f8(_0x47c7ae);});}return new(_0x50f63c||(_0x50f63c=Promise))(function(_0x367180,_0x18a061){function _0x59eeb4(_0x1c0427){try{_0x4039c0(_0x1264ef['next'](_0x1c0427));}catch(_0x3678e9){_0x18a061(_0x3678e9);}}function _0x9c60ed(_0x5636d0){try{_0x4039c0(_0x1264ef['throw'](_0x5636d0));}catch(_0x11b108){_0x18a061(_0x11b108);}}function _0x4039c0(_0x3b47d0){_0x3b47d0['done']?_0x367180(_0x3b47d0['value']):_0x3e5e95(_0x3b47d0['value'])['then'](_0x59eeb4,_0x9c60ed);}_0x4039c0((_0x1264ef=_0x1264ef['apply'](_0x43d272,_0x5eab7b||[]))['next']());});};class AccountService{constructor(_0xa31f5e){this['fetch']=_0xa31f5e;}['get'](_0x5b5afc,_0x40ae42){return __awaiter$5(this,void 0,void 0,function*(){const _0xe0678e='Account/'+_0x5b5afc+'/',_0x3b796c=yield this['fetch']['get'](_0xe0678e,_0x40ae42);try{if(_0x3b796c['status']>0xc7&&_0x3b796c['status']<0x12c){const _0x220dfc=yield _0x3b796c['json']();return new SuccessfulAccountResponse(_0x220dfc);}const _0x3802ed=yield _0x3b796c['json']();return new FailedAccountResponse(_0x3802ed);}catch(_0x287c3d){if(_0x287c3d instanceof Error)return new FailedAccountResponse({'detail':_0x287c3d['message'],'title':_0x287c3d['name'],'status':0x1f4,'instance':'','type':''});throw _0x287c3d;}});}}
4
4
 
5
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x32ee49,_0x264836,_0x5a4aee,_0x4cfd75){function _0x5ea14e(_0x1df19d){return _0x1df19d instanceof _0x5a4aee?_0x1df19d:new _0x5a4aee(function(_0x5681b3){_0x5681b3(_0x1df19d);});}return new(_0x5a4aee||(_0x5a4aee=Promise))(function(_0xc72283,_0x477a63){function _0x4e47d5(_0x3f1f9a){try{_0x43e970(_0x4cfd75['next'](_0x3f1f9a));}catch(_0x4804c1){_0x477a63(_0x4804c1);}}function _0x696fbb(_0x48945d){try{_0x43e970(_0x4cfd75['throw'](_0x48945d));}catch(_0xcc717b){_0x477a63(_0xcc717b);}}function _0x43e970(_0x226730){_0x226730['done']?_0xc72283(_0x226730['value']):_0x5ea14e(_0x226730['value'])['then'](_0x4e47d5,_0x696fbb);}_0x43e970((_0x4cfd75=_0x4cfd75['apply'](_0x32ee49,_0x264836||[]))['next']());});};class ApiKeyService{constructor(_0x1fc300){this['fetch']=_0x1fc300,this['path']='api-key';}['create'](_0x115451,_0x5388e3,_0x32b5b4){return __awaiter$3(this,void 0,void 0,function*(){const _0x5324f9={'account_name':_0x115451,'api_key_name':_0x5388e3};try{const _0x3933a0=yield this['fetch']['post'](this['path'],_0x32b5b4,_0x5324f9);if(_0x3933a0['status']>0xc7&&_0x3933a0['status']<0x12c){const _0x20b3fd=yield _0x3933a0['json']();return new SuccessfulApiKeyResponse(_0x20b3fd);}const _0x192382=yield _0x3933a0['json']();return new FailedApiKeyResponse(_0x192382);}catch(_0x4fda5d){if(_0x4fda5d instanceof Error)return new FailedApiKeyResponse({'detail':_0x4fda5d['message'],'title':_0x4fda5d['name'],'status':0x1f4,'instance':'','type':''});throw _0x4fda5d;}});}['view'](_0x33d2e8,_0x2b7e7c,_0x112078){return __awaiter$3(this,void 0,void 0,function*(){const _0x35dfca=this['path']+'/'+_0x33d2e8+'/'+_0x2b7e7c;try{const _0x2d46fe=yield this['fetch']['get'](_0x35dfca,_0x112078);if(_0x2d46fe['status']>0xc7&&_0x2d46fe['status']<0x12c){const _0xfa7318=yield _0x2d46fe['json']();return new SuccessfulApiKeyValueResponse(_0xfa7318);}const _0x27cacb=yield _0x2d46fe['json']();return new FailedApiKeyValueResponse(_0x27cacb);}catch(_0xaae9b7){if(_0xaae9b7 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0xaae9b7['message'],'title':_0xaae9b7['name'],'status':0x1f4,'instance':'','type':''});throw _0xaae9b7;}});}['delete'](_0x51d565,_0x2088c9,_0x254df4){return __awaiter$3(this,void 0,void 0,function*(){const _0x52a8d8=this['path']+'/'+_0x51d565+'/'+_0x2088c9;try{const _0x283543=yield this['fetch']['delete'](_0x52a8d8,_0x254df4);if(_0x283543['status']>0xc7&&_0x283543['status']<0x12c)return new SuccessfulResponse({});const _0x3e67e3=yield _0x283543['json']();return new FailedResponse(_0x3e67e3);}catch(_0x372aa4){if(_0x372aa4 instanceof Error)return new FailedResponse({'detail':_0x372aa4['message'],'title':_0x372aa4['name'],'status':0x1f4,'instance':'','type':''});throw _0x372aa4;}});}}
5
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x28031d,_0x36a0c1,_0x88537a,_0x516b33){function _0x546558(_0x38dd16){return _0x38dd16 instanceof _0x88537a?_0x38dd16:new _0x88537a(function(_0x53094e){_0x53094e(_0x38dd16);});}return new(_0x88537a||(_0x88537a=Promise))(function(_0x3ec01d,_0x1683e3){function _0x44ef30(_0x50dc2c){try{_0x4bbe0a(_0x516b33['next'](_0x50dc2c));}catch(_0x182bfe){_0x1683e3(_0x182bfe);}}function _0x331c74(_0x2fc87c){try{_0x4bbe0a(_0x516b33['throw'](_0x2fc87c));}catch(_0x272fd6){_0x1683e3(_0x272fd6);}}function _0x4bbe0a(_0x3615b9){_0x3615b9['done']?_0x3ec01d(_0x3615b9['value']):_0x546558(_0x3615b9['value'])['then'](_0x44ef30,_0x331c74);}_0x4bbe0a((_0x516b33=_0x516b33['apply'](_0x28031d,_0x36a0c1||[]))['next']());});};class ApiKeyService{constructor(_0x53ebaf){this['fetch']=_0x53ebaf,this['path']='api-key';}['create'](_0x10113e,_0x251324,_0x140db5){return __awaiter$4(this,void 0,void 0,function*(){const _0x21ab89={'account_name':_0x10113e,'api_key_name':_0x251324};try{const _0x3532dd=yield this['fetch']['post'](this['path'],_0x140db5,_0x21ab89);if(_0x3532dd['status']>0xc7&&_0x3532dd['status']<0x12c){const _0x1b30a3=yield _0x3532dd['json']();return new SuccessfulApiKeyResponse(_0x1b30a3);}const _0x21933c=yield _0x3532dd['json']();return new FailedApiKeyResponse(_0x21933c);}catch(_0x12e188){if(_0x12e188 instanceof Error)return new FailedApiKeyResponse({'detail':_0x12e188['message'],'title':_0x12e188['name'],'status':0x1f4,'instance':'','type':''});throw _0x12e188;}});}['view'](_0x2cc465,_0x19e20e,_0x3dc711){return __awaiter$4(this,void 0,void 0,function*(){const _0x45587c=this['path']+'/'+_0x2cc465+'/'+_0x19e20e;try{const _0x5dc1ff=yield this['fetch']['get'](_0x45587c,_0x3dc711);if(_0x5dc1ff['status']>0xc7&&_0x5dc1ff['status']<0x12c){const _0x46eb04=yield _0x5dc1ff['json']();return new SuccessfulApiKeyValueResponse(_0x46eb04);}const _0x3a111d=yield _0x5dc1ff['json']();return new FailedApiKeyValueResponse(_0x3a111d);}catch(_0x2f645e){if(_0x2f645e instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x2f645e['message'],'title':_0x2f645e['name'],'status':0x1f4,'instance':'','type':''});throw _0x2f645e;}});}['delete'](_0x67f40d,_0x5de47d,_0x77fa40){return __awaiter$4(this,void 0,void 0,function*(){const _0x1aea4a=this['path']+'/'+_0x67f40d+'/'+_0x5de47d;try{const _0x289da9=yield this['fetch']['delete'](_0x1aea4a,_0x77fa40);if(_0x289da9['status']>0xc7&&_0x289da9['status']<0x12c)return new SuccessfulResponse({});const _0x346fa7=yield _0x289da9['json']();return new FailedResponse(_0x346fa7);}catch(_0x491e05){if(_0x491e05 instanceof Error)return new FailedResponse({'detail':_0x491e05['message'],'title':_0x491e05['name'],'status':0x1f4,'instance':'','type':''});throw _0x491e05;}});}}
6
6
 
7
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x1af114,_0x59abfb,_0x96264f,_0x2351de){function _0x14d3d0(_0x206c4d){return _0x206c4d instanceof _0x96264f?_0x206c4d:new _0x96264f(function(_0x8abb6d){_0x8abb6d(_0x206c4d);});}return new(_0x96264f||(_0x96264f=Promise))(function(_0x2e0b1d,_0x292b9b){function _0x5089cd(_0xf6f1a5){try{_0x2ff821(_0x2351de['next'](_0xf6f1a5));}catch(_0x37fad8){_0x292b9b(_0x37fad8);}}function _0x16efa9(_0x3f1f46){try{_0x2ff821(_0x2351de['throw'](_0x3f1f46));}catch(_0x45be81){_0x292b9b(_0x45be81);}}function _0x2ff821(_0x2e8d3b){_0x2e8d3b['done']?_0x2e0b1d(_0x2e8d3b['value']):_0x14d3d0(_0x2e8d3b['value'])['then'](_0x5089cd,_0x16efa9);}_0x2ff821((_0x2351de=_0x2351de['apply'](_0x1af114,_0x59abfb||[]))['next']());});};class ListService{constructor(_0x14cf1e){this['fetch']=_0x14cf1e;}['add'](_0xea7dbc,_0x580bba,_0x4c4c58){return __awaiter$2(this,void 0,void 0,function*(){const _0x5a08a9='List',_0x326f8a={'account_name':_0xea7dbc,'list_name':_0x580bba};try{const _0x20841e=yield this['fetch']['post'](_0x5a08a9,_0x4c4c58,_0x326f8a);if(_0x20841e['status']>0xc7&&_0x20841e['status']<0x12c){const _0x180e26=yield _0x20841e['json']();return new SuccessfulAccountResponse(_0x180e26);}const _0x3c7035=yield _0x20841e['json']();return new FailedAccountResponse(_0x3c7035);}catch(_0xb64caf){if(_0xb64caf instanceof Error)return new FailedAccountResponse({'detail':_0xb64caf['message'],'title':_0xb64caf['name'],'status':0x1f4,'instance':'','type':''});throw _0xb64caf;}});}['remove'](_0xc556ab,_0x5a34e9,_0xcbdaf2){return __awaiter$2(this,void 0,void 0,function*(){const _0x3384c1='List/'+_0xc556ab+'/'+_0x5a34e9,_0x18f2d5=yield this['fetch']['delete'](_0x3384c1,_0xcbdaf2);try{if(_0x18f2d5['status']>0xc7&&_0x18f2d5['status']<0x12c){const _0x42cdb2=yield _0x18f2d5['json']();return new SuccessfulAccountResponse(_0x42cdb2);}const _0x4ec011=yield _0x18f2d5['json']();return new FailedAccountResponse(_0x4ec011);}catch(_0x17d773){if(_0x17d773 instanceof Error)return new FailedAccountResponse({'detail':_0x17d773['message'],'title':_0x17d773['name'],'status':0x1f4,'instance':'','type':''});throw _0x17d773;}});}}
7
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x4cd795,_0x58a98c,_0x3fd34a,_0x1ea40d){function _0x79fbf4(_0x1f8407){return _0x1f8407 instanceof _0x3fd34a?_0x1f8407:new _0x3fd34a(function(_0x189672){_0x189672(_0x1f8407);});}return new(_0x3fd34a||(_0x3fd34a=Promise))(function(_0x212144,_0x188f3c){function _0x5a82e5(_0x4b9cd8){try{_0x5ec928(_0x1ea40d['next'](_0x4b9cd8));}catch(_0x34e264){_0x188f3c(_0x34e264);}}function _0x1d5bea(_0x1b815f){try{_0x5ec928(_0x1ea40d['throw'](_0x1b815f));}catch(_0x1500ae){_0x188f3c(_0x1500ae);}}function _0x5ec928(_0x24ae94){_0x24ae94['done']?_0x212144(_0x24ae94['value']):_0x79fbf4(_0x24ae94['value'])['then'](_0x5a82e5,_0x1d5bea);}_0x5ec928((_0x1ea40d=_0x1ea40d['apply'](_0x4cd795,_0x58a98c||[]))['next']());});};class ListService{constructor(_0x578dd0){this['fetch']=_0x578dd0;}['add'](_0x448c5b,_0x328afe,_0x45ce95){return __awaiter$3(this,void 0,void 0,function*(){const _0x2fd5c4='List',_0x599304={'account_name':_0x448c5b,'list_name':_0x328afe};try{const _0x530de2=yield this['fetch']['post'](_0x2fd5c4,_0x45ce95,_0x599304);if(_0x530de2['status']>0xc7&&_0x530de2['status']<0x12c){const _0xe74a2f=yield _0x530de2['json']();return new SuccessfulAccountResponse(_0xe74a2f);}const _0x241e4d=yield _0x530de2['json']();return new FailedAccountResponse(_0x241e4d);}catch(_0x3fe424){if(_0x3fe424 instanceof Error)return new FailedAccountResponse({'detail':_0x3fe424['message'],'title':_0x3fe424['name'],'status':0x1f4,'instance':'','type':''});throw _0x3fe424;}});}['remove'](_0x7ddd93,_0x21a200,_0x24a5e1){return __awaiter$3(this,void 0,void 0,function*(){const _0x23f671='List/'+_0x7ddd93+'/'+_0x21a200,_0x5bd810=yield this['fetch']['delete'](_0x23f671,_0x24a5e1);try{if(_0x5bd810['status']>0xc7&&_0x5bd810['status']<0x12c){const _0x35603d=yield _0x5bd810['json']();return new SuccessfulAccountResponse(_0x35603d);}const _0x525c76=yield _0x5bd810['json']();return new FailedAccountResponse(_0x525c76);}catch(_0x44a858){if(_0x44a858 instanceof Error)return new FailedAccountResponse({'detail':_0x44a858['message'],'title':_0x44a858['name'],'status':0x1f4,'instance':'','type':''});throw _0x44a858;}});}}
8
8
 
9
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x350c07,_0x56df1b,_0x319fd0,_0x48f92e){function _0x10e18e(_0x5bdf37){return _0x5bdf37 instanceof _0x319fd0?_0x5bdf37:new _0x319fd0(function(_0x398ca6){_0x398ca6(_0x5bdf37);});}return new(_0x319fd0||(_0x319fd0=Promise))(function(_0x4a5674,_0xd442b7){function _0x29ff1d(_0x139195){try{_0x4b9fc7(_0x48f92e['next'](_0x139195));}catch(_0x233931){_0xd442b7(_0x233931);}}function _0x5a15a2(_0x47f3dd){try{_0x4b9fc7(_0x48f92e['throw'](_0x47f3dd));}catch(_0x46e82b){_0xd442b7(_0x46e82b);}}function _0x4b9fc7(_0x1c1dd3){_0x1c1dd3['done']?_0x4a5674(_0x1c1dd3['value']):_0x10e18e(_0x1c1dd3['value'])['then'](_0x29ff1d,_0x5a15a2);}_0x4b9fc7((_0x48f92e=_0x48f92e['apply'](_0x350c07,_0x56df1b||[]))['next']());});};class Fetch{constructor(_0x117c79){this['baseUri']=_0x117c79,this['getUrl']=_0xa417e5=>{return _0xa417e5['startsWith']('/')&&(_0xa417e5=_0xa417e5['replace']('/','')),''+this['baseUri']+_0xa417e5;},!_0x117c79['endsWith']('/')&&(_0x117c79=_0x117c79+'/');}['get'](_0x52a774,_0x1767e2){return __awaiter$1(this,void 0,void 0,function*(){const _0xf2d2f8=this['getUrl'](_0x52a774);return yield fetch(_0xf2d2f8,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1767e2}});});}['post'](_0x5a032e,_0x377789,_0x2ec922){return __awaiter$1(this,void 0,void 0,function*(){const _0x2fd091=this['getUrl'](_0x5a032e);return yield fetch(_0x2fd091,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x377789},'body':_0x2ec922?JSON['stringify'](_0x2ec922):null});});}['put'](_0x3b841e,_0x3d1053,_0x53ba1b){return __awaiter$1(this,void 0,void 0,function*(){const _0x47b96f=this['getUrl'](_0x3b841e);return yield fetch(_0x47b96f,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3d1053},'body':_0x53ba1b?JSON['stringify'](_0x53ba1b):null});});}['delete'](_0x3942e1,_0x50a9c6){return __awaiter$1(this,void 0,void 0,function*(){const _0x217247=this['getUrl'](_0x3942e1);return yield fetch(_0x217247,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x50a9c6}});});}}
9
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x16948d,_0xeeddcc,_0x286462,_0x3e1492){function _0x17866c(_0x43c853){return _0x43c853 instanceof _0x286462?_0x43c853:new _0x286462(function(_0x5a434){_0x5a434(_0x43c853);});}return new(_0x286462||(_0x286462=Promise))(function(_0x12881e,_0x1b5174){function _0x17c02f(_0x2ed925){try{_0x438e61(_0x3e1492['next'](_0x2ed925));}catch(_0x5273ca){_0x1b5174(_0x5273ca);}}function _0x5db4df(_0x1a6ac7){try{_0x438e61(_0x3e1492['throw'](_0x1a6ac7));}catch(_0x4b459b){_0x1b5174(_0x4b459b);}}function _0x438e61(_0x1f40c1){_0x1f40c1['done']?_0x12881e(_0x1f40c1['value']):_0x17866c(_0x1f40c1['value'])['then'](_0x17c02f,_0x5db4df);}_0x438e61((_0x3e1492=_0x3e1492['apply'](_0x16948d,_0xeeddcc||[]))['next']());});};class Fetch{constructor(_0x209094){this['baseUri']=_0x209094,this['getUrl']=_0x264ba3=>{return _0x264ba3['startsWith']('/')&&(_0x264ba3=_0x264ba3['replace']('/','')),''+this['baseUri']+_0x264ba3;},!_0x209094['endsWith']('/')&&(_0x209094=_0x209094+'/');}['get'](_0x2f6b8d,_0x44c274){return __awaiter$2(this,void 0,void 0,function*(){const _0x13bec6=this['getUrl'](_0x2f6b8d);return yield fetch(_0x13bec6,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x44c274}});});}['post'](_0x206c74,_0x30edaa,_0xc1df26){return __awaiter$2(this,void 0,void 0,function*(){const _0x4ba728=this['getUrl'](_0x206c74);return yield fetch(_0x4ba728,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x30edaa},'body':_0xc1df26?JSON['stringify'](_0xc1df26):null});});}['put'](_0x1dc12f,_0x532e43,_0x1a2d92){return __awaiter$2(this,void 0,void 0,function*(){const _0x3d2323=this['getUrl'](_0x1dc12f);return yield fetch(_0x3d2323,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x532e43},'body':_0x1a2d92?JSON['stringify'](_0x1a2d92):null});});}['delete'](_0x476ee4,_0x379cdc){return __awaiter$2(this,void 0,void 0,function*(){const _0x3e245f=this['getUrl'](_0x476ee4);return yield fetch(_0x3e245f,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x379cdc}});});}}
10
10
 
11
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x1d3050,_0x33455b,_0x2f1357,_0x4b48b0){function _0x250908(_0x1b4a1a){return _0x1b4a1a instanceof _0x2f1357?_0x1b4a1a:new _0x2f1357(function(_0x489315){_0x489315(_0x1b4a1a);});}return new(_0x2f1357||(_0x2f1357=Promise))(function(_0x3f3554,_0x37a6ac){function _0x3875a4(_0x4ed3d5){try{_0x4f2e00(_0x4b48b0['next'](_0x4ed3d5));}catch(_0x4df48a){_0x37a6ac(_0x4df48a);}}function _0x297db5(_0x26e0a9){try{_0x4f2e00(_0x4b48b0['throw'](_0x26e0a9));}catch(_0x54b6ef){_0x37a6ac(_0x54b6ef);}}function _0x4f2e00(_0x36dc71){_0x36dc71['done']?_0x3f3554(_0x36dc71['value']):_0x250908(_0x36dc71['value'])['then'](_0x3875a4,_0x297db5);}_0x4f2e00((_0x4b48b0=_0x4b48b0['apply'](_0x1d3050,_0x33455b||[]))['next']());});};class AdminClient{constructor(_0x214b10='https://admin.searchability.dev/'){var _0x3b1ff5=new Fetch(_0x214b10);this['Accounts']=new AccountService(_0x3b1ff5),this['Lists']=new ListService(_0x3b1ff5),this['ApiKeys']=new ApiKeyService(_0x3b1ff5);}}class AuthClient{constructor(_0x2e4f8f='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x2e4f8f);}['login'](_0xe5d426){return __awaiter(this,void 0,void 0,function*(){var _0xc38f1c='login/'+_0xe5d426;try{const _0x23320f=yield yield fetch(_0xc38f1c);if(_0x23320f['status']>0xc7&&_0x23320f['status']<0x12c){const _0x1be40a=yield _0x23320f['json']();return new SuccessfulAuthResponse(_0x1be40a);}const _0x4b6261=yield _0x23320f['json']();return new FailedAuthResponse(_0x4b6261);}catch(_0xbad3ae){if(_0xbad3ae instanceof Error)return new FailedAuthResponse({'detail':_0xbad3ae['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0xbad3ae;}});}['refresh'](_0x363ccf){return __awaiter(this,void 0,void 0,function*(){var _0x25970d='refresh';try{const _0x354abb=yield this['fetch']['post'](_0x25970d,_0x363ccf,null);if(_0x354abb['status']>0xc7&&_0x354abb['status']<0x12c){const _0x2b35fd=yield _0x354abb['json']();return new SuccessfulAuthResponse(_0x2b35fd);}const _0x52df8e=yield _0x354abb['json']();return new FailedAuthResponse(_0x52df8e);}catch(_0x24b181){if(_0x24b181 instanceof Error)return new FailedAuthResponse({'detail':_0x24b181['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x24b181;}});}['getTokenStatus'](_0x2b198d){if(Date['now']()<_0x2b198d['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x2b198d['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
11
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x234194,_0x1791b1,_0x40f7d1,_0xcd57ce){function _0x52cb6e(_0x4c3a2b){return _0x4c3a2b instanceof _0x40f7d1?_0x4c3a2b:new _0x40f7d1(function(_0x547dd1){_0x547dd1(_0x4c3a2b);});}return new(_0x40f7d1||(_0x40f7d1=Promise))(function(_0x9fe2f8,_0x403ea1){function _0xe167e9(_0x282c27){try{_0x2bfcdd(_0xcd57ce['next'](_0x282c27));}catch(_0x1abeed){_0x403ea1(_0x1abeed);}}function _0x1c0d73(_0x3fe908){try{_0x2bfcdd(_0xcd57ce['throw'](_0x3fe908));}catch(_0x55a4c9){_0x403ea1(_0x55a4c9);}}function _0x2bfcdd(_0xaf1256){_0xaf1256['done']?_0x9fe2f8(_0xaf1256['value']):_0x52cb6e(_0xaf1256['value'])['then'](_0xe167e9,_0x1c0d73);}_0x2bfcdd((_0xcd57ce=_0xcd57ce['apply'](_0x234194,_0x1791b1||[]))['next']());});};class SearchServersService{constructor(_0x4b71c9){this['fetch']=_0x4b71c9,this['path']='search-services';}['create'](_0x28f155,_0x4f6f57,_0x1c759c,_0x193817,_0x2cc750,_0x1fdde2){return __awaiter$1(this,void 0,void 0,function*(){const _0x1e1042={'account_name':_0x28f155,'search_service_name':_0x4f6f57,'endpoint':_0x1c759c,'key':_0x193817,'county':_0x2cc750};try{const _0x2a99db=yield this['fetch']['post'](this['path'],_0x1fdde2,_0x1e1042);if(_0x2a99db['status']>0xc7&&_0x2a99db['status']<0x12c){const _0x554f37=yield _0x2a99db['json']();return new SuccessfulSearchServiceResponse(_0x554f37);}const _0x476d3a=yield _0x2a99db['json']();return new FailedSearchServiceResponse(_0x476d3a);}catch(_0x5b8537){if(_0x5b8537 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x5b8537['message'],'title':_0x5b8537['name'],'status':0x1f4,'instance':'','type':''});throw _0x5b8537;}});}['delete'](_0x3b09d3,_0x4b92b4,_0x196b12){return __awaiter$1(this,void 0,void 0,function*(){const _0x4ba16e=this['path']+'/'+_0x3b09d3+'/'+_0x4b92b4;try{const _0x507529=yield this['fetch']['delete'](_0x4ba16e,_0x196b12);if(_0x507529['status']>0xc7&&_0x507529['status']<0x12c)return new SuccessfulResponse({});const _0x2024a4=yield _0x507529['json']();return new FailedResponse(_0x2024a4);}catch(_0x509d4f){if(_0x509d4f instanceof Error)return new FailedResponse({'detail':_0x509d4f['message'],'title':_0x509d4f['name'],'status':0x1f4,'instance':'','type':''});throw _0x509d4f;}});}['view'](_0x5f26cb,_0x17c321,_0x2c2d42){return __awaiter$1(this,void 0,void 0,function*(){const _0x1bf91b=this['path']+'/'+_0x5f26cb+'/'+_0x17c321;try{const _0x1e483a=yield this['fetch']['get'](_0x1bf91b,_0x2c2d42);if(_0x1e483a['status']>0xc7&&_0x1e483a['status']<0x12c){const _0x4e3257=yield _0x1e483a['json']();return new SuccessfulViewSearchServiceResponse(_0x4e3257);}const _0x140388=yield _0x1e483a['json']();return new FailedViewSearchServiceResponse(_0x140388);}catch(_0x31cb5d){if(_0x31cb5d instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x31cb5d['message'],'title':_0x31cb5d['name'],'status':0x1f4,'instance':'','type':''});throw _0x31cb5d;}});}}
12
+
13
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x4f0bba,_0x44187e,_0x2f8976,_0x4c8629){function _0x473a9f(_0x3904fb){return _0x3904fb instanceof _0x2f8976?_0x3904fb:new _0x2f8976(function(_0x55469b){_0x55469b(_0x3904fb);});}return new(_0x2f8976||(_0x2f8976=Promise))(function(_0xd95d2c,_0x393f0f){function _0x21a5da(_0xab3c68){try{_0x16644a(_0x4c8629['next'](_0xab3c68));}catch(_0x50714d){_0x393f0f(_0x50714d);}}function _0x437fdd(_0x17f864){try{_0x16644a(_0x4c8629['throw'](_0x17f864));}catch(_0x383259){_0x393f0f(_0x383259);}}function _0x16644a(_0x6e65f9){_0x6e65f9['done']?_0xd95d2c(_0x6e65f9['value']):_0x473a9f(_0x6e65f9['value'])['then'](_0x21a5da,_0x437fdd);}_0x16644a((_0x4c8629=_0x4c8629['apply'](_0x4f0bba,_0x44187e||[]))['next']());});};class AdminClient{constructor(_0x273874='https://admin.searchability.dev/'){var _0x5d0dd9=new Fetch(_0x273874);this['Accounts']=new AccountService(_0x5d0dd9),this['Lists']=new ListService(_0x5d0dd9),this['ApiKeys']=new ApiKeyService(_0x5d0dd9),this['SearchServices']=new SearchServersService(_0x5d0dd9);}}class AuthClient{constructor(_0x130bf9='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x130bf9);}['login'](_0x417dec){return __awaiter(this,void 0,void 0,function*(){var _0x138489='login/'+_0x417dec;try{const _0x4c4031=yield yield fetch(_0x138489);if(_0x4c4031['status']>0xc7&&_0x4c4031['status']<0x12c){const _0x57139e=yield _0x4c4031['json']();return new SuccessfulAuthResponse(_0x57139e);}const _0x1a49e4=yield _0x4c4031['json']();return new FailedAuthResponse(_0x1a49e4);}catch(_0x5808a){if(_0x5808a instanceof Error)return new FailedAuthResponse({'detail':_0x5808a['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x5808a;}});}['refresh'](_0x11ac66){return __awaiter(this,void 0,void 0,function*(){var _0xf7dd42='refresh';try{const _0x3869b4=yield this['fetch']['post'](_0xf7dd42,_0x11ac66,null);if(_0x3869b4['status']>0xc7&&_0x3869b4['status']<0x12c){const _0x31a59a=yield _0x3869b4['json']();return new SuccessfulAuthResponse(_0x31a59a);}const _0x573b16=yield _0x3869b4['json']();return new FailedAuthResponse(_0x573b16);}catch(_0x172029){if(_0x172029 instanceof Error)return new FailedAuthResponse({'detail':_0x172029['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x172029;}});}['getTokenStatus'](_0xebdcb2){if(Date['now']()<_0xebdcb2['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0xebdcb2['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
12
14
 
13
15
  export { AdminClient, AuthClient, TokenStatus, Tokens };
package/dist/types.d.ts CHANGED
@@ -18,7 +18,7 @@ declare class ApiKeyService {
18
18
  readonly fetch: Fetch;
19
19
  readonly path = "api-key";
20
20
  constructor(fetch: Fetch);
21
- create(account_name: string, api_key_Name: string, access_token: string): Promise<Response<ApiKey, Problem>>;
21
+ create(account_name: string, api_key_name: string, access_token: string): Promise<Response<ApiKey, Problem>>;
22
22
  view(account_name: string, api_key_name: string, access_token: string): Promise<Response<ApiKeyValue, Problem>>;
23
23
  delete(account_name: string, api_key_name: string, access_token: string): Promise<Response<any, Problem>>;
24
24
  }
@@ -30,11 +30,21 @@ declare class ListService {
30
30
  remove(accountName: string, listName: string, access_token: string): Promise<Response<Account, Problem>>;
31
31
  }
32
32
 
33
+ declare class SearchServersService {
34
+ readonly fetch: Fetch;
35
+ readonly path = "search-services";
36
+ constructor(fetch: Fetch);
37
+ create(account_name: string, search_service_name: string, endpoint: string, key: string, county: string, access_token: string): Promise<Response<SearchService, Problem>>;
38
+ delete(account_name: string, search_service_name: string, access_token: string): Promise<Response<any, Problem>>;
39
+ view(account_name: string, search_service_name: string, access_token: string): Promise<Response<SearchServiceDetails, Problem>>;
40
+ }
41
+
33
42
  declare class AdminClient {
34
43
  constructor(baseUri?: string);
35
44
  readonly Accounts: AccountService;
36
45
  readonly Lists: ListService;
37
46
  readonly ApiKeys: ApiKeyService;
47
+ readonly SearchServices: SearchServersService;
38
48
  }
39
49
  declare class AuthClient {
40
50
  private readonly fetch;
@@ -76,6 +86,15 @@ type ApiKey = {
76
86
  name: string;
77
87
  created: number;
78
88
  };
89
+ type SearchService = {
90
+ search_service_name: string;
91
+ created: number;
92
+ country: string;
93
+ };
94
+ type SearchServiceDetails = {
95
+ endpoint: string;
96
+ key: number;
97
+ };
79
98
  type ApiKeyValue = {
80
99
  value: string;
81
100
  version: number;
@@ -134,6 +153,30 @@ declare class FailedApiKeyResponse extends Response<ApiKey, Problem> {
134
153
  toSuccess(): ApiKey;
135
154
  toProblem(): Problem;
136
155
  }
156
+ declare class SuccessfulSearchServiceResponse extends Response<SearchService, Problem> {
157
+ readonly searchService: SearchService;
158
+ constructor(searchService: SearchService);
159
+ toSuccess(): SearchService;
160
+ toProblem(): Problem;
161
+ }
162
+ declare class FailedSearchServiceResponse extends Response<SearchService, Problem> {
163
+ readonly problem: Problem;
164
+ constructor(problem: Problem);
165
+ toSuccess(): SearchService;
166
+ toProblem(): Problem;
167
+ }
168
+ declare class SuccessfulViewSearchServiceResponse extends Response<SearchServiceDetails, Problem> {
169
+ readonly searchService: SearchServiceDetails;
170
+ constructor(searchService: SearchServiceDetails);
171
+ toSuccess(): SearchServiceDetails;
172
+ toProblem(): Problem;
173
+ }
174
+ declare class FailedViewSearchServiceResponse extends Response<SearchServiceDetails, Problem> {
175
+ readonly problem: Problem;
176
+ constructor(problem: Problem);
177
+ toSuccess(): SearchServiceDetails;
178
+ toProblem(): Problem;
179
+ }
137
180
  declare class SuccessfulApiKeyValueResponse extends Response<ApiKeyValue, Problem> {
138
181
  readonly apiKeyValue: ApiKeyValue;
139
182
  constructor(apiKeyValue: ApiKeyValue);
@@ -159,4 +202,4 @@ declare class FailedApiKeyValueResponse extends Response<ApiKeyValue, Problem> {
159
202
  toProblem(): Problem;
160
203
  }
161
204
 
162
- export { type Account, AdminClient, type ApiKey, type ApiKeyValue, AuthClient, type Error, FailedAccountResponse, FailedApiKeyResponse, FailedApiKeyValueResponse, FailedAuthResponse, FailedResponse, type List, type ListIdentity, type Problem, Response, SuccessfulAccountResponse, SuccessfulApiKeyResponse, SuccessfulApiKeyValueResponse, SuccessfulAuthResponse, SuccessfulResponse, TokenStatus, Tokens };
205
+ export { type Account, AdminClient, type ApiKey, type ApiKeyValue, AuthClient, type Error, FailedAccountResponse, FailedApiKeyResponse, FailedApiKeyValueResponse, FailedAuthResponse, FailedResponse, FailedSearchServiceResponse, FailedViewSearchServiceResponse, type List, type ListIdentity, type Problem, Response, type SearchService, type SearchServiceDetails, SuccessfulAccountResponse, SuccessfulApiKeyResponse, SuccessfulApiKeyValueResponse, SuccessfulAuthResponse, SuccessfulResponse, SuccessfulSearchServiceResponse, SuccessfulViewSearchServiceResponse, TokenStatus, Tokens };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@searchability/admin-client",
3
- "version": "0.0.34",
3
+ "version": "0.0.36",
4
4
  "description": "Searchability admin client.",
5
5
  "type": "module",
6
6
  "types": "./dist/types.d.ts",
@@ -1,13 +0,0 @@
1
- var TokenStatus;(function(_0x1fa570){_0x1fa570[_0x1fa570['Ok']=0x0]='Ok',_0x1fa570[_0x1fa570['Refresh']=0x1]='Refresh',_0x1fa570[_0x1fa570['Expired']=0x2]='Expired';}(TokenStatus||(TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}}class Response{constructor(_0x1b72e8){this['isSuccess']=_0x1b72e8;}}class SuccessfulAccountResponse extends Response{constructor(_0x2644dd){super(!![]),this['account']=_0x2644dd;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x1c5a32){super(![]),this['problem']=_0x1c5a32;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x1e845d){super(!![]),this['tokens']=_0x1e845d;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x5b283e){super(![]),this['problem']=_0x5b283e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x1a6546){super(!![]),this['apiKey']=_0x1a6546;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x26c630){super(![]),this['problem']=_0x26c630;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x31c3dd){super(!![]),this['apiKeyValue']=_0x31c3dd;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x32e0fd){super(!![]),this['obj']=_0x32e0fd;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x155586){super(![]),this['problem']=_0x155586;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x35a6a1){super(![]),this['problem']=_0x35a6a1;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
2
-
3
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x4dde19,_0x22c40b,_0x25efd7,_0x3737c8){function _0x28d033(_0x184d21){return _0x184d21 instanceof _0x25efd7?_0x184d21:new _0x25efd7(function(_0x18e6b9){_0x18e6b9(_0x184d21);});}return new(_0x25efd7||(_0x25efd7=Promise))(function(_0x523474,_0x346225){function _0x7ada70(_0x32a6f6){try{_0x232bee(_0x3737c8['next'](_0x32a6f6));}catch(_0x22a609){_0x346225(_0x22a609);}}function _0x15be6d(_0x44aa74){try{_0x232bee(_0x3737c8['throw'](_0x44aa74));}catch(_0x30555b){_0x346225(_0x30555b);}}function _0x232bee(_0x1161ab){_0x1161ab['done']?_0x523474(_0x1161ab['value']):_0x28d033(_0x1161ab['value'])['then'](_0x7ada70,_0x15be6d);}_0x232bee((_0x3737c8=_0x3737c8['apply'](_0x4dde19,_0x22c40b||[]))['next']());});};class AccountService{constructor(_0x2d4ec6){this['fetch']=_0x2d4ec6;}['get'](_0x549209,_0x3aa058){return __awaiter$4(this,void 0,void 0,function*(){const _0x249d5f='Account/'+_0x549209+'/',_0x325ae1=yield this['fetch']['get'](_0x249d5f,_0x3aa058);try{if(_0x325ae1['status']>0xc7&&_0x325ae1['status']<0x12c){const _0x5c6dbf=yield _0x325ae1['json']();return new SuccessfulAccountResponse(_0x5c6dbf);}const _0x3c0a52=yield _0x325ae1['json']();return new FailedAccountResponse(_0x3c0a52);}catch(_0x4fa46b){if(_0x4fa46b instanceof Error)return new FailedAccountResponse({'detail':_0x4fa46b['message'],'title':_0x4fa46b['name'],'status':0x1f4,'instance':'','type':''});throw _0x4fa46b;}});}}
4
-
5
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x33f13c,_0x566018,_0x545c0d,_0x29770e){function _0x4ae24b(_0x2495a7){return _0x2495a7 instanceof _0x545c0d?_0x2495a7:new _0x545c0d(function(_0x3515cb){_0x3515cb(_0x2495a7);});}return new(_0x545c0d||(_0x545c0d=Promise))(function(_0x415829,_0x58c714){function _0x12c4c6(_0x115574){try{_0x1f21a1(_0x29770e['next'](_0x115574));}catch(_0x495135){_0x58c714(_0x495135);}}function _0x194652(_0x58c26e){try{_0x1f21a1(_0x29770e['throw'](_0x58c26e));}catch(_0x26e83b){_0x58c714(_0x26e83b);}}function _0x1f21a1(_0x595e55){_0x595e55['done']?_0x415829(_0x595e55['value']):_0x4ae24b(_0x595e55['value'])['then'](_0x12c4c6,_0x194652);}_0x1f21a1((_0x29770e=_0x29770e['apply'](_0x33f13c,_0x566018||[]))['next']());});};class ApiKeyService{constructor(_0x2024f0){this['fetch']=_0x2024f0,this['path']='api-key';}['create'](_0x2898c2,_0x521c09,_0x20129a){return __awaiter$3(this,void 0,void 0,function*(){const _0xa46dd={'account_name':_0x2898c2,'api_key_name':_0x521c09};try{const _0x368b30=yield this['fetch']['post'](this['path'],_0x20129a,_0xa46dd);if(_0x368b30['status']>0xc7&&_0x368b30['status']<0x12c){const _0x4e01fc=yield _0x368b30['json']();return new SuccessfulApiKeyResponse(_0x4e01fc);}const _0x136477=yield _0x368b30['json']();return new FailedApiKeyResponse(_0x136477);}catch(_0x5f370e){if(_0x5f370e instanceof Error)return new FailedApiKeyResponse({'detail':_0x5f370e['message'],'title':_0x5f370e['name'],'status':0x1f4,'instance':'','type':''});throw _0x5f370e;}});}['view'](_0x1184e2,_0x2ffd6a,_0x257fe7){return __awaiter$3(this,void 0,void 0,function*(){const _0x9f413c=this['path']+'/'+_0x1184e2+'/'+_0x2ffd6a;try{const _0x6a5fcd=yield this['fetch']['get'](_0x9f413c,_0x257fe7);if(_0x6a5fcd['status']>0xc7&&_0x6a5fcd['status']<0x12c){const _0x37afe5=yield _0x6a5fcd['json']();return new SuccessfulApiKeyValueResponse(_0x37afe5);}const _0x48cae3=yield _0x6a5fcd['json']();return new FailedApiKeyValueResponse(_0x48cae3);}catch(_0x3dd893){if(_0x3dd893 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x3dd893['message'],'title':_0x3dd893['name'],'status':0x1f4,'instance':'','type':''});throw _0x3dd893;}});}['delete'](_0x73fe1b,_0x338e02,_0x3697ff){return __awaiter$3(this,void 0,void 0,function*(){const _0x24423a=this['path']+'/'+_0x73fe1b+'/'+_0x338e02;try{const _0xff981f=yield this['fetch']['delete'](_0x24423a,_0x3697ff);if(_0xff981f['status']>0xc7&&_0xff981f['status']<0x12c)return new SuccessfulResponse({});const _0x301133=yield _0xff981f['json']();return new FailedResponse(_0x301133);}catch(_0xe6cad3){if(_0xe6cad3 instanceof Error)return new FailedResponse({'detail':_0xe6cad3['message'],'title':_0xe6cad3['name'],'status':0x1f4,'instance':'','type':''});throw _0xe6cad3;}});}}
6
-
7
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x2221a6,_0x48be92,_0x9cd39d,_0x549cec){function _0x5090d1(_0x587852){return _0x587852 instanceof _0x9cd39d?_0x587852:new _0x9cd39d(function(_0x4b155f){_0x4b155f(_0x587852);});}return new(_0x9cd39d||(_0x9cd39d=Promise))(function(_0x20f185,_0x5c6788){function _0x12b7eb(_0x18d6ff){try{_0x18ac5d(_0x549cec['next'](_0x18d6ff));}catch(_0x8acff1){_0x5c6788(_0x8acff1);}}function _0x4fac32(_0x5af909){try{_0x18ac5d(_0x549cec['throw'](_0x5af909));}catch(_0x1802bf){_0x5c6788(_0x1802bf);}}function _0x18ac5d(_0x4548fa){_0x4548fa['done']?_0x20f185(_0x4548fa['value']):_0x5090d1(_0x4548fa['value'])['then'](_0x12b7eb,_0x4fac32);}_0x18ac5d((_0x549cec=_0x549cec['apply'](_0x2221a6,_0x48be92||[]))['next']());});};class ListService{constructor(_0x4d3856){this['fetch']=_0x4d3856;}['add'](_0x33f017,_0x35126d,_0x3f394c){return __awaiter$2(this,void 0,void 0,function*(){const _0x1a8ca8='List',_0x52e2c9={'account_name':_0x33f017,'list_name':_0x35126d};try{const _0x3e0867=yield this['fetch']['post'](_0x1a8ca8,_0x3f394c,_0x52e2c9);if(_0x3e0867['status']>0xc7&&_0x3e0867['status']<0x12c){const _0x595eb6=yield _0x3e0867['json']();return new SuccessfulAccountResponse(_0x595eb6);}const _0x5963d6=yield _0x3e0867['json']();return new FailedAccountResponse(_0x5963d6);}catch(_0x282546){if(_0x282546 instanceof Error)return new FailedAccountResponse({'detail':_0x282546['message'],'title':_0x282546['name'],'status':0x1f4,'instance':'','type':''});throw _0x282546;}});}['remove'](_0x28e7bb,_0x253c12,_0x207608){return __awaiter$2(this,void 0,void 0,function*(){const _0x212123='List/'+_0x28e7bb+'/'+_0x253c12,_0x55a041=yield this['fetch']['delete'](_0x212123,_0x207608);try{if(_0x55a041['status']>0xc7&&_0x55a041['status']<0x12c){const _0x159828=yield _0x55a041['json']();return new SuccessfulAccountResponse(_0x159828);}const _0x2c3d8d=yield _0x55a041['json']();return new FailedAccountResponse(_0x2c3d8d);}catch(_0x159044){if(_0x159044 instanceof Error)return new FailedAccountResponse({'detail':_0x159044['message'],'title':_0x159044['name'],'status':0x1f4,'instance':'','type':''});throw _0x159044;}});}}
8
-
9
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x1ade3,_0x2245b8,_0x4fa39e,_0xe19001){function _0x26ab4f(_0x37bd36){return _0x37bd36 instanceof _0x4fa39e?_0x37bd36:new _0x4fa39e(function(_0x4f63d7){_0x4f63d7(_0x37bd36);});}return new(_0x4fa39e||(_0x4fa39e=Promise))(function(_0x37ad6f,_0x2fd3c6){function _0x4c11ea(_0x4904b7){try{_0x5c0731(_0xe19001['next'](_0x4904b7));}catch(_0x43b36b){_0x2fd3c6(_0x43b36b);}}function _0x4748fa(_0x3f1268){try{_0x5c0731(_0xe19001['throw'](_0x3f1268));}catch(_0x139155){_0x2fd3c6(_0x139155);}}function _0x5c0731(_0xca0298){_0xca0298['done']?_0x37ad6f(_0xca0298['value']):_0x26ab4f(_0xca0298['value'])['then'](_0x4c11ea,_0x4748fa);}_0x5c0731((_0xe19001=_0xe19001['apply'](_0x1ade3,_0x2245b8||[]))['next']());});};class Fetch{constructor(_0x41025b){this['baseUri']=_0x41025b,this['getUrl']=_0x1916ec=>{return _0x1916ec['startsWith']('/')&&(_0x1916ec=_0x1916ec['replace']('/','')),''+this['baseUri']+_0x1916ec;},!_0x41025b['endsWith']('/')&&(_0x41025b=_0x41025b+'/');}['get'](_0x55ddfb,_0x137860){return __awaiter$1(this,void 0,void 0,function*(){const _0x15b8c4=this['getUrl'](_0x55ddfb);return yield fetch(_0x15b8c4,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x137860}});});}['post'](_0xb20ca1,_0x38e353,_0x4262e4){return __awaiter$1(this,void 0,void 0,function*(){const _0x2be050=this['getUrl'](_0xb20ca1);return yield fetch(_0x2be050,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x38e353},'body':_0x4262e4?JSON['stringify'](_0x4262e4):null});});}['put'](_0x4e2857,_0x4cdc37,_0x565cdc){return __awaiter$1(this,void 0,void 0,function*(){const _0x400a1c=this['getUrl'](_0x4e2857);return yield fetch(_0x400a1c,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4cdc37},'body':_0x565cdc?JSON['stringify'](_0x565cdc):null});});}['delete'](_0x1d1a43,_0x33be86){return __awaiter$1(this,void 0,void 0,function*(){const _0x222f26=this['getUrl'](_0x1d1a43);return yield fetch(_0x222f26,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x33be86}});});}}
10
-
11
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x557af9,_0x40bb74,_0x96075b,_0x5ef64d){function _0x5dc0ca(_0x42535a){return _0x42535a instanceof _0x96075b?_0x42535a:new _0x96075b(function(_0xf4e430){_0xf4e430(_0x42535a);});}return new(_0x96075b||(_0x96075b=Promise))(function(_0x3a2f61,_0x438be8){function _0x1ab90c(_0x3ee85d){try{_0x12385b(_0x5ef64d['next'](_0x3ee85d));}catch(_0x58d550){_0x438be8(_0x58d550);}}function _0x19e842(_0x277497){try{_0x12385b(_0x5ef64d['throw'](_0x277497));}catch(_0x534c1c){_0x438be8(_0x534c1c);}}function _0x12385b(_0x29cbe0){_0x29cbe0['done']?_0x3a2f61(_0x29cbe0['value']):_0x5dc0ca(_0x29cbe0['value'])['then'](_0x1ab90c,_0x19e842);}_0x12385b((_0x5ef64d=_0x5ef64d['apply'](_0x557af9,_0x40bb74||[]))['next']());});};class AdminClient{constructor(_0x78c035='https://admin.searchability.dev/'){var _0x3910a7=new Fetch(_0x78c035);this['Accounts']=new AccountService(_0x3910a7),this['Lists']=new ListService(_0x3910a7),this['ApiKeys']=new ApiKeyService(_0x3910a7);}}class AuthClient{constructor(_0x29efbd='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x29efbd);}['login'](_0x4d29df){return __awaiter(this,void 0,void 0,function*(){var _0x270bc1='login/'+_0x4d29df;try{const _0x170899=yield yield fetch(_0x270bc1);if(_0x170899['status']>0xc7&&_0x170899['status']<0x12c){const _0x11a4a6=yield _0x170899['json']();return new SuccessfulAuthResponse(_0x11a4a6);}const _0x253ab1=yield _0x170899['json']();return new FailedAuthResponse(_0x253ab1);}catch(_0x4c2a82){if(_0x4c2a82 instanceof Error)return new FailedAuthResponse({'detail':_0x4c2a82['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x4c2a82;}});}['refresh'](_0x3a8311){return __awaiter(this,void 0,void 0,function*(){var _0x12b2f2='refresh';try{const _0x203f2b=yield this['fetch']['post'](_0x12b2f2,_0x3a8311,null);if(_0x203f2b['status']>0xc7&&_0x203f2b['status']<0x12c){const _0x154b54=yield _0x203f2b['json']();return new SuccessfulAuthResponse(_0x154b54);}const _0x512cee=yield _0x203f2b['json']();return new FailedAuthResponse(_0x512cee);}catch(_0x17fc25){if(_0x17fc25 instanceof Error)return new FailedAuthResponse({'detail':_0x17fc25['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x17fc25;}});}['getTokenStatus'](_0x2c193d){if(Date['now']()<_0x2c193d['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x2c193d['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
12
-
13
- export { AdminClient, AuthClient, TokenStatus, Tokens };