@searchability/admin-client 0.0.17 → 0.0.19

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
+ undefined&&undefined['__awaiter']||function(_0x5752fa,_0x11668b,_0x5d6697,_0x4716de){function _0x26f552(_0x51e87e){return _0x51e87e instanceof _0x5d6697?_0x51e87e:new _0x5d6697(function(_0x40c70e){_0x40c70e(_0x51e87e);});}return new(_0x5d6697||(_0x5d6697=Promise))(function(_0x4d24a8,_0x197e2d){function _0x24355f(_0x524591){try{_0x296b5b(_0x4716de['next'](_0x524591));}catch(_0x3c6680){_0x197e2d(_0x3c6680);}}function _0x1d5d38(_0x53b635){try{_0x296b5b(_0x4716de['throw'](_0x53b635));}catch(_0x550e80){_0x197e2d(_0x550e80);}}function _0x296b5b(_0xb960b9){_0xb960b9['done']?_0x4d24a8(_0xb960b9['value']):_0x26f552(_0xb960b9['value'])['then'](_0x24355f,_0x1d5d38);}_0x296b5b((_0x4716de=_0x4716de['apply'](_0x5752fa,_0x11668b||[]))['next']());});};
2
+
3
+ class Response{constructor(_0x4cd842){this['isSuccess']=_0x4cd842;}}class SuccessfulAccountResponse extends Response{constructor(_0x3c979a){super(!![]),this['account']=_0x3c979a;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x2542b4){super(![]),this['problem']=_0x2542b4;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x214b3f){super(!![]),this['tokens']=_0x214b3f;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x40acd9){super(![]),this['problem']=_0x40acd9;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x414f35){super(!![]),this['apiKeys']=_0x414f35;}['toSuccess'](){return this['apiKeys'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x5f8d5d){super(![]),this['problem']=_0x5f8d5d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
4
+
5
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x10c32f,_0x5a703f,_0x5ac711,_0x3721c9){function _0x547941(_0x36a478){return _0x36a478 instanceof _0x5ac711?_0x36a478:new _0x5ac711(function(_0x534d13){_0x534d13(_0x36a478);});}return new(_0x5ac711||(_0x5ac711=Promise))(function(_0x47072d,_0x2c96bd){function _0x4d00d7(_0x2432d3){try{_0xc02bf6(_0x3721c9['next'](_0x2432d3));}catch(_0x268f9f){_0x2c96bd(_0x268f9f);}}function _0x322f09(_0x774371){try{_0xc02bf6(_0x3721c9['throw'](_0x774371));}catch(_0x411e2c){_0x2c96bd(_0x411e2c);}}function _0xc02bf6(_0x4cab66){_0x4cab66['done']?_0x47072d(_0x4cab66['value']):_0x547941(_0x4cab66['value'])['then'](_0x4d00d7,_0x322f09);}_0xc02bf6((_0x3721c9=_0x3721c9['apply'](_0x10c32f,_0x5a703f||[]))['next']());});};class AccountService{constructor(_0x4dadc6){this['fetch']=_0x4dadc6;}['get'](_0x45686c,_0x31ceb7){return __awaiter$4(this,void 0,void 0,function*(){const _0x438504='Account/'+_0x45686c+'/',_0x4af386=yield this['fetch']['get'](_0x438504,_0x31ceb7);try{if(_0x4af386['status']>0xc7&&_0x4af386['status']<0x12c){const _0x329ff2=yield _0x4af386['json']();return new SuccessfulAccountResponse(_0x329ff2);}const _0x1ea9f9=yield _0x4af386['json']();return new FailedAccountResponse(_0x1ea9f9);}catch(_0x5e66ef){if(_0x5e66ef instanceof Error)return new FailedAccountResponse({'detail':_0x5e66ef['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x5e66ef;}});}}
6
+
7
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x493fbf,_0x2b3a8e,_0x532e4d,_0x3ab447){function _0x5e40ee(_0x56d398){return _0x56d398 instanceof _0x532e4d?_0x56d398:new _0x532e4d(function(_0x579e0e){_0x579e0e(_0x56d398);});}return new(_0x532e4d||(_0x532e4d=Promise))(function(_0x228706,_0x477131){function _0x250412(_0x3ac6bf){try{_0x2bbc83(_0x3ab447['next'](_0x3ac6bf));}catch(_0x240cea){_0x477131(_0x240cea);}}function _0x47ddc2(_0x2134f1){try{_0x2bbc83(_0x3ab447['throw'](_0x2134f1));}catch(_0xec1b59){_0x477131(_0xec1b59);}}function _0x2bbc83(_0x10ce95){_0x10ce95['done']?_0x228706(_0x10ce95['value']):_0x5e40ee(_0x10ce95['value'])['then'](_0x250412,_0x47ddc2);}_0x2bbc83((_0x3ab447=_0x3ab447['apply'](_0x493fbf,_0x2b3a8e||[]))['next']());});};class ApiKeyService{constructor(_0x43e298){this['fetch']=_0x43e298;}['create'](_0x3102ed,_0x2a82e5,_0xa0a72b){return __awaiter$3(this,void 0,void 0,function*(){const _0x800e6f='ApiKey/Create',_0x47359f={'account_name':_0x3102ed,'name':_0x2a82e5};try{const _0x4a4d13=yield this['fetch']['post'](_0x800e6f,_0xa0a72b,_0x47359f);if(_0x4a4d13['status']>0xc7&&_0x4a4d13['status']<0x12c){const _0x1880f5=yield _0x4a4d13['json']();return new SuccessfulApiKeyResponse(_0x1880f5);}const _0x593db8=yield _0x4a4d13['json']();return new FailedApiKeyResponse(_0x593db8);}catch(_0x40832a){if(_0x40832a instanceof Error)return new FailedApiKeyResponse({'detail':_0x40832a['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x40832a;}});}}
8
+
9
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x4d6946,_0x158da6,_0x23b090,_0x5321ef){function _0x255d11(_0x1daf43){return _0x1daf43 instanceof _0x23b090?_0x1daf43:new _0x23b090(function(_0x20df5f){_0x20df5f(_0x1daf43);});}return new(_0x23b090||(_0x23b090=Promise))(function(_0x345980,_0x130395){function _0xd8a402(_0x4bfe5d){try{_0x131506(_0x5321ef['next'](_0x4bfe5d));}catch(_0x16666a){_0x130395(_0x16666a);}}function _0x28ab9a(_0x268837){try{_0x131506(_0x5321ef['throw'](_0x268837));}catch(_0x4d7c7b){_0x130395(_0x4d7c7b);}}function _0x131506(_0x1a5e80){_0x1a5e80['done']?_0x345980(_0x1a5e80['value']):_0x255d11(_0x1a5e80['value'])['then'](_0xd8a402,_0x28ab9a);}_0x131506((_0x5321ef=_0x5321ef['apply'](_0x4d6946,_0x158da6||[]))['next']());});};class ListService{constructor(_0x1b4447){this['fetch']=_0x1b4447;}['add'](_0x2bb44d,_0x546294,_0x461737){return __awaiter$2(this,void 0,void 0,function*(){const _0xa5b684='List',_0x299626={'account_name':_0x2bb44d,'list_name':_0x546294};try{const _0xa074ae=yield this['fetch']['post'](_0xa5b684,_0x461737,_0x299626);if(_0xa074ae['status']>0xc7&&_0xa074ae['status']<0x12c){const _0xd32ffe=yield _0xa074ae['json']();return new SuccessfulAccountResponse(_0xd32ffe);}const _0x2ea622=yield _0xa074ae['json']();return new FailedAccountResponse(_0x2ea622);}catch(_0x584934){if(_0x584934 instanceof Error)return new FailedAccountResponse({'detail':_0x584934['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x584934;}});}['remove'](_0x244654,_0xf7bbc1,_0x5bcb72){return __awaiter$2(this,void 0,void 0,function*(){const _0x4aa5f7='List/'+_0x244654+'/'+_0xf7bbc1,_0x5bcc7b=yield this['fetch']['delete'](_0x4aa5f7,_0x5bcb72);try{if(_0x5bcc7b['status']>0xc7&&_0x5bcc7b['status']<0x12c){const _0x355b61=yield _0x5bcc7b['json']();return new SuccessfulAccountResponse(_0x355b61);}const _0x30eb7f=yield _0x5bcc7b['json']();return new FailedAccountResponse(_0x30eb7f);}catch(_0x1f7a31){if(_0x1f7a31 instanceof Error)return new FailedAccountResponse({'detail':_0x1f7a31['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x1f7a31;}});}}
10
+
11
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x5cce3a,_0x471e96,_0x51ab35,_0x488726){function _0x349cdb(_0x512f76){return _0x512f76 instanceof _0x51ab35?_0x512f76:new _0x51ab35(function(_0x4752ec){_0x4752ec(_0x512f76);});}return new(_0x51ab35||(_0x51ab35=Promise))(function(_0x46623c,_0x3845ca){function _0x379db1(_0x4c5992){try{_0x46f509(_0x488726['next'](_0x4c5992));}catch(_0x1e8aae){_0x3845ca(_0x1e8aae);}}function _0x3c157d(_0x153929){try{_0x46f509(_0x488726['throw'](_0x153929));}catch(_0x159cd1){_0x3845ca(_0x159cd1);}}function _0x46f509(_0x25017c){_0x25017c['done']?_0x46623c(_0x25017c['value']):_0x349cdb(_0x25017c['value'])['then'](_0x379db1,_0x3c157d);}_0x46f509((_0x488726=_0x488726['apply'](_0x5cce3a,_0x471e96||[]))['next']());});};class Fetch{constructor(_0x48cf35){this['baseUri']=_0x48cf35,this['getUrl']=_0x2e27f9=>{return _0x2e27f9['startsWith']('/')&&(_0x2e27f9=_0x2e27f9['replace']('/','')),''+this['baseUri']+_0x2e27f9;},!_0x48cf35['endsWith']('/')&&(_0x48cf35=_0x48cf35+'/');}['get'](_0x5e3020,_0x1ccf8f){return __awaiter$1(this,void 0,void 0,function*(){const _0x2ce524=this['getUrl'](_0x5e3020);return yield fetch(_0x2ce524,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1ccf8f}});});}['post'](_0x129067,_0x50dd0c,_0x1ce492){return __awaiter$1(this,void 0,void 0,function*(){const _0x3efc81=this['getUrl'](_0x129067);return yield fetch(_0x3efc81,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x50dd0c},'body':_0x1ce492?JSON['stringify'](_0x1ce492):null});});}['put'](_0x1d21fb,_0x37d94e,_0x4d7e0f){return __awaiter$1(this,void 0,void 0,function*(){const _0x29e41d=this['getUrl'](_0x1d21fb);return yield fetch(_0x29e41d,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x37d94e},'body':_0x4d7e0f?JSON['stringify'](_0x4d7e0f):null});});}['delete'](_0x35b1c5,_0x73c78e){return __awaiter$1(this,void 0,void 0,function*(){const _0x486371=this['getUrl'](_0x35b1c5);return yield fetch(_0x486371,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x73c78e}});});}}
12
+
13
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x1087ac,_0x592444,_0x869b98,_0x1c708b){function _0x164bed(_0x2c812e){return _0x2c812e instanceof _0x869b98?_0x2c812e:new _0x869b98(function(_0x3976c4){_0x3976c4(_0x2c812e);});}return new(_0x869b98||(_0x869b98=Promise))(function(_0x49d719,_0x332193){function _0x500ea4(_0x3675e0){try{_0x2b3a9c(_0x1c708b['next'](_0x3675e0));}catch(_0x4962f8){_0x332193(_0x4962f8);}}function _0x177d88(_0x1fd817){try{_0x2b3a9c(_0x1c708b['throw'](_0x1fd817));}catch(_0x2f2cfd){_0x332193(_0x2f2cfd);}}function _0x2b3a9c(_0x2b207b){_0x2b207b['done']?_0x49d719(_0x2b207b['value']):_0x164bed(_0x2b207b['value'])['then'](_0x500ea4,_0x177d88);}_0x2b3a9c((_0x1c708b=_0x1c708b['apply'](_0x1087ac,_0x592444||[]))['next']());});};class AdminClient{constructor(_0x671dc9='https://admin.searchability.dev/'){var _0x3d4602=new Fetch(_0x671dc9);this['Accounts']=new AccountService(_0x3d4602),this['Lists']=new ListService(_0x3d4602),this['ApiKeys']=new ApiKeyService(_0x3d4602);}}class AuthClient{constructor(_0x4e121a='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x4e121a);}['login'](_0x49d261){return __awaiter(this,void 0,void 0,function*(){var _0x4aca23='login/'+_0x49d261;try{const _0x435990=yield yield fetch(_0x4aca23);if(_0x435990['status']>0xc7&&_0x435990['status']<0x12c){const _0x2ee1c2=yield _0x435990['json']();return new SuccessfulAuthResponse(_0x2ee1c2);}const _0x3a4c1f=yield _0x435990['json']();return new FailedAuthResponse(_0x3a4c1f);}catch(_0xdfac83){if(_0xdfac83 instanceof Error)return new FailedAuthResponse({'detail':_0xdfac83['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0xdfac83;}});}['refresh'](_0xabba94){return __awaiter(this,void 0,void 0,function*(){var _0x5adb0f='refresh';try{const _0x12e09b=yield this['fetch']['post'](_0x5adb0f,_0xabba94,null);if(_0x12e09b['status']>0xc7&&_0x12e09b['status']<0x12c){const _0x5b9eee=yield _0x12e09b['json']();return new SuccessfulAuthResponse(_0x5b9eee);}const _0x218a4e=yield _0x12e09b['json']();return new FailedAuthResponse(_0x218a4e);}catch(_0x2ead5f){if(_0x2ead5f instanceof Error)return new FailedAuthResponse({'detail':_0x2ead5f['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x2ead5f;}});}}
14
+
15
+ export { AdminClient, AuthClient };
@@ -1,18 +1,18 @@
1
1
  'use strict';
2
2
 
3
- class Response{constructor(_0x38b363){this['isSuccess']=_0x38b363;}}class SuccessfulAccountResponse extends Response{constructor(_0x1e2022){super(!![]),this['account']=_0x1e2022;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x251b92){super(![]),this['problem']=_0x251b92;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x43f0e3){super(!![]),this['tokens']=_0x43f0e3;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x18ba77){super(![]),this['problem']=_0x18ba77;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x4c702e){super(!![]),this['apiKey']=_0x4c702e;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0xc76817){super(![]),this['problem']=_0xc76817;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
3
+ undefined&&undefined['__awaiter']||function(_0x5a3a39,_0x4b2db0,_0x124244,_0x1bf66b){function _0x4f5cb4(_0x2ad17){return _0x2ad17 instanceof _0x124244?_0x2ad17:new _0x124244(function(_0x5804e8){_0x5804e8(_0x2ad17);});}return new(_0x124244||(_0x124244=Promise))(function(_0x48d0e7,_0x2bfe18){function _0x8fe6e2(_0x416f54){try{_0x2c9684(_0x1bf66b['next'](_0x416f54));}catch(_0x22a44b){_0x2bfe18(_0x22a44b);}}function _0x19c1bb(_0x321a05){try{_0x2c9684(_0x1bf66b['throw'](_0x321a05));}catch(_0x4f2b53){_0x2bfe18(_0x4f2b53);}}function _0x2c9684(_0x2e8b8a){_0x2e8b8a['done']?_0x48d0e7(_0x2e8b8a['value']):_0x4f5cb4(_0x2e8b8a['value'])['then'](_0x8fe6e2,_0x19c1bb);}_0x2c9684((_0x1bf66b=_0x1bf66b['apply'](_0x5a3a39,_0x4b2db0||[]))['next']());});};
4
4
 
5
- var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x546a18,_0x5177f8,_0x55b640,_0xda713a){function _0x128253(_0x284af3){return _0x284af3 instanceof _0x55b640?_0x284af3:new _0x55b640(function(_0x8616b8){_0x8616b8(_0x284af3);});}return new(_0x55b640||(_0x55b640=Promise))(function(_0x204a87,_0x2fe2fe){function _0x49a779(_0x4e1194){try{_0x43dfe3(_0xda713a['next'](_0x4e1194));}catch(_0x32253f){_0x2fe2fe(_0x32253f);}}function _0x29458c(_0x338281){try{_0x43dfe3(_0xda713a['throw'](_0x338281));}catch(_0x261c84){_0x2fe2fe(_0x261c84);}}function _0x43dfe3(_0x3e7d39){_0x3e7d39['done']?_0x204a87(_0x3e7d39['value']):_0x128253(_0x3e7d39['value'])['then'](_0x49a779,_0x29458c);}_0x43dfe3((_0xda713a=_0xda713a['apply'](_0x546a18,_0x5177f8||[]))['next']());});};class AccountService{constructor(_0x332d06,_0x3ac89b){this['tokenManager']=_0x332d06,this['fetch']=_0x3ac89b;}['get'](_0xb76a85,_0x1788c7){return __awaiter$5(this,void 0,void 0,function*(){const _0x103926=yield this['tokenManager']['getOrRefreshTokens'](_0x1788c7);if(!_0x103926['isSuccess'])return new FailedAccountResponse(_0x103926['toProblem']());_0x1788c7=_0x103926['toSuccess']();const _0x31c98d='Account/'+_0xb76a85+'/',_0x57ff24=yield this['fetch']['get'](_0x31c98d,_0x1788c7['access_token']);try{if(_0x57ff24['status']>0xc7&&_0x57ff24['status']<0x12c){const _0x52219e=yield _0x57ff24['json']();return new SuccessfulAccountResponse(_0x52219e);}const _0x204550=yield _0x57ff24['json']();return new FailedAccountResponse(_0x204550);}catch(_0x33a77d){if(_0x33a77d instanceof Error)return new FailedAccountResponse({'detail':_0x33a77d['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x33a77d;}});}}
5
+ class Response{constructor(_0x6261e8){this['isSuccess']=_0x6261e8;}}class SuccessfulAccountResponse extends Response{constructor(_0x39d384){super(!![]),this['account']=_0x39d384;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x1b3eaa){super(![]),this['problem']=_0x1b3eaa;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x2810a1){super(!![]),this['tokens']=_0x2810a1;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x4cafbb){super(![]),this['problem']=_0x4cafbb;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x34d443){super(!![]),this['apiKeys']=_0x34d443;}['toSuccess'](){return this['apiKeys'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x4c81f7){super(![]),this['problem']=_0x4c81f7;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
6
6
 
7
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x5a2ef7,_0x42993f,_0x515964,_0x327be5){function _0x157a93(_0x852cdf){return _0x852cdf instanceof _0x515964?_0x852cdf:new _0x515964(function(_0x21ad9f){_0x21ad9f(_0x852cdf);});}return new(_0x515964||(_0x515964=Promise))(function(_0xff9a69,_0x4d2f8e){function _0xfac469(_0x3f7802){try{_0x255c65(_0x327be5['next'](_0x3f7802));}catch(_0x4a5a1f){_0x4d2f8e(_0x4a5a1f);}}function _0xd891a5(_0x3ecc25){try{_0x255c65(_0x327be5['throw'](_0x3ecc25));}catch(_0x2006ba){_0x4d2f8e(_0x2006ba);}}function _0x255c65(_0x208a22){_0x208a22['done']?_0xff9a69(_0x208a22['value']):_0x157a93(_0x208a22['value'])['then'](_0xfac469,_0xd891a5);}_0x255c65((_0x327be5=_0x327be5['apply'](_0x5a2ef7,_0x42993f||[]))['next']());});};class ApiKeyService{constructor(_0x54f02f,_0x3708ae){this['tokenManager']=_0x54f02f,this['fetch']=_0x3708ae;}['create'](_0x8eb53c,_0x516433,_0x90d2e6){return __awaiter$4(this,void 0,void 0,function*(){const _0x4b021e=yield this['tokenManager']['getOrRefreshTokens'](_0x90d2e6);if(!_0x4b021e['isSuccess'])return new FailedApiKeyResponse(_0x4b021e['toProblem']());_0x90d2e6=_0x4b021e['toSuccess']();const _0x58f1a9='ApiKey/Create',_0x18ee73={'account_name':_0x8eb53c,'name':_0x516433};try{const _0x4fc899=yield this['fetch']['post'](_0x58f1a9,_0x90d2e6['access_token'],_0x18ee73);if(_0x4fc899['status']>0xc7&&_0x4fc899['status']<0x12c){const _0x3e7cb7=yield _0x4fc899['json']();return new SuccessfulApiKeyResponse(_0x3e7cb7);}const _0x37243d=yield _0x4fc899['json']();return new FailedApiKeyResponse(_0x37243d);}catch(_0x1c0c13){if(_0x1c0c13 instanceof Error)return new FailedApiKeyResponse({'detail':_0x1c0c13['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x1c0c13;}});}}
7
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x638aa9,_0x5bee76,_0x49b5ca,_0x24c39b){function _0x1fe46f(_0x24a58c){return _0x24a58c instanceof _0x49b5ca?_0x24a58c:new _0x49b5ca(function(_0x164e7b){_0x164e7b(_0x24a58c);});}return new(_0x49b5ca||(_0x49b5ca=Promise))(function(_0x6f5cf5,_0x4f2398){function _0x46519b(_0xd12512){try{_0x3ce84e(_0x24c39b['next'](_0xd12512));}catch(_0x1cdfec){_0x4f2398(_0x1cdfec);}}function _0x69bde(_0x9f315){try{_0x3ce84e(_0x24c39b['throw'](_0x9f315));}catch(_0x1a2ef4){_0x4f2398(_0x1a2ef4);}}function _0x3ce84e(_0x5a407e){_0x5a407e['done']?_0x6f5cf5(_0x5a407e['value']):_0x1fe46f(_0x5a407e['value'])['then'](_0x46519b,_0x69bde);}_0x3ce84e((_0x24c39b=_0x24c39b['apply'](_0x638aa9,_0x5bee76||[]))['next']());});};class AccountService{constructor(_0x1477d2){this['fetch']=_0x1477d2;}['get'](_0x452bfa,_0x43a4e0){return __awaiter$4(this,void 0,void 0,function*(){const _0x459b6b='Account/'+_0x452bfa+'/',_0x123515=yield this['fetch']['get'](_0x459b6b,_0x43a4e0);try{if(_0x123515['status']>0xc7&&_0x123515['status']<0x12c){const _0x2ada05=yield _0x123515['json']();return new SuccessfulAccountResponse(_0x2ada05);}const _0x26eac9=yield _0x123515['json']();return new FailedAccountResponse(_0x26eac9);}catch(_0x5c9b1d){if(_0x5c9b1d instanceof Error)return new FailedAccountResponse({'detail':_0x5c9b1d['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x5c9b1d;}});}}
8
8
 
9
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x37e316,_0x485674,_0x4daac7,_0x216eea){function _0x24f6f0(_0x4c60a2){return _0x4c60a2 instanceof _0x4daac7?_0x4c60a2:new _0x4daac7(function(_0x36cdac){_0x36cdac(_0x4c60a2);});}return new(_0x4daac7||(_0x4daac7=Promise))(function(_0x2796d7,_0x232896){function _0x1a7be8(_0xbef472){try{_0x3ebb29(_0x216eea['next'](_0xbef472));}catch(_0x235631){_0x232896(_0x235631);}}function _0x1b6a46(_0xbeac9e){try{_0x3ebb29(_0x216eea['throw'](_0xbeac9e));}catch(_0x4e3dda){_0x232896(_0x4e3dda);}}function _0x3ebb29(_0x57a2cd){_0x57a2cd['done']?_0x2796d7(_0x57a2cd['value']):_0x24f6f0(_0x57a2cd['value'])['then'](_0x1a7be8,_0x1b6a46);}_0x3ebb29((_0x216eea=_0x216eea['apply'](_0x37e316,_0x485674||[]))['next']());});};class ListService{constructor(_0xd3ba48,_0x4e5a5f){this['tokenManager']=_0xd3ba48,this['fetch']=_0x4e5a5f;}['add'](_0x3dcff5,_0x12023c,_0x49abf0){return __awaiter$3(this,void 0,void 0,function*(){const _0x48b269=yield this['tokenManager']['getOrRefreshTokens'](_0x49abf0);if(!_0x48b269['isSuccess'])return new FailedAccountResponse(_0x48b269['toProblem']());_0x49abf0=_0x48b269['toSuccess']();const _0x26c3ab='List',_0x43ef7a={'account_name':_0x3dcff5,'list_name':_0x12023c};try{const _0x42ed98=yield this['fetch']['post'](_0x26c3ab,_0x49abf0['access_token'],_0x43ef7a);if(_0x42ed98['status']>0xc7&&_0x42ed98['status']<0x12c){const _0x1a6fdc=yield _0x42ed98['json']();return new SuccessfulAccountResponse(_0x1a6fdc);}const _0x4f08ca=yield _0x42ed98['json']();return new FailedAccountResponse(_0x4f08ca);}catch(_0x26ffd6){if(_0x26ffd6 instanceof Error)return new FailedAccountResponse({'detail':_0x26ffd6['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x26ffd6;}});}['remove'](_0xd1bfde,_0x5839da,_0x291f60){return __awaiter$3(this,void 0,void 0,function*(){const _0x1a5f9a=yield this['tokenManager']['getOrRefreshTokens'](_0x291f60);if(!_0x1a5f9a['isSuccess'])return new FailedAccountResponse(_0x1a5f9a['toProblem']());_0x291f60=_0x1a5f9a['toSuccess']();const _0x54e195='List/'+_0xd1bfde+'/'+_0x5839da,_0x305844=yield this['fetch']['delete'](_0x54e195,_0x291f60['access_token']);try{if(_0x305844['status']>0xc7&&_0x305844['status']<0x12c){const _0x38ab80=yield _0x305844['json']();return new SuccessfulAccountResponse(_0x38ab80);}const _0x57bde1=yield _0x305844['json']();return new FailedAccountResponse(_0x57bde1);}catch(_0x51989c){if(_0x51989c instanceof Error)return new FailedAccountResponse({'detail':_0x51989c['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x51989c;}});}}
9
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x297eab,_0x1ea1bc,_0x114ff4,_0x4ad39d){function _0x59d6e4(_0x86e2aa){return _0x86e2aa instanceof _0x114ff4?_0x86e2aa:new _0x114ff4(function(_0x1a6119){_0x1a6119(_0x86e2aa);});}return new(_0x114ff4||(_0x114ff4=Promise))(function(_0x5124e0,_0x39ab71){function _0x22e634(_0x598f7f){try{_0x26a4c3(_0x4ad39d['next'](_0x598f7f));}catch(_0x417eb0){_0x39ab71(_0x417eb0);}}function _0x32f4ef(_0x59222d){try{_0x26a4c3(_0x4ad39d['throw'](_0x59222d));}catch(_0x2af4c){_0x39ab71(_0x2af4c);}}function _0x26a4c3(_0x563776){_0x563776['done']?_0x5124e0(_0x563776['value']):_0x59d6e4(_0x563776['value'])['then'](_0x22e634,_0x32f4ef);}_0x26a4c3((_0x4ad39d=_0x4ad39d['apply'](_0x297eab,_0x1ea1bc||[]))['next']());});};class ApiKeyService{constructor(_0x6115e0){this['fetch']=_0x6115e0;}['create'](_0x3350ad,_0x48682a,_0x2ef38b){return __awaiter$3(this,void 0,void 0,function*(){const _0x52cbf4='ApiKey/Create',_0x562165={'account_name':_0x3350ad,'name':_0x48682a};try{const _0x29de61=yield this['fetch']['post'](_0x52cbf4,_0x2ef38b,_0x562165);if(_0x29de61['status']>0xc7&&_0x29de61['status']<0x12c){const _0x2fd35f=yield _0x29de61['json']();return new SuccessfulApiKeyResponse(_0x2fd35f);}const _0x321782=yield _0x29de61['json']();return new FailedApiKeyResponse(_0x321782);}catch(_0x5c263a){if(_0x5c263a instanceof Error)return new FailedApiKeyResponse({'detail':_0x5c263a['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x5c263a;}});}}
10
10
 
11
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x26f8bf,_0x5f026a,_0x17e3b6,_0x159837){function _0x44f2e6(_0x59cef7){return _0x59cef7 instanceof _0x17e3b6?_0x59cef7:new _0x17e3b6(function(_0x26a930){_0x26a930(_0x59cef7);});}return new(_0x17e3b6||(_0x17e3b6=Promise))(function(_0x59f89c,_0x37d85a){function _0x538630(_0x478fbe){try{_0x365bcc(_0x159837['next'](_0x478fbe));}catch(_0x2967c0){_0x37d85a(_0x2967c0);}}function _0x1844b2(_0x2e2136){try{_0x365bcc(_0x159837['throw'](_0x2e2136));}catch(_0x50708a){_0x37d85a(_0x50708a);}}function _0x365bcc(_0x3db4e9){_0x3db4e9['done']?_0x59f89c(_0x3db4e9['value']):_0x44f2e6(_0x3db4e9['value'])['then'](_0x538630,_0x1844b2);}_0x365bcc((_0x159837=_0x159837['apply'](_0x26f8bf,_0x5f026a||[]))['next']());});};class TokenManager{constructor(_0x1cef81){this['authClient']=_0x1cef81;}['getOrRefreshTokens'](_0xfd10f8){return __awaiter$2(this,void 0,void 0,function*(){if(Date['now']()<_0xfd10f8['access_expires'])return new SuccessfulAuthResponse(_0xfd10f8);if(Date['now']()>_0xfd10f8['refresh_expires'])return yield this['authClient']['refresh'](_0xfd10f8['refresh_token']);return new FailedAuthResponse({'detail':'Refresh\x20token\x20expired','title':'','status':0x194,'instance':'','type':''});});}}
11
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x3d9183,_0x3c1184,_0x108637,_0x2ffffe){function _0x4e2d48(_0xe7ac56){return _0xe7ac56 instanceof _0x108637?_0xe7ac56:new _0x108637(function(_0xd6db18){_0xd6db18(_0xe7ac56);});}return new(_0x108637||(_0x108637=Promise))(function(_0x17a555,_0x1c7ba7){function _0xcbfde6(_0x3eb90c){try{_0x1bcb35(_0x2ffffe['next'](_0x3eb90c));}catch(_0x1ad236){_0x1c7ba7(_0x1ad236);}}function _0x5ee071(_0x47284a){try{_0x1bcb35(_0x2ffffe['throw'](_0x47284a));}catch(_0x253d38){_0x1c7ba7(_0x253d38);}}function _0x1bcb35(_0x137445){_0x137445['done']?_0x17a555(_0x137445['value']):_0x4e2d48(_0x137445['value'])['then'](_0xcbfde6,_0x5ee071);}_0x1bcb35((_0x2ffffe=_0x2ffffe['apply'](_0x3d9183,_0x3c1184||[]))['next']());});};class ListService{constructor(_0x405058){this['fetch']=_0x405058;}['add'](_0xd35366,_0x13f56b,_0x2991bf){return __awaiter$2(this,void 0,void 0,function*(){const _0x370fbb='List',_0x40ea26={'account_name':_0xd35366,'list_name':_0x13f56b};try{const _0x576b49=yield this['fetch']['post'](_0x370fbb,_0x2991bf,_0x40ea26);if(_0x576b49['status']>0xc7&&_0x576b49['status']<0x12c){const _0x50f4c3=yield _0x576b49['json']();return new SuccessfulAccountResponse(_0x50f4c3);}const _0x5e27b1=yield _0x576b49['json']();return new FailedAccountResponse(_0x5e27b1);}catch(_0x4890e2){if(_0x4890e2 instanceof Error)return new FailedAccountResponse({'detail':_0x4890e2['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x4890e2;}});}['remove'](_0x5159b2,_0x1284ca,_0x1fa661){return __awaiter$2(this,void 0,void 0,function*(){const _0x1fbb63='List/'+_0x5159b2+'/'+_0x1284ca,_0x544dc4=yield this['fetch']['delete'](_0x1fbb63,_0x1fa661);try{if(_0x544dc4['status']>0xc7&&_0x544dc4['status']<0x12c){const _0x27310a=yield _0x544dc4['json']();return new SuccessfulAccountResponse(_0x27310a);}const _0x347eff=yield _0x544dc4['json']();return new FailedAccountResponse(_0x347eff);}catch(_0x54849a){if(_0x54849a instanceof Error)return new FailedAccountResponse({'detail':_0x54849a['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x54849a;}});}}
12
12
 
13
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x317cd4,_0x1d69d1,_0xa4320b,_0x2dee01){function _0x14f2fd(_0x3537f4){return _0x3537f4 instanceof _0xa4320b?_0x3537f4:new _0xa4320b(function(_0x1ac99e){_0x1ac99e(_0x3537f4);});}return new(_0xa4320b||(_0xa4320b=Promise))(function(_0x4333a0,_0x526aea){function _0x47fa2e(_0x315e9c){try{_0x3ec2c8(_0x2dee01['next'](_0x315e9c));}catch(_0x877169){_0x526aea(_0x877169);}}function _0xda02fe(_0x26758a){try{_0x3ec2c8(_0x2dee01['throw'](_0x26758a));}catch(_0x23dae7){_0x526aea(_0x23dae7);}}function _0x3ec2c8(_0x57fe0a){_0x57fe0a['done']?_0x4333a0(_0x57fe0a['value']):_0x14f2fd(_0x57fe0a['value'])['then'](_0x47fa2e,_0xda02fe);}_0x3ec2c8((_0x2dee01=_0x2dee01['apply'](_0x317cd4,_0x1d69d1||[]))['next']());});};class Fetch{constructor(_0x24b856){this['baseUri']=_0x24b856,this['getUrl']=_0x52a396=>{return _0x52a396['startsWith']('/')&&(_0x52a396=_0x52a396['replace']('/','')),''+this['baseUri']+_0x52a396;},!_0x24b856['endsWith']('/')&&(_0x24b856=_0x24b856+'/');}['get'](_0x3b0e12,_0x3741cb){return __awaiter$1(this,void 0,void 0,function*(){const _0x3befb9=this['getUrl'](_0x3b0e12);return yield fetch(_0x3befb9,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3741cb}});});}['post'](_0x10d563,_0x43d036,_0x1448e2){return __awaiter$1(this,void 0,void 0,function*(){const _0x4c966d=this['getUrl'](_0x10d563);return yield fetch(_0x4c966d,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x43d036},'body':_0x1448e2?JSON['stringify'](_0x1448e2):null});});}['put'](_0x16ca31,_0x89edb6,_0x18a60f){return __awaiter$1(this,void 0,void 0,function*(){const _0x5cc380=this['getUrl'](_0x16ca31);return yield fetch(_0x5cc380,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x89edb6},'body':_0x18a60f?JSON['stringify'](_0x18a60f):null});});}['delete'](_0x10ad0c,_0xcf6845){return __awaiter$1(this,void 0,void 0,function*(){const _0x2919ca=this['getUrl'](_0x10ad0c);return yield fetch(_0x2919ca,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0xcf6845}});});}}
13
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x38d705,_0x28c9db,_0x45b149,_0x415d26){function _0x3595b3(_0x345d0d){return _0x345d0d instanceof _0x45b149?_0x345d0d:new _0x45b149(function(_0x5731c4){_0x5731c4(_0x345d0d);});}return new(_0x45b149||(_0x45b149=Promise))(function(_0x4df549,_0x2fb9eb){function _0x1cb0b4(_0x4eda17){try{_0x409df3(_0x415d26['next'](_0x4eda17));}catch(_0x2a98fb){_0x2fb9eb(_0x2a98fb);}}function _0x517736(_0x79f4c6){try{_0x409df3(_0x415d26['throw'](_0x79f4c6));}catch(_0x42561a){_0x2fb9eb(_0x42561a);}}function _0x409df3(_0x352f01){_0x352f01['done']?_0x4df549(_0x352f01['value']):_0x3595b3(_0x352f01['value'])['then'](_0x1cb0b4,_0x517736);}_0x409df3((_0x415d26=_0x415d26['apply'](_0x38d705,_0x28c9db||[]))['next']());});};class Fetch{constructor(_0x334189){this['baseUri']=_0x334189,this['getUrl']=_0x3607ed=>{return _0x3607ed['startsWith']('/')&&(_0x3607ed=_0x3607ed['replace']('/','')),''+this['baseUri']+_0x3607ed;},!_0x334189['endsWith']('/')&&(_0x334189=_0x334189+'/');}['get'](_0x445f7d,_0x333780){return __awaiter$1(this,void 0,void 0,function*(){const _0x54967c=this['getUrl'](_0x445f7d);return yield fetch(_0x54967c,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x333780}});});}['post'](_0x4bc071,_0xe27281,_0x1ae075){return __awaiter$1(this,void 0,void 0,function*(){const _0x57075a=this['getUrl'](_0x4bc071);return yield fetch(_0x57075a,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0xe27281},'body':_0x1ae075?JSON['stringify'](_0x1ae075):null});});}['put'](_0x4cde64,_0x17dbe0,_0x11ca4a){return __awaiter$1(this,void 0,void 0,function*(){const _0x14e033=this['getUrl'](_0x4cde64);return yield fetch(_0x14e033,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x17dbe0},'body':_0x11ca4a?JSON['stringify'](_0x11ca4a):null});});}['delete'](_0x47b0ca,_0x57e746){return __awaiter$1(this,void 0,void 0,function*(){const _0x18ad7e=this['getUrl'](_0x47b0ca);return yield fetch(_0x18ad7e,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x57e746}});});}}
14
14
 
15
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x5d7041,_0x512ce8,_0x4f3057,_0x15bebd){function _0x5c3121(_0x2b8f4d){return _0x2b8f4d instanceof _0x4f3057?_0x2b8f4d:new _0x4f3057(function(_0x4a4d22){_0x4a4d22(_0x2b8f4d);});}return new(_0x4f3057||(_0x4f3057=Promise))(function(_0x1f494b,_0x45e085){function _0x9c0622(_0x35778a){try{_0x1493a5(_0x15bebd['next'](_0x35778a));}catch(_0xa2935a){_0x45e085(_0xa2935a);}}function _0xca4cb2(_0x183f10){try{_0x1493a5(_0x15bebd['throw'](_0x183f10));}catch(_0x4cbf54){_0x45e085(_0x4cbf54);}}function _0x1493a5(_0x3480ef){_0x3480ef['done']?_0x1f494b(_0x3480ef['value']):_0x5c3121(_0x3480ef['value'])['then'](_0x9c0622,_0xca4cb2);}_0x1493a5((_0x15bebd=_0x15bebd['apply'](_0x5d7041,_0x512ce8||[]))['next']());});};class AdminClient{constructor(_0x1a0148,_0x4bd995='https://admin.searchability.dev/'){var _0x2e3e9b=new TokenManager(_0x1a0148),_0x18fd58=new Fetch(_0x4bd995);this['Accounts']=new AccountService(_0x2e3e9b,_0x18fd58),this['Lists']=new ListService(_0x2e3e9b,_0x18fd58),this['ApiKeys']=new ApiKeyService(_0x2e3e9b,_0x18fd58);}}class AuthClient{constructor(_0x393eca='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x393eca);}['login'](_0x50c04d){return __awaiter(this,void 0,void 0,function*(){var _0xf6f724='login/'+_0x50c04d;try{const _0x406863=yield yield fetch(_0xf6f724);if(_0x406863['status']>0xc7&&_0x406863['status']<0x12c){const _0x3f617c=yield _0x406863['json']();return new SuccessfulAuthResponse(_0x3f617c);}const _0x52dd25=yield _0x406863['json']();return new FailedAuthResponse(_0x52dd25);}catch(_0x56b8fd){if(_0x56b8fd instanceof Error)return new FailedAuthResponse({'detail':_0x56b8fd['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x56b8fd;}});}['refresh'](_0x342858){return __awaiter(this,void 0,void 0,function*(){var _0x553b1a='refresh';try{const _0x11fd32=yield this['fetch']['post'](_0x553b1a,_0x342858,null);if(_0x11fd32['status']>0xc7&&_0x11fd32['status']<0x12c){const _0x1a96e8=yield _0x11fd32['json']();return new SuccessfulAuthResponse(_0x1a96e8);}const _0x58e956=yield _0x11fd32['json']();return new FailedAuthResponse(_0x58e956);}catch(_0x50c857){if(_0x50c857 instanceof Error)return new FailedAuthResponse({'detail':_0x50c857['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x50c857;}});}}
15
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x5ae4e8,_0x48869d,_0x517c83,_0x366159){function _0x261e4b(_0x3556e1){return _0x3556e1 instanceof _0x517c83?_0x3556e1:new _0x517c83(function(_0x38ef69){_0x38ef69(_0x3556e1);});}return new(_0x517c83||(_0x517c83=Promise))(function(_0x3411ca,_0xa25297){function _0xa8f513(_0x5c8a0b){try{_0x27bc60(_0x366159['next'](_0x5c8a0b));}catch(_0x2fa74a){_0xa25297(_0x2fa74a);}}function _0x5ac595(_0x2cc04f){try{_0x27bc60(_0x366159['throw'](_0x2cc04f));}catch(_0x2c9130){_0xa25297(_0x2c9130);}}function _0x27bc60(_0x33625d){_0x33625d['done']?_0x3411ca(_0x33625d['value']):_0x261e4b(_0x33625d['value'])['then'](_0xa8f513,_0x5ac595);}_0x27bc60((_0x366159=_0x366159['apply'](_0x5ae4e8,_0x48869d||[]))['next']());});};class AdminClient{constructor(_0x58c4eb='https://admin.searchability.dev/'){var _0x3d5929=new Fetch(_0x58c4eb);this['Accounts']=new AccountService(_0x3d5929),this['Lists']=new ListService(_0x3d5929),this['ApiKeys']=new ApiKeyService(_0x3d5929);}}class AuthClient{constructor(_0x58438c='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x58438c);}['login'](_0x39164a){return __awaiter(this,void 0,void 0,function*(){var _0x4728a3='login/'+_0x39164a;try{const _0x13f038=yield yield fetch(_0x4728a3);if(_0x13f038['status']>0xc7&&_0x13f038['status']<0x12c){const _0x303c46=yield _0x13f038['json']();return new SuccessfulAuthResponse(_0x303c46);}const _0x51d2b7=yield _0x13f038['json']();return new FailedAuthResponse(_0x51d2b7);}catch(_0x3e1c41){if(_0x3e1c41 instanceof Error)return new FailedAuthResponse({'detail':_0x3e1c41['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x3e1c41;}});}['refresh'](_0x121fa5){return __awaiter(this,void 0,void 0,function*(){var _0x1d99a2='refresh';try{const _0x529646=yield this['fetch']['post'](_0x1d99a2,_0x121fa5,null);if(_0x529646['status']>0xc7&&_0x529646['status']<0x12c){const _0xaae093=yield _0x529646['json']();return new SuccessfulAuthResponse(_0xaae093);}const _0x4e55c1=yield _0x529646['json']();return new FailedAuthResponse(_0x4e55c1);}catch(_0x167d20){if(_0x167d20 instanceof Error)return new FailedAuthResponse({'detail':_0x167d20['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x167d20;}});}}
16
16
 
17
17
  exports.AdminClient = AdminClient;
18
18
  exports.AuthClient = AuthClient;
@@ -1,15 +1,15 @@
1
- class Response{constructor(_0x12ca97){this['isSuccess']=_0x12ca97;}}class SuccessfulAccountResponse extends Response{constructor(_0x43f58b){super(!![]),this['account']=_0x43f58b;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x3c5a59){super(![]),this['problem']=_0x3c5a59;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0xc38ad4){super(!![]),this['tokens']=_0xc38ad4;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x3a6f67){super(![]),this['problem']=_0x3a6f67;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x55849e){super(!![]),this['apiKey']=_0x55849e;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x15f79e){super(![]),this['problem']=_0x15f79e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
1
+ undefined&&undefined['__awaiter']||function(_0x25163a,_0x2cd093,_0x56c610,_0x437d07){function _0x35ad0f(_0x252ce7){return _0x252ce7 instanceof _0x56c610?_0x252ce7:new _0x56c610(function(_0xed7672){_0xed7672(_0x252ce7);});}return new(_0x56c610||(_0x56c610=Promise))(function(_0x3b3252,_0x42694f){function _0x245882(_0x1d71bd){try{_0x595711(_0x437d07['next'](_0x1d71bd));}catch(_0x406e25){_0x42694f(_0x406e25);}}function _0x329afd(_0x5e2dff){try{_0x595711(_0x437d07['throw'](_0x5e2dff));}catch(_0xb3dc33){_0x42694f(_0xb3dc33);}}function _0x595711(_0x596ffe){_0x596ffe['done']?_0x3b3252(_0x596ffe['value']):_0x35ad0f(_0x596ffe['value'])['then'](_0x245882,_0x329afd);}_0x595711((_0x437d07=_0x437d07['apply'](_0x25163a,_0x2cd093||[]))['next']());});};
2
2
 
3
- var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x2495f4,_0x17ad38,_0x33c58c,_0x45739c){function _0x300fef(_0xc6b1dd){return _0xc6b1dd instanceof _0x33c58c?_0xc6b1dd:new _0x33c58c(function(_0x2ce4af){_0x2ce4af(_0xc6b1dd);});}return new(_0x33c58c||(_0x33c58c=Promise))(function(_0x163f89,_0x1a6d89){function _0xe68cfa(_0x52e86d){try{_0x165375(_0x45739c['next'](_0x52e86d));}catch(_0x2792e8){_0x1a6d89(_0x2792e8);}}function _0x3bd242(_0x483195){try{_0x165375(_0x45739c['throw'](_0x483195));}catch(_0x7db3af){_0x1a6d89(_0x7db3af);}}function _0x165375(_0x37f400){_0x37f400['done']?_0x163f89(_0x37f400['value']):_0x300fef(_0x37f400['value'])['then'](_0xe68cfa,_0x3bd242);}_0x165375((_0x45739c=_0x45739c['apply'](_0x2495f4,_0x17ad38||[]))['next']());});};class AccountService{constructor(_0x338730,_0x1e4fae){this['tokenManager']=_0x338730,this['fetch']=_0x1e4fae;}['get'](_0x55d523,_0x16eab2){return __awaiter$5(this,void 0,void 0,function*(){const _0x3c4331=yield this['tokenManager']['getOrRefreshTokens'](_0x16eab2);if(!_0x3c4331['isSuccess'])return new FailedAccountResponse(_0x3c4331['toProblem']());_0x16eab2=_0x3c4331['toSuccess']();const _0x1d09e6='Account/'+_0x55d523+'/',_0x2d3ba4=yield this['fetch']['get'](_0x1d09e6,_0x16eab2['access_token']);try{if(_0x2d3ba4['status']>0xc7&&_0x2d3ba4['status']<0x12c){const _0x2d1f6a=yield _0x2d3ba4['json']();return new SuccessfulAccountResponse(_0x2d1f6a);}const _0xfb33bc=yield _0x2d3ba4['json']();return new FailedAccountResponse(_0xfb33bc);}catch(_0x54027f){if(_0x54027f instanceof Error)return new FailedAccountResponse({'detail':_0x54027f['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x54027f;}});}}
3
+ class Response{constructor(_0x3acc20){this['isSuccess']=_0x3acc20;}}class SuccessfulAccountResponse extends Response{constructor(_0x3a013b){super(!![]),this['account']=_0x3a013b;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x1a7c0a){super(![]),this['problem']=_0x1a7c0a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x1fddfe){super(!![]),this['tokens']=_0x1fddfe;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x45075a){super(![]),this['problem']=_0x45075a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x43d601){super(!![]),this['apiKeys']=_0x43d601;}['toSuccess'](){return this['apiKeys'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x2adf23){super(![]),this['problem']=_0x2adf23;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
4
4
 
5
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x904bba,_0x65e7df,_0x23433a,_0x5a89a6){function _0x3067e1(_0x4e8c90){return _0x4e8c90 instanceof _0x23433a?_0x4e8c90:new _0x23433a(function(_0x3cf911){_0x3cf911(_0x4e8c90);});}return new(_0x23433a||(_0x23433a=Promise))(function(_0x355f67,_0x1a52dd){function _0x21d28a(_0x5300e2){try{_0x15e1e2(_0x5a89a6['next'](_0x5300e2));}catch(_0x4e0da4){_0x1a52dd(_0x4e0da4);}}function _0x2a2dee(_0xee2c7a){try{_0x15e1e2(_0x5a89a6['throw'](_0xee2c7a));}catch(_0x4385ce){_0x1a52dd(_0x4385ce);}}function _0x15e1e2(_0x38d363){_0x38d363['done']?_0x355f67(_0x38d363['value']):_0x3067e1(_0x38d363['value'])['then'](_0x21d28a,_0x2a2dee);}_0x15e1e2((_0x5a89a6=_0x5a89a6['apply'](_0x904bba,_0x65e7df||[]))['next']());});};class ApiKeyService{constructor(_0x5a868d,_0x5d19c3){this['tokenManager']=_0x5a868d,this['fetch']=_0x5d19c3;}['create'](_0x4d3c56,_0x34451f,_0x1d61d9){return __awaiter$4(this,void 0,void 0,function*(){const _0x143d89=yield this['tokenManager']['getOrRefreshTokens'](_0x1d61d9);if(!_0x143d89['isSuccess'])return new FailedApiKeyResponse(_0x143d89['toProblem']());_0x1d61d9=_0x143d89['toSuccess']();const _0x313acf='ApiKey/Create',_0x24be7e={'account_name':_0x4d3c56,'name':_0x34451f};try{const _0xe7818f=yield this['fetch']['post'](_0x313acf,_0x1d61d9['access_token'],_0x24be7e);if(_0xe7818f['status']>0xc7&&_0xe7818f['status']<0x12c){const _0x550ec6=yield _0xe7818f['json']();return new SuccessfulApiKeyResponse(_0x550ec6);}const _0x548ef4=yield _0xe7818f['json']();return new FailedApiKeyResponse(_0x548ef4);}catch(_0xfa2a4d){if(_0xfa2a4d instanceof Error)return new FailedApiKeyResponse({'detail':_0xfa2a4d['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0xfa2a4d;}});}}
5
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x3c4753,_0x52680e,_0x19bd1f,_0x2dc09d){function _0x29af53(_0x4b0c76){return _0x4b0c76 instanceof _0x19bd1f?_0x4b0c76:new _0x19bd1f(function(_0xab98d2){_0xab98d2(_0x4b0c76);});}return new(_0x19bd1f||(_0x19bd1f=Promise))(function(_0x43ef76,_0x42a227){function _0x5380f3(_0x51427c){try{_0x5b3ee9(_0x2dc09d['next'](_0x51427c));}catch(_0x1d2f1c){_0x42a227(_0x1d2f1c);}}function _0x5875d7(_0x28a689){try{_0x5b3ee9(_0x2dc09d['throw'](_0x28a689));}catch(_0x33c07f){_0x42a227(_0x33c07f);}}function _0x5b3ee9(_0x27dc68){_0x27dc68['done']?_0x43ef76(_0x27dc68['value']):_0x29af53(_0x27dc68['value'])['then'](_0x5380f3,_0x5875d7);}_0x5b3ee9((_0x2dc09d=_0x2dc09d['apply'](_0x3c4753,_0x52680e||[]))['next']());});};class AccountService{constructor(_0x5736f2){this['fetch']=_0x5736f2;}['get'](_0x1e7994,_0x1523fe){return __awaiter$4(this,void 0,void 0,function*(){const _0x422eea='Account/'+_0x1e7994+'/',_0x19fb5d=yield this['fetch']['get'](_0x422eea,_0x1523fe);try{if(_0x19fb5d['status']>0xc7&&_0x19fb5d['status']<0x12c){const _0x358154=yield _0x19fb5d['json']();return new SuccessfulAccountResponse(_0x358154);}const _0x39556e=yield _0x19fb5d['json']();return new FailedAccountResponse(_0x39556e);}catch(_0x32c4c8){if(_0x32c4c8 instanceof Error)return new FailedAccountResponse({'detail':_0x32c4c8['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x32c4c8;}});}}
6
6
 
7
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x1805cf,_0x2ff725,_0x3efd91,_0x4fe400){function _0x2e4c93(_0x14bb93){return _0x14bb93 instanceof _0x3efd91?_0x14bb93:new _0x3efd91(function(_0x5a15b0){_0x5a15b0(_0x14bb93);});}return new(_0x3efd91||(_0x3efd91=Promise))(function(_0xfa0cad,_0x42c07a){function _0x37595e(_0x1357f6){try{_0x1c4975(_0x4fe400['next'](_0x1357f6));}catch(_0x4dadaf){_0x42c07a(_0x4dadaf);}}function _0x37be5c(_0x9f5817){try{_0x1c4975(_0x4fe400['throw'](_0x9f5817));}catch(_0x2b3dcd){_0x42c07a(_0x2b3dcd);}}function _0x1c4975(_0x3fdc76){_0x3fdc76['done']?_0xfa0cad(_0x3fdc76['value']):_0x2e4c93(_0x3fdc76['value'])['then'](_0x37595e,_0x37be5c);}_0x1c4975((_0x4fe400=_0x4fe400['apply'](_0x1805cf,_0x2ff725||[]))['next']());});};class ListService{constructor(_0x466ef9,_0x1c5637){this['tokenManager']=_0x466ef9,this['fetch']=_0x1c5637;}['add'](_0x2fb52c,_0x2a694d,_0x3535e7){return __awaiter$3(this,void 0,void 0,function*(){const _0x30cdb3=yield this['tokenManager']['getOrRefreshTokens'](_0x3535e7);if(!_0x30cdb3['isSuccess'])return new FailedAccountResponse(_0x30cdb3['toProblem']());_0x3535e7=_0x30cdb3['toSuccess']();const _0x53de0f='List',_0x39ca2b={'account_name':_0x2fb52c,'list_name':_0x2a694d};try{const _0x3b521b=yield this['fetch']['post'](_0x53de0f,_0x3535e7['access_token'],_0x39ca2b);if(_0x3b521b['status']>0xc7&&_0x3b521b['status']<0x12c){const _0x6ba866=yield _0x3b521b['json']();return new SuccessfulAccountResponse(_0x6ba866);}const _0xfb3368=yield _0x3b521b['json']();return new FailedAccountResponse(_0xfb3368);}catch(_0x36f485){if(_0x36f485 instanceof Error)return new FailedAccountResponse({'detail':_0x36f485['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x36f485;}});}['remove'](_0x3cff86,_0x4ee4e5,_0x26f76f){return __awaiter$3(this,void 0,void 0,function*(){const _0x54fec3=yield this['tokenManager']['getOrRefreshTokens'](_0x26f76f);if(!_0x54fec3['isSuccess'])return new FailedAccountResponse(_0x54fec3['toProblem']());_0x26f76f=_0x54fec3['toSuccess']();const _0x120006='List/'+_0x3cff86+'/'+_0x4ee4e5,_0x536c91=yield this['fetch']['delete'](_0x120006,_0x26f76f['access_token']);try{if(_0x536c91['status']>0xc7&&_0x536c91['status']<0x12c){const _0x563eea=yield _0x536c91['json']();return new SuccessfulAccountResponse(_0x563eea);}const _0x521c86=yield _0x536c91['json']();return new FailedAccountResponse(_0x521c86);}catch(_0x8666a9){if(_0x8666a9 instanceof Error)return new FailedAccountResponse({'detail':_0x8666a9['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x8666a9;}});}}
7
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x52a64c,_0x58641b,_0x47c2ca,_0x8c76f0){function _0xcccad0(_0x2f3c7f){return _0x2f3c7f instanceof _0x47c2ca?_0x2f3c7f:new _0x47c2ca(function(_0x4aeb94){_0x4aeb94(_0x2f3c7f);});}return new(_0x47c2ca||(_0x47c2ca=Promise))(function(_0x5c9d78,_0x57a643){function _0x127f4e(_0x12a15e){try{_0x1ba5a6(_0x8c76f0['next'](_0x12a15e));}catch(_0x3eb407){_0x57a643(_0x3eb407);}}function _0x30bdb0(_0x16ecca){try{_0x1ba5a6(_0x8c76f0['throw'](_0x16ecca));}catch(_0x2ed893){_0x57a643(_0x2ed893);}}function _0x1ba5a6(_0xd15cc7){_0xd15cc7['done']?_0x5c9d78(_0xd15cc7['value']):_0xcccad0(_0xd15cc7['value'])['then'](_0x127f4e,_0x30bdb0);}_0x1ba5a6((_0x8c76f0=_0x8c76f0['apply'](_0x52a64c,_0x58641b||[]))['next']());});};class ApiKeyService{constructor(_0x5884a5){this['fetch']=_0x5884a5;}['create'](_0x36c24c,_0x3d05a6,_0x3e4b30){return __awaiter$3(this,void 0,void 0,function*(){const _0x2e30e6='ApiKey/Create',_0x7f8a7a={'account_name':_0x36c24c,'name':_0x3d05a6};try{const _0x29fedf=yield this['fetch']['post'](_0x2e30e6,_0x3e4b30,_0x7f8a7a);if(_0x29fedf['status']>0xc7&&_0x29fedf['status']<0x12c){const _0x4cbf04=yield _0x29fedf['json']();return new SuccessfulApiKeyResponse(_0x4cbf04);}const _0x323403=yield _0x29fedf['json']();return new FailedApiKeyResponse(_0x323403);}catch(_0x4b67d3){if(_0x4b67d3 instanceof Error)return new FailedApiKeyResponse({'detail':_0x4b67d3['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x4b67d3;}});}}
8
8
 
9
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x37d3e4,_0x3e9b0f,_0x4b1261,_0x5bdd19){function _0x5deeae(_0x1a266c){return _0x1a266c instanceof _0x4b1261?_0x1a266c:new _0x4b1261(function(_0x154262){_0x154262(_0x1a266c);});}return new(_0x4b1261||(_0x4b1261=Promise))(function(_0x493d67,_0xa58883){function _0x3900a4(_0x11d164){try{_0x5d62ee(_0x5bdd19['next'](_0x11d164));}catch(_0x351e69){_0xa58883(_0x351e69);}}function _0x1c55b4(_0x147e38){try{_0x5d62ee(_0x5bdd19['throw'](_0x147e38));}catch(_0x47f86d){_0xa58883(_0x47f86d);}}function _0x5d62ee(_0x3dbf56){_0x3dbf56['done']?_0x493d67(_0x3dbf56['value']):_0x5deeae(_0x3dbf56['value'])['then'](_0x3900a4,_0x1c55b4);}_0x5d62ee((_0x5bdd19=_0x5bdd19['apply'](_0x37d3e4,_0x3e9b0f||[]))['next']());});};class TokenManager{constructor(_0x20862c){this['authClient']=_0x20862c;}['getOrRefreshTokens'](_0xe586f2){return __awaiter$2(this,void 0,void 0,function*(){if(Date['now']()<_0xe586f2['access_expires'])return new SuccessfulAuthResponse(_0xe586f2);if(Date['now']()>_0xe586f2['refresh_expires'])return yield this['authClient']['refresh'](_0xe586f2['refresh_token']);return new FailedAuthResponse({'detail':'Refresh\x20token\x20expired','title':'','status':0x194,'instance':'','type':''});});}}
9
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x4fd7bf,_0x3e7276,_0x3e5528,_0x130860){function _0x3f822e(_0x1b2048){return _0x1b2048 instanceof _0x3e5528?_0x1b2048:new _0x3e5528(function(_0x721e1e){_0x721e1e(_0x1b2048);});}return new(_0x3e5528||(_0x3e5528=Promise))(function(_0x483e6f,_0x193fc3){function _0x36624a(_0x5f0140){try{_0x5fb01b(_0x130860['next'](_0x5f0140));}catch(_0x29f2b0){_0x193fc3(_0x29f2b0);}}function _0x299e2b(_0x5a870b){try{_0x5fb01b(_0x130860['throw'](_0x5a870b));}catch(_0x145e0e){_0x193fc3(_0x145e0e);}}function _0x5fb01b(_0x47354a){_0x47354a['done']?_0x483e6f(_0x47354a['value']):_0x3f822e(_0x47354a['value'])['then'](_0x36624a,_0x299e2b);}_0x5fb01b((_0x130860=_0x130860['apply'](_0x4fd7bf,_0x3e7276||[]))['next']());});};class ListService{constructor(_0x2e4d46){this['fetch']=_0x2e4d46;}['add'](_0x4bcf41,_0x37ae8d,_0x30bb8c){return __awaiter$2(this,void 0,void 0,function*(){const _0x1181b5='List',_0x5ef467={'account_name':_0x4bcf41,'list_name':_0x37ae8d};try{const _0x53858e=yield this['fetch']['post'](_0x1181b5,_0x30bb8c,_0x5ef467);if(_0x53858e['status']>0xc7&&_0x53858e['status']<0x12c){const _0x36f3cb=yield _0x53858e['json']();return new SuccessfulAccountResponse(_0x36f3cb);}const _0x10dee1=yield _0x53858e['json']();return new FailedAccountResponse(_0x10dee1);}catch(_0x5319db){if(_0x5319db instanceof Error)return new FailedAccountResponse({'detail':_0x5319db['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x5319db;}});}['remove'](_0x447e2e,_0x27b8fe,_0x44a3f7){return __awaiter$2(this,void 0,void 0,function*(){const _0x2f3420='List/'+_0x447e2e+'/'+_0x27b8fe,_0x48baa7=yield this['fetch']['delete'](_0x2f3420,_0x44a3f7);try{if(_0x48baa7['status']>0xc7&&_0x48baa7['status']<0x12c){const _0x17b2ec=yield _0x48baa7['json']();return new SuccessfulAccountResponse(_0x17b2ec);}const _0x371b60=yield _0x48baa7['json']();return new FailedAccountResponse(_0x371b60);}catch(_0x526098){if(_0x526098 instanceof Error)return new FailedAccountResponse({'detail':_0x526098['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x526098;}});}}
10
10
 
11
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x37cfc9,_0x2b918d,_0x413540,_0x513098){function _0x2df6ea(_0x24b8a2){return _0x24b8a2 instanceof _0x413540?_0x24b8a2:new _0x413540(function(_0x2aa906){_0x2aa906(_0x24b8a2);});}return new(_0x413540||(_0x413540=Promise))(function(_0x11c2b8,_0x43b012){function _0x5a488d(_0x59dc98){try{_0x36276e(_0x513098['next'](_0x59dc98));}catch(_0x51af02){_0x43b012(_0x51af02);}}function _0x5b9758(_0xdce8d9){try{_0x36276e(_0x513098['throw'](_0xdce8d9));}catch(_0x150d67){_0x43b012(_0x150d67);}}function _0x36276e(_0x1f6ccc){_0x1f6ccc['done']?_0x11c2b8(_0x1f6ccc['value']):_0x2df6ea(_0x1f6ccc['value'])['then'](_0x5a488d,_0x5b9758);}_0x36276e((_0x513098=_0x513098['apply'](_0x37cfc9,_0x2b918d||[]))['next']());});};class Fetch{constructor(_0x2c3ed5){this['baseUri']=_0x2c3ed5,this['getUrl']=_0x19a391=>{return _0x19a391['startsWith']('/')&&(_0x19a391=_0x19a391['replace']('/','')),''+this['baseUri']+_0x19a391;},!_0x2c3ed5['endsWith']('/')&&(_0x2c3ed5=_0x2c3ed5+'/');}['get'](_0x36d2a0,_0x3bab81){return __awaiter$1(this,void 0,void 0,function*(){const _0x195c82=this['getUrl'](_0x36d2a0);return yield fetch(_0x195c82,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3bab81}});});}['post'](_0xdc3469,_0x22ad2c,_0x16e39f){return __awaiter$1(this,void 0,void 0,function*(){const _0xd02e24=this['getUrl'](_0xdc3469);return yield fetch(_0xd02e24,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x22ad2c},'body':_0x16e39f?JSON['stringify'](_0x16e39f):null});});}['put'](_0x1cc225,_0x54f565,_0x5ee2dd){return __awaiter$1(this,void 0,void 0,function*(){const _0x17567d=this['getUrl'](_0x1cc225);return yield fetch(_0x17567d,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x54f565},'body':_0x5ee2dd?JSON['stringify'](_0x5ee2dd):null});});}['delete'](_0x36fa82,_0x6ae4d9){return __awaiter$1(this,void 0,void 0,function*(){const _0x4b0a3b=this['getUrl'](_0x36fa82);return yield fetch(_0x4b0a3b,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x6ae4d9}});});}}
11
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x500f64,_0x374050,_0x63ef5b,_0x121883){function _0x27ae9a(_0x703431){return _0x703431 instanceof _0x63ef5b?_0x703431:new _0x63ef5b(function(_0x57094c){_0x57094c(_0x703431);});}return new(_0x63ef5b||(_0x63ef5b=Promise))(function(_0x344238,_0x2d47be){function _0x3bebdf(_0x4b744e){try{_0x5ce552(_0x121883['next'](_0x4b744e));}catch(_0x271f45){_0x2d47be(_0x271f45);}}function _0x5eb669(_0x1a8dea){try{_0x5ce552(_0x121883['throw'](_0x1a8dea));}catch(_0x389204){_0x2d47be(_0x389204);}}function _0x5ce552(_0x58c370){_0x58c370['done']?_0x344238(_0x58c370['value']):_0x27ae9a(_0x58c370['value'])['then'](_0x3bebdf,_0x5eb669);}_0x5ce552((_0x121883=_0x121883['apply'](_0x500f64,_0x374050||[]))['next']());});};class Fetch{constructor(_0xe293af){this['baseUri']=_0xe293af,this['getUrl']=_0x429412=>{return _0x429412['startsWith']('/')&&(_0x429412=_0x429412['replace']('/','')),''+this['baseUri']+_0x429412;},!_0xe293af['endsWith']('/')&&(_0xe293af=_0xe293af+'/');}['get'](_0x212db6,_0x5f53ba){return __awaiter$1(this,void 0,void 0,function*(){const _0xf36fa2=this['getUrl'](_0x212db6);return yield fetch(_0xf36fa2,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x5f53ba}});});}['post'](_0x3ea1b5,_0x3b9489,_0x1bef5e){return __awaiter$1(this,void 0,void 0,function*(){const _0x15e6aa=this['getUrl'](_0x3ea1b5);return yield fetch(_0x15e6aa,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3b9489},'body':_0x1bef5e?JSON['stringify'](_0x1bef5e):null});});}['put'](_0x167d92,_0x56e7e5,_0x130abd){return __awaiter$1(this,void 0,void 0,function*(){const _0xb49915=this['getUrl'](_0x167d92);return yield fetch(_0xb49915,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x56e7e5},'body':_0x130abd?JSON['stringify'](_0x130abd):null});});}['delete'](_0x38a2de,_0x5e7052){return __awaiter$1(this,void 0,void 0,function*(){const _0x1b5ef9=this['getUrl'](_0x38a2de);return yield fetch(_0x1b5ef9,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x5e7052}});});}}
12
12
 
13
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x359e42,_0x2afaf5,_0x35b0e3,_0x58b726){function _0x37ab08(_0x4f7ecc){return _0x4f7ecc instanceof _0x35b0e3?_0x4f7ecc:new _0x35b0e3(function(_0x354cab){_0x354cab(_0x4f7ecc);});}return new(_0x35b0e3||(_0x35b0e3=Promise))(function(_0xdf61ee,_0x4323c3){function _0xff0dac(_0x45bfb0){try{_0x3c0773(_0x58b726['next'](_0x45bfb0));}catch(_0x3f0fd2){_0x4323c3(_0x3f0fd2);}}function _0x36d49e(_0x3eb177){try{_0x3c0773(_0x58b726['throw'](_0x3eb177));}catch(_0x1b7dce){_0x4323c3(_0x1b7dce);}}function _0x3c0773(_0x46c332){_0x46c332['done']?_0xdf61ee(_0x46c332['value']):_0x37ab08(_0x46c332['value'])['then'](_0xff0dac,_0x36d49e);}_0x3c0773((_0x58b726=_0x58b726['apply'](_0x359e42,_0x2afaf5||[]))['next']());});};class AdminClient{constructor(_0x4cdc37,_0x1a3a0f='https://admin.searchability.dev/'){var _0x485d8b=new TokenManager(_0x4cdc37),_0x1c0f39=new Fetch(_0x1a3a0f);this['Accounts']=new AccountService(_0x485d8b,_0x1c0f39),this['Lists']=new ListService(_0x485d8b,_0x1c0f39),this['ApiKeys']=new ApiKeyService(_0x485d8b,_0x1c0f39);}}class AuthClient{constructor(_0x760207='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x760207);}['login'](_0x24ef91){return __awaiter(this,void 0,void 0,function*(){var _0x3cb626='login/'+_0x24ef91;try{const _0x261b34=yield yield fetch(_0x3cb626);if(_0x261b34['status']>0xc7&&_0x261b34['status']<0x12c){const _0x257771=yield _0x261b34['json']();return new SuccessfulAuthResponse(_0x257771);}const _0x1183b3=yield _0x261b34['json']();return new FailedAuthResponse(_0x1183b3);}catch(_0x3c53ba){if(_0x3c53ba instanceof Error)return new FailedAuthResponse({'detail':_0x3c53ba['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x3c53ba;}});}['refresh'](_0x5d57da){return __awaiter(this,void 0,void 0,function*(){var _0x4adfc8='refresh';try{const _0x338a7d=yield this['fetch']['post'](_0x4adfc8,_0x5d57da,null);if(_0x338a7d['status']>0xc7&&_0x338a7d['status']<0x12c){const _0xb053b2=yield _0x338a7d['json']();return new SuccessfulAuthResponse(_0xb053b2);}const _0x107bd8=yield _0x338a7d['json']();return new FailedAuthResponse(_0x107bd8);}catch(_0x562ff7){if(_0x562ff7 instanceof Error)return new FailedAuthResponse({'detail':_0x562ff7['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x562ff7;}});}}
13
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x30ec2d,_0x495c9e,_0x5808c2,_0x4d1590){function _0x365bfd(_0x1dda4b){return _0x1dda4b instanceof _0x5808c2?_0x1dda4b:new _0x5808c2(function(_0x5f12ea){_0x5f12ea(_0x1dda4b);});}return new(_0x5808c2||(_0x5808c2=Promise))(function(_0x29bc69,_0x57e19e){function _0x3fd2ec(_0x1fe67){try{_0x1efa58(_0x4d1590['next'](_0x1fe67));}catch(_0x16d5ed){_0x57e19e(_0x16d5ed);}}function _0x4807d2(_0x2718b5){try{_0x1efa58(_0x4d1590['throw'](_0x2718b5));}catch(_0x5817d8){_0x57e19e(_0x5817d8);}}function _0x1efa58(_0xbaac0e){_0xbaac0e['done']?_0x29bc69(_0xbaac0e['value']):_0x365bfd(_0xbaac0e['value'])['then'](_0x3fd2ec,_0x4807d2);}_0x1efa58((_0x4d1590=_0x4d1590['apply'](_0x30ec2d,_0x495c9e||[]))['next']());});};class AdminClient{constructor(_0x11d52d='https://admin.searchability.dev/'){var _0x464c78=new Fetch(_0x11d52d);this['Accounts']=new AccountService(_0x464c78),this['Lists']=new ListService(_0x464c78),this['ApiKeys']=new ApiKeyService(_0x464c78);}}class AuthClient{constructor(_0x5a69b3='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x5a69b3);}['login'](_0x7083b7){return __awaiter(this,void 0,void 0,function*(){var _0x147d33='login/'+_0x7083b7;try{const _0xab2a0f=yield yield fetch(_0x147d33);if(_0xab2a0f['status']>0xc7&&_0xab2a0f['status']<0x12c){const _0x558548=yield _0xab2a0f['json']();return new SuccessfulAuthResponse(_0x558548);}const _0x1df465=yield _0xab2a0f['json']();return new FailedAuthResponse(_0x1df465);}catch(_0x172fd6){if(_0x172fd6 instanceof Error)return new FailedAuthResponse({'detail':_0x172fd6['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x172fd6;}});}['refresh'](_0x2b28cb){return __awaiter(this,void 0,void 0,function*(){var _0x74e973='refresh';try{const _0xad4a3d=yield this['fetch']['post'](_0x74e973,_0x2b28cb,null);if(_0xad4a3d['status']>0xc7&&_0xad4a3d['status']<0x12c){const _0xd8ac17=yield _0xad4a3d['json']();return new SuccessfulAuthResponse(_0xd8ac17);}const _0x244082=yield _0xad4a3d['json']();return new FailedAuthResponse(_0x244082);}catch(_0x3e05af){if(_0x3e05af instanceof Error)return new FailedAuthResponse({'detail':_0x3e05af['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x3e05af;}});}}
14
14
 
15
15
  export { AdminClient, AuthClient };
package/dist/types.d.ts CHANGED
@@ -8,36 +8,27 @@ declare class Fetch {
8
8
  delete(path: string, accessToken: string): Promise<globalThis.Response>;
9
9
  }
10
10
 
11
- declare class TokenManager {
12
- readonly authClient: AuthClient;
13
- constructor(authClient: AuthClient);
14
- getOrRefreshTokens(tokens: Tokens): Promise<Response<Tokens, Problem>>;
15
- }
16
-
17
11
  declare class AccountService {
18
- readonly tokenManager: TokenManager;
19
12
  readonly fetch: Fetch;
20
- constructor(tokenManager: TokenManager, fetch: Fetch);
21
- get(accountName: string, tokens: Tokens): Promise<Response<Account, Problem>>;
13
+ constructor(fetch: Fetch);
14
+ get(accountName: string, access_token: string): Promise<Response<Account, Problem>>;
22
15
  }
23
16
 
24
17
  declare class ApiKeyService {
25
- readonly tokenManager: TokenManager;
26
18
  readonly fetch: Fetch;
27
- constructor(tokenManager: TokenManager, fetch: Fetch);
28
- create(accountName: string, apiKeyName: string, tokens: Tokens): Promise<Response<ApiKey, Problem>>;
19
+ constructor(fetch: Fetch);
20
+ create(accountName: string, apiKeyName: string, access_token: string): Promise<Response<ApiKey[], Problem>>;
29
21
  }
30
22
 
31
23
  declare class ListService {
32
- readonly tokenManager: TokenManager;
33
24
  readonly fetch: Fetch;
34
- constructor(tokenManager: TokenManager, fetch: Fetch);
35
- add(accountName: string, listName: string, tokens: Tokens): Promise<Response<Account, Problem>>;
36
- remove(accountName: string, listName: string, tokens: Tokens): Promise<Response<Account, Problem>>;
25
+ constructor(fetch: Fetch);
26
+ add(accountName: string, listName: string, access_token: string): Promise<Response<Account, Problem>>;
27
+ remove(accountName: string, listName: string, access_token: string): Promise<Response<Account, Problem>>;
37
28
  }
38
29
 
39
30
  declare class AdminClient {
40
- constructor(authClient: AuthClient, baseUri?: string);
31
+ constructor(baseUri?: string);
41
32
  readonly Accounts: AccountService;
42
33
  readonly Lists: ListService;
43
34
  readonly ApiKeys: ApiKeyService;
@@ -118,16 +109,16 @@ declare class FailedAuthResponse extends Response<Tokens, Problem> {
118
109
  toSuccess(): Tokens;
119
110
  toProblem(): Problem;
120
111
  }
121
- declare class SuccessfulApiKeyResponse extends Response<ApiKey, Problem> {
122
- readonly apiKey: ApiKey;
123
- constructor(apiKey: ApiKey);
124
- toSuccess(): ApiKey;
112
+ declare class SuccessfulApiKeyResponse extends Response<ApiKey[], Problem> {
113
+ readonly apiKeys: ApiKey[];
114
+ constructor(apiKeys: ApiKey[]);
115
+ toSuccess(): ApiKey[];
125
116
  toProblem(): Problem;
126
117
  }
127
- declare class FailedApiKeyResponse extends Response<ApiKey, Problem> {
118
+ declare class FailedApiKeyResponse extends Response<ApiKey[], Problem> {
128
119
  readonly problem: Problem;
129
120
  constructor(problem: Problem);
130
- toSuccess(): ApiKey;
121
+ toSuccess(): ApiKey[];
131
122
  toProblem(): Problem;
132
123
  }
133
124
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@searchability/admin-client",
3
- "version": "0.0.17",
3
+ "version": "0.0.19",
4
4
  "description": "Searchability admin client.",
5
5
  "type": "module",
6
6
  "types": "./dist/types.d.ts",
@@ -1,15 +0,0 @@
1
- class Response{constructor(_0x3005e1){this['isSuccess']=_0x3005e1;}}class SuccessfulAccountResponse extends Response{constructor(_0x1cc25f){super(!![]),this['account']=_0x1cc25f;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x55a72c){super(![]),this['problem']=_0x55a72c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x315173){super(!![]),this['tokens']=_0x315173;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x1529c7){super(![]),this['problem']=_0x1529c7;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x4c9b69){super(!![]),this['apiKey']=_0x4c9b69;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x25ca9d){super(![]),this['problem']=_0x25ca9d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
2
-
3
- var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x16b075,_0x5f4efa,_0x193054,_0x2a1d99){function _0x1efbdb(_0x17319e){return _0x17319e instanceof _0x193054?_0x17319e:new _0x193054(function(_0x1e37c2){_0x1e37c2(_0x17319e);});}return new(_0x193054||(_0x193054=Promise))(function(_0x1e4e9e,_0x307804){function _0x224083(_0x1a34bb){try{_0x2f02be(_0x2a1d99['next'](_0x1a34bb));}catch(_0x2a9186){_0x307804(_0x2a9186);}}function _0x502022(_0x43608f){try{_0x2f02be(_0x2a1d99['throw'](_0x43608f));}catch(_0x444de6){_0x307804(_0x444de6);}}function _0x2f02be(_0x5d1537){_0x5d1537['done']?_0x1e4e9e(_0x5d1537['value']):_0x1efbdb(_0x5d1537['value'])['then'](_0x224083,_0x502022);}_0x2f02be((_0x2a1d99=_0x2a1d99['apply'](_0x16b075,_0x5f4efa||[]))['next']());});};class AccountService{constructor(_0x1c10f6,_0x30d478){this['tokenManager']=_0x1c10f6,this['fetch']=_0x30d478;}['get'](_0x253b94,_0x4b7594){return __awaiter$5(this,void 0,void 0,function*(){const _0x38d60c=yield this['tokenManager']['getOrRefreshTokens'](_0x4b7594);if(!_0x38d60c['isSuccess'])return new FailedAccountResponse(_0x38d60c['toProblem']());_0x4b7594=_0x38d60c['toSuccess']();const _0xcf5b6='Account/'+_0x253b94+'/',_0x26853a=yield this['fetch']['get'](_0xcf5b6,_0x4b7594['access_token']);try{if(_0x26853a['status']>0xc7&&_0x26853a['status']<0x12c){const _0x1d3e9b=yield _0x26853a['json']();return new SuccessfulAccountResponse(_0x1d3e9b);}const _0x521578=yield _0x26853a['json']();return new FailedAccountResponse(_0x521578);}catch(_0x4a8e4a){if(_0x4a8e4a instanceof Error)return new FailedAccountResponse({'detail':_0x4a8e4a['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x4a8e4a;}});}}
4
-
5
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x29f5be,_0x709364,_0x162ede,_0x2515ff){function _0x9b04c4(_0x2d7c01){return _0x2d7c01 instanceof _0x162ede?_0x2d7c01:new _0x162ede(function(_0x49f813){_0x49f813(_0x2d7c01);});}return new(_0x162ede||(_0x162ede=Promise))(function(_0x299066,_0xa37cf1){function _0x4c2451(_0x378e7f){try{_0x54a9a2(_0x2515ff['next'](_0x378e7f));}catch(_0x3953ed){_0xa37cf1(_0x3953ed);}}function _0x3db26b(_0x141710){try{_0x54a9a2(_0x2515ff['throw'](_0x141710));}catch(_0x5d6d3d){_0xa37cf1(_0x5d6d3d);}}function _0x54a9a2(_0x435eea){_0x435eea['done']?_0x299066(_0x435eea['value']):_0x9b04c4(_0x435eea['value'])['then'](_0x4c2451,_0x3db26b);}_0x54a9a2((_0x2515ff=_0x2515ff['apply'](_0x29f5be,_0x709364||[]))['next']());});};class ApiKeyService{constructor(_0x7a9f26,_0x2364b1){this['tokenManager']=_0x7a9f26,this['fetch']=_0x2364b1;}['create'](_0x11f81c,_0x51f9dc,_0x2fa237){return __awaiter$4(this,void 0,void 0,function*(){const _0x7b3abb=yield this['tokenManager']['getOrRefreshTokens'](_0x2fa237);if(!_0x7b3abb['isSuccess'])return new FailedApiKeyResponse(_0x7b3abb['toProblem']());_0x2fa237=_0x7b3abb['toSuccess']();const _0xb39fd='ApiKey/Create',_0x4491ab={'account_name':_0x11f81c,'name':_0x51f9dc};try{const _0x5c8ae7=yield this['fetch']['post'](_0xb39fd,_0x2fa237['access_token'],_0x4491ab);if(_0x5c8ae7['status']>0xc7&&_0x5c8ae7['status']<0x12c){const _0x8247b0=yield _0x5c8ae7['json']();return new SuccessfulApiKeyResponse(_0x8247b0);}const _0xf5464a=yield _0x5c8ae7['json']();return new FailedApiKeyResponse(_0xf5464a);}catch(_0x1462ff){if(_0x1462ff instanceof Error)return new FailedApiKeyResponse({'detail':_0x1462ff['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x1462ff;}});}}
6
-
7
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0xe5bd9f,_0xe31908,_0x45bbc9,_0x46078c){function _0x2a80e6(_0x4a3269){return _0x4a3269 instanceof _0x45bbc9?_0x4a3269:new _0x45bbc9(function(_0x2b9c7d){_0x2b9c7d(_0x4a3269);});}return new(_0x45bbc9||(_0x45bbc9=Promise))(function(_0x5ebb6a,_0x12d490){function _0x356c9d(_0x436092){try{_0x1ae97f(_0x46078c['next'](_0x436092));}catch(_0x1c73c9){_0x12d490(_0x1c73c9);}}function _0x3c1840(_0x56450e){try{_0x1ae97f(_0x46078c['throw'](_0x56450e));}catch(_0x17f2eb){_0x12d490(_0x17f2eb);}}function _0x1ae97f(_0x550208){_0x550208['done']?_0x5ebb6a(_0x550208['value']):_0x2a80e6(_0x550208['value'])['then'](_0x356c9d,_0x3c1840);}_0x1ae97f((_0x46078c=_0x46078c['apply'](_0xe5bd9f,_0xe31908||[]))['next']());});};class ListService{constructor(_0x12acfb,_0x52f942){this['tokenManager']=_0x12acfb,this['fetch']=_0x52f942;}['add'](_0x5d89e3,_0x4a75ee,_0x1fa8c7){return __awaiter$3(this,void 0,void 0,function*(){const _0x3a1cab=yield this['tokenManager']['getOrRefreshTokens'](_0x1fa8c7);if(!_0x3a1cab['isSuccess'])return new FailedAccountResponse(_0x3a1cab['toProblem']());_0x1fa8c7=_0x3a1cab['toSuccess']();const _0x26bd11='List',_0x181780={'account_name':_0x5d89e3,'list_name':_0x4a75ee};try{const _0x56cd27=yield this['fetch']['post'](_0x26bd11,_0x1fa8c7['access_token'],_0x181780);if(_0x56cd27['status']>0xc7&&_0x56cd27['status']<0x12c){const _0x2b188a=yield _0x56cd27['json']();return new SuccessfulAccountResponse(_0x2b188a);}const _0x69a1c1=yield _0x56cd27['json']();return new FailedAccountResponse(_0x69a1c1);}catch(_0x419dd9){if(_0x419dd9 instanceof Error)return new FailedAccountResponse({'detail':_0x419dd9['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x419dd9;}});}['remove'](_0x1719f4,_0x8c0090,_0x251034){return __awaiter$3(this,void 0,void 0,function*(){const _0x2fde6d=yield this['tokenManager']['getOrRefreshTokens'](_0x251034);if(!_0x2fde6d['isSuccess'])return new FailedAccountResponse(_0x2fde6d['toProblem']());_0x251034=_0x2fde6d['toSuccess']();const _0x46a2fc='List/'+_0x1719f4+'/'+_0x8c0090,_0x41f47b=yield this['fetch']['delete'](_0x46a2fc,_0x251034['access_token']);try{if(_0x41f47b['status']>0xc7&&_0x41f47b['status']<0x12c){const _0x3df061=yield _0x41f47b['json']();return new SuccessfulAccountResponse(_0x3df061);}const _0x4b5a09=yield _0x41f47b['json']();return new FailedAccountResponse(_0x4b5a09);}catch(_0x348c44){if(_0x348c44 instanceof Error)return new FailedAccountResponse({'detail':_0x348c44['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x348c44;}});}}
8
-
9
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x4206d4,_0x344823,_0xb3439,_0x325efa){function _0x26490b(_0x5174ab){return _0x5174ab instanceof _0xb3439?_0x5174ab:new _0xb3439(function(_0x3ec3bf){_0x3ec3bf(_0x5174ab);});}return new(_0xb3439||(_0xb3439=Promise))(function(_0x434263,_0x109767){function _0x490595(_0x2d4948){try{_0x4cda62(_0x325efa['next'](_0x2d4948));}catch(_0x5110ff){_0x109767(_0x5110ff);}}function _0x4e5704(_0x522976){try{_0x4cda62(_0x325efa['throw'](_0x522976));}catch(_0x1e6d1d){_0x109767(_0x1e6d1d);}}function _0x4cda62(_0x4f20f3){_0x4f20f3['done']?_0x434263(_0x4f20f3['value']):_0x26490b(_0x4f20f3['value'])['then'](_0x490595,_0x4e5704);}_0x4cda62((_0x325efa=_0x325efa['apply'](_0x4206d4,_0x344823||[]))['next']());});};class TokenManager{constructor(_0xee9c3a){this['authClient']=_0xee9c3a;}['getOrRefreshTokens'](_0x997113){return __awaiter$2(this,void 0,void 0,function*(){if(Date['now']()<_0x997113['access_expires'])return new SuccessfulAuthResponse(_0x997113);if(Date['now']()>_0x997113['refresh_expires'])return yield this['authClient']['refresh'](_0x997113['refresh_token']);return new FailedAuthResponse({'detail':'Refresh\x20token\x20expired','title':'','status':0x194,'instance':'','type':''});});}}
10
-
11
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x156057,_0x13cb7c,_0x4723ba,_0x516cc5){function _0x9090af(_0x553166){return _0x553166 instanceof _0x4723ba?_0x553166:new _0x4723ba(function(_0x120c4){_0x120c4(_0x553166);});}return new(_0x4723ba||(_0x4723ba=Promise))(function(_0x4875a2,_0x572622){function _0x47c231(_0x177416){try{_0x3b4ed6(_0x516cc5['next'](_0x177416));}catch(_0x505e0a){_0x572622(_0x505e0a);}}function _0x3b1772(_0x158dd1){try{_0x3b4ed6(_0x516cc5['throw'](_0x158dd1));}catch(_0x5ce138){_0x572622(_0x5ce138);}}function _0x3b4ed6(_0x1e6259){_0x1e6259['done']?_0x4875a2(_0x1e6259['value']):_0x9090af(_0x1e6259['value'])['then'](_0x47c231,_0x3b1772);}_0x3b4ed6((_0x516cc5=_0x516cc5['apply'](_0x156057,_0x13cb7c||[]))['next']());});};class Fetch{constructor(_0x39d986){this['baseUri']=_0x39d986,this['getUrl']=_0x32c0fc=>{return _0x32c0fc['startsWith']('/')&&(_0x32c0fc=_0x32c0fc['replace']('/','')),''+this['baseUri']+_0x32c0fc;},!_0x39d986['endsWith']('/')&&(_0x39d986=_0x39d986+'/');}['get'](_0x92f9cf,_0x2ac717){return __awaiter$1(this,void 0,void 0,function*(){const _0xe95cb6=this['getUrl'](_0x92f9cf);return yield fetch(_0xe95cb6,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2ac717}});});}['post'](_0x3a4b9e,_0x3d3ebd,_0x5582ec){return __awaiter$1(this,void 0,void 0,function*(){const _0x7183ed=this['getUrl'](_0x3a4b9e);return yield fetch(_0x7183ed,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3d3ebd},'body':_0x5582ec?JSON['stringify'](_0x5582ec):null});});}['put'](_0x174649,_0x52926d,_0x467928){return __awaiter$1(this,void 0,void 0,function*(){const _0x1ec05c=this['getUrl'](_0x174649);return yield fetch(_0x1ec05c,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x52926d},'body':_0x467928?JSON['stringify'](_0x467928):null});});}['delete'](_0x2aaeae,_0x438675){return __awaiter$1(this,void 0,void 0,function*(){const _0x3c7928=this['getUrl'](_0x2aaeae);return yield fetch(_0x3c7928,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x438675}});});}}
12
-
13
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x1f156f,_0x3d5022,_0x2b3999,_0x3fdd59){function _0x2bc428(_0x48f3bd){return _0x48f3bd instanceof _0x2b3999?_0x48f3bd:new _0x2b3999(function(_0x5da92f){_0x5da92f(_0x48f3bd);});}return new(_0x2b3999||(_0x2b3999=Promise))(function(_0x194b20,_0x1d2bee){function _0x121007(_0x1c9c97){try{_0x76ff54(_0x3fdd59['next'](_0x1c9c97));}catch(_0x34616b){_0x1d2bee(_0x34616b);}}function _0x299bd1(_0xeb975a){try{_0x76ff54(_0x3fdd59['throw'](_0xeb975a));}catch(_0x5d3daf){_0x1d2bee(_0x5d3daf);}}function _0x76ff54(_0x58cfa0){_0x58cfa0['done']?_0x194b20(_0x58cfa0['value']):_0x2bc428(_0x58cfa0['value'])['then'](_0x121007,_0x299bd1);}_0x76ff54((_0x3fdd59=_0x3fdd59['apply'](_0x1f156f,_0x3d5022||[]))['next']());});};class AdminClient{constructor(_0x5476c3,_0x1445e5='https://admin.searchability.dev/'){var _0x4e3864=new TokenManager(_0x5476c3),_0x5996ea=new Fetch(_0x1445e5);this['Accounts']=new AccountService(_0x4e3864,_0x5996ea),this['Lists']=new ListService(_0x4e3864,_0x5996ea),this['ApiKeys']=new ApiKeyService(_0x4e3864,_0x5996ea);}}class AuthClient{constructor(_0x55c076='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x55c076);}['login'](_0x54ba48){return __awaiter(this,void 0,void 0,function*(){var _0x59c163='login/'+_0x54ba48;try{const _0x516149=yield yield fetch(_0x59c163);if(_0x516149['status']>0xc7&&_0x516149['status']<0x12c){const _0x1250ce=yield _0x516149['json']();return new SuccessfulAuthResponse(_0x1250ce);}const _0x5ce50a=yield _0x516149['json']();return new FailedAuthResponse(_0x5ce50a);}catch(_0x280a14){if(_0x280a14 instanceof Error)return new FailedAuthResponse({'detail':_0x280a14['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x280a14;}});}['refresh'](_0x5ec6d9){return __awaiter(this,void 0,void 0,function*(){var _0x212d3d='refresh';try{const _0x4c4b18=yield this['fetch']['post'](_0x212d3d,_0x5ec6d9,null);if(_0x4c4b18['status']>0xc7&&_0x4c4b18['status']<0x12c){const _0x428006=yield _0x4c4b18['json']();return new SuccessfulAuthResponse(_0x428006);}const _0x290e9c=yield _0x4c4b18['json']();return new FailedAuthResponse(_0x290e9c);}catch(_0x17ccb3){if(_0x17ccb3 instanceof Error)return new FailedAuthResponse({'detail':_0x17ccb3['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x17ccb3;}});}}
14
-
15
- export { AdminClient, AuthClient };