@searchability/admin-client 0.0.6 → 0.0.8

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(_0x2cff20,_0x5442f5,_0x167e7e,_0x34cb7a){function _0x386c69(_0x4677b4){return _0x4677b4 instanceof _0x167e7e?_0x4677b4:new _0x167e7e(function(_0xdb9814){_0xdb9814(_0x4677b4);});}return new(_0x167e7e||(_0x167e7e=Promise))(function(_0x2bbfb4,_0x399d6b){function _0x1946c5(_0xa3a44e){try{_0x181e0b(_0x34cb7a['next'](_0xa3a44e));}catch(_0x27a199){_0x399d6b(_0x27a199);}}function _0x89c149(_0xa237d8){try{_0x181e0b(_0x34cb7a['throw'](_0xa237d8));}catch(_0x20ad36){_0x399d6b(_0x20ad36);}}function _0x181e0b(_0x1a0a9f){_0x1a0a9f['done']?_0x2bbfb4(_0x1a0a9f['value']):_0x386c69(_0x1a0a9f['value'])['then'](_0x1946c5,_0x89c149);}_0x181e0b((_0x34cb7a=_0x34cb7a['apply'](_0x2cff20,_0x5442f5||[]))['next']());});};class Fetch{static['get'](_0x706446,_0x2ae69c){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x706446,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2ae69c}});});}static['post'](_0x56c368,_0x58b7f2,_0x27a974){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x56c368,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x58b7f2},'body':_0x27a974?JSON['stringify'](_0x27a974):null});});}static['put'](_0x369fde,_0x56ed2e,_0x4c70d6){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x369fde,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x56ed2e},'body':_0x4c70d6?JSON['stringify'](_0x4c70d6):null});});}static['delete'](_0x54eba5,_0x5c09d5){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x54eba5,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x5c09d5}});});}}
2
+
3
+ class Response{constructor(_0x59970d){this['isSuccess']=_0x59970d;}}class SuccessfulAccountResponse extends Response{constructor(_0x18096a){super(!![]),this['account']=_0x18096a;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x217ed1){super(![]),this['problem']=_0x217ed1;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulRefreshResponse extends Response{constructor(_0x165c91){super(!![]),this['tokens']=_0x165c91;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedRefreshResponse extends Response{constructor(_0x1cff2e){super(![]),this['problem']=_0x1cff2e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
4
+
5
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x598296,_0x3eb87b,_0x3c2aa8,_0x3a6ab0){function _0x3870b8(_0x20cbe3){return _0x20cbe3 instanceof _0x3c2aa8?_0x20cbe3:new _0x3c2aa8(function(_0x561f68){_0x561f68(_0x20cbe3);});}return new(_0x3c2aa8||(_0x3c2aa8=Promise))(function(_0x329093,_0x12fda3){function _0x569ea6(_0x1352cb){try{_0x115968(_0x3a6ab0['next'](_0x1352cb));}catch(_0x24db1e){_0x12fda3(_0x24db1e);}}function _0x3db789(_0x34e6f0){try{_0x115968(_0x3a6ab0['throw'](_0x34e6f0));}catch(_0x2eb4d8){_0x12fda3(_0x2eb4d8);}}function _0x115968(_0x1ffedf){_0x1ffedf['done']?_0x329093(_0x1ffedf['value']):_0x3870b8(_0x1ffedf['value'])['then'](_0x569ea6,_0x3db789);}_0x115968((_0x3a6ab0=_0x3a6ab0['apply'](_0x598296,_0x3eb87b||[]))['next']());});};class AccountService{constructor(_0x5d4f70){this['baseUri']=_0x5d4f70;}['get'](_0x13c9ef,_0x53fa98){return __awaiter$3(this,arguments,void 0,function*(_0x537cd2,_0x4a1daf,_0x50f71a={}){var _0x22b999;let _0x211bd3=(_0x22b999=_0x50f71a['baseUri'])!==null&&_0x22b999!==void 0?_0x22b999:this['baseUri'];!_0x211bd3['endsWith']('/')&&(_0x211bd3=_0x211bd3+'/');_0x211bd3=_0x211bd3+'Account/'+_0x4a1daf+'/';const _0x198c77=yield Fetch['get'](_0x211bd3,_0x537cd2);try{if(_0x198c77['status']>0xc7&&_0x198c77['status']<0x12c){const _0x342e21=yield _0x198c77['json']();return new SuccessfulAccountResponse(_0x342e21);}const _0x1c8e8d=yield _0x198c77['json']();return new FailedAccountResponse(_0x1c8e8d);}catch(_0xe8bb28){if(_0xe8bb28 instanceof Error)return new FailedAccountResponse({'detail':_0xe8bb28['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0xe8bb28;}});}}
6
+
7
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x194318,_0x5abc0c,_0x2fb170,_0x4b8b7c){function _0x45d9cb(_0x541db){return _0x541db instanceof _0x2fb170?_0x541db:new _0x2fb170(function(_0x466e58){_0x466e58(_0x541db);});}return new(_0x2fb170||(_0x2fb170=Promise))(function(_0x4752e3,_0x557e17){function _0x536b58(_0x5f2db1){try{_0x153f68(_0x4b8b7c['next'](_0x5f2db1));}catch(_0x3e2aeb){_0x557e17(_0x3e2aeb);}}function _0x56d389(_0x4d1fde){try{_0x153f68(_0x4b8b7c['throw'](_0x4d1fde));}catch(_0x4b5188){_0x557e17(_0x4b5188);}}function _0x153f68(_0x36c095){_0x36c095['done']?_0x4752e3(_0x36c095['value']):_0x45d9cb(_0x36c095['value'])['then'](_0x536b58,_0x56d389);}_0x153f68((_0x4b8b7c=_0x4b8b7c['apply'](_0x194318,_0x5abc0c||[]))['next']());});};class ListService{constructor(_0x7a200a){this['baseUri']=_0x7a200a;}['add'](_0x351367,_0x7652a,_0x8858f3){return __awaiter$2(this,arguments,void 0,function*(_0x15df6c,_0x3fb823,_0x18c57d,_0x295dd3={}){var _0x5b02ce;let _0x1744be=(_0x5b02ce=_0x295dd3['baseUri'])!==null&&_0x5b02ce!==void 0?_0x5b02ce:this['baseUri'];!_0x1744be['endsWith']('/')&&(_0x1744be=_0x1744be+'/');_0x1744be=_0x1744be+'List';const _0x100b44={'account_name':_0x3fb823,'list_name':_0x18c57d};try{const _0x3c03fd=yield Fetch['post'](_0x1744be,_0x15df6c,_0x100b44);if(_0x3c03fd['status']>0xc7&&_0x3c03fd['status']<0x12c){const _0x5517af=yield _0x3c03fd['json']();return new SuccessfulAccountResponse(_0x5517af);}const _0xd9d7b5=yield _0x3c03fd['json']();return new FailedAccountResponse(_0xd9d7b5);}catch(_0x53aff3){if(_0x53aff3 instanceof Error)return new FailedAccountResponse({'detail':_0x53aff3['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x53aff3;}});}['remove'](_0x3515ab,_0x1ca46c,_0x2b185a){return __awaiter$2(this,arguments,void 0,function*(_0x1fee2b,_0x25f937,_0x221f40,_0x43990a={}){var _0x4bc1e8;let _0x4de987=(_0x4bc1e8=_0x43990a['baseUri'])!==null&&_0x4bc1e8!==void 0?_0x4bc1e8:this['baseUri'];_0x4de987=_0x4de987+'/List/'+_0x25f937+'/'+_0x221f40;const _0x3a217f=yield Fetch['delete'](_0x4de987,_0x1fee2b);try{if(_0x3a217f['status']>0xc7&&_0x3a217f['status']<0x12c){const _0x21aaf3=yield _0x3a217f['json']();return new SuccessfulAccountResponse(_0x21aaf3);}const _0xaad654=yield _0x3a217f['json']();return new FailedAccountResponse(_0xaad654);}catch(_0x14054c){if(_0x14054c instanceof Error)return new FailedAccountResponse({'detail':_0x14054c['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x14054c;}});}}
8
+
9
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x4986c2,_0x5b9136,_0x26daf6,_0x291128){function _0x15a75a(_0x3fae56){return _0x3fae56 instanceof _0x26daf6?_0x3fae56:new _0x26daf6(function(_0x11f73b){_0x11f73b(_0x3fae56);});}return new(_0x26daf6||(_0x26daf6=Promise))(function(_0x2f5ad4,_0x3c3003){function _0x5a7630(_0x52756e){try{_0x294dd6(_0x291128['next'](_0x52756e));}catch(_0x584e70){_0x3c3003(_0x584e70);}}function _0x168f06(_0x55d234){try{_0x294dd6(_0x291128['throw'](_0x55d234));}catch(_0x4f9462){_0x3c3003(_0x4f9462);}}function _0x294dd6(_0x1d1a0f){_0x1d1a0f['done']?_0x2f5ad4(_0x1d1a0f['value']):_0x15a75a(_0x1d1a0f['value'])['then'](_0x5a7630,_0x168f06);}_0x294dd6((_0x291128=_0x291128['apply'](_0x4986c2,_0x5b9136||[]))['next']());});};class TokenManager{constructor(_0x1a5694){this['securityService']=_0x1a5694;}['RefreshTokens'](_0x19fb29){return __awaiter$1(this,arguments,void 0,function*(_0x552e1c,_0x4062e0={}){if(Date['now']()<_0x552e1c['access_expires'])return new SuccessfulRefreshResponse(_0x552e1c);if(Date['now']()>_0x552e1c['refresh_expires']){const _0x2775b4={'detail':'Forbidden','type':'','status':0x193,'title':'Forbidden','instance':''};return new FailedRefreshResponse(_0x2775b4);}const _0x3f71b8=yield this['securityService']['refresh'](_0x552e1c['refresh_token'],_0x4062e0);if(!_0x3f71b8['isSuccess'])return new FailedRefreshResponse(_0x3f71b8['toProblem']());return new SuccessfulRefreshResponse(_0x3f71b8['toSuccess']());});}}
10
+
11
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x343323,_0x4250e9,_0x5c1ab1,_0x195747){function _0x1af5f9(_0x4c6954){return _0x4c6954 instanceof _0x5c1ab1?_0x4c6954:new _0x5c1ab1(function(_0x2f3eca){_0x2f3eca(_0x4c6954);});}return new(_0x5c1ab1||(_0x5c1ab1=Promise))(function(_0x23e370,_0x3d0ddd){function _0x20b4c7(_0x1de192){try{_0x41b2ce(_0x195747['next'](_0x1de192));}catch(_0x5cace7){_0x3d0ddd(_0x5cace7);}}function _0x3dd326(_0x572b32){try{_0x41b2ce(_0x195747['throw'](_0x572b32));}catch(_0x500ae7){_0x3d0ddd(_0x500ae7);}}function _0x41b2ce(_0x56d32a){_0x56d32a['done']?_0x23e370(_0x56d32a['value']):_0x1af5f9(_0x56d32a['value'])['then'](_0x20b4c7,_0x3dd326);}_0x41b2ce((_0x195747=_0x195747['apply'](_0x343323,_0x4250e9||[]))['next']());});};class SecurityService{constructor(_0x3dbc0f){this['baseUri']=_0x3dbc0f,this['tokenManager']=new TokenManager(this);}['refresh'](_0x78c5ef){return __awaiter(this,arguments,void 0,function*(_0x156c27,_0x4dc098={}){var _0x2ec09c;let _0x5680df=(_0x2ec09c=_0x4dc098['baseUri'])!==null&&_0x2ec09c!==void 0?_0x2ec09c:this['baseUri'];!_0x5680df['endsWith']('/')&&(_0x5680df=_0x5680df+'/');_0x5680df=_0x5680df+'Security/Refresh';try{const _0x47337d=yield Fetch['post'](_0x5680df,_0x156c27,null);if(_0x47337d['status']>0xc7&&_0x47337d['status']<0x12c){const _0x5512c6=yield _0x47337d['json']();return new SuccessfulRefreshResponse(_0x5512c6);}const _0x162b2e=yield _0x47337d['json']();return new FailedRefreshResponse(_0x162b2e);}catch(_0x5588be){if(_0x5588be instanceof Error)return new FailedRefreshResponse({'detail':_0x5588be['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x5588be;}});}}
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,16 +1,16 @@
1
1
  'use strict';
2
2
 
3
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x228e0e,_0x14b10d,_0x601487,_0x3550d2){function _0x5c94d5(_0xf78992){return _0xf78992 instanceof _0x601487?_0xf78992:new _0x601487(function(_0x5389e2){_0x5389e2(_0xf78992);});}return new(_0x601487||(_0x601487=Promise))(function(_0x46668b,_0x31400e){function _0x5a2c48(_0xb1e38a){try{_0x4b23a7(_0x3550d2['next'](_0xb1e38a));}catch(_0x2d0094){_0x31400e(_0x2d0094);}}function _0x25555c(_0x4c7448){try{_0x4b23a7(_0x3550d2['throw'](_0x4c7448));}catch(_0x5acbcd){_0x31400e(_0x5acbcd);}}function _0x4b23a7(_0x2f0561){_0x2f0561['done']?_0x46668b(_0x2f0561['value']):_0x5c94d5(_0x2f0561['value'])['then'](_0x5a2c48,_0x25555c);}_0x4b23a7((_0x3550d2=_0x3550d2['apply'](_0x228e0e,_0x14b10d||[]))['next']());});};class Fetch{static['get'](_0x5dc12a,_0xaecde0){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x5dc12a,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0xaecde0}});});}static['post'](_0x1084ef,_0x4a02af,_0x31d933){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x1084ef,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4a02af},'body':_0x31d933?JSON['stringify'](_0x31d933):null});});}static['put'](_0x3bb601,_0x5239ff,_0x33e4d9){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x3bb601,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x5239ff},'body':_0x33e4d9?JSON['stringify'](_0x33e4d9):null});});}static['delete'](_0xc75b8e,_0x4b7fee){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0xc75b8e,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4b7fee}});});}}
3
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x19f549,_0x5df138,_0x575083,_0x239c1b){function _0x3814f8(_0x458faa){return _0x458faa instanceof _0x575083?_0x458faa:new _0x575083(function(_0x422ecf){_0x422ecf(_0x458faa);});}return new(_0x575083||(_0x575083=Promise))(function(_0xe40a49,_0x2d7313){function _0x355b5b(_0x38e3f3){try{_0x4dd20d(_0x239c1b['next'](_0x38e3f3));}catch(_0x2a3827){_0x2d7313(_0x2a3827);}}function _0x18a0a0(_0x22339a){try{_0x4dd20d(_0x239c1b['throw'](_0x22339a));}catch(_0x19064e){_0x2d7313(_0x19064e);}}function _0x4dd20d(_0x16941b){_0x16941b['done']?_0xe40a49(_0x16941b['value']):_0x3814f8(_0x16941b['value'])['then'](_0x355b5b,_0x18a0a0);}_0x4dd20d((_0x239c1b=_0x239c1b['apply'](_0x19f549,_0x5df138||[]))['next']());});};class Fetch{static['get'](_0x4137db,_0x412f3f){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x4137db,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x412f3f}});});}static['post'](_0x20120f,_0x2ca5e1,_0x4d34c1){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x20120f,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2ca5e1},'body':_0x4d34c1?JSON['stringify'](_0x4d34c1):null});});}static['put'](_0x1415d6,_0x575a89,_0x4f2f7f){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x1415d6,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x575a89},'body':_0x4f2f7f?JSON['stringify'](_0x4f2f7f):null});});}static['delete'](_0x58ea83,_0x2874ff){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x58ea83,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2874ff}});});}}
4
4
 
