@searchability/admin-client 0.0.45 → 0.0.47

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(_0x4d3ec3){_0x4d3ec3[_0x4d3ec3['Ok']=0x0]='Ok',_0x4d3ec3[_0x4d3ec3['Refresh']=0x1]='Refresh',_0x4d3ec3[_0x4d3ec3['Expired']=0x2]='Expired';}(TokenStatus||(TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}}class Response{constructor(_0x5a8bf9){this['isSuccess']=_0x5a8bf9;}}class SuccessfulAccountResponse extends Response{constructor(_0xc5b5d6){super(!![]),this['account']=_0xc5b5d6;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListIdentityResponse extends Response{constructor(_0x34e2e5){super(!![]),this['list']=_0x34e2e5;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x3d4d06){super(![]),this['problem']=_0x3d4d06;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListIdentityResponse extends Response{constructor(_0x4d8bc8){super(![]),this['problem']=_0x4d8bc8;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x4dcd68){super(!![]),this['tokens']=_0x4dcd68;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x57b323){super(![]),this['problem']=_0x57b323;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x58d5d4){super(!![]),this['apiKey']=_0x58d5d4;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x343c8c){super(![]),this['problem']=_0x343c8c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x2c331a){super(!![]),this['searchService']=_0x2c331a;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x408c11){super(![]),this['problem']=_0x408c11;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x144831){super(!![]),this['searchService']=_0x144831;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListSearchServiceResponse extends Response{constructor(_0x2a4a0a){super(!![]),this['searchServices']=_0x2a4a0a;}['toSuccess'](){return this['searchServices'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServicesResponse extends Response{constructor(_0x8ad58f){super(![]),this['problem']=_0x8ad58f;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedViewSearchServiceResponse extends Response{constructor(_0x34bcd5){super(![]),this['problem']=_0x34bcd5;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x28f7bd){super(!![]),this['apiKeyValue']=_0x28f7bd;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x2be9de){super(!![]),this['obj']=_0x2be9de;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x3a625c){super(![]),this['problem']=_0x3a625c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x3b12bc){super(![]),this['problem']=_0x3b12bc;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
2
+
3
+ var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x411806,_0x2872c9,_0x3916ab,_0x6c2387){function _0x5b2571(_0x66a044){return _0x66a044 instanceof _0x3916ab?_0x66a044:new _0x3916ab(function(_0xd58f13){_0xd58f13(_0x66a044);});}return new(_0x3916ab||(_0x3916ab=Promise))(function(_0x326def,_0x5c9dd4){function _0x4042a0(_0x1f3c5b){try{_0x2cec99(_0x6c2387['next'](_0x1f3c5b));}catch(_0xd0f44){_0x5c9dd4(_0xd0f44);}}function _0x12820d(_0x5ec64c){try{_0x2cec99(_0x6c2387['throw'](_0x5ec64c));}catch(_0x2278f3){_0x5c9dd4(_0x2278f3);}}function _0x2cec99(_0x3aa1a6){_0x3aa1a6['done']?_0x326def(_0x3aa1a6['value']):_0x5b2571(_0x3aa1a6['value'])['then'](_0x4042a0,_0x12820d);}_0x2cec99((_0x6c2387=_0x6c2387['apply'](_0x411806,_0x2872c9||[]))['next']());});};class AccountService{constructor(_0x2a155f){this['fetch']=_0x2a155f;}['get'](_0xdd2fe1,_0x4ec5da){return __awaiter$5(this,void 0,void 0,function*(){const _0x2215c0='Account/'+_0xdd2fe1+'/',_0x11b54c=yield this['fetch']['get'](_0x2215c0,_0x4ec5da);try{if(_0x11b54c['status']>0xc7&&_0x11b54c['status']<0x12c){const _0x509dd7=yield _0x11b54c['json']();return new SuccessfulAccountResponse(_0x509dd7);}const _0xf66bfc=yield _0x11b54c['json']();return new FailedAccountResponse(_0xf66bfc);}catch(_0x4a19f4){if(_0x4a19f4 instanceof Error)return new FailedAccountResponse({'detail':_0x4a19f4['message'],'title':_0x4a19f4['name'],'status':0x1f4,'instance':'','type':''});throw _0x4a19f4;}});}}
4
+
5
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x1d1dff,_0x337777,_0x271aa1,_0x3d4ed8){function _0x2b53d0(_0x48c9c3){return _0x48c9c3 instanceof _0x271aa1?_0x48c9c3:new _0x271aa1(function(_0x1bd10f){_0x1bd10f(_0x48c9c3);});}return new(_0x271aa1||(_0x271aa1=Promise))(function(_0x5f1a85,_0x13d464){function _0x552692(_0x119763){try{_0x3c992e(_0x3d4ed8['next'](_0x119763));}catch(_0x26bf4e){_0x13d464(_0x26bf4e);}}function _0x34d525(_0x20e2b1){try{_0x3c992e(_0x3d4ed8['throw'](_0x20e2b1));}catch(_0x24709c){_0x13d464(_0x24709c);}}function _0x3c992e(_0x53be9b){_0x53be9b['done']?_0x5f1a85(_0x53be9b['value']):_0x2b53d0(_0x53be9b['value'])['then'](_0x552692,_0x34d525);}_0x3c992e((_0x3d4ed8=_0x3d4ed8['apply'](_0x1d1dff,_0x337777||[]))['next']());});};class ApiKeyService{constructor(_0x16dea8){this['fetch']=_0x16dea8,this['path']='api-key';}['create'](_0xd49a2d,_0x5bd8e0,_0x5ac2cf){return __awaiter$4(this,void 0,void 0,function*(){const _0x144524={'account_name':_0xd49a2d,'api_key_name':_0x5bd8e0};try{const _0x37afb6=yield this['fetch']['post'](this['path'],_0x5ac2cf,_0x144524);if(_0x37afb6['status']>0xc7&&_0x37afb6['status']<0x12c){const _0x2e82c1=yield _0x37afb6['json']();return new SuccessfulApiKeyResponse(_0x2e82c1);}const _0x5ee1c0=yield _0x37afb6['json']();return new FailedApiKeyResponse(_0x5ee1c0);}catch(_0x379419){if(_0x379419 instanceof Error)return new FailedApiKeyResponse({'detail':_0x379419['message'],'title':_0x379419['name'],'status':0x1f4,'instance':'','type':''});throw _0x379419;}});}['view'](_0x19f96e,_0x38996e,_0x464da0){return __awaiter$4(this,void 0,void 0,function*(){const _0x179fc6=this['path']+'/'+_0x19f96e+'/'+_0x38996e;try{const _0x328d99=yield this['fetch']['get'](_0x179fc6,_0x464da0);if(_0x328d99['status']>0xc7&&_0x328d99['status']<0x12c){const _0x58f415=yield _0x328d99['json']();return new SuccessfulApiKeyValueResponse(_0x58f415);}const _0x344524=yield _0x328d99['json']();return new FailedApiKeyValueResponse(_0x344524);}catch(_0x4ba695){if(_0x4ba695 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x4ba695['message'],'title':_0x4ba695['name'],'status':0x1f4,'instance':'','type':''});throw _0x4ba695;}});}['delete'](_0x4d12f7,_0x50d829,_0x385460){return __awaiter$4(this,void 0,void 0,function*(){const _0x4e3029=this['path']+'/'+_0x4d12f7+'/'+_0x50d829;try{const _0x7e504b=yield this['fetch']['delete'](_0x4e3029,_0x385460);if(_0x7e504b['status']>0xc7&&_0x7e504b['status']<0x12c)return new SuccessfulResponse({});const _0x37bdcc=yield _0x7e504b['json']();return new FailedResponse(_0x37bdcc);}catch(_0x37b304){if(_0x37b304 instanceof Error)return new FailedResponse({'detail':_0x37b304['message'],'title':_0x37b304['name'],'status':0x1f4,'instance':'','type':''});throw _0x37b304;}});}}
6
+
7
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x1783f9,_0x3c8d7b,_0x2776dd,_0x5f0542){function _0x608a38(_0x175b8c){return _0x175b8c instanceof _0x2776dd?_0x175b8c:new _0x2776dd(function(_0x1e6c03){_0x1e6c03(_0x175b8c);});}return new(_0x2776dd||(_0x2776dd=Promise))(function(_0x40b758,_0x374f36){function _0x403eaf(_0x59114c){try{_0x195d49(_0x5f0542['next'](_0x59114c));}catch(_0x222bc6){_0x374f36(_0x222bc6);}}function _0x103c89(_0x5f1b25){try{_0x195d49(_0x5f0542['throw'](_0x5f1b25));}catch(_0x222310){_0x374f36(_0x222310);}}function _0x195d49(_0x56324d){_0x56324d['done']?_0x40b758(_0x56324d['value']):_0x608a38(_0x56324d['value'])['then'](_0x403eaf,_0x103c89);}_0x195d49((_0x5f0542=_0x5f0542['apply'](_0x1783f9,_0x3c8d7b||[]))['next']());});};class ListService{constructor(_0x4a5920){this['fetch']=_0x4a5920;}['add'](_0x442cea,_0x3ba5f7,_0x5ce268,_0x2bf7df){return __awaiter$3(this,void 0,void 0,function*(){const _0x44931e='List',_0x38f912={'account_name':_0x442cea,'list_name':_0x3ba5f7,'search_service_name':_0x5ce268};try{const _0x44b413=yield this['fetch']['post'](_0x44931e,_0x2bf7df,_0x38f912);if(_0x44b413['status']>0xc7&&_0x44b413['status']<0x12c){const _0x34d6c7=yield _0x44b413['json']();return new SuccessfulListIdentityResponse(_0x34d6c7);}const _0x39cef4=yield _0x44b413['json']();return new FailedListIdentityResponse(_0x39cef4);}catch(_0x5cf705){if(_0x5cf705 instanceof Error)return new FailedListIdentityResponse({'detail':_0x5cf705['message'],'title':_0x5cf705['name'],'status':0x1f4,'instance':'','type':''});throw _0x5cf705;}});}['remove'](_0x12e964,_0x55b6c1,_0x5680ba){return __awaiter$3(this,void 0,void 0,function*(){const _0x1b47ea='List/'+_0x12e964+'/'+_0x55b6c1,_0x2bffe8=yield this['fetch']['delete'](_0x1b47ea,_0x5680ba);try{if(_0x2bffe8['status']>0xc7&&_0x2bffe8['status']<0x12c){const _0x45007c=yield _0x2bffe8['json']();return new SuccessfulAccountResponse(_0x45007c);}const _0x5e764b=yield _0x2bffe8['json']();return new FailedAccountResponse(_0x5e764b);}catch(_0x565dd4){if(_0x565dd4 instanceof Error)return new FailedAccountResponse({'detail':_0x565dd4['message'],'title':_0x565dd4['name'],'status':0x1f4,'instance':'','type':''});throw _0x565dd4;}});}}
8
+
9
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0xabea66,_0x909f21,_0x1c41c2,_0x1e682b){function _0x254a3d(_0x7e86de){return _0x7e86de instanceof _0x1c41c2?_0x7e86de:new _0x1c41c2(function(_0x139eae){_0x139eae(_0x7e86de);});}return new(_0x1c41c2||(_0x1c41c2=Promise))(function(_0x336c04,_0x13caf6){function _0xd2d033(_0xe1a284){try{_0x81b5c8(_0x1e682b['next'](_0xe1a284));}catch(_0x46f922){_0x13caf6(_0x46f922);}}function _0x5d1d68(_0x24398e){try{_0x81b5c8(_0x1e682b['throw'](_0x24398e));}catch(_0x2979aa){_0x13caf6(_0x2979aa);}}function _0x81b5c8(_0x5edd09){_0x5edd09['done']?_0x336c04(_0x5edd09['value']):_0x254a3d(_0x5edd09['value'])['then'](_0xd2d033,_0x5d1d68);}_0x81b5c8((_0x1e682b=_0x1e682b['apply'](_0xabea66,_0x909f21||[]))['next']());});};class Fetch{constructor(_0xcd44b6){this['baseUri']=_0xcd44b6,this['getUrl']=_0x31e9b6=>{return _0x31e9b6['startsWith']('/')&&(_0x31e9b6=_0x31e9b6['replace']('/','')),''+this['baseUri']+_0x31e9b6;},!_0xcd44b6['endsWith']('/')&&(_0xcd44b6=_0xcd44b6+'/');}['get'](_0x199d77,_0x341eec){return __awaiter$2(this,void 0,void 0,function*(){const _0x22a90f=this['getUrl'](_0x199d77);return yield fetch(_0x22a90f,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x341eec}});});}['post'](_0x5869c8,_0x464bca,_0x1b9ed4){return __awaiter$2(this,void 0,void 0,function*(){const _0x1fbb74=this['getUrl'](_0x5869c8);return yield fetch(_0x1fbb74,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x464bca},'body':_0x1b9ed4?JSON['stringify'](_0x1b9ed4):null});});}['PostNoAuth'](_0x396694,_0x1d03eb){return __awaiter$2(this,void 0,void 0,function*(){const _0x3a6236=this['getUrl'](_0x396694);return yield fetch(_0x3a6236,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0x1d03eb?JSON['stringify'](_0x1d03eb):null});});}['put'](_0x27ef33,_0x26174a,_0x35e016){return __awaiter$2(this,void 0,void 0,function*(){const _0xd0afa1=this['getUrl'](_0x27ef33);return yield fetch(_0xd0afa1,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x26174a},'body':_0x35e016?JSON['stringify'](_0x35e016):null});});}['delete'](_0x4e0e9b,_0x47d06c){return __awaiter$2(this,void 0,void 0,function*(){const _0x250f10=this['getUrl'](_0x4e0e9b);return yield fetch(_0x250f10,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x47d06c}});});}}
10
+
11
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x44c595,_0x23f7d6,_0xa613ff,_0x394aad){function _0x21a7ba(_0x408bb8){return _0x408bb8 instanceof _0xa613ff?_0x408bb8:new _0xa613ff(function(_0x3d16c7){_0x3d16c7(_0x408bb8);});}return new(_0xa613ff||(_0xa613ff=Promise))(function(_0x49fc0b,_0x1d963d){function _0x19bb26(_0x348154){try{_0x54f75e(_0x394aad['next'](_0x348154));}catch(_0x25a96a){_0x1d963d(_0x25a96a);}}function _0x121350(_0x32994e){try{_0x54f75e(_0x394aad['throw'](_0x32994e));}catch(_0x3df7d4){_0x1d963d(_0x3df7d4);}}function _0x54f75e(_0x1a2c2b){_0x1a2c2b['done']?_0x49fc0b(_0x1a2c2b['value']):_0x21a7ba(_0x1a2c2b['value'])['then'](_0x19bb26,_0x121350);}_0x54f75e((_0x394aad=_0x394aad['apply'](_0x44c595,_0x23f7d6||[]))['next']());});};class SearchServersService{constructor(_0xed024b){this['fetch']=_0xed024b,this['path']='search-services';}['create'](_0x3880d0,_0x51c979,_0x249b92,_0x3828e0,_0x1793ae,_0xb8bf2,_0x4d29db,_0x1a1c6f){return __awaiter$1(this,void 0,void 0,function*(){const _0x2ee976={'account_name':_0x3880d0,'search_service_name':_0x51c979,'endpoint':_0x249b92,'key':_0x3828e0,'country':_0x1793ae,'provider':_0xb8bf2,'index_name':_0x4d29db};try{const _0x4c95a6=yield this['fetch']['post'](this['path'],_0x1a1c6f,_0x2ee976);if(_0x4c95a6['status']>0xc7&&_0x4c95a6['status']<0x12c){const _0x36c761=yield _0x4c95a6['json']();return new SuccessfulSearchServiceResponse(_0x36c761);}const _0x4dc779=yield _0x4c95a6['json']();return new FailedSearchServiceResponse(_0x4dc779);}catch(_0x5a48ac){if(_0x5a48ac instanceof Error)return new FailedSearchServiceResponse({'detail':_0x5a48ac['message'],'title':_0x5a48ac['name'],'status':0x1f4,'instance':'','type':''});throw _0x5a48ac;}});}['delete'](_0x23ad40,_0x428d3e,_0x6cf2dd){return __awaiter$1(this,void 0,void 0,function*(){const _0xc26049=this['path']+'/'+_0x23ad40+'/'+_0x428d3e;try{const _0x32b3ba=yield this['fetch']['delete'](_0xc26049,_0x6cf2dd);if(_0x32b3ba['status']>0xc7&&_0x32b3ba['status']<0x12c)return new SuccessfulResponse({});const _0x452da8=yield _0x32b3ba['json']();return new FailedResponse(_0x452da8);}catch(_0x3865ff){if(_0x3865ff instanceof Error)return new FailedResponse({'detail':_0x3865ff['message'],'title':_0x3865ff['name'],'status':0x1f4,'instance':'','type':''});throw _0x3865ff;}});}['view'](_0x3d8ea4,_0x4d108a,_0x3ed146){return __awaiter$1(this,void 0,void 0,function*(){const _0x1c785c=this['path']+'/'+_0x3d8ea4+'/'+_0x4d108a;try{const _0x1c4767=yield this['fetch']['get'](_0x1c785c,_0x3ed146);if(_0x1c4767['status']>0xc7&&_0x1c4767['status']<0x12c){const _0x1b078c=yield _0x1c4767['json']();return new SuccessfulViewSearchServiceResponse(_0x1b078c);}const _0x370987=yield _0x1c4767['json']();return new FailedViewSearchServiceResponse(_0x370987);}catch(_0x341e4f){if(_0x341e4f instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x341e4f['message'],'title':_0x341e4f['name'],'status':0x1f4,'instance':'','type':''});throw _0x341e4f;}});}['edit'](_0x433c67,_0x54f4c5,_0x251116,_0x7f197c,_0x260a3c,_0x9ea46){return __awaiter$1(this,void 0,void 0,function*(){const _0x41b931={'account_name':_0x433c67,'search_service_name':_0x54f4c5,'new_search_service_name':_0x251116,'key':_0x7f197c,'country':_0x260a3c};try{const _0x36fd22=yield this['fetch']['put'](this['path'],_0x9ea46,_0x41b931);if(_0x36fd22['status']>0xc7&&_0x36fd22['status']<0x12c){const _0x46bb01=yield _0x36fd22['json']();return new SuccessfulSearchServiceResponse(_0x46bb01);}const _0x4a7b1a=yield _0x36fd22['json']();return new FailedSearchServiceResponse(_0x4a7b1a);}catch(_0x30a596){if(_0x30a596 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x30a596['message'],'title':_0x30a596['name'],'status':0x1f4,'instance':'','type':''});throw _0x30a596;}});}['list'](_0x1adfa8,_0x2f5d86){return __awaiter$1(this,void 0,void 0,function*(){const _0x3ea079=this['path']+'/'+_0x1adfa8;try{const _0x57edd2=yield this['fetch']['get'](_0x3ea079,_0x2f5d86);if(_0x57edd2['status']>0xc7&&_0x57edd2['status']<0x12c){const _0x2ef86c=yield _0x57edd2['json']();return new SuccessfulListSearchServiceResponse(_0x2ef86c);}const _0x30de70=yield _0x57edd2['json']();return new FailedViewSearchServicesResponse(_0x30de70);}catch(_0x502510){if(_0x502510 instanceof Error)return new FailedViewSearchServicesResponse({'detail':_0x502510['message'],'title':_0x502510['name'],'status':0x1f4,'instance':'','type':''});throw _0x502510;}});}}
12
+
13
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x4feefb,_0x4aed65,_0x44a9fc,_0x46d97c){function _0x15971f(_0x17b6d5){return _0x17b6d5 instanceof _0x44a9fc?_0x17b6d5:new _0x44a9fc(function(_0x44400b){_0x44400b(_0x17b6d5);});}return new(_0x44a9fc||(_0x44a9fc=Promise))(function(_0x1cbf8e,_0x3ef8c9){function _0x10cc42(_0x23bdfe){try{_0x428371(_0x46d97c['next'](_0x23bdfe));}catch(_0x32e0dc){_0x3ef8c9(_0x32e0dc);}}function _0x581850(_0x515d14){try{_0x428371(_0x46d97c['throw'](_0x515d14));}catch(_0x1312e1){_0x3ef8c9(_0x1312e1);}}function _0x428371(_0x5825bb){_0x5825bb['done']?_0x1cbf8e(_0x5825bb['value']):_0x15971f(_0x5825bb['value'])['then'](_0x10cc42,_0x581850);}_0x428371((_0x46d97c=_0x46d97c['apply'](_0x4feefb,_0x4aed65||[]))['next']());});};class AdminClient{constructor(_0x2ae085='https://admin.searchability.dev/'){var _0x37181c=new Fetch(_0x2ae085);this['Accounts']=new AccountService(_0x37181c),this['Lists']=new ListService(_0x37181c),this['ApiKeys']=new ApiKeyService(_0x37181c),this['SearchServices']=new SearchServersService(_0x37181c);}}class AuthClient{constructor(_0x323247='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x323247);}['login'](_0x49bffe){return __awaiter(this,void 0,void 0,function*(){const _0x3b7a81='login/'+_0x49bffe;try{const _0x25c129=yield yield fetch(_0x3b7a81);if(_0x25c129['status']>0xc7&&_0x25c129['status']<0x12c){const _0x2df627=yield _0x25c129['json']();return new SuccessfulAuthResponse(_0x2df627);}const _0x82ab11=yield _0x25c129['json']();return new FailedAuthResponse(_0x82ab11);}catch(_0x4ce351){if(_0x4ce351 instanceof Error)return new FailedAuthResponse({'detail':_0x4ce351['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x4ce351;}});}['refresh'](_0x212e19){return __awaiter(this,void 0,void 0,function*(){const _0x5b75fd='refresh',_0xe157a6={'refresh_token':_0x212e19};try{const _0x14470c=yield this['fetch']['PostNoAuth'](_0x5b75fd,_0xe157a6);if(_0x14470c['status']>0xc7&&_0x14470c['status']<0x12c){const _0x5881b1=yield _0x14470c['json']();return new SuccessfulAuthResponse(_0x5881b1);}const _0x44e60d=yield _0x14470c['json']();return new FailedAuthResponse(_0x44e60d);}catch(_0x322595){if(_0x322595 instanceof Error)return new FailedAuthResponse({'detail':_0x322595['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x322595;}});}['getTokenStatus'](_0x3b3aa7){if(Date['now']()<_0x3b3aa7['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x3b3aa7['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
14
+
15
+ export { AdminClient, AuthClient, TokenStatus, Tokens };
@@ -1,18 +1,18 @@
1
1
  'use strict';
2
2
 
3
- exports.TokenStatus = void 0;(function(_0x570ada){_0x570ada[_0x570ada['Ok']=0x0]='Ok',_0x570ada[_0x570ada['Refresh']=0x1]='Refresh',_0x570ada[_0x570ada['Expired']=0x2]='Expired';}(exports.TokenStatus||(exports.TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}}class Response{constructor(_0x1fd6c4){this['isSuccess']=_0x1fd6c4;}}class SuccessfulAccountResponse extends Response{constructor(_0x3ca7c0){super(!![]),this['account']=_0x3ca7c0;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x46f045){super(![]),this['problem']=_0x46f045;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x190922){super(!![]),this['tokens']=_0x190922;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x262b61){super(![]),this['problem']=_0x262b61;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x598ad1){super(!![]),this['apiKey']=_0x598ad1;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0xef4999){super(![]),this['problem']=_0xef4999;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x102227){super(!![]),this['searchService']=_0x102227;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0xdad9ff){super(![]),this['problem']=_0xdad9ff;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x5deb2c){super(!![]),this['searchService']=_0x5deb2c;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServiceResponse extends Response{constructor(_0x4cbff3){super(![]),this['problem']=_0x4cbff3;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x5c5cc5){super(!![]),this['apiKeyValue']=_0x5c5cc5;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x15f56d){super(!![]),this['obj']=_0x15f56d;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x12e8d7){super(![]),this['problem']=_0x12e8d7;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x32ff9f){super(![]),this['problem']=_0x32ff9f;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
3
+ exports.TokenStatus = void 0;(function(_0x5d3f32){_0x5d3f32[_0x5d3f32['Ok']=0x0]='Ok',_0x5d3f32[_0x5d3f32['Refresh']=0x1]='Refresh',_0x5d3f32[_0x5d3f32['Expired']=0x2]='Expired';}(exports.TokenStatus||(exports.TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}}class Response{constructor(_0x48ea3a){this['isSuccess']=_0x48ea3a;}}class SuccessfulAccountResponse extends Response{constructor(_0x2f455b){super(!![]),this['account']=_0x2f455b;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListIdentityResponse extends Response{constructor(_0x55a35c){super(!![]),this['list']=_0x55a35c;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x2ac396){super(![]),this['problem']=_0x2ac396;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListIdentityResponse extends Response{constructor(_0x4906c2){super(![]),this['problem']=_0x4906c2;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x22e22c){super(!![]),this['tokens']=_0x22e22c;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x50482d){super(![]),this['problem']=_0x50482d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x28f1b6){super(!![]),this['apiKey']=_0x28f1b6;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x431bf3){super(![]),this['problem']=_0x431bf3;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x12d491){super(!![]),this['searchService']=_0x12d491;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x52fcca){super(![]),this['problem']=_0x52fcca;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0xe8a267){super(!![]),this['searchService']=_0xe8a267;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListSearchServiceResponse extends Response{constructor(_0x18c353){super(!![]),this['searchServices']=_0x18c353;}['toSuccess'](){return this['searchServices'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServicesResponse extends Response{constructor(_0x28cd78){super(![]),this['problem']=_0x28cd78;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedViewSearchServiceResponse extends Response{constructor(_0x3fc727){super(![]),this['problem']=_0x3fc727;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x94594f){super(!![]),this['apiKeyValue']=_0x94594f;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x20cb2a){super(!![]),this['obj']=_0x20cb2a;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x57cf61){super(![]),this['problem']=_0x57cf61;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x126e63){super(![]),this['problem']=_0x126e63;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
4
4
 
5
- var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x41ee69,_0x26ff83,_0x54b3d5,_0x31c6d2){function _0x16cdb3(_0x201f3b){return _0x201f3b instanceof _0x54b3d5?_0x201f3b:new _0x54b3d5(function(_0x1b1f61){_0x1b1f61(_0x201f3b);});}return new(_0x54b3d5||(_0x54b3d5=Promise))(function(_0x4b11af,_0x13032b){function _0x13713e(_0x1870a2){try{_0x34ccdc(_0x31c6d2['next'](_0x1870a2));}catch(_0x201969){_0x13032b(_0x201969);}}function _0x1e1060(_0x3b91c4){try{_0x34ccdc(_0x31c6d2['throw'](_0x3b91c4));}catch(_0x1e6694){_0x13032b(_0x1e6694);}}function _0x34ccdc(_0x3ac4f3){_0x3ac4f3['done']?_0x4b11af(_0x3ac4f3['value']):_0x16cdb3(_0x3ac4f3['value'])['then'](_0x13713e,_0x1e1060);}_0x34ccdc((_0x31c6d2=_0x31c6d2['apply'](_0x41ee69,_0x26ff83||[]))['next']());});};class AccountService{constructor(_0x4ad304){this['fetch']=_0x4ad304;}['get'](_0x1a37f6,_0x556e29){return __awaiter$5(this,void 0,void 0,function*(){const _0x486f79='Account/'+_0x1a37f6+'/',_0x4725d8=yield this['fetch']['get'](_0x486f79,_0x556e29);try{if(_0x4725d8['status']>0xc7&&_0x4725d8['status']<0x12c){const _0x8c257e=yield _0x4725d8['json']();return new SuccessfulAccountResponse(_0x8c257e);}const _0x38cf9c=yield _0x4725d8['json']();return new FailedAccountResponse(_0x38cf9c);}catch(_0xfd7861){if(_0xfd7861 instanceof Error)return new FailedAccountResponse({'detail':_0xfd7861['message'],'title':_0xfd7861['name'],'status':0x1f4,'instance':'','type':''});throw _0xfd7861;}});}}
5
+ var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x3594ff,_0x1fbd21,_0x1b7a76,_0x2d2e0e){function _0x615a2c(_0x39830f){return _0x39830f instanceof _0x1b7a76?_0x39830f:new _0x1b7a76(function(_0x227c32){_0x227c32(_0x39830f);});}return new(_0x1b7a76||(_0x1b7a76=Promise))(function(_0x2425ec,_0x14ef4e){function _0x298f12(_0x279112){try{_0x1a78be(_0x2d2e0e['next'](_0x279112));}catch(_0x4e3b31){_0x14ef4e(_0x4e3b31);}}function _0x3df680(_0x58b979){try{_0x1a78be(_0x2d2e0e['throw'](_0x58b979));}catch(_0xeaef6b){_0x14ef4e(_0xeaef6b);}}function _0x1a78be(_0x1af852){_0x1af852['done']?_0x2425ec(_0x1af852['value']):_0x615a2c(_0x1af852['value'])['then'](_0x298f12,_0x3df680);}_0x1a78be((_0x2d2e0e=_0x2d2e0e['apply'](_0x3594ff,_0x1fbd21||[]))['next']());});};class AccountService{constructor(_0x3cc17c){this['fetch']=_0x3cc17c;}['get'](_0x2cf4be,_0x2ade14){return __awaiter$5(this,void 0,void 0,function*(){const _0x4a561f='Account/'+_0x2cf4be+'/',_0x5ab74c=yield this['fetch']['get'](_0x4a561f,_0x2ade14);try{if(_0x5ab74c['status']>0xc7&&_0x5ab74c['status']<0x12c){const _0x190dde=yield _0x5ab74c['json']();return new SuccessfulAccountResponse(_0x190dde);}const _0x5c3105=yield _0x5ab74c['json']();return new FailedAccountResponse(_0x5c3105);}catch(_0x20a2f3){if(_0x20a2f3 instanceof Error)return new FailedAccountResponse({'detail':_0x20a2f3['message'],'title':_0x20a2f3['name'],'status':0x1f4,'instance':'','type':''});throw _0x20a2f3;}});}}
6
6
 
7
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x540baa,_0x504964,_0xe7b23f,_0x24279a){function _0x87b5d0(_0x3930b5){return _0x3930b5 instanceof _0xe7b23f?_0x3930b5:new _0xe7b23f(function(_0x9605a0){_0x9605a0(_0x3930b5);});}return new(_0xe7b23f||(_0xe7b23f=Promise))(function(_0x5d10ea,_0xa623e9){function _0x11287f(_0x501d81){try{_0x448b00(_0x24279a['next'](_0x501d81));}catch(_0x3a2389){_0xa623e9(_0x3a2389);}}function _0x3ac3c8(_0x523db6){try{_0x448b00(_0x24279a['throw'](_0x523db6));}catch(_0x22fc9f){_0xa623e9(_0x22fc9f);}}function _0x448b00(_0x4cf2f9){_0x4cf2f9['done']?_0x5d10ea(_0x4cf2f9['value']):_0x87b5d0(_0x4cf2f9['value'])['then'](_0x11287f,_0x3ac3c8);}_0x448b00((_0x24279a=_0x24279a['apply'](_0x540baa,_0x504964||[]))['next']());});};class ApiKeyService{constructor(_0x4ab3ad){this['fetch']=_0x4ab3ad,this['path']='api-key';}['create'](_0x43a119,_0x515d22,_0x3f5d2f){return __awaiter$4(this,void 0,void 0,function*(){const _0x4043b6={'account_name':_0x43a119,'api_key_name':_0x515d22};try{const _0xe83452=yield this['fetch']['post'](this['path'],_0x3f5d2f,_0x4043b6);if(_0xe83452['status']>0xc7&&_0xe83452['status']<0x12c){const _0x541a70=yield _0xe83452['json']();return new SuccessfulApiKeyResponse(_0x541a70);}const _0x5a8493=yield _0xe83452['json']();return new FailedApiKeyResponse(_0x5a8493);}catch(_0x322b73){if(_0x322b73 instanceof Error)return new FailedApiKeyResponse({'detail':_0x322b73['message'],'title':_0x322b73['name'],'status':0x1f4,'instance':'','type':''});throw _0x322b73;}});}['view'](_0x145f65,_0x59178a,_0x1f66ec){return __awaiter$4(this,void 0,void 0,function*(){const _0x5f55a2=this['path']+'/'+_0x145f65+'/'+_0x59178a;try{const _0x5f4883=yield this['fetch']['get'](_0x5f55a2,_0x1f66ec);if(_0x5f4883['status']>0xc7&&_0x5f4883['status']<0x12c){const _0x595e41=yield _0x5f4883['json']();return new SuccessfulApiKeyValueResponse(_0x595e41);}const _0x2e9fed=yield _0x5f4883['json']();return new FailedApiKeyValueResponse(_0x2e9fed);}catch(_0x50913a){if(_0x50913a instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x50913a['message'],'title':_0x50913a['name'],'status':0x1f4,'instance':'','type':''});throw _0x50913a;}});}['delete'](_0x3e5d3a,_0x42586b,_0x10a36b){return __awaiter$4(this,void 0,void 0,function*(){const _0x26d664=this['path']+'/'+_0x3e5d3a+'/'+_0x42586b;try{const _0x2e42f2=yield this['fetch']['delete'](_0x26d664,_0x10a36b);if(_0x2e42f2['status']>0xc7&&_0x2e42f2['status']<0x12c)return new SuccessfulResponse({});const _0x39aa7b=yield _0x2e42f2['json']();return new FailedResponse(_0x39aa7b);}catch(_0x586471){if(_0x586471 instanceof Error)return new FailedResponse({'detail':_0x586471['message'],'title':_0x586471['name'],'status':0x1f4,'instance':'','type':''});throw _0x586471;}});}}
7
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x3a8dbc,_0x20ec5d,_0x1ac646,_0x4f5667){function _0x5e85cf(_0x1e459a){return _0x1e459a instanceof _0x1ac646?_0x1e459a:new _0x1ac646(function(_0x33cca4){_0x33cca4(_0x1e459a);});}return new(_0x1ac646||(_0x1ac646=Promise))(function(_0x50e6c3,_0x168fc4){function _0x62c7a1(_0x43ab75){try{_0x221a65(_0x4f5667['next'](_0x43ab75));}catch(_0x5bc65b){_0x168fc4(_0x5bc65b);}}function _0x2fbab4(_0x5c25bc){try{_0x221a65(_0x4f5667['throw'](_0x5c25bc));}catch(_0x5b3316){_0x168fc4(_0x5b3316);}}function _0x221a65(_0x2c0724){_0x2c0724['done']?_0x50e6c3(_0x2c0724['value']):_0x5e85cf(_0x2c0724['value'])['then'](_0x62c7a1,_0x2fbab4);}_0x221a65((_0x4f5667=_0x4f5667['apply'](_0x3a8dbc,_0x20ec5d||[]))['next']());});};class ApiKeyService{constructor(_0x39a1aa){this['fetch']=_0x39a1aa,this['path']='api-key';}['create'](_0x178417,_0x3fb462,_0x3ef63e){return __awaiter$4(this,void 0,void 0,function*(){const _0x17e7f1={'account_name':_0x178417,'api_key_name':_0x3fb462};try{const _0xabadfa=yield this['fetch']['post'](this['path'],_0x3ef63e,_0x17e7f1);if(_0xabadfa['status']>0xc7&&_0xabadfa['status']<0x12c){const _0x4c4988=yield _0xabadfa['json']();return new SuccessfulApiKeyResponse(_0x4c4988);}const _0x172367=yield _0xabadfa['json']();return new FailedApiKeyResponse(_0x172367);}catch(_0x335a2c){if(_0x335a2c instanceof Error)return new FailedApiKeyResponse({'detail':_0x335a2c['message'],'title':_0x335a2c['name'],'status':0x1f4,'instance':'','type':''});throw _0x335a2c;}});}['view'](_0x153ebc,_0x3b570c,_0x309855){return __awaiter$4(this,void 0,void 0,function*(){const _0x341b18=this['path']+'/'+_0x153ebc+'/'+_0x3b570c;try{const _0x281a4e=yield this['fetch']['get'](_0x341b18,_0x309855);if(_0x281a4e['status']>0xc7&&_0x281a4e['status']<0x12c){const _0x1b7371=yield _0x281a4e['json']();return new SuccessfulApiKeyValueResponse(_0x1b7371);}const _0x27307b=yield _0x281a4e['json']();return new FailedApiKeyValueResponse(_0x27307b);}catch(_0x1214ef){if(_0x1214ef instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x1214ef['message'],'title':_0x1214ef['name'],'status':0x1f4,'instance':'','type':''});throw _0x1214ef;}});}['delete'](_0x2a84c5,_0x34af8c,_0x5a259b){return __awaiter$4(this,void 0,void 0,function*(){const _0x19738a=this['path']+'/'+_0x2a84c5+'/'+_0x34af8c;try{const _0x5e7155=yield this['fetch']['delete'](_0x19738a,_0x5a259b);if(_0x5e7155['status']>0xc7&&_0x5e7155['status']<0x12c)return new SuccessfulResponse({});const _0x1a9a06=yield _0x5e7155['json']();return new FailedResponse(_0x1a9a06);}catch(_0x14c027){if(_0x14c027 instanceof Error)return new FailedResponse({'detail':_0x14c027['message'],'title':_0x14c027['name'],'status':0x1f4,'instance':'','type':''});throw _0x14c027;}});}}
8
8
 
9
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x3b1c0e,_0x38bf45,_0x2d58f3,_0x300f92){function _0x58ce49(_0xcdf423){return _0xcdf423 instanceof _0x2d58f3?_0xcdf423:new _0x2d58f3(function(_0x3016c1){_0x3016c1(_0xcdf423);});}return new(_0x2d58f3||(_0x2d58f3=Promise))(function(_0x3bec60,_0x124b13){function _0x508083(_0x2e5bf0){try{_0x384e33(_0x300f92['next'](_0x2e5bf0));}catch(_0x4189d8){_0x124b13(_0x4189d8);}}function _0x5e4fe0(_0x326653){try{_0x384e33(_0x300f92['throw'](_0x326653));}catch(_0x345fdd){_0x124b13(_0x345fdd);}}function _0x384e33(_0x37d1f2){_0x37d1f2['done']?_0x3bec60(_0x37d1f2['value']):_0x58ce49(_0x37d1f2['value'])['then'](_0x508083,_0x5e4fe0);}_0x384e33((_0x300f92=_0x300f92['apply'](_0x3b1c0e,_0x38bf45||[]))['next']());});};class ListService{constructor(_0x128496){this['fetch']=_0x128496;}['add'](_0x522545,_0x200e92,_0x116c8e){return __awaiter$3(this,void 0,void 0,function*(){const _0x56ba8a='List',_0x2ea4e1={'account_name':_0x522545,'list_name':_0x200e92};try{const _0x2d0249=yield this['fetch']['post'](_0x56ba8a,_0x116c8e,_0x2ea4e1);if(_0x2d0249['status']>0xc7&&_0x2d0249['status']<0x12c){const _0x5810fb=yield _0x2d0249['json']();return new SuccessfulAccountResponse(_0x5810fb);}const _0x1edea6=yield _0x2d0249['json']();return new FailedAccountResponse(_0x1edea6);}catch(_0x299408){if(_0x299408 instanceof Error)return new FailedAccountResponse({'detail':_0x299408['message'],'title':_0x299408['name'],'status':0x1f4,'instance':'','type':''});throw _0x299408;}});}['remove'](_0x14071d,_0x4fcd8d,_0x31b16c){return __awaiter$3(this,void 0,void 0,function*(){const _0x821e20='List/'+_0x14071d+'/'+_0x4fcd8d,_0x233099=yield this['fetch']['delete'](_0x821e20,_0x31b16c);try{if(_0x233099['status']>0xc7&&_0x233099['status']<0x12c){const _0x25d4b4=yield _0x233099['json']();return new SuccessfulAccountResponse(_0x25d4b4);}const _0x3dda79=yield _0x233099['json']();return new FailedAccountResponse(_0x3dda79);}catch(_0x3e1cc0){if(_0x3e1cc0 instanceof Error)return new FailedAccountResponse({'detail':_0x3e1cc0['message'],'title':_0x3e1cc0['name'],'status':0x1f4,'instance':'','type':''});throw _0x3e1cc0;}});}}
9
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x5d4f2b,_0x75304d,_0x44dc0a,_0x4621f4){function _0x5384d9(_0x4172b9){return _0x4172b9 instanceof _0x44dc0a?_0x4172b9:new _0x44dc0a(function(_0x533c2c){_0x533c2c(_0x4172b9);});}return new(_0x44dc0a||(_0x44dc0a=Promise))(function(_0x19d582,_0x4323b8){function _0x2c393a(_0x3cdbac){try{_0x2aa77f(_0x4621f4['next'](_0x3cdbac));}catch(_0x540856){_0x4323b8(_0x540856);}}function _0x1f910e(_0x1301e8){try{_0x2aa77f(_0x4621f4['throw'](_0x1301e8));}catch(_0x41e691){_0x4323b8(_0x41e691);}}function _0x2aa77f(_0x37d74d){_0x37d74d['done']?_0x19d582(_0x37d74d['value']):_0x5384d9(_0x37d74d['value'])['then'](_0x2c393a,_0x1f910e);}_0x2aa77f((_0x4621f4=_0x4621f4['apply'](_0x5d4f2b,_0x75304d||[]))['next']());});};class ListService{constructor(_0x4a1695){this['fetch']=_0x4a1695;}['add'](_0xa521ef,_0x543a9e,_0x551d65,_0x5400b1){return __awaiter$3(this,void 0,void 0,function*(){const _0x1b628c='List',_0x54c6d5={'account_name':_0xa521ef,'list_name':_0x543a9e,'search_service_name':_0x551d65};try{const _0x2c2597=yield this['fetch']['post'](_0x1b628c,_0x5400b1,_0x54c6d5);if(_0x2c2597['status']>0xc7&&_0x2c2597['status']<0x12c){const _0x57ace5=yield _0x2c2597['json']();return new SuccessfulListIdentityResponse(_0x57ace5);}const _0x24491d=yield _0x2c2597['json']();return new FailedListIdentityResponse(_0x24491d);}catch(_0x485c67){if(_0x485c67 instanceof Error)return new FailedListIdentityResponse({'detail':_0x485c67['message'],'title':_0x485c67['name'],'status':0x1f4,'instance':'','type':''});throw _0x485c67;}});}['remove'](_0x597997,_0x3f593c,_0xd3ffa8){return __awaiter$3(this,void 0,void 0,function*(){const _0x1b737f='List/'+_0x597997+'/'+_0x3f593c,_0x14009b=yield this['fetch']['delete'](_0x1b737f,_0xd3ffa8);try{if(_0x14009b['status']>0xc7&&_0x14009b['status']<0x12c){const _0x2d0fe3=yield _0x14009b['json']();return new SuccessfulAccountResponse(_0x2d0fe3);}const _0x1f09fa=yield _0x14009b['json']();return new FailedAccountResponse(_0x1f09fa);}catch(_0x2a0962){if(_0x2a0962 instanceof Error)return new FailedAccountResponse({'detail':_0x2a0962['message'],'title':_0x2a0962['name'],'status':0x1f4,'instance':'','type':''});throw _0x2a0962;}});}}
10
10
 
11
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x42371b,_0xa8ae07,_0x4f4d99,_0x23229e){function _0x1cda5f(_0x360057){return _0x360057 instanceof _0x4f4d99?_0x360057:new _0x4f4d99(function(_0x4f228c){_0x4f228c(_0x360057);});}return new(_0x4f4d99||(_0x4f4d99=Promise))(function(_0x24ab4b,_0x2bb97c){function _0x2a045d(_0x4dfddc){try{_0x35a283(_0x23229e['next'](_0x4dfddc));}catch(_0x5b6882){_0x2bb97c(_0x5b6882);}}function _0x181d97(_0x3b4084){try{_0x35a283(_0x23229e['throw'](_0x3b4084));}catch(_0x23987d){_0x2bb97c(_0x23987d);}}function _0x35a283(_0x43c26a){_0x43c26a['done']?_0x24ab4b(_0x43c26a['value']):_0x1cda5f(_0x43c26a['value'])['then'](_0x2a045d,_0x181d97);}_0x35a283((_0x23229e=_0x23229e['apply'](_0x42371b,_0xa8ae07||[]))['next']());});};class Fetch{constructor(_0x40da88){this['baseUri']=_0x40da88,this['getUrl']=_0x51b378=>{return _0x51b378['startsWith']('/')&&(_0x51b378=_0x51b378['replace']('/','')),''+this['baseUri']+_0x51b378;},!_0x40da88['endsWith']('/')&&(_0x40da88=_0x40da88+'/');}['get'](_0x25b367,_0x4fbd30){return __awaiter$2(this,void 0,void 0,function*(){const _0x3562c4=this['getUrl'](_0x25b367);return yield fetch(_0x3562c4,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4fbd30}});});}['post'](_0x31ab41,_0x5e5f9d,_0x4df4c6){return __awaiter$2(this,void 0,void 0,function*(){const _0x249265=this['getUrl'](_0x31ab41);return yield fetch(_0x249265,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x5e5f9d},'body':_0x4df4c6?JSON['stringify'](_0x4df4c6):null});});}['PostNoAuth'](_0x4f529a,_0x116040){return __awaiter$2(this,void 0,void 0,function*(){const _0x2ec531=this['getUrl'](_0x4f529a);return yield fetch(_0x2ec531,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0x116040?JSON['stringify'](_0x116040):null});});}['put'](_0x239b4c,_0x2b9694,_0x43d062){return __awaiter$2(this,void 0,void 0,function*(){const _0x221573=this['getUrl'](_0x239b4c);return yield fetch(_0x221573,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2b9694},'body':_0x43d062?JSON['stringify'](_0x43d062):null});});}['delete'](_0xfe5c19,_0x46176b){return __awaiter$2(this,void 0,void 0,function*(){const _0x10e920=this['getUrl'](_0xfe5c19);return yield fetch(_0x10e920,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x46176b}});});}}
11
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x44bcf3,_0x5073ee,_0x329deb,_0x2c1a12){function _0x26c1ce(_0x406a28){return _0x406a28 instanceof _0x329deb?_0x406a28:new _0x329deb(function(_0x4eee6e){_0x4eee6e(_0x406a28);});}return new(_0x329deb||(_0x329deb=Promise))(function(_0x2f5ec4,_0x16d1f2){function _0x166f4c(_0x28f81a){try{_0xdfc1bc(_0x2c1a12['next'](_0x28f81a));}catch(_0x1d9d92){_0x16d1f2(_0x1d9d92);}}function _0x179583(_0x5a3dca){try{_0xdfc1bc(_0x2c1a12['throw'](_0x5a3dca));}catch(_0x907ce1){_0x16d1f2(_0x907ce1);}}function _0xdfc1bc(_0x5a5374){_0x5a5374['done']?_0x2f5ec4(_0x5a5374['value']):_0x26c1ce(_0x5a5374['value'])['then'](_0x166f4c,_0x179583);}_0xdfc1bc((_0x2c1a12=_0x2c1a12['apply'](_0x44bcf3,_0x5073ee||[]))['next']());});};class Fetch{constructor(_0x4eebb3){this['baseUri']=_0x4eebb3,this['getUrl']=_0x2b1904=>{return _0x2b1904['startsWith']('/')&&(_0x2b1904=_0x2b1904['replace']('/','')),''+this['baseUri']+_0x2b1904;},!_0x4eebb3['endsWith']('/')&&(_0x4eebb3=_0x4eebb3+'/');}['get'](_0x5a64b2,_0x5e408d){return __awaiter$2(this,void 0,void 0,function*(){const _0x5ec64c=this['getUrl'](_0x5a64b2);return yield fetch(_0x5ec64c,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x5e408d}});});}['post'](_0x53ac72,_0x598bba,_0x2d1492){return __awaiter$2(this,void 0,void 0,function*(){const _0x13606c=this['getUrl'](_0x53ac72);return yield fetch(_0x13606c,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x598bba},'body':_0x2d1492?JSON['stringify'](_0x2d1492):null});});}['PostNoAuth'](_0x436c5c,_0x108b7c){return __awaiter$2(this,void 0,void 0,function*(){const _0xf2e91b=this['getUrl'](_0x436c5c);return yield fetch(_0xf2e91b,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0x108b7c?JSON['stringify'](_0x108b7c):null});});}['put'](_0x1649f7,_0x3f8028,_0x59b4e7){return __awaiter$2(this,void 0,void 0,function*(){const _0x39e655=this['getUrl'](_0x1649f7);return yield fetch(_0x39e655,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3f8028},'body':_0x59b4e7?JSON['stringify'](_0x59b4e7):null});});}['delete'](_0x2197e1,_0x2a2bc1){return __awaiter$2(this,void 0,void 0,function*(){const _0x46e067=this['getUrl'](_0x2197e1);return yield fetch(_0x46e067,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2a2bc1}});});}}
12
12
 
