@searchability/admin-client 0.0.4 → 0.0.5

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 __awaiter$4=undefined&&undefined['__awaiter']||function(_0x22b0dc,_0x15a21f,_0x3815e9,_0x5162bb){function _0x122c0f(_0x3016a0){return _0x3016a0 instanceof _0x3815e9?_0x3016a0:new _0x3815e9(function(_0x36a031){_0x36a031(_0x3016a0);});}return new(_0x3815e9||(_0x3815e9=Promise))(function(_0xdc914b,_0x27f9f1){function _0x4de182(_0x466639){try{_0x2d44da(_0x5162bb['next'](_0x466639));}catch(_0x513151){_0x27f9f1(_0x513151);}}function _0x5359b2(_0x3d06d5){try{_0x2d44da(_0x5162bb['throw'](_0x3d06d5));}catch(_0x5c777b){_0x27f9f1(_0x5c777b);}}function _0x2d44da(_0x229fd4){_0x229fd4['done']?_0xdc914b(_0x229fd4['value']):_0x122c0f(_0x229fd4['value'])['then'](_0x4de182,_0x5359b2);}_0x2d44da((_0x5162bb=_0x5162bb['apply'](_0x22b0dc,_0x15a21f||[]))['next']());});};class Fetch{static['get'](_0x47a65d,_0x153fb0){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x47a65d,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x153fb0}});});}static['post'](_0x1e5e17,_0x2c85b9,_0x281891){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x1e5e17,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2c85b9},'body':_0x281891?JSON['stringify'](_0x281891):null});});}static['put'](_0x474ca6,_0x35a23c,_0x6d0dcc){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x474ca6,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x35a23c},'body':_0x6d0dcc?JSON['stringify'](_0x6d0dcc):null});});}static['delete'](_0x3b1d88,_0x861282){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x3b1d88,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x861282}});});}}
2
+
3
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x20ff07,_0xb6283b,_0x1879ef,_0x3e6d96){function _0x1121ef(_0x4049f8){return _0x4049f8 instanceof _0x1879ef?_0x4049f8:new _0x1879ef(function(_0x3d294d){_0x3d294d(_0x4049f8);});}return new(_0x1879ef||(_0x1879ef=Promise))(function(_0x23b194,_0x17d1f8){function _0x25da45(_0x231329){try{_0x381188(_0x3e6d96['next'](_0x231329));}catch(_0x33a66b){_0x17d1f8(_0x33a66b);}}function _0x4fa7b6(_0xe33269){try{_0x381188(_0x3e6d96['throw'](_0xe33269));}catch(_0x1bfdca){_0x17d1f8(_0x1bfdca);}}function _0x381188(_0x2808fc){_0x2808fc['done']?_0x23b194(_0x2808fc['value']):_0x1121ef(_0x2808fc['value'])['then'](_0x25da45,_0x4fa7b6);}_0x381188((_0x3e6d96=_0x3e6d96['apply'](_0x20ff07,_0xb6283b||[]))['next']());});};class ListService{constructor(_0x42ae8c){this['baseUri']=_0x42ae8c;}['add'](_0x3b5268,_0x32ee5f,_0x46ce86){return __awaiter$3(this,arguments,void 0,function*(_0x19e76e,_0x588bc2,_0x5fc274,_0x402aa7={}){var _0x12ce8a;let _0x3c9a30=(_0x12ce8a=_0x402aa7['baseUri'])!==null&&_0x12ce8a!==void 0?_0x12ce8a:this['baseUri'];!_0x3c9a30['endsWith']('/')&&(_0x3c9a30=_0x3c9a30+'/');_0x3c9a30=_0x3c9a30+'List';const _0x2814a1={'account_name':_0x588bc2,'list_name':_0x5fc274},_0x48e17e=yield Fetch['post'](_0x3c9a30,_0x19e76e,_0x2814a1);if(_0x48e17e['status']>0xc7&&_0x48e17e['status']<0x12c){const _0x4b6bf6=yield _0x48e17e['json']();return new SuccessfulAccountResponse(_0x4b6bf6);}if(_0x48e17e['bodyUsed']){const _0x182f98=yield _0x48e17e['json']();return new FailedAccountResponse(_0x182f98);}const _0x2eab11={'type':'','status':_0x48e17e['status'],'title':'','instance':'','errors':{}};return new FailedAccountResponse(_0x2eab11);});}['remove'](_0x315206,_0x50f029,_0x55c0cb){return __awaiter$3(this,arguments,void 0,function*(_0x4091b1,_0x40d4ba,_0x233e3e,_0xf22e10={}){var _0x223b9a;let _0x299f26=(_0x223b9a=_0xf22e10['baseUri'])!==null&&_0x223b9a!==void 0?_0x223b9a:this['baseUri'];_0x299f26=_0x299f26+'/List/'+_0x40d4ba+'/'+_0x233e3e;const _0x10b202=yield Fetch['delete'](_0x299f26,_0x4091b1);if(_0x10b202['status']>0xc7&&_0x10b202['status']<0x12c){const _0x6d39eb=yield _0x10b202['json']();return new SuccessfulAccountResponse(_0x6d39eb);}if(_0x10b202['bodyUsed']){const _0x51b6d8=yield _0x10b202['json']();return new FailedAccountResponse(_0x51b6d8);}const _0x29f228={'type':'','status':_0x10b202['status'],'title':'','instance':'','errors':{}};return new FailedAccountResponse(_0x29f228);});}}
4
+
5
+ class Response{constructor(_0x133e47){this['isSuccess']=_0x133e47;}}class SuccessfulAccountResponse extends Response{constructor(_0x27d2e8){super(!![]),this['account']=_0x27d2e8;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x32f2f9){super(![]),this['problem']=_0x32f2f9;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulRefreshResponse extends Response{constructor(_0x2460f1){super(!![]),this['tokens']=_0x2460f1;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedRefreshResponse extends Response{constructor(_0x2f2be6){super(![]),this['problem']=_0x2f2be6;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
6
+
7
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x3355da,_0x436357,_0x2e9e98,_0x218c90){function _0x416807(_0x4b96f0){return _0x4b96f0 instanceof _0x2e9e98?_0x4b96f0:new _0x2e9e98(function(_0x1c9abd){_0x1c9abd(_0x4b96f0);});}return new(_0x2e9e98||(_0x2e9e98=Promise))(function(_0x35ee5c,_0x462aeb){function _0x3dc267(_0x4ea50e){try{_0xa1de2e(_0x218c90['next'](_0x4ea50e));}catch(_0x380b3b){_0x462aeb(_0x380b3b);}}function _0x39f5b7(_0x52f629){try{_0xa1de2e(_0x218c90['throw'](_0x52f629));}catch(_0x1543b6){_0x462aeb(_0x1543b6);}}function _0xa1de2e(_0x4c0ea8){_0x4c0ea8['done']?_0x35ee5c(_0x4c0ea8['value']):_0x416807(_0x4c0ea8['value'])['then'](_0x3dc267,_0x39f5b7);}_0xa1de2e((_0x218c90=_0x218c90['apply'](_0x3355da,_0x436357||[]))['next']());});};class AccountService{constructor(_0x4c03d4){this['baseUri']=_0x4c03d4;}['get'](_0x2cd554,_0x32bb9){return __awaiter$2(this,arguments,void 0,function*(_0x528add,_0x279872,_0x294b81={}){var _0x8eca0b;let _0x121c1b=(_0x8eca0b=_0x294b81['baseUri'])!==null&&_0x8eca0b!==void 0?_0x8eca0b:this['baseUri'];!_0x121c1b['endsWith']('/')&&(_0x121c1b=_0x121c1b+'/');_0x121c1b=_0x121c1b+'Account/'+_0x279872+'/';const _0x14e6a8=yield Fetch['get'](_0x121c1b,_0x528add);if(_0x14e6a8['status']>0xc7&&_0x14e6a8['status']<0x12c){const _0xb09ca4=yield _0x14e6a8['json']();return new SuccessfulAccountResponse(_0xb09ca4);}if(_0x14e6a8['bodyUsed']){const _0x87284b=yield _0x14e6a8['json']();return new FailedAccountResponse(_0x87284b);}const _0x9e48c9={'type':'','status':_0x14e6a8['status'],'title':'','instance':'','errors':{}};return new FailedAccountResponse(_0x9e48c9);});}}
8
+
9
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x53ab04,_0xe5ec75,_0x21937b,_0x226926){function _0x258cd2(_0x633c02){return _0x633c02 instanceof _0x21937b?_0x633c02:new _0x21937b(function(_0x50eb27){_0x50eb27(_0x633c02);});}return new(_0x21937b||(_0x21937b=Promise))(function(_0x129920,_0x2810c6){function _0x8a8e60(_0x4de5f9){try{_0x422057(_0x226926['next'](_0x4de5f9));}catch(_0x1fdef7){_0x2810c6(_0x1fdef7);}}function _0xba6b32(_0x56028c){try{_0x422057(_0x226926['throw'](_0x56028c));}catch(_0x48e0aa){_0x2810c6(_0x48e0aa);}}function _0x422057(_0x567dfc){_0x567dfc['done']?_0x129920(_0x567dfc['value']):_0x258cd2(_0x567dfc['value'])['then'](_0x8a8e60,_0xba6b32);}_0x422057((_0x226926=_0x226926['apply'](_0x53ab04,_0xe5ec75||[]))['next']());});};class TokenManager{constructor(_0x404272){this['securityService']=_0x404272;}['RefreshTokens'](_0x5591de){return __awaiter$1(this,void 0,void 0,function*(){if(Date['now']()<_0x5591de['access_expires'])return new SuccessfulRefreshResponse(_0x5591de);if(Date['now']()>_0x5591de['refresh_expires']){const _0x26e588={'type':'','status':0x193,'title':'Forbidden','instance':'','errors':{}};return new FailedRefreshResponse(_0x26e588);}const _0x283b50=yield this['securityService']['refresh'](_0x5591de['refresh_token']);if(!_0x283b50['isSuccess'])return new FailedRefreshResponse(_0x283b50['toProblem']());return new SuccessfulRefreshResponse(_0x283b50['toSuccess']());});}}
10
+
11
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x552c69,_0x51f5bb,_0x280868,_0xc280f6){function _0x76c13d(_0x3389e8){return _0x3389e8 instanceof _0x280868?_0x3389e8:new _0x280868(function(_0x3bd60b){_0x3bd60b(_0x3389e8);});}return new(_0x280868||(_0x280868=Promise))(function(_0xe93b9d,_0x3626f7){function _0x17ffbf(_0x866605){try{_0x2191e5(_0xc280f6['next'](_0x866605));}catch(_0x37b84c){_0x3626f7(_0x37b84c);}}function _0x293675(_0x284036){try{_0x2191e5(_0xc280f6['throw'](_0x284036));}catch(_0x47bdb9){_0x3626f7(_0x47bdb9);}}function _0x2191e5(_0x22c695){_0x22c695['done']?_0xe93b9d(_0x22c695['value']):_0x76c13d(_0x22c695['value'])['then'](_0x17ffbf,_0x293675);}_0x2191e5((_0xc280f6=_0xc280f6['apply'](_0x552c69,_0x51f5bb||[]))['next']());});};class SecurityService{constructor(_0x15df19){this['baseUri']=_0x15df19,this['tokenManager']=new TokenManager(this);}['refresh'](_0x50cf56){return __awaiter(this,arguments,void 0,function*(_0x366ad3,_0x1fcd71={}){var _0x210760;let _0x3ddef4=(_0x210760=_0x1fcd71['baseUri'])!==null&&_0x210760!==void 0?_0x210760:this['baseUri'];!_0x3ddef4['endsWith']('/')&&(_0x3ddef4=_0x3ddef4+'/');_0x3ddef4=_0x3ddef4+'Security/Refresh';const _0x5b11de=yield Fetch['post'](_0x3ddef4,_0x366ad3,null);if(_0x5b11de['status']>0xc7&&_0x5b11de['status']<0x12c){const _0x4203de=yield _0x5b11de['json']();return new SuccessfulRefreshResponse(_0x4203de);}if(_0x5b11de['bodyUsed']){const _0x4e3a8c=yield _0x5b11de['json']();return new FailedRefreshResponse(_0x4e3a8c);}const _0x384aa8={'type':'','status':_0x5b11de['status'],'title':'','instance':'','errors':{}};return new FailedRefreshResponse(_0x384aa8);});}}
12
+
13
+ var _a;class AdminClient{}_a=AdminClient,AdminClient['baseUri']='https://admin.searchability.dev/',AdminClient['Accounts']=new AccountService(_a['baseUri']),AdminClient['Lists']=new ListService(_a['baseUri']),AdminClient['Security']=new SecurityService(_a['baseUri']);
14
+
15
+ export { AdminClient };
@@ -1,17 +1,17 @@
1
1
  'use strict';
2
2
 
3
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x443279,_0x436a16,_0x18043b,_0x3976c6){function _0xcdbba6(_0x4880e4){return _0x4880e4 instanceof _0x18043b?_0x4880e4:new _0x18043b(function(_0x198a10){_0x198a10(_0x4880e4);});}return new(_0x18043b||(_0x18043b=Promise))(function(_0x2cdcca,_0x1e7b59){function _0x2f4113(_0x48e99a){try{_0x3e1989(_0x3976c6['next'](_0x48e99a));}catch(_0x50641b){_0x1e7b59(_0x50641b);}}function _0x4ba2eb(_0x3ee2d8){try{_0x3e1989(_0x3976c6['throw'](_0x3ee2d8));}catch(_0x510f66){_0x1e7b59(_0x510f66);}}function _0x3e1989(_0x181b3a){_0x181b3a['done']?_0x2cdcca(_0x181b3a['value']):_0xcdbba6(_0x181b3a['value'])['then'](_0x2f4113,_0x4ba2eb);}_0x3e1989((_0x3976c6=_0x3976c6['apply'](_0x443279,_0x436a16||[]))['next']());});};class Fetch{static['get'](_0x1a2829,_0x4432b4){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x1a2829,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4432b4}});});}static['post'](_0x3601ea,_0x39fe3f,_0x47b27f){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x3601ea,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x39fe3f},'body':_0x47b27f?JSON['stringify'](_0x47b27f):null});});}static['put'](_0x219d6a,_0x4a85b7,_0x358446){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x219d6a,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4a85b7},'body':_0x358446?JSON['stringify'](_0x358446):null});});}static['delete'](_0x1a41f3,_0x59b929){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x1a41f3,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x59b929}});});}}
3
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x26b976,_0x577e97,_0x35d480,_0x5af5cd){function _0x5d30ee(_0x1a4d8c){return _0x1a4d8c instanceof _0x35d480?_0x1a4d8c:new _0x35d480(function(_0x263ebb){_0x263ebb(_0x1a4d8c);});}return new(_0x35d480||(_0x35d480=Promise))(function(_0x19162b,_0x1cba5f){function _0x5c231b(_0x3d9ac8){try{_0x33cfd6(_0x5af5cd['next'](_0x3d9ac8));}catch(_0x431267){_0x1cba5f(_0x431267);}}function _0x168fa4(_0x16ee42){try{_0x33cfd6(_0x5af5cd['throw'](_0x16ee42));}catch(_0x3a13d5){_0x1cba5f(_0x3a13d5);}}function _0x33cfd6(_0x2c237d){_0x2c237d['done']?_0x19162b(_0x2c237d['value']):_0x5d30ee(_0x2c237d['value'])['then'](_0x5c231b,_0x168fa4);}_0x33cfd6((_0x5af5cd=_0x5af5cd['apply'](_0x26b976,_0x577e97||[]))['next']());});};class Fetch{static['get'](_0x3d8e75,_0x659a29){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x3d8e75,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x659a29}});});}static['post'](_0x3b4764,_0x3a7c9f,_0x2aa780){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x3b4764,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3a7c9f},'body':_0x2aa780?JSON['stringify'](_0x2aa780):null});});}static['put'](_0x2087d5,_0x245dd2,_0x5f0a3c){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x2087d5,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x245dd2},'body':_0x5f0a3c?JSON['stringify'](_0x5f0a3c):null});});}static['delete'](_0x2a4803,_0x5015c9){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x2a4803,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x5015c9}});});}}
4
4
 
