@searchability/admin-client 0.0.67 → 0.0.69
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,21 @@
|
|
|
1
|
+
var TokenStatus;(function(_0x3828f6){_0x3828f6[_0x3828f6['Ok']=0x0]='Ok',_0x3828f6[_0x3828f6['Refresh']=0x1]='Refresh',_0x3828f6[_0x3828f6['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(_0x267af5){this['isSuccess']=_0x267af5;}}class SuccessfulContributorResponse extends Response{constructor(_0x248cd4){super(!![]),this['contributor']=_0x248cd4;}['toSuccess'](){return this['contributor'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedContributorResponse extends Response{constructor(_0x2a30c3){super(![]),this['problem']=_0x2a30c3;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountAndImageResponse extends Response{constructor(_0x217986){super(!![]),this['accountAndImages']=_0x217986;}['toSuccess'](){return this['accountAndImages'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountAndImageResponse extends Response{constructor(_0x249e18){super(![]),this['problem']=_0x249e18;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulFacetResponse extends Response{constructor(_0x228e8d){super(!![]),this['facet']=_0x228e8d;}['toSuccess'](){return this['facet'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetResponse extends Response{constructor(_0x1fc7da){super(![]),this['problem']=_0x1fc7da;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountResponse extends Response{constructor(_0x436fee){super(!![]),this['account']=_0x436fee;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountImageResponse extends Response{constructor(_0x43034f){super(!![]),this['accountImage']=_0x43034f;}['toSuccess'](){return this['accountImage'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListIdentityResponse extends Response{constructor(_0x3f21dc){super(!![]),this['list']=_0x3f21dc;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListResponse extends Response{constructor(_0x2d59f1){super(!![]),this['list']=_0x2d59f1;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x4b3d5d){super(![]),this['problem']=_0x4b3d5d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountImageResponse extends Response{constructor(_0x2466eb){super(![]),this['problem']=_0x2466eb;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListIdentityResponse extends Response{constructor(_0x349573){super(![]),this['problem']=_0x349573;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListResponse extends Response{constructor(_0x2f8d4d){super(![]),this['problem']=_0x2f8d4d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x5563d2){super(!![]),this['tokens']=_0x5563d2;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x4d2e83){super(![]),this['problem']=_0x4d2e83;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x142273){super(!![]),this['apiKey']=_0x142273;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x36284e){super(![]),this['problem']=_0x36284e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x55a2b5){super(!![]),this['searchService']=_0x55a2b5;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0xbfcea2){super(![]),this['problem']=_0xbfcea2;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x463e61){super(!![]),this['searchService']=_0x463e61;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulViewSearchResultResponse extends Response{constructor(_0x56406c){super(!![]),this['searchResult']=_0x56406c;}['toSuccess'](){return this['searchResult'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchResultResponse extends Response{constructor(_0x3f00ae){super(![]),this['problem']=_0x3f00ae;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchServiceResponse extends Response{constructor(_0xb6c076){super(!![]),this['searchServices']=_0xb6c076;}['toSuccess'](){return this['searchServices'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServicesResponse extends Response{constructor(_0x420ab2){super(![]),this['problem']=_0x420ab2;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedViewSearchServiceResponse extends Response{constructor(_0x4f4959){super(![]),this['problem']=_0x4f4959;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x5e17b2){super(!![]),this['apiKeyValue']=_0x5e17b2;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x4c6e74){super(!![]),this['obj']=_0x4c6e74;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x53115c){super(![]),this['problem']=_0x53115c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x3bdb6e){super(![]),this['problem']=_0x3bdb6e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
|
|
2
|
+
|
|
3
|
+
var __awaiter$8=undefined&&undefined['__awaiter']||function(_0xef3f74,_0x4682b9,_0x5afab4,_0x8d2ab1){function _0x476e4f(_0x148671){return _0x148671 instanceof _0x5afab4?_0x148671:new _0x5afab4(function(_0x2bb637){_0x2bb637(_0x148671);});}return new(_0x5afab4||(_0x5afab4=Promise))(function(_0x2c36ee,_0x18aab0){function _0x3b7414(_0x319365){try{_0x55f0f9(_0x8d2ab1['next'](_0x319365));}catch(_0x1d5894){_0x18aab0(_0x1d5894);}}function _0x1ea770(_0x15e154){try{_0x55f0f9(_0x8d2ab1['throw'](_0x15e154));}catch(_0x386d68){_0x18aab0(_0x386d68);}}function _0x55f0f9(_0x58e405){_0x58e405['done']?_0x2c36ee(_0x58e405['value']):_0x476e4f(_0x58e405['value'])['then'](_0x3b7414,_0x1ea770);}_0x55f0f9((_0x8d2ab1=_0x8d2ab1['apply'](_0xef3f74,_0x4682b9||[]))['next']());});};class AccountService{constructor(_0x27937a){this['fetch']=_0x27937a;}['get'](_0x554a73,_0x88a3c4){return __awaiter$8(this,void 0,void 0,function*(){const _0x11c0d1='Account/'+_0x554a73+'/',_0x391123=yield this['fetch']['get'](_0x11c0d1,_0x88a3c4);try{if(_0x391123['status']>0xc7&&_0x391123['status']<0x12c){const _0x51bcbf=yield _0x391123['json']();return new SuccessfulAccountResponse(_0x51bcbf);}const _0x271be6=yield _0x391123['json']();return new FailedAccountResponse(_0x271be6);}catch(_0x5f46cd){if(_0x5f46cd instanceof Error)return new FailedAccountResponse({'detail':_0x5f46cd['message'],'title':_0x5f46cd['name'],'status':0x1f4,'instance':'','type':''});throw _0x5f46cd;}});}['getImage'](_0x37e9e7,_0x585b16){return __awaiter$8(this,void 0,void 0,function*(){const _0x45933a='account/image/'+_0x37e9e7+'/',_0x38c5b0=yield this['fetch']['get'](_0x45933a,_0x585b16);try{if(_0x38c5b0['status']>0xc7&&_0x38c5b0['status']<0x12c){const _0x4af686=yield _0x38c5b0['json']();return new SuccessfulAccountImageResponse(_0x4af686);}const _0x2fa03f=yield _0x38c5b0['json']();return new FailedAccountImageResponse(_0x2fa03f);}catch(_0x126278){if(_0x126278 instanceof Error)return new FailedAccountImageResponse({'detail':_0x126278['message'],'title':_0x126278['name'],'status':0x1f4,'instance':'','type':''});throw _0x126278;}});}}
|
|
4
|
+
|
|
5
|
+
var __awaiter$7=undefined&&undefined['__awaiter']||function(_0x465774,_0x70b1,_0x414fc8,_0x21e236){function _0x6d02ab(_0x261f5c){return _0x261f5c instanceof _0x414fc8?_0x261f5c:new _0x414fc8(function(_0x8acd2a){_0x8acd2a(_0x261f5c);});}return new(_0x414fc8||(_0x414fc8=Promise))(function(_0x1848dc,_0xba2a8c){function _0x49564d(_0x53ced3){try{_0x40eb90(_0x21e236['next'](_0x53ced3));}catch(_0x38f34c){_0xba2a8c(_0x38f34c);}}function _0x58765b(_0x2844ba){try{_0x40eb90(_0x21e236['throw'](_0x2844ba));}catch(_0x2ca9c4){_0xba2a8c(_0x2ca9c4);}}function _0x40eb90(_0x53a529){_0x53a529['done']?_0x1848dc(_0x53a529['value']):_0x6d02ab(_0x53a529['value'])['then'](_0x49564d,_0x58765b);}_0x40eb90((_0x21e236=_0x21e236['apply'](_0x465774,_0x70b1||[]))['next']());});};class ApiKeyService{constructor(_0x9416ca){this['fetch']=_0x9416ca,this['path']='api-key';}['create'](_0x1e9cdd,_0x2a526f,_0x5b21bb){return __awaiter$7(this,void 0,void 0,function*(){const _0x197e03={'account_name':_0x1e9cdd,'api_key_name':_0x2a526f};try{const _0x10ac98=yield this['fetch']['post'](this['path'],_0x5b21bb,_0x197e03);if(_0x10ac98['status']>0xc7&&_0x10ac98['status']<0x12c){const _0x242e12=yield _0x10ac98['json']();return new SuccessfulApiKeyResponse(_0x242e12);}const _0xd7fed7=yield _0x10ac98['json']();return new FailedApiKeyResponse(_0xd7fed7);}catch(_0x2ee3be){if(_0x2ee3be instanceof Error)return new FailedApiKeyResponse({'detail':_0x2ee3be['message'],'title':_0x2ee3be['name'],'status':0x1f4,'instance':'','type':''});throw _0x2ee3be;}});}['view'](_0x5461d6,_0x179ac6,_0x398a3b){return __awaiter$7(this,void 0,void 0,function*(){const _0x214fbd=this['path']+'/'+_0x5461d6+'/'+_0x179ac6;try{const _0x4077c6=yield this['fetch']['get'](_0x214fbd,_0x398a3b);if(_0x4077c6['status']>0xc7&&_0x4077c6['status']<0x12c){const _0x193b63=yield _0x4077c6['json']();return new SuccessfulApiKeyValueResponse(_0x193b63);}const _0x499e0d=yield _0x4077c6['json']();return new FailedApiKeyValueResponse(_0x499e0d);}catch(_0x2e3843){if(_0x2e3843 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x2e3843['message'],'title':_0x2e3843['name'],'status':0x1f4,'instance':'','type':''});throw _0x2e3843;}});}['delete'](_0x464ded,_0x393f1d,_0x304d69){return __awaiter$7(this,void 0,void 0,function*(){const _0x57aee4=this['path']+'/'+_0x464ded+'/'+_0x393f1d;try{const _0x14d4f9=yield this['fetch']['delete'](_0x57aee4,_0x304d69);if(_0x14d4f9['status']>0xc7&&_0x14d4f9['status']<0x12c)return new SuccessfulResponse({});const _0x18c0f9=yield _0x14d4f9['json']();return new FailedResponse(_0x18c0f9);}catch(_0x3ba2da){if(_0x3ba2da instanceof Error)return new FailedResponse({'detail':_0x3ba2da['message'],'title':_0x3ba2da['name'],'status':0x1f4,'instance':'','type':''});throw _0x3ba2da;}});}}
|
|
6
|
+
|
|
7
|
+
var __awaiter$6=undefined&&undefined['__awaiter']||function(_0x570cfe,_0x4f67bf,_0x4b6cd9,_0x25008){function _0x3d2d97(_0x238059){return _0x238059 instanceof _0x4b6cd9?_0x238059:new _0x4b6cd9(function(_0x5c4d58){_0x5c4d58(_0x238059);});}return new(_0x4b6cd9||(_0x4b6cd9=Promise))(function(_0x7f3656,_0x11fa76){function _0x13d82b(_0x243893){try{_0x2f8405(_0x25008['next'](_0x243893));}catch(_0x45e7b3){_0x11fa76(_0x45e7b3);}}function _0x66cfab(_0x49a283){try{_0x2f8405(_0x25008['throw'](_0x49a283));}catch(_0x3b3da3){_0x11fa76(_0x3b3da3);}}function _0x2f8405(_0x412325){_0x412325['done']?_0x7f3656(_0x412325['value']):_0x3d2d97(_0x412325['value'])['then'](_0x13d82b,_0x66cfab);}_0x2f8405((_0x25008=_0x25008['apply'](_0x570cfe,_0x4f67bf||[]))['next']());});};class ListService{constructor(_0x22636d){this['fetch']=_0x22636d;}['create'](_0x14ad95,_0x4f7145,_0x214783,_0x52a8aa){return __awaiter$6(this,void 0,void 0,function*(){const _0x163865='List',_0x4be81d={'account_name':_0x14ad95,'list_name':_0x4f7145,'search_service_name':_0x214783};try{const _0x51fbe4=yield this['fetch']['post'](_0x163865,_0x52a8aa,_0x4be81d);if(_0x51fbe4['status']>0xc7&&_0x51fbe4['status']<0x12c){const _0x3bb17b=yield _0x51fbe4['json']();return new SuccessfulListIdentityResponse(_0x3bb17b);}const _0xc742ef=yield _0x51fbe4['json']();return new FailedListIdentityResponse(_0xc742ef);}catch(_0x2915b8){if(_0x2915b8 instanceof Error)return new FailedListIdentityResponse({'detail':_0x2915b8['message'],'title':_0x2915b8['name'],'status':0x1f4,'instance':'','type':''});throw _0x2915b8;}});}['delete'](_0x318f1a,_0x57b1d9,_0x54a42c){return __awaiter$6(this,void 0,void 0,function*(){const _0x23296e='List/'+_0x318f1a+'/'+_0x57b1d9,_0x2984b3=yield this['fetch']['delete'](_0x23296e,_0x54a42c);try{if(_0x2984b3['status']>0xc7&&_0x2984b3['status']<0x12c)return new SuccessfulResponse({});const _0x55f1fd=yield _0x2984b3['json']();return new FailedResponse(_0x55f1fd);}catch(_0x5c6782){if(_0x5c6782 instanceof Error)return new FailedResponse({'detail':_0x5c6782['message'],'title':_0x5c6782['name'],'status':0x1f4,'instance':'','type':''});throw _0x5c6782;}});}['get'](_0x369b0e,_0x1f0326,_0x2b9658){return __awaiter$6(this,void 0,void 0,function*(){const _0x277994='List/'+_0x369b0e+'/'+_0x1f0326;try{const _0x39a892=yield this['fetch']['get'](_0x277994,_0x2b9658);if(_0x39a892['status']>0xc7&&_0x39a892['status']<0x12c){const _0x427214=yield _0x39a892['json']();return new SuccessfulListResponse(_0x427214);}const _0x94c804=yield _0x39a892['json']();return new FailedListResponse(_0x94c804);}catch(_0x314192){if(_0x314192 instanceof Error)return new FailedListResponse({'detail':_0x314192['message'],'title':_0x314192['name'],'status':0x1f4,'instance':'','type':''});throw _0x314192;}});}}
|
|
8
|
+
|
|
9
|
+
var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x45fc92,_0x4452d9,_0x317eff,_0x4d4f6f){function _0x25f482(_0x18b71b){return _0x18b71b instanceof _0x317eff?_0x18b71b:new _0x317eff(function(_0x35cfab){_0x35cfab(_0x18b71b);});}return new(_0x317eff||(_0x317eff=Promise))(function(_0x199313,_0xf92b48){function _0x124b49(_0x2a7d33){try{_0x2aee3a(_0x4d4f6f['next'](_0x2a7d33));}catch(_0x3bd3e4){_0xf92b48(_0x3bd3e4);}}function _0x121a5f(_0x221c27){try{_0x2aee3a(_0x4d4f6f['throw'](_0x221c27));}catch(_0x44a9a5){_0xf92b48(_0x44a9a5);}}function _0x2aee3a(_0x3b8fa7){_0x3b8fa7['done']?_0x199313(_0x3b8fa7['value']):_0x25f482(_0x3b8fa7['value'])['then'](_0x124b49,_0x121a5f);}_0x2aee3a((_0x4d4f6f=_0x4d4f6f['apply'](_0x45fc92,_0x4452d9||[]))['next']());});};class Fetch{constructor(_0x239d5e){this['baseUri']=_0x239d5e,this['getUrl']=_0x2a82ff=>{return _0x2a82ff['startsWith']('/')&&(_0x2a82ff=_0x2a82ff['replace']('/','')),''+this['baseUri']+_0x2a82ff;},!_0x239d5e['endsWith']('/')&&(_0x239d5e=_0x239d5e+'/');}['get'](_0x211533,_0x57f570){return __awaiter$5(this,void 0,void 0,function*(){const _0x39341b=this['getUrl'](_0x211533);return yield fetch(_0x39341b,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x57f570}});});}['post'](_0x185bc7,_0x267b0a,_0xa4e30f){return __awaiter$5(this,void 0,void 0,function*(){const _0x4604ab=this['getUrl'](_0x185bc7);return yield fetch(_0x4604ab,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x267b0a},'body':_0xa4e30f?JSON['stringify'](_0xa4e30f):null});});}['PostNoAuth'](_0x118764,_0x218ddd){return __awaiter$5(this,void 0,void 0,function*(){const _0x1b99cb=this['getUrl'](_0x118764);return yield fetch(_0x1b99cb,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0x218ddd?JSON['stringify'](_0x218ddd):null});});}['put'](_0x5c9c0e,_0x9ea68b,_0x94f288){return __awaiter$5(this,void 0,void 0,function*(){const _0x7343f0=this['getUrl'](_0x5c9c0e);return yield fetch(_0x7343f0,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x9ea68b},'body':_0x94f288?JSON['stringify'](_0x94f288):null});});}['delete'](_0x1b4a75,_0x17da1e){return __awaiter$5(this,void 0,void 0,function*(){const _0x3b3a06=this['getUrl'](_0x1b4a75);return yield fetch(_0x3b3a06,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x17da1e}});});}}
|
|
10
|
+
|
|
11
|
+
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x4a6637,_0x13c237,_0x35baa6,_0x144d31){function _0x14b65b(_0x43bec3){return _0x43bec3 instanceof _0x35baa6?_0x43bec3:new _0x35baa6(function(_0x4491f2){_0x4491f2(_0x43bec3);});}return new(_0x35baa6||(_0x35baa6=Promise))(function(_0x28a209,_0x48cd3c){function _0x9a60f6(_0x138bc9){try{_0x52f1bc(_0x144d31['next'](_0x138bc9));}catch(_0x4b293c){_0x48cd3c(_0x4b293c);}}function _0x408892(_0x32689c){try{_0x52f1bc(_0x144d31['throw'](_0x32689c));}catch(_0x3de08e){_0x48cd3c(_0x3de08e);}}function _0x52f1bc(_0x4966bb){_0x4966bb['done']?_0x28a209(_0x4966bb['value']):_0x14b65b(_0x4966bb['value'])['then'](_0x9a60f6,_0x408892);}_0x52f1bc((_0x144d31=_0x144d31['apply'](_0x4a6637,_0x13c237||[]))['next']());});};class SearchServersService{constructor(_0x2bfcca){this['fetch']=_0x2bfcca,this['path']='search-services';}['create'](_0x3fece4,_0x5de8fe,_0x43ef72,_0x227dca,_0x544025,_0x3d43d7,_0x401c32,_0x474c62){return __awaiter$4(this,void 0,void 0,function*(){const _0x3766e2={'account_name':_0x3fece4,'search_service_name':_0x5de8fe,'endpoint':_0x43ef72,'key':_0x227dca,'country':_0x544025,'provider':_0x3d43d7,'index_name':_0x401c32};try{const _0x24d459=yield this['fetch']['post'](this['path'],_0x474c62,_0x3766e2);if(_0x24d459['status']>0xc7&&_0x24d459['status']<0x12c){const _0x3f33d2=yield _0x24d459['json']();return new SuccessfulSearchServiceResponse(_0x3f33d2);}const _0x3ef0b0=yield _0x24d459['json']();return new FailedSearchServiceResponse(_0x3ef0b0);}catch(_0x201955){if(_0x201955 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x201955['message'],'title':_0x201955['name'],'status':0x1f4,'instance':'','type':''});throw _0x201955;}});}['delete'](_0x5165b2,_0x21ec66,_0x552aae){return __awaiter$4(this,void 0,void 0,function*(){const _0x1a93d2=this['path']+'/'+_0x5165b2+'/'+_0x21ec66;try{const _0x2f6d50=yield this['fetch']['delete'](_0x1a93d2,_0x552aae);if(_0x2f6d50['status']>0xc7&&_0x2f6d50['status']<0x12c)return new SuccessfulResponse({});const _0x2be7a=yield _0x2f6d50['json']();return new FailedResponse(_0x2be7a);}catch(_0x23f8d4){if(_0x23f8d4 instanceof Error)return new FailedResponse({'detail':_0x23f8d4['message'],'title':_0x23f8d4['name'],'status':0x1f4,'instance':'','type':''});throw _0x23f8d4;}});}['view'](_0x5d58c2,_0x387e71,_0x517b9d){return __awaiter$4(this,void 0,void 0,function*(){const _0x11e214=this['path']+'/'+_0x5d58c2+'/'+_0x387e71;try{const _0x14d2c1=yield this['fetch']['get'](_0x11e214,_0x517b9d);if(_0x14d2c1['status']>0xc7&&_0x14d2c1['status']<0x12c){const _0x29525c=yield _0x14d2c1['json']();return new SuccessfulViewSearchServiceResponse(_0x29525c);}const _0x35160b=yield _0x14d2c1['json']();return new FailedViewSearchServiceResponse(_0x35160b);}catch(_0x38ff0e){if(_0x38ff0e instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x38ff0e['message'],'title':_0x38ff0e['name'],'status':0x1f4,'instance':'','type':''});throw _0x38ff0e;}});}['edit'](_0x2ef1a9,_0x408ef7,_0x129102,_0x4ae004,_0x2cc6e0,_0xc4c971){return __awaiter$4(this,void 0,void 0,function*(){const _0xa12fc2={'account_name':_0x2ef1a9,'search_service_name':_0x408ef7,'new_search_service_name':_0x129102,'key':_0x4ae004,'country':_0x2cc6e0};try{const _0x532d1c=yield this['fetch']['put'](this['path'],_0xc4c971,_0xa12fc2);if(_0x532d1c['status']>0xc7&&_0x532d1c['status']<0x12c){const _0x5c28cc=yield _0x532d1c['json']();return new SuccessfulSearchServiceResponse(_0x5c28cc);}const _0x15c655=yield _0x532d1c['json']();return new FailedSearchServiceResponse(_0x15c655);}catch(_0x33c488){if(_0x33c488 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x33c488['message'],'title':_0x33c488['name'],'status':0x1f4,'instance':'','type':''});throw _0x33c488;}});}['list'](_0x17f204,_0x3f888e){return __awaiter$4(this,void 0,void 0,function*(){const _0x3f538e=this['path']+'/'+_0x17f204;try{const _0x15b153=yield this['fetch']['get'](_0x3f538e,_0x3f888e);if(_0x15b153['status']>0xc7&&_0x15b153['status']<0x12c){const _0x3ca37f=yield _0x15b153['json']();return new SuccessfulListSearchServiceResponse(_0x3ca37f);}const _0x13d7ea=yield _0x15b153['json']();return new FailedViewSearchServicesResponse(_0x13d7ea);}catch(_0x3208ab){if(_0x3208ab instanceof Error)return new FailedViewSearchServicesResponse({'detail':_0x3208ab['message'],'title':_0x3208ab['name'],'status':0x1f4,'instance':'','type':''});throw _0x3208ab;}});}}
|
|
12
|
+
|
|
13
|
+
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x15a2e9,_0x2cefff,_0xa36f94,_0x196eec){function _0x1a1185(_0x1fb261){return _0x1fb261 instanceof _0xa36f94?_0x1fb261:new _0xa36f94(function(_0x2ef547){_0x2ef547(_0x1fb261);});}return new(_0xa36f94||(_0xa36f94=Promise))(function(_0x3d3022,_0x144d2f){function _0x391df7(_0x25da84){try{_0x49f922(_0x196eec['next'](_0x25da84));}catch(_0x542c62){_0x144d2f(_0x542c62);}}function _0x2ff6c7(_0x35680e){try{_0x49f922(_0x196eec['throw'](_0x35680e));}catch(_0x23cdc2){_0x144d2f(_0x23cdc2);}}function _0x49f922(_0x47e0f1){_0x47e0f1['done']?_0x3d3022(_0x47e0f1['value']):_0x1a1185(_0x47e0f1['value'])['then'](_0x391df7,_0x2ff6c7);}_0x49f922((_0x196eec=_0x196eec['apply'](_0x15a2e9,_0x2cefff||[]))['next']());});};class FacetService{constructor(_0x543cc8){this['fetch']=_0x543cc8,this['path']='facet';}['create'](_0x49beb5,_0x3ede7c,_0x5bfea6,_0x50413c){return __awaiter$3(this,void 0,void 0,function*(){const _0x23ef1d={'account_name':_0x49beb5,'list_name':_0x3ede7c,'facet_name':_0x5bfea6};try{const _0x2dce00=yield this['fetch']['post'](this['path'],_0x50413c,_0x23ef1d);if(_0x2dce00['status']>0xc7&&_0x2dce00['status']<0x12c){const _0x3ddfe4=yield _0x2dce00['json']();return new SuccessfulFacetResponse(_0x3ddfe4);}const _0x5acc02=yield _0x2dce00['json']();return new FailedFacetResponse(_0x5acc02);}catch(_0xffcd5d){if(_0xffcd5d instanceof Error)return new FailedFacetResponse({'detail':_0xffcd5d['message'],'title':_0xffcd5d['name'],'status':0x1f4,'instance':'','type':''});throw _0xffcd5d;}});}['remove'](_0x372c95,_0x230158,_0x4b32c3,_0x508a5a){return __awaiter$3(this,void 0,void 0,function*(){const _0x56a325='Facet/'+_0x372c95+'/'+_0x230158+'/'+_0x4b32c3,_0x18159c=yield this['fetch']['delete'](_0x56a325,_0x508a5a);try{if(_0x18159c['status']>0xc7&&_0x18159c['status']<0x12c)return new SuccessfulResponse({});const _0x117855=yield _0x18159c['json']();return new FailedResponse(_0x117855);}catch(_0x32adfc){if(_0x32adfc instanceof Error)return new FailedResponse({'detail':_0x32adfc['message'],'title':_0x32adfc['name'],'status':0x1f4,'instance':'','type':''});throw _0x32adfc;}});}['rename'](_0xc5837c,_0x283de3,_0x48ae09,_0x1bafc7,_0x53f512){return __awaiter$3(this,void 0,void 0,function*(){const _0x466ee1={'account_name':_0xc5837c,'list_name':_0x283de3,'facet_name':_0x48ae09,'new_facet_name':_0x1bafc7};try{const _0x4f58ea=yield this['fetch']['put'](this['path'],_0x53f512,_0x466ee1);if(_0x4f58ea['status']>0xc7&&_0x4f58ea['status']<0x12c){const _0x3966f7=yield _0x4f58ea['json']();return new SuccessfulFacetResponse(_0x3966f7);}const _0x579699=yield _0x4f58ea['json']();return new FailedFacetResponse(_0x579699);}catch(_0x5462b4){if(_0x5462b4 instanceof Error)return new FailedFacetResponse({'detail':_0x5462b4['message'],'title':_0x5462b4['name'],'status':0x1f4,'instance':'','type':''});throw _0x5462b4;}});}}
|
|
14
|
+
|
|
15
|
+
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x5066f5,_0x34d976,_0x441a99,_0x5b88c4){function _0x49881f(_0x371c13){return _0x371c13 instanceof _0x441a99?_0x371c13:new _0x441a99(function(_0x214a2b){_0x214a2b(_0x371c13);});}return new(_0x441a99||(_0x441a99=Promise))(function(_0x233df5,_0x195f2a){function _0xffe369(_0x269c92){try{_0x5d96b1(_0x5b88c4['next'](_0x269c92));}catch(_0x528d53){_0x195f2a(_0x528d53);}}function _0x274f5b(_0x524d73){try{_0x5d96b1(_0x5b88c4['throw'](_0x524d73));}catch(_0x6d6d3){_0x195f2a(_0x6d6d3);}}function _0x5d96b1(_0x4dc736){_0x4dc736['done']?_0x233df5(_0x4dc736['value']):_0x49881f(_0x4dc736['value'])['then'](_0xffe369,_0x274f5b);}_0x5d96b1((_0x5b88c4=_0x5b88c4['apply'](_0x5066f5,_0x34d976||[]))['next']());});};class SearchResultService{constructor(_0xafc481){this['fetch']=_0xafc481,this['path']='search-result';}['create'](_0x1b4447,_0x4f3eb7,_0x176560,_0x365085,_0x24dd89){return __awaiter$2(this,void 0,void 0,function*(){_0x24dd89=_0x24dd89!==null&&_0x24dd89!==void 0?_0x24dd89:{'description':'','keywords':'','resource_1':'','resource_2':'','resource_3':'','latitude':0x0,'longitude':0x0,'facets':[]};const _0xa54597=Object['assign']({'account_name':_0x1b4447,'search_result_name':_0x176560,'list_name':_0x4f3eb7},_0x24dd89);try{const _0x128e52=yield this['fetch']['post'](this['path'],_0x365085,_0xa54597);if(_0x128e52['status']>0xc7&&_0x128e52['status']<0x12c){const _0xabc514=yield _0x128e52['json']();return new SuccessfulViewSearchResultResponse(_0xabc514);}const _0xfd8c7c=yield _0x128e52['json']();return new FailedSearchResultResponse(_0xfd8c7c);}catch(_0x5247e1){if(_0x5247e1 instanceof Error)return new FailedSearchResultResponse({'detail':_0x5247e1['message'],'title':_0x5247e1['name'],'status':0x1f4,'instance':'','type':''});throw _0x5247e1;}});}}
|
|
16
|
+
|
|
17
|
+
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x461e06,_0x473ae5,_0x2c7208,_0x35332d){function _0x423929(_0x3ea6e8){return _0x3ea6e8 instanceof _0x2c7208?_0x3ea6e8:new _0x2c7208(function(_0x1ea08a){_0x1ea08a(_0x3ea6e8);});}return new(_0x2c7208||(_0x2c7208=Promise))(function(_0x576303,_0x35e651){function _0x375cda(_0x4e43fd){try{_0x16a5f8(_0x35332d['next'](_0x4e43fd));}catch(_0x38e4ae){_0x35e651(_0x38e4ae);}}function _0x1da38(_0x4ca6a9){try{_0x16a5f8(_0x35332d['throw'](_0x4ca6a9));}catch(_0x314c80){_0x35e651(_0x314c80);}}function _0x16a5f8(_0x39a951){_0x39a951['done']?_0x576303(_0x39a951['value']):_0x423929(_0x39a951['value'])['then'](_0x375cda,_0x1da38);}_0x16a5f8((_0x35332d=_0x35332d['apply'](_0x461e06,_0x473ae5||[]))['next']());});};class ContributorService{constructor(_0x4465f4){this['fetch']=_0x4465f4,this['path']='contributor';}['create'](_0x3fa417,_0xd2a15e,_0x4606aa,_0x1c3c3d){return __awaiter$1(this,void 0,void 0,function*(){const _0x124333={'account_name':_0x3fa417,'list_name':_0xd2a15e,'contributor_name':_0x4606aa};try{const _0x2b86cc=yield this['fetch']['post'](this['path'],_0x1c3c3d,_0x124333);if(_0x2b86cc['status']>0xc7&&_0x2b86cc['status']<0x12c){const _0x3e3644=yield _0x2b86cc['json']();return new SuccessfulContributorResponse(_0x3e3644);}const _0x2e3084=yield _0x2b86cc['json']();return new FailedContributorResponse(_0x2e3084);}catch(_0x120958){if(_0x120958 instanceof Error)return new FailedContributorResponse({'detail':_0x120958['message'],'title':_0x120958['name'],'status':0x1f4,'instance':'','type':''});throw _0x120958;}});}['remove'](_0x351392,_0x1466ca,_0x26409e,_0x244112){return __awaiter$1(this,void 0,void 0,function*(){const _0x43f026=this['path']+'/'+_0x351392+'/'+_0x1466ca+'/'+_0x26409e,_0xc76511=yield this['fetch']['delete'](_0x43f026,_0x244112);try{if(_0xc76511['status']>0xc7&&_0xc76511['status']<0x12c)return new SuccessfulResponse({});const _0x126aed=yield _0xc76511['json']();return new FailedResponse(_0x126aed);}catch(_0x2f2c6b){if(_0x2f2c6b instanceof Error)return new FailedResponse({'detail':_0x2f2c6b['message'],'title':_0x2f2c6b['name'],'status':0x1f4,'instance':'','type':''});throw _0x2f2c6b;}});}['startsWith'](_0x534e78,_0x540fdd){return __awaiter$1(this,void 0,void 0,function*(){const _0x1b88d0=this['path']+'/'+_0x534e78;try{const _0x31f6ee=yield this['fetch']['get'](_0x1b88d0,_0x540fdd);if(_0x31f6ee['status']>0xc7&&_0x31f6ee['status']<0x12c){const _0x243c46=yield _0x31f6ee['json']();return new SuccessfulAccountAndImageResponse(_0x243c46);}const _0x54181e=yield _0x31f6ee['json']();return new FailedAccountAndImageResponse(_0x54181e);}catch(_0xdbfbe1){if(_0xdbfbe1 instanceof Error)return new FailedAccountAndImageResponse({'detail':_0xdbfbe1['message'],'title':_0xdbfbe1['name'],'status':0x1f4,'instance':'','type':''});throw _0xdbfbe1;}});}}
|
|
18
|
+
|
|
19
|
+
var __awaiter=undefined&&undefined['__awaiter']||function(_0x55e8b4,_0x34bb8a,_0x4f676a,_0xb9f15b){function _0x242048(_0x45fbac){return _0x45fbac instanceof _0x4f676a?_0x45fbac:new _0x4f676a(function(_0x21c018){_0x21c018(_0x45fbac);});}return new(_0x4f676a||(_0x4f676a=Promise))(function(_0x5360bc,_0x2ad6bb){function _0x4fe5f4(_0x33b41d){try{_0x3ca4bb(_0xb9f15b['next'](_0x33b41d));}catch(_0xe8f106){_0x2ad6bb(_0xe8f106);}}function _0x468e37(_0x4e3725){try{_0x3ca4bb(_0xb9f15b['throw'](_0x4e3725));}catch(_0x17f6c9){_0x2ad6bb(_0x17f6c9);}}function _0x3ca4bb(_0x16b7b4){_0x16b7b4['done']?_0x5360bc(_0x16b7b4['value']):_0x242048(_0x16b7b4['value'])['then'](_0x4fe5f4,_0x468e37);}_0x3ca4bb((_0xb9f15b=_0xb9f15b['apply'](_0x55e8b4,_0x34bb8a||[]))['next']());});};class AdminClient{constructor(_0x6d3392='https://admin.searchability.dev/'){var _0x276392=new Fetch(_0x6d3392);this['Accounts']=new AccountService(_0x276392),this['Lists']=new ListService(_0x276392),this['ApiKeys']=new ApiKeyService(_0x276392),this['SearchServers']=new SearchServersService(_0x276392),this['Facets']=new FacetService(_0x276392),this['SearchResults']=new SearchResultService(_0x276392),this['Contributors']=new ContributorService(_0x276392);}}class AuthClient{constructor(_0x1fdab9='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x1fdab9);}['login'](_0x16c40f){return __awaiter(this,void 0,void 0,function*(){const _0x365366='login/'+_0x16c40f;try{const _0x552e74=yield yield fetch(_0x365366);if(_0x552e74['status']>0xc7&&_0x552e74['status']<0x12c){const _0x1f628d=yield _0x552e74['json']();return new SuccessfulAuthResponse(_0x1f628d);}const _0xa205b0=yield _0x552e74['json']();return new FailedAuthResponse(_0xa205b0);}catch(_0x88690e){if(_0x88690e instanceof Error)return new FailedAuthResponse({'detail':_0x88690e['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x88690e;}});}['refresh'](_0x1b8c07){return __awaiter(this,void 0,void 0,function*(){const _0x136f95='refresh',_0x17e796={'refresh_token':_0x1b8c07};try{const _0x563cd5=yield this['fetch']['PostNoAuth'](_0x136f95,_0x17e796);if(_0x563cd5['status']>0xc7&&_0x563cd5['status']<0x12c){const _0x2f840c=yield _0x563cd5['json']();return new SuccessfulAuthResponse(_0x2f840c);}const _0x552b2c=yield _0x563cd5['json']();return new FailedAuthResponse(_0x552b2c);}catch(_0x15582b){if(_0x15582b instanceof Error)return new FailedAuthResponse({'detail':_0x15582b['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x15582b;}});}['getTokenStatus'](_0x465b20){if(Date['now']()<_0x465b20['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x465b20['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
|
|
20
|
+
|
|
21
|
+
export { AdminClient, AuthClient, TokenStatus, Tokens };
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
exports.TokenStatus = void 0;(function(
|
|
3
|
+
exports.TokenStatus = void 0;(function(_0x5a3d33){_0x5a3d33[_0x5a3d33['Ok']=0x0]='Ok',_0x5a3d33[_0x5a3d33['Refresh']=0x1]='Refresh',_0x5a3d33[_0x5a3d33['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(_0x177bdf){this['isSuccess']=_0x177bdf;}}class SuccessfulContributorResponse extends Response{constructor(_0x512503){super(!![]),this['contributor']=_0x512503;}['toSuccess'](){return this['contributor'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedContributorResponse extends Response{constructor(_0x4331d1){super(![]),this['problem']=_0x4331d1;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountAndImageResponse extends Response{constructor(_0x37768e){super(!![]),this['accountAndImages']=_0x37768e;}['toSuccess'](){return this['accountAndImages'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountAndImageResponse extends Response{constructor(_0x52f8aa){super(![]),this['problem']=_0x52f8aa;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulFacetResponse extends Response{constructor(_0x59c275){super(!![]),this['facet']=_0x59c275;}['toSuccess'](){return this['facet'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetResponse extends Response{constructor(_0x4b49d5){super(![]),this['problem']=_0x4b49d5;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountResponse extends Response{constructor(_0x1e7d9c){super(!![]),this['account']=_0x1e7d9c;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountImageResponse extends Response{constructor(_0x4cc0e0){super(!![]),this['accountImage']=_0x4cc0e0;}['toSuccess'](){return this['accountImage'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListIdentityResponse extends Response{constructor(_0x487cf4){super(!![]),this['list']=_0x487cf4;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListResponse extends Response{constructor(_0x5f100a){super(!![]),this['list']=_0x5f100a;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x5ae376){super(![]),this['problem']=_0x5ae376;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountImageResponse extends Response{constructor(_0x426fbd){super(![]),this['problem']=_0x426fbd;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListIdentityResponse extends Response{constructor(_0x17a6f1){super(![]),this['problem']=_0x17a6f1;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListResponse extends Response{constructor(_0xa4251d){super(![]),this['problem']=_0xa4251d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x4519c0){super(!![]),this['tokens']=_0x4519c0;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x2b3ca1){super(![]),this['problem']=_0x2b3ca1;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x2a4404){super(!![]),this['apiKey']=_0x2a4404;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x6a393d){super(![]),this['problem']=_0x6a393d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x2bf0e3){super(!![]),this['searchService']=_0x2bf0e3;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x4ab0b7){super(![]),this['problem']=_0x4ab0b7;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x1a9110){super(!![]),this['searchService']=_0x1a9110;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulViewSearchResultResponse extends Response{constructor(_0x2925a4){super(!![]),this['searchResult']=_0x2925a4;}['toSuccess'](){return this['searchResult'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchResultResponse extends Response{constructor(_0x5444e4){super(![]),this['problem']=_0x5444e4;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchServiceResponse extends Response{constructor(_0x1cb93d){super(!![]),this['searchServices']=_0x1cb93d;}['toSuccess'](){return this['searchServices'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServicesResponse extends Response{constructor(_0x7c5bc){super(![]),this['problem']=_0x7c5bc;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedViewSearchServiceResponse extends Response{constructor(_0x116aac){super(![]),this['problem']=_0x116aac;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x1b8623){super(!![]),this['apiKeyValue']=_0x1b8623;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x17a948){super(!![]),this['obj']=_0x17a948;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x3e95e9){super(![]),this['problem']=_0x3e95e9;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x32a956){super(![]),this['problem']=_0x32a956;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
|
|
4
4
|
|
|
5
|
-
var __awaiter$8=undefined&&undefined['__awaiter']||function(
|
|
5
|
+
var __awaiter$8=undefined&&undefined['__awaiter']||function(_0xef1d2f,_0xffaa,_0x3f1a2a,_0x5d6679){function _0x24806f(_0x1c3bb9){return _0x1c3bb9 instanceof _0x3f1a2a?_0x1c3bb9:new _0x3f1a2a(function(_0x4de7b1){_0x4de7b1(_0x1c3bb9);});}return new(_0x3f1a2a||(_0x3f1a2a=Promise))(function(_0x3ccaa9,_0x406f64){function _0x37287e(_0x2d4b90){try{_0x2c7a46(_0x5d6679['next'](_0x2d4b90));}catch(_0xbae795){_0x406f64(_0xbae795);}}function _0x7b7232(_0x3e8c23){try{_0x2c7a46(_0x5d6679['throw'](_0x3e8c23));}catch(_0x3c5dcc){_0x406f64(_0x3c5dcc);}}function _0x2c7a46(_0x526e4b){_0x526e4b['done']?_0x3ccaa9(_0x526e4b['value']):_0x24806f(_0x526e4b['value'])['then'](_0x37287e,_0x7b7232);}_0x2c7a46((_0x5d6679=_0x5d6679['apply'](_0xef1d2f,_0xffaa||[]))['next']());});};class AccountService{constructor(_0x2e0651){this['fetch']=_0x2e0651;}['get'](_0x5c538a,_0x2fb4cf){return __awaiter$8(this,void 0,void 0,function*(){const _0x1e77a2='Account/'+_0x5c538a+'/',_0x2b33e6=yield this['fetch']['get'](_0x1e77a2,_0x2fb4cf);try{if(_0x2b33e6['status']>0xc7&&_0x2b33e6['status']<0x12c){const _0x3546e3=yield _0x2b33e6['json']();return new SuccessfulAccountResponse(_0x3546e3);}const _0x409e90=yield _0x2b33e6['json']();return new FailedAccountResponse(_0x409e90);}catch(_0x17bef4){if(_0x17bef4 instanceof Error)return new FailedAccountResponse({'detail':_0x17bef4['message'],'title':_0x17bef4['name'],'status':0x1f4,'instance':'','type':''});throw _0x17bef4;}});}['getImage'](_0x5cb409,_0x1e9ef2){return __awaiter$8(this,void 0,void 0,function*(){const _0x524f30='account/image/'+_0x5cb409+'/',_0xf15228=yield this['fetch']['get'](_0x524f30,_0x1e9ef2);try{if(_0xf15228['status']>0xc7&&_0xf15228['status']<0x12c){const _0x203aef=yield _0xf15228['json']();return new SuccessfulAccountImageResponse(_0x203aef);}const _0x48e390=yield _0xf15228['json']();return new FailedAccountImageResponse(_0x48e390);}catch(_0x3794ab){if(_0x3794ab instanceof Error)return new FailedAccountImageResponse({'detail':_0x3794ab['message'],'title':_0x3794ab['name'],'status':0x1f4,'instance':'','type':''});throw _0x3794ab;}});}}
|
|
6
6
|
|
|
7
|
-
var __awaiter$7=undefined&&undefined['__awaiter']||function(
|
|
7
|
+
var __awaiter$7=undefined&&undefined['__awaiter']||function(_0x3b7ff5,_0x5dd013,_0x130ffe,_0x3d20e0){function _0x40c82e(_0x4b1541){return _0x4b1541 instanceof _0x130ffe?_0x4b1541:new _0x130ffe(function(_0x36f7ad){_0x36f7ad(_0x4b1541);});}return new(_0x130ffe||(_0x130ffe=Promise))(function(_0x5ab10b,_0x8af4fd){function _0xe64d17(_0x48b8ca){try{_0x5aa53d(_0x3d20e0['next'](_0x48b8ca));}catch(_0x2543a0){_0x8af4fd(_0x2543a0);}}function _0xde9973(_0x540920){try{_0x5aa53d(_0x3d20e0['throw'](_0x540920));}catch(_0x1218d6){_0x8af4fd(_0x1218d6);}}function _0x5aa53d(_0x38a9b1){_0x38a9b1['done']?_0x5ab10b(_0x38a9b1['value']):_0x40c82e(_0x38a9b1['value'])['then'](_0xe64d17,_0xde9973);}_0x5aa53d((_0x3d20e0=_0x3d20e0['apply'](_0x3b7ff5,_0x5dd013||[]))['next']());});};class ApiKeyService{constructor(_0x13b563){this['fetch']=_0x13b563,this['path']='api-key';}['create'](_0x5c0803,_0x55b659,_0x239895){return __awaiter$7(this,void 0,void 0,function*(){const _0x1e3c7e={'account_name':_0x5c0803,'api_key_name':_0x55b659};try{const _0xd8599d=yield this['fetch']['post'](this['path'],_0x239895,_0x1e3c7e);if(_0xd8599d['status']>0xc7&&_0xd8599d['status']<0x12c){const _0xcb3acd=yield _0xd8599d['json']();return new SuccessfulApiKeyResponse(_0xcb3acd);}const _0x5528d7=yield _0xd8599d['json']();return new FailedApiKeyResponse(_0x5528d7);}catch(_0x5bf42c){if(_0x5bf42c instanceof Error)return new FailedApiKeyResponse({'detail':_0x5bf42c['message'],'title':_0x5bf42c['name'],'status':0x1f4,'instance':'','type':''});throw _0x5bf42c;}});}['view'](_0x3988c2,_0x1400ac,_0x2b8a08){return __awaiter$7(this,void 0,void 0,function*(){const _0x1d11cc=this['path']+'/'+_0x3988c2+'/'+_0x1400ac;try{const _0x49db95=yield this['fetch']['get'](_0x1d11cc,_0x2b8a08);if(_0x49db95['status']>0xc7&&_0x49db95['status']<0x12c){const _0x160987=yield _0x49db95['json']();return new SuccessfulApiKeyValueResponse(_0x160987);}const _0x4bcf02=yield _0x49db95['json']();return new FailedApiKeyValueResponse(_0x4bcf02);}catch(_0x153d5f){if(_0x153d5f instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x153d5f['message'],'title':_0x153d5f['name'],'status':0x1f4,'instance':'','type':''});throw _0x153d5f;}});}['delete'](_0x211a4f,_0x3e5470,_0x4352b4){return __awaiter$7(this,void 0,void 0,function*(){const _0x505d15=this['path']+'/'+_0x211a4f+'/'+_0x3e5470;try{const _0x1ff601=yield this['fetch']['delete'](_0x505d15,_0x4352b4);if(_0x1ff601['status']>0xc7&&_0x1ff601['status']<0x12c)return new SuccessfulResponse({});const _0x1b0584=yield _0x1ff601['json']();return new FailedResponse(_0x1b0584);}catch(_0x572775){if(_0x572775 instanceof Error)return new FailedResponse({'detail':_0x572775['message'],'title':_0x572775['name'],'status':0x1f4,'instance':'','type':''});throw _0x572775;}});}}
|
|
8
8
|
|
|
9
|
-
var __awaiter$6=undefined&&undefined['__awaiter']||function(
|
|
9
|
+
var __awaiter$6=undefined&&undefined['__awaiter']||function(_0x3fb7bb,_0x103534,_0x1b1972,_0x4e8e77){function _0x541ec9(_0x4b87f5){return _0x4b87f5 instanceof _0x1b1972?_0x4b87f5:new _0x1b1972(function(_0xde9b6d){_0xde9b6d(_0x4b87f5);});}return new(_0x1b1972||(_0x1b1972=Promise))(function(_0x491111,_0x208731){function _0x80696a(_0x3b82b5){try{_0x149c95(_0x4e8e77['next'](_0x3b82b5));}catch(_0x657d4d){_0x208731(_0x657d4d);}}function _0x32bb0d(_0x30a5cc){try{_0x149c95(_0x4e8e77['throw'](_0x30a5cc));}catch(_0x582548){_0x208731(_0x582548);}}function _0x149c95(_0x56bfdb){_0x56bfdb['done']?_0x491111(_0x56bfdb['value']):_0x541ec9(_0x56bfdb['value'])['then'](_0x80696a,_0x32bb0d);}_0x149c95((_0x4e8e77=_0x4e8e77['apply'](_0x3fb7bb,_0x103534||[]))['next']());});};class ListService{constructor(_0x2945c1){this['fetch']=_0x2945c1;}['create'](_0x5cce12,_0x5e9c4d,_0x4524b5,_0x7f50da){return __awaiter$6(this,void 0,void 0,function*(){const _0x33e8f5='List',_0x19fe51={'account_name':_0x5cce12,'list_name':_0x5e9c4d,'search_service_name':_0x4524b5};try{const _0x1bad99=yield this['fetch']['post'](_0x33e8f5,_0x7f50da,_0x19fe51);if(_0x1bad99['status']>0xc7&&_0x1bad99['status']<0x12c){const _0x3b8a1d=yield _0x1bad99['json']();return new SuccessfulListIdentityResponse(_0x3b8a1d);}const _0x447eb9=yield _0x1bad99['json']();return new FailedListIdentityResponse(_0x447eb9);}catch(_0x22898a){if(_0x22898a instanceof Error)return new FailedListIdentityResponse({'detail':_0x22898a['message'],'title':_0x22898a['name'],'status':0x1f4,'instance':'','type':''});throw _0x22898a;}});}['delete'](_0x1355ea,_0x5d08e2,_0x235117){return __awaiter$6(this,void 0,void 0,function*(){const _0xe52b74='List/'+_0x1355ea+'/'+_0x5d08e2,_0x536e92=yield this['fetch']['delete'](_0xe52b74,_0x235117);try{if(_0x536e92['status']>0xc7&&_0x536e92['status']<0x12c)return new SuccessfulResponse({});const _0x10b458=yield _0x536e92['json']();return new FailedResponse(_0x10b458);}catch(_0x2d4cdc){if(_0x2d4cdc instanceof Error)return new FailedResponse({'detail':_0x2d4cdc['message'],'title':_0x2d4cdc['name'],'status':0x1f4,'instance':'','type':''});throw _0x2d4cdc;}});}['get'](_0x137b6e,_0x405b22,_0x1b5263){return __awaiter$6(this,void 0,void 0,function*(){const _0x4fc4ba='List/'+_0x137b6e+'/'+_0x405b22;try{const _0x1fc0ea=yield this['fetch']['get'](_0x4fc4ba,_0x1b5263);if(_0x1fc0ea['status']>0xc7&&_0x1fc0ea['status']<0x12c){const _0x58c4dd=yield _0x1fc0ea['json']();return new SuccessfulListResponse(_0x58c4dd);}const _0x3101eb=yield _0x1fc0ea['json']();return new FailedListResponse(_0x3101eb);}catch(_0x55c9e6){if(_0x55c9e6 instanceof Error)return new FailedListResponse({'detail':_0x55c9e6['message'],'title':_0x55c9e6['name'],'status':0x1f4,'instance':'','type':''});throw _0x55c9e6;}});}}
|
|
10
10
|
|
|
11
|
-
var __awaiter$5=undefined&&undefined['__awaiter']||function(
|
|
11
|
+
var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x18e347,_0x2df7e4,_0x5b4b44,_0x2a170d){function _0x3e4676(_0x5920cd){return _0x5920cd instanceof _0x5b4b44?_0x5920cd:new _0x5b4b44(function(_0x17c4eb){_0x17c4eb(_0x5920cd);});}return new(_0x5b4b44||(_0x5b4b44=Promise))(function(_0x1dab3c,_0x25642e){function _0x24da47(_0x756325){try{_0x52f08e(_0x2a170d['next'](_0x756325));}catch(_0x2338e9){_0x25642e(_0x2338e9);}}function _0x397338(_0x50ce82){try{_0x52f08e(_0x2a170d['throw'](_0x50ce82));}catch(_0x54b98c){_0x25642e(_0x54b98c);}}function _0x52f08e(_0x3e5abd){_0x3e5abd['done']?_0x1dab3c(_0x3e5abd['value']):_0x3e4676(_0x3e5abd['value'])['then'](_0x24da47,_0x397338);}_0x52f08e((_0x2a170d=_0x2a170d['apply'](_0x18e347,_0x2df7e4||[]))['next']());});};class Fetch{constructor(_0x49961b){this['baseUri']=_0x49961b,this['getUrl']=_0x4a31d6=>{return _0x4a31d6['startsWith']('/')&&(_0x4a31d6=_0x4a31d6['replace']('/','')),''+this['baseUri']+_0x4a31d6;},!_0x49961b['endsWith']('/')&&(_0x49961b=_0x49961b+'/');}['get'](_0x58e8d8,_0x44a7ff){return __awaiter$5(this,void 0,void 0,function*(){const _0x4626ec=this['getUrl'](_0x58e8d8);return yield fetch(_0x4626ec,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x44a7ff}});});}['post'](_0x5a1e77,_0x17b08d,_0xdbc051){return __awaiter$5(this,void 0,void 0,function*(){const _0x2c2a1f=this['getUrl'](_0x5a1e77);return yield fetch(_0x2c2a1f,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x17b08d},'body':_0xdbc051?JSON['stringify'](_0xdbc051):null});});}['PostNoAuth'](_0x5e7d08,_0x3bf295){return __awaiter$5(this,void 0,void 0,function*(){const _0x10cbff=this['getUrl'](_0x5e7d08);return yield fetch(_0x10cbff,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0x3bf295?JSON['stringify'](_0x3bf295):null});});}['put'](_0x1702c2,_0x5214c3,_0x1d3058){return __awaiter$5(this,void 0,void 0,function*(){const _0x1a2968=this['getUrl'](_0x1702c2);return yield fetch(_0x1a2968,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x5214c3},'body':_0x1d3058?JSON['stringify'](_0x1d3058):null});});}['delete'](_0x3c2d20,_0x1cb3de){return __awaiter$5(this,void 0,void 0,function*(){const _0x30e3af=this['getUrl'](_0x3c2d20);return yield fetch(_0x30e3af,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1cb3de}});});}}
|
|
12
12
|
|
|
13
|
-
var __awaiter$4=undefined&&undefined['__awaiter']||function(
|
|
13
|
+
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x854ae0,_0x13c908,_0x51e3ae,_0x1c29db){function _0x532dc2(_0x4a4c6a){return _0x4a4c6a instanceof _0x51e3ae?_0x4a4c6a:new _0x51e3ae(function(_0x24b25e){_0x24b25e(_0x4a4c6a);});}return new(_0x51e3ae||(_0x51e3ae=Promise))(function(_0x778045,_0x40123a){function _0x16af81(_0x22350b){try{_0x4cde9d(_0x1c29db['next'](_0x22350b));}catch(_0x1ec55a){_0x40123a(_0x1ec55a);}}function _0x5c4190(_0x1af67d){try{_0x4cde9d(_0x1c29db['throw'](_0x1af67d));}catch(_0x5b91c0){_0x40123a(_0x5b91c0);}}function _0x4cde9d(_0x494cb7){_0x494cb7['done']?_0x778045(_0x494cb7['value']):_0x532dc2(_0x494cb7['value'])['then'](_0x16af81,_0x5c4190);}_0x4cde9d((_0x1c29db=_0x1c29db['apply'](_0x854ae0,_0x13c908||[]))['next']());});};class SearchServersService{constructor(_0x35b473){this['fetch']=_0x35b473,this['path']='search-services';}['create'](_0x1e6357,_0x4e1cfa,_0x2341f8,_0x1ab1ef,_0x307978,_0x2d76b1,_0x5b1cec,_0x5506e5){return __awaiter$4(this,void 0,void 0,function*(){const _0x4c0c33={'account_name':_0x1e6357,'search_service_name':_0x4e1cfa,'endpoint':_0x2341f8,'key':_0x1ab1ef,'country':_0x307978,'provider':_0x2d76b1,'index_name':_0x5b1cec};try{const _0x167e7c=yield this['fetch']['post'](this['path'],_0x5506e5,_0x4c0c33);if(_0x167e7c['status']>0xc7&&_0x167e7c['status']<0x12c){const _0x68cc6=yield _0x167e7c['json']();return new SuccessfulSearchServiceResponse(_0x68cc6);}const _0x73de6=yield _0x167e7c['json']();return new FailedSearchServiceResponse(_0x73de6);}catch(_0x4c4d39){if(_0x4c4d39 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x4c4d39['message'],'title':_0x4c4d39['name'],'status':0x1f4,'instance':'','type':''});throw _0x4c4d39;}});}['delete'](_0x2214fe,_0x5e88ad,_0x5278e6){return __awaiter$4(this,void 0,void 0,function*(){const _0x365ce6=this['path']+'/'+_0x2214fe+'/'+_0x5e88ad;try{const _0x1c5ff7=yield this['fetch']['delete'](_0x365ce6,_0x5278e6);if(_0x1c5ff7['status']>0xc7&&_0x1c5ff7['status']<0x12c)return new SuccessfulResponse({});const _0x54d57b=yield _0x1c5ff7['json']();return new FailedResponse(_0x54d57b);}catch(_0x1ba37d){if(_0x1ba37d instanceof Error)return new FailedResponse({'detail':_0x1ba37d['message'],'title':_0x1ba37d['name'],'status':0x1f4,'instance':'','type':''});throw _0x1ba37d;}});}['view'](_0x56328d,_0x55d49f,_0x3334b0){return __awaiter$4(this,void 0,void 0,function*(){const _0x159caf=this['path']+'/'+_0x56328d+'/'+_0x55d49f;try{const _0x2e4ca0=yield this['fetch']['get'](_0x159caf,_0x3334b0);if(_0x2e4ca0['status']>0xc7&&_0x2e4ca0['status']<0x12c){const _0x3af722=yield _0x2e4ca0['json']();return new SuccessfulViewSearchServiceResponse(_0x3af722);}const _0x37917b=yield _0x2e4ca0['json']();return new FailedViewSearchServiceResponse(_0x37917b);}catch(_0x151743){if(_0x151743 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x151743['message'],'title':_0x151743['name'],'status':0x1f4,'instance':'','type':''});throw _0x151743;}});}['edit'](_0x537982,_0x269b7f,_0x1e0507,_0x2ab332,_0x26d42e,_0x2d415e){return __awaiter$4(this,void 0,void 0,function*(){const _0x1aaafb={'account_name':_0x537982,'search_service_name':_0x269b7f,'new_search_service_name':_0x1e0507,'key':_0x2ab332,'country':_0x26d42e};try{const _0x393a3d=yield this['fetch']['put'](this['path'],_0x2d415e,_0x1aaafb);if(_0x393a3d['status']>0xc7&&_0x393a3d['status']<0x12c){const _0x11ee84=yield _0x393a3d['json']();return new SuccessfulSearchServiceResponse(_0x11ee84);}const _0x1af59=yield _0x393a3d['json']();return new FailedSearchServiceResponse(_0x1af59);}catch(_0x164d6a){if(_0x164d6a instanceof Error)return new FailedSearchServiceResponse({'detail':_0x164d6a['message'],'title':_0x164d6a['name'],'status':0x1f4,'instance':'','type':''});throw _0x164d6a;}});}['list'](_0x3281e0,_0x107d36){return __awaiter$4(this,void 0,void 0,function*(){const _0x256a5d=this['path']+'/'+_0x3281e0;try{const _0x3173eb=yield this['fetch']['get'](_0x256a5d,_0x107d36);if(_0x3173eb['status']>0xc7&&_0x3173eb['status']<0x12c){const _0x122854=yield _0x3173eb['json']();return new SuccessfulListSearchServiceResponse(_0x122854);}const _0x202bc2=yield _0x3173eb['json']();return new FailedViewSearchServicesResponse(_0x202bc2);}catch(_0x3f8dc1){if(_0x3f8dc1 instanceof Error)return new FailedViewSearchServicesResponse({'detail':_0x3f8dc1['message'],'title':_0x3f8dc1['name'],'status':0x1f4,'instance':'','type':''});throw _0x3f8dc1;}});}}
|
|
14
14
|
|
|
15
|
-
var __awaiter$3=undefined&&undefined['__awaiter']||function(
|
|
15
|
+
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x381ec4,_0x2dba1c,_0x17a8b0,_0x1660a4){function _0x38207d(_0x5aa429){return _0x5aa429 instanceof _0x17a8b0?_0x5aa429:new _0x17a8b0(function(_0x4be835){_0x4be835(_0x5aa429);});}return new(_0x17a8b0||(_0x17a8b0=Promise))(function(_0x4baf5c,_0x34031a){function _0x135ecd(_0x40cb49){try{_0x42f2bd(_0x1660a4['next'](_0x40cb49));}catch(_0x209778){_0x34031a(_0x209778);}}function _0x108914(_0x2e8ea7){try{_0x42f2bd(_0x1660a4['throw'](_0x2e8ea7));}catch(_0x4721e3){_0x34031a(_0x4721e3);}}function _0x42f2bd(_0x1f1f2d){_0x1f1f2d['done']?_0x4baf5c(_0x1f1f2d['value']):_0x38207d(_0x1f1f2d['value'])['then'](_0x135ecd,_0x108914);}_0x42f2bd((_0x1660a4=_0x1660a4['apply'](_0x381ec4,_0x2dba1c||[]))['next']());});};class FacetService{constructor(_0xebc24){this['fetch']=_0xebc24,this['path']='facet';}['create'](_0x119df4,_0x399685,_0x4e4973,_0x5c8e33){return __awaiter$3(this,void 0,void 0,function*(){const _0x36ec41={'account_name':_0x119df4,'list_name':_0x399685,'facet_name':_0x4e4973};try{const _0x13715f=yield this['fetch']['post'](this['path'],_0x5c8e33,_0x36ec41);if(_0x13715f['status']>0xc7&&_0x13715f['status']<0x12c){const _0x42b393=yield _0x13715f['json']();return new SuccessfulFacetResponse(_0x42b393);}const _0x2fe619=yield _0x13715f['json']();return new FailedFacetResponse(_0x2fe619);}catch(_0x43142a){if(_0x43142a instanceof Error)return new FailedFacetResponse({'detail':_0x43142a['message'],'title':_0x43142a['name'],'status':0x1f4,'instance':'','type':''});throw _0x43142a;}});}['remove'](_0x169082,_0xa9bdc5,_0x1f4bf4,_0x22fdb7){return __awaiter$3(this,void 0,void 0,function*(){const _0x4c4b82='Facet/'+_0x169082+'/'+_0xa9bdc5+'/'+_0x1f4bf4,_0x3bdb3a=yield this['fetch']['delete'](_0x4c4b82,_0x22fdb7);try{if(_0x3bdb3a['status']>0xc7&&_0x3bdb3a['status']<0x12c)return new SuccessfulResponse({});const _0x1a3a90=yield _0x3bdb3a['json']();return new FailedResponse(_0x1a3a90);}catch(_0x156f71){if(_0x156f71 instanceof Error)return new FailedResponse({'detail':_0x156f71['message'],'title':_0x156f71['name'],'status':0x1f4,'instance':'','type':''});throw _0x156f71;}});}['rename'](_0x373f37,_0x3da226,_0xcb8413,_0x4421f0,_0x12fb87){return __awaiter$3(this,void 0,void 0,function*(){const _0x4ee030={'account_name':_0x373f37,'list_name':_0x3da226,'facet_name':_0xcb8413,'new_facet_name':_0x4421f0};try{const _0x1d59bf=yield this['fetch']['put'](this['path'],_0x12fb87,_0x4ee030);if(_0x1d59bf['status']>0xc7&&_0x1d59bf['status']<0x12c){const _0x2cedd0=yield _0x1d59bf['json']();return new SuccessfulFacetResponse(_0x2cedd0);}const _0x1c7b5c=yield _0x1d59bf['json']();return new FailedFacetResponse(_0x1c7b5c);}catch(_0x45a50e){if(_0x45a50e instanceof Error)return new FailedFacetResponse({'detail':_0x45a50e['message'],'title':_0x45a50e['name'],'status':0x1f4,'instance':'','type':''});throw _0x45a50e;}});}}
|
|
16
16
|
|
|
17
|
-
var __awaiter$2=undefined&&undefined['__awaiter']||function(
|
|
17
|
+
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x3e9700,_0x33b1a1,_0x1c754d,_0x493071){function _0x618728(_0x3b985f){return _0x3b985f instanceof _0x1c754d?_0x3b985f:new _0x1c754d(function(_0x339343){_0x339343(_0x3b985f);});}return new(_0x1c754d||(_0x1c754d=Promise))(function(_0x10abc6,_0x199190){function _0x49390a(_0xbaf381){try{_0x6687e4(_0x493071['next'](_0xbaf381));}catch(_0x2911e3){_0x199190(_0x2911e3);}}function _0xd0c4b7(_0x1aba1e){try{_0x6687e4(_0x493071['throw'](_0x1aba1e));}catch(_0x583d22){_0x199190(_0x583d22);}}function _0x6687e4(_0x554067){_0x554067['done']?_0x10abc6(_0x554067['value']):_0x618728(_0x554067['value'])['then'](_0x49390a,_0xd0c4b7);}_0x6687e4((_0x493071=_0x493071['apply'](_0x3e9700,_0x33b1a1||[]))['next']());});};class SearchResultService{constructor(_0x24c213){this['fetch']=_0x24c213,this['path']='search-result';}['create'](_0x2007a6,_0x3a29b1,_0x26cf90,_0x449723,_0x3f3dc5){return __awaiter$2(this,void 0,void 0,function*(){_0x3f3dc5=_0x3f3dc5!==null&&_0x3f3dc5!==void 0?_0x3f3dc5:{'description':'','keywords':'','resource_1':'','resource_2':'','resource_3':'','latitude':0x0,'longitude':0x0,'facets':[]};const _0x179075=Object['assign']({'account_name':_0x2007a6,'search_result_name':_0x26cf90,'list_name':_0x3a29b1},_0x3f3dc5);try{const _0x56cc6f=yield this['fetch']['post'](this['path'],_0x449723,_0x179075);if(_0x56cc6f['status']>0xc7&&_0x56cc6f['status']<0x12c){const _0x2f7ec3=yield _0x56cc6f['json']();return new SuccessfulViewSearchResultResponse(_0x2f7ec3);}const _0x403098=yield _0x56cc6f['json']();return new FailedSearchResultResponse(_0x403098);}catch(_0x3a5cb7){if(_0x3a5cb7 instanceof Error)return new FailedSearchResultResponse({'detail':_0x3a5cb7['message'],'title':_0x3a5cb7['name'],'status':0x1f4,'instance':'','type':''});throw _0x3a5cb7;}});}}
|
|
18
18
|
|
|
19
|
-
var __awaiter$1=undefined&&undefined['__awaiter']||function(
|
|
19
|
+
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x2643d3,_0x4fb947,_0x4d30d7,_0x2275f7){function _0x240dd0(_0x3ef9de){return _0x3ef9de instanceof _0x4d30d7?_0x3ef9de:new _0x4d30d7(function(_0x1e677d){_0x1e677d(_0x3ef9de);});}return new(_0x4d30d7||(_0x4d30d7=Promise))(function(_0x3d4aba,_0x177173){function _0x2552cd(_0x25b1fe){try{_0x472240(_0x2275f7['next'](_0x25b1fe));}catch(_0x442abb){_0x177173(_0x442abb);}}function _0x179799(_0x12acf9){try{_0x472240(_0x2275f7['throw'](_0x12acf9));}catch(_0x120a6b){_0x177173(_0x120a6b);}}function _0x472240(_0x4c0172){_0x4c0172['done']?_0x3d4aba(_0x4c0172['value']):_0x240dd0(_0x4c0172['value'])['then'](_0x2552cd,_0x179799);}_0x472240((_0x2275f7=_0x2275f7['apply'](_0x2643d3,_0x4fb947||[]))['next']());});};class ContributorService{constructor(_0x33ade3){this['fetch']=_0x33ade3,this['path']='contributor';}['create'](_0x21ab2c,_0x42e2f8,_0x5b1b90,_0x39c7b4){return __awaiter$1(this,void 0,void 0,function*(){const _0x2ed76a={'account_name':_0x21ab2c,'list_name':_0x42e2f8,'contributor_name':_0x5b1b90};try{const _0x24725f=yield this['fetch']['post'](this['path'],_0x39c7b4,_0x2ed76a);if(_0x24725f['status']>0xc7&&_0x24725f['status']<0x12c){const _0x740fe5=yield _0x24725f['json']();return new SuccessfulContributorResponse(_0x740fe5);}const _0x35de45=yield _0x24725f['json']();return new FailedContributorResponse(_0x35de45);}catch(_0x2ad673){if(_0x2ad673 instanceof Error)return new FailedContributorResponse({'detail':_0x2ad673['message'],'title':_0x2ad673['name'],'status':0x1f4,'instance':'','type':''});throw _0x2ad673;}});}['remove'](_0x57ebb0,_0x18eb16,_0x25def5,_0x3ccb9c){return __awaiter$1(this,void 0,void 0,function*(){const _0x2156e6=this['path']+'/'+_0x57ebb0+'/'+_0x18eb16+'/'+_0x25def5,_0x419b31=yield this['fetch']['delete'](_0x2156e6,_0x3ccb9c);try{if(_0x419b31['status']>0xc7&&_0x419b31['status']<0x12c)return new SuccessfulResponse({});const _0x4648d8=yield _0x419b31['json']();return new FailedResponse(_0x4648d8);}catch(_0x3a08e2){if(_0x3a08e2 instanceof Error)return new FailedResponse({'detail':_0x3a08e2['message'],'title':_0x3a08e2['name'],'status':0x1f4,'instance':'','type':''});throw _0x3a08e2;}});}['startsWith'](_0x54043a,_0x3e5e8b){return __awaiter$1(this,void 0,void 0,function*(){const _0x33fa15=this['path']+'/'+_0x54043a;try{const _0x475df9=yield this['fetch']['get'](_0x33fa15,_0x3e5e8b);if(_0x475df9['status']>0xc7&&_0x475df9['status']<0x12c){const _0x5002d2=yield _0x475df9['json']();return new SuccessfulAccountAndImageResponse(_0x5002d2);}const _0x3c1291=yield _0x475df9['json']();return new FailedAccountAndImageResponse(_0x3c1291);}catch(_0x33a1cb){if(_0x33a1cb instanceof Error)return new FailedAccountAndImageResponse({'detail':_0x33a1cb['message'],'title':_0x33a1cb['name'],'status':0x1f4,'instance':'','type':''});throw _0x33a1cb;}});}}
|
|
20
20
|
|
|
21
|
-
var __awaiter=undefined&&undefined['__awaiter']||function(
|
|
21
|
+
var __awaiter=undefined&&undefined['__awaiter']||function(_0x1ab1b8,_0x29f71d,_0x20e3a2,_0xd635d){function _0x40db42(_0x1efc79){return _0x1efc79 instanceof _0x20e3a2?_0x1efc79:new _0x20e3a2(function(_0x1eb4f3){_0x1eb4f3(_0x1efc79);});}return new(_0x20e3a2||(_0x20e3a2=Promise))(function(_0x1d868c,_0x86a060){function _0x36d39f(_0x25d13a){try{_0x1fb1ee(_0xd635d['next'](_0x25d13a));}catch(_0xc98562){_0x86a060(_0xc98562);}}function _0x182fd6(_0xb5508d){try{_0x1fb1ee(_0xd635d['throw'](_0xb5508d));}catch(_0x44f6be){_0x86a060(_0x44f6be);}}function _0x1fb1ee(_0x282b95){_0x282b95['done']?_0x1d868c(_0x282b95['value']):_0x40db42(_0x282b95['value'])['then'](_0x36d39f,_0x182fd6);}_0x1fb1ee((_0xd635d=_0xd635d['apply'](_0x1ab1b8,_0x29f71d||[]))['next']());});};class AdminClient{constructor(_0x2df1d6='https://admin.searchability.dev/'){var _0x234262=new Fetch(_0x2df1d6);this['Accounts']=new AccountService(_0x234262),this['Lists']=new ListService(_0x234262),this['ApiKeys']=new ApiKeyService(_0x234262),this['SearchServers']=new SearchServersService(_0x234262),this['Facets']=new FacetService(_0x234262),this['SearchResults']=new SearchResultService(_0x234262),this['Contributors']=new ContributorService(_0x234262);}}class AuthClient{constructor(_0x14899d='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x14899d);}['login'](_0x2eb439){return __awaiter(this,void 0,void 0,function*(){const _0xde77d1='login/'+_0x2eb439;try{const _0x24d9d=yield yield fetch(_0xde77d1);if(_0x24d9d['status']>0xc7&&_0x24d9d['status']<0x12c){const _0x4cae59=yield _0x24d9d['json']();return new SuccessfulAuthResponse(_0x4cae59);}const _0x285f55=yield _0x24d9d['json']();return new FailedAuthResponse(_0x285f55);}catch(_0x335b63){if(_0x335b63 instanceof Error)return new FailedAuthResponse({'detail':_0x335b63['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x335b63;}});}['refresh'](_0x289c02){return __awaiter(this,void 0,void 0,function*(){const _0x2b6b97='refresh',_0x5dee58={'refresh_token':_0x289c02};try{const _0x259151=yield this['fetch']['PostNoAuth'](_0x2b6b97,_0x5dee58);if(_0x259151['status']>0xc7&&_0x259151['status']<0x12c){const _0x4defda=yield _0x259151['json']();return new SuccessfulAuthResponse(_0x4defda);}const _0x30c259=yield _0x259151['json']();return new FailedAuthResponse(_0x30c259);}catch(_0x6c81b9){if(_0x6c81b9 instanceof Error)return new FailedAuthResponse({'detail':_0x6c81b9['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x6c81b9;}});}['getTokenStatus'](_0x26c566){if(Date['now']()<_0x26c566['access_expires'])return exports.TokenStatus['Ok'];if(Date['now']()<_0x26c566['refresh_expires'])return exports.TokenStatus['Refresh'];return exports.TokenStatus['Expired'];}}
|
|
22
22
|
|
|
23
23
|
exports.AdminClient = AdminClient;
|
|
24
24
|
exports.AuthClient = AuthClient;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
var TokenStatus;(function(
|
|
1
|
+
var TokenStatus;(function(_0x2d219d){_0x2d219d[_0x2d219d['Ok']=0x0]='Ok',_0x2d219d[_0x2d219d['Refresh']=0x1]='Refresh',_0x2d219d[_0x2d219d['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(_0x56941e){this['isSuccess']=_0x56941e;}}class SuccessfulContributorResponse extends Response{constructor(_0x24a51c){super(!![]),this['contributor']=_0x24a51c;}['toSuccess'](){return this['contributor'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedContributorResponse extends Response{constructor(_0x1442c2){super(![]),this['problem']=_0x1442c2;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountAndImageResponse extends Response{constructor(_0x1f8b9a){super(!![]),this['accountAndImages']=_0x1f8b9a;}['toSuccess'](){return this['accountAndImages'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountAndImageResponse extends Response{constructor(_0x38f844){super(![]),this['problem']=_0x38f844;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulFacetResponse extends Response{constructor(_0x3356eb){super(!![]),this['facet']=_0x3356eb;}['toSuccess'](){return this['facet'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetResponse extends Response{constructor(_0x4e6b75){super(![]),this['problem']=_0x4e6b75;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountResponse extends Response{constructor(_0x3386a3){super(!![]),this['account']=_0x3386a3;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountImageResponse extends Response{constructor(_0x3a532b){super(!![]),this['accountImage']=_0x3a532b;}['toSuccess'](){return this['accountImage'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListIdentityResponse extends Response{constructor(_0x573716){super(!![]),this['list']=_0x573716;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListResponse extends Response{constructor(_0x57f023){super(!![]),this['list']=_0x57f023;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0xc79103){super(![]),this['problem']=_0xc79103;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountImageResponse extends Response{constructor(_0xa787c0){super(![]),this['problem']=_0xa787c0;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListIdentityResponse extends Response{constructor(_0xdceaf){super(![]),this['problem']=_0xdceaf;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListResponse extends Response{constructor(_0x22af58){super(![]),this['problem']=_0x22af58;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x559154){super(!![]),this['tokens']=_0x559154;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x549af3){super(![]),this['problem']=_0x549af3;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x40b217){super(!![]),this['apiKey']=_0x40b217;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x2aee78){super(![]),this['problem']=_0x2aee78;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x2ce47f){super(!![]),this['searchService']=_0x2ce47f;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0xa2158e){super(![]),this['problem']=_0xa2158e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x204f82){super(!![]),this['searchService']=_0x204f82;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulViewSearchResultResponse extends Response{constructor(_0x44e91d){super(!![]),this['searchResult']=_0x44e91d;}['toSuccess'](){return this['searchResult'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchResultResponse extends Response{constructor(_0x115e68){super(![]),this['problem']=_0x115e68;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchServiceResponse extends Response{constructor(_0x5daca0){super(!![]),this['searchServices']=_0x5daca0;}['toSuccess'](){return this['searchServices'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServicesResponse extends Response{constructor(_0x12c870){super(![]),this['problem']=_0x12c870;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedViewSearchServiceResponse extends Response{constructor(_0x3c3e9e){super(![]),this['problem']=_0x3c3e9e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x210e0f){super(!![]),this['apiKeyValue']=_0x210e0f;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x3e8d03){super(!![]),this['obj']=_0x3e8d03;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x3f9791){super(![]),this['problem']=_0x3f9791;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x2b8f0a){super(![]),this['problem']=_0x2b8f0a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
|
|
2
2
|
|
|
3
|
-
var __awaiter$8=undefined&&undefined['__awaiter']||function(
|
|
3
|
+
var __awaiter$8=undefined&&undefined['__awaiter']||function(_0x43e73c,_0xea8a02,_0x4999ac,_0x1c20d5){function _0x55c9ed(_0x3dc806){return _0x3dc806 instanceof _0x4999ac?_0x3dc806:new _0x4999ac(function(_0x550d54){_0x550d54(_0x3dc806);});}return new(_0x4999ac||(_0x4999ac=Promise))(function(_0x3646af,_0x1d6c2d){function _0x30446e(_0x7a742e){try{_0x37b92b(_0x1c20d5['next'](_0x7a742e));}catch(_0x436d6f){_0x1d6c2d(_0x436d6f);}}function _0x4da1ea(_0x2753dd){try{_0x37b92b(_0x1c20d5['throw'](_0x2753dd));}catch(_0x951dd3){_0x1d6c2d(_0x951dd3);}}function _0x37b92b(_0x522357){_0x522357['done']?_0x3646af(_0x522357['value']):_0x55c9ed(_0x522357['value'])['then'](_0x30446e,_0x4da1ea);}_0x37b92b((_0x1c20d5=_0x1c20d5['apply'](_0x43e73c,_0xea8a02||[]))['next']());});};class AccountService{constructor(_0x36a70c){this['fetch']=_0x36a70c;}['get'](_0x368d90,_0x5c0332){return __awaiter$8(this,void 0,void 0,function*(){const _0x39f839='Account/'+_0x368d90+'/',_0x3bf334=yield this['fetch']['get'](_0x39f839,_0x5c0332);try{if(_0x3bf334['status']>0xc7&&_0x3bf334['status']<0x12c){const _0x327dbe=yield _0x3bf334['json']();return new SuccessfulAccountResponse(_0x327dbe);}const _0x7c8f01=yield _0x3bf334['json']();return new FailedAccountResponse(_0x7c8f01);}catch(_0x71d9fc){if(_0x71d9fc instanceof Error)return new FailedAccountResponse({'detail':_0x71d9fc['message'],'title':_0x71d9fc['name'],'status':0x1f4,'instance':'','type':''});throw _0x71d9fc;}});}['getImage'](_0x153572,_0x2982d6){return __awaiter$8(this,void 0,void 0,function*(){const _0x438d56='account/image/'+_0x153572+'/',_0x3eba3f=yield this['fetch']['get'](_0x438d56,_0x2982d6);try{if(_0x3eba3f['status']>0xc7&&_0x3eba3f['status']<0x12c){const _0x1f2cad=yield _0x3eba3f['json']();return new SuccessfulAccountImageResponse(_0x1f2cad);}const _0x5b2b8b=yield _0x3eba3f['json']();return new FailedAccountImageResponse(_0x5b2b8b);}catch(_0x334099){if(_0x334099 instanceof Error)return new FailedAccountImageResponse({'detail':_0x334099['message'],'title':_0x334099['name'],'status':0x1f4,'instance':'','type':''});throw _0x334099;}});}}
|
|
4
4
|
|
|
5
|
-
var __awaiter$7=undefined&&undefined['__awaiter']||function(
|
|
5
|
+
var __awaiter$7=undefined&&undefined['__awaiter']||function(_0xbbd90f,_0x88a033,_0x21bcbb,_0x49d064){function _0x3fe04a(_0x25d26a){return _0x25d26a instanceof _0x21bcbb?_0x25d26a:new _0x21bcbb(function(_0x36ac38){_0x36ac38(_0x25d26a);});}return new(_0x21bcbb||(_0x21bcbb=Promise))(function(_0x4408de,_0x38a112){function _0x873c0e(_0x32c602){try{_0x50206a(_0x49d064['next'](_0x32c602));}catch(_0xb55353){_0x38a112(_0xb55353);}}function _0x3af2dd(_0x1e209a){try{_0x50206a(_0x49d064['throw'](_0x1e209a));}catch(_0x22a108){_0x38a112(_0x22a108);}}function _0x50206a(_0x52e45d){_0x52e45d['done']?_0x4408de(_0x52e45d['value']):_0x3fe04a(_0x52e45d['value'])['then'](_0x873c0e,_0x3af2dd);}_0x50206a((_0x49d064=_0x49d064['apply'](_0xbbd90f,_0x88a033||[]))['next']());});};class ApiKeyService{constructor(_0x396688){this['fetch']=_0x396688,this['path']='api-key';}['create'](_0x5d838d,_0x3aa8af,_0x5cc273){return __awaiter$7(this,void 0,void 0,function*(){const _0x44da58={'account_name':_0x5d838d,'api_key_name':_0x3aa8af};try{const _0x37b796=yield this['fetch']['post'](this['path'],_0x5cc273,_0x44da58);if(_0x37b796['status']>0xc7&&_0x37b796['status']<0x12c){const _0x213f50=yield _0x37b796['json']();return new SuccessfulApiKeyResponse(_0x213f50);}const _0x28f16b=yield _0x37b796['json']();return new FailedApiKeyResponse(_0x28f16b);}catch(_0x93dd31){if(_0x93dd31 instanceof Error)return new FailedApiKeyResponse({'detail':_0x93dd31['message'],'title':_0x93dd31['name'],'status':0x1f4,'instance':'','type':''});throw _0x93dd31;}});}['view'](_0x356ef4,_0xdf0b85,_0x5452f4){return __awaiter$7(this,void 0,void 0,function*(){const _0x5e773a=this['path']+'/'+_0x356ef4+'/'+_0xdf0b85;try{const _0x157044=yield this['fetch']['get'](_0x5e773a,_0x5452f4);if(_0x157044['status']>0xc7&&_0x157044['status']<0x12c){const _0x486242=yield _0x157044['json']();return new SuccessfulApiKeyValueResponse(_0x486242);}const _0x57e30f=yield _0x157044['json']();return new FailedApiKeyValueResponse(_0x57e30f);}catch(_0x47c76b){if(_0x47c76b instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x47c76b['message'],'title':_0x47c76b['name'],'status':0x1f4,'instance':'','type':''});throw _0x47c76b;}});}['delete'](_0x2ad91a,_0xccd035,_0x45e33d){return __awaiter$7(this,void 0,void 0,function*(){const _0x42adeb=this['path']+'/'+_0x2ad91a+'/'+_0xccd035;try{const _0x3747b8=yield this['fetch']['delete'](_0x42adeb,_0x45e33d);if(_0x3747b8['status']>0xc7&&_0x3747b8['status']<0x12c)return new SuccessfulResponse({});const _0x30db86=yield _0x3747b8['json']();return new FailedResponse(_0x30db86);}catch(_0x40a9c6){if(_0x40a9c6 instanceof Error)return new FailedResponse({'detail':_0x40a9c6['message'],'title':_0x40a9c6['name'],'status':0x1f4,'instance':'','type':''});throw _0x40a9c6;}});}}
|
|
6
6
|
|
|
7
|
-
var __awaiter$6=undefined&&undefined['__awaiter']||function(
|
|
7
|
+
var __awaiter$6=undefined&&undefined['__awaiter']||function(_0x2312c5,_0xa0c144,_0x3de07d,_0x53c653){function _0x323de7(_0x362623){return _0x362623 instanceof _0x3de07d?_0x362623:new _0x3de07d(function(_0x52d0af){_0x52d0af(_0x362623);});}return new(_0x3de07d||(_0x3de07d=Promise))(function(_0x2f0889,_0x5ebfea){function _0x2ef487(_0x382187){try{_0x45e97b(_0x53c653['next'](_0x382187));}catch(_0x4adb51){_0x5ebfea(_0x4adb51);}}function _0x5aaf23(_0x14e4c6){try{_0x45e97b(_0x53c653['throw'](_0x14e4c6));}catch(_0x297d56){_0x5ebfea(_0x297d56);}}function _0x45e97b(_0x33fe99){_0x33fe99['done']?_0x2f0889(_0x33fe99['value']):_0x323de7(_0x33fe99['value'])['then'](_0x2ef487,_0x5aaf23);}_0x45e97b((_0x53c653=_0x53c653['apply'](_0x2312c5,_0xa0c144||[]))['next']());});};class ListService{constructor(_0x525dab){this['fetch']=_0x525dab;}['create'](_0x41ba0d,_0x4492f2,_0x34c432,_0x43cf32){return __awaiter$6(this,void 0,void 0,function*(){const _0x4d2ac1='List',_0x16b7ce={'account_name':_0x41ba0d,'list_name':_0x4492f2,'search_service_name':_0x34c432};try{const _0x1b4438=yield this['fetch']['post'](_0x4d2ac1,_0x43cf32,_0x16b7ce);if(_0x1b4438['status']>0xc7&&_0x1b4438['status']<0x12c){const _0x15f930=yield _0x1b4438['json']();return new SuccessfulListIdentityResponse(_0x15f930);}const _0x131414=yield _0x1b4438['json']();return new FailedListIdentityResponse(_0x131414);}catch(_0x21441f){if(_0x21441f instanceof Error)return new FailedListIdentityResponse({'detail':_0x21441f['message'],'title':_0x21441f['name'],'status':0x1f4,'instance':'','type':''});throw _0x21441f;}});}['delete'](_0x58bbb1,_0x5ba929,_0x222b8a){return __awaiter$6(this,void 0,void 0,function*(){const _0x7b8b4a='List/'+_0x58bbb1+'/'+_0x5ba929,_0x45e477=yield this['fetch']['delete'](_0x7b8b4a,_0x222b8a);try{if(_0x45e477['status']>0xc7&&_0x45e477['status']<0x12c)return new SuccessfulResponse({});const _0x17477d=yield _0x45e477['json']();return new FailedResponse(_0x17477d);}catch(_0x17c0e8){if(_0x17c0e8 instanceof Error)return new FailedResponse({'detail':_0x17c0e8['message'],'title':_0x17c0e8['name'],'status':0x1f4,'instance':'','type':''});throw _0x17c0e8;}});}['get'](_0x321028,_0x22d002,_0x4cf4fc){return __awaiter$6(this,void 0,void 0,function*(){const _0x56d79a='List/'+_0x321028+'/'+_0x22d002;try{const _0x5e7f60=yield this['fetch']['get'](_0x56d79a,_0x4cf4fc);if(_0x5e7f60['status']>0xc7&&_0x5e7f60['status']<0x12c){const _0xe005e=yield _0x5e7f60['json']();return new SuccessfulListResponse(_0xe005e);}const _0x5242aa=yield _0x5e7f60['json']();return new FailedListResponse(_0x5242aa);}catch(_0x3ac77f){if(_0x3ac77f instanceof Error)return new FailedListResponse({'detail':_0x3ac77f['message'],'title':_0x3ac77f['name'],'status':0x1f4,'instance':'','type':''});throw _0x3ac77f;}});}}
|
|
8
8
|
|
|
9
|
-
var __awaiter$5=undefined&&undefined['__awaiter']||function(
|
|
9
|
+
var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x5777cd,_0x714566,_0x312db3,_0x45eaec){function _0x75a6f7(_0x3c3558){return _0x3c3558 instanceof _0x312db3?_0x3c3558:new _0x312db3(function(_0x4b6aea){_0x4b6aea(_0x3c3558);});}return new(_0x312db3||(_0x312db3=Promise))(function(_0x40b661,_0x2ff547){function _0x4b4da9(_0x2bbf55){try{_0x383031(_0x45eaec['next'](_0x2bbf55));}catch(_0x4f7219){_0x2ff547(_0x4f7219);}}function _0x2fbff9(_0x471b8f){try{_0x383031(_0x45eaec['throw'](_0x471b8f));}catch(_0x5c4d49){_0x2ff547(_0x5c4d49);}}function _0x383031(_0x322a74){_0x322a74['done']?_0x40b661(_0x322a74['value']):_0x75a6f7(_0x322a74['value'])['then'](_0x4b4da9,_0x2fbff9);}_0x383031((_0x45eaec=_0x45eaec['apply'](_0x5777cd,_0x714566||[]))['next']());});};class Fetch{constructor(_0x4a6fc2){this['baseUri']=_0x4a6fc2,this['getUrl']=_0x272586=>{return _0x272586['startsWith']('/')&&(_0x272586=_0x272586['replace']('/','')),''+this['baseUri']+_0x272586;},!_0x4a6fc2['endsWith']('/')&&(_0x4a6fc2=_0x4a6fc2+'/');}['get'](_0x445c0d,_0xacc7a7){return __awaiter$5(this,void 0,void 0,function*(){const _0x3229f2=this['getUrl'](_0x445c0d);return yield fetch(_0x3229f2,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0xacc7a7}});});}['post'](_0x320411,_0x3adae3,_0x5d445d){return __awaiter$5(this,void 0,void 0,function*(){const _0x1112ff=this['getUrl'](_0x320411);return yield fetch(_0x1112ff,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3adae3},'body':_0x5d445d?JSON['stringify'](_0x5d445d):null});});}['PostNoAuth'](_0x2bd7e5,_0x112e57){return __awaiter$5(this,void 0,void 0,function*(){const _0x5cdd3a=this['getUrl'](_0x2bd7e5);return yield fetch(_0x5cdd3a,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0x112e57?JSON['stringify'](_0x112e57):null});});}['put'](_0x43a3c0,_0x106615,_0x20fb14){return __awaiter$5(this,void 0,void 0,function*(){const _0x2e5186=this['getUrl'](_0x43a3c0);return yield fetch(_0x2e5186,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x106615},'body':_0x20fb14?JSON['stringify'](_0x20fb14):null});});}['delete'](_0x25a446,_0x50fc20){return __awaiter$5(this,void 0,void 0,function*(){const _0x36644a=this['getUrl'](_0x25a446);return yield fetch(_0x36644a,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x50fc20}});});}}
|
|
10
10
|
|
|
11
|
-
var __awaiter$4=undefined&&undefined['__awaiter']||function(
|
|
11
|
+
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x136f7e,_0x250c50,_0xb85f51,_0x42a548){function _0x24c5a1(_0x11235d){return _0x11235d instanceof _0xb85f51?_0x11235d:new _0xb85f51(function(_0x3f9de9){_0x3f9de9(_0x11235d);});}return new(_0xb85f51||(_0xb85f51=Promise))(function(_0x51cd13,_0x57a44f){function _0x285db0(_0x2415e6){try{_0x4e699a(_0x42a548['next'](_0x2415e6));}catch(_0x5d4bb7){_0x57a44f(_0x5d4bb7);}}function _0x4e415d(_0x4dcbe7){try{_0x4e699a(_0x42a548['throw'](_0x4dcbe7));}catch(_0x59835d){_0x57a44f(_0x59835d);}}function _0x4e699a(_0x5beabc){_0x5beabc['done']?_0x51cd13(_0x5beabc['value']):_0x24c5a1(_0x5beabc['value'])['then'](_0x285db0,_0x4e415d);}_0x4e699a((_0x42a548=_0x42a548['apply'](_0x136f7e,_0x250c50||[]))['next']());});};class SearchServersService{constructor(_0x2bd9d4){this['fetch']=_0x2bd9d4,this['path']='search-services';}['create'](_0x52cb1c,_0x27918f,_0x5f2a80,_0xc8c95b,_0x277f38,_0xb1144f,_0x4b9b82,_0x173b8b){return __awaiter$4(this,void 0,void 0,function*(){const _0x55e387={'account_name':_0x52cb1c,'search_service_name':_0x27918f,'endpoint':_0x5f2a80,'key':_0xc8c95b,'country':_0x277f38,'provider':_0xb1144f,'index_name':_0x4b9b82};try{const _0x2c4c2f=yield this['fetch']['post'](this['path'],_0x173b8b,_0x55e387);if(_0x2c4c2f['status']>0xc7&&_0x2c4c2f['status']<0x12c){const _0x3f220d=yield _0x2c4c2f['json']();return new SuccessfulSearchServiceResponse(_0x3f220d);}const _0x2e46f1=yield _0x2c4c2f['json']();return new FailedSearchServiceResponse(_0x2e46f1);}catch(_0x497599){if(_0x497599 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x497599['message'],'title':_0x497599['name'],'status':0x1f4,'instance':'','type':''});throw _0x497599;}});}['delete'](_0x26abfc,_0x382553,_0x17b9e2){return __awaiter$4(this,void 0,void 0,function*(){const _0x48d09d=this['path']+'/'+_0x26abfc+'/'+_0x382553;try{const _0x42ebcc=yield this['fetch']['delete'](_0x48d09d,_0x17b9e2);if(_0x42ebcc['status']>0xc7&&_0x42ebcc['status']<0x12c)return new SuccessfulResponse({});const _0x4573e2=yield _0x42ebcc['json']();return new FailedResponse(_0x4573e2);}catch(_0x1ef1ff){if(_0x1ef1ff instanceof Error)return new FailedResponse({'detail':_0x1ef1ff['message'],'title':_0x1ef1ff['name'],'status':0x1f4,'instance':'','type':''});throw _0x1ef1ff;}});}['view'](_0x7225e8,_0x107e80,_0x4159fe){return __awaiter$4(this,void 0,void 0,function*(){const _0x1367e7=this['path']+'/'+_0x7225e8+'/'+_0x107e80;try{const _0x3bc426=yield this['fetch']['get'](_0x1367e7,_0x4159fe);if(_0x3bc426['status']>0xc7&&_0x3bc426['status']<0x12c){const _0x531e3a=yield _0x3bc426['json']();return new SuccessfulViewSearchServiceResponse(_0x531e3a);}const _0x26721a=yield _0x3bc426['json']();return new FailedViewSearchServiceResponse(_0x26721a);}catch(_0x171e9b){if(_0x171e9b instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x171e9b['message'],'title':_0x171e9b['name'],'status':0x1f4,'instance':'','type':''});throw _0x171e9b;}});}['edit'](_0x40e37d,_0x13ae66,_0x30831a,_0x2b9658,_0x5e2929,_0xa886d8){return __awaiter$4(this,void 0,void 0,function*(){const _0x385e94={'account_name':_0x40e37d,'search_service_name':_0x13ae66,'new_search_service_name':_0x30831a,'key':_0x2b9658,'country':_0x5e2929};try{const _0xb7b73f=yield this['fetch']['put'](this['path'],_0xa886d8,_0x385e94);if(_0xb7b73f['status']>0xc7&&_0xb7b73f['status']<0x12c){const _0x37fcd3=yield _0xb7b73f['json']();return new SuccessfulSearchServiceResponse(_0x37fcd3);}const _0x2262dc=yield _0xb7b73f['json']();return new FailedSearchServiceResponse(_0x2262dc);}catch(_0x11fba0){if(_0x11fba0 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x11fba0['message'],'title':_0x11fba0['name'],'status':0x1f4,'instance':'','type':''});throw _0x11fba0;}});}['list'](_0x529c2a,_0x37a50d){return __awaiter$4(this,void 0,void 0,function*(){const _0x4ce525=this['path']+'/'+_0x529c2a;try{const _0x392228=yield this['fetch']['get'](_0x4ce525,_0x37a50d);if(_0x392228['status']>0xc7&&_0x392228['status']<0x12c){const _0x54efaf=yield _0x392228['json']();return new SuccessfulListSearchServiceResponse(_0x54efaf);}const _0x49fbfd=yield _0x392228['json']();return new FailedViewSearchServicesResponse(_0x49fbfd);}catch(_0x124a5f){if(_0x124a5f instanceof Error)return new FailedViewSearchServicesResponse({'detail':_0x124a5f['message'],'title':_0x124a5f['name'],'status':0x1f4,'instance':'','type':''});throw _0x124a5f;}});}}
|
|
12
12
|
|
|
13
|
-
var __awaiter$3=undefined&&undefined['__awaiter']||function(
|
|
13
|
+
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x1248ef,_0x4a048d,_0x2939d0,_0x278207){function _0xcca5ee(_0x4512f7){return _0x4512f7 instanceof _0x2939d0?_0x4512f7:new _0x2939d0(function(_0x4aa243){_0x4aa243(_0x4512f7);});}return new(_0x2939d0||(_0x2939d0=Promise))(function(_0x2ca6ac,_0x32654e){function _0x5ac090(_0x3e4502){try{_0x215463(_0x278207['next'](_0x3e4502));}catch(_0x454f8c){_0x32654e(_0x454f8c);}}function _0x4225ba(_0x5a2c42){try{_0x215463(_0x278207['throw'](_0x5a2c42));}catch(_0x232baa){_0x32654e(_0x232baa);}}function _0x215463(_0x88e01d){_0x88e01d['done']?_0x2ca6ac(_0x88e01d['value']):_0xcca5ee(_0x88e01d['value'])['then'](_0x5ac090,_0x4225ba);}_0x215463((_0x278207=_0x278207['apply'](_0x1248ef,_0x4a048d||[]))['next']());});};class FacetService{constructor(_0x3874c3){this['fetch']=_0x3874c3,this['path']='facet';}['create'](_0x31358c,_0x19262e,_0x56b903,_0x20a033){return __awaiter$3(this,void 0,void 0,function*(){const _0x113439={'account_name':_0x31358c,'list_name':_0x19262e,'facet_name':_0x56b903};try{const _0x4101ae=yield this['fetch']['post'](this['path'],_0x20a033,_0x113439);if(_0x4101ae['status']>0xc7&&_0x4101ae['status']<0x12c){const _0x17939c=yield _0x4101ae['json']();return new SuccessfulFacetResponse(_0x17939c);}const _0x1034be=yield _0x4101ae['json']();return new FailedFacetResponse(_0x1034be);}catch(_0x516c64){if(_0x516c64 instanceof Error)return new FailedFacetResponse({'detail':_0x516c64['message'],'title':_0x516c64['name'],'status':0x1f4,'instance':'','type':''});throw _0x516c64;}});}['remove'](_0x8230db,_0x2d8a65,_0x332757,_0x2e2496){return __awaiter$3(this,void 0,void 0,function*(){const _0x22ca21='Facet/'+_0x8230db+'/'+_0x2d8a65+'/'+_0x332757,_0x40f8c0=yield this['fetch']['delete'](_0x22ca21,_0x2e2496);try{if(_0x40f8c0['status']>0xc7&&_0x40f8c0['status']<0x12c)return new SuccessfulResponse({});const _0x238d7=yield _0x40f8c0['json']();return new FailedResponse(_0x238d7);}catch(_0x4053d2){if(_0x4053d2 instanceof Error)return new FailedResponse({'detail':_0x4053d2['message'],'title':_0x4053d2['name'],'status':0x1f4,'instance':'','type':''});throw _0x4053d2;}});}['rename'](_0x557dc7,_0x49cfae,_0x60e65d,_0x466935,_0x35e663){return __awaiter$3(this,void 0,void 0,function*(){const _0x56fbb4={'account_name':_0x557dc7,'list_name':_0x49cfae,'facet_name':_0x60e65d,'new_facet_name':_0x466935};try{const _0x473d4a=yield this['fetch']['put'](this['path'],_0x35e663,_0x56fbb4);if(_0x473d4a['status']>0xc7&&_0x473d4a['status']<0x12c){const _0x2f0fd8=yield _0x473d4a['json']();return new SuccessfulFacetResponse(_0x2f0fd8);}const _0x48c18b=yield _0x473d4a['json']();return new FailedFacetResponse(_0x48c18b);}catch(_0x5c9e77){if(_0x5c9e77 instanceof Error)return new FailedFacetResponse({'detail':_0x5c9e77['message'],'title':_0x5c9e77['name'],'status':0x1f4,'instance':'','type':''});throw _0x5c9e77;}});}}
|
|
14
14
|
|
|
15
|
-
var __awaiter$2=undefined&&undefined['__awaiter']||function(
|
|
15
|
+
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x1ca19a,_0x1c0b58,_0x3fdad9,_0x39e6e8){function _0x4e73b6(_0x531f9e){return _0x531f9e instanceof _0x3fdad9?_0x531f9e:new _0x3fdad9(function(_0x13fb1d){_0x13fb1d(_0x531f9e);});}return new(_0x3fdad9||(_0x3fdad9=Promise))(function(_0x576a9e,_0x55a29e){function _0x275831(_0x362977){try{_0x16965f(_0x39e6e8['next'](_0x362977));}catch(_0x3da10d){_0x55a29e(_0x3da10d);}}function _0x57c7e6(_0x566a25){try{_0x16965f(_0x39e6e8['throw'](_0x566a25));}catch(_0x353d03){_0x55a29e(_0x353d03);}}function _0x16965f(_0x3009be){_0x3009be['done']?_0x576a9e(_0x3009be['value']):_0x4e73b6(_0x3009be['value'])['then'](_0x275831,_0x57c7e6);}_0x16965f((_0x39e6e8=_0x39e6e8['apply'](_0x1ca19a,_0x1c0b58||[]))['next']());});};class SearchResultService{constructor(_0x1cdc4e){this['fetch']=_0x1cdc4e,this['path']='search-result';}['create'](_0x4363a3,_0x6758f8,_0x1fbf0d,_0x2dbc14,_0xb64da4){return __awaiter$2(this,void 0,void 0,function*(){_0xb64da4=_0xb64da4!==null&&_0xb64da4!==void 0?_0xb64da4:{'description':'','keywords':'','resource_1':'','resource_2':'','resource_3':'','latitude':0x0,'longitude':0x0,'facets':[]};const _0x4a7a6b=Object['assign']({'account_name':_0x4363a3,'search_result_name':_0x1fbf0d,'list_name':_0x6758f8},_0xb64da4);try{const _0x152133=yield this['fetch']['post'](this['path'],_0x2dbc14,_0x4a7a6b);if(_0x152133['status']>0xc7&&_0x152133['status']<0x12c){const _0x5b8854=yield _0x152133['json']();return new SuccessfulViewSearchResultResponse(_0x5b8854);}const _0xce1b9c=yield _0x152133['json']();return new FailedSearchResultResponse(_0xce1b9c);}catch(_0x2ffba8){if(_0x2ffba8 instanceof Error)return new FailedSearchResultResponse({'detail':_0x2ffba8['message'],'title':_0x2ffba8['name'],'status':0x1f4,'instance':'','type':''});throw _0x2ffba8;}});}}
|
|
16
16
|
|
|
17
|
-
var __awaiter$1=undefined&&undefined['__awaiter']||function(
|
|
17
|
+
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x581594,_0x40f6b1,_0x5625bf,_0x366b4b){function _0x503a73(_0x5af2a4){return _0x5af2a4 instanceof _0x5625bf?_0x5af2a4:new _0x5625bf(function(_0x567cd8){_0x567cd8(_0x5af2a4);});}return new(_0x5625bf||(_0x5625bf=Promise))(function(_0x507561,_0x117c9f){function _0x2479f5(_0x14aa8f){try{_0x54392c(_0x366b4b['next'](_0x14aa8f));}catch(_0x59dfbf){_0x117c9f(_0x59dfbf);}}function _0x5eb6d7(_0x399579){try{_0x54392c(_0x366b4b['throw'](_0x399579));}catch(_0x950070){_0x117c9f(_0x950070);}}function _0x54392c(_0x29eacf){_0x29eacf['done']?_0x507561(_0x29eacf['value']):_0x503a73(_0x29eacf['value'])['then'](_0x2479f5,_0x5eb6d7);}_0x54392c((_0x366b4b=_0x366b4b['apply'](_0x581594,_0x40f6b1||[]))['next']());});};class ContributorService{constructor(_0x41b3be){this['fetch']=_0x41b3be,this['path']='contributor';}['create'](_0x481c6e,_0x3892f7,_0x2d90b9,_0x13a996){return __awaiter$1(this,void 0,void 0,function*(){const _0x1f3896={'account_name':_0x481c6e,'list_name':_0x3892f7,'contributor_name':_0x2d90b9};try{const _0x4a2960=yield this['fetch']['post'](this['path'],_0x13a996,_0x1f3896);if(_0x4a2960['status']>0xc7&&_0x4a2960['status']<0x12c){const _0x6d8f39=yield _0x4a2960['json']();return new SuccessfulContributorResponse(_0x6d8f39);}const _0xc0610d=yield _0x4a2960['json']();return new FailedContributorResponse(_0xc0610d);}catch(_0x2e651e){if(_0x2e651e instanceof Error)return new FailedContributorResponse({'detail':_0x2e651e['message'],'title':_0x2e651e['name'],'status':0x1f4,'instance':'','type':''});throw _0x2e651e;}});}['remove'](_0x4731ee,_0x4079e1,_0x2206df,_0x486783){return __awaiter$1(this,void 0,void 0,function*(){const _0x541104=this['path']+'/'+_0x4731ee+'/'+_0x4079e1+'/'+_0x2206df,_0x5634c0=yield this['fetch']['delete'](_0x541104,_0x486783);try{if(_0x5634c0['status']>0xc7&&_0x5634c0['status']<0x12c)return new SuccessfulResponse({});const _0x578055=yield _0x5634c0['json']();return new FailedResponse(_0x578055);}catch(_0x7a86a4){if(_0x7a86a4 instanceof Error)return new FailedResponse({'detail':_0x7a86a4['message'],'title':_0x7a86a4['name'],'status':0x1f4,'instance':'','type':''});throw _0x7a86a4;}});}['startsWith'](_0x527ce6,_0x2b71dc){return __awaiter$1(this,void 0,void 0,function*(){const _0xf0d5a8=this['path']+'/'+_0x527ce6;try{const _0x4dc369=yield this['fetch']['get'](_0xf0d5a8,_0x2b71dc);if(_0x4dc369['status']>0xc7&&_0x4dc369['status']<0x12c){const _0x228829=yield _0x4dc369['json']();return new SuccessfulAccountAndImageResponse(_0x228829);}const _0x592965=yield _0x4dc369['json']();return new FailedAccountAndImageResponse(_0x592965);}catch(_0x1059f1){if(_0x1059f1 instanceof Error)return new FailedAccountAndImageResponse({'detail':_0x1059f1['message'],'title':_0x1059f1['name'],'status':0x1f4,'instance':'','type':''});throw _0x1059f1;}});}}
|
|
18
18
|
|
|
19
|
-
var __awaiter=undefined&&undefined['__awaiter']||function(
|
|
19
|
+
var __awaiter=undefined&&undefined['__awaiter']||function(_0x5a2743,_0x92affa,_0x1659cf,_0x34f4e2){function _0x160770(_0x46130d){return _0x46130d instanceof _0x1659cf?_0x46130d:new _0x1659cf(function(_0x558eb4){_0x558eb4(_0x46130d);});}return new(_0x1659cf||(_0x1659cf=Promise))(function(_0x1a10f0,_0x5dbdd6){function _0x2f9f22(_0x772fbf){try{_0xfe5bb3(_0x34f4e2['next'](_0x772fbf));}catch(_0x3fa837){_0x5dbdd6(_0x3fa837);}}function _0x455785(_0x3d0fc6){try{_0xfe5bb3(_0x34f4e2['throw'](_0x3d0fc6));}catch(_0x4f0b8b){_0x5dbdd6(_0x4f0b8b);}}function _0xfe5bb3(_0x4a3f4e){_0x4a3f4e['done']?_0x1a10f0(_0x4a3f4e['value']):_0x160770(_0x4a3f4e['value'])['then'](_0x2f9f22,_0x455785);}_0xfe5bb3((_0x34f4e2=_0x34f4e2['apply'](_0x5a2743,_0x92affa||[]))['next']());});};class AdminClient{constructor(_0x57a11d='https://admin.searchability.dev/'){var _0x1ac0dc=new Fetch(_0x57a11d);this['Accounts']=new AccountService(_0x1ac0dc),this['Lists']=new ListService(_0x1ac0dc),this['ApiKeys']=new ApiKeyService(_0x1ac0dc),this['SearchServers']=new SearchServersService(_0x1ac0dc),this['Facets']=new FacetService(_0x1ac0dc),this['SearchResults']=new SearchResultService(_0x1ac0dc),this['Contributors']=new ContributorService(_0x1ac0dc);}}class AuthClient{constructor(_0x1af997='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x1af997);}['login'](_0x3f6b9d){return __awaiter(this,void 0,void 0,function*(){const _0x21ce94='login/'+_0x3f6b9d;try{const _0x337dd0=yield yield fetch(_0x21ce94);if(_0x337dd0['status']>0xc7&&_0x337dd0['status']<0x12c){const _0xc6649d=yield _0x337dd0['json']();return new SuccessfulAuthResponse(_0xc6649d);}const _0x543b17=yield _0x337dd0['json']();return new FailedAuthResponse(_0x543b17);}catch(_0x50d6d9){if(_0x50d6d9 instanceof Error)return new FailedAuthResponse({'detail':_0x50d6d9['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x50d6d9;}});}['refresh'](_0x38c6d4){return __awaiter(this,void 0,void 0,function*(){const _0x24d2cf='refresh',_0x29b587={'refresh_token':_0x38c6d4};try{const _0x1df9e6=yield this['fetch']['PostNoAuth'](_0x24d2cf,_0x29b587);if(_0x1df9e6['status']>0xc7&&_0x1df9e6['status']<0x12c){const _0x541781=yield _0x1df9e6['json']();return new SuccessfulAuthResponse(_0x541781);}const _0x15922c=yield _0x1df9e6['json']();return new FailedAuthResponse(_0x15922c);}catch(_0x24f1d4){if(_0x24f1d4 instanceof Error)return new FailedAuthResponse({'detail':_0x24f1d4['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x24f1d4;}});}['getTokenStatus'](_0x24d13b){if(Date['now']()<_0x24d13b['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x24d13b['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
|
|
20
20
|
|
|
21
21
|
export { AdminClient, AuthClient, TokenStatus, Tokens };
|
package/dist/types.d.ts
CHANGED
|
@@ -66,7 +66,7 @@ declare class ContributorService {
|
|
|
66
66
|
constructor(fetch: Fetch);
|
|
67
67
|
create(account_name: string, list_name: string, contributor_name: string, access_token: string): Promise<Response<Contributor, Problem>>;
|
|
68
68
|
remove(account_name: string, list_name: string, contributor_name: string, access_token: string): Promise<Response<any, Problem>>;
|
|
69
|
-
startsWith(account_name: string, access_token: string): Promise<Response<AccountAndImage, Problem>>;
|
|
69
|
+
startsWith(account_name: string, access_token: string): Promise<Response<AccountAndImage[], Problem>>;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
declare class AdminClient {
|
|
@@ -118,6 +118,7 @@ type ListIdentity = {
|
|
|
118
118
|
type List = ListIdentity & {
|
|
119
119
|
facets: Facet[];
|
|
120
120
|
contributors: Contributor[];
|
|
121
|
+
search_result_count: number;
|
|
121
122
|
};
|
|
122
123
|
type ApiKey = {
|
|
123
124
|
name: string;
|
|
@@ -208,16 +209,16 @@ declare class FailedContributorResponse extends Response<Contributor, Problem> {
|
|
|
208
209
|
toSuccess(): Contributor;
|
|
209
210
|
toProblem(): Problem;
|
|
210
211
|
}
|
|
211
|
-
declare class SuccessfulAccountAndImageResponse extends Response<AccountAndImage, Problem> {
|
|
212
|
-
readonly
|
|
213
|
-
constructor(
|
|
214
|
-
toSuccess(): AccountAndImage;
|
|
212
|
+
declare class SuccessfulAccountAndImageResponse extends Response<AccountAndImage[], Problem> {
|
|
213
|
+
readonly accountAndImages: AccountAndImage[];
|
|
214
|
+
constructor(accountAndImages: AccountAndImage[]);
|
|
215
|
+
toSuccess(): AccountAndImage[];
|
|
215
216
|
toProblem(): Problem;
|
|
216
217
|
}
|
|
217
|
-
declare class FailedAccountAndImageResponse extends Response<AccountAndImage, Problem> {
|
|
218
|
+
declare class FailedAccountAndImageResponse extends Response<AccountAndImage[], Problem> {
|
|
218
219
|
readonly problem: Problem;
|
|
219
220
|
constructor(problem: Problem);
|
|
220
|
-
toSuccess(): AccountAndImage;
|
|
221
|
+
toSuccess(): AccountAndImage[];
|
|
221
222
|
toProblem(): Problem;
|
|
222
223
|
}
|
|
223
224
|
declare class SuccessfulFacetResponse extends Response<Facet, Problem> {
|
package/package.json
CHANGED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
var TokenStatus;(function(_0x3f5b8c){_0x3f5b8c[_0x3f5b8c['Ok']=0x0]='Ok',_0x3f5b8c[_0x3f5b8c['Refresh']=0x1]='Refresh',_0x3f5b8c[_0x3f5b8c['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(_0x2c1f0f){this['isSuccess']=_0x2c1f0f;}}class SuccessfulContributorResponse extends Response{constructor(_0x165fd4){super(!![]),this['contributor']=_0x165fd4;}['toSuccess'](){return this['contributor'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedContributorResponse extends Response{constructor(_0x50fcab){super(![]),this['problem']=_0x50fcab;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountAndImageResponse extends Response{constructor(_0x494950){super(!![]),this['accountAndImage']=_0x494950;}['toSuccess'](){return this['accountAndImage'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountAndImageResponse extends Response{constructor(_0x33aea8){super(![]),this['problem']=_0x33aea8;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulFacetResponse extends Response{constructor(_0xf5faf8){super(!![]),this['facet']=_0xf5faf8;}['toSuccess'](){return this['facet'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetResponse extends Response{constructor(_0xc987d1){super(![]),this['problem']=_0xc987d1;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountResponse extends Response{constructor(_0x451bc8){super(!![]),this['account']=_0x451bc8;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountImageResponse extends Response{constructor(_0x59f339){super(!![]),this['accountImage']=_0x59f339;}['toSuccess'](){return this['accountImage'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListIdentityResponse extends Response{constructor(_0x170000){super(!![]),this['list']=_0x170000;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListResponse extends Response{constructor(_0x31d7f9){super(!![]),this['list']=_0x31d7f9;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x1e112d){super(![]),this['problem']=_0x1e112d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountImageResponse extends Response{constructor(_0x1a66b6){super(![]),this['problem']=_0x1a66b6;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListIdentityResponse extends Response{constructor(_0x503841){super(![]),this['problem']=_0x503841;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListResponse extends Response{constructor(_0x554d53){super(![]),this['problem']=_0x554d53;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x243e2b){super(!![]),this['tokens']=_0x243e2b;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x2f9209){super(![]),this['problem']=_0x2f9209;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x59ed7a){super(!![]),this['apiKey']=_0x59ed7a;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x5a08b5){super(![]),this['problem']=_0x5a08b5;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x147e32){super(!![]),this['searchService']=_0x147e32;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x4338a8){super(![]),this['problem']=_0x4338a8;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x47d299){super(!![]),this['searchService']=_0x47d299;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulViewSearchResultResponse extends Response{constructor(_0xe75036){super(!![]),this['searchResult']=_0xe75036;}['toSuccess'](){return this['searchResult'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchResultResponse extends Response{constructor(_0x2d912f){super(![]),this['problem']=_0x2d912f;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchServiceResponse extends Response{constructor(_0x5b7c35){super(!![]),this['searchServices']=_0x5b7c35;}['toSuccess'](){return this['searchServices'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServicesResponse extends Response{constructor(_0x51940c){super(![]),this['problem']=_0x51940c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedViewSearchServiceResponse extends Response{constructor(_0x5da491){super(![]),this['problem']=_0x5da491;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x3f4e28){super(!![]),this['apiKeyValue']=_0x3f4e28;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x517625){super(!![]),this['obj']=_0x517625;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x35d5cf){super(![]),this['problem']=_0x35d5cf;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x2a7fcf){super(![]),this['problem']=_0x2a7fcf;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
|
|
2
|
-
|
|
3
|
-
var __awaiter$8=undefined&&undefined['__awaiter']||function(_0x9b4826,_0x24700c,_0x27af9d,_0x3a9675){function _0x553753(_0x2fc315){return _0x2fc315 instanceof _0x27af9d?_0x2fc315:new _0x27af9d(function(_0x59f072){_0x59f072(_0x2fc315);});}return new(_0x27af9d||(_0x27af9d=Promise))(function(_0x5c1ca9,_0x5f2492){function _0x251c12(_0x53c798){try{_0x4f1cf3(_0x3a9675['next'](_0x53c798));}catch(_0x2e0c8e){_0x5f2492(_0x2e0c8e);}}function _0x4fd3ca(_0x1e64d1){try{_0x4f1cf3(_0x3a9675['throw'](_0x1e64d1));}catch(_0x232d6c){_0x5f2492(_0x232d6c);}}function _0x4f1cf3(_0x5c1843){_0x5c1843['done']?_0x5c1ca9(_0x5c1843['value']):_0x553753(_0x5c1843['value'])['then'](_0x251c12,_0x4fd3ca);}_0x4f1cf3((_0x3a9675=_0x3a9675['apply'](_0x9b4826,_0x24700c||[]))['next']());});};class AccountService{constructor(_0xbfd35c){this['fetch']=_0xbfd35c;}['get'](_0x7fdec3,_0xe391af){return __awaiter$8(this,void 0,void 0,function*(){const _0x366b5d='Account/'+_0x7fdec3+'/',_0x585c3d=yield this['fetch']['get'](_0x366b5d,_0xe391af);try{if(_0x585c3d['status']>0xc7&&_0x585c3d['status']<0x12c){const _0x561817=yield _0x585c3d['json']();return new SuccessfulAccountResponse(_0x561817);}const _0x4a3ca4=yield _0x585c3d['json']();return new FailedAccountResponse(_0x4a3ca4);}catch(_0x415296){if(_0x415296 instanceof Error)return new FailedAccountResponse({'detail':_0x415296['message'],'title':_0x415296['name'],'status':0x1f4,'instance':'','type':''});throw _0x415296;}});}['getImage'](_0x4a37c9,_0x58c337){return __awaiter$8(this,void 0,void 0,function*(){const _0x2525d6='account/image/'+_0x4a37c9+'/',_0x57c77d=yield this['fetch']['get'](_0x2525d6,_0x58c337);try{if(_0x57c77d['status']>0xc7&&_0x57c77d['status']<0x12c){const _0x116a93=yield _0x57c77d['json']();return new SuccessfulAccountImageResponse(_0x116a93);}const _0x555402=yield _0x57c77d['json']();return new FailedAccountImageResponse(_0x555402);}catch(_0x4f9227){if(_0x4f9227 instanceof Error)return new FailedAccountImageResponse({'detail':_0x4f9227['message'],'title':_0x4f9227['name'],'status':0x1f4,'instance':'','type':''});throw _0x4f9227;}});}}
|
|
4
|
-
|
|
5
|
-
var __awaiter$7=undefined&&undefined['__awaiter']||function(_0x83dbeb,_0x5ae552,_0x2c2518,_0x5dce51){function _0x4991db(_0x3f4a23){return _0x3f4a23 instanceof _0x2c2518?_0x3f4a23:new _0x2c2518(function(_0xb38040){_0xb38040(_0x3f4a23);});}return new(_0x2c2518||(_0x2c2518=Promise))(function(_0x3177ef,_0x1142f4){function _0x495269(_0x48b246){try{_0x5aad52(_0x5dce51['next'](_0x48b246));}catch(_0x1cf3da){_0x1142f4(_0x1cf3da);}}function _0x2e77ea(_0x5cc1a4){try{_0x5aad52(_0x5dce51['throw'](_0x5cc1a4));}catch(_0x3b42a0){_0x1142f4(_0x3b42a0);}}function _0x5aad52(_0x169db7){_0x169db7['done']?_0x3177ef(_0x169db7['value']):_0x4991db(_0x169db7['value'])['then'](_0x495269,_0x2e77ea);}_0x5aad52((_0x5dce51=_0x5dce51['apply'](_0x83dbeb,_0x5ae552||[]))['next']());});};class ApiKeyService{constructor(_0x4c1843){this['fetch']=_0x4c1843,this['path']='api-key';}['create'](_0x21c683,_0x254111,_0x570152){return __awaiter$7(this,void 0,void 0,function*(){const _0x31ef06={'account_name':_0x21c683,'api_key_name':_0x254111};try{const _0x5f45e9=yield this['fetch']['post'](this['path'],_0x570152,_0x31ef06);if(_0x5f45e9['status']>0xc7&&_0x5f45e9['status']<0x12c){const _0x4e2684=yield _0x5f45e9['json']();return new SuccessfulApiKeyResponse(_0x4e2684);}const _0x2e8bf9=yield _0x5f45e9['json']();return new FailedApiKeyResponse(_0x2e8bf9);}catch(_0x29a51c){if(_0x29a51c instanceof Error)return new FailedApiKeyResponse({'detail':_0x29a51c['message'],'title':_0x29a51c['name'],'status':0x1f4,'instance':'','type':''});throw _0x29a51c;}});}['view'](_0x2fceed,_0x48b05c,_0x52381e){return __awaiter$7(this,void 0,void 0,function*(){const _0x5cbc83=this['path']+'/'+_0x2fceed+'/'+_0x48b05c;try{const _0x1fe864=yield this['fetch']['get'](_0x5cbc83,_0x52381e);if(_0x1fe864['status']>0xc7&&_0x1fe864['status']<0x12c){const _0x2682e3=yield _0x1fe864['json']();return new SuccessfulApiKeyValueResponse(_0x2682e3);}const _0x50a1d8=yield _0x1fe864['json']();return new FailedApiKeyValueResponse(_0x50a1d8);}catch(_0x1b202a){if(_0x1b202a instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x1b202a['message'],'title':_0x1b202a['name'],'status':0x1f4,'instance':'','type':''});throw _0x1b202a;}});}['delete'](_0x1ef344,_0x25dea8,_0x4eed21){return __awaiter$7(this,void 0,void 0,function*(){const _0x18c1b3=this['path']+'/'+_0x1ef344+'/'+_0x25dea8;try{const _0x1ea1d7=yield this['fetch']['delete'](_0x18c1b3,_0x4eed21);if(_0x1ea1d7['status']>0xc7&&_0x1ea1d7['status']<0x12c)return new SuccessfulResponse({});const _0x420ed7=yield _0x1ea1d7['json']();return new FailedResponse(_0x420ed7);}catch(_0x492761){if(_0x492761 instanceof Error)return new FailedResponse({'detail':_0x492761['message'],'title':_0x492761['name'],'status':0x1f4,'instance':'','type':''});throw _0x492761;}});}}
|
|
6
|
-
|
|
7
|
-
var __awaiter$6=undefined&&undefined['__awaiter']||function(_0x4219d6,_0x3aa566,_0x50d1fe,_0x41f21b){function _0x3e2d8d(_0x825d01){return _0x825d01 instanceof _0x50d1fe?_0x825d01:new _0x50d1fe(function(_0x4f6085){_0x4f6085(_0x825d01);});}return new(_0x50d1fe||(_0x50d1fe=Promise))(function(_0x198080,_0x451ff2){function _0xa55f5a(_0xa10458){try{_0x44d372(_0x41f21b['next'](_0xa10458));}catch(_0x5ba15c){_0x451ff2(_0x5ba15c);}}function _0x48c028(_0x51cd72){try{_0x44d372(_0x41f21b['throw'](_0x51cd72));}catch(_0x3d393c){_0x451ff2(_0x3d393c);}}function _0x44d372(_0x3b6b09){_0x3b6b09['done']?_0x198080(_0x3b6b09['value']):_0x3e2d8d(_0x3b6b09['value'])['then'](_0xa55f5a,_0x48c028);}_0x44d372((_0x41f21b=_0x41f21b['apply'](_0x4219d6,_0x3aa566||[]))['next']());});};class ListService{constructor(_0x2af2d6){this['fetch']=_0x2af2d6;}['create'](_0x2e43e4,_0x3a29c8,_0xf5cfb7,_0x1ab357){return __awaiter$6(this,void 0,void 0,function*(){const _0x30c39c='List',_0x3d7f54={'account_name':_0x2e43e4,'list_name':_0x3a29c8,'search_service_name':_0xf5cfb7};try{const _0x1f782e=yield this['fetch']['post'](_0x30c39c,_0x1ab357,_0x3d7f54);if(_0x1f782e['status']>0xc7&&_0x1f782e['status']<0x12c){const _0x4af020=yield _0x1f782e['json']();return new SuccessfulListIdentityResponse(_0x4af020);}const _0x363684=yield _0x1f782e['json']();return new FailedListIdentityResponse(_0x363684);}catch(_0x2fb821){if(_0x2fb821 instanceof Error)return new FailedListIdentityResponse({'detail':_0x2fb821['message'],'title':_0x2fb821['name'],'status':0x1f4,'instance':'','type':''});throw _0x2fb821;}});}['delete'](_0x5b51dd,_0x425b63,_0x3befe4){return __awaiter$6(this,void 0,void 0,function*(){const _0x3d5b32='List/'+_0x5b51dd+'/'+_0x425b63,_0x5429b1=yield this['fetch']['delete'](_0x3d5b32,_0x3befe4);try{if(_0x5429b1['status']>0xc7&&_0x5429b1['status']<0x12c)return new SuccessfulResponse({});const _0x2e782c=yield _0x5429b1['json']();return new FailedResponse(_0x2e782c);}catch(_0x3b70a9){if(_0x3b70a9 instanceof Error)return new FailedResponse({'detail':_0x3b70a9['message'],'title':_0x3b70a9['name'],'status':0x1f4,'instance':'','type':''});throw _0x3b70a9;}});}['get'](_0x470f7d,_0x4c48e3,_0x109fc0){return __awaiter$6(this,void 0,void 0,function*(){const _0x53bde6='List/'+_0x470f7d+'/'+_0x4c48e3;try{const _0x4d21ff=yield this['fetch']['get'](_0x53bde6,_0x109fc0);if(_0x4d21ff['status']>0xc7&&_0x4d21ff['status']<0x12c){const _0x212b71=yield _0x4d21ff['json']();return new SuccessfulListResponse(_0x212b71);}const _0x2a795b=yield _0x4d21ff['json']();return new FailedListResponse(_0x2a795b);}catch(_0x5ef497){if(_0x5ef497 instanceof Error)return new FailedListResponse({'detail':_0x5ef497['message'],'title':_0x5ef497['name'],'status':0x1f4,'instance':'','type':''});throw _0x5ef497;}});}}
|
|
8
|
-
|
|
9
|
-
var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x5a0c66,_0x32b88d,_0x242425,_0x339776){function _0x4c8b19(_0x360cb6){return _0x360cb6 instanceof _0x242425?_0x360cb6:new _0x242425(function(_0x3fe5e5){_0x3fe5e5(_0x360cb6);});}return new(_0x242425||(_0x242425=Promise))(function(_0xe018b8,_0x4e4e7a){function _0x142d2b(_0xe6ee14){try{_0x359129(_0x339776['next'](_0xe6ee14));}catch(_0x183b2f){_0x4e4e7a(_0x183b2f);}}function _0x5596da(_0xf02bd6){try{_0x359129(_0x339776['throw'](_0xf02bd6));}catch(_0x4301c7){_0x4e4e7a(_0x4301c7);}}function _0x359129(_0x4d2f25){_0x4d2f25['done']?_0xe018b8(_0x4d2f25['value']):_0x4c8b19(_0x4d2f25['value'])['then'](_0x142d2b,_0x5596da);}_0x359129((_0x339776=_0x339776['apply'](_0x5a0c66,_0x32b88d||[]))['next']());});};class Fetch{constructor(_0x2b10f1){this['baseUri']=_0x2b10f1,this['getUrl']=_0x3b2658=>{return _0x3b2658['startsWith']('/')&&(_0x3b2658=_0x3b2658['replace']('/','')),''+this['baseUri']+_0x3b2658;},!_0x2b10f1['endsWith']('/')&&(_0x2b10f1=_0x2b10f1+'/');}['get'](_0x217114,_0x1b2b7d){return __awaiter$5(this,void 0,void 0,function*(){const _0x1b8dd1=this['getUrl'](_0x217114);return yield fetch(_0x1b8dd1,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1b2b7d}});});}['post'](_0x39832d,_0x54725d,_0x499a4f){return __awaiter$5(this,void 0,void 0,function*(){const _0x39e4ca=this['getUrl'](_0x39832d);return yield fetch(_0x39e4ca,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x54725d},'body':_0x499a4f?JSON['stringify'](_0x499a4f):null});});}['PostNoAuth'](_0x539f63,_0x7c09c1){return __awaiter$5(this,void 0,void 0,function*(){const _0x19373a=this['getUrl'](_0x539f63);return yield fetch(_0x19373a,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0x7c09c1?JSON['stringify'](_0x7c09c1):null});});}['put'](_0x1af7e9,_0x25a92e,_0x14eca3){return __awaiter$5(this,void 0,void 0,function*(){const _0x455ec1=this['getUrl'](_0x1af7e9);return yield fetch(_0x455ec1,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x25a92e},'body':_0x14eca3?JSON['stringify'](_0x14eca3):null});});}['delete'](_0xbbd18c,_0x10761b){return __awaiter$5(this,void 0,void 0,function*(){const _0x340ae9=this['getUrl'](_0xbbd18c);return yield fetch(_0x340ae9,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x10761b}});});}}
|
|
10
|
-
|
|
11
|
-
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x2be2b9,_0x3adb94,_0x324ca5,_0xddff22){function _0x2fffd5(_0x1a76a6){return _0x1a76a6 instanceof _0x324ca5?_0x1a76a6:new _0x324ca5(function(_0xa6e860){_0xa6e860(_0x1a76a6);});}return new(_0x324ca5||(_0x324ca5=Promise))(function(_0x310e43,_0x3c211a){function _0x49bee8(_0x24e9fe){try{_0x19ae57(_0xddff22['next'](_0x24e9fe));}catch(_0x3964d6){_0x3c211a(_0x3964d6);}}function _0x21484c(_0x3f60e8){try{_0x19ae57(_0xddff22['throw'](_0x3f60e8));}catch(_0x51eb53){_0x3c211a(_0x51eb53);}}function _0x19ae57(_0x332229){_0x332229['done']?_0x310e43(_0x332229['value']):_0x2fffd5(_0x332229['value'])['then'](_0x49bee8,_0x21484c);}_0x19ae57((_0xddff22=_0xddff22['apply'](_0x2be2b9,_0x3adb94||[]))['next']());});};class SearchServersService{constructor(_0x55135f){this['fetch']=_0x55135f,this['path']='search-services';}['create'](_0x2427e1,_0x3c3b58,_0x30267a,_0x3e6edf,_0x2c9808,_0x49279a,_0x4c4770,_0x505e9b){return __awaiter$4(this,void 0,void 0,function*(){const _0x437d2c={'account_name':_0x2427e1,'search_service_name':_0x3c3b58,'endpoint':_0x30267a,'key':_0x3e6edf,'country':_0x2c9808,'provider':_0x49279a,'index_name':_0x4c4770};try{const _0x168f44=yield this['fetch']['post'](this['path'],_0x505e9b,_0x437d2c);if(_0x168f44['status']>0xc7&&_0x168f44['status']<0x12c){const _0x50c348=yield _0x168f44['json']();return new SuccessfulSearchServiceResponse(_0x50c348);}const _0x4a8d9f=yield _0x168f44['json']();return new FailedSearchServiceResponse(_0x4a8d9f);}catch(_0x5c195d){if(_0x5c195d instanceof Error)return new FailedSearchServiceResponse({'detail':_0x5c195d['message'],'title':_0x5c195d['name'],'status':0x1f4,'instance':'','type':''});throw _0x5c195d;}});}['delete'](_0x246cd5,_0x95cad9,_0x4da89d){return __awaiter$4(this,void 0,void 0,function*(){const _0x2b695e=this['path']+'/'+_0x246cd5+'/'+_0x95cad9;try{const _0x469760=yield this['fetch']['delete'](_0x2b695e,_0x4da89d);if(_0x469760['status']>0xc7&&_0x469760['status']<0x12c)return new SuccessfulResponse({});const _0x2f6a59=yield _0x469760['json']();return new FailedResponse(_0x2f6a59);}catch(_0x4051c6){if(_0x4051c6 instanceof Error)return new FailedResponse({'detail':_0x4051c6['message'],'title':_0x4051c6['name'],'status':0x1f4,'instance':'','type':''});throw _0x4051c6;}});}['view'](_0x34e7ce,_0x441b76,_0x34cbf5){return __awaiter$4(this,void 0,void 0,function*(){const _0x4acea7=this['path']+'/'+_0x34e7ce+'/'+_0x441b76;try{const _0x63f38b=yield this['fetch']['get'](_0x4acea7,_0x34cbf5);if(_0x63f38b['status']>0xc7&&_0x63f38b['status']<0x12c){const _0x5bf77a=yield _0x63f38b['json']();return new SuccessfulViewSearchServiceResponse(_0x5bf77a);}const _0x4c626=yield _0x63f38b['json']();return new FailedViewSearchServiceResponse(_0x4c626);}catch(_0xba1d4a){if(_0xba1d4a instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0xba1d4a['message'],'title':_0xba1d4a['name'],'status':0x1f4,'instance':'','type':''});throw _0xba1d4a;}});}['edit'](_0x57c56f,_0x31a16e,_0x1bd356,_0x378519,_0x272802,_0x5b1c3b){return __awaiter$4(this,void 0,void 0,function*(){const _0x3d9cb4={'account_name':_0x57c56f,'search_service_name':_0x31a16e,'new_search_service_name':_0x1bd356,'key':_0x378519,'country':_0x272802};try{const _0x42837d=yield this['fetch']['put'](this['path'],_0x5b1c3b,_0x3d9cb4);if(_0x42837d['status']>0xc7&&_0x42837d['status']<0x12c){const _0x16da17=yield _0x42837d['json']();return new SuccessfulSearchServiceResponse(_0x16da17);}const _0x5c7e1e=yield _0x42837d['json']();return new FailedSearchServiceResponse(_0x5c7e1e);}catch(_0x4723c0){if(_0x4723c0 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x4723c0['message'],'title':_0x4723c0['name'],'status':0x1f4,'instance':'','type':''});throw _0x4723c0;}});}['list'](_0x37b949,_0x37023f){return __awaiter$4(this,void 0,void 0,function*(){const _0x461125=this['path']+'/'+_0x37b949;try{const _0x3aae0c=yield this['fetch']['get'](_0x461125,_0x37023f);if(_0x3aae0c['status']>0xc7&&_0x3aae0c['status']<0x12c){const _0x598922=yield _0x3aae0c['json']();return new SuccessfulListSearchServiceResponse(_0x598922);}const _0x5c393b=yield _0x3aae0c['json']();return new FailedViewSearchServicesResponse(_0x5c393b);}catch(_0x3a5d04){if(_0x3a5d04 instanceof Error)return new FailedViewSearchServicesResponse({'detail':_0x3a5d04['message'],'title':_0x3a5d04['name'],'status':0x1f4,'instance':'','type':''});throw _0x3a5d04;}});}}
|
|
12
|
-
|
|
13
|
-
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x26bc10,_0x11d7dc,_0x3e33d,_0x37d287){function _0x259ba4(_0x2db57a){return _0x2db57a instanceof _0x3e33d?_0x2db57a:new _0x3e33d(function(_0x523830){_0x523830(_0x2db57a);});}return new(_0x3e33d||(_0x3e33d=Promise))(function(_0x386159,_0x543e58){function _0x5468f8(_0x57113d){try{_0x2221d1(_0x37d287['next'](_0x57113d));}catch(_0x19084f){_0x543e58(_0x19084f);}}function _0x22c136(_0x31304d){try{_0x2221d1(_0x37d287['throw'](_0x31304d));}catch(_0x418320){_0x543e58(_0x418320);}}function _0x2221d1(_0x1f78e4){_0x1f78e4['done']?_0x386159(_0x1f78e4['value']):_0x259ba4(_0x1f78e4['value'])['then'](_0x5468f8,_0x22c136);}_0x2221d1((_0x37d287=_0x37d287['apply'](_0x26bc10,_0x11d7dc||[]))['next']());});};class FacetService{constructor(_0x363385){this['fetch']=_0x363385,this['path']='facet';}['create'](_0x28fa63,_0x54b41a,_0x11ccf0,_0x28669b){return __awaiter$3(this,void 0,void 0,function*(){const _0x4cceb1={'account_name':_0x28fa63,'list_name':_0x54b41a,'facet_name':_0x11ccf0};try{const _0x22162a=yield this['fetch']['post'](this['path'],_0x28669b,_0x4cceb1);if(_0x22162a['status']>0xc7&&_0x22162a['status']<0x12c){const _0x19ac6a=yield _0x22162a['json']();return new SuccessfulFacetResponse(_0x19ac6a);}const _0x4ce54f=yield _0x22162a['json']();return new FailedFacetResponse(_0x4ce54f);}catch(_0x5d701a){if(_0x5d701a instanceof Error)return new FailedFacetResponse({'detail':_0x5d701a['message'],'title':_0x5d701a['name'],'status':0x1f4,'instance':'','type':''});throw _0x5d701a;}});}['remove'](_0x5176d4,_0x498d0d,_0x49fb6c,_0x178b2c){return __awaiter$3(this,void 0,void 0,function*(){const _0x29dd59='Facet/'+_0x5176d4+'/'+_0x498d0d+'/'+_0x49fb6c,_0x58671a=yield this['fetch']['delete'](_0x29dd59,_0x178b2c);try{if(_0x58671a['status']>0xc7&&_0x58671a['status']<0x12c)return new SuccessfulResponse({});const _0x276995=yield _0x58671a['json']();return new FailedResponse(_0x276995);}catch(_0x572ab5){if(_0x572ab5 instanceof Error)return new FailedResponse({'detail':_0x572ab5['message'],'title':_0x572ab5['name'],'status':0x1f4,'instance':'','type':''});throw _0x572ab5;}});}['rename'](_0x20f5e7,_0x99ea17,_0x9d6610,_0x3247f6,_0x1788f4){return __awaiter$3(this,void 0,void 0,function*(){const _0x3e1ef4={'account_name':_0x20f5e7,'list_name':_0x99ea17,'facet_name':_0x9d6610,'new_facet_name':_0x3247f6};try{const _0x5e13ab=yield this['fetch']['put'](this['path'],_0x1788f4,_0x3e1ef4);if(_0x5e13ab['status']>0xc7&&_0x5e13ab['status']<0x12c){const _0x40776d=yield _0x5e13ab['json']();return new SuccessfulFacetResponse(_0x40776d);}const _0x132e81=yield _0x5e13ab['json']();return new FailedFacetResponse(_0x132e81);}catch(_0x36f6df){if(_0x36f6df instanceof Error)return new FailedFacetResponse({'detail':_0x36f6df['message'],'title':_0x36f6df['name'],'status':0x1f4,'instance':'','type':''});throw _0x36f6df;}});}}
|
|
14
|
-
|
|
15
|
-
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x4eae09,_0x1d1a5f,_0x4a5028,_0x15abdc){function _0x36b486(_0x5a8e73){return _0x5a8e73 instanceof _0x4a5028?_0x5a8e73:new _0x4a5028(function(_0x535426){_0x535426(_0x5a8e73);});}return new(_0x4a5028||(_0x4a5028=Promise))(function(_0xd87c95,_0x20fd23){function _0x2d3431(_0x355e9a){try{_0x1b9212(_0x15abdc['next'](_0x355e9a));}catch(_0x4d8012){_0x20fd23(_0x4d8012);}}function _0x412b16(_0x567149){try{_0x1b9212(_0x15abdc['throw'](_0x567149));}catch(_0x2e5c5d){_0x20fd23(_0x2e5c5d);}}function _0x1b9212(_0x485c78){_0x485c78['done']?_0xd87c95(_0x485c78['value']):_0x36b486(_0x485c78['value'])['then'](_0x2d3431,_0x412b16);}_0x1b9212((_0x15abdc=_0x15abdc['apply'](_0x4eae09,_0x1d1a5f||[]))['next']());});};class SearchResultService{constructor(_0x2ebe73){this['fetch']=_0x2ebe73,this['path']='search-result';}['create'](_0x507f2e,_0x186c1b,_0x2a7802,_0x2a9365,_0x122306){return __awaiter$2(this,void 0,void 0,function*(){_0x122306=_0x122306!==null&&_0x122306!==void 0?_0x122306:{'description':'','keywords':'','resource_1':'','resource_2':'','resource_3':'','latitude':0x0,'longitude':0x0,'facets':[]};const _0x43f42e=Object['assign']({'account_name':_0x507f2e,'search_result_name':_0x2a7802,'list_name':_0x186c1b},_0x122306);try{const _0xecd89d=yield this['fetch']['post'](this['path'],_0x2a9365,_0x43f42e);if(_0xecd89d['status']>0xc7&&_0xecd89d['status']<0x12c){const _0x34722a=yield _0xecd89d['json']();return new SuccessfulViewSearchResultResponse(_0x34722a);}const _0x4b8233=yield _0xecd89d['json']();return new FailedSearchResultResponse(_0x4b8233);}catch(_0x33b5f7){if(_0x33b5f7 instanceof Error)return new FailedSearchResultResponse({'detail':_0x33b5f7['message'],'title':_0x33b5f7['name'],'status':0x1f4,'instance':'','type':''});throw _0x33b5f7;}});}}
|
|
16
|
-
|
|
17
|
-
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x5f57bd,_0x28d27b,_0x59c353,_0x4d3226){function _0x4eafc0(_0x2deea1){return _0x2deea1 instanceof _0x59c353?_0x2deea1:new _0x59c353(function(_0x508ea7){_0x508ea7(_0x2deea1);});}return new(_0x59c353||(_0x59c353=Promise))(function(_0x45ffe6,_0x135568){function _0x3263cb(_0x5c9906){try{_0x40eb3b(_0x4d3226['next'](_0x5c9906));}catch(_0x4db620){_0x135568(_0x4db620);}}function _0x530c9f(_0x7ea7f6){try{_0x40eb3b(_0x4d3226['throw'](_0x7ea7f6));}catch(_0x4a704a){_0x135568(_0x4a704a);}}function _0x40eb3b(_0x509ae3){_0x509ae3['done']?_0x45ffe6(_0x509ae3['value']):_0x4eafc0(_0x509ae3['value'])['then'](_0x3263cb,_0x530c9f);}_0x40eb3b((_0x4d3226=_0x4d3226['apply'](_0x5f57bd,_0x28d27b||[]))['next']());});};class ContributorService{constructor(_0x2db377){this['fetch']=_0x2db377,this['path']='contributor';}['create'](_0x2e20d9,_0x19d5ec,_0x41d31e,_0x262156){return __awaiter$1(this,void 0,void 0,function*(){const _0x38520f={'account_name':_0x2e20d9,'list_name':_0x19d5ec,'contributor_name':_0x41d31e};try{const _0x446b8b=yield this['fetch']['post'](this['path'],_0x262156,_0x38520f);if(_0x446b8b['status']>0xc7&&_0x446b8b['status']<0x12c){const _0x128880=yield _0x446b8b['json']();return new SuccessfulContributorResponse(_0x128880);}const _0x38ea3f=yield _0x446b8b['json']();return new FailedContributorResponse(_0x38ea3f);}catch(_0x503300){if(_0x503300 instanceof Error)return new FailedContributorResponse({'detail':_0x503300['message'],'title':_0x503300['name'],'status':0x1f4,'instance':'','type':''});throw _0x503300;}});}['remove'](_0x507aa3,_0x1d7530,_0x3a0b0d,_0x24cecd){return __awaiter$1(this,void 0,void 0,function*(){const _0x21bf58=this['path']+'/'+_0x507aa3+'/'+_0x1d7530+'/'+_0x3a0b0d,_0x27aabc=yield this['fetch']['delete'](_0x21bf58,_0x24cecd);try{if(_0x27aabc['status']>0xc7&&_0x27aabc['status']<0x12c)return new SuccessfulResponse({});const _0xaedc3c=yield _0x27aabc['json']();return new FailedResponse(_0xaedc3c);}catch(_0x3ba07a){if(_0x3ba07a instanceof Error)return new FailedResponse({'detail':_0x3ba07a['message'],'title':_0x3ba07a['name'],'status':0x1f4,'instance':'','type':''});throw _0x3ba07a;}});}['startsWith'](_0x342cdc,_0x3f5586){return __awaiter$1(this,void 0,void 0,function*(){const _0x4c53a8=this['path']+'/'+_0x342cdc;try{const _0x3a1582=yield this['fetch']['get'](_0x4c53a8,_0x3f5586);if(_0x3a1582['status']>0xc7&&_0x3a1582['status']<0x12c){const _0x239e02=yield _0x3a1582['json']();return new SuccessfulAccountAndImageResponse(_0x239e02);}const _0x5a7dc8=yield _0x3a1582['json']();return new FailedAccountAndImageResponse(_0x5a7dc8);}catch(_0x5f3c5f){if(_0x5f3c5f instanceof Error)return new FailedAccountAndImageResponse({'detail':_0x5f3c5f['message'],'title':_0x5f3c5f['name'],'status':0x1f4,'instance':'','type':''});throw _0x5f3c5f;}});}}
|
|
18
|
-
|
|
19
|
-
var __awaiter=undefined&&undefined['__awaiter']||function(_0xe69dc4,_0x13a634,_0x48db86,_0x17e4bf){function _0x44e11a(_0x3ab079){return _0x3ab079 instanceof _0x48db86?_0x3ab079:new _0x48db86(function(_0x3ba00a){_0x3ba00a(_0x3ab079);});}return new(_0x48db86||(_0x48db86=Promise))(function(_0x12d16d,_0x5826a0){function _0x2400e7(_0x1b5bcd){try{_0x44d866(_0x17e4bf['next'](_0x1b5bcd));}catch(_0x3ccb8f){_0x5826a0(_0x3ccb8f);}}function _0x2ab297(_0x53580d){try{_0x44d866(_0x17e4bf['throw'](_0x53580d));}catch(_0x33ed76){_0x5826a0(_0x33ed76);}}function _0x44d866(_0x381a62){_0x381a62['done']?_0x12d16d(_0x381a62['value']):_0x44e11a(_0x381a62['value'])['then'](_0x2400e7,_0x2ab297);}_0x44d866((_0x17e4bf=_0x17e4bf['apply'](_0xe69dc4,_0x13a634||[]))['next']());});};class AdminClient{constructor(_0x26884f='https://admin.searchability.dev/'){var _0x6b54bf=new Fetch(_0x26884f);this['Accounts']=new AccountService(_0x6b54bf),this['Lists']=new ListService(_0x6b54bf),this['ApiKeys']=new ApiKeyService(_0x6b54bf),this['SearchServers']=new SearchServersService(_0x6b54bf),this['Facets']=new FacetService(_0x6b54bf),this['SearchResults']=new SearchResultService(_0x6b54bf),this['Contributors']=new ContributorService(_0x6b54bf);}}class AuthClient{constructor(_0x232be4='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x232be4);}['login'](_0x45b2df){return __awaiter(this,void 0,void 0,function*(){const _0x5b4478='login/'+_0x45b2df;try{const _0x5c2dfc=yield yield fetch(_0x5b4478);if(_0x5c2dfc['status']>0xc7&&_0x5c2dfc['status']<0x12c){const _0x502e98=yield _0x5c2dfc['json']();return new SuccessfulAuthResponse(_0x502e98);}const _0x5a8e3c=yield _0x5c2dfc['json']();return new FailedAuthResponse(_0x5a8e3c);}catch(_0x394c9f){if(_0x394c9f instanceof Error)return new FailedAuthResponse({'detail':_0x394c9f['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x394c9f;}});}['refresh'](_0x4d8d81){return __awaiter(this,void 0,void 0,function*(){const _0x441444='refresh',_0x1dded5={'refresh_token':_0x4d8d81};try{const _0x4c2378=yield this['fetch']['PostNoAuth'](_0x441444,_0x1dded5);if(_0x4c2378['status']>0xc7&&_0x4c2378['status']<0x12c){const _0x57bf8a=yield _0x4c2378['json']();return new SuccessfulAuthResponse(_0x57bf8a);}const _0x1943c1=yield _0x4c2378['json']();return new FailedAuthResponse(_0x1943c1);}catch(_0x3df742){if(_0x3df742 instanceof Error)return new FailedAuthResponse({'detail':_0x3df742['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x3df742;}});}['getTokenStatus'](_0x569920){if(Date['now']()<_0x569920['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x569920['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
|
|
20
|
-
|
|
21
|
-
export { AdminClient, AuthClient, TokenStatus, Tokens };
|