@searchability/admin-client 0.0.18 → 0.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,15 @@
1
+ undefined&&undefined['__awaiter']||function(_0x1e22eb,_0xeced25,_0x42d7ed,_0x5df34c){function _0x10370c(_0x1f96dc){return _0x1f96dc instanceof _0x42d7ed?_0x1f96dc:new _0x42d7ed(function(_0x4af985){_0x4af985(_0x1f96dc);});}return new(_0x42d7ed||(_0x42d7ed=Promise))(function(_0x5f1ee5,_0x3a6b8f){function _0x9a541e(_0xe837ad){try{_0x5daacf(_0x5df34c['next'](_0xe837ad));}catch(_0x23af2e){_0x3a6b8f(_0x23af2e);}}function _0x5120eb(_0x332b01){try{_0x5daacf(_0x5df34c['throw'](_0x332b01));}catch(_0x1fac20){_0x3a6b8f(_0x1fac20);}}function _0x5daacf(_0x10b532){_0x10b532['done']?_0x5f1ee5(_0x10b532['value']):_0x10370c(_0x10b532['value'])['then'](_0x9a541e,_0x5120eb);}_0x5daacf((_0x5df34c=_0x5df34c['apply'](_0x1e22eb,_0xeced25||[]))['next']());});};
2
+
3
+ class Response{constructor(_0x1ee854){this['isSuccess']=_0x1ee854;}}class SuccessfulAccountResponse extends Response{constructor(_0x36834a){super(!![]),this['account']=_0x36834a;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x289130){super(![]),this['problem']=_0x289130;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0xe7a6f0){super(!![]),this['tokens']=_0xe7a6f0;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x76633){super(![]),this['problem']=_0x76633;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x1a7ff9){super(!![]),this['apiKeys']=_0x1a7ff9;}['toSuccess'](){return this['apiKeys'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x277ac3){super(![]),this['problem']=_0x277ac3;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
4
+
5
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x4ad6d6,_0x2fa10e,_0x4db4bc,_0x44d2b9){function _0x5a53ba(_0x1b182d){return _0x1b182d instanceof _0x4db4bc?_0x1b182d:new _0x4db4bc(function(_0x5aa025){_0x5aa025(_0x1b182d);});}return new(_0x4db4bc||(_0x4db4bc=Promise))(function(_0x1919d5,_0x57d3ef){function _0x4e1a7b(_0x59d79b){try{_0x348477(_0x44d2b9['next'](_0x59d79b));}catch(_0x543cff){_0x57d3ef(_0x543cff);}}function _0xc6ae39(_0x1225c8){try{_0x348477(_0x44d2b9['throw'](_0x1225c8));}catch(_0x18c148){_0x57d3ef(_0x18c148);}}function _0x348477(_0x531a2a){_0x531a2a['done']?_0x1919d5(_0x531a2a['value']):_0x5a53ba(_0x531a2a['value'])['then'](_0x4e1a7b,_0xc6ae39);}_0x348477((_0x44d2b9=_0x44d2b9['apply'](_0x4ad6d6,_0x2fa10e||[]))['next']());});};class AccountService{constructor(_0x9d8414){this['fetch']=_0x9d8414;}['get'](_0x1bb848,_0x3d0ef1){return __awaiter$4(this,void 0,void 0,function*(){const _0x5a39ae='Account/'+_0x1bb848+'/',_0x2977c3=yield this['fetch']['get'](_0x5a39ae,_0x3d0ef1);try{if(_0x2977c3['status']>0xc7&&_0x2977c3['status']<0x12c){const _0x167aa4=yield _0x2977c3['json']();return new SuccessfulAccountResponse(_0x167aa4);}const _0xb2a59f=yield _0x2977c3['json']();return new FailedAccountResponse(_0xb2a59f);}catch(_0x3fc39b){if(_0x3fc39b instanceof Error)return new FailedAccountResponse({'detail':_0x3fc39b['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x3fc39b;}});}}
6
+
7
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x19924e,_0x276b8b,_0x37c97d,_0x42e76b){function _0x174cf2(_0x40f005){return _0x40f005 instanceof _0x37c97d?_0x40f005:new _0x37c97d(function(_0x33560b){_0x33560b(_0x40f005);});}return new(_0x37c97d||(_0x37c97d=Promise))(function(_0x432fc0,_0x544725){function _0x50da0e(_0x5ebbf0){try{_0x1fd4de(_0x42e76b['next'](_0x5ebbf0));}catch(_0x20ea43){_0x544725(_0x20ea43);}}function _0xfb184d(_0x49de2d){try{_0x1fd4de(_0x42e76b['throw'](_0x49de2d));}catch(_0x3c2394){_0x544725(_0x3c2394);}}function _0x1fd4de(_0x11dd49){_0x11dd49['done']?_0x432fc0(_0x11dd49['value']):_0x174cf2(_0x11dd49['value'])['then'](_0x50da0e,_0xfb184d);}_0x1fd4de((_0x42e76b=_0x42e76b['apply'](_0x19924e,_0x276b8b||[]))['next']());});};class ApiKeyService{constructor(_0x58f92a){this['fetch']=_0x58f92a;}['create'](_0x772f3,_0xd2be52,_0xa583fb){return __awaiter$3(this,void 0,void 0,function*(){const _0x6fc91f='ApiKey/Create',_0xca4585={'account_name':_0x772f3,'name':_0xd2be52};try{const _0x1e859f=yield this['fetch']['post'](_0x6fc91f,_0xa583fb,_0xca4585);if(_0x1e859f['status']>0xc7&&_0x1e859f['status']<0x12c){const _0x79a245=yield _0x1e859f['json']();return new SuccessfulApiKeyResponse(_0x79a245);}const _0x15f500=yield _0x1e859f['json']();return new FailedApiKeyResponse(_0x15f500);}catch(_0x1a6b6d){if(_0x1a6b6d instanceof Error)return new FailedApiKeyResponse({'detail':_0x1a6b6d['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x1a6b6d;}});}}
8
+
9
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x5314d2,_0x55e2a6,_0xaa086f,_0x23c27e){function _0x1ffbcd(_0x5d2339){return _0x5d2339 instanceof _0xaa086f?_0x5d2339:new _0xaa086f(function(_0x3eddc9){_0x3eddc9(_0x5d2339);});}return new(_0xaa086f||(_0xaa086f=Promise))(function(_0x1bec73,_0x29ba20){function _0x29ab73(_0x8a3eab){try{_0x22e7a3(_0x23c27e['next'](_0x8a3eab));}catch(_0x2ae0f1){_0x29ba20(_0x2ae0f1);}}function _0x44febc(_0x201965){try{_0x22e7a3(_0x23c27e['throw'](_0x201965));}catch(_0x793099){_0x29ba20(_0x793099);}}function _0x22e7a3(_0x55524a){_0x55524a['done']?_0x1bec73(_0x55524a['value']):_0x1ffbcd(_0x55524a['value'])['then'](_0x29ab73,_0x44febc);}_0x22e7a3((_0x23c27e=_0x23c27e['apply'](_0x5314d2,_0x55e2a6||[]))['next']());});};class ListService{constructor(_0x75d93b){this['fetch']=_0x75d93b;}['add'](_0x445e86,_0x2afc9d,_0x43e7c0){return __awaiter$2(this,void 0,void 0,function*(){const _0x1969da='List',_0x45e15b={'account_name':_0x445e86,'list_name':_0x2afc9d};try{const _0x42ec23=yield this['fetch']['post'](_0x1969da,_0x43e7c0,_0x45e15b);if(_0x42ec23['status']>0xc7&&_0x42ec23['status']<0x12c){const _0x4f0baf=yield _0x42ec23['json']();return new SuccessfulAccountResponse(_0x4f0baf);}const _0x3d43d5=yield _0x42ec23['json']();return new FailedAccountResponse(_0x3d43d5);}catch(_0x464b0e){if(_0x464b0e instanceof Error)return new FailedAccountResponse({'detail':_0x464b0e['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x464b0e;}});}['remove'](_0x23e7cd,_0x47ffbd,_0x1088e1){return __awaiter$2(this,void 0,void 0,function*(){const _0x5e3404='List/'+_0x23e7cd+'/'+_0x47ffbd,_0x4c70d5=yield this['fetch']['delete'](_0x5e3404,_0x1088e1);try{if(_0x4c70d5['status']>0xc7&&_0x4c70d5['status']<0x12c){const _0x10a01a=yield _0x4c70d5['json']();return new SuccessfulAccountResponse(_0x10a01a);}const _0x2f4f80=yield _0x4c70d5['json']();return new FailedAccountResponse(_0x2f4f80);}catch(_0x11603b){if(_0x11603b instanceof Error)return new FailedAccountResponse({'detail':_0x11603b['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x11603b;}});}}
10
+
11
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0xcf0452,_0x255c0a,_0x5467ff,_0x1d0cce){function _0x3d3e5c(_0x4bedcf){return _0x4bedcf instanceof _0x5467ff?_0x4bedcf:new _0x5467ff(function(_0x10d891){_0x10d891(_0x4bedcf);});}return new(_0x5467ff||(_0x5467ff=Promise))(function(_0x4b8679,_0x548eb9){function _0x4f86b1(_0x41bfc6){try{_0xde5367(_0x1d0cce['next'](_0x41bfc6));}catch(_0x42c8ab){_0x548eb9(_0x42c8ab);}}function _0x6feb0a(_0x1fb389){try{_0xde5367(_0x1d0cce['throw'](_0x1fb389));}catch(_0x24881e){_0x548eb9(_0x24881e);}}function _0xde5367(_0x3528c3){_0x3528c3['done']?_0x4b8679(_0x3528c3['value']):_0x3d3e5c(_0x3528c3['value'])['then'](_0x4f86b1,_0x6feb0a);}_0xde5367((_0x1d0cce=_0x1d0cce['apply'](_0xcf0452,_0x255c0a||[]))['next']());});};class Fetch{constructor(_0x168c02){this['baseUri']=_0x168c02,this['getUrl']=_0x1df9fc=>{return _0x1df9fc['startsWith']('/')&&(_0x1df9fc=_0x1df9fc['replace']('/','')),''+this['baseUri']+_0x1df9fc;},!_0x168c02['endsWith']('/')&&(_0x168c02=_0x168c02+'/');}['get'](_0x47c117,_0x6ad76){return __awaiter$1(this,void 0,void 0,function*(){const _0x1bc682=this['getUrl'](_0x47c117);return yield fetch(_0x1bc682,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x6ad76}});});}['post'](_0x11346d,_0x228281,_0x4d8f30){return __awaiter$1(this,void 0,void 0,function*(){const _0x138dc5=this['getUrl'](_0x11346d);return yield fetch(_0x138dc5,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x228281},'body':_0x4d8f30?JSON['stringify'](_0x4d8f30):null});});}['put'](_0x1af94e,_0x20a18b,_0x409770){return __awaiter$1(this,void 0,void 0,function*(){const _0x5a85b4=this['getUrl'](_0x1af94e);return yield fetch(_0x5a85b4,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x20a18b},'body':_0x409770?JSON['stringify'](_0x409770):null});});}['delete'](_0x30f8d4,_0x2f63c3){return __awaiter$1(this,void 0,void 0,function*(){const _0x3d943b=this['getUrl'](_0x30f8d4);return yield fetch(_0x3d943b,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2f63c3}});});}}
12
+
13
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x4f4f17,_0x5a3e3d,_0x3afe3f,_0x2bf4c4){function _0x268e0e(_0x49efe3){return _0x49efe3 instanceof _0x3afe3f?_0x49efe3:new _0x3afe3f(function(_0x3e1ff7){_0x3e1ff7(_0x49efe3);});}return new(_0x3afe3f||(_0x3afe3f=Promise))(function(_0x4f0430,_0x550417){function _0x51312b(_0x4d5dd2){try{_0xfbcc64(_0x2bf4c4['next'](_0x4d5dd2));}catch(_0x1355bb){_0x550417(_0x1355bb);}}function _0x570c7d(_0x4a0083){try{_0xfbcc64(_0x2bf4c4['throw'](_0x4a0083));}catch(_0x327c1d){_0x550417(_0x327c1d);}}function _0xfbcc64(_0x4ee5f4){_0x4ee5f4['done']?_0x4f0430(_0x4ee5f4['value']):_0x268e0e(_0x4ee5f4['value'])['then'](_0x51312b,_0x570c7d);}_0xfbcc64((_0x2bf4c4=_0x2bf4c4['apply'](_0x4f4f17,_0x5a3e3d||[]))['next']());});};class AdminClient{constructor(_0x377ad8='https://admin.searchability.dev/'){var _0x175705=new Fetch(_0x377ad8);this['Accounts']=new AccountService(_0x175705),this['Lists']=new ListService(_0x175705),this['ApiKeys']=new ApiKeyService(_0x175705);}}class AuthClient{constructor(_0x18e197='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x18e197);}['login'](_0x236d5b){return __awaiter(this,void 0,void 0,function*(){var _0x513980='login/'+_0x236d5b;try{const _0x2f7814=yield yield fetch(_0x513980);if(_0x2f7814['status']>0xc7&&_0x2f7814['status']<0x12c){const _0x4d9660=yield _0x2f7814['json']();return new SuccessfulAuthResponse(_0x4d9660);}const _0x4f4578=yield _0x2f7814['json']();return new FailedAuthResponse(_0x4f4578);}catch(_0x27f053){if(_0x27f053 instanceof Error)return new FailedAuthResponse({'detail':_0x27f053['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x27f053;}});}['refresh'](_0x34e89d){return __awaiter(this,void 0,void 0,function*(){var _0x5dd95d='refresh';try{const _0x2fd895=yield this['fetch']['post'](_0x5dd95d,_0x34e89d,null);if(_0x2fd895['status']>0xc7&&_0x2fd895['status']<0x12c){const _0x48c893=yield _0x2fd895['json']();return new SuccessfulAuthResponse(_0x48c893);}const _0x535376=yield _0x2fd895['json']();return new FailedAuthResponse(_0x535376);}catch(_0x5a6216){if(_0x5a6216 instanceof Error)return new FailedAuthResponse({'detail':_0x5a6216['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x5a6216;}});}}
14
+
15
+ export { AdminClient, AuthClient };
@@ -1,16 +1,18 @@
1
1
  'use strict';
2
2
 
3
- class Response{constructor(_0x10b4fb){this['isSuccess']=_0x10b4fb;}}class SuccessfulAccountResponse extends Response{constructor(_0x2f9118){super(!![]),this['account']=_0x2f9118;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x216fde){super(![]),this['problem']=_0x216fde;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x4ad05f){super(!![]),this['tokens']=_0x4ad05f;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x396e8c){super(![]),this['problem']=_0x396e8c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x392c90){super(!![]),this['apiKeys']=_0x392c90;}['toSuccess'](){return this['apiKeys'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0xf29cbe){super(![]),this['problem']=_0xf29cbe;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
3
+ undefined&&undefined['__awaiter']||function(_0x315a9e,_0xe24ed2,_0xbacc9,_0x214989){function _0x59cb70(_0x3e5a52){return _0x3e5a52 instanceof _0xbacc9?_0x3e5a52:new _0xbacc9(function(_0x375fce){_0x375fce(_0x3e5a52);});}return new(_0xbacc9||(_0xbacc9=Promise))(function(_0x135fa0,_0x553a32){function _0x5db6ed(_0x30f8d9){try{_0x25b5aa(_0x214989['next'](_0x30f8d9));}catch(_0x52ab1f){_0x553a32(_0x52ab1f);}}function _0x18f595(_0x58c48f){try{_0x25b5aa(_0x214989['throw'](_0x58c48f));}catch(_0x297239){_0x553a32(_0x297239);}}function _0x25b5aa(_0x119b78){_0x119b78['done']?_0x135fa0(_0x119b78['value']):_0x59cb70(_0x119b78['value'])['then'](_0x5db6ed,_0x18f595);}_0x25b5aa((_0x214989=_0x214989['apply'](_0x315a9e,_0xe24ed2||[]))['next']());});};
4
4
 
5
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x6955be,_0x46dc77,_0xbaabe6,_0x3c593b){function _0x1fc67d(_0x266876){return _0x266876 instanceof _0xbaabe6?_0x266876:new _0xbaabe6(function(_0x5860a6){_0x5860a6(_0x266876);});}return new(_0xbaabe6||(_0xbaabe6=Promise))(function(_0x5c616e,_0x172eb8){function _0x5c90c5(_0x222a53){try{_0x367dd5(_0x3c593b['next'](_0x222a53));}catch(_0x2d1ce6){_0x172eb8(_0x2d1ce6);}}function _0x1be55b(_0xad9759){try{_0x367dd5(_0x3c593b['throw'](_0xad9759));}catch(_0x2f0ebe){_0x172eb8(_0x2f0ebe);}}function _0x367dd5(_0x59ca8d){_0x59ca8d['done']?_0x5c616e(_0x59ca8d['value']):_0x1fc67d(_0x59ca8d['value'])['then'](_0x5c90c5,_0x1be55b);}_0x367dd5((_0x3c593b=_0x3c593b['apply'](_0x6955be,_0x46dc77||[]))['next']());});};class AccountService{constructor(_0x41578f){this['fetch']=_0x41578f;}['get'](_0x4899d2,_0x5c11b4){return __awaiter$4(this,void 0,void 0,function*(){const _0x19ce1c='Account/'+_0x4899d2+'/',_0x4ac89c=yield this['fetch']['get'](_0x19ce1c,_0x5c11b4);try{if(_0x4ac89c['status']>0xc7&&_0x4ac89c['status']<0x12c){const _0xf3d307=yield _0x4ac89c['json']();return new SuccessfulAccountResponse(_0xf3d307);}const _0x1e4cf0=yield _0x4ac89c['json']();return new FailedAccountResponse(_0x1e4cf0);}catch(_0x3da305){if(_0x3da305 instanceof Error)return new FailedAccountResponse({'detail':_0x3da305['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x3da305;}});}}
5
+ class Response{constructor(_0x4755bf){this['isSuccess']=_0x4755bf;}}class SuccessfulAccountResponse extends Response{constructor(_0xa205db){super(!![]),this['account']=_0xa205db;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0xcac449){super(![]),this['problem']=_0xcac449;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x1b3d02){super(!![]),this['tokens']=_0x1b3d02;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x1e2db2){super(![]),this['problem']=_0x1e2db2;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x5144f4){super(!![]),this['apiKeys']=_0x5144f4;}['toSuccess'](){return this['apiKeys'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x8dd2be){super(![]),this['problem']=_0x8dd2be;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
6
6
 
7
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x278523,_0x1cc72d,_0x5889ea,_0x23f8ca){function _0x3e5dc9(_0xb7db32){return _0xb7db32 instanceof _0x5889ea?_0xb7db32:new _0x5889ea(function(_0x575c15){_0x575c15(_0xb7db32);});}return new(_0x5889ea||(_0x5889ea=Promise))(function(_0x528f65,_0x2098d0){function _0x5118c7(_0x3715be){try{_0x8685a2(_0x23f8ca['next'](_0x3715be));}catch(_0x115221){_0x2098d0(_0x115221);}}function _0x14c396(_0x57b73a){try{_0x8685a2(_0x23f8ca['throw'](_0x57b73a));}catch(_0x5715de){_0x2098d0(_0x5715de);}}function _0x8685a2(_0x1ccd95){_0x1ccd95['done']?_0x528f65(_0x1ccd95['value']):_0x3e5dc9(_0x1ccd95['value'])['then'](_0x5118c7,_0x14c396);}_0x8685a2((_0x23f8ca=_0x23f8ca['apply'](_0x278523,_0x1cc72d||[]))['next']());});};class ApiKeyService{constructor(_0x28a205){this['fetch']=_0x28a205;}['create'](_0x55e587,_0x4e19f4,_0x283c91){return __awaiter$3(this,void 0,void 0,function*(){const _0x10a547='ApiKey/Create',_0x2c7f44={'account_name':_0x55e587,'name':_0x4e19f4};try{const _0x327485=yield this['fetch']['post'](_0x10a547,_0x283c91,_0x2c7f44);if(_0x327485['status']>0xc7&&_0x327485['status']<0x12c){const _0x12a077=yield _0x327485['json']();return new SuccessfulApiKeyResponse(_0x12a077);}const _0x573444=yield _0x327485['json']();return new FailedApiKeyResponse(_0x573444);}catch(_0x55e8da){if(_0x55e8da instanceof Error)return new FailedApiKeyResponse({'detail':_0x55e8da['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x55e8da;}});}}
7
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x531c8f,_0x3695b7,_0x5b3c48,_0x3e3b93){function _0x38a47d(_0x34e610){return _0x34e610 instanceof _0x5b3c48?_0x34e610:new _0x5b3c48(function(_0x2306e2){_0x2306e2(_0x34e610);});}return new(_0x5b3c48||(_0x5b3c48=Promise))(function(_0x4950c1,_0x616cc8){function _0x25a27d(_0x3a22de){try{_0x227918(_0x3e3b93['next'](_0x3a22de));}catch(_0x20f1f7){_0x616cc8(_0x20f1f7);}}function _0x47b968(_0x2de341){try{_0x227918(_0x3e3b93['throw'](_0x2de341));}catch(_0x114eae){_0x616cc8(_0x114eae);}}function _0x227918(_0x187c42){_0x187c42['done']?_0x4950c1(_0x187c42['value']):_0x38a47d(_0x187c42['value'])['then'](_0x25a27d,_0x47b968);}_0x227918((_0x3e3b93=_0x3e3b93['apply'](_0x531c8f,_0x3695b7||[]))['next']());});};class AccountService{constructor(_0x280191){this['fetch']=_0x280191;}['get'](_0x5005ca,_0x264537){return __awaiter$4(this,void 0,void 0,function*(){const _0x1b4a8c='Account/'+_0x5005ca+'/',_0x15401f=yield this['fetch']['get'](_0x1b4a8c,_0x264537);try{if(_0x15401f['status']>0xc7&&_0x15401f['status']<0x12c){const _0x539838=yield _0x15401f['json']();return new SuccessfulAccountResponse(_0x539838);}const _0x27c998=yield _0x15401f['json']();return new FailedAccountResponse(_0x27c998);}catch(_0x331ea8){if(_0x331ea8 instanceof Error)return new FailedAccountResponse({'detail':_0x331ea8['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x331ea8;}});}}
8
8
 
9
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x395def,_0x322f12,_0xa7b00c,_0x155404){function _0x570eab(_0x559e38){return _0x559e38 instanceof _0xa7b00c?_0x559e38:new _0xa7b00c(function(_0x385707){_0x385707(_0x559e38);});}return new(_0xa7b00c||(_0xa7b00c=Promise))(function(_0x20577e,_0x45fbc9){function _0x2be27f(_0x1f2fa3){try{_0x8e85c6(_0x155404['next'](_0x1f2fa3));}catch(_0x2d218d){_0x45fbc9(_0x2d218d);}}function _0x722837(_0x5b5879){try{_0x8e85c6(_0x155404['throw'](_0x5b5879));}catch(_0x499184){_0x45fbc9(_0x499184);}}function _0x8e85c6(_0x47b4a7){_0x47b4a7['done']?_0x20577e(_0x47b4a7['value']):_0x570eab(_0x47b4a7['value'])['then'](_0x2be27f,_0x722837);}_0x8e85c6((_0x155404=_0x155404['apply'](_0x395def,_0x322f12||[]))['next']());});};class ListService{constructor(_0x28493f){this['fetch']=_0x28493f;}['add'](_0x1cebec,_0x417cdc,_0x432bcd){return __awaiter$2(this,void 0,void 0,function*(){const _0x22588c='List',_0x57ec71={'account_name':_0x1cebec,'list_name':_0x417cdc};try{const _0x42a97d=yield this['fetch']['post'](_0x22588c,_0x432bcd,_0x57ec71);if(_0x42a97d['status']>0xc7&&_0x42a97d['status']<0x12c){const _0x32baae=yield _0x42a97d['json']();return new SuccessfulAccountResponse(_0x32baae);}const _0x335941=yield _0x42a97d['json']();return new FailedAccountResponse(_0x335941);}catch(_0x1f9570){if(_0x1f9570 instanceof Error)return new FailedAccountResponse({'detail':_0x1f9570['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x1f9570;}});}['remove'](_0x21a727,_0x5caaae,_0x2c90c7){return __awaiter$2(this,void 0,void 0,function*(){const _0x129ec8='List/'+_0x21a727+'/'+_0x5caaae,_0x5cffb=yield this['fetch']['delete'](_0x129ec8,_0x2c90c7);try{if(_0x5cffb['status']>0xc7&&_0x5cffb['status']<0x12c){const _0x48f39b=yield _0x5cffb['json']();return new SuccessfulAccountResponse(_0x48f39b);}const _0x3db956=yield _0x5cffb['json']();return new FailedAccountResponse(_0x3db956);}catch(_0x3ba858){if(_0x3ba858 instanceof Error)return new FailedAccountResponse({'detail':_0x3ba858['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x3ba858;}});}}
9
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x6ff6e6,_0x2eca36,_0x4d7c3c,_0x4c0fff){function _0x12f909(_0x4e2667){return _0x4e2667 instanceof _0x4d7c3c?_0x4e2667:new _0x4d7c3c(function(_0x54af6a){_0x54af6a(_0x4e2667);});}return new(_0x4d7c3c||(_0x4d7c3c=Promise))(function(_0x44d986,_0x589ed3){function _0xd6088e(_0x1eb9c3){try{_0x47c73b(_0x4c0fff['next'](_0x1eb9c3));}catch(_0x2ac3e9){_0x589ed3(_0x2ac3e9);}}function _0x168b81(_0x416fad){try{_0x47c73b(_0x4c0fff['throw'](_0x416fad));}catch(_0x22ae52){_0x589ed3(_0x22ae52);}}function _0x47c73b(_0x572af1){_0x572af1['done']?_0x44d986(_0x572af1['value']):_0x12f909(_0x572af1['value'])['then'](_0xd6088e,_0x168b81);}_0x47c73b((_0x4c0fff=_0x4c0fff['apply'](_0x6ff6e6,_0x2eca36||[]))['next']());});};class ApiKeyService{constructor(_0xd55e7e){this['fetch']=_0xd55e7e;}['create'](_0x24f7d6,_0x5dcbeb,_0x426c89){return __awaiter$3(this,void 0,void 0,function*(){const _0x701fa4='ApiKey/Create',_0x317325={'account_name':_0x24f7d6,'name':_0x5dcbeb};try{const _0x30ac88=yield this['fetch']['post'](_0x701fa4,_0x426c89,_0x317325);if(_0x30ac88['status']>0xc7&&_0x30ac88['status']<0x12c){const _0x3cafa7=yield _0x30ac88['json']();return new SuccessfulApiKeyResponse(_0x3cafa7);}const _0x9f540b=yield _0x30ac88['json']();return new FailedApiKeyResponse(_0x9f540b);}catch(_0x13fbe5){if(_0x13fbe5 instanceof Error)return new FailedApiKeyResponse({'detail':_0x13fbe5['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x13fbe5;}});}}
10
10
 
11
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x30aa4a,_0x5d4c4d,_0x3000a3,_0x203364){function _0x53107f(_0x47fab1){return _0x47fab1 instanceof _0x3000a3?_0x47fab1:new _0x3000a3(function(_0x4c7d39){_0x4c7d39(_0x47fab1);});}return new(_0x3000a3||(_0x3000a3=Promise))(function(_0x3522f1,_0x4d5152){function _0x78f48e(_0x129b11){try{_0x2e78c7(_0x203364['next'](_0x129b11));}catch(_0x473ffd){_0x4d5152(_0x473ffd);}}function _0x23eef4(_0x27777c){try{_0x2e78c7(_0x203364['throw'](_0x27777c));}catch(_0xb8cba7){_0x4d5152(_0xb8cba7);}}function _0x2e78c7(_0x44d60b){_0x44d60b['done']?_0x3522f1(_0x44d60b['value']):_0x53107f(_0x44d60b['value'])['then'](_0x78f48e,_0x23eef4);}_0x2e78c7((_0x203364=_0x203364['apply'](_0x30aa4a,_0x5d4c4d||[]))['next']());});};class Fetch{constructor(_0x2bd28b){this['baseUri']=_0x2bd28b,this['getUrl']=_0x211916=>{return _0x211916['startsWith']('/')&&(_0x211916=_0x211916['replace']('/','')),''+this['baseUri']+_0x211916;},!_0x2bd28b['endsWith']('/')&&(_0x2bd28b=_0x2bd28b+'/');}['get'](_0x1fb400,_0x47936c){return __awaiter$1(this,void 0,void 0,function*(){const _0x2ead71=this['getUrl'](_0x1fb400);return yield fetch(_0x2ead71,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x47936c}});});}['post'](_0x3e94e7,_0x90dda6,_0x14b934){return __awaiter$1(this,void 0,void 0,function*(){const _0x5472bc=this['getUrl'](_0x3e94e7);return yield fetch(_0x5472bc,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x90dda6},'body':_0x14b934?JSON['stringify'](_0x14b934):null});});}['put'](_0x4d4e42,_0x2f8679,_0x571f38){return __awaiter$1(this,void 0,void 0,function*(){const _0x44de33=this['getUrl'](_0x4d4e42);return yield fetch(_0x44de33,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2f8679},'body':_0x571f38?JSON['stringify'](_0x571f38):null});});}['delete'](_0x19b830,_0x1ca631){return __awaiter$1(this,void 0,void 0,function*(){const _0x29cccd=this['getUrl'](_0x19b830);return yield fetch(_0x29cccd,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1ca631}});});}}
11
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x1e890b,_0x2c7cfd,_0x2dcac4,_0x290195){function _0x29f073(_0x4b66ef){return _0x4b66ef instanceof _0x2dcac4?_0x4b66ef:new _0x2dcac4(function(_0xe617db){_0xe617db(_0x4b66ef);});}return new(_0x2dcac4||(_0x2dcac4=Promise))(function(_0x154f8b,_0x2e1ccb){function _0x3d972a(_0x1e3e4a){try{_0x249bd6(_0x290195['next'](_0x1e3e4a));}catch(_0x5bbedd){_0x2e1ccb(_0x5bbedd);}}function _0x1c5c81(_0x15cbc1){try{_0x249bd6(_0x290195['throw'](_0x15cbc1));}catch(_0x32932f){_0x2e1ccb(_0x32932f);}}function _0x249bd6(_0x1ba01f){_0x1ba01f['done']?_0x154f8b(_0x1ba01f['value']):_0x29f073(_0x1ba01f['value'])['then'](_0x3d972a,_0x1c5c81);}_0x249bd6((_0x290195=_0x290195['apply'](_0x1e890b,_0x2c7cfd||[]))['next']());});};class ListService{constructor(_0x203d67){this['fetch']=_0x203d67;}['add'](_0x3fb2c9,_0x1c1de2,_0x3c3708){return __awaiter$2(this,void 0,void 0,function*(){const _0x198887='List',_0x2c3b62={'account_name':_0x3fb2c9,'list_name':_0x1c1de2};try{const _0x407c69=yield this['fetch']['post'](_0x198887,_0x3c3708,_0x2c3b62);if(_0x407c69['status']>0xc7&&_0x407c69['status']<0x12c){const _0x35f49d=yield _0x407c69['json']();return new SuccessfulAccountResponse(_0x35f49d);}const _0xd83fee=yield _0x407c69['json']();return new FailedAccountResponse(_0xd83fee);}catch(_0x9bd929){if(_0x9bd929 instanceof Error)return new FailedAccountResponse({'detail':_0x9bd929['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x9bd929;}});}['remove'](_0x3a3f47,_0x1b534c,_0x52e782){return __awaiter$2(this,void 0,void 0,function*(){const _0x5c7f44='List/'+_0x3a3f47+'/'+_0x1b534c,_0x3ad30b=yield this['fetch']['delete'](_0x5c7f44,_0x52e782);try{if(_0x3ad30b['status']>0xc7&&_0x3ad30b['status']<0x12c){const _0x1875db=yield _0x3ad30b['json']();return new SuccessfulAccountResponse(_0x1875db);}const _0xeb2dda=yield _0x3ad30b['json']();return new FailedAccountResponse(_0xeb2dda);}catch(_0x4b67f5){if(_0x4b67f5 instanceof Error)return new FailedAccountResponse({'detail':_0x4b67f5['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x4b67f5;}});}}
12
12
 
13
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x1250c0,_0xef2dec,_0x2d42a6,_0x3b8607){function _0x429f4e(_0x45d6cf){return _0x45d6cf instanceof _0x2d42a6?_0x45d6cf:new _0x2d42a6(function(_0x190797){_0x190797(_0x45d6cf);});}return new(_0x2d42a6||(_0x2d42a6=Promise))(function(_0x6ccac3,_0x227987){function _0x2cf405(_0x259053){try{_0x1df859(_0x3b8607['next'](_0x259053));}catch(_0x2bb31c){_0x227987(_0x2bb31c);}}function _0x1114de(_0x3373ac){try{_0x1df859(_0x3b8607['throw'](_0x3373ac));}catch(_0x1dff6c){_0x227987(_0x1dff6c);}}function _0x1df859(_0x3dd516){_0x3dd516['done']?_0x6ccac3(_0x3dd516['value']):_0x429f4e(_0x3dd516['value'])['then'](_0x2cf405,_0x1114de);}_0x1df859((_0x3b8607=_0x3b8607['apply'](_0x1250c0,_0xef2dec||[]))['next']());});};class AdminClient{constructor(_0xbaa485='https://admin.searchability.dev/'){var _0x3a5d20=new Fetch(_0xbaa485);this['Accounts']=new AccountService(_0x3a5d20),this['Lists']=new ListService(_0x3a5d20),this['ApiKeys']=new ApiKeyService(_0x3a5d20);}}class AuthClient{constructor(_0x3aa3b9='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x3aa3b9);}['login'](_0x3abcb1){return __awaiter(this,void 0,void 0,function*(){var _0x564a0c='login/'+_0x3abcb1;try{const _0x39a80=yield yield fetch(_0x564a0c);if(_0x39a80['status']>0xc7&&_0x39a80['status']<0x12c){const _0x5dd986=yield _0x39a80['json']();return new SuccessfulAuthResponse(_0x5dd986);}const _0x5e664c=yield _0x39a80['json']();return new FailedAuthResponse(_0x5e664c);}catch(_0x4394f5){if(_0x4394f5 instanceof Error)return new FailedAuthResponse({'detail':_0x4394f5['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x4394f5;}});}['refresh'](_0x497a61){return __awaiter(this,void 0,void 0,function*(){var _0x2e57d7='refresh';try{const _0x1bdbf5=yield this['fetch']['post'](_0x2e57d7,_0x497a61,null);if(_0x1bdbf5['status']>0xc7&&_0x1bdbf5['status']<0x12c){const _0x4787f0=yield _0x1bdbf5['json']();return new SuccessfulAuthResponse(_0x4787f0);}const _0x94621c=yield _0x1bdbf5['json']();return new FailedAuthResponse(_0x94621c);}catch(_0x3db8e0){if(_0x3db8e0 instanceof Error)return new FailedAuthResponse({'detail':_0x3db8e0['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x3db8e0;}});}}
13
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x28e58d,_0x1eaad1,_0x367e6e,_0xeb3f66){function _0x1c89f5(_0x42bb65){return _0x42bb65 instanceof _0x367e6e?_0x42bb65:new _0x367e6e(function(_0xf00699){_0xf00699(_0x42bb65);});}return new(_0x367e6e||(_0x367e6e=Promise))(function(_0x13dd29,_0x408c3e){function _0x58e38f(_0x126bb7){try{_0x2cabad(_0xeb3f66['next'](_0x126bb7));}catch(_0x5b4ada){_0x408c3e(_0x5b4ada);}}function _0x3ec983(_0x34a555){try{_0x2cabad(_0xeb3f66['throw'](_0x34a555));}catch(_0x12ccde){_0x408c3e(_0x12ccde);}}function _0x2cabad(_0x1ba10a){_0x1ba10a['done']?_0x13dd29(_0x1ba10a['value']):_0x1c89f5(_0x1ba10a['value'])['then'](_0x58e38f,_0x3ec983);}_0x2cabad((_0xeb3f66=_0xeb3f66['apply'](_0x28e58d,_0x1eaad1||[]))['next']());});};class Fetch{constructor(_0x44ef85){this['baseUri']=_0x44ef85,this['getUrl']=_0x29ed82=>{return _0x29ed82['startsWith']('/')&&(_0x29ed82=_0x29ed82['replace']('/','')),''+this['baseUri']+_0x29ed82;},!_0x44ef85['endsWith']('/')&&(_0x44ef85=_0x44ef85+'/');}['get'](_0x46745b,_0x2fea04){return __awaiter$1(this,void 0,void 0,function*(){const _0x453328=this['getUrl'](_0x46745b);return yield fetch(_0x453328,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2fea04}});});}['post'](_0x8b1dc9,_0x341676,_0x217a89){return __awaiter$1(this,void 0,void 0,function*(){const _0x49a70b=this['getUrl'](_0x8b1dc9);return yield fetch(_0x49a70b,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x341676},'body':_0x217a89?JSON['stringify'](_0x217a89):null});});}['put'](_0x5ecb04,_0x3b6229,_0x2ceaed){return __awaiter$1(this,void 0,void 0,function*(){const _0x34b741=this['getUrl'](_0x5ecb04);return yield fetch(_0x34b741,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3b6229},'body':_0x2ceaed?JSON['stringify'](_0x2ceaed):null});});}['delete'](_0x59b355,_0x2edcc6){return __awaiter$1(this,void 0,void 0,function*(){const _0x5f041f=this['getUrl'](_0x59b355);return yield fetch(_0x5f041f,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2edcc6}});});}}
14
+
15
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x56f4d9,_0x54688b,_0x1ba473,_0x15a163){function _0x52d117(_0x209870){return _0x209870 instanceof _0x1ba473?_0x209870:new _0x1ba473(function(_0x471b7c){_0x471b7c(_0x209870);});}return new(_0x1ba473||(_0x1ba473=Promise))(function(_0x429e14,_0x84fcef){function _0x2b0cc3(_0x30593b){try{_0xb793ea(_0x15a163['next'](_0x30593b));}catch(_0xdbee04){_0x84fcef(_0xdbee04);}}function _0x3127bc(_0xb19c86){try{_0xb793ea(_0x15a163['throw'](_0xb19c86));}catch(_0x369fb9){_0x84fcef(_0x369fb9);}}function _0xb793ea(_0xbe6b1f){_0xbe6b1f['done']?_0x429e14(_0xbe6b1f['value']):_0x52d117(_0xbe6b1f['value'])['then'](_0x2b0cc3,_0x3127bc);}_0xb793ea((_0x15a163=_0x15a163['apply'](_0x56f4d9,_0x54688b||[]))['next']());});};class AdminClient{constructor(_0x43503a='https://admin.searchability.dev/'){var _0x4916e5=new Fetch(_0x43503a);this['Accounts']=new AccountService(_0x4916e5),this['Lists']=new ListService(_0x4916e5),this['ApiKeys']=new ApiKeyService(_0x4916e5);}}class AuthClient{constructor(_0x1f84bd='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x1f84bd);}['login'](_0xe598d4){return __awaiter(this,void 0,void 0,function*(){var _0x5396d5='login/'+_0xe598d4;try{const _0x415759=yield yield fetch(_0x5396d5);if(_0x415759['status']>0xc7&&_0x415759['status']<0x12c){const _0x312088=yield _0x415759['json']();return new SuccessfulAuthResponse(_0x312088);}const _0x1f72ae=yield _0x415759['json']();return new FailedAuthResponse(_0x1f72ae);}catch(_0xe9beb1){if(_0xe9beb1 instanceof Error)return new FailedAuthResponse({'detail':_0xe9beb1['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0xe9beb1;}});}['refresh'](_0xd7e5de){return __awaiter(this,void 0,void 0,function*(){var _0x16201a='refresh';try{const _0x39edc0=yield this['fetch']['post'](_0x16201a,_0xd7e5de,null);if(_0x39edc0['status']>0xc7&&_0x39edc0['status']<0x12c){const _0x257ea6=yield _0x39edc0['json']();return new SuccessfulAuthResponse(_0x257ea6);}const _0xf1dbd1=yield _0x39edc0['json']();return new FailedAuthResponse(_0xf1dbd1);}catch(_0x2caf9c){if(_0x2caf9c instanceof Error)return new FailedAuthResponse({'detail':_0x2caf9c['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x2caf9c;}});}}
14
16
 
15
17
  exports.AdminClient = AdminClient;
16
18
  exports.AuthClient = AuthClient;
@@ -1,13 +1,15 @@
1
- class Response{constructor(_0x2bb31a){this['isSuccess']=_0x2bb31a;}}class SuccessfulAccountResponse extends Response{constructor(_0x3c1cad){super(!![]),this['account']=_0x3c1cad;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x338b7b){super(![]),this['problem']=_0x338b7b;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x55735f){super(!![]),this['tokens']=_0x55735f;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x4fc299){super(![]),this['problem']=_0x4fc299;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x1196a2){super(!![]),this['apiKeys']=_0x1196a2;}['toSuccess'](){return this['apiKeys'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x51a2ed){super(![]),this['problem']=_0x51a2ed;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
1
+ undefined&&undefined['__awaiter']||function(_0x2d2f47,_0x449cb9,_0x5ba582,_0x268e38){function _0xa49de0(_0x532107){return _0x532107 instanceof _0x5ba582?_0x532107:new _0x5ba582(function(_0xa229fe){_0xa229fe(_0x532107);});}return new(_0x5ba582||(_0x5ba582=Promise))(function(_0x3cef02,_0x34701e){function _0x2ef134(_0x93baf7){try{_0x31f1fa(_0x268e38['next'](_0x93baf7));}catch(_0x3b38f7){_0x34701e(_0x3b38f7);}}function _0x4c6580(_0x163e0a){try{_0x31f1fa(_0x268e38['throw'](_0x163e0a));}catch(_0x3ca3f1){_0x34701e(_0x3ca3f1);}}function _0x31f1fa(_0x5da5bf){_0x5da5bf['done']?_0x3cef02(_0x5da5bf['value']):_0xa49de0(_0x5da5bf['value'])['then'](_0x2ef134,_0x4c6580);}_0x31f1fa((_0x268e38=_0x268e38['apply'](_0x2d2f47,_0x449cb9||[]))['next']());});};
2
2
 
3
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x1efe11,_0x588157,_0x164773,_0x228247){function _0x45e598(_0x14ee82){return _0x14ee82 instanceof _0x164773?_0x14ee82:new _0x164773(function(_0x1b9fa3){_0x1b9fa3(_0x14ee82);});}return new(_0x164773||(_0x164773=Promise))(function(_0x397d1c,_0x56f20e){function _0x8c8a03(_0x46baf7){try{_0xc0d1cd(_0x228247['next'](_0x46baf7));}catch(_0x463047){_0x56f20e(_0x463047);}}function _0x78e5fa(_0x29b5a4){try{_0xc0d1cd(_0x228247['throw'](_0x29b5a4));}catch(_0x59d377){_0x56f20e(_0x59d377);}}function _0xc0d1cd(_0x52a47d){_0x52a47d['done']?_0x397d1c(_0x52a47d['value']):_0x45e598(_0x52a47d['value'])['then'](_0x8c8a03,_0x78e5fa);}_0xc0d1cd((_0x228247=_0x228247['apply'](_0x1efe11,_0x588157||[]))['next']());});};class AccountService{constructor(_0x3b47f6){this['fetch']=_0x3b47f6;}['get'](_0x2247d8,_0x37df25){return __awaiter$4(this,void 0,void 0,function*(){const _0x3eb7ff='Account/'+_0x2247d8+'/',_0x4d66be=yield this['fetch']['get'](_0x3eb7ff,_0x37df25);try{if(_0x4d66be['status']>0xc7&&_0x4d66be['status']<0x12c){const _0x5ea5e4=yield _0x4d66be['json']();return new SuccessfulAccountResponse(_0x5ea5e4);}const _0x8c8854=yield _0x4d66be['json']();return new FailedAccountResponse(_0x8c8854);}catch(_0x3448d6){if(_0x3448d6 instanceof Error)return new FailedAccountResponse({'detail':_0x3448d6['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x3448d6;}});}}
3
+ class Response{constructor(_0x1f1ed3){this['isSuccess']=_0x1f1ed3;}}class SuccessfulAccountResponse extends Response{constructor(_0x58b922){super(!![]),this['account']=_0x58b922;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x13dae7){super(![]),this['problem']=_0x13dae7;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x4418e3){super(!![]),this['tokens']=_0x4418e3;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x1b0c30){super(![]),this['problem']=_0x1b0c30;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x363a15){super(!![]),this['apiKeys']=_0x363a15;}['toSuccess'](){return this['apiKeys'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x2b90bd){super(![]),this['problem']=_0x2b90bd;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
4
4
 
5
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x16e741,_0x3fe147,_0x48dcb5,_0x51b576){function _0x4b1f03(_0x6293be){return _0x6293be instanceof _0x48dcb5?_0x6293be:new _0x48dcb5(function(_0xe7a046){_0xe7a046(_0x6293be);});}return new(_0x48dcb5||(_0x48dcb5=Promise))(function(_0x2f0dcc,_0x24d9ee){function _0x59ba50(_0x59f3e7){try{_0x458de7(_0x51b576['next'](_0x59f3e7));}catch(_0x1a2b18){_0x24d9ee(_0x1a2b18);}}function _0x3ecdd8(_0x2e4744){try{_0x458de7(_0x51b576['throw'](_0x2e4744));}catch(_0xaf1de0){_0x24d9ee(_0xaf1de0);}}function _0x458de7(_0x3f434f){_0x3f434f['done']?_0x2f0dcc(_0x3f434f['value']):_0x4b1f03(_0x3f434f['value'])['then'](_0x59ba50,_0x3ecdd8);}_0x458de7((_0x51b576=_0x51b576['apply'](_0x16e741,_0x3fe147||[]))['next']());});};class ApiKeyService{constructor(_0x1d9f4d){this['fetch']=_0x1d9f4d;}['create'](_0x563e88,_0xb5568d,_0x516045){return __awaiter$3(this,void 0,void 0,function*(){const _0x393c51='ApiKey/Create',_0x5a19ee={'account_name':_0x563e88,'name':_0xb5568d};try{const _0x4acf59=yield this['fetch']['post'](_0x393c51,_0x516045,_0x5a19ee);if(_0x4acf59['status']>0xc7&&_0x4acf59['status']<0x12c){const _0x48b3cc=yield _0x4acf59['json']();return new SuccessfulApiKeyResponse(_0x48b3cc);}const _0xaef4b1=yield _0x4acf59['json']();return new FailedApiKeyResponse(_0xaef4b1);}catch(_0x420382){if(_0x420382 instanceof Error)return new FailedApiKeyResponse({'detail':_0x420382['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x420382;}});}}
5
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0xba8c58,_0x329163,_0x38c56d,_0x30239f){function _0x3eb280(_0x27c0b7){return _0x27c0b7 instanceof _0x38c56d?_0x27c0b7:new _0x38c56d(function(_0x542748){_0x542748(_0x27c0b7);});}return new(_0x38c56d||(_0x38c56d=Promise))(function(_0x10b0b3,_0x214b11){function _0x104a75(_0x428082){try{_0x266beb(_0x30239f['next'](_0x428082));}catch(_0x3fe783){_0x214b11(_0x3fe783);}}function _0x55c979(_0x2f6179){try{_0x266beb(_0x30239f['throw'](_0x2f6179));}catch(_0x7f30d5){_0x214b11(_0x7f30d5);}}function _0x266beb(_0x160638){_0x160638['done']?_0x10b0b3(_0x160638['value']):_0x3eb280(_0x160638['value'])['then'](_0x104a75,_0x55c979);}_0x266beb((_0x30239f=_0x30239f['apply'](_0xba8c58,_0x329163||[]))['next']());});};class AccountService{constructor(_0x597b2d){this['fetch']=_0x597b2d;}['get'](_0x1cb780,_0x39a285){return __awaiter$4(this,void 0,void 0,function*(){const _0x1b00ab='Account/'+_0x1cb780+'/',_0x498558=yield this['fetch']['get'](_0x1b00ab,_0x39a285);try{if(_0x498558['status']>0xc7&&_0x498558['status']<0x12c){const _0x3416b6=yield _0x498558['json']();return new SuccessfulAccountResponse(_0x3416b6);}const _0x3ebacb=yield _0x498558['json']();return new FailedAccountResponse(_0x3ebacb);}catch(_0x150ee7){if(_0x150ee7 instanceof Error)return new FailedAccountResponse({'detail':_0x150ee7['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x150ee7;}});}}
6
6
 
7
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x2dedbc,_0x504b37,_0x20ffc4,_0x2255eb){function _0x594241(_0x342b6a){return _0x342b6a instanceof _0x20ffc4?_0x342b6a:new _0x20ffc4(function(_0x5a2bd4){_0x5a2bd4(_0x342b6a);});}return new(_0x20ffc4||(_0x20ffc4=Promise))(function(_0x12fd4b,_0xc3a875){function _0x1e8823(_0x2edb84){try{_0x1b8802(_0x2255eb['next'](_0x2edb84));}catch(_0xd7c45){_0xc3a875(_0xd7c45);}}function _0x3a129c(_0x115bf9){try{_0x1b8802(_0x2255eb['throw'](_0x115bf9));}catch(_0x27efa0){_0xc3a875(_0x27efa0);}}function _0x1b8802(_0x18ff2a){_0x18ff2a['done']?_0x12fd4b(_0x18ff2a['value']):_0x594241(_0x18ff2a['value'])['then'](_0x1e8823,_0x3a129c);}_0x1b8802((_0x2255eb=_0x2255eb['apply'](_0x2dedbc,_0x504b37||[]))['next']());});};class ListService{constructor(_0x1b9a74){this['fetch']=_0x1b9a74;}['add'](_0x1c9886,_0x2a61f4,_0x1d45be){return __awaiter$2(this,void 0,void 0,function*(){const _0x29f144='List',_0x1b4e7b={'account_name':_0x1c9886,'list_name':_0x2a61f4};try{const _0x53f488=yield this['fetch']['post'](_0x29f144,_0x1d45be,_0x1b4e7b);if(_0x53f488['status']>0xc7&&_0x53f488['status']<0x12c){const _0x57d44c=yield _0x53f488['json']();return new SuccessfulAccountResponse(_0x57d44c);}const _0x4bd56e=yield _0x53f488['json']();return new FailedAccountResponse(_0x4bd56e);}catch(_0xd67045){if(_0xd67045 instanceof Error)return new FailedAccountResponse({'detail':_0xd67045['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0xd67045;}});}['remove'](_0x3c37d0,_0xb1a3c1,_0x340d84){return __awaiter$2(this,void 0,void 0,function*(){const _0x3cd15a='List/'+_0x3c37d0+'/'+_0xb1a3c1,_0x4e072d=yield this['fetch']['delete'](_0x3cd15a,_0x340d84);try{if(_0x4e072d['status']>0xc7&&_0x4e072d['status']<0x12c){const _0x35ccdf=yield _0x4e072d['json']();return new SuccessfulAccountResponse(_0x35ccdf);}const _0x2de857=yield _0x4e072d['json']();return new FailedAccountResponse(_0x2de857);}catch(_0xab8c0d){if(_0xab8c0d instanceof Error)return new FailedAccountResponse({'detail':_0xab8c0d['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0xab8c0d;}});}}
7
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0xfac54,_0x634d0,_0x2e2de1,_0x28b250){function _0x48b538(_0x1f6b45){return _0x1f6b45 instanceof _0x2e2de1?_0x1f6b45:new _0x2e2de1(function(_0x2eca98){_0x2eca98(_0x1f6b45);});}return new(_0x2e2de1||(_0x2e2de1=Promise))(function(_0x2e6d7c,_0x37fc65){function _0x4f32b8(_0x18428a){try{_0x661e4b(_0x28b250['next'](_0x18428a));}catch(_0x40a3c4){_0x37fc65(_0x40a3c4);}}function _0x27fe89(_0x26c23c){try{_0x661e4b(_0x28b250['throw'](_0x26c23c));}catch(_0x5c4de1){_0x37fc65(_0x5c4de1);}}function _0x661e4b(_0x5c28b){_0x5c28b['done']?_0x2e6d7c(_0x5c28b['value']):_0x48b538(_0x5c28b['value'])['then'](_0x4f32b8,_0x27fe89);}_0x661e4b((_0x28b250=_0x28b250['apply'](_0xfac54,_0x634d0||[]))['next']());});};class ApiKeyService{constructor(_0x3d8460){this['fetch']=_0x3d8460;}['create'](_0x63dcad,_0x2d4668,_0x5d4955){return __awaiter$3(this,void 0,void 0,function*(){const _0x1fd46c='ApiKey/Create',_0x50d860={'account_name':_0x63dcad,'name':_0x2d4668};try{const _0x259b9b=yield this['fetch']['post'](_0x1fd46c,_0x5d4955,_0x50d860);if(_0x259b9b['status']>0xc7&&_0x259b9b['status']<0x12c){const _0xbf2e62=yield _0x259b9b['json']();return new SuccessfulApiKeyResponse(_0xbf2e62);}const _0xf50cd3=yield _0x259b9b['json']();return new FailedApiKeyResponse(_0xf50cd3);}catch(_0x3a4cc2){if(_0x3a4cc2 instanceof Error)return new FailedApiKeyResponse({'detail':_0x3a4cc2['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x3a4cc2;}});}}
8
8
 
9
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x5eead4,_0x1d186f,_0x4420f2,_0x5d598b){function _0x3a3f77(_0x440f8e){return _0x440f8e instanceof _0x4420f2?_0x440f8e:new _0x4420f2(function(_0x30ab7b){_0x30ab7b(_0x440f8e);});}return new(_0x4420f2||(_0x4420f2=Promise))(function(_0x1cd630,_0x294d71){function _0x461f31(_0x2d78b4){try{_0x2ec52e(_0x5d598b['next'](_0x2d78b4));}catch(_0x1db181){_0x294d71(_0x1db181);}}function _0x491e56(_0x2687d5){try{_0x2ec52e(_0x5d598b['throw'](_0x2687d5));}catch(_0x5969db){_0x294d71(_0x5969db);}}function _0x2ec52e(_0x4248a3){_0x4248a3['done']?_0x1cd630(_0x4248a3['value']):_0x3a3f77(_0x4248a3['value'])['then'](_0x461f31,_0x491e56);}_0x2ec52e((_0x5d598b=_0x5d598b['apply'](_0x5eead4,_0x1d186f||[]))['next']());});};class Fetch{constructor(_0x3980c7){this['baseUri']=_0x3980c7,this['getUrl']=_0x4a7cd0=>{return _0x4a7cd0['startsWith']('/')&&(_0x4a7cd0=_0x4a7cd0['replace']('/','')),''+this['baseUri']+_0x4a7cd0;},!_0x3980c7['endsWith']('/')&&(_0x3980c7=_0x3980c7+'/');}['get'](_0x22a324,_0x3430ba){return __awaiter$1(this,void 0,void 0,function*(){const _0x2ed50f=this['getUrl'](_0x22a324);return yield fetch(_0x2ed50f,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3430ba}});});}['post'](_0x4b4355,_0x5e39ef,_0x488233){return __awaiter$1(this,void 0,void 0,function*(){const _0x176d98=this['getUrl'](_0x4b4355);return yield fetch(_0x176d98,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x5e39ef},'body':_0x488233?JSON['stringify'](_0x488233):null});});}['put'](_0x51d577,_0x3d81af,_0x201bd4){return __awaiter$1(this,void 0,void 0,function*(){const _0x12d97f=this['getUrl'](_0x51d577);return yield fetch(_0x12d97f,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3d81af},'body':_0x201bd4?JSON['stringify'](_0x201bd4):null});});}['delete'](_0x5b9de6,_0x14e815){return __awaiter$1(this,void 0,void 0,function*(){const _0x58c29f=this['getUrl'](_0x5b9de6);return yield fetch(_0x58c29f,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x14e815}});});}}
9
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x4961c6,_0x512808,_0x430d07,_0x3f0266){function _0x40a25b(_0x539ecd){return _0x539ecd instanceof _0x430d07?_0x539ecd:new _0x430d07(function(_0x1bcbf4){_0x1bcbf4(_0x539ecd);});}return new(_0x430d07||(_0x430d07=Promise))(function(_0x3d60b7,_0x386fb6){function _0x533d9f(_0x506a95){try{_0x444110(_0x3f0266['next'](_0x506a95));}catch(_0x30681c){_0x386fb6(_0x30681c);}}function _0xd5bbf5(_0x1c3742){try{_0x444110(_0x3f0266['throw'](_0x1c3742));}catch(_0x305391){_0x386fb6(_0x305391);}}function _0x444110(_0xc67b80){_0xc67b80['done']?_0x3d60b7(_0xc67b80['value']):_0x40a25b(_0xc67b80['value'])['then'](_0x533d9f,_0xd5bbf5);}_0x444110((_0x3f0266=_0x3f0266['apply'](_0x4961c6,_0x512808||[]))['next']());});};class ListService{constructor(_0xf18b3){this['fetch']=_0xf18b3;}['add'](_0x2d0644,_0x5c2352,_0x344227){return __awaiter$2(this,void 0,void 0,function*(){const _0x360615='List',_0x371af6={'account_name':_0x2d0644,'list_name':_0x5c2352};try{const _0x172219=yield this['fetch']['post'](_0x360615,_0x344227,_0x371af6);if(_0x172219['status']>0xc7&&_0x172219['status']<0x12c){const _0x19ede9=yield _0x172219['json']();return new SuccessfulAccountResponse(_0x19ede9);}const _0x1770f4=yield _0x172219['json']();return new FailedAccountResponse(_0x1770f4);}catch(_0x42ccc0){if(_0x42ccc0 instanceof Error)return new FailedAccountResponse({'detail':_0x42ccc0['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x42ccc0;}});}['remove'](_0x70e96b,_0x43a1e2,_0x3921e9){return __awaiter$2(this,void 0,void 0,function*(){const _0x224425='List/'+_0x70e96b+'/'+_0x43a1e2,_0x4f6881=yield this['fetch']['delete'](_0x224425,_0x3921e9);try{if(_0x4f6881['status']>0xc7&&_0x4f6881['status']<0x12c){const _0x2998ba=yield _0x4f6881['json']();return new SuccessfulAccountResponse(_0x2998ba);}const _0x2994e8=yield _0x4f6881['json']();return new FailedAccountResponse(_0x2994e8);}catch(_0xccfecf){if(_0xccfecf instanceof Error)return new FailedAccountResponse({'detail':_0xccfecf['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0xccfecf;}});}}
10
10
 
11
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x38139e,_0x23047d,_0x509e62,_0x19ce10){function _0x5b4376(_0x2a5ddc){return _0x2a5ddc instanceof _0x509e62?_0x2a5ddc:new _0x509e62(function(_0x492c16){_0x492c16(_0x2a5ddc);});}return new(_0x509e62||(_0x509e62=Promise))(function(_0x21796c,_0x469b59){function _0x249213(_0x4fc37d){try{_0x564413(_0x19ce10['next'](_0x4fc37d));}catch(_0x52742c){_0x469b59(_0x52742c);}}function _0x552052(_0x3b2f5e){try{_0x564413(_0x19ce10['throw'](_0x3b2f5e));}catch(_0x599c0e){_0x469b59(_0x599c0e);}}function _0x564413(_0x11a724){_0x11a724['done']?_0x21796c(_0x11a724['value']):_0x5b4376(_0x11a724['value'])['then'](_0x249213,_0x552052);}_0x564413((_0x19ce10=_0x19ce10['apply'](_0x38139e,_0x23047d||[]))['next']());});};class AdminClient{constructor(_0x458e03='https://admin.searchability.dev/'){var _0x2c941b=new Fetch(_0x458e03);this['Accounts']=new AccountService(_0x2c941b),this['Lists']=new ListService(_0x2c941b),this['ApiKeys']=new ApiKeyService(_0x2c941b);}}class AuthClient{constructor(_0x28e12e='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x28e12e);}['login'](_0x339cc6){return __awaiter(this,void 0,void 0,function*(){var _0x399e60='login/'+_0x339cc6;try{const _0x472016=yield yield fetch(_0x399e60);if(_0x472016['status']>0xc7&&_0x472016['status']<0x12c){const _0x242641=yield _0x472016['json']();return new SuccessfulAuthResponse(_0x242641);}const _0x470c1a=yield _0x472016['json']();return new FailedAuthResponse(_0x470c1a);}catch(_0x25f84c){if(_0x25f84c instanceof Error)return new FailedAuthResponse({'detail':_0x25f84c['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x25f84c;}});}['refresh'](_0x3b10ec){return __awaiter(this,void 0,void 0,function*(){var _0x591186='refresh';try{const _0x2c3815=yield this['fetch']['post'](_0x591186,_0x3b10ec,null);if(_0x2c3815['status']>0xc7&&_0x2c3815['status']<0x12c){const _0x5aee4e=yield _0x2c3815['json']();return new SuccessfulAuthResponse(_0x5aee4e);}const _0x2634f1=yield _0x2c3815['json']();return new FailedAuthResponse(_0x2634f1);}catch(_0x2fd994){if(_0x2fd994 instanceof Error)return new FailedAuthResponse({'detail':_0x2fd994['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x2fd994;}});}}
11
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x4a6fe5,_0x2d182d,_0x224e69,_0x5a339e){function _0x46abf7(_0x27498f){return _0x27498f instanceof _0x224e69?_0x27498f:new _0x224e69(function(_0x468ca7){_0x468ca7(_0x27498f);});}return new(_0x224e69||(_0x224e69=Promise))(function(_0x620a16,_0xffe0df){function _0x49703b(_0x3c743e){try{_0x4fd57f(_0x5a339e['next'](_0x3c743e));}catch(_0x1faf5e){_0xffe0df(_0x1faf5e);}}function _0x25bc5a(_0x358d1c){try{_0x4fd57f(_0x5a339e['throw'](_0x358d1c));}catch(_0x16dbc1){_0xffe0df(_0x16dbc1);}}function _0x4fd57f(_0x3b5496){_0x3b5496['done']?_0x620a16(_0x3b5496['value']):_0x46abf7(_0x3b5496['value'])['then'](_0x49703b,_0x25bc5a);}_0x4fd57f((_0x5a339e=_0x5a339e['apply'](_0x4a6fe5,_0x2d182d||[]))['next']());});};class Fetch{constructor(_0x146403){this['baseUri']=_0x146403,this['getUrl']=_0x3d8df4=>{return _0x3d8df4['startsWith']('/')&&(_0x3d8df4=_0x3d8df4['replace']('/','')),''+this['baseUri']+_0x3d8df4;},!_0x146403['endsWith']('/')&&(_0x146403=_0x146403+'/');}['get'](_0x38a34f,_0x4e0087){return __awaiter$1(this,void 0,void 0,function*(){const _0x9f1a9a=this['getUrl'](_0x38a34f);return yield fetch(_0x9f1a9a,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4e0087}});});}['post'](_0x357ee1,_0x397d15,_0x2782cc){return __awaiter$1(this,void 0,void 0,function*(){const _0x7dbd29=this['getUrl'](_0x357ee1);return yield fetch(_0x7dbd29,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x397d15},'body':_0x2782cc?JSON['stringify'](_0x2782cc):null});});}['put'](_0x4eadbb,_0x517773,_0x48272){return __awaiter$1(this,void 0,void 0,function*(){const _0x4ca6df=this['getUrl'](_0x4eadbb);return yield fetch(_0x4ca6df,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x517773},'body':_0x48272?JSON['stringify'](_0x48272):null});});}['delete'](_0x3db2e6,_0x35523a){return __awaiter$1(this,void 0,void 0,function*(){const _0x28e4a6=this['getUrl'](_0x3db2e6);return yield fetch(_0x28e4a6,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x35523a}});});}}
12
+
13
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x99c8e,_0x25af06,_0x2ad405,_0x3243ab){function _0x441787(_0x23b52c){return _0x23b52c instanceof _0x2ad405?_0x23b52c:new _0x2ad405(function(_0x58ad76){_0x58ad76(_0x23b52c);});}return new(_0x2ad405||(_0x2ad405=Promise))(function(_0x34de23,_0x98d354){function _0x3246dc(_0x2e5a46){try{_0x58f4d0(_0x3243ab['next'](_0x2e5a46));}catch(_0x2405e8){_0x98d354(_0x2405e8);}}function _0x3997f3(_0x585014){try{_0x58f4d0(_0x3243ab['throw'](_0x585014));}catch(_0x1e448d){_0x98d354(_0x1e448d);}}function _0x58f4d0(_0x3017b9){_0x3017b9['done']?_0x34de23(_0x3017b9['value']):_0x441787(_0x3017b9['value'])['then'](_0x3246dc,_0x3997f3);}_0x58f4d0((_0x3243ab=_0x3243ab['apply'](_0x99c8e,_0x25af06||[]))['next']());});};class AdminClient{constructor(_0x183679='https://admin.searchability.dev/'){var _0x3dc087=new Fetch(_0x183679);this['Accounts']=new AccountService(_0x3dc087),this['Lists']=new ListService(_0x3dc087),this['ApiKeys']=new ApiKeyService(_0x3dc087);}}class AuthClient{constructor(_0x4ab1e2='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x4ab1e2);}['login'](_0x452586){return __awaiter(this,void 0,void 0,function*(){var _0x5472a8='login/'+_0x452586;try{const _0x21bb8e=yield yield fetch(_0x5472a8);if(_0x21bb8e['status']>0xc7&&_0x21bb8e['status']<0x12c){const _0x516066=yield _0x21bb8e['json']();return new SuccessfulAuthResponse(_0x516066);}const _0x353965=yield _0x21bb8e['json']();return new FailedAuthResponse(_0x353965);}catch(_0x14ddd7){if(_0x14ddd7 instanceof Error)return new FailedAuthResponse({'detail':_0x14ddd7['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x14ddd7;}});}['refresh'](_0x4eb4b0){return __awaiter(this,void 0,void 0,function*(){var _0x15eb2a='refresh';try{const _0x912d4b=yield this['fetch']['post'](_0x15eb2a,_0x4eb4b0,null);if(_0x912d4b['status']>0xc7&&_0x912d4b['status']<0x12c){const _0x2af908=yield _0x912d4b['json']();return new SuccessfulAuthResponse(_0x2af908);}const _0x485c44=yield _0x912d4b['json']();return new FailedAuthResponse(_0x485c44);}catch(_0x2bcff2){if(_0x2bcff2 instanceof Error)return new FailedAuthResponse({'detail':_0x2bcff2['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x2bcff2;}});}}
12
14
 
13
15
  export { AdminClient, AuthClient };
package/dist/types.d.ts CHANGED
@@ -40,6 +40,12 @@ declare class AuthClient {
40
40
  refresh(refreshToken: string): Promise<Response<Tokens, Problem>>;
41
41
  }
42
42
 
43
+ declare class TokenManager {
44
+ readonly authClient: AuthClient;
45
+ constructor(authClient: AuthClient);
46
+ getOrRefreshTokens(tokens: Tokens): Promise<Response<Tokens, Problem>>;
47
+ }
48
+
43
49
  declare abstract class Response<S, F> {
44
50
  readonly isSuccess: boolean;
45
51
  constructor(isSuccess: boolean);
@@ -122,4 +128,4 @@ declare class FailedApiKeyResponse extends Response<ApiKey[], Problem> {
122
128
  toProblem(): Problem;
123
129
  }
124
130
 
125
- export { type Account, AdminClient, type ApiKey, AuthClient, type Error, FailedAccountResponse, FailedApiKeyResponse, FailedAuthResponse, type List, type ListIdentity, type Problem, Response, SuccessfulAccountResponse, SuccessfulApiKeyResponse, SuccessfulAuthResponse, type Tokens };
131
+ export { type Account, AdminClient, type ApiKey, AuthClient, type Error, FailedAccountResponse, FailedApiKeyResponse, FailedAuthResponse, type List, type ListIdentity, type Problem, Response, SuccessfulAccountResponse, SuccessfulApiKeyResponse, SuccessfulAuthResponse, TokenManager, type Tokens };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@searchability/admin-client",
3
- "version": "0.0.18",
3
+ "version": "0.0.20",
4
4
  "description": "Searchability admin client.",
5
5
  "type": "module",
6
6
  "types": "./dist/types.d.ts",
@@ -1,13 +0,0 @@
1
- class Response{constructor(_0x326403){this['isSuccess']=_0x326403;}}class SuccessfulAccountResponse extends Response{constructor(_0x277157){super(!![]),this['account']=_0x277157;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x1e98c1){super(![]),this['problem']=_0x1e98c1;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x3078dc){super(!![]),this['tokens']=_0x3078dc;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x60e52e){super(![]),this['problem']=_0x60e52e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x804eb8){super(!![]),this['apiKeys']=_0x804eb8;}['toSuccess'](){return this['apiKeys'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0xf940eb){super(![]),this['problem']=_0xf940eb;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
2
-
3
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x5c789b,_0x521441,_0x2c2fd7,_0x2d358c){function _0x593ce5(_0x37f7a3){return _0x37f7a3 instanceof _0x2c2fd7?_0x37f7a3:new _0x2c2fd7(function(_0x1b12a7){_0x1b12a7(_0x37f7a3);});}return new(_0x2c2fd7||(_0x2c2fd7=Promise))(function(_0x974d2c,_0x20d7d9){function _0x5ea89c(_0x811416){try{_0x3782a0(_0x2d358c['next'](_0x811416));}catch(_0x20030a){_0x20d7d9(_0x20030a);}}function _0x5055e0(_0x1ab45c){try{_0x3782a0(_0x2d358c['throw'](_0x1ab45c));}catch(_0x32d0a8){_0x20d7d9(_0x32d0a8);}}function _0x3782a0(_0x1d5bc6){_0x1d5bc6['done']?_0x974d2c(_0x1d5bc6['value']):_0x593ce5(_0x1d5bc6['value'])['then'](_0x5ea89c,_0x5055e0);}_0x3782a0((_0x2d358c=_0x2d358c['apply'](_0x5c789b,_0x521441||[]))['next']());});};class AccountService{constructor(_0x4a48fb){this['fetch']=_0x4a48fb;}['get'](_0xa49391,_0x5abead){return __awaiter$4(this,void 0,void 0,function*(){const _0xe272c='Account/'+_0xa49391+'/',_0xd612f2=yield this['fetch']['get'](_0xe272c,_0x5abead);try{if(_0xd612f2['status']>0xc7&&_0xd612f2['status']<0x12c){const _0x4539f3=yield _0xd612f2['json']();return new SuccessfulAccountResponse(_0x4539f3);}const _0x5e22a4=yield _0xd612f2['json']();return new FailedAccountResponse(_0x5e22a4);}catch(_0x2c56f7){if(_0x2c56f7 instanceof Error)return new FailedAccountResponse({'detail':_0x2c56f7['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x2c56f7;}});}}
4
-
5
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x794f6f,_0x522478,_0x19540d,_0xfaeb7d){function _0x36fad5(_0xe63321){return _0xe63321 instanceof _0x19540d?_0xe63321:new _0x19540d(function(_0x4a35ac){_0x4a35ac(_0xe63321);});}return new(_0x19540d||(_0x19540d=Promise))(function(_0x143013,_0x4f8423){function _0x148a36(_0x3222a5){try{_0x43d53e(_0xfaeb7d['next'](_0x3222a5));}catch(_0x14ad51){_0x4f8423(_0x14ad51);}}function _0x585314(_0x1fc029){try{_0x43d53e(_0xfaeb7d['throw'](_0x1fc029));}catch(_0x3b1e23){_0x4f8423(_0x3b1e23);}}function _0x43d53e(_0x353e28){_0x353e28['done']?_0x143013(_0x353e28['value']):_0x36fad5(_0x353e28['value'])['then'](_0x148a36,_0x585314);}_0x43d53e((_0xfaeb7d=_0xfaeb7d['apply'](_0x794f6f,_0x522478||[]))['next']());});};class ApiKeyService{constructor(_0xd24cf8){this['fetch']=_0xd24cf8;}['create'](_0x3f3ff6,_0x2df8f4,_0x5c1b49){return __awaiter$3(this,void 0,void 0,function*(){const _0x4953b2='ApiKey/Create',_0xc8a302={'account_name':_0x3f3ff6,'name':_0x2df8f4};try{const _0x31a6d9=yield this['fetch']['post'](_0x4953b2,_0x5c1b49,_0xc8a302);if(_0x31a6d9['status']>0xc7&&_0x31a6d9['status']<0x12c){const _0x14396d=yield _0x31a6d9['json']();return new SuccessfulApiKeyResponse(_0x14396d);}const _0x10348a=yield _0x31a6d9['json']();return new FailedApiKeyResponse(_0x10348a);}catch(_0x30a314){if(_0x30a314 instanceof Error)return new FailedApiKeyResponse({'detail':_0x30a314['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x30a314;}});}}
6
-
7
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x58186c,_0x397b42,_0x53b5cf,_0x5c448b){function _0xa932e4(_0x477a6a){return _0x477a6a instanceof _0x53b5cf?_0x477a6a:new _0x53b5cf(function(_0x2a667b){_0x2a667b(_0x477a6a);});}return new(_0x53b5cf||(_0x53b5cf=Promise))(function(_0x4e1813,_0x53ffde){function _0x2907fe(_0x40888f){try{_0x165a82(_0x5c448b['next'](_0x40888f));}catch(_0x33e8ad){_0x53ffde(_0x33e8ad);}}function _0x1a4d3b(_0x27ed3f){try{_0x165a82(_0x5c448b['throw'](_0x27ed3f));}catch(_0x125013){_0x53ffde(_0x125013);}}function _0x165a82(_0x488824){_0x488824['done']?_0x4e1813(_0x488824['value']):_0xa932e4(_0x488824['value'])['then'](_0x2907fe,_0x1a4d3b);}_0x165a82((_0x5c448b=_0x5c448b['apply'](_0x58186c,_0x397b42||[]))['next']());});};class ListService{constructor(_0x1f0474){this['fetch']=_0x1f0474;}['add'](_0x23daab,_0x294f43,_0x57c16b){return __awaiter$2(this,void 0,void 0,function*(){const _0x25a8df='List',_0x28b411={'account_name':_0x23daab,'list_name':_0x294f43};try{const _0x51cef7=yield this['fetch']['post'](_0x25a8df,_0x57c16b,_0x28b411);if(_0x51cef7['status']>0xc7&&_0x51cef7['status']<0x12c){const _0x34bf9c=yield _0x51cef7['json']();return new SuccessfulAccountResponse(_0x34bf9c);}const _0x5a653b=yield _0x51cef7['json']();return new FailedAccountResponse(_0x5a653b);}catch(_0x544d59){if(_0x544d59 instanceof Error)return new FailedAccountResponse({'detail':_0x544d59['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x544d59;}});}['remove'](_0x558357,_0x2ecbf3,_0x449f0){return __awaiter$2(this,void 0,void 0,function*(){const _0x19d49d='List/'+_0x558357+'/'+_0x2ecbf3,_0x2efdb6=yield this['fetch']['delete'](_0x19d49d,_0x449f0);try{if(_0x2efdb6['status']>0xc7&&_0x2efdb6['status']<0x12c){const _0x218688=yield _0x2efdb6['json']();return new SuccessfulAccountResponse(_0x218688);}const _0x3282c4=yield _0x2efdb6['json']();return new FailedAccountResponse(_0x3282c4);}catch(_0xa6d9c9){if(_0xa6d9c9 instanceof Error)return new FailedAccountResponse({'detail':_0xa6d9c9['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0xa6d9c9;}});}}
8
-
9
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x12911d,_0x5a3f41,_0x2e70e1,_0x3dcf51){function _0x4d6563(_0x3a92f8){return _0x3a92f8 instanceof _0x2e70e1?_0x3a92f8:new _0x2e70e1(function(_0xce7692){_0xce7692(_0x3a92f8);});}return new(_0x2e70e1||(_0x2e70e1=Promise))(function(_0x209e1e,_0x3da527){function _0x168d23(_0x30f111){try{_0x23f8b4(_0x3dcf51['next'](_0x30f111));}catch(_0x4dfb12){_0x3da527(_0x4dfb12);}}function _0x393e7d(_0x163de4){try{_0x23f8b4(_0x3dcf51['throw'](_0x163de4));}catch(_0x188ff0){_0x3da527(_0x188ff0);}}function _0x23f8b4(_0x1da686){_0x1da686['done']?_0x209e1e(_0x1da686['value']):_0x4d6563(_0x1da686['value'])['then'](_0x168d23,_0x393e7d);}_0x23f8b4((_0x3dcf51=_0x3dcf51['apply'](_0x12911d,_0x5a3f41||[]))['next']());});};class Fetch{constructor(_0x46cb0a){this['baseUri']=_0x46cb0a,this['getUrl']=_0x4642d5=>{return _0x4642d5['startsWith']('/')&&(_0x4642d5=_0x4642d5['replace']('/','')),''+this['baseUri']+_0x4642d5;},!_0x46cb0a['endsWith']('/')&&(_0x46cb0a=_0x46cb0a+'/');}['get'](_0x5541a0,_0x9f20b2){return __awaiter$1(this,void 0,void 0,function*(){const _0x3b390d=this['getUrl'](_0x5541a0);return yield fetch(_0x3b390d,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x9f20b2}});});}['post'](_0x32f9f1,_0x52a28f,_0x2587ad){return __awaiter$1(this,void 0,void 0,function*(){const _0x30de5f=this['getUrl'](_0x32f9f1);return yield fetch(_0x30de5f,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x52a28f},'body':_0x2587ad?JSON['stringify'](_0x2587ad):null});});}['put'](_0x36a4af,_0x3ebb56,_0x89369d){return __awaiter$1(this,void 0,void 0,function*(){const _0x5d4ca8=this['getUrl'](_0x36a4af);return yield fetch(_0x5d4ca8,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3ebb56},'body':_0x89369d?JSON['stringify'](_0x89369d):null});});}['delete'](_0x2edb54,_0x3e7ba8){return __awaiter$1(this,void 0,void 0,function*(){const _0x267e6d=this['getUrl'](_0x2edb54);return yield fetch(_0x267e6d,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3e7ba8}});});}}
10
-
11
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x196219,_0x57bab7,_0x15ed3a,_0x405096){function _0x1f26d1(_0xd0d1c9){return _0xd0d1c9 instanceof _0x15ed3a?_0xd0d1c9:new _0x15ed3a(function(_0x3bcb9c){_0x3bcb9c(_0xd0d1c9);});}return new(_0x15ed3a||(_0x15ed3a=Promise))(function(_0x257057,_0x3fc8e9){function _0x258053(_0xa52e7a){try{_0x44cd66(_0x405096['next'](_0xa52e7a));}catch(_0x25cd18){_0x3fc8e9(_0x25cd18);}}function _0x3eb7ab(_0x5e704b){try{_0x44cd66(_0x405096['throw'](_0x5e704b));}catch(_0x791059){_0x3fc8e9(_0x791059);}}function _0x44cd66(_0xae8198){_0xae8198['done']?_0x257057(_0xae8198['value']):_0x1f26d1(_0xae8198['value'])['then'](_0x258053,_0x3eb7ab);}_0x44cd66((_0x405096=_0x405096['apply'](_0x196219,_0x57bab7||[]))['next']());});};class AdminClient{constructor(_0xd22cb3='https://admin.searchability.dev/'){var _0x45fa2e=new Fetch(_0xd22cb3);this['Accounts']=new AccountService(_0x45fa2e),this['Lists']=new ListService(_0x45fa2e),this['ApiKeys']=new ApiKeyService(_0x45fa2e);}}class AuthClient{constructor(_0x55285b='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x55285b);}['login'](_0x38c508){return __awaiter(this,void 0,void 0,function*(){var _0x4e46ca='login/'+_0x38c508;try{const _0x57033c=yield yield fetch(_0x4e46ca);if(_0x57033c['status']>0xc7&&_0x57033c['status']<0x12c){const _0x307970=yield _0x57033c['json']();return new SuccessfulAuthResponse(_0x307970);}const _0xb16326=yield _0x57033c['json']();return new FailedAuthResponse(_0xb16326);}catch(_0x59e2f4){if(_0x59e2f4 instanceof Error)return new FailedAuthResponse({'detail':_0x59e2f4['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x59e2f4;}});}['refresh'](_0x37bbf7){return __awaiter(this,void 0,void 0,function*(){var _0x2c9db0='refresh';try{const _0x5308f3=yield this['fetch']['post'](_0x2c9db0,_0x37bbf7,null);if(_0x5308f3['status']>0xc7&&_0x5308f3['status']<0x12c){const _0x300a36=yield _0x5308f3['json']();return new SuccessfulAuthResponse(_0x300a36);}const _0x3003ef=yield _0x5308f3['json']();return new FailedAuthResponse(_0x3003ef);}catch(_0x446c2f){if(_0x446c2f instanceof Error)return new FailedAuthResponse({'detail':_0x446c2f['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x446c2f;}});}}
12
-
13
- export { AdminClient, AuthClient };