5
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x2c440e,_0x2b9f37,_0x4238ee,_0x1e052b){function _0xaf9b6(_0x38b50e){return _0x38b50e instanceof _0x4238ee?_0x38b50e:new _0x4238ee(function(_0x5986a8){_0x5986a8(_0x38b50e);});}return new(_0x4238ee||(_0x4238ee=Promise))(function(_0x988832,_0xcf1a3f){function _0x1e2e93(_0x4603a9){try{_0x2a36e9(_0x1e052b['next'](_0x4603a9));}catch(_0xdf894e){_0xcf1a3f(_0xdf894e);}}function _0x244ed9(_0x3e1e56){try{_0x2a36e9(_0x1e052b['throw'](_0x3e1e56));}catch(_0x20c376){_0xcf1a3f(_0x20c376);}}function _0x2a36e9(_0x2af5fb){_0x2af5fb['done']?_0x988832(_0x2af5fb['value']):_0xaf9b6(_0x2af5fb['value'])['then'](_0x1e2e93,_0x244ed9);}_0x2a36e9((_0x1e052b=_0x1e052b['apply'](_0x2c440e,_0x2b9f37||[]))['next']());});};class ListService{constructor(_0x4b194e){this['baseUri']=_0x4b194e;}['add'](_0x2f07a6,_0x41e43d,_0x2360ee){return __awaiter$3(this,arguments,void 0,function*(_0x23dd69,_0xea1094,_0x5400e5,_0x302716={}){var _0x2407a7;let _0x48d051=(_0x2407a7=_0x302716['baseUri'])!==null&&_0x2407a7!==void 0?_0x2407a7:this['baseUri'];_0x48d051=_0x48d051+'/List';const _0xd0b91c={'account_name':_0xea1094,'list_name':_0x5400e5},_0x14689e=yield Fetch['post'](_0x48d051,_0x23dd69,_0xd0b91c);if(_0x14689e['status']>0xc7&&_0x14689e['status']<0x12c){const _0x518117=yield _0x14689e['json']();return new SuccessfulAccountResponse(_0x518117);}if(_0x14689e['bodyUsed']){const _0x5c2172=yield _0x14689e['json']();return new FailedAccountResponse(_0x5c2172);}const _0x3ff639={'type':'','status':_0x14689e['status'],'title':'','instance':'','errors':{}};return new FailedAccountResponse(_0x3ff639);});}['remove'](_0x3f4988,_0x5280d9,_0x733693){return __awaiter$3(this,arguments,void 0,function*(_0x31c7e3,_0x9abbe2,_0x5467af,_0x18180b={}){var _0x6ea324;let _0x3a9c8f=(_0x6ea324=_0x18180b['baseUri'])!==null&&_0x6ea324!==void 0?_0x6ea324:this['baseUri'];_0x3a9c8f=_0x3a9c8f+'/List/'+_0x9abbe2+'/'+_0x5467af;const _0x150ca9=yield Fetch['delete'](_0x3a9c8f,_0x31c7e3);if(_0x150ca9['status']>0xc7&&_0x150ca9['status']<0x12c){const _0x4e058e=yield _0x150ca9['json']();return new SuccessfulAccountResponse(_0x4e058e);}if(_0x150ca9['bodyUsed']){const _0x4d9855=yield _0x150ca9['json']();return new FailedAccountResponse(_0x4d9855);}const _0x2d45a4={'type':'','status':_0x150ca9['status'],'title':'','instance':'','errors':{}};return new FailedAccountResponse(_0x2d45a4);});}}
5
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x5eaedc,_0x56235f,_0x265705,_0x4c3a90){function _0x2c131d(_0x3a91dc){return _0x3a91dc instanceof _0x265705?_0x3a91dc:new _0x265705(function(_0x1f6310){_0x1f6310(_0x3a91dc);});}return new(_0x265705||(_0x265705=Promise))(function(_0x446579,_0x167736){function _0x5ec3d7(_0x31bbb3){try{_0x32e177(_0x4c3a90['next'](_0x31bbb3));}catch(_0xf7d576){_0x167736(_0xf7d576);}}function _0x37e5f9(_0x17544c){try{_0x32e177(_0x4c3a90['throw'](_0x17544c));}catch(_0x51bc2b){_0x167736(_0x51bc2b);}}function _0x32e177(_0x1a0096){_0x1a0096['done']?_0x446579(_0x1a0096['value']):_0x2c131d(_0x1a0096['value'])['then'](_0x5ec3d7,_0x37e5f9);}_0x32e177((_0x4c3a90=_0x4c3a90['apply'](_0x5eaedc,_0x56235f||[]))['next']());});};class ListService{constructor(_0x4d5fdb){this['baseUri']=_0x4d5fdb;}['add'](_0x26063d,_0xccb08a,_0x232908){return __awaiter$3(this,arguments,void 0,function*(_0x2073fb,_0x56180a,_0x518613,_0xc01af4={}){var _0x1cbba6;let _0x4ba248=(_0x1cbba6=_0xc01af4['baseUri'])!==null&&_0x1cbba6!==void 0?_0x1cbba6:this['baseUri'];!_0x4ba248['endsWith']('/')&&(_0x4ba248=_0x4ba248+'/');_0x4ba248=_0x4ba248+'List';const _0x1db539={'account_name':_0x56180a,'list_name':_0x518613},_0x1ea6e9=yield Fetch['post'](_0x4ba248,_0x2073fb,_0x1db539);if(_0x1ea6e9['status']>0xc7&&_0x1ea6e9['status']<0x12c){const _0x40e074=yield _0x1ea6e9['json']();return new SuccessfulAccountResponse(_0x40e074);}if(_0x1ea6e9['bodyUsed']){const _0x4978e1=yield _0x1ea6e9['json']();return new FailedAccountResponse(_0x4978e1);}const _0x5d17be={'type':'','status':_0x1ea6e9['status'],'title':'','instance':'','errors':{}};return new FailedAccountResponse(_0x5d17be);});}['remove'](_0x17d7a9,_0x150710,_0x36c60e){return __awaiter$3(this,arguments,void 0,function*(_0x212e05,_0x18c537,_0x5b682c,_0x556be9={}){var _0x5e349a;let _0x5a433c=(_0x5e349a=_0x556be9['baseUri'])!==null&&_0x5e349a!==void 0?_0x5e349a:this['baseUri'];_0x5a433c=_0x5a433c+'/List/'+_0x18c537+'/'+_0x5b682c;const _0x3e6770=yield Fetch['delete'](_0x5a433c,_0x212e05);if(_0x3e6770['status']>0xc7&&_0x3e6770['status']<0x12c){const _0x5022f9=yield _0x3e6770['json']();return new SuccessfulAccountResponse(_0x5022f9);}if(_0x3e6770['bodyUsed']){const _0x2b44f7=yield _0x3e6770['json']();return new FailedAccountResponse(_0x2b44f7);}const _0x107bef={'type':'','status':_0x3e6770['status'],'title':'','instance':'','errors':{}};return new FailedAccountResponse(_0x107bef);});}}
6
6
 
