@searchability/admin-client 0.0.81 → 0.0.82
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(_0x1ef33b){_0x1ef33b[_0x1ef33b['Ok']=0x0]='Ok',_0x1ef33b[_0x1ef33b['Refresh']=0x1]='Refresh',_0x1ef33b[_0x1ef33b['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(_0x27f149){this['isSuccess']=_0x27f149;}}class SuccessfulContributorResponse extends Response{constructor(_0x2c386b){super(!![]),this['contributor']=_0x2c386b;}['toSuccess'](){return this['contributor'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedContributorResponse extends Response{constructor(_0x536c0b){super(![]),this['problem']=_0x536c0b;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountAndImageResponse extends Response{constructor(_0x6071fa){super(!![]),this['accountAndImages']=_0x6071fa;}['toSuccess'](){return this['accountAndImages'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountAndImageResponse extends Response{constructor(_0x5730d4){super(![]),this['problem']=_0x5730d4;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulFacetResponse extends Response{constructor(_0x497cd8){super(!![]),this['facet']=_0x497cd8;}['toSuccess'](){return this['facet'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetResponse extends Response{constructor(_0x2021a4){super(![]),this['problem']=_0x2021a4;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountResponse extends Response{constructor(_0x25f48c){super(!![]),this['account']=_0x25f48c;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountImageResponse extends Response{constructor(_0x41c557){super(!![]),this['accountImage']=_0x41c557;}['toSuccess'](){return this['accountImage'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListIdentityResponse extends Response{constructor(_0x11de46){super(!![]),this['list']=_0x11de46;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListResponse extends Response{constructor(_0x478c4){super(!![]),this['list']=_0x478c4;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x5b600c){super(![]),this['problem']=_0x5b600c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountImageResponse extends Response{constructor(_0x283394){super(![]),this['problem']=_0x283394;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListIdentityResponse extends Response{constructor(_0x211d1d){super(![]),this['problem']=_0x211d1d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListResponse extends Response{constructor(_0x4ccd89){super(![]),this['problem']=_0x4ccd89;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x425bd9){super(!![]),this['tokens']=_0x425bd9;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x44b8c0){super(![]),this['problem']=_0x44b8c0;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x512f83){super(!![]),this['apiKey']=_0x512f83;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x32579f){super(![]),this['problem']=_0x32579f;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x1188b4){super(!![]),this['searchService']=_0x1188b4;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x391c61){super(![]),this['problem']=_0x391c61;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0xb06096){super(!![]),this['searchService']=_0xb06096;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulViewSearchResultResponse extends Response{constructor(_0x3b4e08){super(!![]),this['searchResult']=_0x3b4e08;}['toSuccess'](){return this['searchResult'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchResultResponse extends Response{constructor(_0x1b48ee){super(![]),this['problem']=_0x1b48ee;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchResultResponse extends Response{constructor(_0x493162){super(!![]),this['searchResults']=_0x493162;}['toSuccess'](){return this['searchResults'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchResultResponse extends Response{constructor(_0x568d68){super(![]),this['problem']=_0x568d68;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchServiceResponse extends Response{constructor(_0x43a96d){super(!![]),this['searchServices']=_0x43a96d;}['toSuccess'](){return this['searchServices'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServicesResponse extends Response{constructor(_0xff7b48){super(![]),this['problem']=_0xff7b48;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedViewSearchServiceResponse extends Response{constructor(_0x31d451){super(![]),this['problem']=_0x31d451;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x1719d2){super(!![]),this['apiKeyValue']=_0x1719d2;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x1458b1){super(!![]),this['obj']=_0x1458b1;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x51374e){super(![]),this['problem']=_0x51374e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x28a348){super(![]),this['problem']=_0x28a348;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
|
|
2
|
+
|
|
3
|
+
var __awaiter$8=undefined&&undefined['__awaiter']||function(_0x1b62c5,_0x53a7e5,_0x5f3ae8,_0x488e6e){function _0x3c8b59(_0x14ed84){return _0x14ed84 instanceof _0x5f3ae8?_0x14ed84:new _0x5f3ae8(function(_0x1c0792){_0x1c0792(_0x14ed84);});}return new(_0x5f3ae8||(_0x5f3ae8=Promise))(function(_0x232e58,_0xb78943){function _0x334120(_0x38227c){try{_0x326e9b(_0x488e6e['next'](_0x38227c));}catch(_0xfffa90){_0xb78943(_0xfffa90);}}function _0x512251(_0x51cb38){try{_0x326e9b(_0x488e6e['throw'](_0x51cb38));}catch(_0x535c57){_0xb78943(_0x535c57);}}function _0x326e9b(_0x488b63){_0x488b63['done']?_0x232e58(_0x488b63['value']):_0x3c8b59(_0x488b63['value'])['then'](_0x334120,_0x512251);}_0x326e9b((_0x488e6e=_0x488e6e['apply'](_0x1b62c5,_0x53a7e5||[]))['next']());});};class AccountService{constructor(_0x3b1a0e){this['fetch']=_0x3b1a0e;}['get'](_0x161e29,_0x38c7de){return __awaiter$8(this,void 0,void 0,function*(){const _0x89b84a='Account/'+_0x161e29+'/',_0x217bf6=yield this['fetch']['get'](_0x89b84a,_0x38c7de);try{if(_0x217bf6['status']>0xc7&&_0x217bf6['status']<0x12c){const _0xdd58ab=yield _0x217bf6['json']();return new SuccessfulAccountResponse(_0xdd58ab);}const _0x3d39c8=yield _0x217bf6['json']();return new FailedAccountResponse(_0x3d39c8);}catch(_0x232342){if(_0x232342 instanceof Error)return new FailedAccountResponse({'detail':_0x232342['message'],'title':_0x232342['name'],'status':0x1f4,'instance':'','type':''});throw _0x232342;}});}['getImage'](_0x1dbaa4,_0x33e64d){return __awaiter$8(this,void 0,void 0,function*(){const _0x138ef6='account/image/'+_0x1dbaa4+'/',_0x1a3e4a=yield this['fetch']['get'](_0x138ef6,_0x33e64d);try{if(_0x1a3e4a['status']>0xc7&&_0x1a3e4a['status']<0x12c){const _0x403a4f=yield _0x1a3e4a['json']();return new SuccessfulAccountImageResponse(_0x403a4f);}const _0x20b57b=yield _0x1a3e4a['json']();return new FailedAccountImageResponse(_0x20b57b);}catch(_0x322e26){if(_0x322e26 instanceof Error)return new FailedAccountImageResponse({'detail':_0x322e26['message'],'title':_0x322e26['name'],'status':0x1f4,'instance':'','type':''});throw _0x322e26;}});}}
|
|
4
|
+
|
|
5
|
+
var __awaiter$7=undefined&&undefined['__awaiter']||function(_0x36deeb,_0x42563f,_0x38b8cf,_0x217771){function _0x4aa397(_0x4e1dbe){return _0x4e1dbe instanceof _0x38b8cf?_0x4e1dbe:new _0x38b8cf(function(_0x29fe66){_0x29fe66(_0x4e1dbe);});}return new(_0x38b8cf||(_0x38b8cf=Promise))(function(_0x235ae1,_0x251c83){function _0x547ca5(_0x14823e){try{_0x3efbdc(_0x217771['next'](_0x14823e));}catch(_0x4e7773){_0x251c83(_0x4e7773);}}function _0x1edf0a(_0x358500){try{_0x3efbdc(_0x217771['throw'](_0x358500));}catch(_0x53c3c8){_0x251c83(_0x53c3c8);}}function _0x3efbdc(_0x45d22d){_0x45d22d['done']?_0x235ae1(_0x45d22d['value']):_0x4aa397(_0x45d22d['value'])['then'](_0x547ca5,_0x1edf0a);}_0x3efbdc((_0x217771=_0x217771['apply'](_0x36deeb,_0x42563f||[]))['next']());});};class ApiKeyService{constructor(_0x203830){this['fetch']=_0x203830,this['path']='api-key';}['create'](_0x1ac17c,_0x4bf87c,_0x529819){return __awaiter$7(this,void 0,void 0,function*(){const _0x307f68={'account_name':_0x1ac17c,'api_key_name':_0x4bf87c};try{const _0x424b33=yield this['fetch']['post'](this['path'],_0x529819,_0x307f68);if(_0x424b33['status']>0xc7&&_0x424b33['status']<0x12c){const _0x39dc21=yield _0x424b33['json']();return new SuccessfulApiKeyResponse(_0x39dc21);}const _0x26bc9a=yield _0x424b33['json']();return new FailedApiKeyResponse(_0x26bc9a);}catch(_0x9ae20a){if(_0x9ae20a instanceof Error)return new FailedApiKeyResponse({'detail':_0x9ae20a['message'],'title':_0x9ae20a['name'],'status':0x1f4,'instance':'','type':''});throw _0x9ae20a;}});}['view'](_0x4576b,_0x47d121,_0x48ef5a){return __awaiter$7(this,void 0,void 0,function*(){const _0x5188fb=this['path']+'/'+_0x4576b+'/'+_0x47d121;try{const _0x4d8852=yield this['fetch']['get'](_0x5188fb,_0x48ef5a);if(_0x4d8852['status']>0xc7&&_0x4d8852['status']<0x12c){const _0x133be5=yield _0x4d8852['json']();return new SuccessfulApiKeyValueResponse(_0x133be5);}const _0x500edb=yield _0x4d8852['json']();return new FailedApiKeyValueResponse(_0x500edb);}catch(_0x112ac8){if(_0x112ac8 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x112ac8['message'],'title':_0x112ac8['name'],'status':0x1f4,'instance':'','type':''});throw _0x112ac8;}});}['delete'](_0x4b30f5,_0x5e6064,_0xe11b11){return __awaiter$7(this,void 0,void 0,function*(){const _0x1da5e1=this['path']+'/'+_0x4b30f5+'/'+_0x5e6064;try{const _0x30f3a2=yield this['fetch']['delete'](_0x1da5e1,_0xe11b11);if(_0x30f3a2['status']>0xc7&&_0x30f3a2['status']<0x12c)return new SuccessfulResponse({});const _0x2745b3=yield _0x30f3a2['json']();return new FailedResponse(_0x2745b3);}catch(_0x4a802d){if(_0x4a802d instanceof Error)return new FailedResponse({'detail':_0x4a802d['message'],'title':_0x4a802d['name'],'status':0x1f4,'instance':'','type':''});throw _0x4a802d;}});}}
|
|
6
|
+
|
|
7
|
+
var __awaiter$6=undefined&&undefined['__awaiter']||function(_0x2a2727,_0x31c5ab,_0x1d93ef,_0x298253){function _0xb2d1df(_0xb3d64e){return _0xb3d64e instanceof _0x1d93ef?_0xb3d64e:new _0x1d93ef(function(_0x3de9a7){_0x3de9a7(_0xb3d64e);});}return new(_0x1d93ef||(_0x1d93ef=Promise))(function(_0x5e70a7,_0x3f1431){function _0x5a84d6(_0x3ce69f){try{_0x4152dd(_0x298253['next'](_0x3ce69f));}catch(_0x185725){_0x3f1431(_0x185725);}}function _0x39363a(_0x2eefcf){try{_0x4152dd(_0x298253['throw'](_0x2eefcf));}catch(_0x2f15f6){_0x3f1431(_0x2f15f6);}}function _0x4152dd(_0x226773){_0x226773['done']?_0x5e70a7(_0x226773['value']):_0xb2d1df(_0x226773['value'])['then'](_0x5a84d6,_0x39363a);}_0x4152dd((_0x298253=_0x298253['apply'](_0x2a2727,_0x31c5ab||[]))['next']());});};class ListService{constructor(_0x2e251b){this['fetch']=_0x2e251b;}['create'](_0x268ab4,_0x2299a7,_0x54df8a,_0x8abed0){return __awaiter$6(this,void 0,void 0,function*(){const _0x233baa='List',_0x4e456e={'account_name':_0x268ab4,'list_name':_0x2299a7,'search_service_name':_0x54df8a};try{const _0x29982b=yield this['fetch']['post'](_0x233baa,_0x8abed0,_0x4e456e);if(_0x29982b['status']>0xc7&&_0x29982b['status']<0x12c){const _0x127222=yield _0x29982b['json']();return new SuccessfulListIdentityResponse(_0x127222);}const _0x4b6456=yield _0x29982b['json']();return new FailedListIdentityResponse(_0x4b6456);}catch(_0x12f05c){if(_0x12f05c instanceof Error)return new FailedListIdentityResponse({'detail':_0x12f05c['message'],'title':_0x12f05c['name'],'status':0x1f4,'instance':'','type':''});throw _0x12f05c;}});}['delete'](_0xf1c8d,_0x19fbc5,_0x14d72f){return __awaiter$6(this,void 0,void 0,function*(){const _0x293828='List/'+_0xf1c8d+'/'+_0x19fbc5,_0x10405a=yield this['fetch']['delete'](_0x293828,_0x14d72f);try{if(_0x10405a['status']>0xc7&&_0x10405a['status']<0x12c)return new SuccessfulResponse({});const _0x17616e=yield _0x10405a['json']();return new FailedResponse(_0x17616e);}catch(_0x2f6f8f){if(_0x2f6f8f instanceof Error)return new FailedResponse({'detail':_0x2f6f8f['message'],'title':_0x2f6f8f['name'],'status':0x1f4,'instance':'','type':''});throw _0x2f6f8f;}});}['get'](_0x4a86c6,_0x407519,_0x4e12b0){return __awaiter$6(this,void 0,void 0,function*(){const _0x528586='List/'+_0x4a86c6+'/'+_0x407519;try{const _0xfb1b9=yield this['fetch']['get'](_0x528586,_0x4e12b0);if(_0xfb1b9['status']>0xc7&&_0xfb1b9['status']<0x12c){const _0x3cda7d=yield _0xfb1b9['json']();return new SuccessfulListResponse(_0x3cda7d);}const _0x409631=yield _0xfb1b9['json']();return new FailedListResponse(_0x409631);}catch(_0x4a98eb){if(_0x4a98eb instanceof Error)return new FailedListResponse({'detail':_0x4a98eb['message'],'title':_0x4a98eb['name'],'status':0x1f4,'instance':'','type':''});throw _0x4a98eb;}});}}
|
|
8
|
+
|
|
9
|
+
var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x3177b9,_0x23451d,_0x199a46,_0x175527){function _0x3f1058(_0x37dddc){return _0x37dddc instanceof _0x199a46?_0x37dddc:new _0x199a46(function(_0x55a209){_0x55a209(_0x37dddc);});}return new(_0x199a46||(_0x199a46=Promise))(function(_0x331bd9,_0x8d023b){function _0x400573(_0x2674f6){try{_0x3a32eb(_0x175527['next'](_0x2674f6));}catch(_0x56b7c3){_0x8d023b(_0x56b7c3);}}function _0x3223b1(_0x3d5788){try{_0x3a32eb(_0x175527['throw'](_0x3d5788));}catch(_0x55d206){_0x8d023b(_0x55d206);}}function _0x3a32eb(_0x135ee8){_0x135ee8['done']?_0x331bd9(_0x135ee8['value']):_0x3f1058(_0x135ee8['value'])['then'](_0x400573,_0x3223b1);}_0x3a32eb((_0x175527=_0x175527['apply'](_0x3177b9,_0x23451d||[]))['next']());});};class Fetch{constructor(_0x12ecea){this['baseUri']=_0x12ecea,this['getUrl']=_0x3e6b84=>{return _0x3e6b84['startsWith']('/')&&(_0x3e6b84=_0x3e6b84['replace']('/','')),''+this['baseUri']+_0x3e6b84;},!_0x12ecea['endsWith']('/')&&(_0x12ecea=_0x12ecea+'/');}['get'](_0x2d020a,_0x494364){return __awaiter$5(this,void 0,void 0,function*(){const _0xaa7c10=this['getUrl'](_0x2d020a);return yield fetch(_0xaa7c10,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x494364}});});}['post'](_0x47b521,_0x67ca0b,_0x3dd0ac){return __awaiter$5(this,void 0,void 0,function*(){const _0x71e982=this['getUrl'](_0x47b521);return yield fetch(_0x71e982,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x67ca0b},'body':_0x3dd0ac?JSON['stringify'](_0x3dd0ac):null});});}['PostNoAuth'](_0x511d2a,_0x256e9c){return __awaiter$5(this,void 0,void 0,function*(){const _0x3dec35=this['getUrl'](_0x511d2a);return yield fetch(_0x3dec35,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0x256e9c?JSON['stringify'](_0x256e9c):null});});}['put'](_0x1f75c2,_0x5279d0,_0x284968){return __awaiter$5(this,void 0,void 0,function*(){const _0x6f7796=this['getUrl'](_0x1f75c2);return yield fetch(_0x6f7796,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x5279d0},'body':_0x284968?JSON['stringify'](_0x284968):null});});}['delete'](_0x7b8251,_0x5aff2b){return __awaiter$5(this,void 0,void 0,function*(){const _0x49be80=this['getUrl'](_0x7b8251);return yield fetch(_0x49be80,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x5aff2b}});});}}
|
|
10
|
+
|
|
11
|
+
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0xaab792,_0x5021aa,_0x5d0262,_0xaac63d){function _0x61e864(_0x15cb83){return _0x15cb83 instanceof _0x5d0262?_0x15cb83:new _0x5d0262(function(_0xe390fb){_0xe390fb(_0x15cb83);});}return new(_0x5d0262||(_0x5d0262=Promise))(function(_0x46ac22,_0x11f77a){function _0x13da1a(_0x346d1c){try{_0x4a71cb(_0xaac63d['next'](_0x346d1c));}catch(_0x537242){_0x11f77a(_0x537242);}}function _0x4dfd8d(_0x1b19d1){try{_0x4a71cb(_0xaac63d['throw'](_0x1b19d1));}catch(_0x222b69){_0x11f77a(_0x222b69);}}function _0x4a71cb(_0x3204d8){_0x3204d8['done']?_0x46ac22(_0x3204d8['value']):_0x61e864(_0x3204d8['value'])['then'](_0x13da1a,_0x4dfd8d);}_0x4a71cb((_0xaac63d=_0xaac63d['apply'](_0xaab792,_0x5021aa||[]))['next']());});};class SearchServersService{constructor(_0x179720){this['fetch']=_0x179720,this['path']='search-services';}['create'](_0x21846f,_0xb6009b,_0x4b5bc3,_0x701adc,_0x3ecf21,_0x334da0,_0x52045e,_0x5d48fb){return __awaiter$4(this,void 0,void 0,function*(){const _0x51453c={'account_name':_0x21846f,'search_service_name':_0xb6009b,'endpoint':_0x4b5bc3,'key':_0x701adc,'country':_0x3ecf21,'provider':_0x334da0,'index_name':_0x52045e};try{const _0x48011f=yield this['fetch']['post'](this['path'],_0x5d48fb,_0x51453c);if(_0x48011f['status']>0xc7&&_0x48011f['status']<0x12c){const _0xb785b8=yield _0x48011f['json']();return new SuccessfulSearchServiceResponse(_0xb785b8);}const _0x1f4678=yield _0x48011f['json']();return new FailedSearchServiceResponse(_0x1f4678);}catch(_0x5568cd){if(_0x5568cd instanceof Error)return new FailedSearchServiceResponse({'detail':_0x5568cd['message'],'title':_0x5568cd['name'],'status':0x1f4,'instance':'','type':''});throw _0x5568cd;}});}['delete'](_0x3e768d,_0x343672,_0x18d783){return __awaiter$4(this,void 0,void 0,function*(){const _0x26e0de=this['path']+'/'+_0x3e768d+'/'+_0x343672;try{const _0x144e14=yield this['fetch']['delete'](_0x26e0de,_0x18d783);if(_0x144e14['status']>0xc7&&_0x144e14['status']<0x12c)return new SuccessfulResponse({});const _0x2f65ca=yield _0x144e14['json']();return new FailedResponse(_0x2f65ca);}catch(_0x58f211){if(_0x58f211 instanceof Error)return new FailedResponse({'detail':_0x58f211['message'],'title':_0x58f211['name'],'status':0x1f4,'instance':'','type':''});throw _0x58f211;}});}['view'](_0x1a05c5,_0x5f16b8,_0x470d8c){return __awaiter$4(this,void 0,void 0,function*(){const _0x129660=this['path']+'/'+_0x1a05c5+'/'+_0x5f16b8;try{const _0x568541=yield this['fetch']['get'](_0x129660,_0x470d8c);if(_0x568541['status']>0xc7&&_0x568541['status']<0x12c){const _0x1ccc4=yield _0x568541['json']();return new SuccessfulViewSearchServiceResponse(_0x1ccc4);}const _0x377d39=yield _0x568541['json']();return new FailedViewSearchServiceResponse(_0x377d39);}catch(_0x930832){if(_0x930832 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x930832['message'],'title':_0x930832['name'],'status':0x1f4,'instance':'','type':''});throw _0x930832;}});}['edit'](_0x4b0249,_0x6b4a37,_0x1b5a86,_0xaf2b0b,_0x7a86c){return __awaiter$4(this,void 0,void 0,function*(){const _0x194bc0={'account_name':_0x4b0249,'search_service_name':_0x6b4a37,'key':_0x1b5a86,'country':_0xaf2b0b};try{const _0x40dac8=yield this['fetch']['put'](this['path'],_0x7a86c,_0x194bc0);if(_0x40dac8['status']>0xc7&&_0x40dac8['status']<0x12c){const _0x47706a=yield _0x40dac8['json']();return new SuccessfulSearchServiceResponse(_0x47706a);}const _0x20a9ac=yield _0x40dac8['json']();return new FailedSearchServiceResponse(_0x20a9ac);}catch(_0x33e8c8){if(_0x33e8c8 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x33e8c8['message'],'title':_0x33e8c8['name'],'status':0x1f4,'instance':'','type':''});throw _0x33e8c8;}});}['list'](_0x50209b,_0x53a923){return __awaiter$4(this,void 0,void 0,function*(){const _0x1e3fb2=this['path']+'/'+_0x50209b;try{const _0x49008f=yield this['fetch']['get'](_0x1e3fb2,_0x53a923);if(_0x49008f['status']>0xc7&&_0x49008f['status']<0x12c){const _0x486474=yield _0x49008f['json']();return new SuccessfulListSearchServiceResponse(_0x486474);}const _0x4d5e7a=yield _0x49008f['json']();return new FailedViewSearchServicesResponse(_0x4d5e7a);}catch(_0x46622d){if(_0x46622d instanceof Error)return new FailedViewSearchServicesResponse({'detail':_0x46622d['message'],'title':_0x46622d['name'],'status':0x1f4,'instance':'','type':''});throw _0x46622d;}});}}
|
|
12
|
+
|
|
13
|
+
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x52176e,_0x2ea8ee,_0x155ea0,_0x29f4e1){function _0x1e42b1(_0x434122){return _0x434122 instanceof _0x155ea0?_0x434122:new _0x155ea0(function(_0x642823){_0x642823(_0x434122);});}return new(_0x155ea0||(_0x155ea0=Promise))(function(_0x2c5b43,_0x1bdb8a){function _0x5a8fdb(_0xed4de0){try{_0xde2fd2(_0x29f4e1['next'](_0xed4de0));}catch(_0x4b7f37){_0x1bdb8a(_0x4b7f37);}}function _0x4b44ff(_0x54956d){try{_0xde2fd2(_0x29f4e1['throw'](_0x54956d));}catch(_0x2798aa){_0x1bdb8a(_0x2798aa);}}function _0xde2fd2(_0x257671){_0x257671['done']?_0x2c5b43(_0x257671['value']):_0x1e42b1(_0x257671['value'])['then'](_0x5a8fdb,_0x4b44ff);}_0xde2fd2((_0x29f4e1=_0x29f4e1['apply'](_0x52176e,_0x2ea8ee||[]))['next']());});};class FacetService{constructor(_0x394d1c){this['fetch']=_0x394d1c,this['path']='facet';}['create'](_0x10ca37,_0x1140ed,_0x2998dc,_0x37ae96){return __awaiter$3(this,void 0,void 0,function*(){const _0x213f44={'account_name':_0x10ca37,'list_name':_0x1140ed,'facet_name':_0x2998dc};try{const _0x4c00df=yield this['fetch']['post'](this['path'],_0x37ae96,_0x213f44);if(_0x4c00df['status']>0xc7&&_0x4c00df['status']<0x12c){const _0x372a25=yield _0x4c00df['json']();return new SuccessfulFacetResponse(_0x372a25);}const _0x49eb23=yield _0x4c00df['json']();return new FailedFacetResponse(_0x49eb23);}catch(_0x3e4302){if(_0x3e4302 instanceof Error)return new FailedFacetResponse({'detail':_0x3e4302['message'],'title':_0x3e4302['name'],'status':0x1f4,'instance':'','type':''});throw _0x3e4302;}});}['remove'](_0x143595,_0x5201f5,_0x1ca388,_0x43197f){return __awaiter$3(this,void 0,void 0,function*(){const _0x26c14d='Facet/'+_0x143595+'/'+_0x5201f5+'/'+_0x1ca388,_0x2eed2e=yield this['fetch']['delete'](_0x26c14d,_0x43197f);try{if(_0x2eed2e['status']>0xc7&&_0x2eed2e['status']<0x12c)return new SuccessfulResponse({});const _0xb78685=yield _0x2eed2e['json']();return new FailedResponse(_0xb78685);}catch(_0x237350){if(_0x237350 instanceof Error)return new FailedResponse({'detail':_0x237350['message'],'title':_0x237350['name'],'status':0x1f4,'instance':'','type':''});throw _0x237350;}});}['rename'](_0x2990aa,_0x361d94,_0x196673,_0x1a842c,_0x3fd393){return __awaiter$3(this,void 0,void 0,function*(){const _0x1ceecb={'account_name':_0x2990aa,'list_name':_0x361d94,'facet_name':_0x196673,'new_facet_name':_0x1a842c};try{const _0x1312ad=yield this['fetch']['put'](this['path'],_0x3fd393,_0x1ceecb);if(_0x1312ad['status']>0xc7&&_0x1312ad['status']<0x12c){const _0x4c7a99=yield _0x1312ad['json']();return new SuccessfulFacetResponse(_0x4c7a99);}const _0x2b5729=yield _0x1312ad['json']();return new FailedFacetResponse(_0x2b5729);}catch(_0x16ae2e){if(_0x16ae2e instanceof Error)return new FailedFacetResponse({'detail':_0x16ae2e['message'],'title':_0x16ae2e['name'],'status':0x1f4,'instance':'','type':''});throw _0x16ae2e;}});}}
|
|
14
|
+
|
|
15
|
+
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0xda1ca1,_0xb6de16,_0x465d2f,_0x38296e){function _0x3ccda9(_0x25c0f4){return _0x25c0f4 instanceof _0x465d2f?_0x25c0f4:new _0x465d2f(function(_0x329571){_0x329571(_0x25c0f4);});}return new(_0x465d2f||(_0x465d2f=Promise))(function(_0x2cd4f8,_0x5e151f){function _0x4b01e3(_0x2b0d04){try{_0xffe250(_0x38296e['next'](_0x2b0d04));}catch(_0xf25aa9){_0x5e151f(_0xf25aa9);}}function _0x5d0dde(_0x1d70bc){try{_0xffe250(_0x38296e['throw'](_0x1d70bc));}catch(_0x15ff21){_0x5e151f(_0x15ff21);}}function _0xffe250(_0x17e546){_0x17e546['done']?_0x2cd4f8(_0x17e546['value']):_0x3ccda9(_0x17e546['value'])['then'](_0x4b01e3,_0x5d0dde);}_0xffe250((_0x38296e=_0x38296e['apply'](_0xda1ca1,_0xb6de16||[]))['next']());});};class SearchResultService{constructor(_0x933c06){this['fetch']=_0x933c06,this['path']='search-result';}['create'](_0x339291,_0x2d3d41,_0x53b01e,_0x3f6b8d,_0x19e44f){return __awaiter$2(this,void 0,void 0,function*(){_0x19e44f=_0x19e44f!==null&&_0x19e44f!==void 0?_0x19e44f:{'description':'','keywords':'','resource_1':'','resource_2':'','resource_3':'','latitude':0x0,'longitude':0x0,'facets':[]};const _0x350c6c=Object['assign']({'account_name':_0x339291,'search_result_name':_0x53b01e,'list_name':_0x2d3d41},_0x19e44f);try{const _0x41e332=yield this['fetch']['post'](this['path'],_0x3f6b8d,_0x350c6c);if(_0x41e332['status']>0xc7&&_0x41e332['status']<0x12c){const _0x11af65=yield _0x41e332['json']();return new SuccessfulViewSearchResultResponse(_0x11af65);}const _0x541a5e=yield _0x41e332['json']();return new FailedSearchResultResponse(_0x541a5e);}catch(_0x12a6bf){if(_0x12a6bf instanceof Error)return new FailedSearchResultResponse({'detail':_0x12a6bf['message'],'title':_0x12a6bf['name'],'status':0x1f4,'instance':'','type':''});throw _0x12a6bf;}});}['transfer'](_0x246c61,_0x489fc9,_0x2771ce,_0x15a951){return __awaiter$2(this,void 0,void 0,function*(){const _0x12c6f2={'account_name':_0x246c61,'list_name':_0x489fc9,'new_search_service_name':_0x2771ce};try{const _0x1b973f=yield this['fetch']['post'](this['path']+'/transfer',_0x15a951,_0x12c6f2);if(_0x1b973f['status']>0xc7&&_0x1b973f['status']<0x12c){const _0xcd2093=yield _0x1b973f['json']();return new SuccessfulListResponse(_0xcd2093);}const _0x1325ce=yield _0x1b973f['json']();return new FailedListResponse(_0x1325ce);}catch(_0x2b2088){if(_0x2b2088 instanceof Error)return new FailedListResponse({'detail':_0x2b2088['message'],'title':_0x2b2088['name'],'status':0x1f4,'instance':'','type':''});throw _0x2b2088;}});}['list'](_0x1dc2b8,_0x562737,_0x264632,_0x36c009){return __awaiter$2(this,void 0,void 0,function*(){let _0x4e742a=this['path']+'/'+_0x1dc2b8+'/'+_0x562737;const _0x13c7a9=[];(_0x36c009===null||_0x36c009===void 0?void 0:_0x36c009['size'])&&_0x13c7a9['push']('size='+_0x36c009['size']);(_0x36c009===null||_0x36c009===void 0?void 0:_0x36c009['skip'])&&_0x13c7a9['push']('skip='+_0x36c009['skip']);(_0x36c009===null||_0x36c009===void 0?void 0:_0x36c009['query'])&&_0x13c7a9['push']('query='+_0x36c009['query']);(_0x36c009===null||_0x36c009===void 0?void 0:_0x36c009['filter'])&&_0x13c7a9['push']('filter='+_0x36c009['filter']);_0x13c7a9['length']>0x0&&_0x13c7a9['forEach']((_0xd543d2,_0x38d857)=>{_0x38d857===0x0?_0x4e742a+='?':_0x4e742a+='&',_0x4e742a+=_0xd543d2;});try{const _0x4f95f4=yield this['fetch']['get'](_0x4e742a,_0x264632);if(_0x4f95f4['status']>0xc7&&_0x4f95f4['status']<0x12c){const _0x333769=yield _0x4f95f4['json']();return new SuccessfulListSearchResultResponse(_0x333769);}const _0x39ae7a=yield _0x4f95f4['json']();return new FailedViewSearchResultResponse(_0x39ae7a);}catch(_0x528aa8){if(_0x528aa8 instanceof Error)return new FailedViewSearchResultResponse({'detail':_0x528aa8['message'],'title':_0x528aa8['name'],'status':0x1f4,'instance':'','type':''});throw _0x528aa8;}});}}
|
|
16
|
+
|
|
17
|
+
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x3c7646,_0x5ab68b,_0x23d1cb,_0x5e3d0d){function _0x39f8d2(_0x55a43f){return _0x55a43f instanceof _0x23d1cb?_0x55a43f:new _0x23d1cb(function(_0x36f98d){_0x36f98d(_0x55a43f);});}return new(_0x23d1cb||(_0x23d1cb=Promise))(function(_0x941c52,_0x40f5c4){function _0x30bc28(_0x18fefa){try{_0x53558e(_0x5e3d0d['next'](_0x18fefa));}catch(_0x264bbb){_0x40f5c4(_0x264bbb);}}function _0x2c1164(_0x3e1cbc){try{_0x53558e(_0x5e3d0d['throw'](_0x3e1cbc));}catch(_0x23768c){_0x40f5c4(_0x23768c);}}function _0x53558e(_0x4d1420){_0x4d1420['done']?_0x941c52(_0x4d1420['value']):_0x39f8d2(_0x4d1420['value'])['then'](_0x30bc28,_0x2c1164);}_0x53558e((_0x5e3d0d=_0x5e3d0d['apply'](_0x3c7646,_0x5ab68b||[]))['next']());});};class ContributorService{constructor(_0x3d018a){this['fetch']=_0x3d018a,this['path']='contributor';}['create'](_0x380b2c,_0x479829,_0x9f4d63,_0x38bd20){return __awaiter$1(this,void 0,void 0,function*(){const _0x368470={'account_name':_0x380b2c,'list_name':_0x479829,'contributor_name':_0x9f4d63};try{const _0xfb9e51=yield this['fetch']['post'](this['path'],_0x38bd20,_0x368470);if(_0xfb9e51['status']>0xc7&&_0xfb9e51['status']<0x12c){const _0x3ea43e=yield _0xfb9e51['json']();return new SuccessfulContributorResponse(_0x3ea43e);}const _0x2d7453=yield _0xfb9e51['json']();return new FailedContributorResponse(_0x2d7453);}catch(_0x57ebd1){if(_0x57ebd1 instanceof Error)return new FailedContributorResponse({'detail':_0x57ebd1['message'],'title':_0x57ebd1['name'],'status':0x1f4,'instance':'','type':''});throw _0x57ebd1;}});}['remove'](_0x47ff67,_0x352a64,_0x19db09,_0x37cbbf){return __awaiter$1(this,void 0,void 0,function*(){const _0x20f404=this['path']+'/'+_0x47ff67+'/'+_0x352a64+'/'+_0x19db09,_0x55a3d0=yield this['fetch']['delete'](_0x20f404,_0x37cbbf);try{if(_0x55a3d0['status']>0xc7&&_0x55a3d0['status']<0x12c)return new SuccessfulResponse({});const _0x2cc29c=yield _0x55a3d0['json']();return new FailedResponse(_0x2cc29c);}catch(_0x380381){if(_0x380381 instanceof Error)return new FailedResponse({'detail':_0x380381['message'],'title':_0x380381['name'],'status':0x1f4,'instance':'','type':''});throw _0x380381;}});}['startsWith'](_0x98f17c,_0x2c1851){return __awaiter$1(this,void 0,void 0,function*(){const _0x5c72b4=this['path']+'/'+_0x98f17c;try{const _0x197db3=yield this['fetch']['get'](_0x5c72b4,_0x2c1851);if(_0x197db3['status']>0xc7&&_0x197db3['status']<0x12c){const _0x4673fd=yield _0x197db3['json']();return new SuccessfulAccountAndImageResponse(_0x4673fd);}const _0x37f819=yield _0x197db3['json']();return new FailedAccountAndImageResponse(_0x37f819);}catch(_0x4d8a05){if(_0x4d8a05 instanceof Error)return new FailedAccountAndImageResponse({'detail':_0x4d8a05['message'],'title':_0x4d8a05['name'],'status':0x1f4,'instance':'','type':''});throw _0x4d8a05;}});}}
|
|
18
|
+
|
|
19
|
+
var __awaiter=undefined&&undefined['__awaiter']||function(_0x5c6eb6,_0x21c69e,_0x43fead,_0x4e96f1){function _0xbb6e8e(_0x4f8588){return _0x4f8588 instanceof _0x43fead?_0x4f8588:new _0x43fead(function(_0x14de68){_0x14de68(_0x4f8588);});}return new(_0x43fead||(_0x43fead=Promise))(function(_0x2075a0,_0x5925f6){function _0x52c7a1(_0x172d58){try{_0x4a9e9d(_0x4e96f1['next'](_0x172d58));}catch(_0x53c643){_0x5925f6(_0x53c643);}}function _0x1df5ed(_0x32a450){try{_0x4a9e9d(_0x4e96f1['throw'](_0x32a450));}catch(_0x33ff38){_0x5925f6(_0x33ff38);}}function _0x4a9e9d(_0x4fe170){_0x4fe170['done']?_0x2075a0(_0x4fe170['value']):_0xbb6e8e(_0x4fe170['value'])['then'](_0x52c7a1,_0x1df5ed);}_0x4a9e9d((_0x4e96f1=_0x4e96f1['apply'](_0x5c6eb6,_0x21c69e||[]))['next']());});};class AdminClient{constructor(_0x11ee8b='https://admin.searchability.dev/'){var _0x428eba=new Fetch(_0x11ee8b);this['Accounts']=new AccountService(_0x428eba),this['Lists']=new ListService(_0x428eba),this['ApiKeys']=new ApiKeyService(_0x428eba),this['SearchServers']=new SearchServersService(_0x428eba),this['Facets']=new FacetService(_0x428eba),this['SearchResults']=new SearchResultService(_0x428eba),this['Contributors']=new ContributorService(_0x428eba);}}class AuthClient{constructor(_0x3637a9='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x3637a9);}['login'](_0xc882b5){return __awaiter(this,void 0,void 0,function*(){const _0x5f33df='login/'+_0xc882b5;try{const _0x25d933=yield yield fetch(_0x5f33df);if(_0x25d933['status']>0xc7&&_0x25d933['status']<0x12c){const _0x4c66c9=yield _0x25d933['json']();return new SuccessfulAuthResponse(_0x4c66c9);}const _0x2fe033=yield _0x25d933['json']();return new FailedAuthResponse(_0x2fe033);}catch(_0x23e6bf){if(_0x23e6bf instanceof Error)return new FailedAuthResponse({'detail':_0x23e6bf['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x23e6bf;}});}['refresh'](_0x36bbcf){return __awaiter(this,void 0,void 0,function*(){const _0x3ef4c6='refresh',_0xe7fd0c={'refresh_token':_0x36bbcf};try{const _0x10d2f2=yield this['fetch']['PostNoAuth'](_0x3ef4c6,_0xe7fd0c);if(_0x10d2f2['status']>0xc7&&_0x10d2f2['status']<0x12c){const _0x2d36c9=yield _0x10d2f2['json']();return new SuccessfulAuthResponse(_0x2d36c9);}const _0x72c37e=yield _0x10d2f2['json']();return new FailedAuthResponse(_0x72c37e);}catch(_0x158b53){if(_0x158b53 instanceof Error)return new FailedAuthResponse({'detail':_0x158b53['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x158b53;}});}['getTokenStatus'](_0x247169){if(Date['now']()<_0x247169['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x247169['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(_0x4fd484){_0x4fd484[_0x4fd484['Ok']=0x0]='Ok',_0x4fd484[_0x4fd484['Refresh']=0x1]='Refresh',_0x4fd484[_0x4fd484['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(_0x103369){this['isSuccess']=_0x103369;}}class SuccessfulContributorResponse extends Response{constructor(_0x39247c){super(!![]),this['contributor']=_0x39247c;}['toSuccess'](){return this['contributor'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedContributorResponse extends Response{constructor(_0x2664ea){super(![]),this['problem']=_0x2664ea;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountAndImageResponse extends Response{constructor(_0x36fbec){super(!![]),this['accountAndImages']=_0x36fbec;}['toSuccess'](){return this['accountAndImages'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountAndImageResponse extends Response{constructor(_0x532363){super(![]),this['problem']=_0x532363;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulFacetResponse extends Response{constructor(_0x10dd27){super(!![]),this['facet']=_0x10dd27;}['toSuccess'](){return this['facet'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetResponse extends Response{constructor(_0x1aedff){super(![]),this['problem']=_0x1aedff;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountResponse extends Response{constructor(_0xfdc2cd){super(!![]),this['account']=_0xfdc2cd;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountImageResponse extends Response{constructor(_0x158fa9){super(!![]),this['accountImage']=_0x158fa9;}['toSuccess'](){return this['accountImage'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListIdentityResponse extends Response{constructor(_0x5a14be){super(!![]),this['list']=_0x5a14be;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListResponse extends Response{constructor(_0x445918){super(!![]),this['list']=_0x445918;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x35a18c){super(![]),this['problem']=_0x35a18c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountImageResponse extends Response{constructor(_0x56ccdc){super(![]),this['problem']=_0x56ccdc;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListIdentityResponse extends Response{constructor(_0x4808e1){super(![]),this['problem']=_0x4808e1;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListResponse extends Response{constructor(_0x5e5387){super(![]),this['problem']=_0x5e5387;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0xdbd9a4){super(!![]),this['tokens']=_0xdbd9a4;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x329c45){super(![]),this['problem']=_0x329c45;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x5a5fac){super(!![]),this['apiKey']=_0x5a5fac;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x2f7b55){super(![]),this['problem']=_0x2f7b55;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x46b565){super(!![]),this['searchService']=_0x46b565;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x50d2a3){super(![]),this['problem']=_0x50d2a3;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x52f38e){super(!![]),this['searchService']=_0x52f38e;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulViewSearchResultResponse extends Response{constructor(_0x2da547){super(!![]),this['searchResult']=_0x2da547;}['toSuccess'](){return this['searchResult'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchResultResponse extends Response{constructor(_0x4363f2){super(![]),this['problem']=_0x4363f2;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchResultResponse extends Response{constructor(_0x3e8053){super(!![]),this['searchResults']=_0x3e8053;}['toSuccess'](){return this['searchResults'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchResultResponse extends Response{constructor(_0x368d02){super(![]),this['problem']=_0x368d02;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchServiceResponse extends Response{constructor(_0x321cfd){super(!![]),this['searchServices']=_0x321cfd;}['toSuccess'](){return this['searchServices'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServicesResponse extends Response{constructor(_0x3a535c){super(![]),this['problem']=_0x3a535c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedViewSearchServiceResponse extends Response{constructor(_0x5a6cd1){super(![]),this['problem']=_0x5a6cd1;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x3cc342){super(!![]),this['apiKeyValue']=_0x3cc342;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x1744c7){super(!![]),this['obj']=_0x1744c7;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x43e8fe){super(![]),this['problem']=_0x43e8fe;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0xa08b25){super(![]),this['problem']=_0xa08b25;}['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(_0x5a7bb6,_0x2602e7,_0x2a215b,_0x437b21){function _0x39bc94(_0x2bb011){return _0x2bb011 instanceof _0x2a215b?_0x2bb011:new _0x2a215b(function(_0x2b2efb){_0x2b2efb(_0x2bb011);});}return new(_0x2a215b||(_0x2a215b=Promise))(function(_0x4b634c,_0x17960f){function _0x4a5364(_0x3ee66a){try{_0x3abae1(_0x437b21['next'](_0x3ee66a));}catch(_0x47dd1a){_0x17960f(_0x47dd1a);}}function _0x2ba42f(_0x2b8e70){try{_0x3abae1(_0x437b21['throw'](_0x2b8e70));}catch(_0xba81d6){_0x17960f(_0xba81d6);}}function _0x3abae1(_0x243119){_0x243119['done']?_0x4b634c(_0x243119['value']):_0x39bc94(_0x243119['value'])['then'](_0x4a5364,_0x2ba42f);}_0x3abae1((_0x437b21=_0x437b21['apply'](_0x5a7bb6,_0x2602e7||[]))['next']());});};class AccountService{constructor(_0x1832e3){this['fetch']=_0x1832e3;}['get'](_0x1ef473,_0x613683){return __awaiter$8(this,void 0,void 0,function*(){const _0x2dddff='Account/'+_0x1ef473+'/',_0x49da78=yield this['fetch']['get'](_0x2dddff,_0x613683);try{if(_0x49da78['status']>0xc7&&_0x49da78['status']<0x12c){const _0x59449b=yield _0x49da78['json']();return new SuccessfulAccountResponse(_0x59449b);}const _0x17ff05=yield _0x49da78['json']();return new FailedAccountResponse(_0x17ff05);}catch(_0x1df403){if(_0x1df403 instanceof Error)return new FailedAccountResponse({'detail':_0x1df403['message'],'title':_0x1df403['name'],'status':0x1f4,'instance':'','type':''});throw _0x1df403;}});}['getImage'](_0x3974f3,_0x54a619){return __awaiter$8(this,void 0,void 0,function*(){const _0x3287f7='account/image/'+_0x3974f3+'/',_0x11b20c=yield this['fetch']['get'](_0x3287f7,_0x54a619);try{if(_0x11b20c['status']>0xc7&&_0x11b20c['status']<0x12c){const _0x16726f=yield _0x11b20c['json']();return new SuccessfulAccountImageResponse(_0x16726f);}const _0x3721c0=yield _0x11b20c['json']();return new FailedAccountImageResponse(_0x3721c0);}catch(_0x5c282c){if(_0x5c282c instanceof Error)return new FailedAccountImageResponse({'detail':_0x5c282c['message'],'title':_0x5c282c['name'],'status':0x1f4,'instance':'','type':''});throw _0x5c282c;}});}}
|
|
6
6
|
|
|
7
|
-
var __awaiter$7=undefined&&undefined['__awaiter']||function(
|
|
7
|
+
var __awaiter$7=undefined&&undefined['__awaiter']||function(_0x5792ee,_0x28753f,_0x45868b,_0xff7ab9){function _0x5e8dcd(_0x21fe18){return _0x21fe18 instanceof _0x45868b?_0x21fe18:new _0x45868b(function(_0x2bf4e3){_0x2bf4e3(_0x21fe18);});}return new(_0x45868b||(_0x45868b=Promise))(function(_0x37e60b,_0x5ee682){function _0xc7b590(_0x5b6c38){try{_0x29707c(_0xff7ab9['next'](_0x5b6c38));}catch(_0x13a893){_0x5ee682(_0x13a893);}}function _0x552969(_0xc96006){try{_0x29707c(_0xff7ab9['throw'](_0xc96006));}catch(_0x48d793){_0x5ee682(_0x48d793);}}function _0x29707c(_0x8cc239){_0x8cc239['done']?_0x37e60b(_0x8cc239['value']):_0x5e8dcd(_0x8cc239['value'])['then'](_0xc7b590,_0x552969);}_0x29707c((_0xff7ab9=_0xff7ab9['apply'](_0x5792ee,_0x28753f||[]))['next']());});};class ApiKeyService{constructor(_0x1ab889){this['fetch']=_0x1ab889,this['path']='api-key';}['create'](_0x28bd3c,_0xe00bce,_0x232faf){return __awaiter$7(this,void 0,void 0,function*(){const _0x1b7a6c={'account_name':_0x28bd3c,'api_key_name':_0xe00bce};try{const _0x3f9188=yield this['fetch']['post'](this['path'],_0x232faf,_0x1b7a6c);if(_0x3f9188['status']>0xc7&&_0x3f9188['status']<0x12c){const _0x1a9454=yield _0x3f9188['json']();return new SuccessfulApiKeyResponse(_0x1a9454);}const _0xfbba74=yield _0x3f9188['json']();return new FailedApiKeyResponse(_0xfbba74);}catch(_0x9be82a){if(_0x9be82a instanceof Error)return new FailedApiKeyResponse({'detail':_0x9be82a['message'],'title':_0x9be82a['name'],'status':0x1f4,'instance':'','type':''});throw _0x9be82a;}});}['view'](_0x35eaf6,_0x1236e3,_0x4f318e){return __awaiter$7(this,void 0,void 0,function*(){const _0x51317e=this['path']+'/'+_0x35eaf6+'/'+_0x1236e3;try{const _0x3b8f60=yield this['fetch']['get'](_0x51317e,_0x4f318e);if(_0x3b8f60['status']>0xc7&&_0x3b8f60['status']<0x12c){const _0xb4d5f7=yield _0x3b8f60['json']();return new SuccessfulApiKeyValueResponse(_0xb4d5f7);}const _0x4d94c2=yield _0x3b8f60['json']();return new FailedApiKeyValueResponse(_0x4d94c2);}catch(_0x326657){if(_0x326657 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x326657['message'],'title':_0x326657['name'],'status':0x1f4,'instance':'','type':''});throw _0x326657;}});}['delete'](_0x50f9cd,_0x2c13c2,_0x1d10cd){return __awaiter$7(this,void 0,void 0,function*(){const _0x54d6f6=this['path']+'/'+_0x50f9cd+'/'+_0x2c13c2;try{const _0x2e56bb=yield this['fetch']['delete'](_0x54d6f6,_0x1d10cd);if(_0x2e56bb['status']>0xc7&&_0x2e56bb['status']<0x12c)return new SuccessfulResponse({});const _0x52f5e1=yield _0x2e56bb['json']();return new FailedResponse(_0x52f5e1);}catch(_0x5f257){if(_0x5f257 instanceof Error)return new FailedResponse({'detail':_0x5f257['message'],'title':_0x5f257['name'],'status':0x1f4,'instance':'','type':''});throw _0x5f257;}});}}
|
|
8
8
|
|
|
9
|
-
var __awaiter$6=undefined&&undefined['__awaiter']||function(
|
|
9
|
+
var __awaiter$6=undefined&&undefined['__awaiter']||function(_0x365ee6,_0x3033e7,_0x4f6e3b,_0x391129){function _0x78f336(_0x3c07f0){return _0x3c07f0 instanceof _0x4f6e3b?_0x3c07f0:new _0x4f6e3b(function(_0x17851c){_0x17851c(_0x3c07f0);});}return new(_0x4f6e3b||(_0x4f6e3b=Promise))(function(_0x39b22a,_0x2b5d9b){function _0x36ad72(_0x228426){try{_0x3fd52d(_0x391129['next'](_0x228426));}catch(_0xa4ecda){_0x2b5d9b(_0xa4ecda);}}function _0x4efe0d(_0x4dccd5){try{_0x3fd52d(_0x391129['throw'](_0x4dccd5));}catch(_0x245070){_0x2b5d9b(_0x245070);}}function _0x3fd52d(_0x286243){_0x286243['done']?_0x39b22a(_0x286243['value']):_0x78f336(_0x286243['value'])['then'](_0x36ad72,_0x4efe0d);}_0x3fd52d((_0x391129=_0x391129['apply'](_0x365ee6,_0x3033e7||[]))['next']());});};class ListService{constructor(_0xd88d0a){this['fetch']=_0xd88d0a;}['create'](_0x5be95d,_0x5f1efd,_0x3bfdd8,_0x1d2a67){return __awaiter$6(this,void 0,void 0,function*(){const _0x3ff58e='List',_0x2294be={'account_name':_0x5be95d,'list_name':_0x5f1efd,'search_service_name':_0x3bfdd8};try{const _0x5f18ec=yield this['fetch']['post'](_0x3ff58e,_0x1d2a67,_0x2294be);if(_0x5f18ec['status']>0xc7&&_0x5f18ec['status']<0x12c){const _0x345d40=yield _0x5f18ec['json']();return new SuccessfulListIdentityResponse(_0x345d40);}const _0x1dba0b=yield _0x5f18ec['json']();return new FailedListIdentityResponse(_0x1dba0b);}catch(_0x15f6df){if(_0x15f6df instanceof Error)return new FailedListIdentityResponse({'detail':_0x15f6df['message'],'title':_0x15f6df['name'],'status':0x1f4,'instance':'','type':''});throw _0x15f6df;}});}['delete'](_0xecca41,_0x16a135,_0x1cef55){return __awaiter$6(this,void 0,void 0,function*(){const _0xe9a266='List/'+_0xecca41+'/'+_0x16a135,_0x57433e=yield this['fetch']['delete'](_0xe9a266,_0x1cef55);try{if(_0x57433e['status']>0xc7&&_0x57433e['status']<0x12c)return new SuccessfulResponse({});const _0x411c6c=yield _0x57433e['json']();return new FailedResponse(_0x411c6c);}catch(_0x2db002){if(_0x2db002 instanceof Error)return new FailedResponse({'detail':_0x2db002['message'],'title':_0x2db002['name'],'status':0x1f4,'instance':'','type':''});throw _0x2db002;}});}['get'](_0x18ae0a,_0x31a9ee,_0x333256){return __awaiter$6(this,void 0,void 0,function*(){const _0x2d7608='List/'+_0x18ae0a+'/'+_0x31a9ee;try{const _0x17d5b2=yield this['fetch']['get'](_0x2d7608,_0x333256);if(_0x17d5b2['status']>0xc7&&_0x17d5b2['status']<0x12c){const _0x36b240=yield _0x17d5b2['json']();return new SuccessfulListResponse(_0x36b240);}const _0x1a1b77=yield _0x17d5b2['json']();return new FailedListResponse(_0x1a1b77);}catch(_0x5e3cdc){if(_0x5e3cdc instanceof Error)return new FailedListResponse({'detail':_0x5e3cdc['message'],'title':_0x5e3cdc['name'],'status':0x1f4,'instance':'','type':''});throw _0x5e3cdc;}});}}
|
|
10
10
|
|
|
11
|
-
var __awaiter$5=undefined&&undefined['__awaiter']||function(
|
|
11
|
+
var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x1f121a,_0x22ead3,_0x198897,_0x587112){function _0x15cfaf(_0x2d135d){return _0x2d135d instanceof _0x198897?_0x2d135d:new _0x198897(function(_0x51ade7){_0x51ade7(_0x2d135d);});}return new(_0x198897||(_0x198897=Promise))(function(_0x48563f,_0xc79669){function _0x5c018c(_0x210a5e){try{_0x4d8b25(_0x587112['next'](_0x210a5e));}catch(_0x306ed0){_0xc79669(_0x306ed0);}}function _0x1a1411(_0x32add8){try{_0x4d8b25(_0x587112['throw'](_0x32add8));}catch(_0x2f93da){_0xc79669(_0x2f93da);}}function _0x4d8b25(_0x34608f){_0x34608f['done']?_0x48563f(_0x34608f['value']):_0x15cfaf(_0x34608f['value'])['then'](_0x5c018c,_0x1a1411);}_0x4d8b25((_0x587112=_0x587112['apply'](_0x1f121a,_0x22ead3||[]))['next']());});};class Fetch{constructor(_0x34ac60){this['baseUri']=_0x34ac60,this['getUrl']=_0x17bf8e=>{return _0x17bf8e['startsWith']('/')&&(_0x17bf8e=_0x17bf8e['replace']('/','')),''+this['baseUri']+_0x17bf8e;},!_0x34ac60['endsWith']('/')&&(_0x34ac60=_0x34ac60+'/');}['get'](_0x120b2b,_0x456dd7){return __awaiter$5(this,void 0,void 0,function*(){const _0x2184a1=this['getUrl'](_0x120b2b);return yield fetch(_0x2184a1,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x456dd7}});});}['post'](_0x4166be,_0x31099b,_0x142f35){return __awaiter$5(this,void 0,void 0,function*(){const _0x997e2=this['getUrl'](_0x4166be);return yield fetch(_0x997e2,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x31099b},'body':_0x142f35?JSON['stringify'](_0x142f35):null});});}['PostNoAuth'](_0x4b4bc8,_0x3f99b9){return __awaiter$5(this,void 0,void 0,function*(){const _0x403d41=this['getUrl'](_0x4b4bc8);return yield fetch(_0x403d41,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0x3f99b9?JSON['stringify'](_0x3f99b9):null});});}['put'](_0x33c14a,_0x41fb3e,_0x5a1c24){return __awaiter$5(this,void 0,void 0,function*(){const _0x3e8cad=this['getUrl'](_0x33c14a);return yield fetch(_0x3e8cad,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x41fb3e},'body':_0x5a1c24?JSON['stringify'](_0x5a1c24):null});});}['delete'](_0x39dbf2,_0x507c7e){return __awaiter$5(this,void 0,void 0,function*(){const _0x4a952f=this['getUrl'](_0x39dbf2);return yield fetch(_0x4a952f,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x507c7e}});});}}
|
|
12
12
|
|
|
13
|
-
var __awaiter$4=undefined&&undefined['__awaiter']||function(
|
|
13
|
+
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x2e00d2,_0x20479b,_0x5763b,_0x39df7e){function _0x27d469(_0x44a60a){return _0x44a60a instanceof _0x5763b?_0x44a60a:new _0x5763b(function(_0x35c7d7){_0x35c7d7(_0x44a60a);});}return new(_0x5763b||(_0x5763b=Promise))(function(_0x419961,_0x1f67a5){function _0xa3bd7a(_0x2661a2){try{_0x369629(_0x39df7e['next'](_0x2661a2));}catch(_0x5d5ab3){_0x1f67a5(_0x5d5ab3);}}function _0x470420(_0x3a9da3){try{_0x369629(_0x39df7e['throw'](_0x3a9da3));}catch(_0x174823){_0x1f67a5(_0x174823);}}function _0x369629(_0x345b53){_0x345b53['done']?_0x419961(_0x345b53['value']):_0x27d469(_0x345b53['value'])['then'](_0xa3bd7a,_0x470420);}_0x369629((_0x39df7e=_0x39df7e['apply'](_0x2e00d2,_0x20479b||[]))['next']());});};class SearchServersService{constructor(_0x459620){this['fetch']=_0x459620,this['path']='search-services';}['create'](_0x34621f,_0x129c64,_0x49defc,_0x1ae93,_0x2d57a5,_0x262f27,_0x598808,_0x93e118){return __awaiter$4(this,void 0,void 0,function*(){const _0x35056d={'account_name':_0x34621f,'search_service_name':_0x129c64,'endpoint':_0x49defc,'key':_0x1ae93,'country':_0x2d57a5,'provider':_0x262f27,'index_name':_0x598808};try{const _0x8dfa21=yield this['fetch']['post'](this['path'],_0x93e118,_0x35056d);if(_0x8dfa21['status']>0xc7&&_0x8dfa21['status']<0x12c){const _0x1dc02d=yield _0x8dfa21['json']();return new SuccessfulSearchServiceResponse(_0x1dc02d);}const _0x5e1d52=yield _0x8dfa21['json']();return new FailedSearchServiceResponse(_0x5e1d52);}catch(_0xd09d58){if(_0xd09d58 instanceof Error)return new FailedSearchServiceResponse({'detail':_0xd09d58['message'],'title':_0xd09d58['name'],'status':0x1f4,'instance':'','type':''});throw _0xd09d58;}});}['delete'](_0x2e1851,_0x1ba235,_0x3cb84f){return __awaiter$4(this,void 0,void 0,function*(){const _0x72e441=this['path']+'/'+_0x2e1851+'/'+_0x1ba235;try{const _0x39c95e=yield this['fetch']['delete'](_0x72e441,_0x3cb84f);if(_0x39c95e['status']>0xc7&&_0x39c95e['status']<0x12c)return new SuccessfulResponse({});const _0x5212b9=yield _0x39c95e['json']();return new FailedResponse(_0x5212b9);}catch(_0xd34340){if(_0xd34340 instanceof Error)return new FailedResponse({'detail':_0xd34340['message'],'title':_0xd34340['name'],'status':0x1f4,'instance':'','type':''});throw _0xd34340;}});}['view'](_0x49ff83,_0x1919ae,_0x4b60d5){return __awaiter$4(this,void 0,void 0,function*(){const _0x24a939=this['path']+'/'+_0x49ff83+'/'+_0x1919ae;try{const _0x37c9e3=yield this['fetch']['get'](_0x24a939,_0x4b60d5);if(_0x37c9e3['status']>0xc7&&_0x37c9e3['status']<0x12c){const _0x3135f9=yield _0x37c9e3['json']();return new SuccessfulViewSearchServiceResponse(_0x3135f9);}const _0x5ca4ee=yield _0x37c9e3['json']();return new FailedViewSearchServiceResponse(_0x5ca4ee);}catch(_0xd3e1a2){if(_0xd3e1a2 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0xd3e1a2['message'],'title':_0xd3e1a2['name'],'status':0x1f4,'instance':'','type':''});throw _0xd3e1a2;}});}['edit'](_0x5a7513,_0x144e77,_0x3862b7,_0x4fa135,_0x428bf9){return __awaiter$4(this,void 0,void 0,function*(){const _0x293198={'account_name':_0x5a7513,'search_service_name':_0x144e77,'key':_0x3862b7,'country':_0x4fa135};try{const _0x22fda3=yield this['fetch']['put'](this['path'],_0x428bf9,_0x293198);if(_0x22fda3['status']>0xc7&&_0x22fda3['status']<0x12c){const _0x4c66fd=yield _0x22fda3['json']();return new SuccessfulSearchServiceResponse(_0x4c66fd);}const _0x4eee4f=yield _0x22fda3['json']();return new FailedSearchServiceResponse(_0x4eee4f);}catch(_0x55eec2){if(_0x55eec2 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x55eec2['message'],'title':_0x55eec2['name'],'status':0x1f4,'instance':'','type':''});throw _0x55eec2;}});}['list'](_0x42c40b,_0x166e12){return __awaiter$4(this,void 0,void 0,function*(){const _0x511771=this['path']+'/'+_0x42c40b;try{const _0x4ce28a=yield this['fetch']['get'](_0x511771,_0x166e12);if(_0x4ce28a['status']>0xc7&&_0x4ce28a['status']<0x12c){const _0x2d46b7=yield _0x4ce28a['json']();return new SuccessfulListSearchServiceResponse(_0x2d46b7);}const _0x3c2115=yield _0x4ce28a['json']();return new FailedViewSearchServicesResponse(_0x3c2115);}catch(_0x130ec5){if(_0x130ec5 instanceof Error)return new FailedViewSearchServicesResponse({'detail':_0x130ec5['message'],'title':_0x130ec5['name'],'status':0x1f4,'instance':'','type':''});throw _0x130ec5;}});}}
|
|
14
14
|
|
|
15
|
-
var __awaiter$3=undefined&&undefined['__awaiter']||function(
|
|
15
|
+
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x45b94c,_0x270fb1,_0x25904c,_0x29fae5){function _0x1be4d8(_0x4730dc){return _0x4730dc instanceof _0x25904c?_0x4730dc:new _0x25904c(function(_0xfad0fd){_0xfad0fd(_0x4730dc);});}return new(_0x25904c||(_0x25904c=Promise))(function(_0x29f56a,_0x1fcc43){function _0x26b563(_0x17d3a5){try{_0x43c5dd(_0x29fae5['next'](_0x17d3a5));}catch(_0x4a237b){_0x1fcc43(_0x4a237b);}}function _0x71b65e(_0x15883e){try{_0x43c5dd(_0x29fae5['throw'](_0x15883e));}catch(_0x204598){_0x1fcc43(_0x204598);}}function _0x43c5dd(_0x2f4b0e){_0x2f4b0e['done']?_0x29f56a(_0x2f4b0e['value']):_0x1be4d8(_0x2f4b0e['value'])['then'](_0x26b563,_0x71b65e);}_0x43c5dd((_0x29fae5=_0x29fae5['apply'](_0x45b94c,_0x270fb1||[]))['next']());});};class FacetService{constructor(_0xe75b3f){this['fetch']=_0xe75b3f,this['path']='facet';}['create'](_0x326970,_0x5a9c43,_0x90cc32,_0x12be90){return __awaiter$3(this,void 0,void 0,function*(){const _0x30bd11={'account_name':_0x326970,'list_name':_0x5a9c43,'facet_name':_0x90cc32};try{const _0x3a044d=yield this['fetch']['post'](this['path'],_0x12be90,_0x30bd11);if(_0x3a044d['status']>0xc7&&_0x3a044d['status']<0x12c){const _0x1e9392=yield _0x3a044d['json']();return new SuccessfulFacetResponse(_0x1e9392);}const _0x2a5b8c=yield _0x3a044d['json']();return new FailedFacetResponse(_0x2a5b8c);}catch(_0x1aa9fe){if(_0x1aa9fe instanceof Error)return new FailedFacetResponse({'detail':_0x1aa9fe['message'],'title':_0x1aa9fe['name'],'status':0x1f4,'instance':'','type':''});throw _0x1aa9fe;}});}['remove'](_0x3480e1,_0x1c14bd,_0x3551cb,_0x46d5fd){return __awaiter$3(this,void 0,void 0,function*(){const _0x5de268='Facet/'+_0x3480e1+'/'+_0x1c14bd+'/'+_0x3551cb,_0x799e4=yield this['fetch']['delete'](_0x5de268,_0x46d5fd);try{if(_0x799e4['status']>0xc7&&_0x799e4['status']<0x12c)return new SuccessfulResponse({});const _0x167533=yield _0x799e4['json']();return new FailedResponse(_0x167533);}catch(_0x3e0548){if(_0x3e0548 instanceof Error)return new FailedResponse({'detail':_0x3e0548['message'],'title':_0x3e0548['name'],'status':0x1f4,'instance':'','type':''});throw _0x3e0548;}});}['rename'](_0x23641d,_0x358be4,_0x4b67e4,_0x5b6b80,_0x1ee531){return __awaiter$3(this,void 0,void 0,function*(){const _0x27ed3b={'account_name':_0x23641d,'list_name':_0x358be4,'facet_name':_0x4b67e4,'new_facet_name':_0x5b6b80};try{const _0x2fe9d1=yield this['fetch']['put'](this['path'],_0x1ee531,_0x27ed3b);if(_0x2fe9d1['status']>0xc7&&_0x2fe9d1['status']<0x12c){const _0x3c371c=yield _0x2fe9d1['json']();return new SuccessfulFacetResponse(_0x3c371c);}const _0x1f8ef5=yield _0x2fe9d1['json']();return new FailedFacetResponse(_0x1f8ef5);}catch(_0x2db2d4){if(_0x2db2d4 instanceof Error)return new FailedFacetResponse({'detail':_0x2db2d4['message'],'title':_0x2db2d4['name'],'status':0x1f4,'instance':'','type':''});throw _0x2db2d4;}});}}
|
|
16
16
|
|
|
17
|
-
var __awaiter$2=undefined&&undefined['__awaiter']||function(
|
|
17
|
+
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0xaac35b,_0x33b436,_0x4ff50c,_0x2a167b){function _0x2f7f21(_0x4f82aa){return _0x4f82aa instanceof _0x4ff50c?_0x4f82aa:new _0x4ff50c(function(_0x1f4772){_0x1f4772(_0x4f82aa);});}return new(_0x4ff50c||(_0x4ff50c=Promise))(function(_0xffe3b,_0x571276){function _0x157005(_0x21fdb3){try{_0x17c591(_0x2a167b['next'](_0x21fdb3));}catch(_0x2e2dc7){_0x571276(_0x2e2dc7);}}function _0x579935(_0x1190c7){try{_0x17c591(_0x2a167b['throw'](_0x1190c7));}catch(_0x5dbfb5){_0x571276(_0x5dbfb5);}}function _0x17c591(_0x755065){_0x755065['done']?_0xffe3b(_0x755065['value']):_0x2f7f21(_0x755065['value'])['then'](_0x157005,_0x579935);}_0x17c591((_0x2a167b=_0x2a167b['apply'](_0xaac35b,_0x33b436||[]))['next']());});};class SearchResultService{constructor(_0x2d20bd){this['fetch']=_0x2d20bd,this['path']='search-result';}['create'](_0x4e57d9,_0x1b0fdc,_0x4c3296,_0x2a51d2,_0x3c618f){return __awaiter$2(this,void 0,void 0,function*(){_0x3c618f=_0x3c618f!==null&&_0x3c618f!==void 0?_0x3c618f:{'description':'','keywords':'','resource_1':'','resource_2':'','resource_3':'','latitude':0x0,'longitude':0x0,'facets':[]};const _0x54d174=Object['assign']({'account_name':_0x4e57d9,'search_result_name':_0x4c3296,'list_name':_0x1b0fdc},_0x3c618f);try{const _0x44601f=yield this['fetch']['post'](this['path'],_0x2a51d2,_0x54d174);if(_0x44601f['status']>0xc7&&_0x44601f['status']<0x12c){const _0x564cd6=yield _0x44601f['json']();return new SuccessfulViewSearchResultResponse(_0x564cd6);}const _0x3faec6=yield _0x44601f['json']();return new FailedSearchResultResponse(_0x3faec6);}catch(_0x38a755){if(_0x38a755 instanceof Error)return new FailedSearchResultResponse({'detail':_0x38a755['message'],'title':_0x38a755['name'],'status':0x1f4,'instance':'','type':''});throw _0x38a755;}});}['transfer'](_0x5a5e76,_0x9654ff,_0x588325,_0x4e467f){return __awaiter$2(this,void 0,void 0,function*(){const _0x4d319b={'account_name':_0x5a5e76,'list_name':_0x9654ff,'new_search_service_name':_0x588325};try{const _0x56bcd9=yield this['fetch']['post'](this['path']+'/transfer',_0x4e467f,_0x4d319b);if(_0x56bcd9['status']>0xc7&&_0x56bcd9['status']<0x12c){const _0x2fcd17=yield _0x56bcd9['json']();return new SuccessfulListResponse(_0x2fcd17);}const _0x21c7a9=yield _0x56bcd9['json']();return new FailedListResponse(_0x21c7a9);}catch(_0x209f0b){if(_0x209f0b instanceof Error)return new FailedListResponse({'detail':_0x209f0b['message'],'title':_0x209f0b['name'],'status':0x1f4,'instance':'','type':''});throw _0x209f0b;}});}['list'](_0x313da7,_0x54b28e,_0x3e0408,_0x30622c){return __awaiter$2(this,void 0,void 0,function*(){let _0xc2273c=this['path']+'/'+_0x313da7+'/'+_0x54b28e;const _0x352c4d=[];(_0x30622c===null||_0x30622c===void 0?void 0:_0x30622c['size'])&&_0x352c4d['push']('size='+_0x30622c['size']);(_0x30622c===null||_0x30622c===void 0?void 0:_0x30622c['skip'])&&_0x352c4d['push']('skip='+_0x30622c['skip']);(_0x30622c===null||_0x30622c===void 0?void 0:_0x30622c['query'])&&_0x352c4d['push']('query='+_0x30622c['query']);(_0x30622c===null||_0x30622c===void 0?void 0:_0x30622c['filter'])&&_0x352c4d['push']('filter='+_0x30622c['filter']);_0x352c4d['length']>0x0&&_0x352c4d['forEach']((_0xe728d,_0x5206c2)=>{_0x5206c2===0x0?_0xc2273c+='?':_0xc2273c+='&',_0xc2273c+=_0xe728d;});try{const _0x34e6af=yield this['fetch']['get'](_0xc2273c,_0x3e0408);if(_0x34e6af['status']>0xc7&&_0x34e6af['status']<0x12c){const _0x2142d8=yield _0x34e6af['json']();return new SuccessfulListSearchResultResponse(_0x2142d8);}const _0x33073f=yield _0x34e6af['json']();return new FailedViewSearchResultResponse(_0x33073f);}catch(_0x2d74d5){if(_0x2d74d5 instanceof Error)return new FailedViewSearchResultResponse({'detail':_0x2d74d5['message'],'title':_0x2d74d5['name'],'status':0x1f4,'instance':'','type':''});throw _0x2d74d5;}});}}
|
|
18
18
|
|
|
19
|
-
var __awaiter$1=undefined&&undefined['__awaiter']||function(
|
|
19
|
+
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x208296,_0x40fab0,_0x2396f5,_0x54ac2b){function _0xe5b47e(_0x53d3ab){return _0x53d3ab instanceof _0x2396f5?_0x53d3ab:new _0x2396f5(function(_0x3468a9){_0x3468a9(_0x53d3ab);});}return new(_0x2396f5||(_0x2396f5=Promise))(function(_0x213eb1,_0x2ad274){function _0xcf01db(_0x41e88b){try{_0xf10c1f(_0x54ac2b['next'](_0x41e88b));}catch(_0x5c4f49){_0x2ad274(_0x5c4f49);}}function _0x2f5bf1(_0x250c11){try{_0xf10c1f(_0x54ac2b['throw'](_0x250c11));}catch(_0x49af0f){_0x2ad274(_0x49af0f);}}function _0xf10c1f(_0x302816){_0x302816['done']?_0x213eb1(_0x302816['value']):_0xe5b47e(_0x302816['value'])['then'](_0xcf01db,_0x2f5bf1);}_0xf10c1f((_0x54ac2b=_0x54ac2b['apply'](_0x208296,_0x40fab0||[]))['next']());});};class ContributorService{constructor(_0x3fb09e){this['fetch']=_0x3fb09e,this['path']='contributor';}['create'](_0x528518,_0x3f20be,_0x10449e,_0x43820a){return __awaiter$1(this,void 0,void 0,function*(){const _0x531fc4={'account_name':_0x528518,'list_name':_0x3f20be,'contributor_name':_0x10449e};try{const _0x241d2d=yield this['fetch']['post'](this['path'],_0x43820a,_0x531fc4);if(_0x241d2d['status']>0xc7&&_0x241d2d['status']<0x12c){const _0x39612b=yield _0x241d2d['json']();return new SuccessfulContributorResponse(_0x39612b);}const _0x4776bb=yield _0x241d2d['json']();return new FailedContributorResponse(_0x4776bb);}catch(_0x4e0154){if(_0x4e0154 instanceof Error)return new FailedContributorResponse({'detail':_0x4e0154['message'],'title':_0x4e0154['name'],'status':0x1f4,'instance':'','type':''});throw _0x4e0154;}});}['remove'](_0x214c07,_0xd42a13,_0x2bed0e,_0x2ae5a4){return __awaiter$1(this,void 0,void 0,function*(){const _0xf8cd82=this['path']+'/'+_0x214c07+'/'+_0xd42a13+'/'+_0x2bed0e,_0x54ed30=yield this['fetch']['delete'](_0xf8cd82,_0x2ae5a4);try{if(_0x54ed30['status']>0xc7&&_0x54ed30['status']<0x12c)return new SuccessfulResponse({});const _0x42328e=yield _0x54ed30['json']();return new FailedResponse(_0x42328e);}catch(_0x1a8143){if(_0x1a8143 instanceof Error)return new FailedResponse({'detail':_0x1a8143['message'],'title':_0x1a8143['name'],'status':0x1f4,'instance':'','type':''});throw _0x1a8143;}});}['startsWith'](_0x577143,_0x14b5d8){return __awaiter$1(this,void 0,void 0,function*(){const _0x1ec8b3=this['path']+'/'+_0x577143;try{const _0x4c8d2b=yield this['fetch']['get'](_0x1ec8b3,_0x14b5d8);if(_0x4c8d2b['status']>0xc7&&_0x4c8d2b['status']<0x12c){const _0x5d4f60=yield _0x4c8d2b['json']();return new SuccessfulAccountAndImageResponse(_0x5d4f60);}const _0x25fdf6=yield _0x4c8d2b['json']();return new FailedAccountAndImageResponse(_0x25fdf6);}catch(_0x1a351e){if(_0x1a351e instanceof Error)return new FailedAccountAndImageResponse({'detail':_0x1a351e['message'],'title':_0x1a351e['name'],'status':0x1f4,'instance':'','type':''});throw _0x1a351e;}});}}
|
|
20
20
|
|
|
21
|
-
var __awaiter=undefined&&undefined['__awaiter']||function(
|
|
21
|
+
var __awaiter=undefined&&undefined['__awaiter']||function(_0x238a4d,_0x144eea,_0x1a48c3,_0x45b562){function _0x5f2aea(_0x5229a8){return _0x5229a8 instanceof _0x1a48c3?_0x5229a8:new _0x1a48c3(function(_0x26d8e3){_0x26d8e3(_0x5229a8);});}return new(_0x1a48c3||(_0x1a48c3=Promise))(function(_0xe43ac8,_0x10c6f2){function _0x7854b8(_0x20b3fb){try{_0x561de6(_0x45b562['next'](_0x20b3fb));}catch(_0x582eaa){_0x10c6f2(_0x582eaa);}}function _0x50f26e(_0x42b536){try{_0x561de6(_0x45b562['throw'](_0x42b536));}catch(_0x2c8be1){_0x10c6f2(_0x2c8be1);}}function _0x561de6(_0x433fed){_0x433fed['done']?_0xe43ac8(_0x433fed['value']):_0x5f2aea(_0x433fed['value'])['then'](_0x7854b8,_0x50f26e);}_0x561de6((_0x45b562=_0x45b562['apply'](_0x238a4d,_0x144eea||[]))['next']());});};class AdminClient{constructor(_0x25bdfc='https://admin.searchability.dev/'){var _0x3d8a14=new Fetch(_0x25bdfc);this['Accounts']=new AccountService(_0x3d8a14),this['Lists']=new ListService(_0x3d8a14),this['ApiKeys']=new ApiKeyService(_0x3d8a14),this['SearchServers']=new SearchServersService(_0x3d8a14),this['Facets']=new FacetService(_0x3d8a14),this['SearchResults']=new SearchResultService(_0x3d8a14),this['Contributors']=new ContributorService(_0x3d8a14);}}class AuthClient{constructor(_0x5da84c='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x5da84c);}['login'](_0x2d79b7){return __awaiter(this,void 0,void 0,function*(){const _0x44c7a6='login/'+_0x2d79b7;try{const _0x12007d=yield yield fetch(_0x44c7a6);if(_0x12007d['status']>0xc7&&_0x12007d['status']<0x12c){const _0x4b4035=yield _0x12007d['json']();return new SuccessfulAuthResponse(_0x4b4035);}const _0x96eac7=yield _0x12007d['json']();return new FailedAuthResponse(_0x96eac7);}catch(_0x1b30b1){if(_0x1b30b1 instanceof Error)return new FailedAuthResponse({'detail':_0x1b30b1['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x1b30b1;}});}['refresh'](_0x4805e2){return __awaiter(this,void 0,void 0,function*(){const _0xf5fea8='refresh',_0x20a5d7={'refresh_token':_0x4805e2};try{const _0x5a3ae2=yield this['fetch']['PostNoAuth'](_0xf5fea8,_0x20a5d7);if(_0x5a3ae2['status']>0xc7&&_0x5a3ae2['status']<0x12c){const _0x5e90e2=yield _0x5a3ae2['json']();return new SuccessfulAuthResponse(_0x5e90e2);}const _0x24e5ac=yield _0x5a3ae2['json']();return new FailedAuthResponse(_0x24e5ac);}catch(_0x1c96d7){if(_0x1c96d7 instanceof Error)return new FailedAuthResponse({'detail':_0x1c96d7['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x1c96d7;}});}['getTokenStatus'](_0x2adc19){if(Date['now']()<_0x2adc19['access_expires'])return exports.TokenStatus['Ok'];if(Date['now']()<_0x2adc19['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(_0x5afeb2){_0x5afeb2[_0x5afeb2['Ok']=0x0]='Ok',_0x5afeb2[_0x5afeb2['Refresh']=0x1]='Refresh',_0x5afeb2[_0x5afeb2['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(_0x2c1e86){this['isSuccess']=_0x2c1e86;}}class SuccessfulContributorResponse extends Response{constructor(_0x59418d){super(!![]),this['contributor']=_0x59418d;}['toSuccess'](){return this['contributor'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedContributorResponse extends Response{constructor(_0x52bb90){super(![]),this['problem']=_0x52bb90;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountAndImageResponse extends Response{constructor(_0x269dbc){super(!![]),this['accountAndImages']=_0x269dbc;}['toSuccess'](){return this['accountAndImages'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountAndImageResponse extends Response{constructor(_0x4df871){super(![]),this['problem']=_0x4df871;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulFacetResponse extends Response{constructor(_0x2b3aef){super(!![]),this['facet']=_0x2b3aef;}['toSuccess'](){return this['facet'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetResponse extends Response{constructor(_0x485a54){super(![]),this['problem']=_0x485a54;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountResponse extends Response{constructor(_0x52c692){super(!![]),this['account']=_0x52c692;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountImageResponse extends Response{constructor(_0x23fa17){super(!![]),this['accountImage']=_0x23fa17;}['toSuccess'](){return this['accountImage'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListIdentityResponse extends Response{constructor(_0x5425a8){super(!![]),this['list']=_0x5425a8;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListResponse extends Response{constructor(_0x277441){super(!![]),this['list']=_0x277441;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x2a2076){super(![]),this['problem']=_0x2a2076;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountImageResponse extends Response{constructor(_0x4fbd74){super(![]),this['problem']=_0x4fbd74;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListIdentityResponse extends Response{constructor(_0x1118d0){super(![]),this['problem']=_0x1118d0;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListResponse extends Response{constructor(_0x4d6400){super(![]),this['problem']=_0x4d6400;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x13319e){super(!![]),this['tokens']=_0x13319e;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x2ce942){super(![]),this['problem']=_0x2ce942;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x15c289){super(!![]),this['apiKey']=_0x15c289;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x45eba7){super(![]),this['problem']=_0x45eba7;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x36e572){super(!![]),this['searchService']=_0x36e572;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x1d1158){super(![]),this['problem']=_0x1d1158;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x323d4a){super(!![]),this['searchService']=_0x323d4a;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulViewSearchResultResponse extends Response{constructor(_0x2b5636){super(!![]),this['searchResult']=_0x2b5636;}['toSuccess'](){return this['searchResult'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchResultResponse extends Response{constructor(_0x499a9d){super(![]),this['problem']=_0x499a9d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchResultResponse extends Response{constructor(_0x1c413d){super(!![]),this['searchResults']=_0x1c413d;}['toSuccess'](){return this['searchResults'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchResultResponse extends Response{constructor(_0x22d333){super(![]),this['problem']=_0x22d333;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchServiceResponse extends Response{constructor(_0x43d3bf){super(!![]),this['searchServices']=_0x43d3bf;}['toSuccess'](){return this['searchServices'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServicesResponse extends Response{constructor(_0x53a5fc){super(![]),this['problem']=_0x53a5fc;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedViewSearchServiceResponse extends Response{constructor(_0x539665){super(![]),this['problem']=_0x539665;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x5aaa23){super(!![]),this['apiKeyValue']=_0x5aaa23;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x2bc204){super(!![]),this['obj']=_0x2bc204;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x39c79e){super(![]),this['problem']=_0x39c79e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x2aea71){super(![]),this['problem']=_0x2aea71;}['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(_0x123f34,_0x33228f,_0x234b2a,_0xfb224f){function _0x2b071b(_0x34c422){return _0x34c422 instanceof _0x234b2a?_0x34c422:new _0x234b2a(function(_0x1d48fd){_0x1d48fd(_0x34c422);});}return new(_0x234b2a||(_0x234b2a=Promise))(function(_0x2149b7,_0x556411){function _0x177144(_0x473275){try{_0x50ea50(_0xfb224f['next'](_0x473275));}catch(_0x363528){_0x556411(_0x363528);}}function _0x1938d1(_0x29f4aa){try{_0x50ea50(_0xfb224f['throw'](_0x29f4aa));}catch(_0x337b70){_0x556411(_0x337b70);}}function _0x50ea50(_0x169cb9){_0x169cb9['done']?_0x2149b7(_0x169cb9['value']):_0x2b071b(_0x169cb9['value'])['then'](_0x177144,_0x1938d1);}_0x50ea50((_0xfb224f=_0xfb224f['apply'](_0x123f34,_0x33228f||[]))['next']());});};class AccountService{constructor(_0xc7abcd){this['fetch']=_0xc7abcd;}['get'](_0x162836,_0x1adfdb){return __awaiter$8(this,void 0,void 0,function*(){const _0x3f19e0='Account/'+_0x162836+'/',_0x2b5519=yield this['fetch']['get'](_0x3f19e0,_0x1adfdb);try{if(_0x2b5519['status']>0xc7&&_0x2b5519['status']<0x12c){const _0x5c5d0a=yield _0x2b5519['json']();return new SuccessfulAccountResponse(_0x5c5d0a);}const _0x543c01=yield _0x2b5519['json']();return new FailedAccountResponse(_0x543c01);}catch(_0x5cce73){if(_0x5cce73 instanceof Error)return new FailedAccountResponse({'detail':_0x5cce73['message'],'title':_0x5cce73['name'],'status':0x1f4,'instance':'','type':''});throw _0x5cce73;}});}['getImage'](_0x38a33a,_0x419892){return __awaiter$8(this,void 0,void 0,function*(){const _0x7e9e1e='account/image/'+_0x38a33a+'/',_0x260f35=yield this['fetch']['get'](_0x7e9e1e,_0x419892);try{if(_0x260f35['status']>0xc7&&_0x260f35['status']<0x12c){const _0xdb71ae=yield _0x260f35['json']();return new SuccessfulAccountImageResponse(_0xdb71ae);}const _0x9392cc=yield _0x260f35['json']();return new FailedAccountImageResponse(_0x9392cc);}catch(_0x42f059){if(_0x42f059 instanceof Error)return new FailedAccountImageResponse({'detail':_0x42f059['message'],'title':_0x42f059['name'],'status':0x1f4,'instance':'','type':''});throw _0x42f059;}});}}
|
|
4
4
|
|
|
5
|
-
var __awaiter$7=undefined&&undefined['__awaiter']||function(
|
|
5
|
+
var __awaiter$7=undefined&&undefined['__awaiter']||function(_0x2240a8,_0x34de0c,_0x29a198,_0x3c5a58){function _0x2f7042(_0x437478){return _0x437478 instanceof _0x29a198?_0x437478:new _0x29a198(function(_0x2ac8e8){_0x2ac8e8(_0x437478);});}return new(_0x29a198||(_0x29a198=Promise))(function(_0x2d4801,_0x149b97){function _0x1e0bbc(_0x363934){try{_0x3962ba(_0x3c5a58['next'](_0x363934));}catch(_0x207b33){_0x149b97(_0x207b33);}}function _0x41ae4d(_0x1a61e2){try{_0x3962ba(_0x3c5a58['throw'](_0x1a61e2));}catch(_0x4b8d62){_0x149b97(_0x4b8d62);}}function _0x3962ba(_0x4d7107){_0x4d7107['done']?_0x2d4801(_0x4d7107['value']):_0x2f7042(_0x4d7107['value'])['then'](_0x1e0bbc,_0x41ae4d);}_0x3962ba((_0x3c5a58=_0x3c5a58['apply'](_0x2240a8,_0x34de0c||[]))['next']());});};class ApiKeyService{constructor(_0x2d164d){this['fetch']=_0x2d164d,this['path']='api-key';}['create'](_0x22d0c1,_0x37c5ff,_0x2fe95d){return __awaiter$7(this,void 0,void 0,function*(){const _0x5cec9c={'account_name':_0x22d0c1,'api_key_name':_0x37c5ff};try{const _0xe69b2c=yield this['fetch']['post'](this['path'],_0x2fe95d,_0x5cec9c);if(_0xe69b2c['status']>0xc7&&_0xe69b2c['status']<0x12c){const _0x527179=yield _0xe69b2c['json']();return new SuccessfulApiKeyResponse(_0x527179);}const _0x1b75ed=yield _0xe69b2c['json']();return new FailedApiKeyResponse(_0x1b75ed);}catch(_0x376cf7){if(_0x376cf7 instanceof Error)return new FailedApiKeyResponse({'detail':_0x376cf7['message'],'title':_0x376cf7['name'],'status':0x1f4,'instance':'','type':''});throw _0x376cf7;}});}['view'](_0x364f6b,_0xe84f48,_0x186b7d){return __awaiter$7(this,void 0,void 0,function*(){const _0x2ba003=this['path']+'/'+_0x364f6b+'/'+_0xe84f48;try{const _0x5636f3=yield this['fetch']['get'](_0x2ba003,_0x186b7d);if(_0x5636f3['status']>0xc7&&_0x5636f3['status']<0x12c){const _0x5d3439=yield _0x5636f3['json']();return new SuccessfulApiKeyValueResponse(_0x5d3439);}const _0x1daa83=yield _0x5636f3['json']();return new FailedApiKeyValueResponse(_0x1daa83);}catch(_0x3baea2){if(_0x3baea2 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x3baea2['message'],'title':_0x3baea2['name'],'status':0x1f4,'instance':'','type':''});throw _0x3baea2;}});}['delete'](_0x39d130,_0x5346cc,_0x43432c){return __awaiter$7(this,void 0,void 0,function*(){const _0x2998ce=this['path']+'/'+_0x39d130+'/'+_0x5346cc;try{const _0x5021a4=yield this['fetch']['delete'](_0x2998ce,_0x43432c);if(_0x5021a4['status']>0xc7&&_0x5021a4['status']<0x12c)return new SuccessfulResponse({});const _0x39ed1f=yield _0x5021a4['json']();return new FailedResponse(_0x39ed1f);}catch(_0x5815cf){if(_0x5815cf instanceof Error)return new FailedResponse({'detail':_0x5815cf['message'],'title':_0x5815cf['name'],'status':0x1f4,'instance':'','type':''});throw _0x5815cf;}});}}
|
|
6
6
|
|
|
7
|
-
var __awaiter$6=undefined&&undefined['__awaiter']||function(
|
|
7
|
+
var __awaiter$6=undefined&&undefined['__awaiter']||function(_0x2efcd8,_0x2fb009,_0x4702cb,_0x1e967f){function _0x17ac77(_0x2f961d){return _0x2f961d instanceof _0x4702cb?_0x2f961d:new _0x4702cb(function(_0x3500d7){_0x3500d7(_0x2f961d);});}return new(_0x4702cb||(_0x4702cb=Promise))(function(_0x298217,_0x4f96bf){function _0x46a8cf(_0x3810c7){try{_0x174854(_0x1e967f['next'](_0x3810c7));}catch(_0x5ddde3){_0x4f96bf(_0x5ddde3);}}function _0x1d2e83(_0x3ee0d1){try{_0x174854(_0x1e967f['throw'](_0x3ee0d1));}catch(_0x128c43){_0x4f96bf(_0x128c43);}}function _0x174854(_0x6903ce){_0x6903ce['done']?_0x298217(_0x6903ce['value']):_0x17ac77(_0x6903ce['value'])['then'](_0x46a8cf,_0x1d2e83);}_0x174854((_0x1e967f=_0x1e967f['apply'](_0x2efcd8,_0x2fb009||[]))['next']());});};class ListService{constructor(_0x4fa932){this['fetch']=_0x4fa932;}['create'](_0x8533e2,_0x2f2676,_0x2f2fca,_0x12ee2f){return __awaiter$6(this,void 0,void 0,function*(){const _0x594ae0='List',_0x2b5fa3={'account_name':_0x8533e2,'list_name':_0x2f2676,'search_service_name':_0x2f2fca};try{const _0x3eb578=yield this['fetch']['post'](_0x594ae0,_0x12ee2f,_0x2b5fa3);if(_0x3eb578['status']>0xc7&&_0x3eb578['status']<0x12c){const _0x500b07=yield _0x3eb578['json']();return new SuccessfulListIdentityResponse(_0x500b07);}const _0x2a8be7=yield _0x3eb578['json']();return new FailedListIdentityResponse(_0x2a8be7);}catch(_0x5c6797){if(_0x5c6797 instanceof Error)return new FailedListIdentityResponse({'detail':_0x5c6797['message'],'title':_0x5c6797['name'],'status':0x1f4,'instance':'','type':''});throw _0x5c6797;}});}['delete'](_0x483e53,_0x16237f,_0x9c4d38){return __awaiter$6(this,void 0,void 0,function*(){const _0x38060a='List/'+_0x483e53+'/'+_0x16237f,_0x4b3243=yield this['fetch']['delete'](_0x38060a,_0x9c4d38);try{if(_0x4b3243['status']>0xc7&&_0x4b3243['status']<0x12c)return new SuccessfulResponse({});const _0xaead70=yield _0x4b3243['json']();return new FailedResponse(_0xaead70);}catch(_0x3ca084){if(_0x3ca084 instanceof Error)return new FailedResponse({'detail':_0x3ca084['message'],'title':_0x3ca084['name'],'status':0x1f4,'instance':'','type':''});throw _0x3ca084;}});}['get'](_0x57c0bd,_0xd3bb2d,_0x437d75){return __awaiter$6(this,void 0,void 0,function*(){const _0x1243a7='List/'+_0x57c0bd+'/'+_0xd3bb2d;try{const _0x3431e1=yield this['fetch']['get'](_0x1243a7,_0x437d75);if(_0x3431e1['status']>0xc7&&_0x3431e1['status']<0x12c){const _0x4407e9=yield _0x3431e1['json']();return new SuccessfulListResponse(_0x4407e9);}const _0x20e37a=yield _0x3431e1['json']();return new FailedListResponse(_0x20e37a);}catch(_0x45afeb){if(_0x45afeb instanceof Error)return new FailedListResponse({'detail':_0x45afeb['message'],'title':_0x45afeb['name'],'status':0x1f4,'instance':'','type':''});throw _0x45afeb;}});}}
|
|
8
8
|
|
|
9
|
-
var __awaiter$5=undefined&&undefined['__awaiter']||function(
|
|
9
|
+
var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x4f8339,_0x3f546f,_0x5e1c37,_0x3fdfc3){function _0x2439cf(_0x5f1f12){return _0x5f1f12 instanceof _0x5e1c37?_0x5f1f12:new _0x5e1c37(function(_0x57a533){_0x57a533(_0x5f1f12);});}return new(_0x5e1c37||(_0x5e1c37=Promise))(function(_0x507c5c,_0x2bc699){function _0x4d9ebf(_0x2fa9b7){try{_0x5cf407(_0x3fdfc3['next'](_0x2fa9b7));}catch(_0xd198c7){_0x2bc699(_0xd198c7);}}function _0x4bdae7(_0x2f4639){try{_0x5cf407(_0x3fdfc3['throw'](_0x2f4639));}catch(_0x28f7bb){_0x2bc699(_0x28f7bb);}}function _0x5cf407(_0x2d3449){_0x2d3449['done']?_0x507c5c(_0x2d3449['value']):_0x2439cf(_0x2d3449['value'])['then'](_0x4d9ebf,_0x4bdae7);}_0x5cf407((_0x3fdfc3=_0x3fdfc3['apply'](_0x4f8339,_0x3f546f||[]))['next']());});};class Fetch{constructor(_0x149316){this['baseUri']=_0x149316,this['getUrl']=_0x276678=>{return _0x276678['startsWith']('/')&&(_0x276678=_0x276678['replace']('/','')),''+this['baseUri']+_0x276678;},!_0x149316['endsWith']('/')&&(_0x149316=_0x149316+'/');}['get'](_0x5d832f,_0x1bccd0){return __awaiter$5(this,void 0,void 0,function*(){const _0x506aa3=this['getUrl'](_0x5d832f);return yield fetch(_0x506aa3,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1bccd0}});});}['post'](_0x20205c,_0x10b817,_0x273dc2){return __awaiter$5(this,void 0,void 0,function*(){const _0x4b2ea2=this['getUrl'](_0x20205c);return yield fetch(_0x4b2ea2,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x10b817},'body':_0x273dc2?JSON['stringify'](_0x273dc2):null});});}['PostNoAuth'](_0x396280,_0x5d049a){return __awaiter$5(this,void 0,void 0,function*(){const _0x31d835=this['getUrl'](_0x396280);return yield fetch(_0x31d835,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0x5d049a?JSON['stringify'](_0x5d049a):null});});}['put'](_0x22e57f,_0x26598f,_0x5dd05a){return __awaiter$5(this,void 0,void 0,function*(){const _0x5cac25=this['getUrl'](_0x22e57f);return yield fetch(_0x5cac25,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x26598f},'body':_0x5dd05a?JSON['stringify'](_0x5dd05a):null});});}['delete'](_0x39e75e,_0x27f649){return __awaiter$5(this,void 0,void 0,function*(){const _0x2db98c=this['getUrl'](_0x39e75e);return yield fetch(_0x2db98c,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x27f649}});});}}
|
|
10
10
|
|
|
11
|
-
var __awaiter$4=undefined&&undefined['__awaiter']||function(
|
|
11
|
+
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x2dbd28,_0x8003fb,_0x1cdb8f,_0x3fcb63){function _0x5c03d4(_0xa4488d){return _0xa4488d instanceof _0x1cdb8f?_0xa4488d:new _0x1cdb8f(function(_0x11de53){_0x11de53(_0xa4488d);});}return new(_0x1cdb8f||(_0x1cdb8f=Promise))(function(_0x5d63e3,_0x80987c){function _0x413567(_0x4fa213){try{_0x3df8c4(_0x3fcb63['next'](_0x4fa213));}catch(_0x29baa2){_0x80987c(_0x29baa2);}}function _0x427728(_0x2a5986){try{_0x3df8c4(_0x3fcb63['throw'](_0x2a5986));}catch(_0x4cd8b6){_0x80987c(_0x4cd8b6);}}function _0x3df8c4(_0x299eec){_0x299eec['done']?_0x5d63e3(_0x299eec['value']):_0x5c03d4(_0x299eec['value'])['then'](_0x413567,_0x427728);}_0x3df8c4((_0x3fcb63=_0x3fcb63['apply'](_0x2dbd28,_0x8003fb||[]))['next']());});};class SearchServersService{constructor(_0x193000){this['fetch']=_0x193000,this['path']='search-services';}['create'](_0x4757d5,_0x3e25bd,_0x2a7858,_0x3af202,_0x315be0,_0x1e3212,_0x57e1b3,_0x1fda3d){return __awaiter$4(this,void 0,void 0,function*(){const _0x15d628={'account_name':_0x4757d5,'search_service_name':_0x3e25bd,'endpoint':_0x2a7858,'key':_0x3af202,'country':_0x315be0,'provider':_0x1e3212,'index_name':_0x57e1b3};try{const _0x176b32=yield this['fetch']['post'](this['path'],_0x1fda3d,_0x15d628);if(_0x176b32['status']>0xc7&&_0x176b32['status']<0x12c){const _0x20ffb5=yield _0x176b32['json']();return new SuccessfulSearchServiceResponse(_0x20ffb5);}const _0x3313b5=yield _0x176b32['json']();return new FailedSearchServiceResponse(_0x3313b5);}catch(_0x1a2e00){if(_0x1a2e00 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x1a2e00['message'],'title':_0x1a2e00['name'],'status':0x1f4,'instance':'','type':''});throw _0x1a2e00;}});}['delete'](_0xa504cf,_0x55a8b4,_0x2a0333){return __awaiter$4(this,void 0,void 0,function*(){const _0x47e5e4=this['path']+'/'+_0xa504cf+'/'+_0x55a8b4;try{const _0x2bed4d=yield this['fetch']['delete'](_0x47e5e4,_0x2a0333);if(_0x2bed4d['status']>0xc7&&_0x2bed4d['status']<0x12c)return new SuccessfulResponse({});const _0x31d6be=yield _0x2bed4d['json']();return new FailedResponse(_0x31d6be);}catch(_0x201fcf){if(_0x201fcf instanceof Error)return new FailedResponse({'detail':_0x201fcf['message'],'title':_0x201fcf['name'],'status':0x1f4,'instance':'','type':''});throw _0x201fcf;}});}['view'](_0x2c52f3,_0x5f2d37,_0x37fb60){return __awaiter$4(this,void 0,void 0,function*(){const _0x1a0a1d=this['path']+'/'+_0x2c52f3+'/'+_0x5f2d37;try{const _0xa6b738=yield this['fetch']['get'](_0x1a0a1d,_0x37fb60);if(_0xa6b738['status']>0xc7&&_0xa6b738['status']<0x12c){const _0x1ebab1=yield _0xa6b738['json']();return new SuccessfulViewSearchServiceResponse(_0x1ebab1);}const _0x423b90=yield _0xa6b738['json']();return new FailedViewSearchServiceResponse(_0x423b90);}catch(_0x141277){if(_0x141277 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x141277['message'],'title':_0x141277['name'],'status':0x1f4,'instance':'','type':''});throw _0x141277;}});}['edit'](_0x38e2a7,_0x26f4ba,_0x4b5192,_0x5deeeb,_0x3938a5){return __awaiter$4(this,void 0,void 0,function*(){const _0x34e2ed={'account_name':_0x38e2a7,'search_service_name':_0x26f4ba,'key':_0x4b5192,'country':_0x5deeeb};try{const _0x1b45e8=yield this['fetch']['put'](this['path'],_0x3938a5,_0x34e2ed);if(_0x1b45e8['status']>0xc7&&_0x1b45e8['status']<0x12c){const _0x562a75=yield _0x1b45e8['json']();return new SuccessfulSearchServiceResponse(_0x562a75);}const _0x1a17a0=yield _0x1b45e8['json']();return new FailedSearchServiceResponse(_0x1a17a0);}catch(_0x20b767){if(_0x20b767 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x20b767['message'],'title':_0x20b767['name'],'status':0x1f4,'instance':'','type':''});throw _0x20b767;}});}['list'](_0x1353a9,_0x310421){return __awaiter$4(this,void 0,void 0,function*(){const _0x20b018=this['path']+'/'+_0x1353a9;try{const _0x4ad1d8=yield this['fetch']['get'](_0x20b018,_0x310421);if(_0x4ad1d8['status']>0xc7&&_0x4ad1d8['status']<0x12c){const _0x3f44b2=yield _0x4ad1d8['json']();return new SuccessfulListSearchServiceResponse(_0x3f44b2);}const _0x2ca2c2=yield _0x4ad1d8['json']();return new FailedViewSearchServicesResponse(_0x2ca2c2);}catch(_0x4445f3){if(_0x4445f3 instanceof Error)return new FailedViewSearchServicesResponse({'detail':_0x4445f3['message'],'title':_0x4445f3['name'],'status':0x1f4,'instance':'','type':''});throw _0x4445f3;}});}}
|
|
12
12
|
|
|
13
|
-
var __awaiter$3=undefined&&undefined['__awaiter']||function(
|
|
13
|
+
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0xe0013a,_0xa853e7,_0x56ebff,_0x5a81dd){function _0x1af364(_0x532896){return _0x532896 instanceof _0x56ebff?_0x532896:new _0x56ebff(function(_0x13d892){_0x13d892(_0x532896);});}return new(_0x56ebff||(_0x56ebff=Promise))(function(_0x2c5400,_0x2ae913){function _0x5c4b33(_0x54b46a){try{_0x266b17(_0x5a81dd['next'](_0x54b46a));}catch(_0x42b4ef){_0x2ae913(_0x42b4ef);}}function _0x23a81a(_0x40dce3){try{_0x266b17(_0x5a81dd['throw'](_0x40dce3));}catch(_0x3ef4ae){_0x2ae913(_0x3ef4ae);}}function _0x266b17(_0x5c1e47){_0x5c1e47['done']?_0x2c5400(_0x5c1e47['value']):_0x1af364(_0x5c1e47['value'])['then'](_0x5c4b33,_0x23a81a);}_0x266b17((_0x5a81dd=_0x5a81dd['apply'](_0xe0013a,_0xa853e7||[]))['next']());});};class FacetService{constructor(_0x350b6b){this['fetch']=_0x350b6b,this['path']='facet';}['create'](_0x57b7f4,_0x3e1772,_0x4576c1,_0x239484){return __awaiter$3(this,void 0,void 0,function*(){const _0x5266ee={'account_name':_0x57b7f4,'list_name':_0x3e1772,'facet_name':_0x4576c1};try{const _0x3f40f5=yield this['fetch']['post'](this['path'],_0x239484,_0x5266ee);if(_0x3f40f5['status']>0xc7&&_0x3f40f5['status']<0x12c){const _0x595d73=yield _0x3f40f5['json']();return new SuccessfulFacetResponse(_0x595d73);}const _0x15778b=yield _0x3f40f5['json']();return new FailedFacetResponse(_0x15778b);}catch(_0x54e0a9){if(_0x54e0a9 instanceof Error)return new FailedFacetResponse({'detail':_0x54e0a9['message'],'title':_0x54e0a9['name'],'status':0x1f4,'instance':'','type':''});throw _0x54e0a9;}});}['remove'](_0x193d55,_0x591305,_0x218b3a,_0x12aa27){return __awaiter$3(this,void 0,void 0,function*(){const _0x525ea6='Facet/'+_0x193d55+'/'+_0x591305+'/'+_0x218b3a,_0x30b8c0=yield this['fetch']['delete'](_0x525ea6,_0x12aa27);try{if(_0x30b8c0['status']>0xc7&&_0x30b8c0['status']<0x12c)return new SuccessfulResponse({});const _0xd90217=yield _0x30b8c0['json']();return new FailedResponse(_0xd90217);}catch(_0xaf184a){if(_0xaf184a instanceof Error)return new FailedResponse({'detail':_0xaf184a['message'],'title':_0xaf184a['name'],'status':0x1f4,'instance':'','type':''});throw _0xaf184a;}});}['rename'](_0x1cdbc8,_0x5e9040,_0x4ad203,_0x32bf9b,_0x2343dc){return __awaiter$3(this,void 0,void 0,function*(){const _0x484bea={'account_name':_0x1cdbc8,'list_name':_0x5e9040,'facet_name':_0x4ad203,'new_facet_name':_0x32bf9b};try{const _0x1db151=yield this['fetch']['put'](this['path'],_0x2343dc,_0x484bea);if(_0x1db151['status']>0xc7&&_0x1db151['status']<0x12c){const _0x347202=yield _0x1db151['json']();return new SuccessfulFacetResponse(_0x347202);}const _0x3df560=yield _0x1db151['json']();return new FailedFacetResponse(_0x3df560);}catch(_0x269411){if(_0x269411 instanceof Error)return new FailedFacetResponse({'detail':_0x269411['message'],'title':_0x269411['name'],'status':0x1f4,'instance':'','type':''});throw _0x269411;}});}}
|
|
14
14
|
|
|
15
|
-
var __awaiter$2=undefined&&undefined['__awaiter']||function(
|
|
15
|
+
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x1ebd07,_0x1c815a,_0x51c76,_0x69b3eb){function _0x51ac61(_0x1d74a6){return _0x1d74a6 instanceof _0x51c76?_0x1d74a6:new _0x51c76(function(_0x3a6554){_0x3a6554(_0x1d74a6);});}return new(_0x51c76||(_0x51c76=Promise))(function(_0x13c2ad,_0x5474d6){function _0x292726(_0x5c0a72){try{_0x4dbe02(_0x69b3eb['next'](_0x5c0a72));}catch(_0x293dff){_0x5474d6(_0x293dff);}}function _0x584177(_0x116a28){try{_0x4dbe02(_0x69b3eb['throw'](_0x116a28));}catch(_0x429809){_0x5474d6(_0x429809);}}function _0x4dbe02(_0x2b7ce2){_0x2b7ce2['done']?_0x13c2ad(_0x2b7ce2['value']):_0x51ac61(_0x2b7ce2['value'])['then'](_0x292726,_0x584177);}_0x4dbe02((_0x69b3eb=_0x69b3eb['apply'](_0x1ebd07,_0x1c815a||[]))['next']());});};class SearchResultService{constructor(_0x22eef7){this['fetch']=_0x22eef7,this['path']='search-result';}['create'](_0x10e499,_0x2527f2,_0x3c8314,_0xfed069,_0x23cdf){return __awaiter$2(this,void 0,void 0,function*(){_0x23cdf=_0x23cdf!==null&&_0x23cdf!==void 0?_0x23cdf:{'description':'','keywords':'','resource_1':'','resource_2':'','resource_3':'','latitude':0x0,'longitude':0x0,'facets':[]};const _0x4717f1=Object['assign']({'account_name':_0x10e499,'search_result_name':_0x3c8314,'list_name':_0x2527f2},_0x23cdf);try{const _0x360a2c=yield this['fetch']['post'](this['path'],_0xfed069,_0x4717f1);if(_0x360a2c['status']>0xc7&&_0x360a2c['status']<0x12c){const _0x574998=yield _0x360a2c['json']();return new SuccessfulViewSearchResultResponse(_0x574998);}const _0x11c8d3=yield _0x360a2c['json']();return new FailedSearchResultResponse(_0x11c8d3);}catch(_0x45f9c0){if(_0x45f9c0 instanceof Error)return new FailedSearchResultResponse({'detail':_0x45f9c0['message'],'title':_0x45f9c0['name'],'status':0x1f4,'instance':'','type':''});throw _0x45f9c0;}});}['transfer'](_0x55ecff,_0x159291,_0x496f95,_0x1e13b0){return __awaiter$2(this,void 0,void 0,function*(){const _0x235bfd={'account_name':_0x55ecff,'list_name':_0x159291,'new_search_service_name':_0x496f95};try{const _0x30b4e9=yield this['fetch']['post'](this['path']+'/transfer',_0x1e13b0,_0x235bfd);if(_0x30b4e9['status']>0xc7&&_0x30b4e9['status']<0x12c){const _0x3f4249=yield _0x30b4e9['json']();return new SuccessfulListResponse(_0x3f4249);}const _0x210a34=yield _0x30b4e9['json']();return new FailedListResponse(_0x210a34);}catch(_0x7a5adb){if(_0x7a5adb instanceof Error)return new FailedListResponse({'detail':_0x7a5adb['message'],'title':_0x7a5adb['name'],'status':0x1f4,'instance':'','type':''});throw _0x7a5adb;}});}['list'](_0x20d148,_0x5d048c,_0x3dfb78,_0x1d43cb){return __awaiter$2(this,void 0,void 0,function*(){let _0x2dd149=this['path']+'/'+_0x20d148+'/'+_0x5d048c;const _0x57ba8c=[];(_0x1d43cb===null||_0x1d43cb===void 0?void 0:_0x1d43cb['size'])&&_0x57ba8c['push']('size='+_0x1d43cb['size']);(_0x1d43cb===null||_0x1d43cb===void 0?void 0:_0x1d43cb['skip'])&&_0x57ba8c['push']('skip='+_0x1d43cb['skip']);(_0x1d43cb===null||_0x1d43cb===void 0?void 0:_0x1d43cb['query'])&&_0x57ba8c['push']('query='+_0x1d43cb['query']);(_0x1d43cb===null||_0x1d43cb===void 0?void 0:_0x1d43cb['filter'])&&_0x57ba8c['push']('filter='+_0x1d43cb['filter']);_0x57ba8c['length']>0x0&&_0x57ba8c['forEach']((_0x44e004,_0x3b5ea5)=>{_0x3b5ea5===0x0?_0x2dd149+='?':_0x2dd149+='&',_0x2dd149+=_0x44e004;});try{const _0x1fdff9=yield this['fetch']['get'](_0x2dd149,_0x3dfb78);if(_0x1fdff9['status']>0xc7&&_0x1fdff9['status']<0x12c){const _0x4b2d7d=yield _0x1fdff9['json']();return new SuccessfulListSearchResultResponse(_0x4b2d7d);}const _0x2a8671=yield _0x1fdff9['json']();return new FailedViewSearchResultResponse(_0x2a8671);}catch(_0x12f83c){if(_0x12f83c instanceof Error)return new FailedViewSearchResultResponse({'detail':_0x12f83c['message'],'title':_0x12f83c['name'],'status':0x1f4,'instance':'','type':''});throw _0x12f83c;}});}}
|
|
16
16
|
|
|
17
|
-
var __awaiter$1=undefined&&undefined['__awaiter']||function(
|
|
17
|
+
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x4fef08,_0x1d3e2f,_0x52f9fe,_0x432a2e){function _0x58b31c(_0x139794){return _0x139794 instanceof _0x52f9fe?_0x139794:new _0x52f9fe(function(_0x15082e){_0x15082e(_0x139794);});}return new(_0x52f9fe||(_0x52f9fe=Promise))(function(_0x1e654e,_0x58bdbe){function _0x12b0f4(_0x28b056){try{_0x5c2633(_0x432a2e['next'](_0x28b056));}catch(_0x5829fe){_0x58bdbe(_0x5829fe);}}function _0x216660(_0x2878de){try{_0x5c2633(_0x432a2e['throw'](_0x2878de));}catch(_0x4b9134){_0x58bdbe(_0x4b9134);}}function _0x5c2633(_0x6d65f7){_0x6d65f7['done']?_0x1e654e(_0x6d65f7['value']):_0x58b31c(_0x6d65f7['value'])['then'](_0x12b0f4,_0x216660);}_0x5c2633((_0x432a2e=_0x432a2e['apply'](_0x4fef08,_0x1d3e2f||[]))['next']());});};class ContributorService{constructor(_0x2d8aed){this['fetch']=_0x2d8aed,this['path']='contributor';}['create'](_0x5ef588,_0x1466a6,_0x327ec0,_0x39e448){return __awaiter$1(this,void 0,void 0,function*(){const _0x56ebd6={'account_name':_0x5ef588,'list_name':_0x1466a6,'contributor_name':_0x327ec0};try{const _0x2ca2b0=yield this['fetch']['post'](this['path'],_0x39e448,_0x56ebd6);if(_0x2ca2b0['status']>0xc7&&_0x2ca2b0['status']<0x12c){const _0x2efdd1=yield _0x2ca2b0['json']();return new SuccessfulContributorResponse(_0x2efdd1);}const _0x40d636=yield _0x2ca2b0['json']();return new FailedContributorResponse(_0x40d636);}catch(_0x76bed6){if(_0x76bed6 instanceof Error)return new FailedContributorResponse({'detail':_0x76bed6['message'],'title':_0x76bed6['name'],'status':0x1f4,'instance':'','type':''});throw _0x76bed6;}});}['remove'](_0x559475,_0x1c0210,_0x29516c,_0x38bd0c){return __awaiter$1(this,void 0,void 0,function*(){const _0x594c80=this['path']+'/'+_0x559475+'/'+_0x1c0210+'/'+_0x29516c,_0x3c0dbc=yield this['fetch']['delete'](_0x594c80,_0x38bd0c);try{if(_0x3c0dbc['status']>0xc7&&_0x3c0dbc['status']<0x12c)return new SuccessfulResponse({});const _0x390c19=yield _0x3c0dbc['json']();return new FailedResponse(_0x390c19);}catch(_0x264258){if(_0x264258 instanceof Error)return new FailedResponse({'detail':_0x264258['message'],'title':_0x264258['name'],'status':0x1f4,'instance':'','type':''});throw _0x264258;}});}['startsWith'](_0x5d07bc,_0x24c2ce){return __awaiter$1(this,void 0,void 0,function*(){const _0x5a33d2=this['path']+'/'+_0x5d07bc;try{const _0x872275=yield this['fetch']['get'](_0x5a33d2,_0x24c2ce);if(_0x872275['status']>0xc7&&_0x872275['status']<0x12c){const _0x190b16=yield _0x872275['json']();return new SuccessfulAccountAndImageResponse(_0x190b16);}const _0x296d19=yield _0x872275['json']();return new FailedAccountAndImageResponse(_0x296d19);}catch(_0x423075){if(_0x423075 instanceof Error)return new FailedAccountAndImageResponse({'detail':_0x423075['message'],'title':_0x423075['name'],'status':0x1f4,'instance':'','type':''});throw _0x423075;}});}}
|
|
18
18
|
|
|
19
|
-
var __awaiter=undefined&&undefined['__awaiter']||function(
|
|
19
|
+
var __awaiter=undefined&&undefined['__awaiter']||function(_0x1b31fd,_0x1457f7,_0x5bdd19,_0x44644f){function _0x40636c(_0x210e90){return _0x210e90 instanceof _0x5bdd19?_0x210e90:new _0x5bdd19(function(_0x44130f){_0x44130f(_0x210e90);});}return new(_0x5bdd19||(_0x5bdd19=Promise))(function(_0x2f5c77,_0x48e336){function _0x406271(_0x3d6f72){try{_0x5b4d02(_0x44644f['next'](_0x3d6f72));}catch(_0x2cecac){_0x48e336(_0x2cecac);}}function _0xd9be23(_0x2a6894){try{_0x5b4d02(_0x44644f['throw'](_0x2a6894));}catch(_0x5c081c){_0x48e336(_0x5c081c);}}function _0x5b4d02(_0xf5768a){_0xf5768a['done']?_0x2f5c77(_0xf5768a['value']):_0x40636c(_0xf5768a['value'])['then'](_0x406271,_0xd9be23);}_0x5b4d02((_0x44644f=_0x44644f['apply'](_0x1b31fd,_0x1457f7||[]))['next']());});};class AdminClient{constructor(_0x4adfe9='https://admin.searchability.dev/'){var _0x4d6a85=new Fetch(_0x4adfe9);this['Accounts']=new AccountService(_0x4d6a85),this['Lists']=new ListService(_0x4d6a85),this['ApiKeys']=new ApiKeyService(_0x4d6a85),this['SearchServers']=new SearchServersService(_0x4d6a85),this['Facets']=new FacetService(_0x4d6a85),this['SearchResults']=new SearchResultService(_0x4d6a85),this['Contributors']=new ContributorService(_0x4d6a85);}}class AuthClient{constructor(_0x57fa9e='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x57fa9e);}['login'](_0x932423){return __awaiter(this,void 0,void 0,function*(){const _0x2c122e='login/'+_0x932423;try{const _0x9fcdb7=yield yield fetch(_0x2c122e);if(_0x9fcdb7['status']>0xc7&&_0x9fcdb7['status']<0x12c){const _0x3b7a88=yield _0x9fcdb7['json']();return new SuccessfulAuthResponse(_0x3b7a88);}const _0xa4fc6f=yield _0x9fcdb7['json']();return new FailedAuthResponse(_0xa4fc6f);}catch(_0x18974e){if(_0x18974e instanceof Error)return new FailedAuthResponse({'detail':_0x18974e['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x18974e;}});}['refresh'](_0x22e7e9){return __awaiter(this,void 0,void 0,function*(){const _0x162a4f='refresh',_0xf8ca9d={'refresh_token':_0x22e7e9};try{const _0x13a32b=yield this['fetch']['PostNoAuth'](_0x162a4f,_0xf8ca9d);if(_0x13a32b['status']>0xc7&&_0x13a32b['status']<0x12c){const _0x32ce4d=yield _0x13a32b['json']();return new SuccessfulAuthResponse(_0x32ce4d);}const _0x37e94a=yield _0x13a32b['json']();return new FailedAuthResponse(_0x37e94a);}catch(_0x3046d3){if(_0x3046d3 instanceof Error)return new FailedAuthResponse({'detail':_0x3046d3['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x3046d3;}});}['getTokenStatus'](_0x5627cb){if(Date['now']()<_0x5627cb['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x5627cb['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
|
|
20
20
|
|
|
21
21
|
export { AdminClient, AuthClient, TokenStatus, Tokens };
|
package/dist/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
var TokenStatus;(function(_0x49ee63){_0x49ee63[_0x49ee63['Ok']=0x0]='Ok',_0x49ee63[_0x49ee63['Refresh']=0x1]='Refresh',_0x49ee63[_0x49ee63['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(_0x512f3d){this['isSuccess']=_0x512f3d;}}class SuccessfulContributorResponse extends Response{constructor(_0x2a3d32){super(!![]),this['contributor']=_0x2a3d32;}['toSuccess'](){return this['contributor'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedContributorResponse extends Response{constructor(_0x294c21){super(![]),this['problem']=_0x294c21;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountAndImageResponse extends Response{constructor(_0x3214a9){super(!![]),this['accountAndImages']=_0x3214a9;}['toSuccess'](){return this['accountAndImages'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountAndImageResponse extends Response{constructor(_0x50604d){super(![]),this['problem']=_0x50604d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulFacetResponse extends Response{constructor(_0x4f0880){super(!![]),this['facet']=_0x4f0880;}['toSuccess'](){return this['facet'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetResponse extends Response{constructor(_0x56dff8){super(![]),this['problem']=_0x56dff8;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountResponse extends Response{constructor(_0x2b2be4){super(!![]),this['account']=_0x2b2be4;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountImageResponse extends Response{constructor(_0x59d98){super(!![]),this['accountImage']=_0x59d98;}['toSuccess'](){return this['accountImage'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListIdentityResponse extends Response{constructor(_0x5c22d0){super(!![]),this['list']=_0x5c22d0;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListResponse extends Response{constructor(_0x5d9d8f){super(!![]),this['list']=_0x5d9d8f;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x386de4){super(![]),this['problem']=_0x386de4;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountImageResponse extends Response{constructor(_0x5d16ab){super(![]),this['problem']=_0x5d16ab;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListIdentityResponse extends Response{constructor(_0x500440){super(![]),this['problem']=_0x500440;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListResponse extends Response{constructor(_0x4cd20b){super(![]),this['problem']=_0x4cd20b;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x443cc0){super(!![]),this['tokens']=_0x443cc0;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x4509b0){super(![]),this['problem']=_0x4509b0;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x3065cb){super(!![]),this['apiKey']=_0x3065cb;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x1cf612){super(![]),this['problem']=_0x1cf612;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x5945a7){super(!![]),this['searchService']=_0x5945a7;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0xe0d12b){super(![]),this['problem']=_0xe0d12b;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x387628){super(!![]),this['searchService']=_0x387628;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulViewSearchResultResponse extends Response{constructor(_0x2ca0b1){super(!![]),this['searchResult']=_0x2ca0b1;}['toSuccess'](){return this['searchResult'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchResultResponse extends Response{constructor(_0x41f388){super(![]),this['problem']=_0x41f388;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchResultResponse extends Response{constructor(_0xefe137){super(!![]),this['searchResults']=_0xefe137;}['toSuccess'](){return this['searchResults'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchResultResponse extends Response{constructor(_0x206c44){super(![]),this['problem']=_0x206c44;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchServiceResponse extends Response{constructor(_0x1f7e39){super(!![]),this['searchServices']=_0x1f7e39;}['toSuccess'](){return this['searchServices'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServicesResponse extends Response{constructor(_0x4c65fb){super(![]),this['problem']=_0x4c65fb;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedViewSearchServiceResponse extends Response{constructor(_0x3a18f2){super(![]),this['problem']=_0x3a18f2;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x240975){super(!![]),this['apiKeyValue']=_0x240975;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x3d40da){super(!![]),this['obj']=_0x3d40da;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x363cd3){super(![]),this['problem']=_0x363cd3;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x5c4e71){super(![]),this['problem']=_0x5c4e71;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
|
|
2
|
-
|
|
3
|
-
var __awaiter$8=undefined&&undefined['__awaiter']||function(_0x364917,_0x1a58f4,_0x28ec65,_0x43c674){function _0x411605(_0x5a6665){return _0x5a6665 instanceof _0x28ec65?_0x5a6665:new _0x28ec65(function(_0x5929ec){_0x5929ec(_0x5a6665);});}return new(_0x28ec65||(_0x28ec65=Promise))(function(_0x4395a4,_0x405f74){function _0x26f3bb(_0x43bcb8){try{_0x42fd57(_0x43c674['next'](_0x43bcb8));}catch(_0x2eadf5){_0x405f74(_0x2eadf5);}}function _0x2226df(_0x33ce6f){try{_0x42fd57(_0x43c674['throw'](_0x33ce6f));}catch(_0x306763){_0x405f74(_0x306763);}}function _0x42fd57(_0x36fc0d){_0x36fc0d['done']?_0x4395a4(_0x36fc0d['value']):_0x411605(_0x36fc0d['value'])['then'](_0x26f3bb,_0x2226df);}_0x42fd57((_0x43c674=_0x43c674['apply'](_0x364917,_0x1a58f4||[]))['next']());});};class AccountService{constructor(_0x3df75b){this['fetch']=_0x3df75b;}['get'](_0x4ed3fe,_0x208f4b){return __awaiter$8(this,void 0,void 0,function*(){const _0x5ec91c='Account/'+_0x4ed3fe+'/',_0x5ab7b2=yield this['fetch']['get'](_0x5ec91c,_0x208f4b);try{if(_0x5ab7b2['status']>0xc7&&_0x5ab7b2['status']<0x12c){const _0x264475=yield _0x5ab7b2['json']();return new SuccessfulAccountResponse(_0x264475);}const _0x49639b=yield _0x5ab7b2['json']();return new FailedAccountResponse(_0x49639b);}catch(_0xd41f2d){if(_0xd41f2d instanceof Error)return new FailedAccountResponse({'detail':_0xd41f2d['message'],'title':_0xd41f2d['name'],'status':0x1f4,'instance':'','type':''});throw _0xd41f2d;}});}['getImage'](_0x550aa2,_0x126517){return __awaiter$8(this,void 0,void 0,function*(){const _0x225c02='account/image/'+_0x550aa2+'/',_0x3416aa=yield this['fetch']['get'](_0x225c02,_0x126517);try{if(_0x3416aa['status']>0xc7&&_0x3416aa['status']<0x12c){const _0x5ce1ac=yield _0x3416aa['json']();return new SuccessfulAccountImageResponse(_0x5ce1ac);}const _0x20381f=yield _0x3416aa['json']();return new FailedAccountImageResponse(_0x20381f);}catch(_0x208299){if(_0x208299 instanceof Error)return new FailedAccountImageResponse({'detail':_0x208299['message'],'title':_0x208299['name'],'status':0x1f4,'instance':'','type':''});throw _0x208299;}});}}
|
|
4
|
-
|
|
5
|
-
var __awaiter$7=undefined&&undefined['__awaiter']||function(_0x208e39,_0x245b73,_0x33707c,_0x277714){function _0x3a15ad(_0x11faec){return _0x11faec instanceof _0x33707c?_0x11faec:new _0x33707c(function(_0x42480b){_0x42480b(_0x11faec);});}return new(_0x33707c||(_0x33707c=Promise))(function(_0xc6a12f,_0xc758cd){function _0x53c1df(_0x2d851e){try{_0x4aebe8(_0x277714['next'](_0x2d851e));}catch(_0x1278e6){_0xc758cd(_0x1278e6);}}function _0x531fa7(_0x511cb3){try{_0x4aebe8(_0x277714['throw'](_0x511cb3));}catch(_0x740560){_0xc758cd(_0x740560);}}function _0x4aebe8(_0x7ba385){_0x7ba385['done']?_0xc6a12f(_0x7ba385['value']):_0x3a15ad(_0x7ba385['value'])['then'](_0x53c1df,_0x531fa7);}_0x4aebe8((_0x277714=_0x277714['apply'](_0x208e39,_0x245b73||[]))['next']());});};class ApiKeyService{constructor(_0x33467f){this['fetch']=_0x33467f,this['path']='api-key';}['create'](_0x28f7be,_0x7e7372,_0x3c5c33){return __awaiter$7(this,void 0,void 0,function*(){const _0xba4109={'account_name':_0x28f7be,'api_key_name':_0x7e7372};try{const _0x83ceba=yield this['fetch']['post'](this['path'],_0x3c5c33,_0xba4109);if(_0x83ceba['status']>0xc7&&_0x83ceba['status']<0x12c){const _0x549a81=yield _0x83ceba['json']();return new SuccessfulApiKeyResponse(_0x549a81);}const _0x290b32=yield _0x83ceba['json']();return new FailedApiKeyResponse(_0x290b32);}catch(_0x706605){if(_0x706605 instanceof Error)return new FailedApiKeyResponse({'detail':_0x706605['message'],'title':_0x706605['name'],'status':0x1f4,'instance':'','type':''});throw _0x706605;}});}['view'](_0x504041,_0x4c8332,_0x2b639d){return __awaiter$7(this,void 0,void 0,function*(){const _0x37679e=this['path']+'/'+_0x504041+'/'+_0x4c8332;try{const _0x1e3bc6=yield this['fetch']['get'](_0x37679e,_0x2b639d);if(_0x1e3bc6['status']>0xc7&&_0x1e3bc6['status']<0x12c){const _0x4ee790=yield _0x1e3bc6['json']();return new SuccessfulApiKeyValueResponse(_0x4ee790);}const _0x5994f5=yield _0x1e3bc6['json']();return new FailedApiKeyValueResponse(_0x5994f5);}catch(_0x112fd3){if(_0x112fd3 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x112fd3['message'],'title':_0x112fd3['name'],'status':0x1f4,'instance':'','type':''});throw _0x112fd3;}});}['delete'](_0x2e97db,_0x45761f,_0x23d6c7){return __awaiter$7(this,void 0,void 0,function*(){const _0x1bd89b=this['path']+'/'+_0x2e97db+'/'+_0x45761f;try{const _0x3220d5=yield this['fetch']['delete'](_0x1bd89b,_0x23d6c7);if(_0x3220d5['status']>0xc7&&_0x3220d5['status']<0x12c)return new SuccessfulResponse({});const _0x34afc7=yield _0x3220d5['json']();return new FailedResponse(_0x34afc7);}catch(_0x3a547d){if(_0x3a547d instanceof Error)return new FailedResponse({'detail':_0x3a547d['message'],'title':_0x3a547d['name'],'status':0x1f4,'instance':'','type':''});throw _0x3a547d;}});}}
|
|
6
|
-
|
|
7
|
-
var __awaiter$6=undefined&&undefined['__awaiter']||function(_0x2c4271,_0x4bf633,_0x3264a4,_0xd1067a){function _0x293cfe(_0x391953){return _0x391953 instanceof _0x3264a4?_0x391953:new _0x3264a4(function(_0xf1ad03){_0xf1ad03(_0x391953);});}return new(_0x3264a4||(_0x3264a4=Promise))(function(_0x20a4e4,_0x2b80f5){function _0x5695e5(_0x219080){try{_0x448c7a(_0xd1067a['next'](_0x219080));}catch(_0x2d8b15){_0x2b80f5(_0x2d8b15);}}function _0x4ce01e(_0x33869d){try{_0x448c7a(_0xd1067a['throw'](_0x33869d));}catch(_0x13f0ef){_0x2b80f5(_0x13f0ef);}}function _0x448c7a(_0x213525){_0x213525['done']?_0x20a4e4(_0x213525['value']):_0x293cfe(_0x213525['value'])['then'](_0x5695e5,_0x4ce01e);}_0x448c7a((_0xd1067a=_0xd1067a['apply'](_0x2c4271,_0x4bf633||[]))['next']());});};class ListService{constructor(_0x41b8d0){this['fetch']=_0x41b8d0;}['create'](_0x47fae6,_0x52ce55,_0x4a840d,_0x481631){return __awaiter$6(this,void 0,void 0,function*(){const _0xd4246c='List',_0x1ba034={'account_name':_0x47fae6,'list_name':_0x52ce55,'search_service_name':_0x4a840d};try{const _0x46e675=yield this['fetch']['post'](_0xd4246c,_0x481631,_0x1ba034);if(_0x46e675['status']>0xc7&&_0x46e675['status']<0x12c){const _0x23c233=yield _0x46e675['json']();return new SuccessfulListIdentityResponse(_0x23c233);}const _0x33ec1e=yield _0x46e675['json']();return new FailedListIdentityResponse(_0x33ec1e);}catch(_0x41636d){if(_0x41636d instanceof Error)return new FailedListIdentityResponse({'detail':_0x41636d['message'],'title':_0x41636d['name'],'status':0x1f4,'instance':'','type':''});throw _0x41636d;}});}['delete'](_0x3b9846,_0x19595b,_0x18960a){return __awaiter$6(this,void 0,void 0,function*(){const _0x3b604e='List/'+_0x3b9846+'/'+_0x19595b,_0x26d7b1=yield this['fetch']['delete'](_0x3b604e,_0x18960a);try{if(_0x26d7b1['status']>0xc7&&_0x26d7b1['status']<0x12c)return new SuccessfulResponse({});const _0x4fc52d=yield _0x26d7b1['json']();return new FailedResponse(_0x4fc52d);}catch(_0x5623c8){if(_0x5623c8 instanceof Error)return new FailedResponse({'detail':_0x5623c8['message'],'title':_0x5623c8['name'],'status':0x1f4,'instance':'','type':''});throw _0x5623c8;}});}['get'](_0x54b8c4,_0x3f71ad,_0x3193ca){return __awaiter$6(this,void 0,void 0,function*(){const _0x3fefa3='List/'+_0x54b8c4+'/'+_0x3f71ad;try{const _0x1a01cf=yield this['fetch']['get'](_0x3fefa3,_0x3193ca);if(_0x1a01cf['status']>0xc7&&_0x1a01cf['status']<0x12c){const _0x2dba01=yield _0x1a01cf['json']();return new SuccessfulListResponse(_0x2dba01);}const _0x2a4b15=yield _0x1a01cf['json']();return new FailedListResponse(_0x2a4b15);}catch(_0x2e93a7){if(_0x2e93a7 instanceof Error)return new FailedListResponse({'detail':_0x2e93a7['message'],'title':_0x2e93a7['name'],'status':0x1f4,'instance':'','type':''});throw _0x2e93a7;}});}}
|
|
8
|
-
|
|
9
|
-
var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x46a99f,_0xda8ed6,_0x1000ae,_0x5514dd){function _0x4afccc(_0x593bbe){return _0x593bbe instanceof _0x1000ae?_0x593bbe:new _0x1000ae(function(_0x50649f){_0x50649f(_0x593bbe);});}return new(_0x1000ae||(_0x1000ae=Promise))(function(_0x3e145a,_0x50c332){function _0x417b72(_0x5ada5a){try{_0x5b5f9f(_0x5514dd['next'](_0x5ada5a));}catch(_0x2b2a06){_0x50c332(_0x2b2a06);}}function _0x252a39(_0x530227){try{_0x5b5f9f(_0x5514dd['throw'](_0x530227));}catch(_0x2a54fc){_0x50c332(_0x2a54fc);}}function _0x5b5f9f(_0x4888b6){_0x4888b6['done']?_0x3e145a(_0x4888b6['value']):_0x4afccc(_0x4888b6['value'])['then'](_0x417b72,_0x252a39);}_0x5b5f9f((_0x5514dd=_0x5514dd['apply'](_0x46a99f,_0xda8ed6||[]))['next']());});};class Fetch{constructor(_0x595a0b){this['baseUri']=_0x595a0b,this['getUrl']=_0x5245b1=>{return _0x5245b1['startsWith']('/')&&(_0x5245b1=_0x5245b1['replace']('/','')),''+this['baseUri']+_0x5245b1;},!_0x595a0b['endsWith']('/')&&(_0x595a0b=_0x595a0b+'/');}['get'](_0x3c5018,_0x4f2b07){return __awaiter$5(this,void 0,void 0,function*(){const _0x3df70a=this['getUrl'](_0x3c5018);return yield fetch(_0x3df70a,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4f2b07}});});}['post'](_0x1fb7a1,_0x18876e,_0x5310c0){return __awaiter$5(this,void 0,void 0,function*(){const _0x2cfede=this['getUrl'](_0x1fb7a1);return yield fetch(_0x2cfede,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x18876e},'body':_0x5310c0?JSON['stringify'](_0x5310c0):null});});}['PostNoAuth'](_0xe2b64c,_0x56ceed){return __awaiter$5(this,void 0,void 0,function*(){const _0x3d3bb7=this['getUrl'](_0xe2b64c);return yield fetch(_0x3d3bb7,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0x56ceed?JSON['stringify'](_0x56ceed):null});});}['put'](_0xf3b61d,_0x3fc179,_0x303467){return __awaiter$5(this,void 0,void 0,function*(){const _0x4e8f67=this['getUrl'](_0xf3b61d);return yield fetch(_0x4e8f67,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3fc179},'body':_0x303467?JSON['stringify'](_0x303467):null});});}['delete'](_0x587025,_0x5cc1e9){return __awaiter$5(this,void 0,void 0,function*(){const _0x2cdfc0=this['getUrl'](_0x587025);return yield fetch(_0x2cdfc0,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x5cc1e9}});});}}
|
|
10
|
-
|
|
11
|
-
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x50fb9f,_0xd69bb,_0x41fece,_0x5c8728){function _0x7b44dc(_0x278a52){return _0x278a52 instanceof _0x41fece?_0x278a52:new _0x41fece(function(_0x2b3b7c){_0x2b3b7c(_0x278a52);});}return new(_0x41fece||(_0x41fece=Promise))(function(_0x1b9486,_0x4d994e){function _0x3f0241(_0x158589){try{_0xdb1e5(_0x5c8728['next'](_0x158589));}catch(_0x1795e8){_0x4d994e(_0x1795e8);}}function _0x52f301(_0x1bc714){try{_0xdb1e5(_0x5c8728['throw'](_0x1bc714));}catch(_0x110f1f){_0x4d994e(_0x110f1f);}}function _0xdb1e5(_0x1cac81){_0x1cac81['done']?_0x1b9486(_0x1cac81['value']):_0x7b44dc(_0x1cac81['value'])['then'](_0x3f0241,_0x52f301);}_0xdb1e5((_0x5c8728=_0x5c8728['apply'](_0x50fb9f,_0xd69bb||[]))['next']());});};class SearchServersService{constructor(_0x10a753){this['fetch']=_0x10a753,this['path']='search-services';}['create'](_0x583383,_0xde75f,_0x33dbbe,_0xd51115,_0x42ef2a,_0x1e38a9,_0x1ce29a,_0x26a5f3){return __awaiter$4(this,void 0,void 0,function*(){const _0x19e8b2={'account_name':_0x583383,'search_service_name':_0xde75f,'endpoint':_0x33dbbe,'key':_0xd51115,'country':_0x42ef2a,'provider':_0x1e38a9,'index_name':_0x1ce29a};try{const _0x4b25b4=yield this['fetch']['post'](this['path'],_0x26a5f3,_0x19e8b2);if(_0x4b25b4['status']>0xc7&&_0x4b25b4['status']<0x12c){const _0x59a5ea=yield _0x4b25b4['json']();return new SuccessfulSearchServiceResponse(_0x59a5ea);}const _0xf64b90=yield _0x4b25b4['json']();return new FailedSearchServiceResponse(_0xf64b90);}catch(_0x5d019e){if(_0x5d019e instanceof Error)return new FailedSearchServiceResponse({'detail':_0x5d019e['message'],'title':_0x5d019e['name'],'status':0x1f4,'instance':'','type':''});throw _0x5d019e;}});}['delete'](_0x4d94d4,_0x2703bc,_0x26c3f8){return __awaiter$4(this,void 0,void 0,function*(){const _0x37b151=this['path']+'/'+_0x4d94d4+'/'+_0x2703bc;try{const _0x5dcb85=yield this['fetch']['delete'](_0x37b151,_0x26c3f8);if(_0x5dcb85['status']>0xc7&&_0x5dcb85['status']<0x12c)return new SuccessfulResponse({});const _0x351acc=yield _0x5dcb85['json']();return new FailedResponse(_0x351acc);}catch(_0x51299c){if(_0x51299c instanceof Error)return new FailedResponse({'detail':_0x51299c['message'],'title':_0x51299c['name'],'status':0x1f4,'instance':'','type':''});throw _0x51299c;}});}['view'](_0x216f5e,_0x2ade61,_0x2c07af){return __awaiter$4(this,void 0,void 0,function*(){const _0x50325d=this['path']+'/'+_0x216f5e+'/'+_0x2ade61;try{const _0x3e4581=yield this['fetch']['get'](_0x50325d,_0x2c07af);if(_0x3e4581['status']>0xc7&&_0x3e4581['status']<0x12c){const _0x424217=yield _0x3e4581['json']();return new SuccessfulViewSearchServiceResponse(_0x424217);}const _0x15e434=yield _0x3e4581['json']();return new FailedViewSearchServiceResponse(_0x15e434);}catch(_0x57e03c){if(_0x57e03c instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x57e03c['message'],'title':_0x57e03c['name'],'status':0x1f4,'instance':'','type':''});throw _0x57e03c;}});}['edit'](_0x4b7303,_0x4ef624,_0x534448,_0xdc9f0b,_0x38da9c){return __awaiter$4(this,void 0,void 0,function*(){const _0xd7a6e3={'account_name':_0x4b7303,'search_service_name':_0x4ef624,'key':_0x534448,'country':_0xdc9f0b};try{const _0x486c71=yield this['fetch']['put'](this['path'],_0x38da9c,_0xd7a6e3);if(_0x486c71['status']>0xc7&&_0x486c71['status']<0x12c){const _0x247e8b=yield _0x486c71['json']();return new SuccessfulSearchServiceResponse(_0x247e8b);}const _0x27153c=yield _0x486c71['json']();return new FailedSearchServiceResponse(_0x27153c);}catch(_0x391834){if(_0x391834 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x391834['message'],'title':_0x391834['name'],'status':0x1f4,'instance':'','type':''});throw _0x391834;}});}['list'](_0x2850eb,_0x1fe91f){return __awaiter$4(this,void 0,void 0,function*(){const _0x4a451f=this['path']+'/'+_0x2850eb;try{const _0x404065=yield this['fetch']['get'](_0x4a451f,_0x1fe91f);if(_0x404065['status']>0xc7&&_0x404065['status']<0x12c){const _0x4adf05=yield _0x404065['json']();return new SuccessfulListSearchServiceResponse(_0x4adf05);}const _0x28eadb=yield _0x404065['json']();return new FailedViewSearchServicesResponse(_0x28eadb);}catch(_0x319210){if(_0x319210 instanceof Error)return new FailedViewSearchServicesResponse({'detail':_0x319210['message'],'title':_0x319210['name'],'status':0x1f4,'instance':'','type':''});throw _0x319210;}});}}
|
|
12
|
-
|
|
13
|
-
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x2e245c,_0x1e1475,_0x5ed322,_0x1c7d56){function _0x4b8d96(_0x18cdfa){return _0x18cdfa instanceof _0x5ed322?_0x18cdfa:new _0x5ed322(function(_0x21e31c){_0x21e31c(_0x18cdfa);});}return new(_0x5ed322||(_0x5ed322=Promise))(function(_0x4237e1,_0x47dd15){function _0x363a38(_0xbdba08){try{_0x3ef375(_0x1c7d56['next'](_0xbdba08));}catch(_0x1bc019){_0x47dd15(_0x1bc019);}}function _0x2e6f6c(_0x212b97){try{_0x3ef375(_0x1c7d56['throw'](_0x212b97));}catch(_0x5ef305){_0x47dd15(_0x5ef305);}}function _0x3ef375(_0x3fd6fe){_0x3fd6fe['done']?_0x4237e1(_0x3fd6fe['value']):_0x4b8d96(_0x3fd6fe['value'])['then'](_0x363a38,_0x2e6f6c);}_0x3ef375((_0x1c7d56=_0x1c7d56['apply'](_0x2e245c,_0x1e1475||[]))['next']());});};class FacetService{constructor(_0xc3f96){this['fetch']=_0xc3f96,this['path']='facet';}['create'](_0x473622,_0x4dd866,_0x1d6968,_0x1ccda2){return __awaiter$3(this,void 0,void 0,function*(){const _0x1a4e01={'account_name':_0x473622,'list_name':_0x4dd866,'facet_name':_0x1d6968};try{const _0x15f7b4=yield this['fetch']['post'](this['path'],_0x1ccda2,_0x1a4e01);if(_0x15f7b4['status']>0xc7&&_0x15f7b4['status']<0x12c){const _0x367abb=yield _0x15f7b4['json']();return new SuccessfulFacetResponse(_0x367abb);}const _0x43aac0=yield _0x15f7b4['json']();return new FailedFacetResponse(_0x43aac0);}catch(_0x3df6f3){if(_0x3df6f3 instanceof Error)return new FailedFacetResponse({'detail':_0x3df6f3['message'],'title':_0x3df6f3['name'],'status':0x1f4,'instance':'','type':''});throw _0x3df6f3;}});}['remove'](_0x590820,_0x4f8068,_0x4e0e0e,_0x3c488e){return __awaiter$3(this,void 0,void 0,function*(){const _0xf1c158='Facet/'+_0x590820+'/'+_0x4f8068+'/'+_0x4e0e0e,_0x413d05=yield this['fetch']['delete'](_0xf1c158,_0x3c488e);try{if(_0x413d05['status']>0xc7&&_0x413d05['status']<0x12c)return new SuccessfulResponse({});const _0x58dfb0=yield _0x413d05['json']();return new FailedResponse(_0x58dfb0);}catch(_0x3dc3c0){if(_0x3dc3c0 instanceof Error)return new FailedResponse({'detail':_0x3dc3c0['message'],'title':_0x3dc3c0['name'],'status':0x1f4,'instance':'','type':''});throw _0x3dc3c0;}});}['rename'](_0x794e63,_0x1ad443,_0xe8f479,_0x21175e,_0x128b7a){return __awaiter$3(this,void 0,void 0,function*(){const _0x1533c9={'account_name':_0x794e63,'list_name':_0x1ad443,'facet_name':_0xe8f479,'new_facet_name':_0x21175e};try{const _0x185ead=yield this['fetch']['put'](this['path'],_0x128b7a,_0x1533c9);if(_0x185ead['status']>0xc7&&_0x185ead['status']<0x12c){const _0x47daba=yield _0x185ead['json']();return new SuccessfulFacetResponse(_0x47daba);}const _0x120906=yield _0x185ead['json']();return new FailedFacetResponse(_0x120906);}catch(_0x15b529){if(_0x15b529 instanceof Error)return new FailedFacetResponse({'detail':_0x15b529['message'],'title':_0x15b529['name'],'status':0x1f4,'instance':'','type':''});throw _0x15b529;}});}}
|
|
14
|
-
|
|
15
|
-
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x44916d,_0x44dc63,_0x2094dc,_0x3c8b1){function _0xce4497(_0x4f9c72){return _0x4f9c72 instanceof _0x2094dc?_0x4f9c72:new _0x2094dc(function(_0x36ba20){_0x36ba20(_0x4f9c72);});}return new(_0x2094dc||(_0x2094dc=Promise))(function(_0x5e35f1,_0x1ce008){function _0x90f23f(_0x57a978){try{_0x28198e(_0x3c8b1['next'](_0x57a978));}catch(_0x15d702){_0x1ce008(_0x15d702);}}function _0x2a01be(_0x452dbc){try{_0x28198e(_0x3c8b1['throw'](_0x452dbc));}catch(_0x7572c9){_0x1ce008(_0x7572c9);}}function _0x28198e(_0x412ca2){_0x412ca2['done']?_0x5e35f1(_0x412ca2['value']):_0xce4497(_0x412ca2['value'])['then'](_0x90f23f,_0x2a01be);}_0x28198e((_0x3c8b1=_0x3c8b1['apply'](_0x44916d,_0x44dc63||[]))['next']());});};class SearchResultService{constructor(_0x299319){this['fetch']=_0x299319,this['path']='search-result';}['create'](_0xec2ac3,_0x569d7a,_0x5c7743,_0x30160b,_0x4d3da8){return __awaiter$2(this,void 0,void 0,function*(){_0x4d3da8=_0x4d3da8!==null&&_0x4d3da8!==void 0?_0x4d3da8:{'description':'','keywords':'','resource_1':'','resource_2':'','resource_3':'','latitude':0x0,'longitude':0x0,'facets':[]};const _0x5bf93b=Object['assign']({'account_name':_0xec2ac3,'search_result_name':_0x5c7743,'list_name':_0x569d7a},_0x4d3da8);try{const _0x304e42=yield this['fetch']['post'](this['path'],_0x30160b,_0x5bf93b);if(_0x304e42['status']>0xc7&&_0x304e42['status']<0x12c){const _0x32f0f8=yield _0x304e42['json']();return new SuccessfulViewSearchResultResponse(_0x32f0f8);}const _0x1ae3a2=yield _0x304e42['json']();return new FailedSearchResultResponse(_0x1ae3a2);}catch(_0x5b214d){if(_0x5b214d instanceof Error)return new FailedSearchResultResponse({'detail':_0x5b214d['message'],'title':_0x5b214d['name'],'status':0x1f4,'instance':'','type':''});throw _0x5b214d;}});}['transfer'](_0x52b8d6,_0xc4658b,_0x25e54c,_0x177a76){return __awaiter$2(this,void 0,void 0,function*(){const _0x578b1f={'account_name':_0x52b8d6,'list_name':_0xc4658b,'new_search_service_name':_0x25e54c};try{const _0x4de1ec=yield this['fetch']['post'](this['path']+'/transfer',_0x177a76,_0x578b1f);if(_0x4de1ec['status']>0xc7&&_0x4de1ec['status']<0x12c){const _0x344584=yield _0x4de1ec['json']();return new SuccessfulListResponse(_0x344584);}const _0x40e54d=yield _0x4de1ec['json']();return new FailedListResponse(_0x40e54d);}catch(_0x1344de){if(_0x1344de instanceof Error)return new FailedListResponse({'detail':_0x1344de['message'],'title':_0x1344de['name'],'status':0x1f4,'instance':'','type':''});throw _0x1344de;}});}['list'](_0x527aad,_0x33a52c,_0x4f39db,_0x3d0e4e){return __awaiter$2(this,void 0,void 0,function*(){let _0x2312e2=this['path']+'/'+_0x527aad+'/'+_0x33a52c;const _0x329ef8=[];(_0x3d0e4e===null||_0x3d0e4e===void 0?void 0:_0x3d0e4e['size'])&&_0x329ef8['push']('size='+_0x3d0e4e['size']);(_0x3d0e4e===null||_0x3d0e4e===void 0?void 0:_0x3d0e4e['skip'])&&_0x329ef8['push']('skip='+_0x3d0e4e['skip']);(_0x3d0e4e===null||_0x3d0e4e===void 0?void 0:_0x3d0e4e['query'])&&_0x329ef8['push']('query='+_0x3d0e4e['query']);_0x329ef8['length']>0x0&&_0x329ef8['forEach']((_0x20e8af,_0x18bf92)=>{_0x18bf92===0x0?_0x2312e2+='?':_0x2312e2+='&',_0x2312e2+=_0x20e8af;});try{const _0x570977=yield this['fetch']['get'](_0x2312e2,_0x4f39db);if(_0x570977['status']>0xc7&&_0x570977['status']<0x12c){const _0x156993=yield _0x570977['json']();return new SuccessfulListSearchResultResponse(_0x156993);}const _0x47c1b7=yield _0x570977['json']();return new FailedViewSearchResultResponse(_0x47c1b7);}catch(_0xd70ebf){if(_0xd70ebf instanceof Error)return new FailedViewSearchResultResponse({'detail':_0xd70ebf['message'],'title':_0xd70ebf['name'],'status':0x1f4,'instance':'','type':''});throw _0xd70ebf;}});}}
|
|
16
|
-
|
|
17
|
-
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x173694,_0x4802e6,_0x5002ed,_0xfdf4e6){function _0x50791a(_0x3c3fb1){return _0x3c3fb1 instanceof _0x5002ed?_0x3c3fb1:new _0x5002ed(function(_0x5a6e2f){_0x5a6e2f(_0x3c3fb1);});}return new(_0x5002ed||(_0x5002ed=Promise))(function(_0x3fdfb9,_0x46eddb){function _0x4d1a44(_0x5b199f){try{_0x1ee851(_0xfdf4e6['next'](_0x5b199f));}catch(_0x25f5e3){_0x46eddb(_0x25f5e3);}}function _0x3acc08(_0x203d81){try{_0x1ee851(_0xfdf4e6['throw'](_0x203d81));}catch(_0x28c248){_0x46eddb(_0x28c248);}}function _0x1ee851(_0x45eee2){_0x45eee2['done']?_0x3fdfb9(_0x45eee2['value']):_0x50791a(_0x45eee2['value'])['then'](_0x4d1a44,_0x3acc08);}_0x1ee851((_0xfdf4e6=_0xfdf4e6['apply'](_0x173694,_0x4802e6||[]))['next']());});};class ContributorService{constructor(_0x29876e){this['fetch']=_0x29876e,this['path']='contributor';}['create'](_0x598526,_0x3d2887,_0x40a5b6,_0x5c0212){return __awaiter$1(this,void 0,void 0,function*(){const _0x5ba409={'account_name':_0x598526,'list_name':_0x3d2887,'contributor_name':_0x40a5b6};try{const _0x181f80=yield this['fetch']['post'](this['path'],_0x5c0212,_0x5ba409);if(_0x181f80['status']>0xc7&&_0x181f80['status']<0x12c){const _0x1adec1=yield _0x181f80['json']();return new SuccessfulContributorResponse(_0x1adec1);}const _0x2dd743=yield _0x181f80['json']();return new FailedContributorResponse(_0x2dd743);}catch(_0x5210eb){if(_0x5210eb instanceof Error)return new FailedContributorResponse({'detail':_0x5210eb['message'],'title':_0x5210eb['name'],'status':0x1f4,'instance':'','type':''});throw _0x5210eb;}});}['remove'](_0x203c4f,_0x36717a,_0x4b28bc,_0x6c862e){return __awaiter$1(this,void 0,void 0,function*(){const _0x22f6ac=this['path']+'/'+_0x203c4f+'/'+_0x36717a+'/'+_0x4b28bc,_0xb7140b=yield this['fetch']['delete'](_0x22f6ac,_0x6c862e);try{if(_0xb7140b['status']>0xc7&&_0xb7140b['status']<0x12c)return new SuccessfulResponse({});const _0x49569c=yield _0xb7140b['json']();return new FailedResponse(_0x49569c);}catch(_0x463127){if(_0x463127 instanceof Error)return new FailedResponse({'detail':_0x463127['message'],'title':_0x463127['name'],'status':0x1f4,'instance':'','type':''});throw _0x463127;}});}['startsWith'](_0xa20aa4,_0x109c2a){return __awaiter$1(this,void 0,void 0,function*(){const _0x552ff6=this['path']+'/'+_0xa20aa4;try{const _0x168e20=yield this['fetch']['get'](_0x552ff6,_0x109c2a);if(_0x168e20['status']>0xc7&&_0x168e20['status']<0x12c){const _0x4f0929=yield _0x168e20['json']();return new SuccessfulAccountAndImageResponse(_0x4f0929);}const _0x398c69=yield _0x168e20['json']();return new FailedAccountAndImageResponse(_0x398c69);}catch(_0x8d8ae7){if(_0x8d8ae7 instanceof Error)return new FailedAccountAndImageResponse({'detail':_0x8d8ae7['message'],'title':_0x8d8ae7['name'],'status':0x1f4,'instance':'','type':''});throw _0x8d8ae7;}});}}
|
|
18
|
-
|
|
19
|
-
var __awaiter=undefined&&undefined['__awaiter']||function(_0x38d796,_0x98b2a5,_0x589efe,_0x3d840d){function _0xbc2cbd(_0x549fcb){return _0x549fcb instanceof _0x589efe?_0x549fcb:new _0x589efe(function(_0x2c36b5){_0x2c36b5(_0x549fcb);});}return new(_0x589efe||(_0x589efe=Promise))(function(_0x2f528b,_0x25afb6){function _0x5d7ab9(_0x165572){try{_0x529c03(_0x3d840d['next'](_0x165572));}catch(_0x3a85b2){_0x25afb6(_0x3a85b2);}}function _0xd4a4cf(_0x4153f0){try{_0x529c03(_0x3d840d['throw'](_0x4153f0));}catch(_0x394516){_0x25afb6(_0x394516);}}function _0x529c03(_0x19761e){_0x19761e['done']?_0x2f528b(_0x19761e['value']):_0xbc2cbd(_0x19761e['value'])['then'](_0x5d7ab9,_0xd4a4cf);}_0x529c03((_0x3d840d=_0x3d840d['apply'](_0x38d796,_0x98b2a5||[]))['next']());});};class AdminClient{constructor(_0x3bbc6d='https://admin.searchability.dev/'){var _0x472720=new Fetch(_0x3bbc6d);this['Accounts']=new AccountService(_0x472720),this['Lists']=new ListService(_0x472720),this['ApiKeys']=new ApiKeyService(_0x472720),this['SearchServers']=new SearchServersService(_0x472720),this['Facets']=new FacetService(_0x472720),this['SearchResults']=new SearchResultService(_0x472720),this['Contributors']=new ContributorService(_0x472720);}}class AuthClient{constructor(_0x4a02c3='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x4a02c3);}['login'](_0x5d3c45){return __awaiter(this,void 0,void 0,function*(){const _0x441528='login/'+_0x5d3c45;try{const _0x400bf9=yield yield fetch(_0x441528);if(_0x400bf9['status']>0xc7&&_0x400bf9['status']<0x12c){const _0x23a47f=yield _0x400bf9['json']();return new SuccessfulAuthResponse(_0x23a47f);}const _0x40d6b1=yield _0x400bf9['json']();return new FailedAuthResponse(_0x40d6b1);}catch(_0x3a1ad9){if(_0x3a1ad9 instanceof Error)return new FailedAuthResponse({'detail':_0x3a1ad9['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x3a1ad9;}});}['refresh'](_0x1a2858){return __awaiter(this,void 0,void 0,function*(){const _0xe94824='refresh',_0x556164={'refresh_token':_0x1a2858};try{const _0x44dd81=yield this['fetch']['PostNoAuth'](_0xe94824,_0x556164);if(_0x44dd81['status']>0xc7&&_0x44dd81['status']<0x12c){const _0x386581=yield _0x44dd81['json']();return new SuccessfulAuthResponse(_0x386581);}const _0x553590=yield _0x44dd81['json']();return new FailedAuthResponse(_0x553590);}catch(_0x136497){if(_0x136497 instanceof Error)return new FailedAuthResponse({'detail':_0x136497['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x136497;}});}['getTokenStatus'](_0x4f35d5){if(Date['now']()<_0x4f35d5['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x4f35d5['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
|
|
20
|
-
|
|
21
|
-
export { AdminClient, AuthClient, TokenStatus, Tokens };
|