@searchability/admin-client 0.0.35 → 0.0.37

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(_0x2e34c9){_0x2e34c9[_0x2e34c9['Ok']=0x0]='Ok',_0x2e34c9[_0x2e34c9['Refresh']=0x1]='Refresh',_0x2e34c9[_0x2e34c9['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(_0x1a72d7){this['isSuccess']=_0x1a72d7;}}class SuccessfulAccountResponse extends Response{constructor(_0x500ab2){super(!![]),this['account']=_0x500ab2;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x340c1a){super(![]),this['problem']=_0x340c1a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x23a7cb){super(!![]),this['tokens']=_0x23a7cb;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x1aeb9e){super(![]),this['problem']=_0x1aeb9e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x499888){super(!![]),this['apiKey']=_0x499888;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x310a06){super(![]),this['problem']=_0x310a06;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x5f03e3){super(!![]),this['searchService']=_0x5f03e3;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x366414){super(![]),this['problem']=_0x366414;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0xf40cef){super(!![]),this['searchService']=_0xf40cef;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServiceResponse extends Response{constructor(_0x2a6c61){super(![]),this['problem']=_0x2a6c61;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x577648){super(!![]),this['apiKeyValue']=_0x577648;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x2df904){super(!![]),this['obj']=_0x2df904;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x574dff){super(![]),this['problem']=_0x574dff;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x47dccd){super(![]),this['problem']=_0x47dccd;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
2
+
3
+ var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x169c45,_0x2e8ca1,_0x5bf211,_0x4827c0){function _0x4cab80(_0x41aa7d){return _0x41aa7d instanceof _0x5bf211?_0x41aa7d:new _0x5bf211(function(_0x243a10){_0x243a10(_0x41aa7d);});}return new(_0x5bf211||(_0x5bf211=Promise))(function(_0x5ddd22,_0x3917e2){function _0x176516(_0x74acc3){try{_0x433497(_0x4827c0['next'](_0x74acc3));}catch(_0x5c5931){_0x3917e2(_0x5c5931);}}function _0x1aa22e(_0x6895b){try{_0x433497(_0x4827c0['throw'](_0x6895b));}catch(_0x51dad6){_0x3917e2(_0x51dad6);}}function _0x433497(_0x8c7f98){_0x8c7f98['done']?_0x5ddd22(_0x8c7f98['value']):_0x4cab80(_0x8c7f98['value'])['then'](_0x176516,_0x1aa22e);}_0x433497((_0x4827c0=_0x4827c0['apply'](_0x169c45,_0x2e8ca1||[]))['next']());});};class AccountService{constructor(_0x234334){this['fetch']=_0x234334;}['get'](_0x165233,_0x5237f4){return __awaiter$5(this,void 0,void 0,function*(){const _0x1f9435='Account/'+_0x165233+'/',_0x5da7b0=yield this['fetch']['get'](_0x1f9435,_0x5237f4);try{if(_0x5da7b0['status']>0xc7&&_0x5da7b0['status']<0x12c){const _0x1db07f=yield _0x5da7b0['json']();return new SuccessfulAccountResponse(_0x1db07f);}const _0xfd0c95=yield _0x5da7b0['json']();return new FailedAccountResponse(_0xfd0c95);}catch(_0x2e902b){if(_0x2e902b instanceof Error)return new FailedAccountResponse({'detail':_0x2e902b['message'],'title':_0x2e902b['name'],'status':0x1f4,'instance':'','type':''});throw _0x2e902b;}});}}
4
+
5
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x380327,_0x3920f8,_0x53a6ca,_0x2bf9e6){function _0x241ed7(_0x105b29){return _0x105b29 instanceof _0x53a6ca?_0x105b29:new _0x53a6ca(function(_0x1af5bc){_0x1af5bc(_0x105b29);});}return new(_0x53a6ca||(_0x53a6ca=Promise))(function(_0x3b40a3,_0x10bbc0){function _0xa5de79(_0x9795a4){try{_0xc62ef4(_0x2bf9e6['next'](_0x9795a4));}catch(_0x23ad7c){_0x10bbc0(_0x23ad7c);}}function _0x2e31e3(_0x5b02a6){try{_0xc62ef4(_0x2bf9e6['throw'](_0x5b02a6));}catch(_0x295a37){_0x10bbc0(_0x295a37);}}function _0xc62ef4(_0x33ae38){_0x33ae38['done']?_0x3b40a3(_0x33ae38['value']):_0x241ed7(_0x33ae38['value'])['then'](_0xa5de79,_0x2e31e3);}_0xc62ef4((_0x2bf9e6=_0x2bf9e6['apply'](_0x380327,_0x3920f8||[]))['next']());});};class ApiKeyService{constructor(_0x194966){this['fetch']=_0x194966,this['path']='api-key';}['create'](_0x49047d,_0x1b837f,_0x13c994){return __awaiter$4(this,void 0,void 0,function*(){const _0xbeabc5={'account_name':_0x49047d,'api_key_name':_0x1b837f};try{const _0x28dd69=yield this['fetch']['post'](this['path'],_0x13c994,_0xbeabc5);if(_0x28dd69['status']>0xc7&&_0x28dd69['status']<0x12c){const _0x5ab1d9=yield _0x28dd69['json']();return new SuccessfulApiKeyResponse(_0x5ab1d9);}const _0x4adbb6=yield _0x28dd69['json']();return new FailedApiKeyResponse(_0x4adbb6);}catch(_0xc8f76d){if(_0xc8f76d instanceof Error)return new FailedApiKeyResponse({'detail':_0xc8f76d['message'],'title':_0xc8f76d['name'],'status':0x1f4,'instance':'','type':''});throw _0xc8f76d;}});}['view'](_0x282b2e,_0xecb3e3,_0x31cad5){return __awaiter$4(this,void 0,void 0,function*(){const _0x25671e=this['path']+'/'+_0x282b2e+'/'+_0xecb3e3;try{const _0x32131b=yield this['fetch']['get'](_0x25671e,_0x31cad5);if(_0x32131b['status']>0xc7&&_0x32131b['status']<0x12c){const _0x48dee3=yield _0x32131b['json']();return new SuccessfulApiKeyValueResponse(_0x48dee3);}const _0x537fa8=yield _0x32131b['json']();return new FailedApiKeyValueResponse(_0x537fa8);}catch(_0x312e41){if(_0x312e41 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x312e41['message'],'title':_0x312e41['name'],'status':0x1f4,'instance':'','type':''});throw _0x312e41;}});}['delete'](_0x3e47e4,_0x246d56,_0x7cbef){return __awaiter$4(this,void 0,void 0,function*(){const _0x2ffc3b=this['path']+'/'+_0x3e47e4+'/'+_0x246d56;try{const _0xb3c322=yield this['fetch']['delete'](_0x2ffc3b,_0x7cbef);if(_0xb3c322['status']>0xc7&&_0xb3c322['status']<0x12c)return new SuccessfulResponse({});const _0x2bc742=yield _0xb3c322['json']();return new FailedResponse(_0x2bc742);}catch(_0x5390b3){if(_0x5390b3 instanceof Error)return new FailedResponse({'detail':_0x5390b3['message'],'title':_0x5390b3['name'],'status':0x1f4,'instance':'','type':''});throw _0x5390b3;}});}}
6
+
7
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x1dcea5,_0x8fdfe8,_0x281282,_0x14b89d){function _0x2074a1(_0x3ac50e){return _0x3ac50e instanceof _0x281282?_0x3ac50e:new _0x281282(function(_0x5eaa6f){_0x5eaa6f(_0x3ac50e);});}return new(_0x281282||(_0x281282=Promise))(function(_0x1f9ccc,_0x3da533){function _0x582a8e(_0x1bc60a){try{_0x128e1a(_0x14b89d['next'](_0x1bc60a));}catch(_0x37e600){_0x3da533(_0x37e600);}}function _0x2a7e2b(_0x358ea9){try{_0x128e1a(_0x14b89d['throw'](_0x358ea9));}catch(_0x5e3508){_0x3da533(_0x5e3508);}}function _0x128e1a(_0x31b9ba){_0x31b9ba['done']?_0x1f9ccc(_0x31b9ba['value']):_0x2074a1(_0x31b9ba['value'])['then'](_0x582a8e,_0x2a7e2b);}_0x128e1a((_0x14b89d=_0x14b89d['apply'](_0x1dcea5,_0x8fdfe8||[]))['next']());});};class ListService{constructor(_0x57e281){this['fetch']=_0x57e281;}['add'](_0x34e3e8,_0x31b1ad,_0x24d5b8){return __awaiter$3(this,void 0,void 0,function*(){const _0x443c9d='List',_0x40d01b={'account_name':_0x34e3e8,'list_name':_0x31b1ad};try{const _0x3f5847=yield this['fetch']['post'](_0x443c9d,_0x24d5b8,_0x40d01b);if(_0x3f5847['status']>0xc7&&_0x3f5847['status']<0x12c){const _0x595295=yield _0x3f5847['json']();return new SuccessfulAccountResponse(_0x595295);}const _0x2e6781=yield _0x3f5847['json']();return new FailedAccountResponse(_0x2e6781);}catch(_0x587a0c){if(_0x587a0c instanceof Error)return new FailedAccountResponse({'detail':_0x587a0c['message'],'title':_0x587a0c['name'],'status':0x1f4,'instance':'','type':''});throw _0x587a0c;}});}['remove'](_0x45717f,_0x395cb0,_0xed3e53){return __awaiter$3(this,void 0,void 0,function*(){const _0x28bb42='List/'+_0x45717f+'/'+_0x395cb0,_0x298f1e=yield this['fetch']['delete'](_0x28bb42,_0xed3e53);try{if(_0x298f1e['status']>0xc7&&_0x298f1e['status']<0x12c){const _0x2c157d=yield _0x298f1e['json']();return new SuccessfulAccountResponse(_0x2c157d);}const _0x13bb76=yield _0x298f1e['json']();return new FailedAccountResponse(_0x13bb76);}catch(_0x56b8f4){if(_0x56b8f4 instanceof Error)return new FailedAccountResponse({'detail':_0x56b8f4['message'],'title':_0x56b8f4['name'],'status':0x1f4,'instance':'','type':''});throw _0x56b8f4;}});}}
8
+
9
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x52a122,_0x585d58,_0xe139cf,_0x147a37){function _0x13a48c(_0x404899){return _0x404899 instanceof _0xe139cf?_0x404899:new _0xe139cf(function(_0x4b39dd){_0x4b39dd(_0x404899);});}return new(_0xe139cf||(_0xe139cf=Promise))(function(_0x3909d1,_0x5dee2a){function _0x5c3d34(_0x14e6c0){try{_0x470c36(_0x147a37['next'](_0x14e6c0));}catch(_0x27a4af){_0x5dee2a(_0x27a4af);}}function _0x903ac1(_0x4b19ff){try{_0x470c36(_0x147a37['throw'](_0x4b19ff));}catch(_0x29f40c){_0x5dee2a(_0x29f40c);}}function _0x470c36(_0x4e1b57){_0x4e1b57['done']?_0x3909d1(_0x4e1b57['value']):_0x13a48c(_0x4e1b57['value'])['then'](_0x5c3d34,_0x903ac1);}_0x470c36((_0x147a37=_0x147a37['apply'](_0x52a122,_0x585d58||[]))['next']());});};class Fetch{constructor(_0x33838e){this['baseUri']=_0x33838e,this['getUrl']=_0x141278=>{return _0x141278['startsWith']('/')&&(_0x141278=_0x141278['replace']('/','')),''+this['baseUri']+_0x141278;},!_0x33838e['endsWith']('/')&&(_0x33838e=_0x33838e+'/');}['get'](_0x4f7f4e,_0x1fd475){return __awaiter$2(this,void 0,void 0,function*(){const _0x1715d7=this['getUrl'](_0x4f7f4e);return yield fetch(_0x1715d7,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1fd475}});});}['post'](_0x4ca826,_0x40c0b9,_0x4c0a8d){return __awaiter$2(this,void 0,void 0,function*(){const _0x35199d=this['getUrl'](_0x4ca826);return yield fetch(_0x35199d,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x40c0b9},'body':_0x4c0a8d?JSON['stringify'](_0x4c0a8d):null});});}['put'](_0x1eab56,_0x453154,_0x32b3ed){return __awaiter$2(this,void 0,void 0,function*(){const _0x7f5201=this['getUrl'](_0x1eab56);return yield fetch(_0x7f5201,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x453154},'body':_0x32b3ed?JSON['stringify'](_0x32b3ed):null});});}['delete'](_0x4d8f7d,_0x22e144){return __awaiter$2(this,void 0,void 0,function*(){const _0xf0098c=this['getUrl'](_0x4d8f7d);return yield fetch(_0xf0098c,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x22e144}});});}}
10
+
11
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x44a180,_0x524212,_0x1e025e,_0x15f70c){function _0x45fc39(_0x3764f3){return _0x3764f3 instanceof _0x1e025e?_0x3764f3:new _0x1e025e(function(_0x1b21bc){_0x1b21bc(_0x3764f3);});}return new(_0x1e025e||(_0x1e025e=Promise))(function(_0x1ef729,_0x5beabb){function _0x1050b2(_0x4bee78){try{_0x46fec9(_0x15f70c['next'](_0x4bee78));}catch(_0x39559c){_0x5beabb(_0x39559c);}}function _0x54a5e9(_0x1375b7){try{_0x46fec9(_0x15f70c['throw'](_0x1375b7));}catch(_0x17b136){_0x5beabb(_0x17b136);}}function _0x46fec9(_0x2339b3){_0x2339b3['done']?_0x1ef729(_0x2339b3['value']):_0x45fc39(_0x2339b3['value'])['then'](_0x1050b2,_0x54a5e9);}_0x46fec9((_0x15f70c=_0x15f70c['apply'](_0x44a180,_0x524212||[]))['next']());});};class SearchServersService{constructor(_0x174c22){this['fetch']=_0x174c22,this['path']='search-services';}['create'](_0x58f34c,_0x4a8d79,_0x1c8eaf,_0x23db92,_0x42a972,_0x85aa54){return __awaiter$1(this,void 0,void 0,function*(){const _0x5ea819={'account_name':_0x58f34c,'search_service_name':_0x4a8d79,'endpoint':_0x1c8eaf,'key':_0x23db92,'county':_0x42a972};try{const _0x6ad62b=yield this['fetch']['post'](this['path'],_0x85aa54,_0x5ea819);if(_0x6ad62b['status']>0xc7&&_0x6ad62b['status']<0x12c){const _0x2f4fdd=yield _0x6ad62b['json']();return new SuccessfulSearchServiceResponse(_0x2f4fdd);}const _0x1347d7=yield _0x6ad62b['json']();return new FailedSearchServiceResponse(_0x1347d7);}catch(_0x16c3d2){if(_0x16c3d2 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x16c3d2['message'],'title':_0x16c3d2['name'],'status':0x1f4,'instance':'','type':''});throw _0x16c3d2;}});}['delete'](_0x4f1cca,_0x4f57ef,_0x2768f7){return __awaiter$1(this,void 0,void 0,function*(){const _0x3cf32d=this['path']+'/'+_0x4f1cca+'/'+_0x4f57ef;try{const _0x27af71=yield this['fetch']['delete'](_0x3cf32d,_0x2768f7);if(_0x27af71['status']>0xc7&&_0x27af71['status']<0x12c)return new SuccessfulResponse({});const _0x2440b5=yield _0x27af71['json']();return new FailedResponse(_0x2440b5);}catch(_0x1b1cb8){if(_0x1b1cb8 instanceof Error)return new FailedResponse({'detail':_0x1b1cb8['message'],'title':_0x1b1cb8['name'],'status':0x1f4,'instance':'','type':''});throw _0x1b1cb8;}});}['view'](_0x4c9789,_0x368294,_0x36b6a6){return __awaiter$1(this,void 0,void 0,function*(){const _0x39c8c0=this['path']+'/'+_0x4c9789+'/'+_0x368294;try{const _0xb3342a=yield this['fetch']['get'](_0x39c8c0,_0x36b6a6);if(_0xb3342a['status']>0xc7&&_0xb3342a['status']<0x12c){const _0x40eb97=yield _0xb3342a['json']();return new SuccessfulViewSearchServiceResponse(_0x40eb97);}const _0x44563c=yield _0xb3342a['json']();return new FailedViewSearchServiceResponse(_0x44563c);}catch(_0x5138f3){if(_0x5138f3 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x5138f3['message'],'title':_0x5138f3['name'],'status':0x1f4,'instance':'','type':''});throw _0x5138f3;}});}}
12
+
13
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x265104,_0x543480,_0x11f33b,_0x105752){function _0x1d8760(_0x5e9592){return _0x5e9592 instanceof _0x11f33b?_0x5e9592:new _0x11f33b(function(_0x52590d){_0x52590d(_0x5e9592);});}return new(_0x11f33b||(_0x11f33b=Promise))(function(_0x36e40a,_0x52bda2){function _0x1d9b43(_0x29bd57){try{_0x460f50(_0x105752['next'](_0x29bd57));}catch(_0x536797){_0x52bda2(_0x536797);}}function _0x3c95f4(_0x2b5765){try{_0x460f50(_0x105752['throw'](_0x2b5765));}catch(_0x4654d4){_0x52bda2(_0x4654d4);}}function _0x460f50(_0x24d5c9){_0x24d5c9['done']?_0x36e40a(_0x24d5c9['value']):_0x1d8760(_0x24d5c9['value'])['then'](_0x1d9b43,_0x3c95f4);}_0x460f50((_0x105752=_0x105752['apply'](_0x265104,_0x543480||[]))['next']());});};class AdminClient{constructor(_0x5edf59='https://admin.searchability.dev/'){var _0x3b8f1b=new Fetch(_0x5edf59);this['Accounts']=new AccountService(_0x3b8f1b),this['Lists']=new ListService(_0x3b8f1b),this['ApiKeys']=new ApiKeyService(_0x3b8f1b),this['SearchServices']=new SearchServersService(_0x3b8f1b);}}class AuthClient{constructor(_0x12e8a2='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x12e8a2);}['login'](_0x479d57){return __awaiter(this,void 0,void 0,function*(){var _0x1fb9c3='login/'+_0x479d57;try{const _0x5dff82=yield yield fetch(_0x1fb9c3);if(_0x5dff82['status']>0xc7&&_0x5dff82['status']<0x12c){const _0x580b0a=yield _0x5dff82['json']();return new SuccessfulAuthResponse(_0x580b0a);}const _0x3fc2ca=yield _0x5dff82['json']();return new FailedAuthResponse(_0x3fc2ca);}catch(_0x5be60b){if(_0x5be60b instanceof Error)return new FailedAuthResponse({'detail':_0x5be60b['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x5be60b;}});}['refresh'](_0x22f1d6){return __awaiter(this,void 0,void 0,function*(){var _0x149e53='refresh';try{const _0x5ed0a4=yield this['fetch']['post'](_0x149e53,_0x22f1d6,null);if(_0x5ed0a4['status']>0xc7&&_0x5ed0a4['status']<0x12c){const _0x73391d=yield _0x5ed0a4['json']();return new SuccessfulAuthResponse(_0x73391d);}const _0xef32ec=yield _0x5ed0a4['json']();return new FailedAuthResponse(_0xef32ec);}catch(_0x20745c){if(_0x20745c instanceof Error)return new FailedAuthResponse({'detail':_0x20745c['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x20745c;}});}['getTokenStatus'](_0x49b6e9){if(Date['now']()<_0x49b6e9['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x49b6e9['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
14
+
15
+ export { AdminClient, AuthClient, TokenStatus, Tokens };
@@ -1,18 +1,18 @@
1
1
  'use strict';
2
2
 
3
- exports.TokenStatus = void 0;(function(_0x3cb67a){_0x3cb67a[_0x3cb67a['Ok']=0x0]='Ok',_0x3cb67a[_0x3cb67a['Refresh']=0x1]='Refresh',_0x3cb67a[_0x3cb67a['Expired']=0x2]='Expired';}(exports.TokenStatus||(exports.TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}}class Response{constructor(_0x8286dd){this['isSuccess']=_0x8286dd;}}class SuccessfulAccountResponse extends Response{constructor(_0x113c62){super(!![]),this['account']=_0x113c62;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x3a2f0c){super(![]),this['problem']=_0x3a2f0c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x31c269){super(!![]),this['tokens']=_0x31c269;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x30008d){super(![]),this['problem']=_0x30008d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x553a7a){super(!![]),this['apiKey']=_0x553a7a;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x22e941){super(![]),this['problem']=_0x22e941;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x3f6fa9){super(!![]),this['searchService']=_0x3f6fa9;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x4bb8db){super(![]),this['problem']=_0x4bb8db;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x1459b7){super(!![]),this['apiKeyValue']=_0x1459b7;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x4d3583){super(!![]),this['obj']=_0x4d3583;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x4278a6){super(![]),this['problem']=_0x4278a6;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x137894){super(![]),this['problem']=_0x137894;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
3
+ exports.TokenStatus = void 0;(function(_0x476901){_0x476901[_0x476901['Ok']=0x0]='Ok',_0x476901[_0x476901['Refresh']=0x1]='Refresh',_0x476901[_0x476901['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(_0x43bd24){this['isSuccess']=_0x43bd24;}}class SuccessfulAccountResponse extends Response{constructor(_0x365245){super(!![]),this['account']=_0x365245;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x505fe6){super(![]),this['problem']=_0x505fe6;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x51cc59){super(!![]),this['tokens']=_0x51cc59;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x453859){super(![]),this['problem']=_0x453859;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0xfb1434){super(!![]),this['apiKey']=_0xfb1434;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x323a79){super(![]),this['problem']=_0x323a79;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x4f2a6b){super(!![]),this['searchService']=_0x4f2a6b;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x2dbab2){super(![]),this['problem']=_0x2dbab2;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x288868){super(!![]),this['searchService']=_0x288868;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServiceResponse extends Response{constructor(_0x4f7a84){super(![]),this['problem']=_0x4f7a84;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x29f0bc){super(!![]),this['apiKeyValue']=_0x29f0bc;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x2a86a6){super(!![]),this['obj']=_0x2a86a6;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x4d1bd4){super(![]),this['problem']=_0x4d1bd4;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x45871b){super(![]),this['problem']=_0x45871b;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
4
4
 
5
- var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x4eb93b,_0x45421a,_0x7c1061,_0x33fca9){function _0x1e5af9(_0x4a2e0f){return _0x4a2e0f instanceof _0x7c1061?_0x4a2e0f:new _0x7c1061(function(_0x1acd0e){_0x1acd0e(_0x4a2e0f);});}return new(_0x7c1061||(_0x7c1061=Promise))(function(_0x44db4e,_0x13ea18){function _0x327c12(_0x1a921f){try{_0x273f44(_0x33fca9['next'](_0x1a921f));}catch(_0x1076b1){_0x13ea18(_0x1076b1);}}function _0x8f8323(_0x4e1c04){try{_0x273f44(_0x33fca9['throw'](_0x4e1c04));}catch(_0x4dc031){_0x13ea18(_0x4dc031);}}function _0x273f44(_0x5202ec){_0x5202ec['done']?_0x44db4e(_0x5202ec['value']):_0x1e5af9(_0x5202ec['value'])['then'](_0x327c12,_0x8f8323);}_0x273f44((_0x33fca9=_0x33fca9['apply'](_0x4eb93b,_0x45421a||[]))['next']());});};class AccountService{constructor(_0x3ddcc4){this['fetch']=_0x3ddcc4;}['get'](_0x343c96,_0x2d5d73){return __awaiter$5(this,void 0,void 0,function*(){const _0x329115='Account/'+_0x343c96+'/',_0x2460b7=yield this['fetch']['get'](_0x329115,_0x2d5d73);try{if(_0x2460b7['status']>0xc7&&_0x2460b7['status']<0x12c){const _0x485900=yield _0x2460b7['json']();return new SuccessfulAccountResponse(_0x485900);}const _0x50f0a6=yield _0x2460b7['json']();return new FailedAccountResponse(_0x50f0a6);}catch(_0x4519db){if(_0x4519db instanceof Error)return new FailedAccountResponse({'detail':_0x4519db['message'],'title':_0x4519db['name'],'status':0x1f4,'instance':'','type':''});throw _0x4519db;}});}}
5
+ var __awaiter$5=undefined&&undefined['__awaiter']||function(_0xadb53d,_0x54739d,_0x510dee,_0x17c989){function _0x48b0eb(_0x3b84b1){return _0x3b84b1 instanceof _0x510dee?_0x3b84b1:new _0x510dee(function(_0x85fa39){_0x85fa39(_0x3b84b1);});}return new(_0x510dee||(_0x510dee=Promise))(function(_0x4544ff,_0x4bf634){function _0x19b190(_0x2a8a20){try{_0x11282d(_0x17c989['next'](_0x2a8a20));}catch(_0x1910b6){_0x4bf634(_0x1910b6);}}function _0x12b89e(_0xb87624){try{_0x11282d(_0x17c989['throw'](_0xb87624));}catch(_0x557638){_0x4bf634(_0x557638);}}function _0x11282d(_0x43c01b){_0x43c01b['done']?_0x4544ff(_0x43c01b['value']):_0x48b0eb(_0x43c01b['value'])['then'](_0x19b190,_0x12b89e);}_0x11282d((_0x17c989=_0x17c989['apply'](_0xadb53d,_0x54739d||[]))['next']());});};class AccountService{constructor(_0x4281f3){this['fetch']=_0x4281f3;}['get'](_0x5da911,_0x300603){return __awaiter$5(this,void 0,void 0,function*(){const _0x29ca8d='Account/'+_0x5da911+'/',_0x1425f3=yield this['fetch']['get'](_0x29ca8d,_0x300603);try{if(_0x1425f3['status']>0xc7&&_0x1425f3['status']<0x12c){const _0x4c2917=yield _0x1425f3['json']();return new SuccessfulAccountResponse(_0x4c2917);}const _0x1b3120=yield _0x1425f3['json']();return new FailedAccountResponse(_0x1b3120);}catch(_0x5dcb1f){if(_0x5dcb1f instanceof Error)return new FailedAccountResponse({'detail':_0x5dcb1f['message'],'title':_0x5dcb1f['name'],'status':0x1f4,'instance':'','type':''});throw _0x5dcb1f;}});}}
6
6
 
7
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x2b062d,_0x2bf958,_0x5ebd3b,_0x5cc15c){function _0x44e1fd(_0x3c9b6e){return _0x3c9b6e instanceof _0x5ebd3b?_0x3c9b6e:new _0x5ebd3b(function(_0x2fdfa9){_0x2fdfa9(_0x3c9b6e);});}return new(_0x5ebd3b||(_0x5ebd3b=Promise))(function(_0x257eff,_0xfede0e){function _0x3d38d5(_0x4782c8){try{_0x5f3c2e(_0x5cc15c['next'](_0x4782c8));}catch(_0x1d58f2){_0xfede0e(_0x1d58f2);}}function _0x3c402f(_0x5772e1){try{_0x5f3c2e(_0x5cc15c['throw'](_0x5772e1));}catch(_0x463c81){_0xfede0e(_0x463c81);}}function _0x5f3c2e(_0x501397){_0x501397['done']?_0x257eff(_0x501397['value']):_0x44e1fd(_0x501397['value'])['then'](_0x3d38d5,_0x3c402f);}_0x5f3c2e((_0x5cc15c=_0x5cc15c['apply'](_0x2b062d,_0x2bf958||[]))['next']());});};class ApiKeyService{constructor(_0x16ea49){this['fetch']=_0x16ea49,this['path']='api-key';}['create'](_0x447d3e,_0x531afd,_0x2c51fc){return __awaiter$4(this,void 0,void 0,function*(){const _0x46479b={'account_name':_0x447d3e,'api_key_name':_0x531afd};try{const _0x3aa50=yield this['fetch']['post'](this['path'],_0x2c51fc,_0x46479b);if(_0x3aa50['status']>0xc7&&_0x3aa50['status']<0x12c){const _0x1558ff=yield _0x3aa50['json']();return new SuccessfulApiKeyResponse(_0x1558ff);}const _0x56b733=yield _0x3aa50['json']();return new FailedApiKeyResponse(_0x56b733);}catch(_0x2a7126){if(_0x2a7126 instanceof Error)return new FailedApiKeyResponse({'detail':_0x2a7126['message'],'title':_0x2a7126['name'],'status':0x1f4,'instance':'','type':''});throw _0x2a7126;}});}['view'](_0x2e14af,_0x345cef,_0x1ade1b){return __awaiter$4(this,void 0,void 0,function*(){const _0x4c854b=this['path']+'/'+_0x2e14af+'/'+_0x345cef;try{const _0x31988f=yield this['fetch']['get'](_0x4c854b,_0x1ade1b);if(_0x31988f['status']>0xc7&&_0x31988f['status']<0x12c){const _0x4c78b6=yield _0x31988f['json']();return new SuccessfulApiKeyValueResponse(_0x4c78b6);}const _0x100976=yield _0x31988f['json']();return new FailedApiKeyValueResponse(_0x100976);}catch(_0x19e5bf){if(_0x19e5bf instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x19e5bf['message'],'title':_0x19e5bf['name'],'status':0x1f4,'instance':'','type':''});throw _0x19e5bf;}});}['delete'](_0x38bba8,_0x4e5566,_0x1a3a13){return __awaiter$4(this,void 0,void 0,function*(){const _0x489da6=this['path']+'/'+_0x38bba8+'/'+_0x4e5566;try{const _0x4dfeb5=yield this['fetch']['delete'](_0x489da6,_0x1a3a13);if(_0x4dfeb5['status']>0xc7&&_0x4dfeb5['status']<0x12c)return new SuccessfulResponse({});const _0x5b348a=yield _0x4dfeb5['json']();return new FailedResponse(_0x5b348a);}catch(_0x75815f){if(_0x75815f instanceof Error)return new FailedResponse({'detail':_0x75815f['message'],'title':_0x75815f['name'],'status':0x1f4,'instance':'','type':''});throw _0x75815f;}});}}
7
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x438168,_0x49b461,_0x1fb844,_0x39e87d){function _0x35461a(_0x29f39e){return _0x29f39e instanceof _0x1fb844?_0x29f39e:new _0x1fb844(function(_0x41b98a){_0x41b98a(_0x29f39e);});}return new(_0x1fb844||(_0x1fb844=Promise))(function(_0x769173,_0x19438f){function _0x1c7286(_0x17392d){try{_0x4a3f9e(_0x39e87d['next'](_0x17392d));}catch(_0x32ffec){_0x19438f(_0x32ffec);}}function _0x41fc0b(_0x5379c3){try{_0x4a3f9e(_0x39e87d['throw'](_0x5379c3));}catch(_0x593f89){_0x19438f(_0x593f89);}}function _0x4a3f9e(_0x593b56){_0x593b56['done']?_0x769173(_0x593b56['value']):_0x35461a(_0x593b56['value'])['then'](_0x1c7286,_0x41fc0b);}_0x4a3f9e((_0x39e87d=_0x39e87d['apply'](_0x438168,_0x49b461||[]))['next']());});};class ApiKeyService{constructor(_0x153d74){this['fetch']=_0x153d74,this['path']='api-key';}['create'](_0x1ba383,_0x47b1ef,_0x480f70){return __awaiter$4(this,void 0,void 0,function*(){const _0xbe3deb={'account_name':_0x1ba383,'api_key_name':_0x47b1ef};try{const _0x22e0ac=yield this['fetch']['post'](this['path'],_0x480f70,_0xbe3deb);if(_0x22e0ac['status']>0xc7&&_0x22e0ac['status']<0x12c){const _0xec5560=yield _0x22e0ac['json']();return new SuccessfulApiKeyResponse(_0xec5560);}const _0x2e0868=yield _0x22e0ac['json']();return new FailedApiKeyResponse(_0x2e0868);}catch(_0x108789){if(_0x108789 instanceof Error)return new FailedApiKeyResponse({'detail':_0x108789['message'],'title':_0x108789['name'],'status':0x1f4,'instance':'','type':''});throw _0x108789;}});}['view'](_0x4e12a5,_0x472891,_0x258bdc){return __awaiter$4(this,void 0,void 0,function*(){const _0x347499=this['path']+'/'+_0x4e12a5+'/'+_0x472891;try{const _0x2533d3=yield this['fetch']['get'](_0x347499,_0x258bdc);if(_0x2533d3['status']>0xc7&&_0x2533d3['status']<0x12c){const _0x4483ba=yield _0x2533d3['json']();return new SuccessfulApiKeyValueResponse(_0x4483ba);}const _0x90e3fb=yield _0x2533d3['json']();return new FailedApiKeyValueResponse(_0x90e3fb);}catch(_0x3feaae){if(_0x3feaae instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x3feaae['message'],'title':_0x3feaae['name'],'status':0x1f4,'instance':'','type':''});throw _0x3feaae;}});}['delete'](_0x3a0b16,_0x4d5f18,_0x4ab275){return __awaiter$4(this,void 0,void 0,function*(){const _0x46c47a=this['path']+'/'+_0x3a0b16+'/'+_0x4d5f18;try{const _0x4e6e88=yield this['fetch']['delete'](_0x46c47a,_0x4ab275);if(_0x4e6e88['status']>0xc7&&_0x4e6e88['status']<0x12c)return new SuccessfulResponse({});const _0x5853b3=yield _0x4e6e88['json']();return new FailedResponse(_0x5853b3);}catch(_0x2264eb){if(_0x2264eb instanceof Error)return new FailedResponse({'detail':_0x2264eb['message'],'title':_0x2264eb['name'],'status':0x1f4,'instance':'','type':''});throw _0x2264eb;}});}}
8
8
 
9
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x2142f4,_0x2c559e,_0x39c70d,_0x531375){function _0x3baf2f(_0x516f0f){return _0x516f0f instanceof _0x39c70d?_0x516f0f:new _0x39c70d(function(_0x4b2546){_0x4b2546(_0x516f0f);});}return new(_0x39c70d||(_0x39c70d=Promise))(function(_0x200133,_0x165aaf){function _0x318820(_0xdf372d){try{_0x5e9b02(_0x531375['next'](_0xdf372d));}catch(_0x3de044){_0x165aaf(_0x3de044);}}function _0x4701e6(_0xcc8b24){try{_0x5e9b02(_0x531375['throw'](_0xcc8b24));}catch(_0xe87646){_0x165aaf(_0xe87646);}}function _0x5e9b02(_0x26a775){_0x26a775['done']?_0x200133(_0x26a775['value']):_0x3baf2f(_0x26a775['value'])['then'](_0x318820,_0x4701e6);}_0x5e9b02((_0x531375=_0x531375['apply'](_0x2142f4,_0x2c559e||[]))['next']());});};class ListService{constructor(_0x6799c0){this['fetch']=_0x6799c0;}['add'](_0x51cdd9,_0x3a73e8,_0x4e2c84){return __awaiter$3(this,void 0,void 0,function*(){const _0x27ea8a='List',_0x51a404={'account_name':_0x51cdd9,'list_name':_0x3a73e8};try{const _0x36a093=yield this['fetch']['post'](_0x27ea8a,_0x4e2c84,_0x51a404);if(_0x36a093['status']>0xc7&&_0x36a093['status']<0x12c){const _0x36b788=yield _0x36a093['json']();return new SuccessfulAccountResponse(_0x36b788);}const _0x9ef191=yield _0x36a093['json']();return new FailedAccountResponse(_0x9ef191);}catch(_0x49ed21){if(_0x49ed21 instanceof Error)return new FailedAccountResponse({'detail':_0x49ed21['message'],'title':_0x49ed21['name'],'status':0x1f4,'instance':'','type':''});throw _0x49ed21;}});}['remove'](_0x277e37,_0x4b5d7a,_0x565909){return __awaiter$3(this,void 0,void 0,function*(){const _0x8ba123='List/'+_0x277e37+'/'+_0x4b5d7a,_0x175243=yield this['fetch']['delete'](_0x8ba123,_0x565909);try{if(_0x175243['status']>0xc7&&_0x175243['status']<0x12c){const _0x4bca1e=yield _0x175243['json']();return new SuccessfulAccountResponse(_0x4bca1e);}const _0x27be19=yield _0x175243['json']();return new FailedAccountResponse(_0x27be19);}catch(_0x1ee076){if(_0x1ee076 instanceof Error)return new FailedAccountResponse({'detail':_0x1ee076['message'],'title':_0x1ee076['name'],'status':0x1f4,'instance':'','type':''});throw _0x1ee076;}});}}
9
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x27fe5e,_0xc6a600,_0x2ee176,_0x4a25e7){function _0x1ebe25(_0x2bfd3a){return _0x2bfd3a instanceof _0x2ee176?_0x2bfd3a:new _0x2ee176(function(_0x36f58a){_0x36f58a(_0x2bfd3a);});}return new(_0x2ee176||(_0x2ee176=Promise))(function(_0x4220d1,_0x4304c8){function _0x3137ed(_0x4a4bb9){try{_0x1077ea(_0x4a25e7['next'](_0x4a4bb9));}catch(_0x3569d4){_0x4304c8(_0x3569d4);}}function _0x467143(_0x28a1f0){try{_0x1077ea(_0x4a25e7['throw'](_0x28a1f0));}catch(_0x179319){_0x4304c8(_0x179319);}}function _0x1077ea(_0x352415){_0x352415['done']?_0x4220d1(_0x352415['value']):_0x1ebe25(_0x352415['value'])['then'](_0x3137ed,_0x467143);}_0x1077ea((_0x4a25e7=_0x4a25e7['apply'](_0x27fe5e,_0xc6a600||[]))['next']());});};class ListService{constructor(_0xafd305){this['fetch']=_0xafd305;}['add'](_0x1b7d26,_0x3e2610,_0x41424e){return __awaiter$3(this,void 0,void 0,function*(){const _0x254f90='List',_0x25a1e9={'account_name':_0x1b7d26,'list_name':_0x3e2610};try{const _0x435874=yield this['fetch']['post'](_0x254f90,_0x41424e,_0x25a1e9);if(_0x435874['status']>0xc7&&_0x435874['status']<0x12c){const _0x29f362=yield _0x435874['json']();return new SuccessfulAccountResponse(_0x29f362);}const _0x55f0df=yield _0x435874['json']();return new FailedAccountResponse(_0x55f0df);}catch(_0x4059a6){if(_0x4059a6 instanceof Error)return new FailedAccountResponse({'detail':_0x4059a6['message'],'title':_0x4059a6['name'],'status':0x1f4,'instance':'','type':''});throw _0x4059a6;}});}['remove'](_0x436007,_0x78af33,_0x3c5053){return __awaiter$3(this,void 0,void 0,function*(){const _0x240b42='List/'+_0x436007+'/'+_0x78af33,_0x14b521=yield this['fetch']['delete'](_0x240b42,_0x3c5053);try{if(_0x14b521['status']>0xc7&&_0x14b521['status']<0x12c){const _0x45c356=yield _0x14b521['json']();return new SuccessfulAccountResponse(_0x45c356);}const _0x300851=yield _0x14b521['json']();return new FailedAccountResponse(_0x300851);}catch(_0x3e882f){if(_0x3e882f instanceof Error)return new FailedAccountResponse({'detail':_0x3e882f['message'],'title':_0x3e882f['name'],'status':0x1f4,'instance':'','type':''});throw _0x3e882f;}});}}
10
10
 
11
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x5d19de,_0xd4ea55,_0x517657,_0x399ee3){function _0x50e76d(_0xe8384c){return _0xe8384c instanceof _0x517657?_0xe8384c:new _0x517657(function(_0x49eb93){_0x49eb93(_0xe8384c);});}return new(_0x517657||(_0x517657=Promise))(function(_0x29cc9f,_0x4df9b6){function _0x1f1818(_0x512767){try{_0x445d00(_0x399ee3['next'](_0x512767));}catch(_0x3aa36a){_0x4df9b6(_0x3aa36a);}}function _0x1b7fa7(_0x581c86){try{_0x445d00(_0x399ee3['throw'](_0x581c86));}catch(_0x5357e9){_0x4df9b6(_0x5357e9);}}function _0x445d00(_0x417517){_0x417517['done']?_0x29cc9f(_0x417517['value']):_0x50e76d(_0x417517['value'])['then'](_0x1f1818,_0x1b7fa7);}_0x445d00((_0x399ee3=_0x399ee3['apply'](_0x5d19de,_0xd4ea55||[]))['next']());});};class Fetch{constructor(_0x4da7e3){this['baseUri']=_0x4da7e3,this['getUrl']=_0x5075bf=>{return _0x5075bf['startsWith']('/')&&(_0x5075bf=_0x5075bf['replace']('/','')),''+this['baseUri']+_0x5075bf;},!_0x4da7e3['endsWith']('/')&&(_0x4da7e3=_0x4da7e3+'/');}['get'](_0x21af8d,_0x231f67){return __awaiter$2(this,void 0,void 0,function*(){const _0x65f8fd=this['getUrl'](_0x21af8d);return yield fetch(_0x65f8fd,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x231f67}});});}['post'](_0x2f3d81,_0x3812a1,_0x1bc4ec){return __awaiter$2(this,void 0,void 0,function*(){const _0x50aa7b=this['getUrl'](_0x2f3d81);return yield fetch(_0x50aa7b,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3812a1},'body':_0x1bc4ec?JSON['stringify'](_0x1bc4ec):null});});}['put'](_0x59a6a4,_0x56668c,_0x36a777){return __awaiter$2(this,void 0,void 0,function*(){const _0x585358=this['getUrl'](_0x59a6a4);return yield fetch(_0x585358,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x56668c},'body':_0x36a777?JSON['stringify'](_0x36a777):null});});}['delete'](_0x33562a,_0x29364a){return __awaiter$2(this,void 0,void 0,function*(){const _0x167d8e=this['getUrl'](_0x33562a);return yield fetch(_0x167d8e,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x29364a}});});}}
11
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x109046,_0x387cbd,_0xe3e26b,_0x4c52d6){function _0x38e271(_0x2f1d7e){return _0x2f1d7e instanceof _0xe3e26b?_0x2f1d7e:new _0xe3e26b(function(_0x4281a7){_0x4281a7(_0x2f1d7e);});}return new(_0xe3e26b||(_0xe3e26b=Promise))(function(_0x278643,_0x2a2c9){function _0x1dcd07(_0x47ec70){try{_0x1df0dd(_0x4c52d6['next'](_0x47ec70));}catch(_0x34880c){_0x2a2c9(_0x34880c);}}function _0x543af6(_0x27db07){try{_0x1df0dd(_0x4c52d6['throw'](_0x27db07));}catch(_0x373ba){_0x2a2c9(_0x373ba);}}function _0x1df0dd(_0x2855c1){_0x2855c1['done']?_0x278643(_0x2855c1['value']):_0x38e271(_0x2855c1['value'])['then'](_0x1dcd07,_0x543af6);}_0x1df0dd((_0x4c52d6=_0x4c52d6['apply'](_0x109046,_0x387cbd||[]))['next']());});};class Fetch{constructor(_0x545b0f){this['baseUri']=_0x545b0f,this['getUrl']=_0x2e8fb0=>{return _0x2e8fb0['startsWith']('/')&&(_0x2e8fb0=_0x2e8fb0['replace']('/','')),''+this['baseUri']+_0x2e8fb0;},!_0x545b0f['endsWith']('/')&&(_0x545b0f=_0x545b0f+'/');}['get'](_0x1a91ae,_0x40bfb5){return __awaiter$2(this,void 0,void 0,function*(){const _0x40f902=this['getUrl'](_0x1a91ae);return yield fetch(_0x40f902,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x40bfb5}});});}['post'](_0x9996e8,_0x38ee0b,_0x42799b){return __awaiter$2(this,void 0,void 0,function*(){const _0x5d265f=this['getUrl'](_0x9996e8);return yield fetch(_0x5d265f,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x38ee0b},'body':_0x42799b?JSON['stringify'](_0x42799b):null});});}['put'](_0x7239dc,_0x12b486,_0x536f3d){return __awaiter$2(this,void 0,void 0,function*(){const _0x244c3a=this['getUrl'](_0x7239dc);return yield fetch(_0x244c3a,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x12b486},'body':_0x536f3d?JSON['stringify'](_0x536f3d):null});});}['delete'](_0x1a6cc6,_0x1276bb){return __awaiter$2(this,void 0,void 0,function*(){const _0x580a26=this['getUrl'](_0x1a6cc6);return yield fetch(_0x580a26,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1276bb}});});}}
12
12
 