7
- class Response{constructor(_0x179c24){this['isSuccess']=_0x179c24;}}class SuccessfulAccountResponse extends Response{constructor(_0x557fa4){super(!![]),this['account']=_0x557fa4;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x517ed1){super(![]),this['problem']=_0x517ed1;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulRefreshResponse extends Response{constructor(_0x40c572){super(!![]),this['tokens']=_0x40c572;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedRefreshResponse extends Response{constructor(_0xbd6ac5){super(![]),this['problem']=_0xbd6ac5;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
7
+ class Response{constructor(_0x1432e5){this['isSuccess']=_0x1432e5;}}class SuccessfulAccountResponse extends Response{constructor(_0x449d65){super(!![]),this['account']=_0x449d65;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x2b5065){super(![]),this['problem']=_0x2b5065;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulRefreshResponse extends Response{constructor(_0x3286c2){super(!![]),this['tokens']=_0x3286c2;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedRefreshResponse extends Response{constructor(_0x341ae3){super(![]),this['problem']=_0x341ae3;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
8
8
 
9
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x44eb8a,_0x58c7f0,_0x4e7c44,_0x77da4f){function _0x1e3894(_0x20716f){return _0x20716f instanceof _0x4e7c44?_0x20716f:new _0x4e7c44(function(_0x6af8d9){_0x6af8d9(_0x20716f);});}return new(_0x4e7c44||(_0x4e7c44=Promise))(function(_0x1d39de,_0xfc14a0){function _0x845f0a(_0x5164c4){try{_0x3c578d(_0x77da4f['next'](_0x5164c4));}catch(_0x346964){_0xfc14a0(_0x346964);}}function _0x3297ee(_0x19738f){try{_0x3c578d(_0x77da4f['throw'](_0x19738f));}catch(_0x174aae){_0xfc14a0(_0x174aae);}}function _0x3c578d(_0x3f9124){_0x3f9124['done']?_0x1d39de(_0x3f9124['value']):_0x1e3894(_0x3f9124['value'])['then'](_0x845f0a,_0x3297ee);}_0x3c578d((_0x77da4f=_0x77da4f['apply'](_0x44eb8a,_0x58c7f0||[]))['next']());});};class AccountService{constructor(_0x1f26d5){this['baseUri']=_0x1f26d5;}['get'](_0x31d789,_0x471c04){return __awaiter$2(this,arguments,void 0,function*(_0x5a55ad,_0x519199,_0x193014={}){var _0x283e67;let _0xa48d93=(_0x283e67=_0x193014['baseUri'])!==null&&_0x283e67!==void 0?_0x283e67:this['baseUri'];_0xa48d93=_0xa48d93+'/Account/'+_0x519199+'/';const _0x3b2432=yield Fetch['get'](_0xa48d93,_0x5a55ad);if(_0x3b2432['status']>0xc7&&_0x3b2432['status']<0x12c){const _0x33675d=yield _0x3b2432['json']();return new SuccessfulAccountResponse(_0x33675d);}if(_0x3b2432['bodyUsed']){const _0x523549=yield _0x3b2432['json']();return new FailedAccountResponse(_0x523549);}const _0x4506f1={'type':'','status':_0x3b2432['status'],'title':'','instance':'','errors':{}};return new FailedAccountResponse(_0x4506f1);});}}
9
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x1c0d47,_0x4b366c,_0x33ca5,_0x8f3279){function _0x5396a9(_0x3c7be7){return _0x3c7be7 instanceof _0x33ca5?_0x3c7be7:new _0x33ca5(function(_0x3782e0){_0x3782e0(_0x3c7be7);});}return new(_0x33ca5||(_0x33ca5=Promise))(function(_0x24ed25,_0x489e7e){function _0x214b93(_0x14db67){try{_0x47bb4f(_0x8f3279['next'](_0x14db67));}catch(_0x4e8447){_0x489e7e(_0x4e8447);}}function _0x3c0936(_0x313a40){try{_0x47bb4f(_0x8f3279['throw'](_0x313a40));}catch(_0x4accdd){_0x489e7e(_0x4accdd);}}function _0x47bb4f(_0x2e1bf8){_0x2e1bf8['done']?_0x24ed25(_0x2e1bf8['value']):_0x5396a9(_0x2e1bf8['value'])['then'](_0x214b93,_0x3c0936);}_0x47bb4f((_0x8f3279=_0x8f3279['apply'](_0x1c0d47,_0x4b366c||[]))['next']());});};class AccountService{constructor(_0x1295e6){this['baseUri']=_0x1295e6;}['get'](_0x1369b1,_0x58fb1c){return __awaiter$2(this,arguments,void 0,function*(_0x21ee7d,_0x1d6219,_0x186115={}){var _0x5ea899;let _0xc9fc59=(_0x5ea899=_0x186115['baseUri'])!==null&&_0x5ea899!==void 0?_0x5ea899:this['baseUri'];!_0xc9fc59['endsWith']('/')&&(_0xc9fc59=_0xc9fc59+'/');_0xc9fc59=_0xc9fc59+'Account/'+_0x1d6219+'/';const _0x2cc8ac=yield Fetch['get'](_0xc9fc59,_0x21ee7d);if(_0x2cc8ac['status']>0xc7&&_0x2cc8ac['status']<0x12c){const _0x11e72c=yield _0x2cc8ac['json']();return new SuccessfulAccountResponse(_0x11e72c);}if(_0x2cc8ac['bodyUsed']){const _0x31aa40=yield _0x2cc8ac['json']();return new FailedAccountResponse(_0x31aa40);}const _0x1e0800={'type':'','status':_0x2cc8ac['status'],'title':'','instance':'','errors':{}};return new FailedAccountResponse(_0x1e0800);});}}
10
10
 
11
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x5bc795,_0x88fc1e,_0x14330f,_0x406143){function _0x2e6df9(_0xa52a30){return _0xa52a30 instanceof _0x14330f?_0xa52a30:new _0x14330f(function(_0x34e356){_0x34e356(_0xa52a30);});}return new(_0x14330f||(_0x14330f=Promise))(function(_0x471f4a,_0x5ced6b){function _0x17fbab(_0x2a0647){try{_0x2c4253(_0x406143['next'](_0x2a0647));}catch(_0x480d17){_0x5ced6b(_0x480d17);}}function _0x2927f2(_0xa85613){try{_0x2c4253(_0x406143['throw'](_0xa85613));}catch(_0x293094){_0x5ced6b(_0x293094);}}function _0x2c4253(_0x1aae34){_0x1aae34['done']?_0x471f4a(_0x1aae34['value']):_0x2e6df9(_0x1aae34['value'])['then'](_0x17fbab,_0x2927f2);}_0x2c4253((_0x406143=_0x406143['apply'](_0x5bc795,_0x88fc1e||[]))['next']());});};class TokenManager{constructor(_0x224c21){this['securityService']=_0x224c21;}['RefreshTokens'](_0x367645){return __awaiter$1(this,void 0,void 0,function*(){if(Date['now']()<_0x367645['access_expires'])return new SuccessfulRefreshResponse(_0x367645);if(Date['now']()>_0x367645['refresh_expires']){const _0x321add={'type':'','status':0x193,'title':'Forbidden','instance':'','errors':{}};return new FailedRefreshResponse(_0x321add);}const _0x47e974=yield this['securityService']['refresh'](_0x367645['refresh_token']);if(!_0x47e974['isSuccess'])return new FailedRefreshResponse(_0x47e974['toProblem']());return new SuccessfulRefreshResponse(_0x47e974['toSuccess']());});}}
11
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0xbe58b2,_0x49d0fe,_0x5e20d2,_0x261379){function _0x562931(_0x39889e){return _0x39889e instanceof _0x5e20d2?_0x39889e:new _0x5e20d2(function(_0x2892aa){_0x2892aa(_0x39889e);});}return new(_0x5e20d2||(_0x5e20d2=Promise))(function(_0x4d2471,_0x85ae8a){function _0x4edb75(_0x5a543b){try{_0x3db309(_0x261379['next'](_0x5a543b));}catch(_0x5e297b){_0x85ae8a(_0x5e297b);}}function _0x39f81f(_0x237de){try{_0x3db309(_0x261379['throw'](_0x237de));}catch(_0x3450a5){_0x85ae8a(_0x3450a5);}}function _0x3db309(_0x253c4d){_0x253c4d['done']?_0x4d2471(_0x253c4d['value']):_0x562931(_0x253c4d['value'])['then'](_0x4edb75,_0x39f81f);}_0x3db309((_0x261379=_0x261379['apply'](_0xbe58b2,_0x49d0fe||[]))['next']());});};class TokenManager{constructor(_0x210695){this['securityService']=_0x210695;}['RefreshTokens'](_0x41f744){return __awaiter$1(this,void 0,void 0,function*(){if(Date['now']()<_0x41f744['access_expires'])return new SuccessfulRefreshResponse(_0x41f744);if(Date['now']()>_0x41f744['refresh_expires']){const _0x336cf8={'type':'','status':0x193,'title':'Forbidden','instance':'','errors':{}};return new FailedRefreshResponse(_0x336cf8);}const _0x39eab1=yield this['securityService']['refresh'](_0x41f744['refresh_token']);if(!_0x39eab1['isSuccess'])return new FailedRefreshResponse(_0x39eab1['toProblem']());return new SuccessfulRefreshResponse(_0x39eab1['toSuccess']());});}}
12
12
 
13
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x4ba3bd,_0x5bd25f,_0x3ade23,_0xbf2e62){function _0x42314a(_0x428c17){return _0x428c17 instanceof _0x3ade23?_0x428c17:new _0x3ade23(function(_0x1dbeec){_0x1dbeec(_0x428c17);});}return new(_0x3ade23||(_0x3ade23=Promise))(function(_0x5ac8b6,_0x2d3d50){function _0x5967e4(_0x2ca42b){try{_0xd509c7(_0xbf2e62['next'](_0x2ca42b));}catch(_0x1ba6bd){_0x2d3d50(_0x1ba6bd);}}function _0x1a0f44(_0x31da00){try{_0xd509c7(_0xbf2e62['throw'](_0x31da00));}catch(_0x3f7155){_0x2d3d50(_0x3f7155);}}function _0xd509c7(_0x8608d4){_0x8608d4['done']?_0x5ac8b6(_0x8608d4['value']):_0x42314a(_0x8608d4['value'])['then'](_0x5967e4,_0x1a0f44);}_0xd509c7((_0xbf2e62=_0xbf2e62['apply'](_0x4ba3bd,_0x5bd25f||[]))['next']());});};class SecurityService{constructor(_0x3b3eb1){this['baseUri']=_0x3b3eb1,this['tokenManager']=new TokenManager(this);}['refresh'](_0x56d88c){return __awaiter(this,arguments,void 0,function*(_0x393e79,_0x29bd87={}){var _0x17fad9;let _0x40aaeb=(_0x17fad9=_0x29bd87['baseUri'])!==null&&_0x17fad9!==void 0?_0x17fad9:this['baseUri'];_0x40aaeb=_0x40aaeb+'/Security/Refresh';const _0x563425=yield Fetch['post'](_0x40aaeb,_0x393e79,null);if(_0x563425['status']>0xc7&&_0x563425['status']<0x12c){const _0x9919af=yield _0x563425['json']();return new SuccessfulRefreshResponse(_0x9919af);}if(_0x563425['bodyUsed']){const _0x2db682=yield _0x563425['json']();return new FailedRefreshResponse(_0x2db682);}const _0x1f4bb1={'type':'','status':_0x563425['status'],'title':'','instance':'','errors':{}};return new FailedRefreshResponse(_0x1f4bb1);});}}
13
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x3ad69e,_0x5cace8,_0x430397,_0x48dab6){function _0x5ab103(_0x3ff3ec){return _0x3ff3ec instanceof _0x430397?_0x3ff3ec:new _0x430397(function(_0x296d1c){_0x296d1c(_0x3ff3ec);});}return new(_0x430397||(_0x430397=Promise))(function(_0x4db515,_0x5b8b5a){function _0x13ba04(_0x4bb6c5){try{_0x18c6ec(_0x48dab6['next'](_0x4bb6c5));}catch(_0x5b732b){_0x5b8b5a(_0x5b732b);}}function _0x11d155(_0x3a6fc1){try{_0x18c6ec(_0x48dab6['throw'](_0x3a6fc1));}catch(_0x452599){_0x5b8b5a(_0x452599);}}function _0x18c6ec(_0x800cda){_0x800cda['done']?_0x4db515(_0x800cda['value']):_0x5ab103(_0x800cda['value'])['then'](_0x13ba04,_0x11d155);}_0x18c6ec((_0x48dab6=_0x48dab6['apply'](_0x3ad69e,_0x5cace8||[]))['next']());});};class SecurityService{constructor(_0x497d82){this['baseUri']=_0x497d82,this['tokenManager']=new TokenManager(this);}['refresh'](_0x473d40){return __awaiter(this,arguments,void 0,function*(_0x4a7b46,_0x4c6ca8={}){var _0x40cebb;let _0x50b01=(_0x40cebb=_0x4c6ca8['baseUri'])!==null&&_0x40cebb!==void 0?_0x40cebb:this['baseUri'];!_0x50b01['endsWith']('/')&&(_0x50b01=_0x50b01+'/');_0x50b01=_0x50b01+'Security/Refresh';const _0x3bd25a=yield Fetch['post'](_0x50b01,_0x4a7b46,null);if(_0x3bd25a['status']>0xc7&&_0x3bd25a['status']<0x12c){const _0x46c97c=yield _0x3bd25a['json']();return new SuccessfulRefreshResponse(_0x46c97c);}if(_0x3bd25a['bodyUsed']){const _0x45bf05=yield _0x3bd25a['json']();return new FailedRefreshResponse(_0x45bf05);}const _0x4eff38={'type':'','status':_0x3bd25a['status'],'title':'','instance':'','errors':{}};return new FailedRefreshResponse(_0x4eff38);});}}
14
14
 
15
- var _a;class AdminClient{}_a=AdminClient,AdminClient['baseUri']='https://admin.searchability.dev',AdminClient['Accounts']=new AccountService(_a['baseUri']),AdminClient['Lists']=new ListService(_a['baseUri']),AdminClient['Security']=new SecurityService(_a['baseUri']);
15
+ var _a;class AdminClient{}_a=AdminClient,AdminClient['baseUri']='https://admin.searchability.dev/',AdminClient['Accounts']=new AccountService(_a['baseUri']),AdminClient['Lists']=new ListService(_a['baseUri']),AdminClient['Security']=new SecurityService(_a['baseUri']);
16
16
 
17
17
  exports.AdminClient = AdminClient;
@@ -1,15 +1,15 @@
1
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x2f4c13,_0x57a28c,_0x5e31e6,_0x4c9520){function _0x535069(_0x4db99a){return _0x4db99a instanceof _0x5e31e6?_0x4db99a:new _0x5e31e6(function(_0x474577){_0x474577(_0x4db99a);});}return new(_0x5e31e6||(_0x5e31e6=Promise))(function(_0x51b2d3,_0x17f12b){function _0x4ece6c(_0x2bae1c){try{_0x421c3d(_0x4c9520['next'](_0x2bae1c));}catch(_0x5cc7df){_0x17f12b(_0x5cc7df);}}function _0x22116a(_0x4b5c9d){try{_0x421c3d(_0x4c9520['throw'](_0x4b5c9d));}catch(_0x1d19f2){_0x17f12b(_0x1d19f2);}}function _0x421c3d(_0x45e807){_0x45e807['done']?_0x51b2d3(_0x45e807['value']):_0x535069(_0x45e807['value'])['then'](_0x4ece6c,_0x22116a);}_0x421c3d((_0x4c9520=_0x4c9520['apply'](_0x2f4c13,_0x57a28c||[]))['next']());});};class Fetch{static['get'](_0x2cef69,_0x21b038){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x2cef69,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x21b038}});});}static['post'](_0x365774,_0x55af25,_0x4e9f53){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x365774,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x55af25},'body':_0x4e9f53?JSON['stringify'](_0x4e9f53):null});});}static['put'](_0x5654ba,_0x505e98,_0x139512){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x5654ba,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x505e98},'body':_0x139512?JSON['stringify'](_0x139512):null});});}static['delete'](_0x324e87,_0x594ddc){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x324e87,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x594ddc}});});}}
1
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x57eabd,_0x36ba67,_0x41ee23,_0x2acf31){function _0x22bd23(_0xbbe5ca){return _0xbbe5ca instanceof _0x41ee23?_0xbbe5ca:new _0x41ee23(function(_0x2a690e){_0x2a690e(_0xbbe5ca);});}return new(_0x41ee23||(_0x41ee23=Promise))(function(_0x16c429,_0x574c9b){function _0x5b91f8(_0x54ee9f){try{_0x199569(_0x2acf31['next'](_0x54ee9f));}catch(_0x439de0){_0x574c9b(_0x439de0);}}function _0x275cd1(_0x3e88b8){try{_0x199569(_0x2acf31['throw'](_0x3e88b8));}catch(_0x86aab6){_0x574c9b(_0x86aab6);}}function _0x199569(_0x1682e4){_0x1682e4['done']?_0x16c429(_0x1682e4['value']):_0x22bd23(_0x1682e4['value'])['then'](_0x5b91f8,_0x275cd1);}_0x199569((_0x2acf31=_0x2acf31['apply'](_0x57eabd,_0x36ba67||[]))['next']());});};class Fetch{static['get'](_0x18a213,_0xe9c6e5){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x18a213,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0xe9c6e5}});});}static['post'](_0x129b94,_0x4a2ae7,_0x46f6d2){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x129b94,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4a2ae7},'body':_0x46f6d2?JSON['stringify'](_0x46f6d2):null});});}static['put'](_0x143fe9,_0x32fa31,_0x3c0102){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x143fe9,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x32fa31},'body':_0x3c0102?JSON['stringify'](_0x3c0102):null});});}static['delete'](_0x4475a4,_0x4e478c){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x4475a4,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4e478c}});});}}
2
2
 