13
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x29ddf4,_0x40c168,_0x4daf86,_0x1e661e){function _0x1717aa(_0x4c5599){return _0x4c5599 instanceof _0x4daf86?_0x4c5599:new _0x4daf86(function(_0x301039){_0x301039(_0x4c5599);});}return new(_0x4daf86||(_0x4daf86=Promise))(function(_0x15ceb7,_0x42711f){function _0x602ccd(_0x560b69){try{_0x44b506(_0x1e661e['next'](_0x560b69));}catch(_0xd41b30){_0x42711f(_0xd41b30);}}function _0x355e77(_0x4eb87d){try{_0x44b506(_0x1e661e['throw'](_0x4eb87d));}catch(_0x398018){_0x42711f(_0x398018);}}function _0x44b506(_0x5554c4){_0x5554c4['done']?_0x15ceb7(_0x5554c4['value']):_0x1717aa(_0x5554c4['value'])['then'](_0x602ccd,_0x355e77);}_0x44b506((_0x1e661e=_0x1e661e['apply'](_0x29ddf4,_0x40c168||[]))['next']());});};class SearchServersService{constructor(_0xb6837e){this['fetch']=_0xb6837e,this['path']='search-services';}['create'](_0x4374d1,_0x4f9123,_0x38728f,_0x5916ea,_0x258004,_0x21b6ab,_0x1fa9e1,_0x5a90c0){return __awaiter$1(this,void 0,void 0,function*(){const _0x10b771={'account_name':_0x4374d1,'search_service_name':_0x4f9123,'endpoint':_0x38728f,'key':_0x5916ea,'country':_0x258004,'provider':_0x21b6ab,'index_name':_0x1fa9e1};try{const _0xc09233=yield this['fetch']['post'](this['path'],_0x5a90c0,_0x10b771);if(_0xc09233['status']>0xc7&&_0xc09233['status']<0x12c){const _0x445046=yield _0xc09233['json']();return new SuccessfulSearchServiceResponse(_0x445046);}const _0x3415df=yield _0xc09233['json']();return new FailedSearchServiceResponse(_0x3415df);}catch(_0x2444b2){if(_0x2444b2 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x2444b2['message'],'title':_0x2444b2['name'],'status':0x1f4,'instance':'','type':''});throw _0x2444b2;}});}['delete'](_0x440afd,_0x296668,_0x4f0d29){return __awaiter$1(this,void 0,void 0,function*(){const _0xbbb027=this['path']+'/'+_0x440afd+'/'+_0x296668;try{const _0x4db5c9=yield this['fetch']['delete'](_0xbbb027,_0x4f0d29);if(_0x4db5c9['status']>0xc7&&_0x4db5c9['status']<0x12c)return new SuccessfulResponse({});const _0x5cee6f=yield _0x4db5c9['json']();return new FailedResponse(_0x5cee6f);}catch(_0x2a826b){if(_0x2a826b instanceof Error)return new FailedResponse({'detail':_0x2a826b['message'],'title':_0x2a826b['name'],'status':0x1f4,'instance':'','type':''});throw _0x2a826b;}});}['view'](_0x4a315d,_0x2749a0,_0x4f2160){return __awaiter$1(this,void 0,void 0,function*(){const _0x4bd4f4=this['path']+'/'+_0x4a315d+'/'+_0x2749a0;try{const _0x7e855f=yield this['fetch']['get'](_0x4bd4f4,_0x4f2160);if(_0x7e855f['status']>0xc7&&_0x7e855f['status']<0x12c){const _0x28e5e6=yield _0x7e855f['json']();return new SuccessfulViewSearchServiceResponse(_0x28e5e6);}const _0x57bd7e=yield _0x7e855f['json']();return new FailedViewSearchServiceResponse(_0x57bd7e);}catch(_0x26410c){if(_0x26410c instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x26410c['message'],'title':_0x26410c['name'],'status':0x1f4,'instance':'','type':''});throw _0x26410c;}});}['edit'](_0x456182,_0x3d0416,_0x4119d7,_0x4f865c,_0x4edc8c,_0x25e28f){return __awaiter$1(this,void 0,void 0,function*(){const _0x2a002d={'account_name':_0x456182,'search_service_name':_0x3d0416,'new_search_service_name':_0x4119d7,'key':_0x4f865c,'country':_0x4edc8c};try{const _0x1d3d47=yield this['fetch']['put'](this['path'],_0x25e28f,_0x2a002d);if(_0x1d3d47['status']>0xc7&&_0x1d3d47['status']<0x12c){const _0x3dabf6=yield _0x1d3d47['json']();return new SuccessfulSearchServiceResponse(_0x3dabf6);}const _0x3271b8=yield _0x1d3d47['json']();return new FailedSearchServiceResponse(_0x3271b8);}catch(_0x2b7111){if(_0x2b7111 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x2b7111['message'],'title':_0x2b7111['name'],'status':0x1f4,'instance':'','type':''});throw _0x2b7111;}});}}
13
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x1f7167,_0xfbc47e,_0x306b2f,_0x5d637d){function _0x2e3b3a(_0x2681e7){return _0x2681e7 instanceof _0x306b2f?_0x2681e7:new _0x306b2f(function(_0x1ac378){_0x1ac378(_0x2681e7);});}return new(_0x306b2f||(_0x306b2f=Promise))(function(_0x19b18f,_0x35a70f){function _0x31e725(_0x22a48f){try{_0x316643(_0x5d637d['next'](_0x22a48f));}catch(_0xeb1c69){_0x35a70f(_0xeb1c69);}}function _0x5b4d9d(_0x24e316){try{_0x316643(_0x5d637d['throw'](_0x24e316));}catch(_0x10b8b1){_0x35a70f(_0x10b8b1);}}function _0x316643(_0x43470a){_0x43470a['done']?_0x19b18f(_0x43470a['value']):_0x2e3b3a(_0x43470a['value'])['then'](_0x31e725,_0x5b4d9d);}_0x316643((_0x5d637d=_0x5d637d['apply'](_0x1f7167,_0xfbc47e||[]))['next']());});};class SearchServersService{constructor(_0x8dc0f){this['fetch']=_0x8dc0f,this['path']='search-services';}['create'](_0x403f90,_0x4ac49b,_0x1cdf42,_0x475f8f,_0x27441e,_0x27c142,_0x3c93b9,_0x5367de){return __awaiter$1(this,void 0,void 0,function*(){const _0x65e831={'account_name':_0x403f90,'search_service_name':_0x4ac49b,'endpoint':_0x1cdf42,'key':_0x475f8f,'country':_0x27441e,'provider':_0x27c142,'index_name':_0x3c93b9};try{const _0x351de6=yield this['fetch']['post'](this['path'],_0x5367de,_0x65e831);if(_0x351de6['status']>0xc7&&_0x351de6['status']<0x12c){const _0x5d3c48=yield _0x351de6['json']();return new SuccessfulSearchServiceResponse(_0x5d3c48);}const _0x5b3325=yield _0x351de6['json']();return new FailedSearchServiceResponse(_0x5b3325);}catch(_0x2518eb){if(_0x2518eb instanceof Error)return new FailedSearchServiceResponse({'detail':_0x2518eb['message'],'title':_0x2518eb['name'],'status':0x1f4,'instance':'','type':''});throw _0x2518eb;}});}['delete'](_0x44d4d5,_0x4135c8,_0xf4efad){return __awaiter$1(this,void 0,void 0,function*(){const _0x3dc1a0=this['path']+'/'+_0x44d4d5+'/'+_0x4135c8;try{const _0x293f0a=yield this['fetch']['delete'](_0x3dc1a0,_0xf4efad);if(_0x293f0a['status']>0xc7&&_0x293f0a['status']<0x12c)return new SuccessfulResponse({});const _0x24f703=yield _0x293f0a['json']();return new FailedResponse(_0x24f703);}catch(_0x48464b){if(_0x48464b instanceof Error)return new FailedResponse({'detail':_0x48464b['message'],'title':_0x48464b['name'],'status':0x1f4,'instance':'','type':''});throw _0x48464b;}});}['view'](_0x48dd57,_0xecc892,_0x47340a){return __awaiter$1(this,void 0,void 0,function*(){const _0x256e1a=this['path']+'/'+_0x48dd57+'/'+_0xecc892;try{const _0xe82e22=yield this['fetch']['get'](_0x256e1a,_0x47340a);if(_0xe82e22['status']>0xc7&&_0xe82e22['status']<0x12c){const _0xcf2d4a=yield _0xe82e22['json']();return new SuccessfulViewSearchServiceResponse(_0xcf2d4a);}const _0x5670b8=yield _0xe82e22['json']();return new FailedViewSearchServiceResponse(_0x5670b8);}catch(_0x165044){if(_0x165044 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x165044['message'],'title':_0x165044['name'],'status':0x1f4,'instance':'','type':''});throw _0x165044;}});}['edit'](_0x6e75e9,_0x2b8469,_0x1e3418,_0x60b95f,_0x416491,_0x17a5d9){return __awaiter$1(this,void 0,void 0,function*(){const _0x555413={'account_name':_0x6e75e9,'search_service_name':_0x2b8469,'new_search_service_name':_0x1e3418,'key':_0x60b95f,'country':_0x416491};try{const _0x4819fc=yield this['fetch']['put'](this['path'],_0x17a5d9,_0x555413);if(_0x4819fc['status']>0xc7&&_0x4819fc['status']<0x12c){const _0x8634bb=yield _0x4819fc['json']();return new SuccessfulSearchServiceResponse(_0x8634bb);}const _0x1109ec=yield _0x4819fc['json']();return new FailedSearchServiceResponse(_0x1109ec);}catch(_0x29b89d){if(_0x29b89d instanceof Error)return new FailedSearchServiceResponse({'detail':_0x29b89d['message'],'title':_0x29b89d['name'],'status':0x1f4,'instance':'','type':''});throw _0x29b89d;}});}['list'](_0x3d70e8,_0x2ac91b){return __awaiter$1(this,void 0,void 0,function*(){const _0x46d23a=this['path']+'/'+_0x3d70e8;try{const _0xc5d71f=yield this['fetch']['get'](_0x46d23a,_0x2ac91b);if(_0xc5d71f['status']>0xc7&&_0xc5d71f['status']<0x12c){const _0x5b9bb0=yield _0xc5d71f['json']();return new SuccessfulListSearchServiceResponse(_0x5b9bb0);}const _0x4a04bc=yield _0xc5d71f['json']();return new FailedViewSearchServicesResponse(_0x4a04bc);}catch(_0x54b45a){if(_0x54b45a instanceof Error)return new FailedViewSearchServicesResponse({'detail':_0x54b45a['message'],'title':_0x54b45a['name'],'status':0x1f4,'instance':'','type':''});throw _0x54b45a;}});}}
14
14
 