5
- class Response{constructor(_0x587ab8){this['isSuccess']=_0x587ab8;}}class SuccessfulAccountResponse extends Response{constructor(_0x5b9193){super(!![]),this['account']=_0x5b9193;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x244d52){super(![]),this['problem']=_0x244d52;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulRefreshResponse extends Response{constructor(_0x18986b){super(!![]),this['tokens']=_0x18986b;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedRefreshResponse extends Response{constructor(_0x318272){super(![]),this['problem']=_0x318272;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
5
+ class Response{constructor(_0x1f21a9){this['isSuccess']=_0x1f21a9;}}class SuccessfulAccountResponse extends Response{constructor(_0x4a9105){super(!![]),this['account']=_0x4a9105;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x5ee946){super(![]),this['problem']=_0x5ee946;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulRefreshResponse extends Response{constructor(_0x52c7eb){super(!![]),this['tokens']=_0x52c7eb;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedRefreshResponse extends Response{constructor(_0x33cb54){super(![]),this['problem']=_0x33cb54;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
6
6
 
7
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x16ac02,_0x4771a0,_0x2541df,_0x29b898){function _0x47906c(_0x5d204d){return _0x5d204d instanceof _0x2541df?_0x5d204d:new _0x2541df(function(_0x172a63){_0x172a63(_0x5d204d);});}return new(_0x2541df||(_0x2541df=Promise))(function(_0x1d7abf,_0x2833db){function _0x693697(_0x415fd2){try{_0x47e3fa(_0x29b898['next'](_0x415fd2));}catch(_0x560ee8){_0x2833db(_0x560ee8);}}function _0x5d7b31(_0x59f68a){try{_0x47e3fa(_0x29b898['throw'](_0x59f68a));}catch(_0x6b4269){_0x2833db(_0x6b4269);}}function _0x47e3fa(_0x3f9651){_0x3f9651['done']?_0x1d7abf(_0x3f9651['value']):_0x47906c(_0x3f9651['value'])['then'](_0x693697,_0x5d7b31);}_0x47e3fa((_0x29b898=_0x29b898['apply'](_0x16ac02,_0x4771a0||[]))['next']());});};class AccountService{constructor(_0x246d63){this['baseUri']=_0x246d63;}['get'](_0x71bcaa,_0x2beefb){return __awaiter$3(this,arguments,void 0,function*(_0x2a1b42,_0x86c52f,_0x54279e={}){var _0x15b0c2;let _0x4ac683=(_0x15b0c2=_0x54279e['baseUri'])!==null&&_0x15b0c2!==void 0?_0x15b0c2:this['baseUri'];!_0x4ac683['endsWith']('/')&&(_0x4ac683=_0x4ac683+'/');_0x4ac683=_0x4ac683+'Account/'+_0x86c52f+'/';const _0x19da3f=yield Fetch['get'](_0x4ac683,_0x2a1b42);if(_0x19da3f['status']>0xc7&&_0x19da3f['status']<0x12c){const _0x1c47fb=yield _0x19da3f['json']();return new SuccessfulAccountResponse(_0x1c47fb);}const _0x52bdb8=yield _0x19da3f['json']();return new FailedAccountResponse(_0x52bdb8);});}}
7
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x5030f5,_0x2e19da,_0x3edd22,_0x51e495){function _0x328db3(_0x15c023){return _0x15c023 instanceof _0x3edd22?_0x15c023:new _0x3edd22(function(_0x53e6f9){_0x53e6f9(_0x15c023);});}return new(_0x3edd22||(_0x3edd22=Promise))(function(_0x5cd048,_0x1c690a){function _0x238770(_0x44e88e){try{_0x55801b(_0x51e495['next'](_0x44e88e));}catch(_0x519301){_0x1c690a(_0x519301);}}function _0x3c1d71(_0x10e683){try{_0x55801b(_0x51e495['throw'](_0x10e683));}catch(_0x14f5b0){_0x1c690a(_0x14f5b0);}}function _0x55801b(_0x1944d6){_0x1944d6['done']?_0x5cd048(_0x1944d6['value']):_0x328db3(_0x1944d6['value'])['then'](_0x238770,_0x3c1d71);}_0x55801b((_0x51e495=_0x51e495['apply'](_0x5030f5,_0x2e19da||[]))['next']());});};class AccountService{constructor(_0x1fa702){this['baseUri']=_0x1fa702;}['get'](_0x2b5812,_0x50b385){return __awaiter$3(this,arguments,void 0,function*(_0x711716,_0x702fe4,_0x563f32={}){var _0x555204;let _0x20cf23=(_0x555204=_0x563f32['baseUri'])!==null&&_0x555204!==void 0?_0x555204:this['baseUri'];!_0x20cf23['endsWith']('/')&&(_0x20cf23=_0x20cf23+'/');_0x20cf23=_0x20cf23+'Account/'+_0x702fe4+'/';const _0x49fe6e=yield Fetch['get'](_0x20cf23,_0x711716);try{if(_0x49fe6e['status']>0xc7&&_0x49fe6e['status']<0x12c){const _0x37eae5=yield _0x49fe6e['json']();return new SuccessfulAccountResponse(_0x37eae5);}const _0x5b17ed=yield _0x49fe6e['json']();return new FailedAccountResponse(_0x5b17ed);}catch(_0x408593){if(_0x408593 instanceof Error)return new FailedAccountResponse({'detail':_0x408593['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x408593;}});}}
8
8
 
9
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x5b363e,_0x4c78cb,_0x69b4f6,_0x431b98){function _0x28bc62(_0x47c631){return _0x47c631 instanceof _0x69b4f6?_0x47c631:new _0x69b4f6(function(_0x1812c3){_0x1812c3(_0x47c631);});}return new(_0x69b4f6||(_0x69b4f6=Promise))(function(_0x4e4bfc,_0x5a1f1d){function _0x1e1a15(_0x42f087){try{_0x51e2ab(_0x431b98['next'](_0x42f087));}catch(_0x1ebfd4){_0x5a1f1d(_0x1ebfd4);}}function _0x2f13cd(_0x1251da){try{_0x51e2ab(_0x431b98['throw'](_0x1251da));}catch(_0x53904c){_0x5a1f1d(_0x53904c);}}function _0x51e2ab(_0x30cb33){_0x30cb33['done']?_0x4e4bfc(_0x30cb33['value']):_0x28bc62(_0x30cb33['value'])['then'](_0x1e1a15,_0x2f13cd);}_0x51e2ab((_0x431b98=_0x431b98['apply'](_0x5b363e,_0x4c78cb||[]))['next']());});};class ListService{constructor(_0x45d1d3){this['baseUri']=_0x45d1d3;}['add'](_0x46166f,_0x23a967,_0x4783c4){return __awaiter$2(this,arguments,void 0,function*(_0x262c36,_0x14602b,_0x278c73,_0x4e615b={}){var _0x4b62a1;let _0x25eea8=(_0x4b62a1=_0x4e615b['baseUri'])!==null&&_0x4b62a1!==void 0?_0x4b62a1:this['baseUri'];!_0x25eea8['endsWith']('/')&&(_0x25eea8=_0x25eea8+'/');_0x25eea8=_0x25eea8+'List';const _0x45b0ba={'account_name':_0x14602b,'list_name':_0x278c73},_0x29893e=yield Fetch['post'](_0x25eea8,_0x262c36,_0x45b0ba);if(_0x29893e['status']>0xc7&&_0x29893e['status']<0x12c){const _0x22b5e0=yield _0x29893e['json']();return new SuccessfulAccountResponse(_0x22b5e0);}const _0xf8dba2=yield _0x29893e['json']();return new FailedAccountResponse(_0xf8dba2);});}['remove'](_0xd73407,_0x2064f7,_0xafe621){return __awaiter$2(this,arguments,void 0,function*(_0x2f4090,_0x3deecd,_0x27f736,_0xac84f1={}){var _0xdca412;let _0x125de3=(_0xdca412=_0xac84f1['baseUri'])!==null&&_0xdca412!==void 0?_0xdca412:this['baseUri'];_0x125de3=_0x125de3+'/List/'+_0x3deecd+'/'+_0x27f736;const _0x4227a8=yield Fetch['delete'](_0x125de3,_0x2f4090);if(_0x4227a8['status']>0xc7&&_0x4227a8['status']<0x12c){const _0x3edd43=yield _0x4227a8['json']();return new SuccessfulAccountResponse(_0x3edd43);}const _0x121b80=yield _0x4227a8['json']();return new FailedAccountResponse(_0x121b80);});}}
9
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x1b3151,_0x33f3e9,_0x3bea02,_0x20f5ba){function _0x36037d(_0x8dcdee){return _0x8dcdee instanceof _0x3bea02?_0x8dcdee:new _0x3bea02(function(_0x36863b){_0x36863b(_0x8dcdee);});}return new(_0x3bea02||(_0x3bea02=Promise))(function(_0xe287ab,_0x100d40){function _0x288547(_0x59ba8e){try{_0x21aa0f(_0x20f5ba['next'](_0x59ba8e));}catch(_0x413259){_0x100d40(_0x413259);}}function _0x18bdaa(_0x10fb7f){try{_0x21aa0f(_0x20f5ba['throw'](_0x10fb7f));}catch(_0x5b09df){_0x100d40(_0x5b09df);}}function _0x21aa0f(_0x1efeba){_0x1efeba['done']?_0xe287ab(_0x1efeba['value']):_0x36037d(_0x1efeba['value'])['then'](_0x288547,_0x18bdaa);}_0x21aa0f((_0x20f5ba=_0x20f5ba['apply'](_0x1b3151,_0x33f3e9||[]))['next']());});};class ListService{constructor(_0x548674){this['baseUri']=_0x548674;}['add'](_0x1c8942,_0x2573c1,_0x57429e){return __awaiter$2(this,arguments,void 0,function*(_0x52f868,_0x5c0e94,_0x2135b6,_0x2e40a4={}){var _0x338604;let _0x3c2365=(_0x338604=_0x2e40a4['baseUri'])!==null&&_0x338604!==void 0?_0x338604:this['baseUri'];!_0x3c2365['endsWith']('/')&&(_0x3c2365=_0x3c2365+'/');_0x3c2365=_0x3c2365+'List';const _0x4a7582={'account_name':_0x5c0e94,'list_name':_0x2135b6};try{const _0x491055=yield Fetch['post'](_0x3c2365,_0x52f868,_0x4a7582);if(_0x491055['status']>0xc7&&_0x491055['status']<0x12c){const _0x5d9dcd=yield _0x491055['json']();return new SuccessfulAccountResponse(_0x5d9dcd);}const _0x4f0da0=yield _0x491055['json']();return new FailedAccountResponse(_0x4f0da0);}catch(_0x130ae6){if(_0x130ae6 instanceof Error)return new FailedAccountResponse({'detail':_0x130ae6['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x130ae6;}});}['remove'](_0x30067d,_0x480ed4,_0x1fdcfc){return __awaiter$2(this,arguments,void 0,function*(_0x102c2e,_0xe64995,_0x519eee,_0x23d6c6={}){var _0x21508f;let _0x1f23f9=(_0x21508f=_0x23d6c6['baseUri'])!==null&&_0x21508f!==void 0?_0x21508f:this['baseUri'];_0x1f23f9=_0x1f23f9+'/List/'+_0xe64995+'/'+_0x519eee;const _0x196660=yield Fetch['delete'](_0x1f23f9,_0x102c2e);try{if(_0x196660['status']>0xc7&&_0x196660['status']<0x12c){const _0x11e5be=yield _0x196660['json']();return new SuccessfulAccountResponse(_0x11e5be);}const _0x363492=yield _0x196660['json']();return new FailedAccountResponse(_0x363492);}catch(_0x373fbe){if(_0x373fbe instanceof Error)return new FailedAccountResponse({'detail':_0x373fbe['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x373fbe;}});}}
10
10
 
11
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x55d2f3,_0x308481,_0x52bee5,_0x2c5331){function _0x83b136(_0x375084){return _0x375084 instanceof _0x52bee5?_0x375084:new _0x52bee5(function(_0x44960d){_0x44960d(_0x375084);});}return new(_0x52bee5||(_0x52bee5=Promise))(function(_0x5d3bbb,_0x13464d){function _0x209c84(_0x4145a8){try{_0x22d14e(_0x2c5331['next'](_0x4145a8));}catch(_0x252c7b){_0x13464d(_0x252c7b);}}function _0x1f302b(_0x38a39c){try{_0x22d14e(_0x2c5331['throw'](_0x38a39c));}catch(_0x2f5767){_0x13464d(_0x2f5767);}}function _0x22d14e(_0x55ad6b){_0x55ad6b['done']?_0x5d3bbb(_0x55ad6b['value']):_0x83b136(_0x55ad6b['value'])['then'](_0x209c84,_0x1f302b);}_0x22d14e((_0x2c5331=_0x2c5331['apply'](_0x55d2f3,_0x308481||[]))['next']());});};class TokenManager{constructor(_0x4dd521){this['securityService']=_0x4dd521;}['RefreshTokens'](_0x294241){return __awaiter$1(this,void 0,void 0,function*(){if(Date['now']()<_0x294241['access_expires'])return new SuccessfulRefreshResponse(_0x294241);if(Date['now']()>_0x294241['refresh_expires']){const _0x53e77f={'details':'','type':'','status':0x193,'title':'Forbidden','instance':''};return new FailedRefreshResponse(_0x53e77f);}const _0x41a950=yield this['securityService']['refresh'](_0x294241['refresh_token']);if(!_0x41a950['isSuccess'])return new FailedRefreshResponse(_0x41a950['toProblem']());return new SuccessfulRefreshResponse(_0x41a950['toSuccess']());});}}
11
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x3cf388,_0x581484,_0x382cd5,_0x448d1a){function _0x59687e(_0x4311e6){return _0x4311e6 instanceof _0x382cd5?_0x4311e6:new _0x382cd5(function(_0x15244a){_0x15244a(_0x4311e6);});}return new(_0x382cd5||(_0x382cd5=Promise))(function(_0x40a8bf,_0x528c81){function _0x312d94(_0x1c0690){try{_0x28d078(_0x448d1a['next'](_0x1c0690));}catch(_0x58a62d){_0x528c81(_0x58a62d);}}function _0x3d68da(_0x1c8172){try{_0x28d078(_0x448d1a['throw'](_0x1c8172));}catch(_0xe6e5c1){_0x528c81(_0xe6e5c1);}}function _0x28d078(_0x4f5d27){_0x4f5d27['done']?_0x40a8bf(_0x4f5d27['value']):_0x59687e(_0x4f5d27['value'])['then'](_0x312d94,_0x3d68da);}_0x28d078((_0x448d1a=_0x448d1a['apply'](_0x3cf388,_0x581484||[]))['next']());});};class TokenManager{constructor(_0x122be5){this['securityService']=_0x122be5;}['RefreshTokens'](_0x4b8a3f){return __awaiter$1(this,arguments,void 0,function*(_0x4a698c,_0x142bbe={}){if(Date['now']()<_0x4a698c['access_expires'])return new SuccessfulRefreshResponse(_0x4a698c);if(Date['now']()>_0x4a698c['refresh_expires']){const _0x1ad313={'detail':'Forbidden','type':'','status':0x193,'title':'Forbidden','instance':''};return new FailedRefreshResponse(_0x1ad313);}const _0x5edb85=yield this['securityService']['refresh'](_0x4a698c['refresh_token'],_0x142bbe);if(!_0x5edb85['isSuccess'])return new FailedRefreshResponse(_0x5edb85['toProblem']());return new SuccessfulRefreshResponse(_0x5edb85['toSuccess']());});}}
12
12
 
13
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x1dbb73,_0x2e1d09,_0x5e50fb,_0x105f4e){function _0xa8c27(_0x4b18cb){return _0x4b18cb instanceof _0x5e50fb?_0x4b18cb:new _0x5e50fb(function(_0x3e9e1d){_0x3e9e1d(_0x4b18cb);});}return new(_0x5e50fb||(_0x5e50fb=Promise))(function(_0x3feff0,_0x26a937){function _0x482fc7(_0x55fb6a){try{_0x4e18fe(_0x105f4e['next'](_0x55fb6a));}catch(_0x343b08){_0x26a937(_0x343b08);}}function _0x3a9dae(_0xa033ba){try{_0x4e18fe(_0x105f4e['throw'](_0xa033ba));}catch(_0x54fa22){_0x26a937(_0x54fa22);}}function _0x4e18fe(_0x5a94b6){_0x5a94b6['done']?_0x3feff0(_0x5a94b6['value']):_0xa8c27(_0x5a94b6['value'])['then'](_0x482fc7,_0x3a9dae);}_0x4e18fe((_0x105f4e=_0x105f4e['apply'](_0x1dbb73,_0x2e1d09||[]))['next']());});};class SecurityService{constructor(_0x10f4c3){this['baseUri']=_0x10f4c3,this['tokenManager']=new TokenManager(this);}['refresh'](_0x36acf0){return __awaiter(this,arguments,void 0,function*(_0x2f2ece,_0x4483fd={}){var _0x323c5b;let _0x352bca=(_0x323c5b=_0x4483fd['baseUri'])!==null&&_0x323c5b!==void 0?_0x323c5b:this['baseUri'];!_0x352bca['endsWith']('/')&&(_0x352bca=_0x352bca+'/');_0x352bca=_0x352bca+'Security/Refresh';const _0x13690b=yield Fetch['post'](_0x352bca,_0x2f2ece,null);if(_0x13690b['status']>0xc7&&_0x13690b['status']<0x12c){const _0x503646=yield _0x13690b['json']();return new SuccessfulRefreshResponse(_0x503646);}const _0x5760f5=yield _0x13690b['json']();return new FailedRefreshResponse(_0x5760f5);});}}
13
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x1274c7,_0x379460,_0x23b829,_0x3cef75){function _0x12d984(_0x1d884b){return _0x1d884b instanceof _0x23b829?_0x1d884b:new _0x23b829(function(_0x5d6a06){_0x5d6a06(_0x1d884b);});}return new(_0x23b829||(_0x23b829=Promise))(function(_0x20b3f8,_0x214d60){function _0x5e54bf(_0x52e069){try{_0x4e4a64(_0x3cef75['next'](_0x52e069));}catch(_0x4d4f38){_0x214d60(_0x4d4f38);}}function _0x5e2ed(_0x5bc967){try{_0x4e4a64(_0x3cef75['throw'](_0x5bc967));}catch(_0x2df761){_0x214d60(_0x2df761);}}function _0x4e4a64(_0x5e3f86){_0x5e3f86['done']?_0x20b3f8(_0x5e3f86['value']):_0x12d984(_0x5e3f86['value'])['then'](_0x5e54bf,_0x5e2ed);}_0x4e4a64((_0x3cef75=_0x3cef75['apply'](_0x1274c7,_0x379460||[]))['next']());});};class SecurityService{constructor(_0x3603a3){this['baseUri']=_0x3603a3,this['tokenManager']=new TokenManager(this);}['refresh'](_0x1fb2de){return __awaiter(this,arguments,void 0,function*(_0x141841,_0x579c7c={}){var _0x3fc361;let _0x202665=(_0x3fc361=_0x579c7c['baseUri'])!==null&&_0x3fc361!==void 0?_0x3fc361:this['baseUri'];!_0x202665['endsWith']('/')&&(_0x202665=_0x202665+'/');_0x202665=_0x202665+'Security/Refresh';try{const _0x24ed83=yield Fetch['post'](_0x202665,_0x141841,null);if(_0x24ed83['status']>0xc7&&_0x24ed83['status']<0x12c){const _0x55fda3=yield _0x24ed83['json']();return new SuccessfulRefreshResponse(_0x55fda3);}const _0x38ca41=yield _0x24ed83['json']();return new FailedRefreshResponse(_0x38ca41);}catch(_0x194384){if(_0x194384 instanceof Error)return new FailedRefreshResponse({'detail':_0x194384['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x194384;}});}}
14
14
 
15
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
 
@@ -1,14 +1,14 @@
1
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x2d86cd,_0x471c76,_0xe4038b,_0x4f8f69){function _0x2b4b39(_0x211ab7){return _0x211ab7 instanceof _0xe4038b?_0x211ab7:new _0xe4038b(function(_0x176ca1){_0x176ca1(_0x211ab7);});}return new(_0xe4038b||(_0xe4038b=Promise))(function(_0xfc4b8c,_0x2e0e30){function _0xbaed14(_0x40a44f){try{_0x1a10bb(_0x4f8f69['next'](_0x40a44f));}catch(_0x4c5be7){_0x2e0e30(_0x4c5be7);}}function _0x158ffa(_0x22dd30){try{_0x1a10bb(_0x4f8f69['throw'](_0x22dd30));}catch(_0x578c65){_0x2e0e30(_0x578c65);}}function _0x1a10bb(_0x26dd7a){_0x26dd7a['done']?_0xfc4b8c(_0x26dd7a['value']):_0x2b4b39(_0x26dd7a['value'])['then'](_0xbaed14,_0x158ffa);}_0x1a10bb((_0x4f8f69=_0x4f8f69['apply'](_0x2d86cd,_0x471c76||[]))['next']());});};class Fetch{static['get'](_0x50bb51,_0x511985){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x50bb51,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x511985}});});}static['post'](_0x51cd27,_0x420c22,_0x8ee2ab){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x51cd27,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x420c22},'body':_0x8ee2ab?JSON['stringify'](_0x8ee2ab):null});});}static['put'](_0x519b2f,_0x505c9f,_0x53629c){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x519b2f,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x505c9f},'body':_0x53629c?JSON['stringify'](_0x53629c):null});});}static['delete'](_0x94effe,_0x2ea167){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x94effe,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2ea167}});});}}
1
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x1332c9,_0x143830,_0x607230,_0x1100c3){function _0x199c2b(_0x5d7c86){return _0x5d7c86 instanceof _0x607230?_0x5d7c86:new _0x607230(function(_0x537d08){_0x537d08(_0x5d7c86);});}return new(_0x607230||(_0x607230=Promise))(function(_0xb7765,_0xe60b97){function _0x2e38da(_0x265cfb){try{_0x395ae9(_0x1100c3['next'](_0x265cfb));}catch(_0x5be074){_0xe60b97(_0x5be074);}}function _0x16afd0(_0xd22219){try{_0x395ae9(_0x1100c3['throw'](_0xd22219));}catch(_0x5bff9d){_0xe60b97(_0x5bff9d);}}function _0x395ae9(_0x41ddff){_0x41ddff['done']?_0xb7765(_0x41ddff['value']):_0x199c2b(_0x41ddff['value'])['then'](_0x2e38da,_0x16afd0);}_0x395ae9((_0x1100c3=_0x1100c3['apply'](_0x1332c9,_0x143830||[]))['next']());});};class Fetch{static['get'](_0x533618,_0x713771){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x533618,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x713771}});});}static['post'](_0x3da1a4,_0x2ea0ef,_0x4f0ef5){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x3da1a4,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2ea0ef},'body':_0x4f0ef5?JSON['stringify'](_0x4f0ef5):null});});}static['put'](_0x9c3559,_0x583b66,_0x63f5a3){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x9c3559,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x583b66},'body':_0x63f5a3?JSON['stringify'](_0x63f5a3):null});});}static['delete'](_0x5e1ad3,_0x544806){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x5e1ad3,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x544806}});});}}
2
2
 