13
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x1aeade,_0x1bf14d,_0x1c3b16,_0x3837d9){function _0x2971b6(_0x296dbf){return _0x296dbf instanceof _0x1c3b16?_0x296dbf:new _0x1c3b16(function(_0x5488e6){_0x5488e6(_0x296dbf);});}return new(_0x1c3b16||(_0x1c3b16=Promise))(function(_0x3361b5,_0x5111c4){function _0x2c1101(_0x2f9985){try{_0x22308f(_0x3837d9['next'](_0x2f9985));}catch(_0x16966d){_0x5111c4(_0x16966d);}}function _0x1d1986(_0x1741ef){try{_0x22308f(_0x3837d9['throw'](_0x1741ef));}catch(_0x29bb77){_0x5111c4(_0x29bb77);}}function _0x22308f(_0xe64b75){_0xe64b75['done']?_0x3361b5(_0xe64b75['value']):_0x2971b6(_0xe64b75['value'])['then'](_0x2c1101,_0x1d1986);}_0x22308f((_0x3837d9=_0x3837d9['apply'](_0x1aeade,_0x1bf14d||[]))['next']());});};class SearchServersService{constructor(_0x217fb2){this['fetch']=_0x217fb2,this['path']='search-services';}['create'](_0x48a0a4,_0x542a9a,_0xb230f3,_0x180b31,_0x3d5453,_0x4e1b68){return __awaiter$1(this,void 0,void 0,function*(){const _0x305631={'account_name':_0x48a0a4,'search_service_name':_0x542a9a,'endpoint':_0xb230f3,'key':_0x180b31,'county':_0x3d5453};try{const _0x4902a1=yield this['fetch']['post'](this['path'],_0x4e1b68,_0x305631);if(_0x4902a1['status']>0xc7&&_0x4902a1['status']<0x12c){const _0x4f4034=yield _0x4902a1['json']();return new SuccessfulSearchServiceResponse(_0x4f4034);}const _0xc028c5=yield _0x4902a1['json']();return new FailedSearchServiceResponse(_0xc028c5);}catch(_0x1c35e5){if(_0x1c35e5 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x1c35e5['message'],'title':_0x1c35e5['name'],'status':0x1f4,'instance':'','type':''});throw _0x1c35e5;}});}}
13
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x1870df,_0x2f970b,_0x2b427b,_0x539e1f){function _0x38846e(_0x4c63c8){return _0x4c63c8 instanceof _0x2b427b?_0x4c63c8:new _0x2b427b(function(_0x3e24c0){_0x3e24c0(_0x4c63c8);});}return new(_0x2b427b||(_0x2b427b=Promise))(function(_0x49bd96,_0x5c4995){function _0x5b418f(_0x40c6dc){try{_0x50dc11(_0x539e1f['next'](_0x40c6dc));}catch(_0x1419e9){_0x5c4995(_0x1419e9);}}function _0x2c41a9(_0x46150d){try{_0x50dc11(_0x539e1f['throw'](_0x46150d));}catch(_0x5f5279){_0x5c4995(_0x5f5279);}}function _0x50dc11(_0x30013f){_0x30013f['done']?_0x49bd96(_0x30013f['value']):_0x38846e(_0x30013f['value'])['then'](_0x5b418f,_0x2c41a9);}_0x50dc11((_0x539e1f=_0x539e1f['apply'](_0x1870df,_0x2f970b||[]))['next']());});};class SearchServersService{constructor(_0x3d9390){this['fetch']=_0x3d9390,this['path']='search-services';}['create'](_0x1c1110,_0x5c6e7d,_0x510cb2,_0x5d225d,_0x40dc87,_0x5d1468){return __awaiter$1(this,void 0,void 0,function*(){const _0x3d984e={'account_name':_0x1c1110,'search_service_name':_0x5c6e7d,'endpoint':_0x510cb2,'key':_0x5d225d,'county':_0x40dc87};try{const _0x55e12f=yield this['fetch']['post'](this['path'],_0x5d1468,_0x3d984e);if(_0x55e12f['status']>0xc7&&_0x55e12f['status']<0x12c){const _0x20ecab=yield _0x55e12f['json']();return new SuccessfulSearchServiceResponse(_0x20ecab);}const _0x30cdf0=yield _0x55e12f['json']();return new FailedSearchServiceResponse(_0x30cdf0);}catch(_0x1f6b8c){if(_0x1f6b8c instanceof Error)return new FailedSearchServiceResponse({'detail':_0x1f6b8c['message'],'title':_0x1f6b8c['name'],'status':0x1f4,'instance':'','type':''});throw _0x1f6b8c;}});}['delete'](_0x577e27,_0x51a47c,_0x47bcee){return __awaiter$1(this,void 0,void 0,function*(){const _0x36aeee=this['path']+'/'+_0x577e27+'/'+_0x51a47c;try{const _0x387e9b=yield this['fetch']['delete'](_0x36aeee,_0x47bcee);if(_0x387e9b['status']>0xc7&&_0x387e9b['status']<0x12c)return new SuccessfulResponse({});const _0x583163=yield _0x387e9b['json']();return new FailedResponse(_0x583163);}catch(_0x486f85){if(_0x486f85 instanceof Error)return new FailedResponse({'detail':_0x486f85['message'],'title':_0x486f85['name'],'status':0x1f4,'instance':'','type':''});throw _0x486f85;}});}['view'](_0x4026d4,_0x5ac344,_0x5d1b9f){return __awaiter$1(this,void 0,void 0,function*(){const _0xf39887=this['path']+'/'+_0x4026d4+'/'+_0x5ac344;try{const _0x6c5c1c=yield this['fetch']['get'](_0xf39887,_0x5d1b9f);if(_0x6c5c1c['status']>0xc7&&_0x6c5c1c['status']<0x12c){const _0x3f8eb7=yield _0x6c5c1c['json']();return new SuccessfulViewSearchServiceResponse(_0x3f8eb7);}const _0x33f0e2=yield _0x6c5c1c['json']();return new FailedViewSearchServiceResponse(_0x33f0e2);}catch(_0x10608b){if(_0x10608b instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x10608b['message'],'title':_0x10608b['name'],'status':0x1f4,'instance':'','type':''});throw _0x10608b;}});}}
14
14
 
