@searchability/admin-client 0.0.36 → 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(_0x83be56){_0x83be56[_0x83be56['Ok']=0x0]='Ok',_0x83be56[_0x83be56['Refresh']=0x1]='Refresh',_0x83be56[_0x83be56['Expired']=0x2]='Expired';}(exports.TokenStatus||(exports.TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}}class Response{constructor(_0x1be141){this['isSuccess']=_0x1be141;}}class SuccessfulAccountResponse extends Response{constructor(_0x18c8ee){super(!![]),this['account']=_0x18c8ee;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x4241de){super(![]),this['problem']=_0x4241de;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x1a03c0){super(!![]),this['tokens']=_0x1a03c0;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x339f87){super(![]),this['problem']=_0x339f87;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x4f2f75){super(!![]),this['apiKey']=_0x4f2f75;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x3846b9){super(![]),this['problem']=_0x3846b9;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x4881ab){super(!![]),this['searchService']=_0x4881ab;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x1b4ef8){super(![]),this['problem']=_0x1b4ef8;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x4d8b41){super(!![]),this['searchService']=_0x4d8b41;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServiceResponse extends Response{constructor(_0x234986){super(![]),this['problem']=_0x234986;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x4eeff0){super(!![]),this['apiKeyValue']=_0x4eeff0;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x16d389){super(!![]),this['obj']=_0x16d389;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x49303d){super(![]),this['problem']=_0x49303d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x259fd0){super(![]),this['problem']=_0x259fd0;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
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(_0xe31740,_0x23d3fc,_0x22a63a,_0x13120d){function _0x2dbb6f(_0x44c510){return _0x44c510 instanceof _0x22a63a?_0x44c510:new _0x22a63a(function(_0x3c4db4){_0x3c4db4(_0x44c510);});}return new(_0x22a63a||(_0x22a63a=Promise))(function(_0x2f7c70,_0x243ca8){function _0x2bc3ac(_0x327b2f){try{_0x55a472(_0x13120d['next'](_0x327b2f));}catch(_0xd09a7f){_0x243ca8(_0xd09a7f);}}function _0x1cd77a(_0xfb2e33){try{_0x55a472(_0x13120d['throw'](_0xfb2e33));}catch(_0x375e0f){_0x243ca8(_0x375e0f);}}function _0x55a472(_0x22c6d0){_0x22c6d0['done']?_0x2f7c70(_0x22c6d0['value']):_0x2dbb6f(_0x22c6d0['value'])['then'](_0x2bc3ac,_0x1cd77a);}_0x55a472((_0x13120d=_0x13120d['apply'](_0xe31740,_0x23d3fc||[]))['next']());});};class AccountService{constructor(_0x447f0c){this['fetch']=_0x447f0c;}['get'](_0x2ec113,_0x302c21){return __awaiter$5(this,void 0,void 0,function*(){const _0x33c0b7='Account/'+_0x2ec113+'/',_0x3d4d5d=yield this['fetch']['get'](_0x33c0b7,_0x302c21);try{if(_0x3d4d5d['status']>0xc7&&_0x3d4d5d['status']<0x12c){const _0x15cef7=yield _0x3d4d5d['json']();return new SuccessfulAccountResponse(_0x15cef7);}const _0x1503c6=yield _0x3d4d5d['json']();return new FailedAccountResponse(_0x1503c6);}catch(_0x1e534e){if(_0x1e534e instanceof Error)return new FailedAccountResponse({'detail':_0x1e534e['message'],'title':_0x1e534e['name'],'status':0x1f4,'instance':'','type':''});throw _0x1e534e;}});}}
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(_0x2aaf98,_0x4407b5,_0x20edda,_0xb26d96){function _0x2595ab(_0x3b217e){return _0x3b217e instanceof _0x20edda?_0x3b217e:new _0x20edda(function(_0x26ba04){_0x26ba04(_0x3b217e);});}return new(_0x20edda||(_0x20edda=Promise))(function(_0x362790,_0x9d255f){function _0x402f83(_0x326587){try{_0x32bd3e(_0xb26d96['next'](_0x326587));}catch(_0x11f1b3){_0x9d255f(_0x11f1b3);}}function _0x2091e9(_0x2ba9ea){try{_0x32bd3e(_0xb26d96['throw'](_0x2ba9ea));}catch(_0x4fe8ac){_0x9d255f(_0x4fe8ac);}}function _0x32bd3e(_0x27d113){_0x27d113['done']?_0x362790(_0x27d113['value']):_0x2595ab(_0x27d113['value'])['then'](_0x402f83,_0x2091e9);}_0x32bd3e((_0xb26d96=_0xb26d96['apply'](_0x2aaf98,_0x4407b5||[]))['next']());});};class ApiKeyService{constructor(_0x32bda1){this['fetch']=_0x32bda1,this['path']='api-key';}['create'](_0x2f9b7d,_0x2ff0a8,_0x50269d){return __awaiter$4(this,void 0,void 0,function*(){const _0x5262cc={'account_name':_0x2f9b7d,'api_key_name':_0x2ff0a8};try{const _0x4770b6=yield this['fetch']['post'](this['path'],_0x50269d,_0x5262cc);if(_0x4770b6['status']>0xc7&&_0x4770b6['status']<0x12c){const _0x32d7e5=yield _0x4770b6['json']();return new SuccessfulApiKeyResponse(_0x32d7e5);}const _0x1495a6=yield _0x4770b6['json']();return new FailedApiKeyResponse(_0x1495a6);}catch(_0x83c14b){if(_0x83c14b instanceof Error)return new FailedApiKeyResponse({'detail':_0x83c14b['message'],'title':_0x83c14b['name'],'status':0x1f4,'instance':'','type':''});throw _0x83c14b;}});}['view'](_0x1c4063,_0x3e8a8e,_0x55b5f4){return __awaiter$4(this,void 0,void 0,function*(){const _0x4936fa=this['path']+'/'+_0x1c4063+'/'+_0x3e8a8e;try{const _0x191dfd=yield this['fetch']['get'](_0x4936fa,_0x55b5f4);if(_0x191dfd['status']>0xc7&&_0x191dfd['status']<0x12c){const _0x28da2f=yield _0x191dfd['json']();return new SuccessfulApiKeyValueResponse(_0x28da2f);}const _0x55c86c=yield _0x191dfd['json']();return new FailedApiKeyValueResponse(_0x55c86c);}catch(_0x1c9ccd){if(_0x1c9ccd instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x1c9ccd['message'],'title':_0x1c9ccd['name'],'status':0x1f4,'instance':'','type':''});throw _0x1c9ccd;}});}['delete'](_0x1d8642,_0x1bfaec,_0x3eb3df){return __awaiter$4(this,void 0,void 0,function*(){const _0x31361b=this['path']+'/'+_0x1d8642+'/'+_0x1bfaec;try{const _0x459aea=yield this['fetch']['delete'](_0x31361b,_0x3eb3df);if(_0x459aea['status']>0xc7&&_0x459aea['status']<0x12c)return new SuccessfulResponse({});const _0x479e3c=yield _0x459aea['json']();return new FailedResponse(_0x479e3c);}catch(_0x5b2969){if(_0x5b2969 instanceof Error)return new FailedResponse({'detail':_0x5b2969['message'],'title':_0x5b2969['name'],'status':0x1f4,'instance':'','type':''});throw _0x5b2969;}});}}
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(_0x1807ed,_0x52a975,_0x4677aa,_0xeea0fe){function _0x5d4b1f(_0x4c304f){return _0x4c304f instanceof _0x4677aa?_0x4c304f:new _0x4677aa(function(_0x29175b){_0x29175b(_0x4c304f);});}return new(_0x4677aa||(_0x4677aa=Promise))(function(_0x436f05,_0x2caf8d){function _0xf77ea(_0x23a383){try{_0x12c7b2(_0xeea0fe['next'](_0x23a383));}catch(_0x16d1f4){_0x2caf8d(_0x16d1f4);}}function _0x2a3e7f(_0x253059){try{_0x12c7b2(_0xeea0fe['throw'](_0x253059));}catch(_0x4bae2a){_0x2caf8d(_0x4bae2a);}}function _0x12c7b2(_0x19167e){_0x19167e['done']?_0x436f05(_0x19167e['value']):_0x5d4b1f(_0x19167e['value'])['then'](_0xf77ea,_0x2a3e7f);}_0x12c7b2((_0xeea0fe=_0xeea0fe['apply'](_0x1807ed,_0x52a975||[]))['next']());});};class ListService{constructor(_0x49fd21){this['fetch']=_0x49fd21;}['add'](_0x597e8b,_0x28517e,_0x6417b3){return __awaiter$3(this,void 0,void 0,function*(){const _0x4d097c='List',_0x141f4d={'account_name':_0x597e8b,'list_name':_0x28517e};try{const _0x263783=yield this['fetch']['post'](_0x4d097c,_0x6417b3,_0x141f4d);if(_0x263783['status']>0xc7&&_0x263783['status']<0x12c){const _0x73ef23=yield _0x263783['json']();return new SuccessfulAccountResponse(_0x73ef23);}const _0x5b9d83=yield _0x263783['json']();return new FailedAccountResponse(_0x5b9d83);}catch(_0x3dea54){if(_0x3dea54 instanceof Error)return new FailedAccountResponse({'detail':_0x3dea54['message'],'title':_0x3dea54['name'],'status':0x1f4,'instance':'','type':''});throw _0x3dea54;}});}['remove'](_0x57913b,_0x492601,_0x8c80a6){return __awaiter$3(this,void 0,void 0,function*(){const _0x4d69e6='List/'+_0x57913b+'/'+_0x492601,_0x2172a7=yield this['fetch']['delete'](_0x4d69e6,_0x8c80a6);try{if(_0x2172a7['status']>0xc7&&_0x2172a7['status']<0x12c){const _0x3b493d=yield _0x2172a7['json']();return new SuccessfulAccountResponse(_0x3b493d);}const _0x5f568f=yield _0x2172a7['json']();return new FailedAccountResponse(_0x5f568f);}catch(_0x76a4a0){if(_0x76a4a0 instanceof Error)return new FailedAccountResponse({'detail':_0x76a4a0['message'],'title':_0x76a4a0['name'],'status':0x1f4,'instance':'','type':''});throw _0x76a4a0;}});}}
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(_0x3374b8,_0x55ed6a,_0x53ccdc,_0x1b0b66){function _0x18b292(_0x594fa9){return _0x594fa9 instanceof _0x53ccdc?_0x594fa9:new _0x53ccdc(function(_0xf2ac7){_0xf2ac7(_0x594fa9);});}return new(_0x53ccdc||(_0x53ccdc=Promise))(function(_0x5e9ae2,_0x4e754a){function _0x29cd69(_0x42b20a){try{_0x158fd3(_0x1b0b66['next'](_0x42b20a));}catch(_0x223785){_0x4e754a(_0x223785);}}function _0x4824d6(_0x342d4d){try{_0x158fd3(_0x1b0b66['throw'](_0x342d4d));}catch(_0x58b3f3){_0x4e754a(_0x58b3f3);}}function _0x158fd3(_0x3531ac){_0x3531ac['done']?_0x5e9ae2(_0x3531ac['value']):_0x18b292(_0x3531ac['value'])['then'](_0x29cd69,_0x4824d6);}_0x158fd3((_0x1b0b66=_0x1b0b66['apply'](_0x3374b8,_0x55ed6a||[]))['next']());});};class Fetch{constructor(_0x2a2e90){this['baseUri']=_0x2a2e90,this['getUrl']=_0x449cc7=>{return _0x449cc7['startsWith']('/')&&(_0x449cc7=_0x449cc7['replace']('/','')),''+this['baseUri']+_0x449cc7;},!_0x2a2e90['endsWith']('/')&&(_0x2a2e90=_0x2a2e90+'/');}['get'](_0x31fe7d,_0x147f4c){return __awaiter$2(this,void 0,void 0,function*(){const _0x5dae8e=this['getUrl'](_0x31fe7d);return yield fetch(_0x5dae8e,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x147f4c}});});}['post'](_0x3750ac,_0x562f44,_0x184e94){return __awaiter$2(this,void 0,void 0,function*(){const _0x15f467=this['getUrl'](_0x3750ac);return yield fetch(_0x15f467,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x562f44},'body':_0x184e94?JSON['stringify'](_0x184e94):null});});}['put'](_0x5a9a0b,_0x53dce1,_0x323923){return __awaiter$2(this,void 0,void 0,function*(){const _0x1348a7=this['getUrl'](_0x5a9a0b);return yield fetch(_0x1348a7,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x53dce1},'body':_0x323923?JSON['stringify'](_0x323923):null});});}['delete'](_0x51a01f,_0x3f8c1d){return __awaiter$2(this,void 0,void 0,function*(){const _0x16f9a0=this['getUrl'](_0x51a01f);return yield fetch(_0x16f9a0,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3f8c1d}});});}}
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(_0x4cb43b,_0x2b94c9,_0x2b047b,_0x24697a){function _0x9260b0(_0x52256){return _0x52256 instanceof _0x2b047b?_0x52256:new _0x2b047b(function(_0x45fb49){_0x45fb49(_0x52256);});}return new(_0x2b047b||(_0x2b047b=Promise))(function(_0x397597,_0x254324){function _0x4aeb1c(_0x92d9f5){try{_0x5e624f(_0x24697a['next'](_0x92d9f5));}catch(_0x2d1879){_0x254324(_0x2d1879);}}function _0x4a07e9(_0x5f04d3){try{_0x5e624f(_0x24697a['throw'](_0x5f04d3));}catch(_0x21b53f){_0x254324(_0x21b53f);}}function _0x5e624f(_0x400891){_0x400891['done']?_0x397597(_0x400891['value']):_0x9260b0(_0x400891['value'])['then'](_0x4aeb1c,_0x4a07e9);}_0x5e624f((_0x24697a=_0x24697a['apply'](_0x4cb43b,_0x2b94c9||[]))['next']());});};class SearchServersService{constructor(_0x2240dc){this['fetch']=_0x2240dc,this['path']='search-services';}['create'](_0x149872,_0x50f16f,_0x317a59,_0x2cb639,_0xaa248,_0xb7ff69){return __awaiter$1(this,void 0,void 0,function*(){const _0x4b2e4f={'account_name':_0x149872,'search_service_name':_0x50f16f,'endpoint':_0x317a59,'key':_0x2cb639,'county':_0xaa248};try{const _0x3be8ac=yield this['fetch']['post'](this['path'],_0xb7ff69,_0x4b2e4f);if(_0x3be8ac['status']>0xc7&&_0x3be8ac['status']<0x12c){const _0x120c44=yield _0x3be8ac['json']();return new SuccessfulSearchServiceResponse(_0x120c44);}const _0x355100=yield _0x3be8ac['json']();return new FailedSearchServiceResponse(_0x355100);}catch(_0x48d5e1){if(_0x48d5e1 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x48d5e1['message'],'title':_0x48d5e1['name'],'status':0x1f4,'instance':'','type':''});throw _0x48d5e1;}});}['delete'](_0x184ef4,_0x484fb2,_0x447af0){return __awaiter$1(this,void 0,void 0,function*(){const _0x43e782=this['path']+'/'+_0x184ef4+'/'+_0x484fb2;try{const _0x74e689=yield this['fetch']['delete'](_0x43e782,_0x447af0);if(_0x74e689['status']>0xc7&&_0x74e689['status']<0x12c)return new SuccessfulResponse({});const _0x444b16=yield _0x74e689['json']();return new FailedResponse(_0x444b16);}catch(_0x21fc6f){if(_0x21fc6f instanceof Error)return new FailedResponse({'detail':_0x21fc6f['message'],'title':_0x21fc6f['name'],'status':0x1f4,'instance':'','type':''});throw _0x21fc6f;}});}['view'](_0x17e91b,_0xc1c7e9,_0x4084fc){return __awaiter$1(this,void 0,void 0,function*(){const _0x1ee708=this['path']+'/'+_0x17e91b+'/'+_0xc1c7e9;try{const _0x11c238=yield this['fetch']['get'](_0x1ee708,_0x4084fc);if(_0x11c238['status']>0xc7&&_0x11c238['status']<0x12c){const _0x57992c=yield _0x11c238['json']();return new SuccessfulViewSearchServiceResponse(_0x57992c);}const _0xd3081c=yield _0x11c238['json']();return new FailedViewSearchServiceResponse(_0xd3081c);}catch(_0x591073){if(_0x591073 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x591073['message'],'title':_0x591073['name'],'status':0x1f4,'instance':'','type':''});throw _0x591073;}});}}
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(_0x11b941,_0x55e87d,_0x45f91f,_0x9501a9){function _0xf6bb40(_0xeaa73e){return _0xeaa73e instanceof _0x45f91f?_0xeaa73e:new _0x45f91f(function(_0x3dfe85){_0x3dfe85(_0xeaa73e);});}return new(_0x45f91f||(_0x45f91f=Promise))(function(_0x439e64,_0x4dff19){function _0x175b55(_0x3affcb){try{_0x485636(_0x9501a9['next'](_0x3affcb));}catch(_0x32a2ee){_0x4dff19(_0x32a2ee);}}function _0x13c68b(_0x3b9c2f){try{_0x485636(_0x9501a9['throw'](_0x3b9c2f));}catch(_0x34b436){_0x4dff19(_0x34b436);}}function _0x485636(_0x1a1cbe){_0x1a1cbe['done']?_0x439e64(_0x1a1cbe['value']):_0xf6bb40(_0x1a1cbe['value'])['then'](_0x175b55,_0x13c68b);}_0x485636((_0x9501a9=_0x9501a9['apply'](_0x11b941,_0x55e87d||[]))['next']());});};class AdminClient{constructor(_0x3326c2='https://admin.searchability.dev/'){var _0x32bbbc=new Fetch(_0x3326c2);this['Accounts']=new AccountService(_0x32bbbc),this['Lists']=new ListService(_0x32bbbc),this['ApiKeys']=new ApiKeyService(_0x32bbbc),this['SearchServices']=new SearchServersService(_0x32bbbc);}}class AuthClient{constructor(_0x159837='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x159837);}['login'](_0x2f7d34){return __awaiter(this,void 0,void 0,function*(){var _0x50e6a7='login/'+_0x2f7d34;try{const _0x28f33f=yield yield fetch(_0x50e6a7);if(_0x28f33f['status']>0xc7&&_0x28f33f['status']<0x12c){const _0x23fb1e=yield _0x28f33f['json']();return new SuccessfulAuthResponse(_0x23fb1e);}const _0x77ad82=yield _0x28f33f['json']();return new FailedAuthResponse(_0x77ad82);}catch(_0x12056d){if(_0x12056d instanceof Error)return new FailedAuthResponse({'detail':_0x12056d['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x12056d;}});}['refresh'](_0x5ae22c){return __awaiter(this,void 0,void 0,function*(){var _0x1c5823='refresh';try{const _0x189789=yield this['fetch']['post'](_0x1c5823,_0x5ae22c,null);if(_0x189789['status']>0xc7&&_0x189789['status']<0x12c){const _0x30a78c=yield _0x189789['json']();return new SuccessfulAuthResponse(_0x30a78c);}const _0xf101fd=yield _0x189789['json']();return new FailedAuthResponse(_0xf101fd);}catch(_0x3810e4){if(_0x3810e4 instanceof Error)return new FailedAuthResponse({'detail':_0x3810e4['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x3810e4;}});}['getTokenStatus'](_0x42636a){if(Date['now']()<_0x42636a['access_expires'])return exports.TokenStatus['Ok'];if(Date['now']()<_0x42636a['refresh_expires'])return exports.TokenStatus['Refresh'];return exports.TokenStatus['Expired'];}}
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(_0x5e1afa){_0x5e1afa[_0x5e1afa['Ok']=0x0]='Ok',_0x5e1afa[_0x5e1afa['Refresh']=0x1]='Refresh',_0x5e1afa[_0x5e1afa['Expired']=0x2]='Expired';}(TokenStatus||(TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}}class Response{constructor(_0x4dd1e5){this['isSuccess']=_0x4dd1e5;}}class SuccessfulAccountResponse extends Response{constructor(_0x59af0f){super(!![]),this['account']=_0x59af0f;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x36efd0){super(![]),this['problem']=_0x36efd0;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x3bd90c){super(!![]),this['tokens']=_0x3bd90c;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x4e235d){super(![]),this['problem']=_0x4e235d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x2f2735){super(!![]),this['apiKey']=_0x2f2735;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x563270){super(![]),this['problem']=_0x563270;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x2f0fd9){super(!![]),this['searchService']=_0x2f0fd9;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x4dbe0e){super(![]),this['problem']=_0x4dbe0e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x2686a3){super(!![]),this['searchService']=_0x2686a3;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServiceResponse extends Response{constructor(_0x402281){super(![]),this['problem']=_0x402281;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0xa6a162){super(!![]),this['apiKeyValue']=_0xa6a162;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x14b931){super(!![]),this['obj']=_0x14b931;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x4a4d0c){super(![]),this['problem']=_0x4a4d0c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x250990){super(![]),this['problem']=_0x250990;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
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(_0x43d272,_0x5eab7b,_0x50f63c,_0x1264ef){function _0x3e5e95(_0x47c7ae){return _0x47c7ae instanceof _0x50f63c?_0x47c7ae:new _0x50f63c(function(_0x1051f8){_0x1051f8(_0x47c7ae);});}return new(_0x50f63c||(_0x50f63c=Promise))(function(_0x367180,_0x18a061){function _0x59eeb4(_0x1c0427){try{_0x4039c0(_0x1264ef['next'](_0x1c0427));}catch(_0x3678e9){_0x18a061(_0x3678e9);}}function _0x9c60ed(_0x5636d0){try{_0x4039c0(_0x1264ef['throw'](_0x5636d0));}catch(_0x11b108){_0x18a061(_0x11b108);}}function _0x4039c0(_0x3b47d0){_0x3b47d0['done']?_0x367180(_0x3b47d0['value']):_0x3e5e95(_0x3b47d0['value'])['then'](_0x59eeb4,_0x9c60ed);}_0x4039c0((_0x1264ef=_0x1264ef['apply'](_0x43d272,_0x5eab7b||[]))['next']());});};class AccountService{constructor(_0xa31f5e){this['fetch']=_0xa31f5e;}['get'](_0x5b5afc,_0x40ae42){return __awaiter$5(this,void 0,void 0,function*(){const _0xe0678e='Account/'+_0x5b5afc+'/',_0x3b796c=yield this['fetch']['get'](_0xe0678e,_0x40ae42);try{if(_0x3b796c['status']>0xc7&&_0x3b796c['status']<0x12c){const _0x220dfc=yield _0x3b796c['json']();return new SuccessfulAccountResponse(_0x220dfc);}const _0x3802ed=yield _0x3b796c['json']();return new FailedAccountResponse(_0x3802ed);}catch(_0x287c3d){if(_0x287c3d instanceof Error)return new FailedAccountResponse({'detail':_0x287c3d['message'],'title':_0x287c3d['name'],'status':0x1f4,'instance':'','type':''});throw _0x287c3d;}});}}
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(_0x28031d,_0x36a0c1,_0x88537a,_0x516b33){function _0x546558(_0x38dd16){return _0x38dd16 instanceof _0x88537a?_0x38dd16:new _0x88537a(function(_0x53094e){_0x53094e(_0x38dd16);});}return new(_0x88537a||(_0x88537a=Promise))(function(_0x3ec01d,_0x1683e3){function _0x44ef30(_0x50dc2c){try{_0x4bbe0a(_0x516b33['next'](_0x50dc2c));}catch(_0x182bfe){_0x1683e3(_0x182bfe);}}function _0x331c74(_0x2fc87c){try{_0x4bbe0a(_0x516b33['throw'](_0x2fc87c));}catch(_0x272fd6){_0x1683e3(_0x272fd6);}}function _0x4bbe0a(_0x3615b9){_0x3615b9['done']?_0x3ec01d(_0x3615b9['value']):_0x546558(_0x3615b9['value'])['then'](_0x44ef30,_0x331c74);}_0x4bbe0a((_0x516b33=_0x516b33['apply'](_0x28031d,_0x36a0c1||[]))['next']());});};class ApiKeyService{constructor(_0x53ebaf){this['fetch']=_0x53ebaf,this['path']='api-key';}['create'](_0x10113e,_0x251324,_0x140db5){return __awaiter$4(this,void 0,void 0,function*(){const _0x21ab89={'account_name':_0x10113e,'api_key_name':_0x251324};try{const _0x3532dd=yield this['fetch']['post'](this['path'],_0x140db5,_0x21ab89);if(_0x3532dd['status']>0xc7&&_0x3532dd['status']<0x12c){const _0x1b30a3=yield _0x3532dd['json']();return new SuccessfulApiKeyResponse(_0x1b30a3);}const _0x21933c=yield _0x3532dd['json']();return new FailedApiKeyResponse(_0x21933c);}catch(_0x12e188){if(_0x12e188 instanceof Error)return new FailedApiKeyResponse({'detail':_0x12e188['message'],'title':_0x12e188['name'],'status':0x1f4,'instance':'','type':''});throw _0x12e188;}});}['view'](_0x2cc465,_0x19e20e,_0x3dc711){return __awaiter$4(this,void 0,void 0,function*(){const _0x45587c=this['path']+'/'+_0x2cc465+'/'+_0x19e20e;try{const _0x5dc1ff=yield this['fetch']['get'](_0x45587c,_0x3dc711);if(_0x5dc1ff['status']>0xc7&&_0x5dc1ff['status']<0x12c){const _0x46eb04=yield _0x5dc1ff['json']();return new SuccessfulApiKeyValueResponse(_0x46eb04);}const _0x3a111d=yield _0x5dc1ff['json']();return new FailedApiKeyValueResponse(_0x3a111d);}catch(_0x2f645e){if(_0x2f645e instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x2f645e['message'],'title':_0x2f645e['name'],'status':0x1f4,'instance':'','type':''});throw _0x2f645e;}});}['delete'](_0x67f40d,_0x5de47d,_0x77fa40){return __awaiter$4(this,void 0,void 0,function*(){const _0x1aea4a=this['path']+'/'+_0x67f40d+'/'+_0x5de47d;try{const _0x289da9=yield this['fetch']['delete'](_0x1aea4a,_0x77fa40);if(_0x289da9['status']>0xc7&&_0x289da9['status']<0x12c)return new SuccessfulResponse({});const _0x346fa7=yield _0x289da9['json']();return new FailedResponse(_0x346fa7);}catch(_0x491e05){if(_0x491e05 instanceof Error)return new FailedResponse({'detail':_0x491e05['message'],'title':_0x491e05['name'],'status':0x1f4,'instance':'','type':''});throw _0x491e05;}});}}
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(_0x4cd795,_0x58a98c,_0x3fd34a,_0x1ea40d){function _0x79fbf4(_0x1f8407){return _0x1f8407 instanceof _0x3fd34a?_0x1f8407:new _0x3fd34a(function(_0x189672){_0x189672(_0x1f8407);});}return new(_0x3fd34a||(_0x3fd34a=Promise))(function(_0x212144,_0x188f3c){function _0x5a82e5(_0x4b9cd8){try{_0x5ec928(_0x1ea40d['next'](_0x4b9cd8));}catch(_0x34e264){_0x188f3c(_0x34e264);}}function _0x1d5bea(_0x1b815f){try{_0x5ec928(_0x1ea40d['throw'](_0x1b815f));}catch(_0x1500ae){_0x188f3c(_0x1500ae);}}function _0x5ec928(_0x24ae94){_0x24ae94['done']?_0x212144(_0x24ae94['value']):_0x79fbf4(_0x24ae94['value'])['then'](_0x5a82e5,_0x1d5bea);}_0x5ec928((_0x1ea40d=_0x1ea40d['apply'](_0x4cd795,_0x58a98c||[]))['next']());});};class ListService{constructor(_0x578dd0){this['fetch']=_0x578dd0;}['add'](_0x448c5b,_0x328afe,_0x45ce95){return __awaiter$3(this,void 0,void 0,function*(){const _0x2fd5c4='List',_0x599304={'account_name':_0x448c5b,'list_name':_0x328afe};try{const _0x530de2=yield this['fetch']['post'](_0x2fd5c4,_0x45ce95,_0x599304);if(_0x530de2['status']>0xc7&&_0x530de2['status']<0x12c){const _0xe74a2f=yield _0x530de2['json']();return new SuccessfulAccountResponse(_0xe74a2f);}const _0x241e4d=yield _0x530de2['json']();return new FailedAccountResponse(_0x241e4d);}catch(_0x3fe424){if(_0x3fe424 instanceof Error)return new FailedAccountResponse({'detail':_0x3fe424['message'],'title':_0x3fe424['name'],'status':0x1f4,'instance':'','type':''});throw _0x3fe424;}});}['remove'](_0x7ddd93,_0x21a200,_0x24a5e1){return __awaiter$3(this,void 0,void 0,function*(){const _0x23f671='List/'+_0x7ddd93+'/'+_0x21a200,_0x5bd810=yield this['fetch']['delete'](_0x23f671,_0x24a5e1);try{if(_0x5bd810['status']>0xc7&&_0x5bd810['status']<0x12c){const _0x35603d=yield _0x5bd810['json']();return new SuccessfulAccountResponse(_0x35603d);}const _0x525c76=yield _0x5bd810['json']();return new FailedAccountResponse(_0x525c76);}catch(_0x44a858){if(_0x44a858 instanceof Error)return new FailedAccountResponse({'detail':_0x44a858['message'],'title':_0x44a858['name'],'status':0x1f4,'instance':'','type':''});throw _0x44a858;}});}}
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(_0x16948d,_0xeeddcc,_0x286462,_0x3e1492){function _0x17866c(_0x43c853){return _0x43c853 instanceof _0x286462?_0x43c853:new _0x286462(function(_0x5a434){_0x5a434(_0x43c853);});}return new(_0x286462||(_0x286462=Promise))(function(_0x12881e,_0x1b5174){function _0x17c02f(_0x2ed925){try{_0x438e61(_0x3e1492['next'](_0x2ed925));}catch(_0x5273ca){_0x1b5174(_0x5273ca);}}function _0x5db4df(_0x1a6ac7){try{_0x438e61(_0x3e1492['throw'](_0x1a6ac7));}catch(_0x4b459b){_0x1b5174(_0x4b459b);}}function _0x438e61(_0x1f40c1){_0x1f40c1['done']?_0x12881e(_0x1f40c1['value']):_0x17866c(_0x1f40c1['value'])['then'](_0x17c02f,_0x5db4df);}_0x438e61((_0x3e1492=_0x3e1492['apply'](_0x16948d,_0xeeddcc||[]))['next']());});};class Fetch{constructor(_0x209094){this['baseUri']=_0x209094,this['getUrl']=_0x264ba3=>{return _0x264ba3['startsWith']('/')&&(_0x264ba3=_0x264ba3['replace']('/','')),''+this['baseUri']+_0x264ba3;},!_0x209094['endsWith']('/')&&(_0x209094=_0x209094+'/');}['get'](_0x2f6b8d,_0x44c274){return __awaiter$2(this,void 0,void 0,function*(){const _0x13bec6=this['getUrl'](_0x2f6b8d);return yield fetch(_0x13bec6,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x44c274}});});}['post'](_0x206c74,_0x30edaa,_0xc1df26){return __awaiter$2(this,void 0,void 0,function*(){const _0x4ba728=this['getUrl'](_0x206c74);return yield fetch(_0x4ba728,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x30edaa},'body':_0xc1df26?JSON['stringify'](_0xc1df26):null});});}['put'](_0x1dc12f,_0x532e43,_0x1a2d92){return __awaiter$2(this,void 0,void 0,function*(){const _0x3d2323=this['getUrl'](_0x1dc12f);return yield fetch(_0x3d2323,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x532e43},'body':_0x1a2d92?JSON['stringify'](_0x1a2d92):null});});}['delete'](_0x476ee4,_0x379cdc){return __awaiter$2(this,void 0,void 0,function*(){const _0x3e245f=this['getUrl'](_0x476ee4);return yield fetch(_0x3e245f,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x379cdc}});});}}
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(_0x234194,_0x1791b1,_0x40f7d1,_0xcd57ce){function _0x52cb6e(_0x4c3a2b){return _0x4c3a2b instanceof _0x40f7d1?_0x4c3a2b:new _0x40f7d1(function(_0x547dd1){_0x547dd1(_0x4c3a2b);});}return new(_0x40f7d1||(_0x40f7d1=Promise))(function(_0x9fe2f8,_0x403ea1){function _0xe167e9(_0x282c27){try{_0x2bfcdd(_0xcd57ce['next'](_0x282c27));}catch(_0x1abeed){_0x403ea1(_0x1abeed);}}function _0x1c0d73(_0x3fe908){try{_0x2bfcdd(_0xcd57ce['throw'](_0x3fe908));}catch(_0x55a4c9){_0x403ea1(_0x55a4c9);}}function _0x2bfcdd(_0xaf1256){_0xaf1256['done']?_0x9fe2f8(_0xaf1256['value']):_0x52cb6e(_0xaf1256['value'])['then'](_0xe167e9,_0x1c0d73);}_0x2bfcdd((_0xcd57ce=_0xcd57ce['apply'](_0x234194,_0x1791b1||[]))['next']());});};class SearchServersService{constructor(_0x4b71c9){this['fetch']=_0x4b71c9,this['path']='search-services';}['create'](_0x28f155,_0x4f6f57,_0x1c759c,_0x193817,_0x2cc750,_0x1fdde2){return __awaiter$1(this,void 0,void 0,function*(){const _0x1e1042={'account_name':_0x28f155,'search_service_name':_0x4f6f57,'endpoint':_0x1c759c,'key':_0x193817,'county':_0x2cc750};try{const _0x2a99db=yield this['fetch']['post'](this['path'],_0x1fdde2,_0x1e1042);if(_0x2a99db['status']>0xc7&&_0x2a99db['status']<0x12c){const _0x554f37=yield _0x2a99db['json']();return new SuccessfulSearchServiceResponse(_0x554f37);}const _0x476d3a=yield _0x2a99db['json']();return new FailedSearchServiceResponse(_0x476d3a);}catch(_0x5b8537){if(_0x5b8537 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x5b8537['message'],'title':_0x5b8537['name'],'status':0x1f4,'instance':'','type':''});throw _0x5b8537;}});}['delete'](_0x3b09d3,_0x4b92b4,_0x196b12){return __awaiter$1(this,void 0,void 0,function*(){const _0x4ba16e=this['path']+'/'+_0x3b09d3+'/'+_0x4b92b4;try{const _0x507529=yield this['fetch']['delete'](_0x4ba16e,_0x196b12);if(_0x507529['status']>0xc7&&_0x507529['status']<0x12c)return new SuccessfulResponse({});const _0x2024a4=yield _0x507529['json']();return new FailedResponse(_0x2024a4);}catch(_0x509d4f){if(_0x509d4f instanceof Error)return new FailedResponse({'detail':_0x509d4f['message'],'title':_0x509d4f['name'],'status':0x1f4,'instance':'','type':''});throw _0x509d4f;}});}['view'](_0x5f26cb,_0x17c321,_0x2c2d42){return __awaiter$1(this,void 0,void 0,function*(){const _0x1bf91b=this['path']+'/'+_0x5f26cb+'/'+_0x17c321;try{const _0x1e483a=yield this['fetch']['get'](_0x1bf91b,_0x2c2d42);if(_0x1e483a['status']>0xc7&&_0x1e483a['status']<0x12c){const _0x4e3257=yield _0x1e483a['json']();return new SuccessfulViewSearchServiceResponse(_0x4e3257);}const _0x140388=yield _0x1e483a['json']();return new FailedViewSearchServiceResponse(_0x140388);}catch(_0x31cb5d){if(_0x31cb5d instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x31cb5d['message'],'title':_0x31cb5d['name'],'status':0x1f4,'instance':'','type':''});throw _0x31cb5d;}});}}
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(_0x4f0bba,_0x44187e,_0x2f8976,_0x4c8629){function _0x473a9f(_0x3904fb){return _0x3904fb instanceof _0x2f8976?_0x3904fb:new _0x2f8976(function(_0x55469b){_0x55469b(_0x3904fb);});}return new(_0x2f8976||(_0x2f8976=Promise))(function(_0xd95d2c,_0x393f0f){function _0x21a5da(_0xab3c68){try{_0x16644a(_0x4c8629['next'](_0xab3c68));}catch(_0x50714d){_0x393f0f(_0x50714d);}}function _0x437fdd(_0x17f864){try{_0x16644a(_0x4c8629['throw'](_0x17f864));}catch(_0x383259){_0x393f0f(_0x383259);}}function _0x16644a(_0x6e65f9){_0x6e65f9['done']?_0xd95d2c(_0x6e65f9['value']):_0x473a9f(_0x6e65f9['value'])['then'](_0x21a5da,_0x437fdd);}_0x16644a((_0x4c8629=_0x4c8629['apply'](_0x4f0bba,_0x44187e||[]))['next']());});};class AdminClient{constructor(_0x273874='https://admin.searchability.dev/'){var _0x5d0dd9=new Fetch(_0x273874);this['Accounts']=new AccountService(_0x5d0dd9),this['Lists']=new ListService(_0x5d0dd9),this['ApiKeys']=new ApiKeyService(_0x5d0dd9),this['SearchServices']=new SearchServersService(_0x5d0dd9);}}class AuthClient{constructor(_0x130bf9='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x130bf9);}['login'](_0x417dec){return __awaiter(this,void 0,void 0,function*(){var _0x138489='login/'+_0x417dec;try{const _0x4c4031=yield yield fetch(_0x138489);if(_0x4c4031['status']>0xc7&&_0x4c4031['status']<0x12c){const _0x57139e=yield _0x4c4031['json']();return new SuccessfulAuthResponse(_0x57139e);}const _0x1a49e4=yield _0x4c4031['json']();return new FailedAuthResponse(_0x1a49e4);}catch(_0x5808a){if(_0x5808a instanceof Error)return new FailedAuthResponse({'detail':_0x5808a['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x5808a;}});}['refresh'](_0x11ac66){return __awaiter(this,void 0,void 0,function*(){var _0xf7dd42='refresh';try{const _0x3869b4=yield this['fetch']['post'](_0xf7dd42,_0x11ac66,null);if(_0x3869b4['status']>0xc7&&_0x3869b4['status']<0x12c){const _0x31a59a=yield _0x3869b4['json']();return new SuccessfulAuthResponse(_0x31a59a);}const _0x573b16=yield _0x3869b4['json']();return new FailedAuthResponse(_0x573b16);}catch(_0x172029){if(_0x172029 instanceof Error)return new FailedAuthResponse({'detail':_0x172029['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x172029;}});}['getTokenStatus'](_0xebdcb2){if(Date['now']()<_0xebdcb2['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0xebdcb2['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
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,15 +24,15 @@ 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
38
  delete(account_name: string, search_service_name: string, access_token: string): Promise<Response<any, Problem>>;
@@ -90,6 +90,7 @@ type SearchService = {
90
90
  search_service_name: string;
91
91
  created: number;
92
92
  country: string;
93
+ provider: string;
93
94
  };
94
95
  type SearchServiceDetails = {
95
96
  endpoint: string;
@@ -116,6 +117,7 @@ type Account = {
116
117
  image_path: string;
117
118
  lists: ListIdentity[];
118
119
  api_keys: ApiKey[];
120
+ search_services: SearchService[];
119
121
  };
120
122
  declare class SuccessfulAccountResponse extends Response<Account, Problem> {
121
123
  readonly account: Account;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@searchability/admin-client",
3
- "version": "0.0.36",
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(_0x5f2294){_0x5f2294[_0x5f2294['Ok']=0x0]='Ok',_0x5f2294[_0x5f2294['Refresh']=0x1]='Refresh',_0x5f2294[_0x5f2294['Expired']=0x2]='Expired';}(TokenStatus||(TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}}class Response{constructor(_0x4a6c84){this['isSuccess']=_0x4a6c84;}}class SuccessfulAccountResponse extends Response{constructor(_0xcc286a){super(!![]),this['account']=_0xcc286a;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x3d4dbc){super(![]),this['problem']=_0x3d4dbc;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x3b8cdf){super(!![]),this['tokens']=_0x3b8cdf;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x3c5310){super(![]),this['problem']=_0x3c5310;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x1f3cfa){super(!![]),this['apiKey']=_0x1f3cfa;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x39e96f){super(![]),this['problem']=_0x39e96f;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x5c0eeb){super(!![]),this['searchService']=_0x5c0eeb;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x31f151){super(![]),this['problem']=_0x31f151;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x1f4d35){super(!![]),this['searchService']=_0x1f4d35;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServiceResponse extends Response{constructor(_0x320dcc){super(![]),this['problem']=_0x320dcc;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x146152){super(!![]),this['apiKeyValue']=_0x146152;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x3c00c1){super(!![]),this['obj']=_0x3c00c1;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x2a07d4){super(![]),this['problem']=_0x2a07d4;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x15b5f7){super(![]),this['problem']=_0x15b5f7;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
2
-
3
- var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x40fff2,_0x5d31a7,_0x54facf,_0x12d942){function _0x219c8e(_0x23db20){return _0x23db20 instanceof _0x54facf?_0x23db20:new _0x54facf(function(_0x107166){_0x107166(_0x23db20);});}return new(_0x54facf||(_0x54facf=Promise))(function(_0x5644a0,_0x7d823a){function _0x49610a(_0x35c485){try{_0x190120(_0x12d942['next'](_0x35c485));}catch(_0x23cafc){_0x7d823a(_0x23cafc);}}function _0xde7da5(_0x2490eb){try{_0x190120(_0x12d942['throw'](_0x2490eb));}catch(_0x48b934){_0x7d823a(_0x48b934);}}function _0x190120(_0xcdd4d6){_0xcdd4d6['done']?_0x5644a0(_0xcdd4d6['value']):_0x219c8e(_0xcdd4d6['value'])['then'](_0x49610a,_0xde7da5);}_0x190120((_0x12d942=_0x12d942['apply'](_0x40fff2,_0x5d31a7||[]))['next']());});};class AccountService{constructor(_0x1035b0){this['fetch']=_0x1035b0;}['get'](_0x158994,_0x3c6b05){return __awaiter$5(this,void 0,void 0,function*(){const _0x16393d='Account/'+_0x158994+'/',_0xe1e68e=yield this['fetch']['get'](_0x16393d,_0x3c6b05);try{if(_0xe1e68e['status']>0xc7&&_0xe1e68e['status']<0x12c){const _0x3cc500=yield _0xe1e68e['json']();return new SuccessfulAccountResponse(_0x3cc500);}const _0x3cd678=yield _0xe1e68e['json']();return new FailedAccountResponse(_0x3cd678);}catch(_0x5cdc03){if(_0x5cdc03 instanceof Error)return new FailedAccountResponse({'detail':_0x5cdc03['message'],'title':_0x5cdc03['name'],'status':0x1f4,'instance':'','type':''});throw _0x5cdc03;}});}}
4
-
5
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x3af5fa,_0x494f2e,_0x45fdfc,_0x43256c){function _0x400f1f(_0xb018bf){return _0xb018bf instanceof _0x45fdfc?_0xb018bf:new _0x45fdfc(function(_0x5b72d2){_0x5b72d2(_0xb018bf);});}return new(_0x45fdfc||(_0x45fdfc=Promise))(function(_0x439fb5,_0x3838ac){function _0x2db72a(_0x511426){try{_0x1ab680(_0x43256c['next'](_0x511426));}catch(_0x14edd9){_0x3838ac(_0x14edd9);}}function _0x4491c4(_0x4cbd7f){try{_0x1ab680(_0x43256c['throw'](_0x4cbd7f));}catch(_0xb2d604){_0x3838ac(_0xb2d604);}}function _0x1ab680(_0x2a8905){_0x2a8905['done']?_0x439fb5(_0x2a8905['value']):_0x400f1f(_0x2a8905['value'])['then'](_0x2db72a,_0x4491c4);}_0x1ab680((_0x43256c=_0x43256c['apply'](_0x3af5fa,_0x494f2e||[]))['next']());});};class ApiKeyService{constructor(_0x24a5c1){this['fetch']=_0x24a5c1,this['path']='api-key';}['create'](_0x320132,_0x56b1d4,_0x55cf33){return __awaiter$4(this,void 0,void 0,function*(){const _0x504e3e={'account_name':_0x320132,'api_key_name':_0x56b1d4};try{const _0x237652=yield this['fetch']['post'](this['path'],_0x55cf33,_0x504e3e);if(_0x237652['status']>0xc7&&_0x237652['status']<0x12c){const _0x288670=yield _0x237652['json']();return new SuccessfulApiKeyResponse(_0x288670);}const _0x224d37=yield _0x237652['json']();return new FailedApiKeyResponse(_0x224d37);}catch(_0x1d5b5d){if(_0x1d5b5d instanceof Error)return new FailedApiKeyResponse({'detail':_0x1d5b5d['message'],'title':_0x1d5b5d['name'],'status':0x1f4,'instance':'','type':''});throw _0x1d5b5d;}});}['view'](_0x2b90a8,_0x678016,_0x31a199){return __awaiter$4(this,void 0,void 0,function*(){const _0x1c8d47=this['path']+'/'+_0x2b90a8+'/'+_0x678016;try{const _0x191a69=yield this['fetch']['get'](_0x1c8d47,_0x31a199);if(_0x191a69['status']>0xc7&&_0x191a69['status']<0x12c){const _0x4f9493=yield _0x191a69['json']();return new SuccessfulApiKeyValueResponse(_0x4f9493);}const _0x94a6ec=yield _0x191a69['json']();return new FailedApiKeyValueResponse(_0x94a6ec);}catch(_0x34b572){if(_0x34b572 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x34b572['message'],'title':_0x34b572['name'],'status':0x1f4,'instance':'','type':''});throw _0x34b572;}});}['delete'](_0x167f39,_0x568559,_0x5c3ce9){return __awaiter$4(this,void 0,void 0,function*(){const _0x20d356=this['path']+'/'+_0x167f39+'/'+_0x568559;try{const _0x4403af=yield this['fetch']['delete'](_0x20d356,_0x5c3ce9);if(_0x4403af['status']>0xc7&&_0x4403af['status']<0x12c)return new SuccessfulResponse({});const _0x2130ec=yield _0x4403af['json']();return new FailedResponse(_0x2130ec);}catch(_0x18cc97){if(_0x18cc97 instanceof Error)return new FailedResponse({'detail':_0x18cc97['message'],'title':_0x18cc97['name'],'status':0x1f4,'instance':'','type':''});throw _0x18cc97;}});}}
6
-
7
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0xff0d5a,_0x5568f6,_0x43ed08,_0x4cd698){function _0xc5eac6(_0xa7ec4a){return _0xa7ec4a instanceof _0x43ed08?_0xa7ec4a:new _0x43ed08(function(_0x31e939){_0x31e939(_0xa7ec4a);});}return new(_0x43ed08||(_0x43ed08=Promise))(function(_0x596cc5,_0x9294b4){function _0x551e3e(_0x52e8af){try{_0x43bace(_0x4cd698['next'](_0x52e8af));}catch(_0x40f861){_0x9294b4(_0x40f861);}}function _0x579488(_0x487ebf){try{_0x43bace(_0x4cd698['throw'](_0x487ebf));}catch(_0x21e0f3){_0x9294b4(_0x21e0f3);}}function _0x43bace(_0x30d503){_0x30d503['done']?_0x596cc5(_0x30d503['value']):_0xc5eac6(_0x30d503['value'])['then'](_0x551e3e,_0x579488);}_0x43bace((_0x4cd698=_0x4cd698['apply'](_0xff0d5a,_0x5568f6||[]))['next']());});};class ListService{constructor(_0xcec776){this['fetch']=_0xcec776;}['add'](_0x5b0e94,_0x2115ed,_0x58c3ac){return __awaiter$3(this,void 0,void 0,function*(){const _0x101da9='List',_0x4499df={'account_name':_0x5b0e94,'list_name':_0x2115ed};try{const _0x496637=yield this['fetch']['post'](_0x101da9,_0x58c3ac,_0x4499df);if(_0x496637['status']>0xc7&&_0x496637['status']<0x12c){const _0x148322=yield _0x496637['json']();return new SuccessfulAccountResponse(_0x148322);}const _0x4dc355=yield _0x496637['json']();return new FailedAccountResponse(_0x4dc355);}catch(_0x4a81d7){if(_0x4a81d7 instanceof Error)return new FailedAccountResponse({'detail':_0x4a81d7['message'],'title':_0x4a81d7['name'],'status':0x1f4,'instance':'','type':''});throw _0x4a81d7;}});}['remove'](_0x34df1e,_0x10804e,_0x40c53c){return __awaiter$3(this,void 0,void 0,function*(){const _0x3789f5='List/'+_0x34df1e+'/'+_0x10804e,_0x3d2c8e=yield this['fetch']['delete'](_0x3789f5,_0x40c53c);try{if(_0x3d2c8e['status']>0xc7&&_0x3d2c8e['status']<0x12c){const _0x32cd07=yield _0x3d2c8e['json']();return new SuccessfulAccountResponse(_0x32cd07);}const _0x115a6d=yield _0x3d2c8e['json']();return new FailedAccountResponse(_0x115a6d);}catch(_0x523ad9){if(_0x523ad9 instanceof Error)return new FailedAccountResponse({'detail':_0x523ad9['message'],'title':_0x523ad9['name'],'status':0x1f4,'instance':'','type':''});throw _0x523ad9;}});}}
8
-
9
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x5c2aee,_0x36d134,_0x3ca33c,_0x3df68d){function _0x1ffe40(_0x348f8d){return _0x348f8d instanceof _0x3ca33c?_0x348f8d:new _0x3ca33c(function(_0xa74770){_0xa74770(_0x348f8d);});}return new(_0x3ca33c||(_0x3ca33c=Promise))(function(_0x5a0f9e,_0x138a75){function _0x2ba2e0(_0x1fc600){try{_0x4bed4a(_0x3df68d['next'](_0x1fc600));}catch(_0x4e3184){_0x138a75(_0x4e3184);}}function _0x51c812(_0x120934){try{_0x4bed4a(_0x3df68d['throw'](_0x120934));}catch(_0x57cde7){_0x138a75(_0x57cde7);}}function _0x4bed4a(_0x15e270){_0x15e270['done']?_0x5a0f9e(_0x15e270['value']):_0x1ffe40(_0x15e270['value'])['then'](_0x2ba2e0,_0x51c812);}_0x4bed4a((_0x3df68d=_0x3df68d['apply'](_0x5c2aee,_0x36d134||[]))['next']());});};class Fetch{constructor(_0x49d843){this['baseUri']=_0x49d843,this['getUrl']=_0x440564=>{return _0x440564['startsWith']('/')&&(_0x440564=_0x440564['replace']('/','')),''+this['baseUri']+_0x440564;},!_0x49d843['endsWith']('/')&&(_0x49d843=_0x49d843+'/');}['get'](_0x6c31e7,_0x233c95){return __awaiter$2(this,void 0,void 0,function*(){const _0x358180=this['getUrl'](_0x6c31e7);return yield fetch(_0x358180,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x233c95}});});}['post'](_0x43dab7,_0x306840,_0x23dbd8){return __awaiter$2(this,void 0,void 0,function*(){const _0x20a593=this['getUrl'](_0x43dab7);return yield fetch(_0x20a593,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x306840},'body':_0x23dbd8?JSON['stringify'](_0x23dbd8):null});});}['put'](_0x4d40bf,_0x585c51,_0x3d89f7){return __awaiter$2(this,void 0,void 0,function*(){const _0x2ade85=this['getUrl'](_0x4d40bf);return yield fetch(_0x2ade85,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x585c51},'body':_0x3d89f7?JSON['stringify'](_0x3d89f7):null});});}['delete'](_0x2ec81f,_0x273426){return __awaiter$2(this,void 0,void 0,function*(){const _0x1d3bac=this['getUrl'](_0x2ec81f);return yield fetch(_0x1d3bac,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x273426}});});}}
10
-
11
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x3a75c1,_0x92572a,_0x4a2b91,_0x1eaa2c){function _0x25c54a(_0x59f91d){return _0x59f91d instanceof _0x4a2b91?_0x59f91d:new _0x4a2b91(function(_0x3cf4af){_0x3cf4af(_0x59f91d);});}return new(_0x4a2b91||(_0x4a2b91=Promise))(function(_0x177726,_0x2345de){function _0x1d4a44(_0x17eee2){try{_0x18eefa(_0x1eaa2c['next'](_0x17eee2));}catch(_0x15d37b){_0x2345de(_0x15d37b);}}function _0x5eb1ed(_0x55749c){try{_0x18eefa(_0x1eaa2c['throw'](_0x55749c));}catch(_0x21a430){_0x2345de(_0x21a430);}}function _0x18eefa(_0x5e2c04){_0x5e2c04['done']?_0x177726(_0x5e2c04['value']):_0x25c54a(_0x5e2c04['value'])['then'](_0x1d4a44,_0x5eb1ed);}_0x18eefa((_0x1eaa2c=_0x1eaa2c['apply'](_0x3a75c1,_0x92572a||[]))['next']());});};class SearchServersService{constructor(_0x16f456){this['fetch']=_0x16f456,this['path']='search-services';}['create'](_0x40b8be,_0x10b7c2,_0x2b4e2f,_0x47d7ca,_0x568478,_0x1a96b3){return __awaiter$1(this,void 0,void 0,function*(){const _0x52aa1b={'account_name':_0x40b8be,'search_service_name':_0x10b7c2,'endpoint':_0x2b4e2f,'key':_0x47d7ca,'county':_0x568478};try{const _0x4b4eca=yield this['fetch']['post'](this['path'],_0x1a96b3,_0x52aa1b);if(_0x4b4eca['status']>0xc7&&_0x4b4eca['status']<0x12c){const _0x273ba1=yield _0x4b4eca['json']();return new SuccessfulSearchServiceResponse(_0x273ba1);}const _0x42f8ed=yield _0x4b4eca['json']();return new FailedSearchServiceResponse(_0x42f8ed);}catch(_0x3536fa){if(_0x3536fa instanceof Error)return new FailedSearchServiceResponse({'detail':_0x3536fa['message'],'title':_0x3536fa['name'],'status':0x1f4,'instance':'','type':''});throw _0x3536fa;}});}['delete'](_0x3642c2,_0x38067d,_0x146398){return __awaiter$1(this,void 0,void 0,function*(){const _0x2f3125=this['path']+'/'+_0x3642c2+'/'+_0x38067d;try{const _0x1f62ca=yield this['fetch']['delete'](_0x2f3125,_0x146398);if(_0x1f62ca['status']>0xc7&&_0x1f62ca['status']<0x12c)return new SuccessfulResponse({});const _0xb31541=yield _0x1f62ca['json']();return new FailedResponse(_0xb31541);}catch(_0x162cfd){if(_0x162cfd instanceof Error)return new FailedResponse({'detail':_0x162cfd['message'],'title':_0x162cfd['name'],'status':0x1f4,'instance':'','type':''});throw _0x162cfd;}});}['view'](_0x3ad077,_0x37e197,_0x545a1d){return __awaiter$1(this,void 0,void 0,function*(){const _0x414cc3=this['path']+'/'+_0x3ad077+'/'+_0x37e197;try{const _0x4462ba=yield this['fetch']['get'](_0x414cc3,_0x545a1d);if(_0x4462ba['status']>0xc7&&_0x4462ba['status']<0x12c){const _0x56e259=yield _0x4462ba['json']();return new SuccessfulViewSearchServiceResponse(_0x56e259);}const _0x12add6=yield _0x4462ba['json']();return new FailedViewSearchServiceResponse(_0x12add6);}catch(_0x4914a5){if(_0x4914a5 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x4914a5['message'],'title':_0x4914a5['name'],'status':0x1f4,'instance':'','type':''});throw _0x4914a5;}});}}
12
-
13
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x5785ff,_0x3dd1bc,_0x4f443a,_0x34fd7d){function _0x4424a5(_0x449295){return _0x449295 instanceof _0x4f443a?_0x449295:new _0x4f443a(function(_0xa03dfb){_0xa03dfb(_0x449295);});}return new(_0x4f443a||(_0x4f443a=Promise))(function(_0x31f2b7,_0x8ea7c0){function _0x369099(_0xc1b33e){try{_0x102182(_0x34fd7d['next'](_0xc1b33e));}catch(_0x4c9bd2){_0x8ea7c0(_0x4c9bd2);}}function _0x1644af(_0x49482e){try{_0x102182(_0x34fd7d['throw'](_0x49482e));}catch(_0x3d30e0){_0x8ea7c0(_0x3d30e0);}}function _0x102182(_0xddfa98){_0xddfa98['done']?_0x31f2b7(_0xddfa98['value']):_0x4424a5(_0xddfa98['value'])['then'](_0x369099,_0x1644af);}_0x102182((_0x34fd7d=_0x34fd7d['apply'](_0x5785ff,_0x3dd1bc||[]))['next']());});};class AdminClient{constructor(_0x546cf2='https://admin.searchability.dev/'){var _0x53007d=new Fetch(_0x546cf2);this['Accounts']=new AccountService(_0x53007d),this['Lists']=new ListService(_0x53007d),this['ApiKeys']=new ApiKeyService(_0x53007d),this['SearchServices']=new SearchServersService(_0x53007d);}}class AuthClient{constructor(_0x2d962f='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x2d962f);}['login'](_0x4e0a29){return __awaiter(this,void 0,void 0,function*(){var _0x1875ac='login/'+_0x4e0a29;try{const _0x49e7d7=yield yield fetch(_0x1875ac);if(_0x49e7d7['status']>0xc7&&_0x49e7d7['status']<0x12c){const _0x2eb268=yield _0x49e7d7['json']();return new SuccessfulAuthResponse(_0x2eb268);}const _0x2adfcc=yield _0x49e7d7['json']();return new FailedAuthResponse(_0x2adfcc);}catch(_0x1ad283){if(_0x1ad283 instanceof Error)return new FailedAuthResponse({'detail':_0x1ad283['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x1ad283;}});}['refresh'](_0x470157){return __awaiter(this,void 0,void 0,function*(){var _0x196d16='refresh';try{const _0x53b583=yield this['fetch']['post'](_0x196d16,_0x470157,null);if(_0x53b583['status']>0xc7&&_0x53b583['status']<0x12c){const _0x49b8cc=yield _0x53b583['json']();return new SuccessfulAuthResponse(_0x49b8cc);}const _0x16b1c8=yield _0x53b583['json']();return new FailedAuthResponse(_0x16b1c8);}catch(_0x2b2dc6){if(_0x2b2dc6 instanceof Error)return new FailedAuthResponse({'detail':_0x2b2dc6['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x2b2dc6;}});}['getTokenStatus'](_0x3083a8){if(Date['now']()<_0x3083a8['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x3083a8['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
14
-
15
- export { AdminClient, AuthClient, TokenStatus, Tokens };