15
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x3039cb,_0x319388,_0x18245e,_0x4a2bbe){function _0x3e5d9d(_0x5e96b7){return _0x5e96b7 instanceof _0x18245e?_0x5e96b7:new _0x18245e(function(_0xf4399){_0xf4399(_0x5e96b7);});}return new(_0x18245e||(_0x18245e=Promise))(function(_0x26b6b1,_0x571bbb){function _0x445126(_0x2132c8){try{_0x82c599(_0x4a2bbe['next'](_0x2132c8));}catch(_0x5c4ccd){_0x571bbb(_0x5c4ccd);}}function _0x4549f3(_0x3ed7c1){try{_0x82c599(_0x4a2bbe['throw'](_0x3ed7c1));}catch(_0x21f9f7){_0x571bbb(_0x21f9f7);}}function _0x82c599(_0xb37fc6){_0xb37fc6['done']?_0x26b6b1(_0xb37fc6['value']):_0x3e5d9d(_0xb37fc6['value'])['then'](_0x445126,_0x4549f3);}_0x82c599((_0x4a2bbe=_0x4a2bbe['apply'](_0x3039cb,_0x319388||[]))['next']());});};class AdminClient{constructor(_0x45ab9f='https://admin.searchability.dev/'){var _0x67ea45=new Fetch(_0x45ab9f);this['Accounts']=new AccountService(_0x67ea45),this['Lists']=new ListService(_0x67ea45),this['ApiKeys']=new ApiKeyService(_0x67ea45),this['SearchServices']=new SearchServersService(_0x67ea45);}}class AuthClient{constructor(_0x225fcc='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x225fcc);}['login'](_0x320f43){return __awaiter(this,void 0,void 0,function*(){const _0x2ece13='login/'+_0x320f43;try{const _0x43103e=yield yield fetch(_0x2ece13);if(_0x43103e['status']>0xc7&&_0x43103e['status']<0x12c){const _0x5a7e83=yield _0x43103e['json']();return new SuccessfulAuthResponse(_0x5a7e83);}const _0x2a37b3=yield _0x43103e['json']();return new FailedAuthResponse(_0x2a37b3);}catch(_0x1a3d99){if(_0x1a3d99 instanceof Error)return new FailedAuthResponse({'detail':_0x1a3d99['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x1a3d99;}});}['refresh'](_0x1a22e7){return __awaiter(this,void 0,void 0,function*(){const _0x1f4c57='refresh',_0x5d3d84={'refresh_token':_0x1a22e7};try{const _0x143281=yield this['fetch']['PostNoAuth'](_0x1f4c57,_0x5d3d84);if(_0x143281['status']>0xc7&&_0x143281['status']<0x12c){const _0x363b43=yield _0x143281['json']();return new SuccessfulAuthResponse(_0x363b43);}const _0x506c74=yield _0x143281['json']();return new FailedAuthResponse(_0x506c74);}catch(_0x281a65){if(_0x281a65 instanceof Error)return new FailedAuthResponse({'detail':_0x281a65['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x281a65;}});}['getTokenStatus'](_0x22a19b){if(Date['now']()<_0x22a19b['access_expires'])return exports.TokenStatus['Ok'];if(Date['now']()<_0x22a19b['refresh_expires'])return exports.TokenStatus['Refresh'];return exports.TokenStatus['Expired'];}}
15
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x275b62,_0xf937f6,_0x329b0f,_0x19cb46){function _0x19856d(_0x1c5318){return _0x1c5318 instanceof _0x329b0f?_0x1c5318:new _0x329b0f(function(_0x2db118){_0x2db118(_0x1c5318);});}return new(_0x329b0f||(_0x329b0f=Promise))(function(_0x22ec8e,_0x504527){function _0x4881af(_0x442ef1){try{_0x56a52b(_0x19cb46['next'](_0x442ef1));}catch(_0x387cbd){_0x504527(_0x387cbd);}}function _0x59b45f(_0x1fa868){try{_0x56a52b(_0x19cb46['throw'](_0x1fa868));}catch(_0x240e9e){_0x504527(_0x240e9e);}}function _0x56a52b(_0x363e03){_0x363e03['done']?_0x22ec8e(_0x363e03['value']):_0x19856d(_0x363e03['value'])['then'](_0x4881af,_0x59b45f);}_0x56a52b((_0x19cb46=_0x19cb46['apply'](_0x275b62,_0xf937f6||[]))['next']());});};class AdminClient{constructor(_0x420a8a='https://admin.searchability.dev/'){var _0x150259=new Fetch(_0x420a8a);this['Accounts']=new AccountService(_0x150259),this['Lists']=new ListService(_0x150259),this['ApiKeys']=new ApiKeyService(_0x150259),this['SearchServices']=new SearchServersService(_0x150259);}}class AuthClient{constructor(_0x25165b='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x25165b);}['login'](_0x348cd7){return __awaiter(this,void 0,void 0,function*(){const _0x2cd218='login/'+_0x348cd7;try{const _0x543f2f=yield yield fetch(_0x2cd218);if(_0x543f2f['status']>0xc7&&_0x543f2f['status']<0x12c){const _0x212e04=yield _0x543f2f['json']();return new SuccessfulAuthResponse(_0x212e04);}const _0x24c523=yield _0x543f2f['json']();return new FailedAuthResponse(_0x24c523);}catch(_0x300088){if(_0x300088 instanceof Error)return new FailedAuthResponse({'detail':_0x300088['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x300088;}});}['refresh'](_0x5010f7){return __awaiter(this,void 0,void 0,function*(){const _0x420e88='refresh',_0x35e6e6={'refresh_token':_0x5010f7};try{const _0x4bf1b5=yield this['fetch']['PostNoAuth'](_0x420e88,_0x35e6e6);if(_0x4bf1b5['status']>0xc7&&_0x4bf1b5['status']<0x12c){const _0x48adcb=yield _0x4bf1b5['json']();return new SuccessfulAuthResponse(_0x48adcb);}const _0x494324=yield _0x4bf1b5['json']();return new FailedAuthResponse(_0x494324);}catch(_0xab9d0f){if(_0xab9d0f instanceof Error)return new FailedAuthResponse({'detail':_0xab9d0f['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0xab9d0f;}});}['getTokenStatus'](_0x57b0e2){if(Date['now']()<_0x57b0e2['access_expires'])return exports.TokenStatus['Ok'];if(Date['now']()<_0x57b0e2['refresh_expires'])return exports.TokenStatus['Refresh'];return exports.TokenStatus['Expired'];}}
16
16
 
17
17
  exports.AdminClient = AdminClient;
18
18
  exports.AuthClient = AuthClient;
@@ -1,15 +1,15 @@
1
- var TokenStatus;(function(_0x12aaa7){_0x12aaa7[_0x12aaa7['Ok']=0x0]='Ok',_0x12aaa7[_0x12aaa7['Refresh']=0x1]='Refresh',_0x12aaa7[_0x12aaa7['Expired']=0x2]='Expired';}(TokenStatus||(TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}}class Response{constructor(_0x31f0d3){this['isSuccess']=_0x31f0d3;}}class SuccessfulAccountResponse extends Response{constructor(_0x45655d){super(!![]),this['account']=_0x45655d;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x547484){super(![]),this['problem']=_0x547484;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x38bf61){super(!![]),this['tokens']=_0x38bf61;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0xe1c600){super(![]),this['problem']=_0xe1c600;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x1a65c5){super(!![]),this['apiKey']=_0x1a65c5;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x5e0c1a){super(![]),this['problem']=_0x5e0c1a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x511b46){super(!![]),this['searchService']=_0x511b46;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x1bd6a3){super(![]),this['problem']=_0x1bd6a3;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x1ea6c2){super(!![]),this['searchService']=_0x1ea6c2;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServiceResponse extends Response{constructor(_0x56b6d2){super(![]),this['problem']=_0x56b6d2;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x315fe7){super(!![]),this['apiKeyValue']=_0x315fe7;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x951897){super(!![]),this['obj']=_0x951897;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x4d2f27){super(![]),this['problem']=_0x4d2f27;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x462986){super(![]),this['problem']=_0x462986;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
1
+ var TokenStatus;(function(_0x362ad4){_0x362ad4[_0x362ad4['Ok']=0x0]='Ok',_0x362ad4[_0x362ad4['Refresh']=0x1]='Refresh',_0x362ad4[_0x362ad4['Expired']=0x2]='Expired';}(TokenStatus||(TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}}class Response{constructor(_0x55dac9){this['isSuccess']=_0x55dac9;}}class SuccessfulAccountResponse extends Response{constructor(_0xaab4c2){super(!![]),this['account']=_0xaab4c2;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListIdentityResponse extends Response{constructor(_0xf67a2f){super(!![]),this['list']=_0xf67a2f;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x5ac3f3){super(![]),this['problem']=_0x5ac3f3;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListIdentityResponse extends Response{constructor(_0x5f1750){super(![]),this['problem']=_0x5f1750;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x5575ab){super(!![]),this['tokens']=_0x5575ab;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x570778){super(![]),this['problem']=_0x570778;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x11db11){super(!![]),this['apiKey']=_0x11db11;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x85b141){super(![]),this['problem']=_0x85b141;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x3178dd){super(!![]),this['searchService']=_0x3178dd;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x3e7d98){super(![]),this['problem']=_0x3e7d98;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x1bf5d){super(!![]),this['searchService']=_0x1bf5d;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListSearchServiceResponse extends Response{constructor(_0x210219){super(!![]),this['searchServices']=_0x210219;}['toSuccess'](){return this['searchServices'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServicesResponse extends Response{constructor(_0x4acce5){super(![]),this['problem']=_0x4acce5;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedViewSearchServiceResponse extends Response{constructor(_0x19125e){super(![]),this['problem']=_0x19125e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0xc82f03){super(!![]),this['apiKeyValue']=_0xc82f03;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x4368e6){super(!![]),this['obj']=_0x4368e6;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x3ffac7){super(![]),this['problem']=_0x3ffac7;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x52415c){super(![]),this['problem']=_0x52415c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
2
2
 
3
- var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x4c6080,_0x8c3e38,_0x4c21b8,_0x42f590){function _0x41ba4b(_0x3c780a){return _0x3c780a instanceof _0x4c21b8?_0x3c780a:new _0x4c21b8(function(_0x2cb276){_0x2cb276(_0x3c780a);});}return new(_0x4c21b8||(_0x4c21b8=Promise))(function(_0x4cbd90,_0x266ace){function _0x2cc352(_0x206df1){try{_0x53c208(_0x42f590['next'](_0x206df1));}catch(_0x10a9aa){_0x266ace(_0x10a9aa);}}function _0x2b3518(_0x200be5){try{_0x53c208(_0x42f590['throw'](_0x200be5));}catch(_0x5a73a8){_0x266ace(_0x5a73a8);}}function _0x53c208(_0x5503a3){_0x5503a3['done']?_0x4cbd90(_0x5503a3['value']):_0x41ba4b(_0x5503a3['value'])['then'](_0x2cc352,_0x2b3518);}_0x53c208((_0x42f590=_0x42f590['apply'](_0x4c6080,_0x8c3e38||[]))['next']());});};class AccountService{constructor(_0xf6f345){this['fetch']=_0xf6f345;}['get'](_0x482c70,_0x389bb8){return __awaiter$5(this,void 0,void 0,function*(){const _0x1e0aa3='Account/'+_0x482c70+'/',_0x5445f3=yield this['fetch']['get'](_0x1e0aa3,_0x389bb8);try{if(_0x5445f3['status']>0xc7&&_0x5445f3['status']<0x12c){const _0x1ba185=yield _0x5445f3['json']();return new SuccessfulAccountResponse(_0x1ba185);}const _0x35713b=yield _0x5445f3['json']();return new FailedAccountResponse(_0x35713b);}catch(_0x3254e1){if(_0x3254e1 instanceof Error)return new FailedAccountResponse({'detail':_0x3254e1['message'],'title':_0x3254e1['name'],'status':0x1f4,'instance':'','type':''});throw _0x3254e1;}});}}
3
+ var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x45f13f,_0x1e099e,_0x4082b1,_0x1a7b50){function _0x26a409(_0x18f0bc){return _0x18f0bc instanceof _0x4082b1?_0x18f0bc:new _0x4082b1(function(_0x12e27b){_0x12e27b(_0x18f0bc);});}return new(_0x4082b1||(_0x4082b1=Promise))(function(_0x730b9b,_0x564395){function _0x2d0eb9(_0x1ce7db){try{_0x2c79ba(_0x1a7b50['next'](_0x1ce7db));}catch(_0xcc6fee){_0x564395(_0xcc6fee);}}function _0x34847d(_0x1fa77d){try{_0x2c79ba(_0x1a7b50['throw'](_0x1fa77d));}catch(_0x2500b2){_0x564395(_0x2500b2);}}function _0x2c79ba(_0x2babd9){_0x2babd9['done']?_0x730b9b(_0x2babd9['value']):_0x26a409(_0x2babd9['value'])['then'](_0x2d0eb9,_0x34847d);}_0x2c79ba((_0x1a7b50=_0x1a7b50['apply'](_0x45f13f,_0x1e099e||[]))['next']());});};class AccountService{constructor(_0x2dd512){this['fetch']=_0x2dd512;}['get'](_0x53e5f8,_0x44f1ce){return __awaiter$5(this,void 0,void 0,function*(){const _0x1004ac='Account/'+_0x53e5f8+'/',_0x18a407=yield this['fetch']['get'](_0x1004ac,_0x44f1ce);try{if(_0x18a407['status']>0xc7&&_0x18a407['status']<0x12c){const _0x50942a=yield _0x18a407['json']();return new SuccessfulAccountResponse(_0x50942a);}const _0x4664d1=yield _0x18a407['json']();return new FailedAccountResponse(_0x4664d1);}catch(_0x331542){if(_0x331542 instanceof Error)return new FailedAccountResponse({'detail':_0x331542['message'],'title':_0x331542['name'],'status':0x1f4,'instance':'','type':''});throw _0x331542;}});}}
4
4
 
5
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x2c583b,_0x494b1a,_0x5d0d02,_0x46531f){function _0x33175c(_0x29bc63){return _0x29bc63 instanceof _0x5d0d02?_0x29bc63:new _0x5d0d02(function(_0x1ba4ab){_0x1ba4ab(_0x29bc63);});}return new(_0x5d0d02||(_0x5d0d02=Promise))(function(_0x27c383,_0x590192){function _0x110cdb(_0x54d399){try{_0x2ea6c6(_0x46531f['next'](_0x54d399));}catch(_0x360108){_0x590192(_0x360108);}}function _0x2894ea(_0x2898f8){try{_0x2ea6c6(_0x46531f['throw'](_0x2898f8));}catch(_0x205171){_0x590192(_0x205171);}}function _0x2ea6c6(_0x461c30){_0x461c30['done']?_0x27c383(_0x461c30['value']):_0x33175c(_0x461c30['value'])['then'](_0x110cdb,_0x2894ea);}_0x2ea6c6((_0x46531f=_0x46531f['apply'](_0x2c583b,_0x494b1a||[]))['next']());});};class ApiKeyService{constructor(_0x22b2cc){this['fetch']=_0x22b2cc,this['path']='api-key';}['create'](_0x24ac39,_0x17cf5e,_0x480a3a){return __awaiter$4(this,void 0,void 0,function*(){const _0x458530={'account_name':_0x24ac39,'api_key_name':_0x17cf5e};try{const _0x39b9fd=yield this['fetch']['post'](this['path'],_0x480a3a,_0x458530);if(_0x39b9fd['status']>0xc7&&_0x39b9fd['status']<0x12c){const _0x4f86ea=yield _0x39b9fd['json']();return new SuccessfulApiKeyResponse(_0x4f86ea);}const _0x23222c=yield _0x39b9fd['json']();return new FailedApiKeyResponse(_0x23222c);}catch(_0x51b690){if(_0x51b690 instanceof Error)return new FailedApiKeyResponse({'detail':_0x51b690['message'],'title':_0x51b690['name'],'status':0x1f4,'instance':'','type':''});throw _0x51b690;}});}['view'](_0x546b5e,_0x2e984e,_0x46dabb){return __awaiter$4(this,void 0,void 0,function*(){const _0x148451=this['path']+'/'+_0x546b5e+'/'+_0x2e984e;try{const _0x54b48c=yield this['fetch']['get'](_0x148451,_0x46dabb);if(_0x54b48c['status']>0xc7&&_0x54b48c['status']<0x12c){const _0x35d51f=yield _0x54b48c['json']();return new SuccessfulApiKeyValueResponse(_0x35d51f);}const _0x3cc45e=yield _0x54b48c['json']();return new FailedApiKeyValueResponse(_0x3cc45e);}catch(_0x4736e8){if(_0x4736e8 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x4736e8['message'],'title':_0x4736e8['name'],'status':0x1f4,'instance':'','type':''});throw _0x4736e8;}});}['delete'](_0x3b4a0b,_0x173f2d,_0x5b83e7){return __awaiter$4(this,void 0,void 0,function*(){const _0x29bad4=this['path']+'/'+_0x3b4a0b+'/'+_0x173f2d;try{const _0x39b868=yield this['fetch']['delete'](_0x29bad4,_0x5b83e7);if(_0x39b868['status']>0xc7&&_0x39b868['status']<0x12c)return new SuccessfulResponse({});const _0x28ecf4=yield _0x39b868['json']();return new FailedResponse(_0x28ecf4);}catch(_0x2dbdce){if(_0x2dbdce instanceof Error)return new FailedResponse({'detail':_0x2dbdce['message'],'title':_0x2dbdce['name'],'status':0x1f4,'instance':'','type':''});throw _0x2dbdce;}});}}
5
+ var __awaiter$4=undefined&&undefined['__awaiter']||function(_0xfdffb7,_0x645879,_0x4deaea,_0x1d3cec){function _0x1de5ee(_0x1af610){return _0x1af610 instanceof _0x4deaea?_0x1af610:new _0x4deaea(function(_0xf6339a){_0xf6339a(_0x1af610);});}return new(_0x4deaea||(_0x4deaea=Promise))(function(_0x301f81,_0x154940){function _0x36dc48(_0x2ae771){try{_0x417319(_0x1d3cec['next'](_0x2ae771));}catch(_0x108719){_0x154940(_0x108719);}}function _0x55ca97(_0x338d62){try{_0x417319(_0x1d3cec['throw'](_0x338d62));}catch(_0x4a5c15){_0x154940(_0x4a5c15);}}function _0x417319(_0x540eb1){_0x540eb1['done']?_0x301f81(_0x540eb1['value']):_0x1de5ee(_0x540eb1['value'])['then'](_0x36dc48,_0x55ca97);}_0x417319((_0x1d3cec=_0x1d3cec['apply'](_0xfdffb7,_0x645879||[]))['next']());});};class ApiKeyService{constructor(_0x59b109){this['fetch']=_0x59b109,this['path']='api-key';}['create'](_0x3eb035,_0x12269e,_0xd7c3bf){return __awaiter$4(this,void 0,void 0,function*(){const _0xa84528={'account_name':_0x3eb035,'api_key_name':_0x12269e};try{const _0x221816=yield this['fetch']['post'](this['path'],_0xd7c3bf,_0xa84528);if(_0x221816['status']>0xc7&&_0x221816['status']<0x12c){const _0x213c28=yield _0x221816['json']();return new SuccessfulApiKeyResponse(_0x213c28);}const _0x1faed1=yield _0x221816['json']();return new FailedApiKeyResponse(_0x1faed1);}catch(_0x122e3f){if(_0x122e3f instanceof Error)return new FailedApiKeyResponse({'detail':_0x122e3f['message'],'title':_0x122e3f['name'],'status':0x1f4,'instance':'','type':''});throw _0x122e3f;}});}['view'](_0x25794c,_0x22e251,_0x1f8d90){return __awaiter$4(this,void 0,void 0,function*(){const _0xf4404e=this['path']+'/'+_0x25794c+'/'+_0x22e251;try{const _0x1096f5=yield this['fetch']['get'](_0xf4404e,_0x1f8d90);if(_0x1096f5['status']>0xc7&&_0x1096f5['status']<0x12c){const _0x3490bd=yield _0x1096f5['json']();return new SuccessfulApiKeyValueResponse(_0x3490bd);}const _0x20e7ec=yield _0x1096f5['json']();return new FailedApiKeyValueResponse(_0x20e7ec);}catch(_0x534669){if(_0x534669 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x534669['message'],'title':_0x534669['name'],'status':0x1f4,'instance':'','type':''});throw _0x534669;}});}['delete'](_0x408974,_0x27ec67,_0x253ca9){return __awaiter$4(this,void 0,void 0,function*(){const _0x69e73a=this['path']+'/'+_0x408974+'/'+_0x27ec67;try{const _0x399282=yield this['fetch']['delete'](_0x69e73a,_0x253ca9);if(_0x399282['status']>0xc7&&_0x399282['status']<0x12c)return new SuccessfulResponse({});const _0xe8abdc=yield _0x399282['json']();return new FailedResponse(_0xe8abdc);}catch(_0xf8eb2){if(_0xf8eb2 instanceof Error)return new FailedResponse({'detail':_0xf8eb2['message'],'title':_0xf8eb2['name'],'status':0x1f4,'instance':'','type':''});throw _0xf8eb2;}});}}
6
6
 
7
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0xdc2bc9,_0x5e69b1,_0x395a2d,_0x2101ad){function _0x188c3f(_0xddf1ec){return _0xddf1ec instanceof _0x395a2d?_0xddf1ec:new _0x395a2d(function(_0x310869){_0x310869(_0xddf1ec);});}return new(_0x395a2d||(_0x395a2d=Promise))(function(_0x1ce746,_0x5f07e0){function _0x1b0cfc(_0x39ec15){try{_0x5b1fb8(_0x2101ad['next'](_0x39ec15));}catch(_0x306069){_0x5f07e0(_0x306069);}}function _0x20fff5(_0x471e61){try{_0x5b1fb8(_0x2101ad['throw'](_0x471e61));}catch(_0x2fdfba){_0x5f07e0(_0x2fdfba);}}function _0x5b1fb8(_0x5272ea){_0x5272ea['done']?_0x1ce746(_0x5272ea['value']):_0x188c3f(_0x5272ea['value'])['then'](_0x1b0cfc,_0x20fff5);}_0x5b1fb8((_0x2101ad=_0x2101ad['apply'](_0xdc2bc9,_0x5e69b1||[]))['next']());});};class ListService{constructor(_0x5bde52){this['fetch']=_0x5bde52;}['add'](_0x1ba693,_0x38688a,_0x16b4fa){return __awaiter$3(this,void 0,void 0,function*(){const _0x1a61ba='List',_0x17889a={'account_name':_0x1ba693,'list_name':_0x38688a};try{const _0x4582e7=yield this['fetch']['post'](_0x1a61ba,_0x16b4fa,_0x17889a);if(_0x4582e7['status']>0xc7&&_0x4582e7['status']<0x12c){const _0x4d813b=yield _0x4582e7['json']();return new SuccessfulAccountResponse(_0x4d813b);}const _0x4de6b3=yield _0x4582e7['json']();return new FailedAccountResponse(_0x4de6b3);}catch(_0x533aa1){if(_0x533aa1 instanceof Error)return new FailedAccountResponse({'detail':_0x533aa1['message'],'title':_0x533aa1['name'],'status':0x1f4,'instance':'','type':''});throw _0x533aa1;}});}['remove'](_0x28f138,_0x5eca2,_0x1e7980){return __awaiter$3(this,void 0,void 0,function*(){const _0x6cbdde='List/'+_0x28f138+'/'+_0x5eca2,_0x503d51=yield this['fetch']['delete'](_0x6cbdde,_0x1e7980);try{if(_0x503d51['status']>0xc7&&_0x503d51['status']<0x12c){const _0x171847=yield _0x503d51['json']();return new SuccessfulAccountResponse(_0x171847);}const _0x1423eb=yield _0x503d51['json']();return new FailedAccountResponse(_0x1423eb);}catch(_0x2a540d){if(_0x2a540d instanceof Error)return new FailedAccountResponse({'detail':_0x2a540d['message'],'title':_0x2a540d['name'],'status':0x1f4,'instance':'','type':''});throw _0x2a540d;}});}}
7
+ var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x200ca3,_0x49d978,_0x3c3b3e,_0x364a4a){function _0x58b376(_0x9bbbb0){return _0x9bbbb0 instanceof _0x3c3b3e?_0x9bbbb0:new _0x3c3b3e(function(_0x3e68be){_0x3e68be(_0x9bbbb0);});}return new(_0x3c3b3e||(_0x3c3b3e=Promise))(function(_0x2198be,_0x3a6f37){function _0x1b91da(_0x140514){try{_0x254cd1(_0x364a4a['next'](_0x140514));}catch(_0x583aef){_0x3a6f37(_0x583aef);}}function _0x3cf3e(_0x253c32){try{_0x254cd1(_0x364a4a['throw'](_0x253c32));}catch(_0x25ddac){_0x3a6f37(_0x25ddac);}}function _0x254cd1(_0x3573ed){_0x3573ed['done']?_0x2198be(_0x3573ed['value']):_0x58b376(_0x3573ed['value'])['then'](_0x1b91da,_0x3cf3e);}_0x254cd1((_0x364a4a=_0x364a4a['apply'](_0x200ca3,_0x49d978||[]))['next']());});};class ListService{constructor(_0x2e3a7b){this['fetch']=_0x2e3a7b;}['add'](_0x14223a,_0x3dcb24,_0x425078,_0x5e5b3d){return __awaiter$3(this,void 0,void 0,function*(){const _0x4b01e5='List',_0xa13368={'account_name':_0x14223a,'list_name':_0x3dcb24,'search_service_name':_0x425078};try{const _0x1084cd=yield this['fetch']['post'](_0x4b01e5,_0x5e5b3d,_0xa13368);if(_0x1084cd['status']>0xc7&&_0x1084cd['status']<0x12c){const _0x7bdd66=yield _0x1084cd['json']();return new SuccessfulListIdentityResponse(_0x7bdd66);}const _0x50a751=yield _0x1084cd['json']();return new FailedListIdentityResponse(_0x50a751);}catch(_0x5a3870){if(_0x5a3870 instanceof Error)return new FailedListIdentityResponse({'detail':_0x5a3870['message'],'title':_0x5a3870['name'],'status':0x1f4,'instance':'','type':''});throw _0x5a3870;}});}['remove'](_0x15fc5e,_0x2ec653,_0x385d36){return __awaiter$3(this,void 0,void 0,function*(){const _0x25ea60='List/'+_0x15fc5e+'/'+_0x2ec653,_0x47d069=yield this['fetch']['delete'](_0x25ea60,_0x385d36);try{if(_0x47d069['status']>0xc7&&_0x47d069['status']<0x12c){const _0x2d4921=yield _0x47d069['json']();return new SuccessfulAccountResponse(_0x2d4921);}const _0x137474=yield _0x47d069['json']();return new FailedAccountResponse(_0x137474);}catch(_0x5b94db){if(_0x5b94db instanceof Error)return new FailedAccountResponse({'detail':_0x5b94db['message'],'title':_0x5b94db['name'],'status':0x1f4,'instance':'','type':''});throw _0x5b94db;}});}}
8
8
 
9
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x1079eb,_0x3ec0a2,_0x36c2fd,_0x24dbee){function _0x9437d(_0x3c1392){return _0x3c1392 instanceof _0x36c2fd?_0x3c1392:new _0x36c2fd(function(_0x3d3761){_0x3d3761(_0x3c1392);});}return new(_0x36c2fd||(_0x36c2fd=Promise))(function(_0x361e18,_0x352d06){function _0xbf25a1(_0x19d290){try{_0x20bb10(_0x24dbee['next'](_0x19d290));}catch(_0x4ce64c){_0x352d06(_0x4ce64c);}}function _0x4b30b7(_0x1e5d0c){try{_0x20bb10(_0x24dbee['throw'](_0x1e5d0c));}catch(_0xccb00f){_0x352d06(_0xccb00f);}}function _0x20bb10(_0x3088f5){_0x3088f5['done']?_0x361e18(_0x3088f5['value']):_0x9437d(_0x3088f5['value'])['then'](_0xbf25a1,_0x4b30b7);}_0x20bb10((_0x24dbee=_0x24dbee['apply'](_0x1079eb,_0x3ec0a2||[]))['next']());});};class Fetch{constructor(_0x15fe09){this['baseUri']=_0x15fe09,this['getUrl']=_0x21d56d=>{return _0x21d56d['startsWith']('/')&&(_0x21d56d=_0x21d56d['replace']('/','')),''+this['baseUri']+_0x21d56d;},!_0x15fe09['endsWith']('/')&&(_0x15fe09=_0x15fe09+'/');}['get'](_0x2755c6,_0x1bc050){return __awaiter$2(this,void 0,void 0,function*(){const _0x2b3efe=this['getUrl'](_0x2755c6);return yield fetch(_0x2b3efe,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1bc050}});});}['post'](_0x20fd0d,_0x25edc2,_0x186d68){return __awaiter$2(this,void 0,void 0,function*(){const _0xd3280=this['getUrl'](_0x20fd0d);return yield fetch(_0xd3280,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x25edc2},'body':_0x186d68?JSON['stringify'](_0x186d68):null});});}['PostNoAuth'](_0x5e9904,_0x8de797){return __awaiter$2(this,void 0,void 0,function*(){const _0x6cb532=this['getUrl'](_0x5e9904);return yield fetch(_0x6cb532,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0x8de797?JSON['stringify'](_0x8de797):null});});}['put'](_0x289d23,_0x3b2161,_0x2f8e67){return __awaiter$2(this,void 0,void 0,function*(){const _0x178beb=this['getUrl'](_0x289d23);return yield fetch(_0x178beb,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3b2161},'body':_0x2f8e67?JSON['stringify'](_0x2f8e67):null});});}['delete'](_0x51b594,_0x2e7910){return __awaiter$2(this,void 0,void 0,function*(){const _0xf32d30=this['getUrl'](_0x51b594);return yield fetch(_0xf32d30,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2e7910}});});}}
9
+ var __awaiter$2=undefined&&undefined['__awaiter']||function(_0xc21d61,_0x5dfdda,_0x515c0a,_0x33e4c7){function _0x43f729(_0x26d730){return _0x26d730 instanceof _0x515c0a?_0x26d730:new _0x515c0a(function(_0x53d4b4){_0x53d4b4(_0x26d730);});}return new(_0x515c0a||(_0x515c0a=Promise))(function(_0x3a148e,_0x3bdb9c){function _0x2e83ed(_0xdbb064){try{_0x53c40f(_0x33e4c7['next'](_0xdbb064));}catch(_0x512030){_0x3bdb9c(_0x512030);}}function _0x95af10(_0x6787ce){try{_0x53c40f(_0x33e4c7['throw'](_0x6787ce));}catch(_0x3e445f){_0x3bdb9c(_0x3e445f);}}function _0x53c40f(_0x1d1f96){_0x1d1f96['done']?_0x3a148e(_0x1d1f96['value']):_0x43f729(_0x1d1f96['value'])['then'](_0x2e83ed,_0x95af10);}_0x53c40f((_0x33e4c7=_0x33e4c7['apply'](_0xc21d61,_0x5dfdda||[]))['next']());});};class Fetch{constructor(_0x570b83){this['baseUri']=_0x570b83,this['getUrl']=_0x4bc282=>{return _0x4bc282['startsWith']('/')&&(_0x4bc282=_0x4bc282['replace']('/','')),''+this['baseUri']+_0x4bc282;},!_0x570b83['endsWith']('/')&&(_0x570b83=_0x570b83+'/');}['get'](_0x577389,_0x1cab75){return __awaiter$2(this,void 0,void 0,function*(){const _0x50531e=this['getUrl'](_0x577389);return yield fetch(_0x50531e,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1cab75}});});}['post'](_0x511117,_0x5f0f54,_0xc0dfba){return __awaiter$2(this,void 0,void 0,function*(){const _0x1b6997=this['getUrl'](_0x511117);return yield fetch(_0x1b6997,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x5f0f54},'body':_0xc0dfba?JSON['stringify'](_0xc0dfba):null});});}['PostNoAuth'](_0xda76cf,_0x1169aa){return __awaiter$2(this,void 0,void 0,function*(){const _0x2c9ab9=this['getUrl'](_0xda76cf);return yield fetch(_0x2c9ab9,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0x1169aa?JSON['stringify'](_0x1169aa):null});});}['put'](_0x386d50,_0x33d1cd,_0x3f353b){return __awaiter$2(this,void 0,void 0,function*(){const _0x3bcac5=this['getUrl'](_0x386d50);return yield fetch(_0x3bcac5,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x33d1cd},'body':_0x3f353b?JSON['stringify'](_0x3f353b):null});});}['delete'](_0x2d58f8,_0x303a67){return __awaiter$2(this,void 0,void 0,function*(){const _0x1a22a3=this['getUrl'](_0x2d58f8);return yield fetch(_0x1a22a3,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x303a67}});});}}
10
10
 
11
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x553f99,_0x47920c,_0x60ad6,_0x427c3e){function _0x4e0839(_0x28a6bb){return _0x28a6bb instanceof _0x60ad6?_0x28a6bb:new _0x60ad6(function(_0x12e1cd){_0x12e1cd(_0x28a6bb);});}return new(_0x60ad6||(_0x60ad6=Promise))(function(_0xcbb01d,_0xa75e32){function _0x264544(_0x891082){try{_0x42bdb7(_0x427c3e['next'](_0x891082));}catch(_0x3f6acd){_0xa75e32(_0x3f6acd);}}function _0x28a802(_0x56f481){try{_0x42bdb7(_0x427c3e['throw'](_0x56f481));}catch(_0x2d1a2b){_0xa75e32(_0x2d1a2b);}}function _0x42bdb7(_0xa05803){_0xa05803['done']?_0xcbb01d(_0xa05803['value']):_0x4e0839(_0xa05803['value'])['then'](_0x264544,_0x28a802);}_0x42bdb7((_0x427c3e=_0x427c3e['apply'](_0x553f99,_0x47920c||[]))['next']());});};class SearchServersService{constructor(_0x181a9d){this['fetch']=_0x181a9d,this['path']='search-services';}['create'](_0x13bf7b,_0x38a737,_0x4e1b0b,_0x5f2c4a,_0x296c54,_0x52504f,_0x453030,_0x46935c){return __awaiter$1(this,void 0,void 0,function*(){const _0xac9cc2={'account_name':_0x13bf7b,'search_service_name':_0x38a737,'endpoint':_0x4e1b0b,'key':_0x5f2c4a,'country':_0x296c54,'provider':_0x52504f,'index_name':_0x453030};try{const _0x4a5e87=yield this['fetch']['post'](this['path'],_0x46935c,_0xac9cc2);if(_0x4a5e87['status']>0xc7&&_0x4a5e87['status']<0x12c){const _0xa03734=yield _0x4a5e87['json']();return new SuccessfulSearchServiceResponse(_0xa03734);}const _0x483118=yield _0x4a5e87['json']();return new FailedSearchServiceResponse(_0x483118);}catch(_0x4ce94c){if(_0x4ce94c instanceof Error)return new FailedSearchServiceResponse({'detail':_0x4ce94c['message'],'title':_0x4ce94c['name'],'status':0x1f4,'instance':'','type':''});throw _0x4ce94c;}});}['delete'](_0x309f75,_0x8a4116,_0x1375df){return __awaiter$1(this,void 0,void 0,function*(){const _0x210528=this['path']+'/'+_0x309f75+'/'+_0x8a4116;try{const _0x28c17b=yield this['fetch']['delete'](_0x210528,_0x1375df);if(_0x28c17b['status']>0xc7&&_0x28c17b['status']<0x12c)return new SuccessfulResponse({});const _0x31c864=yield _0x28c17b['json']();return new FailedResponse(_0x31c864);}catch(_0x549796){if(_0x549796 instanceof Error)return new FailedResponse({'detail':_0x549796['message'],'title':_0x549796['name'],'status':0x1f4,'instance':'','type':''});throw _0x549796;}});}['view'](_0x1fedbc,_0x3ae421,_0x2cc7f4){return __awaiter$1(this,void 0,void 0,function*(){const _0x47b9cc=this['path']+'/'+_0x1fedbc+'/'+_0x3ae421;try{const _0x390d50=yield this['fetch']['get'](_0x47b9cc,_0x2cc7f4);if(_0x390d50['status']>0xc7&&_0x390d50['status']<0x12c){const _0xd205dc=yield _0x390d50['json']();return new SuccessfulViewSearchServiceResponse(_0xd205dc);}const _0x1ac94a=yield _0x390d50['json']();return new FailedViewSearchServiceResponse(_0x1ac94a);}catch(_0x5a2349){if(_0x5a2349 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x5a2349['message'],'title':_0x5a2349['name'],'status':0x1f4,'instance':'','type':''});throw _0x5a2349;}});}['edit'](_0x2ca097,_0x3bd437,_0x5842e1,_0x2b21db,_0x3f75de,_0x8b8be3){return __awaiter$1(this,void 0,void 0,function*(){const _0x37d390={'account_name':_0x2ca097,'search_service_name':_0x3bd437,'new_search_service_name':_0x5842e1,'key':_0x2b21db,'country':_0x3f75de};try{const _0x4970e4=yield this['fetch']['put'](this['path'],_0x8b8be3,_0x37d390);if(_0x4970e4['status']>0xc7&&_0x4970e4['status']<0x12c){const _0x33806e=yield _0x4970e4['json']();return new SuccessfulSearchServiceResponse(_0x33806e);}const _0x23b330=yield _0x4970e4['json']();return new FailedSearchServiceResponse(_0x23b330);}catch(_0x4aab46){if(_0x4aab46 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x4aab46['message'],'title':_0x4aab46['name'],'status':0x1f4,'instance':'','type':''});throw _0x4aab46;}});}}
11
+ var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x5f3960,_0x40e0f0,_0x12c96a,_0x2da8a0){function _0x3f916c(_0x2305a2){return _0x2305a2 instanceof _0x12c96a?_0x2305a2:new _0x12c96a(function(_0x4102de){_0x4102de(_0x2305a2);});}return new(_0x12c96a||(_0x12c96a=Promise))(function(_0x5a220c,_0x4b3828){function _0x556d9e(_0x5cf524){try{_0x43d1c0(_0x2da8a0['next'](_0x5cf524));}catch(_0x11907b){_0x4b3828(_0x11907b);}}function _0x51d907(_0xf90bf3){try{_0x43d1c0(_0x2da8a0['throw'](_0xf90bf3));}catch(_0x5a2036){_0x4b3828(_0x5a2036);}}function _0x43d1c0(_0x3a2e0e){_0x3a2e0e['done']?_0x5a220c(_0x3a2e0e['value']):_0x3f916c(_0x3a2e0e['value'])['then'](_0x556d9e,_0x51d907);}_0x43d1c0((_0x2da8a0=_0x2da8a0['apply'](_0x5f3960,_0x40e0f0||[]))['next']());});};class SearchServersService{constructor(_0x5cee61){this['fetch']=_0x5cee61,this['path']='search-services';}['create'](_0xdc98b2,_0x591ec4,_0x3f448f,_0x62eb7c,_0x2bb1f0,_0x1dad16,_0x3f2e10,_0x128954){return __awaiter$1(this,void 0,void 0,function*(){const _0x2a4f0a={'account_name':_0xdc98b2,'search_service_name':_0x591ec4,'endpoint':_0x3f448f,'key':_0x62eb7c,'country':_0x2bb1f0,'provider':_0x1dad16,'index_name':_0x3f2e10};try{const _0x3a6a8a=yield this['fetch']['post'](this['path'],_0x128954,_0x2a4f0a);if(_0x3a6a8a['status']>0xc7&&_0x3a6a8a['status']<0x12c){const _0x16377b=yield _0x3a6a8a['json']();return new SuccessfulSearchServiceResponse(_0x16377b);}const _0xa5d8b6=yield _0x3a6a8a['json']();return new FailedSearchServiceResponse(_0xa5d8b6);}catch(_0x3c8325){if(_0x3c8325 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x3c8325['message'],'title':_0x3c8325['name'],'status':0x1f4,'instance':'','type':''});throw _0x3c8325;}});}['delete'](_0x5897ad,_0x5d3935,_0x371218){return __awaiter$1(this,void 0,void 0,function*(){const _0x34f40a=this['path']+'/'+_0x5897ad+'/'+_0x5d3935;try{const _0x334dbd=yield this['fetch']['delete'](_0x34f40a,_0x371218);if(_0x334dbd['status']>0xc7&&_0x334dbd['status']<0x12c)return new SuccessfulResponse({});const _0x474251=yield _0x334dbd['json']();return new FailedResponse(_0x474251);}catch(_0x506d2f){if(_0x506d2f instanceof Error)return new FailedResponse({'detail':_0x506d2f['message'],'title':_0x506d2f['name'],'status':0x1f4,'instance':'','type':''});throw _0x506d2f;}});}['view'](_0x52a799,_0x42339b,_0x16e34c){return __awaiter$1(this,void 0,void 0,function*(){const _0x436905=this['path']+'/'+_0x52a799+'/'+_0x42339b;try{const _0x35c6b2=yield this['fetch']['get'](_0x436905,_0x16e34c);if(_0x35c6b2['status']>0xc7&&_0x35c6b2['status']<0x12c){const _0x2d9457=yield _0x35c6b2['json']();return new SuccessfulViewSearchServiceResponse(_0x2d9457);}const _0x565d22=yield _0x35c6b2['json']();return new FailedViewSearchServiceResponse(_0x565d22);}catch(_0x7deba8){if(_0x7deba8 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x7deba8['message'],'title':_0x7deba8['name'],'status':0x1f4,'instance':'','type':''});throw _0x7deba8;}});}['edit'](_0x34654f,_0x38c682,_0x10d23b,_0x4e7631,_0x308435,_0x2c81f5){return __awaiter$1(this,void 0,void 0,function*(){const _0x1dcf2b={'account_name':_0x34654f,'search_service_name':_0x38c682,'new_search_service_name':_0x10d23b,'key':_0x4e7631,'country':_0x308435};try{const _0x184f36=yield this['fetch']['put'](this['path'],_0x2c81f5,_0x1dcf2b);if(_0x184f36['status']>0xc7&&_0x184f36['status']<0x12c){const _0x346a2d=yield _0x184f36['json']();return new SuccessfulSearchServiceResponse(_0x346a2d);}const _0x245796=yield _0x184f36['json']();return new FailedSearchServiceResponse(_0x245796);}catch(_0x3cc973){if(_0x3cc973 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x3cc973['message'],'title':_0x3cc973['name'],'status':0x1f4,'instance':'','type':''});throw _0x3cc973;}});}['list'](_0x201ee4,_0x494def){return __awaiter$1(this,void 0,void 0,function*(){const _0x3a01b5=this['path']+'/'+_0x201ee4;try{const _0xf51eaa=yield this['fetch']['get'](_0x3a01b5,_0x494def);if(_0xf51eaa['status']>0xc7&&_0xf51eaa['status']<0x12c){const _0x180f43=yield _0xf51eaa['json']();return new SuccessfulListSearchServiceResponse(_0x180f43);}const _0x5282bf=yield _0xf51eaa['json']();return new FailedViewSearchServicesResponse(_0x5282bf);}catch(_0x4ab1bc){if(_0x4ab1bc instanceof Error)return new FailedViewSearchServicesResponse({'detail':_0x4ab1bc['message'],'title':_0x4ab1bc['name'],'status':0x1f4,'instance':'','type':''});throw _0x4ab1bc;}});}}
12
12
 