15
- var __awaiter=undefined&&undefined['__awaiter']||function(_0xb229d0,_0x2f19f2,_0x110b78,_0x2e61c8){function _0x4011da(_0x24ea8f){return _0x24ea8f instanceof _0x110b78?_0x24ea8f:new _0x110b78(function(_0x2948b9){_0x2948b9(_0x24ea8f);});}return new(_0x110b78||(_0x110b78=Promise))(function(_0xc23b84,_0x443b0e){function _0x303c37(_0x5e1b2c){try{_0x7b5cb7(_0x2e61c8['next'](_0x5e1b2c));}catch(_0x3502eb){_0x443b0e(_0x3502eb);}}function _0x3ea633(_0x1cb695){try{_0x7b5cb7(_0x2e61c8['throw'](_0x1cb695));}catch(_0x29fc73){_0x443b0e(_0x29fc73);}}function _0x7b5cb7(_0x3c26d7){_0x3c26d7['done']?_0xc23b84(_0x3c26d7['value']):_0x4011da(_0x3c26d7['value'])['then'](_0x303c37,_0x3ea633);}_0x7b5cb7((_0x2e61c8=_0x2e61c8['apply'](_0xb229d0,_0x2f19f2||[]))['next']());});};class AdminClient{constructor(_0x99cf3c='https://admin.searchability.dev/'){var _0x36582c=new Fetch(_0x99cf3c);this['Accounts']=new AccountService(_0x36582c),this['Lists']=new ListService(_0x36582c),this['ApiKeys']=new ApiKeyService(_0x36582c),this['SearchServices']=new SearchServersService(_0x36582c);}}class AuthClient{constructor(_0x11cbf4='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x11cbf4);}['login'](_0x370cf0){return __awaiter(this,void 0,void 0,function*(){var _0x3313db='login/'+_0x370cf0;try{const _0x1db4ec=yield yield fetch(_0x3313db);if(_0x1db4ec['status']>0xc7&&_0x1db4ec['status']<0x12c){const _0x1201a9=yield _0x1db4ec['json']();return new SuccessfulAuthResponse(_0x1201a9);}const _0x1e7cb8=yield _0x1db4ec['json']();return new FailedAuthResponse(_0x1e7cb8);}catch(_0x176aa9){if(_0x176aa9 instanceof Error)return new FailedAuthResponse({'detail':_0x176aa9['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x176aa9;}});}['refresh'](_0x44749b){return __awaiter(this,void 0,void 0,function*(){var _0x47abf9='refresh';try{const _0x53017d=yield this['fetch']['post'](_0x47abf9,_0x44749b,null);if(_0x53017d['status']>0xc7&&_0x53017d['status']<0x12c){const _0x2c4dfe=yield _0x53017d['json']();return new SuccessfulAuthResponse(_0x2c4dfe);}const _0x370ddb=yield _0x53017d['json']();return new FailedAuthResponse(_0x370ddb);}catch(_0x212a5e){if(_0x212a5e instanceof Error)return new FailedAuthResponse({'detail':_0x212a5e['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x212a5e;}});}['getTokenStatus'](_0x2c5e8b){if(Date['now']()<_0x2c5e8b['access_expires'])return exports.TokenStatus['Ok'];if(Date['now']()<_0x2c5e8b['refresh_expires'])return exports.TokenStatus['Refresh'];return exports.TokenStatus['Expired'];}}
15
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x4b9e8f,_0x384075,_0x189c6b,_0x535295){function _0x484688(_0x2f14c4){return _0x2f14c4 instanceof _0x189c6b?_0x2f14c4:new _0x189c6b(function(_0xffbbf){_0xffbbf(_0x2f14c4);});}return new(_0x189c6b||(_0x189c6b=Promise))(function(_0x5a1dd0,_0x5d276a){function _0x4b5b33(_0xdd02b2){try{_0x42ae69(_0x535295['next'](_0xdd02b2));}catch(_0x3ccd56){_0x5d276a(_0x3ccd56);}}function _0x34c86b(_0x513e6f){try{_0x42ae69(_0x535295['throw'](_0x513e6f));}catch(_0x51693a){_0x5d276a(_0x51693a);}}function _0x42ae69(_0x54bf9c){_0x54bf9c['done']?_0x5a1dd0(_0x54bf9c['value']):_0x484688(_0x54bf9c['value'])['then'](_0x4b5b33,_0x34c86b);}_0x42ae69((_0x535295=_0x535295['apply'](_0x4b9e8f,_0x384075||[]))['next']());});};class AdminClient{constructor(_0x5cf6cf='https://admin.searchability.dev/'){var _0x530b80=new Fetch(_0x5cf6cf);this['Accounts']=new AccountService(_0x530b80),this['Lists']=new ListService(_0x530b80),this['ApiKeys']=new ApiKeyService(_0x530b80),this['SearchServices']=new SearchServersService(_0x530b80);}}class AuthClient{constructor(_0x3c45e3='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x3c45e3);}['login'](_0x4b7ce6){return __awaiter(this,void 0,void 0,function*(){var _0x3dc37b='login/'+_0x4b7ce6;try{const _0x35bb0f=yield yield fetch(_0x3dc37b);if(_0x35bb0f['status']>0xc7&&_0x35bb0f['status']<0x12c){const _0x2792de=yield _0x35bb0f['json']();return new SuccessfulAuthResponse(_0x2792de);}const _0x2a06e6=yield _0x35bb0f['json']();return new FailedAuthResponse(_0x2a06e6);}catch(_0x4c3382){if(_0x4c3382 instanceof Error)return new FailedAuthResponse({'detail':_0x4c3382['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x4c3382;}});}['refresh'](_0x103c46){return __awaiter(this,void 0,void 0,function*(){var _0x1e99d3='refresh';try{const _0x2940f8=yield this['fetch']['post'](_0x1e99d3,_0x103c46,null);if(_0x2940f8['status']>0xc7&&_0x2940f8['status']<0x12c){const _0x37efe6=yield _0x2940f8['json']();return new SuccessfulAuthResponse(_0x37efe6);}const _0x16d4a7=yield _0x2940f8['json']();return new FailedAuthResponse(_0x16d4a7);}catch(_0x784d3){if(_0x784d3 instanceof Error)return new FailedAuthResponse({'detail':_0x784d3['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x784d3;}});}['getTokenStatus'](_0x1c169c){if(Date['now']()<_0x1c169c['access_expires'])return exports.TokenStatus['Ok'];if(Date['now']()<_0x1c169c['refresh_expires'])return exports.TokenStatus['Refresh'];return exports.TokenStatus['Expired'];}}
16
16
 
17
17
  exports.AdminClient = AdminClient;
18
18
  exports.AuthClient = AuthClient;
@@ -1,15 +1,15 @@
1
- var TokenStatus;(function(_0x1d8e35){_0x1d8e35[_0x1d8e35['Ok']=0x0]='Ok',_0x1d8e35[_0x1d8e35['Refresh']=0x1]='Refresh',_0x1d8e35[_0x1d8e35['Expired']=0x2]='Expired';}(TokenStatus||(TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}}class Response{constructor(_0x4da05a){this['isSuccess']=_0x4da05a;}}class SuccessfulAccountResponse extends Response{constructor(_0x4c1904){super(!![]),this['account']=_0x4c1904;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0xf82dff){super(![]),this['problem']=_0xf82dff;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x51bd71){super(!![]),this['tokens']=_0x51bd71;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x236518){super(![]),this['problem']=_0x236518;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x391833){super(!![]),this['apiKey']=_0x391833;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x2fd4e9){super(![]),this['problem']=_0x2fd4e9;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x1d56a3){super(!![]),this['searchService']=_0x1d56a3;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x427e9a){super(![]),this['problem']=_0x427e9a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x14a2eb){super(!![]),this['apiKeyValue']=_0x14a2eb;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x3a22a7){super(!![]),this['obj']=_0x3a22a7;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x49139f){super(![]),this['problem']=_0x49139f;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0xf89b21){super(![]),this['problem']=_0xf89b21;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
1
+ var TokenStatus;(function(_0x5da749){_0x5da749[_0x5da749['Ok']=0x0]='Ok',_0x5da749[_0x5da749['Refresh']=0x1]='Refresh',_0x5da749[_0x5da749['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(_0x41939d){this['isSuccess']=_0x41939d;}}class SuccessfulAccountResponse extends Response{constructor(_0x221595){super(!![]),this['account']=_0x221595;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x4fd438){super(![]),this['problem']=_0x4fd438;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x46eedd){super(!![]),this['tokens']=_0x46eedd;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x1de694){super(![]),this['problem']=_0x1de694;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x5a0962){super(!![]),this['apiKey']=_0x5a0962;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x301838){super(![]),this['problem']=_0x301838;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x2bf375){super(!![]),this['searchService']=_0x2bf375;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x4cd7d2){super(![]),this['problem']=_0x4cd7d2;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x43dcf9){super(!![]),this['searchService']=_0x43dcf9;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServiceResponse extends Response{constructor(_0x12b6f9){super(![]),this['problem']=_0x12b6f9;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x1307df){super(!![]),this['apiKeyValue']=_0x1307df;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x4a4cf1){super(!![]),this['obj']=_0x4a4cf1;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x75b752){super(![]),this['problem']=_0x75b752;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x23ce0d){super(![]),this['problem']=_0x23ce0d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
2
2
 
3
- var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x126f9e,_0x2eada6,_0x2475b5,_0x2c0997){function _0x3d61f7(_0x11bc72){return _0x11bc72 instanceof _0x2475b5?_0x11bc72:new _0x2475b5(function(_0x5a1643){_0x5a1643(_0x11bc72);});}return new(_0x2475b5||(_0x2475b5=Promise))(function(_0x591fbc,_0x3360d1){function _0x394672(_0x369955){try{_0x1580ae(_0x2c0997['next'](_0x369955));}catch(_0x4757ef){_0x3360d1(_0x4757ef);}}function _0x319fb6(_0x100071){try{_0x1580ae(_0x2c0997['throw'](_0x100071));}catch(_0x44cb7d){_0x3360d1(_0x44cb7d);}}function _0x1580ae(_0x23d3d4){_0x23d3d4['done']?_0x591fbc(_0x23d3d4['value']):_0x3d61f7(_0x23d3d4['value'])['then'](_0x394672,_0x319fb6);}_0x1580ae((_0x2c0997=_0x2c0997['apply'](_0x126f9e,_0x2eada6||[]))['next']());});};class AccountService{constructor(_0x33eb37){this['fetch']=_0x33eb37;}['get'](_0x2593f2,_0x2c8708){return __awaiter$5(this,void 0,void 0,function*(){const _0x43fb46='Account/'+_0x2593f2+'/',_0x5874da=yield this['fetch']['get'](_0x43fb46,_0x2c8708);try{if(_0x5874da['status']>0xc7&&_0x5874da['status']<0x12c){const _0x80317b=yield _0x5874da['json']();return new SuccessfulAccountResponse(_0x80317b);}const _0x45c700=yield _0x5874da['json']();return new FailedAccountResponse(_0x45c700);}catch(_0x304c57){if(_0x304c57 instanceof Error)return new FailedAccountResponse({'detail':_0x304c57['message'],'title':_0x304c57['name'],'status':0x1f4,'instance':'','type':''});throw _0x304c57;}});}}
3
+ var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x4574ba,_0x20610d,_0xfe38c3,_0x48a080){function _0x4aee10(_0x23b990){return _0x23b990 instanceof _0xfe38c3?_0x23b990:new _0xfe38c3(function(_0x291ac4){_0x291ac4(_0x23b990);});}return new(_0xfe38c3||(_0xfe38c3=Promise))(function(_0x162dbe,_0x16187a){function _0x2103a3(_0x5d428c){try{_0x5e594e(_0x48a080['next'](_0x5d428c));}catch(_0x56869d){_0x16187a(_0x56869d);}}function _0x219799(_0x4d99c6){try{_0x5e594e(_0x48a080['throw'](_0x4d99c6));}catch(_0x4a466e){_0x16187a(_0x4a466e);}}function _0x5e594e(_0x39ec71){_0x39ec71['done']?_0x162dbe(_0x39ec71['value']):_0x4aee10(_0x39ec71['value'])['then'](_0x2103a3,_0x219799);}_0x5e594e((_0x48a080=_0x48a080['apply'](_0x4574ba,_0x20610d||[]))['next']());});};class AccountService{constructor(_0x5b9219){this['fetch']=_0x5b9219;}['get'](_0x1e4e4e,_0x4e990e){return __awaiter$5(this,void 0,void 0,function*(){const _0x4ee516='Account/'+_0x1e4e4e+'/',_0x18ed6c=yield this['fetch']['get'](_0x4ee516,_0x4e990e);try{if(_0x18ed6c['status']>0xc7&&_0x18ed6c['status']<0x12c){const _0x906f5b=yield _0x18ed6c['json']();return new SuccessfulAccountResponse(_0x906f5b);}const _0x4287da=yield _0x18ed6c['json']();return new FailedAccountResponse(_0x4287da);}catch(_0x25dcb0){if(_0x25dcb0 instanceof Error)return new FailedAccountResponse({'detail':_0x25dcb0['message'],'title':_0x25dcb0['name'],'status':0x1f4,'instance':'','type':''});throw _0x25dcb0;}});}}
4
4
 
5
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x24bdf3,_0x10e55f,_0x395259,_0x577e26){function _0x556f20(_0x4fe585){return _0x4fe585 instanceof _0x395259?_0x4fe585:new _0x395259(function(_0x45b853){_0x45b853(_0x4fe585);});}return new(_0x395259||(_0x395259=Promise))(function(_0x12a87c,_0x4c90b7){function _0x140710(_0x3d5d4a){try{_0x26d937(_0x577e26['next'](_0x3d5d4a));}catch(_0x5f5d55){_0x4c90b7(_0x5f5d55);}}function _0x230bff(_0x5983af){try{_0x26d937(_0x577e26['throw'](_0x5983af));}catch(_0x359807){_0x4c90b7(_0x359807);}}function _0x26d937(_0x14377b){_0x14377b['done']?_0x12a87c(_0x14377b['value']):_0x556f20(_0x14377b['value'])['then'](_0x140710,_0x230bff);}_0x26d937((_0x577e26=_0x577e26['apply'](_0x24bdf3,_0x10e55f||[]))['next']());});};class ApiKeyService{constructor(_0x3b8af7){this['fetch']=_0x3b8af7,this['path']='api-key';}['create'](_0x28a31a,_0x5672be,_0x314dd7){return __awaiter$4(this,void 0,void 0,function*(){const _0x45019b={'account_name':_0x28a31a,'api_key_name':_0x5672be};try{const _0x2dfbb0=yield this['fetch']['post'](this['path'],_0x314dd7,_0x45019b);if(_0x2dfbb0['status']>0xc7&&_0x2dfbb0['status']<0x12c){const _0x4d0b66=yield _0x2dfbb0['json']();return new SuccessfulApiKeyResponse(_0x4d0b66);}const _0xce7a9d=yield _0x2dfbb0['json']();return new FailedApiKeyResponse(_0xce7a9d);}catch(_0x42d5ad){if(_0x42d5ad instanceof Error)return new FailedApiKeyResponse({'detail':_0x42d5ad['message'],'title':_0x42d5ad['name'],'status':0x1f4,'instance':'','type':''});throw _0x42d5ad;}});}['view'](_0x14d722,_0x2f93d0,_0x1c89d6){return __awaiter$4(this,void 0,void 0,function*(){const _0x5dcbe0=this['path']+'/'+_0x14d722+'/'+_0x2f93d0;try{const _0x287d78=yield this['fetch']['get'](_0x5dcbe0,_0x1c89d6);if(_0x287d78['status']>0xc7&&_0x287d78['status']<0x12c){const _0x3321fb=yield _0x287d78['json']();return new SuccessfulApiKeyValueResponse(_0x3321fb);}const _0x16d94e=yield _0x287d78['json']();return new FailedApiKeyValueResponse(_0x16d94e);}catch(_0x4b4d94){if(_0x4b4d94 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x4b4d94['message'],'title':_0x4b4d94['name'],'status':0x1f4,'instance':'','type':''});throw _0x4b4d94;}});}['delete'](_0x5f1ebf,_0xc045eb,_0x32fdcc){return __awaiter$4(this,void 0,void 0,function*(){const _0x102afe=this['path']+'/'+_0x5f1ebf+'/'+_0xc045eb;try{const _0x583fb1=yield this['fetch']['delete'](_0x102afe,_0x32fdcc);if(_0x583fb1['status']>0xc7&&_0x583fb1['status']<0x12c)return new SuccessfulResponse({});const _0x4eee7b=yield _0x583fb1['json']();return new FailedResponse(_0x4eee7b);}catch(_0x242e9e){if(_0x242e9e instanceof Error)return new FailedResponse({'detail':_0x242e9e['message'],'title':_0x242e9e['name'],'status':0x1f4,'instance':'','type':''});throw _0x242e9e;}});}}
5
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x4ca87a,_0x55e0d1,_0x35d60d,_0x5b5f2b){function _0x239a3b(_0x428ec1){return _0x428ec1 instanceof _0x35d60d?_0x428ec1:new _0x35d60d(function(_0x34f09d){_0x34f09d(_0x428ec1);});}return new(_0x35d60d||(_0x35d60d=Promise))(function(_0x112b56,_0xc2db02){function _0x4d0bf1(_0x4a9578){try{_0x3eb3a0(_0x5b5f2b['next'](_0x4a9578));}catch(_0x56f90d){_0xc2db02(_0x56f90d);}}function _0x5926c1(_0x151fe7){try{_0x3eb3a0(_0x5b5f2b['throw'](_0x151fe7));}catch(_0x4b5806){_0xc2db02(_0x4b5806);}}function _0x3eb3a0(_0x56f3bc){_0x56f3bc['done']?_0x112b56(_0x56f3bc['value']):_0x239a3b(_0x56f3bc['value'])['then'](_0x4d0bf1,_0x5926c1);}_0x3eb3a0((_0x5b5f2b=_0x5b5f2b['apply'](_0x4ca87a,_0x55e0d1||[]))['next']());});};class ApiKeyService{constructor(_0x160f23){this['fetch']=_0x160f23,this['path']='api-key';}['create'](_0x48d0e0,_0x394b4d,_0x1ab2ea){return __awaiter$4(this,void 0,void 0,function*(){const _0xad4c27={'account_name':_0x48d0e0,'api_key_name':_0x394b4d};try{const _0x3ece97=yield this['fetch']['post'](this['path'],_0x1ab2ea,_0xad4c27);if(_0x3ece97['status']>0xc7&&_0x3ece97['status']<0x12c){const _0x398e2a=yield _0x3ece97['json']();return new SuccessfulApiKeyResponse(_0x398e2a);}const _0x570d22=yield _0x3ece97['json']();return new FailedApiKeyResponse(_0x570d22);}catch(_0x151648){if(_0x151648 instanceof Error)return new FailedApiKeyResponse({'detail':_0x151648['message'],'title':_0x151648['name'],'status':0x1f4,'instance':'','type':''});throw _0x151648;}});}['view'](_0x59b589,_0x3fce66,_0x140a49){return __awaiter$4(this,void 0,void 0,function*(){const _0x1d18a0=this['path']+'/'+_0x59b589+'/'+_0x3fce66;try{const _0x32ac47=yield this['fetch']['get'](_0x1d18a0,_0x140a49);if(_0x32ac47['status']>0xc7&&_0x32ac47['status']<0x12c){const _0x557ede=yield _0x32ac47['json']();return new SuccessfulApiKeyValueResponse(_0x557ede);}const _0x43944f=yield _0x32ac47['json']();return new FailedApiKeyValueResponse(_0x43944f);}catch(_0x5582d5){if(_0x5582d5 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x5582d5['message'],'title':_0x5582d5['name'],'status':0x1f4,'instance':'','type':''});throw _0x5582d5;}});}['delete'](_0x275e55,_0x36d8d4,_0x5babb9){return __awaiter$4(this,void 0,void 0,function*(){const _0xbabd2f=this['path']+'/'+_0x275e55+'/'+_0x36d8d4;try{const _0x1d9e87=yield this['fetch']['delete'](_0xbabd2f,_0x5babb9);if(_0x1d9e87['status']>0xc7&&_0x1d9e87['status']<0x12c)return new SuccessfulResponse({});const _0xff8688=yield _0x1d9e87['json']();return new FailedResponse(_0xff8688);}catch(_0x4795b9){if(_0x4795b9 instanceof Error)return new FailedResponse({'detail':_0x4795b9['message'],'title':_0x4795b9['name'],'status':0x1f4,'instance':'','type':''});throw _0x4795b9;}});}}
6
6
 
7
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x12e74c,_0x252f5e,_0x5969a8,_0x13a2ab){function _0x4ac3f8(_0x483f71){return _0x483f71 instanceof _0x5969a8?_0x483f71:new _0x5969a8(function(_0x396bbb){_0x396bbb(_0x483f71);});}return new(_0x5969a8||(_0x5969a8=Promise))(function(_0x2361b9,_0x57e4cf){function _0x21a318(_0x23f071){try{_0x4a934b(_0x13a2ab['next'](_0x23f071));}catch(_0x2de3fb){_0x57e4cf(_0x2de3fb);}}function _0x52af1e(_0x536310){try{_0x4a934b(_0x13a2ab['throw'](_0x536310));}catch(_0x2821d9){_0x57e4cf(_0x2821d9);}}function _0x4a934b(_0x4fabd8){_0x4fabd8['done']?_0x2361b9(_0x4fabd8['value']):_0x4ac3f8(_0x4fabd8['value'])['then'](_0x21a318,_0x52af1e);}_0x4a934b((_0x13a2ab=_0x13a2ab['apply'](_0x12e74c,_0x252f5e||[]))['next']());});};class ListService{constructor(_0x226a20){this['fetch']=_0x226a20;}['add'](_0x16f1c4,_0x160c7d,_0x354943){return __awaiter$3(this,void 0,void 0,function*(){const _0x22a9af='List',_0x19f36f={'account_name':_0x16f1c4,'list_name':_0x160c7d};try{const _0x36d901=yield this['fetch']['post'](_0x22a9af,_0x354943,_0x19f36f);if(_0x36d901['status']>0xc7&&_0x36d901['status']<0x12c){const _0x102749=yield _0x36d901['json']();return new SuccessfulAccountResponse(_0x102749);}const _0x39b348=yield _0x36d901['json']();return new FailedAccountResponse(_0x39b348);}catch(_0x3d1d56){if(_0x3d1d56 instanceof Error)return new FailedAccountResponse({'detail':_0x3d1d56['message'],'title':_0x3d1d56['name'],'status':0x1f4,'instance':'','type':''});throw _0x3d1d56;}});}['remove'](_0x3491ea,_0x5b5853,_0x2ec697){return __awaiter$3(this,void 0,void 0,function*(){const _0x35cc93='List/'+_0x3491ea+'/'+_0x5b5853,_0x1a814a=yield this['fetch']['delete'](_0x35cc93,_0x2ec697);try{if(_0x1a814a['status']>0xc7&&_0x1a814a['status']<0x12c){const _0x2b468a=yield _0x1a814a['json']();return new SuccessfulAccountResponse(_0x2b468a);}const _0xdf4852=yield _0x1a814a['json']();return new FailedAccountResponse(_0xdf4852);}catch(_0x55b912){if(_0x55b912 instanceof Error)return new FailedAccountResponse({'detail':_0x55b912['message'],'title':_0x55b912['name'],'status':0x1f4,'instance':'','type':''});throw _0x55b912;}});}}
7
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x48d7be,_0x429ec7,_0x59607c,_0x1b364e){function _0x4fe3b1(_0x2ab12c){return _0x2ab12c instanceof _0x59607c?_0x2ab12c:new _0x59607c(function(_0x3e96ad){_0x3e96ad(_0x2ab12c);});}return new(_0x59607c||(_0x59607c=Promise))(function(_0x593daa,_0x57d317){function _0x5b8a44(_0xbf598d){try{_0x8346a8(_0x1b364e['next'](_0xbf598d));}catch(_0x49c48a){_0x57d317(_0x49c48a);}}function _0x108ac6(_0x1b3e45){try{_0x8346a8(_0x1b364e['throw'](_0x1b3e45));}catch(_0x387c5c){_0x57d317(_0x387c5c);}}function _0x8346a8(_0x53705d){_0x53705d['done']?_0x593daa(_0x53705d['value']):_0x4fe3b1(_0x53705d['value'])['then'](_0x5b8a44,_0x108ac6);}_0x8346a8((_0x1b364e=_0x1b364e['apply'](_0x48d7be,_0x429ec7||[]))['next']());});};class ListService{constructor(_0x221ec0){this['fetch']=_0x221ec0;}['add'](_0x445bf2,_0x137a5f,_0x3b0275){return __awaiter$3(this,void 0,void 0,function*(){const _0x4751cf='List',_0x1581fe={'account_name':_0x445bf2,'list_name':_0x137a5f};try{const _0x45bc2f=yield this['fetch']['post'](_0x4751cf,_0x3b0275,_0x1581fe);if(_0x45bc2f['status']>0xc7&&_0x45bc2f['status']<0x12c){const _0x5623f4=yield _0x45bc2f['json']();return new SuccessfulAccountResponse(_0x5623f4);}const _0x334181=yield _0x45bc2f['json']();return new FailedAccountResponse(_0x334181);}catch(_0x3a974a){if(_0x3a974a instanceof Error)return new FailedAccountResponse({'detail':_0x3a974a['message'],'title':_0x3a974a['name'],'status':0x1f4,'instance':'','type':''});throw _0x3a974a;}});}['remove'](_0x14ae9d,_0x4f8239,_0x14d4dd){return __awaiter$3(this,void 0,void 0,function*(){const _0x4c4ea0='List/'+_0x14ae9d+'/'+_0x4f8239,_0x1c0a55=yield this['fetch']['delete'](_0x4c4ea0,_0x14d4dd);try{if(_0x1c0a55['status']>0xc7&&_0x1c0a55['status']<0x12c){const _0xa87d85=yield _0x1c0a55['json']();return new SuccessfulAccountResponse(_0xa87d85);}const _0x4a8a29=yield _0x1c0a55['json']();return new FailedAccountResponse(_0x4a8a29);}catch(_0x44cca9){if(_0x44cca9 instanceof Error)return new FailedAccountResponse({'detail':_0x44cca9['message'],'title':_0x44cca9['name'],'status':0x1f4,'instance':'','type':''});throw _0x44cca9;}});}}
8
8
 
9
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x2b1569,_0x40bafc,_0x1ad1b0,_0x25805e){function _0x2c7569(_0x57cfa7){return _0x57cfa7 instanceof _0x1ad1b0?_0x57cfa7:new _0x1ad1b0(function(_0x4a9b20){_0x4a9b20(_0x57cfa7);});}return new(_0x1ad1b0||(_0x1ad1b0=Promise))(function(_0x44ab3b,_0x242a94){function _0x38054b(_0x3e6286){try{_0x4dd208(_0x25805e['next'](_0x3e6286));}catch(_0x5dd922){_0x242a94(_0x5dd922);}}function _0x7717de(_0x2dd4c3){try{_0x4dd208(_0x25805e['throw'](_0x2dd4c3));}catch(_0xc3a8ef){_0x242a94(_0xc3a8ef);}}function _0x4dd208(_0x113f79){_0x113f79['done']?_0x44ab3b(_0x113f79['value']):_0x2c7569(_0x113f79['value'])['then'](_0x38054b,_0x7717de);}_0x4dd208((_0x25805e=_0x25805e['apply'](_0x2b1569,_0x40bafc||[]))['next']());});};class Fetch{constructor(_0x5bab0c){this['baseUri']=_0x5bab0c,this['getUrl']=_0x1cfbc9=>{return _0x1cfbc9['startsWith']('/')&&(_0x1cfbc9=_0x1cfbc9['replace']('/','')),''+this['baseUri']+_0x1cfbc9;},!_0x5bab0c['endsWith']('/')&&(_0x5bab0c=_0x5bab0c+'/');}['get'](_0xb207f7,_0x2b15fd){return __awaiter$2(this,void 0,void 0,function*(){const _0x3c082d=this['getUrl'](_0xb207f7);return yield fetch(_0x3c082d,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2b15fd}});});}['post'](_0x1929a3,_0x536625,_0x2424df){return __awaiter$2(this,void 0,void 0,function*(){const _0xf11d59=this['getUrl'](_0x1929a3);return yield fetch(_0xf11d59,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x536625},'body':_0x2424df?JSON['stringify'](_0x2424df):null});});}['put'](_0x254d37,_0x2b87fb,_0x340508){return __awaiter$2(this,void 0,void 0,function*(){const _0x2b8544=this['getUrl'](_0x254d37);return yield fetch(_0x2b8544,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2b87fb},'body':_0x340508?JSON['stringify'](_0x340508):null});});}['delete'](_0x4f5d5e,_0x1cae00){return __awaiter$2(this,void 0,void 0,function*(){const _0x32dccd=this['getUrl'](_0x4f5d5e);return yield fetch(_0x32dccd,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1cae00}});});}}
9
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x1a44b3,_0x26ba94,_0x10da05,_0x3c4983){function _0x26b243(_0x24fa50){return _0x24fa50 instanceof _0x10da05?_0x24fa50:new _0x10da05(function(_0x3e60c8){_0x3e60c8(_0x24fa50);});}return new(_0x10da05||(_0x10da05=Promise))(function(_0x443d57,_0x289af0){function _0x5c6c55(_0x373766){try{_0x270c94(_0x3c4983['next'](_0x373766));}catch(_0x4c90dd){_0x289af0(_0x4c90dd);}}function _0x1a6050(_0x250e1c){try{_0x270c94(_0x3c4983['throw'](_0x250e1c));}catch(_0x3c75a6){_0x289af0(_0x3c75a6);}}function _0x270c94(_0x356b07){_0x356b07['done']?_0x443d57(_0x356b07['value']):_0x26b243(_0x356b07['value'])['then'](_0x5c6c55,_0x1a6050);}_0x270c94((_0x3c4983=_0x3c4983['apply'](_0x1a44b3,_0x26ba94||[]))['next']());});};class Fetch{constructor(_0x3e2c4c){this['baseUri']=_0x3e2c4c,this['getUrl']=_0x125003=>{return _0x125003['startsWith']('/')&&(_0x125003=_0x125003['replace']('/','')),''+this['baseUri']+_0x125003;},!_0x3e2c4c['endsWith']('/')&&(_0x3e2c4c=_0x3e2c4c+'/');}['get'](_0x4730e3,_0x5adc87){return __awaiter$2(this,void 0,void 0,function*(){const _0x1829cb=this['getUrl'](_0x4730e3);return yield fetch(_0x1829cb,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x5adc87}});});}['post'](_0x42e9ef,_0x15cf68,_0xc2dd55){return __awaiter$2(this,void 0,void 0,function*(){const _0x1f43bf=this['getUrl'](_0x42e9ef);return yield fetch(_0x1f43bf,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x15cf68},'body':_0xc2dd55?JSON['stringify'](_0xc2dd55):null});});}['put'](_0x3181df,_0x3b6673,_0x1e567e){return __awaiter$2(this,void 0,void 0,function*(){const _0x4a65e2=this['getUrl'](_0x3181df);return yield fetch(_0x4a65e2,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3b6673},'body':_0x1e567e?JSON['stringify'](_0x1e567e):null});});}['delete'](_0x593999,_0x2ab093){return __awaiter$2(this,void 0,void 0,function*(){const _0x1ef2aa=this['getUrl'](_0x593999);return yield fetch(_0x1ef2aa,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2ab093}});});}}
10
10
 
