@searchability/admin-client 0.0.26 → 0.0.29

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(_0x43a3e9){_0x43a3e9[_0x43a3e9['Ok']=0x0]='Ok',_0x43a3e9[_0x43a3e9['Refresh']=0x1]='Refresh',_0x43a3e9[_0x43a3e9['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(_0x389d22){this['isSuccess']=_0x389d22;}}class SuccessfulAccountResponse extends Response{constructor(_0x4f3bad){super(!![]),this['account']=_0x4f3bad;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x29c16c){super(![]),this['problem']=_0x29c16c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x2e67be){super(!![]),this['tokens']=_0x2e67be;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x1b4c1f){super(![]),this['problem']=_0x1b4c1f;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x370faa){super(!![]),this['apiKey']=_0x370faa;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x32a7e4){super(![]),this['problem']=_0x32a7e4;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x30c94f){super(!![]),this['apiKeyValue']=_0x30c94f;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyValueResponse extends Response{constructor(_0x30b6ea){super(![]),this['problem']=_0x30b6ea;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
4
+
5
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x163416,_0x37ca36,_0x42c69d,_0x3a8135){function _0x462c76(_0x1d24e1){return _0x1d24e1 instanceof _0x42c69d?_0x1d24e1:new _0x42c69d(function(_0x5be231){_0x5be231(_0x1d24e1);});}return new(_0x42c69d||(_0x42c69d=Promise))(function(_0x15d1e3,_0x44dba2){function _0x45157f(_0x1cf6fe){try{_0xa7f89b(_0x3a8135['next'](_0x1cf6fe));}catch(_0x267a65){_0x44dba2(_0x267a65);}}function _0x3ad566(_0x72306e){try{_0xa7f89b(_0x3a8135['throw'](_0x72306e));}catch(_0x564b31){_0x44dba2(_0x564b31);}}function _0xa7f89b(_0x43f9f0){_0x43f9f0['done']?_0x15d1e3(_0x43f9f0['value']):_0x462c76(_0x43f9f0['value'])['then'](_0x45157f,_0x3ad566);}_0xa7f89b((_0x3a8135=_0x3a8135['apply'](_0x163416,_0x37ca36||[]))['next']());});};class AccountService{constructor(_0x2d68d0){this['fetch']=_0x2d68d0;}['get'](_0x5f0a41,_0xabde2d){return __awaiter$4(this,void 0,void 0,function*(){const _0x33ebf5='Account/'+_0x5f0a41+'/',_0x5da5c3=yield this['fetch']['get'](_0x33ebf5,_0xabde2d);try{if(_0x5da5c3['status']>0xc7&&_0x5da5c3['status']<0x12c){const _0x39a793=yield _0x5da5c3['json']();return new SuccessfulAccountResponse(_0x39a793);}const _0x26fb69=yield _0x5da5c3['json']();return new FailedAccountResponse(_0x26fb69);}catch(_0x353b23){if(_0x353b23 instanceof Error)return new FailedAccountResponse({'detail':_0x353b23['message'],'title':_0x353b23['name'],'status':0x1f4,'instance':'','type':''});throw _0x353b23;}});}}
6
+
7
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x262fab,_0x3b86d1,_0x36bb2c,_0x30026e){function _0x24d99b(_0x42893e){return _0x42893e instanceof _0x36bb2c?_0x42893e:new _0x36bb2c(function(_0x57451f){_0x57451f(_0x42893e);});}return new(_0x36bb2c||(_0x36bb2c=Promise))(function(_0x4ec620,_0xc7ee48){function _0x3c4453(_0x122421){try{_0x337185(_0x30026e['next'](_0x122421));}catch(_0x4fffbf){_0xc7ee48(_0x4fffbf);}}function _0x1654b6(_0x1b8a48){try{_0x337185(_0x30026e['throw'](_0x1b8a48));}catch(_0x3862f7){_0xc7ee48(_0x3862f7);}}function _0x337185(_0x345526){_0x345526['done']?_0x4ec620(_0x345526['value']):_0x24d99b(_0x345526['value'])['then'](_0x3c4453,_0x1654b6);}_0x337185((_0x30026e=_0x30026e['apply'](_0x262fab,_0x3b86d1||[]))['next']());});};class ApiKeyService{constructor(_0x470dff){this['fetch']=_0x470dff;}['create'](_0x4243c1,_0x37444f,_0x10bc13){return __awaiter$3(this,void 0,void 0,function*(){const _0x40f228='api-key/create',_0x310721={'account_name':_0x4243c1,'api_key_name':_0x37444f};try{const _0x1208ac=yield this['fetch']['post'](_0x40f228,_0x10bc13,_0x310721);if(_0x1208ac['status']>0xc7&&_0x1208ac['status']<0x12c){const _0x1afcb1=yield _0x1208ac['json']();return new SuccessfulApiKeyResponse(_0x1afcb1);}const _0x391294=yield _0x1208ac['json']();return new FailedApiKeyResponse(_0x391294);}catch(_0x318f02){if(_0x318f02 instanceof Error)return new FailedApiKeyResponse({'detail':_0x318f02['message'],'title':_0x318f02['name'],'status':0x1f4,'instance':'','type':''});throw _0x318f02;}});}['view'](_0x892f2a,_0x2e80dd,_0x586b6f){return __awaiter$3(this,void 0,void 0,function*(){const _0x4081ea='api-key/'+_0x892f2a+'/'+_0x2e80dd;try{const _0x476d94=yield this['fetch']['get'](_0x4081ea,_0x586b6f);if(_0x476d94['status']>0xc7&&_0x476d94['status']<0x12c){const _0x40d3fc=yield _0x476d94['json']();return new SuccessfulApiKeyValueResponse(_0x40d3fc);}const _0xb89bae=yield _0x476d94['json']();return new FailedApiKeyValueResponse(_0xb89bae);}catch(_0x56eb97){if(_0x56eb97 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x56eb97['message'],'title':_0x56eb97['name'],'status':0x1f4,'instance':'','type':''});throw _0x56eb97;}});}}
8
+
9
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0xb11936,_0x1cc8a0,_0x594241,_0x314622){function _0x149d4e(_0xbb8957){return _0xbb8957 instanceof _0x594241?_0xbb8957:new _0x594241(function(_0x2912e7){_0x2912e7(_0xbb8957);});}return new(_0x594241||(_0x594241=Promise))(function(_0x271a6d,_0x1c1b28){function _0x468794(_0x72817){try{_0x280f3f(_0x314622['next'](_0x72817));}catch(_0x501bc6){_0x1c1b28(_0x501bc6);}}function _0x214605(_0x3b33f6){try{_0x280f3f(_0x314622['throw'](_0x3b33f6));}catch(_0xf9d0b9){_0x1c1b28(_0xf9d0b9);}}function _0x280f3f(_0x46dfcf){_0x46dfcf['done']?_0x271a6d(_0x46dfcf['value']):_0x149d4e(_0x46dfcf['value'])['then'](_0x468794,_0x214605);}_0x280f3f((_0x314622=_0x314622['apply'](_0xb11936,_0x1cc8a0||[]))['next']());});};class ListService{constructor(_0x25ab11){this['fetch']=_0x25ab11;}['add'](_0x25220a,_0x1a9635,_0x34d08f){return __awaiter$2(this,void 0,void 0,function*(){const _0x47d0fb='List',_0x38218a={'account_name':_0x25220a,'list_name':_0x1a9635};try{const _0x3defd6=yield this['fetch']['post'](_0x47d0fb,_0x34d08f,_0x38218a);if(_0x3defd6['status']>0xc7&&_0x3defd6['status']<0x12c){const _0x2366c0=yield _0x3defd6['json']();return new SuccessfulAccountResponse(_0x2366c0);}const _0xbbee2e=yield _0x3defd6['json']();return new FailedAccountResponse(_0xbbee2e);}catch(_0x25d9de){if(_0x25d9de instanceof Error)return new FailedAccountResponse({'detail':_0x25d9de['message'],'title':_0x25d9de['name'],'status':0x1f4,'instance':'','type':''});throw _0x25d9de;}});}['remove'](_0x3fb81e,_0x5a93de,_0x383896){return __awaiter$2(this,void 0,void 0,function*(){const _0x11070d='List/'+_0x3fb81e+'/'+_0x5a93de,_0x49c4b1=yield this['fetch']['delete'](_0x11070d,_0x383896);try{if(_0x49c4b1['status']>0xc7&&_0x49c4b1['status']<0x12c){const _0x32e640=yield _0x49c4b1['json']();return new SuccessfulAccountResponse(_0x32e640);}const _0x22044b=yield _0x49c4b1['json']();return new FailedAccountResponse(_0x22044b);}catch(_0x37b73b){if(_0x37b73b instanceof Error)return new FailedAccountResponse({'detail':_0x37b73b['message'],'title':_0x37b73b['name'],'status':0x1f4,'instance':'','type':''});throw _0x37b73b;}});}}
10
+
11
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x3a0aa6,_0x36ed0c,_0x17723a,_0x46ca6d){function _0x4ec0df(_0x183fd7){return _0x183fd7 instanceof _0x17723a?_0x183fd7:new _0x17723a(function(_0x3df152){_0x3df152(_0x183fd7);});}return new(_0x17723a||(_0x17723a=Promise))(function(_0x2ba4f6,_0x4db1ac){function _0x52373e(_0x56955b){try{_0x29ac38(_0x46ca6d['next'](_0x56955b));}catch(_0x4ecf2a){_0x4db1ac(_0x4ecf2a);}}function _0x32ec8f(_0x145113){try{_0x29ac38(_0x46ca6d['throw'](_0x145113));}catch(_0x94e5d7){_0x4db1ac(_0x94e5d7);}}function _0x29ac38(_0x28e7aa){_0x28e7aa['done']?_0x2ba4f6(_0x28e7aa['value']):_0x4ec0df(_0x28e7aa['value'])['then'](_0x52373e,_0x32ec8f);}_0x29ac38((_0x46ca6d=_0x46ca6d['apply'](_0x3a0aa6,_0x36ed0c||[]))['next']());});};class Fetch{constructor(_0x160807){this['baseUri']=_0x160807,this['getUrl']=_0x46c389=>{return _0x46c389['startsWith']('/')&&(_0x46c389=_0x46c389['replace']('/','')),''+this['baseUri']+_0x46c389;},!_0x160807['endsWith']('/')&&(_0x160807=_0x160807+'/');}['get'](_0x3ac39a,_0x1e75c0){return __awaiter$1(this,void 0,void 0,function*(){const _0x317ba4=this['getUrl'](_0x3ac39a);return yield fetch(_0x317ba4,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1e75c0}});});}['post'](_0x425840,_0x16cdee,_0x193835){return __awaiter$1(this,void 0,void 0,function*(){const _0x36a868=this['getUrl'](_0x425840);return yield fetch(_0x36a868,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x16cdee},'body':_0x193835?JSON['stringify'](_0x193835):null});});}['put'](_0x29feda,_0x1a402b,_0x3774a3){return __awaiter$1(this,void 0,void 0,function*(){const _0xa6f6c7=this['getUrl'](_0x29feda);return yield fetch(_0xa6f6c7,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1a402b},'body':_0x3774a3?JSON['stringify'](_0x3774a3):null});});}['delete'](_0x45a5dc,_0x26022a){return __awaiter$1(this,void 0,void 0,function*(){const _0x1aa108=this['getUrl'](_0x45a5dc);return yield fetch(_0x1aa108,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x26022a}});});}}
12
+
13
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x45f20e,_0x33786d,_0x178a37,_0x3d5cfc){function _0x2442f6(_0x52bfcd){return _0x52bfcd instanceof _0x178a37?_0x52bfcd:new _0x178a37(function(_0x2672d3){_0x2672d3(_0x52bfcd);});}return new(_0x178a37||(_0x178a37=Promise))(function(_0xd8f452,_0x352ed3){function _0x27dd72(_0x4e416b){try{_0x57a39c(_0x3d5cfc['next'](_0x4e416b));}catch(_0x31a93d){_0x352ed3(_0x31a93d);}}function _0xb6de21(_0x16cca2){try{_0x57a39c(_0x3d5cfc['throw'](_0x16cca2));}catch(_0x1ab15c){_0x352ed3(_0x1ab15c);}}function _0x57a39c(_0x33d849){_0x33d849['done']?_0xd8f452(_0x33d849['value']):_0x2442f6(_0x33d849['value'])['then'](_0x27dd72,_0xb6de21);}_0x57a39c((_0x3d5cfc=_0x3d5cfc['apply'](_0x45f20e,_0x33786d||[]))['next']());});};class AdminClient{constructor(_0x1757f8='https://admin.searchability.dev/'){var _0x40b818=new Fetch(_0x1757f8);this['Accounts']=new AccountService(_0x40b818),this['Lists']=new ListService(_0x40b818),this['ApiKeys']=new ApiKeyService(_0x40b818);}}class AuthClient{constructor(_0x4eb9c1='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x4eb9c1);}['login'](_0x278e02){return __awaiter(this,void 0,void 0,function*(){var _0x1ccb4b='login/'+_0x278e02;try{const _0x3916f7=yield yield fetch(_0x1ccb4b);if(_0x3916f7['status']>0xc7&&_0x3916f7['status']<0x12c){const _0x3544f6=yield _0x3916f7['json']();return new SuccessfulAuthResponse(_0x3544f6);}const _0x4c600c=yield _0x3916f7['json']();return new FailedAuthResponse(_0x4c600c);}catch(_0x2c559c){if(_0x2c559c instanceof Error)return new FailedAuthResponse({'detail':_0x2c559c['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x2c559c;}});}['refresh'](_0x20f420){return __awaiter(this,void 0,void 0,function*(){var _0x581872='refresh';try{const _0x1d73fc=yield this['fetch']['post'](_0x581872,_0x20f420,null);if(_0x1d73fc['status']>0xc7&&_0x1d73fc['status']<0x12c){const _0x301718=yield _0x1d73fc['json']();return new SuccessfulAuthResponse(_0x301718);}const _0x14c393=yield _0x1d73fc['json']();return new FailedAuthResponse(_0x14c393);}catch(_0x41740f){if(_0x41740f instanceof Error)return new FailedAuthResponse({'detail':_0x41740f['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x41740f;}});}}
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(_0x24a862){_0x24a862[_0x24a862['Ok']=0x0]='Ok',_0x24a862[_0x24a862['Refresh']=0x1]='Refresh',_0x24a862[_0x24a862['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(_0x3bce0a){this['isSuccess']=_0x3bce0a;}}class SuccessfulAccountResponse extends Response{constructor(_0x97abb5){super(!![]),this['account']=_0x97abb5;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x26fed6){super(![]),this['problem']=_0x26fed6;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x2f9d4a){super(!![]),this['tokens']=_0x2f9d4a;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x30e41a){super(![]),this['problem']=_0x30e41a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x11a573){super(!![]),this['apiKey']=_0x11a573;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x312f50){super(![]),this['problem']=_0x312f50;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x41321b){super(!![]),this['apiKeyValue']=_0x41321b;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyValueResponse extends Response{constructor(_0x2e837a){super(![]),this['problem']=_0x2e837a;}['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(_0x2f5bab,_0x1d0632,_0x89a6bd,_0x2a0702){function _0x47097e(_0x1d8be){return _0x1d8be instanceof _0x89a6bd?_0x1d8be:new _0x89a6bd(function(_0x267708){_0x267708(_0x1d8be);});}return new(_0x89a6bd||(_0x89a6bd=Promise))(function(_0x388da0,_0x4a8001){function _0x521832(_0x4aef24){try{_0x34a2c5(_0x2a0702['next'](_0x4aef24));}catch(_0xa65c95){_0x4a8001(_0xa65c95);}}function _0x3d23bc(_0x289fec){try{_0x34a2c5(_0x2a0702['throw'](_0x289fec));}catch(_0x4d75c4){_0x4a8001(_0x4d75c4);}}function _0x34a2c5(_0x9bece1){_0x9bece1['done']?_0x388da0(_0x9bece1['value']):_0x47097e(_0x9bece1['value'])['then'](_0x521832,_0x3d23bc);}_0x34a2c5((_0x2a0702=_0x2a0702['apply'](_0x2f5bab,_0x1d0632||[]))['next']());});};class AccountService{constructor(_0x1407cd){this['fetch']=_0x1407cd;}['get'](_0x6a7ee0,_0x398a88){return __awaiter$4(this,void 0,void 0,function*(){const _0x295606='Account/'+_0x6a7ee0+'/',_0x2d2715=yield this['fetch']['get'](_0x295606,_0x398a88);try{if(_0x2d2715['status']>0xc7&&_0x2d2715['status']<0x12c){const _0x182f27=yield _0x2d2715['json']();return new SuccessfulAccountResponse(_0x182f27);}const _0x4d5536=yield _0x2d2715['json']();return new FailedAccountResponse(_0x4d5536);}catch(_0x2a83d6){if(_0x2a83d6 instanceof Error)return new FailedAccountResponse({'detail':_0x2a83d6['message'],'title':_0x2a83d6['name'],'status':0x1f4,'instance':'','type':''});throw _0x2a83d6;}});}}
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(_0x540742,_0x7f802d,_0x433a44,_0x305ec2){function _0x3d9cf4(_0x25191b){return _0x25191b instanceof _0x433a44?_0x25191b:new _0x433a44(function(_0x14892c){_0x14892c(_0x25191b);});}return new(_0x433a44||(_0x433a44=Promise))(function(_0x1c9a60,_0x10e36d){function _0x24ff8e(_0xfd0b6){try{_0x2362bf(_0x305ec2['next'](_0xfd0b6));}catch(_0x5665d9){_0x10e36d(_0x5665d9);}}function _0x3e992f(_0x4d570e){try{_0x2362bf(_0x305ec2['throw'](_0x4d570e));}catch(_0x14499e){_0x10e36d(_0x14499e);}}function _0x2362bf(_0x21b157){_0x21b157['done']?_0x1c9a60(_0x21b157['value']):_0x3d9cf4(_0x21b157['value'])['then'](_0x24ff8e,_0x3e992f);}_0x2362bf((_0x305ec2=_0x305ec2['apply'](_0x540742,_0x7f802d||[]))['next']());});};class ApiKeyService{constructor(_0x4b16a4){this['fetch']=_0x4b16a4;}['create'](_0x2d79fc,_0x41fad2,_0x23c16f){return __awaiter$3(this,void 0,void 0,function*(){const _0x60df06='api-key/create',_0xc4c389={'account_name':_0x2d79fc,'api_key_name':_0x41fad2};try{const _0xec6325=yield this['fetch']['post'](_0x60df06,_0x23c16f,_0xc4c389);if(_0xec6325['status']>0xc7&&_0xec6325['status']<0x12c){const _0x36b110=yield _0xec6325['json']();return new SuccessfulApiKeyResponse(_0x36b110);}const _0x1d2c4e=yield _0xec6325['json']();return new FailedApiKeyResponse(_0x1d2c4e);}catch(_0x1b9024){if(_0x1b9024 instanceof Error)return new FailedApiKeyResponse({'detail':_0x1b9024['message'],'title':_0x1b9024['name'],'status':0x1f4,'instance':'','type':''});throw _0x1b9024;}});}['view'](_0xd0d2,_0xf99c73,_0x4b6040){return __awaiter$3(this,void 0,void 0,function*(){const _0x3cc18a='api-key/'+_0xd0d2+'/'+_0xf99c73;try{const _0x5d3664=yield this['fetch']['get'](_0x3cc18a,_0x4b6040);if(_0x5d3664['status']>0xc7&&_0x5d3664['status']<0x12c){const _0x20e52c=yield _0x5d3664['json']();return new SuccessfulApiKeyValueResponse(_0x20e52c);}const _0x33d51d=yield _0x5d3664['json']();return new FailedApiKeyValueResponse(_0x33d51d);}catch(_0x4f7ae0){if(_0x4f7ae0 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x4f7ae0['message'],'title':_0x4f7ae0['name'],'status':0x1f4,'instance':'','type':''});throw _0x4f7ae0;}});}}
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(_0xe9c276,_0x35cdf9,_0x482a17,_0xf4fc7f){function _0x285735(_0x162728){return _0x162728 instanceof _0x482a17?_0x162728:new _0x482a17(function(_0x53cfe5){_0x53cfe5(_0x162728);});}return new(_0x482a17||(_0x482a17=Promise))(function(_0x166267,_0x24d943){function _0x6c02aa(_0x26a3de){try{_0x570af7(_0xf4fc7f['next'](_0x26a3de));}catch(_0x2def88){_0x24d943(_0x2def88);}}function _0x148d16(_0x481d89){try{_0x570af7(_0xf4fc7f['throw'](_0x481d89));}catch(_0x515802){_0x24d943(_0x515802);}}function _0x570af7(_0x5129d7){_0x5129d7['done']?_0x166267(_0x5129d7['value']):_0x285735(_0x5129d7['value'])['then'](_0x6c02aa,_0x148d16);}_0x570af7((_0xf4fc7f=_0xf4fc7f['apply'](_0xe9c276,_0x35cdf9||[]))['next']());});};class ListService{constructor(_0x353ad){this['fetch']=_0x353ad;}['add'](_0x39debe,_0x279188,_0x243e7e){return __awaiter$2(this,void 0,void 0,function*(){const _0x5776cc='List',_0x4e61cf={'account_name':_0x39debe,'list_name':_0x279188};try{const _0x4c6782=yield this['fetch']['post'](_0x5776cc,_0x243e7e,_0x4e61cf);if(_0x4c6782['status']>0xc7&&_0x4c6782['status']<0x12c){const _0x3fe66e=yield _0x4c6782['json']();return new SuccessfulAccountResponse(_0x3fe66e);}const _0x2a0668=yield _0x4c6782['json']();return new FailedAccountResponse(_0x2a0668);}catch(_0x71a5ee){if(_0x71a5ee instanceof Error)return new FailedAccountResponse({'detail':_0x71a5ee['message'],'title':_0x71a5ee['name'],'status':0x1f4,'instance':'','type':''});throw _0x71a5ee;}});}['remove'](_0x1b2348,_0x280237,_0x49f43d){return __awaiter$2(this,void 0,void 0,function*(){const _0x20fdb6='List/'+_0x1b2348+'/'+_0x280237,_0x13a104=yield this['fetch']['delete'](_0x20fdb6,_0x49f43d);try{if(_0x13a104['status']>0xc7&&_0x13a104['status']<0x12c){const _0x56fbd8=yield _0x13a104['json']();return new SuccessfulAccountResponse(_0x56fbd8);}const _0x590b7e=yield _0x13a104['json']();return new FailedAccountResponse(_0x590b7e);}catch(_0x44514c){if(_0x44514c instanceof Error)return new FailedAccountResponse({'detail':_0x44514c['message'],'title':_0x44514c['name'],'status':0x1f4,'instance':'','type':''});throw _0x44514c;}});}}
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(_0x8e2726,_0x2a25fd,_0x1fcd89,_0x4b2795){function _0x9ff81d(_0x25ed09){return _0x25ed09 instanceof _0x1fcd89?_0x25ed09:new _0x1fcd89(function(_0x9f9cc){_0x9f9cc(_0x25ed09);});}return new(_0x1fcd89||(_0x1fcd89=Promise))(function(_0x309be9,_0x2099fd){function _0x5a1849(_0x56196c){try{_0x3f4a57(_0x4b2795['next'](_0x56196c));}catch(_0x49f9e0){_0x2099fd(_0x49f9e0);}}function _0x146975(_0x2a5c30){try{_0x3f4a57(_0x4b2795['throw'](_0x2a5c30));}catch(_0x370acb){_0x2099fd(_0x370acb);}}function _0x3f4a57(_0x1ae2f9){_0x1ae2f9['done']?_0x309be9(_0x1ae2f9['value']):_0x9ff81d(_0x1ae2f9['value'])['then'](_0x5a1849,_0x146975);}_0x3f4a57((_0x4b2795=_0x4b2795['apply'](_0x8e2726,_0x2a25fd||[]))['next']());});};class Fetch{constructor(_0x5662e9){this['baseUri']=_0x5662e9,this['getUrl']=_0x10fb04=>{return _0x10fb04['startsWith']('/')&&(_0x10fb04=_0x10fb04['replace']('/','')),''+this['baseUri']+_0x10fb04;},!_0x5662e9['endsWith']('/')&&(_0x5662e9=_0x5662e9+'/');}['get'](_0x20577f,_0x117fca){return __awaiter$1(this,void 0,void 0,function*(){const _0x2507e7=this['getUrl'](_0x20577f);return yield fetch(_0x2507e7,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x117fca}});});}['post'](_0xfaa12b,_0x338a1c,_0x32407f){return __awaiter$1(this,void 0,void 0,function*(){const _0x433a63=this['getUrl'](_0xfaa12b);return yield fetch(_0x433a63,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x338a1c},'body':_0x32407f?JSON['stringify'](_0x32407f):null});});}['put'](_0x5072bb,_0x1187ae,_0x208599){return __awaiter$1(this,void 0,void 0,function*(){const _0xcb32a7=this['getUrl'](_0x5072bb);return yield fetch(_0xcb32a7,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1187ae},'body':_0x208599?JSON['stringify'](_0x208599):null});});}['delete'](_0x3e3401,_0x3d22df){return __awaiter$1(this,void 0,void 0,function*(){const _0x479a53=this['getUrl'](_0x3e3401);return yield fetch(_0x479a53,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3d22df}});});}}
14
+
15
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x3b7dac,_0x306c63,_0x440f24,_0x18b50e){function _0x4fd278(_0x3a43b2){return _0x3a43b2 instanceof _0x440f24?_0x3a43b2:new _0x440f24(function(_0x5e8fc3){_0x5e8fc3(_0x3a43b2);});}return new(_0x440f24||(_0x440f24=Promise))(function(_0x550810,_0xaba3b9){function _0x1d588f(_0x6146f){try{_0x444776(_0x18b50e['next'](_0x6146f));}catch(_0x3e5f67){_0xaba3b9(_0x3e5f67);}}function _0x3ac8d0(_0x251e49){try{_0x444776(_0x18b50e['throw'](_0x251e49));}catch(_0xd4853c){_0xaba3b9(_0xd4853c);}}function _0x444776(_0x19b716){_0x19b716['done']?_0x550810(_0x19b716['value']):_0x4fd278(_0x19b716['value'])['then'](_0x1d588f,_0x3ac8d0);}_0x444776((_0x18b50e=_0x18b50e['apply'](_0x3b7dac,_0x306c63||[]))['next']());});};class AdminClient{constructor(_0x42ed7a='https://admin.searchability.dev/'){var _0x56057a=new Fetch(_0x42ed7a);this['Accounts']=new AccountService(_0x56057a),this['Lists']=new ListService(_0x56057a),this['ApiKeys']=new ApiKeyService(_0x56057a);}}class AuthClient{constructor(_0x2ec1f8='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x2ec1f8);}['login'](_0x1411c9){return __awaiter(this,void 0,void 0,function*(){var _0x1ba043='login/'+_0x1411c9;try{const _0x8659c=yield yield fetch(_0x1ba043);if(_0x8659c['status']>0xc7&&_0x8659c['status']<0x12c){const _0xb644dd=yield _0x8659c['json']();return new SuccessfulAuthResponse(_0xb644dd);}const _0x1f0879=yield _0x8659c['json']();return new FailedAuthResponse(_0x1f0879);}catch(_0x392498){if(_0x392498 instanceof Error)return new FailedAuthResponse({'detail':_0x392498['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x392498;}});}['refresh'](_0x39c659){return __awaiter(this,void 0,void 0,function*(){var _0x2a4f21='refresh';try{const _0x1c6db8=yield this['fetch']['post'](_0x2a4f21,_0x39c659,null);if(_0x1c6db8['status']>0xc7&&_0x1c6db8['status']<0x12c){const _0x4b292a=yield _0x1c6db8['json']();return new SuccessfulAuthResponse(_0x4b292a);}const _0xc04d03=yield _0x1c6db8['json']();return new FailedAuthResponse(_0xc04d03);}catch(_0x4e8359){if(_0x4e8359 instanceof Error)return new FailedAuthResponse({'detail':_0x4e8359['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x4e8359;}});}}
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(_0x1150ac){_0x1150ac[_0x1150ac['Ok']=0x0]='Ok',_0x1150ac[_0x1150ac['Refresh']=0x1]='Refresh',_0x1150ac[_0x1150ac['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(_0x1f20ea){this['isSuccess']=_0x1f20ea;}}class SuccessfulAccountResponse extends Response{constructor(_0x4c64c6){super(!![]),this['account']=_0x4c64c6;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x554609){super(![]),this['problem']=_0x554609;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x446159){super(!![]),this['tokens']=_0x446159;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x3c829a){super(![]),this['problem']=_0x3c829a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x3f5489){super(!![]),this['apiKey']=_0x3f5489;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x189a1c){super(![]),this['problem']=_0x189a1c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x5bb313){super(!![]),this['apiKeyValue']=_0x5bb313;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyValueResponse extends Response{constructor(_0x29cd1e){super(![]),this['problem']=_0x29cd1e;}['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(_0x5d41a8,_0x39af39,_0xd0b88d,_0x38cfe1){function _0x1d3b8f(_0x10d38a){return _0x10d38a instanceof _0xd0b88d?_0x10d38a:new _0xd0b88d(function(_0x106847){_0x106847(_0x10d38a);});}return new(_0xd0b88d||(_0xd0b88d=Promise))(function(_0x5d22b7,_0x28ee9b){function _0x405cdd(_0x5a018d){try{_0x2fb834(_0x38cfe1['next'](_0x5a018d));}catch(_0x46d32c){_0x28ee9b(_0x46d32c);}}function _0x6b9491(_0x580e88){try{_0x2fb834(_0x38cfe1['throw'](_0x580e88));}catch(_0x185b4e){_0x28ee9b(_0x185b4e);}}function _0x2fb834(_0x41607c){_0x41607c['done']?_0x5d22b7(_0x41607c['value']):_0x1d3b8f(_0x41607c['value'])['then'](_0x405cdd,_0x6b9491);}_0x2fb834((_0x38cfe1=_0x38cfe1['apply'](_0x5d41a8,_0x39af39||[]))['next']());});};class AccountService{constructor(_0x28935b){this['fetch']=_0x28935b;}['get'](_0x464bf7,_0x3ae7dd){return __awaiter$4(this,void 0,void 0,function*(){const _0x2170ba='Account/'+_0x464bf7+'/',_0x127417=yield this['fetch']['get'](_0x2170ba,_0x3ae7dd);try{if(_0x127417['status']>0xc7&&_0x127417['status']<0x12c){const _0x595b68=yield _0x127417['json']();return new SuccessfulAccountResponse(_0x595b68);}const _0x2ec558=yield _0x127417['json']();return new FailedAccountResponse(_0x2ec558);}catch(_0x1416db){if(_0x1416db instanceof Error)return new FailedAccountResponse({'detail':_0x1416db['message'],'title':_0x1416db['name'],'status':0x1f4,'instance':'','type':''});throw _0x1416db;}});}}
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(_0x4d05c8,_0x2bc23d,_0xaae974,_0x574880){function _0x219e88(_0x5d54cf){return _0x5d54cf instanceof _0xaae974?_0x5d54cf:new _0xaae974(function(_0x2c984d){_0x2c984d(_0x5d54cf);});}return new(_0xaae974||(_0xaae974=Promise))(function(_0x5e9ca1,_0x493220){function _0x5cdc6a(_0xb55c2f){try{_0x4c019e(_0x574880['next'](_0xb55c2f));}catch(_0x575eb8){_0x493220(_0x575eb8);}}function _0x4146dd(_0x1fb448){try{_0x4c019e(_0x574880['throw'](_0x1fb448));}catch(_0x16cdd5){_0x493220(_0x16cdd5);}}function _0x4c019e(_0x3b240a){_0x3b240a['done']?_0x5e9ca1(_0x3b240a['value']):_0x219e88(_0x3b240a['value'])['then'](_0x5cdc6a,_0x4146dd);}_0x4c019e((_0x574880=_0x574880['apply'](_0x4d05c8,_0x2bc23d||[]))['next']());});};class ApiKeyService{constructor(_0x193cc2){this['fetch']=_0x193cc2;}['create'](_0x4f44da,_0xb456aa,_0x3f5a02){return __awaiter$3(this,void 0,void 0,function*(){const _0x53f089='api-key/create',_0x5de28c={'account_name':_0x4f44da,'api_key_name':_0xb456aa};try{const _0x1aa0a9=yield this['fetch']['post'](_0x53f089,_0x3f5a02,_0x5de28c);if(_0x1aa0a9['status']>0xc7&&_0x1aa0a9['status']<0x12c){const _0x2742d0=yield _0x1aa0a9['json']();return new SuccessfulApiKeyResponse(_0x2742d0);}const _0x52468f=yield _0x1aa0a9['json']();return new FailedApiKeyResponse(_0x52468f);}catch(_0x451572){if(_0x451572 instanceof Error)return new FailedApiKeyResponse({'detail':_0x451572['message'],'title':_0x451572['name'],'status':0x1f4,'instance':'','type':''});throw _0x451572;}});}['view'](_0xd26af8,_0x4f4d2e,_0x2807ef){return __awaiter$3(this,void 0,void 0,function*(){const _0x3edc1f='api-key/'+_0xd26af8+'/'+_0x4f4d2e;try{const _0x3c3025=yield this['fetch']['get'](_0x3edc1f,_0x2807ef);if(_0x3c3025['status']>0xc7&&_0x3c3025['status']<0x12c){const _0x183480=yield _0x3c3025['json']();return new SuccessfulApiKeyValueResponse(_0x183480);}const _0x557c1c=yield _0x3c3025['json']();return new FailedApiKeyValueResponse(_0x557c1c);}catch(_0x8112dc){if(_0x8112dc instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x8112dc['message'],'title':_0x8112dc['name'],'status':0x1f4,'instance':'','type':''});throw _0x8112dc;}});}}
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(_0x55188f,_0xf274c5,_0x1eb372,_0x34c3ed){function _0x24fcac(_0x2c5253){return _0x2c5253 instanceof _0x1eb372?_0x2c5253:new _0x1eb372(function(_0x385da2){_0x385da2(_0x2c5253);});}return new(_0x1eb372||(_0x1eb372=Promise))(function(_0x34189e,_0x3ad294){function _0x5d47d0(_0x552560){try{_0x1154f7(_0x34c3ed['next'](_0x552560));}catch(_0x2bb1fd){_0x3ad294(_0x2bb1fd);}}function _0x4c8c80(_0x1a7cc2){try{_0x1154f7(_0x34c3ed['throw'](_0x1a7cc2));}catch(_0x504cb0){_0x3ad294(_0x504cb0);}}function _0x1154f7(_0x3626f9){_0x3626f9['done']?_0x34189e(_0x3626f9['value']):_0x24fcac(_0x3626f9['value'])['then'](_0x5d47d0,_0x4c8c80);}_0x1154f7((_0x34c3ed=_0x34c3ed['apply'](_0x55188f,_0xf274c5||[]))['next']());});};class ListService{constructor(_0x3d36fe){this['fetch']=_0x3d36fe;}['add'](_0x9406c2,_0x996ff1,_0x2db87b){return __awaiter$2(this,void 0,void 0,function*(){const _0x1e63f6='List',_0x27bee2={'account_name':_0x9406c2,'list_name':_0x996ff1};try{const _0x348c40=yield this['fetch']['post'](_0x1e63f6,_0x2db87b,_0x27bee2);if(_0x348c40['status']>0xc7&&_0x348c40['status']<0x12c){const _0x53f8fa=yield _0x348c40['json']();return new SuccessfulAccountResponse(_0x53f8fa);}const _0x5ace0c=yield _0x348c40['json']();return new FailedAccountResponse(_0x5ace0c);}catch(_0x3284b6){if(_0x3284b6 instanceof Error)return new FailedAccountResponse({'detail':_0x3284b6['message'],'title':_0x3284b6['name'],'status':0x1f4,'instance':'','type':''});throw _0x3284b6;}});}['remove'](_0x59771c,_0x398bfa,_0x5a3f5e){return __awaiter$2(this,void 0,void 0,function*(){const _0x297b09='List/'+_0x59771c+'/'+_0x398bfa,_0x98ae3=yield this['fetch']['delete'](_0x297b09,_0x5a3f5e);try{if(_0x98ae3['status']>0xc7&&_0x98ae3['status']<0x12c){const _0x3ac4b0=yield _0x98ae3['json']();return new SuccessfulAccountResponse(_0x3ac4b0);}const _0x1ae6f0=yield _0x98ae3['json']();return new FailedAccountResponse(_0x1ae6f0);}catch(_0x38f820){if(_0x38f820 instanceof Error)return new FailedAccountResponse({'detail':_0x38f820['message'],'title':_0x38f820['name'],'status':0x1f4,'instance':'','type':''});throw _0x38f820;}});}}
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(_0xfa835,_0x3311ba,_0x2bb8da,_0x109105){function _0x11bcfa(_0x5521a1){return _0x5521a1 instanceof _0x2bb8da?_0x5521a1:new _0x2bb8da(function(_0x56d2df){_0x56d2df(_0x5521a1);});}return new(_0x2bb8da||(_0x2bb8da=Promise))(function(_0x26d77f,_0x5d4a4b){function _0x306bd6(_0xbe467b){try{_0x214a78(_0x109105['next'](_0xbe467b));}catch(_0x350a0c){_0x5d4a4b(_0x350a0c);}}function _0x17fbba(_0x418b0c){try{_0x214a78(_0x109105['throw'](_0x418b0c));}catch(_0x47c378){_0x5d4a4b(_0x47c378);}}function _0x214a78(_0xa7acf3){_0xa7acf3['done']?_0x26d77f(_0xa7acf3['value']):_0x11bcfa(_0xa7acf3['value'])['then'](_0x306bd6,_0x17fbba);}_0x214a78((_0x109105=_0x109105['apply'](_0xfa835,_0x3311ba||[]))['next']());});};class Fetch{constructor(_0x3a736f){this['baseUri']=_0x3a736f,this['getUrl']=_0x260665=>{return _0x260665['startsWith']('/')&&(_0x260665=_0x260665['replace']('/','')),''+this['baseUri']+_0x260665;},!_0x3a736f['endsWith']('/')&&(_0x3a736f=_0x3a736f+'/');}['get'](_0xc01641,_0x40bc31){return __awaiter$1(this,void 0,void 0,function*(){const _0x240a47=this['getUrl'](_0xc01641);return yield fetch(_0x240a47,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x40bc31}});});}['post'](_0x9d5238,_0x18ae0b,_0x3b8dd9){return __awaiter$1(this,void 0,void 0,function*(){const _0x3a701b=this['getUrl'](_0x9d5238);return yield fetch(_0x3a701b,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x18ae0b},'body':_0x3b8dd9?JSON['stringify'](_0x3b8dd9):null});});}['put'](_0x402e62,_0x1df9ed,_0x56a404){return __awaiter$1(this,void 0,void 0,function*(){const _0x5068c6=this['getUrl'](_0x402e62);return yield fetch(_0x5068c6,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1df9ed},'body':_0x56a404?JSON['stringify'](_0x56a404):null});});}['delete'](_0x5dbd12,_0x579147){return __awaiter$1(this,void 0,void 0,function*(){const _0xc8e487=this['getUrl'](_0x5dbd12);return yield fetch(_0xc8e487,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x579147}});});}}
12
12
 
13
- export { AdminClient, AuthClient };
13
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x50256d,_0x63e679,_0x389287,_0xa6de5){function _0x26eaf6(_0xc2bd50){return _0xc2bd50 instanceof _0x389287?_0xc2bd50:new _0x389287(function(_0x33b19e){_0x33b19e(_0xc2bd50);});}return new(_0x389287||(_0x389287=Promise))(function(_0x510d52,_0x1815a8){function _0x4036ab(_0x30a554){try{_0xb37dbe(_0xa6de5['next'](_0x30a554));}catch(_0xa0600d){_0x1815a8(_0xa0600d);}}function _0x50e174(_0x218d5b){try{_0xb37dbe(_0xa6de5['throw'](_0x218d5b));}catch(_0x35d012){_0x1815a8(_0x35d012);}}function _0xb37dbe(_0x2bde12){_0x2bde12['done']?_0x510d52(_0x2bde12['value']):_0x26eaf6(_0x2bde12['value'])['then'](_0x4036ab,_0x50e174);}_0xb37dbe((_0xa6de5=_0xa6de5['apply'](_0x50256d,_0x63e679||[]))['next']());});};class AdminClient{constructor(_0x4c7fad='https://admin.searchability.dev/'){var _0x7c5480=new Fetch(_0x4c7fad);this['Accounts']=new AccountService(_0x7c5480),this['Lists']=new ListService(_0x7c5480),this['ApiKeys']=new ApiKeyService(_0x7c5480);}}class AuthClient{constructor(_0x44f7ae='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x44f7ae);}['login'](_0x38f036){return __awaiter(this,void 0,void 0,function*(){var _0xfa8bfe='login/'+_0x38f036;try{const _0x570aed=yield yield fetch(_0xfa8bfe);if(_0x570aed['status']>0xc7&&_0x570aed['status']<0x12c){const _0x209e53=yield _0x570aed['json']();return new SuccessfulAuthResponse(_0x209e53);}const _0x5d8a0f=yield _0x570aed['json']();return new FailedAuthResponse(_0x5d8a0f);}catch(_0x13cdd4){if(_0x13cdd4 instanceof Error)return new FailedAuthResponse({'detail':_0x13cdd4['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x13cdd4;}});}['refresh'](_0x139ec1){return __awaiter(this,void 0,void 0,function*(){var _0x36a48d='refresh';try{const _0x1cac57=yield this['fetch']['post'](_0x36a48d,_0x139ec1,null);if(_0x1cac57['status']>0xc7&&_0x1cac57['status']<0x12c){const _0xbd093b=yield _0x1cac57['json']();return new SuccessfulAuthResponse(_0xbd093b);}const _0x834822=yield _0x1cac57['json']();return new FailedAuthResponse(_0x834822);}catch(_0x27bda8){if(_0x27bda8 instanceof Error)return new FailedAuthResponse({'detail':_0x27bda8['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x27bda8;}});}}
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.29",
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 };