3
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0xde33b,_0x180471,_0xef0bc6,_0x41c7e7){function _0x2fe3a9(_0x2a713f){return _0x2a713f instanceof _0xef0bc6?_0x2a713f:new _0xef0bc6(function(_0x1965a9){_0x1965a9(_0x2a713f);});}return new(_0xef0bc6||(_0xef0bc6=Promise))(function(_0x35f909,_0xfe6699){function _0x1dd158(_0x4f5533){try{_0x5a606b(_0x41c7e7['next'](_0x4f5533));}catch(_0x21b2cb){_0xfe6699(_0x21b2cb);}}function _0x58d1eb(_0x4c76f4){try{_0x5a606b(_0x41c7e7['throw'](_0x4c76f4));}catch(_0x4c9039){_0xfe6699(_0x4c9039);}}function _0x5a606b(_0x55f305){_0x55f305['done']?_0x35f909(_0x55f305['value']):_0x2fe3a9(_0x55f305['value'])['then'](_0x1dd158,_0x58d1eb);}_0x5a606b((_0x41c7e7=_0x41c7e7['apply'](_0xde33b,_0x180471||[]))['next']());});};class ListService{constructor(_0x998b0b){this['baseUri']=_0x998b0b;}['add'](_0x43106d,_0x464710,_0x4abcf4){return __awaiter$3(this,arguments,void 0,function*(_0x21a7b2,_0xa8a8f4,_0x477bc7,_0x23d755={}){var _0x38bd32;let _0x168869=(_0x38bd32=_0x23d755['baseUri'])!==null&&_0x38bd32!==void 0?_0x38bd32:this['baseUri'];_0x168869=_0x168869+'/List';const _0xe8e7b1={'account_name':_0xa8a8f4,'list_name':_0x477bc7},_0x52a437=yield Fetch['post'](_0x168869,_0x21a7b2,_0xe8e7b1);if(_0x52a437['status']>0xc7&&_0x52a437['status']<0x12c){const _0x996d9=yield _0x52a437['json']();return new SuccessfulAccountResponse(_0x996d9);}if(_0x52a437['bodyUsed']){const _0x275316=yield _0x52a437['json']();return new FailedAccountResponse(_0x275316);}const _0x5c19d8={'type':'','status':_0x52a437['status'],'title':'','instance':'','errors':{}};return new FailedAccountResponse(_0x5c19d8);});}['remove'](_0x31536c,_0x3fcb82,_0x17e8dd){return __awaiter$3(this,arguments,void 0,function*(_0x4a19af,_0x1cdecb,_0x13ce5a,_0x2b39fa={}){var _0x2ee500;let _0x34ae6e=(_0x2ee500=_0x2b39fa['baseUri'])!==null&&_0x2ee500!==void 0?_0x2ee500:this['baseUri'];_0x34ae6e=_0x34ae6e+'/List/'+_0x1cdecb+'/'+_0x13ce5a;const _0x28ce30=yield Fetch['delete'](_0x34ae6e,_0x4a19af);if(_0x28ce30['status']>0xc7&&_0x28ce30['status']<0x12c){const _0xfb95a4=yield _0x28ce30['json']();return new SuccessfulAccountResponse(_0xfb95a4);}if(_0x28ce30['bodyUsed']){const _0x39fce6=yield _0x28ce30['json']();return new FailedAccountResponse(_0x39fce6);}const _0x16a5d3={'type':'','status':_0x28ce30['status'],'title':'','instance':'','errors':{}};return new FailedAccountResponse(_0x16a5d3);});}}
3
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x15527d,_0x177f53,_0x4e6cac,_0x392356){function _0x209797(_0x3a9be3){return _0x3a9be3 instanceof _0x4e6cac?_0x3a9be3:new _0x4e6cac(function(_0x1c78f6){_0x1c78f6(_0x3a9be3);});}return new(_0x4e6cac||(_0x4e6cac=Promise))(function(_0x505f6d,_0x1df980){function _0x4e1c7d(_0x476f23){try{_0x197398(_0x392356['next'](_0x476f23));}catch(_0x71d635){_0x1df980(_0x71d635);}}function _0x4d3a9c(_0x5182f5){try{_0x197398(_0x392356['throw'](_0x5182f5));}catch(_0x314167){_0x1df980(_0x314167);}}function _0x197398(_0x5b3c69){_0x5b3c69['done']?_0x505f6d(_0x5b3c69['value']):_0x209797(_0x5b3c69['value'])['then'](_0x4e1c7d,_0x4d3a9c);}_0x197398((_0x392356=_0x392356['apply'](_0x15527d,_0x177f53||[]))['next']());});};class ListService{constructor(_0xd123f8){this['baseUri']=_0xd123f8;}['add'](_0xe66136,_0xc0a37c,_0xd96249){return __awaiter$3(this,arguments,void 0,function*(_0x582bd6,_0x4fd25b,_0x1fdfb3,_0x24942e={}){var _0x271119;let _0x29cb51=(_0x271119=_0x24942e['baseUri'])!==null&&_0x271119!==void 0?_0x271119:this['baseUri'];!_0x29cb51['endsWith']('/')&&(_0x29cb51=_0x29cb51+'/');_0x29cb51=_0x29cb51+'List';const _0x7e52c9={'account_name':_0x4fd25b,'list_name':_0x1fdfb3},_0x633fde=yield Fetch['post'](_0x29cb51,_0x582bd6,_0x7e52c9);if(_0x633fde['status']>0xc7&&_0x633fde['status']<0x12c){const _0x63cb57=yield _0x633fde['json']();return new SuccessfulAccountResponse(_0x63cb57);}if(_0x633fde['bodyUsed']){const _0x4d85a8=yield _0x633fde['json']();return new FailedAccountResponse(_0x4d85a8);}const _0x5b1334={'type':'','status':_0x633fde['status'],'title':'','instance':'','errors':{}};return new FailedAccountResponse(_0x5b1334);});}['remove'](_0x19ab56,_0x4b1345,_0x4718ea){return __awaiter$3(this,arguments,void 0,function*(_0x5661f7,_0x595086,_0x157c1f,_0x4b1e33={}){var _0x1abad1;let _0x2fb13a=(_0x1abad1=_0x4b1e33['baseUri'])!==null&&_0x1abad1!==void 0?_0x1abad1:this['baseUri'];_0x2fb13a=_0x2fb13a+'/List/'+_0x595086+'/'+_0x157c1f;const _0x3fecb5=yield Fetch['delete'](_0x2fb13a,_0x5661f7);if(_0x3fecb5['status']>0xc7&&_0x3fecb5['status']<0x12c){const _0x278fb0=yield _0x3fecb5['json']();return new SuccessfulAccountResponse(_0x278fb0);}if(_0x3fecb5['bodyUsed']){const _0x1cc9a3=yield _0x3fecb5['json']();return new FailedAccountResponse(_0x1cc9a3);}const _0x5b6ccf={'type':'','status':_0x3fecb5['status'],'title':'','instance':'','errors':{}};return new FailedAccountResponse(_0x5b6ccf);});}}
4
4
 
