@searchability/admin-client 0.0.26 → 0.0.28

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(_0x271677){_0x271677[_0x271677['Ok']=0x0]='Ok',_0x271677[_0x271677['Refresh']=0x1]='Refresh',_0x271677[_0x271677['Expired']=0x2]='Expired';}(TokenStatus||(TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}['getStatus'](){if(Date['now']()<this['access_expires'])return TokenStatus['Ok'];if(Date['now']()<this['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
2
+
3
+ class Response{constructor(_0x449166){this['isSuccess']=_0x449166;}}class SuccessfulAccountResponse extends Response{constructor(_0x5f3487){super(!![]),this['account']=_0x5f3487;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x26a7e3){super(![]),this['problem']=_0x26a7e3;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x308beb){super(!![]),this['tokens']=_0x308beb;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x4cd9e6){super(![]),this['problem']=_0x4cd9e6;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x3748ac){super(!![]),this['apiKey']=_0x3748ac;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x1fddf4){super(![]),this['problem']=_0x1fddf4;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x40f07b){super(!![]),this['apiKeyValue']=_0x40f07b;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyValueResponse extends Response{constructor(_0x4e0d3d){super(![]),this['problem']=_0x4e0d3d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
4
+
5
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x43721e,_0xeb0157,_0xe1faf1,_0x423182){function _0x555064(_0x4ce3a1){return _0x4ce3a1 instanceof _0xe1faf1?_0x4ce3a1:new _0xe1faf1(function(_0x5cc00d){_0x5cc00d(_0x4ce3a1);});}return new(_0xe1faf1||(_0xe1faf1=Promise))(function(_0x4e0e58,_0x37e791){function _0x200c65(_0x367160){try{_0x440568(_0x423182['next'](_0x367160));}catch(_0x540369){_0x37e791(_0x540369);}}function _0x3de339(_0x264f04){try{_0x440568(_0x423182['throw'](_0x264f04));}catch(_0xbb292e){_0x37e791(_0xbb292e);}}function _0x440568(_0x1afc90){_0x1afc90['done']?_0x4e0e58(_0x1afc90['value']):_0x555064(_0x1afc90['value'])['then'](_0x200c65,_0x3de339);}_0x440568((_0x423182=_0x423182['apply'](_0x43721e,_0xeb0157||[]))['next']());});};class AccountService{constructor(_0xde888d){this['fetch']=_0xde888d;}['get'](_0x6bbb34,_0x50c3c3){return __awaiter$4(this,void 0,void 0,function*(){const _0x2f6001='Account/'+_0x6bbb34+'/',_0x33ed4a=yield this['fetch']['get'](_0x2f6001,_0x50c3c3);try{if(_0x33ed4a['status']>0xc7&&_0x33ed4a['status']<0x12c){const _0x4b7c68=yield _0x33ed4a['json']();return new SuccessfulAccountResponse(_0x4b7c68);}const _0x3585da=yield _0x33ed4a['json']();return new FailedAccountResponse(_0x3585da);}catch(_0x5e5d8d){if(_0x5e5d8d instanceof Error)return new FailedAccountResponse({'detail':_0x5e5d8d['message'],'title':_0x5e5d8d['name'],'status':0x1f4,'instance':'','type':''});throw _0x5e5d8d;}});}}
6
+
7
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x31c83c,_0x45ec0d,_0x533ece,_0x149421){function _0x52f8f7(_0x3e94dc){return _0x3e94dc instanceof _0x533ece?_0x3e94dc:new _0x533ece(function(_0x54e7ec){_0x54e7ec(_0x3e94dc);});}return new(_0x533ece||(_0x533ece=Promise))(function(_0x408fcc,_0x5ad6b9){function _0x4680cd(_0x5a5473){try{_0x28530d(_0x149421['next'](_0x5a5473));}catch(_0x176e56){_0x5ad6b9(_0x176e56);}}function _0x95029b(_0x234578){try{_0x28530d(_0x149421['throw'](_0x234578));}catch(_0x51c147){_0x5ad6b9(_0x51c147);}}function _0x28530d(_0x93f19c){_0x93f19c['done']?_0x408fcc(_0x93f19c['value']):_0x52f8f7(_0x93f19c['value'])['then'](_0x4680cd,_0x95029b);}_0x28530d((_0x149421=_0x149421['apply'](_0x31c83c,_0x45ec0d||[]))['next']());});};class ApiKeyService{constructor(_0x1035a0){this['fetch']=_0x1035a0;}['create'](_0x126c4e,_0x547340,_0x2722ec){return __awaiter$3(this,void 0,void 0,function*(){const _0x3175e3='api-key/create',_0x464d8d={'account_name':_0x126c4e,'api_key_name':_0x547340};try{const _0x2930cf=yield this['fetch']['post'](_0x3175e3,_0x2722ec,_0x464d8d);if(_0x2930cf['status']>0xc7&&_0x2930cf['status']<0x12c){const _0x239e0c=yield _0x2930cf['json']();return new SuccessfulApiKeyResponse(_0x239e0c);}const _0x4cb084=yield _0x2930cf['json']();return new FailedApiKeyResponse(_0x4cb084);}catch(_0x4dad9e){if(_0x4dad9e instanceof Error)return new FailedApiKeyResponse({'detail':_0x4dad9e['message'],'title':_0x4dad9e['name'],'status':0x1f4,'instance':'','type':''});throw _0x4dad9e;}});}['view'](_0x54f04f,_0x50c70f,_0x551d22){return __awaiter$3(this,void 0,void 0,function*(){const _0x5b4ec7='api-key/'+_0x54f04f+'/'+_0x50c70f;try{const _0x85dfe2=yield this['fetch']['get'](_0x5b4ec7,_0x551d22);if(_0x85dfe2['status']>0xc7&&_0x85dfe2['status']<0x12c){const _0x4b6a49=yield _0x85dfe2['json']();return new SuccessfulApiKeyValueResponse(_0x4b6a49);}const _0x43d0d6=yield _0x85dfe2['json']();return new FailedApiKeyValueResponse(_0x43d0d6);}catch(_0x1c7e43){if(_0x1c7e43 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x1c7e43['message'],'title':_0x1c7e43['name'],'status':0x1f4,'instance':'','type':''});throw _0x1c7e43;}});}}
8
+
9
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x5baed4,_0x453c3b,_0xf42cf2,_0x1014ec){function _0x9884e1(_0x33079e){return _0x33079e instanceof _0xf42cf2?_0x33079e:new _0xf42cf2(function(_0x57bd4a){_0x57bd4a(_0x33079e);});}return new(_0xf42cf2||(_0xf42cf2=Promise))(function(_0x2b3296,_0x313db7){function _0x217c2d(_0x24792b){try{_0x4e0270(_0x1014ec['next'](_0x24792b));}catch(_0x30d6f9){_0x313db7(_0x30d6f9);}}function _0x26b2c6(_0x19d9c8){try{_0x4e0270(_0x1014ec['throw'](_0x19d9c8));}catch(_0x3ebee7){_0x313db7(_0x3ebee7);}}function _0x4e0270(_0x590990){_0x590990['done']?_0x2b3296(_0x590990['value']):_0x9884e1(_0x590990['value'])['then'](_0x217c2d,_0x26b2c6);}_0x4e0270((_0x1014ec=_0x1014ec['apply'](_0x5baed4,_0x453c3b||[]))['next']());});};class ListService{constructor(_0x4c8f13){this['fetch']=_0x4c8f13;}['add'](_0x52bf4d,_0x67c9a5,_0x38186f){return __awaiter$2(this,void 0,void 0,function*(){const _0x24d478='List',_0x483210={'account_name':_0x52bf4d,'list_name':_0x67c9a5};try{const _0x39e41c=yield this['fetch']['post'](_0x24d478,_0x38186f,_0x483210);if(_0x39e41c['status']>0xc7&&_0x39e41c['status']<0x12c){const _0x52a868=yield _0x39e41c['json']();return new SuccessfulAccountResponse(_0x52a868);}const _0x1128cd=yield _0x39e41c['json']();return new FailedAccountResponse(_0x1128cd);}catch(_0x3b6666){if(_0x3b6666 instanceof Error)return new FailedAccountResponse({'detail':_0x3b6666['message'],'title':_0x3b6666['name'],'status':0x1f4,'instance':'','type':''});throw _0x3b6666;}});}['remove'](_0x321521,_0xa2d8d4,_0x231e22){return __awaiter$2(this,void 0,void 0,function*(){const _0x1d70de='List/'+_0x321521+'/'+_0xa2d8d4,_0x57d6be=yield this['fetch']['delete'](_0x1d70de,_0x231e22);try{if(_0x57d6be['status']>0xc7&&_0x57d6be['status']<0x12c){const _0x1b1b67=yield _0x57d6be['json']();return new SuccessfulAccountResponse(_0x1b1b67);}const _0x34890f=yield _0x57d6be['json']();return new FailedAccountResponse(_0x34890f);}catch(_0x574da0){if(_0x574da0 instanceof Error)return new FailedAccountResponse({'detail':_0x574da0['message'],'title':_0x574da0['name'],'status':0x1f4,'instance':'','type':''});throw _0x574da0;}});}}
10
+
11
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x20b2b1,_0xae281,_0x47d6f5,_0x2406fd){function _0x196057(_0x4057f3){return _0x4057f3 instanceof _0x47d6f5?_0x4057f3:new _0x47d6f5(function(_0x3e86bb){_0x3e86bb(_0x4057f3);});}return new(_0x47d6f5||(_0x47d6f5=Promise))(function(_0x5297d6,_0x7bcd9c){function _0x35076b(_0x555565){try{_0x183b6(_0x2406fd['next'](_0x555565));}catch(_0xa70f1){_0x7bcd9c(_0xa70f1);}}function _0x3929d3(_0x4e37d6){try{_0x183b6(_0x2406fd['throw'](_0x4e37d6));}catch(_0x5c4510){_0x7bcd9c(_0x5c4510);}}function _0x183b6(_0x116749){_0x116749['done']?_0x5297d6(_0x116749['value']):_0x196057(_0x116749['value'])['then'](_0x35076b,_0x3929d3);}_0x183b6((_0x2406fd=_0x2406fd['apply'](_0x20b2b1,_0xae281||[]))['next']());});};class Fetch{constructor(_0x19c11a){this['baseUri']=_0x19c11a,this['getUrl']=_0x5af303=>{return _0x5af303['startsWith']('/')&&(_0x5af303=_0x5af303['replace']('/','')),''+this['baseUri']+_0x5af303;},!_0x19c11a['endsWith']('/')&&(_0x19c11a=_0x19c11a+'/');}['get'](_0x248382,_0x250255){return __awaiter$1(this,void 0,void 0,function*(){const _0x698062=this['getUrl'](_0x248382);return yield fetch(_0x698062,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x250255}});});}['post'](_0x101c03,_0x13c7c1,_0x434e7){return __awaiter$1(this,void 0,void 0,function*(){const _0x4caa09=this['getUrl'](_0x101c03);return yield fetch(_0x4caa09,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x13c7c1},'body':_0x434e7?JSON['stringify'](_0x434e7):null});});}['put'](_0x339d1e,_0x1e16d0,_0x2b649a){return __awaiter$1(this,void 0,void 0,function*(){const _0x3dd678=this['getUrl'](_0x339d1e);return yield fetch(_0x3dd678,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1e16d0},'body':_0x2b649a?JSON['stringify'](_0x2b649a):null});});}['delete'](_0x54038e,_0x4437d7){return __awaiter$1(this,void 0,void 0,function*(){const _0x32fa73=this['getUrl'](_0x54038e);return yield fetch(_0x32fa73,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4437d7}});});}}
12
+
13
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x581c55,_0x49d3aa,_0x1803e2,_0xe30fbe){function _0x2fbc32(_0x3b074c){return _0x3b074c instanceof _0x1803e2?_0x3b074c:new _0x1803e2(function(_0x266048){_0x266048(_0x3b074c);});}return new(_0x1803e2||(_0x1803e2=Promise))(function(_0x3a3f4d,_0x1a36a4){function _0x576113(_0x1a6d44){try{_0x6c7d8b(_0xe30fbe['next'](_0x1a6d44));}catch(_0xc43b97){_0x1a36a4(_0xc43b97);}}function _0x3c7a44(_0x40de85){try{_0x6c7d8b(_0xe30fbe['throw'](_0x40de85));}catch(_0x3b27c7){_0x1a36a4(_0x3b27c7);}}function _0x6c7d8b(_0x279996){_0x279996['done']?_0x3a3f4d(_0x279996['value']):_0x2fbc32(_0x279996['value'])['then'](_0x576113,_0x3c7a44);}_0x6c7d8b((_0xe30fbe=_0xe30fbe['apply'](_0x581c55,_0x49d3aa||[]))['next']());});};class AdminClient{constructor(_0x356537='https://admin.searchability.dev/'){var _0x5c930e=new Fetch(_0x356537);this['Accounts']=new AccountService(_0x5c930e),this['Lists']=new ListService(_0x5c930e),this['ApiKeys']=new ApiKeyService(_0x5c930e);}}class AuthClient{constructor(_0x5fcf17='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x5fcf17);}['login'](_0x5d355a){return __awaiter(this,void 0,void 0,function*(){var _0x27dacd='login/'+_0x5d355a;try{const _0x2d41fe=yield yield fetch(_0x27dacd);if(_0x2d41fe['status']>0xc7&&_0x2d41fe['status']<0x12c){const _0x3faba8=yield _0x2d41fe['json']();return new SuccessfulAuthResponse(_0x3faba8);}const _0x52050e=yield _0x2d41fe['json']();return new FailedAuthResponse(_0x52050e);}catch(_0x20d490){if(_0x20d490 instanceof Error)return new FailedAuthResponse({'detail':_0x20d490['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x20d490;}});}['refresh'](_0x40719f){return __awaiter(this,void 0,void 0,function*(){var _0x4cb0b5='refresh';try{const _0x6ef65a=yield this['fetch']['post'](_0x4cb0b5,_0x40719f,null);if(_0x6ef65a['status']>0xc7&&_0x6ef65a['status']<0x12c){const _0x522475=yield _0x6ef65a['json']();return new SuccessfulAuthResponse(_0x522475);}const _0x41da34=yield _0x6ef65a['json']();return new FailedAuthResponse(_0x41da34);}catch(_0x268001){if(_0x268001 instanceof Error)return new FailedAuthResponse({'detail':_0x268001['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x268001;}});}}
14
+
15
+ export { AdminClient, AuthClient, TokenStatus, Tokens };
@@ -1,16 +1,19 @@
1
1
  'use strict';
2
2
 
3
- class Response{constructor(_0x3bc22b){this['isSuccess']=_0x3bc22b;}}var TokenStatus;(function(_0x492cb6){_0x492cb6[_0x492cb6['Ok']=0x0]='Ok',_0x492cb6[_0x492cb6['Refresh']=0x1]='Refresh',_0x492cb6[_0x492cb6['Expired']=0x2]='Expired';}(TokenStatus||(TokenStatus={})));class SuccessfulAccountResponse extends Response{constructor(_0x247e07){super(!![]),this['account']=_0x247e07;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x30bfba){super(![]),this['problem']=_0x30bfba;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x2d0838){super(!![]),this['tokens']=_0x2d0838;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x584ddc){super(![]),this['problem']=_0x584ddc;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x590914){super(!![]),this['apiKey']=_0x590914;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x5398c0){super(![]),this['problem']=_0x5398c0;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x165877){super(!![]),this['apiKeyValue']=_0x165877;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyValueResponse extends Response{constructor(_0x200b3b){super(![]),this['problem']=_0x200b3b;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
3
+ exports.TokenStatus = void 0;(function(_0x5c65db){_0x5c65db[_0x5c65db['Ok']=0x0]='Ok',_0x5c65db[_0x5c65db['Refresh']=0x1]='Refresh',_0x5c65db[_0x5c65db['Expired']=0x2]='Expired';}(exports.TokenStatus||(exports.TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}['getStatus'](){if(Date['now']()<this['access_expires'])return exports.TokenStatus['Ok'];if(Date['now']()<this['refresh_expires'])return exports.TokenStatus['Refresh'];return exports.TokenStatus['Expired'];}}
4
4
 
5
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x30ce0c,_0x59d0e6,_0x34f9ba,_0x144eea){function _0x1d8cfa(_0x594357){return _0x594357 instanceof _0x34f9ba?_0x594357:new _0x34f9ba(function(_0xa7e69c){_0xa7e69c(_0x594357);});}return new(_0x34f9ba||(_0x34f9ba=Promise))(function(_0x55924a,_0x1adb60){function _0x29d6c0(_0xf46c18){try{_0x54ba8e(_0x144eea['next'](_0xf46c18));}catch(_0x4baba3){_0x1adb60(_0x4baba3);}}function _0x4e09fd(_0x5235e3){try{_0x54ba8e(_0x144eea['throw'](_0x5235e3));}catch(_0x4b6947){_0x1adb60(_0x4b6947);}}function _0x54ba8e(_0x4b848a){_0x4b848a['done']?_0x55924a(_0x4b848a['value']):_0x1d8cfa(_0x4b848a['value'])['then'](_0x29d6c0,_0x4e09fd);}_0x54ba8e((_0x144eea=_0x144eea['apply'](_0x30ce0c,_0x59d0e6||[]))['next']());});};class AccountService{constructor(_0x3c329d){this['fetch']=_0x3c329d;}['get'](_0x98931d,_0x275d8e){return __awaiter$4(this,void 0,void 0,function*(){const _0x85f812='Account/'+_0x98931d+'/',_0x7f6995=yield this['fetch']['get'](_0x85f812,_0x275d8e);try{if(_0x7f6995['status']>0xc7&&_0x7f6995['status']<0x12c){const _0x1cd18c=yield _0x7f6995['json']();return new SuccessfulAccountResponse(_0x1cd18c);}const _0x48381e=yield _0x7f6995['json']();return new FailedAccountResponse(_0x48381e);}catch(_0x18f885){if(_0x18f885 instanceof Error)return new FailedAccountResponse({'detail':_0x18f885['message'],'title':_0x18f885['name'],'status':0x1f4,'instance':'','type':''});throw _0x18f885;}});}}
5
+ class Response{constructor(_0x44db66){this['isSuccess']=_0x44db66;}}class SuccessfulAccountResponse extends Response{constructor(_0x4b820e){super(!![]),this['account']=_0x4b820e;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x453bc8){super(![]),this['problem']=_0x453bc8;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0xbd4d6c){super(!![]),this['tokens']=_0xbd4d6c;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x5a3ead){super(![]),this['problem']=_0x5a3ead;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x2cbefc){super(!![]),this['apiKey']=_0x2cbefc;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x1bb362){super(![]),this['problem']=_0x1bb362;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x3e538c){super(!![]),this['apiKeyValue']=_0x3e538c;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyValueResponse extends Response{constructor(_0x238317){super(![]),this['problem']=_0x238317;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
6
6
 
7
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x4d3b0e,_0x26752f,_0x12be03,_0x2aa1ed){function _0x4a0c20(_0x46ec63){return _0x46ec63 instanceof _0x12be03?_0x46ec63:new _0x12be03(function(_0x32d99a){_0x32d99a(_0x46ec63);});}return new(_0x12be03||(_0x12be03=Promise))(function(_0x451619,_0x53f607){function _0x3cb61b(_0x429a1c){try{_0x7cbabd(_0x2aa1ed['next'](_0x429a1c));}catch(_0x4a055d){_0x53f607(_0x4a055d);}}function _0x97a8d6(_0x472ad8){try{_0x7cbabd(_0x2aa1ed['throw'](_0x472ad8));}catch(_0xea5306){_0x53f607(_0xea5306);}}function _0x7cbabd(_0x2b9511){_0x2b9511['done']?_0x451619(_0x2b9511['value']):_0x4a0c20(_0x2b9511['value'])['then'](_0x3cb61b,_0x97a8d6);}_0x7cbabd((_0x2aa1ed=_0x2aa1ed['apply'](_0x4d3b0e,_0x26752f||[]))['next']());});};class ApiKeyService{constructor(_0x5ddcd8){this['fetch']=_0x5ddcd8;}['create'](_0x4ac32a,_0x539ecf,_0x4734fd){return __awaiter$3(this,void 0,void 0,function*(){const _0x5b6f1b='api-key/create',_0x41b1e7={'account_name':_0x4ac32a,'api_key_name':_0x539ecf};try{const _0x4b413a=yield this['fetch']['post'](_0x5b6f1b,_0x4734fd,_0x41b1e7);if(_0x4b413a['status']>0xc7&&_0x4b413a['status']<0x12c){const _0x44e144=yield _0x4b413a['json']();return new SuccessfulApiKeyResponse(_0x44e144);}const _0x30f57b=yield _0x4b413a['json']();return new FailedApiKeyResponse(_0x30f57b);}catch(_0x438e8a){if(_0x438e8a instanceof Error)return new FailedApiKeyResponse({'detail':_0x438e8a['message'],'title':_0x438e8a['name'],'status':0x1f4,'instance':'','type':''});throw _0x438e8a;}});}['view'](_0x22bdb2,_0x3ed778,_0x45521b){return __awaiter$3(this,void 0,void 0,function*(){const _0x242aad='api-key/'+_0x22bdb2+'/'+_0x3ed778;try{const _0x33635b=yield this['fetch']['get'](_0x242aad,_0x45521b);if(_0x33635b['status']>0xc7&&_0x33635b['status']<0x12c){const _0x6ace98=yield _0x33635b['json']();return new SuccessfulApiKeyValueResponse(_0x6ace98);}const _0x21ae2d=yield _0x33635b['json']();return new FailedApiKeyValueResponse(_0x21ae2d);}catch(_0x2a2c53){if(_0x2a2c53 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x2a2c53['message'],'title':_0x2a2c53['name'],'status':0x1f4,'instance':'','type':''});throw _0x2a2c53;}});}}
7
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x1c5803,_0x41db83,_0xff8370,_0x4db940){function _0x42d0f5(_0x31c9e6){return _0x31c9e6 instanceof _0xff8370?_0x31c9e6:new _0xff8370(function(_0x22ef48){_0x22ef48(_0x31c9e6);});}return new(_0xff8370||(_0xff8370=Promise))(function(_0x22767a,_0xad2123){function _0x5ac09b(_0x3e9e1a){try{_0x47b5e5(_0x4db940['next'](_0x3e9e1a));}catch(_0x1cce74){_0xad2123(_0x1cce74);}}function _0x1f4cf9(_0x425cb4){try{_0x47b5e5(_0x4db940['throw'](_0x425cb4));}catch(_0x1792b7){_0xad2123(_0x1792b7);}}function _0x47b5e5(_0x5d4f4d){_0x5d4f4d['done']?_0x22767a(_0x5d4f4d['value']):_0x42d0f5(_0x5d4f4d['value'])['then'](_0x5ac09b,_0x1f4cf9);}_0x47b5e5((_0x4db940=_0x4db940['apply'](_0x1c5803,_0x41db83||[]))['next']());});};class AccountService{constructor(_0x1d6490){this['fetch']=_0x1d6490;}['get'](_0xab5efd,_0x24ac47){return __awaiter$4(this,void 0,void 0,function*(){const _0xfe923f='Account/'+_0xab5efd+'/',_0x26bfd4=yield this['fetch']['get'](_0xfe923f,_0x24ac47);try{if(_0x26bfd4['status']>0xc7&&_0x26bfd4['status']<0x12c){const _0x5f39c8=yield _0x26bfd4['json']();return new SuccessfulAccountResponse(_0x5f39c8);}const _0x3882cc=yield _0x26bfd4['json']();return new FailedAccountResponse(_0x3882cc);}catch(_0x332784){if(_0x332784 instanceof Error)return new FailedAccountResponse({'detail':_0x332784['message'],'title':_0x332784['name'],'status':0x1f4,'instance':'','type':''});throw _0x332784;}});}}
8
8
 
9
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x3930f0,_0x323b50,_0x40852b,_0x471420){function _0x4d1a4a(_0x29d8f3){return _0x29d8f3 instanceof _0x40852b?_0x29d8f3:new _0x40852b(function(_0x6dcc94){_0x6dcc94(_0x29d8f3);});}return new(_0x40852b||(_0x40852b=Promise))(function(_0x37b758,_0x2f6e6e){function _0x500992(_0x412384){try{_0x33be46(_0x471420['next'](_0x412384));}catch(_0x3bfe2b){_0x2f6e6e(_0x3bfe2b);}}function _0x12df63(_0x151a37){try{_0x33be46(_0x471420['throw'](_0x151a37));}catch(_0x28c7dc){_0x2f6e6e(_0x28c7dc);}}function _0x33be46(_0x3aac44){_0x3aac44['done']?_0x37b758(_0x3aac44['value']):_0x4d1a4a(_0x3aac44['value'])['then'](_0x500992,_0x12df63);}_0x33be46((_0x471420=_0x471420['apply'](_0x3930f0,_0x323b50||[]))['next']());});};class ListService{constructor(_0x3a0ebc){this['fetch']=_0x3a0ebc;}['add'](_0xde84bb,_0x257ddd,_0x2cf65b){return __awaiter$2(this,void 0,void 0,function*(){const _0x577492='List',_0x49baf8={'account_name':_0xde84bb,'list_name':_0x257ddd};try{const _0x36cfb8=yield this['fetch']['post'](_0x577492,_0x2cf65b,_0x49baf8);if(_0x36cfb8['status']>0xc7&&_0x36cfb8['status']<0x12c){const _0xd58f05=yield _0x36cfb8['json']();return new SuccessfulAccountResponse(_0xd58f05);}const _0x10eb3a=yield _0x36cfb8['json']();return new FailedAccountResponse(_0x10eb3a);}catch(_0x360d56){if(_0x360d56 instanceof Error)return new FailedAccountResponse({'detail':_0x360d56['message'],'title':_0x360d56['name'],'status':0x1f4,'instance':'','type':''});throw _0x360d56;}});}['remove'](_0x2ad914,_0x511cf1,_0xb1f128){return __awaiter$2(this,void 0,void 0,function*(){const _0x388e1c='List/'+_0x2ad914+'/'+_0x511cf1,_0x4cea93=yield this['fetch']['delete'](_0x388e1c,_0xb1f128);try{if(_0x4cea93['status']>0xc7&&_0x4cea93['status']<0x12c){const _0x10e373=yield _0x4cea93['json']();return new SuccessfulAccountResponse(_0x10e373);}const _0x596e3c=yield _0x4cea93['json']();return new FailedAccountResponse(_0x596e3c);}catch(_0x51416c){if(_0x51416c instanceof Error)return new FailedAccountResponse({'detail':_0x51416c['message'],'title':_0x51416c['name'],'status':0x1f4,'instance':'','type':''});throw _0x51416c;}});}}
9
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x57a117,_0x4c967b,_0x28929b,_0x1fdbd4){function _0x46681c(_0x4780b1){return _0x4780b1 instanceof _0x28929b?_0x4780b1:new _0x28929b(function(_0x509c6f){_0x509c6f(_0x4780b1);});}return new(_0x28929b||(_0x28929b=Promise))(function(_0x51de6b,_0x405ec8){function _0x52b965(_0x4ec42c){try{_0x2b1e39(_0x1fdbd4['next'](_0x4ec42c));}catch(_0x532cfa){_0x405ec8(_0x532cfa);}}function _0x522a68(_0x59efed){try{_0x2b1e39(_0x1fdbd4['throw'](_0x59efed));}catch(_0x355ee2){_0x405ec8(_0x355ee2);}}function _0x2b1e39(_0x4043e7){_0x4043e7['done']?_0x51de6b(_0x4043e7['value']):_0x46681c(_0x4043e7['value'])['then'](_0x52b965,_0x522a68);}_0x2b1e39((_0x1fdbd4=_0x1fdbd4['apply'](_0x57a117,_0x4c967b||[]))['next']());});};class ApiKeyService{constructor(_0x203fe9){this['fetch']=_0x203fe9;}['create'](_0x2032d3,_0x433f72,_0x21ab60){return __awaiter$3(this,void 0,void 0,function*(){const _0x2bf174='api-key/create',_0x4ab133={'account_name':_0x2032d3,'api_key_name':_0x433f72};try{const _0x44f428=yield this['fetch']['post'](_0x2bf174,_0x21ab60,_0x4ab133);if(_0x44f428['status']>0xc7&&_0x44f428['status']<0x12c){const _0x268fbe=yield _0x44f428['json']();return new SuccessfulApiKeyResponse(_0x268fbe);}const _0x482951=yield _0x44f428['json']();return new FailedApiKeyResponse(_0x482951);}catch(_0x54a475){if(_0x54a475 instanceof Error)return new FailedApiKeyResponse({'detail':_0x54a475['message'],'title':_0x54a475['name'],'status':0x1f4,'instance':'','type':''});throw _0x54a475;}});}['view'](_0x2870e8,_0x47337a,_0x4b1f00){return __awaiter$3(this,void 0,void 0,function*(){const _0x3c7fda='api-key/'+_0x2870e8+'/'+_0x47337a;try{const _0x3ebfb9=yield this['fetch']['get'](_0x3c7fda,_0x4b1f00);if(_0x3ebfb9['status']>0xc7&&_0x3ebfb9['status']<0x12c){const _0x69b3fa=yield _0x3ebfb9['json']();return new SuccessfulApiKeyValueResponse(_0x69b3fa);}const _0xafd0e0=yield _0x3ebfb9['json']();return new FailedApiKeyValueResponse(_0xafd0e0);}catch(_0x481b80){if(_0x481b80 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x481b80['message'],'title':_0x481b80['name'],'status':0x1f4,'instance':'','type':''});throw _0x481b80;}});}}
10
10
 
11
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0xe58407,_0x5f12c3,_0x5d2385,_0x2a4d92){function _0x1dfc5f(_0x27dda2){return _0x27dda2 instanceof _0x5d2385?_0x27dda2:new _0x5d2385(function(_0x2e34d2){_0x2e34d2(_0x27dda2);});}return new(_0x5d2385||(_0x5d2385=Promise))(function(_0x50b4c9,_0x449e00){function _0x28d702(_0x13a5d1){try{_0x3ddded(_0x2a4d92['next'](_0x13a5d1));}catch(_0x841a54){_0x449e00(_0x841a54);}}function _0x40176f(_0x3330fb){try{_0x3ddded(_0x2a4d92['throw'](_0x3330fb));}catch(_0x4ddcd4){_0x449e00(_0x4ddcd4);}}function _0x3ddded(_0x3871a7){_0x3871a7['done']?_0x50b4c9(_0x3871a7['value']):_0x1dfc5f(_0x3871a7['value'])['then'](_0x28d702,_0x40176f);}_0x3ddded((_0x2a4d92=_0x2a4d92['apply'](_0xe58407,_0x5f12c3||[]))['next']());});};class Fetch{constructor(_0x5b79c1){this['baseUri']=_0x5b79c1,this['getUrl']=_0x39c987=>{return _0x39c987['startsWith']('/')&&(_0x39c987=_0x39c987['replace']('/','')),''+this['baseUri']+_0x39c987;},!_0x5b79c1['endsWith']('/')&&(_0x5b79c1=_0x5b79c1+'/');}['get'](_0x12998c,_0x254243){return __awaiter$1(this,void 0,void 0,function*(){const _0x43dc53=this['getUrl'](_0x12998c);return yield fetch(_0x43dc53,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x254243}});});}['post'](_0x3e4fd6,_0xa06602,_0xc2385f){return __awaiter$1(this,void 0,void 0,function*(){const _0x13c949=this['getUrl'](_0x3e4fd6);return yield fetch(_0x13c949,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0xa06602},'body':_0xc2385f?JSON['stringify'](_0xc2385f):null});});}['put'](_0x7a594,_0x5ddebf,_0x348518){return __awaiter$1(this,void 0,void 0,function*(){const _0x55f55c=this['getUrl'](_0x7a594);return yield fetch(_0x55f55c,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x5ddebf},'body':_0x348518?JSON['stringify'](_0x348518):null});});}['delete'](_0xcfb4e5,_0x4b4ed5){return __awaiter$1(this,void 0,void 0,function*(){const _0x251c6d=this['getUrl'](_0xcfb4e5);return yield fetch(_0x251c6d,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4b4ed5}});});}}
11
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x4a1f2b,_0x397a9b,_0xc636a6,_0x41b9eb){function _0x268891(_0xe496e3){return _0xe496e3 instanceof _0xc636a6?_0xe496e3:new _0xc636a6(function(_0x5764cf){_0x5764cf(_0xe496e3);});}return new(_0xc636a6||(_0xc636a6=Promise))(function(_0x12e34d,_0x42e86a){function _0x4a7d92(_0xc8629d){try{_0x130f6d(_0x41b9eb['next'](_0xc8629d));}catch(_0x201e0a){_0x42e86a(_0x201e0a);}}function _0x388581(_0x39f537){try{_0x130f6d(_0x41b9eb['throw'](_0x39f537));}catch(_0x46ff98){_0x42e86a(_0x46ff98);}}function _0x130f6d(_0x4c99f4){_0x4c99f4['done']?_0x12e34d(_0x4c99f4['value']):_0x268891(_0x4c99f4['value'])['then'](_0x4a7d92,_0x388581);}_0x130f6d((_0x41b9eb=_0x41b9eb['apply'](_0x4a1f2b,_0x397a9b||[]))['next']());});};class ListService{constructor(_0x5e5bf3){this['fetch']=_0x5e5bf3;}['add'](_0x1857dd,_0x59ffed,_0x42eca9){return __awaiter$2(this,void 0,void 0,function*(){const _0x9a374f='List',_0x4d846e={'account_name':_0x1857dd,'list_name':_0x59ffed};try{const _0x5cf00f=yield this['fetch']['post'](_0x9a374f,_0x42eca9,_0x4d846e);if(_0x5cf00f['status']>0xc7&&_0x5cf00f['status']<0x12c){const _0x5b949b=yield _0x5cf00f['json']();return new SuccessfulAccountResponse(_0x5b949b);}const _0x5b4aed=yield _0x5cf00f['json']();return new FailedAccountResponse(_0x5b4aed);}catch(_0x5bdc35){if(_0x5bdc35 instanceof Error)return new FailedAccountResponse({'detail':_0x5bdc35['message'],'title':_0x5bdc35['name'],'status':0x1f4,'instance':'','type':''});throw _0x5bdc35;}});}['remove'](_0x4ec61b,_0x5a988a,_0x43d006){return __awaiter$2(this,void 0,void 0,function*(){const _0x2e0447='List/'+_0x4ec61b+'/'+_0x5a988a,_0x8e29bb=yield this['fetch']['delete'](_0x2e0447,_0x43d006);try{if(_0x8e29bb['status']>0xc7&&_0x8e29bb['status']<0x12c){const _0xef391f=yield _0x8e29bb['json']();return new SuccessfulAccountResponse(_0xef391f);}const _0x3e7d27=yield _0x8e29bb['json']();return new FailedAccountResponse(_0x3e7d27);}catch(_0x9f5d35){if(_0x9f5d35 instanceof Error)return new FailedAccountResponse({'detail':_0x9f5d35['message'],'title':_0x9f5d35['name'],'status':0x1f4,'instance':'','type':''});throw _0x9f5d35;}});}}
12
12
 
