@searchability/admin-client 0.0.7 → 0.0.9

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(_0x254144,_0x2b7ad5,_0x49efdf,_0x27bf50){function _0x4cb9da(_0x1c5a68){return _0x1c5a68 instanceof _0x49efdf?_0x1c5a68:new _0x49efdf(function(_0x307872){_0x307872(_0x1c5a68);});}return new(_0x49efdf||(_0x49efdf=Promise))(function(_0x211ff0,_0x5c14a3){function _0x1da2f3(_0x2bbde6){try{_0x4cd967(_0x27bf50['next'](_0x2bbde6));}catch(_0xdce5e5){_0x5c14a3(_0xdce5e5);}}function _0x574a0f(_0x10cf0a){try{_0x4cd967(_0x27bf50['throw'](_0x10cf0a));}catch(_0x4173a3){_0x5c14a3(_0x4173a3);}}function _0x4cd967(_0x2428bd){_0x2428bd['done']?_0x211ff0(_0x2428bd['value']):_0x4cb9da(_0x2428bd['value'])['then'](_0x1da2f3,_0x574a0f);}_0x4cd967((_0x27bf50=_0x27bf50['apply'](_0x254144,_0x2b7ad5||[]))['next']());});};class Fetch{static['get'](_0x5babca,_0x42af0b){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x5babca,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x42af0b}});});}static['post'](_0x19fa58,_0x3c06ff,_0x4d098e){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x19fa58,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3c06ff},'body':_0x4d098e?JSON['stringify'](_0x4d098e):null});});}static['put'](_0x7984e8,_0x558d2f,_0xbf9504){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x7984e8,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x558d2f},'body':_0xbf9504?JSON['stringify'](_0xbf9504):null});});}static['delete'](_0x44b063,_0x433702){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x44b063,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x433702}});});}}
2
+
3
+ class Response{constructor(_0x42c69d){this['isSuccess']=_0x42c69d;}}class SuccessfulAccountResponse extends Response{constructor(_0x2b2093){super(!![]),this['account']=_0x2b2093;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x46530d){super(![]),this['problem']=_0x46530d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulRefreshResponse extends Response{constructor(_0x34567d){super(!![]),this['tokens']=_0x34567d;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedRefreshResponse extends Response{constructor(_0x17d43b){super(![]),this['problem']=_0x17d43b;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
4
+
5
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x67fb41,_0x58f7dc,_0x33967c,_0x6c403f){function _0x48d663(_0x43f9a3){return _0x43f9a3 instanceof _0x33967c?_0x43f9a3:new _0x33967c(function(_0x17f8ca){_0x17f8ca(_0x43f9a3);});}return new(_0x33967c||(_0x33967c=Promise))(function(_0x162cd1,_0x33a0bc){function _0x5c141f(_0x202630){try{_0x5dc01f(_0x6c403f['next'](_0x202630));}catch(_0x5026ba){_0x33a0bc(_0x5026ba);}}function _0x401b2e(_0x2b4fea){try{_0x5dc01f(_0x6c403f['throw'](_0x2b4fea));}catch(_0x2dc54e){_0x33a0bc(_0x2dc54e);}}function _0x5dc01f(_0x4ab038){_0x4ab038['done']?_0x162cd1(_0x4ab038['value']):_0x48d663(_0x4ab038['value'])['then'](_0x5c141f,_0x401b2e);}_0x5dc01f((_0x6c403f=_0x6c403f['apply'](_0x67fb41,_0x58f7dc||[]))['next']());});};class AccountService{constructor(_0x6fb03e){this['baseUri']=_0x6fb03e;}['get'](_0x5e1d8a,_0x1d5300){return __awaiter$3(this,arguments,void 0,function*(_0x42bb23,_0x394994,_0x4b4e04={}){var _0x4951c9;let _0xc20b3=(_0x4951c9=_0x4b4e04['baseUri'])!==null&&_0x4951c9!==void 0?_0x4951c9:this['baseUri'];!_0xc20b3['endsWith']('/')&&(_0xc20b3=_0xc20b3+'/');_0xc20b3=_0xc20b3+'Account/'+_0x394994+'/';const _0x91889b=yield Fetch['get'](_0xc20b3,_0x42bb23);try{if(_0x91889b['status']>0xc7&&_0x91889b['status']<0x12c){const _0x5f0ce5=yield _0x91889b['json']();return new SuccessfulAccountResponse(_0x5f0ce5);}const _0x26a4ae=yield _0x91889b['json']();return new FailedAccountResponse(_0x26a4ae);}catch(_0x28e7c0){if(_0x28e7c0 instanceof Error)return new FailedAccountResponse({'detail':_0x28e7c0['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x28e7c0;}});}}
6
+
7
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x4d2899,_0x5b0cf4,_0x58d6b9,_0x149b13){function _0x5654cb(_0x40dd24){return _0x40dd24 instanceof _0x58d6b9?_0x40dd24:new _0x58d6b9(function(_0x5eceab){_0x5eceab(_0x40dd24);});}return new(_0x58d6b9||(_0x58d6b9=Promise))(function(_0x20f94b,_0x2902d1){function _0x3cbd6a(_0x32f40a){try{_0x225b02(_0x149b13['next'](_0x32f40a));}catch(_0xe815de){_0x2902d1(_0xe815de);}}function _0x4284d6(_0x40a7f1){try{_0x225b02(_0x149b13['throw'](_0x40a7f1));}catch(_0x2c6645){_0x2902d1(_0x2c6645);}}function _0x225b02(_0xc62671){_0xc62671['done']?_0x20f94b(_0xc62671['value']):_0x5654cb(_0xc62671['value'])['then'](_0x3cbd6a,_0x4284d6);}_0x225b02((_0x149b13=_0x149b13['apply'](_0x4d2899,_0x5b0cf4||[]))['next']());});};class ListService{constructor(_0x11145a){this['baseUri']=_0x11145a;}['add'](_0x5636cd,_0x3da14e,_0x466f58){return __awaiter$2(this,arguments,void 0,function*(_0x357074,_0x4225b1,_0x2a5276,_0x3d548f={}){var _0x1ef651;let _0x571cda=(_0x1ef651=_0x3d548f['baseUri'])!==null&&_0x1ef651!==void 0?_0x1ef651:this['baseUri'];!_0x571cda['endsWith']('/')&&(_0x571cda=_0x571cda+'/');_0x571cda=_0x571cda+'List';const _0x2606be={'account_name':_0x4225b1,'list_name':_0x2a5276};try{const _0x413e05=yield Fetch['post'](_0x571cda,_0x357074,_0x2606be);if(_0x413e05['status']>0xc7&&_0x413e05['status']<0x12c){const _0x524384=yield _0x413e05['json']();return new SuccessfulAccountResponse(_0x524384);}const _0x310492=yield _0x413e05['json']();return new FailedAccountResponse(_0x310492);}catch(_0x1e73f2){if(_0x1e73f2 instanceof Error)return new FailedAccountResponse({'detail':_0x1e73f2['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x1e73f2;}});}['remove'](_0x13f564,_0x2dcdfe,_0x4def68){return __awaiter$2(this,arguments,void 0,function*(_0x2e0cd2,_0x22f3a4,_0x5398c1,_0x2b4d9c={}){var _0x6eed15;let _0x4748cf=(_0x6eed15=_0x2b4d9c['baseUri'])!==null&&_0x6eed15!==void 0?_0x6eed15:this['baseUri'];_0x4748cf=_0x4748cf+'/List/'+_0x22f3a4+'/'+_0x5398c1;const _0x1a6ceb=yield Fetch['delete'](_0x4748cf,_0x2e0cd2);try{if(_0x1a6ceb['status']>0xc7&&_0x1a6ceb['status']<0x12c){const _0x40f51f=yield _0x1a6ceb['json']();return new SuccessfulAccountResponse(_0x40f51f);}const _0x3a0baf=yield _0x1a6ceb['json']();return new FailedAccountResponse(_0x3a0baf);}catch(_0x36e7e6){if(_0x36e7e6 instanceof Error)return new FailedAccountResponse({'detail':_0x36e7e6['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x36e7e6;}});}}
8
+
9
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x336163,_0x5a80d0,_0x47b0ec,_0x33cade){function _0x2f9abd(_0x1bb423){return _0x1bb423 instanceof _0x47b0ec?_0x1bb423:new _0x47b0ec(function(_0x5982cf){_0x5982cf(_0x1bb423);});}return new(_0x47b0ec||(_0x47b0ec=Promise))(function(_0x371fdc,_0x18998d){function _0x4c2a85(_0x2532e1){try{_0x5f2c98(_0x33cade['next'](_0x2532e1));}catch(_0x8d158c){_0x18998d(_0x8d158c);}}function _0x5714ff(_0x46427e){try{_0x5f2c98(_0x33cade['throw'](_0x46427e));}catch(_0x20f020){_0x18998d(_0x20f020);}}function _0x5f2c98(_0x3b7b2f){_0x3b7b2f['done']?_0x371fdc(_0x3b7b2f['value']):_0x2f9abd(_0x3b7b2f['value'])['then'](_0x4c2a85,_0x5714ff);}_0x5f2c98((_0x33cade=_0x33cade['apply'](_0x336163,_0x5a80d0||[]))['next']());});};class TokenManager{constructor(_0x2385ed){this['securityService']=_0x2385ed;}['RefreshTokens'](_0x5e9ee6){return __awaiter$1(this,arguments,void 0,function*(_0x261552,_0x5d3489={}){if(Date['now']()<_0x261552['access_expires'])return new SuccessfulRefreshResponse(_0x261552);if(Date['now']()>_0x261552['refresh_expires']){const _0x4cc3b9={'detail':'Forbidden','type':'','status':0x193,'title':'Forbidden','instance':''};return new FailedRefreshResponse(_0x4cc3b9);}const _0x4f0e5f=yield this['securityService']['refresh'](_0x261552['refresh_token'],_0x5d3489);if(!_0x4f0e5f['isSuccess'])return new FailedRefreshResponse(_0x4f0e5f['toProblem']());return new SuccessfulRefreshResponse(_0x4f0e5f['toSuccess']());});}}
10
+
11
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x35eba6,_0x4beae9,_0x54101f,_0x3f12d4){function _0x2a72cf(_0x1b78cd){return _0x1b78cd instanceof _0x54101f?_0x1b78cd:new _0x54101f(function(_0x4373de){_0x4373de(_0x1b78cd);});}return new(_0x54101f||(_0x54101f=Promise))(function(_0x219784,_0x5141e5){function _0x387607(_0x4346e4){try{_0x5d9e8b(_0x3f12d4['next'](_0x4346e4));}catch(_0xabd02d){_0x5141e5(_0xabd02d);}}function _0x5055ae(_0x33719b){try{_0x5d9e8b(_0x3f12d4['throw'](_0x33719b));}catch(_0x4122ae){_0x5141e5(_0x4122ae);}}function _0x5d9e8b(_0x1e0120){_0x1e0120['done']?_0x219784(_0x1e0120['value']):_0x2a72cf(_0x1e0120['value'])['then'](_0x387607,_0x5055ae);}_0x5d9e8b((_0x3f12d4=_0x3f12d4['apply'](_0x35eba6,_0x4beae9||[]))['next']());});};class SecurityService{constructor(_0x7846f8){this['baseUri']=_0x7846f8,this['tokenManager']=new TokenManager(this);}['refresh'](_0x4d22ec){return __awaiter(this,arguments,void 0,function*(_0x11bf35,_0x42bbff={}){var _0x166321;let _0x2ad3d9=(_0x166321=_0x42bbff['baseUri'])!==null&&_0x166321!==void 0?_0x166321:this['baseUri'];!_0x2ad3d9['endsWith']('/')&&(_0x2ad3d9=_0x2ad3d9+'/');_0x2ad3d9=_0x2ad3d9+'Security/Refresh';try{const _0x51ecf9=yield Fetch['post'](_0x2ad3d9,_0x11bf35,null);if(_0x51ecf9['status']>0xc7&&_0x51ecf9['status']<0x12c){const _0x1b0b85=yield _0x51ecf9['json']();return new SuccessfulRefreshResponse(_0x1b0b85);}const _0x3034c4=yield _0x51ecf9['json']();return new FailedRefreshResponse(_0x3034c4);}catch(_0x6dda8d){if(_0x6dda8d instanceof Error)return new FailedRefreshResponse({'detail':_0x6dda8d['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x6dda8d;}});}}
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(_0x39988e,_0x1d6cf7,_0x55fd1e,_0x4ccb56){function _0x37a630(_0x51b7cf){return _0x51b7cf instanceof _0x55fd1e?_0x51b7cf:new _0x55fd1e(function(_0x434942){_0x434942(_0x51b7cf);});}return new(_0x55fd1e||(_0x55fd1e=Promise))(function(_0x2edbf9,_0x3e85af){function _0x4912a1(_0x37431b){try{_0x1005c0(_0x4ccb56['next'](_0x37431b));}catch(_0x5c5406){_0x3e85af(_0x5c5406);}}function _0x153633(_0x1c25fe){try{_0x1005c0(_0x4ccb56['throw'](_0x1c25fe));}catch(_0x377b44){_0x3e85af(_0x377b44);}}function _0x1005c0(_0x1bcffa){_0x1bcffa['done']?_0x2edbf9(_0x1bcffa['value']):_0x37a630(_0x1bcffa['value'])['then'](_0x4912a1,_0x153633);}_0x1005c0((_0x4ccb56=_0x4ccb56['apply'](_0x39988e,_0x1d6cf7||[]))['next']());});};class Fetch{static['get'](_0x293f3f,_0x3716f9){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x293f3f,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3716f9}});});}static['post'](_0x5c0bbb,_0x48c704,_0x4fcc65){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x5c0bbb,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x48c704},'body':_0x4fcc65?JSON['stringify'](_0x4fcc65):null});});}static['put'](_0x17d203,_0x318a56,_0x4f411f){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x17d203,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x318a56},'body':_0x4f411f?JSON['stringify'](_0x4f411f):null});});}static['delete'](_0x328558,_0xe05e0){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x328558,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0xe05e0}});});}}
3
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x263785,_0x1251e1,_0x4239dc,_0x29cb06){function _0x43ed29(_0x302007){return _0x302007 instanceof _0x4239dc?_0x302007:new _0x4239dc(function(_0x4172a0){_0x4172a0(_0x302007);});}return new(_0x4239dc||(_0x4239dc=Promise))(function(_0x4fc617,_0xd03815){function _0x64198c(_0x2b5f61){try{_0x3a24fb(_0x29cb06['next'](_0x2b5f61));}catch(_0x5af050){_0xd03815(_0x5af050);}}function _0xab07c1(_0x320556){try{_0x3a24fb(_0x29cb06['throw'](_0x320556));}catch(_0x1326e6){_0xd03815(_0x1326e6);}}function _0x3a24fb(_0x24bbcb){_0x24bbcb['done']?_0x4fc617(_0x24bbcb['value']):_0x43ed29(_0x24bbcb['value'])['then'](_0x64198c,_0xab07c1);}_0x3a24fb((_0x29cb06=_0x29cb06['apply'](_0x263785,_0x1251e1||[]))['next']());});};class Fetch{static['get'](_0x45bd9b,_0x3d91fa){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x45bd9b,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3d91fa}});});}static['post'](_0x506586,_0x17f638,_0x1a9d82){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x506586,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x17f638},'body':_0x1a9d82?JSON['stringify'](_0x1a9d82):null});});}static['put'](_0x419393,_0x2acc63,_0x5ae42a){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x419393,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2acc63},'body':_0x5ae42a?JSON['stringify'](_0x5ae42a):null});});}static['delete'](_0x3daa8a,_0x2c7508){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x3daa8a,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2c7508}});});}}
4
4
 