5
- class Response{constructor(_0x1b7c40){this['isSuccess']=_0x1b7c40;}}class SuccessfulAccountResponse extends Response{constructor(_0x252fc6){super(!![]),this['account']=_0x252fc6;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x2cb38a){super(![]),this['problem']=_0x2cb38a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulRefreshResponse extends Response{constructor(_0x2b37e1){super(!![]),this['tokens']=_0x2b37e1;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedRefreshResponse extends Response{constructor(_0x59ec01){super(![]),this['problem']=_0x59ec01;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
5
+ class Response{constructor(_0x5db6a5){this['isSuccess']=_0x5db6a5;}}class SuccessfulAccountResponse extends Response{constructor(_0x1f7188){super(!![]),this['account']=_0x1f7188;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x83fd19){super(![]),this['problem']=_0x83fd19;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulRefreshResponse extends Response{constructor(_0x231240){super(!![]),this['tokens']=_0x231240;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedRefreshResponse extends Response{constructor(_0x47eb45){super(![]),this['problem']=_0x47eb45;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
6
6
 
7
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x3d2be1,_0x593792,_0x555e20,_0x2b59be){function _0x4df4d7(_0x9d4814){return _0x9d4814 instanceof _0x555e20?_0x9d4814:new _0x555e20(function(_0x39d892){_0x39d892(_0x9d4814);});}return new(_0x555e20||(_0x555e20=Promise))(function(_0x2003fd,_0x156be8){function _0x56e535(_0x3669a2){try{_0x528c08(_0x2b59be['next'](_0x3669a2));}catch(_0x7a96bc){_0x156be8(_0x7a96bc);}}function _0x3419e4(_0x2de69d){try{_0x528c08(_0x2b59be['throw'](_0x2de69d));}catch(_0x1ed6fc){_0x156be8(_0x1ed6fc);}}function _0x528c08(_0x2d68bb){_0x2d68bb['done']?_0x2003fd(_0x2d68bb['value']):_0x4df4d7(_0x2d68bb['value'])['then'](_0x56e535,_0x3419e4);}_0x528c08((_0x2b59be=_0x2b59be['apply'](_0x3d2be1,_0x593792||[]))['next']());});};class AccountService{constructor(_0xd4c74c){this['baseUri']=_0xd4c74c;}['get'](_0x4a83a2,_0x49fa55){return __awaiter$2(this,arguments,void 0,function*(_0x49ec8a,_0x5ec3db,_0x39f1d3={}){var _0x5b5989;let _0x1a943a=(_0x5b5989=_0x39f1d3['baseUri'])!==null&&_0x5b5989!==void 0?_0x5b5989:this['baseUri'];_0x1a943a=_0x1a943a+'/Account/'+_0x5ec3db+'/';const _0x36a462=yield Fetch['get'](_0x1a943a,_0x49ec8a);if(_0x36a462['status']>0xc7&&_0x36a462['status']<0x12c){const _0x76e6c8=yield _0x36a462['json']();return new SuccessfulAccountResponse(_0x76e6c8);}if(_0x36a462['bodyUsed']){const _0x973862=yield _0x36a462['json']();return new FailedAccountResponse(_0x973862);}const _0x19347e={'type':'','status':_0x36a462['status'],'title':'','instance':'','errors':{}};return new FailedAccountResponse(_0x19347e);});}}
7
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x28694f,_0x1a9e79,_0x317e6c,_0x161a07){function _0x2a3013(_0x128c13){return _0x128c13 instanceof _0x317e6c?_0x128c13:new _0x317e6c(function(_0x751e4c){_0x751e4c(_0x128c13);});}return new(_0x317e6c||(_0x317e6c=Promise))(function(_0x3c1218,_0x4a75f6){function _0x3511ab(_0x324773){try{_0x4cc1f0(_0x161a07['next'](_0x324773));}catch(_0x56542e){_0x4a75f6(_0x56542e);}}function _0x94cd92(_0x339f9c){try{_0x4cc1f0(_0x161a07['throw'](_0x339f9c));}catch(_0x4b8091){_0x4a75f6(_0x4b8091);}}function _0x4cc1f0(_0xf77f88){_0xf77f88['done']?_0x3c1218(_0xf77f88['value']):_0x2a3013(_0xf77f88['value'])['then'](_0x3511ab,_0x94cd92);}_0x4cc1f0((_0x161a07=_0x161a07['apply'](_0x28694f,_0x1a9e79||[]))['next']());});};class AccountService{constructor(_0x563378){this['baseUri']=_0x563378;}['get'](_0x5d6633,_0x3e9c5d){return __awaiter$2(this,arguments,void 0,function*(_0x13b384,_0x4ac820,_0x51d7f2={}){var _0x56b61a;let _0x3aa3bd=(_0x56b61a=_0x51d7f2['baseUri'])!==null&&_0x56b61a!==void 0?_0x56b61a:this['baseUri'];!_0x3aa3bd['endsWith']('/')&&(_0x3aa3bd=_0x3aa3bd+'/');_0x3aa3bd=_0x3aa3bd+'Account/'+_0x4ac820+'/';const _0xdb77e9=yield Fetch['get'](_0x3aa3bd,_0x13b384);if(_0xdb77e9['status']>0xc7&&_0xdb77e9['status']<0x12c){const _0x362940=yield _0xdb77e9['json']();return new SuccessfulAccountResponse(_0x362940);}if(_0xdb77e9['bodyUsed']){const _0x241707=yield _0xdb77e9['json']();return new FailedAccountResponse(_0x241707);}const _0x3d990b={'type':'','status':_0xdb77e9['status'],'title':'','instance':'','errors':{}};return new FailedAccountResponse(_0x3d990b);});}}
8
8
 
9
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x3435eb,_0x141ada,_0x2a350c,_0x1ca1f3){function _0x41de32(_0x379208){return _0x379208 instanceof _0x2a350c?_0x379208:new _0x2a350c(function(_0x573e42){_0x573e42(_0x379208);});}return new(_0x2a350c||(_0x2a350c=Promise))(function(_0x3aebf3,_0x51a302){function _0x4471ea(_0x4aa646){try{_0x402ed0(_0x1ca1f3['next'](_0x4aa646));}catch(_0x405d1b){_0x51a302(_0x405d1b);}}function _0x1f9eca(_0x262b27){try{_0x402ed0(_0x1ca1f3['throw'](_0x262b27));}catch(_0x434713){_0x51a302(_0x434713);}}function _0x402ed0(_0x4eebb4){_0x4eebb4['done']?_0x3aebf3(_0x4eebb4['value']):_0x41de32(_0x4eebb4['value'])['then'](_0x4471ea,_0x1f9eca);}_0x402ed0((_0x1ca1f3=_0x1ca1f3['apply'](_0x3435eb,_0x141ada||[]))['next']());});};class TokenManager{constructor(_0x523744){this['securityService']=_0x523744;}['RefreshTokens'](_0x1d1f66){return __awaiter$1(this,void 0,void 0,function*(){if(Date['now']()<_0x1d1f66['access_expires'])return new SuccessfulRefreshResponse(_0x1d1f66);if(Date['now']()>_0x1d1f66['refresh_expires']){const _0x1fed22={'type':'','status':0x193,'title':'Forbidden','instance':'','errors':{}};return new FailedRefreshResponse(_0x1fed22);}const _0x177cb7=yield this['securityService']['refresh'](_0x1d1f66['refresh_token']);if(!_0x177cb7['isSuccess'])return new FailedRefreshResponse(_0x177cb7['toProblem']());return new SuccessfulRefreshResponse(_0x177cb7['toSuccess']());});}}
9
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x14f533,_0x36061a,_0x4dda07,_0x556141){function _0x518aa6(_0x3feffc){return _0x3feffc instanceof _0x4dda07?_0x3feffc:new _0x4dda07(function(_0x129623){_0x129623(_0x3feffc);});}return new(_0x4dda07||(_0x4dda07=Promise))(function(_0x2102f8,_0x3e8634){function _0x15b2df(_0x40f9d0){try{_0x29497c(_0x556141['next'](_0x40f9d0));}catch(_0x3e0992){_0x3e8634(_0x3e0992);}}function _0x43cce6(_0x40cffc){try{_0x29497c(_0x556141['throw'](_0x40cffc));}catch(_0x4cb5af){_0x3e8634(_0x4cb5af);}}function _0x29497c(_0x5725d9){_0x5725d9['done']?_0x2102f8(_0x5725d9['value']):_0x518aa6(_0x5725d9['value'])['then'](_0x15b2df,_0x43cce6);}_0x29497c((_0x556141=_0x556141['apply'](_0x14f533,_0x36061a||[]))['next']());});};class TokenManager{constructor(_0x3a93d1){this['securityService']=_0x3a93d1;}['RefreshTokens'](_0x20c6a2){return __awaiter$1(this,void 0,void 0,function*(){if(Date['now']()<_0x20c6a2['access_expires'])return new SuccessfulRefreshResponse(_0x20c6a2);if(Date['now']()>_0x20c6a2['refresh_expires']){const _0x230e5c={'type':'','status':0x193,'title':'Forbidden','instance':'','errors':{}};return new FailedRefreshResponse(_0x230e5c);}const _0x421d26=yield this['securityService']['refresh'](_0x20c6a2['refresh_token']);if(!_0x421d26['isSuccess'])return new FailedRefreshResponse(_0x421d26['toProblem']());return new SuccessfulRefreshResponse(_0x421d26['toSuccess']());});}}
10
10
 
11
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x27fce2,_0x2ea7e0,_0xbd7d6a,_0x455eef){function _0xed4b51(_0x4b6e6d){return _0x4b6e6d instanceof _0xbd7d6a?_0x4b6e6d:new _0xbd7d6a(function(_0xbc4655){_0xbc4655(_0x4b6e6d);});}return new(_0xbd7d6a||(_0xbd7d6a=Promise))(function(_0x2ca4b3,_0x19ddeb){function _0xefa90f(_0x2f1570){try{_0x6f1edf(_0x455eef['next'](_0x2f1570));}catch(_0x5030a9){_0x19ddeb(_0x5030a9);}}function _0x1eac5c(_0x38c93b){try{_0x6f1edf(_0x455eef['throw'](_0x38c93b));}catch(_0x263841){_0x19ddeb(_0x263841);}}function _0x6f1edf(_0x415190){_0x415190['done']?_0x2ca4b3(_0x415190['value']):_0xed4b51(_0x415190['value'])['then'](_0xefa90f,_0x1eac5c);}_0x6f1edf((_0x455eef=_0x455eef['apply'](_0x27fce2,_0x2ea7e0||[]))['next']());});};class SecurityService{constructor(_0x2952ff){this['baseUri']=_0x2952ff,this['tokenManager']=new TokenManager(this);}['refresh'](_0x1f27dd){return __awaiter(this,arguments,void 0,function*(_0x5de477,_0x502c61={}){var _0x388a60;let _0x3f3927=(_0x388a60=_0x502c61['baseUri'])!==null&&_0x388a60!==void 0?_0x388a60:this['baseUri'];_0x3f3927=_0x3f3927+'/Security/Refresh';const _0x34efb6=yield Fetch['post'](_0x3f3927,_0x5de477,null);if(_0x34efb6['status']>0xc7&&_0x34efb6['status']<0x12c){const _0x209c7c=yield _0x34efb6['json']();return new SuccessfulRefreshResponse(_0x209c7c);}if(_0x34efb6['bodyUsed']){const _0x1044df=yield _0x34efb6['json']();return new FailedRefreshResponse(_0x1044df);}const _0x3c0d79={'type':'','status':_0x34efb6['status'],'title':'','instance':'','errors':{}};return new FailedRefreshResponse(_0x3c0d79);});}}
11
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x4582be,_0x37e07d,_0x155afa,_0x291eec){function _0x506014(_0x147db7){return _0x147db7 instanceof _0x155afa?_0x147db7:new _0x155afa(function(_0x62764){_0x62764(_0x147db7);});}return new(_0x155afa||(_0x155afa=Promise))(function(_0xd26d61,_0x6acf8e){function _0x5d76a4(_0x4da379){try{_0x6cae41(_0x291eec['next'](_0x4da379));}catch(_0x1f185f){_0x6acf8e(_0x1f185f);}}function _0x334790(_0x59b712){try{_0x6cae41(_0x291eec['throw'](_0x59b712));}catch(_0x34e63d){_0x6acf8e(_0x34e63d);}}function _0x6cae41(_0x4f984e){_0x4f984e['done']?_0xd26d61(_0x4f984e['value']):_0x506014(_0x4f984e['value'])['then'](_0x5d76a4,_0x334790);}_0x6cae41((_0x291eec=_0x291eec['apply'](_0x4582be,_0x37e07d||[]))['next']());});};class SecurityService{constructor(_0x213ef5){this['baseUri']=_0x213ef5,this['tokenManager']=new TokenManager(this);}['refresh'](_0x5f1600){return __awaiter(this,arguments,void 0,function*(_0x5de950,_0x5e7ca1={}){var _0x4a8c01;let _0xed0c89=(_0x4a8c01=_0x5e7ca1['baseUri'])!==null&&_0x4a8c01!==void 0?_0x4a8c01:this['baseUri'];!_0xed0c89['endsWith']('/')&&(_0xed0c89=_0xed0c89+'/');_0xed0c89=_0xed0c89+'Security/Refresh';const _0x2fad28=yield Fetch['post'](_0xed0c89,_0x5de950,null);if(_0x2fad28['status']>0xc7&&_0x2fad28['status']<0x12c){const _0x4fc1e0=yield _0x2fad28['json']();return new SuccessfulRefreshResponse(_0x4fc1e0);}if(_0x2fad28['bodyUsed']){const _0x2ed6f8=yield _0x2fad28['json']();return new FailedRefreshResponse(_0x2ed6f8);}const _0x197b2b={'type':'','status':_0x2fad28['status'],'title':'','instance':'','errors':{}};return new FailedRefreshResponse(_0x197b2b);});}}
12
12
 
13
- var _a;class AdminClient{}_a=AdminClient,AdminClient['baseUri']='https://admin.searchability.dev',AdminClient['Accounts']=new AccountService(_a['baseUri']),AdminClient['Lists']=new ListService(_a['baseUri']),AdminClient['Security']=new SecurityService(_a['baseUri']);
13
+ var _a;class AdminClient{}_a=AdminClient,AdminClient['baseUri']='https://admin.searchability.dev/',AdminClient['Accounts']=new AccountService(_a['baseUri']),AdminClient['Lists']=new ListService(_a['baseUri']),AdminClient['Security']=new SecurityService(_a['baseUri']);
14
14
 
15
15
  export { AdminClient };
package/dist/types.d.ts CHANGED
@@ -4,23 +4,19 @@ declare class AccountService {
4
4
  get(accessToken: string, accountName: string, options?: Partial<Options>): Promise<Response<Account, Problem>>;
5
5
  }
6
6
 
7
- type AccountService_d_AccountService = AccountService;
8
- declare const AccountService_d_AccountService: typeof AccountService;
9
7
  declare namespace AccountService_d {
10
- export { AccountService_d_AccountService as AccountService };
8
+ export { AccountService as default };
11
9
  }
12
10
 
13
11
  declare class ListService {
14
12
  readonly baseUri: string;
15
13
  constructor(baseUri: string);
16
- add(accessToken: string, accountName: string, listName: string, options?: Partial<Options>): Promise<Response<Account, Problem>>;
14
+ add(access_token: string, accountName: string, listName: string, options?: Partial<Options>): Promise<Response<Account, Problem>>;
17
15
  remove(accessToken: string, accountName: string, listName: string, options?: Partial<Options>): Promise<Response<Account, Problem>>;
18
16
  }
19
17
 
20
- type ListService_d_ListService = ListService;
21
- declare const ListService_d_ListService: typeof ListService;
22
18
  declare namespace ListService_d {
23
- export { ListService_d_ListService as ListService };
19
+ export { ListService as default };
24
20
  }
25
21
 
26
22
  declare class TokenManager {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@searchability/admin-client",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "Searchability admin client.",
5
5
  "type": "module",
6
6
  "types": "./dist/types.d.ts",
@@ -1,15 +0,0 @@
1
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x234ec5,_0x2b9fb5,_0x501422,_0x10cc3a){function _0x30a5ab(_0x20508f){return _0x20508f instanceof _0x501422?_0x20508f:new _0x501422(function(_0x4a84a7){_0x4a84a7(_0x20508f);});}return new(_0x501422||(_0x501422=Promise))(function(_0xb8b2cb,_0x4d5355){function _0x25e258(_0x479406){try{_0x4ea12e(_0x10cc3a['next'](_0x479406));}catch(_0x183525){_0x4d5355(_0x183525);}}function _0x2f411c(_0x13ca0e){try{_0x4ea12e(_0x10cc3a['throw'](_0x13ca0e));}catch(_0x5c9f12){_0x4d5355(_0x5c9f12);}}function _0x4ea12e(_0x32449f){_0x32449f['done']?_0xb8b2cb(_0x32449f['value']):_0x30a5ab(_0x32449f['value'])['then'](_0x25e258,_0x2f411c);}_0x4ea12e((_0x10cc3a=_0x10cc3a['apply'](_0x234ec5,_0x2b9fb5||[]))['next']());});};class Fetch{static['get'](_0x5a0a91,_0x495d10){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x5a0a91,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x495d10}});});}static['post'](_0x6068f3,_0x4d687b,_0x32a395){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x6068f3,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4d687b},'body':_0x32a395?JSON['stringify'](_0x32a395):null});});}static['put'](_0x1dfb59,_0x27f3a3,_0x34c1bc){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x1dfb59,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x27f3a3},'body':_0x34c1bc?JSON['stringify'](_0x34c1bc):null});});}static['delete'](_0x1fb02e,_0x42a5e2){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x1fb02e,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x42a5e2}});});}}
2
-
3
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x57a80a,_0x546f46,_0x3f6185,_0x230364){function _0x294a09(_0x22a827){return _0x22a827 instanceof _0x3f6185?_0x22a827:new _0x3f6185(function(_0x1da169){_0x1da169(_0x22a827);});}return new(_0x3f6185||(_0x3f6185=Promise))(function(_0x275a08,_0x3c40c5){function _0x45e889(_0x75138){try{_0x318fa8(_0x230364['next'](_0x75138));}catch(_0x49960d){_0x3c40c5(_0x49960d);}}function _0x563228(_0x3cf7e0){try{_0x318fa8(_0x230364['throw'](_0x3cf7e0));}catch(_0xb20449){_0x3c40c5(_0xb20449);}}function _0x318fa8(_0x2480fe){_0x2480fe['done']?_0x275a08(_0x2480fe['value']):_0x294a09(_0x2480fe['value'])['then'](_0x45e889,_0x563228);}_0x318fa8((_0x230364=_0x230364['apply'](_0x57a80a,_0x546f46||[]))['next']());});};class ListService{constructor(_0x18bde8){this['baseUri']=_0x18bde8;}['add'](_0x4bc300,_0x196ce2,_0x51b72f){return __awaiter$3(this,arguments,void 0,function*(_0x33b3e8,_0x4c169f,_0x2edc01,_0x50e166={}){var _0x37c57f;let _0x132cf7=(_0x37c57f=_0x50e166['baseUri'])!==null&&_0x37c57f!==void 0?_0x37c57f:this['baseUri'];_0x132cf7=_0x132cf7+'/List';const _0x599629={'account_name':_0x4c169f,'list_name':_0x2edc01},_0x470edb=yield Fetch['post'](_0x132cf7,_0x33b3e8,_0x599629);if(_0x470edb['status']>0xc7&&_0x470edb['status']<0x12c){const _0x25d666=yield _0x470edb['json']();return new SuccessfulAccountResponse(_0x25d666);}if(_0x470edb['bodyUsed']){const _0xd5bde=yield _0x470edb['json']();return new FailedAccountResponse(_0xd5bde);}const _0x21e183={'type':'','status':_0x470edb['status'],'title':'','instance':'','errors':{}};return new FailedAccountResponse(_0x21e183);});}['remove'](_0x1d36c3,_0x370119,_0xd6ab5e){return __awaiter$3(this,arguments,void 0,function*(_0x1f1807,_0x1541fd,_0xb36e2a,_0x5ea2bc={}){var _0x869fdb;let _0x133136=(_0x869fdb=_0x5ea2bc['baseUri'])!==null&&_0x869fdb!==void 0?_0x869fdb:this['baseUri'];_0x133136=_0x133136+'/List/'+_0x1541fd+'/'+_0xb36e2a;const _0x4ed54b=yield Fetch['delete'](_0x133136,_0x1f1807);if(_0x4ed54b['status']>0xc7&&_0x4ed54b['status']<0x12c){const _0x35ceef=yield _0x4ed54b['json']();return new SuccessfulAccountResponse(_0x35ceef);}if(_0x4ed54b['bodyUsed']){const _0x2bd313=yield _0x4ed54b['json']();return new FailedAccountResponse(_0x2bd313);}const _0x4b9aef={'type':'','status':_0x4ed54b['status'],'title':'','instance':'','errors':{}};return new FailedAccountResponse(_0x4b9aef);});}}
4
-
5
- class Response{constructor(_0x5b9dde){this['isSuccess']=_0x5b9dde;}}class SuccessfulAccountResponse extends Response{constructor(_0x112c33){super(!![]),this['account']=_0x112c33;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x361d34){super(![]),this['problem']=_0x361d34;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulRefreshResponse extends Response{constructor(_0xefde84){super(!![]),this['tokens']=_0xefde84;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedRefreshResponse extends Response{constructor(_0x420aac){super(![]),this['problem']=_0x420aac;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
6
-
7
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x4af589,_0x2a0b63,_0x42f49a,_0x53aa9d){function _0x2e941a(_0x2353f1){return _0x2353f1 instanceof _0x42f49a?_0x2353f1:new _0x42f49a(function(_0x587f80){_0x587f80(_0x2353f1);});}return new(_0x42f49a||(_0x42f49a=Promise))(function(_0x2cb9d5,_0x2f40e5){function _0x20c9a9(_0x207f27){try{_0x44346b(_0x53aa9d['next'](_0x207f27));}catch(_0x4d1cb1){_0x2f40e5(_0x4d1cb1);}}function _0x423645(_0x2a1788){try{_0x44346b(_0x53aa9d['throw'](_0x2a1788));}catch(_0x340716){_0x2f40e5(_0x340716);}}function _0x44346b(_0x3f40a3){_0x3f40a3['done']?_0x2cb9d5(_0x3f40a3['value']):_0x2e941a(_0x3f40a3['value'])['then'](_0x20c9a9,_0x423645);}_0x44346b((_0x53aa9d=_0x53aa9d['apply'](_0x4af589,_0x2a0b63||[]))['next']());});};class AccountService{constructor(_0x346808){this['baseUri']=_0x346808;}['get'](_0x1df9a7,_0x1ec597){return __awaiter$2(this,arguments,void 0,function*(_0x6b2ddc,_0xf23b84,_0x2fe810={}){var _0x5dfef5;let _0x133552=(_0x5dfef5=_0x2fe810['baseUri'])!==null&&_0x5dfef5!==void 0?_0x5dfef5:this['baseUri'];_0x133552=_0x133552+'/Account/'+_0xf23b84+'/';const _0x2a53df=yield Fetch['get'](_0x133552,_0x6b2ddc);if(_0x2a53df['status']>0xc7&&_0x2a53df['status']<0x12c){const _0x4939e6=yield _0x2a53df['json']();return new SuccessfulAccountResponse(_0x4939e6);}if(_0x2a53df['bodyUsed']){const _0x320470=yield _0x2a53df['json']();return new FailedAccountResponse(_0x320470);}const _0x3bb5c0={'type':'','status':_0x2a53df['status'],'title':'','instance':'','errors':{}};return new FailedAccountResponse(_0x3bb5c0);});}}
8
-
9
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x1c9b84,_0x292015,_0x422554,_0x2d67ed){function _0x16ec6c(_0x9a70bd){return _0x9a70bd instanceof _0x422554?_0x9a70bd:new _0x422554(function(_0x34cbd6){_0x34cbd6(_0x9a70bd);});}return new(_0x422554||(_0x422554=Promise))(function(_0x33a328,_0x527465){function _0x32b12f(_0x4b0fb6){try{_0x11d630(_0x2d67ed['next'](_0x4b0fb6));}catch(_0x3cc53d){_0x527465(_0x3cc53d);}}function _0x357945(_0x57a102){try{_0x11d630(_0x2d67ed['throw'](_0x57a102));}catch(_0x4535c7){_0x527465(_0x4535c7);}}function _0x11d630(_0x2f4a3a){_0x2f4a3a['done']?_0x33a328(_0x2f4a3a['value']):_0x16ec6c(_0x2f4a3a['value'])['then'](_0x32b12f,_0x357945);}_0x11d630((_0x2d67ed=_0x2d67ed['apply'](_0x1c9b84,_0x292015||[]))['next']());});};class TokenManager{constructor(_0x153d7f){this['securityService']=_0x153d7f;}['RefreshTokens'](_0x50cd90){return __awaiter$1(this,void 0,void 0,function*(){if(Date['now']()<_0x50cd90['access_expires'])return new SuccessfulRefreshResponse(_0x50cd90);if(Date['now']()>_0x50cd90['refresh_expires']){const _0x1f6a30={'type':'','status':0x193,'title':'Forbidden','instance':'','errors':{}};return new FailedRefreshResponse(_0x1f6a30);}const _0x9649bd=yield this['securityService']['refresh'](_0x50cd90['refresh_token']);if(!_0x9649bd['isSuccess'])return new FailedRefreshResponse(_0x9649bd['toProblem']());return new SuccessfulRefreshResponse(_0x9649bd['toSuccess']());});}}
10
-
11
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x5637b1,_0x26d269,_0x55066a,_0x533ac0){function _0x1883d0(_0x17884e){return _0x17884e instanceof _0x55066a?_0x17884e:new _0x55066a(function(_0x518cd1){_0x518cd1(_0x17884e);});}return new(_0x55066a||(_0x55066a=Promise))(function(_0x2b4900,_0x2d70a1){function _0x5ba48a(_0x1e6088){try{_0x3457c9(_0x533ac0['next'](_0x1e6088));}catch(_0x12ea86){_0x2d70a1(_0x12ea86);}}function _0x4ce972(_0x243822){try{_0x3457c9(_0x533ac0['throw'](_0x243822));}catch(_0x11badc){_0x2d70a1(_0x11badc);}}function _0x3457c9(_0x365541){_0x365541['done']?_0x2b4900(_0x365541['value']):_0x1883d0(_0x365541['value'])['then'](_0x5ba48a,_0x4ce972);}_0x3457c9((_0x533ac0=_0x533ac0['apply'](_0x5637b1,_0x26d269||[]))['next']());});};class SecurityService{constructor(_0x4a7fd7){this['baseUri']=_0x4a7fd7,this['tokenManager']=new TokenManager(this);}['refresh'](_0x3c4441){return __awaiter(this,arguments,void 0,function*(_0x13caa8,_0x1700a4={}){var _0x40f5aa;let _0x3ced62=(_0x40f5aa=_0x1700a4['baseUri'])!==null&&_0x40f5aa!==void 0?_0x40f5aa:this['baseUri'];_0x3ced62=_0x3ced62+'/Security/Refresh';const _0x444986=yield Fetch['post'](_0x3ced62,_0x13caa8,null);if(_0x444986['status']>0xc7&&_0x444986['status']<0x12c){const _0x335e2f=yield _0x444986['json']();return new SuccessfulRefreshResponse(_0x335e2f);}if(_0x444986['bodyUsed']){const _0x1dfcbf=yield _0x444986['json']();return new FailedRefreshResponse(_0x1dfcbf);}const _0x2014ae={'type':'','status':_0x444986['status'],'title':'','instance':'','errors':{}};return new FailedRefreshResponse(_0x2014ae);});}}
12
-
13
- var _a;class AdminClient{}_a=AdminClient,AdminClient['baseUri']='https://admin.searchability.dev',AdminClient['Accounts']=new AccountService(_a['baseUri']),AdminClient['Lists']=new ListService(_a['baseUri']),AdminClient['Security']=new SecurityService(_a['baseUri']);
14
-
15
- export { AdminClient };