@searchability/admin-client 0.0.40 → 0.0.42

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(_0x11d440){_0x11d440[_0x11d440['Ok']=0x0]='Ok',_0x11d440[_0x11d440['Refresh']=0x1]='Refresh',_0x11d440[_0x11d440['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(_0x102230){this['isSuccess']=_0x102230;}}class SuccessfulAccountResponse extends Response{constructor(_0x1c9f27){super(!![]),this['account']=_0x1c9f27;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x4ce2e3){super(![]),this['problem']=_0x4ce2e3;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x5790c5){super(!![]),this['tokens']=_0x5790c5;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x345d41){super(![]),this['problem']=_0x345d41;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x1eaf7a){super(!![]),this['apiKey']=_0x1eaf7a;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x420599){super(![]),this['problem']=_0x420599;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x441268){super(!![]),this['searchService']=_0x441268;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x33e46b){super(![]),this['problem']=_0x33e46b;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x197d3b){super(!![]),this['searchService']=_0x197d3b;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServiceResponse extends Response{constructor(_0x56c163){super(![]),this['problem']=_0x56c163;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x55f04f){super(!![]),this['apiKeyValue']=_0x55f04f;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x3eb84b){super(!![]),this['obj']=_0x3eb84b;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x155c91){super(![]),this['problem']=_0x155c91;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x9e7e39){super(![]),this['problem']=_0x9e7e39;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
2
+
3
+ var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x3c4c88,_0x4580d4,_0x27bf3e,_0x1ebdc1){function _0x369274(_0x5b737b){return _0x5b737b instanceof _0x27bf3e?_0x5b737b:new _0x27bf3e(function(_0x50560b){_0x50560b(_0x5b737b);});}return new(_0x27bf3e||(_0x27bf3e=Promise))(function(_0x1c7540,_0x1fd10b){function _0x151c67(_0x406d48){try{_0x52aa6e(_0x1ebdc1['next'](_0x406d48));}catch(_0xdbede1){_0x1fd10b(_0xdbede1);}}function _0x230851(_0x56dbec){try{_0x52aa6e(_0x1ebdc1['throw'](_0x56dbec));}catch(_0xe9a3ee){_0x1fd10b(_0xe9a3ee);}}function _0x52aa6e(_0x2ca49c){_0x2ca49c['done']?_0x1c7540(_0x2ca49c['value']):_0x369274(_0x2ca49c['value'])['then'](_0x151c67,_0x230851);}_0x52aa6e((_0x1ebdc1=_0x1ebdc1['apply'](_0x3c4c88,_0x4580d4||[]))['next']());});};class AccountService{constructor(_0x429034){this['fetch']=_0x429034;}['get'](_0x3a298b,_0x540bec){return __awaiter$5(this,void 0,void 0,function*(){const _0x3ed165='Account/'+_0x3a298b+'/',_0x347f2f=yield this['fetch']['get'](_0x3ed165,_0x540bec);try{if(_0x347f2f['status']>0xc7&&_0x347f2f['status']<0x12c){const _0x53f464=yield _0x347f2f['json']();return new SuccessfulAccountResponse(_0x53f464);}const _0xe46891=yield _0x347f2f['json']();return new FailedAccountResponse(_0xe46891);}catch(_0x2afce8){if(_0x2afce8 instanceof Error)return new FailedAccountResponse({'detail':_0x2afce8['message'],'title':_0x2afce8['name'],'status':0x1f4,'instance':'','type':''});throw _0x2afce8;}});}}
4
+
5
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x40688a,_0x1a4c28,_0x40f8c6,_0x55c028){function _0x58e013(_0x29a6ee){return _0x29a6ee instanceof _0x40f8c6?_0x29a6ee:new _0x40f8c6(function(_0xdc9941){_0xdc9941(_0x29a6ee);});}return new(_0x40f8c6||(_0x40f8c6=Promise))(function(_0x26a468,_0x1c2c2c){function _0x196a14(_0x5d8f38){try{_0x288b9b(_0x55c028['next'](_0x5d8f38));}catch(_0x16061f){_0x1c2c2c(_0x16061f);}}function _0x257be3(_0x3b31a9){try{_0x288b9b(_0x55c028['throw'](_0x3b31a9));}catch(_0x13e90d){_0x1c2c2c(_0x13e90d);}}function _0x288b9b(_0x3f902e){_0x3f902e['done']?_0x26a468(_0x3f902e['value']):_0x58e013(_0x3f902e['value'])['then'](_0x196a14,_0x257be3);}_0x288b9b((_0x55c028=_0x55c028['apply'](_0x40688a,_0x1a4c28||[]))['next']());});};class ApiKeyService{constructor(_0x31dce4){this['fetch']=_0x31dce4,this['path']='api-key';}['create'](_0x58ec33,_0x16323f,_0x520c41){return __awaiter$4(this,void 0,void 0,function*(){const _0xa1da63={'account_name':_0x58ec33,'api_key_name':_0x16323f};try{const _0x3a0b2c=yield this['fetch']['post'](this['path'],_0x520c41,_0xa1da63);if(_0x3a0b2c['status']>0xc7&&_0x3a0b2c['status']<0x12c){const _0x3b3b48=yield _0x3a0b2c['json']();return new SuccessfulApiKeyResponse(_0x3b3b48);}const _0xa3dcee=yield _0x3a0b2c['json']();return new FailedApiKeyResponse(_0xa3dcee);}catch(_0x2ed6a5){if(_0x2ed6a5 instanceof Error)return new FailedApiKeyResponse({'detail':_0x2ed6a5['message'],'title':_0x2ed6a5['name'],'status':0x1f4,'instance':'','type':''});throw _0x2ed6a5;}});}['view'](_0x3b0151,_0x45604b,_0x16b318){return __awaiter$4(this,void 0,void 0,function*(){const _0x277ae3=this['path']+'/'+_0x3b0151+'/'+_0x45604b;try{const _0x435b57=yield this['fetch']['get'](_0x277ae3,_0x16b318);if(_0x435b57['status']>0xc7&&_0x435b57['status']<0x12c){const _0x27725a=yield _0x435b57['json']();return new SuccessfulApiKeyValueResponse(_0x27725a);}const _0x156749=yield _0x435b57['json']();return new FailedApiKeyValueResponse(_0x156749);}catch(_0x291321){if(_0x291321 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x291321['message'],'title':_0x291321['name'],'status':0x1f4,'instance':'','type':''});throw _0x291321;}});}['delete'](_0x3c10e3,_0x49146c,_0x4b071d){return __awaiter$4(this,void 0,void 0,function*(){const _0x56e95c=this['path']+'/'+_0x3c10e3+'/'+_0x49146c;try{const _0x226c71=yield this['fetch']['delete'](_0x56e95c,_0x4b071d);if(_0x226c71['status']>0xc7&&_0x226c71['status']<0x12c)return new SuccessfulResponse({});const _0x386fcb=yield _0x226c71['json']();return new FailedResponse(_0x386fcb);}catch(_0x160445){if(_0x160445 instanceof Error)return new FailedResponse({'detail':_0x160445['message'],'title':_0x160445['name'],'status':0x1f4,'instance':'','type':''});throw _0x160445;}});}}
6
+
7
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0xc17f57,_0x4e2f80,_0x363f73,_0x1bef2c){function _0x5c4942(_0x5b1acc){return _0x5b1acc instanceof _0x363f73?_0x5b1acc:new _0x363f73(function(_0x6f2457){_0x6f2457(_0x5b1acc);});}return new(_0x363f73||(_0x363f73=Promise))(function(_0x4c4e66,_0x58d813){function _0x336589(_0x4a9af4){try{_0x43709d(_0x1bef2c['next'](_0x4a9af4));}catch(_0xc17ff9){_0x58d813(_0xc17ff9);}}function _0x4c0705(_0x42ab25){try{_0x43709d(_0x1bef2c['throw'](_0x42ab25));}catch(_0x363a64){_0x58d813(_0x363a64);}}function _0x43709d(_0x57a338){_0x57a338['done']?_0x4c4e66(_0x57a338['value']):_0x5c4942(_0x57a338['value'])['then'](_0x336589,_0x4c0705);}_0x43709d((_0x1bef2c=_0x1bef2c['apply'](_0xc17f57,_0x4e2f80||[]))['next']());});};class ListService{constructor(_0x4c4f93){this['fetch']=_0x4c4f93;}['add'](_0x2e5ab5,_0x282eff,_0x1e2f4){return __awaiter$3(this,void 0,void 0,function*(){const _0x2981ae='List',_0xe52e77={'account_name':_0x2e5ab5,'list_name':_0x282eff};try{const _0xfeb13=yield this['fetch']['post'](_0x2981ae,_0x1e2f4,_0xe52e77);if(_0xfeb13['status']>0xc7&&_0xfeb13['status']<0x12c){const _0x14d1de=yield _0xfeb13['json']();return new SuccessfulAccountResponse(_0x14d1de);}const _0x4d5e9d=yield _0xfeb13['json']();return new FailedAccountResponse(_0x4d5e9d);}catch(_0x5b75a0){if(_0x5b75a0 instanceof Error)return new FailedAccountResponse({'detail':_0x5b75a0['message'],'title':_0x5b75a0['name'],'status':0x1f4,'instance':'','type':''});throw _0x5b75a0;}});}['remove'](_0x15bbc3,_0x5012ae,_0x441e9e){return __awaiter$3(this,void 0,void 0,function*(){const _0x1d6b5c='List/'+_0x15bbc3+'/'+_0x5012ae,_0x1dfa84=yield this['fetch']['delete'](_0x1d6b5c,_0x441e9e);try{if(_0x1dfa84['status']>0xc7&&_0x1dfa84['status']<0x12c){const _0x1a72d7=yield _0x1dfa84['json']();return new SuccessfulAccountResponse(_0x1a72d7);}const _0x122145=yield _0x1dfa84['json']();return new FailedAccountResponse(_0x122145);}catch(_0x44a661){if(_0x44a661 instanceof Error)return new FailedAccountResponse({'detail':_0x44a661['message'],'title':_0x44a661['name'],'status':0x1f4,'instance':'','type':''});throw _0x44a661;}});}}
8
+
9
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x412d83,_0x313f02,_0x53ea18,_0x23680a){function _0x35f9a7(_0x256ad9){return _0x256ad9 instanceof _0x53ea18?_0x256ad9:new _0x53ea18(function(_0x5b0e60){_0x5b0e60(_0x256ad9);});}return new(_0x53ea18||(_0x53ea18=Promise))(function(_0x4bef7c,_0x4d2de2){function _0x3a2ddf(_0x140713){try{_0x11566c(_0x23680a['next'](_0x140713));}catch(_0x1c70fb){_0x4d2de2(_0x1c70fb);}}function _0xda8b21(_0x4d700b){try{_0x11566c(_0x23680a['throw'](_0x4d700b));}catch(_0x300e14){_0x4d2de2(_0x300e14);}}function _0x11566c(_0x3c4837){_0x3c4837['done']?_0x4bef7c(_0x3c4837['value']):_0x35f9a7(_0x3c4837['value'])['then'](_0x3a2ddf,_0xda8b21);}_0x11566c((_0x23680a=_0x23680a['apply'](_0x412d83,_0x313f02||[]))['next']());});};class Fetch{constructor(_0x455c1f){this['baseUri']=_0x455c1f,this['getUrl']=_0x1e008a=>{return _0x1e008a['startsWith']('/')&&(_0x1e008a=_0x1e008a['replace']('/','')),''+this['baseUri']+_0x1e008a;},!_0x455c1f['endsWith']('/')&&(_0x455c1f=_0x455c1f+'/');}['get'](_0x3bc6bf,_0xaeb6d6){return __awaiter$2(this,void 0,void 0,function*(){const _0x4f5a90=this['getUrl'](_0x3bc6bf);return yield fetch(_0x4f5a90,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0xaeb6d6}});});}['post'](_0x22373d,_0x210e42,_0x40d353){return __awaiter$2(this,void 0,void 0,function*(){const _0x29bf2d=this['getUrl'](_0x22373d);return yield fetch(_0x29bf2d,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x210e42},'body':_0x40d353?JSON['stringify'](_0x40d353):null});});}['PostNoAuth'](_0xde91c8,_0x40d99b){return __awaiter$2(this,void 0,void 0,function*(){const _0x3dba3f=this['getUrl'](_0xde91c8);return yield fetch(_0x3dba3f,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0x40d99b?JSON['stringify'](_0x40d99b):null});});}['put'](_0x521bbf,_0x45e40f,_0x2deec7){return __awaiter$2(this,void 0,void 0,function*(){const _0x17206f=this['getUrl'](_0x521bbf);return yield fetch(_0x17206f,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x45e40f},'body':_0x2deec7?JSON['stringify'](_0x2deec7):null});});}['delete'](_0x4d5b4e,_0x4dc7fa){return __awaiter$2(this,void 0,void 0,function*(){const _0x8c11b4=this['getUrl'](_0x4d5b4e);return yield fetch(_0x8c11b4,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4dc7fa}});});}}
10
+
11
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x2d19cf,_0x5e7116,_0x1fc3ef,_0x425b48){function _0x34cf81(_0x4d838e){return _0x4d838e instanceof _0x1fc3ef?_0x4d838e:new _0x1fc3ef(function(_0x1c7c79){_0x1c7c79(_0x4d838e);});}return new(_0x1fc3ef||(_0x1fc3ef=Promise))(function(_0x277d1b,_0x41d6d9){function _0xaa8cb4(_0x7d2e21){try{_0x3617c5(_0x425b48['next'](_0x7d2e21));}catch(_0x25bdc3){_0x41d6d9(_0x25bdc3);}}function _0x397df5(_0x371bea){try{_0x3617c5(_0x425b48['throw'](_0x371bea));}catch(_0x282790){_0x41d6d9(_0x282790);}}function _0x3617c5(_0x5dacc7){_0x5dacc7['done']?_0x277d1b(_0x5dacc7['value']):_0x34cf81(_0x5dacc7['value'])['then'](_0xaa8cb4,_0x397df5);}_0x3617c5((_0x425b48=_0x425b48['apply'](_0x2d19cf,_0x5e7116||[]))['next']());});};class SearchServersService{constructor(_0x23cd31){this['fetch']=_0x23cd31,this['path']='search-services';}['create'](_0x5c9718,_0x25d925,_0x1fbd9c,_0x4a7409,_0x1bcdf3,_0xcdc58b,_0x426e55,_0x43f3bd){return __awaiter$1(this,void 0,void 0,function*(){const _0x562f79={'account_name':_0x5c9718,'search_service_name':_0x25d925,'endpoint':_0x1fbd9c,'key':_0x4a7409,'country':_0x1bcdf3,'provider':_0xcdc58b,'index_name':_0x426e55};try{const _0x21d779=yield this['fetch']['post'](this['path'],_0x43f3bd,_0x562f79);if(_0x21d779['status']>0xc7&&_0x21d779['status']<0x12c){const _0x3fbbc6=yield _0x21d779['json']();return new SuccessfulSearchServiceResponse(_0x3fbbc6);}const _0x57440b=yield _0x21d779['json']();return new FailedSearchServiceResponse(_0x57440b);}catch(_0x5158fd){if(_0x5158fd instanceof Error)return new FailedSearchServiceResponse({'detail':_0x5158fd['message'],'title':_0x5158fd['name'],'status':0x1f4,'instance':'','type':''});throw _0x5158fd;}});}['delete'](_0x2d486a,_0x144dcd,_0x25973a){return __awaiter$1(this,void 0,void 0,function*(){const _0x403f67=this['path']+'/'+_0x2d486a+'/'+_0x144dcd;try{const _0x2d4860=yield this['fetch']['delete'](_0x403f67,_0x25973a);if(_0x2d4860['status']>0xc7&&_0x2d4860['status']<0x12c)return new SuccessfulResponse({});const _0x80aa07=yield _0x2d4860['json']();return new FailedResponse(_0x80aa07);}catch(_0x4836f8){if(_0x4836f8 instanceof Error)return new FailedResponse({'detail':_0x4836f8['message'],'title':_0x4836f8['name'],'status':0x1f4,'instance':'','type':''});throw _0x4836f8;}});}['view'](_0x52855a,_0x3f0889,_0x36c047){return __awaiter$1(this,void 0,void 0,function*(){const _0x364209=this['path']+'/'+_0x52855a+'/'+_0x3f0889;try{const _0x383651=yield this['fetch']['get'](_0x364209,_0x36c047);if(_0x383651['status']>0xc7&&_0x383651['status']<0x12c){const _0x20b1b9=yield _0x383651['json']();return new SuccessfulViewSearchServiceResponse(_0x20b1b9);}const _0x38c00f=yield _0x383651['json']();return new FailedViewSearchServiceResponse(_0x38c00f);}catch(_0x1f549e){if(_0x1f549e instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x1f549e['message'],'title':_0x1f549e['name'],'status':0x1f4,'instance':'','type':''});throw _0x1f549e;}});}}
12
+
13
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x1e8cd3,_0x44ce49,_0x29568d,_0x405858){function _0x46545f(_0x20e906){return _0x20e906 instanceof _0x29568d?_0x20e906:new _0x29568d(function(_0x489f45){_0x489f45(_0x20e906);});}return new(_0x29568d||(_0x29568d=Promise))(function(_0x3b6eba,_0x3aa206){function _0x41ff66(_0x11f07e){try{_0x477755(_0x405858['next'](_0x11f07e));}catch(_0x35ca05){_0x3aa206(_0x35ca05);}}function _0x47a0bc(_0x938114){try{_0x477755(_0x405858['throw'](_0x938114));}catch(_0x279159){_0x3aa206(_0x279159);}}function _0x477755(_0x56c781){_0x56c781['done']?_0x3b6eba(_0x56c781['value']):_0x46545f(_0x56c781['value'])['then'](_0x41ff66,_0x47a0bc);}_0x477755((_0x405858=_0x405858['apply'](_0x1e8cd3,_0x44ce49||[]))['next']());});};class AdminClient{constructor(_0x4a406a='https://admin.searchability.dev/'){var _0x310f26=new Fetch(_0x4a406a);this['Accounts']=new AccountService(_0x310f26),this['Lists']=new ListService(_0x310f26),this['ApiKeys']=new ApiKeyService(_0x310f26),this['SearchServices']=new SearchServersService(_0x310f26);}}class AuthClient{constructor(_0x4164d4='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x4164d4);}['login'](_0x5090aa){return __awaiter(this,void 0,void 0,function*(){const _0x54f122='login/'+_0x5090aa;try{const _0x4977a7=yield yield fetch(_0x54f122);if(_0x4977a7['status']>0xc7&&_0x4977a7['status']<0x12c){const _0x162396=yield _0x4977a7['json']();return new SuccessfulAuthResponse(_0x162396);}const _0x326eb9=yield _0x4977a7['json']();return new FailedAuthResponse(_0x326eb9);}catch(_0x24db77){if(_0x24db77 instanceof Error)return new FailedAuthResponse({'detail':_0x24db77['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x24db77;}});}['refresh'](_0x450324){return __awaiter(this,void 0,void 0,function*(){const _0x472e65='refresh',_0x97d047={'refresh_token':_0x450324};try{const _0x4f8af9=yield this['fetch']['PostNoAuth'](_0x472e65,_0x97d047);if(_0x4f8af9['status']>0xc7&&_0x4f8af9['status']<0x12c){const _0x2351e3=yield _0x4f8af9['json']();return new SuccessfulAuthResponse(_0x2351e3);}const _0x176a2a=yield _0x4f8af9['json']();return new FailedAuthResponse(_0x176a2a);}catch(_0x593a50){if(_0x593a50 instanceof Error)return new FailedAuthResponse({'detail':_0x593a50['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x593a50;}});}['getTokenStatus'](_0x3ecc57){if(Date['now']()<_0x3ecc57['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x3ecc57['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
14
+
15
+ export { AdminClient, AuthClient, TokenStatus, Tokens };
@@ -1,18 +1,18 @@
1
1
  'use strict';
2
2
 
3
- exports.TokenStatus = void 0;(function(_0x522757){_0x522757[_0x522757['Ok']=0x0]='Ok',_0x522757[_0x522757['Refresh']=0x1]='Refresh',_0x522757[_0x522757['Expired']=0x2]='Expired';}(exports.TokenStatus||(exports.TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}}class Response{constructor(_0x41b071){this['isSuccess']=_0x41b071;}}class SuccessfulAccountResponse extends Response{constructor(_0x45a6e7){super(!![]),this['account']=_0x45a6e7;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x2ddd91){super(![]),this['problem']=_0x2ddd91;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x5bb7fb){super(!![]),this['tokens']=_0x5bb7fb;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x360acf){super(![]),this['problem']=_0x360acf;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x1d4627){super(!![]),this['apiKey']=_0x1d4627;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x1a2f5a){super(![]),this['problem']=_0x1a2f5a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x18f033){super(!![]),this['searchService']=_0x18f033;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x4a1bf8){super(![]),this['problem']=_0x4a1bf8;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x2450cb){super(!![]),this['searchService']=_0x2450cb;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServiceResponse extends Response{constructor(_0xdad910){super(![]),this['problem']=_0xdad910;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x2ca9bf){super(!![]),this['apiKeyValue']=_0x2ca9bf;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x585c09){super(!![]),this['obj']=_0x585c09;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x1aa044){super(![]),this['problem']=_0x1aa044;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x232882){super(![]),this['problem']=_0x232882;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
3
+ exports.TokenStatus = void 0;(function(_0x4b4dd4){_0x4b4dd4[_0x4b4dd4['Ok']=0x0]='Ok',_0x4b4dd4[_0x4b4dd4['Refresh']=0x1]='Refresh',_0x4b4dd4[_0x4b4dd4['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(_0x1d584f){this['isSuccess']=_0x1d584f;}}class SuccessfulAccountResponse extends Response{constructor(_0x946152){super(!![]),this['account']=_0x946152;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x519e54){super(![]),this['problem']=_0x519e54;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x36dade){super(!![]),this['tokens']=_0x36dade;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x375303){super(![]),this['problem']=_0x375303;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x3c7c5e){super(!![]),this['apiKey']=_0x3c7c5e;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x4449de){super(![]),this['problem']=_0x4449de;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x49c54d){super(!![]),this['searchService']=_0x49c54d;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x36f1c2){super(![]),this['problem']=_0x36f1c2;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x487f6f){super(!![]),this['searchService']=_0x487f6f;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServiceResponse extends Response{constructor(_0x2631d6){super(![]),this['problem']=_0x2631d6;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0xab7816){super(!![]),this['apiKeyValue']=_0xab7816;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x55f362){super(!![]),this['obj']=_0x55f362;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x5a027b){super(![]),this['problem']=_0x5a027b;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x16ba3e){super(![]),this['problem']=_0x16ba3e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
4
4
 
5
- var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x3703b3,_0x49d240,_0x1c3f7c,_0x34c6b2){function _0x19565d(_0x3c0a4b){return _0x3c0a4b instanceof _0x1c3f7c?_0x3c0a4b:new _0x1c3f7c(function(_0x518ee7){_0x518ee7(_0x3c0a4b);});}return new(_0x1c3f7c||(_0x1c3f7c=Promise))(function(_0x568d5b,_0x58adf9){function _0x1eae78(_0x322c2a){try{_0x412527(_0x34c6b2['next'](_0x322c2a));}catch(_0x1c1736){_0x58adf9(_0x1c1736);}}function _0x2078d8(_0x441840){try{_0x412527(_0x34c6b2['throw'](_0x441840));}catch(_0x57e70c){_0x58adf9(_0x57e70c);}}function _0x412527(_0x4fb944){_0x4fb944['done']?_0x568d5b(_0x4fb944['value']):_0x19565d(_0x4fb944['value'])['then'](_0x1eae78,_0x2078d8);}_0x412527((_0x34c6b2=_0x34c6b2['apply'](_0x3703b3,_0x49d240||[]))['next']());});};class AccountService{constructor(_0xd39a7c){this['fetch']=_0xd39a7c;}['get'](_0x3f2288,_0x2eae2d){return __awaiter$5(this,void 0,void 0,function*(){const _0x3eb862='Account/'+_0x3f2288+'/',_0xd80d39=yield this['fetch']['get'](_0x3eb862,_0x2eae2d);try{if(_0xd80d39['status']>0xc7&&_0xd80d39['status']<0x12c){const _0x1cee04=yield _0xd80d39['json']();return new SuccessfulAccountResponse(_0x1cee04);}const _0x212e2a=yield _0xd80d39['json']();return new FailedAccountResponse(_0x212e2a);}catch(_0x220d2b){if(_0x220d2b instanceof Error)return new FailedAccountResponse({'detail':_0x220d2b['message'],'title':_0x220d2b['name'],'status':0x1f4,'instance':'','type':''});throw _0x220d2b;}});}}
5
+ var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x4ef354,_0x141c27,_0x142bc2,_0x55f19f){function _0x46294c(_0x13717e){return _0x13717e instanceof _0x142bc2?_0x13717e:new _0x142bc2(function(_0x17fe83){_0x17fe83(_0x13717e);});}return new(_0x142bc2||(_0x142bc2=Promise))(function(_0x8d9988,_0x854aae){function _0x1eda2f(_0x34db72){try{_0x365d1a(_0x55f19f['next'](_0x34db72));}catch(_0x4fe68f){_0x854aae(_0x4fe68f);}}function _0x242ddd(_0x3febd8){try{_0x365d1a(_0x55f19f['throw'](_0x3febd8));}catch(_0x1a1064){_0x854aae(_0x1a1064);}}function _0x365d1a(_0x89c473){_0x89c473['done']?_0x8d9988(_0x89c473['value']):_0x46294c(_0x89c473['value'])['then'](_0x1eda2f,_0x242ddd);}_0x365d1a((_0x55f19f=_0x55f19f['apply'](_0x4ef354,_0x141c27||[]))['next']());});};class AccountService{constructor(_0x22da00){this['fetch']=_0x22da00;}['get'](_0x3c322e,_0x8f336){return __awaiter$5(this,void 0,void 0,function*(){const _0x47995f='Account/'+_0x3c322e+'/',_0x4847de=yield this['fetch']['get'](_0x47995f,_0x8f336);try{if(_0x4847de['status']>0xc7&&_0x4847de['status']<0x12c){const _0x26e92f=yield _0x4847de['json']();return new SuccessfulAccountResponse(_0x26e92f);}const _0x2fe183=yield _0x4847de['json']();return new FailedAccountResponse(_0x2fe183);}catch(_0x474b78){if(_0x474b78 instanceof Error)return new FailedAccountResponse({'detail':_0x474b78['message'],'title':_0x474b78['name'],'status':0x1f4,'instance':'','type':''});throw _0x474b78;}});}}
6
6
 
7
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x171e7b,_0xf9ab9d,_0x27804e,_0x190b99){function _0xb958e7(_0x37f212){return _0x37f212 instanceof _0x27804e?_0x37f212:new _0x27804e(function(_0x16e869){_0x16e869(_0x37f212);});}return new(_0x27804e||(_0x27804e=Promise))(function(_0x4384c4,_0xc3ef5e){function _0x4dbe46(_0x50b215){try{_0x38d694(_0x190b99['next'](_0x50b215));}catch(_0x3a5358){_0xc3ef5e(_0x3a5358);}}function _0x284b16(_0x15123e){try{_0x38d694(_0x190b99['throw'](_0x15123e));}catch(_0x1c0c0d){_0xc3ef5e(_0x1c0c0d);}}function _0x38d694(_0x161cfe){_0x161cfe['done']?_0x4384c4(_0x161cfe['value']):_0xb958e7(_0x161cfe['value'])['then'](_0x4dbe46,_0x284b16);}_0x38d694((_0x190b99=_0x190b99['apply'](_0x171e7b,_0xf9ab9d||[]))['next']());});};class ApiKeyService{constructor(_0x2f6d33){this['fetch']=_0x2f6d33,this['path']='api-key';}['create'](_0x3ed418,_0x2bc02a,_0x4c8a0c){return __awaiter$4(this,void 0,void 0,function*(){const _0xdb6e2={'account_name':_0x3ed418,'api_key_name':_0x2bc02a};try{const _0x3e090d=yield this['fetch']['post'](this['path'],_0x4c8a0c,_0xdb6e2);if(_0x3e090d['status']>0xc7&&_0x3e090d['status']<0x12c){const _0x4f8f29=yield _0x3e090d['json']();return new SuccessfulApiKeyResponse(_0x4f8f29);}const _0x2a6520=yield _0x3e090d['json']();return new FailedApiKeyResponse(_0x2a6520);}catch(_0x2ebd61){if(_0x2ebd61 instanceof Error)return new FailedApiKeyResponse({'detail':_0x2ebd61['message'],'title':_0x2ebd61['name'],'status':0x1f4,'instance':'','type':''});throw _0x2ebd61;}});}['view'](_0x2c86bd,_0x1ec043,_0x468c4a){return __awaiter$4(this,void 0,void 0,function*(){const _0x444547=this['path']+'/'+_0x2c86bd+'/'+_0x1ec043;try{const _0x2c84b7=yield this['fetch']['get'](_0x444547,_0x468c4a);if(_0x2c84b7['status']>0xc7&&_0x2c84b7['status']<0x12c){const _0x4c55c8=yield _0x2c84b7['json']();return new SuccessfulApiKeyValueResponse(_0x4c55c8);}const _0x3637b9=yield _0x2c84b7['json']();return new FailedApiKeyValueResponse(_0x3637b9);}catch(_0x4e8193){if(_0x4e8193 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x4e8193['message'],'title':_0x4e8193['name'],'status':0x1f4,'instance':'','type':''});throw _0x4e8193;}});}['delete'](_0x419302,_0x20dc34,_0xb90fa){return __awaiter$4(this,void 0,void 0,function*(){const _0x487b05=this['path']+'/'+_0x419302+'/'+_0x20dc34;try{const _0x52c6e6=yield this['fetch']['delete'](_0x487b05,_0xb90fa);if(_0x52c6e6['status']>0xc7&&_0x52c6e6['status']<0x12c)return new SuccessfulResponse({});const _0xe8a834=yield _0x52c6e6['json']();return new FailedResponse(_0xe8a834);}catch(_0x4b515c){if(_0x4b515c instanceof Error)return new FailedResponse({'detail':_0x4b515c['message'],'title':_0x4b515c['name'],'status':0x1f4,'instance':'','type':''});throw _0x4b515c;}});}}
7
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x5d2973,_0x16704a,_0x183f0f,_0x10e18f){function _0x4b16f9(_0x5284ca){return _0x5284ca instanceof _0x183f0f?_0x5284ca:new _0x183f0f(function(_0x488f75){_0x488f75(_0x5284ca);});}return new(_0x183f0f||(_0x183f0f=Promise))(function(_0x120f96,_0x5674d1){function _0x333833(_0x5b738b){try{_0x4a1e5e(_0x10e18f['next'](_0x5b738b));}catch(_0x588c4b){_0x5674d1(_0x588c4b);}}function _0x13f4cf(_0x51f87f){try{_0x4a1e5e(_0x10e18f['throw'](_0x51f87f));}catch(_0x4bc447){_0x5674d1(_0x4bc447);}}function _0x4a1e5e(_0x1ee31b){_0x1ee31b['done']?_0x120f96(_0x1ee31b['value']):_0x4b16f9(_0x1ee31b['value'])['then'](_0x333833,_0x13f4cf);}_0x4a1e5e((_0x10e18f=_0x10e18f['apply'](_0x5d2973,_0x16704a||[]))['next']());});};class ApiKeyService{constructor(_0x87aed1){this['fetch']=_0x87aed1,this['path']='api-key';}['create'](_0x344ce8,_0x4093c6,_0x1a65f1){return __awaiter$4(this,void 0,void 0,function*(){const _0x5ccde3={'account_name':_0x344ce8,'api_key_name':_0x4093c6};try{const _0xc80e90=yield this['fetch']['post'](this['path'],_0x1a65f1,_0x5ccde3);if(_0xc80e90['status']>0xc7&&_0xc80e90['status']<0x12c){const _0x488ac3=yield _0xc80e90['json']();return new SuccessfulApiKeyResponse(_0x488ac3);}const _0x57cb21=yield _0xc80e90['json']();return new FailedApiKeyResponse(_0x57cb21);}catch(_0x2bf84a){if(_0x2bf84a instanceof Error)return new FailedApiKeyResponse({'detail':_0x2bf84a['message'],'title':_0x2bf84a['name'],'status':0x1f4,'instance':'','type':''});throw _0x2bf84a;}});}['view'](_0x349c48,_0x9903b4,_0x360190){return __awaiter$4(this,void 0,void 0,function*(){const _0x252b7c=this['path']+'/'+_0x349c48+'/'+_0x9903b4;try{const _0x2c21b0=yield this['fetch']['get'](_0x252b7c,_0x360190);if(_0x2c21b0['status']>0xc7&&_0x2c21b0['status']<0x12c){const _0x466cd4=yield _0x2c21b0['json']();return new SuccessfulApiKeyValueResponse(_0x466cd4);}const _0xd0158c=yield _0x2c21b0['json']();return new FailedApiKeyValueResponse(_0xd0158c);}catch(_0x52a7f0){if(_0x52a7f0 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x52a7f0['message'],'title':_0x52a7f0['name'],'status':0x1f4,'instance':'','type':''});throw _0x52a7f0;}});}['delete'](_0x3766a0,_0x64fb7c,_0x37e0c8){return __awaiter$4(this,void 0,void 0,function*(){const _0x43862f=this['path']+'/'+_0x3766a0+'/'+_0x64fb7c;try{const _0x2ba538=yield this['fetch']['delete'](_0x43862f,_0x37e0c8);if(_0x2ba538['status']>0xc7&&_0x2ba538['status']<0x12c)return new SuccessfulResponse({});const _0x356c87=yield _0x2ba538['json']();return new FailedResponse(_0x356c87);}catch(_0x379efc){if(_0x379efc instanceof Error)return new FailedResponse({'detail':_0x379efc['message'],'title':_0x379efc['name'],'status':0x1f4,'instance':'','type':''});throw _0x379efc;}});}}
8
8
 
9
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x1dc491,_0x15d212,_0x5e6ecc,_0x4ad992){function _0x436168(_0x105f85){return _0x105f85 instanceof _0x5e6ecc?_0x105f85:new _0x5e6ecc(function(_0x30b177){_0x30b177(_0x105f85);});}return new(_0x5e6ecc||(_0x5e6ecc=Promise))(function(_0x4ae0a0,_0x205bc2){function _0x5091c6(_0x3988fb){try{_0x2d1ef7(_0x4ad992['next'](_0x3988fb));}catch(_0x485593){_0x205bc2(_0x485593);}}function _0x16a8c5(_0x3a2f62){try{_0x2d1ef7(_0x4ad992['throw'](_0x3a2f62));}catch(_0x3aaf59){_0x205bc2(_0x3aaf59);}}function _0x2d1ef7(_0x5ac606){_0x5ac606['done']?_0x4ae0a0(_0x5ac606['value']):_0x436168(_0x5ac606['value'])['then'](_0x5091c6,_0x16a8c5);}_0x2d1ef7((_0x4ad992=_0x4ad992['apply'](_0x1dc491,_0x15d212||[]))['next']());});};class ListService{constructor(_0x40df2d){this['fetch']=_0x40df2d;}['add'](_0x5d85f4,_0x4c1ff7,_0x32df1e){return __awaiter$3(this,void 0,void 0,function*(){const _0x1beb22='List',_0x5d1111={'account_name':_0x5d85f4,'list_name':_0x4c1ff7};try{const _0x1b7ec4=yield this['fetch']['post'](_0x1beb22,_0x32df1e,_0x5d1111);if(_0x1b7ec4['status']>0xc7&&_0x1b7ec4['status']<0x12c){const _0x382754=yield _0x1b7ec4['json']();return new SuccessfulAccountResponse(_0x382754);}const _0x3743e1=yield _0x1b7ec4['json']();return new FailedAccountResponse(_0x3743e1);}catch(_0x4ae338){if(_0x4ae338 instanceof Error)return new FailedAccountResponse({'detail':_0x4ae338['message'],'title':_0x4ae338['name'],'status':0x1f4,'instance':'','type':''});throw _0x4ae338;}});}['remove'](_0x1082d0,_0x4dbc1c,_0x333058){return __awaiter$3(this,void 0,void 0,function*(){const _0x17c1c1='List/'+_0x1082d0+'/'+_0x4dbc1c,_0x3db567=yield this['fetch']['delete'](_0x17c1c1,_0x333058);try{if(_0x3db567['status']>0xc7&&_0x3db567['status']<0x12c){const _0x201a00=yield _0x3db567['json']();return new SuccessfulAccountResponse(_0x201a00);}const _0x33184a=yield _0x3db567['json']();return new FailedAccountResponse(_0x33184a);}catch(_0x48b428){if(_0x48b428 instanceof Error)return new FailedAccountResponse({'detail':_0x48b428['message'],'title':_0x48b428['name'],'status':0x1f4,'instance':'','type':''});throw _0x48b428;}});}}
9
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x23cf3b,_0x3e1b2f,_0x55f05f,_0xc906ae){function _0x2d33bf(_0x229034){return _0x229034 instanceof _0x55f05f?_0x229034:new _0x55f05f(function(_0x53d57e){_0x53d57e(_0x229034);});}return new(_0x55f05f||(_0x55f05f=Promise))(function(_0xecf348,_0x1cc2d2){function _0x106e14(_0x40d904){try{_0x25919d(_0xc906ae['next'](_0x40d904));}catch(_0x43795e){_0x1cc2d2(_0x43795e);}}function _0x3739b8(_0xa1e8a4){try{_0x25919d(_0xc906ae['throw'](_0xa1e8a4));}catch(_0x4422f3){_0x1cc2d2(_0x4422f3);}}function _0x25919d(_0x3e397c){_0x3e397c['done']?_0xecf348(_0x3e397c['value']):_0x2d33bf(_0x3e397c['value'])['then'](_0x106e14,_0x3739b8);}_0x25919d((_0xc906ae=_0xc906ae['apply'](_0x23cf3b,_0x3e1b2f||[]))['next']());});};class ListService{constructor(_0x208ce5){this['fetch']=_0x208ce5;}['add'](_0x2c7a3a,_0x242d01,_0xf0e2d5){return __awaiter$3(this,void 0,void 0,function*(){const _0x23c4a6='List',_0x555e14={'account_name':_0x2c7a3a,'list_name':_0x242d01};try{const _0x4e9dfc=yield this['fetch']['post'](_0x23c4a6,_0xf0e2d5,_0x555e14);if(_0x4e9dfc['status']>0xc7&&_0x4e9dfc['status']<0x12c){const _0x54283d=yield _0x4e9dfc['json']();return new SuccessfulAccountResponse(_0x54283d);}const _0x1bdaae=yield _0x4e9dfc['json']();return new FailedAccountResponse(_0x1bdaae);}catch(_0x54338c){if(_0x54338c instanceof Error)return new FailedAccountResponse({'detail':_0x54338c['message'],'title':_0x54338c['name'],'status':0x1f4,'instance':'','type':''});throw _0x54338c;}});}['remove'](_0x2ba34f,_0x77a290,_0x32503e){return __awaiter$3(this,void 0,void 0,function*(){const _0x434100='List/'+_0x2ba34f+'/'+_0x77a290,_0x3f39ce=yield this['fetch']['delete'](_0x434100,_0x32503e);try{if(_0x3f39ce['status']>0xc7&&_0x3f39ce['status']<0x12c){const _0xe731d3=yield _0x3f39ce['json']();return new SuccessfulAccountResponse(_0xe731d3);}const _0x1a9fbf=yield _0x3f39ce['json']();return new FailedAccountResponse(_0x1a9fbf);}catch(_0x2e6cc0){if(_0x2e6cc0 instanceof Error)return new FailedAccountResponse({'detail':_0x2e6cc0['message'],'title':_0x2e6cc0['name'],'status':0x1f4,'instance':'','type':''});throw _0x2e6cc0;}});}}
10
10
 
11
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x94b0fc,_0x56b963,_0x3d389e,_0x5372ab){function _0x25d07d(_0x573c19){return _0x573c19 instanceof _0x3d389e?_0x573c19:new _0x3d389e(function(_0x54c545){_0x54c545(_0x573c19);});}return new(_0x3d389e||(_0x3d389e=Promise))(function(_0x3a1d22,_0x55c797){function _0x5556b7(_0x36dd72){try{_0x26aaf9(_0x5372ab['next'](_0x36dd72));}catch(_0x488f70){_0x55c797(_0x488f70);}}function _0x3c4c3d(_0x2d4e8a){try{_0x26aaf9(_0x5372ab['throw'](_0x2d4e8a));}catch(_0x5a56af){_0x55c797(_0x5a56af);}}function _0x26aaf9(_0x6220f3){_0x6220f3['done']?_0x3a1d22(_0x6220f3['value']):_0x25d07d(_0x6220f3['value'])['then'](_0x5556b7,_0x3c4c3d);}_0x26aaf9((_0x5372ab=_0x5372ab['apply'](_0x94b0fc,_0x56b963||[]))['next']());});};class Fetch{constructor(_0x309782){this['baseUri']=_0x309782,this['getUrl']=_0x3826c0=>{return _0x3826c0['startsWith']('/')&&(_0x3826c0=_0x3826c0['replace']('/','')),''+this['baseUri']+_0x3826c0;},!_0x309782['endsWith']('/')&&(_0x309782=_0x309782+'/');}['get'](_0x50571f,_0x5cf54a){return __awaiter$2(this,void 0,void 0,function*(){const _0x249472=this['getUrl'](_0x50571f);return yield fetch(_0x249472,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x5cf54a}});});}['post'](_0xcd878a,_0x551ba4,_0x3ca48c){return __awaiter$2(this,void 0,void 0,function*(){const _0x19699d=this['getUrl'](_0xcd878a);return yield fetch(_0x19699d,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x551ba4},'body':_0x3ca48c?JSON['stringify'](_0x3ca48c):null});});}['put'](_0x3e31c9,_0x24f5ef,_0x1d7516){return __awaiter$2(this,void 0,void 0,function*(){const _0x4ba5d9=this['getUrl'](_0x3e31c9);return yield fetch(_0x4ba5d9,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x24f5ef},'body':_0x1d7516?JSON['stringify'](_0x1d7516):null});});}['delete'](_0x3052db,_0x256e41){return __awaiter$2(this,void 0,void 0,function*(){const _0x3256e4=this['getUrl'](_0x3052db);return yield fetch(_0x3256e4,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x256e41}});});}}
11
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x202894,_0x15e95e,_0x37770d,_0x130710){function _0x2f72a0(_0x471abe){return _0x471abe instanceof _0x37770d?_0x471abe:new _0x37770d(function(_0xcc4807){_0xcc4807(_0x471abe);});}return new(_0x37770d||(_0x37770d=Promise))(function(_0x140be4,_0x59ff25){function _0x3939e9(_0x4069c2){try{_0x27b45f(_0x130710['next'](_0x4069c2));}catch(_0x5a1e1c){_0x59ff25(_0x5a1e1c);}}function _0x556d01(_0x4f4159){try{_0x27b45f(_0x130710['throw'](_0x4f4159));}catch(_0x177547){_0x59ff25(_0x177547);}}function _0x27b45f(_0x5c9c4e){_0x5c9c4e['done']?_0x140be4(_0x5c9c4e['value']):_0x2f72a0(_0x5c9c4e['value'])['then'](_0x3939e9,_0x556d01);}_0x27b45f((_0x130710=_0x130710['apply'](_0x202894,_0x15e95e||[]))['next']());});};class Fetch{constructor(_0x235d19){this['baseUri']=_0x235d19,this['getUrl']=_0x28b28f=>{return _0x28b28f['startsWith']('/')&&(_0x28b28f=_0x28b28f['replace']('/','')),''+this['baseUri']+_0x28b28f;},!_0x235d19['endsWith']('/')&&(_0x235d19=_0x235d19+'/');}['get'](_0x55a359,_0x5e6b4d){return __awaiter$2(this,void 0,void 0,function*(){const _0x20e599=this['getUrl'](_0x55a359);return yield fetch(_0x20e599,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x5e6b4d}});});}['post'](_0x2a1f61,_0x2475be,_0x174afb){return __awaiter$2(this,void 0,void 0,function*(){const _0x36c27a=this['getUrl'](_0x2a1f61);return yield fetch(_0x36c27a,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2475be},'body':_0x174afb?JSON['stringify'](_0x174afb):null});});}['PostNoAuth'](_0x58e2a7,_0x5cd3b6){return __awaiter$2(this,void 0,void 0,function*(){const _0x1b84e7=this['getUrl'](_0x58e2a7);return yield fetch(_0x1b84e7,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0x5cd3b6?JSON['stringify'](_0x5cd3b6):null});});}['put'](_0x2209e6,_0x1a0db0,_0x30e2a4){return __awaiter$2(this,void 0,void 0,function*(){const _0x1b5dd3=this['getUrl'](_0x2209e6);return yield fetch(_0x1b5dd3,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1a0db0},'body':_0x30e2a4?JSON['stringify'](_0x30e2a4):null});});}['delete'](_0x4afda9,_0x4cdefa){return __awaiter$2(this,void 0,void 0,function*(){const _0x38146d=this['getUrl'](_0x4afda9);return yield fetch(_0x38146d,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4cdefa}});});}}
12
12
 
