@searchability/admin-client 0.0.9 → 0.0.10

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,17 @@
1
+ var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x2471ff,_0x4fa33,_0x4dd256,_0x1a2821){function _0x308754(_0x2481e0){return _0x2481e0 instanceof _0x4dd256?_0x2481e0:new _0x4dd256(function(_0x21c05c){_0x21c05c(_0x2481e0);});}return new(_0x4dd256||(_0x4dd256=Promise))(function(_0x3cb836,_0x295568){function _0x27a165(_0x222bf8){try{_0x343509(_0x1a2821['next'](_0x222bf8));}catch(_0x29d264){_0x295568(_0x29d264);}}function _0x389ea3(_0x168025){try{_0x343509(_0x1a2821['throw'](_0x168025));}catch(_0x5c571b){_0x295568(_0x5c571b);}}function _0x343509(_0x28a2fa){_0x28a2fa['done']?_0x3cb836(_0x28a2fa['value']):_0x308754(_0x28a2fa['value'])['then'](_0x27a165,_0x389ea3);}_0x343509((_0x1a2821=_0x1a2821['apply'](_0x2471ff,_0x4fa33||[]))['next']());});};class Fetch{static['get'](_0x2fbf8e,_0x39fd5c){return __awaiter$5(this,void 0,void 0,function*(){return yield fetch(_0x2fbf8e,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x39fd5c}});});}static['post'](_0x4d36e6,_0x460f2f,_0x4dfc68){return __awaiter$5(this,void 0,void 0,function*(){return yield fetch(_0x4d36e6,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x460f2f},'body':_0x4dfc68?JSON['stringify'](_0x4dfc68):null});});}static['put'](_0x2a8840,_0x57cea1,_0x4fe17e){return __awaiter$5(this,void 0,void 0,function*(){return yield fetch(_0x2a8840,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x57cea1},'body':_0x4fe17e?JSON['stringify'](_0x4fe17e):null});});}static['delete'](_0x230ffc,_0x15e879){return __awaiter$5(this,void 0,void 0,function*(){return yield fetch(_0x230ffc,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x15e879}});});}}
2
+
3
+ class Response{constructor(_0x46bb27){this['isSuccess']=_0x46bb27;}}class SuccessfulAccountResponse extends Response{constructor(_0x51bfe6){super(!![]),this['account']=_0x51bfe6;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x29eb63){super(![]),this['problem']=_0x29eb63;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulRefreshResponse extends Response{constructor(_0x1669b8){super(!![]),this['tokens']=_0x1669b8;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedRefreshResponse extends Response{constructor(_0x5131ed){super(![]),this['problem']=_0x5131ed;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x235d93){super(!![]),this['apiKey']=_0x235d93;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x6ac024){super(![]),this['problem']=_0x6ac024;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
4
+
5
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x9d3631,_0x4491af,_0x22563d,_0x156b68){function _0x5c109c(_0x4983e1){return _0x4983e1 instanceof _0x22563d?_0x4983e1:new _0x22563d(function(_0x59a126){_0x59a126(_0x4983e1);});}return new(_0x22563d||(_0x22563d=Promise))(function(_0x357ad5,_0x402a9d){function _0x29b7eb(_0x2aaf48){try{_0x5e8865(_0x156b68['next'](_0x2aaf48));}catch(_0x597726){_0x402a9d(_0x597726);}}function _0x186e59(_0x1b733f){try{_0x5e8865(_0x156b68['throw'](_0x1b733f));}catch(_0x2a9c9d){_0x402a9d(_0x2a9c9d);}}function _0x5e8865(_0x493603){_0x493603['done']?_0x357ad5(_0x493603['value']):_0x5c109c(_0x493603['value'])['then'](_0x29b7eb,_0x186e59);}_0x5e8865((_0x156b68=_0x156b68['apply'](_0x9d3631,_0x4491af||[]))['next']());});};class AccountService{constructor(_0x3391c8){this['baseUri']=_0x3391c8;}['get'](_0x4d1b1c,_0x11aa91){return __awaiter$4(this,arguments,void 0,function*(_0xf4acb0,_0x46cf17,_0x2d7a79={}){var _0x4bf4df;let _0x2ae644=(_0x4bf4df=_0x2d7a79['baseUri'])!==null&&_0x4bf4df!==void 0?_0x4bf4df:this['baseUri'];!_0x2ae644['endsWith']('/')&&(_0x2ae644=_0x2ae644+'/');_0x2ae644=_0x2ae644+'Account/'+_0x46cf17+'/';const _0x17a064=yield Fetch['get'](_0x2ae644,_0xf4acb0);try{if(_0x17a064['status']>0xc7&&_0x17a064['status']<0x12c){const _0x58c725=yield _0x17a064['json']();return new SuccessfulAccountResponse(_0x58c725);}const _0x53c64e=yield _0x17a064['json']();return new FailedAccountResponse(_0x53c64e);}catch(_0x4067ed){if(_0x4067ed instanceof Error)return new FailedAccountResponse({'detail':_0x4067ed['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x4067ed;}});}}
6
+
7
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x53ded0,_0x3e271a,_0x37c928,_0x2f7a4b){function _0x36f870(_0x1303f9){return _0x1303f9 instanceof _0x37c928?_0x1303f9:new _0x37c928(function(_0xbff479){_0xbff479(_0x1303f9);});}return new(_0x37c928||(_0x37c928=Promise))(function(_0x577796,_0x286353){function _0x2b1e90(_0x4d4410){try{_0xb1e6c6(_0x2f7a4b['next'](_0x4d4410));}catch(_0x1fcb8e){_0x286353(_0x1fcb8e);}}function _0x3eb229(_0x292189){try{_0xb1e6c6(_0x2f7a4b['throw'](_0x292189));}catch(_0x1e12aa){_0x286353(_0x1e12aa);}}function _0xb1e6c6(_0x74d7d){_0x74d7d['done']?_0x577796(_0x74d7d['value']):_0x36f870(_0x74d7d['value'])['then'](_0x2b1e90,_0x3eb229);}_0xb1e6c6((_0x2f7a4b=_0x2f7a4b['apply'](_0x53ded0,_0x3e271a||[]))['next']());});};class ApiKeyService{constructor(_0x3615fe){this['baseUri']=_0x3615fe;}['create'](_0x1149aa,_0x558123,_0x34217d){return __awaiter$3(this,arguments,void 0,function*(_0xc3df64,_0x1f43ff,_0x3fa865,_0xa7223b={}){var _0x30b35f;let _0x55b0ff=(_0x30b35f=_0xa7223b['baseUri'])!==null&&_0x30b35f!==void 0?_0x30b35f:this['baseUri'];!_0x55b0ff['endsWith']('/')&&(_0x55b0ff=_0x55b0ff+'/');_0x55b0ff=_0x55b0ff+'ApiKey/Create';const _0x23825b={'account_name':_0x1f43ff,'name':_0x3fa865};try{const _0x37fa5c=yield Fetch['post'](_0x55b0ff,_0xc3df64,_0x23825b);if(_0x37fa5c['status']>0xc7&&_0x37fa5c['status']<0x12c){const _0x87dcd4=yield _0x37fa5c['json']();return new SuccessfulApiKeyResponse(_0x87dcd4);}const _0x4fc799=yield _0x37fa5c['json']();return new FailedApiKeyResponse(_0x4fc799);}catch(_0xc525bf){if(_0xc525bf instanceof Error)return new FailedApiKeyResponse({'detail':_0xc525bf['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0xc525bf;}});}}
8
+
9
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x516d6c,_0x3b6ce4,_0x4e05f5,_0x2ee41e){function _0x6f627a(_0x1c5abf){return _0x1c5abf instanceof _0x4e05f5?_0x1c5abf:new _0x4e05f5(function(_0x2de2a0){_0x2de2a0(_0x1c5abf);});}return new(_0x4e05f5||(_0x4e05f5=Promise))(function(_0x26a27a,_0x5eef33){function _0x44892e(_0x450d05){try{_0x6c61ac(_0x2ee41e['next'](_0x450d05));}catch(_0x505db4){_0x5eef33(_0x505db4);}}function _0x31b964(_0x1e1792){try{_0x6c61ac(_0x2ee41e['throw'](_0x1e1792));}catch(_0x59b501){_0x5eef33(_0x59b501);}}function _0x6c61ac(_0x288871){_0x288871['done']?_0x26a27a(_0x288871['value']):_0x6f627a(_0x288871['value'])['then'](_0x44892e,_0x31b964);}_0x6c61ac((_0x2ee41e=_0x2ee41e['apply'](_0x516d6c,_0x3b6ce4||[]))['next']());});};class ListService{constructor(_0x411e57){this['baseUri']=_0x411e57;}['add'](_0x3db525,_0x2bc634,_0x315e7e){return __awaiter$2(this,arguments,void 0,function*(_0x4256c9,_0x39246c,_0x3ba4b6,_0x5b9ab0={}){var _0x183888;let _0x415d5e=(_0x183888=_0x5b9ab0['baseUri'])!==null&&_0x183888!==void 0?_0x183888:this['baseUri'];!_0x415d5e['endsWith']('/')&&(_0x415d5e=_0x415d5e+'/');_0x415d5e=_0x415d5e+'List';const _0x1ad124={'account_name':_0x39246c,'list_name':_0x3ba4b6};try{const _0x3fc003=yield Fetch['post'](_0x415d5e,_0x4256c9,_0x1ad124);if(_0x3fc003['status']>0xc7&&_0x3fc003['status']<0x12c){const _0x1a058f=yield _0x3fc003['json']();return new SuccessfulAccountResponse(_0x1a058f);}const _0x3bc077=yield _0x3fc003['json']();return new FailedAccountResponse(_0x3bc077);}catch(_0x3afa3e){if(_0x3afa3e instanceof Error)return new FailedAccountResponse({'detail':_0x3afa3e['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x3afa3e;}});}['remove'](_0x57a6e2,_0x16270e,_0x298626){return __awaiter$2(this,arguments,void 0,function*(_0x1f938f,_0xcd1525,_0x2b13a6,_0x46291e={}){var _0x4853ff;let _0x503b38=(_0x4853ff=_0x46291e['baseUri'])!==null&&_0x4853ff!==void 0?_0x4853ff:this['baseUri'];_0x503b38=_0x503b38+'/List/'+_0xcd1525+'/'+_0x2b13a6;const _0x31b0b1=yield Fetch['delete'](_0x503b38,_0x1f938f);try{if(_0x31b0b1['status']>0xc7&&_0x31b0b1['status']<0x12c){const _0x2851ff=yield _0x31b0b1['json']();return new SuccessfulAccountResponse(_0x2851ff);}const _0x28404a=yield _0x31b0b1['json']();return new FailedAccountResponse(_0x28404a);}catch(_0x5219b3){if(_0x5219b3 instanceof Error)return new FailedAccountResponse({'detail':_0x5219b3['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x5219b3;}});}}
10
+
11
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0xdc281d,_0x30e70a,_0x3f7a96,_0x1663b9){function _0x772a33(_0x5e4533){return _0x5e4533 instanceof _0x3f7a96?_0x5e4533:new _0x3f7a96(function(_0x4d6b14){_0x4d6b14(_0x5e4533);});}return new(_0x3f7a96||(_0x3f7a96=Promise))(function(_0x32c13f,_0x1f870d){function _0x59cc53(_0xdaa1a5){try{_0x152e86(_0x1663b9['next'](_0xdaa1a5));}catch(_0x20fd59){_0x1f870d(_0x20fd59);}}function _0x5c2c91(_0x5a9910){try{_0x152e86(_0x1663b9['throw'](_0x5a9910));}catch(_0x1714b8){_0x1f870d(_0x1714b8);}}function _0x152e86(_0x49b6ef){_0x49b6ef['done']?_0x32c13f(_0x49b6ef['value']):_0x772a33(_0x49b6ef['value'])['then'](_0x59cc53,_0x5c2c91);}_0x152e86((_0x1663b9=_0x1663b9['apply'](_0xdc281d,_0x30e70a||[]))['next']());});};class TokenManager{constructor(_0x51ca90){this['securityService']=_0x51ca90;}['RefreshTokens'](_0x553983){return __awaiter$1(this,arguments,void 0,function*(_0x157896,_0x29c4ae={}){if(Date['now']()<_0x157896['access_expires'])return new SuccessfulRefreshResponse(_0x157896);if(Date['now']()>_0x157896['refresh_expires']){const _0x484e93={'detail':'Forbidden','type':'','status':0x193,'title':'Forbidden','instance':''};return new FailedRefreshResponse(_0x484e93);}const _0x332e67=yield this['securityService']['refresh'](_0x157896['refresh_token'],_0x29c4ae);if(!_0x332e67['isSuccess'])return new FailedRefreshResponse(_0x332e67['toProblem']());return new SuccessfulRefreshResponse(_0x332e67['toSuccess']());});}}
12
+
13
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x3b89d4,_0x5fe804,_0x541434,_0x7fbf5a){function _0x27e573(_0x1fbf07){return _0x1fbf07 instanceof _0x541434?_0x1fbf07:new _0x541434(function(_0x25ef48){_0x25ef48(_0x1fbf07);});}return new(_0x541434||(_0x541434=Promise))(function(_0x577c8b,_0x12b0e9){function _0x15ea42(_0x3827a6){try{_0x3087f8(_0x7fbf5a['next'](_0x3827a6));}catch(_0x14e535){_0x12b0e9(_0x14e535);}}function _0x5a9974(_0x2d7873){try{_0x3087f8(_0x7fbf5a['throw'](_0x2d7873));}catch(_0x58bdf7){_0x12b0e9(_0x58bdf7);}}function _0x3087f8(_0x160e25){_0x160e25['done']?_0x577c8b(_0x160e25['value']):_0x27e573(_0x160e25['value'])['then'](_0x15ea42,_0x5a9974);}_0x3087f8((_0x7fbf5a=_0x7fbf5a['apply'](_0x3b89d4,_0x5fe804||[]))['next']());});};class SecurityService{constructor(_0x2b74c5){this['baseUri']=_0x2b74c5,this['tokenManager']=new TokenManager(this);}['refresh'](_0x8b3f20){return __awaiter(this,arguments,void 0,function*(_0x307b45,_0xcd7d7f={}){var _0x4bc085;let _0x52028b=(_0x4bc085=_0xcd7d7f['baseUri'])!==null&&_0x4bc085!==void 0?_0x4bc085:this['baseUri'];!_0x52028b['endsWith']('/')&&(_0x52028b=_0x52028b+'/');_0x52028b=_0x52028b+'Security/Refresh';try{const _0x1a7e26=yield Fetch['post'](_0x52028b,_0x307b45,null);if(_0x1a7e26['status']>0xc7&&_0x1a7e26['status']<0x12c){const _0x1d4a1b=yield _0x1a7e26['json']();return new SuccessfulRefreshResponse(_0x1d4a1b);}const _0x1b4bed=yield _0x1a7e26['json']();return new FailedRefreshResponse(_0x1b4bed);}catch(_0x52f426){if(_0x52f426 instanceof Error)return new FailedRefreshResponse({'detail':_0x52f426['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x52f426;}});}}
14
+
15
+ var _a;class AdminClient{}_a=AdminClient,AdminClient['baseUri']='https://admin.searchability.dev/',AdminClient['Accounts']=new AccountService(_a['baseUri']),AdminClient['Lists']=new ListService(_a['baseUri']),AdminClient['Security']=new SecurityService(_a['baseUri']),AdminClient['ApiKeys']=new ApiKeyService(_a['baseUri']);
16
+
17
+ export { AdminClient };
@@ -1,17 +1,19 @@
1
1
  'use strict';
2
2
 
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}});});}}
3
+ var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x47c887,_0x342d6c,_0x265f8f,_0x478cbd){function _0x11b7d0(_0x21922c){return _0x21922c instanceof _0x265f8f?_0x21922c:new _0x265f8f(function(_0x172ff4){_0x172ff4(_0x21922c);});}return new(_0x265f8f||(_0x265f8f=Promise))(function(_0x120b3e,_0x4cafd2){function _0x52ab00(_0x2bb001){try{_0x3ecb3e(_0x478cbd['next'](_0x2bb001));}catch(_0x15016f){_0x4cafd2(_0x15016f);}}function _0x27d07c(_0x6544f0){try{_0x3ecb3e(_0x478cbd['throw'](_0x6544f0));}catch(_0x1148e4){_0x4cafd2(_0x1148e4);}}function _0x3ecb3e(_0x57c40d){_0x57c40d['done']?_0x120b3e(_0x57c40d['value']):_0x11b7d0(_0x57c40d['value'])['then'](_0x52ab00,_0x27d07c);}_0x3ecb3e((_0x478cbd=_0x478cbd['apply'](_0x47c887,_0x342d6c||[]))['next']());});};class Fetch{static['get'](_0x5782d6,_0x1451e9){return __awaiter$5(this,void 0,void 0,function*(){return yield fetch(_0x5782d6,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1451e9}});});}static['post'](_0x43bd4a,_0x356b5e,_0x49b48d){return __awaiter$5(this,void 0,void 0,function*(){return yield fetch(_0x43bd4a,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x356b5e},'body':_0x49b48d?JSON['stringify'](_0x49b48d):null});});}static['put'](_0x25247c,_0x3c2782,_0x3414b3){return __awaiter$5(this,void 0,void 0,function*(){return yield fetch(_0x25247c,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3c2782},'body':_0x3414b3?JSON['stringify'](_0x3414b3):null});});}static['delete'](_0x59e1fa,_0x13a6fe){return __awaiter$5(this,void 0,void 0,function*(){return yield fetch(_0x59e1fa,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x13a6fe}});});}}
4
4
 
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'];}}
5
+ class Response{constructor(_0x17832c){this['isSuccess']=_0x17832c;}}class SuccessfulAccountResponse extends Response{constructor(_0x103f7c){super(!![]),this['account']=_0x103f7c;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x49344e){super(![]),this['problem']=_0x49344e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulRefreshResponse extends Response{constructor(_0x286286){super(!![]),this['tokens']=_0x286286;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedRefreshResponse extends Response{constructor(_0x5b49d2){super(![]),this['problem']=_0x5b49d2;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x4f6f62){super(!![]),this['apiKey']=_0x4f6f62;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x536d2a){super(![]),this['problem']=_0x536d2a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
6
6
 
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;}});}}
7
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x52a5a4,_0x8af78,_0x2fe67e,_0x2d2d7e){function _0xde91d3(_0x18eb58){return _0x18eb58 instanceof _0x2fe67e?_0x18eb58:new _0x2fe67e(function(_0x8c936d){_0x8c936d(_0x18eb58);});}return new(_0x2fe67e||(_0x2fe67e=Promise))(function(_0x193492,_0x5291d3){function _0x5eeb82(_0x38146f){try{_0x148b66(_0x2d2d7e['next'](_0x38146f));}catch(_0x4fd7ab){_0x5291d3(_0x4fd7ab);}}function _0x5aaef6(_0xcf8775){try{_0x148b66(_0x2d2d7e['throw'](_0xcf8775));}catch(_0x2ab91a){_0x5291d3(_0x2ab91a);}}function _0x148b66(_0x5a8ef3){_0x5a8ef3['done']?_0x193492(_0x5a8ef3['value']):_0xde91d3(_0x5a8ef3['value'])['then'](_0x5eeb82,_0x5aaef6);}_0x148b66((_0x2d2d7e=_0x2d2d7e['apply'](_0x52a5a4,_0x8af78||[]))['next']());});};class AccountService{constructor(_0x5d132e){this['baseUri']=_0x5d132e;}['get'](_0x4adefa,_0x44e2fe){return __awaiter$4(this,arguments,void 0,function*(_0x355645,_0x5086d3,_0x1d4268={}){var _0x1bce76;let _0x114db1=(_0x1bce76=_0x1d4268['baseUri'])!==null&&_0x1bce76!==void 0?_0x1bce76:this['baseUri'];!_0x114db1['endsWith']('/')&&(_0x114db1=_0x114db1+'/');_0x114db1=_0x114db1+'Account/'+_0x5086d3+'/';const _0x14284e=yield Fetch['get'](_0x114db1,_0x355645);try{if(_0x14284e['status']>0xc7&&_0x14284e['status']<0x12c){const _0xceedbb=yield _0x14284e['json']();return new SuccessfulAccountResponse(_0xceedbb);}const _0x1a3616=yield _0x14284e['json']();return new FailedAccountResponse(_0x1a3616);}catch(_0x1593e3){if(_0x1593e3 instanceof Error)return new FailedAccountResponse({'detail':_0x1593e3['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x1593e3;}});}}
8
8
 
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;}});}}
9
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x13f54a,_0x41f7dd,_0x37f650,_0x110b32){function _0xfb6973(_0x54ac4){return _0x54ac4 instanceof _0x37f650?_0x54ac4:new _0x37f650(function(_0x4a59c3){_0x4a59c3(_0x54ac4);});}return new(_0x37f650||(_0x37f650=Promise))(function(_0x1a5144,_0x112a82){function _0x50e36a(_0xd3c56a){try{_0x47023d(_0x110b32['next'](_0xd3c56a));}catch(_0x5615cf){_0x112a82(_0x5615cf);}}function _0x28d896(_0x2850c1){try{_0x47023d(_0x110b32['throw'](_0x2850c1));}catch(_0x387821){_0x112a82(_0x387821);}}function _0x47023d(_0x41a101){_0x41a101['done']?_0x1a5144(_0x41a101['value']):_0xfb6973(_0x41a101['value'])['then'](_0x50e36a,_0x28d896);}_0x47023d((_0x110b32=_0x110b32['apply'](_0x13f54a,_0x41f7dd||[]))['next']());});};class ApiKeyService{constructor(_0x316089){this['baseUri']=_0x316089;}['create'](_0x3cc2c8,_0x2ed457,_0x1f81ad){return __awaiter$3(this,arguments,void 0,function*(_0x5511f7,_0x56d357,_0x271a29,_0x468c77={}){var _0x24b455;let _0x19592e=(_0x24b455=_0x468c77['baseUri'])!==null&&_0x24b455!==void 0?_0x24b455:this['baseUri'];!_0x19592e['endsWith']('/')&&(_0x19592e=_0x19592e+'/');_0x19592e=_0x19592e+'ApiKey/Create';const _0xecf371={'account_name':_0x56d357,'name':_0x271a29};try{const _0x531c62=yield Fetch['post'](_0x19592e,_0x5511f7,_0xecf371);if(_0x531c62['status']>0xc7&&_0x531c62['status']<0x12c){const _0x39894e=yield _0x531c62['json']();return new SuccessfulApiKeyResponse(_0x39894e);}const _0x49c7cb=yield _0x531c62['json']();return new FailedApiKeyResponse(_0x49c7cb);}catch(_0x554c8){if(_0x554c8 instanceof Error)return new FailedApiKeyResponse({'detail':_0x554c8['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x554c8;}});}}
10
10
 
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']());});}}
11
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x231556,_0xabb0ff,_0x2be7b0,_0x4b81bc){function _0x223f5c(_0x205eef){return _0x205eef instanceof _0x2be7b0?_0x205eef:new _0x2be7b0(function(_0x5ecc75){_0x5ecc75(_0x205eef);});}return new(_0x2be7b0||(_0x2be7b0=Promise))(function(_0x28ebb7,_0xcef553){function _0x6f620e(_0x150efb){try{_0x2392d3(_0x4b81bc['next'](_0x150efb));}catch(_0x274bfb){_0xcef553(_0x274bfb);}}function _0x2effc5(_0x625765){try{_0x2392d3(_0x4b81bc['throw'](_0x625765));}catch(_0x234197){_0xcef553(_0x234197);}}function _0x2392d3(_0x37757d){_0x37757d['done']?_0x28ebb7(_0x37757d['value']):_0x223f5c(_0x37757d['value'])['then'](_0x6f620e,_0x2effc5);}_0x2392d3((_0x4b81bc=_0x4b81bc['apply'](_0x231556,_0xabb0ff||[]))['next']());});};class ListService{constructor(_0x3c18b5){this['baseUri']=_0x3c18b5;}['add'](_0x56863d,_0x23168a,_0x5beedb){return __awaiter$2(this,arguments,void 0,function*(_0x58ddb0,_0x2a3a75,_0x396514,_0x2313bc={}){var _0x4bbf93;let _0x4389b8=(_0x4bbf93=_0x2313bc['baseUri'])!==null&&_0x4bbf93!==void 0?_0x4bbf93:this['baseUri'];!_0x4389b8['endsWith']('/')&&(_0x4389b8=_0x4389b8+'/');_0x4389b8=_0x4389b8+'List';const _0x3358e1={'account_name':_0x2a3a75,'list_name':_0x396514};try{const _0x2c4912=yield Fetch['post'](_0x4389b8,_0x58ddb0,_0x3358e1);if(_0x2c4912['status']>0xc7&&_0x2c4912['status']<0x12c){const _0x17f8ab=yield _0x2c4912['json']();return new SuccessfulAccountResponse(_0x17f8ab);}const _0x23c1ef=yield _0x2c4912['json']();return new FailedAccountResponse(_0x23c1ef);}catch(_0x2b7972){if(_0x2b7972 instanceof Error)return new FailedAccountResponse({'detail':_0x2b7972['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x2b7972;}});}['remove'](_0x2e4004,_0x357c4a,_0x54651f){return __awaiter$2(this,arguments,void 0,function*(_0x4f827d,_0x702c89,_0x410e0e,_0x17ca39={}){var _0x47b938;let _0x362429=(_0x47b938=_0x17ca39['baseUri'])!==null&&_0x47b938!==void 0?_0x47b938:this['baseUri'];_0x362429=_0x362429+'/List/'+_0x702c89+'/'+_0x410e0e;const _0x1237ad=yield Fetch['delete'](_0x362429,_0x4f827d);try{if(_0x1237ad['status']>0xc7&&_0x1237ad['status']<0x12c){const _0x1b8c78=yield _0x1237ad['json']();return new SuccessfulAccountResponse(_0x1b8c78);}const _0x39649f=yield _0x1237ad['json']();return new FailedAccountResponse(_0x39649f);}catch(_0x3ac8c6){if(_0x3ac8c6 instanceof Error)return new FailedAccountResponse({'detail':_0x3ac8c6['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x3ac8c6;}});}}
12
12
 
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;}});}}
13
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x1ab867,_0x51a7d1,_0x1f0bae,_0x4151f3){function _0x2e4e99(_0x445b53){return _0x445b53 instanceof _0x1f0bae?_0x445b53:new _0x1f0bae(function(_0x283d44){_0x283d44(_0x445b53);});}return new(_0x1f0bae||(_0x1f0bae=Promise))(function(_0x5823c0,_0x3e45db){function _0x3cb636(_0x3d82b4){try{_0x33a4d6(_0x4151f3['next'](_0x3d82b4));}catch(_0x1a7c15){_0x3e45db(_0x1a7c15);}}function _0x50b8b9(_0xc406b3){try{_0x33a4d6(_0x4151f3['throw'](_0xc406b3));}catch(_0x31b4a4){_0x3e45db(_0x31b4a4);}}function _0x33a4d6(_0x19815c){_0x19815c['done']?_0x5823c0(_0x19815c['value']):_0x2e4e99(_0x19815c['value'])['then'](_0x3cb636,_0x50b8b9);}_0x33a4d6((_0x4151f3=_0x4151f3['apply'](_0x1ab867,_0x51a7d1||[]))['next']());});};class TokenManager{constructor(_0x4b5473){this['securityService']=_0x4b5473;}['RefreshTokens'](_0x29ab60){return __awaiter$1(this,arguments,void 0,function*(_0x720aec,_0x209336={}){if(Date['now']()<_0x720aec['access_expires'])return new SuccessfulRefreshResponse(_0x720aec);if(Date['now']()>_0x720aec['refresh_expires']){const _0x4a1346={'detail':'Forbidden','type':'','status':0x193,'title':'Forbidden','instance':''};return new FailedRefreshResponse(_0x4a1346);}const _0x438dc6=yield this['securityService']['refresh'](_0x720aec['refresh_token'],_0x209336);if(!_0x438dc6['isSuccess'])return new FailedRefreshResponse(_0x438dc6['toProblem']());return new SuccessfulRefreshResponse(_0x438dc6['toSuccess']());});}}
14
14
 
15
- var _a;class AdminClient{}_a=AdminClient,AdminClient['baseUri']='https://admin.searchability.dev/',AdminClient['Accounts']=new AccountService(_a['baseUri']),AdminClient['Lists']=new ListService(_a['baseUri']),AdminClient['Security']=new SecurityService(_a['baseUri']);
15
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x178075,_0x3aba25,_0x585506,_0x495b1a){function _0x17d1e4(_0x146342){return _0x146342 instanceof _0x585506?_0x146342:new _0x585506(function(_0x21b772){_0x21b772(_0x146342);});}return new(_0x585506||(_0x585506=Promise))(function(_0x39bdef,_0x448bbb){function _0x12e809(_0x16fd0a){try{_0x48f21d(_0x495b1a['next'](_0x16fd0a));}catch(_0x272e6a){_0x448bbb(_0x272e6a);}}function _0x3908af(_0x47221b){try{_0x48f21d(_0x495b1a['throw'](_0x47221b));}catch(_0x4ff83f){_0x448bbb(_0x4ff83f);}}function _0x48f21d(_0x5ca4a5){_0x5ca4a5['done']?_0x39bdef(_0x5ca4a5['value']):_0x17d1e4(_0x5ca4a5['value'])['then'](_0x12e809,_0x3908af);}_0x48f21d((_0x495b1a=_0x495b1a['apply'](_0x178075,_0x3aba25||[]))['next']());});};class SecurityService{constructor(_0x593f1b){this['baseUri']=_0x593f1b,this['tokenManager']=new TokenManager(this);}['refresh'](_0x4a402c){return __awaiter(this,arguments,void 0,function*(_0x340e69,_0x20bf58={}){var _0x443576;let _0x3b5b55=(_0x443576=_0x20bf58['baseUri'])!==null&&_0x443576!==void 0?_0x443576:this['baseUri'];!_0x3b5b55['endsWith']('/')&&(_0x3b5b55=_0x3b5b55+'/');_0x3b5b55=_0x3b5b55+'Security/Refresh';try{const _0x548973=yield Fetch['post'](_0x3b5b55,_0x340e69,null);if(_0x548973['status']>0xc7&&_0x548973['status']<0x12c){const _0x56f8df=yield _0x548973['json']();return new SuccessfulRefreshResponse(_0x56f8df);}const _0x4a334c=yield _0x548973['json']();return new FailedRefreshResponse(_0x4a334c);}catch(_0x574c0a){if(_0x574c0a instanceof Error)return new FailedRefreshResponse({'detail':_0x574c0a['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x574c0a;}});}}
16
+
17
+ 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']),AdminClient['ApiKeys']=new ApiKeyService(_a['baseUri']);
16
18
 
17
19
  exports.AdminClient = AdminClient;
@@ -1,15 +1,17 @@
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}});});}}
1
+ var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x3335f4,_0x132652,_0x3630d6,_0x34000e){function _0x17d55e(_0x514e97){return _0x514e97 instanceof _0x3630d6?_0x514e97:new _0x3630d6(function(_0x590e2c){_0x590e2c(_0x514e97);});}return new(_0x3630d6||(_0x3630d6=Promise))(function(_0x6e86e8,_0x5b3863){function _0x4aad1f(_0x1c60cf){try{_0x40bfde(_0x34000e['next'](_0x1c60cf));}catch(_0x266511){_0x5b3863(_0x266511);}}function _0xd9bece(_0x47fcbd){try{_0x40bfde(_0x34000e['throw'](_0x47fcbd));}catch(_0x1090a8){_0x5b3863(_0x1090a8);}}function _0x40bfde(_0x44f342){_0x44f342['done']?_0x6e86e8(_0x44f342['value']):_0x17d55e(_0x44f342['value'])['then'](_0x4aad1f,_0xd9bece);}_0x40bfde((_0x34000e=_0x34000e['apply'](_0x3335f4,_0x132652||[]))['next']());});};class Fetch{static['get'](_0xe32650,_0x378410){return __awaiter$5(this,void 0,void 0,function*(){return yield fetch(_0xe32650,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x378410}});});}static['post'](_0x5c6fe2,_0x1668be,_0x794ee1){return __awaiter$5(this,void 0,void 0,function*(){return yield fetch(_0x5c6fe2,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1668be},'body':_0x794ee1?JSON['stringify'](_0x794ee1):null});});}static['put'](_0x4978d8,_0x1451ce,_0x468361){return __awaiter$5(this,void 0,void 0,function*(){return yield fetch(_0x4978d8,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1451ce},'body':_0x468361?JSON['stringify'](_0x468361):null});});}static['delete'](_0x45c03b,_0x36c577){return __awaiter$5(this,void 0,void 0,function*(){return yield fetch(_0x45c03b,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x36c577}});});}}
2
2
 
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'];}}
3
+ class Response{constructor(_0x3bba84){this['isSuccess']=_0x3bba84;}}class SuccessfulAccountResponse extends Response{constructor(_0x13e61e){super(!![]),this['account']=_0x13e61e;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x16c05f){super(![]),this['problem']=_0x16c05f;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulRefreshResponse extends Response{constructor(_0x1b7e68){super(!![]),this['tokens']=_0x1b7e68;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedRefreshResponse extends Response{constructor(_0x3e838a){super(![]),this['problem']=_0x3e838a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x3dfe61){super(!![]),this['apiKey']=_0x3dfe61;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x43befe){super(![]),this['problem']=_0x43befe;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
4
4
 
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;}});}}
5
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x42efcd,_0x539611,_0x427c65,_0x634b17){function _0x4b4e80(_0x2ea46a){return _0x2ea46a instanceof _0x427c65?_0x2ea46a:new _0x427c65(function(_0x126616){_0x126616(_0x2ea46a);});}return new(_0x427c65||(_0x427c65=Promise))(function(_0x24e77c,_0x922bd5){function _0x3de3d5(_0xfb1a12){try{_0x2555bd(_0x634b17['next'](_0xfb1a12));}catch(_0x27eee8){_0x922bd5(_0x27eee8);}}function _0x5e1090(_0x1e6c1d){try{_0x2555bd(_0x634b17['throw'](_0x1e6c1d));}catch(_0xc7e708){_0x922bd5(_0xc7e708);}}function _0x2555bd(_0x39313b){_0x39313b['done']?_0x24e77c(_0x39313b['value']):_0x4b4e80(_0x39313b['value'])['then'](_0x3de3d5,_0x5e1090);}_0x2555bd((_0x634b17=_0x634b17['apply'](_0x42efcd,_0x539611||[]))['next']());});};class AccountService{constructor(_0xede79a){this['baseUri']=_0xede79a;}['get'](_0x988fa3,_0x40aaa8){return __awaiter$4(this,arguments,void 0,function*(_0x37ab6b,_0x598c9a,_0x6da117={}){var _0x5cacaa;let _0x46b9b6=(_0x5cacaa=_0x6da117['baseUri'])!==null&&_0x5cacaa!==void 0?_0x5cacaa:this['baseUri'];!_0x46b9b6['endsWith']('/')&&(_0x46b9b6=_0x46b9b6+'/');_0x46b9b6=_0x46b9b6+'Account/'+_0x598c9a+'/';const _0x1eb2cd=yield Fetch['get'](_0x46b9b6,_0x37ab6b);try{if(_0x1eb2cd['status']>0xc7&&_0x1eb2cd['status']<0x12c){const _0x9a135e=yield _0x1eb2cd['json']();return new SuccessfulAccountResponse(_0x9a135e);}const _0x32c6d1=yield _0x1eb2cd['json']();return new FailedAccountResponse(_0x32c6d1);}catch(_0x1b972a){if(_0x1b972a instanceof Error)return new FailedAccountResponse({'detail':_0x1b972a['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x1b972a;}});}}
6
6
 
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;}});}}
7
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x6f1f1,_0x32eee4,_0x5e3dc9,_0x3f35a5){function _0x3a674f(_0x1519c9){return _0x1519c9 instanceof _0x5e3dc9?_0x1519c9:new _0x5e3dc9(function(_0x4eafde){_0x4eafde(_0x1519c9);});}return new(_0x5e3dc9||(_0x5e3dc9=Promise))(function(_0x3ad64f,_0x53f6c8){function _0x3ff5db(_0x4a28e9){try{_0x38a0c6(_0x3f35a5['next'](_0x4a28e9));}catch(_0xf43067){_0x53f6c8(_0xf43067);}}function _0x2c5985(_0x28bae0){try{_0x38a0c6(_0x3f35a5['throw'](_0x28bae0));}catch(_0x2e319c){_0x53f6c8(_0x2e319c);}}function _0x38a0c6(_0x48bebd){_0x48bebd['done']?_0x3ad64f(_0x48bebd['value']):_0x3a674f(_0x48bebd['value'])['then'](_0x3ff5db,_0x2c5985);}_0x38a0c6((_0x3f35a5=_0x3f35a5['apply'](_0x6f1f1,_0x32eee4||[]))['next']());});};class ApiKeyService{constructor(_0x21695b){this['baseUri']=_0x21695b;}['create'](_0x301f21,_0x18ea57,_0xe3427f){return __awaiter$3(this,arguments,void 0,function*(_0x7c47eb,_0x35c8bc,_0x437ff9,_0x55bd8b={}){var _0x9680ae;let _0x348458=(_0x9680ae=_0x55bd8b['baseUri'])!==null&&_0x9680ae!==void 0?_0x9680ae:this['baseUri'];!_0x348458['endsWith']('/')&&(_0x348458=_0x348458+'/');_0x348458=_0x348458+'ApiKey/Create';const _0x3d6d12={'account_name':_0x35c8bc,'name':_0x437ff9};try{const _0x26c092=yield Fetch['post'](_0x348458,_0x7c47eb,_0x3d6d12);if(_0x26c092['status']>0xc7&&_0x26c092['status']<0x12c){const _0xfdf3bf=yield _0x26c092['json']();return new SuccessfulApiKeyResponse(_0xfdf3bf);}const _0x575eb4=yield _0x26c092['json']();return new FailedApiKeyResponse(_0x575eb4);}catch(_0x2853b3){if(_0x2853b3 instanceof Error)return new FailedApiKeyResponse({'detail':_0x2853b3['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x2853b3;}});}}
8
8
 
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']());});}}
9
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x24f100,_0x2a57d7,_0xe468c2,_0x26d7fb){function _0x111a85(_0x44e917){return _0x44e917 instanceof _0xe468c2?_0x44e917:new _0xe468c2(function(_0x4f5003){_0x4f5003(_0x44e917);});}return new(_0xe468c2||(_0xe468c2=Promise))(function(_0x5cab7c,_0x37e99f){function _0x4f880(_0x187fad){try{_0x1338f(_0x26d7fb['next'](_0x187fad));}catch(_0x3f14d7){_0x37e99f(_0x3f14d7);}}function _0x42d1fc(_0x507d6f){try{_0x1338f(_0x26d7fb['throw'](_0x507d6f));}catch(_0x36cca7){_0x37e99f(_0x36cca7);}}function _0x1338f(_0xb6d0dd){_0xb6d0dd['done']?_0x5cab7c(_0xb6d0dd['value']):_0x111a85(_0xb6d0dd['value'])['then'](_0x4f880,_0x42d1fc);}_0x1338f((_0x26d7fb=_0x26d7fb['apply'](_0x24f100,_0x2a57d7||[]))['next']());});};class ListService{constructor(_0x3b95fc){this['baseUri']=_0x3b95fc;}['add'](_0x428a54,_0x4da655,_0x125ecd){return __awaiter$2(this,arguments,void 0,function*(_0x3d6d92,_0xbb88a4,_0x19736d,_0x197b6f={}){var _0x49e3ad;let _0x406337=(_0x49e3ad=_0x197b6f['baseUri'])!==null&&_0x49e3ad!==void 0?_0x49e3ad:this['baseUri'];!_0x406337['endsWith']('/')&&(_0x406337=_0x406337+'/');_0x406337=_0x406337+'List';const _0x518a1d={'account_name':_0xbb88a4,'list_name':_0x19736d};try{const _0x4103c8=yield Fetch['post'](_0x406337,_0x3d6d92,_0x518a1d);if(_0x4103c8['status']>0xc7&&_0x4103c8['status']<0x12c){const _0x3ab7f9=yield _0x4103c8['json']();return new SuccessfulAccountResponse(_0x3ab7f9);}const _0x1e64d8=yield _0x4103c8['json']();return new FailedAccountResponse(_0x1e64d8);}catch(_0x410dcb){if(_0x410dcb instanceof Error)return new FailedAccountResponse({'detail':_0x410dcb['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x410dcb;}});}['remove'](_0x401ec9,_0x38fb25,_0x2b1f28){return __awaiter$2(this,arguments,void 0,function*(_0x3b3c04,_0x2c150d,_0x5dd0b5,_0x1543e0={}){var _0x3fb2df;let _0x14fcaa=(_0x3fb2df=_0x1543e0['baseUri'])!==null&&_0x3fb2df!==void 0?_0x3fb2df:this['baseUri'];_0x14fcaa=_0x14fcaa+'/List/'+_0x2c150d+'/'+_0x5dd0b5;const _0x35111c=yield Fetch['delete'](_0x14fcaa,_0x3b3c04);try{if(_0x35111c['status']>0xc7&&_0x35111c['status']<0x12c){const _0x177c6e=yield _0x35111c['json']();return new SuccessfulAccountResponse(_0x177c6e);}const _0x2b510e=yield _0x35111c['json']();return new FailedAccountResponse(_0x2b510e);}catch(_0x6af92b){if(_0x6af92b instanceof Error)return new FailedAccountResponse({'detail':_0x6af92b['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x6af92b;}});}}
10
10
 
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;}});}}
11
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x13d0b2,_0x1dc69c,_0x5b894f,_0x4481e3){function _0x1bebd9(_0x4a5330){return _0x4a5330 instanceof _0x5b894f?_0x4a5330:new _0x5b894f(function(_0x48d409){_0x48d409(_0x4a5330);});}return new(_0x5b894f||(_0x5b894f=Promise))(function(_0x36e1ea,_0x597573){function _0x511810(_0x2f888a){try{_0x1033fb(_0x4481e3['next'](_0x2f888a));}catch(_0x27d3a4){_0x597573(_0x27d3a4);}}function _0x3d2869(_0x22d36a){try{_0x1033fb(_0x4481e3['throw'](_0x22d36a));}catch(_0x26e25d){_0x597573(_0x26e25d);}}function _0x1033fb(_0x3ba344){_0x3ba344['done']?_0x36e1ea(_0x3ba344['value']):_0x1bebd9(_0x3ba344['value'])['then'](_0x511810,_0x3d2869);}_0x1033fb((_0x4481e3=_0x4481e3['apply'](_0x13d0b2,_0x1dc69c||[]))['next']());});};class TokenManager{constructor(_0x311f94){this['securityService']=_0x311f94;}['RefreshTokens'](_0x147891){return __awaiter$1(this,arguments,void 0,function*(_0x12cb53,_0x54dbdc={}){if(Date['now']()<_0x12cb53['access_expires'])return new SuccessfulRefreshResponse(_0x12cb53);if(Date['now']()>_0x12cb53['refresh_expires']){const _0x2aa281={'detail':'Forbidden','type':'','status':0x193,'title':'Forbidden','instance':''};return new FailedRefreshResponse(_0x2aa281);}const _0x1bd062=yield this['securityService']['refresh'](_0x12cb53['refresh_token'],_0x54dbdc);if(!_0x1bd062['isSuccess'])return new FailedRefreshResponse(_0x1bd062['toProblem']());return new SuccessfulRefreshResponse(_0x1bd062['toSuccess']());});}}
12
12
 
13
- var _a;class AdminClient{}_a=AdminClient,AdminClient['baseUri']='https://admin.searchability.dev/',AdminClient['Accounts']=new AccountService(_a['baseUri']),AdminClient['Lists']=new ListService(_a['baseUri']),AdminClient['Security']=new SecurityService(_a['baseUri']);
13
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x1fe604,_0xd30969,_0x53137a,_0x594e93){function _0x581043(_0x2c726d){return _0x2c726d instanceof _0x53137a?_0x2c726d:new _0x53137a(function(_0x2c972a){_0x2c972a(_0x2c726d);});}return new(_0x53137a||(_0x53137a=Promise))(function(_0x193495,_0x4fcdb9){function _0x167eff(_0x465229){try{_0x10dfeb(_0x594e93['next'](_0x465229));}catch(_0x51560a){_0x4fcdb9(_0x51560a);}}function _0x53caa6(_0x32f569){try{_0x10dfeb(_0x594e93['throw'](_0x32f569));}catch(_0x2186c8){_0x4fcdb9(_0x2186c8);}}function _0x10dfeb(_0x5d734a){_0x5d734a['done']?_0x193495(_0x5d734a['value']):_0x581043(_0x5d734a['value'])['then'](_0x167eff,_0x53caa6);}_0x10dfeb((_0x594e93=_0x594e93['apply'](_0x1fe604,_0xd30969||[]))['next']());});};class SecurityService{constructor(_0x83d81e){this['baseUri']=_0x83d81e,this['tokenManager']=new TokenManager(this);}['refresh'](_0x2c3694){return __awaiter(this,arguments,void 0,function*(_0x178481,_0x29e69a={}){var _0x56407f;let _0x4ea5b1=(_0x56407f=_0x29e69a['baseUri'])!==null&&_0x56407f!==void 0?_0x56407f:this['baseUri'];!_0x4ea5b1['endsWith']('/')&&(_0x4ea5b1=_0x4ea5b1+'/');_0x4ea5b1=_0x4ea5b1+'Security/Refresh';try{const _0x3774dd=yield Fetch['post'](_0x4ea5b1,_0x178481,null);if(_0x3774dd['status']>0xc7&&_0x3774dd['status']<0x12c){const _0x47c691=yield _0x3774dd['json']();return new SuccessfulRefreshResponse(_0x47c691);}const _0x274ee3=yield _0x3774dd['json']();return new FailedRefreshResponse(_0x274ee3);}catch(_0x8f60e8){if(_0x8f60e8 instanceof Error)return new FailedRefreshResponse({'detail':_0x8f60e8['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x8f60e8;}});}}
14
+
15
+ var _a;class AdminClient{}_a=AdminClient,AdminClient['baseUri']='https://admin.searchability.dev/',AdminClient['Accounts']=new AccountService(_a['baseUri']),AdminClient['Lists']=new ListService(_a['baseUri']),AdminClient['Security']=new SecurityService(_a['baseUri']),AdminClient['ApiKeys']=new ApiKeyService(_a['baseUri']);
14
16
 
15
17
  export { AdminClient };
package/dist/types.d.ts CHANGED
@@ -4,6 +4,12 @@ declare class AccountService {
4
4
  get(accessToken: string, accountName: string, options?: Partial<Options>): Promise<Response<Account, Problem>>;
5
5
  }
6
6
 
7
+ declare class ApiKeyService {
8
+ readonly baseUri: string;
9
+ constructor(baseUri: string);
10
+ create(access_token: string, accountName: string, api_key_name: string, options?: Partial<Options>): Promise<Response<ApiKey, Problem>>;
11
+ }
12
+
7
13
  declare class ListService {
8
14
  readonly baseUri: string;
9
15
  constructor(baseUri: string);
@@ -29,6 +35,7 @@ declare class AdminClient {
29
35
  static Accounts: AccountService;
30
36
  static Lists: ListService;
31
37
  static Security: SecurityService;
38
+ static ApiKeys: ApiKeyService;
32
39
  }
33
40
 
34
41
  type Options = {
@@ -43,9 +50,18 @@ declare abstract class Response<S, F> {
43
50
  type List = {
44
51
  name: string;
45
52
  created: number;
46
- result_count: number;
47
53
  version: number;
48
54
  };
55
+ type ListIdentity = {
56
+ name: string;
57
+ created: number;
58
+ account_name: string;
59
+ image_path: string;
60
+ };
61
+ type ApiKey = {
62
+ name: string;
63
+ created: number;
64
+ };
49
65
  type Error = {
50
66
  [key: string]: string[];
51
67
  };
@@ -59,8 +75,10 @@ type Problem = {
59
75
  type Account = {
60
76
  name: string;
61
77
  owner: string;
62
- created_utc: number;
63
- lists: List[];
78
+ created: number;
79
+ image_path: string;
80
+ lists: ListIdentity[];
81
+ api_keys: ApiKey[];
64
82
  };
65
83
  type Tokens = {
66
84
  access_token: string;
@@ -92,5 +110,17 @@ declare class FailedRefreshResponse extends Response<Tokens, Problem> {
92
110
  toSuccess(): Tokens;
93
111
  toProblem(): Problem;
94
112
  }
113
+ declare class SuccessfulApiKeyResponse extends Response<ApiKey, Problem> {
114
+ readonly apiKey: ApiKey;
115
+ constructor(apiKey: ApiKey);
116
+ toSuccess(): ApiKey;
117
+ toProblem(): Problem;
118
+ }
119
+ declare class FailedApiKeyResponse extends Response<ApiKey, Problem> {
120
+ readonly problem: Problem;
121
+ constructor(problem: Problem);
122
+ toSuccess(): ApiKey;
123
+ toProblem(): Problem;
124
+ }
95
125
 
96
- export { type Account, AdminClient, type Error, FailedAccountResponse, FailedRefreshResponse, type List, type Options, type Problem, Response, SuccessfulAccountResponse, SuccessfulRefreshResponse, type Tokens };
126
+ export { type Account, AdminClient, type ApiKey, type Error, FailedAccountResponse, FailedApiKeyResponse, FailedRefreshResponse, type List, type ListIdentity, type Options, type Problem, Response, SuccessfulAccountResponse, SuccessfulApiKeyResponse, SuccessfulRefreshResponse, type Tokens };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@searchability/admin-client",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
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(_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 };