13
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x1c0616,_0x185900,_0x274f47,_0x5a8030){function _0x3b9946(_0x40b7c8){return _0x40b7c8 instanceof _0x274f47?_0x40b7c8:new _0x274f47(function(_0x3619b9){_0x3619b9(_0x40b7c8);});}return new(_0x274f47||(_0x274f47=Promise))(function(_0x4cf95a,_0x1f1021){function _0x3777cc(_0x2505a4){try{_0x2e1e5c(_0x5a8030['next'](_0x2505a4));}catch(_0x594af1){_0x1f1021(_0x594af1);}}function _0x34002a(_0x5ab3f0){try{_0x2e1e5c(_0x5a8030['throw'](_0x5ab3f0));}catch(_0x52d3e5){_0x1f1021(_0x52d3e5);}}function _0x2e1e5c(_0x4e9d2f){_0x4e9d2f['done']?_0x4cf95a(_0x4e9d2f['value']):_0x3b9946(_0x4e9d2f['value'])['then'](_0x3777cc,_0x34002a);}_0x2e1e5c((_0x5a8030=_0x5a8030['apply'](_0x1c0616,_0x185900||[]))['next']());});};class AdminClient{constructor(_0x5d0d2b='https://admin.searchability.dev/'){var _0x31e7e0=new Fetch(_0x5d0d2b);this['Accounts']=new AccountService(_0x31e7e0),this['Lists']=new ListService(_0x31e7e0),this['ApiKeys']=new ApiKeyService(_0x31e7e0);}}class AuthClient{constructor(_0x513637='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x513637);}['login'](_0x3ac83c){return __awaiter(this,void 0,void 0,function*(){var _0x40856e='login/'+_0x3ac83c;try{const _0x47d9d6=yield yield fetch(_0x40856e);if(_0x47d9d6['status']>0xc7&&_0x47d9d6['status']<0x12c){const _0x4c257d=yield _0x47d9d6['json']();return new SuccessfulAuthResponse(_0x4c257d);}const _0x105403=yield _0x47d9d6['json']();return new FailedAuthResponse(_0x105403);}catch(_0x1ec28c){if(_0x1ec28c instanceof Error)return new FailedAuthResponse({'detail':_0x1ec28c['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x1ec28c;}});}['refresh'](_0x3b9755){return __awaiter(this,void 0,void 0,function*(){var _0x5331a7='refresh';try{const _0x458124=yield this['fetch']['post'](_0x5331a7,_0x3b9755,null);if(_0x458124['status']>0xc7&&_0x458124['status']<0x12c){const _0x125ff7=yield _0x458124['json']();return new SuccessfulAuthResponse(_0x125ff7);}const _0x4c0c3c=yield _0x458124['json']();return new FailedAuthResponse(_0x4c0c3c);}catch(_0x1b6d02){if(_0x1b6d02 instanceof Error)return new FailedAuthResponse({'detail':_0x1b6d02['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x1b6d02;}});}}
13
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x4ea46f,_0x19245a,_0x45c4d2,_0x113a75){function _0x1e82ae(_0x5adc9c){return _0x5adc9c instanceof _0x45c4d2?_0x5adc9c:new _0x45c4d2(function(_0x235dc2){_0x235dc2(_0x5adc9c);});}return new(_0x45c4d2||(_0x45c4d2=Promise))(function(_0x397b0c,_0x4890f7){function _0x5e987d(_0x237a84){try{_0x2afc01(_0x113a75['next'](_0x237a84));}catch(_0x4ecee5){_0x4890f7(_0x4ecee5);}}function _0x5b2169(_0x1d732d){try{_0x2afc01(_0x113a75['throw'](_0x1d732d));}catch(_0x5eae79){_0x4890f7(_0x5eae79);}}function _0x2afc01(_0x3bcb8f){_0x3bcb8f['done']?_0x397b0c(_0x3bcb8f['value']):_0x1e82ae(_0x3bcb8f['value'])['then'](_0x5e987d,_0x5b2169);}_0x2afc01((_0x113a75=_0x113a75['apply'](_0x4ea46f,_0x19245a||[]))['next']());});};class Fetch{constructor(_0x38e15d){this['baseUri']=_0x38e15d,this['getUrl']=_0x1097a7=>{return _0x1097a7['startsWith']('/')&&(_0x1097a7=_0x1097a7['replace']('/','')),''+this['baseUri']+_0x1097a7;},!_0x38e15d['endsWith']('/')&&(_0x38e15d=_0x38e15d+'/');}['get'](_0x8d487a,_0x53bcf6){return __awaiter$1(this,void 0,void 0,function*(){const _0x52aa37=this['getUrl'](_0x8d487a);return yield fetch(_0x52aa37,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x53bcf6}});});}['post'](_0x23101f,_0x1fb8b3,_0x3af7c9){return __awaiter$1(this,void 0,void 0,function*(){const _0x492b4c=this['getUrl'](_0x23101f);return yield fetch(_0x492b4c,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1fb8b3},'body':_0x3af7c9?JSON['stringify'](_0x3af7c9):null});});}['put'](_0x451e56,_0x2a7a6f,_0x3bf198){return __awaiter$1(this,void 0,void 0,function*(){const _0x142ea4=this['getUrl'](_0x451e56);return yield fetch(_0x142ea4,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2a7a6f},'body':_0x3bf198?JSON['stringify'](_0x3bf198):null});});}['delete'](_0x3a77b4,_0x29c12b){return __awaiter$1(this,void 0,void 0,function*(){const _0x379e22=this['getUrl'](_0x3a77b4);return yield fetch(_0x379e22,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x29c12b}});});}}
14
+
15
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x5f3571,_0x3a07dd,_0x340743,_0x2d22e6){function _0xd53999(_0x46e833){return _0x46e833 instanceof _0x340743?_0x46e833:new _0x340743(function(_0x2e3a7d){_0x2e3a7d(_0x46e833);});}return new(_0x340743||(_0x340743=Promise))(function(_0x3280a3,_0x1626b9){function _0xb88d37(_0x4d5407){try{_0x26ae58(_0x2d22e6['next'](_0x4d5407));}catch(_0x2d5149){_0x1626b9(_0x2d5149);}}function _0x45fa6f(_0x476b34){try{_0x26ae58(_0x2d22e6['throw'](_0x476b34));}catch(_0x51e175){_0x1626b9(_0x51e175);}}function _0x26ae58(_0x511038){_0x511038['done']?_0x3280a3(_0x511038['value']):_0xd53999(_0x511038['value'])['then'](_0xb88d37,_0x45fa6f);}_0x26ae58((_0x2d22e6=_0x2d22e6['apply'](_0x5f3571,_0x3a07dd||[]))['next']());});};class AdminClient{constructor(_0x758b0f='https://admin.searchability.dev/'){var _0x3cab75=new Fetch(_0x758b0f);this['Accounts']=new AccountService(_0x3cab75),this['Lists']=new ListService(_0x3cab75),this['ApiKeys']=new ApiKeyService(_0x3cab75);}}class AuthClient{constructor(_0x592003='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x592003);}['login'](_0x19b82b){return __awaiter(this,void 0,void 0,function*(){var _0x1568f0='login/'+_0x19b82b;try{const _0x1cd57b=yield yield fetch(_0x1568f0);if(_0x1cd57b['status']>0xc7&&_0x1cd57b['status']<0x12c){const _0x406a23=yield _0x1cd57b['json']();return new SuccessfulAuthResponse(_0x406a23);}const _0x37edb4=yield _0x1cd57b['json']();return new FailedAuthResponse(_0x37edb4);}catch(_0x2d8cde){if(_0x2d8cde instanceof Error)return new FailedAuthResponse({'detail':_0x2d8cde['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x2d8cde;}});}['refresh'](_0xf7275d){return __awaiter(this,void 0,void 0,function*(){var _0x14de38='refresh';try{const _0x464567=yield this['fetch']['post'](_0x14de38,_0xf7275d,null);if(_0x464567['status']>0xc7&&_0x464567['status']<0x12c){const _0x216fc7=yield _0x464567['json']();return new SuccessfulAuthResponse(_0x216fc7);}const _0x549ddd=yield _0x464567['json']();return new FailedAuthResponse(_0x549ddd);}catch(_0x324279){if(_0x324279 instanceof Error)return new FailedAuthResponse({'detail':_0x324279['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x324279;}});}}
14
16
 
15
17
  exports.AdminClient = AdminClient;
16
18
  exports.AuthClient = AuthClient;
19
+ exports.Tokens = Tokens;
@@ -1,13 +1,15 @@
1
- class Response{constructor(_0x399946){this['isSuccess']=_0x399946;}}var TokenStatus;(function(_0xd2a107){_0xd2a107[_0xd2a107['Ok']=0x0]='Ok',_0xd2a107[_0xd2a107['Refresh']=0x1]='Refresh',_0xd2a107[_0xd2a107['Expired']=0x2]='Expired';}(TokenStatus||(TokenStatus={})));class SuccessfulAccountResponse extends Response{constructor(_0x3d5653){super(!![]),this['account']=_0x3d5653;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x5441f5){super(![]),this['problem']=_0x5441f5;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x11f945){super(!![]),this['tokens']=_0x11f945;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x55e6fd){super(![]),this['problem']=_0x55e6fd;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x5edf67){super(!![]),this['apiKey']=_0x5edf67;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x210b81){super(![]),this['problem']=_0x210b81;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x406895){super(!![]),this['apiKeyValue']=_0x406895;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyValueResponse extends Response{constructor(_0x1126a6){super(![]),this['problem']=_0x1126a6;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
1
+ var TokenStatus;(function(_0x1c1e6b){_0x1c1e6b[_0x1c1e6b['Ok']=0x0]='Ok',_0x1c1e6b[_0x1c1e6b['Refresh']=0x1]='Refresh',_0x1c1e6b[_0x1c1e6b['Expired']=0x2]='Expired';}(TokenStatus||(TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}['getStatus'](){if(Date['now']()<this['access_expires'])return TokenStatus['Ok'];if(Date['now']()<this['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
2
2
 
3
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x57bacc,_0x5de524,_0x13d5ad,_0x2b60fc){function _0x553f8c(_0x35ac23){return _0x35ac23 instanceof _0x13d5ad?_0x35ac23:new _0x13d5ad(function(_0xc414f1){_0xc414f1(_0x35ac23);});}return new(_0x13d5ad||(_0x13d5ad=Promise))(function(_0x4fad27,_0x2ea37){function _0x3d0f57(_0x10cdc4){try{_0x509517(_0x2b60fc['next'](_0x10cdc4));}catch(_0x32264a){_0x2ea37(_0x32264a);}}function _0x90d080(_0x29f603){try{_0x509517(_0x2b60fc['throw'](_0x29f603));}catch(_0x2ce335){_0x2ea37(_0x2ce335);}}function _0x509517(_0x54799c){_0x54799c['done']?_0x4fad27(_0x54799c['value']):_0x553f8c(_0x54799c['value'])['then'](_0x3d0f57,_0x90d080);}_0x509517((_0x2b60fc=_0x2b60fc['apply'](_0x57bacc,_0x5de524||[]))['next']());});};class AccountService{constructor(_0x1d1595){this['fetch']=_0x1d1595;}['get'](_0x322b80,_0x33b3be){return __awaiter$4(this,void 0,void 0,function*(){const _0x39cc60='Account/'+_0x322b80+'/',_0x4a15fe=yield this['fetch']['get'](_0x39cc60,_0x33b3be);try{if(_0x4a15fe['status']>0xc7&&_0x4a15fe['status']<0x12c){const _0x179d21=yield _0x4a15fe['json']();return new SuccessfulAccountResponse(_0x179d21);}const _0x38f76f=yield _0x4a15fe['json']();return new FailedAccountResponse(_0x38f76f);}catch(_0x5b5ba1){if(_0x5b5ba1 instanceof Error)return new FailedAccountResponse({'detail':_0x5b5ba1['message'],'title':_0x5b5ba1['name'],'status':0x1f4,'instance':'','type':''});throw _0x5b5ba1;}});}}
3
+ class Response{constructor(_0x2618c5){this['isSuccess']=_0x2618c5;}}class SuccessfulAccountResponse extends Response{constructor(_0x5d134e){super(!![]),this['account']=_0x5d134e;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x47f5ff){super(![]),this['problem']=_0x47f5ff;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x4f31bc){super(!![]),this['tokens']=_0x4f31bc;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x947d4a){super(![]),this['problem']=_0x947d4a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x4c573a){super(!![]),this['apiKey']=_0x4c573a;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x27fa97){super(![]),this['problem']=_0x27fa97;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0xe9ac1){super(!![]),this['apiKeyValue']=_0xe9ac1;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyValueResponse extends Response{constructor(_0xc18ad6){super(![]),this['problem']=_0xc18ad6;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
4
4
 
5
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x24b06f,_0x111d5b,_0x1eaaea,_0x160daa){function _0x16a577(_0x1ae3e5){return _0x1ae3e5 instanceof _0x1eaaea?_0x1ae3e5:new _0x1eaaea(function(_0x184fd8){_0x184fd8(_0x1ae3e5);});}return new(_0x1eaaea||(_0x1eaaea=Promise))(function(_0x10813a,_0x35280c){function _0x15d193(_0x4d5c56){try{_0xe1ae25(_0x160daa['next'](_0x4d5c56));}catch(_0x39a997){_0x35280c(_0x39a997);}}function _0x201f55(_0x54e63e){try{_0xe1ae25(_0x160daa['throw'](_0x54e63e));}catch(_0xa832dd){_0x35280c(_0xa832dd);}}function _0xe1ae25(_0x264993){_0x264993['done']?_0x10813a(_0x264993['value']):_0x16a577(_0x264993['value'])['then'](_0x15d193,_0x201f55);}_0xe1ae25((_0x160daa=_0x160daa['apply'](_0x24b06f,_0x111d5b||[]))['next']());});};class ApiKeyService{constructor(_0x5504a4){this['fetch']=_0x5504a4;}['create'](_0x52c223,_0x1ac6ef,_0x3acc76){return __awaiter$3(this,void 0,void 0,function*(){const _0x726a27='api-key/create',_0x47c14d={'account_name':_0x52c223,'api_key_name':_0x1ac6ef};try{const _0x3ce76a=yield this['fetch']['post'](_0x726a27,_0x3acc76,_0x47c14d);if(_0x3ce76a['status']>0xc7&&_0x3ce76a['status']<0x12c){const _0x46cb61=yield _0x3ce76a['json']();return new SuccessfulApiKeyResponse(_0x46cb61);}const _0x56be4f=yield _0x3ce76a['json']();return new FailedApiKeyResponse(_0x56be4f);}catch(_0x1c7df5){if(_0x1c7df5 instanceof Error)return new FailedApiKeyResponse({'detail':_0x1c7df5['message'],'title':_0x1c7df5['name'],'status':0x1f4,'instance':'','type':''});throw _0x1c7df5;}});}['view'](_0x4c58cf,_0x1304bb,_0x112dcb){return __awaiter$3(this,void 0,void 0,function*(){const _0x5f2b11='api-key/'+_0x4c58cf+'/'+_0x1304bb;try{const _0x3fe8e5=yield this['fetch']['get'](_0x5f2b11,_0x112dcb);if(_0x3fe8e5['status']>0xc7&&_0x3fe8e5['status']<0x12c){const _0x91e71b=yield _0x3fe8e5['json']();return new SuccessfulApiKeyValueResponse(_0x91e71b);}const _0x50a12a=yield _0x3fe8e5['json']();return new FailedApiKeyValueResponse(_0x50a12a);}catch(_0x40201e){if(_0x40201e instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x40201e['message'],'title':_0x40201e['name'],'status':0x1f4,'instance':'','type':''});throw _0x40201e;}});}}
5
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x4ff2a8,_0x35a1ed,_0x1ef313,_0x11b828){function _0x217bd1(_0x2507d1){return _0x2507d1 instanceof _0x1ef313?_0x2507d1:new _0x1ef313(function(_0x229c0d){_0x229c0d(_0x2507d1);});}return new(_0x1ef313||(_0x1ef313=Promise))(function(_0x253029,_0x58e7fe){function _0x1ea0c0(_0x5c4aa9){try{_0x334cbf(_0x11b828['next'](_0x5c4aa9));}catch(_0xc6b221){_0x58e7fe(_0xc6b221);}}function _0x2bc91c(_0x460bbc){try{_0x334cbf(_0x11b828['throw'](_0x460bbc));}catch(_0x3dbd8d){_0x58e7fe(_0x3dbd8d);}}function _0x334cbf(_0x1364d3){_0x1364d3['done']?_0x253029(_0x1364d3['value']):_0x217bd1(_0x1364d3['value'])['then'](_0x1ea0c0,_0x2bc91c);}_0x334cbf((_0x11b828=_0x11b828['apply'](_0x4ff2a8,_0x35a1ed||[]))['next']());});};class AccountService{constructor(_0x112bce){this['fetch']=_0x112bce;}['get'](_0x468125,_0x579810){return __awaiter$4(this,void 0,void 0,function*(){const _0x38d5d8='Account/'+_0x468125+'/',_0x42b3a7=yield this['fetch']['get'](_0x38d5d8,_0x579810);try{if(_0x42b3a7['status']>0xc7&&_0x42b3a7['status']<0x12c){const _0x4aee58=yield _0x42b3a7['json']();return new SuccessfulAccountResponse(_0x4aee58);}const _0x42b97c=yield _0x42b3a7['json']();return new FailedAccountResponse(_0x42b97c);}catch(_0x1ab88a){if(_0x1ab88a instanceof Error)return new FailedAccountResponse({'detail':_0x1ab88a['message'],'title':_0x1ab88a['name'],'status':0x1f4,'instance':'','type':''});throw _0x1ab88a;}});}}
6
6
 
7
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x12fd7,_0x25770c,_0x1f6d85,_0x187ad7){function _0x1e4d92(_0x395b88){return _0x395b88 instanceof _0x1f6d85?_0x395b88:new _0x1f6d85(function(_0x53f4db){_0x53f4db(_0x395b88);});}return new(_0x1f6d85||(_0x1f6d85=Promise))(function(_0x57db30,_0x57469f){function _0x18177e(_0x10d91b){try{_0x7474f0(_0x187ad7['next'](_0x10d91b));}catch(_0x2c69d6){_0x57469f(_0x2c69d6);}}function _0x46ce85(_0x4434c3){try{_0x7474f0(_0x187ad7['throw'](_0x4434c3));}catch(_0x1e08fd){_0x57469f(_0x1e08fd);}}function _0x7474f0(_0x521e88){_0x521e88['done']?_0x57db30(_0x521e88['value']):_0x1e4d92(_0x521e88['value'])['then'](_0x18177e,_0x46ce85);}_0x7474f0((_0x187ad7=_0x187ad7['apply'](_0x12fd7,_0x25770c||[]))['next']());});};class ListService{constructor(_0x2eb65e){this['fetch']=_0x2eb65e;}['add'](_0xaaaba3,_0x292ae1,_0x3e8db4){return __awaiter$2(this,void 0,void 0,function*(){const _0x296e20='List',_0x325853={'account_name':_0xaaaba3,'list_name':_0x292ae1};try{const _0x518a94=yield this['fetch']['post'](_0x296e20,_0x3e8db4,_0x325853);if(_0x518a94['status']>0xc7&&_0x518a94['status']<0x12c){const _0x1481f7=yield _0x518a94['json']();return new SuccessfulAccountResponse(_0x1481f7);}const _0x385a62=yield _0x518a94['json']();return new FailedAccountResponse(_0x385a62);}catch(_0x5622a0){if(_0x5622a0 instanceof Error)return new FailedAccountResponse({'detail':_0x5622a0['message'],'title':_0x5622a0['name'],'status':0x1f4,'instance':'','type':''});throw _0x5622a0;}});}['remove'](_0x1f4391,_0x2d5bf5,_0x5ec661){return __awaiter$2(this,void 0,void 0,function*(){const _0x974cbe='List/'+_0x1f4391+'/'+_0x2d5bf5,_0x1201ca=yield this['fetch']['delete'](_0x974cbe,_0x5ec661);try{if(_0x1201ca['status']>0xc7&&_0x1201ca['status']<0x12c){const _0x1a1e39=yield _0x1201ca['json']();return new SuccessfulAccountResponse(_0x1a1e39);}const _0x15693c=yield _0x1201ca['json']();return new FailedAccountResponse(_0x15693c);}catch(_0x27b91d){if(_0x27b91d instanceof Error)return new FailedAccountResponse({'detail':_0x27b91d['message'],'title':_0x27b91d['name'],'status':0x1f4,'instance':'','type':''});throw _0x27b91d;}});}}
7
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x4a1303,_0x11b202,_0x8ad526,_0x24a524){function _0x194a8f(_0x3617d7){return _0x3617d7 instanceof _0x8ad526?_0x3617d7:new _0x8ad526(function(_0x708d5d){_0x708d5d(_0x3617d7);});}return new(_0x8ad526||(_0x8ad526=Promise))(function(_0x216903,_0x19ba76){function _0x1aeb75(_0x4433e7){try{_0x256ce3(_0x24a524['next'](_0x4433e7));}catch(_0x3f2be7){_0x19ba76(_0x3f2be7);}}function _0x1bb2ab(_0xfb0882){try{_0x256ce3(_0x24a524['throw'](_0xfb0882));}catch(_0x2d2113){_0x19ba76(_0x2d2113);}}function _0x256ce3(_0x3bf824){_0x3bf824['done']?_0x216903(_0x3bf824['value']):_0x194a8f(_0x3bf824['value'])['then'](_0x1aeb75,_0x1bb2ab);}_0x256ce3((_0x24a524=_0x24a524['apply'](_0x4a1303,_0x11b202||[]))['next']());});};class ApiKeyService{constructor(_0x3ec99b){this['fetch']=_0x3ec99b;}['create'](_0x5ac415,_0x35cbf4,_0x4833eb){return __awaiter$3(this,void 0,void 0,function*(){const _0x533695='api-key/create',_0xbc9795={'account_name':_0x5ac415,'api_key_name':_0x35cbf4};try{const _0x3908f1=yield this['fetch']['post'](_0x533695,_0x4833eb,_0xbc9795);if(_0x3908f1['status']>0xc7&&_0x3908f1['status']<0x12c){const _0x168d14=yield _0x3908f1['json']();return new SuccessfulApiKeyResponse(_0x168d14);}const _0x5fadc5=yield _0x3908f1['json']();return new FailedApiKeyResponse(_0x5fadc5);}catch(_0x32b255){if(_0x32b255 instanceof Error)return new FailedApiKeyResponse({'detail':_0x32b255['message'],'title':_0x32b255['name'],'status':0x1f4,'instance':'','type':''});throw _0x32b255;}});}['view'](_0x491971,_0x273dff,_0x8c5a58){return __awaiter$3(this,void 0,void 0,function*(){const _0x2d87bf='api-key/'+_0x491971+'/'+_0x273dff;try{const _0x312e36=yield this['fetch']['get'](_0x2d87bf,_0x8c5a58);if(_0x312e36['status']>0xc7&&_0x312e36['status']<0x12c){const _0x32573f=yield _0x312e36['json']();return new SuccessfulApiKeyValueResponse(_0x32573f);}const _0xd6ba29=yield _0x312e36['json']();return new FailedApiKeyValueResponse(_0xd6ba29);}catch(_0x237f93){if(_0x237f93 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x237f93['message'],'title':_0x237f93['name'],'status':0x1f4,'instance':'','type':''});throw _0x237f93;}});}}
8
8
 
9
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x36a580,_0x2212ff,_0x111d12,_0x8c1cf9){function _0x589750(_0x39982f){return _0x39982f instanceof _0x111d12?_0x39982f:new _0x111d12(function(_0x1a07a1){_0x1a07a1(_0x39982f);});}return new(_0x111d12||(_0x111d12=Promise))(function(_0x349b71,_0x20cc6d){function _0x341f6a(_0x2fd8bc){try{_0x2bfeca(_0x8c1cf9['next'](_0x2fd8bc));}catch(_0x1d9cb6){_0x20cc6d(_0x1d9cb6);}}function _0x18103d(_0x4b0681){try{_0x2bfeca(_0x8c1cf9['throw'](_0x4b0681));}catch(_0x10cac5){_0x20cc6d(_0x10cac5);}}function _0x2bfeca(_0x3a516e){_0x3a516e['done']?_0x349b71(_0x3a516e['value']):_0x589750(_0x3a516e['value'])['then'](_0x341f6a,_0x18103d);}_0x2bfeca((_0x8c1cf9=_0x8c1cf9['apply'](_0x36a580,_0x2212ff||[]))['next']());});};class Fetch{constructor(_0x35369e){this['baseUri']=_0x35369e,this['getUrl']=_0x396c88=>{return _0x396c88['startsWith']('/')&&(_0x396c88=_0x396c88['replace']('/','')),''+this['baseUri']+_0x396c88;},!_0x35369e['endsWith']('/')&&(_0x35369e=_0x35369e+'/');}['get'](_0x293f76,_0x2f0173){return __awaiter$1(this,void 0,void 0,function*(){const _0x220f40=this['getUrl'](_0x293f76);return yield fetch(_0x220f40,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2f0173}});});}['post'](_0x391031,_0x121f9d,_0x1cddc3){return __awaiter$1(this,void 0,void 0,function*(){const _0x198059=this['getUrl'](_0x391031);return yield fetch(_0x198059,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x121f9d},'body':_0x1cddc3?JSON['stringify'](_0x1cddc3):null});});}['put'](_0x35de14,_0xb35308,_0x488650){return __awaiter$1(this,void 0,void 0,function*(){const _0x7ad9d9=this['getUrl'](_0x35de14);return yield fetch(_0x7ad9d9,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0xb35308},'body':_0x488650?JSON['stringify'](_0x488650):null});});}['delete'](_0x4a8efe,_0xefb2ba){return __awaiter$1(this,void 0,void 0,function*(){const _0xf6b86c=this['getUrl'](_0x4a8efe);return yield fetch(_0xf6b86c,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0xefb2ba}});});}}
9
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x547f0b,_0x4b4867,_0x112f71,_0x146e5d){function _0x391157(_0x1af33c){return _0x1af33c instanceof _0x112f71?_0x1af33c:new _0x112f71(function(_0x51b19){_0x51b19(_0x1af33c);});}return new(_0x112f71||(_0x112f71=Promise))(function(_0x29f4ea,_0xa45e07){function _0x18c5c5(_0x35cc4e){try{_0x18f69d(_0x146e5d['next'](_0x35cc4e));}catch(_0x56a690){_0xa45e07(_0x56a690);}}function _0x480de5(_0x54d47f){try{_0x18f69d(_0x146e5d['throw'](_0x54d47f));}catch(_0x1a1ab5){_0xa45e07(_0x1a1ab5);}}function _0x18f69d(_0x54f271){_0x54f271['done']?_0x29f4ea(_0x54f271['value']):_0x391157(_0x54f271['value'])['then'](_0x18c5c5,_0x480de5);}_0x18f69d((_0x146e5d=_0x146e5d['apply'](_0x547f0b,_0x4b4867||[]))['next']());});};class ListService{constructor(_0x25f54a){this['fetch']=_0x25f54a;}['add'](_0x4f950,_0x10dd11,_0x2a0e11){return __awaiter$2(this,void 0,void 0,function*(){const _0x8ca47c='List',_0x40abbe={'account_name':_0x4f950,'list_name':_0x10dd11};try{const _0x540c73=yield this['fetch']['post'](_0x8ca47c,_0x2a0e11,_0x40abbe);if(_0x540c73['status']>0xc7&&_0x540c73['status']<0x12c){const _0x26241b=yield _0x540c73['json']();return new SuccessfulAccountResponse(_0x26241b);}const _0x3884d8=yield _0x540c73['json']();return new FailedAccountResponse(_0x3884d8);}catch(_0x1c4bea){if(_0x1c4bea instanceof Error)return new FailedAccountResponse({'detail':_0x1c4bea['message'],'title':_0x1c4bea['name'],'status':0x1f4,'instance':'','type':''});throw _0x1c4bea;}});}['remove'](_0x7b1443,_0x3a9b07,_0x644008){return __awaiter$2(this,void 0,void 0,function*(){const _0x49efe3='List/'+_0x7b1443+'/'+_0x3a9b07,_0xfd7c91=yield this['fetch']['delete'](_0x49efe3,_0x644008);try{if(_0xfd7c91['status']>0xc7&&_0xfd7c91['status']<0x12c){const _0x201730=yield _0xfd7c91['json']();return new SuccessfulAccountResponse(_0x201730);}const _0x2d2e1d=yield _0xfd7c91['json']();return new FailedAccountResponse(_0x2d2e1d);}catch(_0x4725e0){if(_0x4725e0 instanceof Error)return new FailedAccountResponse({'detail':_0x4725e0['message'],'title':_0x4725e0['name'],'status':0x1f4,'instance':'','type':''});throw _0x4725e0;}});}}
10
10
 
11
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x557c54,_0x4a109c,_0x1fa642,_0x2cacd6){function _0xdcf47a(_0x182064){return _0x182064 instanceof _0x1fa642?_0x182064:new _0x1fa642(function(_0x1067da){_0x1067da(_0x182064);});}return new(_0x1fa642||(_0x1fa642=Promise))(function(_0x48c117,_0x27b5b7){function _0xcefea(_0x4bcb21){try{_0x4d6c33(_0x2cacd6['next'](_0x4bcb21));}catch(_0x58e8bc){_0x27b5b7(_0x58e8bc);}}function _0x353979(_0x2370e8){try{_0x4d6c33(_0x2cacd6['throw'](_0x2370e8));}catch(_0x4963c9){_0x27b5b7(_0x4963c9);}}function _0x4d6c33(_0xa3608c){_0xa3608c['done']?_0x48c117(_0xa3608c['value']):_0xdcf47a(_0xa3608c['value'])['then'](_0xcefea,_0x353979);}_0x4d6c33((_0x2cacd6=_0x2cacd6['apply'](_0x557c54,_0x4a109c||[]))['next']());});};class AdminClient{constructor(_0x1269b8='https://admin.searchability.dev/'){var _0x1ffdc0=new Fetch(_0x1269b8);this['Accounts']=new AccountService(_0x1ffdc0),this['Lists']=new ListService(_0x1ffdc0),this['ApiKeys']=new ApiKeyService(_0x1ffdc0);}}class AuthClient{constructor(_0x284726='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x284726);}['login'](_0x20911a){return __awaiter(this,void 0,void 0,function*(){var _0x1ac469='login/'+_0x20911a;try{const _0x489f5a=yield yield fetch(_0x1ac469);if(_0x489f5a['status']>0xc7&&_0x489f5a['status']<0x12c){const _0x15d873=yield _0x489f5a['json']();return new SuccessfulAuthResponse(_0x15d873);}const _0x57eb29=yield _0x489f5a['json']();return new FailedAuthResponse(_0x57eb29);}catch(_0x597ab9){if(_0x597ab9 instanceof Error)return new FailedAuthResponse({'detail':_0x597ab9['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x597ab9;}});}['refresh'](_0x582805){return __awaiter(this,void 0,void 0,function*(){var _0xefc194='refresh';try{const _0x2e1c30=yield this['fetch']['post'](_0xefc194,_0x582805,null);if(_0x2e1c30['status']>0xc7&&_0x2e1c30['status']<0x12c){const _0x3a2fb6=yield _0x2e1c30['json']();return new SuccessfulAuthResponse(_0x3a2fb6);}const _0x8f108f=yield _0x2e1c30['json']();return new FailedAuthResponse(_0x8f108f);}catch(_0x1ba464){if(_0x1ba464 instanceof Error)return new FailedAuthResponse({'detail':_0x1ba464['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x1ba464;}});}}
11
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0xf4ec03,_0x12a65e,_0x351700,_0x4f0ca5){function _0x576dd2(_0x12c594){return _0x12c594 instanceof _0x351700?_0x12c594:new _0x351700(function(_0x177ac3){_0x177ac3(_0x12c594);});}return new(_0x351700||(_0x351700=Promise))(function(_0x2ccad2,_0x1f0eed){function _0x4f5a4b(_0x274305){try{_0x4cbf5c(_0x4f0ca5['next'](_0x274305));}catch(_0x50c4dd){_0x1f0eed(_0x50c4dd);}}function _0x23f28b(_0x424551){try{_0x4cbf5c(_0x4f0ca5['throw'](_0x424551));}catch(_0x7cb07c){_0x1f0eed(_0x7cb07c);}}function _0x4cbf5c(_0x164146){_0x164146['done']?_0x2ccad2(_0x164146['value']):_0x576dd2(_0x164146['value'])['then'](_0x4f5a4b,_0x23f28b);}_0x4cbf5c((_0x4f0ca5=_0x4f0ca5['apply'](_0xf4ec03,_0x12a65e||[]))['next']());});};class Fetch{constructor(_0x29787d){this['baseUri']=_0x29787d,this['getUrl']=_0x581dc1=>{return _0x581dc1['startsWith']('/')&&(_0x581dc1=_0x581dc1['replace']('/','')),''+this['baseUri']+_0x581dc1;},!_0x29787d['endsWith']('/')&&(_0x29787d=_0x29787d+'/');}['get'](_0x2b1561,_0x1c9fe3){return __awaiter$1(this,void 0,void 0,function*(){const _0x121310=this['getUrl'](_0x2b1561);return yield fetch(_0x121310,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1c9fe3}});});}['post'](_0x3bb5ad,_0x54acd2,_0x5ca06a){return __awaiter$1(this,void 0,void 0,function*(){const _0x31848d=this['getUrl'](_0x3bb5ad);return yield fetch(_0x31848d,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x54acd2},'body':_0x5ca06a?JSON['stringify'](_0x5ca06a):null});});}['put'](_0x5d4c4e,_0x3120f9,_0x57896b){return __awaiter$1(this,void 0,void 0,function*(){const _0x39103b=this['getUrl'](_0x5d4c4e);return yield fetch(_0x39103b,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3120f9},'body':_0x57896b?JSON['stringify'](_0x57896b):null});});}['delete'](_0x5909b9,_0x359d8f){return __awaiter$1(this,void 0,void 0,function*(){const _0x42b4f3=this['getUrl'](_0x5909b9);return yield fetch(_0x42b4f3,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x359d8f}});});}}
12
12
 