5
- class Response{constructor(_0x596838){this['isSuccess']=_0x596838;}}class SuccessfulAccountResponse extends Response{constructor(_0x1fdf9e){super(!![]),this['account']=_0x1fdf9e;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x30ff85){super(![]),this['problem']=_0x30ff85;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulRefreshResponse extends Response{constructor(_0x1fa4bf){super(!![]),this['tokens']=_0x1fa4bf;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedRefreshResponse extends Response{constructor(_0x5a141e){super(![]),this['problem']=_0x5a141e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
5
+ class Response{constructor(_0x5484a9){this['isSuccess']=_0x5484a9;}}class SuccessfulAccountResponse extends Response{constructor(_0x3bce59){super(!![]),this['account']=_0x3bce59;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x3cfb5a){super(![]),this['problem']=_0x3cfb5a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulRefreshResponse extends Response{constructor(_0x505d6d){super(!![]),this['tokens']=_0x505d6d;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedRefreshResponse extends Response{constructor(_0x34f64d){super(![]),this['problem']=_0x34f64d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
6
6
 
7
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x190200,_0x2f41fa,_0x4e4b1e,_0x2dbd9c){function _0xfecdd2(_0x2d8c1e){return _0x2d8c1e instanceof _0x4e4b1e?_0x2d8c1e:new _0x4e4b1e(function(_0x52ea43){_0x52ea43(_0x2d8c1e);});}return new(_0x4e4b1e||(_0x4e4b1e=Promise))(function(_0x3aa5db,_0xc96019){function _0x940bf9(_0x39ccd0){try{_0x325e77(_0x2dbd9c['next'](_0x39ccd0));}catch(_0x487d67){_0xc96019(_0x487d67);}}function _0x3cf309(_0x3a1395){try{_0x325e77(_0x2dbd9c['throw'](_0x3a1395));}catch(_0x424fc4){_0xc96019(_0x424fc4);}}function _0x325e77(_0xdb6dde){_0xdb6dde['done']?_0x3aa5db(_0xdb6dde['value']):_0xfecdd2(_0xdb6dde['value'])['then'](_0x940bf9,_0x3cf309);}_0x325e77((_0x2dbd9c=_0x2dbd9c['apply'](_0x190200,_0x2f41fa||[]))['next']());});};class AccountService{constructor(_0xbcfe21){this['baseUri']=_0xbcfe21;}['get'](_0x26569b,_0x25b343){return __awaiter$3(this,arguments,void 0,function*(_0x20ecea,_0x160773,_0x3f6e02={}){var _0x1f044b;let _0x2b7011=(_0x1f044b=_0x3f6e02['baseUri'])!==null&&_0x1f044b!==void 0?_0x1f044b:this['baseUri'];!_0x2b7011['endsWith']('/')&&(_0x2b7011=_0x2b7011+'/');_0x2b7011=_0x2b7011+'Account/'+_0x160773+'/';const _0x15a391=yield Fetch['get'](_0x2b7011,_0x20ecea);try{if(_0x15a391['status']>0xc7&&_0x15a391['status']<0x12c){const _0x18d42d=yield _0x15a391['json']();return new SuccessfulAccountResponse(_0x18d42d);}const _0x4f2917=yield _0x15a391['json']();return new FailedAccountResponse(_0x4f2917);}catch(_0x4fdb33){if(_0x4fdb33 instanceof Error)return new FailedAccountResponse({'details':_0x4fdb33['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x4fdb33;}});}}
7
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x3e9056,_0x568886,_0x3d20da,_0x445d5d){function _0x11c3f4(_0x513e30){return _0x513e30 instanceof _0x3d20da?_0x513e30:new _0x3d20da(function(_0x44e8a0){_0x44e8a0(_0x513e30);});}return new(_0x3d20da||(_0x3d20da=Promise))(function(_0x3a6c3d,_0x3497e1){function _0x44e7b8(_0x1a6f22){try{_0x5833c2(_0x445d5d['next'](_0x1a6f22));}catch(_0x1c9eb6){_0x3497e1(_0x1c9eb6);}}function _0x40e923(_0x199922){try{_0x5833c2(_0x445d5d['throw'](_0x199922));}catch(_0x15ac0b){_0x3497e1(_0x15ac0b);}}function _0x5833c2(_0xccae7){_0xccae7['done']?_0x3a6c3d(_0xccae7['value']):_0x11c3f4(_0xccae7['value'])['then'](_0x44e7b8,_0x40e923);}_0x5833c2((_0x445d5d=_0x445d5d['apply'](_0x3e9056,_0x568886||[]))['next']());});};class AccountService{constructor(_0x47bc91){this['baseUri']=_0x47bc91;}['get'](_0x3f1c60,_0x37cd1a){return __awaiter$3(this,arguments,void 0,function*(_0x2a2103,_0x1a510e,_0x517c29={}){var _0xba743;let _0xb04191=(_0xba743=_0x517c29['baseUri'])!==null&&_0xba743!==void 0?_0xba743:this['baseUri'];!_0xb04191['endsWith']('/')&&(_0xb04191=_0xb04191+'/');_0xb04191=_0xb04191+'Account/'+_0x1a510e+'/';const _0xa7b4e=yield Fetch['get'](_0xb04191,_0x2a2103);try{if(_0xa7b4e['status']>0xc7&&_0xa7b4e['status']<0x12c){const _0x43f48c=yield _0xa7b4e['json']();return new SuccessfulAccountResponse(_0x43f48c);}const _0x11c92c=yield _0xa7b4e['json']();return new FailedAccountResponse(_0x11c92c);}catch(_0x226713){if(_0x226713 instanceof Error)return new FailedAccountResponse({'detail':_0x226713['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x226713;}});}}
8
8
 
9
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x329331,_0x1a11cf,_0x1ba80b,_0xf9bc12){function _0x2d3f21(_0x4d57a8){return _0x4d57a8 instanceof _0x1ba80b?_0x4d57a8:new _0x1ba80b(function(_0x3533b1){_0x3533b1(_0x4d57a8);});}return new(_0x1ba80b||(_0x1ba80b=Promise))(function(_0x9e380a,_0x40fefa){function _0x1f375d(_0x18e797){try{_0x14962c(_0xf9bc12['next'](_0x18e797));}catch(_0x2279b2){_0x40fefa(_0x2279b2);}}function _0x412dff(_0x358b9f){try{_0x14962c(_0xf9bc12['throw'](_0x358b9f));}catch(_0x24533f){_0x40fefa(_0x24533f);}}function _0x14962c(_0x358990){_0x358990['done']?_0x9e380a(_0x358990['value']):_0x2d3f21(_0x358990['value'])['then'](_0x1f375d,_0x412dff);}_0x14962c((_0xf9bc12=_0xf9bc12['apply'](_0x329331,_0x1a11cf||[]))['next']());});};class ListService{constructor(_0x2d50e2){this['baseUri']=_0x2d50e2;}['add'](_0x59bc32,_0x23efa4,_0x63b8d7){return __awaiter$2(this,arguments,void 0,function*(_0x3d3be3,_0xf83311,_0x1a590a,_0x1fb24b={}){var _0x2c8308;let _0x23c178=(_0x2c8308=_0x1fb24b['baseUri'])!==null&&_0x2c8308!==void 0?_0x2c8308:this['baseUri'];!_0x23c178['endsWith']('/')&&(_0x23c178=_0x23c178+'/');_0x23c178=_0x23c178+'List';const _0x5693a5={'account_name':_0xf83311,'list_name':_0x1a590a};try{const _0x59850a=yield Fetch['post'](_0x23c178,_0x3d3be3,_0x5693a5);if(_0x59850a['status']>0xc7&&_0x59850a['status']<0x12c){const _0xe63159=yield _0x59850a['json']();return new SuccessfulAccountResponse(_0xe63159);}const _0x3e4a3a=yield _0x59850a['json']();return new FailedAccountResponse(_0x3e4a3a);}catch(_0x2189fd){if(_0x2189fd instanceof Error)return new FailedAccountResponse({'details':_0x2189fd['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x2189fd;}});}['remove'](_0x7482ce,_0x37268c,_0x5edce9){return __awaiter$2(this,arguments,void 0,function*(_0x57f264,_0x298053,_0x1e7015,_0x461400={}){var _0x3bc1d6;let _0x40904c=(_0x3bc1d6=_0x461400['baseUri'])!==null&&_0x3bc1d6!==void 0?_0x3bc1d6:this['baseUri'];_0x40904c=_0x40904c+'/List/'+_0x298053+'/'+_0x1e7015;const _0x14571c=yield Fetch['delete'](_0x40904c,_0x57f264);try{if(_0x14571c['status']>0xc7&&_0x14571c['status']<0x12c){const _0xe4d239=yield _0x14571c['json']();return new SuccessfulAccountResponse(_0xe4d239);}const _0x100f8a=yield _0x14571c['json']();return new FailedAccountResponse(_0x100f8a);}catch(_0x104bbf){if(_0x104bbf instanceof Error)return new FailedAccountResponse({'details':_0x104bbf['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x104bbf;}});}}
9
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x2fbfd2,_0x28aeca,_0x415cdd,_0x171c1d){function _0x102a0b(_0xe2fe6e){return _0xe2fe6e instanceof _0x415cdd?_0xe2fe6e:new _0x415cdd(function(_0x14eb47){_0x14eb47(_0xe2fe6e);});}return new(_0x415cdd||(_0x415cdd=Promise))(function(_0x3cdbd4,_0xb072f6){function _0x42ce3a(_0x35cb48){try{_0x204900(_0x171c1d['next'](_0x35cb48));}catch(_0x4415fc){_0xb072f6(_0x4415fc);}}function _0x5bbe7f(_0x38182c){try{_0x204900(_0x171c1d['throw'](_0x38182c));}catch(_0x57f6f4){_0xb072f6(_0x57f6f4);}}function _0x204900(_0x3c073c){_0x3c073c['done']?_0x3cdbd4(_0x3c073c['value']):_0x102a0b(_0x3c073c['value'])['then'](_0x42ce3a,_0x5bbe7f);}_0x204900((_0x171c1d=_0x171c1d['apply'](_0x2fbfd2,_0x28aeca||[]))['next']());});};class ListService{constructor(_0x4c3fec){this['baseUri']=_0x4c3fec;}['add'](_0x143cf1,_0x294322,_0x17b2c9){return __awaiter$2(this,arguments,void 0,function*(_0x2516e4,_0x5a5f88,_0x3b92b6,_0x320b0f={}){var _0x6199fc;let _0x1504c8=(_0x6199fc=_0x320b0f['baseUri'])!==null&&_0x6199fc!==void 0?_0x6199fc:this['baseUri'];!_0x1504c8['endsWith']('/')&&(_0x1504c8=_0x1504c8+'/');_0x1504c8=_0x1504c8+'List';const _0x44dfe7={'account_name':_0x5a5f88,'list_name':_0x3b92b6};try{const _0x33db75=yield Fetch['post'](_0x1504c8,_0x2516e4,_0x44dfe7);if(_0x33db75['status']>0xc7&&_0x33db75['status']<0x12c){const _0x2afe50=yield _0x33db75['json']();return new SuccessfulAccountResponse(_0x2afe50);}const _0x522fa5=yield _0x33db75['json']();return new FailedAccountResponse(_0x522fa5);}catch(_0xd088f8){if(_0xd088f8 instanceof Error)return new FailedAccountResponse({'detail':_0xd088f8['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0xd088f8;}});}['remove'](_0x2861fe,_0x416f22,_0x28ec32){return __awaiter$2(this,arguments,void 0,function*(_0x34c175,_0x104d6f,_0x2494ee,_0x27afaa={}){var _0x41117e;let _0x53cf75=(_0x41117e=_0x27afaa['baseUri'])!==null&&_0x41117e!==void 0?_0x41117e:this['baseUri'];_0x53cf75=_0x53cf75+'/List/'+_0x104d6f+'/'+_0x2494ee;const _0x48a990=yield Fetch['delete'](_0x53cf75,_0x34c175);try{if(_0x48a990['status']>0xc7&&_0x48a990['status']<0x12c){const _0x479ad8=yield _0x48a990['json']();return new SuccessfulAccountResponse(_0x479ad8);}const _0x1e4cf1=yield _0x48a990['json']();return new FailedAccountResponse(_0x1e4cf1);}catch(_0x4073df){if(_0x4073df instanceof Error)return new FailedAccountResponse({'detail':_0x4073df['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x4073df;}});}}
10
10
 
11
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x1a9dfb,_0xfac4e7,_0x209980,_0x386a48){function _0x15a8dd(_0x325c7b){return _0x325c7b instanceof _0x209980?_0x325c7b:new _0x209980(function(_0x437505){_0x437505(_0x325c7b);});}return new(_0x209980||(_0x209980=Promise))(function(_0x59032f,_0x4a7f7a){function _0x59ce95(_0x45e82e){try{_0x4b722c(_0x386a48['next'](_0x45e82e));}catch(_0x596c78){_0x4a7f7a(_0x596c78);}}function _0x391bfc(_0x21f251){try{_0x4b722c(_0x386a48['throw'](_0x21f251));}catch(_0x18fbb5){_0x4a7f7a(_0x18fbb5);}}function _0x4b722c(_0x3e49c0){_0x3e49c0['done']?_0x59032f(_0x3e49c0['value']):_0x15a8dd(_0x3e49c0['value'])['then'](_0x59ce95,_0x391bfc);}_0x4b722c((_0x386a48=_0x386a48['apply'](_0x1a9dfb,_0xfac4e7||[]))['next']());});};class TokenManager{constructor(_0x4b56f9){this['securityService']=_0x4b56f9;}['RefreshTokens'](_0x4a7c36){return __awaiter$1(this,arguments,void 0,function*(_0x4bc04f,_0x2fb8dd={}){if(Date['now']()<_0x4bc04f['access_expires'])return new SuccessfulRefreshResponse(_0x4bc04f);if(Date['now']()>_0x4bc04f['refresh_expires']){const _0x2b3e61={'details':'','type':'','status':0x193,'title':'Forbidden','instance':''};return new FailedRefreshResponse(_0x2b3e61);}const _0x11c756=yield this['securityService']['refresh'](_0x4bc04f['refresh_token'],_0x2fb8dd);if(!_0x11c756['isSuccess'])return new FailedRefreshResponse(_0x11c756['toProblem']());return new SuccessfulRefreshResponse(_0x11c756['toSuccess']());});}}
11
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x49a44d,_0x4e3b10,_0x3fbf3b,_0x1df522){function _0x3c563c(_0x2a0bf1){return _0x2a0bf1 instanceof _0x3fbf3b?_0x2a0bf1:new _0x3fbf3b(function(_0x77aea7){_0x77aea7(_0x2a0bf1);});}return new(_0x3fbf3b||(_0x3fbf3b=Promise))(function(_0xd2b1f5,_0x1bc1af){function _0x1a8a86(_0x47983b){try{_0x2c3aba(_0x1df522['next'](_0x47983b));}catch(_0x44fde7){_0x1bc1af(_0x44fde7);}}function _0x4a2720(_0x5b5cde){try{_0x2c3aba(_0x1df522['throw'](_0x5b5cde));}catch(_0xf220ca){_0x1bc1af(_0xf220ca);}}function _0x2c3aba(_0x5955c1){_0x5955c1['done']?_0xd2b1f5(_0x5955c1['value']):_0x3c563c(_0x5955c1['value'])['then'](_0x1a8a86,_0x4a2720);}_0x2c3aba((_0x1df522=_0x1df522['apply'](_0x49a44d,_0x4e3b10||[]))['next']());});};class TokenManager{constructor(_0x3d46b6){this['securityService']=_0x3d46b6;}['RefreshTokens'](_0x34f16c){return __awaiter$1(this,arguments,void 0,function*(_0x954761,_0x195d5f={}){if(Date['now']()<_0x954761['access_expires'])return new SuccessfulRefreshResponse(_0x954761);if(Date['now']()>_0x954761['refresh_expires']){const _0xd34af3={'detail':'Forbidden','type':'','status':0x193,'title':'Forbidden','instance':''};return new FailedRefreshResponse(_0xd34af3);}const _0x3f80a5=yield this['securityService']['refresh'](_0x954761['refresh_token'],_0x195d5f);if(!_0x3f80a5['isSuccess'])return new FailedRefreshResponse(_0x3f80a5['toProblem']());return new SuccessfulRefreshResponse(_0x3f80a5['toSuccess']());});}}
12
12
 
13
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x117da6,_0x146210,_0x3a8c14,_0x1914d5){function _0x5165e1(_0x5bab1c){return _0x5bab1c instanceof _0x3a8c14?_0x5bab1c:new _0x3a8c14(function(_0x29f647){_0x29f647(_0x5bab1c);});}return new(_0x3a8c14||(_0x3a8c14=Promise))(function(_0x2ef9c6,_0x750e21){function _0x12cd3a(_0x4b0350){try{_0x963efd(_0x1914d5['next'](_0x4b0350));}catch(_0x319316){_0x750e21(_0x319316);}}function _0x35be73(_0x3dfdc6){try{_0x963efd(_0x1914d5['throw'](_0x3dfdc6));}catch(_0x25e634){_0x750e21(_0x25e634);}}function _0x963efd(_0x1bf8c3){_0x1bf8c3['done']?_0x2ef9c6(_0x1bf8c3['value']):_0x5165e1(_0x1bf8c3['value'])['then'](_0x12cd3a,_0x35be73);}_0x963efd((_0x1914d5=_0x1914d5['apply'](_0x117da6,_0x146210||[]))['next']());});};class SecurityService{constructor(_0x498bb7){this['baseUri']=_0x498bb7,this['tokenManager']=new TokenManager(this);}['refresh'](_0x236746){return __awaiter(this,arguments,void 0,function*(_0x4ca9c0,_0x40136d={}){var _0x252251;let _0x194858=(_0x252251=_0x40136d['baseUri'])!==null&&_0x252251!==void 0?_0x252251:this['baseUri'];!_0x194858['endsWith']('/')&&(_0x194858=_0x194858+'/');_0x194858=_0x194858+'Security/Refresh';try{const _0x3e4456=yield Fetch['post'](_0x194858,_0x4ca9c0,null);if(_0x3e4456['status']>0xc7&&_0x3e4456['status']<0x12c){const _0x17911b=yield _0x3e4456['json']();return new SuccessfulRefreshResponse(_0x17911b);}const _0x3992a1=yield _0x3e4456['json']();return new FailedRefreshResponse(_0x3992a1);}catch(_0x4821b7){if(_0x4821b7 instanceof Error)return new FailedRefreshResponse({'details':_0x4821b7['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x4821b7;}});}}
13
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x544bf6,_0x316bca,_0x5a36fa,_0x17f1e3){function _0x49c918(_0x4dca5d){return _0x4dca5d instanceof _0x5a36fa?_0x4dca5d:new _0x5a36fa(function(_0x179eb7){_0x179eb7(_0x4dca5d);});}return new(_0x5a36fa||(_0x5a36fa=Promise))(function(_0x284698,_0x5d7de0){function _0x556a01(_0x429a6e){try{_0x37bbcd(_0x17f1e3['next'](_0x429a6e));}catch(_0x3739f7){_0x5d7de0(_0x3739f7);}}function _0x5440ac(_0x4f75c3){try{_0x37bbcd(_0x17f1e3['throw'](_0x4f75c3));}catch(_0x4d8548){_0x5d7de0(_0x4d8548);}}function _0x37bbcd(_0x14c476){_0x14c476['done']?_0x284698(_0x14c476['value']):_0x49c918(_0x14c476['value'])['then'](_0x556a01,_0x5440ac);}_0x37bbcd((_0x17f1e3=_0x17f1e3['apply'](_0x544bf6,_0x316bca||[]))['next']());});};class SecurityService{constructor(_0x220f28){this['baseUri']=_0x220f28,this['tokenManager']=new TokenManager(this);}['refresh'](_0x2dba4b){return __awaiter(this,arguments,void 0,function*(_0x5b9b1f,_0x9c6b56={}){var _0x40c9bd;let _0x2f1dd6=(_0x40c9bd=_0x9c6b56['baseUri'])!==null&&_0x40c9bd!==void 0?_0x40c9bd:this['baseUri'];!_0x2f1dd6['endsWith']('/')&&(_0x2f1dd6=_0x2f1dd6+'/');_0x2f1dd6=_0x2f1dd6+'Security/Refresh';try{const _0x1f2739=yield Fetch['post'](_0x2f1dd6,_0x5b9b1f,null);if(_0x1f2739['status']>0xc7&&_0x1f2739['status']<0x12c){const _0x299464=yield _0x1f2739['json']();return new SuccessfulRefreshResponse(_0x299464);}const _0x710573=yield _0x1f2739['json']();return new FailedRefreshResponse(_0x710573);}catch(_0x3d8169){if(_0x3d8169 instanceof Error)return new FailedRefreshResponse({'detail':_0x3d8169['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x3d8169;}});}}
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(_0x2bba0f,_0x1cea23,_0x27764a,_0x549d2b){function _0x16452e(_0x49caa3){return _0x49caa3 instanceof _0x27764a?_0x49caa3:new _0x27764a(function(_0x3f57e1){_0x3f57e1(_0x49caa3);});}return new(_0x27764a||(_0x27764a=Promise))(function(_0x23ebfa,_0x4478fc){function _0x46a301(_0x10edf1){try{_0x15500e(_0x549d2b['next'](_0x10edf1));}catch(_0x3b9ef8){_0x4478fc(_0x3b9ef8);}}function _0x179359(_0xac290d){try{_0x15500e(_0x549d2b['throw'](_0xac290d));}catch(_0x30e20f){_0x4478fc(_0x30e20f);}}function _0x15500e(_0x9653e9){_0x9653e9['done']?_0x23ebfa(_0x9653e9['value']):_0x16452e(_0x9653e9['value'])['then'](_0x46a301,_0x179359);}_0x15500e((_0x549d2b=_0x549d2b['apply'](_0x2bba0f,_0x1cea23||[]))['next']());});};class Fetch{static['get'](_0x3ac329,_0x31b169){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x3ac329,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x31b169}});});}static['post'](_0x3d11cf,_0x4bf135,_0x2117d9){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x3d11cf,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4bf135},'body':_0x2117d9?JSON['stringify'](_0x2117d9):null});});}static['put'](_0xf35bff,_0x2aec6f,_0x6f7c02){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0xf35bff,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2aec6f},'body':_0x6f7c02?JSON['stringify'](_0x6f7c02):null});});}static['delete'](_0x1ede4d,_0x30379d){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x1ede4d,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x30379d}});});}}
1
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x4d1520,_0x5d7cd9,_0x597bd6,_0x201d41){function _0x4fd560(_0x431628){return _0x431628 instanceof _0x597bd6?_0x431628:new _0x597bd6(function(_0x4eb038){_0x4eb038(_0x431628);});}return new(_0x597bd6||(_0x597bd6=Promise))(function(_0x4e0554,_0x22b8fa){function _0x1aa517(_0x2ff1b5){try{_0x54e126(_0x201d41['next'](_0x2ff1b5));}catch(_0x52e590){_0x22b8fa(_0x52e590);}}function _0x8d5a81(_0x23e7e0){try{_0x54e126(_0x201d41['throw'](_0x23e7e0));}catch(_0x10c066){_0x22b8fa(_0x10c066);}}function _0x54e126(_0x1e5ef8){_0x1e5ef8['done']?_0x4e0554(_0x1e5ef8['value']):_0x4fd560(_0x1e5ef8['value'])['then'](_0x1aa517,_0x8d5a81);}_0x54e126((_0x201d41=_0x201d41['apply'](_0x4d1520,_0x5d7cd9||[]))['next']());});};class Fetch{static['get'](_0x1aa9d4,_0x2363ad){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x1aa9d4,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2363ad}});});}static['post'](_0x368c1b,_0x561709,_0x6a3419){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x368c1b,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x561709},'body':_0x6a3419?JSON['stringify'](_0x6a3419):null});});}static['put'](_0x4d81cd,_0x14469c,_0x186b56){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x4d81cd,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x14469c},'body':_0x186b56?JSON['stringify'](_0x186b56):null});});}static['delete'](_0x3ddb2d,_0xa4315a){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x3ddb2d,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0xa4315a}});});}}
2
2
 
3
- class Response{constructor(_0x49766e){this['isSuccess']=_0x49766e;}}class SuccessfulAccountResponse extends Response{constructor(_0xbebf39){super(!![]),this['account']=_0xbebf39;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x2a5083){super(![]),this['problem']=_0x2a5083;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulRefreshResponse extends Response{constructor(_0x329191){super(!![]),this['tokens']=_0x329191;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedRefreshResponse extends Response{constructor(_0x58a153){super(![]),this['problem']=_0x58a153;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
3
+ class Response{constructor(_0x3389d3){this['isSuccess']=_0x3389d3;}}class SuccessfulAccountResponse extends Response{constructor(_0x35bd2c){super(!![]),this['account']=_0x35bd2c;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x2dc3c2){super(![]),this['problem']=_0x2dc3c2;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulRefreshResponse extends Response{constructor(_0x273e05){super(!![]),this['tokens']=_0x273e05;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedRefreshResponse extends Response{constructor(_0xd399c3){super(![]),this['problem']=_0xd399c3;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
4
4
 
5
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x1ffc00,_0x4d595f,_0x1a5435,_0xec8df9){function _0x5cac33(_0x56abaa){return _0x56abaa instanceof _0x1a5435?_0x56abaa:new _0x1a5435(function(_0x72db95){_0x72db95(_0x56abaa);});}return new(_0x1a5435||(_0x1a5435=Promise))(function(_0x34d936,_0x4ef3e6){function _0x1d1c34(_0x47ff9e){try{_0x1d1774(_0xec8df9['next'](_0x47ff9e));}catch(_0x32ca00){_0x4ef3e6(_0x32ca00);}}function _0x16cb63(_0x2f062d){try{_0x1d1774(_0xec8df9['throw'](_0x2f062d));}catch(_0x2e9d96){_0x4ef3e6(_0x2e9d96);}}function _0x1d1774(_0x39cab4){_0x39cab4['done']?_0x34d936(_0x39cab4['value']):_0x5cac33(_0x39cab4['value'])['then'](_0x1d1c34,_0x16cb63);}_0x1d1774((_0xec8df9=_0xec8df9['apply'](_0x1ffc00,_0x4d595f||[]))['next']());});};class AccountService{constructor(_0x295fd8){this['baseUri']=_0x295fd8;}['get'](_0x23d974,_0x3cfb6e){return __awaiter$3(this,arguments,void 0,function*(_0x2aacef,_0x310766,_0x2e5271={}){var _0x2ff198;let _0x381c1c=(_0x2ff198=_0x2e5271['baseUri'])!==null&&_0x2ff198!==void 0?_0x2ff198:this['baseUri'];!_0x381c1c['endsWith']('/')&&(_0x381c1c=_0x381c1c+'/');_0x381c1c=_0x381c1c+'Account/'+_0x310766+'/';const _0x1c21f3=yield Fetch['get'](_0x381c1c,_0x2aacef);try{if(_0x1c21f3['status']>0xc7&&_0x1c21f3['status']<0x12c){const _0x568d07=yield _0x1c21f3['json']();return new SuccessfulAccountResponse(_0x568d07);}const _0x5b942b=yield _0x1c21f3['json']();return new FailedAccountResponse(_0x5b942b);}catch(_0x55fc89){if(_0x55fc89 instanceof Error)return new FailedAccountResponse({'details':_0x55fc89['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x55fc89;}});}}
5
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x330619,_0x26840a,_0x181502,_0x315ff1){function _0x552030(_0x5b7420){return _0x5b7420 instanceof _0x181502?_0x5b7420:new _0x181502(function(_0x35643e){_0x35643e(_0x5b7420);});}return new(_0x181502||(_0x181502=Promise))(function(_0x2d66df,_0x9f3f5){function _0x11ace0(_0x2495db){try{_0xd21853(_0x315ff1['next'](_0x2495db));}catch(_0xcd4de){_0x9f3f5(_0xcd4de);}}function _0x1e48f2(_0x31149d){try{_0xd21853(_0x315ff1['throw'](_0x31149d));}catch(_0x479705){_0x9f3f5(_0x479705);}}function _0xd21853(_0x5e9bdb){_0x5e9bdb['done']?_0x2d66df(_0x5e9bdb['value']):_0x552030(_0x5e9bdb['value'])['then'](_0x11ace0,_0x1e48f2);}_0xd21853((_0x315ff1=_0x315ff1['apply'](_0x330619,_0x26840a||[]))['next']());});};class AccountService{constructor(_0x3835c0){this['baseUri']=_0x3835c0;}['get'](_0x495c52,_0x5995d4){return __awaiter$3(this,arguments,void 0,function*(_0xeb63b3,_0x3996f8,_0x13dd8c={}){var _0x76c58;let _0x4555c3=(_0x76c58=_0x13dd8c['baseUri'])!==null&&_0x76c58!==void 0?_0x76c58:this['baseUri'];!_0x4555c3['endsWith']('/')&&(_0x4555c3=_0x4555c3+'/');_0x4555c3=_0x4555c3+'Account/'+_0x3996f8+'/';const _0x2148b9=yield Fetch['get'](_0x4555c3,_0xeb63b3);try{if(_0x2148b9['status']>0xc7&&_0x2148b9['status']<0x12c){const _0x2017b1=yield _0x2148b9['json']();return new SuccessfulAccountResponse(_0x2017b1);}const _0x229704=yield _0x2148b9['json']();return new FailedAccountResponse(_0x229704);}catch(_0x1b2690){if(_0x1b2690 instanceof Error)return new FailedAccountResponse({'detail':_0x1b2690['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x1b2690;}});}}
6
6
 
7
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x3d7918,_0x2a971a,_0x3ee585,_0x8aebdf){function _0x5b75e5(_0x84b335){return _0x84b335 instanceof _0x3ee585?_0x84b335:new _0x3ee585(function(_0x548583){_0x548583(_0x84b335);});}return new(_0x3ee585||(_0x3ee585=Promise))(function(_0x2d519f,_0xcfd1df){function _0x1c17e6(_0x3548d2){try{_0x189e5d(_0x8aebdf['next'](_0x3548d2));}catch(_0x4fcc23){_0xcfd1df(_0x4fcc23);}}function _0x48ce4f(_0x566bb8){try{_0x189e5d(_0x8aebdf['throw'](_0x566bb8));}catch(_0x2d754d){_0xcfd1df(_0x2d754d);}}function _0x189e5d(_0x4630e0){_0x4630e0['done']?_0x2d519f(_0x4630e0['value']):_0x5b75e5(_0x4630e0['value'])['then'](_0x1c17e6,_0x48ce4f);}_0x189e5d((_0x8aebdf=_0x8aebdf['apply'](_0x3d7918,_0x2a971a||[]))['next']());});};class ListService{constructor(_0x42e295){this['baseUri']=_0x42e295;}['add'](_0x50a0a5,_0x2d6757,_0x153a05){return __awaiter$2(this,arguments,void 0,function*(_0x47c620,_0x262c31,_0x18e55f,_0x209f10={}){var _0x1de8a0;let _0x491fd6=(_0x1de8a0=_0x209f10['baseUri'])!==null&&_0x1de8a0!==void 0?_0x1de8a0:this['baseUri'];!_0x491fd6['endsWith']('/')&&(_0x491fd6=_0x491fd6+'/');_0x491fd6=_0x491fd6+'List';const _0xaaa956={'account_name':_0x262c31,'list_name':_0x18e55f};try{const _0xd5e9dc=yield Fetch['post'](_0x491fd6,_0x47c620,_0xaaa956);if(_0xd5e9dc['status']>0xc7&&_0xd5e9dc['status']<0x12c){const _0x1ef79d=yield _0xd5e9dc['json']();return new SuccessfulAccountResponse(_0x1ef79d);}const _0x1edec1=yield _0xd5e9dc['json']();return new FailedAccountResponse(_0x1edec1);}catch(_0x562ef7){if(_0x562ef7 instanceof Error)return new FailedAccountResponse({'details':_0x562ef7['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x562ef7;}});}['remove'](_0x303c32,_0x44845f,_0x5c2abd){return __awaiter$2(this,arguments,void 0,function*(_0xdcf01c,_0x3e9174,_0x42ca46,_0x54db38={}){var _0xe29505;let _0x4782f0=(_0xe29505=_0x54db38['baseUri'])!==null&&_0xe29505!==void 0?_0xe29505:this['baseUri'];_0x4782f0=_0x4782f0+'/List/'+_0x3e9174+'/'+_0x42ca46;const _0x3fa836=yield Fetch['delete'](_0x4782f0,_0xdcf01c);try{if(_0x3fa836['status']>0xc7&&_0x3fa836['status']<0x12c){const _0x31e471=yield _0x3fa836['json']();return new SuccessfulAccountResponse(_0x31e471);}const _0x31c910=yield _0x3fa836['json']();return new FailedAccountResponse(_0x31c910);}catch(_0x490e76){if(_0x490e76 instanceof Error)return new FailedAccountResponse({'details':_0x490e76['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x490e76;}});}}
7
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x2decd7,_0x5d8cb5,_0x90caa9,_0x1ff7f1){function _0x1981c0(_0x50eb33){return _0x50eb33 instanceof _0x90caa9?_0x50eb33:new _0x90caa9(function(_0x2d62d8){_0x2d62d8(_0x50eb33);});}return new(_0x90caa9||(_0x90caa9=Promise))(function(_0x1bfbbc,_0x5b3993){function _0x2b04fa(_0x47ef71){try{_0x30f3c9(_0x1ff7f1['next'](_0x47ef71));}catch(_0x576846){_0x5b3993(_0x576846);}}function _0x592955(_0x193783){try{_0x30f3c9(_0x1ff7f1['throw'](_0x193783));}catch(_0x57d1a7){_0x5b3993(_0x57d1a7);}}function _0x30f3c9(_0xcbc45c){_0xcbc45c['done']?_0x1bfbbc(_0xcbc45c['value']):_0x1981c0(_0xcbc45c['value'])['then'](_0x2b04fa,_0x592955);}_0x30f3c9((_0x1ff7f1=_0x1ff7f1['apply'](_0x2decd7,_0x5d8cb5||[]))['next']());});};class ListService{constructor(_0x2892e0){this['baseUri']=_0x2892e0;}['add'](_0x58d1e2,_0x2e4c95,_0x2311bc){return __awaiter$2(this,arguments,void 0,function*(_0x23a54a,_0x428c1a,_0x13cf27,_0x249557={}){var _0x3533fb;let _0x40dd3a=(_0x3533fb=_0x249557['baseUri'])!==null&&_0x3533fb!==void 0?_0x3533fb:this['baseUri'];!_0x40dd3a['endsWith']('/')&&(_0x40dd3a=_0x40dd3a+'/');_0x40dd3a=_0x40dd3a+'List';const _0x7a131={'account_name':_0x428c1a,'list_name':_0x13cf27};try{const _0x1ab64b=yield Fetch['post'](_0x40dd3a,_0x23a54a,_0x7a131);if(_0x1ab64b['status']>0xc7&&_0x1ab64b['status']<0x12c){const _0x3d646d=yield _0x1ab64b['json']();return new SuccessfulAccountResponse(_0x3d646d);}const _0x1850cb=yield _0x1ab64b['json']();return new FailedAccountResponse(_0x1850cb);}catch(_0x317156){if(_0x317156 instanceof Error)return new FailedAccountResponse({'detail':_0x317156['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x317156;}});}['remove'](_0x4ccb2,_0x3983c2,_0x5e7fec){return __awaiter$2(this,arguments,void 0,function*(_0x41e0e3,_0x4aad20,_0x493b68,_0x25d7a9={}){var _0x49d098;let _0x160ccf=(_0x49d098=_0x25d7a9['baseUri'])!==null&&_0x49d098!==void 0?_0x49d098:this['baseUri'];_0x160ccf=_0x160ccf+'/List/'+_0x4aad20+'/'+_0x493b68;const _0xb06e87=yield Fetch['delete'](_0x160ccf,_0x41e0e3);try{if(_0xb06e87['status']>0xc7&&_0xb06e87['status']<0x12c){const _0x2eac87=yield _0xb06e87['json']();return new SuccessfulAccountResponse(_0x2eac87);}const _0x392295=yield _0xb06e87['json']();return new FailedAccountResponse(_0x392295);}catch(_0x538d47){if(_0x538d47 instanceof Error)return new FailedAccountResponse({'detail':_0x538d47['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x538d47;}});}}
8
8
 
9
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x5e994b,_0x1b6c63,_0x3df50d,_0x116cf1){function _0x54aeba(_0x264fb5){return _0x264fb5 instanceof _0x3df50d?_0x264fb5:new _0x3df50d(function(_0x5e4a09){_0x5e4a09(_0x264fb5);});}return new(_0x3df50d||(_0x3df50d=Promise))(function(_0x29b372,_0x55115c){function _0x3f5b8f(_0x40231b){try{_0x9c9ce4(_0x116cf1['next'](_0x40231b));}catch(_0x4c2a04){_0x55115c(_0x4c2a04);}}function _0x1a5f68(_0x6e35a3){try{_0x9c9ce4(_0x116cf1['throw'](_0x6e35a3));}catch(_0x35c26b){_0x55115c(_0x35c26b);}}function _0x9c9ce4(_0x44bd43){_0x44bd43['done']?_0x29b372(_0x44bd43['value']):_0x54aeba(_0x44bd43['value'])['then'](_0x3f5b8f,_0x1a5f68);}_0x9c9ce4((_0x116cf1=_0x116cf1['apply'](_0x5e994b,_0x1b6c63||[]))['next']());});};class TokenManager{constructor(_0xfee442){this['securityService']=_0xfee442;}['RefreshTokens'](_0x58ae4a){return __awaiter$1(this,arguments,void 0,function*(_0x2ccc1b,_0xc5b76f={}){if(Date['now']()<_0x2ccc1b['access_expires'])return new SuccessfulRefreshResponse(_0x2ccc1b);if(Date['now']()>_0x2ccc1b['refresh_expires']){const _0x612f70={'details':'','type':'','status':0x193,'title':'Forbidden','instance':''};return new FailedRefreshResponse(_0x612f70);}const _0x2b863d=yield this['securityService']['refresh'](_0x2ccc1b['refresh_token'],_0xc5b76f);if(!_0x2b863d['isSuccess'])return new FailedRefreshResponse(_0x2b863d['toProblem']());return new SuccessfulRefreshResponse(_0x2b863d['toSuccess']());});}}
9
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x47778c,_0x363a13,_0x3d2f66,_0x2e7ec9){function _0x169e6f(_0x3aaa49){return _0x3aaa49 instanceof _0x3d2f66?_0x3aaa49:new _0x3d2f66(function(_0xee1d8d){_0xee1d8d(_0x3aaa49);});}return new(_0x3d2f66||(_0x3d2f66=Promise))(function(_0x41ddc3,_0x572127){function _0x5922d0(_0x229bc2){try{_0x498bb2(_0x2e7ec9['next'](_0x229bc2));}catch(_0x22314a){_0x572127(_0x22314a);}}function _0x25459c(_0x34c9cc){try{_0x498bb2(_0x2e7ec9['throw'](_0x34c9cc));}catch(_0x18c65a){_0x572127(_0x18c65a);}}function _0x498bb2(_0x2c82c6){_0x2c82c6['done']?_0x41ddc3(_0x2c82c6['value']):_0x169e6f(_0x2c82c6['value'])['then'](_0x5922d0,_0x25459c);}_0x498bb2((_0x2e7ec9=_0x2e7ec9['apply'](_0x47778c,_0x363a13||[]))['next']());});};class TokenManager{constructor(_0x5b92c6){this['securityService']=_0x5b92c6;}['RefreshTokens'](_0x35c1fc){return __awaiter$1(this,arguments,void 0,function*(_0x5f02d9,_0x39b888={}){if(Date['now']()<_0x5f02d9['access_expires'])return new SuccessfulRefreshResponse(_0x5f02d9);if(Date['now']()>_0x5f02d9['refresh_expires']){const _0x2ac8e9={'detail':'Forbidden','type':'','status':0x193,'title':'Forbidden','instance':''};return new FailedRefreshResponse(_0x2ac8e9);}const _0x4faa76=yield this['securityService']['refresh'](_0x5f02d9['refresh_token'],_0x39b888);if(!_0x4faa76['isSuccess'])return new FailedRefreshResponse(_0x4faa76['toProblem']());return new SuccessfulRefreshResponse(_0x4faa76['toSuccess']());});}}
10
10
 
11
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x372461,_0x1f4e57,_0xbe1135,_0xd66915){function _0x94c0b4(_0x4a882f){return _0x4a882f instanceof _0xbe1135?_0x4a882f:new _0xbe1135(function(_0x117ca6){_0x117ca6(_0x4a882f);});}return new(_0xbe1135||(_0xbe1135=Promise))(function(_0x48ad5c,_0x70d9a2){function _0x560447(_0x1bd09e){try{_0x411ce9(_0xd66915['next'](_0x1bd09e));}catch(_0x56bc93){_0x70d9a2(_0x56bc93);}}function _0x5d2887(_0x18709d){try{_0x411ce9(_0xd66915['throw'](_0x18709d));}catch(_0x22def2){_0x70d9a2(_0x22def2);}}function _0x411ce9(_0x4eb9a6){_0x4eb9a6['done']?_0x48ad5c(_0x4eb9a6['value']):_0x94c0b4(_0x4eb9a6['value'])['then'](_0x560447,_0x5d2887);}_0x411ce9((_0xd66915=_0xd66915['apply'](_0x372461,_0x1f4e57||[]))['next']());});};class SecurityService{constructor(_0x5e16ae){this['baseUri']=_0x5e16ae,this['tokenManager']=new TokenManager(this);}['refresh'](_0x27daf2){return __awaiter(this,arguments,void 0,function*(_0x2dc21f,_0x413693={}){var _0x149e64;let _0x3ec4b3=(_0x149e64=_0x413693['baseUri'])!==null&&_0x149e64!==void 0?_0x149e64:this['baseUri'];!_0x3ec4b3['endsWith']('/')&&(_0x3ec4b3=_0x3ec4b3+'/');_0x3ec4b3=_0x3ec4b3+'Security/Refresh';try{const _0x39ff73=yield Fetch['post'](_0x3ec4b3,_0x2dc21f,null);if(_0x39ff73['status']>0xc7&&_0x39ff73['status']<0x12c){const _0x4eefa0=yield _0x39ff73['json']();return new SuccessfulRefreshResponse(_0x4eefa0);}const _0x43b0bc=yield _0x39ff73['json']();return new FailedRefreshResponse(_0x43b0bc);}catch(_0x39b201){if(_0x39b201 instanceof Error)return new FailedRefreshResponse({'details':_0x39b201['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x39b201;}});}}
11
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x367cf6,_0x1299f4,_0x531813,_0x27cc36){function _0x68b187(_0xa6e51b){return _0xa6e51b instanceof _0x531813?_0xa6e51b:new _0x531813(function(_0x4f02c6){_0x4f02c6(_0xa6e51b);});}return new(_0x531813||(_0x531813=Promise))(function(_0x8df339,_0x1d5f68){function _0x1a61a1(_0x51ba71){try{_0x3a0325(_0x27cc36['next'](_0x51ba71));}catch(_0x4c077d){_0x1d5f68(_0x4c077d);}}function _0xc5d8b3(_0x9bd8dd){try{_0x3a0325(_0x27cc36['throw'](_0x9bd8dd));}catch(_0x228df6){_0x1d5f68(_0x228df6);}}function _0x3a0325(_0x3da4f3){_0x3da4f3['done']?_0x8df339(_0x3da4f3['value']):_0x68b187(_0x3da4f3['value'])['then'](_0x1a61a1,_0xc5d8b3);}_0x3a0325((_0x27cc36=_0x27cc36['apply'](_0x367cf6,_0x1299f4||[]))['next']());});};class SecurityService{constructor(_0x2c12ff){this['baseUri']=_0x2c12ff,this['tokenManager']=new TokenManager(this);}['refresh'](_0x11ea2e){return __awaiter(this,arguments,void 0,function*(_0x3712da,_0x48aebe={}){var _0x31df9e;let _0xee8de2=(_0x31df9e=_0x48aebe['baseUri'])!==null&&_0x31df9e!==void 0?_0x31df9e:this['baseUri'];!_0xee8de2['endsWith']('/')&&(_0xee8de2=_0xee8de2+'/');_0xee8de2=_0xee8de2+'Security/Refresh';try{const _0x58b38a=yield Fetch['post'](_0xee8de2,_0x3712da,null);if(_0x58b38a['status']>0xc7&&_0x58b38a['status']<0x12c){const _0x16ab6f=yield _0x58b38a['json']();return new SuccessfulRefreshResponse(_0x16ab6f);}const _0x31c82f=yield _0x58b38a['json']();return new FailedRefreshResponse(_0x31c82f);}catch(_0x174d0d){if(_0x174d0d instanceof Error)return new FailedRefreshResponse({'detail':_0x174d0d['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x174d0d;}});}}
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
@@ -42,6 +42,9 @@ declare abstract class Response<S, F> {
42
42
  }
43
43
  type List = {
44
44
  name: string;
45
+ created: number;
46
+ result_count: number;
47
+ version: number;
45
48
  };
46
49
  type Error = {
47
50
  [key: string]: string[];
@@ -51,7 +54,7 @@ type Problem = {
51
54
  title: string;
52
55
  status: number;
53
56
  instance: string;
54
- details: string;
57
+ detail: string;
55
58
  };
56
59
  type Account = {
57
60
  name: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@searchability/admin-client",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
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(_0x4f9772,_0x2b4a32,_0x5dfdf1,_0x358314){function _0x5381d2(_0x420257){return _0x420257 instanceof _0x5dfdf1?_0x420257:new _0x5dfdf1(function(_0x4a4b03){_0x4a4b03(_0x420257);});}return new(_0x5dfdf1||(_0x5dfdf1=Promise))(function(_0x1be4f4,_0x190669){function _0x5ef4d8(_0xc1ff53){try{_0x292c75(_0x358314['next'](_0xc1ff53));}catch(_0xc4c8a8){_0x190669(_0xc4c8a8);}}function _0x45bcdc(_0x351526){try{_0x292c75(_0x358314['throw'](_0x351526));}catch(_0x366d5c){_0x190669(_0x366d5c);}}function _0x292c75(_0x4c605b){_0x4c605b['done']?_0x1be4f4(_0x4c605b['value']):_0x5381d2(_0x4c605b['value'])['then'](_0x5ef4d8,_0x45bcdc);}_0x292c75((_0x358314=_0x358314['apply'](_0x4f9772,_0x2b4a32||[]))['next']());});};class Fetch{static['get'](_0x5e088f,_0x526d4f){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x5e088f,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x526d4f}});});}static['post'](_0x3a27ae,_0x32b531,_0x208e4f){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x3a27ae,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x32b531},'body':_0x208e4f?JSON['stringify'](_0x208e4f):null});});}static['put'](_0x3f7dcb,_0x963911,_0x4a9798){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x3f7dcb,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x963911},'body':_0x4a9798?JSON['stringify'](_0x4a9798):null});});}static['delete'](_0x18d60a,_0x81fd1a){return __awaiter$4(this,void 0,void 0,function*(){return yield fetch(_0x18d60a,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x81fd1a}});});}}
2
-
3
- class Response{constructor(_0x45207e){this['isSuccess']=_0x45207e;}}class SuccessfulAccountResponse extends Response{constructor(_0x49eb9e){super(!![]),this['account']=_0x49eb9e;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x2835a2){super(![]),this['problem']=_0x2835a2;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulRefreshResponse extends Response{constructor(_0x2bbb27){super(!![]),this['tokens']=_0x2bbb27;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedRefreshResponse extends Response{constructor(_0x43ab49){super(![]),this['problem']=_0x43ab49;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
4
-
5
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x522137,_0x5f41bb,_0x38f0e3,_0x3f93b4){function _0x52a6e5(_0x3f6d3a){return _0x3f6d3a instanceof _0x38f0e3?_0x3f6d3a:new _0x38f0e3(function(_0x3cb945){_0x3cb945(_0x3f6d3a);});}return new(_0x38f0e3||(_0x38f0e3=Promise))(function(_0x2a1e7a,_0x2a17ac){function _0x1ae136(_0x509bb2){try{_0x1320ad(_0x3f93b4['next'](_0x509bb2));}catch(_0x26fee5){_0x2a17ac(_0x26fee5);}}function _0x8717b7(_0x4e2541){try{_0x1320ad(_0x3f93b4['throw'](_0x4e2541));}catch(_0x3f6e76){_0x2a17ac(_0x3f6e76);}}function _0x1320ad(_0x41e1f8){_0x41e1f8['done']?_0x2a1e7a(_0x41e1f8['value']):_0x52a6e5(_0x41e1f8['value'])['then'](_0x1ae136,_0x8717b7);}_0x1320ad((_0x3f93b4=_0x3f93b4['apply'](_0x522137,_0x5f41bb||[]))['next']());});};class AccountService{constructor(_0x48c29a){this['baseUri']=_0x48c29a;}['get'](_0x45a17f,_0x136a37){return __awaiter$3(this,arguments,void 0,function*(_0xb326a3,_0x157a2b,_0x26c8fb={}){var _0x2ef41a;let _0x4eb235=(_0x2ef41a=_0x26c8fb['baseUri'])!==null&&_0x2ef41a!==void 0?_0x2ef41a:this['baseUri'];!_0x4eb235['endsWith']('/')&&(_0x4eb235=_0x4eb235+'/');_0x4eb235=_0x4eb235+'Account/'+_0x157a2b+'/';const _0x14f63c=yield Fetch['get'](_0x4eb235,_0xb326a3);try{if(_0x14f63c['status']>0xc7&&_0x14f63c['status']<0x12c){const _0x1b51cb=yield _0x14f63c['json']();return new SuccessfulAccountResponse(_0x1b51cb);}const _0x3693b9=yield _0x14f63c['json']();return new FailedAccountResponse(_0x3693b9);}catch(_0x4b13a5){if(_0x4b13a5 instanceof Error)return new FailedAccountResponse({'details':_0x4b13a5['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x4b13a5;}});}}
6
-
7
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0xbf3cc3,_0x4f37ac,_0x13b71,_0x26ae08){function _0x116f81(_0xc0a04d){return _0xc0a04d instanceof _0x13b71?_0xc0a04d:new _0x13b71(function(_0xf9df5f){_0xf9df5f(_0xc0a04d);});}return new(_0x13b71||(_0x13b71=Promise))(function(_0x32f77b,_0x2059c3){function _0x33b474(_0x4a17ba){try{_0x51288c(_0x26ae08['next'](_0x4a17ba));}catch(_0x19b832){_0x2059c3(_0x19b832);}}function _0x5a400a(_0x3f7a35){try{_0x51288c(_0x26ae08['throw'](_0x3f7a35));}catch(_0x31acba){_0x2059c3(_0x31acba);}}function _0x51288c(_0x3ef86c){_0x3ef86c['done']?_0x32f77b(_0x3ef86c['value']):_0x116f81(_0x3ef86c['value'])['then'](_0x33b474,_0x5a400a);}_0x51288c((_0x26ae08=_0x26ae08['apply'](_0xbf3cc3,_0x4f37ac||[]))['next']());});};class ListService{constructor(_0x2e3e28){this['baseUri']=_0x2e3e28;}['add'](_0x59f0a3,_0x283be8,_0x4fecbb){return __awaiter$2(this,arguments,void 0,function*(_0x44d336,_0x49de08,_0x2b4280,_0x4cd968={}){var _0x53d9cd;let _0x2d1e86=(_0x53d9cd=_0x4cd968['baseUri'])!==null&&_0x53d9cd!==void 0?_0x53d9cd:this['baseUri'];!_0x2d1e86['endsWith']('/')&&(_0x2d1e86=_0x2d1e86+'/');_0x2d1e86=_0x2d1e86+'List';const _0x28b510={'account_name':_0x49de08,'list_name':_0x2b4280};try{const _0x489009=yield Fetch['post'](_0x2d1e86,_0x44d336,_0x28b510);if(_0x489009['status']>0xc7&&_0x489009['status']<0x12c){const _0x3dde1f=yield _0x489009['json']();return new SuccessfulAccountResponse(_0x3dde1f);}const _0x1fec7f=yield _0x489009['json']();return new FailedAccountResponse(_0x1fec7f);}catch(_0x3e9423){if(_0x3e9423 instanceof Error)return new FailedAccountResponse({'details':_0x3e9423['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x3e9423;}});}['remove'](_0x215680,_0x5eb6ff,_0x3aa146){return __awaiter$2(this,arguments,void 0,function*(_0x22e239,_0x5af502,_0x49398f,_0x46017d={}){var _0x5cf98b;let _0x25ffe5=(_0x5cf98b=_0x46017d['baseUri'])!==null&&_0x5cf98b!==void 0?_0x5cf98b:this['baseUri'];_0x25ffe5=_0x25ffe5+'/List/'+_0x5af502+'/'+_0x49398f;const _0x2d3f24=yield Fetch['delete'](_0x25ffe5,_0x22e239);try{if(_0x2d3f24['status']>0xc7&&_0x2d3f24['status']<0x12c){const _0x779375=yield _0x2d3f24['json']();return new SuccessfulAccountResponse(_0x779375);}const _0x21d4ce=yield _0x2d3f24['json']();return new FailedAccountResponse(_0x21d4ce);}catch(_0xcd1d17){if(_0xcd1d17 instanceof Error)return new FailedAccountResponse({'details':_0xcd1d17['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0xcd1d17;}});}}
8
-
9
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x568f55,_0x372bb0,_0x45c54a,_0x524468){function _0x4378f4(_0x332f1c){return _0x332f1c instanceof _0x45c54a?_0x332f1c:new _0x45c54a(function(_0x487e6c){_0x487e6c(_0x332f1c);});}return new(_0x45c54a||(_0x45c54a=Promise))(function(_0x2ecd44,_0x5de60d){function _0x3459f4(_0x52ac24){try{_0x12023e(_0x524468['next'](_0x52ac24));}catch(_0x497583){_0x5de60d(_0x497583);}}function _0x46ac4f(_0x1e50be){try{_0x12023e(_0x524468['throw'](_0x1e50be));}catch(_0x188418){_0x5de60d(_0x188418);}}function _0x12023e(_0x419acc){_0x419acc['done']?_0x2ecd44(_0x419acc['value']):_0x4378f4(_0x419acc['value'])['then'](_0x3459f4,_0x46ac4f);}_0x12023e((_0x524468=_0x524468['apply'](_0x568f55,_0x372bb0||[]))['next']());});};class TokenManager{constructor(_0x1fe4fc){this['securityService']=_0x1fe4fc;}['RefreshTokens'](_0x559339){return __awaiter$1(this,arguments,void 0,function*(_0x55e034,_0x2ca67e={}){if(Date['now']()<_0x55e034['access_expires'])return new SuccessfulRefreshResponse(_0x55e034);if(Date['now']()>_0x55e034['refresh_expires']){const _0x5a0dc8={'details':'','type':'','status':0x193,'title':'Forbidden','instance':''};return new FailedRefreshResponse(_0x5a0dc8);}const _0x18fbd4=yield this['securityService']['refresh'](_0x55e034['refresh_token'],_0x2ca67e);if(!_0x18fbd4['isSuccess'])return new FailedRefreshResponse(_0x18fbd4['toProblem']());return new SuccessfulRefreshResponse(_0x18fbd4['toSuccess']());});}}
10
-
11
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x4ad10e,_0x4d4456,_0x4cf675,_0x582098){function _0x4bbd4f(_0x3a808e){return _0x3a808e instanceof _0x4cf675?_0x3a808e:new _0x4cf675(function(_0x367892){_0x367892(_0x3a808e);});}return new(_0x4cf675||(_0x4cf675=Promise))(function(_0x1ebb47,_0x464288){function _0x1d090d(_0x5cb1ff){try{_0x165eb6(_0x582098['next'](_0x5cb1ff));}catch(_0x39798d){_0x464288(_0x39798d);}}function _0x59de0c(_0x48644b){try{_0x165eb6(_0x582098['throw'](_0x48644b));}catch(_0xb31fcd){_0x464288(_0xb31fcd);}}function _0x165eb6(_0x4405fd){_0x4405fd['done']?_0x1ebb47(_0x4405fd['value']):_0x4bbd4f(_0x4405fd['value'])['then'](_0x1d090d,_0x59de0c);}_0x165eb6((_0x582098=_0x582098['apply'](_0x4ad10e,_0x4d4456||[]))['next']());});};class SecurityService{constructor(_0x314662){this['baseUri']=_0x314662,this['tokenManager']=new TokenManager(this);}['refresh'](_0x5ab384){return __awaiter(this,arguments,void 0,function*(_0x5f0b87,_0x3f1c82={}){var _0x558023;let _0x16401c=(_0x558023=_0x3f1c82['baseUri'])!==null&&_0x558023!==void 0?_0x558023:this['baseUri'];!_0x16401c['endsWith']('/')&&(_0x16401c=_0x16401c+'/');_0x16401c=_0x16401c+'Security/Refresh';try{const _0x5b0acd=yield Fetch['post'](_0x16401c,_0x5f0b87,null);if(_0x5b0acd['status']>0xc7&&_0x5b0acd['status']<0x12c){const _0x5a9fb0=yield _0x5b0acd['json']();return new SuccessfulRefreshResponse(_0x5a9fb0);}const _0xd55863=yield _0x5b0acd['json']();return new FailedRefreshResponse(_0xd55863);}catch(_0x5037bd){if(_0x5037bd instanceof Error)return new FailedRefreshResponse({'details':_0x5037bd['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x5037bd;}});}}
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 };