11
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x3f5402,_0x44550b,_0x13e77a,_0x2743a4){function _0x2c4a65(_0x4baf0c){return _0x4baf0c instanceof _0x13e77a?_0x4baf0c:new _0x13e77a(function(_0x10574c){_0x10574c(_0x4baf0c);});}return new(_0x13e77a||(_0x13e77a=Promise))(function(_0x46630b,_0x4b5f64){function _0x36a4ab(_0x4bf764){try{_0x181a59(_0x2743a4['next'](_0x4bf764));}catch(_0x30dee7){_0x4b5f64(_0x30dee7);}}function _0x345846(_0x1f1387){try{_0x181a59(_0x2743a4['throw'](_0x1f1387));}catch(_0x375c4a){_0x4b5f64(_0x375c4a);}}function _0x181a59(_0x30d7ce){_0x30d7ce['done']?_0x46630b(_0x30d7ce['value']):_0x2c4a65(_0x30d7ce['value'])['then'](_0x36a4ab,_0x345846);}_0x181a59((_0x2743a4=_0x2743a4['apply'](_0x3f5402,_0x44550b||[]))['next']());});};class SearchServersService{constructor(_0x29190b){this['fetch']=_0x29190b,this['path']='search-services';}['create'](_0x6bcb78,_0x2c03a6,_0x3bbd98,_0x3ba38d,_0x23909b,_0x29dc16){return __awaiter$1(this,void 0,void 0,function*(){const _0x3bbc8={'account_name':_0x6bcb78,'search_service_name':_0x2c03a6,'endpoint':_0x3bbd98,'key':_0x3ba38d,'county':_0x23909b};try{const _0x4c6d07=yield this['fetch']['post'](this['path'],_0x29dc16,_0x3bbc8);if(_0x4c6d07['status']>0xc7&&_0x4c6d07['status']<0x12c){const _0x8353db=yield _0x4c6d07['json']();return new SuccessfulSearchServiceResponse(_0x8353db);}const _0xb6235=yield _0x4c6d07['json']();return new FailedSearchServiceResponse(_0xb6235);}catch(_0x1d5671){if(_0x1d5671 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x1d5671['message'],'title':_0x1d5671['name'],'status':0x1f4,'instance':'','type':''});throw _0x1d5671;}});}}
11
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x5961f0,_0x4a2c47,_0x5bd181,_0x11f09f){function _0x462e68(_0x3c008a){return _0x3c008a instanceof _0x5bd181?_0x3c008a:new _0x5bd181(function(_0x470801){_0x470801(_0x3c008a);});}return new(_0x5bd181||(_0x5bd181=Promise))(function(_0x5cb930,_0x2065db){function _0x1187b9(_0x118521){try{_0x25d9b8(_0x11f09f['next'](_0x118521));}catch(_0x23c313){_0x2065db(_0x23c313);}}function _0x447ce2(_0x2a2c76){try{_0x25d9b8(_0x11f09f['throw'](_0x2a2c76));}catch(_0x2e11de){_0x2065db(_0x2e11de);}}function _0x25d9b8(_0x2964d6){_0x2964d6['done']?_0x5cb930(_0x2964d6['value']):_0x462e68(_0x2964d6['value'])['then'](_0x1187b9,_0x447ce2);}_0x25d9b8((_0x11f09f=_0x11f09f['apply'](_0x5961f0,_0x4a2c47||[]))['next']());});};class SearchServersService{constructor(_0x588607){this['fetch']=_0x588607,this['path']='search-services';}['create'](_0x44bc53,_0x3bae20,_0x2862bd,_0x15a222,_0x505c01,_0xd030dc){return __awaiter$1(this,void 0,void 0,function*(){const _0x4d7f2c={'account_name':_0x44bc53,'search_service_name':_0x3bae20,'endpoint':_0x2862bd,'key':_0x15a222,'county':_0x505c01};try{const _0xeceee8=yield this['fetch']['post'](this['path'],_0xd030dc,_0x4d7f2c);if(_0xeceee8['status']>0xc7&&_0xeceee8['status']<0x12c){const _0x374d7b=yield _0xeceee8['json']();return new SuccessfulSearchServiceResponse(_0x374d7b);}const _0x33cc96=yield _0xeceee8['json']();return new FailedSearchServiceResponse(_0x33cc96);}catch(_0x5531c6){if(_0x5531c6 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x5531c6['message'],'title':_0x5531c6['name'],'status':0x1f4,'instance':'','type':''});throw _0x5531c6;}});}['delete'](_0x2176c3,_0x36f14e,_0x5a4144){return __awaiter$1(this,void 0,void 0,function*(){const _0x33bb44=this['path']+'/'+_0x2176c3+'/'+_0x36f14e;try{const _0x2655ac=yield this['fetch']['delete'](_0x33bb44,_0x5a4144);if(_0x2655ac['status']>0xc7&&_0x2655ac['status']<0x12c)return new SuccessfulResponse({});const _0xe549d0=yield _0x2655ac['json']();return new FailedResponse(_0xe549d0);}catch(_0x3fe7b6){if(_0x3fe7b6 instanceof Error)return new FailedResponse({'detail':_0x3fe7b6['message'],'title':_0x3fe7b6['name'],'status':0x1f4,'instance':'','type':''});throw _0x3fe7b6;}});}['view'](_0x3726e1,_0x174b35,_0x29403d){return __awaiter$1(this,void 0,void 0,function*(){const _0x199ccf=this['path']+'/'+_0x3726e1+'/'+_0x174b35;try{const _0x13239f=yield this['fetch']['get'](_0x199ccf,_0x29403d);if(_0x13239f['status']>0xc7&&_0x13239f['status']<0x12c){const _0x3b8dfa=yield _0x13239f['json']();return new SuccessfulViewSearchServiceResponse(_0x3b8dfa);}const _0x5753de=yield _0x13239f['json']();return new FailedViewSearchServiceResponse(_0x5753de);}catch(_0x5d42d7){if(_0x5d42d7 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x5d42d7['message'],'title':_0x5d42d7['name'],'status':0x1f4,'instance':'','type':''});throw _0x5d42d7;}});}}
12
12
 