13
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x1e9341,_0x3448db,_0x596d28,_0x5ab9c5){function _0x1f1499(_0x181384){return _0x181384 instanceof _0x596d28?_0x181384:new _0x596d28(function(_0x3f33ae){_0x3f33ae(_0x181384);});}return new(_0x596d28||(_0x596d28=Promise))(function(_0x55e5c5,_0x58eb06){function _0x300c12(_0x1268b8){try{_0x4551e2(_0x5ab9c5['next'](_0x1268b8));}catch(_0x57a164){_0x58eb06(_0x57a164);}}function _0x5032fa(_0x279260){try{_0x4551e2(_0x5ab9c5['throw'](_0x279260));}catch(_0x3ec2d7){_0x58eb06(_0x3ec2d7);}}function _0x4551e2(_0x5d7e8d){_0x5d7e8d['done']?_0x55e5c5(_0x5d7e8d['value']):_0x1f1499(_0x5d7e8d['value'])['then'](_0x300c12,_0x5032fa);}_0x4551e2((_0x5ab9c5=_0x5ab9c5['apply'](_0x1e9341,_0x3448db||[]))['next']());});};class SearchServersService{constructor(_0x2cd619){this['fetch']=_0x2cd619,this['path']='search-services';}['create'](_0x4f623a,_0x293351,_0x201520,_0x5186a8,_0x3adf14,_0x1cd8c7,_0x3d03aa,_0x2c3fcb){return __awaiter$1(this,void 0,void 0,function*(){const _0x458fe2={'account_name':_0x4f623a,'search_service_name':_0x293351,'endpoint':_0x201520,'key':_0x5186a8,'county':_0x3adf14,'provider':_0x1cd8c7,'index_name':_0x3d03aa};try{const _0x5c825b=yield this['fetch']['post'](this['path'],_0x2c3fcb,_0x458fe2);if(_0x5c825b['status']>0xc7&&_0x5c825b['status']<0x12c){const _0x1d1a28=yield _0x5c825b['json']();return new SuccessfulSearchServiceResponse(_0x1d1a28);}const _0x27f014=yield _0x5c825b['json']();return new FailedSearchServiceResponse(_0x27f014);}catch(_0x23ffaf){if(_0x23ffaf instanceof Error)return new FailedSearchServiceResponse({'detail':_0x23ffaf['message'],'title':_0x23ffaf['name'],'status':0x1f4,'instance':'','type':''});throw _0x23ffaf;}});}['delete'](_0x381b26,_0x4d1e03,_0x45fe8b){return __awaiter$1(this,void 0,void 0,function*(){const _0x507cec=this['path']+'/'+_0x381b26+'/'+_0x4d1e03;try{const _0x1a6912=yield this['fetch']['delete'](_0x507cec,_0x45fe8b);if(_0x1a6912['status']>0xc7&&_0x1a6912['status']<0x12c)return new SuccessfulResponse({});const _0x29053a=yield _0x1a6912['json']();return new FailedResponse(_0x29053a);}catch(_0x5b9aa9){if(_0x5b9aa9 instanceof Error)return new FailedResponse({'detail':_0x5b9aa9['message'],'title':_0x5b9aa9['name'],'status':0x1f4,'instance':'','type':''});throw _0x5b9aa9;}});}['view'](_0x27df0b,_0x5d23fe,_0xe8ec43){return __awaiter$1(this,void 0,void 0,function*(){const _0x32f259=this['path']+'/'+_0x27df0b+'/'+_0x5d23fe;try{const _0x504c6a=yield this['fetch']['get'](_0x32f259,_0xe8ec43);if(_0x504c6a['status']>0xc7&&_0x504c6a['status']<0x12c){const _0x241ca7=yield _0x504c6a['json']();return new SuccessfulViewSearchServiceResponse(_0x241ca7);}const _0x27506d=yield _0x504c6a['json']();return new FailedViewSearchServiceResponse(_0x27506d);}catch(_0x3a862c){if(_0x3a862c instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x3a862c['message'],'title':_0x3a862c['name'],'status':0x1f4,'instance':'','type':''});throw _0x3a862c;}});}}
13
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0xcd2358,_0x1e42e0,_0x514729,_0x5e902a){function _0x3b3462(_0x434dee){return _0x434dee instanceof _0x514729?_0x434dee:new _0x514729(function(_0x19e6cb){_0x19e6cb(_0x434dee);});}return new(_0x514729||(_0x514729=Promise))(function(_0x133e99,_0xf58e53){function _0x3445ac(_0x4f9dad){try{_0x48a265(_0x5e902a['next'](_0x4f9dad));}catch(_0x46ac56){_0xf58e53(_0x46ac56);}}function _0x41477a(_0x16b0dd){try{_0x48a265(_0x5e902a['throw'](_0x16b0dd));}catch(_0x43a525){_0xf58e53(_0x43a525);}}function _0x48a265(_0x519231){_0x519231['done']?_0x133e99(_0x519231['value']):_0x3b3462(_0x519231['value'])['then'](_0x3445ac,_0x41477a);}_0x48a265((_0x5e902a=_0x5e902a['apply'](_0xcd2358,_0x1e42e0||[]))['next']());});};class SearchServersService{constructor(_0xe821ff){this['fetch']=_0xe821ff,this['path']='search-services';}['create'](_0x3b91b1,_0x3cc781,_0x4afd9c,_0x1f25ac,_0xc6a9fb,_0x20675e,_0x2de146,_0x4696c3){return __awaiter$1(this,void 0,void 0,function*(){const _0x17fdfa={'account_name':_0x3b91b1,'search_service_name':_0x3cc781,'endpoint':_0x4afd9c,'key':_0x1f25ac,'country':_0xc6a9fb,'provider':_0x20675e,'index_name':_0x2de146};try{const _0x27f95b=yield this['fetch']['post'](this['path'],_0x4696c3,_0x17fdfa);if(_0x27f95b['status']>0xc7&&_0x27f95b['status']<0x12c){const _0x3ab8a4=yield _0x27f95b['json']();return new SuccessfulSearchServiceResponse(_0x3ab8a4);}const _0x4cf1a5=yield _0x27f95b['json']();return new FailedSearchServiceResponse(_0x4cf1a5);}catch(_0x47723a){if(_0x47723a instanceof Error)return new FailedSearchServiceResponse({'detail':_0x47723a['message'],'title':_0x47723a['name'],'status':0x1f4,'instance':'','type':''});throw _0x47723a;}});}['delete'](_0x429b46,_0x1393a0,_0x50cb9e){return __awaiter$1(this,void 0,void 0,function*(){const _0x553ca2=this['path']+'/'+_0x429b46+'/'+_0x1393a0;try{const _0x5cb37e=yield this['fetch']['delete'](_0x553ca2,_0x50cb9e);if(_0x5cb37e['status']>0xc7&&_0x5cb37e['status']<0x12c)return new SuccessfulResponse({});const _0x494bd4=yield _0x5cb37e['json']();return new FailedResponse(_0x494bd4);}catch(_0x5c3ae5){if(_0x5c3ae5 instanceof Error)return new FailedResponse({'detail':_0x5c3ae5['message'],'title':_0x5c3ae5['name'],'status':0x1f4,'instance':'','type':''});throw _0x5c3ae5;}});}['view'](_0x3aa7d4,_0x590d48,_0x4f2c3c){return __awaiter$1(this,void 0,void 0,function*(){const _0x133a0d=this['path']+'/'+_0x3aa7d4+'/'+_0x590d48;try{const _0x51d3f8=yield this['fetch']['get'](_0x133a0d,_0x4f2c3c);if(_0x51d3f8['status']>0xc7&&_0x51d3f8['status']<0x12c){const _0x513d7c=yield _0x51d3f8['json']();return new SuccessfulViewSearchServiceResponse(_0x513d7c);}const _0x1e0652=yield _0x51d3f8['json']();return new FailedViewSearchServiceResponse(_0x1e0652);}catch(_0x3567bf){if(_0x3567bf instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x3567bf['message'],'title':_0x3567bf['name'],'status':0x1f4,'instance':'','type':''});throw _0x3567bf;}});}}
14
14
 