13
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x3c0f52,_0xe4bfaf,_0xed4e0a,_0x4e840a){function _0x3c4213(_0x2d4003){return _0x2d4003 instanceof _0xed4e0a?_0x2d4003:new _0xed4e0a(function(_0x586104){_0x586104(_0x2d4003);});}return new(_0xed4e0a||(_0xed4e0a=Promise))(function(_0x4d1826,_0x2b6859){function _0x5db141(_0x2694ed){try{_0x467655(_0x4e840a['next'](_0x2694ed));}catch(_0x1b05f7){_0x2b6859(_0x1b05f7);}}function _0x124b9b(_0x47b250){try{_0x467655(_0x4e840a['throw'](_0x47b250));}catch(_0x3df502){_0x2b6859(_0x3df502);}}function _0x467655(_0xd8f8f8){_0xd8f8f8['done']?_0x4d1826(_0xd8f8f8['value']):_0x3c4213(_0xd8f8f8['value'])['then'](_0x5db141,_0x124b9b);}_0x467655((_0x4e840a=_0x4e840a['apply'](_0x3c0f52,_0xe4bfaf||[]))['next']());});};class AdminClient{constructor(_0x1a225d='https://admin.searchability.dev/'){var _0x4e19e3=new Fetch(_0x1a225d);this['Accounts']=new AccountService(_0x4e19e3),this['Lists']=new ListService(_0x4e19e3),this['ApiKeys']=new ApiKeyService(_0x4e19e3),this['SearchServices']=new SearchServersService(_0x4e19e3);}}class AuthClient{constructor(_0xe90043='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0xe90043);}['login'](_0xce3969){return __awaiter(this,void 0,void 0,function*(){const _0xec2133='login/'+_0xce3969;try{const _0x2e0955=yield yield fetch(_0xec2133);if(_0x2e0955['status']>0xc7&&_0x2e0955['status']<0x12c){const _0x2b928b=yield _0x2e0955['json']();return new SuccessfulAuthResponse(_0x2b928b);}const _0x53abd4=yield _0x2e0955['json']();return new FailedAuthResponse(_0x53abd4);}catch(_0x458f15){if(_0x458f15 instanceof Error)return new FailedAuthResponse({'detail':_0x458f15['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x458f15;}});}['refresh'](_0x40961e){return __awaiter(this,void 0,void 0,function*(){const _0x206a18='refresh',_0x20a2b6={'refresh_token':_0x40961e};try{const _0x2c6bce=yield this['fetch']['PostNoAuth'](_0x206a18,_0x20a2b6);if(_0x2c6bce['status']>0xc7&&_0x2c6bce['status']<0x12c){const _0x29a0ef=yield _0x2c6bce['json']();return new SuccessfulAuthResponse(_0x29a0ef);}const _0x11bfb3=yield _0x2c6bce['json']();return new FailedAuthResponse(_0x11bfb3);}catch(_0x5886a6){if(_0x5886a6 instanceof Error)return new FailedAuthResponse({'detail':_0x5886a6['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x5886a6;}});}['getTokenStatus'](_0x30cf4d){if(Date['now']()<_0x30cf4d['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x30cf4d['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
13
+ var __awaiter=undefined&&undefined['__awaiter']||function(_0x2b9156,_0x1c35a9,_0x1ac0c5,_0x610922){function _0x3b912b(_0xbcb2cb){return _0xbcb2cb instanceof _0x1ac0c5?_0xbcb2cb:new _0x1ac0c5(function(_0x18b026){_0x18b026(_0xbcb2cb);});}return new(_0x1ac0c5||(_0x1ac0c5=Promise))(function(_0x9a7da2,_0x505705){function _0x4e07cd(_0x31690c){try{_0x18eff4(_0x610922['next'](_0x31690c));}catch(_0x4921d7){_0x505705(_0x4921d7);}}function _0x3b7645(_0x4cdca0){try{_0x18eff4(_0x610922['throw'](_0x4cdca0));}catch(_0x10fda6){_0x505705(_0x10fda6);}}function _0x18eff4(_0x4ba114){_0x4ba114['done']?_0x9a7da2(_0x4ba114['value']):_0x3b912b(_0x4ba114['value'])['then'](_0x4e07cd,_0x3b7645);}_0x18eff4((_0x610922=_0x610922['apply'](_0x2b9156,_0x1c35a9||[]))['next']());});};class AdminClient{constructor(_0x45974d='https://admin.searchability.dev/'){var _0x2ed24=new Fetch(_0x45974d);this['Accounts']=new AccountService(_0x2ed24),this['Lists']=new ListService(_0x2ed24),this['ApiKeys']=new ApiKeyService(_0x2ed24),this['SearchServices']=new SearchServersService(_0x2ed24);}}class AuthClient{constructor(_0x410a07='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x410a07);}['login'](_0x4174cf){return __awaiter(this,void 0,void 0,function*(){const _0x5cbc26='login/'+_0x4174cf;try{const _0x59242e=yield yield fetch(_0x5cbc26);if(_0x59242e['status']>0xc7&&_0x59242e['status']<0x12c){const _0x4be758=yield _0x59242e['json']();return new SuccessfulAuthResponse(_0x4be758);}const _0x5da723=yield _0x59242e['json']();return new FailedAuthResponse(_0x5da723);}catch(_0x85a98c){if(_0x85a98c instanceof Error)return new FailedAuthResponse({'detail':_0x85a98c['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x85a98c;}});}['refresh'](_0x22bedf){return __awaiter(this,void 0,void 0,function*(){const _0x3981d7='refresh',_0x4cd245={'refresh_token':_0x22bedf};try{const _0x437906=yield this['fetch']['PostNoAuth'](_0x3981d7,_0x4cd245);if(_0x437906['status']>0xc7&&_0x437906['status']<0x12c){const _0x112697=yield _0x437906['json']();return new SuccessfulAuthResponse(_0x112697);}const _0x2e46a5=yield _0x437906['json']();return new FailedAuthResponse(_0x2e46a5);}catch(_0x3cc1f5){if(_0x3cc1f5 instanceof Error)return new FailedAuthResponse({'detail':_0x3cc1f5['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x3cc1f5;}});}['getTokenStatus'](_0x37ed28){if(Date['now']()<_0x37ed28['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x37ed28['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
14
14
 
15
15
  export { AdminClient, AuthClient, TokenStatus, Tokens };
package/dist/types.d.ts CHANGED
@@ -27,7 +27,7 @@ declare class ApiKeyService {
27
27
  declare class ListService {
28
28
  private readonly fetch;
29
29
  constructor(fetch: Fetch);
30
- add(accountName: string, listName: string, access_token: string): Promise<Response<Account, Problem>>;
30
+ add(account_name: string, list_name: string, search_service_name: string, access_token: string): Promise<Response<ListIdentity, Problem>>;
31
31
  remove(accountName: string, listName: string, access_token: string): Promise<Response<Account, Problem>>;
32
32
  }
33
33
 
@@ -39,6 +39,7 @@ declare class SearchServersService {
39
39
  delete(account_name: string, search_service_name: string, access_token: string): Promise<Response<any, Problem>>;
40
40
  view(account_name: string, search_service_name: string, access_token: string): Promise<Response<SearchServiceDetails, Problem>>;
41
41
  edit(account_name: string, search_service_name: string, new_search_service_name: string, key: string, country: string, access_token: string): Promise<Response<SearchService, Problem>>;
42
+ list(account_name: string, access_token: string): Promise<Response<SearchService[], Problem>>;
42
43
  }
43
44
 
44
45
  declare class AdminClient {
@@ -134,12 +135,24 @@ declare class SuccessfulAccountResponse extends Response<Account, Problem> {
134
135
  toSuccess(): Account;
135
136
  toProblem(): Problem;
136
137
  }
138
+ declare class SuccessfulListIdentityResponse extends Response<ListIdentity, Problem> {
139
+ readonly list: ListIdentity;
140
+ constructor(list: ListIdentity);
141
+ toSuccess(): ListIdentity;
142
+ toProblem(): Problem;
143
+ }
137
144
  declare class FailedAccountResponse extends Response<Account, Problem> {
138
145
  readonly problem: Problem;
139
146
  constructor(problem: Problem);
140
147
  toSuccess(): Account;
141
148
  toProblem(): Problem;
142
149
  }
150
+ declare class FailedListIdentityResponse extends Response<ListIdentity, Problem> {
151
+ readonly problem: Problem;
152
+ constructor(problem: Problem);
153
+ toSuccess(): ListIdentity;
154
+ toProblem(): Problem;
155
+ }
143
156
  declare class SuccessfulAuthResponse extends Response<Tokens, Problem> {
144
157
  readonly tokens: Tokens;
145
158
  constructor(tokens: Tokens);
@@ -182,6 +195,18 @@ declare class SuccessfulViewSearchServiceResponse extends Response<SearchService
182
195
  toSuccess(): SearchServiceDetails;
183
196
  toProblem(): Problem;
184
197
  }
198
+ declare class SuccessfulListSearchServiceResponse extends Response<SearchService[], Problem> {
199
+ readonly searchServices: SearchService[];
200
+ constructor(searchServices: SearchService[]);
201
+ toSuccess(): SearchService[];
202
+ toProblem(): Problem;
203
+ }
204
+ declare class FailedViewSearchServicesResponse extends Response<SearchService[], Problem> {
205
+ readonly problem: Problem;
206
+ constructor(problem: Problem);
207
+ toSuccess(): SearchService[];
208
+ toProblem(): Problem;
209
+ }
185
210
  declare class FailedViewSearchServiceResponse extends Response<SearchServiceDetails, Problem> {
186
211
  readonly problem: Problem;
187
212
  constructor(problem: Problem);
@@ -213,4 +238,4 @@ declare class FailedApiKeyValueResponse extends Response<ApiKeyValue, Problem> {
213
238
  toProblem(): Problem;
214
239
  }
215
240
 
216
- export { type Account, AdminClient, type ApiKey, type ApiKeyValue, AuthClient, type Error, FailedAccountResponse, FailedApiKeyResponse, FailedApiKeyValueResponse, FailedAuthResponse, FailedResponse, FailedSearchServiceResponse, FailedViewSearchServiceResponse, type List, type ListIdentity, type Problem, type RefreshRequest, Response, type SearchService, type SearchServiceDetails, SuccessfulAccountResponse, SuccessfulApiKeyResponse, SuccessfulApiKeyValueResponse, SuccessfulAuthResponse, SuccessfulResponse, SuccessfulSearchServiceResponse, SuccessfulViewSearchServiceResponse, TokenStatus, Tokens };
241
+ export { type Account, AdminClient, type ApiKey, type ApiKeyValue, AuthClient, type Error, FailedAccountResponse, FailedApiKeyResponse, FailedApiKeyValueResponse, FailedAuthResponse, FailedListIdentityResponse, FailedResponse, FailedSearchServiceResponse, FailedViewSearchServiceResponse, FailedViewSearchServicesResponse, type List, type ListIdentity, type Problem, type RefreshRequest, Response, type SearchService, type SearchServiceDetails, SuccessfulAccountResponse, SuccessfulApiKeyResponse, SuccessfulApiKeyValueResponse, SuccessfulAuthResponse, SuccessfulListIdentityResponse, SuccessfulListSearchServiceResponse, SuccessfulResponse, SuccessfulSearchServiceResponse, SuccessfulViewSearchServiceResponse, TokenStatus, Tokens };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@searchability/admin-client",
3
- "version": "0.0.45",
3
+ "version": "0.0.47",
4
4
  "description": "Searchability admin client.",
5
5
  "type": "module",
6
6
  "types": "./dist/types.d.ts",
@@ -1,15 +0,0 @@
1
- var TokenStatus;(function(_0x4ec4ba){_0x4ec4ba[_0x4ec4ba['Ok']=0x0]='Ok',_0x4ec4ba[_0x4ec4ba['Refresh']=0x1]='Refresh',_0x4ec4ba[_0x4ec4ba['Expired']=0x2]='Expired';}(TokenStatus||(TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}}class Response{constructor(_0x37dafa){this['isSuccess']=_0x37dafa;}}class SuccessfulAccountResponse extends Response{constructor(_0xbc8947){super(!![]),this['account']=_0xbc8947;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x5eba44){super(![]),this['problem']=_0x5eba44;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x1b8022){super(!![]),this['tokens']=_0x1b8022;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x5a30f6){super(![]),this['problem']=_0x5a30f6;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x507e03){super(!![]),this['apiKey']=_0x507e03;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x1707f7){super(![]),this['problem']=_0x1707f7;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x2c56e7){super(!![]),this['searchService']=_0x2c56e7;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x2b47a1){super(![]),this['problem']=_0x2b47a1;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x2995bd){super(!![]),this['searchService']=_0x2995bd;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServiceResponse extends Response{constructor(_0x3fa529){super(![]),this['problem']=_0x3fa529;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x3c1078){super(!![]),this['apiKeyValue']=_0x3c1078;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x12df5f){super(!![]),this['obj']=_0x12df5f;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x534eb8){super(![]),this['problem']=_0x534eb8;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x4cbf23){super(![]),this['problem']=_0x4cbf23;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
2
-
3
- var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x4e4281,_0x108147,_0x591cb8,_0x1ed4c6){function _0x4435c2(_0x1e97c1){return _0x1e97c1 instanceof _0x591cb8?_0x1e97c1:new _0x591cb8(function(_0x12b835){_0x12b835(_0x1e97c1);});}return new(_0x591cb8||(_0x591cb8=Promise))(function(_0x49c095,_0x55ba6e){function _0x43a82f(_0x768ac8){try{_0x3329dc(_0x1ed4c6['next'](_0x768ac8));}catch(_0x57f3b6){_0x55ba6e(_0x57f3b6);}}function _0x1f5db0(_0x472991){try{_0x3329dc(_0x1ed4c6['throw'](_0x472991));}catch(_0x28c28d){_0x55ba6e(_0x28c28d);}}function _0x3329dc(_0x5f11ac){_0x5f11ac['done']?_0x49c095(_0x5f11ac['value']):_0x4435c2(_0x5f11ac['value'])['then'](_0x43a82f,_0x1f5db0);}_0x3329dc((_0x1ed4c6=_0x1ed4c6['apply'](_0x4e4281,_0x108147||[]))['next']());});};class AccountService{constructor(_0x29aae1){this['fetch']=_0x29aae1;}['get'](_0x591249,_0x32d7f2){return __awaiter$5(this,void 0,void 0,function*(){const _0x5d06ce='Account/'+_0x591249+'/',_0x2d4c71=yield this['fetch']['get'](_0x5d06ce,_0x32d7f2);try{if(_0x2d4c71['status']>0xc7&&_0x2d4c71['status']<0x12c){const _0x1a999a=yield _0x2d4c71['json']();return new SuccessfulAccountResponse(_0x1a999a);}const _0x1dafff=yield _0x2d4c71['json']();return new FailedAccountResponse(_0x1dafff);}catch(_0x4d46dc){if(_0x4d46dc instanceof Error)return new FailedAccountResponse({'detail':_0x4d46dc['message'],'title':_0x4d46dc['name'],'status':0x1f4,'instance':'','type':''});throw _0x4d46dc;}});}}
4
-
5
- var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x43f93e,_0xf83647,_0x5bac0a,_0x2935bd){function _0x7f8fa6(_0x20652f){return _0x20652f instanceof _0x5bac0a?_0x20652f:new _0x5bac0a(function(_0x501ed5){_0x501ed5(_0x20652f);});}return new(_0x5bac0a||(_0x5bac0a=Promise))(function(_0xb5e841,_0xb3636d){function _0x8183ea(_0x5ac475){try{_0x1a03db(_0x2935bd['next'](_0x5ac475));}catch(_0x6b6f00){_0xb3636d(_0x6b6f00);}}function _0x3c202d(_0x3292a7){try{_0x1a03db(_0x2935bd['throw'](_0x3292a7));}catch(_0x22ccec){_0xb3636d(_0x22ccec);}}function _0x1a03db(_0x4db600){_0x4db600['done']?_0xb5e841(_0x4db600['value']):_0x7f8fa6(_0x4db600['value'])['then'](_0x8183ea,_0x3c202d);}_0x1a03db((_0x2935bd=_0x2935bd['apply'](_0x43f93e,_0xf83647||[]))['next']());});};class ApiKeyService{constructor(_0x4d0f1c){this['fetch']=_0x4d0f1c,this['path']='api-key';}['create'](_0x4cc35a,_0x4b1171,_0x498cdc){return __awaiter$4(this,void 0,void 0,function*(){const _0x1feec3={'account_name':_0x4cc35a,'api_key_name':_0x4b1171};try{const _0xc44f62=yield this['fetch']['post'](this['path'],_0x498cdc,_0x1feec3);if(_0xc44f62['status']>0xc7&&_0xc44f62['status']<0x12c){const _0x47fb98=yield _0xc44f62['json']();return new SuccessfulApiKeyResponse(_0x47fb98);}const _0x41873b=yield _0xc44f62['json']();return new FailedApiKeyResponse(_0x41873b);}catch(_0x37b0f8){if(_0x37b0f8 instanceof Error)return new FailedApiKeyResponse({'detail':_0x37b0f8['message'],'title':_0x37b0f8['name'],'status':0x1f4,'instance':'','type':''});throw _0x37b0f8;}});}['view'](_0x59d0c0,_0x4a0c85,_0x1464dc){return __awaiter$4(this,void 0,void 0,function*(){const _0x4646f5=this['path']+'/'+_0x59d0c0+'/'+_0x4a0c85;try{const _0x12cf31=yield this['fetch']['get'](_0x4646f5,_0x1464dc);if(_0x12cf31['status']>0xc7&&_0x12cf31['status']<0x12c){const _0x2c967=yield _0x12cf31['json']();return new SuccessfulApiKeyValueResponse(_0x2c967);}const _0x459047=yield _0x12cf31['json']();return new FailedApiKeyValueResponse(_0x459047);}catch(_0x480b66){if(_0x480b66 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x480b66['message'],'title':_0x480b66['name'],'status':0x1f4,'instance':'','type':''});throw _0x480b66;}});}['delete'](_0x543d49,_0x4a40a6,_0x11f030){return __awaiter$4(this,void 0,void 0,function*(){const _0x3c4e29=this['path']+'/'+_0x543d49+'/'+_0x4a40a6;try{const _0x2282ed=yield this['fetch']['delete'](_0x3c4e29,_0x11f030);if(_0x2282ed['status']>0xc7&&_0x2282ed['status']<0x12c)return new SuccessfulResponse({});const _0x587edd=yield _0x2282ed['json']();return new FailedResponse(_0x587edd);}catch(_0x10838d){if(_0x10838d instanceof Error)return new FailedResponse({'detail':_0x10838d['message'],'title':_0x10838d['name'],'status':0x1f4,'instance':'','type':''});throw _0x10838d;}});}}
6
-
7
- var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x46a6b1,_0x5ce3ca,_0x4f26d,_0x3b9d12){function _0x50542e(_0x51d2c4){return _0x51d2c4 instanceof _0x4f26d?_0x51d2c4:new _0x4f26d(function(_0x3e7b66){_0x3e7b66(_0x51d2c4);});}return new(_0x4f26d||(_0x4f26d=Promise))(function(_0x38da43,_0x3c3559){function _0x376960(_0x2c0763){try{_0x5a56b2(_0x3b9d12['next'](_0x2c0763));}catch(_0x2f4260){_0x3c3559(_0x2f4260);}}function _0x1762af(_0x511e73){try{_0x5a56b2(_0x3b9d12['throw'](_0x511e73));}catch(_0x57e277){_0x3c3559(_0x57e277);}}function _0x5a56b2(_0x248b83){_0x248b83['done']?_0x38da43(_0x248b83['value']):_0x50542e(_0x248b83['value'])['then'](_0x376960,_0x1762af);}_0x5a56b2((_0x3b9d12=_0x3b9d12['apply'](_0x46a6b1,_0x5ce3ca||[]))['next']());});};class ListService{constructor(_0x1ef6ee){this['fetch']=_0x1ef6ee;}['add'](_0x2f65b3,_0x5d6a2a,_0xa2c250){return __awaiter$3(this,void 0,void 0,function*(){const _0x1d0683='List',_0x53c18e={'account_name':_0x2f65b3,'list_name':_0x5d6a2a};try{const _0x53a275=yield this['fetch']['post'](_0x1d0683,_0xa2c250,_0x53c18e);if(_0x53a275['status']>0xc7&&_0x53a275['status']<0x12c){const _0x105b8e=yield _0x53a275['json']();return new SuccessfulAccountResponse(_0x105b8e);}const _0x3b4776=yield _0x53a275['json']();return new FailedAccountResponse(_0x3b4776);}catch(_0x4a8a8e){if(_0x4a8a8e instanceof Error)return new FailedAccountResponse({'detail':_0x4a8a8e['message'],'title':_0x4a8a8e['name'],'status':0x1f4,'instance':'','type':''});throw _0x4a8a8e;}});}['remove'](_0x36e250,_0x3b7981,_0x14a8d8){return __awaiter$3(this,void 0,void 0,function*(){const _0x867033='List/'+_0x36e250+'/'+_0x3b7981,_0x22ed48=yield this['fetch']['delete'](_0x867033,_0x14a8d8);try{if(_0x22ed48['status']>0xc7&&_0x22ed48['status']<0x12c){const _0x55e8d2=yield _0x22ed48['json']();return new SuccessfulAccountResponse(_0x55e8d2);}const _0x593b23=yield _0x22ed48['json']();return new FailedAccountResponse(_0x593b23);}catch(_0x1b0a89){if(_0x1b0a89 instanceof Error)return new FailedAccountResponse({'detail':_0x1b0a89['message'],'title':_0x1b0a89['name'],'status':0x1f4,'instance':'','type':''});throw _0x1b0a89;}});}}
8
-
9
- var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x69456,_0x83ad99,_0x1f81bf,_0x9d5a02){function _0x363b9f(_0x39dae2){return _0x39dae2 instanceof _0x1f81bf?_0x39dae2:new _0x1f81bf(function(_0x39f2cf){_0x39f2cf(_0x39dae2);});}return new(_0x1f81bf||(_0x1f81bf=Promise))(function(_0xdb3924,_0x4034f9){function _0x5a6592(_0x3ee228){try{_0x44ece4(_0x9d5a02['next'](_0x3ee228));}catch(_0x4a1afa){_0x4034f9(_0x4a1afa);}}function _0x133819(_0x20fa9f){try{_0x44ece4(_0x9d5a02['throw'](_0x20fa9f));}catch(_0x280c3e){_0x4034f9(_0x280c3e);}}function _0x44ece4(_0x275dd5){_0x275dd5['done']?_0xdb3924(_0x275dd5['value']):_0x363b9f(_0x275dd5['value'])['then'](_0x5a6592,_0x133819);}_0x44ece4((_0x9d5a02=_0x9d5a02['apply'](_0x69456,_0x83ad99||[]))['next']());});};class Fetch{constructor(_0x8adccc){this['baseUri']=_0x8adccc,this['getUrl']=_0x4a1ed0=>{return _0x4a1ed0['startsWith']('/')&&(_0x4a1ed0=_0x4a1ed0['replace']('/','')),''+this['baseUri']+_0x4a1ed0;},!_0x8adccc['endsWith']('/')&&(_0x8adccc=_0x8adccc+'/');}['get'](_0x3d4d7b,_0x5c05f9){return __awaiter$2(this,void 0,void 0,function*(){const _0xc7000a=this['getUrl'](_0x3d4d7b);return yield fetch(_0xc7000a,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x5c05f9}});});}['post'](_0x454256,_0x34c0c4,_0x113a17){return __awaiter$2(this,void 0,void 0,function*(){const _0x54a5a0=this['getUrl'](_0x454256);return yield fetch(_0x54a5a0,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x34c0c4},'body':_0x113a17?JSON['stringify'](_0x113a17):null});});}['PostNoAuth'](_0x57039d,_0x574f96){return __awaiter$2(this,void 0,void 0,function*(){const _0x345449=this['getUrl'](_0x57039d);return yield fetch(_0x345449,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0x574f96?JSON['stringify'](_0x574f96):null});});}['put'](_0x5167dd,_0x43fc21,_0x27e361){return __awaiter$2(this,void 0,void 0,function*(){const _0x5e44fd=this['getUrl'](_0x5167dd);return yield fetch(_0x5e44fd,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x43fc21},'body':_0x27e361?JSON['stringify'](_0x27e361):null});});}['delete'](_0x574390,_0x5d95fd){return __awaiter$2(this,void 0,void 0,function*(){const _0x56fca7=this['getUrl'](_0x574390);return yield fetch(_0x56fca7,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x5d95fd}});});}}
10
-
11
- var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x3194d2,_0x3487ec,_0x53d0a2,_0x371051){function _0x5208b2(_0x5c2d4e){return _0x5c2d4e instanceof _0x53d0a2?_0x5c2d4e:new _0x53d0a2(function(_0x483d0b){_0x483d0b(_0x5c2d4e);});}return new(_0x53d0a2||(_0x53d0a2=Promise))(function(_0x253437,_0x330394){function _0xba7eed(_0x4a545e){try{_0x1e9099(_0x371051['next'](_0x4a545e));}catch(_0x3d8831){_0x330394(_0x3d8831);}}function _0x157d43(_0x5363ad){try{_0x1e9099(_0x371051['throw'](_0x5363ad));}catch(_0x1d0b5a){_0x330394(_0x1d0b5a);}}function _0x1e9099(_0x2d072c){_0x2d072c['done']?_0x253437(_0x2d072c['value']):_0x5208b2(_0x2d072c['value'])['then'](_0xba7eed,_0x157d43);}_0x1e9099((_0x371051=_0x371051['apply'](_0x3194d2,_0x3487ec||[]))['next']());});};class SearchServersService{constructor(_0x31364e){this['fetch']=_0x31364e,this['path']='search-services';}['create'](_0x2165e2,_0x12b0e2,_0xb2ec73,_0x18a380,_0x41adb4,_0x277a36,_0x372ded,_0x462266){return __awaiter$1(this,void 0,void 0,function*(){const _0xf1b1df={'account_name':_0x2165e2,'search_service_name':_0x12b0e2,'endpoint':_0xb2ec73,'key':_0x18a380,'country':_0x41adb4,'provider':_0x277a36,'index_name':_0x372ded};try{const _0x2daa0d=yield this['fetch']['post'](this['path'],_0x462266,_0xf1b1df);if(_0x2daa0d['status']>0xc7&&_0x2daa0d['status']<0x12c){const _0x11d9f7=yield _0x2daa0d['json']();return new SuccessfulSearchServiceResponse(_0x11d9f7);}const _0x200336=yield _0x2daa0d['json']();return new FailedSearchServiceResponse(_0x200336);}catch(_0x423390){if(_0x423390 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x423390['message'],'title':_0x423390['name'],'status':0x1f4,'instance':'','type':''});throw _0x423390;}});}['delete'](_0x26275c,_0x47d1eb,_0x3d029b){return __awaiter$1(this,void 0,void 0,function*(){const _0x551628=this['path']+'/'+_0x26275c+'/'+_0x47d1eb;try{const _0x452596=yield this['fetch']['delete'](_0x551628,_0x3d029b);if(_0x452596['status']>0xc7&&_0x452596['status']<0x12c)return new SuccessfulResponse({});const _0x116e7d=yield _0x452596['json']();return new FailedResponse(_0x116e7d);}catch(_0x44542f){if(_0x44542f instanceof Error)return new FailedResponse({'detail':_0x44542f['message'],'title':_0x44542f['name'],'status':0x1f4,'instance':'','type':''});throw _0x44542f;}});}['view'](_0x46830b,_0xaf9e71,_0x1f8bb5){return __awaiter$1(this,void 0,void 0,function*(){const _0x30f488=this['path']+'/'+_0x46830b+'/'+_0xaf9e71;try{const _0x4ad503=yield this['fetch']['get'](_0x30f488,_0x1f8bb5);if(_0x4ad503['status']>0xc7&&_0x4ad503['status']<0x12c){const _0x42b75c=yield _0x4ad503['json']();return new SuccessfulViewSearchServiceResponse(_0x42b75c);}const _0x5db356=yield _0x4ad503['json']();return new FailedViewSearchServiceResponse(_0x5db356);}catch(_0x45c21d){if(_0x45c21d instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x45c21d['message'],'title':_0x45c21d['name'],'status':0x1f4,'instance':'','type':''});throw _0x45c21d;}});}['edit'](_0x2a3c68,_0x46c3bf,_0x4d1a18,_0x3c9575,_0x27ceca,_0x12c495){return __awaiter$1(this,void 0,void 0,function*(){const _0x137e1b={'account_name':_0x2a3c68,'search_service_name':_0x46c3bf,'new_search_service_name':_0x4d1a18,'key':_0x3c9575,'country':_0x27ceca};try{const _0x5a0a67=yield this['fetch']['put'](this['path'],_0x12c495,_0x137e1b);if(_0x5a0a67['status']>0xc7&&_0x5a0a67['status']<0x12c){const _0x1edcdc=yield _0x5a0a67['json']();return new SuccessfulSearchServiceResponse(_0x1edcdc);}const _0x2cf02d=yield _0x5a0a67['json']();return new FailedSearchServiceResponse(_0x2cf02d);}catch(_0x1332c9){if(_0x1332c9 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x1332c9['message'],'title':_0x1332c9['name'],'status':0x1f4,'instance':'','type':''});throw _0x1332c9;}});}}
12
-
13
- var __awaiter=undefined&&undefined['__awaiter']||function(_0x146256,_0x4f0839,_0x40662c,_0x3df86b){function _0x45286f(_0x1ba613){return _0x1ba613 instanceof _0x40662c?_0x1ba613:new _0x40662c(function(_0x15ec80){_0x15ec80(_0x1ba613);});}return new(_0x40662c||(_0x40662c=Promise))(function(_0x4cc142,_0x5b557c){function _0x15c935(_0x552a65){try{_0x458f83(_0x3df86b['next'](_0x552a65));}catch(_0x38f646){_0x5b557c(_0x38f646);}}function _0x29b984(_0x5db3c1){try{_0x458f83(_0x3df86b['throw'](_0x5db3c1));}catch(_0x175f33){_0x5b557c(_0x175f33);}}function _0x458f83(_0x4eec4d){_0x4eec4d['done']?_0x4cc142(_0x4eec4d['value']):_0x45286f(_0x4eec4d['value'])['then'](_0x15c935,_0x29b984);}_0x458f83((_0x3df86b=_0x3df86b['apply'](_0x146256,_0x4f0839||[]))['next']());});};class AdminClient{constructor(_0x31e115='https://admin.searchability.dev/'){var _0x2ef0da=new Fetch(_0x31e115);this['Accounts']=new AccountService(_0x2ef0da),this['Lists']=new ListService(_0x2ef0da),this['ApiKeys']=new ApiKeyService(_0x2ef0da),this['SearchServices']=new SearchServersService(_0x2ef0da);}}class AuthClient{constructor(_0x58c306='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x58c306);}['login'](_0x5afc64){return __awaiter(this,void 0,void 0,function*(){const _0x159b23='login/'+_0x5afc64;try{const _0x1a061b=yield yield fetch(_0x159b23);if(_0x1a061b['status']>0xc7&&_0x1a061b['status']<0x12c){const _0x34006e=yield _0x1a061b['json']();return new SuccessfulAuthResponse(_0x34006e);}const _0x418597=yield _0x1a061b['json']();return new FailedAuthResponse(_0x418597);}catch(_0x5e3014){if(_0x5e3014 instanceof Error)return new FailedAuthResponse({'detail':_0x5e3014['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x5e3014;}});}['refresh'](_0x4e5166){return __awaiter(this,void 0,void 0,function*(){const _0x1fd461='refresh',_0x2d6263={'refresh_token':_0x4e5166};try{const _0x338792=yield this['fetch']['PostNoAuth'](_0x1fd461,_0x2d6263);if(_0x338792['status']>0xc7&&_0x338792['status']<0x12c){const _0x91339d=yield _0x338792['json']();return new SuccessfulAuthResponse(_0x91339d);}const _0x449025=yield _0x338792['json']();return new FailedAuthResponse(_0x449025);}catch(_0x4e76f4){if(_0x4e76f4 instanceof Error)return new FailedAuthResponse({'detail':_0x4e76f4['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x4e76f4;}});}['getTokenStatus'](_0x4894a9){if(Date['now']()<_0x4894a9['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x4894a9['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
14
-
15
- export { AdminClient, AuthClient, TokenStatus, Tokens };