3
- class Response{constructor(_0x1255ff){this['isSuccess']=_0x1255ff;}}class SuccessfulAccountResponse extends Response{constructor(_0x1ed2eb){super(!![]),this['account']=_0x1ed2eb;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x3d4756){super(![]),this['problem']=_0x3d4756;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulRefreshResponse extends Response{constructor(_0x469a1b){super(!![]),this['tokens']=_0x469a1b;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedRefreshResponse extends Response{constructor(_0x2c6bf3){super(![]),this['problem']=_0x2c6bf3;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
3
+ class Response{constructor(_0x5c0ece){this['isSuccess']=_0x5c0ece;}}class SuccessfulAccountResponse extends Response{constructor(_0x55bb16){super(!![]),this['account']=_0x55bb16;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x3d50c9){super(![]),this['problem']=_0x3d50c9;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulRefreshResponse extends Response{constructor(_0x2193f6){super(!![]),this['tokens']=_0x2193f6;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedRefreshResponse extends Response{constructor(_0x5d9431){super(![]),this['problem']=_0x5d9431;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
4
4
 
5
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x363e57,_0x2fef3a,_0x5904dd,_0x7c83e7){function _0x36b9e9(_0x5d7794){return _0x5d7794 instanceof _0x5904dd?_0x5d7794:new _0x5904dd(function(_0x47700d){_0x47700d(_0x5d7794);});}return new(_0x5904dd||(_0x5904dd=Promise))(function(_0x48f6de,_0x510b2b){function _0x3e80cb(_0x155d65){try{_0x254a63(_0x7c83e7['next'](_0x155d65));}catch(_0x4b6a74){_0x510b2b(_0x4b6a74);}}function _0x4daf1b(_0x1a7c81){try{_0x254a63(_0x7c83e7['throw'](_0x1a7c81));}catch(_0x5b6856){_0x510b2b(_0x5b6856);}}function _0x254a63(_0x49b37b){_0x49b37b['done']?_0x48f6de(_0x49b37b['value']):_0x36b9e9(_0x49b37b['value'])['then'](_0x3e80cb,_0x4daf1b);}_0x254a63((_0x7c83e7=_0x7c83e7['apply'](_0x363e57,_0x2fef3a||[]))['next']());});};class AccountService{constructor(_0x2fb561){this['baseUri']=_0x2fb561;}['get'](_0x30a8f8,_0x38ac64){return __awaiter$3(this,arguments,void 0,function*(_0x4cbb6c,_0x2b7f44,_0x6d6b2b={}){var _0x169994;let _0x4da1f3=(_0x169994=_0x6d6b2b['baseUri'])!==null&&_0x169994!==void 0?_0x169994:this['baseUri'];!_0x4da1f3['endsWith']('/')&&(_0x4da1f3=_0x4da1f3+'/');_0x4da1f3=_0x4da1f3+'Account/'+_0x2b7f44+'/';const _0xb542a7=yield Fetch['get'](_0x4da1f3,_0x4cbb6c);if(_0xb542a7['status']>0xc7&&_0xb542a7['status']<0x12c){const _0x4db7f4=yield _0xb542a7['json']();return new SuccessfulAccountResponse(_0x4db7f4);}const _0x117c93=yield _0xb542a7['json']();return new FailedAccountResponse(_0x117c93);});}}
5
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x401b98,_0xc76389,_0x2ceba1,_0x550f9b){function _0x1b0559(_0x50caf8){return _0x50caf8 instanceof _0x2ceba1?_0x50caf8:new _0x2ceba1(function(_0x2d2805){_0x2d2805(_0x50caf8);});}return new(_0x2ceba1||(_0x2ceba1=Promise))(function(_0xe1a3e5,_0x10df85){function _0x2c2b20(_0x28dbbb){try{_0x3ff14e(_0x550f9b['next'](_0x28dbbb));}catch(_0x237e07){_0x10df85(_0x237e07);}}function _0x38669f(_0x386dc1){try{_0x3ff14e(_0x550f9b['throw'](_0x386dc1));}catch(_0xa4b56b){_0x10df85(_0xa4b56b);}}function _0x3ff14e(_0x42d67b){_0x42d67b['done']?_0xe1a3e5(_0x42d67b['value']):_0x1b0559(_0x42d67b['value'])['then'](_0x2c2b20,_0x38669f);}_0x3ff14e((_0x550f9b=_0x550f9b['apply'](_0x401b98,_0xc76389||[]))['next']());});};class AccountService{constructor(_0x5c359e){this['baseUri']=_0x5c359e;}['get'](_0x27c272,_0x3a16f3){return __awaiter$3(this,arguments,void 0,function*(_0x356a79,_0x5d00c6,_0x130900={}){var _0x51c791;let _0x50ba59=(_0x51c791=_0x130900['baseUri'])!==null&&_0x51c791!==void 0?_0x51c791:this['baseUri'];!_0x50ba59['endsWith']('/')&&(_0x50ba59=_0x50ba59+'/');_0x50ba59=_0x50ba59+'Account/'+_0x5d00c6+'/';const _0x3be468=yield Fetch['get'](_0x50ba59,_0x356a79);try{if(_0x3be468['status']>0xc7&&_0x3be468['status']<0x12c){const _0x58f069=yield _0x3be468['json']();return new SuccessfulAccountResponse(_0x58f069);}const _0x45e238=yield _0x3be468['json']();return new FailedAccountResponse(_0x45e238);}catch(_0x3c51f){if(_0x3c51f instanceof Error)return new FailedAccountResponse({'detail':_0x3c51f['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x3c51f;}});}}
6
6
 
7
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x8b45ff,_0x1966ec,_0x2de026,_0x9ff7fd){function _0x7d9afe(_0x2f0ba0){return _0x2f0ba0 instanceof _0x2de026?_0x2f0ba0:new _0x2de026(function(_0x2ef0fc){_0x2ef0fc(_0x2f0ba0);});}return new(_0x2de026||(_0x2de026=Promise))(function(_0x46687e,_0x5d9ff2){function _0x4aa069(_0xf92266){try{_0x16df6c(_0x9ff7fd['next'](_0xf92266));}catch(_0x206069){_0x5d9ff2(_0x206069);}}function _0x2e0fc6(_0x4cc878){try{_0x16df6c(_0x9ff7fd['throw'](_0x4cc878));}catch(_0x293e1c){_0x5d9ff2(_0x293e1c);}}function _0x16df6c(_0x3d6018){_0x3d6018['done']?_0x46687e(_0x3d6018['value']):_0x7d9afe(_0x3d6018['value'])['then'](_0x4aa069,_0x2e0fc6);}_0x16df6c((_0x9ff7fd=_0x9ff7fd['apply'](_0x8b45ff,_0x1966ec||[]))['next']());});};class ListService{constructor(_0x11e999){this['baseUri']=_0x11e999;}['add'](_0x343acb,_0x1561a9,_0xd55dc5){return __awaiter$2(this,arguments,void 0,function*(_0x43cc19,_0x374309,_0x39cf0c,_0x5b2c8b={}){var _0x19aa83;let _0x409f2e=(_0x19aa83=_0x5b2c8b['baseUri'])!==null&&_0x19aa83!==void 0?_0x19aa83:this['baseUri'];!_0x409f2e['endsWith']('/')&&(_0x409f2e=_0x409f2e+'/');_0x409f2e=_0x409f2e+'List';const _0x41ff6e={'account_name':_0x374309,'list_name':_0x39cf0c},_0x1c69f3=yield Fetch['post'](_0x409f2e,_0x43cc19,_0x41ff6e);if(_0x1c69f3['status']>0xc7&&_0x1c69f3['status']<0x12c){const _0xff7e0b=yield _0x1c69f3['json']();return new SuccessfulAccountResponse(_0xff7e0b);}const _0x3dadc6=yield _0x1c69f3['json']();return new FailedAccountResponse(_0x3dadc6);});}['remove'](_0x5057c9,_0x59e37d,_0x5c4680){return __awaiter$2(this,arguments,void 0,function*(_0x5e6fdd,_0x351066,_0x405d71,_0x5bd7e3={}){var _0x5cadf0;let _0x1b9519=(_0x5cadf0=_0x5bd7e3['baseUri'])!==null&&_0x5cadf0!==void 0?_0x5cadf0:this['baseUri'];_0x1b9519=_0x1b9519+'/List/'+_0x351066+'/'+_0x405d71;const _0x97fde7=yield Fetch['delete'](_0x1b9519,_0x5e6fdd);if(_0x97fde7['status']>0xc7&&_0x97fde7['status']<0x12c){const _0x2e75ef=yield _0x97fde7['json']();return new SuccessfulAccountResponse(_0x2e75ef);}const _0x27aece=yield _0x97fde7['json']();return new FailedAccountResponse(_0x27aece);});}}
7
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x5aebaf,_0x4605e4,_0x2055ad,_0x422340){function _0x15c099(_0x1185bc){return _0x1185bc instanceof _0x2055ad?_0x1185bc:new _0x2055ad(function(_0x43d2ee){_0x43d2ee(_0x1185bc);});}return new(_0x2055ad||(_0x2055ad=Promise))(function(_0xa20838,_0x68c440){function _0x1795e3(_0x38eae3){try{_0x374709(_0x422340['next'](_0x38eae3));}catch(_0x3a4b60){_0x68c440(_0x3a4b60);}}function _0x7e4e8d(_0x4d078d){try{_0x374709(_0x422340['throw'](_0x4d078d));}catch(_0x5c70c8){_0x68c440(_0x5c70c8);}}function _0x374709(_0x27683e){_0x27683e['done']?_0xa20838(_0x27683e['value']):_0x15c099(_0x27683e['value'])['then'](_0x1795e3,_0x7e4e8d);}_0x374709((_0x422340=_0x422340['apply'](_0x5aebaf,_0x4605e4||[]))['next']());});};class ListService{constructor(_0x20729e){this['baseUri']=_0x20729e;}['add'](_0x16ff92,_0x5a9454,_0xbcbc66){return __awaiter$2(this,arguments,void 0,function*(_0x3be3f1,_0x1f47dc,_0x151836,_0x155305={}){var _0x4adca2;let _0x411783=(_0x4adca2=_0x155305['baseUri'])!==null&&_0x4adca2!==void 0?_0x4adca2:this['baseUri'];!_0x411783['endsWith']('/')&&(_0x411783=_0x411783+'/');_0x411783=_0x411783+'List';const _0x2b7cb7={'account_name':_0x1f47dc,'list_name':_0x151836};try{const _0x32644b=yield Fetch['post'](_0x411783,_0x3be3f1,_0x2b7cb7);if(_0x32644b['status']>0xc7&&_0x32644b['status']<0x12c){const _0x2fb0c8=yield _0x32644b['json']();return new SuccessfulAccountResponse(_0x2fb0c8);}const _0x39685d=yield _0x32644b['json']();return new FailedAccountResponse(_0x39685d);}catch(_0x26d910){if(_0x26d910 instanceof Error)return new FailedAccountResponse({'detail':_0x26d910['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x26d910;}});}['remove'](_0x3ec912,_0x41c423,_0x3e6d69){return __awaiter$2(this,arguments,void 0,function*(_0x4cf9aa,_0x1ab087,_0x28abd6,_0x25e65e={}){var _0x5c68ef;let _0x7541da=(_0x5c68ef=_0x25e65e['baseUri'])!==null&&_0x5c68ef!==void 0?_0x5c68ef:this['baseUri'];_0x7541da=_0x7541da+'/List/'+_0x1ab087+'/'+_0x28abd6;const _0x1d8a52=yield Fetch['delete'](_0x7541da,_0x4cf9aa);try{if(_0x1d8a52['status']>0xc7&&_0x1d8a52['status']<0x12c){const _0x3780c7=yield _0x1d8a52['json']();return new SuccessfulAccountResponse(_0x3780c7);}const _0x1717cb=yield _0x1d8a52['json']();return new FailedAccountResponse(_0x1717cb);}catch(_0x5b4982){if(_0x5b4982 instanceof Error)return new FailedAccountResponse({'detail':_0x5b4982['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x5b4982;}});}}
8
8
 
9
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x48b7d5,_0x5e2a00,_0x120f69,_0x5de50c){function _0x392cd7(_0x59907b){return _0x59907b instanceof _0x120f69?_0x59907b:new _0x120f69(function(_0x43a35a){_0x43a35a(_0x59907b);});}return new(_0x120f69||(_0x120f69=Promise))(function(_0xe9b944,_0x9c68e1){function _0x5581e5(_0x4afa25){try{_0x326f5f(_0x5de50c['next'](_0x4afa25));}catch(_0x28b439){_0x9c68e1(_0x28b439);}}function _0x256e20(_0x28afd3){try{_0x326f5f(_0x5de50c['throw'](_0x28afd3));}catch(_0x1e83cc){_0x9c68e1(_0x1e83cc);}}function _0x326f5f(_0x4e1eb3){_0x4e1eb3['done']?_0xe9b944(_0x4e1eb3['value']):_0x392cd7(_0x4e1eb3['value'])['then'](_0x5581e5,_0x256e20);}_0x326f5f((_0x5de50c=_0x5de50c['apply'](_0x48b7d5,_0x5e2a00||[]))['next']());});};class TokenManager{constructor(_0x17a49b){this['securityService']=_0x17a49b;}['RefreshTokens'](_0x35b47d){return __awaiter$1(this,void 0,void 0,function*(){if(Date['now']()<_0x35b47d['access_expires'])return new SuccessfulRefreshResponse(_0x35b47d);if(Date['now']()>_0x35b47d['refresh_expires']){const _0x3ac042={'details':'','type':'','status':0x193,'title':'Forbidden','instance':''};return new FailedRefreshResponse(_0x3ac042);}const _0x1dc21f=yield this['securityService']['refresh'](_0x35b47d['refresh_token']);if(!_0x1dc21f['isSuccess'])return new FailedRefreshResponse(_0x1dc21f['toProblem']());return new SuccessfulRefreshResponse(_0x1dc21f['toSuccess']());});}}
9
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x5ad1d2,_0x45f321,_0x4d1eb2,_0x322e50){function _0x25c462(_0x165a74){return _0x165a74 instanceof _0x4d1eb2?_0x165a74:new _0x4d1eb2(function(_0x3b3f86){_0x3b3f86(_0x165a74);});}return new(_0x4d1eb2||(_0x4d1eb2=Promise))(function(_0x48374e,_0x706ddb){function _0x20c8bc(_0xe73027){try{_0x3a0827(_0x322e50['next'](_0xe73027));}catch(_0x338459){_0x706ddb(_0x338459);}}function _0x249ea8(_0x24c3c8){try{_0x3a0827(_0x322e50['throw'](_0x24c3c8));}catch(_0x8ef5a5){_0x706ddb(_0x8ef5a5);}}function _0x3a0827(_0x5763ee){_0x5763ee['done']?_0x48374e(_0x5763ee['value']):_0x25c462(_0x5763ee['value'])['then'](_0x20c8bc,_0x249ea8);}_0x3a0827((_0x322e50=_0x322e50['apply'](_0x5ad1d2,_0x45f321||[]))['next']());});};class TokenManager{constructor(_0x29e04b){this['securityService']=_0x29e04b;}['RefreshTokens'](_0x119852){return __awaiter$1(this,arguments,void 0,function*(_0x31dab7,_0x67edd5={}){if(Date['now']()<_0x31dab7['access_expires'])return new SuccessfulRefreshResponse(_0x31dab7);if(Date['now']()>_0x31dab7['refresh_expires']){const _0x187054={'detail':'Forbidden','type':'','status':0x193,'title':'Forbidden','instance':''};return new FailedRefreshResponse(_0x187054);}const _0x2f847f=yield this['securityService']['refresh'](_0x31dab7['refresh_token'],_0x67edd5);if(!_0x2f847f['isSuccess'])return new FailedRefreshResponse(_0x2f847f['toProblem']());return new SuccessfulRefreshResponse(_0x2f847f['toSuccess']());});}}
10
10
 
11
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x2262fe,_0x5b255c,_0xe5a619,_0x23bf94){function _0x4e6c94(_0xf16fbc){return _0xf16fbc instanceof _0xe5a619?_0xf16fbc:new _0xe5a619(function(_0x10f453){_0x10f453(_0xf16fbc);});}return new(_0xe5a619||(_0xe5a619=Promise))(function(_0x4e9bf5,_0x520f7b){function _0x463e8b(_0x2b6729){try{_0x1478cb(_0x23bf94['next'](_0x2b6729));}catch(_0x5523a8){_0x520f7b(_0x5523a8);}}function _0x24d124(_0x54a16f){try{_0x1478cb(_0x23bf94['throw'](_0x54a16f));}catch(_0x23afa9){_0x520f7b(_0x23afa9);}}function _0x1478cb(_0x37d04a){_0x37d04a['done']?_0x4e9bf5(_0x37d04a['value']):_0x4e6c94(_0x37d04a['value'])['then'](_0x463e8b,_0x24d124);}_0x1478cb((_0x23bf94=_0x23bf94['apply'](_0x2262fe,_0x5b255c||[]))['next']());});};class SecurityService{constructor(_0x144362){this['baseUri']=_0x144362,this['tokenManager']=new TokenManager(this);}['refresh'](_0x1db608){return __awaiter(this,arguments,void 0,function*(_0x20c0c4,_0x2dd6e0={}){var _0x5b0bc3;let _0x2d2b48=(_0x5b0bc3=_0x2dd6e0['baseUri'])!==null&&_0x5b0bc3!==void 0?_0x5b0bc3:this['baseUri'];!_0x2d2b48['endsWith']('/')&&(_0x2d2b48=_0x2d2b48+'/');_0x2d2b48=_0x2d2b48+'Security/Refresh';const _0x1cb2ba=yield Fetch['post'](_0x2d2b48,_0x20c0c4,null);if(_0x1cb2ba['status']>0xc7&&_0x1cb2ba['status']<0x12c){const _0x4fcdfe=yield _0x1cb2ba['json']();return new SuccessfulRefreshResponse(_0x4fcdfe);}const _0x1a9cdb=yield _0x1cb2ba['json']();return new FailedRefreshResponse(_0x1a9cdb);});}}
11
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x228535,_0x21ef1a,_0x36a78e,_0x335810){function _0xcdcb97(_0x43aa8c){return _0x43aa8c instanceof _0x36a78e?_0x43aa8c:new _0x36a78e(function(_0x2a1101){_0x2a1101(_0x43aa8c);});}return new(_0x36a78e||(_0x36a78e=Promise))(function(_0x15f30d,_0xfcff9b){function _0x1d6bf5(_0x55e32f){try{_0x5ed6d9(_0x335810['next'](_0x55e32f));}catch(_0x1d06d8){_0xfcff9b(_0x1d06d8);}}function _0x55fc7f(_0x23dabb){try{_0x5ed6d9(_0x335810['throw'](_0x23dabb));}catch(_0x49d70a){_0xfcff9b(_0x49d70a);}}function _0x5ed6d9(_0x1448c3){_0x1448c3['done']?_0x15f30d(_0x1448c3['value']):_0xcdcb97(_0x1448c3['value'])['then'](_0x1d6bf5,_0x55fc7f);}_0x5ed6d9((_0x335810=_0x335810['apply'](_0x228535,_0x21ef1a||[]))['next']());});};class SecurityService{constructor(_0x50e069){this['baseUri']=_0x50e069,this['tokenManager']=new TokenManager(this);}['refresh'](_0x3d977a){return __awaiter(this,arguments,void 0,function*(_0x1dde90,_0x35f480={}){var _0x3d7d7e;let _0x2d849f=(_0x3d7d7e=_0x35f480['baseUri'])!==null&&_0x3d7d7e!==void 0?_0x3d7d7e:this['baseUri'];!_0x2d849f['endsWith']('/')&&(_0x2d849f=_0x2d849f+'/');_0x2d849f=_0x2d849f+'Security/Refresh';try{const _0x49905b=yield Fetch['post'](_0x2d849f,_0x1dde90,null);if(_0x49905b['status']>0xc7&&_0x49905b['status']<0x12c){const _0x25ebcc=yield _0x49905b['json']();return new SuccessfulRefreshResponse(_0x25ebcc);}const _0x5bab2b=yield _0x49905b['json']();return new FailedRefreshResponse(_0x5bab2b);}catch(_0x19becc){if(_0x19becc instanceof Error)return new FailedRefreshResponse({'detail':_0x19becc['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x19becc;}});}}
12
12
 
13
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
 
package/dist/types.d.ts CHANGED
@@ -14,7 +14,7 @@ declare class ListService {
14
14
  declare class TokenManager {
15
15
  readonly securityService: SecurityService;
16
16
  constructor(securityService: SecurityService);
17
- RefreshTokens(tokens: Tokens): Promise<Response<Tokens, Problem>>;
17
+ RefreshTokens(tokens: Tokens, options?: Partial<Options>): Promise<Response<Tokens, Problem>>;
18
18
  }
19
19
 
20
20
  declare class SecurityService {
@@ -51,7 +51,7 @@ type Problem = {
51
51
  title: string;
52
52
  status: number;
53
53
  instance: string;
54
- details: string;
54
+ detail: string;
55
55
  };
56
56
  type Account = {
57
57
  name: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@searchability/admin-client",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
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(_0x46a965,_0x33c839,_0x1b60c3,_0x494c12){function _0x26615e(_0x36a14b){return _0x36a14b instanceof _0x1b60c3?_0x36a14b:new _0x1b60c3(function(_0x463343){_0x463343(_0x36a14b);});}return new(_0x1b60c3||(_0x1b60c3=Promise))(function(_0x3256ed,_0x6e8a6e){function _0x43ec3b(_0x35aa13){try{_0x11a50e(_0x494c12['next'](_0x35aa13));}catch(_0x12dcf1){_0x6e8a6e(_0x12dcf1);}}function _0x3d78f3(_0x6343be){try{_0x11a50e(_0x494c12['throw'](_0x6343be));}catch(_0x581c88){_0x6e8a6e(_0x581c88);}}function _0x11a50e(_0x15f2ce){_0x15f2ce['done']?_0x3256ed(_0x15f2ce['value']):_0x26615e(_0x15f2ce['value'])['then'](_0x43ec3b,_0x3d78f3);}_0x11a50e((_0x494c12=_0x494c12['apply'](_0x46a965,_0x33c839||[]))['next']());});};class Fetch{static['get'](_0x4f573f,_0x88617c){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x4f573f,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x88617c}});});}static['post'](_0x1b417f,_0x366ec5,_0x43a3e4){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x1b417f,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x366ec5},'body':_0x43a3e4?JSON['stringify'](_0x43a3e4):null});});}static['put'](_0x3ac1a8,_0x4d0a9e,_0x46212b){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x3ac1a8,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4d0a9e},'body':_0x46212b?JSON['stringify'](_0x46212b):null});});}static['delete'](_0x1519b6,_0x386bc9){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x1519b6,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x386bc9}});});}}
2
-
3
- class Response{constructor(_0x1d0182){this['isSuccess']=_0x1d0182;}}class SuccessfulAccountResponse extends Response{constructor(_0x140b15){super(!![]),this['account']=_0x140b15;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x58d03f){super(![]),this['problem']=_0x58d03f;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulRefreshResponse extends Response{constructor(_0x1adb70){super(!![]),this['tokens']=_0x1adb70;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedRefreshResponse extends Response{constructor(_0xbab52b){super(![]),this['problem']=_0xbab52b;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
4
-
5
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x2443c9,_0x239570,_0x550ee6,_0x7fc0b2){function _0x49c2a7(_0x3c45f5){return _0x3c45f5 instanceof _0x550ee6?_0x3c45f5:new _0x550ee6(function(_0x38664c){_0x38664c(_0x3c45f5);});}return new(_0x550ee6||(_0x550ee6=Promise))(function(_0x411828,_0x300911){function _0x30434f(_0x416f1f){try{_0x4783fe(_0x7fc0b2['next'](_0x416f1f));}catch(_0x114aec){_0x300911(_0x114aec);}}function _0x4c40cb(_0x2045d3){try{_0x4783fe(_0x7fc0b2['throw'](_0x2045d3));}catch(_0x9133fb){_0x300911(_0x9133fb);}}function _0x4783fe(_0x52f5ea){_0x52f5ea['done']?_0x411828(_0x52f5ea['value']):_0x49c2a7(_0x52f5ea['value'])['then'](_0x30434f,_0x4c40cb);}_0x4783fe((_0x7fc0b2=_0x7fc0b2['apply'](_0x2443c9,_0x239570||[]))['next']());});};class AccountService{constructor(_0xeee73){this['baseUri']=_0xeee73;}['get'](_0x293955,_0x445a1c){return __awaiter$3(this,arguments,void 0,function*(_0x8a39be,_0x54545e,_0x570364={}){var _0x24ac2e;let _0x2dca72=(_0x24ac2e=_0x570364['baseUri'])!==null&&_0x24ac2e!==void 0?_0x24ac2e:this['baseUri'];!_0x2dca72['endsWith']('/')&&(_0x2dca72=_0x2dca72+'/');_0x2dca72=_0x2dca72+'Account/'+_0x54545e+'/';const _0x3213f9=yield Fetch['get'](_0x2dca72,_0x8a39be);if(_0x3213f9['status']>0xc7&&_0x3213f9['status']<0x12c){const _0x399f87=yield _0x3213f9['json']();return new SuccessfulAccountResponse(_0x399f87);}const _0x12eecb=yield _0x3213f9['json']();return new FailedAccountResponse(_0x12eecb);});}}
6
-
7
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x26eb58,_0x5c255b,_0x2ec01f,_0x3fdd0e){function _0x265a3a(_0x4e0752){return _0x4e0752 instanceof _0x2ec01f?_0x4e0752:new _0x2ec01f(function(_0x5bcb6c){_0x5bcb6c(_0x4e0752);});}return new(_0x2ec01f||(_0x2ec01f=Promise))(function(_0x1e7cd8,_0x2d983e){function _0x5b5ce9(_0x5e0e11){try{_0x3bc669(_0x3fdd0e['next'](_0x5e0e11));}catch(_0x22fd7f){_0x2d983e(_0x22fd7f);}}function _0xdd19de(_0x337351){try{_0x3bc669(_0x3fdd0e['throw'](_0x337351));}catch(_0x3a0b6f){_0x2d983e(_0x3a0b6f);}}function _0x3bc669(_0x42cb38){_0x42cb38['done']?_0x1e7cd8(_0x42cb38['value']):_0x265a3a(_0x42cb38['value'])['then'](_0x5b5ce9,_0xdd19de);}_0x3bc669((_0x3fdd0e=_0x3fdd0e['apply'](_0x26eb58,_0x5c255b||[]))['next']());});};class ListService{constructor(_0x593f0f){this['baseUri']=_0x593f0f;}['add'](_0x50a9b4,_0x1a55a8,_0x4f7da1){return __awaiter$2(this,arguments,void 0,function*(_0x13e77f,_0x358d68,_0x422ffd,_0x10d315={}){var _0x3b5cdf;let _0x15d333=(_0x3b5cdf=_0x10d315['baseUri'])!==null&&_0x3b5cdf!==void 0?_0x3b5cdf:this['baseUri'];!_0x15d333['endsWith']('/')&&(_0x15d333=_0x15d333+'/');_0x15d333=_0x15d333+'List';const _0x3613d6={'account_name':_0x358d68,'list_name':_0x422ffd},_0x3f69ef=yield Fetch['post'](_0x15d333,_0x13e77f,_0x3613d6);if(_0x3f69ef['status']>0xc7&&_0x3f69ef['status']<0x12c){const _0x39cb67=yield _0x3f69ef['json']();return new SuccessfulAccountResponse(_0x39cb67);}const _0x19ecb5=yield _0x3f69ef['json']();return new FailedAccountResponse(_0x19ecb5);});}['remove'](_0x20cb38,_0x4e5758,_0x41e616){return __awaiter$2(this,arguments,void 0,function*(_0x2893c2,_0x450bf4,_0x57bfb8,_0x48c3a3={}){var _0x6383bb;let _0x4a140d=(_0x6383bb=_0x48c3a3['baseUri'])!==null&&_0x6383bb!==void 0?_0x6383bb:this['baseUri'];_0x4a140d=_0x4a140d+'/List/'+_0x450bf4+'/'+_0x57bfb8;const _0x584d1f=yield Fetch['delete'](_0x4a140d,_0x2893c2);if(_0x584d1f['status']>0xc7&&_0x584d1f['status']<0x12c){const _0x8c74f2=yield _0x584d1f['json']();return new SuccessfulAccountResponse(_0x8c74f2);}const _0x5537ee=yield _0x584d1f['json']();return new FailedAccountResponse(_0x5537ee);});}}
8
-
9
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x423627,_0x369906,_0x11beb4,_0x472d9b){function _0x2a8c89(_0x23167c){return _0x23167c instanceof _0x11beb4?_0x23167c:new _0x11beb4(function(_0xb63c95){_0xb63c95(_0x23167c);});}return new(_0x11beb4||(_0x11beb4=Promise))(function(_0xa91a55,_0x1b8089){function _0x4412cd(_0x5827d3){try{_0x43fa5b(_0x472d9b['next'](_0x5827d3));}catch(_0x2f2299){_0x1b8089(_0x2f2299);}}function _0x589f54(_0xa5d68e){try{_0x43fa5b(_0x472d9b['throw'](_0xa5d68e));}catch(_0x22a381){_0x1b8089(_0x22a381);}}function _0x43fa5b(_0x8694a){_0x8694a['done']?_0xa91a55(_0x8694a['value']):_0x2a8c89(_0x8694a['value'])['then'](_0x4412cd,_0x589f54);}_0x43fa5b((_0x472d9b=_0x472d9b['apply'](_0x423627,_0x369906||[]))['next']());});};class TokenManager{constructor(_0x39d0eb){this['securityService']=_0x39d0eb;}['RefreshTokens'](_0x3d0008){return __awaiter$1(this,void 0,void 0,function*(){if(Date['now']()<_0x3d0008['access_expires'])return new SuccessfulRefreshResponse(_0x3d0008);if(Date['now']()>_0x3d0008['refresh_expires']){const _0x11d377={'details':'','type':'','status':0x193,'title':'Forbidden','instance':''};return new FailedRefreshResponse(_0x11d377);}const _0x4ce9d5=yield this['securityService']['refresh'](_0x3d0008['refresh_token']);if(!_0x4ce9d5['isSuccess'])return new FailedRefreshResponse(_0x4ce9d5['toProblem']());return new SuccessfulRefreshResponse(_0x4ce9d5['toSuccess']());});}}
10
-
11
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x3ebed8,_0x23b8d3,_0x19ab83,_0x1c34c5){function _0x205e68(_0x45129c){return _0x45129c instanceof _0x19ab83?_0x45129c:new _0x19ab83(function(_0x105d76){_0x105d76(_0x45129c);});}return new(_0x19ab83||(_0x19ab83=Promise))(function(_0x314ba3,_0x1e9b5d){function _0xda23fc(_0x3b0bc8){try{_0x1fa216(_0x1c34c5['next'](_0x3b0bc8));}catch(_0x227034){_0x1e9b5d(_0x227034);}}function _0x9b044d(_0x47fa45){try{_0x1fa216(_0x1c34c5['throw'](_0x47fa45));}catch(_0xae203d){_0x1e9b5d(_0xae203d);}}function _0x1fa216(_0x36028a){_0x36028a['done']?_0x314ba3(_0x36028a['value']):_0x205e68(_0x36028a['value'])['then'](_0xda23fc,_0x9b044d);}_0x1fa216((_0x1c34c5=_0x1c34c5['apply'](_0x3ebed8,_0x23b8d3||[]))['next']());});};class SecurityService{constructor(_0x239d01){this['baseUri']=_0x239d01,this['tokenManager']=new TokenManager(this);}['refresh'](_0x589c57){return __awaiter(this,arguments,void 0,function*(_0x16ad97,_0x249f7a={}){var _0x35dc9d;let _0x310ea0=(_0x35dc9d=_0x249f7a['baseUri'])!==null&&_0x35dc9d!==void 0?_0x35dc9d:this['baseUri'];!_0x310ea0['endsWith']('/')&&(_0x310ea0=_0x310ea0+'/');_0x310ea0=_0x310ea0+'Security/Refresh';const _0x3565c6=yield Fetch['post'](_0x310ea0,_0x16ad97,null);if(_0x3565c6['status']>0xc7&&_0x3565c6['status']<0x12c){const _0x1ae812=yield _0x3565c6['json']();return new SuccessfulRefreshResponse(_0x1ae812);}const _0x37920e=yield _0x3565c6['json']();return new FailedRefreshResponse(_0x37920e);});}}
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 };