15
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x3e6fab,_0x4f9535,_0x1fd7a0,_0x56fd27){function _0x3cc5bb(_0x5278d8){return _0x5278d8 instanceof _0x1fd7a0?_0x5278d8:new _0x1fd7a0(function(_0xf79c9d){_0xf79c9d(_0x5278d8);});}return new(_0x1fd7a0||(_0x1fd7a0=Promise))(function(_0x4bd71e,_0xc4cf31){function _0x57c77e(_0x3a615d){try{_0x22fd2e(_0x56fd27['next'](_0x3a615d));}catch(_0x3b33eb){_0xc4cf31(_0x3b33eb);}}function _0x1a4867(_0x4b6ceb){try{_0x22fd2e(_0x56fd27['throw'](_0x4b6ceb));}catch(_0x55c49b){_0xc4cf31(_0x55c49b);}}function _0x22fd2e(_0x111fcc){_0x111fcc['done']?_0x4bd71e(_0x111fcc['value']):_0x3cc5bb(_0x111fcc['value'])['then'](_0x57c77e,_0x1a4867);}_0x22fd2e((_0x56fd27=_0x56fd27['apply'](_0x3e6fab,_0x4f9535||[]))['next']());});};class AdminClient{constructor(_0x32b16f='https://admin.searchability.dev/'){var _0x2f6301=new Fetch(_0x32b16f);this['Accounts']=new AccountService(_0x2f6301),this['Lists']=new ListService(_0x2f6301),this['ApiKeys']=new ApiKeyService(_0x2f6301),this['SearchServices']=new SearchServersService(_0x2f6301);}}class AuthClient{constructor(_0x4f74a8='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x4f74a8);}['login'](_0x226e1b){return __awaiter(this,void 0,void 0,function*(){var _0x22243e='login/'+_0x226e1b;try{const _0x45e285=yield yield fetch(_0x22243e);if(_0x45e285['status']>0xc7&&_0x45e285['status']<0x12c){const _0x2fc774=yield _0x45e285['json']();return new SuccessfulAuthResponse(_0x2fc774);}const _0x2895d6=yield _0x45e285['json']();return new FailedAuthResponse(_0x2895d6);}catch(_0xe599d9){if(_0xe599d9 instanceof Error)return new FailedAuthResponse({'detail':_0xe599d9['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0xe599d9;}});}['refresh'](_0x53aea8){return __awaiter(this,void 0,void 0,function*(){var _0x28ceb9='refresh';try{const _0x16bc86=yield this['fetch']['post'](_0x28ceb9,_0x53aea8,null);if(_0x16bc86['status']>0xc7&&_0x16bc86['status']<0x12c){const _0x4d62a5=yield _0x16bc86['json']();return new SuccessfulAuthResponse(_0x4d62a5);}const _0x1b0d9f=yield _0x16bc86['json']();return new FailedAuthResponse(_0x1b0d9f);}catch(_0x34e459){if(_0x34e459 instanceof Error)return new FailedAuthResponse({'detail':_0x34e459['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x34e459;}});}['getTokenStatus'](_0x526907){if(Date['now']()<_0x526907['access_expires'])return exports.TokenStatus['Ok'];if(Date['now']()<_0x526907['refresh_expires'])return exports.TokenStatus['Refresh'];return exports.TokenStatus['Expired'];}}
15
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x131f95,_0x282648,_0x1e47c6,_0xb9e15){function _0x407f75(_0x2588bd){return _0x2588bd instanceof _0x1e47c6?_0x2588bd:new _0x1e47c6(function(_0x150f71){_0x150f71(_0x2588bd);});}return new(_0x1e47c6||(_0x1e47c6=Promise))(function(_0x5e0ba3,_0x488914){function _0x1b9552(_0x15d883){try{_0x18d30d(_0xb9e15['next'](_0x15d883));}catch(_0x4c0fed){_0x488914(_0x4c0fed);}}function _0x232cfd(_0x3675bb){try{_0x18d30d(_0xb9e15['throw'](_0x3675bb));}catch(_0x211d5f){_0x488914(_0x211d5f);}}function _0x18d30d(_0x46c24b){_0x46c24b['done']?_0x5e0ba3(_0x46c24b['value']):_0x407f75(_0x46c24b['value'])['then'](_0x1b9552,_0x232cfd);}_0x18d30d((_0xb9e15=_0xb9e15['apply'](_0x131f95,_0x282648||[]))['next']());});};class AdminClient{constructor(_0x2c9577='https://admin.searchability.dev/'){var _0xf0d179=new Fetch(_0x2c9577);this['Accounts']=new AccountService(_0xf0d179),this['Lists']=new ListService(_0xf0d179),this['ApiKeys']=new ApiKeyService(_0xf0d179),this['SearchServices']=new SearchServersService(_0xf0d179);}}class AuthClient{constructor(_0x1b5981='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x1b5981);}['login'](_0x519ade){return __awaiter(this,void 0,void 0,function*(){const _0x50c127='login/'+_0x519ade;try{const _0x4c7484=yield yield fetch(_0x50c127);if(_0x4c7484['status']>0xc7&&_0x4c7484['status']<0x12c){const _0x26deea=yield _0x4c7484['json']();return new SuccessfulAuthResponse(_0x26deea);}const _0x33f13d=yield _0x4c7484['json']();return new FailedAuthResponse(_0x33f13d);}catch(_0x1d9e54){if(_0x1d9e54 instanceof Error)return new FailedAuthResponse({'detail':_0x1d9e54['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x1d9e54;}});}['refresh'](_0x33fbf0){return __awaiter(this,void 0,void 0,function*(){const _0x4bc155='refresh',_0x430f72={'refresh_token':_0x33fbf0};try{const _0x24ba83=yield this['fetch']['PostNoAuth'](_0x4bc155,_0x430f72);if(_0x24ba83['status']>0xc7&&_0x24ba83['status']<0x12c){const _0x3a0b29=yield _0x24ba83['json']();return new SuccessfulAuthResponse(_0x3a0b29);}const _0x5369e7=yield _0x24ba83['json']();return new FailedAuthResponse(_0x5369e7);}catch(_0xcf2be6){if(_0xcf2be6 instanceof Error)return new FailedAuthResponse({'detail':_0xcf2be6['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0xcf2be6;}});}['getTokenStatus'](_0x423c03){if(Date['now']()<_0x423c03['access_expires'])return exports.TokenStatus['Ok'];if(Date['now']()<_0x423c03['refresh_expires'])return exports.TokenStatus['Refresh'];return exports.TokenStatus['Expired'];}}
16
16
 
17
17
  exports.AdminClient = AdminClient;
18
18
  exports.AuthClient = AuthClient;
@@ -1,15 +1,15 @@
1
- var TokenStatus;(function(_0xcc7f41){_0xcc7f41[_0xcc7f41['Ok']=0x0]='Ok',_0xcc7f41[_0xcc7f41['Refresh']=0x1]='Refresh',_0xcc7f41[_0xcc7f41['Expired']=0x2]='Expired';}(TokenStatus||(TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}}class Response{constructor(_0x5dec2e){this['isSuccess']=_0x5dec2e;}}class SuccessfulAccountResponse extends Response{constructor(_0xfaa668){super(!![]),this['account']=_0xfaa668;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x2832f8){super(![]),this['problem']=_0x2832f8;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x24f834){super(!![]),this['tokens']=_0x24f834;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x4c4235){super(![]),this['problem']=_0x4c4235;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x47f45e){super(!![]),this['apiKey']=_0x47f45e;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x3648c7){super(![]),this['problem']=_0x3648c7;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x59802f){super(!![]),this['searchService']=_0x59802f;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x57b510){super(![]),this['problem']=_0x57b510;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x3c9d2a){super(!![]),this['searchService']=_0x3c9d2a;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServiceResponse extends Response{constructor(_0xe569c0){super(![]),this['problem']=_0xe569c0;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x1bafe9){super(!![]),this['apiKeyValue']=_0x1bafe9;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x3b846a){super(!![]),this['obj']=_0x3b846a;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x5eb491){super(![]),this['problem']=_0x5eb491;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x47e230){super(![]),this['problem']=_0x47e230;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
1
+ var TokenStatus;(function(_0x134459){_0x134459[_0x134459['Ok']=0x0]='Ok',_0x134459[_0x134459['Refresh']=0x1]='Refresh',_0x134459[_0x134459['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(_0x557fd3){this['isSuccess']=_0x557fd3;}}class SuccessfulAccountResponse extends Response{constructor(_0x5b39c1){super(!![]),this['account']=_0x5b39c1;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x59c3e8){super(![]),this['problem']=_0x59c3e8;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x4d1e5c){super(!![]),this['tokens']=_0x4d1e5c;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x9f5df5){super(![]),this['problem']=_0x9f5df5;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x2dc0e4){super(!![]),this['apiKey']=_0x2dc0e4;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x40b50d){super(![]),this['problem']=_0x40b50d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0xdc43a9){super(!![]),this['searchService']=_0xdc43a9;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x2d5f75){super(![]),this['problem']=_0x2d5f75;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x599ec0){super(!![]),this['searchService']=_0x599ec0;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServiceResponse extends Response{constructor(_0x31c1d2){super(![]),this['problem']=_0x31c1d2;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x5f2935){super(!![]),this['apiKeyValue']=_0x5f2935;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x58961f){super(!![]),this['obj']=_0x58961f;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x528797){super(![]),this['problem']=_0x528797;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x476bb2){super(![]),this['problem']=_0x476bb2;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
2
2
 
3
- var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x398f8b,_0x54116c,_0xf9f5fe,_0x5df177){function _0x336dd9(_0x501eba){return _0x501eba instanceof _0xf9f5fe?_0x501eba:new _0xf9f5fe(function(_0x12045a){_0x12045a(_0x501eba);});}return new(_0xf9f5fe||(_0xf9f5fe=Promise))(function(_0x19e5e9,_0xfd472f){function _0x4bb307(_0x2be13b){try{_0x48caff(_0x5df177['next'](_0x2be13b));}catch(_0x52090b){_0xfd472f(_0x52090b);}}function _0x38a017(_0x5a1b7e){try{_0x48caff(_0x5df177['throw'](_0x5a1b7e));}catch(_0x27b423){_0xfd472f(_0x27b423);}}function _0x48caff(_0x55fbe9){_0x55fbe9['done']?_0x19e5e9(_0x55fbe9['value']):_0x336dd9(_0x55fbe9['value'])['then'](_0x4bb307,_0x38a017);}_0x48caff((_0x5df177=_0x5df177['apply'](_0x398f8b,_0x54116c||[]))['next']());});};class AccountService{constructor(_0x1f8046){this['fetch']=_0x1f8046;}['get'](_0x44d715,_0x535f6e){return __awaiter$5(this,void 0,void 0,function*(){const _0x33492c='Account/'+_0x44d715+'/',_0x2919f8=yield this['fetch']['get'](_0x33492c,_0x535f6e);try{if(_0x2919f8['status']>0xc7&&_0x2919f8['status']<0x12c){const _0x903910=yield _0x2919f8['json']();return new SuccessfulAccountResponse(_0x903910);}const _0x8d0e12=yield _0x2919f8['json']();return new FailedAccountResponse(_0x8d0e12);}catch(_0x411612){if(_0x411612 instanceof Error)return new FailedAccountResponse({'detail':_0x411612['message'],'title':_0x411612['name'],'status':0x1f4,'instance':'','type':''});throw _0x411612;}});}}
3
+ var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x2f14bd,_0x656869,_0x5e0ee1,_0x2aaa8b){function _0x1beaf0(_0x1172d7){return _0x1172d7 instanceof _0x5e0ee1?_0x1172d7:new _0x5e0ee1(function(_0x427a3b){_0x427a3b(_0x1172d7);});}return new(_0x5e0ee1||(_0x5e0ee1=Promise))(function(_0x4dfa6c,_0x513a51){function _0x1c7f6c(_0x51fe64){try{_0x41f9a0(_0x2aaa8b['next'](_0x51fe64));}catch(_0x5af6da){_0x513a51(_0x5af6da);}}function _0x3962ea(_0x102948){try{_0x41f9a0(_0x2aaa8b['throw'](_0x102948));}catch(_0x15ac58){_0x513a51(_0x15ac58);}}function _0x41f9a0(_0x4182af){_0x4182af['done']?_0x4dfa6c(_0x4182af['value']):_0x1beaf0(_0x4182af['value'])['then'](_0x1c7f6c,_0x3962ea);}_0x41f9a0((_0x2aaa8b=_0x2aaa8b['apply'](_0x2f14bd,_0x656869||[]))['next']());});};class AccountService{constructor(_0x57fc81){this['fetch']=_0x57fc81;}['get'](_0x5932f3,_0x5b6f43){return __awaiter$5(this,void 0,void 0,function*(){const _0xa4f96c='Account/'+_0x5932f3+'/',_0x2b0d8a=yield this['fetch']['get'](_0xa4f96c,_0x5b6f43);try{if(_0x2b0d8a['status']>0xc7&&_0x2b0d8a['status']<0x12c){const _0x2b7867=yield _0x2b0d8a['json']();return new SuccessfulAccountResponse(_0x2b7867);}const _0xc7342d=yield _0x2b0d8a['json']();return new FailedAccountResponse(_0xc7342d);}catch(_0x1cffd4){if(_0x1cffd4 instanceof Error)return new FailedAccountResponse({'detail':_0x1cffd4['message'],'title':_0x1cffd4['name'],'status':0x1f4,'instance':'','type':''});throw _0x1cffd4;}});}}
4
4
 
5
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x505088,_0x159649,_0x327e23,_0x41efc9){function _0x3107df(_0x15c31b){return _0x15c31b instanceof _0x327e23?_0x15c31b:new _0x327e23(function(_0x1c9aa3){_0x1c9aa3(_0x15c31b);});}return new(_0x327e23||(_0x327e23=Promise))(function(_0x2d6335,_0xa5961){function _0x10ce79(_0x1ffe35){try{_0x5e287b(_0x41efc9['next'](_0x1ffe35));}catch(_0x54cd61){_0xa5961(_0x54cd61);}}function _0x24c2f3(_0x1b10eb){try{_0x5e287b(_0x41efc9['throw'](_0x1b10eb));}catch(_0x583f33){_0xa5961(_0x583f33);}}function _0x5e287b(_0x358095){_0x358095['done']?_0x2d6335(_0x358095['value']):_0x3107df(_0x358095['value'])['then'](_0x10ce79,_0x24c2f3);}_0x5e287b((_0x41efc9=_0x41efc9['apply'](_0x505088,_0x159649||[]))['next']());});};class ApiKeyService{constructor(_0x502cc8){this['fetch']=_0x502cc8,this['path']='api-key';}['create'](_0x2c3674,_0xbff849,_0x52257a){return __awaiter$4(this,void 0,void 0,function*(){const _0x2cf981={'account_name':_0x2c3674,'api_key_name':_0xbff849};try{const _0x1bded8=yield this['fetch']['post'](this['path'],_0x52257a,_0x2cf981);if(_0x1bded8['status']>0xc7&&_0x1bded8['status']<0x12c){const _0x4a4e18=yield _0x1bded8['json']();return new SuccessfulApiKeyResponse(_0x4a4e18);}const _0x23658d=yield _0x1bded8['json']();return new FailedApiKeyResponse(_0x23658d);}catch(_0x10f879){if(_0x10f879 instanceof Error)return new FailedApiKeyResponse({'detail':_0x10f879['message'],'title':_0x10f879['name'],'status':0x1f4,'instance':'','type':''});throw _0x10f879;}});}['view'](_0x4d6dd9,_0x719b16,_0x32cb85){return __awaiter$4(this,void 0,void 0,function*(){const _0x592744=this['path']+'/'+_0x4d6dd9+'/'+_0x719b16;try{const _0x43e2a3=yield this['fetch']['get'](_0x592744,_0x32cb85);if(_0x43e2a3['status']>0xc7&&_0x43e2a3['status']<0x12c){const _0x1cc273=yield _0x43e2a3['json']();return new SuccessfulApiKeyValueResponse(_0x1cc273);}const _0x2a3f0d=yield _0x43e2a3['json']();return new FailedApiKeyValueResponse(_0x2a3f0d);}catch(_0x4d485c){if(_0x4d485c instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x4d485c['message'],'title':_0x4d485c['name'],'status':0x1f4,'instance':'','type':''});throw _0x4d485c;}});}['delete'](_0x50651b,_0x238dd0,_0x1949a4){return __awaiter$4(this,void 0,void 0,function*(){const _0x2bdab1=this['path']+'/'+_0x50651b+'/'+_0x238dd0;try{const _0x89551=yield this['fetch']['delete'](_0x2bdab1,_0x1949a4);if(_0x89551['status']>0xc7&&_0x89551['status']<0x12c)return new SuccessfulResponse({});const _0x492d04=yield _0x89551['json']();return new FailedResponse(_0x492d04);}catch(_0x346549){if(_0x346549 instanceof Error)return new FailedResponse({'detail':_0x346549['message'],'title':_0x346549['name'],'status':0x1f4,'instance':'','type':''});throw _0x346549;}});}}
5
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x1c4f28,_0x4b5119,_0x3d7e29,_0x55089c){function _0xe441dc(_0x301590){return _0x301590 instanceof _0x3d7e29?_0x301590:new _0x3d7e29(function(_0x946634){_0x946634(_0x301590);});}return new(_0x3d7e29||(_0x3d7e29=Promise))(function(_0x117b23,_0x7d48fb){function _0x544179(_0x1bf33d){try{_0x2762f9(_0x55089c['next'](_0x1bf33d));}catch(_0x40a4de){_0x7d48fb(_0x40a4de);}}function _0xbf97c5(_0x1028f3){try{_0x2762f9(_0x55089c['throw'](_0x1028f3));}catch(_0x2b02b7){_0x7d48fb(_0x2b02b7);}}function _0x2762f9(_0x122c25){_0x122c25['done']?_0x117b23(_0x122c25['value']):_0xe441dc(_0x122c25['value'])['then'](_0x544179,_0xbf97c5);}_0x2762f9((_0x55089c=_0x55089c['apply'](_0x1c4f28,_0x4b5119||[]))['next']());});};class ApiKeyService{constructor(_0x32a035){this['fetch']=_0x32a035,this['path']='api-key';}['create'](_0x5b3c93,_0x56dbfc,_0x2fd0d2){return __awaiter$4(this,void 0,void 0,function*(){const _0x23ca18={'account_name':_0x5b3c93,'api_key_name':_0x56dbfc};try{const _0x173bb1=yield this['fetch']['post'](this['path'],_0x2fd0d2,_0x23ca18);if(_0x173bb1['status']>0xc7&&_0x173bb1['status']<0x12c){const _0x321147=yield _0x173bb1['json']();return new SuccessfulApiKeyResponse(_0x321147);}const _0x2278ad=yield _0x173bb1['json']();return new FailedApiKeyResponse(_0x2278ad);}catch(_0x3b7e7f){if(_0x3b7e7f instanceof Error)return new FailedApiKeyResponse({'detail':_0x3b7e7f['message'],'title':_0x3b7e7f['name'],'status':0x1f4,'instance':'','type':''});throw _0x3b7e7f;}});}['view'](_0x137674,_0x42c8c7,_0x62abd0){return __awaiter$4(this,void 0,void 0,function*(){const _0x478a50=this['path']+'/'+_0x137674+'/'+_0x42c8c7;try{const _0x29319d=yield this['fetch']['get'](_0x478a50,_0x62abd0);if(_0x29319d['status']>0xc7&&_0x29319d['status']<0x12c){const _0x1eb5f9=yield _0x29319d['json']();return new SuccessfulApiKeyValueResponse(_0x1eb5f9);}const _0x125726=yield _0x29319d['json']();return new FailedApiKeyValueResponse(_0x125726);}catch(_0x1116c1){if(_0x1116c1 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x1116c1['message'],'title':_0x1116c1['name'],'status':0x1f4,'instance':'','type':''});throw _0x1116c1;}});}['delete'](_0xa0eacf,_0xd2a95c,_0x4f5e0f){return __awaiter$4(this,void 0,void 0,function*(){const _0x399850=this['path']+'/'+_0xa0eacf+'/'+_0xd2a95c;try{const _0xdd11d8=yield this['fetch']['delete'](_0x399850,_0x4f5e0f);if(_0xdd11d8['status']>0xc7&&_0xdd11d8['status']<0x12c)return new SuccessfulResponse({});const _0x1e292a=yield _0xdd11d8['json']();return new FailedResponse(_0x1e292a);}catch(_0x11183b){if(_0x11183b instanceof Error)return new FailedResponse({'detail':_0x11183b['message'],'title':_0x11183b['name'],'status':0x1f4,'instance':'','type':''});throw _0x11183b;}});}}
6
6
 
7
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x18a808,_0x139ec6,_0x586863,_0x486a81){function _0x40e084(_0x1105ff){return _0x1105ff instanceof _0x586863?_0x1105ff:new _0x586863(function(_0x23bc53){_0x23bc53(_0x1105ff);});}return new(_0x586863||(_0x586863=Promise))(function(_0x2356f2,_0x468679){function _0x486d1c(_0x5799){try{_0x8c6c03(_0x486a81['next'](_0x5799));}catch(_0x350a43){_0x468679(_0x350a43);}}function _0x570a96(_0x5aaf49){try{_0x8c6c03(_0x486a81['throw'](_0x5aaf49));}catch(_0xbde17b){_0x468679(_0xbde17b);}}function _0x8c6c03(_0xda41cd){_0xda41cd['done']?_0x2356f2(_0xda41cd['value']):_0x40e084(_0xda41cd['value'])['then'](_0x486d1c,_0x570a96);}_0x8c6c03((_0x486a81=_0x486a81['apply'](_0x18a808,_0x139ec6||[]))['next']());});};class ListService{constructor(_0x279421){this['fetch']=_0x279421;}['add'](_0x555863,_0x3f5d0f,_0x5dd079){return __awaiter$3(this,void 0,void 0,function*(){const _0x34a0dc='List',_0x5aa9f4={'account_name':_0x555863,'list_name':_0x3f5d0f};try{const _0x52a3c8=yield this['fetch']['post'](_0x34a0dc,_0x5dd079,_0x5aa9f4);if(_0x52a3c8['status']>0xc7&&_0x52a3c8['status']<0x12c){const _0x21af37=yield _0x52a3c8['json']();return new SuccessfulAccountResponse(_0x21af37);}const _0x560264=yield _0x52a3c8['json']();return new FailedAccountResponse(_0x560264);}catch(_0x2d076b){if(_0x2d076b instanceof Error)return new FailedAccountResponse({'detail':_0x2d076b['message'],'title':_0x2d076b['name'],'status':0x1f4,'instance':'','type':''});throw _0x2d076b;}});}['remove'](_0x3f8715,_0x547e86,_0x277bd4){return __awaiter$3(this,void 0,void 0,function*(){const _0x8ff6c4='List/'+_0x3f8715+'/'+_0x547e86,_0x40c8e2=yield this['fetch']['delete'](_0x8ff6c4,_0x277bd4);try{if(_0x40c8e2['status']>0xc7&&_0x40c8e2['status']<0x12c){const _0xedd05c=yield _0x40c8e2['json']();return new SuccessfulAccountResponse(_0xedd05c);}const _0x13afb7=yield _0x40c8e2['json']();return new FailedAccountResponse(_0x13afb7);}catch(_0x4695f1){if(_0x4695f1 instanceof Error)return new FailedAccountResponse({'detail':_0x4695f1['message'],'title':_0x4695f1['name'],'status':0x1f4,'instance':'','type':''});throw _0x4695f1;}});}}
7
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x1a2a16,_0x4bd04a,_0x33e030,_0x30ad4b){function _0x47fa5f(_0x10d9cd){return _0x10d9cd instanceof _0x33e030?_0x10d9cd:new _0x33e030(function(_0x112e19){_0x112e19(_0x10d9cd);});}return new(_0x33e030||(_0x33e030=Promise))(function(_0x39ccf1,_0x4789f3){function _0x41f2e5(_0x5c7986){try{_0x4f6d30(_0x30ad4b['next'](_0x5c7986));}catch(_0x37040b){_0x4789f3(_0x37040b);}}function _0x4bc3eb(_0x4236b8){try{_0x4f6d30(_0x30ad4b['throw'](_0x4236b8));}catch(_0x478dd4){_0x4789f3(_0x478dd4);}}function _0x4f6d30(_0xc4107e){_0xc4107e['done']?_0x39ccf1(_0xc4107e['value']):_0x47fa5f(_0xc4107e['value'])['then'](_0x41f2e5,_0x4bc3eb);}_0x4f6d30((_0x30ad4b=_0x30ad4b['apply'](_0x1a2a16,_0x4bd04a||[]))['next']());});};class ListService{constructor(_0x422e3c){this['fetch']=_0x422e3c;}['add'](_0x4065a2,_0x8ef198,_0x5d860c){return __awaiter$3(this,void 0,void 0,function*(){const _0x542d33='List',_0x1d25f2={'account_name':_0x4065a2,'list_name':_0x8ef198};try{const _0x1bcac0=yield this['fetch']['post'](_0x542d33,_0x5d860c,_0x1d25f2);if(_0x1bcac0['status']>0xc7&&_0x1bcac0['status']<0x12c){const _0x4d4ebf=yield _0x1bcac0['json']();return new SuccessfulAccountResponse(_0x4d4ebf);}const _0x10dbc9=yield _0x1bcac0['json']();return new FailedAccountResponse(_0x10dbc9);}catch(_0x3084f3){if(_0x3084f3 instanceof Error)return new FailedAccountResponse({'detail':_0x3084f3['message'],'title':_0x3084f3['name'],'status':0x1f4,'instance':'','type':''});throw _0x3084f3;}});}['remove'](_0x5b5952,_0x3ce1ba,_0x2cebe8){return __awaiter$3(this,void 0,void 0,function*(){const _0x171575='List/'+_0x5b5952+'/'+_0x3ce1ba,_0x3d749e=yield this['fetch']['delete'](_0x171575,_0x2cebe8);try{if(_0x3d749e['status']>0xc7&&_0x3d749e['status']<0x12c){const _0x378678=yield _0x3d749e['json']();return new SuccessfulAccountResponse(_0x378678);}const _0x4a9a0f=yield _0x3d749e['json']();return new FailedAccountResponse(_0x4a9a0f);}catch(_0x4e4399){if(_0x4e4399 instanceof Error)return new FailedAccountResponse({'detail':_0x4e4399['message'],'title':_0x4e4399['name'],'status':0x1f4,'instance':'','type':''});throw _0x4e4399;}});}}
8
8
 
9
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x2bdf8d,_0x1e1c86,_0x4d3126,_0x286360){function _0x1562fc(_0x40024d){return _0x40024d instanceof _0x4d3126?_0x40024d:new _0x4d3126(function(_0x5cef9d){_0x5cef9d(_0x40024d);});}return new(_0x4d3126||(_0x4d3126=Promise))(function(_0x3e2318,_0x375510){function _0x5846da(_0x44b863){try{_0x4202a5(_0x286360['next'](_0x44b863));}catch(_0x4ecf9b){_0x375510(_0x4ecf9b);}}function _0xe9e3ee(_0x487040){try{_0x4202a5(_0x286360['throw'](_0x487040));}catch(_0x3f5493){_0x375510(_0x3f5493);}}function _0x4202a5(_0x3df88f){_0x3df88f['done']?_0x3e2318(_0x3df88f['value']):_0x1562fc(_0x3df88f['value'])['then'](_0x5846da,_0xe9e3ee);}_0x4202a5((_0x286360=_0x286360['apply'](_0x2bdf8d,_0x1e1c86||[]))['next']());});};class Fetch{constructor(_0x464e66){this['baseUri']=_0x464e66,this['getUrl']=_0x3f8f7a=>{return _0x3f8f7a['startsWith']('/')&&(_0x3f8f7a=_0x3f8f7a['replace']('/','')),''+this['baseUri']+_0x3f8f7a;},!_0x464e66['endsWith']('/')&&(_0x464e66=_0x464e66+'/');}['get'](_0x2298d4,_0x46359f){return __awaiter$2(this,void 0,void 0,function*(){const _0x3b3b92=this['getUrl'](_0x2298d4);return yield fetch(_0x3b3b92,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x46359f}});});}['post'](_0x40040c,_0x3d053d,_0x26d002){return __awaiter$2(this,void 0,void 0,function*(){const _0x4dfa81=this['getUrl'](_0x40040c);return yield fetch(_0x4dfa81,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3d053d},'body':_0x26d002?JSON['stringify'](_0x26d002):null});});}['put'](_0x5048ee,_0x38992c,_0x1a519e){return __awaiter$2(this,void 0,void 0,function*(){const _0x4b5627=this['getUrl'](_0x5048ee);return yield fetch(_0x4b5627,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x38992c},'body':_0x1a519e?JSON['stringify'](_0x1a519e):null});});}['delete'](_0x217087,_0x3ae04c){return __awaiter$2(this,void 0,void 0,function*(){const _0x55a3d1=this['getUrl'](_0x217087);return yield fetch(_0x55a3d1,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3ae04c}});});}}
9
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x5d1303,_0x48fdea,_0x3e53a2,_0x10a8e1){function _0x3df46d(_0x3db587){return _0x3db587 instanceof _0x3e53a2?_0x3db587:new _0x3e53a2(function(_0x4cda16){_0x4cda16(_0x3db587);});}return new(_0x3e53a2||(_0x3e53a2=Promise))(function(_0x4ca2a9,_0x30df74){function _0x30593f(_0x44e128){try{_0xe5b5c3(_0x10a8e1['next'](_0x44e128));}catch(_0x2a0b46){_0x30df74(_0x2a0b46);}}function _0x295c25(_0x3e0f77){try{_0xe5b5c3(_0x10a8e1['throw'](_0x3e0f77));}catch(_0x3307ea){_0x30df74(_0x3307ea);}}function _0xe5b5c3(_0x23bc29){_0x23bc29['done']?_0x4ca2a9(_0x23bc29['value']):_0x3df46d(_0x23bc29['value'])['then'](_0x30593f,_0x295c25);}_0xe5b5c3((_0x10a8e1=_0x10a8e1['apply'](_0x5d1303,_0x48fdea||[]))['next']());});};class Fetch{constructor(_0x4b7c7c){this['baseUri']=_0x4b7c7c,this['getUrl']=_0x51ae8e=>{return _0x51ae8e['startsWith']('/')&&(_0x51ae8e=_0x51ae8e['replace']('/','')),''+this['baseUri']+_0x51ae8e;},!_0x4b7c7c['endsWith']('/')&&(_0x4b7c7c=_0x4b7c7c+'/');}['get'](_0x3d61df,_0x387fb3){return __awaiter$2(this,void 0,void 0,function*(){const _0xb73f8d=this['getUrl'](_0x3d61df);return yield fetch(_0xb73f8d,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x387fb3}});});}['post'](_0x7309b,_0x2e65bc,_0x11fc9c){return __awaiter$2(this,void 0,void 0,function*(){const _0x1b0765=this['getUrl'](_0x7309b);return yield fetch(_0x1b0765,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2e65bc},'body':_0x11fc9c?JSON['stringify'](_0x11fc9c):null});});}['PostNoAuth'](_0x20e7da,_0xa94fd1){return __awaiter$2(this,void 0,void 0,function*(){const _0x55ffa3=this['getUrl'](_0x20e7da);return yield fetch(_0x55ffa3,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0xa94fd1?JSON['stringify'](_0xa94fd1):null});});}['put'](_0x302f63,_0x5b6db5,_0x4ec37c){return __awaiter$2(this,void 0,void 0,function*(){const _0x545834=this['getUrl'](_0x302f63);return yield fetch(_0x545834,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x5b6db5},'body':_0x4ec37c?JSON['stringify'](_0x4ec37c):null});});}['delete'](_0x1b2525,_0x4cec03){return __awaiter$2(this,void 0,void 0,function*(){const _0x1c1d58=this['getUrl'](_0x1b2525);return yield fetch(_0x1c1d58,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4cec03}});});}}
10
10
 