13
- export { AdminClient, AuthClient };
13
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x20bdfe,_0x1966ca,_0x3d8fe1,_0x27f085){function _0x169b9c(_0x326506){return _0x326506 instanceof _0x3d8fe1?_0x326506:new _0x3d8fe1(function(_0x45136a){_0x45136a(_0x326506);});}return new(_0x3d8fe1||(_0x3d8fe1=Promise))(function(_0x4f7408,_0x5726d){function _0x4fe009(_0x3e66f9){try{_0x4bebaf(_0x27f085['next'](_0x3e66f9));}catch(_0x38599a){_0x5726d(_0x38599a);}}function _0x1492fb(_0x87e133){try{_0x4bebaf(_0x27f085['throw'](_0x87e133));}catch(_0x43b610){_0x5726d(_0x43b610);}}function _0x4bebaf(_0x160549){_0x160549['done']?_0x4f7408(_0x160549['value']):_0x169b9c(_0x160549['value'])['then'](_0x4fe009,_0x1492fb);}_0x4bebaf((_0x27f085=_0x27f085['apply'](_0x20bdfe,_0x1966ca||[]))['next']());});};class AdminClient{constructor(_0x177a12='https://admin.searchability.dev/'){var _0x50a565=new Fetch(_0x177a12);this['Accounts']=new AccountService(_0x50a565),this['Lists']=new ListService(_0x50a565),this['ApiKeys']=new ApiKeyService(_0x50a565);}}class AuthClient{constructor(_0x351495='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x351495);}['login'](_0x1079e8){return __awaiter(this,void 0,void 0,function*(){var _0x135813='login/'+_0x1079e8;try{const _0x1fa861=yield yield fetch(_0x135813);if(_0x1fa861['status']>0xc7&&_0x1fa861['status']<0x12c){const _0x2216c1=yield _0x1fa861['json']();return new SuccessfulAuthResponse(_0x2216c1);}const _0x6afcbd=yield _0x1fa861['json']();return new FailedAuthResponse(_0x6afcbd);}catch(_0x5bb2cf){if(_0x5bb2cf instanceof Error)return new FailedAuthResponse({'detail':_0x5bb2cf['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x5bb2cf;}});}['refresh'](_0x1b3d0f){return __awaiter(this,void 0,void 0,function*(){var _0x1dfacb='refresh';try{const _0x14e66e=yield this['fetch']['post'](_0x1dfacb,_0x1b3d0f,null);if(_0x14e66e['status']>0xc7&&_0x14e66e['status']<0x12c){const _0x498579=yield _0x14e66e['json']();return new SuccessfulAuthResponse(_0x498579);}const _0x1c6d19=yield _0x14e66e['json']();return new FailedAuthResponse(_0x1c6d19);}catch(_0x1e7402){if(_0x1e7402 instanceof Error)return new FailedAuthResponse({'detail':_0x1e7402['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x1e7402;}});}}
14
+
15
+ export { AdminClient, AuthClient, TokenStatus, Tokens };
package/dist/types.d.ts CHANGED
@@ -1,44 +1,14 @@
1
- declare class Fetch {
2
- readonly baseUri: string;
3
- constructor(baseUri: string);
4
- private getUrl;
5
- get(path: string, accessToken: string): Promise<globalThis.Response>;
6
- post(path: string, accessToken: string, body: any): Promise<globalThis.Response>;
7
- put(path: string, accessToken: string, body: any): Promise<globalThis.Response>;
8
- delete(path: string, accessToken: string): Promise<globalThis.Response>;
9
- }
10
-
11
- declare class AccountService {
12
- readonly fetch: Fetch;
13
- constructor(fetch: Fetch);
14
- get(accountName: string, access_token: string): Promise<Response<Account, Problem>>;
15
- }
16
-
17
- declare class ApiKeyService {
18
- readonly fetch: Fetch;
19
- constructor(fetch: Fetch);
20
- create(account_name: string, api_key_Name: string, access_token: string): Promise<Response<ApiKey, Problem>>;
21
- view(account_name: string, api_key_name: string, access_token: string): Promise<Response<ApiKeyValue, Problem>>;
22
- }
23
-
24
- declare class ListService {
25
- readonly fetch: Fetch;
26
- constructor(fetch: Fetch);
27
- add(accountName: string, listName: string, access_token: string): Promise<Response<Account, Problem>>;
28
- remove(accountName: string, listName: string, access_token: string): Promise<Response<Account, Problem>>;
29
- }
30
-
31
- declare class AdminClient {
32
- constructor(baseUri?: string);
33
- readonly Accounts: AccountService;
34
- readonly Lists: ListService;
35
- readonly ApiKeys: ApiKeyService;
1
+ declare enum TokenStatus {
2
+ Ok = 0,
3
+ Refresh = 1,
4
+ Expired = 2
36
5
  }
37
- declare class AuthClient {
38
- readonly fetch: Fetch;
39
- constructor(baseUri?: string);
40
- login(apiKey: string): Promise<Response<Tokens, Problem>>;
41
- refresh(refreshToken: string): Promise<Response<Tokens, Problem>>;
6
+ declare class Tokens {
7
+ access_token: string;
8
+ access_expires: number;
9
+ refresh_token: string;
10
+ refresh_expires: number;
11
+ getStatus(): TokenStatus;
42
12
  }
43
13
 
44
14
  declare abstract class Response<S, F> {
@@ -84,19 +54,6 @@ type Account = {
84
54
  lists: ListIdentity[];
85
55
  api_keys: ApiKey[];
86
56
  };
87
- declare enum TokenStatus {
88
- Ok = 0,
89
- Refresh = 1,
90
- Expired = 2
91
- }
92
- declare class Tokens {
93
- access_token: string;
94
- access_expires: number;
95
- refresh_token: string;
96
- refresh_expires: number;
97
- status: TokenStatus;
98
- private getStatus;
99
- }
100
57
  declare class SuccessfulAccountResponse extends Response<Account, Problem> {
101
58
  readonly account: Account;
102
59
  constructor(account: Account);
@@ -146,4 +103,4 @@ declare class FailedApiKeyValueResponse extends Response<ApiKeyValue, Problem> {
146
103
  toProblem(): Problem;
147
104
  }
148
105
 
149
- export { type Account, AdminClient, type ApiKey, type ApiKeyValue, AuthClient, type Error, FailedAccountResponse, FailedApiKeyResponse, FailedApiKeyValueResponse, FailedAuthResponse, type List, type ListIdentity, type Problem, Response, SuccessfulAccountResponse, SuccessfulApiKeyResponse, SuccessfulApiKeyValueResponse, SuccessfulAuthResponse, TokenStatus, Tokens };
106
+ export { type Account, type ApiKey, type ApiKeyValue, type Error, FailedAccountResponse, FailedApiKeyResponse, FailedApiKeyValueResponse, FailedAuthResponse, type List, type ListIdentity, type Problem, Response, SuccessfulAccountResponse, SuccessfulApiKeyResponse, SuccessfulApiKeyValueResponse, SuccessfulAuthResponse, TokenStatus, Tokens };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@searchability/admin-client",
3
- "version": "0.0.26",
3
+ "version": "0.0.28",
4
4
  "description": "Searchability admin client.",
5
5
  "type": "module",
6
6
  "types": "./dist/types.d.ts",
@@ -1,13 +0,0 @@
1
- class Response{constructor(_0x44c81a){this['isSuccess']=_0x44c81a;}}var TokenStatus;(function(_0x197044){_0x197044[_0x197044['Ok']=0x0]='Ok',_0x197044[_0x197044['Refresh']=0x1]='Refresh',_0x197044[_0x197044['Expired']=0x2]='Expired';}(TokenStatus||(TokenStatus={})));class SuccessfulAccountResponse extends Response{constructor(_0x143323){super(!![]),this['account']=_0x143323;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x208c1a){super(![]),this['problem']=_0x208c1a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x1d43ab){super(!![]),this['tokens']=_0x1d43ab;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x471592){super(![]),this['problem']=_0x471592;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x427d5c){super(!![]),this['apiKey']=_0x427d5c;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x20fca4){super(![]),this['problem']=_0x20fca4;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0xc0e49d){super(!![]),this['apiKeyValue']=_0xc0e49d;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyValueResponse extends Response{constructor(_0x30cb54){super(![]),this['problem']=_0x30cb54;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
2
-
3
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0xd388ca,_0x1f84fd,_0x570446,_0x2a2e14){function _0x55d108(_0x1ad9a8){return _0x1ad9a8 instanceof _0x570446?_0x1ad9a8:new _0x570446(function(_0x3bd46f){_0x3bd46f(_0x1ad9a8);});}return new(_0x570446||(_0x570446=Promise))(function(_0x117943,_0x25ac7b){function _0x2f2d1d(_0x2ade21){try{_0x43ebfc(_0x2a2e14['next'](_0x2ade21));}catch(_0x40a0cd){_0x25ac7b(_0x40a0cd);}}function _0x456e67(_0x1c18ed){try{_0x43ebfc(_0x2a2e14['throw'](_0x1c18ed));}catch(_0x61138){_0x25ac7b(_0x61138);}}function _0x43ebfc(_0x3d677f){_0x3d677f['done']?_0x117943(_0x3d677f['value']):_0x55d108(_0x3d677f['value'])['then'](_0x2f2d1d,_0x456e67);}_0x43ebfc((_0x2a2e14=_0x2a2e14['apply'](_0xd388ca,_0x1f84fd||[]))['next']());});};class AccountService{constructor(_0x538c8f){this['fetch']=_0x538c8f;}['get'](_0x5e1cce,_0x422cd5){return __awaiter$4(this,void 0,void 0,function*(){const _0x35396b='Account/'+_0x5e1cce+'/',_0xf7a5a6=yield this['fetch']['get'](_0x35396b,_0x422cd5);try{if(_0xf7a5a6['status']>0xc7&&_0xf7a5a6['status']<0x12c){const _0x3fc744=yield _0xf7a5a6['json']();return new SuccessfulAccountResponse(_0x3fc744);}const _0x29abc5=yield _0xf7a5a6['json']();return new FailedAccountResponse(_0x29abc5);}catch(_0x9a4125){if(_0x9a4125 instanceof Error)return new FailedAccountResponse({'detail':_0x9a4125['message'],'title':_0x9a4125['name'],'status':0x1f4,'instance':'','type':''});throw _0x9a4125;}});}}
4
-
5
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x41a11f,_0x20cd6c,_0x2111cb,_0x563154){function _0x29eb02(_0x47e4cf){return _0x47e4cf instanceof _0x2111cb?_0x47e4cf:new _0x2111cb(function(_0x37d742){_0x37d742(_0x47e4cf);});}return new(_0x2111cb||(_0x2111cb=Promise))(function(_0x152ed8,_0x418762){function _0x586ed1(_0x29b4c3){try{_0x4d517f(_0x563154['next'](_0x29b4c3));}catch(_0x5a083b){_0x418762(_0x5a083b);}}function _0x2f9eb8(_0x4ec116){try{_0x4d517f(_0x563154['throw'](_0x4ec116));}catch(_0x368e0a){_0x418762(_0x368e0a);}}function _0x4d517f(_0x2e0091){_0x2e0091['done']?_0x152ed8(_0x2e0091['value']):_0x29eb02(_0x2e0091['value'])['then'](_0x586ed1,_0x2f9eb8);}_0x4d517f((_0x563154=_0x563154['apply'](_0x41a11f,_0x20cd6c||[]))['next']());});};class ApiKeyService{constructor(_0x44e904){this['fetch']=_0x44e904;}['create'](_0x1f131a,_0x3ef99d,_0x34cc5a){return __awaiter$3(this,void 0,void 0,function*(){const _0x5398d3='api-key/create',_0x10df37={'account_name':_0x1f131a,'api_key_name':_0x3ef99d};try{const _0x28010f=yield this['fetch']['post'](_0x5398d3,_0x34cc5a,_0x10df37);if(_0x28010f['status']>0xc7&&_0x28010f['status']<0x12c){const _0x250553=yield _0x28010f['json']();return new SuccessfulApiKeyResponse(_0x250553);}const _0x40e21b=yield _0x28010f['json']();return new FailedApiKeyResponse(_0x40e21b);}catch(_0x28a011){if(_0x28a011 instanceof Error)return new FailedApiKeyResponse({'detail':_0x28a011['message'],'title':_0x28a011['name'],'status':0x1f4,'instance':'','type':''});throw _0x28a011;}});}['view'](_0x79e52f,_0x54de1c,_0x4cb6da){return __awaiter$3(this,void 0,void 0,function*(){const _0x1eb9fc='api-key/'+_0x79e52f+'/'+_0x54de1c;try{const _0x19dacb=yield this['fetch']['get'](_0x1eb9fc,_0x4cb6da);if(_0x19dacb['status']>0xc7&&_0x19dacb['status']<0x12c){const _0x19e618=yield _0x19dacb['json']();return new SuccessfulApiKeyValueResponse(_0x19e618);}const _0x2deba7=yield _0x19dacb['json']();return new FailedApiKeyValueResponse(_0x2deba7);}catch(_0x4f599f){if(_0x4f599f instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x4f599f['message'],'title':_0x4f599f['name'],'status':0x1f4,'instance':'','type':''});throw _0x4f599f;}});}}
6
-
7
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x3ec0f7,_0x33a31f,_0x51a874,_0x52f911){function _0x4dd2e8(_0x491543){return _0x491543 instanceof _0x51a874?_0x491543:new _0x51a874(function(_0x2dacfe){_0x2dacfe(_0x491543);});}return new(_0x51a874||(_0x51a874=Promise))(function(_0x29b80f,_0x1c103b){function _0x4e0a54(_0x99ffe7){try{_0x385f5a(_0x52f911['next'](_0x99ffe7));}catch(_0x17e887){_0x1c103b(_0x17e887);}}function _0x3b4df1(_0xbabbdb){try{_0x385f5a(_0x52f911['throw'](_0xbabbdb));}catch(_0x8fdb94){_0x1c103b(_0x8fdb94);}}function _0x385f5a(_0x341402){_0x341402['done']?_0x29b80f(_0x341402['value']):_0x4dd2e8(_0x341402['value'])['then'](_0x4e0a54,_0x3b4df1);}_0x385f5a((_0x52f911=_0x52f911['apply'](_0x3ec0f7,_0x33a31f||[]))['next']());});};class ListService{constructor(_0x590cad){this['fetch']=_0x590cad;}['add'](_0x4972a6,_0x10334c,_0x3a0bab){return __awaiter$2(this,void 0,void 0,function*(){const _0x2ccd6a='List',_0x528b34={'account_name':_0x4972a6,'list_name':_0x10334c};try{const _0x3549c9=yield this['fetch']['post'](_0x2ccd6a,_0x3a0bab,_0x528b34);if(_0x3549c9['status']>0xc7&&_0x3549c9['status']<0x12c){const _0x42e1fd=yield _0x3549c9['json']();return new SuccessfulAccountResponse(_0x42e1fd);}const _0x1d1b06=yield _0x3549c9['json']();return new FailedAccountResponse(_0x1d1b06);}catch(_0x117195){if(_0x117195 instanceof Error)return new FailedAccountResponse({'detail':_0x117195['message'],'title':_0x117195['name'],'status':0x1f4,'instance':'','type':''});throw _0x117195;}});}['remove'](_0x1d223b,_0x419eb3,_0x4e7c03){return __awaiter$2(this,void 0,void 0,function*(){const _0x56197b='List/'+_0x1d223b+'/'+_0x419eb3,_0x516e90=yield this['fetch']['delete'](_0x56197b,_0x4e7c03);try{if(_0x516e90['status']>0xc7&&_0x516e90['status']<0x12c){const _0x369a04=yield _0x516e90['json']();return new SuccessfulAccountResponse(_0x369a04);}const _0x5b5d9c=yield _0x516e90['json']();return new FailedAccountResponse(_0x5b5d9c);}catch(_0x21adec){if(_0x21adec instanceof Error)return new FailedAccountResponse({'detail':_0x21adec['message'],'title':_0x21adec['name'],'status':0x1f4,'instance':'','type':''});throw _0x21adec;}});}}
8
-
9
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x5d770e,_0x375e31,_0x3c3ba0,_0x386013){function _0xaebe52(_0xad9acb){return _0xad9acb instanceof _0x3c3ba0?_0xad9acb:new _0x3c3ba0(function(_0x54f37e){_0x54f37e(_0xad9acb);});}return new(_0x3c3ba0||(_0x3c3ba0=Promise))(function(_0x342972,_0x49ea85){function _0x565101(_0x4857e1){try{_0x12480a(_0x386013['next'](_0x4857e1));}catch(_0x3821af){_0x49ea85(_0x3821af);}}function _0x3fcd96(_0x224a27){try{_0x12480a(_0x386013['throw'](_0x224a27));}catch(_0xd32880){_0x49ea85(_0xd32880);}}function _0x12480a(_0x4b8d68){_0x4b8d68['done']?_0x342972(_0x4b8d68['value']):_0xaebe52(_0x4b8d68['value'])['then'](_0x565101,_0x3fcd96);}_0x12480a((_0x386013=_0x386013['apply'](_0x5d770e,_0x375e31||[]))['next']());});};class Fetch{constructor(_0x253596){this['baseUri']=_0x253596,this['getUrl']=_0x465f56=>{return _0x465f56['startsWith']('/')&&(_0x465f56=_0x465f56['replace']('/','')),''+this['baseUri']+_0x465f56;},!_0x253596['endsWith']('/')&&(_0x253596=_0x253596+'/');}['get'](_0x391d5d,_0x26fc58){return __awaiter$1(this,void 0,void 0,function*(){const _0x535536=this['getUrl'](_0x391d5d);return yield fetch(_0x535536,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x26fc58}});});}['post'](_0x2222ba,_0x6e8abc,_0x3d518d){return __awaiter$1(this,void 0,void 0,function*(){const _0x4ce5ce=this['getUrl'](_0x2222ba);return yield fetch(_0x4ce5ce,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x6e8abc},'body':_0x3d518d?JSON['stringify'](_0x3d518d):null});});}['put'](_0x222f50,_0x37f970,_0x4af0a8){return __awaiter$1(this,void 0,void 0,function*(){const _0x5b0933=this['getUrl'](_0x222f50);return yield fetch(_0x5b0933,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x37f970},'body':_0x4af0a8?JSON['stringify'](_0x4af0a8):null});});}['delete'](_0x221a1f,_0x3d7486){return __awaiter$1(this,void 0,void 0,function*(){const _0x4d76f3=this['getUrl'](_0x221a1f);return yield fetch(_0x4d76f3,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3d7486}});});}}
10
-
11
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x152e1d,_0x32799f,_0x43c633,_0x282ac6){function _0x2fcfdc(_0x336848){return _0x336848 instanceof _0x43c633?_0x336848:new _0x43c633(function(_0xa82d31){_0xa82d31(_0x336848);});}return new(_0x43c633||(_0x43c633=Promise))(function(_0x52eebd,_0x592e4c){function _0x1c382c(_0x1b2116){try{_0x3ecbc7(_0x282ac6['next'](_0x1b2116));}catch(_0x4d6c6a){_0x592e4c(_0x4d6c6a);}}function _0x3cd06a(_0x2eef8a){try{_0x3ecbc7(_0x282ac6['throw'](_0x2eef8a));}catch(_0x45fc03){_0x592e4c(_0x45fc03);}}function _0x3ecbc7(_0x196d7e){_0x196d7e['done']?_0x52eebd(_0x196d7e['value']):_0x2fcfdc(_0x196d7e['value'])['then'](_0x1c382c,_0x3cd06a);}_0x3ecbc7((_0x282ac6=_0x282ac6['apply'](_0x152e1d,_0x32799f||[]))['next']());});};class AdminClient{constructor(_0xfc3e53='https://admin.searchability.dev/'){var _0x1a1442=new Fetch(_0xfc3e53);this['Accounts']=new AccountService(_0x1a1442),this['Lists']=new ListService(_0x1a1442),this['ApiKeys']=new ApiKeyService(_0x1a1442);}}class AuthClient{constructor(_0x1fb5d3='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x1fb5d3);}['login'](_0x2ab874){return __awaiter(this,void 0,void 0,function*(){var _0x1d0bb4='login/'+_0x2ab874;try{const _0xb81a4f=yield yield fetch(_0x1d0bb4);if(_0xb81a4f['status']>0xc7&&_0xb81a4f['status']<0x12c){const _0x27bc92=yield _0xb81a4f['json']();return new SuccessfulAuthResponse(_0x27bc92);}const _0xa0c5ea=yield _0xb81a4f['json']();return new FailedAuthResponse(_0xa0c5ea);}catch(_0x3150d5){if(_0x3150d5 instanceof Error)return new FailedAuthResponse({'detail':_0x3150d5['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x3150d5;}});}['refresh'](_0x26ad7a){return __awaiter(this,void 0,void 0,function*(){var _0x35a842='refresh';try{const _0x26c084=yield this['fetch']['post'](_0x35a842,_0x26ad7a,null);if(_0x26c084['status']>0xc7&&_0x26c084['status']<0x12c){const _0x5f12d8=yield _0x26c084['json']();return new SuccessfulAuthResponse(_0x5f12d8);}const _0x59a944=yield _0x26c084['json']();return new FailedAuthResponse(_0x59a944);}catch(_0x13692f){if(_0x13692f instanceof Error)return new FailedAuthResponse({'detail':_0x13692f['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x13692f;}});}}
12
-
13
- export { AdminClient, AuthClient };