13
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x1bf1f2,_0x496929,_0x1de0b2,_0x1b83c0){function _0x1c33fe(_0x22dbdc){return _0x22dbdc instanceof _0x1de0b2?_0x22dbdc:new _0x1de0b2(function(_0x358ffb){_0x358ffb(_0x22dbdc);});}return new(_0x1de0b2||(_0x1de0b2=Promise))(function(_0x2315de,_0x12c95d){function _0x59e0ca(_0x1e667b){try{_0xe56e0f(_0x1b83c0['next'](_0x1e667b));}catch(_0x354ff1){_0x12c95d(_0x354ff1);}}function _0x361da6(_0x315cd6){try{_0xe56e0f(_0x1b83c0['throw'](_0x315cd6));}catch(_0x2f8818){_0x12c95d(_0x2f8818);}}function _0xe56e0f(_0x3d4206){_0x3d4206['done']?_0x2315de(_0x3d4206['value']):_0x1c33fe(_0x3d4206['value'])['then'](_0x59e0ca,_0x361da6);}_0xe56e0f((_0x1b83c0=_0x1b83c0['apply'](_0x1bf1f2,_0x496929||[]))['next']());});};class AdminClient{constructor(_0x152b38='https://admin.searchability.dev/'){var _0x14574c=new Fetch(_0x152b38);this['Accounts']=new AccountService(_0x14574c),this['Lists']=new ListService(_0x14574c),this['ApiKeys']=new ApiKeyService(_0x14574c),this['SearchServices']=new SearchServersService(_0x14574c);}}class AuthClient{constructor(_0x5bdd5e='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x5bdd5e);}['login'](_0x19c76a){return __awaiter(this,void 0,void 0,function*(){var _0x565b3d='login/'+_0x19c76a;try{const _0x49dbbb=yield yield fetch(_0x565b3d);if(_0x49dbbb['status']>0xc7&&_0x49dbbb['status']<0x12c){const _0x575ea4=yield _0x49dbbb['json']();return new SuccessfulAuthResponse(_0x575ea4);}const _0x4724df=yield _0x49dbbb['json']();return new FailedAuthResponse(_0x4724df);}catch(_0x3a1a7e){if(_0x3a1a7e instanceof Error)return new FailedAuthResponse({'detail':_0x3a1a7e['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x3a1a7e;}});}['refresh'](_0x3d9807){return __awaiter(this,void 0,void 0,function*(){var _0x122d5c='refresh';try{const _0x2e4072=yield this['fetch']['post'](_0x122d5c,_0x3d9807,null);if(_0x2e4072['status']>0xc7&&_0x2e4072['status']<0x12c){const _0x449ec6=yield _0x2e4072['json']();return new SuccessfulAuthResponse(_0x449ec6);}const _0x6c275=yield _0x2e4072['json']();return new FailedAuthResponse(_0x6c275);}catch(_0x57105c){if(_0x57105c instanceof Error)return new FailedAuthResponse({'detail':_0x57105c['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x57105c;}});}['getTokenStatus'](_0x5e4b75){if(Date['now']()<_0x5e4b75['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x5e4b75['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
13
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x1894d2,_0x1192dd,_0x365545,_0x15cff0){function _0x3470cd(_0x93efb2){return _0x93efb2 instanceof _0x365545?_0x93efb2:new _0x365545(function(_0x1889b6){_0x1889b6(_0x93efb2);});}return new(_0x365545||(_0x365545=Promise))(function(_0x12c60a,_0x39ca4f){function _0x1247d9(_0x8cefd3){try{_0xb7afef(_0x15cff0['next'](_0x8cefd3));}catch(_0x459444){_0x39ca4f(_0x459444);}}function _0x5730a1(_0x5efa61){try{_0xb7afef(_0x15cff0['throw'](_0x5efa61));}catch(_0x49156b){_0x39ca4f(_0x49156b);}}function _0xb7afef(_0x21e06a){_0x21e06a['done']?_0x12c60a(_0x21e06a['value']):_0x3470cd(_0x21e06a['value'])['then'](_0x1247d9,_0x5730a1);}_0xb7afef((_0x15cff0=_0x15cff0['apply'](_0x1894d2,_0x1192dd||[]))['next']());});};class AdminClient{constructor(_0x20fe0b='https://admin.searchability.dev/'){var _0x7af4e8=new Fetch(_0x20fe0b);this['Accounts']=new AccountService(_0x7af4e8),this['Lists']=new ListService(_0x7af4e8),this['ApiKeys']=new ApiKeyService(_0x7af4e8),this['SearchServices']=new SearchServersService(_0x7af4e8);}}class AuthClient{constructor(_0x4c14c9='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x4c14c9);}['login'](_0x5e78fb){return __awaiter(this,void 0,void 0,function*(){var _0x55f283='login/'+_0x5e78fb;try{const _0x149793=yield yield fetch(_0x55f283);if(_0x149793['status']>0xc7&&_0x149793['status']<0x12c){const _0x320907=yield _0x149793['json']();return new SuccessfulAuthResponse(_0x320907);}const _0x1595ea=yield _0x149793['json']();return new FailedAuthResponse(_0x1595ea);}catch(_0x2f5ed4){if(_0x2f5ed4 instanceof Error)return new FailedAuthResponse({'detail':_0x2f5ed4['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x2f5ed4;}});}['refresh'](_0x360013){return __awaiter(this,void 0,void 0,function*(){var _0x1f8947='refresh';try{const _0x40e559=yield this['fetch']['post'](_0x1f8947,_0x360013,null);if(_0x40e559['status']>0xc7&&_0x40e559['status']<0x12c){const _0xebe462=yield _0x40e559['json']();return new SuccessfulAuthResponse(_0xebe462);}const _0x34f9bd=yield _0x40e559['json']();return new FailedAuthResponse(_0x34f9bd);}catch(_0x468517){if(_0x468517 instanceof Error)return new FailedAuthResponse({'detail':_0x468517['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x468517;}});}['getTokenStatus'](_0x191948){if(Date['now']()<_0x191948['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x191948['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
14
14
 
15
15
  export { AdminClient, AuthClient, TokenStatus, Tokens };
package/dist/types.d.ts CHANGED
@@ -9,14 +9,14 @@ declare class Fetch {
9
9
  }
10
10
 
11
11
  declare class AccountService {
12
- readonly fetch: Fetch;
12
+ private readonly fetch;
13
13
  constructor(fetch: Fetch);
14
14
  get(accountName: string, access_token: string): Promise<Response<Account, Problem>>;
15
15
  }
16
16
 
17
17
  declare class ApiKeyService {
18
- readonly fetch: Fetch;
19
- readonly path = "api-key";
18
+ private readonly fetch;
19
+ private readonly path;
20
20
  constructor(fetch: Fetch);
21
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>>;
@@ -24,17 +24,19 @@ declare class ApiKeyService {
24
24
  }
25
25
 
26
26
  declare class ListService {
27
- readonly fetch: Fetch;
27
+ private readonly fetch;
28
28
  constructor(fetch: Fetch);
29
29
  add(accountName: string, listName: string, access_token: string): Promise<Response<Account, Problem>>;
30
30
  remove(accountName: string, listName: string, access_token: string): Promise<Response<Account, Problem>>;
31
31
  }
32
32
 
33
33
  declare class SearchServersService {
34
- readonly fetch: Fetch;
35
- readonly path = "search-services";
34
+ private readonly fetch;
35
+ private readonly path;
36
36
  constructor(fetch: Fetch);
37
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>>;
38
40
  }
39
41
 
40
42
  declare class AdminClient {
@@ -88,6 +90,11 @@ type SearchService = {
88
90
  search_service_name: string;
89
91
  created: number;
90
92
  country: string;
93
+ provider: string;
94
+ };
95
+ type SearchServiceDetails = {
96
+ endpoint: string;
97
+ key: number;
91
98
  };
92
99
  type ApiKeyValue = {
93
100
  value: string;
@@ -110,6 +117,7 @@ type Account = {
110
117
  image_path: string;
111
118
  lists: ListIdentity[];
112
119
  api_keys: ApiKey[];
120
+ search_services: SearchService[];
113
121
  };
114
122
  declare class SuccessfulAccountResponse extends Response<Account, Problem> {
115
123
  readonly account: Account;
@@ -159,6 +167,18 @@ declare class FailedSearchServiceResponse extends Response<SearchService, Proble
159
167
  toSuccess(): SearchService;
160
168
  toProblem(): Problem;
161
169
  }
170
+ declare class SuccessfulViewSearchServiceResponse extends Response<SearchServiceDetails, Problem> {
171
+ readonly searchService: SearchServiceDetails;
172
+ constructor(searchService: SearchServiceDetails);
173
+ toSuccess(): SearchServiceDetails;
174
+ toProblem(): Problem;
175
+ }
176
+ declare class FailedViewSearchServiceResponse extends Response<SearchServiceDetails, Problem> {
177
+ readonly problem: Problem;
178
+ constructor(problem: Problem);
179
+ toSuccess(): SearchServiceDetails;
180
+ toProblem(): Problem;
181
+ }
162
182
  declare class SuccessfulApiKeyValueResponse extends Response<ApiKeyValue, Problem> {
163
183
  readonly apiKeyValue: ApiKeyValue;
164
184
  constructor(apiKeyValue: ApiKeyValue);
@@ -184,4 +204,4 @@ declare class FailedApiKeyValueResponse extends Response<ApiKeyValue, Problem> {
184
204
  toProblem(): Problem;
185
205
  }
186
206
 
187
- export { type Account, AdminClient, type ApiKey, type ApiKeyValue, AuthClient, type Error, FailedAccountResponse, FailedApiKeyResponse, FailedApiKeyValueResponse, FailedAuthResponse, FailedResponse, FailedSearchServiceResponse, type List, type ListIdentity, type Problem, Response, type SearchService, SuccessfulAccountResponse, SuccessfulApiKeyResponse, SuccessfulApiKeyValueResponse, SuccessfulAuthResponse, SuccessfulResponse, SuccessfulSearchServiceResponse, TokenStatus, Tokens };
207
+ 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.35",
3
+ "version": "0.0.37",
4
4
  "description": "Searchability admin client.",
5
5
  "type": "module",
6
6
  "types": "./dist/types.d.ts",
@@ -1,15 +0,0 @@
1
- var TokenStatus;(function(_0x5dd0f4){_0x5dd0f4[_0x5dd0f4['Ok']=0x0]='Ok',_0x5dd0f4[_0x5dd0f4['Refresh']=0x1]='Refresh',_0x5dd0f4[_0x5dd0f4['Expired']=0x2]='Expired';}(TokenStatus||(TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}}class Response{constructor(_0x54204d){this['isSuccess']=_0x54204d;}}class SuccessfulAccountResponse extends Response{constructor(_0x39b63b){super(!![]),this['account']=_0x39b63b;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x3f3726){super(![]),this['problem']=_0x3f3726;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x393a1a){super(!![]),this['tokens']=_0x393a1a;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x5cfb44){super(![]),this['problem']=_0x5cfb44;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x19f2f8){super(!![]),this['apiKey']=_0x19f2f8;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x8c10dc){super(![]),this['problem']=_0x8c10dc;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0xaeef37){super(!![]),this['searchService']=_0xaeef37;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x649f59){super(![]),this['problem']=_0x649f59;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x44054a){super(!![]),this['apiKeyValue']=_0x44054a;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x386ef8){super(!![]),this['obj']=_0x386ef8;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x8479b7){super(![]),this['problem']=_0x8479b7;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x400175){super(![]),this['problem']=_0x400175;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
2
-
3
- var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x246a2b,_0x5e33ed,_0x346e0b,_0xd7516c){function _0x1a3217(_0x2415e7){return _0x2415e7 instanceof _0x346e0b?_0x2415e7:new _0x346e0b(function(_0x53bfed){_0x53bfed(_0x2415e7);});}return new(_0x346e0b||(_0x346e0b=Promise))(function(_0x17fcb1,_0x5ed5e0){function _0x5c63c5(_0x21f5f0){try{_0x34266e(_0xd7516c['next'](_0x21f5f0));}catch(_0xd1c3db){_0x5ed5e0(_0xd1c3db);}}function _0x290262(_0x191692){try{_0x34266e(_0xd7516c['throw'](_0x191692));}catch(_0x5e372e){_0x5ed5e0(_0x5e372e);}}function _0x34266e(_0x4a6ede){_0x4a6ede['done']?_0x17fcb1(_0x4a6ede['value']):_0x1a3217(_0x4a6ede['value'])['then'](_0x5c63c5,_0x290262);}_0x34266e((_0xd7516c=_0xd7516c['apply'](_0x246a2b,_0x5e33ed||[]))['next']());});};class AccountService{constructor(_0x278c47){this['fetch']=_0x278c47;}['get'](_0x52a98f,_0x54ed8a){return __awaiter$5(this,void 0,void 0,function*(){const _0xa3a5ca='Account/'+_0x52a98f+'/',_0x4995a4=yield this['fetch']['get'](_0xa3a5ca,_0x54ed8a);try{if(_0x4995a4['status']>0xc7&&_0x4995a4['status']<0x12c){const _0x519d6f=yield _0x4995a4['json']();return new SuccessfulAccountResponse(_0x519d6f);}const _0xeb224f=yield _0x4995a4['json']();return new FailedAccountResponse(_0xeb224f);}catch(_0x12bcff){if(_0x12bcff instanceof Error)return new FailedAccountResponse({'detail':_0x12bcff['message'],'title':_0x12bcff['name'],'status':0x1f4,'instance':'','type':''});throw _0x12bcff;}});}}
4
-
5
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x5687e6,_0x4852b5,_0x39f416,_0x19230e){function _0x3b4f04(_0x4cab18){return _0x4cab18 instanceof _0x39f416?_0x4cab18:new _0x39f416(function(_0x3c6c91){_0x3c6c91(_0x4cab18);});}return new(_0x39f416||(_0x39f416=Promise))(function(_0x9d7cdf,_0x25f3be){function _0x5c23b6(_0x34e246){try{_0x4d83c6(_0x19230e['next'](_0x34e246));}catch(_0x27df85){_0x25f3be(_0x27df85);}}function _0x499a08(_0xaaebd7){try{_0x4d83c6(_0x19230e['throw'](_0xaaebd7));}catch(_0xafa395){_0x25f3be(_0xafa395);}}function _0x4d83c6(_0x250b6c){_0x250b6c['done']?_0x9d7cdf(_0x250b6c['value']):_0x3b4f04(_0x250b6c['value'])['then'](_0x5c23b6,_0x499a08);}_0x4d83c6((_0x19230e=_0x19230e['apply'](_0x5687e6,_0x4852b5||[]))['next']());});};class ApiKeyService{constructor(_0x1b0c41){this['fetch']=_0x1b0c41,this['path']='api-key';}['create'](_0x3c62dd,_0x58591a,_0x24fdf8){return __awaiter$4(this,void 0,void 0,function*(){const _0x3a61c2={'account_name':_0x3c62dd,'api_key_name':_0x58591a};try{const _0xd6cf5=yield this['fetch']['post'](this['path'],_0x24fdf8,_0x3a61c2);if(_0xd6cf5['status']>0xc7&&_0xd6cf5['status']<0x12c){const _0x3d4507=yield _0xd6cf5['json']();return new SuccessfulApiKeyResponse(_0x3d4507);}const _0x534188=yield _0xd6cf5['json']();return new FailedApiKeyResponse(_0x534188);}catch(_0x3a35c3){if(_0x3a35c3 instanceof Error)return new FailedApiKeyResponse({'detail':_0x3a35c3['message'],'title':_0x3a35c3['name'],'status':0x1f4,'instance':'','type':''});throw _0x3a35c3;}});}['view'](_0x2c7c36,_0x5bf043,_0x22f0b9){return __awaiter$4(this,void 0,void 0,function*(){const _0x3ea522=this['path']+'/'+_0x2c7c36+'/'+_0x5bf043;try{const _0x12dac2=yield this['fetch']['get'](_0x3ea522,_0x22f0b9);if(_0x12dac2['status']>0xc7&&_0x12dac2['status']<0x12c){const _0x5345e8=yield _0x12dac2['json']();return new SuccessfulApiKeyValueResponse(_0x5345e8);}const _0x28b6c3=yield _0x12dac2['json']();return new FailedApiKeyValueResponse(_0x28b6c3);}catch(_0x5c4a29){if(_0x5c4a29 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x5c4a29['message'],'title':_0x5c4a29['name'],'status':0x1f4,'instance':'','type':''});throw _0x5c4a29;}});}['delete'](_0x55d3ef,_0x208bad,_0x5a5438){return __awaiter$4(this,void 0,void 0,function*(){const _0x4cd53d=this['path']+'/'+_0x55d3ef+'/'+_0x208bad;try{const _0x524daa=yield this['fetch']['delete'](_0x4cd53d,_0x5a5438);if(_0x524daa['status']>0xc7&&_0x524daa['status']<0x12c)return new SuccessfulResponse({});const _0x175a77=yield _0x524daa['json']();return new FailedResponse(_0x175a77);}catch(_0x484bbc){if(_0x484bbc instanceof Error)return new FailedResponse({'detail':_0x484bbc['message'],'title':_0x484bbc['name'],'status':0x1f4,'instance':'','type':''});throw _0x484bbc;}});}}
6
-
7
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x2f5906,_0x35d35a,_0x1cbd58,_0xea0d2f){function _0x55abb6(_0xa9b0da){return _0xa9b0da instanceof _0x1cbd58?_0xa9b0da:new _0x1cbd58(function(_0x31202a){_0x31202a(_0xa9b0da);});}return new(_0x1cbd58||(_0x1cbd58=Promise))(function(_0x2fac67,_0x2ef2c0){function _0x381a60(_0x1772d1){try{_0x4ea363(_0xea0d2f['next'](_0x1772d1));}catch(_0x5c16d9){_0x2ef2c0(_0x5c16d9);}}function _0x5a601a(_0x1ad4e2){try{_0x4ea363(_0xea0d2f['throw'](_0x1ad4e2));}catch(_0x34512e){_0x2ef2c0(_0x34512e);}}function _0x4ea363(_0x57154d){_0x57154d['done']?_0x2fac67(_0x57154d['value']):_0x55abb6(_0x57154d['value'])['then'](_0x381a60,_0x5a601a);}_0x4ea363((_0xea0d2f=_0xea0d2f['apply'](_0x2f5906,_0x35d35a||[]))['next']());});};class ListService{constructor(_0x422b34){this['fetch']=_0x422b34;}['add'](_0x125ac0,_0x3a5638,_0x12ce71){return __awaiter$3(this,void 0,void 0,function*(){const _0x495b52='List',_0x419652={'account_name':_0x125ac0,'list_name':_0x3a5638};try{const _0x32722f=yield this['fetch']['post'](_0x495b52,_0x12ce71,_0x419652);if(_0x32722f['status']>0xc7&&_0x32722f['status']<0x12c){const _0x1e63ea=yield _0x32722f['json']();return new SuccessfulAccountResponse(_0x1e63ea);}const _0x7fa05=yield _0x32722f['json']();return new FailedAccountResponse(_0x7fa05);}catch(_0x581914){if(_0x581914 instanceof Error)return new FailedAccountResponse({'detail':_0x581914['message'],'title':_0x581914['name'],'status':0x1f4,'instance':'','type':''});throw _0x581914;}});}['remove'](_0x328fdb,_0x2c0173,_0x291995){return __awaiter$3(this,void 0,void 0,function*(){const _0x480433='List/'+_0x328fdb+'/'+_0x2c0173,_0x3ac051=yield this['fetch']['delete'](_0x480433,_0x291995);try{if(_0x3ac051['status']>0xc7&&_0x3ac051['status']<0x12c){const _0x7e9713=yield _0x3ac051['json']();return new SuccessfulAccountResponse(_0x7e9713);}const _0x34280f=yield _0x3ac051['json']();return new FailedAccountResponse(_0x34280f);}catch(_0xd28de3){if(_0xd28de3 instanceof Error)return new FailedAccountResponse({'detail':_0xd28de3['message'],'title':_0xd28de3['name'],'status':0x1f4,'instance':'','type':''});throw _0xd28de3;}});}}
8
-
9
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x2254b7,_0x1f4f82,_0x538b9c,_0xaa40e7){function _0x5b186e(_0x1bed6d){return _0x1bed6d instanceof _0x538b9c?_0x1bed6d:new _0x538b9c(function(_0x12baf5){_0x12baf5(_0x1bed6d);});}return new(_0x538b9c||(_0x538b9c=Promise))(function(_0x25e623,_0x33c3be){function _0x8bef3e(_0x3fb0c9){try{_0x116aff(_0xaa40e7['next'](_0x3fb0c9));}catch(_0x3faa52){_0x33c3be(_0x3faa52);}}function _0x350f04(_0x1ac0e0){try{_0x116aff(_0xaa40e7['throw'](_0x1ac0e0));}catch(_0x380eb2){_0x33c3be(_0x380eb2);}}function _0x116aff(_0x5cedc1){_0x5cedc1['done']?_0x25e623(_0x5cedc1['value']):_0x5b186e(_0x5cedc1['value'])['then'](_0x8bef3e,_0x350f04);}_0x116aff((_0xaa40e7=_0xaa40e7['apply'](_0x2254b7,_0x1f4f82||[]))['next']());});};class Fetch{constructor(_0x16988c){this['baseUri']=_0x16988c,this['getUrl']=_0x3360f3=>{return _0x3360f3['startsWith']('/')&&(_0x3360f3=_0x3360f3['replace']('/','')),''+this['baseUri']+_0x3360f3;},!_0x16988c['endsWith']('/')&&(_0x16988c=_0x16988c+'/');}['get'](_0x2279bf,_0x4c303e){return __awaiter$2(this,void 0,void 0,function*(){const _0x24bb3d=this['getUrl'](_0x2279bf);return yield fetch(_0x24bb3d,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4c303e}});});}['post'](_0x21cce3,_0x30096f,_0xedb0a9){return __awaiter$2(this,void 0,void 0,function*(){const _0x8cfa35=this['getUrl'](_0x21cce3);return yield fetch(_0x8cfa35,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x30096f},'body':_0xedb0a9?JSON['stringify'](_0xedb0a9):null});});}['put'](_0x166919,_0x2db9f5,_0x5b8532){return __awaiter$2(this,void 0,void 0,function*(){const _0x13cffa=this['getUrl'](_0x166919);return yield fetch(_0x13cffa,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2db9f5},'body':_0x5b8532?JSON['stringify'](_0x5b8532):null});});}['delete'](_0x5ae1e6,_0x1e4936){return __awaiter$2(this,void 0,void 0,function*(){const _0x3f700b=this['getUrl'](_0x5ae1e6);return yield fetch(_0x3f700b,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1e4936}});});}}
10
-
11
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x4e813d,_0x4e4bba,_0xf4e987,_0x24baf6){function _0x5239b7(_0x1cfc7d){return _0x1cfc7d instanceof _0xf4e987?_0x1cfc7d:new _0xf4e987(function(_0x60bb5f){_0x60bb5f(_0x1cfc7d);});}return new(_0xf4e987||(_0xf4e987=Promise))(function(_0x2f544b,_0x1a411e){function _0x197a91(_0x3261aa){try{_0x4dcc93(_0x24baf6['next'](_0x3261aa));}catch(_0x4e6ea0){_0x1a411e(_0x4e6ea0);}}function _0x1795e1(_0x20636d){try{_0x4dcc93(_0x24baf6['throw'](_0x20636d));}catch(_0x12e79c){_0x1a411e(_0x12e79c);}}function _0x4dcc93(_0x114713){_0x114713['done']?_0x2f544b(_0x114713['value']):_0x5239b7(_0x114713['value'])['then'](_0x197a91,_0x1795e1);}_0x4dcc93((_0x24baf6=_0x24baf6['apply'](_0x4e813d,_0x4e4bba||[]))['next']());});};class SearchServersService{constructor(_0x43a0b8){this['fetch']=_0x43a0b8,this['path']='search-services';}['create'](_0x37e4dd,_0x148897,_0x55a73c,_0x3f330a,_0x38b66,_0xda499d){return __awaiter$1(this,void 0,void 0,function*(){const _0x3f4952={'account_name':_0x37e4dd,'search_service_name':_0x148897,'endpoint':_0x55a73c,'key':_0x3f330a,'county':_0x38b66};try{const _0x5ae6c0=yield this['fetch']['post'](this['path'],_0xda499d,_0x3f4952);if(_0x5ae6c0['status']>0xc7&&_0x5ae6c0['status']<0x12c){const _0x393dc5=yield _0x5ae6c0['json']();return new SuccessfulSearchServiceResponse(_0x393dc5);}const _0x3002e6=yield _0x5ae6c0['json']();return new FailedSearchServiceResponse(_0x3002e6);}catch(_0x5eefb3){if(_0x5eefb3 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x5eefb3['message'],'title':_0x5eefb3['name'],'status':0x1f4,'instance':'','type':''});throw _0x5eefb3;}});}}
12
-
13
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x491d89,_0x53ebc9,_0x5b0b59,_0x58b740){function _0x326b09(_0x2bbb50){return _0x2bbb50 instanceof _0x5b0b59?_0x2bbb50:new _0x5b0b59(function(_0x54e0db){_0x54e0db(_0x2bbb50);});}return new(_0x5b0b59||(_0x5b0b59=Promise))(function(_0xb225f,_0x2a2bf4){function _0x4cf5a7(_0x1af182){try{_0x231ca9(_0x58b740['next'](_0x1af182));}catch(_0x17650b){_0x2a2bf4(_0x17650b);}}function _0x5792f8(_0x257d9c){try{_0x231ca9(_0x58b740['throw'](_0x257d9c));}catch(_0xde0916){_0x2a2bf4(_0xde0916);}}function _0x231ca9(_0x4ad2b4){_0x4ad2b4['done']?_0xb225f(_0x4ad2b4['value']):_0x326b09(_0x4ad2b4['value'])['then'](_0x4cf5a7,_0x5792f8);}_0x231ca9((_0x58b740=_0x58b740['apply'](_0x491d89,_0x53ebc9||[]))['next']());});};class AdminClient{constructor(_0x100f97='https://admin.searchability.dev/'){var _0x360ba6=new Fetch(_0x100f97);this['Accounts']=new AccountService(_0x360ba6),this['Lists']=new ListService(_0x360ba6),this['ApiKeys']=new ApiKeyService(_0x360ba6),this['SearchServices']=new SearchServersService(_0x360ba6);}}class AuthClient{constructor(_0x36ade5='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x36ade5);}['login'](_0x273730){return __awaiter(this,void 0,void 0,function*(){var _0x82094f='login/'+_0x273730;try{const _0x26abac=yield yield fetch(_0x82094f);if(_0x26abac['status']>0xc7&&_0x26abac['status']<0x12c){const _0x49be4c=yield _0x26abac['json']();return new SuccessfulAuthResponse(_0x49be4c);}const _0x5a4991=yield _0x26abac['json']();return new FailedAuthResponse(_0x5a4991);}catch(_0xa2113a){if(_0xa2113a instanceof Error)return new FailedAuthResponse({'detail':_0xa2113a['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0xa2113a;}});}['refresh'](_0x31b7a8){return __awaiter(this,void 0,void 0,function*(){var _0x425935='refresh';try{const _0x3f1ebb=yield this['fetch']['post'](_0x425935,_0x31b7a8,null);if(_0x3f1ebb['status']>0xc7&&_0x3f1ebb['status']<0x12c){const _0x5d1522=yield _0x3f1ebb['json']();return new SuccessfulAuthResponse(_0x5d1522);}const _0x3cd4be=yield _0x3f1ebb['json']();return new FailedAuthResponse(_0x3cd4be);}catch(_0x319d23){if(_0x319d23 instanceof Error)return new FailedAuthResponse({'detail':_0x319d23['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x319d23;}});}['getTokenStatus'](_0x2be925){if(Date['now']()<_0x2be925['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x2be925['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
14
-
15
- export { AdminClient, AuthClient, TokenStatus, Tokens };