11
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x482681,_0x5b10b7,_0x4f05b0,_0x156f7f){function _0x5e796f(_0x39084b){return _0x39084b instanceof _0x4f05b0?_0x39084b:new _0x4f05b0(function(_0x4fa4cc){_0x4fa4cc(_0x39084b);});}return new(_0x4f05b0||(_0x4f05b0=Promise))(function(_0x3f4e47,_0xf5cc32){function _0x3fc4d1(_0x49a31e){try{_0x45a382(_0x156f7f['next'](_0x49a31e));}catch(_0x5de3cc){_0xf5cc32(_0x5de3cc);}}function _0x39f641(_0x193d67){try{_0x45a382(_0x156f7f['throw'](_0x193d67));}catch(_0x3b1157){_0xf5cc32(_0x3b1157);}}function _0x45a382(_0x2001b9){_0x2001b9['done']?_0x3f4e47(_0x2001b9['value']):_0x5e796f(_0x2001b9['value'])['then'](_0x3fc4d1,_0x39f641);}_0x45a382((_0x156f7f=_0x156f7f['apply'](_0x482681,_0x5b10b7||[]))['next']());});};class SearchServersService{constructor(_0x3edc1a){this['fetch']=_0x3edc1a,this['path']='search-services';}['create'](_0x5d23aa,_0x2f0de5,_0x59bb12,_0x364758,_0x1ccfad,_0x2a47bb,_0x14b1aa,_0x261257){return __awaiter$1(this,void 0,void 0,function*(){const _0x35d1fc={'account_name':_0x5d23aa,'search_service_name':_0x2f0de5,'endpoint':_0x59bb12,'key':_0x364758,'county':_0x1ccfad,'provider':_0x2a47bb,'index_name':_0x14b1aa};try{const _0x590cb4=yield this['fetch']['post'](this['path'],_0x261257,_0x35d1fc);if(_0x590cb4['status']>0xc7&&_0x590cb4['status']<0x12c){const _0x412a91=yield _0x590cb4['json']();return new SuccessfulSearchServiceResponse(_0x412a91);}const _0x4c1145=yield _0x590cb4['json']();return new FailedSearchServiceResponse(_0x4c1145);}catch(_0x6d5b38){if(_0x6d5b38 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x6d5b38['message'],'title':_0x6d5b38['name'],'status':0x1f4,'instance':'','type':''});throw _0x6d5b38;}});}['delete'](_0x58225e,_0x3b09bd,_0x297a3a){return __awaiter$1(this,void 0,void 0,function*(){const _0x5bc371=this['path']+'/'+_0x58225e+'/'+_0x3b09bd;try{const _0x4c7258=yield this['fetch']['delete'](_0x5bc371,_0x297a3a);if(_0x4c7258['status']>0xc7&&_0x4c7258['status']<0x12c)return new SuccessfulResponse({});const _0xf15f18=yield _0x4c7258['json']();return new FailedResponse(_0xf15f18);}catch(_0x5e1562){if(_0x5e1562 instanceof Error)return new FailedResponse({'detail':_0x5e1562['message'],'title':_0x5e1562['name'],'status':0x1f4,'instance':'','type':''});throw _0x5e1562;}});}['view'](_0x2ab9be,_0x286cdf,_0x29efe3){return __awaiter$1(this,void 0,void 0,function*(){const _0x1af4de=this['path']+'/'+_0x2ab9be+'/'+_0x286cdf;try{const _0x10f46f=yield this['fetch']['get'](_0x1af4de,_0x29efe3);if(_0x10f46f['status']>0xc7&&_0x10f46f['status']<0x12c){const _0xda9bef=yield _0x10f46f['json']();return new SuccessfulViewSearchServiceResponse(_0xda9bef);}const _0x45dc8e=yield _0x10f46f['json']();return new FailedViewSearchServiceResponse(_0x45dc8e);}catch(_0x2d881e){if(_0x2d881e instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x2d881e['message'],'title':_0x2d881e['name'],'status':0x1f4,'instance':'','type':''});throw _0x2d881e;}});}}
11
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x14bfc6,_0x2faa98,_0x506f38,_0x3e4fba){function _0x2b8af8(_0x28d3f8){return _0x28d3f8 instanceof _0x506f38?_0x28d3f8:new _0x506f38(function(_0x3dfe4b){_0x3dfe4b(_0x28d3f8);});}return new(_0x506f38||(_0x506f38=Promise))(function(_0x5991d4,_0x148181){function _0x5f2dac(_0x55fabf){try{_0x25042a(_0x3e4fba['next'](_0x55fabf));}catch(_0x170cc0){_0x148181(_0x170cc0);}}function _0x259c28(_0x238d98){try{_0x25042a(_0x3e4fba['throw'](_0x238d98));}catch(_0x44b9b5){_0x148181(_0x44b9b5);}}function _0x25042a(_0x3af9ab){_0x3af9ab['done']?_0x5991d4(_0x3af9ab['value']):_0x2b8af8(_0x3af9ab['value'])['then'](_0x5f2dac,_0x259c28);}_0x25042a((_0x3e4fba=_0x3e4fba['apply'](_0x14bfc6,_0x2faa98||[]))['next']());});};class SearchServersService{constructor(_0x8640f9){this['fetch']=_0x8640f9,this['path']='search-services';}['create'](_0x5b1199,_0x5b41b4,_0x5e89ab,_0x3b58b1,_0x154287,_0x30048d,_0x2743e8,_0x5a6ff9){return __awaiter$1(this,void 0,void 0,function*(){const _0x5ad299={'account_name':_0x5b1199,'search_service_name':_0x5b41b4,'endpoint':_0x5e89ab,'key':_0x3b58b1,'country':_0x154287,'provider':_0x30048d,'index_name':_0x2743e8};try{const _0xacae29=yield this['fetch']['post'](this['path'],_0x5a6ff9,_0x5ad299);if(_0xacae29['status']>0xc7&&_0xacae29['status']<0x12c){const _0x21c156=yield _0xacae29['json']();return new SuccessfulSearchServiceResponse(_0x21c156);}const _0x3e1641=yield _0xacae29['json']();return new FailedSearchServiceResponse(_0x3e1641);}catch(_0x4c12b9){if(_0x4c12b9 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x4c12b9['message'],'title':_0x4c12b9['name'],'status':0x1f4,'instance':'','type':''});throw _0x4c12b9;}});}['delete'](_0x201535,_0x276cdc,_0x4b7e30){return __awaiter$1(this,void 0,void 0,function*(){const _0x4c5547=this['path']+'/'+_0x201535+'/'+_0x276cdc;try{const _0x2f7883=yield this['fetch']['delete'](_0x4c5547,_0x4b7e30);if(_0x2f7883['status']>0xc7&&_0x2f7883['status']<0x12c)return new SuccessfulResponse({});const _0x13a3df=yield _0x2f7883['json']();return new FailedResponse(_0x13a3df);}catch(_0x103b8c){if(_0x103b8c instanceof Error)return new FailedResponse({'detail':_0x103b8c['message'],'title':_0x103b8c['name'],'status':0x1f4,'instance':'','type':''});throw _0x103b8c;}});}['view'](_0x822caa,_0x1f2b4f,_0x2859c2){return __awaiter$1(this,void 0,void 0,function*(){const _0x4de163=this['path']+'/'+_0x822caa+'/'+_0x1f2b4f;try{const _0x142503=yield this['fetch']['get'](_0x4de163,_0x2859c2);if(_0x142503['status']>0xc7&&_0x142503['status']<0x12c){const _0x345afd=yield _0x142503['json']();return new SuccessfulViewSearchServiceResponse(_0x345afd);}const _0x58a004=yield _0x142503['json']();return new FailedViewSearchServiceResponse(_0x58a004);}catch(_0x8a5730){if(_0x8a5730 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x8a5730['message'],'title':_0x8a5730['name'],'status':0x1f4,'instance':'','type':''});throw _0x8a5730;}});}}
12
12
 
