@searchability/admin-client 0.0.29 → 0.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
var TokenStatus;(function(_0xbff044){_0xbff044[_0xbff044['Ok']=0x0]='Ok',_0xbff044[_0xbff044['Refresh']=0x1]='Refresh',_0xbff044[_0xbff044['Expired']=0x2]='Expired';}(TokenStatus||(TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}['getStatus'](){if(Date['now']()<this['access_expires'])return TokenStatus['Ok'];if(Date['now']()<this['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
|
|
2
|
+
|
|
3
|
+
class Response{constructor(_0x385844){this['isSuccess']=_0x385844;}}class SuccessfulAccountResponse extends Response{constructor(_0x27de5d){super(!![]),this['account']=_0x27de5d;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x9b9ed8){super(![]),this['problem']=_0x9b9ed8;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x424888){super(!![]),this['tokens']=_0x424888;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x14adc8){super(![]),this['problem']=_0x14adc8;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x31a59c){super(!![]),this['apiKey']=_0x31a59c;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x5bef8d){super(![]),this['problem']=_0x5bef8d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x10788f){super(!![]),this['apiKeyValue']=_0x10788f;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyValueResponse extends Response{constructor(_0x3ab8a8){super(![]),this['problem']=_0x3ab8a8;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
|
|
4
|
+
|
|
5
|
+
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x4fd89d,_0x10ba5a,_0x534a59,_0x183e42){function _0x23aad4(_0x46cdb8){return _0x46cdb8 instanceof _0x534a59?_0x46cdb8:new _0x534a59(function(_0x65904b){_0x65904b(_0x46cdb8);});}return new(_0x534a59||(_0x534a59=Promise))(function(_0x53aa90,_0x25cb33){function _0x451f96(_0x4009e5){try{_0x16d1e4(_0x183e42['next'](_0x4009e5));}catch(_0x1f80c7){_0x25cb33(_0x1f80c7);}}function _0x3ffde2(_0x10557a){try{_0x16d1e4(_0x183e42['throw'](_0x10557a));}catch(_0x40ac04){_0x25cb33(_0x40ac04);}}function _0x16d1e4(_0x481330){_0x481330['done']?_0x53aa90(_0x481330['value']):_0x23aad4(_0x481330['value'])['then'](_0x451f96,_0x3ffde2);}_0x16d1e4((_0x183e42=_0x183e42['apply'](_0x4fd89d,_0x10ba5a||[]))['next']());});};class AccountService{constructor(_0xcd91bf){this['fetch']=_0xcd91bf;}['get'](_0x27f48a,_0x1c7f5c){return __awaiter$4(this,void 0,void 0,function*(){const _0x1fd0ff='Account/'+_0x27f48a+'/',_0x37b434=yield this['fetch']['get'](_0x1fd0ff,_0x1c7f5c);try{if(_0x37b434['status']>0xc7&&_0x37b434['status']<0x12c){const _0x16d248=yield _0x37b434['json']();return new SuccessfulAccountResponse(_0x16d248);}const _0x324ded=yield _0x37b434['json']();return new FailedAccountResponse(_0x324ded);}catch(_0x22fff6){if(_0x22fff6 instanceof Error)return new FailedAccountResponse({'detail':_0x22fff6['message'],'title':_0x22fff6['name'],'status':0x1f4,'instance':'','type':''});throw _0x22fff6;}});}}
|
|
6
|
+
|
|
7
|
+
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x266242,_0x1c9161,_0xa2295d,_0x407113){function _0x13e319(_0x24cd2a){return _0x24cd2a instanceof _0xa2295d?_0x24cd2a:new _0xa2295d(function(_0x21a0df){_0x21a0df(_0x24cd2a);});}return new(_0xa2295d||(_0xa2295d=Promise))(function(_0x5e00c3,_0x59ba2a){function _0x289539(_0x685ab2){try{_0x4334a1(_0x407113['next'](_0x685ab2));}catch(_0x522c6d){_0x59ba2a(_0x522c6d);}}function _0x164d7a(_0x594f54){try{_0x4334a1(_0x407113['throw'](_0x594f54));}catch(_0x943a95){_0x59ba2a(_0x943a95);}}function _0x4334a1(_0x2c4664){_0x2c4664['done']?_0x5e00c3(_0x2c4664['value']):_0x13e319(_0x2c4664['value'])['then'](_0x289539,_0x164d7a);}_0x4334a1((_0x407113=_0x407113['apply'](_0x266242,_0x1c9161||[]))['next']());});};class ApiKeyService{constructor(_0x5dd4ea){this['fetch']=_0x5dd4ea;}['create'](_0x408a6e,_0x355d7f,_0x4b6a19){return __awaiter$3(this,void 0,void 0,function*(){const _0x9cf359='api-key/create',_0x4ca5f3={'account_name':_0x408a6e,'api_key_name':_0x355d7f};try{const _0x58257c=yield this['fetch']['post'](_0x9cf359,_0x4b6a19,_0x4ca5f3);if(_0x58257c['status']>0xc7&&_0x58257c['status']<0x12c){const _0x5ae4c3=yield _0x58257c['json']();return new SuccessfulApiKeyResponse(_0x5ae4c3);}const _0xa94729=yield _0x58257c['json']();return new FailedApiKeyResponse(_0xa94729);}catch(_0xadcf1c){if(_0xadcf1c instanceof Error)return new FailedApiKeyResponse({'detail':_0xadcf1c['message'],'title':_0xadcf1c['name'],'status':0x1f4,'instance':'','type':''});throw _0xadcf1c;}});}['view'](_0x222218,_0x2d19d2,_0x14ca0e){return __awaiter$3(this,void 0,void 0,function*(){const _0x5536bd='api-key/'+_0x222218+'/'+_0x2d19d2;try{const _0x3e2a35=yield this['fetch']['get'](_0x5536bd,_0x14ca0e);if(_0x3e2a35['status']>0xc7&&_0x3e2a35['status']<0x12c){const _0x197c5a=yield _0x3e2a35['json']();return new SuccessfulApiKeyValueResponse(_0x197c5a);}const _0x4a6f55=yield _0x3e2a35['json']();return new FailedApiKeyValueResponse(_0x4a6f55);}catch(_0x11d612){if(_0x11d612 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x11d612['message'],'title':_0x11d612['name'],'status':0x1f4,'instance':'','type':''});throw _0x11d612;}});}}
|
|
8
|
+
|
|
9
|
+
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x4031a3,_0x67f9af,_0x544047,_0x1746be){function _0x201160(_0x338948){return _0x338948 instanceof _0x544047?_0x338948:new _0x544047(function(_0x2dbdec){_0x2dbdec(_0x338948);});}return new(_0x544047||(_0x544047=Promise))(function(_0x51a38b,_0x16fc9f){function _0x2a40ff(_0x55fe66){try{_0x24ae65(_0x1746be['next'](_0x55fe66));}catch(_0xc60243){_0x16fc9f(_0xc60243);}}function _0xf6b40f(_0x218f38){try{_0x24ae65(_0x1746be['throw'](_0x218f38));}catch(_0x4dd058){_0x16fc9f(_0x4dd058);}}function _0x24ae65(_0x1e55dd){_0x1e55dd['done']?_0x51a38b(_0x1e55dd['value']):_0x201160(_0x1e55dd['value'])['then'](_0x2a40ff,_0xf6b40f);}_0x24ae65((_0x1746be=_0x1746be['apply'](_0x4031a3,_0x67f9af||[]))['next']());});};class ListService{constructor(_0x380f68){this['fetch']=_0x380f68;}['add'](_0x574ad9,_0x36687d,_0x1a0479){return __awaiter$2(this,void 0,void 0,function*(){const _0x3ffd1c='List',_0x12196e={'account_name':_0x574ad9,'list_name':_0x36687d};try{const _0x10779e=yield this['fetch']['post'](_0x3ffd1c,_0x1a0479,_0x12196e);if(_0x10779e['status']>0xc7&&_0x10779e['status']<0x12c){const _0x28d64b=yield _0x10779e['json']();return new SuccessfulAccountResponse(_0x28d64b);}const _0x5efd37=yield _0x10779e['json']();return new FailedAccountResponse(_0x5efd37);}catch(_0x510737){if(_0x510737 instanceof Error)return new FailedAccountResponse({'detail':_0x510737['message'],'title':_0x510737['name'],'status':0x1f4,'instance':'','type':''});throw _0x510737;}});}['remove'](_0x115a90,_0x48e2be,_0x2990a4){return __awaiter$2(this,void 0,void 0,function*(){const _0xeebf5b='List/'+_0x115a90+'/'+_0x48e2be,_0x38ea83=yield this['fetch']['delete'](_0xeebf5b,_0x2990a4);try{if(_0x38ea83['status']>0xc7&&_0x38ea83['status']<0x12c){const _0x2610cd=yield _0x38ea83['json']();return new SuccessfulAccountResponse(_0x2610cd);}const _0x2232eb=yield _0x38ea83['json']();return new FailedAccountResponse(_0x2232eb);}catch(_0x573d61){if(_0x573d61 instanceof Error)return new FailedAccountResponse({'detail':_0x573d61['message'],'title':_0x573d61['name'],'status':0x1f4,'instance':'','type':''});throw _0x573d61;}});}}
|
|
10
|
+
|
|
11
|
+
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x32016c,_0x3497d3,_0x2fc238,_0x4956d4){function _0x3e8224(_0x2c8f2a){return _0x2c8f2a instanceof _0x2fc238?_0x2c8f2a:new _0x2fc238(function(_0x1bb2f9){_0x1bb2f9(_0x2c8f2a);});}return new(_0x2fc238||(_0x2fc238=Promise))(function(_0x2f2967,_0x3e7b03){function _0x833a4b(_0x2d7fd5){try{_0x2fe72c(_0x4956d4['next'](_0x2d7fd5));}catch(_0x436a68){_0x3e7b03(_0x436a68);}}function _0x314056(_0x34e8e3){try{_0x2fe72c(_0x4956d4['throw'](_0x34e8e3));}catch(_0x4f4251){_0x3e7b03(_0x4f4251);}}function _0x2fe72c(_0x1c2750){_0x1c2750['done']?_0x2f2967(_0x1c2750['value']):_0x3e8224(_0x1c2750['value'])['then'](_0x833a4b,_0x314056);}_0x2fe72c((_0x4956d4=_0x4956d4['apply'](_0x32016c,_0x3497d3||[]))['next']());});};class Fetch{constructor(_0x44e77e){this['baseUri']=_0x44e77e,this['getUrl']=_0x592618=>{return _0x592618['startsWith']('/')&&(_0x592618=_0x592618['replace']('/','')),''+this['baseUri']+_0x592618;},!_0x44e77e['endsWith']('/')&&(_0x44e77e=_0x44e77e+'/');}['get'](_0x4c846e,_0x2b1ab7){return __awaiter$1(this,void 0,void 0,function*(){const _0xc59ab4=this['getUrl'](_0x4c846e);return yield fetch(_0xc59ab4,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2b1ab7}});});}['post'](_0x3e719a,_0x29d0b7,_0x4f96dc){return __awaiter$1(this,void 0,void 0,function*(){const _0xdab63e=this['getUrl'](_0x3e719a);return yield fetch(_0xdab63e,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x29d0b7},'body':_0x4f96dc?JSON['stringify'](_0x4f96dc):null});});}['put'](_0x1b24a7,_0x369667,_0x2072bd){return __awaiter$1(this,void 0,void 0,function*(){const _0xd036b0=this['getUrl'](_0x1b24a7);return yield fetch(_0xd036b0,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x369667},'body':_0x2072bd?JSON['stringify'](_0x2072bd):null});});}['delete'](_0x1bb753,_0x36c8a7){return __awaiter$1(this,void 0,void 0,function*(){const _0x3a8244=this['getUrl'](_0x1bb753);return yield fetch(_0x3a8244,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x36c8a7}});});}}
|
|
12
|
+
|
|
13
|
+
var __awaiter=undefined&&undefined['__awaiter']||function(_0x242d7c,_0x3c8956,_0x3930ce,_0x39188b){function _0x44dce8(_0x5c399c){return _0x5c399c instanceof _0x3930ce?_0x5c399c:new _0x3930ce(function(_0x278c1a){_0x278c1a(_0x5c399c);});}return new(_0x3930ce||(_0x3930ce=Promise))(function(_0x1e0911,_0x2fc8bc){function _0x2436a8(_0x20db00){try{_0x53b5fc(_0x39188b['next'](_0x20db00));}catch(_0x3831bb){_0x2fc8bc(_0x3831bb);}}function _0x4bab73(_0x3b1c6f){try{_0x53b5fc(_0x39188b['throw'](_0x3b1c6f));}catch(_0x59d596){_0x2fc8bc(_0x59d596);}}function _0x53b5fc(_0x5e3724){_0x5e3724['done']?_0x1e0911(_0x5e3724['value']):_0x44dce8(_0x5e3724['value'])['then'](_0x2436a8,_0x4bab73);}_0x53b5fc((_0x39188b=_0x39188b['apply'](_0x242d7c,_0x3c8956||[]))['next']());});};class AdminClient{constructor(_0x3141fe='https://admin.searchability.dev/'){var _0x5b89ee=new Fetch(_0x3141fe);this['Accounts']=new AccountService(_0x5b89ee),this['Lists']=new ListService(_0x5b89ee),this['ApiKeys']=new ApiKeyService(_0x5b89ee);}}class AuthClient{constructor(_0x26c2ef='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x26c2ef);}['login'](_0x3876b0){return __awaiter(this,void 0,void 0,function*(){var _0x58aeda='login/'+_0x3876b0;try{const _0x5a0f22=yield yield fetch(_0x58aeda);if(_0x5a0f22['status']>0xc7&&_0x5a0f22['status']<0x12c){const _0x5dfc38=yield _0x5a0f22['json']();return new SuccessfulAuthResponse(_0x5dfc38);}const _0x5466a6=yield _0x5a0f22['json']();return new FailedAuthResponse(_0x5466a6);}catch(_0x3b5851){if(_0x3b5851 instanceof Error)return new FailedAuthResponse({'detail':_0x3b5851['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x3b5851;}});}['refresh'](_0x166d5c){return __awaiter(this,void 0,void 0,function*(){var _0x5a7b2f='refresh';try{const _0x1d462f=yield this['fetch']['post'](_0x5a7b2f,_0x166d5c,null);if(_0x1d462f['status']>0xc7&&_0x1d462f['status']<0x12c){const _0x204a93=yield _0x1d462f['json']();return new SuccessfulAuthResponse(_0x204a93);}const _0x5e8431=yield _0x1d462f['json']();return new FailedAuthResponse(_0x5e8431);}catch(_0x2625fa){if(_0x2625fa instanceof Error)return new FailedAuthResponse({'detail':_0x2625fa['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x2625fa;}});}}
|
|
14
|
+
|
|
15
|
+
export { AdminClient, AuthClient, TokenStatus, Tokens };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
exports.TokenStatus = void 0;(function(
|
|
3
|
+
exports.TokenStatus = void 0;(function(_0x45a749){_0x45a749[_0x45a749['Ok']=0x0]='Ok',_0x45a749[_0x45a749['Refresh']=0x1]='Refresh',_0x45a749[_0x45a749['Expired']=0x2]='Expired';}(exports.TokenStatus||(exports.TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}['getStatus'](){if(Date['now']()<this['access_expires'])return exports.TokenStatus['Ok'];if(Date['now']()<this['refresh_expires'])return exports.TokenStatus['Refresh'];return exports.TokenStatus['Expired'];}}
|
|
4
4
|
|
|
5
|
-
class Response{constructor(
|
|
5
|
+
class Response{constructor(_0xc99447){this['isSuccess']=_0xc99447;}}class SuccessfulAccountResponse extends Response{constructor(_0x4478ce){super(!![]),this['account']=_0x4478ce;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x394a65){super(![]),this['problem']=_0x394a65;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x2c1923){super(!![]),this['tokens']=_0x2c1923;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x2f8ee3){super(![]),this['problem']=_0x2f8ee3;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x36b972){super(!![]),this['apiKey']=_0x36b972;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x55e8c8){super(![]),this['problem']=_0x55e8c8;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x14131f){super(!![]),this['apiKeyValue']=_0x14131f;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyValueResponse extends Response{constructor(_0x165dda){super(![]),this['problem']=_0x165dda;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
|
|
6
6
|
|
|
7
|
-
var __awaiter$4=undefined&&undefined['__awaiter']||function(
|
|
7
|
+
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x531762,_0x175bf5,_0x2964bb,_0xe43f8f){function _0x18a546(_0x2550a4){return _0x2550a4 instanceof _0x2964bb?_0x2550a4:new _0x2964bb(function(_0x2723f3){_0x2723f3(_0x2550a4);});}return new(_0x2964bb||(_0x2964bb=Promise))(function(_0x4eff43,_0x2157ab){function _0x497bd3(_0x4f8bd0){try{_0x21073b(_0xe43f8f['next'](_0x4f8bd0));}catch(_0x2d835a){_0x2157ab(_0x2d835a);}}function _0x4c3e92(_0x1a1fc3){try{_0x21073b(_0xe43f8f['throw'](_0x1a1fc3));}catch(_0x4db35e){_0x2157ab(_0x4db35e);}}function _0x21073b(_0x575dfe){_0x575dfe['done']?_0x4eff43(_0x575dfe['value']):_0x18a546(_0x575dfe['value'])['then'](_0x497bd3,_0x4c3e92);}_0x21073b((_0xe43f8f=_0xe43f8f['apply'](_0x531762,_0x175bf5||[]))['next']());});};class AccountService{constructor(_0x390ff8){this['fetch']=_0x390ff8;}['get'](_0x4893a8,_0x2414d0){return __awaiter$4(this,void 0,void 0,function*(){const _0x3cf12a='Account/'+_0x4893a8+'/',_0x51d61=yield this['fetch']['get'](_0x3cf12a,_0x2414d0);try{if(_0x51d61['status']>0xc7&&_0x51d61['status']<0x12c){const _0x2894da=yield _0x51d61['json']();return new SuccessfulAccountResponse(_0x2894da);}const _0x420179=yield _0x51d61['json']();return new FailedAccountResponse(_0x420179);}catch(_0x4008c3){if(_0x4008c3 instanceof Error)return new FailedAccountResponse({'detail':_0x4008c3['message'],'title':_0x4008c3['name'],'status':0x1f4,'instance':'','type':''});throw _0x4008c3;}});}}
|
|
8
8
|
|
|
9
|
-
var __awaiter$3=undefined&&undefined['__awaiter']||function(
|
|
9
|
+
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x207e83,_0x1dbc3c,_0x387f76,_0x3121fe){function _0x304c76(_0x384f39){return _0x384f39 instanceof _0x387f76?_0x384f39:new _0x387f76(function(_0x587761){_0x587761(_0x384f39);});}return new(_0x387f76||(_0x387f76=Promise))(function(_0x126fcb,_0x1b24a9){function _0x4fe45c(_0x3800eb){try{_0x426517(_0x3121fe['next'](_0x3800eb));}catch(_0x226c11){_0x1b24a9(_0x226c11);}}function _0x4cb852(_0x11ba92){try{_0x426517(_0x3121fe['throw'](_0x11ba92));}catch(_0x398f20){_0x1b24a9(_0x398f20);}}function _0x426517(_0x353178){_0x353178['done']?_0x126fcb(_0x353178['value']):_0x304c76(_0x353178['value'])['then'](_0x4fe45c,_0x4cb852);}_0x426517((_0x3121fe=_0x3121fe['apply'](_0x207e83,_0x1dbc3c||[]))['next']());});};class ApiKeyService{constructor(_0x386c95){this['fetch']=_0x386c95;}['create'](_0x3387cc,_0x4003b0,_0x358fa8){return __awaiter$3(this,void 0,void 0,function*(){const _0x134125='api-key/create',_0x364c26={'account_name':_0x3387cc,'api_key_name':_0x4003b0};try{const _0x574fd9=yield this['fetch']['post'](_0x134125,_0x358fa8,_0x364c26);if(_0x574fd9['status']>0xc7&&_0x574fd9['status']<0x12c){const _0x509ffa=yield _0x574fd9['json']();return new SuccessfulApiKeyResponse(_0x509ffa);}const _0x4971b0=yield _0x574fd9['json']();return new FailedApiKeyResponse(_0x4971b0);}catch(_0xc4c25b){if(_0xc4c25b instanceof Error)return new FailedApiKeyResponse({'detail':_0xc4c25b['message'],'title':_0xc4c25b['name'],'status':0x1f4,'instance':'','type':''});throw _0xc4c25b;}});}['view'](_0x544f61,_0x5d87b1,_0x34007e){return __awaiter$3(this,void 0,void 0,function*(){const _0x3e171d='api-key/'+_0x544f61+'/'+_0x5d87b1;try{const _0x488480=yield this['fetch']['get'](_0x3e171d,_0x34007e);if(_0x488480['status']>0xc7&&_0x488480['status']<0x12c){const _0x42fb01=yield _0x488480['json']();return new SuccessfulApiKeyValueResponse(_0x42fb01);}const _0x551b70=yield _0x488480['json']();return new FailedApiKeyValueResponse(_0x551b70);}catch(_0x52ab9b){if(_0x52ab9b instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x52ab9b['message'],'title':_0x52ab9b['name'],'status':0x1f4,'instance':'','type':''});throw _0x52ab9b;}});}}
|
|
10
10
|
|
|
11
|
-
var __awaiter$2=undefined&&undefined['__awaiter']||function(
|
|
11
|
+
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x491130,_0x2825c7,_0x2ec2db,_0x43e9f4){function _0x28ffd9(_0x401156){return _0x401156 instanceof _0x2ec2db?_0x401156:new _0x2ec2db(function(_0x1d145c){_0x1d145c(_0x401156);});}return new(_0x2ec2db||(_0x2ec2db=Promise))(function(_0x19c23a,_0x3a7e04){function _0x1d5a54(_0xc222d1){try{_0x1f7415(_0x43e9f4['next'](_0xc222d1));}catch(_0x1bc98a){_0x3a7e04(_0x1bc98a);}}function _0x2d7d92(_0x30b4ff){try{_0x1f7415(_0x43e9f4['throw'](_0x30b4ff));}catch(_0x58acfb){_0x3a7e04(_0x58acfb);}}function _0x1f7415(_0x2eaac7){_0x2eaac7['done']?_0x19c23a(_0x2eaac7['value']):_0x28ffd9(_0x2eaac7['value'])['then'](_0x1d5a54,_0x2d7d92);}_0x1f7415((_0x43e9f4=_0x43e9f4['apply'](_0x491130,_0x2825c7||[]))['next']());});};class ListService{constructor(_0x35bcb0){this['fetch']=_0x35bcb0;}['add'](_0x1fc80c,_0x7cf528,_0x51c213){return __awaiter$2(this,void 0,void 0,function*(){const _0xad2969='List',_0x5a9679={'account_name':_0x1fc80c,'list_name':_0x7cf528};try{const _0x2f3075=yield this['fetch']['post'](_0xad2969,_0x51c213,_0x5a9679);if(_0x2f3075['status']>0xc7&&_0x2f3075['status']<0x12c){const _0x58eacd=yield _0x2f3075['json']();return new SuccessfulAccountResponse(_0x58eacd);}const _0x239567=yield _0x2f3075['json']();return new FailedAccountResponse(_0x239567);}catch(_0x36b399){if(_0x36b399 instanceof Error)return new FailedAccountResponse({'detail':_0x36b399['message'],'title':_0x36b399['name'],'status':0x1f4,'instance':'','type':''});throw _0x36b399;}});}['remove'](_0x4faa08,_0x16896b,_0x291314){return __awaiter$2(this,void 0,void 0,function*(){const _0x2b066b='List/'+_0x4faa08+'/'+_0x16896b,_0x2f29a6=yield this['fetch']['delete'](_0x2b066b,_0x291314);try{if(_0x2f29a6['status']>0xc7&&_0x2f29a6['status']<0x12c){const _0x2b6158=yield _0x2f29a6['json']();return new SuccessfulAccountResponse(_0x2b6158);}const _0x4b1bee=yield _0x2f29a6['json']();return new FailedAccountResponse(_0x4b1bee);}catch(_0x405500){if(_0x405500 instanceof Error)return new FailedAccountResponse({'detail':_0x405500['message'],'title':_0x405500['name'],'status':0x1f4,'instance':'','type':''});throw _0x405500;}});}}
|
|
12
12
|
|
|
13
|
-
var __awaiter$1=undefined&&undefined['__awaiter']||function(
|
|
13
|
+
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x2e8ab7,_0x176730,_0x89b6e6,_0x58d652){function _0x36e8af(_0x24b51e){return _0x24b51e instanceof _0x89b6e6?_0x24b51e:new _0x89b6e6(function(_0x31ec17){_0x31ec17(_0x24b51e);});}return new(_0x89b6e6||(_0x89b6e6=Promise))(function(_0x1b1675,_0x5e986f){function _0x38f1ce(_0x41fc1f){try{_0xcd75c5(_0x58d652['next'](_0x41fc1f));}catch(_0x5783f9){_0x5e986f(_0x5783f9);}}function _0x413a16(_0x2adbaf){try{_0xcd75c5(_0x58d652['throw'](_0x2adbaf));}catch(_0xe0a7af){_0x5e986f(_0xe0a7af);}}function _0xcd75c5(_0x4d180b){_0x4d180b['done']?_0x1b1675(_0x4d180b['value']):_0x36e8af(_0x4d180b['value'])['then'](_0x38f1ce,_0x413a16);}_0xcd75c5((_0x58d652=_0x58d652['apply'](_0x2e8ab7,_0x176730||[]))['next']());});};class Fetch{constructor(_0x1db8f0){this['baseUri']=_0x1db8f0,this['getUrl']=_0x2a4574=>{return _0x2a4574['startsWith']('/')&&(_0x2a4574=_0x2a4574['replace']('/','')),''+this['baseUri']+_0x2a4574;},!_0x1db8f0['endsWith']('/')&&(_0x1db8f0=_0x1db8f0+'/');}['get'](_0x4441a3,_0x4fe5e8){return __awaiter$1(this,void 0,void 0,function*(){const _0x5cdc09=this['getUrl'](_0x4441a3);return yield fetch(_0x5cdc09,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4fe5e8}});});}['post'](_0x3d19e3,_0x37d78c,_0x4571f6){return __awaiter$1(this,void 0,void 0,function*(){const _0x3a2aad=this['getUrl'](_0x3d19e3);return yield fetch(_0x3a2aad,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x37d78c},'body':_0x4571f6?JSON['stringify'](_0x4571f6):null});});}['put'](_0x4d9569,_0x2787ea,_0x33e690){return __awaiter$1(this,void 0,void 0,function*(){const _0x168969=this['getUrl'](_0x4d9569);return yield fetch(_0x168969,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2787ea},'body':_0x33e690?JSON['stringify'](_0x33e690):null});});}['delete'](_0x347355,_0x157c74){return __awaiter$1(this,void 0,void 0,function*(){const _0x1c8270=this['getUrl'](_0x347355);return yield fetch(_0x1c8270,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x157c74}});});}}
|
|
14
14
|
|
|
15
|
-
var __awaiter=undefined&&undefined['__awaiter']||function(
|
|
15
|
+
var __awaiter=undefined&&undefined['__awaiter']||function(_0x848a6d,_0x1dc36e,_0x1aff4f,_0x280c26){function _0x27e531(_0x266fdb){return _0x266fdb instanceof _0x1aff4f?_0x266fdb:new _0x1aff4f(function(_0x371537){_0x371537(_0x266fdb);});}return new(_0x1aff4f||(_0x1aff4f=Promise))(function(_0x483fb6,_0x37def1){function _0x24fcf2(_0x28b4b0){try{_0x1304d8(_0x280c26['next'](_0x28b4b0));}catch(_0x497713){_0x37def1(_0x497713);}}function _0x275543(_0x1a35ce){try{_0x1304d8(_0x280c26['throw'](_0x1a35ce));}catch(_0x112286){_0x37def1(_0x112286);}}function _0x1304d8(_0x31e3eb){_0x31e3eb['done']?_0x483fb6(_0x31e3eb['value']):_0x27e531(_0x31e3eb['value'])['then'](_0x24fcf2,_0x275543);}_0x1304d8((_0x280c26=_0x280c26['apply'](_0x848a6d,_0x1dc36e||[]))['next']());});};class AdminClient{constructor(_0x9519ae='https://admin.searchability.dev/'){var _0x2e09fd=new Fetch(_0x9519ae);this['Accounts']=new AccountService(_0x2e09fd),this['Lists']=new ListService(_0x2e09fd),this['ApiKeys']=new ApiKeyService(_0x2e09fd);}}class AuthClient{constructor(_0x5d9b36='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x5d9b36);}['login'](_0x4a3c12){return __awaiter(this,void 0,void 0,function*(){var _0x28e03e='login/'+_0x4a3c12;try{const _0x1b0554=yield yield fetch(_0x28e03e);if(_0x1b0554['status']>0xc7&&_0x1b0554['status']<0x12c){const _0x44c716=yield _0x1b0554['json']();return new SuccessfulAuthResponse(_0x44c716);}const _0x197cfd=yield _0x1b0554['json']();return new FailedAuthResponse(_0x197cfd);}catch(_0x28e374){if(_0x28e374 instanceof Error)return new FailedAuthResponse({'detail':_0x28e374['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x28e374;}});}['refresh'](_0x13b06f){return __awaiter(this,void 0,void 0,function*(){var _0x1fbfdd='refresh';try{const _0x384c23=yield this['fetch']['post'](_0x1fbfdd,_0x13b06f,null);if(_0x384c23['status']>0xc7&&_0x384c23['status']<0x12c){const _0x394572=yield _0x384c23['json']();return new SuccessfulAuthResponse(_0x394572);}const _0x21a334=yield _0x384c23['json']();return new FailedAuthResponse(_0x21a334);}catch(_0x387e98){if(_0x387e98 instanceof Error)return new FailedAuthResponse({'detail':_0x387e98['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x387e98;}});}}
|
|
16
16
|
|
|
17
17
|
exports.AdminClient = AdminClient;
|
|
18
18
|
exports.AuthClient = AuthClient;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
var TokenStatus;(function(
|
|
1
|
+
var TokenStatus;(function(_0x5d703e){_0x5d703e[_0x5d703e['Ok']=0x0]='Ok',_0x5d703e[_0x5d703e['Refresh']=0x1]='Refresh',_0x5d703e[_0x5d703e['Expired']=0x2]='Expired';}(TokenStatus||(TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}['getStatus'](){if(Date['now']()<this['access_expires'])return TokenStatus['Ok'];if(Date['now']()<this['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
|
|
2
2
|
|
|
3
|
-
class Response{constructor(
|
|
3
|
+
class Response{constructor(_0x387506){this['isSuccess']=_0x387506;}}class SuccessfulAccountResponse extends Response{constructor(_0x89a323){super(!![]),this['account']=_0x89a323;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x665556){super(![]),this['problem']=_0x665556;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x582e53){super(!![]),this['tokens']=_0x582e53;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x3be4ee){super(![]),this['problem']=_0x3be4ee;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x4d20a1){super(!![]),this['apiKey']=_0x4d20a1;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x5017b8){super(![]),this['problem']=_0x5017b8;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x55b0f6){super(!![]),this['apiKeyValue']=_0x55b0f6;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyValueResponse extends Response{constructor(_0x1b6139){super(![]),this['problem']=_0x1b6139;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
|
|
4
4
|
|
|
5
|
-
var __awaiter$4=undefined&&undefined['__awaiter']||function(
|
|
5
|
+
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x849e64,_0x136380,_0x42f3b7,_0x139eef){function _0xaf93b7(_0x423099){return _0x423099 instanceof _0x42f3b7?_0x423099:new _0x42f3b7(function(_0x19ce50){_0x19ce50(_0x423099);});}return new(_0x42f3b7||(_0x42f3b7=Promise))(function(_0x3f173a,_0xdb9568){function _0x37d019(_0x473b62){try{_0x54f127(_0x139eef['next'](_0x473b62));}catch(_0x497059){_0xdb9568(_0x497059);}}function _0x11eea1(_0x107b10){try{_0x54f127(_0x139eef['throw'](_0x107b10));}catch(_0x944ff4){_0xdb9568(_0x944ff4);}}function _0x54f127(_0x33fc91){_0x33fc91['done']?_0x3f173a(_0x33fc91['value']):_0xaf93b7(_0x33fc91['value'])['then'](_0x37d019,_0x11eea1);}_0x54f127((_0x139eef=_0x139eef['apply'](_0x849e64,_0x136380||[]))['next']());});};class AccountService{constructor(_0x3a87f4){this['fetch']=_0x3a87f4;}['get'](_0x516520,_0x1a6a94){return __awaiter$4(this,void 0,void 0,function*(){const _0x370013='Account/'+_0x516520+'/',_0x196ce4=yield this['fetch']['get'](_0x370013,_0x1a6a94);try{if(_0x196ce4['status']>0xc7&&_0x196ce4['status']<0x12c){const _0x2e48db=yield _0x196ce4['json']();return new SuccessfulAccountResponse(_0x2e48db);}const _0x87563d=yield _0x196ce4['json']();return new FailedAccountResponse(_0x87563d);}catch(_0x3d4b98){if(_0x3d4b98 instanceof Error)return new FailedAccountResponse({'detail':_0x3d4b98['message'],'title':_0x3d4b98['name'],'status':0x1f4,'instance':'','type':''});throw _0x3d4b98;}});}}
|
|
6
6
|
|
|
7
|
-
var __awaiter$3=undefined&&undefined['__awaiter']||function(
|
|
7
|
+
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x3414dc,_0x33026e,_0x470d3d,_0x36cbf4){function _0xf3e318(_0x31676e){return _0x31676e instanceof _0x470d3d?_0x31676e:new _0x470d3d(function(_0x596415){_0x596415(_0x31676e);});}return new(_0x470d3d||(_0x470d3d=Promise))(function(_0x189c25,_0x289e26){function _0xce37dc(_0x31958b){try{_0x43f530(_0x36cbf4['next'](_0x31958b));}catch(_0xc9fdf){_0x289e26(_0xc9fdf);}}function _0x1a399c(_0x4814a3){try{_0x43f530(_0x36cbf4['throw'](_0x4814a3));}catch(_0x410ffd){_0x289e26(_0x410ffd);}}function _0x43f530(_0x519dbe){_0x519dbe['done']?_0x189c25(_0x519dbe['value']):_0xf3e318(_0x519dbe['value'])['then'](_0xce37dc,_0x1a399c);}_0x43f530((_0x36cbf4=_0x36cbf4['apply'](_0x3414dc,_0x33026e||[]))['next']());});};class ApiKeyService{constructor(_0x2a4caf){this['fetch']=_0x2a4caf;}['create'](_0x3e3b81,_0x2077a0,_0x2be6b4){return __awaiter$3(this,void 0,void 0,function*(){const _0x520534='api-key/create',_0x4b5376={'account_name':_0x3e3b81,'api_key_name':_0x2077a0};try{const _0x471e65=yield this['fetch']['post'](_0x520534,_0x2be6b4,_0x4b5376);if(_0x471e65['status']>0xc7&&_0x471e65['status']<0x12c){const _0x19f965=yield _0x471e65['json']();return new SuccessfulApiKeyResponse(_0x19f965);}const _0x19e753=yield _0x471e65['json']();return new FailedApiKeyResponse(_0x19e753);}catch(_0x264e68){if(_0x264e68 instanceof Error)return new FailedApiKeyResponse({'detail':_0x264e68['message'],'title':_0x264e68['name'],'status':0x1f4,'instance':'','type':''});throw _0x264e68;}});}['view'](_0x2adfbf,_0x136cfc,_0x41a4c6){return __awaiter$3(this,void 0,void 0,function*(){const _0x29fa26='api-key/'+_0x2adfbf+'/'+_0x136cfc;try{const _0x20a73e=yield this['fetch']['get'](_0x29fa26,_0x41a4c6);if(_0x20a73e['status']>0xc7&&_0x20a73e['status']<0x12c){const _0x2c9cc7=yield _0x20a73e['json']();return new SuccessfulApiKeyValueResponse(_0x2c9cc7);}const _0x4d726a=yield _0x20a73e['json']();return new FailedApiKeyValueResponse(_0x4d726a);}catch(_0x1ad116){if(_0x1ad116 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x1ad116['message'],'title':_0x1ad116['name'],'status':0x1f4,'instance':'','type':''});throw _0x1ad116;}});}}
|
|
8
8
|
|
|
9
|
-
var __awaiter$2=undefined&&undefined['__awaiter']||function(
|
|
9
|
+
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x2b14fb,_0x3084fd,_0x416fb5,_0x31ee6a){function _0x174c12(_0x51bffe){return _0x51bffe instanceof _0x416fb5?_0x51bffe:new _0x416fb5(function(_0xd953c9){_0xd953c9(_0x51bffe);});}return new(_0x416fb5||(_0x416fb5=Promise))(function(_0x46cc68,_0x228743){function _0x22fe77(_0x3f8826){try{_0x3a5fe7(_0x31ee6a['next'](_0x3f8826));}catch(_0x47d7fe){_0x228743(_0x47d7fe);}}function _0x5cdac9(_0x50e044){try{_0x3a5fe7(_0x31ee6a['throw'](_0x50e044));}catch(_0x307dd4){_0x228743(_0x307dd4);}}function _0x3a5fe7(_0x5b6de5){_0x5b6de5['done']?_0x46cc68(_0x5b6de5['value']):_0x174c12(_0x5b6de5['value'])['then'](_0x22fe77,_0x5cdac9);}_0x3a5fe7((_0x31ee6a=_0x31ee6a['apply'](_0x2b14fb,_0x3084fd||[]))['next']());});};class ListService{constructor(_0x17bb65){this['fetch']=_0x17bb65;}['add'](_0x19dfd3,_0x194128,_0x4eb165){return __awaiter$2(this,void 0,void 0,function*(){const _0x394da7='List',_0x52d6ee={'account_name':_0x19dfd3,'list_name':_0x194128};try{const _0x3d17b0=yield this['fetch']['post'](_0x394da7,_0x4eb165,_0x52d6ee);if(_0x3d17b0['status']>0xc7&&_0x3d17b0['status']<0x12c){const _0x4e73dc=yield _0x3d17b0['json']();return new SuccessfulAccountResponse(_0x4e73dc);}const _0xa136fd=yield _0x3d17b0['json']();return new FailedAccountResponse(_0xa136fd);}catch(_0x291b49){if(_0x291b49 instanceof Error)return new FailedAccountResponse({'detail':_0x291b49['message'],'title':_0x291b49['name'],'status':0x1f4,'instance':'','type':''});throw _0x291b49;}});}['remove'](_0x412580,_0x543ae8,_0x9873d7){return __awaiter$2(this,void 0,void 0,function*(){const _0x235c53='List/'+_0x412580+'/'+_0x543ae8,_0x20c05b=yield this['fetch']['delete'](_0x235c53,_0x9873d7);try{if(_0x20c05b['status']>0xc7&&_0x20c05b['status']<0x12c){const _0xdcd8dd=yield _0x20c05b['json']();return new SuccessfulAccountResponse(_0xdcd8dd);}const _0x1cadf0=yield _0x20c05b['json']();return new FailedAccountResponse(_0x1cadf0);}catch(_0x14463d){if(_0x14463d instanceof Error)return new FailedAccountResponse({'detail':_0x14463d['message'],'title':_0x14463d['name'],'status':0x1f4,'instance':'','type':''});throw _0x14463d;}});}}
|
|
10
10
|
|
|
11
|
-
var __awaiter$1=undefined&&undefined['__awaiter']||function(
|
|
11
|
+
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x121dfa,_0xac0ade,_0x5c0fe6,_0x3f036c){function _0x24aeed(_0x444201){return _0x444201 instanceof _0x5c0fe6?_0x444201:new _0x5c0fe6(function(_0x37dd5a){_0x37dd5a(_0x444201);});}return new(_0x5c0fe6||(_0x5c0fe6=Promise))(function(_0x36d6b0,_0xdca99b){function _0x3b43ce(_0x59bec1){try{_0x3afbcd(_0x3f036c['next'](_0x59bec1));}catch(_0x1967e3){_0xdca99b(_0x1967e3);}}function _0x201714(_0x3ba3a5){try{_0x3afbcd(_0x3f036c['throw'](_0x3ba3a5));}catch(_0x29fc9a){_0xdca99b(_0x29fc9a);}}function _0x3afbcd(_0x4032c4){_0x4032c4['done']?_0x36d6b0(_0x4032c4['value']):_0x24aeed(_0x4032c4['value'])['then'](_0x3b43ce,_0x201714);}_0x3afbcd((_0x3f036c=_0x3f036c['apply'](_0x121dfa,_0xac0ade||[]))['next']());});};class Fetch{constructor(_0x4ab113){this['baseUri']=_0x4ab113,this['getUrl']=_0x19c4a1=>{return _0x19c4a1['startsWith']('/')&&(_0x19c4a1=_0x19c4a1['replace']('/','')),''+this['baseUri']+_0x19c4a1;},!_0x4ab113['endsWith']('/')&&(_0x4ab113=_0x4ab113+'/');}['get'](_0x199cef,_0x293b89){return __awaiter$1(this,void 0,void 0,function*(){const _0x4fa28c=this['getUrl'](_0x199cef);return yield fetch(_0x4fa28c,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x293b89}});});}['post'](_0x5e0185,_0x32a104,_0x5efa0f){return __awaiter$1(this,void 0,void 0,function*(){const _0x3f54bc=this['getUrl'](_0x5e0185);return yield fetch(_0x3f54bc,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x32a104},'body':_0x5efa0f?JSON['stringify'](_0x5efa0f):null});});}['put'](_0x1fbba0,_0x3c0b1f,_0x2b7189){return __awaiter$1(this,void 0,void 0,function*(){const _0x4e0205=this['getUrl'](_0x1fbba0);return yield fetch(_0x4e0205,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3c0b1f},'body':_0x2b7189?JSON['stringify'](_0x2b7189):null});});}['delete'](_0x4d3509,_0x49b084){return __awaiter$1(this,void 0,void 0,function*(){const _0x334c1b=this['getUrl'](_0x4d3509);return yield fetch(_0x334c1b,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x49b084}});});}}
|
|
12
12
|
|
|
13
|
-
var __awaiter=undefined&&undefined['__awaiter']||function(
|
|
13
|
+
var __awaiter=undefined&&undefined['__awaiter']||function(_0x4b1918,_0x485782,_0x233c49,_0x4aa62c){function _0x1ecf15(_0x2d5581){return _0x2d5581 instanceof _0x233c49?_0x2d5581:new _0x233c49(function(_0x5415c1){_0x5415c1(_0x2d5581);});}return new(_0x233c49||(_0x233c49=Promise))(function(_0x4f6f76,_0x1afa2e){function _0x23d772(_0x2ca96b){try{_0x2e1861(_0x4aa62c['next'](_0x2ca96b));}catch(_0x6989ef){_0x1afa2e(_0x6989ef);}}function _0x45c3a7(_0xebacdd){try{_0x2e1861(_0x4aa62c['throw'](_0xebacdd));}catch(_0x2ed3fd){_0x1afa2e(_0x2ed3fd);}}function _0x2e1861(_0x3e17e2){_0x3e17e2['done']?_0x4f6f76(_0x3e17e2['value']):_0x1ecf15(_0x3e17e2['value'])['then'](_0x23d772,_0x45c3a7);}_0x2e1861((_0x4aa62c=_0x4aa62c['apply'](_0x4b1918,_0x485782||[]))['next']());});};class AdminClient{constructor(_0x2d0f5b='https://admin.searchability.dev/'){var _0x454a30=new Fetch(_0x2d0f5b);this['Accounts']=new AccountService(_0x454a30),this['Lists']=new ListService(_0x454a30),this['ApiKeys']=new ApiKeyService(_0x454a30);}}class AuthClient{constructor(_0x5c8248='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x5c8248);}['login'](_0x34b02b){return __awaiter(this,void 0,void 0,function*(){var _0x9dedcd='login/'+_0x34b02b;try{const _0x2c3c38=yield yield fetch(_0x9dedcd);if(_0x2c3c38['status']>0xc7&&_0x2c3c38['status']<0x12c){const _0x2e37b=yield _0x2c3c38['json']();return new SuccessfulAuthResponse(_0x2e37b);}const _0x5c1d8f=yield _0x2c3c38['json']();return new FailedAuthResponse(_0x5c1d8f);}catch(_0xa8311){if(_0xa8311 instanceof Error)return new FailedAuthResponse({'detail':_0xa8311['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0xa8311;}});}['refresh'](_0x1c999f){return __awaiter(this,void 0,void 0,function*(){var _0x22ccb7='refresh';try{const _0x28c19d=yield this['fetch']['post'](_0x22ccb7,_0x1c999f,null);if(_0x28c19d['status']>0xc7&&_0x28c19d['status']<0x12c){const _0x2d23ce=yield _0x28c19d['json']();return new SuccessfulAuthResponse(_0x2d23ce);}const _0x24fe67=yield _0x28c19d['json']();return new FailedAuthResponse(_0x24fe67);}catch(_0x3a7b70){if(_0x3a7b70 instanceof Error)return new FailedAuthResponse({'detail':_0x3a7b70['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x3a7b70;}});}}
|
|
14
14
|
|
|
15
15
|
export { AdminClient, AuthClient, TokenStatus, Tokens };
|
package/dist/types.d.ts
CHANGED
|
@@ -1,3 +1,33 @@
|
|
|
1
|
+
declare class Fetch {
|
|
2
|
+
readonly baseUri: string;
|
|
3
|
+
constructor(baseUri: string);
|
|
4
|
+
private getUrl;
|
|
5
|
+
get(path: string, accessToken: string): Promise<globalThis.Response>;
|
|
6
|
+
post(path: string, accessToken: string, body: any): Promise<globalThis.Response>;
|
|
7
|
+
put(path: string, accessToken: string, body: any): Promise<globalThis.Response>;
|
|
8
|
+
delete(path: string, accessToken: string): Promise<globalThis.Response>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
declare class AccountService {
|
|
12
|
+
readonly fetch: Fetch;
|
|
13
|
+
constructor(fetch: Fetch);
|
|
14
|
+
get(accountName: string, access_token: string): Promise<Response<Account, Problem>>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare class ApiKeyService {
|
|
18
|
+
readonly fetch: Fetch;
|
|
19
|
+
constructor(fetch: Fetch);
|
|
20
|
+
create(account_name: string, api_key_Name: string, access_token: string): Promise<Response<ApiKey, Problem>>;
|
|
21
|
+
view(account_name: string, api_key_name: string, access_token: string): Promise<Response<ApiKeyValue, Problem>>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare class ListService {
|
|
25
|
+
readonly fetch: Fetch;
|
|
26
|
+
constructor(fetch: Fetch);
|
|
27
|
+
add(accountName: string, listName: string, access_token: string): Promise<Response<Account, Problem>>;
|
|
28
|
+
remove(accountName: string, listName: string, access_token: string): Promise<Response<Account, Problem>>;
|
|
29
|
+
}
|
|
30
|
+
|
|
1
31
|
declare enum TokenStatus {
|
|
2
32
|
Ok = 0,
|
|
3
33
|
Refresh = 1,
|
|
@@ -11,6 +41,19 @@ declare class Tokens {
|
|
|
11
41
|
getStatus(): TokenStatus;
|
|
12
42
|
}
|
|
13
43
|
|
|
44
|
+
declare class AdminClient {
|
|
45
|
+
constructor(baseUri?: string);
|
|
46
|
+
readonly Accounts: AccountService;
|
|
47
|
+
readonly Lists: ListService;
|
|
48
|
+
readonly ApiKeys: ApiKeyService;
|
|
49
|
+
}
|
|
50
|
+
declare class AuthClient {
|
|
51
|
+
private readonly fetch;
|
|
52
|
+
constructor(baseUri?: string);
|
|
53
|
+
login(apiKey: string): Promise<Response<Tokens, Problem>>;
|
|
54
|
+
refresh(refreshToken: string): Promise<Response<Tokens, Problem>>;
|
|
55
|
+
}
|
|
56
|
+
|
|
14
57
|
declare abstract class Response<S, F> {
|
|
15
58
|
readonly isSuccess: boolean;
|
|
16
59
|
constructor(isSuccess: boolean);
|
|
@@ -103,4 +146,4 @@ declare class FailedApiKeyValueResponse extends Response<ApiKeyValue, Problem> {
|
|
|
103
146
|
toProblem(): Problem;
|
|
104
147
|
}
|
|
105
148
|
|
|
106
|
-
export { type Account, type ApiKey, type ApiKeyValue, type Error, FailedAccountResponse, FailedApiKeyResponse, FailedApiKeyValueResponse, FailedAuthResponse, type List, type ListIdentity, type Problem, Response, SuccessfulAccountResponse, SuccessfulApiKeyResponse, SuccessfulApiKeyValueResponse, SuccessfulAuthResponse, TokenStatus, Tokens };
|
|
149
|
+
export { type Account, AdminClient, type ApiKey, type ApiKeyValue, AuthClient, type Error, FailedAccountResponse, FailedApiKeyResponse, FailedApiKeyValueResponse, FailedAuthResponse, type List, type ListIdentity, type Problem, Response, SuccessfulAccountResponse, SuccessfulApiKeyResponse, SuccessfulApiKeyValueResponse, SuccessfulAuthResponse, TokenStatus, Tokens };
|
package/package.json
CHANGED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
var TokenStatus;(function(_0x43a3e9){_0x43a3e9[_0x43a3e9['Ok']=0x0]='Ok',_0x43a3e9[_0x43a3e9['Refresh']=0x1]='Refresh',_0x43a3e9[_0x43a3e9['Expired']=0x2]='Expired';}(TokenStatus||(TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}['getStatus'](){if(Date['now']()<this['access_expires'])return TokenStatus['Ok'];if(Date['now']()<this['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
|
|
2
|
-
|
|
3
|
-
class Response{constructor(_0x389d22){this['isSuccess']=_0x389d22;}}class SuccessfulAccountResponse extends Response{constructor(_0x4f3bad){super(!![]),this['account']=_0x4f3bad;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x29c16c){super(![]),this['problem']=_0x29c16c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x2e67be){super(!![]),this['tokens']=_0x2e67be;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x1b4c1f){super(![]),this['problem']=_0x1b4c1f;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x370faa){super(!![]),this['apiKey']=_0x370faa;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x32a7e4){super(![]),this['problem']=_0x32a7e4;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x30c94f){super(!![]),this['apiKeyValue']=_0x30c94f;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyValueResponse extends Response{constructor(_0x30b6ea){super(![]),this['problem']=_0x30b6ea;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
|
|
4
|
-
|
|
5
|
-
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x163416,_0x37ca36,_0x42c69d,_0x3a8135){function _0x462c76(_0x1d24e1){return _0x1d24e1 instanceof _0x42c69d?_0x1d24e1:new _0x42c69d(function(_0x5be231){_0x5be231(_0x1d24e1);});}return new(_0x42c69d||(_0x42c69d=Promise))(function(_0x15d1e3,_0x44dba2){function _0x45157f(_0x1cf6fe){try{_0xa7f89b(_0x3a8135['next'](_0x1cf6fe));}catch(_0x267a65){_0x44dba2(_0x267a65);}}function _0x3ad566(_0x72306e){try{_0xa7f89b(_0x3a8135['throw'](_0x72306e));}catch(_0x564b31){_0x44dba2(_0x564b31);}}function _0xa7f89b(_0x43f9f0){_0x43f9f0['done']?_0x15d1e3(_0x43f9f0['value']):_0x462c76(_0x43f9f0['value'])['then'](_0x45157f,_0x3ad566);}_0xa7f89b((_0x3a8135=_0x3a8135['apply'](_0x163416,_0x37ca36||[]))['next']());});};class AccountService{constructor(_0x2d68d0){this['fetch']=_0x2d68d0;}['get'](_0x5f0a41,_0xabde2d){return __awaiter$4(this,void 0,void 0,function*(){const _0x33ebf5='Account/'+_0x5f0a41+'/',_0x5da5c3=yield this['fetch']['get'](_0x33ebf5,_0xabde2d);try{if(_0x5da5c3['status']>0xc7&&_0x5da5c3['status']<0x12c){const _0x39a793=yield _0x5da5c3['json']();return new SuccessfulAccountResponse(_0x39a793);}const _0x26fb69=yield _0x5da5c3['json']();return new FailedAccountResponse(_0x26fb69);}catch(_0x353b23){if(_0x353b23 instanceof Error)return new FailedAccountResponse({'detail':_0x353b23['message'],'title':_0x353b23['name'],'status':0x1f4,'instance':'','type':''});throw _0x353b23;}});}}
|
|
6
|
-
|
|
7
|
-
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x262fab,_0x3b86d1,_0x36bb2c,_0x30026e){function _0x24d99b(_0x42893e){return _0x42893e instanceof _0x36bb2c?_0x42893e:new _0x36bb2c(function(_0x57451f){_0x57451f(_0x42893e);});}return new(_0x36bb2c||(_0x36bb2c=Promise))(function(_0x4ec620,_0xc7ee48){function _0x3c4453(_0x122421){try{_0x337185(_0x30026e['next'](_0x122421));}catch(_0x4fffbf){_0xc7ee48(_0x4fffbf);}}function _0x1654b6(_0x1b8a48){try{_0x337185(_0x30026e['throw'](_0x1b8a48));}catch(_0x3862f7){_0xc7ee48(_0x3862f7);}}function _0x337185(_0x345526){_0x345526['done']?_0x4ec620(_0x345526['value']):_0x24d99b(_0x345526['value'])['then'](_0x3c4453,_0x1654b6);}_0x337185((_0x30026e=_0x30026e['apply'](_0x262fab,_0x3b86d1||[]))['next']());});};class ApiKeyService{constructor(_0x470dff){this['fetch']=_0x470dff;}['create'](_0x4243c1,_0x37444f,_0x10bc13){return __awaiter$3(this,void 0,void 0,function*(){const _0x40f228='api-key/create',_0x310721={'account_name':_0x4243c1,'api_key_name':_0x37444f};try{const _0x1208ac=yield this['fetch']['post'](_0x40f228,_0x10bc13,_0x310721);if(_0x1208ac['status']>0xc7&&_0x1208ac['status']<0x12c){const _0x1afcb1=yield _0x1208ac['json']();return new SuccessfulApiKeyResponse(_0x1afcb1);}const _0x391294=yield _0x1208ac['json']();return new FailedApiKeyResponse(_0x391294);}catch(_0x318f02){if(_0x318f02 instanceof Error)return new FailedApiKeyResponse({'detail':_0x318f02['message'],'title':_0x318f02['name'],'status':0x1f4,'instance':'','type':''});throw _0x318f02;}});}['view'](_0x892f2a,_0x2e80dd,_0x586b6f){return __awaiter$3(this,void 0,void 0,function*(){const _0x4081ea='api-key/'+_0x892f2a+'/'+_0x2e80dd;try{const _0x476d94=yield this['fetch']['get'](_0x4081ea,_0x586b6f);if(_0x476d94['status']>0xc7&&_0x476d94['status']<0x12c){const _0x40d3fc=yield _0x476d94['json']();return new SuccessfulApiKeyValueResponse(_0x40d3fc);}const _0xb89bae=yield _0x476d94['json']();return new FailedApiKeyValueResponse(_0xb89bae);}catch(_0x56eb97){if(_0x56eb97 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x56eb97['message'],'title':_0x56eb97['name'],'status':0x1f4,'instance':'','type':''});throw _0x56eb97;}});}}
|
|
8
|
-
|
|
9
|
-
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0xb11936,_0x1cc8a0,_0x594241,_0x314622){function _0x149d4e(_0xbb8957){return _0xbb8957 instanceof _0x594241?_0xbb8957:new _0x594241(function(_0x2912e7){_0x2912e7(_0xbb8957);});}return new(_0x594241||(_0x594241=Promise))(function(_0x271a6d,_0x1c1b28){function _0x468794(_0x72817){try{_0x280f3f(_0x314622['next'](_0x72817));}catch(_0x501bc6){_0x1c1b28(_0x501bc6);}}function _0x214605(_0x3b33f6){try{_0x280f3f(_0x314622['throw'](_0x3b33f6));}catch(_0xf9d0b9){_0x1c1b28(_0xf9d0b9);}}function _0x280f3f(_0x46dfcf){_0x46dfcf['done']?_0x271a6d(_0x46dfcf['value']):_0x149d4e(_0x46dfcf['value'])['then'](_0x468794,_0x214605);}_0x280f3f((_0x314622=_0x314622['apply'](_0xb11936,_0x1cc8a0||[]))['next']());});};class ListService{constructor(_0x25ab11){this['fetch']=_0x25ab11;}['add'](_0x25220a,_0x1a9635,_0x34d08f){return __awaiter$2(this,void 0,void 0,function*(){const _0x47d0fb='List',_0x38218a={'account_name':_0x25220a,'list_name':_0x1a9635};try{const _0x3defd6=yield this['fetch']['post'](_0x47d0fb,_0x34d08f,_0x38218a);if(_0x3defd6['status']>0xc7&&_0x3defd6['status']<0x12c){const _0x2366c0=yield _0x3defd6['json']();return new SuccessfulAccountResponse(_0x2366c0);}const _0xbbee2e=yield _0x3defd6['json']();return new FailedAccountResponse(_0xbbee2e);}catch(_0x25d9de){if(_0x25d9de instanceof Error)return new FailedAccountResponse({'detail':_0x25d9de['message'],'title':_0x25d9de['name'],'status':0x1f4,'instance':'','type':''});throw _0x25d9de;}});}['remove'](_0x3fb81e,_0x5a93de,_0x383896){return __awaiter$2(this,void 0,void 0,function*(){const _0x11070d='List/'+_0x3fb81e+'/'+_0x5a93de,_0x49c4b1=yield this['fetch']['delete'](_0x11070d,_0x383896);try{if(_0x49c4b1['status']>0xc7&&_0x49c4b1['status']<0x12c){const _0x32e640=yield _0x49c4b1['json']();return new SuccessfulAccountResponse(_0x32e640);}const _0x22044b=yield _0x49c4b1['json']();return new FailedAccountResponse(_0x22044b);}catch(_0x37b73b){if(_0x37b73b instanceof Error)return new FailedAccountResponse({'detail':_0x37b73b['message'],'title':_0x37b73b['name'],'status':0x1f4,'instance':'','type':''});throw _0x37b73b;}});}}
|
|
10
|
-
|
|
11
|
-
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x3a0aa6,_0x36ed0c,_0x17723a,_0x46ca6d){function _0x4ec0df(_0x183fd7){return _0x183fd7 instanceof _0x17723a?_0x183fd7:new _0x17723a(function(_0x3df152){_0x3df152(_0x183fd7);});}return new(_0x17723a||(_0x17723a=Promise))(function(_0x2ba4f6,_0x4db1ac){function _0x52373e(_0x56955b){try{_0x29ac38(_0x46ca6d['next'](_0x56955b));}catch(_0x4ecf2a){_0x4db1ac(_0x4ecf2a);}}function _0x32ec8f(_0x145113){try{_0x29ac38(_0x46ca6d['throw'](_0x145113));}catch(_0x94e5d7){_0x4db1ac(_0x94e5d7);}}function _0x29ac38(_0x28e7aa){_0x28e7aa['done']?_0x2ba4f6(_0x28e7aa['value']):_0x4ec0df(_0x28e7aa['value'])['then'](_0x52373e,_0x32ec8f);}_0x29ac38((_0x46ca6d=_0x46ca6d['apply'](_0x3a0aa6,_0x36ed0c||[]))['next']());});};class Fetch{constructor(_0x160807){this['baseUri']=_0x160807,this['getUrl']=_0x46c389=>{return _0x46c389['startsWith']('/')&&(_0x46c389=_0x46c389['replace']('/','')),''+this['baseUri']+_0x46c389;},!_0x160807['endsWith']('/')&&(_0x160807=_0x160807+'/');}['get'](_0x3ac39a,_0x1e75c0){return __awaiter$1(this,void 0,void 0,function*(){const _0x317ba4=this['getUrl'](_0x3ac39a);return yield fetch(_0x317ba4,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1e75c0}});});}['post'](_0x425840,_0x16cdee,_0x193835){return __awaiter$1(this,void 0,void 0,function*(){const _0x36a868=this['getUrl'](_0x425840);return yield fetch(_0x36a868,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x16cdee},'body':_0x193835?JSON['stringify'](_0x193835):null});});}['put'](_0x29feda,_0x1a402b,_0x3774a3){return __awaiter$1(this,void 0,void 0,function*(){const _0xa6f6c7=this['getUrl'](_0x29feda);return yield fetch(_0xa6f6c7,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1a402b},'body':_0x3774a3?JSON['stringify'](_0x3774a3):null});});}['delete'](_0x45a5dc,_0x26022a){return __awaiter$1(this,void 0,void 0,function*(){const _0x1aa108=this['getUrl'](_0x45a5dc);return yield fetch(_0x1aa108,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x26022a}});});}}
|
|
12
|
-
|
|
13
|
-
var __awaiter=undefined&&undefined['__awaiter']||function(_0x45f20e,_0x33786d,_0x178a37,_0x3d5cfc){function _0x2442f6(_0x52bfcd){return _0x52bfcd instanceof _0x178a37?_0x52bfcd:new _0x178a37(function(_0x2672d3){_0x2672d3(_0x52bfcd);});}return new(_0x178a37||(_0x178a37=Promise))(function(_0xd8f452,_0x352ed3){function _0x27dd72(_0x4e416b){try{_0x57a39c(_0x3d5cfc['next'](_0x4e416b));}catch(_0x31a93d){_0x352ed3(_0x31a93d);}}function _0xb6de21(_0x16cca2){try{_0x57a39c(_0x3d5cfc['throw'](_0x16cca2));}catch(_0x1ab15c){_0x352ed3(_0x1ab15c);}}function _0x57a39c(_0x33d849){_0x33d849['done']?_0xd8f452(_0x33d849['value']):_0x2442f6(_0x33d849['value'])['then'](_0x27dd72,_0xb6de21);}_0x57a39c((_0x3d5cfc=_0x3d5cfc['apply'](_0x45f20e,_0x33786d||[]))['next']());});};class AdminClient{constructor(_0x1757f8='https://admin.searchability.dev/'){var _0x40b818=new Fetch(_0x1757f8);this['Accounts']=new AccountService(_0x40b818),this['Lists']=new ListService(_0x40b818),this['ApiKeys']=new ApiKeyService(_0x40b818);}}class AuthClient{constructor(_0x4eb9c1='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x4eb9c1);}['login'](_0x278e02){return __awaiter(this,void 0,void 0,function*(){var _0x1ccb4b='login/'+_0x278e02;try{const _0x3916f7=yield yield fetch(_0x1ccb4b);if(_0x3916f7['status']>0xc7&&_0x3916f7['status']<0x12c){const _0x3544f6=yield _0x3916f7['json']();return new SuccessfulAuthResponse(_0x3544f6);}const _0x4c600c=yield _0x3916f7['json']();return new FailedAuthResponse(_0x4c600c);}catch(_0x2c559c){if(_0x2c559c instanceof Error)return new FailedAuthResponse({'detail':_0x2c559c['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x2c559c;}});}['refresh'](_0x20f420){return __awaiter(this,void 0,void 0,function*(){var _0x581872='refresh';try{const _0x1d73fc=yield this['fetch']['post'](_0x581872,_0x20f420,null);if(_0x1d73fc['status']>0xc7&&_0x1d73fc['status']<0x12c){const _0x301718=yield _0x1d73fc['json']();return new SuccessfulAuthResponse(_0x301718);}const _0x14c393=yield _0x1d73fc['json']();return new FailedAuthResponse(_0x14c393);}catch(_0x41740f){if(_0x41740f instanceof Error)return new FailedAuthResponse({'detail':_0x41740f['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x41740f;}});}}
|
|
14
|
-
|
|
15
|
-
export { AdminClient, AuthClient, TokenStatus, Tokens };
|