@searchability/admin-client 0.0.41 → 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(_0x148b4e){_0x148b4e[_0x148b4e['Ok']=0x0]='Ok',_0x148b4e[_0x148b4e['Refresh']=0x1]='Refresh',_0x148b4e[_0x148b4e['Expired']=0x2]='Expired';}(exports.TokenStatus||(exports.TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}}class Response{constructor(_0x453c28){this['isSuccess']=_0x453c28;}}class SuccessfulAccountResponse extends Response{constructor(_0x27def2){super(!![]),this['account']=_0x27def2;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x19689c){super(![]),this['problem']=_0x19689c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x4d1eee){super(!![]),this['tokens']=_0x4d1eee;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x1c6bc7){super(![]),this['problem']=_0x1c6bc7;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x3dcd5c){super(!![]),this['apiKey']=_0x3dcd5c;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x4753ff){super(![]),this['problem']=_0x4753ff;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x4507ed){super(!![]),this['searchService']=_0x4507ed;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x112acf){super(![]),this['problem']=_0x112acf;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x3fdc6f){super(!![]),this['searchService']=_0x3fdc6f;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServiceResponse extends Response{constructor(_0x8959a7){super(![]),this['problem']=_0x8959a7;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x4c8376){super(!![]),this['apiKeyValue']=_0x4c8376;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x4c579d){super(!![]),this['obj']=_0x4c579d;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x1e4a06){super(![]),this['problem']=_0x1e4a06;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x1234f6){super(![]),this['problem']=_0x1234f6;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
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(_0x2c18dd,_0x4b065b,_0x19760f,_0x5944ab){function _0x231902(_0x39048d){return _0x39048d instanceof _0x19760f?_0x39048d:new _0x19760f(function(_0x35bf9a){_0x35bf9a(_0x39048d);});}return new(_0x19760f||(_0x19760f=Promise))(function(_0x71de67,_0x11e511){function _0x2ebd99(_0x2b2a60){try{_0x559d76(_0x5944ab['next'](_0x2b2a60));}catch(_0x350f86){_0x11e511(_0x350f86);}}function _0x22d60f(_0x1dda10){try{_0x559d76(_0x5944ab['throw'](_0x1dda10));}catch(_0x391157){_0x11e511(_0x391157);}}function _0x559d76(_0x45ce01){_0x45ce01['done']?_0x71de67(_0x45ce01['value']):_0x231902(_0x45ce01['value'])['then'](_0x2ebd99,_0x22d60f);}_0x559d76((_0x5944ab=_0x5944ab['apply'](_0x2c18dd,_0x4b065b||[]))['next']());});};class AccountService{constructor(_0x856b09){this['fetch']=_0x856b09;}['get'](_0x40c428,_0x4ae84c){return __awaiter$5(this,void 0,void 0,function*(){const _0x36eec8='Account/'+_0x40c428+'/',_0x537974=yield this['fetch']['get'](_0x36eec8,_0x4ae84c);try{if(_0x537974['status']>0xc7&&_0x537974['status']<0x12c){const _0x51ba43=yield _0x537974['json']();return new SuccessfulAccountResponse(_0x51ba43);}const _0x2cc66b=yield _0x537974['json']();return new FailedAccountResponse(_0x2cc66b);}catch(_0x5f1b56){if(_0x5f1b56 instanceof Error)return new FailedAccountResponse({'detail':_0x5f1b56['message'],'title':_0x5f1b56['name'],'status':0x1f4,'instance':'','type':''});throw _0x5f1b56;}});}}
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(_0x30b0d5,_0x1b8eae,_0x45545b,_0x1b7a2d){function _0x36085e(_0x53d83f){return _0x53d83f instanceof _0x45545b?_0x53d83f:new _0x45545b(function(_0x3345f2){_0x3345f2(_0x53d83f);});}return new(_0x45545b||(_0x45545b=Promise))(function(_0x154643,_0x2066ae){function _0x2731a9(_0x3249e7){try{_0xb8a682(_0x1b7a2d['next'](_0x3249e7));}catch(_0x37360c){_0x2066ae(_0x37360c);}}function _0x353e50(_0x4f5223){try{_0xb8a682(_0x1b7a2d['throw'](_0x4f5223));}catch(_0x226a66){_0x2066ae(_0x226a66);}}function _0xb8a682(_0x4b6454){_0x4b6454['done']?_0x154643(_0x4b6454['value']):_0x36085e(_0x4b6454['value'])['then'](_0x2731a9,_0x353e50);}_0xb8a682((_0x1b7a2d=_0x1b7a2d['apply'](_0x30b0d5,_0x1b8eae||[]))['next']());});};class ApiKeyService{constructor(_0x46c13a){this['fetch']=_0x46c13a,this['path']='api-key';}['create'](_0x2abbd2,_0x418114,_0x31264e){return __awaiter$4(this,void 0,void 0,function*(){const _0x3f374c={'account_name':_0x2abbd2,'api_key_name':_0x418114};try{const _0x5ddc18=yield this['fetch']['post'](this['path'],_0x31264e,_0x3f374c);if(_0x5ddc18['status']>0xc7&&_0x5ddc18['status']<0x12c){const _0x4e6bc6=yield _0x5ddc18['json']();return new SuccessfulApiKeyResponse(_0x4e6bc6);}const _0x5ec381=yield _0x5ddc18['json']();return new FailedApiKeyResponse(_0x5ec381);}catch(_0x46c349){if(_0x46c349 instanceof Error)return new FailedApiKeyResponse({'detail':_0x46c349['message'],'title':_0x46c349['name'],'status':0x1f4,'instance':'','type':''});throw _0x46c349;}});}['view'](_0x4763b0,_0x4133bc,_0x384b04){return __awaiter$4(this,void 0,void 0,function*(){const _0xdb4794=this['path']+'/'+_0x4763b0+'/'+_0x4133bc;try{const _0x1b0ee8=yield this['fetch']['get'](_0xdb4794,_0x384b04);if(_0x1b0ee8['status']>0xc7&&_0x1b0ee8['status']<0x12c){const _0x511123=yield _0x1b0ee8['json']();return new SuccessfulApiKeyValueResponse(_0x511123);}const _0x359336=yield _0x1b0ee8['json']();return new FailedApiKeyValueResponse(_0x359336);}catch(_0x348643){if(_0x348643 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x348643['message'],'title':_0x348643['name'],'status':0x1f4,'instance':'','type':''});throw _0x348643;}});}['delete'](_0x5d745d,_0x2c8527,_0x56a234){return __awaiter$4(this,void 0,void 0,function*(){const _0x187c25=this['path']+'/'+_0x5d745d+'/'+_0x2c8527;try{const _0xe4d208=yield this['fetch']['delete'](_0x187c25,_0x56a234);if(_0xe4d208['status']>0xc7&&_0xe4d208['status']<0x12c)return new SuccessfulResponse({});const _0x20ba82=yield _0xe4d208['json']();return new FailedResponse(_0x20ba82);}catch(_0x4f489a){if(_0x4f489a instanceof Error)return new FailedResponse({'detail':_0x4f489a['message'],'title':_0x4f489a['name'],'status':0x1f4,'instance':'','type':''});throw _0x4f489a;}});}}
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(_0x5911fd,_0x3d9069,_0x44630f,_0xcbfbd6){function _0x279b62(_0x1ae210){return _0x1ae210 instanceof _0x44630f?_0x1ae210:new _0x44630f(function(_0x450b24){_0x450b24(_0x1ae210);});}return new(_0x44630f||(_0x44630f=Promise))(function(_0x591176,_0x2a9aba){function _0x3f6fac(_0x15c1b5){try{_0x2dedd8(_0xcbfbd6['next'](_0x15c1b5));}catch(_0x4e78a3){_0x2a9aba(_0x4e78a3);}}function _0x3e2270(_0x396e55){try{_0x2dedd8(_0xcbfbd6['throw'](_0x396e55));}catch(_0x58884c){_0x2a9aba(_0x58884c);}}function _0x2dedd8(_0x3f62d3){_0x3f62d3['done']?_0x591176(_0x3f62d3['value']):_0x279b62(_0x3f62d3['value'])['then'](_0x3f6fac,_0x3e2270);}_0x2dedd8((_0xcbfbd6=_0xcbfbd6['apply'](_0x5911fd,_0x3d9069||[]))['next']());});};class ListService{constructor(_0x5dc8a8){this['fetch']=_0x5dc8a8;}['add'](_0x5de68e,_0x19a381,_0x19e933){return __awaiter$3(this,void 0,void 0,function*(){const _0x4ee488='List',_0x318fe1={'account_name':_0x5de68e,'list_name':_0x19a381};try{const _0x506549=yield this['fetch']['post'](_0x4ee488,_0x19e933,_0x318fe1);if(_0x506549['status']>0xc7&&_0x506549['status']<0x12c){const _0x2718fe=yield _0x506549['json']();return new SuccessfulAccountResponse(_0x2718fe);}const _0x1c5dad=yield _0x506549['json']();return new FailedAccountResponse(_0x1c5dad);}catch(_0x5c5345){if(_0x5c5345 instanceof Error)return new FailedAccountResponse({'detail':_0x5c5345['message'],'title':_0x5c5345['name'],'status':0x1f4,'instance':'','type':''});throw _0x5c5345;}});}['remove'](_0x129e88,_0x199243,_0x130500){return __awaiter$3(this,void 0,void 0,function*(){const _0x25bceb='List/'+_0x129e88+'/'+_0x199243,_0x166a43=yield this['fetch']['delete'](_0x25bceb,_0x130500);try{if(_0x166a43['status']>0xc7&&_0x166a43['status']<0x12c){const _0x2ed422=yield _0x166a43['json']();return new SuccessfulAccountResponse(_0x2ed422);}const _0x5a2e0c=yield _0x166a43['json']();return new FailedAccountResponse(_0x5a2e0c);}catch(_0x6f4c58){if(_0x6f4c58 instanceof Error)return new FailedAccountResponse({'detail':_0x6f4c58['message'],'title':_0x6f4c58['name'],'status':0x1f4,'instance':'','type':''});throw _0x6f4c58;}});}}
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(_0x360e10,_0x37d3d1,_0x46ccf8,_0xebde11){function _0xc1427b(_0x53c352){return _0x53c352 instanceof _0x46ccf8?_0x53c352:new _0x46ccf8(function(_0x36dd1b){_0x36dd1b(_0x53c352);});}return new(_0x46ccf8||(_0x46ccf8=Promise))(function(_0x4e1051,_0x433649){function _0x1c374f(_0x1201b6){try{_0x56658e(_0xebde11['next'](_0x1201b6));}catch(_0x51cf45){_0x433649(_0x51cf45);}}function _0x4efd84(_0x4c31fd){try{_0x56658e(_0xebde11['throw'](_0x4c31fd));}catch(_0xa62a40){_0x433649(_0xa62a40);}}function _0x56658e(_0x4e996c){_0x4e996c['done']?_0x4e1051(_0x4e996c['value']):_0xc1427b(_0x4e996c['value'])['then'](_0x1c374f,_0x4efd84);}_0x56658e((_0xebde11=_0xebde11['apply'](_0x360e10,_0x37d3d1||[]))['next']());});};class Fetch{constructor(_0x134724){this['baseUri']=_0x134724,this['getUrl']=_0x40d263=>{return _0x40d263['startsWith']('/')&&(_0x40d263=_0x40d263['replace']('/','')),''+this['baseUri']+_0x40d263;},!_0x134724['endsWith']('/')&&(_0x134724=_0x134724+'/');}['get'](_0x24194c,_0x5381f6){return __awaiter$2(this,void 0,void 0,function*(){const _0x409218=this['getUrl'](_0x24194c);return yield fetch(_0x409218,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x5381f6}});});}['post'](_0x3607c4,_0x23b596,_0x11dbba){return __awaiter$2(this,void 0,void 0,function*(){const _0x3f3f3e=this['getUrl'](_0x3607c4);return yield fetch(_0x3f3f3e,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x23b596},'body':_0x11dbba?JSON['stringify'](_0x11dbba):null});});}['put'](_0x433188,_0x16d192,_0x46f584){return __awaiter$2(this,void 0,void 0,function*(){const _0x1ed764=this['getUrl'](_0x433188);return yield fetch(_0x1ed764,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x16d192},'body':_0x46f584?JSON['stringify'](_0x46f584):null});});}['delete'](_0x99779a,_0x55c9b6){return __awaiter$2(this,void 0,void 0,function*(){const _0x532b94=this['getUrl'](_0x99779a);return yield fetch(_0x532b94,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x55c9b6}});});}}
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(_0x1f36c2,_0x343702,_0x25c5c6,_0x27c1fe){function _0x157ca2(_0x49b76b){return _0x49b76b instanceof _0x25c5c6?_0x49b76b:new _0x25c5c6(function(_0x8fbec1){_0x8fbec1(_0x49b76b);});}return new(_0x25c5c6||(_0x25c5c6=Promise))(function(_0x39f854,_0x286776){function _0x3032fc(_0x59f4cc){try{_0x3a07b1(_0x27c1fe['next'](_0x59f4cc));}catch(_0x196afb){_0x286776(_0x196afb);}}function _0x4b1f3b(_0x52030b){try{_0x3a07b1(_0x27c1fe['throw'](_0x52030b));}catch(_0x2dcad7){_0x286776(_0x2dcad7);}}function _0x3a07b1(_0x14af2c){_0x14af2c['done']?_0x39f854(_0x14af2c['value']):_0x157ca2(_0x14af2c['value'])['then'](_0x3032fc,_0x4b1f3b);}_0x3a07b1((_0x27c1fe=_0x27c1fe['apply'](_0x1f36c2,_0x343702||[]))['next']());});};class SearchServersService{constructor(_0x33cbb0){this['fetch']=_0x33cbb0,this['path']='search-services';}['create'](_0x48046c,_0x1a18b3,_0x286d2e,_0xdb1542,_0x54e724,_0x3616bc,_0x424290,_0x58f46d){return __awaiter$1(this,void 0,void 0,function*(){const _0x1b6005={'account_name':_0x48046c,'search_service_name':_0x1a18b3,'endpoint':_0x286d2e,'key':_0xdb1542,'country':_0x54e724,'provider':_0x3616bc,'index_name':_0x424290};try{const _0x83f5d1=yield this['fetch']['post'](this['path'],_0x58f46d,_0x1b6005);if(_0x83f5d1['status']>0xc7&&_0x83f5d1['status']<0x12c){const _0x45ddab=yield _0x83f5d1['json']();return new SuccessfulSearchServiceResponse(_0x45ddab);}const _0x4acad2=yield _0x83f5d1['json']();return new FailedSearchServiceResponse(_0x4acad2);}catch(_0x329ff1){if(_0x329ff1 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x329ff1['message'],'title':_0x329ff1['name'],'status':0x1f4,'instance':'','type':''});throw _0x329ff1;}});}['delete'](_0x1e886e,_0xf50064,_0xcd1380){return __awaiter$1(this,void 0,void 0,function*(){const _0x147470=this['path']+'/'+_0x1e886e+'/'+_0xf50064;try{const _0x5b1937=yield this['fetch']['delete'](_0x147470,_0xcd1380);if(_0x5b1937['status']>0xc7&&_0x5b1937['status']<0x12c)return new SuccessfulResponse({});const _0x16b85d=yield _0x5b1937['json']();return new FailedResponse(_0x16b85d);}catch(_0x4cd667){if(_0x4cd667 instanceof Error)return new FailedResponse({'detail':_0x4cd667['message'],'title':_0x4cd667['name'],'status':0x1f4,'instance':'','type':''});throw _0x4cd667;}});}['view'](_0xc20e82,_0x21d28b,_0x457709){return __awaiter$1(this,void 0,void 0,function*(){const _0x16304c=this['path']+'/'+_0xc20e82+'/'+_0x21d28b;try{const _0x5116e2=yield this['fetch']['get'](_0x16304c,_0x457709);if(_0x5116e2['status']>0xc7&&_0x5116e2['status']<0x12c){const _0x31aedf=yield _0x5116e2['json']();return new SuccessfulViewSearchServiceResponse(_0x31aedf);}const _0x331974=yield _0x5116e2['json']();return new FailedViewSearchServiceResponse(_0x331974);}catch(_0x429ca1){if(_0x429ca1 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x429ca1['message'],'title':_0x429ca1['name'],'status':0x1f4,'instance':'','type':''});throw _0x429ca1;}});}}
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(_0x25256b,_0x2ea2f6,_0x57aa76,_0x9f1bf){function _0x375648(_0x5cb395){return _0x5cb395 instanceof _0x57aa76?_0x5cb395:new _0x57aa76(function(_0x2cc334){_0x2cc334(_0x5cb395);});}return new(_0x57aa76||(_0x57aa76=Promise))(function(_0x55d6f6,_0x1b7ec0){function _0x4ba805(_0x461516){try{_0x416264(_0x9f1bf['next'](_0x461516));}catch(_0x143de5){_0x1b7ec0(_0x143de5);}}function _0x57330f(_0x1d5ea4){try{_0x416264(_0x9f1bf['throw'](_0x1d5ea4));}catch(_0x274280){_0x1b7ec0(_0x274280);}}function _0x416264(_0x4e9b6b){_0x4e9b6b['done']?_0x55d6f6(_0x4e9b6b['value']):_0x375648(_0x4e9b6b['value'])['then'](_0x4ba805,_0x57330f);}_0x416264((_0x9f1bf=_0x9f1bf['apply'](_0x25256b,_0x2ea2f6||[]))['next']());});};class AdminClient{constructor(_0x2d8a4e='https://admin.searchability.dev/'){var _0x560177=new Fetch(_0x2d8a4e);this['Accounts']=new AccountService(_0x560177),this['Lists']=new ListService(_0x560177),this['ApiKeys']=new ApiKeyService(_0x560177),this['SearchServices']=new SearchServersService(_0x560177);}}class AuthClient{constructor(_0x260346='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x260346);}['login'](_0x555665){return __awaiter(this,void 0,void 0,function*(){var _0x12011d='login/'+_0x555665;try{const _0x4edef3=yield yield fetch(_0x12011d);if(_0x4edef3['status']>0xc7&&_0x4edef3['status']<0x12c){const _0x153c91=yield _0x4edef3['json']();return new SuccessfulAuthResponse(_0x153c91);}const _0xec2a10=yield _0x4edef3['json']();return new FailedAuthResponse(_0xec2a10);}catch(_0x2e1702){if(_0x2e1702 instanceof Error)return new FailedAuthResponse({'detail':_0x2e1702['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x2e1702;}});}['refresh'](_0x5cbdde){return __awaiter(this,void 0,void 0,function*(){var _0x5a043e='refresh';try{const _0x42b7f0=yield this['fetch']['post'](_0x5a043e,_0x5cbdde,null);if(_0x42b7f0['status']>0xc7&&_0x42b7f0['status']<0x12c){const _0x284e00=yield _0x42b7f0['json']();return new SuccessfulAuthResponse(_0x284e00);}const _0x40b311=yield _0x42b7f0['json']();return new FailedAuthResponse(_0x40b311);}catch(_0x5e9a22){if(_0x5e9a22 instanceof Error)return new FailedAuthResponse({'detail':_0x5e9a22['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x5e9a22;}});}['getTokenStatus'](_0x24c260){if(Date['now']()<_0x24c260['access_expires'])return exports.TokenStatus['Ok'];if(Date['now']()<_0x24c260['refresh_expires'])return exports.TokenStatus['Refresh'];return exports.TokenStatus['Expired'];}}
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(_0x2e2ba5){_0x2e2ba5[_0x2e2ba5['Ok']=0x0]='Ok',_0x2e2ba5[_0x2e2ba5['Refresh']=0x1]='Refresh',_0x2e2ba5[_0x2e2ba5['Expired']=0x2]='Expired';}(TokenStatus||(TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}}class Response{constructor(_0x2ba162){this['isSuccess']=_0x2ba162;}}class SuccessfulAccountResponse extends Response{constructor(_0x58a647){super(!![]),this['account']=_0x58a647;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x5df227){super(![]),this['problem']=_0x5df227;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x779662){super(!![]),this['tokens']=_0x779662;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x292bb1){super(![]),this['problem']=_0x292bb1;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x3dba2d){super(!![]),this['apiKey']=_0x3dba2d;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x4de8fc){super(![]),this['problem']=_0x4de8fc;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x115ab3){super(!![]),this['searchService']=_0x115ab3;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x4f0a87){super(![]),this['problem']=_0x4f0a87;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x14e378){super(!![]),this['searchService']=_0x14e378;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServiceResponse extends Response{constructor(_0x37cb03){super(![]),this['problem']=_0x37cb03;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x48b761){super(!![]),this['apiKeyValue']=_0x48b761;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x564026){super(!![]),this['obj']=_0x564026;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x3215d5){super(![]),this['problem']=_0x3215d5;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x5cc5bd){super(![]),this['problem']=_0x5cc5bd;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
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(_0x16ea3b,_0x5bf13e,_0x53f57a,_0x2cc8f1){function _0x2b50a6(_0x27b4ba){return _0x27b4ba instanceof _0x53f57a?_0x27b4ba:new _0x53f57a(function(_0x3db530){_0x3db530(_0x27b4ba);});}return new(_0x53f57a||(_0x53f57a=Promise))(function(_0x1b72dc,_0x3ea459){function _0x4b3964(_0xc82d4c){try{_0x34a501(_0x2cc8f1['next'](_0xc82d4c));}catch(_0x3d875d){_0x3ea459(_0x3d875d);}}function _0x592da3(_0x11217c){try{_0x34a501(_0x2cc8f1['throw'](_0x11217c));}catch(_0x14c758){_0x3ea459(_0x14c758);}}function _0x34a501(_0xb02d61){_0xb02d61['done']?_0x1b72dc(_0xb02d61['value']):_0x2b50a6(_0xb02d61['value'])['then'](_0x4b3964,_0x592da3);}_0x34a501((_0x2cc8f1=_0x2cc8f1['apply'](_0x16ea3b,_0x5bf13e||[]))['next']());});};class AccountService{constructor(_0x5102e5){this['fetch']=_0x5102e5;}['get'](_0x41b3e3,_0x33e3f5){return __awaiter$5(this,void 0,void 0,function*(){const _0x65798c='Account/'+_0x41b3e3+'/',_0x1546fa=yield this['fetch']['get'](_0x65798c,_0x33e3f5);try{if(_0x1546fa['status']>0xc7&&_0x1546fa['status']<0x12c){const _0x13b161=yield _0x1546fa['json']();return new SuccessfulAccountResponse(_0x13b161);}const _0x1fd421=yield _0x1546fa['json']();return new FailedAccountResponse(_0x1fd421);}catch(_0x52c7e5){if(_0x52c7e5 instanceof Error)return new FailedAccountResponse({'detail':_0x52c7e5['message'],'title':_0x52c7e5['name'],'status':0x1f4,'instance':'','type':''});throw _0x52c7e5;}});}}
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(_0x49ad61,_0x1b4749,_0x2aed95,_0x2d1ee4){function _0x3c0b65(_0x1ec0f4){return _0x1ec0f4 instanceof _0x2aed95?_0x1ec0f4:new _0x2aed95(function(_0x548c6d){_0x548c6d(_0x1ec0f4);});}return new(_0x2aed95||(_0x2aed95=Promise))(function(_0x4ee647,_0x299bc5){function _0x249306(_0x3e1b93){try{_0x31066c(_0x2d1ee4['next'](_0x3e1b93));}catch(_0x13d4ba){_0x299bc5(_0x13d4ba);}}function _0x296788(_0x23457c){try{_0x31066c(_0x2d1ee4['throw'](_0x23457c));}catch(_0xe0a3df){_0x299bc5(_0xe0a3df);}}function _0x31066c(_0x1d96a5){_0x1d96a5['done']?_0x4ee647(_0x1d96a5['value']):_0x3c0b65(_0x1d96a5['value'])['then'](_0x249306,_0x296788);}_0x31066c((_0x2d1ee4=_0x2d1ee4['apply'](_0x49ad61,_0x1b4749||[]))['next']());});};class ApiKeyService{constructor(_0x417811){this['fetch']=_0x417811,this['path']='api-key';}['create'](_0x5ab070,_0x369d8b,_0x31f14e){return __awaiter$4(this,void 0,void 0,function*(){const _0x370336={'account_name':_0x5ab070,'api_key_name':_0x369d8b};try{const _0x3c6638=yield this['fetch']['post'](this['path'],_0x31f14e,_0x370336);if(_0x3c6638['status']>0xc7&&_0x3c6638['status']<0x12c){const _0x3fc69a=yield _0x3c6638['json']();return new SuccessfulApiKeyResponse(_0x3fc69a);}const _0xc9de25=yield _0x3c6638['json']();return new FailedApiKeyResponse(_0xc9de25);}catch(_0x45bd29){if(_0x45bd29 instanceof Error)return new FailedApiKeyResponse({'detail':_0x45bd29['message'],'title':_0x45bd29['name'],'status':0x1f4,'instance':'','type':''});throw _0x45bd29;}});}['view'](_0x7bfe2,_0xe5539c,_0x235bbd){return __awaiter$4(this,void 0,void 0,function*(){const _0x53f7e2=this['path']+'/'+_0x7bfe2+'/'+_0xe5539c;try{const _0x389f8e=yield this['fetch']['get'](_0x53f7e2,_0x235bbd);if(_0x389f8e['status']>0xc7&&_0x389f8e['status']<0x12c){const _0x4aeedb=yield _0x389f8e['json']();return new SuccessfulApiKeyValueResponse(_0x4aeedb);}const _0x302fe6=yield _0x389f8e['json']();return new FailedApiKeyValueResponse(_0x302fe6);}catch(_0x24d34e){if(_0x24d34e instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x24d34e['message'],'title':_0x24d34e['name'],'status':0x1f4,'instance':'','type':''});throw _0x24d34e;}});}['delete'](_0x733292,_0x4450f7,_0x55dfd5){return __awaiter$4(this,void 0,void 0,function*(){const _0x542197=this['path']+'/'+_0x733292+'/'+_0x4450f7;try{const _0x5d8ab6=yield this['fetch']['delete'](_0x542197,_0x55dfd5);if(_0x5d8ab6['status']>0xc7&&_0x5d8ab6['status']<0x12c)return new SuccessfulResponse({});const _0x27220e=yield _0x5d8ab6['json']();return new FailedResponse(_0x27220e);}catch(_0x815433){if(_0x815433 instanceof Error)return new FailedResponse({'detail':_0x815433['message'],'title':_0x815433['name'],'status':0x1f4,'instance':'','type':''});throw _0x815433;}});}}
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(_0x189882,_0x8708fb,_0x1fe262,_0x576cf2){function _0x56ea75(_0x40d06e){return _0x40d06e instanceof _0x1fe262?_0x40d06e:new _0x1fe262(function(_0x2e74fc){_0x2e74fc(_0x40d06e);});}return new(_0x1fe262||(_0x1fe262=Promise))(function(_0x368a90,_0x22c2f2){function _0xa5148e(_0x212b8c){try{_0x56bf2d(_0x576cf2['next'](_0x212b8c));}catch(_0x198c75){_0x22c2f2(_0x198c75);}}function _0x1083f2(_0x4c0590){try{_0x56bf2d(_0x576cf2['throw'](_0x4c0590));}catch(_0x317be8){_0x22c2f2(_0x317be8);}}function _0x56bf2d(_0x5e0ed1){_0x5e0ed1['done']?_0x368a90(_0x5e0ed1['value']):_0x56ea75(_0x5e0ed1['value'])['then'](_0xa5148e,_0x1083f2);}_0x56bf2d((_0x576cf2=_0x576cf2['apply'](_0x189882,_0x8708fb||[]))['next']());});};class ListService{constructor(_0x139333){this['fetch']=_0x139333;}['add'](_0x2ba8cd,_0x4b570d,_0x42a916){return __awaiter$3(this,void 0,void 0,function*(){const _0x556361='List',_0x2c3a81={'account_name':_0x2ba8cd,'list_name':_0x4b570d};try{const _0x5d1174=yield this['fetch']['post'](_0x556361,_0x42a916,_0x2c3a81);if(_0x5d1174['status']>0xc7&&_0x5d1174['status']<0x12c){const _0x30918d=yield _0x5d1174['json']();return new SuccessfulAccountResponse(_0x30918d);}const _0x5cedac=yield _0x5d1174['json']();return new FailedAccountResponse(_0x5cedac);}catch(_0x16cdd3){if(_0x16cdd3 instanceof Error)return new FailedAccountResponse({'detail':_0x16cdd3['message'],'title':_0x16cdd3['name'],'status':0x1f4,'instance':'','type':''});throw _0x16cdd3;}});}['remove'](_0x24ef97,_0x5a5c6a,_0x4c59ab){return __awaiter$3(this,void 0,void 0,function*(){const _0x39dcfd='List/'+_0x24ef97+'/'+_0x5a5c6a,_0x131590=yield this['fetch']['delete'](_0x39dcfd,_0x4c59ab);try{if(_0x131590['status']>0xc7&&_0x131590['status']<0x12c){const _0x8d675d=yield _0x131590['json']();return new SuccessfulAccountResponse(_0x8d675d);}const _0xa0b198=yield _0x131590['json']();return new FailedAccountResponse(_0xa0b198);}catch(_0x2758fc){if(_0x2758fc instanceof Error)return new FailedAccountResponse({'detail':_0x2758fc['message'],'title':_0x2758fc['name'],'status':0x1f4,'instance':'','type':''});throw _0x2758fc;}});}}
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(_0x10561f,_0x563865,_0x2ba145,_0x104209){function _0x1a1c80(_0x56a932){return _0x56a932 instanceof _0x2ba145?_0x56a932:new _0x2ba145(function(_0x3d3d80){_0x3d3d80(_0x56a932);});}return new(_0x2ba145||(_0x2ba145=Promise))(function(_0x678b2,_0x4ee6a1){function _0x5e9f98(_0x430de7){try{_0xbdac9e(_0x104209['next'](_0x430de7));}catch(_0x32ae56){_0x4ee6a1(_0x32ae56);}}function _0x579f7e(_0x15542d){try{_0xbdac9e(_0x104209['throw'](_0x15542d));}catch(_0x211766){_0x4ee6a1(_0x211766);}}function _0xbdac9e(_0x478897){_0x478897['done']?_0x678b2(_0x478897['value']):_0x1a1c80(_0x478897['value'])['then'](_0x5e9f98,_0x579f7e);}_0xbdac9e((_0x104209=_0x104209['apply'](_0x10561f,_0x563865||[]))['next']());});};class Fetch{constructor(_0x2e776c){this['baseUri']=_0x2e776c,this['getUrl']=_0x410e46=>{return _0x410e46['startsWith']('/')&&(_0x410e46=_0x410e46['replace']('/','')),''+this['baseUri']+_0x410e46;},!_0x2e776c['endsWith']('/')&&(_0x2e776c=_0x2e776c+'/');}['get'](_0x419241,_0x11768b){return __awaiter$2(this,void 0,void 0,function*(){const _0x6a83d5=this['getUrl'](_0x419241);return yield fetch(_0x6a83d5,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x11768b}});});}['post'](_0x4603ed,_0x57206e,_0x54ddd1){return __awaiter$2(this,void 0,void 0,function*(){const _0x513c0c=this['getUrl'](_0x4603ed);return yield fetch(_0x513c0c,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x57206e},'body':_0x54ddd1?JSON['stringify'](_0x54ddd1):null});});}['put'](_0x2d7bea,_0x752886,_0x3ef91e){return __awaiter$2(this,void 0,void 0,function*(){const _0x4427c1=this['getUrl'](_0x2d7bea);return yield fetch(_0x4427c1,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x752886},'body':_0x3ef91e?JSON['stringify'](_0x3ef91e):null});});}['delete'](_0x38aaf3,_0x4fc4e2){return __awaiter$2(this,void 0,void 0,function*(){const _0x362146=this['getUrl'](_0x38aaf3);return yield fetch(_0x362146,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4fc4e2}});});}}
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(_0x3a4598,_0x1db2de,_0x40e473,_0x922e43){function _0x5553ce(_0x58ddd7){return _0x58ddd7 instanceof _0x40e473?_0x58ddd7:new _0x40e473(function(_0x36c901){_0x36c901(_0x58ddd7);});}return new(_0x40e473||(_0x40e473=Promise))(function(_0x465c67,_0x4e425b){function _0x14aad4(_0x34323f){try{_0x116fb3(_0x922e43['next'](_0x34323f));}catch(_0x22b4be){_0x4e425b(_0x22b4be);}}function _0x213bb7(_0x4ddc2){try{_0x116fb3(_0x922e43['throw'](_0x4ddc2));}catch(_0x20b8d6){_0x4e425b(_0x20b8d6);}}function _0x116fb3(_0x4c8165){_0x4c8165['done']?_0x465c67(_0x4c8165['value']):_0x5553ce(_0x4c8165['value'])['then'](_0x14aad4,_0x213bb7);}_0x116fb3((_0x922e43=_0x922e43['apply'](_0x3a4598,_0x1db2de||[]))['next']());});};class SearchServersService{constructor(_0x4ab848){this['fetch']=_0x4ab848,this['path']='search-services';}['create'](_0x300ce7,_0x5f3086,_0x5da9c2,_0x53c4fd,_0x41e6d8,_0x29a1b0,_0x14a287,_0x83efc5){return __awaiter$1(this,void 0,void 0,function*(){const _0x58633e={'account_name':_0x300ce7,'search_service_name':_0x5f3086,'endpoint':_0x5da9c2,'key':_0x53c4fd,'country':_0x41e6d8,'provider':_0x29a1b0,'index_name':_0x14a287};try{const _0x4fd4c8=yield this['fetch']['post'](this['path'],_0x83efc5,_0x58633e);if(_0x4fd4c8['status']>0xc7&&_0x4fd4c8['status']<0x12c){const _0x249e51=yield _0x4fd4c8['json']();return new SuccessfulSearchServiceResponse(_0x249e51);}const _0x2bb06b=yield _0x4fd4c8['json']();return new FailedSearchServiceResponse(_0x2bb06b);}catch(_0x2a6c38){if(_0x2a6c38 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x2a6c38['message'],'title':_0x2a6c38['name'],'status':0x1f4,'instance':'','type':''});throw _0x2a6c38;}});}['delete'](_0x140240,_0x13930f,_0x259136){return __awaiter$1(this,void 0,void 0,function*(){const _0x168405=this['path']+'/'+_0x140240+'/'+_0x13930f;try{const _0x915472=yield this['fetch']['delete'](_0x168405,_0x259136);if(_0x915472['status']>0xc7&&_0x915472['status']<0x12c)return new SuccessfulResponse({});const _0x155970=yield _0x915472['json']();return new FailedResponse(_0x155970);}catch(_0xda9288){if(_0xda9288 instanceof Error)return new FailedResponse({'detail':_0xda9288['message'],'title':_0xda9288['name'],'status':0x1f4,'instance':'','type':''});throw _0xda9288;}});}['view'](_0xab272,_0x4f9fbc,_0x1ca0ec){return __awaiter$1(this,void 0,void 0,function*(){const _0x477395=this['path']+'/'+_0xab272+'/'+_0x4f9fbc;try{const _0x12c8b7=yield this['fetch']['get'](_0x477395,_0x1ca0ec);if(_0x12c8b7['status']>0xc7&&_0x12c8b7['status']<0x12c){const _0x5415be=yield _0x12c8b7['json']();return new SuccessfulViewSearchServiceResponse(_0x5415be);}const _0x5292d5=yield _0x12c8b7['json']();return new FailedViewSearchServiceResponse(_0x5292d5);}catch(_0x3f51a2){if(_0x3f51a2 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x3f51a2['message'],'title':_0x3f51a2['name'],'status':0x1f4,'instance':'','type':''});throw _0x3f51a2;}});}}
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(_0x50f70f,_0x193b3c,_0x117634,_0x212425){function _0x31ed64(_0x2ea64d){return _0x2ea64d instanceof _0x117634?_0x2ea64d:new _0x117634(function(_0x2a97ca){_0x2a97ca(_0x2ea64d);});}return new(_0x117634||(_0x117634=Promise))(function(_0x26c965,_0x24801c){function _0x4f74bf(_0xfb602f){try{_0x24ba1c(_0x212425['next'](_0xfb602f));}catch(_0x48b8e6){_0x24801c(_0x48b8e6);}}function _0x460922(_0x3e63b1){try{_0x24ba1c(_0x212425['throw'](_0x3e63b1));}catch(_0x18fae1){_0x24801c(_0x18fae1);}}function _0x24ba1c(_0x277b9e){_0x277b9e['done']?_0x26c965(_0x277b9e['value']):_0x31ed64(_0x277b9e['value'])['then'](_0x4f74bf,_0x460922);}_0x24ba1c((_0x212425=_0x212425['apply'](_0x50f70f,_0x193b3c||[]))['next']());});};class AdminClient{constructor(_0xf2496='https://admin.searchability.dev/'){var _0x316ff6=new Fetch(_0xf2496);this['Accounts']=new AccountService(_0x316ff6),this['Lists']=new ListService(_0x316ff6),this['ApiKeys']=new ApiKeyService(_0x316ff6),this['SearchServices']=new SearchServersService(_0x316ff6);}}class AuthClient{constructor(_0x1d2728='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x1d2728);}['login'](_0x1a81a2){return __awaiter(this,void 0,void 0,function*(){var _0x52e582='login/'+_0x1a81a2;try{const _0x4912b6=yield yield fetch(_0x52e582);if(_0x4912b6['status']>0xc7&&_0x4912b6['status']<0x12c){const _0x1b5473=yield _0x4912b6['json']();return new SuccessfulAuthResponse(_0x1b5473);}const _0x450b64=yield _0x4912b6['json']();return new FailedAuthResponse(_0x450b64);}catch(_0x1e488a){if(_0x1e488a instanceof Error)return new FailedAuthResponse({'detail':_0x1e488a['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x1e488a;}});}['refresh'](_0xf3020d){return __awaiter(this,void 0,void 0,function*(){var _0xbc7d1c='refresh';try{const _0x5e6e06=yield this['fetch']['post'](_0xbc7d1c,_0xf3020d,null);if(_0x5e6e06['status']>0xc7&&_0x5e6e06['status']<0x12c){const _0x20097b=yield _0x5e6e06['json']();return new SuccessfulAuthResponse(_0x20097b);}const _0x590c8e=yield _0x5e6e06['json']();return new FailedAuthResponse(_0x590c8e);}catch(_0x5d3d43){if(_0x5d3d43 instanceof Error)return new FailedAuthResponse({'detail':_0x5d3d43['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x5d3d43;}});}['getTokenStatus'](_0x15ab5a){if(Date['now']()<_0x15ab5a['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x15ab5a['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
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
  }
@@ -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.41",
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(_0x29474c){_0x29474c[_0x29474c['Ok']=0x0]='Ok',_0x29474c[_0x29474c['Refresh']=0x1]='Refresh',_0x29474c[_0x29474c['Expired']=0x2]='Expired';}(TokenStatus||(TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}}class Response{constructor(_0x163727){this['isSuccess']=_0x163727;}}class SuccessfulAccountResponse extends Response{constructor(_0x3f71a6){super(!![]),this['account']=_0x3f71a6;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x202622){super(![]),this['problem']=_0x202622;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x3b3d2c){super(!![]),this['tokens']=_0x3b3d2c;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x984b9e){super(![]),this['problem']=_0x984b9e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x19ff41){super(!![]),this['apiKey']=_0x19ff41;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x343c3a){super(![]),this['problem']=_0x343c3a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x1d4c2e){super(!![]),this['searchService']=_0x1d4c2e;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x933194){super(![]),this['problem']=_0x933194;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x81d952){super(!![]),this['searchService']=_0x81d952;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServiceResponse extends Response{constructor(_0x5fa441){super(![]),this['problem']=_0x5fa441;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x58ebc0){super(!![]),this['apiKeyValue']=_0x58ebc0;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x47e5d8){super(!![]),this['obj']=_0x47e5d8;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x1418f8){super(![]),this['problem']=_0x1418f8;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x553317){super(![]),this['problem']=_0x553317;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
2
-
3
- var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x7c26e3,_0x43f59c,_0x251f24,_0x3234da){function _0x3fc1a6(_0x47e672){return _0x47e672 instanceof _0x251f24?_0x47e672:new _0x251f24(function(_0x363d52){_0x363d52(_0x47e672);});}return new(_0x251f24||(_0x251f24=Promise))(function(_0x44cc75,_0x4a4074){function _0x54583c(_0x137c84){try{_0x4c3bf6(_0x3234da['next'](_0x137c84));}catch(_0x3c5959){_0x4a4074(_0x3c5959);}}function _0x211b6d(_0x3c7f60){try{_0x4c3bf6(_0x3234da['throw'](_0x3c7f60));}catch(_0x3180ea){_0x4a4074(_0x3180ea);}}function _0x4c3bf6(_0x3da63e){_0x3da63e['done']?_0x44cc75(_0x3da63e['value']):_0x3fc1a6(_0x3da63e['value'])['then'](_0x54583c,_0x211b6d);}_0x4c3bf6((_0x3234da=_0x3234da['apply'](_0x7c26e3,_0x43f59c||[]))['next']());});};class AccountService{constructor(_0x2362b8){this['fetch']=_0x2362b8;}['get'](_0x2b3bb6,_0x3400bd){return __awaiter$5(this,void 0,void 0,function*(){const _0x28c9d='Account/'+_0x2b3bb6+'/',_0x2a6b0f=yield this['fetch']['get'](_0x28c9d,_0x3400bd);try{if(_0x2a6b0f['status']>0xc7&&_0x2a6b0f['status']<0x12c){const _0x1a3adb=yield _0x2a6b0f['json']();return new SuccessfulAccountResponse(_0x1a3adb);}const _0x2ccba0=yield _0x2a6b0f['json']();return new FailedAccountResponse(_0x2ccba0);}catch(_0x45feda){if(_0x45feda instanceof Error)return new FailedAccountResponse({'detail':_0x45feda['message'],'title':_0x45feda['name'],'status':0x1f4,'instance':'','type':''});throw _0x45feda;}});}}
4
-
5
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x29a9fa,_0x1bc802,_0x4179d7,_0x3114d8){function _0x348c90(_0x50f813){return _0x50f813 instanceof _0x4179d7?_0x50f813:new _0x4179d7(function(_0x57485b){_0x57485b(_0x50f813);});}return new(_0x4179d7||(_0x4179d7=Promise))(function(_0x205e35,_0x1aef0e){function _0x390692(_0x205e29){try{_0x2294f6(_0x3114d8['next'](_0x205e29));}catch(_0x470e48){_0x1aef0e(_0x470e48);}}function _0x486719(_0x483448){try{_0x2294f6(_0x3114d8['throw'](_0x483448));}catch(_0x376a4b){_0x1aef0e(_0x376a4b);}}function _0x2294f6(_0xc3ecf8){_0xc3ecf8['done']?_0x205e35(_0xc3ecf8['value']):_0x348c90(_0xc3ecf8['value'])['then'](_0x390692,_0x486719);}_0x2294f6((_0x3114d8=_0x3114d8['apply'](_0x29a9fa,_0x1bc802||[]))['next']());});};class ApiKeyService{constructor(_0x4cdaec){this['fetch']=_0x4cdaec,this['path']='api-key';}['create'](_0x257d03,_0x54b051,_0x1b346f){return __awaiter$4(this,void 0,void 0,function*(){const _0x21b5e6={'account_name':_0x257d03,'api_key_name':_0x54b051};try{const _0x85fcd0=yield this['fetch']['post'](this['path'],_0x1b346f,_0x21b5e6);if(_0x85fcd0['status']>0xc7&&_0x85fcd0['status']<0x12c){const _0x4d56aa=yield _0x85fcd0['json']();return new SuccessfulApiKeyResponse(_0x4d56aa);}const _0x123282=yield _0x85fcd0['json']();return new FailedApiKeyResponse(_0x123282);}catch(_0x3c2424){if(_0x3c2424 instanceof Error)return new FailedApiKeyResponse({'detail':_0x3c2424['message'],'title':_0x3c2424['name'],'status':0x1f4,'instance':'','type':''});throw _0x3c2424;}});}['view'](_0x5e0205,_0x26e635,_0x458a5c){return __awaiter$4(this,void 0,void 0,function*(){const _0x47bff8=this['path']+'/'+_0x5e0205+'/'+_0x26e635;try{const _0x6b2087=yield this['fetch']['get'](_0x47bff8,_0x458a5c);if(_0x6b2087['status']>0xc7&&_0x6b2087['status']<0x12c){const _0x308e2b=yield _0x6b2087['json']();return new SuccessfulApiKeyValueResponse(_0x308e2b);}const _0x1283f8=yield _0x6b2087['json']();return new FailedApiKeyValueResponse(_0x1283f8);}catch(_0x314fff){if(_0x314fff instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x314fff['message'],'title':_0x314fff['name'],'status':0x1f4,'instance':'','type':''});throw _0x314fff;}});}['delete'](_0x39cccb,_0x269f15,_0x59c906){return __awaiter$4(this,void 0,void 0,function*(){const _0x432cea=this['path']+'/'+_0x39cccb+'/'+_0x269f15;try{const _0x2f7322=yield this['fetch']['delete'](_0x432cea,_0x59c906);if(_0x2f7322['status']>0xc7&&_0x2f7322['status']<0x12c)return new SuccessfulResponse({});const _0x38941f=yield _0x2f7322['json']();return new FailedResponse(_0x38941f);}catch(_0x17c062){if(_0x17c062 instanceof Error)return new FailedResponse({'detail':_0x17c062['message'],'title':_0x17c062['name'],'status':0x1f4,'instance':'','type':''});throw _0x17c062;}});}}
6
-
7
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x9782f2,_0x4a65fe,_0x3b4cfb,_0x24621c){function _0x240d3d(_0x1a0ea2){return _0x1a0ea2 instanceof _0x3b4cfb?_0x1a0ea2:new _0x3b4cfb(function(_0x48ab96){_0x48ab96(_0x1a0ea2);});}return new(_0x3b4cfb||(_0x3b4cfb=Promise))(function(_0x392ec7,_0x40d9ae){function _0x5a4e7f(_0x3803c5){try{_0x2a772d(_0x24621c['next'](_0x3803c5));}catch(_0x443559){_0x40d9ae(_0x443559);}}function _0x40d081(_0x2260b5){try{_0x2a772d(_0x24621c['throw'](_0x2260b5));}catch(_0x33f192){_0x40d9ae(_0x33f192);}}function _0x2a772d(_0x40c5a2){_0x40c5a2['done']?_0x392ec7(_0x40c5a2['value']):_0x240d3d(_0x40c5a2['value'])['then'](_0x5a4e7f,_0x40d081);}_0x2a772d((_0x24621c=_0x24621c['apply'](_0x9782f2,_0x4a65fe||[]))['next']());});};class ListService{constructor(_0x2ee11e){this['fetch']=_0x2ee11e;}['add'](_0x12b674,_0x422541,_0x3f897a){return __awaiter$3(this,void 0,void 0,function*(){const _0x2fd1df='List',_0x367b8b={'account_name':_0x12b674,'list_name':_0x422541};try{const _0x3944f5=yield this['fetch']['post'](_0x2fd1df,_0x3f897a,_0x367b8b);if(_0x3944f5['status']>0xc7&&_0x3944f5['status']<0x12c){const _0x5964e3=yield _0x3944f5['json']();return new SuccessfulAccountResponse(_0x5964e3);}const _0x4e4737=yield _0x3944f5['json']();return new FailedAccountResponse(_0x4e4737);}catch(_0x1da67c){if(_0x1da67c instanceof Error)return new FailedAccountResponse({'detail':_0x1da67c['message'],'title':_0x1da67c['name'],'status':0x1f4,'instance':'','type':''});throw _0x1da67c;}});}['remove'](_0xdd935,_0x5949e6,_0x24c09c){return __awaiter$3(this,void 0,void 0,function*(){const _0xbcd122='List/'+_0xdd935+'/'+_0x5949e6,_0xbc32bf=yield this['fetch']['delete'](_0xbcd122,_0x24c09c);try{if(_0xbc32bf['status']>0xc7&&_0xbc32bf['status']<0x12c){const _0x1dcec1=yield _0xbc32bf['json']();return new SuccessfulAccountResponse(_0x1dcec1);}const _0x2038f1=yield _0xbc32bf['json']();return new FailedAccountResponse(_0x2038f1);}catch(_0x2992cd){if(_0x2992cd instanceof Error)return new FailedAccountResponse({'detail':_0x2992cd['message'],'title':_0x2992cd['name'],'status':0x1f4,'instance':'','type':''});throw _0x2992cd;}});}}
8
-
9
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x436ecc,_0x5ee802,_0x39720f,_0x1f68b0){function _0x309a28(_0x2e3c56){return _0x2e3c56 instanceof _0x39720f?_0x2e3c56:new _0x39720f(function(_0x1cfd2c){_0x1cfd2c(_0x2e3c56);});}return new(_0x39720f||(_0x39720f=Promise))(function(_0x1c17ad,_0x54c994){function _0x3e8c70(_0xa297aa){try{_0x556252(_0x1f68b0['next'](_0xa297aa));}catch(_0x266d7c){_0x54c994(_0x266d7c);}}function _0x2f4abb(_0x103467){try{_0x556252(_0x1f68b0['throw'](_0x103467));}catch(_0x59f493){_0x54c994(_0x59f493);}}function _0x556252(_0x5271bc){_0x5271bc['done']?_0x1c17ad(_0x5271bc['value']):_0x309a28(_0x5271bc['value'])['then'](_0x3e8c70,_0x2f4abb);}_0x556252((_0x1f68b0=_0x1f68b0['apply'](_0x436ecc,_0x5ee802||[]))['next']());});};class Fetch{constructor(_0xe79e96){this['baseUri']=_0xe79e96,this['getUrl']=_0x1a9d02=>{return _0x1a9d02['startsWith']('/')&&(_0x1a9d02=_0x1a9d02['replace']('/','')),''+this['baseUri']+_0x1a9d02;},!_0xe79e96['endsWith']('/')&&(_0xe79e96=_0xe79e96+'/');}['get'](_0x1bd4d9,_0x25101a){return __awaiter$2(this,void 0,void 0,function*(){const _0x43dbdb=this['getUrl'](_0x1bd4d9);return yield fetch(_0x43dbdb,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x25101a}});});}['post'](_0x47f8dc,_0x41bd65,_0x2dcef1){return __awaiter$2(this,void 0,void 0,function*(){const _0x31ce69=this['getUrl'](_0x47f8dc);return yield fetch(_0x31ce69,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x41bd65},'body':_0x2dcef1?JSON['stringify'](_0x2dcef1):null});});}['put'](_0x4664bc,_0x1961e6,_0x529cf7){return __awaiter$2(this,void 0,void 0,function*(){const _0x3e6597=this['getUrl'](_0x4664bc);return yield fetch(_0x3e6597,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1961e6},'body':_0x529cf7?JSON['stringify'](_0x529cf7):null});});}['delete'](_0x21a9e6,_0x2b6398){return __awaiter$2(this,void 0,void 0,function*(){const _0x5dad26=this['getUrl'](_0x21a9e6);return yield fetch(_0x5dad26,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2b6398}});});}}
10
-
11
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x4bb500,_0x5c0bbd,_0x546c4b,_0x191509){function _0x3a8bf8(_0x166232){return _0x166232 instanceof _0x546c4b?_0x166232:new _0x546c4b(function(_0x2a0fe6){_0x2a0fe6(_0x166232);});}return new(_0x546c4b||(_0x546c4b=Promise))(function(_0xd3f1a5,_0xebcad6){function _0x62a7db(_0x321a1c){try{_0x461fbf(_0x191509['next'](_0x321a1c));}catch(_0x30d3b1){_0xebcad6(_0x30d3b1);}}function _0x1f044b(_0x51bc23){try{_0x461fbf(_0x191509['throw'](_0x51bc23));}catch(_0x2a4a3a){_0xebcad6(_0x2a4a3a);}}function _0x461fbf(_0x5183fc){_0x5183fc['done']?_0xd3f1a5(_0x5183fc['value']):_0x3a8bf8(_0x5183fc['value'])['then'](_0x62a7db,_0x1f044b);}_0x461fbf((_0x191509=_0x191509['apply'](_0x4bb500,_0x5c0bbd||[]))['next']());});};class SearchServersService{constructor(_0x3e8c95){this['fetch']=_0x3e8c95,this['path']='search-services';}['create'](_0x388f27,_0x31f50e,_0x44872f,_0x2e5a9a,_0x448a0b,_0x26135e,_0xb813e0,_0x558458){return __awaiter$1(this,void 0,void 0,function*(){const _0x3339c5={'account_name':_0x388f27,'search_service_name':_0x31f50e,'endpoint':_0x44872f,'key':_0x2e5a9a,'country':_0x448a0b,'provider':_0x26135e,'index_name':_0xb813e0};try{const _0xa6595b=yield this['fetch']['post'](this['path'],_0x558458,_0x3339c5);if(_0xa6595b['status']>0xc7&&_0xa6595b['status']<0x12c){const _0x2cfeac=yield _0xa6595b['json']();return new SuccessfulSearchServiceResponse(_0x2cfeac);}const _0x2ec447=yield _0xa6595b['json']();return new FailedSearchServiceResponse(_0x2ec447);}catch(_0x2b4ac2){if(_0x2b4ac2 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x2b4ac2['message'],'title':_0x2b4ac2['name'],'status':0x1f4,'instance':'','type':''});throw _0x2b4ac2;}});}['delete'](_0x2a1f60,_0x47d332,_0x3c6bed){return __awaiter$1(this,void 0,void 0,function*(){const _0x4a2c2a=this['path']+'/'+_0x2a1f60+'/'+_0x47d332;try{const _0x3bf763=yield this['fetch']['delete'](_0x4a2c2a,_0x3c6bed);if(_0x3bf763['status']>0xc7&&_0x3bf763['status']<0x12c)return new SuccessfulResponse({});const _0x27ba00=yield _0x3bf763['json']();return new FailedResponse(_0x27ba00);}catch(_0x4c7495){if(_0x4c7495 instanceof Error)return new FailedResponse({'detail':_0x4c7495['message'],'title':_0x4c7495['name'],'status':0x1f4,'instance':'','type':''});throw _0x4c7495;}});}['view'](_0x3ea289,_0x57ad7a,_0x5a56df){return __awaiter$1(this,void 0,void 0,function*(){const _0x35079a=this['path']+'/'+_0x3ea289+'/'+_0x57ad7a;try{const _0x182ff6=yield this['fetch']['get'](_0x35079a,_0x5a56df);if(_0x182ff6['status']>0xc7&&_0x182ff6['status']<0x12c){const _0x528479=yield _0x182ff6['json']();return new SuccessfulViewSearchServiceResponse(_0x528479);}const _0x3de575=yield _0x182ff6['json']();return new FailedViewSearchServiceResponse(_0x3de575);}catch(_0x3beb58){if(_0x3beb58 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x3beb58['message'],'title':_0x3beb58['name'],'status':0x1f4,'instance':'','type':''});throw _0x3beb58;}});}}
12
-
13
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x1f4b52,_0x4bc822,_0x1f57f5,_0x3a1e38){function _0x49cf99(_0x32ccce){return _0x32ccce instanceof _0x1f57f5?_0x32ccce:new _0x1f57f5(function(_0x5dbd7a){_0x5dbd7a(_0x32ccce);});}return new(_0x1f57f5||(_0x1f57f5=Promise))(function(_0x4adc17,_0x462789){function _0x4d2859(_0x1d5ae0){try{_0x591986(_0x3a1e38['next'](_0x1d5ae0));}catch(_0x8d5c55){_0x462789(_0x8d5c55);}}function _0x5b1d31(_0x3a1a3e){try{_0x591986(_0x3a1e38['throw'](_0x3a1a3e));}catch(_0x5554aa){_0x462789(_0x5554aa);}}function _0x591986(_0x4a6613){_0x4a6613['done']?_0x4adc17(_0x4a6613['value']):_0x49cf99(_0x4a6613['value'])['then'](_0x4d2859,_0x5b1d31);}_0x591986((_0x3a1e38=_0x3a1e38['apply'](_0x1f4b52,_0x4bc822||[]))['next']());});};class AdminClient{constructor(_0x5c9139='https://admin.searchability.dev/'){var _0x2f1a39=new Fetch(_0x5c9139);this['Accounts']=new AccountService(_0x2f1a39),this['Lists']=new ListService(_0x2f1a39),this['ApiKeys']=new ApiKeyService(_0x2f1a39),this['SearchServices']=new SearchServersService(_0x2f1a39);}}class AuthClient{constructor(_0x4e5fd5='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x4e5fd5);}['login'](_0x1e56df){return __awaiter(this,void 0,void 0,function*(){var _0x5fb48a='login/'+_0x1e56df;try{const _0x9d86e1=yield yield fetch(_0x5fb48a);if(_0x9d86e1['status']>0xc7&&_0x9d86e1['status']<0x12c){const _0x3af293=yield _0x9d86e1['json']();return new SuccessfulAuthResponse(_0x3af293);}const _0x5e13d5=yield _0x9d86e1['json']();return new FailedAuthResponse(_0x5e13d5);}catch(_0x227fb7){if(_0x227fb7 instanceof Error)return new FailedAuthResponse({'detail':_0x227fb7['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x227fb7;}});}['refresh'](_0x51ac00){return __awaiter(this,void 0,void 0,function*(){var _0x10b43d='refresh';try{const _0x4ce44d=yield this['fetch']['post'](_0x10b43d,_0x51ac00,null);if(_0x4ce44d['status']>0xc7&&_0x4ce44d['status']<0x12c){const _0x2eb36c=yield _0x4ce44d['json']();return new SuccessfulAuthResponse(_0x2eb36c);}const _0x152751=yield _0x4ce44d['json']();return new FailedAuthResponse(_0x152751);}catch(_0x392f4d){if(_0x392f4d instanceof Error)return new FailedAuthResponse({'detail':_0x392f4d['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x392f4d;}});}['getTokenStatus'](_0x3990fb){if(Date['now']()<_0x3990fb['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x3990fb['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
14
-
15
- export { AdminClient, AuthClient, TokenStatus, Tokens };