13
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x10c6e4,_0x2e189b,_0x498736,_0x30c1e8){function _0x187e90(_0x313fb7){return _0x313fb7 instanceof _0x498736?_0x313fb7:new _0x498736(function(_0x390275){_0x390275(_0x313fb7);});}return new(_0x498736||(_0x498736=Promise))(function(_0x35fbc6,_0x4c0579){function _0x486de9(_0x227e8e){try{_0x2c7d27(_0x30c1e8['next'](_0x227e8e));}catch(_0x34feec){_0x4c0579(_0x34feec);}}function _0x10b28a(_0x4095d1){try{_0x2c7d27(_0x30c1e8['throw'](_0x4095d1));}catch(_0x1be957){_0x4c0579(_0x1be957);}}function _0x2c7d27(_0x35fa37){_0x35fa37['done']?_0x35fbc6(_0x35fa37['value']):_0x187e90(_0x35fa37['value'])['then'](_0x486de9,_0x10b28a);}_0x2c7d27((_0x30c1e8=_0x30c1e8['apply'](_0x10c6e4,_0x2e189b||[]))['next']());});};class AdminClient{constructor(_0x3883b0='https://admin.searchability.dev/'){var _0x4a7d61=new Fetch(_0x3883b0);this['Accounts']=new AccountService(_0x4a7d61),this['Lists']=new ListService(_0x4a7d61),this['ApiKeys']=new ApiKeyService(_0x4a7d61),this['SearchServices']=new SearchServersService(_0x4a7d61);}}class AuthClient{constructor(_0x28c7ce='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x28c7ce);}['login'](_0x59ac26){return __awaiter(this,void 0,void 0,function*(){var _0x3f20e4='login/'+_0x59ac26;try{const _0x2667d7=yield yield fetch(_0x3f20e4);if(_0x2667d7['status']>0xc7&&_0x2667d7['status']<0x12c){const _0xb9f4ab=yield _0x2667d7['json']();return new SuccessfulAuthResponse(_0xb9f4ab);}const _0x4ad58d=yield _0x2667d7['json']();return new FailedAuthResponse(_0x4ad58d);}catch(_0x124141){if(_0x124141 instanceof Error)return new FailedAuthResponse({'detail':_0x124141['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x124141;}});}['refresh'](_0xa1a217){return __awaiter(this,void 0,void 0,function*(){var _0x13db93='refresh';try{const _0xc522b1=yield this['fetch']['post'](_0x13db93,_0xa1a217,null);if(_0xc522b1['status']>0xc7&&_0xc522b1['status']<0x12c){const _0x421431=yield _0xc522b1['json']();return new SuccessfulAuthResponse(_0x421431);}const _0x13cdb9=yield _0xc522b1['json']();return new FailedAuthResponse(_0x13cdb9);}catch(_0x157235){if(_0x157235 instanceof Error)return new FailedAuthResponse({'detail':_0x157235['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x157235;}});}['getTokenStatus'](_0x3b6e4b){if(Date['now']()<_0x3b6e4b['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x3b6e4b['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
13
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x586b4,_0x3f4412,_0x4e516f,_0x489260){function _0x32245a(_0x3e8041){return _0x3e8041 instanceof _0x4e516f?_0x3e8041:new _0x4e516f(function(_0x390ad0){_0x390ad0(_0x3e8041);});}return new(_0x4e516f||(_0x4e516f=Promise))(function(_0x2386f1,_0x1c4af8){function _0x60ce3b(_0xb4d021){try{_0x40d34c(_0x489260['next'](_0xb4d021));}catch(_0x485d90){_0x1c4af8(_0x485d90);}}function _0x1ed519(_0x22331c){try{_0x40d34c(_0x489260['throw'](_0x22331c));}catch(_0x216a4c){_0x1c4af8(_0x216a4c);}}function _0x40d34c(_0x508ad7){_0x508ad7['done']?_0x2386f1(_0x508ad7['value']):_0x32245a(_0x508ad7['value'])['then'](_0x60ce3b,_0x1ed519);}_0x40d34c((_0x489260=_0x489260['apply'](_0x586b4,_0x3f4412||[]))['next']());});};class AdminClient{constructor(_0x583b6d='https://admin.searchability.dev/'){var _0x976bac=new Fetch(_0x583b6d);this['Accounts']=new AccountService(_0x976bac),this['Lists']=new ListService(_0x976bac),this['ApiKeys']=new ApiKeyService(_0x976bac),this['SearchServices']=new SearchServersService(_0x976bac);}}class AuthClient{constructor(_0x567e20='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x567e20);}['login'](_0xcc3eef){return __awaiter(this,void 0,void 0,function*(){const _0x3b4b8a='login/'+_0xcc3eef;try{const _0xb4f71e=yield yield fetch(_0x3b4b8a);if(_0xb4f71e['status']>0xc7&&_0xb4f71e['status']<0x12c){const _0x4ad4ec=yield _0xb4f71e['json']();return new SuccessfulAuthResponse(_0x4ad4ec);}const _0x14463a=yield _0xb4f71e['json']();return new FailedAuthResponse(_0x14463a);}catch(_0x1b2a06){if(_0x1b2a06 instanceof Error)return new FailedAuthResponse({'detail':_0x1b2a06['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x1b2a06;}});}['refresh'](_0xaff76d){return __awaiter(this,void 0,void 0,function*(){const _0x3b6a8d='refresh',_0x3e94e3={'refresh_token':_0xaff76d};try{const _0x207630=yield this['fetch']['PostNoAuth'](_0x3b6a8d,_0x3e94e3);if(_0x207630['status']>0xc7&&_0x207630['status']<0x12c){const _0x260da6=yield _0x207630['json']();return new SuccessfulAuthResponse(_0x260da6);}const _0x1ff1f3=yield _0x207630['json']();return new FailedAuthResponse(_0x1ff1f3);}catch(_0x14f7ed){if(_0x14f7ed instanceof Error)return new FailedAuthResponse({'detail':_0x14f7ed['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x14f7ed;}});}['getTokenStatus'](_0x143fdf){if(Date['now']()<_0x143fdf['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x143fdf['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
14
14
 
15
15
  export { AdminClient, AuthClient, TokenStatus, Tokens };
package/dist/types.d.ts CHANGED
@@ -4,6 +4,7 @@ declare class Fetch {
4
4
  private getUrl;
5
5
  get(path: string, accessToken: string): Promise<globalThis.Response>;
6
6
  post(path: string, accessToken: string, body: any): Promise<globalThis.Response>;
7
+ PostNoAuth(path: string, body: any): Promise<globalThis.Response>;
7
8
  put(path: string, accessToken: string, body: any): Promise<globalThis.Response>;
8
9
  delete(path: string, accessToken: string): Promise<globalThis.Response>;
9
10
  }
@@ -34,7 +35,7 @@ declare class SearchServersService {
34
35
  private readonly fetch;
35
36
  private readonly path;
36
37
  constructor(fetch: Fetch);
37
- create(account_name: string, search_service_name: string, endpoint: string, key: string, county: string, provider: string, index_name: string, access_token: string): Promise<Response<SearchService, Problem>>;
38
+ create(account_name: string, search_service_name: string, endpoint: string, key: string, country: string, provider: string, index_name: string, access_token: string): Promise<Response<SearchService, Problem>>;
38
39
  delete(account_name: string, search_service_name: string, access_token: string): Promise<Response<any, Problem>>;
39
40
  view(account_name: string, search_service_name: string, access_token: string): Promise<Response<SearchServiceDetails, Problem>>;
40
41
  }
@@ -59,6 +60,9 @@ declare enum TokenStatus {
59
60
  Refresh = 1,
60
61
  Expired = 2
61
62
  }
63
+ type RefreshRequest = {
64
+ refresh_token: string;
65
+ };
62
66
  declare class Tokens {
63
67
  access_token: string;
64
68
  access_expires: number;
@@ -205,4 +209,4 @@ declare class FailedApiKeyValueResponse extends Response<ApiKeyValue, Problem> {
205
209
  toProblem(): Problem;
206
210
  }
207
211
 
208
- export { type Account, AdminClient, type ApiKey, type ApiKeyValue, AuthClient, type Error, FailedAccountResponse, FailedApiKeyResponse, FailedApiKeyValueResponse, FailedAuthResponse, FailedResponse, FailedSearchServiceResponse, FailedViewSearchServiceResponse, type List, type ListIdentity, type Problem, Response, type SearchService, type SearchServiceDetails, SuccessfulAccountResponse, SuccessfulApiKeyResponse, SuccessfulApiKeyValueResponse, SuccessfulAuthResponse, SuccessfulResponse, SuccessfulSearchServiceResponse, SuccessfulViewSearchServiceResponse, TokenStatus, Tokens };
212
+ export { type Account, AdminClient, type ApiKey, type ApiKeyValue, AuthClient, type Error, FailedAccountResponse, FailedApiKeyResponse, FailedApiKeyValueResponse, FailedAuthResponse, FailedResponse, FailedSearchServiceResponse, FailedViewSearchServiceResponse, type List, type ListIdentity, type Problem, type RefreshRequest, Response, type SearchService, type SearchServiceDetails, SuccessfulAccountResponse, SuccessfulApiKeyResponse, SuccessfulApiKeyValueResponse, SuccessfulAuthResponse, SuccessfulResponse, SuccessfulSearchServiceResponse, SuccessfulViewSearchServiceResponse, TokenStatus, Tokens };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@searchability/admin-client",
3
- "version": "0.0.40",
3
+ "version": "0.0.42",
4
4
  "description": "Searchability admin client.",
5
5
  "type": "module",
6
6
  "types": "./dist/types.d.ts",
@@ -1,15 +0,0 @@
1
- var TokenStatus;(function(_0x14c323){_0x14c323[_0x14c323['Ok']=0x0]='Ok',_0x14c323[_0x14c323['Refresh']=0x1]='Refresh',_0x14c323[_0x14c323['Expired']=0x2]='Expired';}(TokenStatus||(TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}}class Response{constructor(_0x45254f){this['isSuccess']=_0x45254f;}}class SuccessfulAccountResponse extends Response{constructor(_0x78e4a9){super(!![]),this['account']=_0x78e4a9;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x4b64cf){super(![]),this['problem']=_0x4b64cf;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x8b7fda){super(!![]),this['tokens']=_0x8b7fda;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x42da77){super(![]),this['problem']=_0x42da77;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x4a9ce2){super(!![]),this['apiKey']=_0x4a9ce2;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x11a863){super(![]),this['problem']=_0x11a863;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x6f69da){super(!![]),this['searchService']=_0x6f69da;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x32cc50){super(![]),this['problem']=_0x32cc50;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x48b6bc){super(!![]),this['searchService']=_0x48b6bc;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServiceResponse extends Response{constructor(_0x3bd2c2){super(![]),this['problem']=_0x3bd2c2;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0xc31e6d){super(!![]),this['apiKeyValue']=_0xc31e6d;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x4a03cf){super(!![]),this['obj']=_0x4a03cf;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x370603){super(![]),this['problem']=_0x370603;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x1469b9){super(![]),this['problem']=_0x1469b9;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
2
-
3
- var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x3c365c,_0x1d1fdd,_0x575a40,_0x7457e9){function _0x11767c(_0x479ee9){return _0x479ee9 instanceof _0x575a40?_0x479ee9:new _0x575a40(function(_0x2aab3d){_0x2aab3d(_0x479ee9);});}return new(_0x575a40||(_0x575a40=Promise))(function(_0x2d2a6e,_0x3db02d){function _0x2aa5b7(_0x1fe319){try{_0x52d05e(_0x7457e9['next'](_0x1fe319));}catch(_0x4ef43b){_0x3db02d(_0x4ef43b);}}function _0x5b55ae(_0x443872){try{_0x52d05e(_0x7457e9['throw'](_0x443872));}catch(_0x1530e9){_0x3db02d(_0x1530e9);}}function _0x52d05e(_0x272175){_0x272175['done']?_0x2d2a6e(_0x272175['value']):_0x11767c(_0x272175['value'])['then'](_0x2aa5b7,_0x5b55ae);}_0x52d05e((_0x7457e9=_0x7457e9['apply'](_0x3c365c,_0x1d1fdd||[]))['next']());});};class AccountService{constructor(_0x508759){this['fetch']=_0x508759;}['get'](_0x32c1d6,_0x846e6b){return __awaiter$5(this,void 0,void 0,function*(){const _0x126a70='Account/'+_0x32c1d6+'/',_0xc7fb8a=yield this['fetch']['get'](_0x126a70,_0x846e6b);try{if(_0xc7fb8a['status']>0xc7&&_0xc7fb8a['status']<0x12c){const _0xe505fd=yield _0xc7fb8a['json']();return new SuccessfulAccountResponse(_0xe505fd);}const _0x883870=yield _0xc7fb8a['json']();return new FailedAccountResponse(_0x883870);}catch(_0x17b89e){if(_0x17b89e instanceof Error)return new FailedAccountResponse({'detail':_0x17b89e['message'],'title':_0x17b89e['name'],'status':0x1f4,'instance':'','type':''});throw _0x17b89e;}});}}
4
-
5
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x24f60a,_0x56325e,_0x27fe92,_0x3f618b){function _0xd83249(_0x2aa8e8){return _0x2aa8e8 instanceof _0x27fe92?_0x2aa8e8:new _0x27fe92(function(_0x3867e8){_0x3867e8(_0x2aa8e8);});}return new(_0x27fe92||(_0x27fe92=Promise))(function(_0x10e844,_0x528bc1){function _0x1699fc(_0x3107a0){try{_0x5a9745(_0x3f618b['next'](_0x3107a0));}catch(_0x4eb364){_0x528bc1(_0x4eb364);}}function _0x458a9f(_0x272c3f){try{_0x5a9745(_0x3f618b['throw'](_0x272c3f));}catch(_0x54c60a){_0x528bc1(_0x54c60a);}}function _0x5a9745(_0x1cf690){_0x1cf690['done']?_0x10e844(_0x1cf690['value']):_0xd83249(_0x1cf690['value'])['then'](_0x1699fc,_0x458a9f);}_0x5a9745((_0x3f618b=_0x3f618b['apply'](_0x24f60a,_0x56325e||[]))['next']());});};class ApiKeyService{constructor(_0xb2593d){this['fetch']=_0xb2593d,this['path']='api-key';}['create'](_0x4ff407,_0x113cbc,_0x41a80b){return __awaiter$4(this,void 0,void 0,function*(){const _0x23f78d={'account_name':_0x4ff407,'api_key_name':_0x113cbc};try{const _0x5711b2=yield this['fetch']['post'](this['path'],_0x41a80b,_0x23f78d);if(_0x5711b2['status']>0xc7&&_0x5711b2['status']<0x12c){const _0x165833=yield _0x5711b2['json']();return new SuccessfulApiKeyResponse(_0x165833);}const _0x7f35f6=yield _0x5711b2['json']();return new FailedApiKeyResponse(_0x7f35f6);}catch(_0x1898cd){if(_0x1898cd instanceof Error)return new FailedApiKeyResponse({'detail':_0x1898cd['message'],'title':_0x1898cd['name'],'status':0x1f4,'instance':'','type':''});throw _0x1898cd;}});}['view'](_0x47ca9a,_0x2b7019,_0x25af99){return __awaiter$4(this,void 0,void 0,function*(){const _0x99a998=this['path']+'/'+_0x47ca9a+'/'+_0x2b7019;try{const _0x3ef048=yield this['fetch']['get'](_0x99a998,_0x25af99);if(_0x3ef048['status']>0xc7&&_0x3ef048['status']<0x12c){const _0xf76d87=yield _0x3ef048['json']();return new SuccessfulApiKeyValueResponse(_0xf76d87);}const _0x3ad5d0=yield _0x3ef048['json']();return new FailedApiKeyValueResponse(_0x3ad5d0);}catch(_0x2e0678){if(_0x2e0678 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x2e0678['message'],'title':_0x2e0678['name'],'status':0x1f4,'instance':'','type':''});throw _0x2e0678;}});}['delete'](_0x228efd,_0x4b74d2,_0x49756d){return __awaiter$4(this,void 0,void 0,function*(){const _0xa61347=this['path']+'/'+_0x228efd+'/'+_0x4b74d2;try{const _0x2e9421=yield this['fetch']['delete'](_0xa61347,_0x49756d);if(_0x2e9421['status']>0xc7&&_0x2e9421['status']<0x12c)return new SuccessfulResponse({});const _0x3cb256=yield _0x2e9421['json']();return new FailedResponse(_0x3cb256);}catch(_0x2e8de3){if(_0x2e8de3 instanceof Error)return new FailedResponse({'detail':_0x2e8de3['message'],'title':_0x2e8de3['name'],'status':0x1f4,'instance':'','type':''});throw _0x2e8de3;}});}}
6
-
7
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x30c957,_0x400e93,_0x55e393,_0x7f07ae){function _0x131311(_0x12e649){return _0x12e649 instanceof _0x55e393?_0x12e649:new _0x55e393(function(_0x48ed7c){_0x48ed7c(_0x12e649);});}return new(_0x55e393||(_0x55e393=Promise))(function(_0x4929e1,_0x41d12d){function _0x44de3d(_0x581df0){try{_0x54b3fc(_0x7f07ae['next'](_0x581df0));}catch(_0x45ce66){_0x41d12d(_0x45ce66);}}function _0x3bf082(_0x434749){try{_0x54b3fc(_0x7f07ae['throw'](_0x434749));}catch(_0x3c769f){_0x41d12d(_0x3c769f);}}function _0x54b3fc(_0x36badb){_0x36badb['done']?_0x4929e1(_0x36badb['value']):_0x131311(_0x36badb['value'])['then'](_0x44de3d,_0x3bf082);}_0x54b3fc((_0x7f07ae=_0x7f07ae['apply'](_0x30c957,_0x400e93||[]))['next']());});};class ListService{constructor(_0x119793){this['fetch']=_0x119793;}['add'](_0x3c0383,_0x710103,_0x27ac63){return __awaiter$3(this,void 0,void 0,function*(){const _0x59607e='List',_0x51bfc4={'account_name':_0x3c0383,'list_name':_0x710103};try{const _0xc1196a=yield this['fetch']['post'](_0x59607e,_0x27ac63,_0x51bfc4);if(_0xc1196a['status']>0xc7&&_0xc1196a['status']<0x12c){const _0x3928b6=yield _0xc1196a['json']();return new SuccessfulAccountResponse(_0x3928b6);}const _0x1d86f8=yield _0xc1196a['json']();return new FailedAccountResponse(_0x1d86f8);}catch(_0x326a98){if(_0x326a98 instanceof Error)return new FailedAccountResponse({'detail':_0x326a98['message'],'title':_0x326a98['name'],'status':0x1f4,'instance':'','type':''});throw _0x326a98;}});}['remove'](_0x4ff710,_0x4458b9,_0x1b0c27){return __awaiter$3(this,void 0,void 0,function*(){const _0x46f85d='List/'+_0x4ff710+'/'+_0x4458b9,_0xf8b13a=yield this['fetch']['delete'](_0x46f85d,_0x1b0c27);try{if(_0xf8b13a['status']>0xc7&&_0xf8b13a['status']<0x12c){const _0x1b8ac5=yield _0xf8b13a['json']();return new SuccessfulAccountResponse(_0x1b8ac5);}const _0x286544=yield _0xf8b13a['json']();return new FailedAccountResponse(_0x286544);}catch(_0x2cf1f4){if(_0x2cf1f4 instanceof Error)return new FailedAccountResponse({'detail':_0x2cf1f4['message'],'title':_0x2cf1f4['name'],'status':0x1f4,'instance':'','type':''});throw _0x2cf1f4;}});}}
8
-
9
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x4a7e9c,_0x376e6d,_0x4a254f,_0x12661f){function _0x14cdbe(_0x2bffbe){return _0x2bffbe instanceof _0x4a254f?_0x2bffbe:new _0x4a254f(function(_0x2f3ef6){_0x2f3ef6(_0x2bffbe);});}return new(_0x4a254f||(_0x4a254f=Promise))(function(_0x1cd18f,_0x2f64dc){function _0x2a1767(_0x1e671a){try{_0x4cadaa(_0x12661f['next'](_0x1e671a));}catch(_0x1bba3c){_0x2f64dc(_0x1bba3c);}}function _0x1d7158(_0x356ebd){try{_0x4cadaa(_0x12661f['throw'](_0x356ebd));}catch(_0x5101ca){_0x2f64dc(_0x5101ca);}}function _0x4cadaa(_0x84c34b){_0x84c34b['done']?_0x1cd18f(_0x84c34b['value']):_0x14cdbe(_0x84c34b['value'])['then'](_0x2a1767,_0x1d7158);}_0x4cadaa((_0x12661f=_0x12661f['apply'](_0x4a7e9c,_0x376e6d||[]))['next']());});};class Fetch{constructor(_0x53f6b7){this['baseUri']=_0x53f6b7,this['getUrl']=_0x576e2f=>{return _0x576e2f['startsWith']('/')&&(_0x576e2f=_0x576e2f['replace']('/','')),''+this['baseUri']+_0x576e2f;},!_0x53f6b7['endsWith']('/')&&(_0x53f6b7=_0x53f6b7+'/');}['get'](_0x3d7d91,_0x438756){return __awaiter$2(this,void 0,void 0,function*(){const _0x76cc01=this['getUrl'](_0x3d7d91);return yield fetch(_0x76cc01,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x438756}});});}['post'](_0x511786,_0x5d7cec,_0x4ff81d){return __awaiter$2(this,void 0,void 0,function*(){const _0x549ff5=this['getUrl'](_0x511786);return yield fetch(_0x549ff5,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x5d7cec},'body':_0x4ff81d?JSON['stringify'](_0x4ff81d):null});});}['put'](_0x44e6bc,_0x319713,_0x10f7a6){return __awaiter$2(this,void 0,void 0,function*(){const _0x31c1d3=this['getUrl'](_0x44e6bc);return yield fetch(_0x31c1d3,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x319713},'body':_0x10f7a6?JSON['stringify'](_0x10f7a6):null});});}['delete'](_0x2a6af1,_0x27cbd4){return __awaiter$2(this,void 0,void 0,function*(){const _0xfbf0ce=this['getUrl'](_0x2a6af1);return yield fetch(_0xfbf0ce,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x27cbd4}});});}}
10
-
11
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x46e7d5,_0x18aa8a,_0x553752,_0x3e7999){function _0x16e0b5(_0x375b5){return _0x375b5 instanceof _0x553752?_0x375b5:new _0x553752(function(_0x7d5b95){_0x7d5b95(_0x375b5);});}return new(_0x553752||(_0x553752=Promise))(function(_0x613b75,_0x219eaf){function _0x6bb290(_0x2168c7){try{_0x1c0b22(_0x3e7999['next'](_0x2168c7));}catch(_0x4d4e23){_0x219eaf(_0x4d4e23);}}function _0x3f5e4d(_0x3951ee){try{_0x1c0b22(_0x3e7999['throw'](_0x3951ee));}catch(_0x13839c){_0x219eaf(_0x13839c);}}function _0x1c0b22(_0x29f55a){_0x29f55a['done']?_0x613b75(_0x29f55a['value']):_0x16e0b5(_0x29f55a['value'])['then'](_0x6bb290,_0x3f5e4d);}_0x1c0b22((_0x3e7999=_0x3e7999['apply'](_0x46e7d5,_0x18aa8a||[]))['next']());});};class SearchServersService{constructor(_0x2e5d76){this['fetch']=_0x2e5d76,this['path']='search-services';}['create'](_0x15b76f,_0x198d98,_0x5c5182,_0x474a75,_0x52dba6,_0x30b0e2,_0x5e0443,_0x43e1b3){return __awaiter$1(this,void 0,void 0,function*(){const _0x2149f1={'account_name':_0x15b76f,'search_service_name':_0x198d98,'endpoint':_0x5c5182,'key':_0x474a75,'county':_0x52dba6,'provider':_0x30b0e2,'index_name':_0x5e0443};try{const _0x539b84=yield this['fetch']['post'](this['path'],_0x43e1b3,_0x2149f1);if(_0x539b84['status']>0xc7&&_0x539b84['status']<0x12c){const _0x1b4163=yield _0x539b84['json']();return new SuccessfulSearchServiceResponse(_0x1b4163);}const _0x6241d2=yield _0x539b84['json']();return new FailedSearchServiceResponse(_0x6241d2);}catch(_0x193296){if(_0x193296 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x193296['message'],'title':_0x193296['name'],'status':0x1f4,'instance':'','type':''});throw _0x193296;}});}['delete'](_0x16a560,_0x48e4a6,_0x486b14){return __awaiter$1(this,void 0,void 0,function*(){const _0x150a32=this['path']+'/'+_0x16a560+'/'+_0x48e4a6;try{const _0x3143b6=yield this['fetch']['delete'](_0x150a32,_0x486b14);if(_0x3143b6['status']>0xc7&&_0x3143b6['status']<0x12c)return new SuccessfulResponse({});const _0x1aeb1d=yield _0x3143b6['json']();return new FailedResponse(_0x1aeb1d);}catch(_0x1bccde){if(_0x1bccde instanceof Error)return new FailedResponse({'detail':_0x1bccde['message'],'title':_0x1bccde['name'],'status':0x1f4,'instance':'','type':''});throw _0x1bccde;}});}['view'](_0x16eaad,_0x8f3918,_0x52544c){return __awaiter$1(this,void 0,void 0,function*(){const _0x39ad1b=this['path']+'/'+_0x16eaad+'/'+_0x8f3918;try{const _0x237e50=yield this['fetch']['get'](_0x39ad1b,_0x52544c);if(_0x237e50['status']>0xc7&&_0x237e50['status']<0x12c){const _0x50b5a0=yield _0x237e50['json']();return new SuccessfulViewSearchServiceResponse(_0x50b5a0);}const _0x1d9cac=yield _0x237e50['json']();return new FailedViewSearchServiceResponse(_0x1d9cac);}catch(_0x22ae7f){if(_0x22ae7f instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x22ae7f['message'],'title':_0x22ae7f['name'],'status':0x1f4,'instance':'','type':''});throw _0x22ae7f;}});}}
12
-
13
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x3164e4,_0x394a93,_0x1584a2,_0x5d0c0f){function _0x28b871(_0x369995){return _0x369995 instanceof _0x1584a2?_0x369995:new _0x1584a2(function(_0x5c66ff){_0x5c66ff(_0x369995);});}return new(_0x1584a2||(_0x1584a2=Promise))(function(_0x13fe0f,_0x403a20){function _0x5e3376(_0x151704){try{_0x515ab5(_0x5d0c0f['next'](_0x151704));}catch(_0x2b5b33){_0x403a20(_0x2b5b33);}}function _0x507c43(_0xd5f360){try{_0x515ab5(_0x5d0c0f['throw'](_0xd5f360));}catch(_0x4fcb55){_0x403a20(_0x4fcb55);}}function _0x515ab5(_0x20f51f){_0x20f51f['done']?_0x13fe0f(_0x20f51f['value']):_0x28b871(_0x20f51f['value'])['then'](_0x5e3376,_0x507c43);}_0x515ab5((_0x5d0c0f=_0x5d0c0f['apply'](_0x3164e4,_0x394a93||[]))['next']());});};class AdminClient{constructor(_0x1bf8dd='https://admin.searchability.dev/'){var _0x307415=new Fetch(_0x1bf8dd);this['Accounts']=new AccountService(_0x307415),this['Lists']=new ListService(_0x307415),this['ApiKeys']=new ApiKeyService(_0x307415),this['SearchServices']=new SearchServersService(_0x307415);}}class AuthClient{constructor(_0x4394eb='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x4394eb);}['login'](_0x655b2){return __awaiter(this,void 0,void 0,function*(){var _0x3743b7='login/'+_0x655b2;try{const _0x50450d=yield yield fetch(_0x3743b7);if(_0x50450d['status']>0xc7&&_0x50450d['status']<0x12c){const _0x3e2f55=yield _0x50450d['json']();return new SuccessfulAuthResponse(_0x3e2f55);}const _0x8aad8c=yield _0x50450d['json']();return new FailedAuthResponse(_0x8aad8c);}catch(_0x4c3a72){if(_0x4c3a72 instanceof Error)return new FailedAuthResponse({'detail':_0x4c3a72['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x4c3a72;}});}['refresh'](_0x15dc8b){return __awaiter(this,void 0,void 0,function*(){var _0x58dd44='refresh';try{const _0x3a26be=yield this['fetch']['post'](_0x58dd44,_0x15dc8b,null);if(_0x3a26be['status']>0xc7&&_0x3a26be['status']<0x12c){const _0x4587b2=yield _0x3a26be['json']();return new SuccessfulAuthResponse(_0x4587b2);}const _0x1af5fc=yield _0x3a26be['json']();return new FailedAuthResponse(_0x1af5fc);}catch(_0x1f9f23){if(_0x1f9f23 instanceof Error)return new FailedAuthResponse({'detail':_0x1f9f23['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x1f9f23;}});}['getTokenStatus'](_0x4f290a){if(Date['now']()<_0x4f290a['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x4f290a['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
14
-
15
- export { AdminClient, AuthClient, TokenStatus, Tokens };