@searchability/admin-client 0.0.79 → 0.0.81
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(_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 };
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
exports.TokenStatus = void 0;(function(
|
|
3
|
+
exports.TokenStatus = void 0;(function(_0x37a640){_0x37a640[_0x37a640['Ok']=0x0]='Ok',_0x37a640[_0x37a640['Refresh']=0x1]='Refresh',_0x37a640[_0x37a640['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(_0x1da000){this['isSuccess']=_0x1da000;}}class SuccessfulContributorResponse extends Response{constructor(_0x297eac){super(!![]),this['contributor']=_0x297eac;}['toSuccess'](){return this['contributor'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedContributorResponse extends Response{constructor(_0x14a1ba){super(![]),this['problem']=_0x14a1ba;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountAndImageResponse extends Response{constructor(_0x807aa){super(!![]),this['accountAndImages']=_0x807aa;}['toSuccess'](){return this['accountAndImages'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountAndImageResponse extends Response{constructor(_0x5148f4){super(![]),this['problem']=_0x5148f4;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulFacetResponse extends Response{constructor(_0x2a0d7b){super(!![]),this['facet']=_0x2a0d7b;}['toSuccess'](){return this['facet'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetResponse extends Response{constructor(_0x45739f){super(![]),this['problem']=_0x45739f;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountResponse extends Response{constructor(_0x3dd0e0){super(!![]),this['account']=_0x3dd0e0;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountImageResponse extends Response{constructor(_0x311289){super(!![]),this['accountImage']=_0x311289;}['toSuccess'](){return this['accountImage'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListIdentityResponse extends Response{constructor(_0x4944df){super(!![]),this['list']=_0x4944df;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListResponse extends Response{constructor(_0x59b67f){super(!![]),this['list']=_0x59b67f;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x5faf44){super(![]),this['problem']=_0x5faf44;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountImageResponse extends Response{constructor(_0x3c9a8a){super(![]),this['problem']=_0x3c9a8a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListIdentityResponse extends Response{constructor(_0x3805a0){super(![]),this['problem']=_0x3805a0;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListResponse extends Response{constructor(_0x171165){super(![]),this['problem']=_0x171165;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0xc36b37){super(!![]),this['tokens']=_0xc36b37;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x5546d2){super(![]),this['problem']=_0x5546d2;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x1cddd2){super(!![]),this['apiKey']=_0x1cddd2;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x199636){super(![]),this['problem']=_0x199636;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x4d22a9){super(!![]),this['searchService']=_0x4d22a9;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0xe226a1){super(![]),this['problem']=_0xe226a1;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x413a20){super(!![]),this['searchService']=_0x413a20;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulViewSearchResultResponse extends Response{constructor(_0x4c58ce){super(!![]),this['searchResult']=_0x4c58ce;}['toSuccess'](){return this['searchResult'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchResultResponse extends Response{constructor(_0x2786ef){super(![]),this['problem']=_0x2786ef;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchResultResponse extends Response{constructor(_0x5ee9ce){super(!![]),this['searchResults']=_0x5ee9ce;}['toSuccess'](){return this['searchResults'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchResultResponse extends Response{constructor(_0x8d9f63){super(![]),this['problem']=_0x8d9f63;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchServiceResponse extends Response{constructor(_0x51d928){super(!![]),this['searchServices']=_0x51d928;}['toSuccess'](){return this['searchServices'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServicesResponse extends Response{constructor(_0x552656){super(![]),this['problem']=_0x552656;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedViewSearchServiceResponse extends Response{constructor(_0x3d0a80){super(![]),this['problem']=_0x3d0a80;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x67cc75){super(!![]),this['apiKeyValue']=_0x67cc75;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x14fd7b){super(!![]),this['obj']=_0x14fd7b;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x17d8af){super(![]),this['problem']=_0x17d8af;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x4367bf){super(![]),this['problem']=_0x4367bf;}['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(_0x2abfaf,_0x1a6666,_0x572c99,_0x1e8cc0){function _0xa79a(_0x5a1396){return _0x5a1396 instanceof _0x572c99?_0x5a1396:new _0x572c99(function(_0xe004aa){_0xe004aa(_0x5a1396);});}return new(_0x572c99||(_0x572c99=Promise))(function(_0x4ac99f,_0x1611f6){function _0x41d220(_0x262413){try{_0x58286f(_0x1e8cc0['next'](_0x262413));}catch(_0x199853){_0x1611f6(_0x199853);}}function _0x1a638a(_0x3a8e0f){try{_0x58286f(_0x1e8cc0['throw'](_0x3a8e0f));}catch(_0x154b1b){_0x1611f6(_0x154b1b);}}function _0x58286f(_0xbcd461){_0xbcd461['done']?_0x4ac99f(_0xbcd461['value']):_0xa79a(_0xbcd461['value'])['then'](_0x41d220,_0x1a638a);}_0x58286f((_0x1e8cc0=_0x1e8cc0['apply'](_0x2abfaf,_0x1a6666||[]))['next']());});};class AccountService{constructor(_0x58118d){this['fetch']=_0x58118d;}['get'](_0x17678c,_0xc444c4){return __awaiter$8(this,void 0,void 0,function*(){const _0x43ab0a='Account/'+_0x17678c+'/',_0x55e0ef=yield this['fetch']['get'](_0x43ab0a,_0xc444c4);try{if(_0x55e0ef['status']>0xc7&&_0x55e0ef['status']<0x12c){const _0x3e4913=yield _0x55e0ef['json']();return new SuccessfulAccountResponse(_0x3e4913);}const _0x48a7af=yield _0x55e0ef['json']();return new FailedAccountResponse(_0x48a7af);}catch(_0x2e3423){if(_0x2e3423 instanceof Error)return new FailedAccountResponse({'detail':_0x2e3423['message'],'title':_0x2e3423['name'],'status':0x1f4,'instance':'','type':''});throw _0x2e3423;}});}['getImage'](_0x1c6654,_0x4bbc02){return __awaiter$8(this,void 0,void 0,function*(){const _0x1236ee='account/image/'+_0x1c6654+'/',_0x2fc353=yield this['fetch']['get'](_0x1236ee,_0x4bbc02);try{if(_0x2fc353['status']>0xc7&&_0x2fc353['status']<0x12c){const _0x33a0d5=yield _0x2fc353['json']();return new SuccessfulAccountImageResponse(_0x33a0d5);}const _0x4547f8=yield _0x2fc353['json']();return new FailedAccountImageResponse(_0x4547f8);}catch(_0x5596de){if(_0x5596de instanceof Error)return new FailedAccountImageResponse({'detail':_0x5596de['message'],'title':_0x5596de['name'],'status':0x1f4,'instance':'','type':''});throw _0x5596de;}});}}
|
|
6
6
|
|
|
7
|
-
var __awaiter$7=undefined&&undefined['__awaiter']||function(
|
|
7
|
+
var __awaiter$7=undefined&&undefined['__awaiter']||function(_0x4808a7,_0x1fbf94,_0x4ecfd9,_0x223aef){function _0x478467(_0x1aedc9){return _0x1aedc9 instanceof _0x4ecfd9?_0x1aedc9:new _0x4ecfd9(function(_0x4eb7b7){_0x4eb7b7(_0x1aedc9);});}return new(_0x4ecfd9||(_0x4ecfd9=Promise))(function(_0xf79bee,_0x23b014){function _0x5de675(_0x3bacce){try{_0x39554e(_0x223aef['next'](_0x3bacce));}catch(_0x5be8d1){_0x23b014(_0x5be8d1);}}function _0x4e46d7(_0x1643a8){try{_0x39554e(_0x223aef['throw'](_0x1643a8));}catch(_0x1a8881){_0x23b014(_0x1a8881);}}function _0x39554e(_0x49d00a){_0x49d00a['done']?_0xf79bee(_0x49d00a['value']):_0x478467(_0x49d00a['value'])['then'](_0x5de675,_0x4e46d7);}_0x39554e((_0x223aef=_0x223aef['apply'](_0x4808a7,_0x1fbf94||[]))['next']());});};class ApiKeyService{constructor(_0xf93777){this['fetch']=_0xf93777,this['path']='api-key';}['create'](_0x2a10de,_0x1cf3fe,_0x280300){return __awaiter$7(this,void 0,void 0,function*(){const _0x3f866e={'account_name':_0x2a10de,'api_key_name':_0x1cf3fe};try{const _0x1f1060=yield this['fetch']['post'](this['path'],_0x280300,_0x3f866e);if(_0x1f1060['status']>0xc7&&_0x1f1060['status']<0x12c){const _0x2cb99d=yield _0x1f1060['json']();return new SuccessfulApiKeyResponse(_0x2cb99d);}const _0x4c8005=yield _0x1f1060['json']();return new FailedApiKeyResponse(_0x4c8005);}catch(_0x5506e7){if(_0x5506e7 instanceof Error)return new FailedApiKeyResponse({'detail':_0x5506e7['message'],'title':_0x5506e7['name'],'status':0x1f4,'instance':'','type':''});throw _0x5506e7;}});}['view'](_0x46296d,_0x47b55c,_0x5639c0){return __awaiter$7(this,void 0,void 0,function*(){const _0x208a66=this['path']+'/'+_0x46296d+'/'+_0x47b55c;try{const _0x36cd5f=yield this['fetch']['get'](_0x208a66,_0x5639c0);if(_0x36cd5f['status']>0xc7&&_0x36cd5f['status']<0x12c){const _0x2f6c48=yield _0x36cd5f['json']();return new SuccessfulApiKeyValueResponse(_0x2f6c48);}const _0x5df898=yield _0x36cd5f['json']();return new FailedApiKeyValueResponse(_0x5df898);}catch(_0x1c7445){if(_0x1c7445 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x1c7445['message'],'title':_0x1c7445['name'],'status':0x1f4,'instance':'','type':''});throw _0x1c7445;}});}['delete'](_0xabd73f,_0x39495b,_0x29014d){return __awaiter$7(this,void 0,void 0,function*(){const _0x1594cc=this['path']+'/'+_0xabd73f+'/'+_0x39495b;try{const _0x749c4e=yield this['fetch']['delete'](_0x1594cc,_0x29014d);if(_0x749c4e['status']>0xc7&&_0x749c4e['status']<0x12c)return new SuccessfulResponse({});const _0x42f7a8=yield _0x749c4e['json']();return new FailedResponse(_0x42f7a8);}catch(_0x37bd39){if(_0x37bd39 instanceof Error)return new FailedResponse({'detail':_0x37bd39['message'],'title':_0x37bd39['name'],'status':0x1f4,'instance':'','type':''});throw _0x37bd39;}});}}
|
|
8
8
|
|
|
9
|
-
var __awaiter$6=undefined&&undefined['__awaiter']||function(
|
|
9
|
+
var __awaiter$6=undefined&&undefined['__awaiter']||function(_0x51565e,_0x2b35eb,_0x36b0b6,_0x3fb1ab){function _0x5dc5b3(_0x198a9a){return _0x198a9a instanceof _0x36b0b6?_0x198a9a:new _0x36b0b6(function(_0x47f497){_0x47f497(_0x198a9a);});}return new(_0x36b0b6||(_0x36b0b6=Promise))(function(_0x5ac6d6,_0x1849be){function _0x5bd5ac(_0x9dfb9b){try{_0x133921(_0x3fb1ab['next'](_0x9dfb9b));}catch(_0x4f3c5e){_0x1849be(_0x4f3c5e);}}function _0x560bb6(_0x1c1a31){try{_0x133921(_0x3fb1ab['throw'](_0x1c1a31));}catch(_0x100dae){_0x1849be(_0x100dae);}}function _0x133921(_0x405f36){_0x405f36['done']?_0x5ac6d6(_0x405f36['value']):_0x5dc5b3(_0x405f36['value'])['then'](_0x5bd5ac,_0x560bb6);}_0x133921((_0x3fb1ab=_0x3fb1ab['apply'](_0x51565e,_0x2b35eb||[]))['next']());});};class ListService{constructor(_0x20c3b9){this['fetch']=_0x20c3b9;}['create'](_0x2021e7,_0x1f13d4,_0x5ec0fb,_0x1a05ae){return __awaiter$6(this,void 0,void 0,function*(){const _0x4d3d7e='List',_0x8e28ec={'account_name':_0x2021e7,'list_name':_0x1f13d4,'search_service_name':_0x5ec0fb};try{const _0x58a33a=yield this['fetch']['post'](_0x4d3d7e,_0x1a05ae,_0x8e28ec);if(_0x58a33a['status']>0xc7&&_0x58a33a['status']<0x12c){const _0x19383d=yield _0x58a33a['json']();return new SuccessfulListIdentityResponse(_0x19383d);}const _0x226ffc=yield _0x58a33a['json']();return new FailedListIdentityResponse(_0x226ffc);}catch(_0x36ab5b){if(_0x36ab5b instanceof Error)return new FailedListIdentityResponse({'detail':_0x36ab5b['message'],'title':_0x36ab5b['name'],'status':0x1f4,'instance':'','type':''});throw _0x36ab5b;}});}['delete'](_0x4de55a,_0x12ba3b,_0x3567dd){return __awaiter$6(this,void 0,void 0,function*(){const _0x453cb5='List/'+_0x4de55a+'/'+_0x12ba3b,_0x41b103=yield this['fetch']['delete'](_0x453cb5,_0x3567dd);try{if(_0x41b103['status']>0xc7&&_0x41b103['status']<0x12c)return new SuccessfulResponse({});const _0x4a2e4a=yield _0x41b103['json']();return new FailedResponse(_0x4a2e4a);}catch(_0x591f98){if(_0x591f98 instanceof Error)return new FailedResponse({'detail':_0x591f98['message'],'title':_0x591f98['name'],'status':0x1f4,'instance':'','type':''});throw _0x591f98;}});}['get'](_0x257923,_0x1266b0,_0x4bd3f9){return __awaiter$6(this,void 0,void 0,function*(){const _0x203a8a='List/'+_0x257923+'/'+_0x1266b0;try{const _0x528022=yield this['fetch']['get'](_0x203a8a,_0x4bd3f9);if(_0x528022['status']>0xc7&&_0x528022['status']<0x12c){const _0x26570b=yield _0x528022['json']();return new SuccessfulListResponse(_0x26570b);}const _0x1406a1=yield _0x528022['json']();return new FailedListResponse(_0x1406a1);}catch(_0xec9f2){if(_0xec9f2 instanceof Error)return new FailedListResponse({'detail':_0xec9f2['message'],'title':_0xec9f2['name'],'status':0x1f4,'instance':'','type':''});throw _0xec9f2;}});}}
|
|
10
10
|
|
|
11
|
-
var __awaiter$5=undefined&&undefined['__awaiter']||function(
|
|
11
|
+
var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x8970dc,_0x2d5215,_0x5254f0,_0x545238){function _0x48076e(_0x2c8746){return _0x2c8746 instanceof _0x5254f0?_0x2c8746:new _0x5254f0(function(_0x571ad3){_0x571ad3(_0x2c8746);});}return new(_0x5254f0||(_0x5254f0=Promise))(function(_0x41905c,_0x234890){function _0xda375c(_0xb946dc){try{_0x579bea(_0x545238['next'](_0xb946dc));}catch(_0x193716){_0x234890(_0x193716);}}function _0x5e15ad(_0x374997){try{_0x579bea(_0x545238['throw'](_0x374997));}catch(_0x352fae){_0x234890(_0x352fae);}}function _0x579bea(_0x1521b9){_0x1521b9['done']?_0x41905c(_0x1521b9['value']):_0x48076e(_0x1521b9['value'])['then'](_0xda375c,_0x5e15ad);}_0x579bea((_0x545238=_0x545238['apply'](_0x8970dc,_0x2d5215||[]))['next']());});};class Fetch{constructor(_0x37cf11){this['baseUri']=_0x37cf11,this['getUrl']=_0x45efab=>{return _0x45efab['startsWith']('/')&&(_0x45efab=_0x45efab['replace']('/','')),''+this['baseUri']+_0x45efab;},!_0x37cf11['endsWith']('/')&&(_0x37cf11=_0x37cf11+'/');}['get'](_0x1722a5,_0x54b018){return __awaiter$5(this,void 0,void 0,function*(){const _0x354518=this['getUrl'](_0x1722a5);return yield fetch(_0x354518,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x54b018}});});}['post'](_0x3706ef,_0x1baadc,_0x2d5253){return __awaiter$5(this,void 0,void 0,function*(){const _0x37c32b=this['getUrl'](_0x3706ef);return yield fetch(_0x37c32b,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1baadc},'body':_0x2d5253?JSON['stringify'](_0x2d5253):null});});}['PostNoAuth'](_0x3a97dd,_0x906d8e){return __awaiter$5(this,void 0,void 0,function*(){const _0x2aa309=this['getUrl'](_0x3a97dd);return yield fetch(_0x2aa309,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0x906d8e?JSON['stringify'](_0x906d8e):null});});}['put'](_0x27b882,_0x507f80,_0x5c6a1c){return __awaiter$5(this,void 0,void 0,function*(){const _0x13c4dc=this['getUrl'](_0x27b882);return yield fetch(_0x13c4dc,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x507f80},'body':_0x5c6a1c?JSON['stringify'](_0x5c6a1c):null});});}['delete'](_0x154121,_0x168259){return __awaiter$5(this,void 0,void 0,function*(){const _0x1f3362=this['getUrl'](_0x154121);return yield fetch(_0x1f3362,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x168259}});});}}
|
|
12
12
|
|
|
13
|
-
var __awaiter$4=undefined&&undefined['__awaiter']||function(
|
|
13
|
+
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x2fc78e,_0x3f9eb1,_0x5b77b9,_0x5ae5a3){function _0x38fbaa(_0x1c10f0){return _0x1c10f0 instanceof _0x5b77b9?_0x1c10f0:new _0x5b77b9(function(_0x8cd341){_0x8cd341(_0x1c10f0);});}return new(_0x5b77b9||(_0x5b77b9=Promise))(function(_0x820a6f,_0x58b7ce){function _0x22762f(_0x44f8dd){try{_0x319cc3(_0x5ae5a3['next'](_0x44f8dd));}catch(_0x1bbcb5){_0x58b7ce(_0x1bbcb5);}}function _0x546859(_0x39a572){try{_0x319cc3(_0x5ae5a3['throw'](_0x39a572));}catch(_0x3e043d){_0x58b7ce(_0x3e043d);}}function _0x319cc3(_0x3f152a){_0x3f152a['done']?_0x820a6f(_0x3f152a['value']):_0x38fbaa(_0x3f152a['value'])['then'](_0x22762f,_0x546859);}_0x319cc3((_0x5ae5a3=_0x5ae5a3['apply'](_0x2fc78e,_0x3f9eb1||[]))['next']());});};class SearchServersService{constructor(_0xa45583){this['fetch']=_0xa45583,this['path']='search-services';}['create'](_0x3bc5e3,_0x9fafc0,_0x2f8697,_0x261f4f,_0x1f5208,_0x3ccf12,_0x1e0585,_0x57199f){return __awaiter$4(this,void 0,void 0,function*(){const _0x59d542={'account_name':_0x3bc5e3,'search_service_name':_0x9fafc0,'endpoint':_0x2f8697,'key':_0x261f4f,'country':_0x1f5208,'provider':_0x3ccf12,'index_name':_0x1e0585};try{const _0x357865=yield this['fetch']['post'](this['path'],_0x57199f,_0x59d542);if(_0x357865['status']>0xc7&&_0x357865['status']<0x12c){const _0x3209e3=yield _0x357865['json']();return new SuccessfulSearchServiceResponse(_0x3209e3);}const _0x383ee6=yield _0x357865['json']();return new FailedSearchServiceResponse(_0x383ee6);}catch(_0x3a6ac7){if(_0x3a6ac7 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x3a6ac7['message'],'title':_0x3a6ac7['name'],'status':0x1f4,'instance':'','type':''});throw _0x3a6ac7;}});}['delete'](_0x18c752,_0x257211,_0x4943cc){return __awaiter$4(this,void 0,void 0,function*(){const _0x3da4ae=this['path']+'/'+_0x18c752+'/'+_0x257211;try{const _0x53ae37=yield this['fetch']['delete'](_0x3da4ae,_0x4943cc);if(_0x53ae37['status']>0xc7&&_0x53ae37['status']<0x12c)return new SuccessfulResponse({});const _0x16f936=yield _0x53ae37['json']();return new FailedResponse(_0x16f936);}catch(_0x26c20e){if(_0x26c20e instanceof Error)return new FailedResponse({'detail':_0x26c20e['message'],'title':_0x26c20e['name'],'status':0x1f4,'instance':'','type':''});throw _0x26c20e;}});}['view'](_0x249b45,_0x2c113b,_0x28905e){return __awaiter$4(this,void 0,void 0,function*(){const _0x9c77f4=this['path']+'/'+_0x249b45+'/'+_0x2c113b;try{const _0x4e1f07=yield this['fetch']['get'](_0x9c77f4,_0x28905e);if(_0x4e1f07['status']>0xc7&&_0x4e1f07['status']<0x12c){const _0xc6b2e6=yield _0x4e1f07['json']();return new SuccessfulViewSearchServiceResponse(_0xc6b2e6);}const _0x38d329=yield _0x4e1f07['json']();return new FailedViewSearchServiceResponse(_0x38d329);}catch(_0x5084a6){if(_0x5084a6 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x5084a6['message'],'title':_0x5084a6['name'],'status':0x1f4,'instance':'','type':''});throw _0x5084a6;}});}['edit'](_0x3b458e,_0x5192c4,_0x4fa485,_0x5dce34,_0x147335){return __awaiter$4(this,void 0,void 0,function*(){const _0x399430={'account_name':_0x3b458e,'search_service_name':_0x5192c4,'key':_0x4fa485,'country':_0x5dce34};try{const _0x29b405=yield this['fetch']['put'](this['path'],_0x147335,_0x399430);if(_0x29b405['status']>0xc7&&_0x29b405['status']<0x12c){const _0x273070=yield _0x29b405['json']();return new SuccessfulSearchServiceResponse(_0x273070);}const _0x2fa391=yield _0x29b405['json']();return new FailedSearchServiceResponse(_0x2fa391);}catch(_0x3a6205){if(_0x3a6205 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x3a6205['message'],'title':_0x3a6205['name'],'status':0x1f4,'instance':'','type':''});throw _0x3a6205;}});}['list'](_0x431444,_0x42c212){return __awaiter$4(this,void 0,void 0,function*(){const _0x2512eb=this['path']+'/'+_0x431444;try{const _0x11370b=yield this['fetch']['get'](_0x2512eb,_0x42c212);if(_0x11370b['status']>0xc7&&_0x11370b['status']<0x12c){const _0x1183ff=yield _0x11370b['json']();return new SuccessfulListSearchServiceResponse(_0x1183ff);}const _0x1dead4=yield _0x11370b['json']();return new FailedViewSearchServicesResponse(_0x1dead4);}catch(_0x2293b8){if(_0x2293b8 instanceof Error)return new FailedViewSearchServicesResponse({'detail':_0x2293b8['message'],'title':_0x2293b8['name'],'status':0x1f4,'instance':'','type':''});throw _0x2293b8;}});}}
|
|
14
14
|
|
|
15
|
-
var __awaiter$3=undefined&&undefined['__awaiter']||function(
|
|
15
|
+
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x5d12dc,_0x3ee9ef,_0x301994,_0x1b7a2c){function _0x220513(_0x4e4720){return _0x4e4720 instanceof _0x301994?_0x4e4720:new _0x301994(function(_0x21af53){_0x21af53(_0x4e4720);});}return new(_0x301994||(_0x301994=Promise))(function(_0x92880a,_0xaccfc1){function _0x1e2aed(_0x1fe1b8){try{_0x530856(_0x1b7a2c['next'](_0x1fe1b8));}catch(_0x49a7cf){_0xaccfc1(_0x49a7cf);}}function _0x3f39b5(_0x2b7c42){try{_0x530856(_0x1b7a2c['throw'](_0x2b7c42));}catch(_0x4de0e5){_0xaccfc1(_0x4de0e5);}}function _0x530856(_0x362a1f){_0x362a1f['done']?_0x92880a(_0x362a1f['value']):_0x220513(_0x362a1f['value'])['then'](_0x1e2aed,_0x3f39b5);}_0x530856((_0x1b7a2c=_0x1b7a2c['apply'](_0x5d12dc,_0x3ee9ef||[]))['next']());});};class FacetService{constructor(_0x2e78e6){this['fetch']=_0x2e78e6,this['path']='facet';}['create'](_0x169f1a,_0xc4af23,_0x5bd254,_0x5d8871){return __awaiter$3(this,void 0,void 0,function*(){const _0x381943={'account_name':_0x169f1a,'list_name':_0xc4af23,'facet_name':_0x5bd254};try{const _0x2eb358=yield this['fetch']['post'](this['path'],_0x5d8871,_0x381943);if(_0x2eb358['status']>0xc7&&_0x2eb358['status']<0x12c){const _0x317d29=yield _0x2eb358['json']();return new SuccessfulFacetResponse(_0x317d29);}const _0x5435de=yield _0x2eb358['json']();return new FailedFacetResponse(_0x5435de);}catch(_0x1d9664){if(_0x1d9664 instanceof Error)return new FailedFacetResponse({'detail':_0x1d9664['message'],'title':_0x1d9664['name'],'status':0x1f4,'instance':'','type':''});throw _0x1d9664;}});}['remove'](_0x59bd2b,_0x14e726,_0xed74f1,_0x48dac1){return __awaiter$3(this,void 0,void 0,function*(){const _0x30eb4d='Facet/'+_0x59bd2b+'/'+_0x14e726+'/'+_0xed74f1,_0x497ff3=yield this['fetch']['delete'](_0x30eb4d,_0x48dac1);try{if(_0x497ff3['status']>0xc7&&_0x497ff3['status']<0x12c)return new SuccessfulResponse({});const _0x5e1065=yield _0x497ff3['json']();return new FailedResponse(_0x5e1065);}catch(_0x151212){if(_0x151212 instanceof Error)return new FailedResponse({'detail':_0x151212['message'],'title':_0x151212['name'],'status':0x1f4,'instance':'','type':''});throw _0x151212;}});}['rename'](_0x472b8f,_0x507579,_0x2bdde3,_0x45e43a,_0x599477){return __awaiter$3(this,void 0,void 0,function*(){const _0x2fa738={'account_name':_0x472b8f,'list_name':_0x507579,'facet_name':_0x2bdde3,'new_facet_name':_0x45e43a};try{const _0x40c6bb=yield this['fetch']['put'](this['path'],_0x599477,_0x2fa738);if(_0x40c6bb['status']>0xc7&&_0x40c6bb['status']<0x12c){const _0x233321=yield _0x40c6bb['json']();return new SuccessfulFacetResponse(_0x233321);}const _0x5782bc=yield _0x40c6bb['json']();return new FailedFacetResponse(_0x5782bc);}catch(_0xe717a2){if(_0xe717a2 instanceof Error)return new FailedFacetResponse({'detail':_0xe717a2['message'],'title':_0xe717a2['name'],'status':0x1f4,'instance':'','type':''});throw _0xe717a2;}});}}
|
|
16
16
|
|
|
17
|
-
var __awaiter$2=undefined&&undefined['__awaiter']||function(
|
|
17
|
+
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x4abd49,_0x2c8953,_0x2d4ec1,_0x34f429){function _0x784cad(_0x398421){return _0x398421 instanceof _0x2d4ec1?_0x398421:new _0x2d4ec1(function(_0x514146){_0x514146(_0x398421);});}return new(_0x2d4ec1||(_0x2d4ec1=Promise))(function(_0x48ae34,_0x18bf68){function _0x42a611(_0x5a271d){try{_0x28fd38(_0x34f429['next'](_0x5a271d));}catch(_0x43f610){_0x18bf68(_0x43f610);}}function _0x346c6e(_0x5df3e1){try{_0x28fd38(_0x34f429['throw'](_0x5df3e1));}catch(_0x16c15d){_0x18bf68(_0x16c15d);}}function _0x28fd38(_0x42ad93){_0x42ad93['done']?_0x48ae34(_0x42ad93['value']):_0x784cad(_0x42ad93['value'])['then'](_0x42a611,_0x346c6e);}_0x28fd38((_0x34f429=_0x34f429['apply'](_0x4abd49,_0x2c8953||[]))['next']());});};class SearchResultService{constructor(_0x6989a7){this['fetch']=_0x6989a7,this['path']='search-result';}['create'](_0x2e04cd,_0x807739,_0x1379ca,_0x3e05a3,_0x3dc553){return __awaiter$2(this,void 0,void 0,function*(){_0x3dc553=_0x3dc553!==null&&_0x3dc553!==void 0?_0x3dc553:{'description':'','keywords':'','resource_1':'','resource_2':'','resource_3':'','latitude':0x0,'longitude':0x0,'facets':[]};const _0x47b89e=Object['assign']({'account_name':_0x2e04cd,'search_result_name':_0x1379ca,'list_name':_0x807739},_0x3dc553);try{const _0x5c62c2=yield this['fetch']['post'](this['path'],_0x3e05a3,_0x47b89e);if(_0x5c62c2['status']>0xc7&&_0x5c62c2['status']<0x12c){const _0x3a3947=yield _0x5c62c2['json']();return new SuccessfulViewSearchResultResponse(_0x3a3947);}const _0x4f2965=yield _0x5c62c2['json']();return new FailedSearchResultResponse(_0x4f2965);}catch(_0x115e80){if(_0x115e80 instanceof Error)return new FailedSearchResultResponse({'detail':_0x115e80['message'],'title':_0x115e80['name'],'status':0x1f4,'instance':'','type':''});throw _0x115e80;}});}['transfer'](_0x5b89b0,_0x17c1eb,_0x2d7fc8,_0x5d91bf){return __awaiter$2(this,void 0,void 0,function*(){const _0x589ffb={'account_name':_0x5b89b0,'list_name':_0x17c1eb,'new_search_service_name':_0x2d7fc8};try{const _0x4f90c1=yield this['fetch']['post'](this['path']+'/transfer',_0x5d91bf,_0x589ffb);if(_0x4f90c1['status']>0xc7&&_0x4f90c1['status']<0x12c){const _0x33b511=yield _0x4f90c1['json']();return new SuccessfulListResponse(_0x33b511);}const _0x1a5951=yield _0x4f90c1['json']();return new FailedListResponse(_0x1a5951);}catch(_0x40dff4){if(_0x40dff4 instanceof Error)return new FailedListResponse({'detail':_0x40dff4['message'],'title':_0x40dff4['name'],'status':0x1f4,'instance':'','type':''});throw _0x40dff4;}});}['list'](_0x5edea6,_0x515ca0,_0x391276,_0x1f0832){return __awaiter$2(this,void 0,void 0,function*(){let _0x2d6c64=this['path']+'/'+_0x5edea6+'/'+_0x515ca0;const _0x14446a=[];(_0x1f0832===null||_0x1f0832===void 0?void 0:_0x1f0832['size'])&&_0x14446a['push']('size='+_0x1f0832['size']);(_0x1f0832===null||_0x1f0832===void 0?void 0:_0x1f0832['skip'])&&_0x14446a['push']('skip='+_0x1f0832['skip']);(_0x1f0832===null||_0x1f0832===void 0?void 0:_0x1f0832['query'])&&_0x14446a['push']('query='+_0x1f0832['query']);_0x14446a['length']>0x0&&_0x14446a['forEach']((_0xbd0396,_0x2304ea)=>{_0x2304ea===0x0?_0x2d6c64+='?':_0x2d6c64+='&',_0x2d6c64+=_0xbd0396;});try{const _0x3302db=yield this['fetch']['get'](_0x2d6c64,_0x391276);if(_0x3302db['status']>0xc7&&_0x3302db['status']<0x12c){const _0x4d0744=yield _0x3302db['json']();return new SuccessfulListSearchResultResponse(_0x4d0744);}const _0x13b08c=yield _0x3302db['json']();return new FailedViewSearchResultResponse(_0x13b08c);}catch(_0x7ff8c6){if(_0x7ff8c6 instanceof Error)return new FailedViewSearchResultResponse({'detail':_0x7ff8c6['message'],'title':_0x7ff8c6['name'],'status':0x1f4,'instance':'','type':''});throw _0x7ff8c6;}});}}
|
|
18
18
|
|
|
19
|
-
var __awaiter$1=undefined&&undefined['__awaiter']||function(
|
|
19
|
+
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x24b70e,_0x516ee9,_0x26be53,_0x3e32b5){function _0x24baec(_0x830d20){return _0x830d20 instanceof _0x26be53?_0x830d20:new _0x26be53(function(_0x3ec5a4){_0x3ec5a4(_0x830d20);});}return new(_0x26be53||(_0x26be53=Promise))(function(_0x7e243e,_0x316319){function _0x1a44bf(_0x4d2706){try{_0x3bdbf5(_0x3e32b5['next'](_0x4d2706));}catch(_0x265dc5){_0x316319(_0x265dc5);}}function _0x2d00bc(_0x413b8c){try{_0x3bdbf5(_0x3e32b5['throw'](_0x413b8c));}catch(_0x1170bc){_0x316319(_0x1170bc);}}function _0x3bdbf5(_0x5832df){_0x5832df['done']?_0x7e243e(_0x5832df['value']):_0x24baec(_0x5832df['value'])['then'](_0x1a44bf,_0x2d00bc);}_0x3bdbf5((_0x3e32b5=_0x3e32b5['apply'](_0x24b70e,_0x516ee9||[]))['next']());});};class ContributorService{constructor(_0x25eda9){this['fetch']=_0x25eda9,this['path']='contributor';}['create'](_0x2bae92,_0x4446d7,_0x5aac2e,_0xad5d1d){return __awaiter$1(this,void 0,void 0,function*(){const _0x42e11b={'account_name':_0x2bae92,'list_name':_0x4446d7,'contributor_name':_0x5aac2e};try{const _0x2a08a9=yield this['fetch']['post'](this['path'],_0xad5d1d,_0x42e11b);if(_0x2a08a9['status']>0xc7&&_0x2a08a9['status']<0x12c){const _0x21ea21=yield _0x2a08a9['json']();return new SuccessfulContributorResponse(_0x21ea21);}const _0x2c1d52=yield _0x2a08a9['json']();return new FailedContributorResponse(_0x2c1d52);}catch(_0x4ec3da){if(_0x4ec3da instanceof Error)return new FailedContributorResponse({'detail':_0x4ec3da['message'],'title':_0x4ec3da['name'],'status':0x1f4,'instance':'','type':''});throw _0x4ec3da;}});}['remove'](_0x2840bb,_0x43e1d9,_0xcc2e2a,_0x4473a1){return __awaiter$1(this,void 0,void 0,function*(){const _0x18fa10=this['path']+'/'+_0x2840bb+'/'+_0x43e1d9+'/'+_0xcc2e2a,_0x11cd8d=yield this['fetch']['delete'](_0x18fa10,_0x4473a1);try{if(_0x11cd8d['status']>0xc7&&_0x11cd8d['status']<0x12c)return new SuccessfulResponse({});const _0x27495c=yield _0x11cd8d['json']();return new FailedResponse(_0x27495c);}catch(_0x14bfae){if(_0x14bfae instanceof Error)return new FailedResponse({'detail':_0x14bfae['message'],'title':_0x14bfae['name'],'status':0x1f4,'instance':'','type':''});throw _0x14bfae;}});}['startsWith'](_0x485afe,_0x2f79a8){return __awaiter$1(this,void 0,void 0,function*(){const _0x53e41f=this['path']+'/'+_0x485afe;try{const _0x169ea3=yield this['fetch']['get'](_0x53e41f,_0x2f79a8);if(_0x169ea3['status']>0xc7&&_0x169ea3['status']<0x12c){const _0x379530=yield _0x169ea3['json']();return new SuccessfulAccountAndImageResponse(_0x379530);}const _0x59c468=yield _0x169ea3['json']();return new FailedAccountAndImageResponse(_0x59c468);}catch(_0x38977c){if(_0x38977c instanceof Error)return new FailedAccountAndImageResponse({'detail':_0x38977c['message'],'title':_0x38977c['name'],'status':0x1f4,'instance':'','type':''});throw _0x38977c;}});}}
|
|
20
20
|
|
|
21
|
-
var __awaiter=undefined&&undefined['__awaiter']||function(
|
|
21
|
+
var __awaiter=undefined&&undefined['__awaiter']||function(_0x2f3925,_0x3eeb72,_0x387b6d,_0x490625){function _0x22a1d8(_0x565abf){return _0x565abf instanceof _0x387b6d?_0x565abf:new _0x387b6d(function(_0xca4aa8){_0xca4aa8(_0x565abf);});}return new(_0x387b6d||(_0x387b6d=Promise))(function(_0x30da6d,_0x4ae654){function _0x894ca(_0x288396){try{_0x3a060c(_0x490625['next'](_0x288396));}catch(_0x153113){_0x4ae654(_0x153113);}}function _0x7baa1(_0x1f5f84){try{_0x3a060c(_0x490625['throw'](_0x1f5f84));}catch(_0x51efb1){_0x4ae654(_0x51efb1);}}function _0x3a060c(_0x1f92fe){_0x1f92fe['done']?_0x30da6d(_0x1f92fe['value']):_0x22a1d8(_0x1f92fe['value'])['then'](_0x894ca,_0x7baa1);}_0x3a060c((_0x490625=_0x490625['apply'](_0x2f3925,_0x3eeb72||[]))['next']());});};class AdminClient{constructor(_0x256a2c='https://admin.searchability.dev/'){var _0x3b8ba0=new Fetch(_0x256a2c);this['Accounts']=new AccountService(_0x3b8ba0),this['Lists']=new ListService(_0x3b8ba0),this['ApiKeys']=new ApiKeyService(_0x3b8ba0),this['SearchServers']=new SearchServersService(_0x3b8ba0),this['Facets']=new FacetService(_0x3b8ba0),this['SearchResults']=new SearchResultService(_0x3b8ba0),this['Contributors']=new ContributorService(_0x3b8ba0);}}class AuthClient{constructor(_0x135d59='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x135d59);}['login'](_0x1a8f91){return __awaiter(this,void 0,void 0,function*(){const _0x364f7b='login/'+_0x1a8f91;try{const _0x22ff22=yield yield fetch(_0x364f7b);if(_0x22ff22['status']>0xc7&&_0x22ff22['status']<0x12c){const _0x4cddde=yield _0x22ff22['json']();return new SuccessfulAuthResponse(_0x4cddde);}const _0x29e26c=yield _0x22ff22['json']();return new FailedAuthResponse(_0x29e26c);}catch(_0x3c1dac){if(_0x3c1dac instanceof Error)return new FailedAuthResponse({'detail':_0x3c1dac['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x3c1dac;}});}['refresh'](_0x36484c){return __awaiter(this,void 0,void 0,function*(){const _0x27323c='refresh',_0x212aa3={'refresh_token':_0x36484c};try{const _0x3382ca=yield this['fetch']['PostNoAuth'](_0x27323c,_0x212aa3);if(_0x3382ca['status']>0xc7&&_0x3382ca['status']<0x12c){const _0x13b9f5=yield _0x3382ca['json']();return new SuccessfulAuthResponse(_0x13b9f5);}const _0x57b431=yield _0x3382ca['json']();return new FailedAuthResponse(_0x57b431);}catch(_0x898358){if(_0x898358 instanceof Error)return new FailedAuthResponse({'detail':_0x898358['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x898358;}});}['getTokenStatus'](_0x3e58a2){if(Date['now']()<_0x3e58a2['access_expires'])return exports.TokenStatus['Ok'];if(Date['now']()<_0x3e58a2['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(_0x32736b){_0x32736b[_0x32736b['Ok']=0x0]='Ok',_0x32736b[_0x32736b['Refresh']=0x1]='Refresh',_0x32736b[_0x32736b['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(_0x416c63){this['isSuccess']=_0x416c63;}}class SuccessfulContributorResponse extends Response{constructor(_0x3d1d14){super(!![]),this['contributor']=_0x3d1d14;}['toSuccess'](){return this['contributor'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedContributorResponse extends Response{constructor(_0x3e89c0){super(![]),this['problem']=_0x3e89c0;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountAndImageResponse extends Response{constructor(_0x3908c4){super(!![]),this['accountAndImages']=_0x3908c4;}['toSuccess'](){return this['accountAndImages'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountAndImageResponse extends Response{constructor(_0x5bf651){super(![]),this['problem']=_0x5bf651;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulFacetResponse extends Response{constructor(_0x2a714e){super(!![]),this['facet']=_0x2a714e;}['toSuccess'](){return this['facet'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetResponse extends Response{constructor(_0x402ea1){super(![]),this['problem']=_0x402ea1;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountResponse extends Response{constructor(_0x57cfab){super(!![]),this['account']=_0x57cfab;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountImageResponse extends Response{constructor(_0x5c24bd){super(!![]),this['accountImage']=_0x5c24bd;}['toSuccess'](){return this['accountImage'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListIdentityResponse extends Response{constructor(_0x37bb3c){super(!![]),this['list']=_0x37bb3c;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListResponse extends Response{constructor(_0x15fbe1){super(!![]),this['list']=_0x15fbe1;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x2bc0c1){super(![]),this['problem']=_0x2bc0c1;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountImageResponse extends Response{constructor(_0x2a5d40){super(![]),this['problem']=_0x2a5d40;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListIdentityResponse extends Response{constructor(_0x59a7d3){super(![]),this['problem']=_0x59a7d3;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListResponse extends Response{constructor(_0x4f5a6f){super(![]),this['problem']=_0x4f5a6f;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x2f9124){super(!![]),this['tokens']=_0x2f9124;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x2db3db){super(![]),this['problem']=_0x2db3db;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x25e89d){super(!![]),this['apiKey']=_0x25e89d;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x5ee208){super(![]),this['problem']=_0x5ee208;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x17b8a4){super(!![]),this['searchService']=_0x17b8a4;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x2793f5){super(![]),this['problem']=_0x2793f5;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0xea71a5){super(!![]),this['searchService']=_0xea71a5;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulViewSearchResultResponse extends Response{constructor(_0xefffd2){super(!![]),this['searchResult']=_0xefffd2;}['toSuccess'](){return this['searchResult'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchResultResponse extends Response{constructor(_0x29bc07){super(![]),this['problem']=_0x29bc07;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchResultResponse extends Response{constructor(_0x8f564f){super(!![]),this['searchResults']=_0x8f564f;}['toSuccess'](){return this['searchResults'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchResultResponse extends Response{constructor(_0x40c906){super(![]),this['problem']=_0x40c906;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchServiceResponse extends Response{constructor(_0x48956f){super(!![]),this['searchServices']=_0x48956f;}['toSuccess'](){return this['searchServices'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServicesResponse extends Response{constructor(_0x760628){super(![]),this['problem']=_0x760628;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedViewSearchServiceResponse extends Response{constructor(_0x4b80f2){super(![]),this['problem']=_0x4b80f2;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x3ece03){super(!![]),this['apiKeyValue']=_0x3ece03;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x2aa47d){super(!![]),this['obj']=_0x2aa47d;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x305127){super(![]),this['problem']=_0x305127;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x3b8cbb){super(![]),this['problem']=_0x3b8cbb;}['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(_0xaa3efe,_0x1a5d2b,_0x2eff64,_0x4a5b6f){function _0x290e0c(_0x307df6){return _0x307df6 instanceof _0x2eff64?_0x307df6:new _0x2eff64(function(_0x453934){_0x453934(_0x307df6);});}return new(_0x2eff64||(_0x2eff64=Promise))(function(_0x3826a3,_0xa28b2c){function _0x2aadb4(_0x3ecbf1){try{_0x48c5e4(_0x4a5b6f['next'](_0x3ecbf1));}catch(_0x66ba58){_0xa28b2c(_0x66ba58);}}function _0x3cf740(_0x119056){try{_0x48c5e4(_0x4a5b6f['throw'](_0x119056));}catch(_0x16b5c3){_0xa28b2c(_0x16b5c3);}}function _0x48c5e4(_0x214374){_0x214374['done']?_0x3826a3(_0x214374['value']):_0x290e0c(_0x214374['value'])['then'](_0x2aadb4,_0x3cf740);}_0x48c5e4((_0x4a5b6f=_0x4a5b6f['apply'](_0xaa3efe,_0x1a5d2b||[]))['next']());});};class AccountService{constructor(_0x15774e){this['fetch']=_0x15774e;}['get'](_0x4fa3a3,_0x34f2cd){return __awaiter$8(this,void 0,void 0,function*(){const _0x48c500='Account/'+_0x4fa3a3+'/',_0x10a894=yield this['fetch']['get'](_0x48c500,_0x34f2cd);try{if(_0x10a894['status']>0xc7&&_0x10a894['status']<0x12c){const _0x210824=yield _0x10a894['json']();return new SuccessfulAccountResponse(_0x210824);}const _0x51ea3c=yield _0x10a894['json']();return new FailedAccountResponse(_0x51ea3c);}catch(_0x5d99e4){if(_0x5d99e4 instanceof Error)return new FailedAccountResponse({'detail':_0x5d99e4['message'],'title':_0x5d99e4['name'],'status':0x1f4,'instance':'','type':''});throw _0x5d99e4;}});}['getImage'](_0x41572f,_0x42110d){return __awaiter$8(this,void 0,void 0,function*(){const _0x13e6f3='account/image/'+_0x41572f+'/',_0x2a1942=yield this['fetch']['get'](_0x13e6f3,_0x42110d);try{if(_0x2a1942['status']>0xc7&&_0x2a1942['status']<0x12c){const _0x56cfd6=yield _0x2a1942['json']();return new SuccessfulAccountImageResponse(_0x56cfd6);}const _0x36d3a1=yield _0x2a1942['json']();return new FailedAccountImageResponse(_0x36d3a1);}catch(_0x99b085){if(_0x99b085 instanceof Error)return new FailedAccountImageResponse({'detail':_0x99b085['message'],'title':_0x99b085['name'],'status':0x1f4,'instance':'','type':''});throw _0x99b085;}});}}
|
|
4
4
|
|
|
5
|
-
var __awaiter$7=undefined&&undefined['__awaiter']||function(
|
|
5
|
+
var __awaiter$7=undefined&&undefined['__awaiter']||function(_0x54f940,_0x1c3281,_0x3d63ba,_0x5aff3f){function _0x13e308(_0x3d710a){return _0x3d710a instanceof _0x3d63ba?_0x3d710a:new _0x3d63ba(function(_0x4f8643){_0x4f8643(_0x3d710a);});}return new(_0x3d63ba||(_0x3d63ba=Promise))(function(_0x4f5382,_0x565171){function _0x2859be(_0xa7a5e3){try{_0x500325(_0x5aff3f['next'](_0xa7a5e3));}catch(_0x2fdd48){_0x565171(_0x2fdd48);}}function _0x4cd834(_0x39b5f8){try{_0x500325(_0x5aff3f['throw'](_0x39b5f8));}catch(_0x5d6801){_0x565171(_0x5d6801);}}function _0x500325(_0xa09059){_0xa09059['done']?_0x4f5382(_0xa09059['value']):_0x13e308(_0xa09059['value'])['then'](_0x2859be,_0x4cd834);}_0x500325((_0x5aff3f=_0x5aff3f['apply'](_0x54f940,_0x1c3281||[]))['next']());});};class ApiKeyService{constructor(_0x315365){this['fetch']=_0x315365,this['path']='api-key';}['create'](_0x3b9161,_0x5e5c94,_0x19e145){return __awaiter$7(this,void 0,void 0,function*(){const _0x3ae4db={'account_name':_0x3b9161,'api_key_name':_0x5e5c94};try{const _0x360d89=yield this['fetch']['post'](this['path'],_0x19e145,_0x3ae4db);if(_0x360d89['status']>0xc7&&_0x360d89['status']<0x12c){const _0x170c02=yield _0x360d89['json']();return new SuccessfulApiKeyResponse(_0x170c02);}const _0x489356=yield _0x360d89['json']();return new FailedApiKeyResponse(_0x489356);}catch(_0x4d011f){if(_0x4d011f instanceof Error)return new FailedApiKeyResponse({'detail':_0x4d011f['message'],'title':_0x4d011f['name'],'status':0x1f4,'instance':'','type':''});throw _0x4d011f;}});}['view'](_0x59cf15,_0xbbed6f,_0x4a4fd1){return __awaiter$7(this,void 0,void 0,function*(){const _0x111b82=this['path']+'/'+_0x59cf15+'/'+_0xbbed6f;try{const _0x1752f1=yield this['fetch']['get'](_0x111b82,_0x4a4fd1);if(_0x1752f1['status']>0xc7&&_0x1752f1['status']<0x12c){const _0x245d92=yield _0x1752f1['json']();return new SuccessfulApiKeyValueResponse(_0x245d92);}const _0x7bb2bf=yield _0x1752f1['json']();return new FailedApiKeyValueResponse(_0x7bb2bf);}catch(_0x1be683){if(_0x1be683 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x1be683['message'],'title':_0x1be683['name'],'status':0x1f4,'instance':'','type':''});throw _0x1be683;}});}['delete'](_0x2069ac,_0x5ede42,_0x591720){return __awaiter$7(this,void 0,void 0,function*(){const _0x27f0e6=this['path']+'/'+_0x2069ac+'/'+_0x5ede42;try{const _0xcc6436=yield this['fetch']['delete'](_0x27f0e6,_0x591720);if(_0xcc6436['status']>0xc7&&_0xcc6436['status']<0x12c)return new SuccessfulResponse({});const _0x2ccbb3=yield _0xcc6436['json']();return new FailedResponse(_0x2ccbb3);}catch(_0x8d4478){if(_0x8d4478 instanceof Error)return new FailedResponse({'detail':_0x8d4478['message'],'title':_0x8d4478['name'],'status':0x1f4,'instance':'','type':''});throw _0x8d4478;}});}}
|
|
6
6
|
|
|
7
|
-
var __awaiter$6=undefined&&undefined['__awaiter']||function(
|
|
7
|
+
var __awaiter$6=undefined&&undefined['__awaiter']||function(_0xa3ca80,_0x512fe5,_0x1cc000,_0x2b04ca){function _0x579e56(_0x5982ed){return _0x5982ed instanceof _0x1cc000?_0x5982ed:new _0x1cc000(function(_0x54c70e){_0x54c70e(_0x5982ed);});}return new(_0x1cc000||(_0x1cc000=Promise))(function(_0xf8e75d,_0x221818){function _0x4b68e2(_0x11332a){try{_0x59bbb5(_0x2b04ca['next'](_0x11332a));}catch(_0x4c466e){_0x221818(_0x4c466e);}}function _0x59016c(_0x1737d1){try{_0x59bbb5(_0x2b04ca['throw'](_0x1737d1));}catch(_0xb3e3a5){_0x221818(_0xb3e3a5);}}function _0x59bbb5(_0x4528a0){_0x4528a0['done']?_0xf8e75d(_0x4528a0['value']):_0x579e56(_0x4528a0['value'])['then'](_0x4b68e2,_0x59016c);}_0x59bbb5((_0x2b04ca=_0x2b04ca['apply'](_0xa3ca80,_0x512fe5||[]))['next']());});};class ListService{constructor(_0x564642){this['fetch']=_0x564642;}['create'](_0xee2c78,_0x62e46d,_0x123112,_0x2e32ec){return __awaiter$6(this,void 0,void 0,function*(){const _0x48df9b='List',_0x4073e0={'account_name':_0xee2c78,'list_name':_0x62e46d,'search_service_name':_0x123112};try{const _0x11adf2=yield this['fetch']['post'](_0x48df9b,_0x2e32ec,_0x4073e0);if(_0x11adf2['status']>0xc7&&_0x11adf2['status']<0x12c){const _0x3027e9=yield _0x11adf2['json']();return new SuccessfulListIdentityResponse(_0x3027e9);}const _0xd8e19e=yield _0x11adf2['json']();return new FailedListIdentityResponse(_0xd8e19e);}catch(_0x4b9c19){if(_0x4b9c19 instanceof Error)return new FailedListIdentityResponse({'detail':_0x4b9c19['message'],'title':_0x4b9c19['name'],'status':0x1f4,'instance':'','type':''});throw _0x4b9c19;}});}['delete'](_0x379ce3,_0xa8096c,_0x568a54){return __awaiter$6(this,void 0,void 0,function*(){const _0x22687d='List/'+_0x379ce3+'/'+_0xa8096c,_0x31d152=yield this['fetch']['delete'](_0x22687d,_0x568a54);try{if(_0x31d152['status']>0xc7&&_0x31d152['status']<0x12c)return new SuccessfulResponse({});const _0x3fc5fc=yield _0x31d152['json']();return new FailedResponse(_0x3fc5fc);}catch(_0x5e67a8){if(_0x5e67a8 instanceof Error)return new FailedResponse({'detail':_0x5e67a8['message'],'title':_0x5e67a8['name'],'status':0x1f4,'instance':'','type':''});throw _0x5e67a8;}});}['get'](_0x3239ac,_0x4df5a0,_0x316764){return __awaiter$6(this,void 0,void 0,function*(){const _0x21839c='List/'+_0x3239ac+'/'+_0x4df5a0;try{const _0x4d496f=yield this['fetch']['get'](_0x21839c,_0x316764);if(_0x4d496f['status']>0xc7&&_0x4d496f['status']<0x12c){const _0x1a56cb=yield _0x4d496f['json']();return new SuccessfulListResponse(_0x1a56cb);}const _0x3dc570=yield _0x4d496f['json']();return new FailedListResponse(_0x3dc570);}catch(_0x5a07df){if(_0x5a07df instanceof Error)return new FailedListResponse({'detail':_0x5a07df['message'],'title':_0x5a07df['name'],'status':0x1f4,'instance':'','type':''});throw _0x5a07df;}});}}
|
|
8
8
|
|
|
9
|
-
var __awaiter$5=undefined&&undefined['__awaiter']||function(
|
|
9
|
+
var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x5b20e9,_0x24493e,_0x434341,_0x30a9a9){function _0x136dc0(_0x2876c5){return _0x2876c5 instanceof _0x434341?_0x2876c5:new _0x434341(function(_0x12611f){_0x12611f(_0x2876c5);});}return new(_0x434341||(_0x434341=Promise))(function(_0x244439,_0x504210){function _0x4a05f8(_0x211aea){try{_0x1ba2a5(_0x30a9a9['next'](_0x211aea));}catch(_0x1b3ba2){_0x504210(_0x1b3ba2);}}function _0x4d604d(_0x236a0c){try{_0x1ba2a5(_0x30a9a9['throw'](_0x236a0c));}catch(_0x533c1e){_0x504210(_0x533c1e);}}function _0x1ba2a5(_0x514c4c){_0x514c4c['done']?_0x244439(_0x514c4c['value']):_0x136dc0(_0x514c4c['value'])['then'](_0x4a05f8,_0x4d604d);}_0x1ba2a5((_0x30a9a9=_0x30a9a9['apply'](_0x5b20e9,_0x24493e||[]))['next']());});};class Fetch{constructor(_0x262a30){this['baseUri']=_0x262a30,this['getUrl']=_0x1a03c4=>{return _0x1a03c4['startsWith']('/')&&(_0x1a03c4=_0x1a03c4['replace']('/','')),''+this['baseUri']+_0x1a03c4;},!_0x262a30['endsWith']('/')&&(_0x262a30=_0x262a30+'/');}['get'](_0x114164,_0x15face){return __awaiter$5(this,void 0,void 0,function*(){const _0x956486=this['getUrl'](_0x114164);return yield fetch(_0x956486,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x15face}});});}['post'](_0x1f17ad,_0x4b2ca8,_0x3c8d8f){return __awaiter$5(this,void 0,void 0,function*(){const _0x327648=this['getUrl'](_0x1f17ad);return yield fetch(_0x327648,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4b2ca8},'body':_0x3c8d8f?JSON['stringify'](_0x3c8d8f):null});});}['PostNoAuth'](_0xd11675,_0x5bdc24){return __awaiter$5(this,void 0,void 0,function*(){const _0x332d2c=this['getUrl'](_0xd11675);return yield fetch(_0x332d2c,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0x5bdc24?JSON['stringify'](_0x5bdc24):null});});}['put'](_0x240382,_0xc07512,_0x6e8632){return __awaiter$5(this,void 0,void 0,function*(){const _0x927d4a=this['getUrl'](_0x240382);return yield fetch(_0x927d4a,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0xc07512},'body':_0x6e8632?JSON['stringify'](_0x6e8632):null});});}['delete'](_0xd1c9f2,_0x4893a9){return __awaiter$5(this,void 0,void 0,function*(){const _0x228f29=this['getUrl'](_0xd1c9f2);return yield fetch(_0x228f29,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4893a9}});});}}
|
|
10
10
|
|
|
11
|
-
var __awaiter$4=undefined&&undefined['__awaiter']||function(
|
|
11
|
+
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x22c7a2,_0x50a115,_0x3407c1,_0x4474ce){function _0x4db972(_0x2f3127){return _0x2f3127 instanceof _0x3407c1?_0x2f3127:new _0x3407c1(function(_0x439166){_0x439166(_0x2f3127);});}return new(_0x3407c1||(_0x3407c1=Promise))(function(_0x4f3a8d,_0x38e78d){function _0x59f371(_0x2c688b){try{_0x503007(_0x4474ce['next'](_0x2c688b));}catch(_0x144941){_0x38e78d(_0x144941);}}function _0x5e9204(_0x13e99d){try{_0x503007(_0x4474ce['throw'](_0x13e99d));}catch(_0x12a882){_0x38e78d(_0x12a882);}}function _0x503007(_0x1f2503){_0x1f2503['done']?_0x4f3a8d(_0x1f2503['value']):_0x4db972(_0x1f2503['value'])['then'](_0x59f371,_0x5e9204);}_0x503007((_0x4474ce=_0x4474ce['apply'](_0x22c7a2,_0x50a115||[]))['next']());});};class SearchServersService{constructor(_0x1d64bb){this['fetch']=_0x1d64bb,this['path']='search-services';}['create'](_0x3a99f6,_0x427510,_0x5dce70,_0x39432b,_0x287424,_0x4e3d82,_0x2a2b28,_0x431edb){return __awaiter$4(this,void 0,void 0,function*(){const _0x4544cf={'account_name':_0x3a99f6,'search_service_name':_0x427510,'endpoint':_0x5dce70,'key':_0x39432b,'country':_0x287424,'provider':_0x4e3d82,'index_name':_0x2a2b28};try{const _0x34af0f=yield this['fetch']['post'](this['path'],_0x431edb,_0x4544cf);if(_0x34af0f['status']>0xc7&&_0x34af0f['status']<0x12c){const _0x2e8261=yield _0x34af0f['json']();return new SuccessfulSearchServiceResponse(_0x2e8261);}const _0xc6535c=yield _0x34af0f['json']();return new FailedSearchServiceResponse(_0xc6535c);}catch(_0x42118a){if(_0x42118a instanceof Error)return new FailedSearchServiceResponse({'detail':_0x42118a['message'],'title':_0x42118a['name'],'status':0x1f4,'instance':'','type':''});throw _0x42118a;}});}['delete'](_0x5b7e44,_0x58539e,_0x119586){return __awaiter$4(this,void 0,void 0,function*(){const _0x1f3c49=this['path']+'/'+_0x5b7e44+'/'+_0x58539e;try{const _0x4970b1=yield this['fetch']['delete'](_0x1f3c49,_0x119586);if(_0x4970b1['status']>0xc7&&_0x4970b1['status']<0x12c)return new SuccessfulResponse({});const _0x33ff01=yield _0x4970b1['json']();return new FailedResponse(_0x33ff01);}catch(_0x1d9853){if(_0x1d9853 instanceof Error)return new FailedResponse({'detail':_0x1d9853['message'],'title':_0x1d9853['name'],'status':0x1f4,'instance':'','type':''});throw _0x1d9853;}});}['view'](_0x21614c,_0x2284a6,_0x1c983f){return __awaiter$4(this,void 0,void 0,function*(){const _0x193a01=this['path']+'/'+_0x21614c+'/'+_0x2284a6;try{const _0x591c06=yield this['fetch']['get'](_0x193a01,_0x1c983f);if(_0x591c06['status']>0xc7&&_0x591c06['status']<0x12c){const _0x422014=yield _0x591c06['json']();return new SuccessfulViewSearchServiceResponse(_0x422014);}const _0x4eeab4=yield _0x591c06['json']();return new FailedViewSearchServiceResponse(_0x4eeab4);}catch(_0x4fe08d){if(_0x4fe08d instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x4fe08d['message'],'title':_0x4fe08d['name'],'status':0x1f4,'instance':'','type':''});throw _0x4fe08d;}});}['edit'](_0x3959fe,_0x1deca5,_0x49c3ca,_0x48f375,_0x4dc17e){return __awaiter$4(this,void 0,void 0,function*(){const _0x1e5cc9={'account_name':_0x3959fe,'search_service_name':_0x1deca5,'key':_0x49c3ca,'country':_0x48f375};try{const _0x44469c=yield this['fetch']['put'](this['path'],_0x4dc17e,_0x1e5cc9);if(_0x44469c['status']>0xc7&&_0x44469c['status']<0x12c){const _0x47ea16=yield _0x44469c['json']();return new SuccessfulSearchServiceResponse(_0x47ea16);}const _0x5d4ce1=yield _0x44469c['json']();return new FailedSearchServiceResponse(_0x5d4ce1);}catch(_0x39150b){if(_0x39150b instanceof Error)return new FailedSearchServiceResponse({'detail':_0x39150b['message'],'title':_0x39150b['name'],'status':0x1f4,'instance':'','type':''});throw _0x39150b;}});}['list'](_0x15c004,_0x439651){return __awaiter$4(this,void 0,void 0,function*(){const _0x5d88ab=this['path']+'/'+_0x15c004;try{const _0x56c445=yield this['fetch']['get'](_0x5d88ab,_0x439651);if(_0x56c445['status']>0xc7&&_0x56c445['status']<0x12c){const _0x5a294d=yield _0x56c445['json']();return new SuccessfulListSearchServiceResponse(_0x5a294d);}const _0x27915d=yield _0x56c445['json']();return new FailedViewSearchServicesResponse(_0x27915d);}catch(_0x5321d5){if(_0x5321d5 instanceof Error)return new FailedViewSearchServicesResponse({'detail':_0x5321d5['message'],'title':_0x5321d5['name'],'status':0x1f4,'instance':'','type':''});throw _0x5321d5;}});}}
|
|
12
12
|
|
|
13
|
-
var __awaiter$3=undefined&&undefined['__awaiter']||function(
|
|
13
|
+
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x32948e,_0x5f4dc0,_0x20b945,_0xb2e675){function _0x312a44(_0x4647fa){return _0x4647fa instanceof _0x20b945?_0x4647fa:new _0x20b945(function(_0x4a2375){_0x4a2375(_0x4647fa);});}return new(_0x20b945||(_0x20b945=Promise))(function(_0x3e0add,_0x520039){function _0x5f224b(_0xc8bcdd){try{_0x13818e(_0xb2e675['next'](_0xc8bcdd));}catch(_0x3083fc){_0x520039(_0x3083fc);}}function _0x354796(_0x14baa0){try{_0x13818e(_0xb2e675['throw'](_0x14baa0));}catch(_0x361e60){_0x520039(_0x361e60);}}function _0x13818e(_0x4b31e3){_0x4b31e3['done']?_0x3e0add(_0x4b31e3['value']):_0x312a44(_0x4b31e3['value'])['then'](_0x5f224b,_0x354796);}_0x13818e((_0xb2e675=_0xb2e675['apply'](_0x32948e,_0x5f4dc0||[]))['next']());});};class FacetService{constructor(_0x9acf2e){this['fetch']=_0x9acf2e,this['path']='facet';}['create'](_0x4e8658,_0x3cec8e,_0x48fa88,_0x3b4e84){return __awaiter$3(this,void 0,void 0,function*(){const _0x598c11={'account_name':_0x4e8658,'list_name':_0x3cec8e,'facet_name':_0x48fa88};try{const _0x542ee5=yield this['fetch']['post'](this['path'],_0x3b4e84,_0x598c11);if(_0x542ee5['status']>0xc7&&_0x542ee5['status']<0x12c){const _0x369c0b=yield _0x542ee5['json']();return new SuccessfulFacetResponse(_0x369c0b);}const _0x532beb=yield _0x542ee5['json']();return new FailedFacetResponse(_0x532beb);}catch(_0x44070c){if(_0x44070c instanceof Error)return new FailedFacetResponse({'detail':_0x44070c['message'],'title':_0x44070c['name'],'status':0x1f4,'instance':'','type':''});throw _0x44070c;}});}['remove'](_0x5f0dcf,_0x2dd10d,_0x456a13,_0x4d8a2d){return __awaiter$3(this,void 0,void 0,function*(){const _0x14c5ba='Facet/'+_0x5f0dcf+'/'+_0x2dd10d+'/'+_0x456a13,_0xc9c490=yield this['fetch']['delete'](_0x14c5ba,_0x4d8a2d);try{if(_0xc9c490['status']>0xc7&&_0xc9c490['status']<0x12c)return new SuccessfulResponse({});const _0x36c189=yield _0xc9c490['json']();return new FailedResponse(_0x36c189);}catch(_0x14226e){if(_0x14226e instanceof Error)return new FailedResponse({'detail':_0x14226e['message'],'title':_0x14226e['name'],'status':0x1f4,'instance':'','type':''});throw _0x14226e;}});}['rename'](_0x2d7ff1,_0x148443,_0x216efb,_0x4e66e3,_0x116079){return __awaiter$3(this,void 0,void 0,function*(){const _0x1b5040={'account_name':_0x2d7ff1,'list_name':_0x148443,'facet_name':_0x216efb,'new_facet_name':_0x4e66e3};try{const _0x2d5d52=yield this['fetch']['put'](this['path'],_0x116079,_0x1b5040);if(_0x2d5d52['status']>0xc7&&_0x2d5d52['status']<0x12c){const _0x167cb2=yield _0x2d5d52['json']();return new SuccessfulFacetResponse(_0x167cb2);}const _0x274458=yield _0x2d5d52['json']();return new FailedFacetResponse(_0x274458);}catch(_0xdd5380){if(_0xdd5380 instanceof Error)return new FailedFacetResponse({'detail':_0xdd5380['message'],'title':_0xdd5380['name'],'status':0x1f4,'instance':'','type':''});throw _0xdd5380;}});}}
|
|
14
14
|
|
|
15
|
-
var __awaiter$2=undefined&&undefined['__awaiter']||function(
|
|
15
|
+
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x642ba1,_0x5037b9,_0x2fd97a,_0x499bf2){function _0x5ac1d8(_0x167244){return _0x167244 instanceof _0x2fd97a?_0x167244:new _0x2fd97a(function(_0x4d8bb2){_0x4d8bb2(_0x167244);});}return new(_0x2fd97a||(_0x2fd97a=Promise))(function(_0x4810e6,_0x546201){function _0x13bebd(_0x2daacf){try{_0x10a570(_0x499bf2['next'](_0x2daacf));}catch(_0x2ca91b){_0x546201(_0x2ca91b);}}function _0x1aa75e(_0x4bd902){try{_0x10a570(_0x499bf2['throw'](_0x4bd902));}catch(_0x35155d){_0x546201(_0x35155d);}}function _0x10a570(_0x378618){_0x378618['done']?_0x4810e6(_0x378618['value']):_0x5ac1d8(_0x378618['value'])['then'](_0x13bebd,_0x1aa75e);}_0x10a570((_0x499bf2=_0x499bf2['apply'](_0x642ba1,_0x5037b9||[]))['next']());});};class SearchResultService{constructor(_0x4d2b10){this['fetch']=_0x4d2b10,this['path']='search-result';}['create'](_0x28a9a6,_0x53d385,_0x421ff8,_0x500f60,_0x490d93){return __awaiter$2(this,void 0,void 0,function*(){_0x490d93=_0x490d93!==null&&_0x490d93!==void 0?_0x490d93:{'description':'','keywords':'','resource_1':'','resource_2':'','resource_3':'','latitude':0x0,'longitude':0x0,'facets':[]};const _0x11b75c=Object['assign']({'account_name':_0x28a9a6,'search_result_name':_0x421ff8,'list_name':_0x53d385},_0x490d93);try{const _0x5b7b02=yield this['fetch']['post'](this['path'],_0x500f60,_0x11b75c);if(_0x5b7b02['status']>0xc7&&_0x5b7b02['status']<0x12c){const _0x2a6ca7=yield _0x5b7b02['json']();return new SuccessfulViewSearchResultResponse(_0x2a6ca7);}const _0x59e8cc=yield _0x5b7b02['json']();return new FailedSearchResultResponse(_0x59e8cc);}catch(_0x345145){if(_0x345145 instanceof Error)return new FailedSearchResultResponse({'detail':_0x345145['message'],'title':_0x345145['name'],'status':0x1f4,'instance':'','type':''});throw _0x345145;}});}['transfer'](_0x1db807,_0x4504e3,_0x3ae094,_0x44f7fe){return __awaiter$2(this,void 0,void 0,function*(){const _0x316248={'account_name':_0x1db807,'list_name':_0x4504e3,'new_search_service_name':_0x3ae094};try{const _0x133945=yield this['fetch']['post'](this['path']+'/transfer',_0x44f7fe,_0x316248);if(_0x133945['status']>0xc7&&_0x133945['status']<0x12c){const _0x412282=yield _0x133945['json']();return new SuccessfulListResponse(_0x412282);}const _0x15171b=yield _0x133945['json']();return new FailedListResponse(_0x15171b);}catch(_0x476bed){if(_0x476bed instanceof Error)return new FailedListResponse({'detail':_0x476bed['message'],'title':_0x476bed['name'],'status':0x1f4,'instance':'','type':''});throw _0x476bed;}});}['list'](_0x5e25b5,_0x253bec,_0x57cd74,_0x509dfb){return __awaiter$2(this,void 0,void 0,function*(){let _0x25d623=this['path']+'/'+_0x5e25b5+'/'+_0x253bec;const _0x6194b2=[];(_0x509dfb===null||_0x509dfb===void 0?void 0:_0x509dfb['size'])&&_0x6194b2['push']('size='+_0x509dfb['size']);(_0x509dfb===null||_0x509dfb===void 0?void 0:_0x509dfb['skip'])&&_0x6194b2['push']('skip='+_0x509dfb['skip']);(_0x509dfb===null||_0x509dfb===void 0?void 0:_0x509dfb['query'])&&_0x6194b2['push']('query='+_0x509dfb['query']);_0x6194b2['length']>0x0&&_0x6194b2['forEach']((_0x10c349,_0x4108c5)=>{_0x4108c5===0x0?_0x25d623+='?':_0x25d623+='&',_0x25d623+=_0x10c349;});try{const _0x2496bb=yield this['fetch']['get'](_0x25d623,_0x57cd74);if(_0x2496bb['status']>0xc7&&_0x2496bb['status']<0x12c){const _0x12f06d=yield _0x2496bb['json']();return new SuccessfulListSearchResultResponse(_0x12f06d);}const _0x4c364c=yield _0x2496bb['json']();return new FailedViewSearchResultResponse(_0x4c364c);}catch(_0x1f6e3d){if(_0x1f6e3d instanceof Error)return new FailedViewSearchResultResponse({'detail':_0x1f6e3d['message'],'title':_0x1f6e3d['name'],'status':0x1f4,'instance':'','type':''});throw _0x1f6e3d;}});}}
|
|
16
16
|
|
|
17
|
-
var __awaiter$1=undefined&&undefined['__awaiter']||function(
|
|
17
|
+
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x2e9854,_0x353ce8,_0x261163,_0x580035){function _0x26ab3d(_0x2ab76e){return _0x2ab76e instanceof _0x261163?_0x2ab76e:new _0x261163(function(_0x2b88d5){_0x2b88d5(_0x2ab76e);});}return new(_0x261163||(_0x261163=Promise))(function(_0x1a4edb,_0xb63943){function _0x33f596(_0xcf6a9a){try{_0x34adca(_0x580035['next'](_0xcf6a9a));}catch(_0x2d9c49){_0xb63943(_0x2d9c49);}}function _0x3f6bb7(_0x576c3b){try{_0x34adca(_0x580035['throw'](_0x576c3b));}catch(_0x38885c){_0xb63943(_0x38885c);}}function _0x34adca(_0x220fed){_0x220fed['done']?_0x1a4edb(_0x220fed['value']):_0x26ab3d(_0x220fed['value'])['then'](_0x33f596,_0x3f6bb7);}_0x34adca((_0x580035=_0x580035['apply'](_0x2e9854,_0x353ce8||[]))['next']());});};class ContributorService{constructor(_0x56db8c){this['fetch']=_0x56db8c,this['path']='contributor';}['create'](_0xe6e97a,_0x55b692,_0x4719e1,_0x5a8fed){return __awaiter$1(this,void 0,void 0,function*(){const _0x28d3c7={'account_name':_0xe6e97a,'list_name':_0x55b692,'contributor_name':_0x4719e1};try{const _0x559d24=yield this['fetch']['post'](this['path'],_0x5a8fed,_0x28d3c7);if(_0x559d24['status']>0xc7&&_0x559d24['status']<0x12c){const _0x27f7eb=yield _0x559d24['json']();return new SuccessfulContributorResponse(_0x27f7eb);}const _0x588b18=yield _0x559d24['json']();return new FailedContributorResponse(_0x588b18);}catch(_0x4654ef){if(_0x4654ef instanceof Error)return new FailedContributorResponse({'detail':_0x4654ef['message'],'title':_0x4654ef['name'],'status':0x1f4,'instance':'','type':''});throw _0x4654ef;}});}['remove'](_0x476d2f,_0x22c188,_0xfbacc7,_0x3cf630){return __awaiter$1(this,void 0,void 0,function*(){const _0x15ec7d=this['path']+'/'+_0x476d2f+'/'+_0x22c188+'/'+_0xfbacc7,_0x281e33=yield this['fetch']['delete'](_0x15ec7d,_0x3cf630);try{if(_0x281e33['status']>0xc7&&_0x281e33['status']<0x12c)return new SuccessfulResponse({});const _0x3c0ad8=yield _0x281e33['json']();return new FailedResponse(_0x3c0ad8);}catch(_0x4f1ae0){if(_0x4f1ae0 instanceof Error)return new FailedResponse({'detail':_0x4f1ae0['message'],'title':_0x4f1ae0['name'],'status':0x1f4,'instance':'','type':''});throw _0x4f1ae0;}});}['startsWith'](_0x57cd70,_0x3c7eab){return __awaiter$1(this,void 0,void 0,function*(){const _0x446f28=this['path']+'/'+_0x57cd70;try{const _0x48dc6b=yield this['fetch']['get'](_0x446f28,_0x3c7eab);if(_0x48dc6b['status']>0xc7&&_0x48dc6b['status']<0x12c){const _0x1647d2=yield _0x48dc6b['json']();return new SuccessfulAccountAndImageResponse(_0x1647d2);}const _0xd0d857=yield _0x48dc6b['json']();return new FailedAccountAndImageResponse(_0xd0d857);}catch(_0x21d80b){if(_0x21d80b instanceof Error)return new FailedAccountAndImageResponse({'detail':_0x21d80b['message'],'title':_0x21d80b['name'],'status':0x1f4,'instance':'','type':''});throw _0x21d80b;}});}}
|
|
18
18
|
|
|
19
|
-
var __awaiter=undefined&&undefined['__awaiter']||function(
|
|
19
|
+
var __awaiter=undefined&&undefined['__awaiter']||function(_0xb34257,_0x350907,_0x9f0a23,_0x5d43f6){function _0x25589e(_0x45a9dc){return _0x45a9dc instanceof _0x9f0a23?_0x45a9dc:new _0x9f0a23(function(_0x4935fa){_0x4935fa(_0x45a9dc);});}return new(_0x9f0a23||(_0x9f0a23=Promise))(function(_0x5a6b1a,_0x1acd29){function _0x542c88(_0x6a11d0){try{_0x9d6a31(_0x5d43f6['next'](_0x6a11d0));}catch(_0x116947){_0x1acd29(_0x116947);}}function _0x359e47(_0x56ce9a){try{_0x9d6a31(_0x5d43f6['throw'](_0x56ce9a));}catch(_0x22d5ee){_0x1acd29(_0x22d5ee);}}function _0x9d6a31(_0x56929d){_0x56929d['done']?_0x5a6b1a(_0x56929d['value']):_0x25589e(_0x56929d['value'])['then'](_0x542c88,_0x359e47);}_0x9d6a31((_0x5d43f6=_0x5d43f6['apply'](_0xb34257,_0x350907||[]))['next']());});};class AdminClient{constructor(_0x497aa0='https://admin.searchability.dev/'){var _0x581673=new Fetch(_0x497aa0);this['Accounts']=new AccountService(_0x581673),this['Lists']=new ListService(_0x581673),this['ApiKeys']=new ApiKeyService(_0x581673),this['SearchServers']=new SearchServersService(_0x581673),this['Facets']=new FacetService(_0x581673),this['SearchResults']=new SearchResultService(_0x581673),this['Contributors']=new ContributorService(_0x581673);}}class AuthClient{constructor(_0x147d3c='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x147d3c);}['login'](_0xf306d7){return __awaiter(this,void 0,void 0,function*(){const _0x591a29='login/'+_0xf306d7;try{const _0x6c0aeb=yield yield fetch(_0x591a29);if(_0x6c0aeb['status']>0xc7&&_0x6c0aeb['status']<0x12c){const _0xc82f6f=yield _0x6c0aeb['json']();return new SuccessfulAuthResponse(_0xc82f6f);}const _0x5b914d=yield _0x6c0aeb['json']();return new FailedAuthResponse(_0x5b914d);}catch(_0xcb6846){if(_0xcb6846 instanceof Error)return new FailedAuthResponse({'detail':_0xcb6846['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0xcb6846;}});}['refresh'](_0xb9ea85){return __awaiter(this,void 0,void 0,function*(){const _0x1eccca='refresh',_0x45e10b={'refresh_token':_0xb9ea85};try{const _0x1bedda=yield this['fetch']['PostNoAuth'](_0x1eccca,_0x45e10b);if(_0x1bedda['status']>0xc7&&_0x1bedda['status']<0x12c){const _0x2833ae=yield _0x1bedda['json']();return new SuccessfulAuthResponse(_0x2833ae);}const _0x1a28d2=yield _0x1bedda['json']();return new FailedAuthResponse(_0x1a28d2);}catch(_0x4b72e7){if(_0x4b72e7 instanceof Error)return new FailedAuthResponse({'detail':_0x4b72e7['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x4b72e7;}});}['getTokenStatus'](_0x45521b){if(Date['now']()<_0x45521b['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x45521b['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
|
|
20
20
|
|
|
21
21
|
export { AdminClient, AuthClient, TokenStatus, Tokens };
|
package/dist/types.d.ts
CHANGED
|
@@ -57,8 +57,9 @@ declare class SearchResultService {
|
|
|
57
57
|
private readonly fetch;
|
|
58
58
|
private readonly path;
|
|
59
59
|
constructor(fetch: Fetch);
|
|
60
|
-
create(account_name: string, list_name: string, search_result_name: string, access_token: string, options?: CreateSearchResultOptions | undefined): Promise<Response<SearchResult, Problem>>;
|
|
60
|
+
create(account_name: string, list_name: string, search_result_name: string, access_token: string, options?: Partial<CreateSearchResultOptions> | undefined): Promise<Response<SearchResult, Problem>>;
|
|
61
61
|
transfer(account_name: string, list_name: string, new_search_service_name: string, access_token: string): Promise<Response<List, Problem>>;
|
|
62
|
+
list(account_name: string, list_name: string, access_token: string, options?: Partial<ListSearchResultOptions> | undefined): Promise<Response<SearchResult[], Problem>>;
|
|
62
63
|
}
|
|
63
64
|
|
|
64
65
|
declare class ContributorService {
|
|
@@ -207,6 +208,11 @@ type CreateSearchResultOptions = {
|
|
|
207
208
|
longitude?: number;
|
|
208
209
|
facets?: NameAndValue[];
|
|
209
210
|
};
|
|
211
|
+
type ListSearchResultOptions = {
|
|
212
|
+
size?: number;
|
|
213
|
+
skip?: number;
|
|
214
|
+
query?: string;
|
|
215
|
+
};
|
|
210
216
|
declare class SuccessfulContributorResponse extends Response<Contributor, Problem> {
|
|
211
217
|
readonly contributor: Contributor;
|
|
212
218
|
constructor(contributor: Contributor);
|
|
@@ -345,6 +351,18 @@ declare class FailedSearchResultResponse extends Response<SearchResult, Problem>
|
|
|
345
351
|
toSuccess(): SearchResult;
|
|
346
352
|
toProblem(): Problem;
|
|
347
353
|
}
|
|
354
|
+
declare class SuccessfulListSearchResultResponse extends Response<SearchResult[], Problem> {
|
|
355
|
+
readonly searchResults: SearchResult[];
|
|
356
|
+
constructor(searchResults: SearchResult[]);
|
|
357
|
+
toSuccess(): SearchResult[];
|
|
358
|
+
toProblem(): Problem;
|
|
359
|
+
}
|
|
360
|
+
declare class FailedViewSearchResultResponse extends Response<SearchResult[], Problem> {
|
|
361
|
+
readonly problem: Problem;
|
|
362
|
+
constructor(problem: Problem);
|
|
363
|
+
toSuccess(): SearchResult[];
|
|
364
|
+
toProblem(): Problem;
|
|
365
|
+
}
|
|
348
366
|
declare class SuccessfulListSearchServiceResponse extends Response<SearchService[], Problem> {
|
|
349
367
|
readonly searchServices: SearchService[];
|
|
350
368
|
constructor(searchServices: SearchService[]);
|
|
@@ -388,4 +406,4 @@ declare class FailedApiKeyValueResponse extends Response<ApiKeyValue, Problem> {
|
|
|
388
406
|
toProblem(): Problem;
|
|
389
407
|
}
|
|
390
408
|
|
|
391
|
-
export { type Account, type AccountAndImage, type AccountImage, AdminClient, type ApiKey, type ApiKeyValue, AuthClient, type Contributor, type CreateSearchResultOptions, type Error, type Facet, FailedAccountAndImageResponse, FailedAccountImageResponse, FailedAccountResponse, FailedApiKeyResponse, FailedApiKeyValueResponse, FailedAuthResponse, FailedContributorResponse, FailedFacetResponse, FailedListIdentityResponse, FailedListResponse, FailedResponse, FailedSearchResultResponse, FailedSearchServiceResponse, FailedViewSearchServiceResponse, FailedViewSearchServicesResponse, type List, type ListIdentity, type NameAndValue, type Problem, type RefreshRequest, Response, type SearchResult, type SearchService, type SearchServiceDetails, SuccessfulAccountAndImageResponse, SuccessfulAccountImageResponse, SuccessfulAccountResponse, SuccessfulApiKeyResponse, SuccessfulApiKeyValueResponse, SuccessfulAuthResponse, SuccessfulContributorResponse, SuccessfulFacetResponse, SuccessfulListIdentityResponse, SuccessfulListResponse, SuccessfulListSearchServiceResponse, SuccessfulResponse, SuccessfulSearchServiceResponse, SuccessfulViewSearchResultResponse, SuccessfulViewSearchServiceResponse, TokenStatus, Tokens };
|
|
409
|
+
export { type Account, type AccountAndImage, type AccountImage, AdminClient, type ApiKey, type ApiKeyValue, AuthClient, type Contributor, type CreateSearchResultOptions, type Error, type Facet, FailedAccountAndImageResponse, FailedAccountImageResponse, FailedAccountResponse, FailedApiKeyResponse, FailedApiKeyValueResponse, FailedAuthResponse, FailedContributorResponse, FailedFacetResponse, FailedListIdentityResponse, FailedListResponse, FailedResponse, FailedSearchResultResponse, FailedSearchServiceResponse, FailedViewSearchResultResponse, FailedViewSearchServiceResponse, FailedViewSearchServicesResponse, type List, type ListIdentity, type ListSearchResultOptions, type NameAndValue, type Problem, type RefreshRequest, Response, type SearchResult, type SearchService, type SearchServiceDetails, SuccessfulAccountAndImageResponse, SuccessfulAccountImageResponse, SuccessfulAccountResponse, SuccessfulApiKeyResponse, SuccessfulApiKeyValueResponse, SuccessfulAuthResponse, SuccessfulContributorResponse, SuccessfulFacetResponse, SuccessfulListIdentityResponse, SuccessfulListResponse, SuccessfulListSearchResultResponse, SuccessfulListSearchServiceResponse, SuccessfulResponse, SuccessfulSearchServiceResponse, SuccessfulViewSearchResultResponse, SuccessfulViewSearchServiceResponse, TokenStatus, Tokens };
|
package/package.json
CHANGED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
var TokenStatus;(function(_0x52d8f1){_0x52d8f1[_0x52d8f1['Ok']=0x0]='Ok',_0x52d8f1[_0x52d8f1['Refresh']=0x1]='Refresh',_0x52d8f1[_0x52d8f1['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(_0x2d309c){this['isSuccess']=_0x2d309c;}}class SuccessfulContributorResponse extends Response{constructor(_0x145762){super(!![]),this['contributor']=_0x145762;}['toSuccess'](){return this['contributor'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedContributorResponse extends Response{constructor(_0x3b56ce){super(![]),this['problem']=_0x3b56ce;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountAndImageResponse extends Response{constructor(_0x5f479f){super(!![]),this['accountAndImages']=_0x5f479f;}['toSuccess'](){return this['accountAndImages'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountAndImageResponse extends Response{constructor(_0x25fd5d){super(![]),this['problem']=_0x25fd5d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulFacetResponse extends Response{constructor(_0x500c3b){super(!![]),this['facet']=_0x500c3b;}['toSuccess'](){return this['facet'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetResponse extends Response{constructor(_0xf2105b){super(![]),this['problem']=_0xf2105b;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountResponse extends Response{constructor(_0x53fb1c){super(!![]),this['account']=_0x53fb1c;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountImageResponse extends Response{constructor(_0x3a92c8){super(!![]),this['accountImage']=_0x3a92c8;}['toSuccess'](){return this['accountImage'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListIdentityResponse extends Response{constructor(_0x3f5f72){super(!![]),this['list']=_0x3f5f72;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListResponse extends Response{constructor(_0x24494b){super(!![]),this['list']=_0x24494b;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x169cc9){super(![]),this['problem']=_0x169cc9;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountImageResponse extends Response{constructor(_0x417c13){super(![]),this['problem']=_0x417c13;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListIdentityResponse extends Response{constructor(_0x43a005){super(![]),this['problem']=_0x43a005;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListResponse extends Response{constructor(_0x45e91b){super(![]),this['problem']=_0x45e91b;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x49579c){super(!![]),this['tokens']=_0x49579c;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x241987){super(![]),this['problem']=_0x241987;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x123652){super(!![]),this['apiKey']=_0x123652;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x2d955f){super(![]),this['problem']=_0x2d955f;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0xb43551){super(!![]),this['searchService']=_0xb43551;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0xbbf316){super(![]),this['problem']=_0xbbf316;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x2ee71d){super(!![]),this['searchService']=_0x2ee71d;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulViewSearchResultResponse extends Response{constructor(_0x42d4c9){super(!![]),this['searchResult']=_0x42d4c9;}['toSuccess'](){return this['searchResult'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchResultResponse extends Response{constructor(_0x5f56a8){super(![]),this['problem']=_0x5f56a8;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchServiceResponse extends Response{constructor(_0x2c91ef){super(!![]),this['searchServices']=_0x2c91ef;}['toSuccess'](){return this['searchServices'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServicesResponse extends Response{constructor(_0x142088){super(![]),this['problem']=_0x142088;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedViewSearchServiceResponse extends Response{constructor(_0x45dd7e){super(![]),this['problem']=_0x45dd7e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x4a1e60){super(!![]),this['apiKeyValue']=_0x4a1e60;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x1416f1){super(!![]),this['obj']=_0x1416f1;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x25d91e){super(![]),this['problem']=_0x25d91e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x5bc33e){super(![]),this['problem']=_0x5bc33e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
|
|
2
|
-
|
|
3
|
-
var __awaiter$8=undefined&&undefined['__awaiter']||function(_0x23eebe,_0x51f058,_0x2d9d4e,_0x75aa3b){function _0x5d747a(_0x462a9a){return _0x462a9a instanceof _0x2d9d4e?_0x462a9a:new _0x2d9d4e(function(_0x23360f){_0x23360f(_0x462a9a);});}return new(_0x2d9d4e||(_0x2d9d4e=Promise))(function(_0xee6280,_0x308c7c){function _0x177723(_0x205962){try{_0x377206(_0x75aa3b['next'](_0x205962));}catch(_0x420daf){_0x308c7c(_0x420daf);}}function _0x3fa913(_0x579eaa){try{_0x377206(_0x75aa3b['throw'](_0x579eaa));}catch(_0x42af2e){_0x308c7c(_0x42af2e);}}function _0x377206(_0x2a5376){_0x2a5376['done']?_0xee6280(_0x2a5376['value']):_0x5d747a(_0x2a5376['value'])['then'](_0x177723,_0x3fa913);}_0x377206((_0x75aa3b=_0x75aa3b['apply'](_0x23eebe,_0x51f058||[]))['next']());});};class AccountService{constructor(_0x2e3961){this['fetch']=_0x2e3961;}['get'](_0x46725d,_0x21d3a8){return __awaiter$8(this,void 0,void 0,function*(){const _0x559978='Account/'+_0x46725d+'/',_0x5d047b=yield this['fetch']['get'](_0x559978,_0x21d3a8);try{if(_0x5d047b['status']>0xc7&&_0x5d047b['status']<0x12c){const _0x533b4b=yield _0x5d047b['json']();return new SuccessfulAccountResponse(_0x533b4b);}const _0x276c12=yield _0x5d047b['json']();return new FailedAccountResponse(_0x276c12);}catch(_0x29fa95){if(_0x29fa95 instanceof Error)return new FailedAccountResponse({'detail':_0x29fa95['message'],'title':_0x29fa95['name'],'status':0x1f4,'instance':'','type':''});throw _0x29fa95;}});}['getImage'](_0xc739fb,_0x3043b6){return __awaiter$8(this,void 0,void 0,function*(){const _0x3deb30='account/image/'+_0xc739fb+'/',_0x58798b=yield this['fetch']['get'](_0x3deb30,_0x3043b6);try{if(_0x58798b['status']>0xc7&&_0x58798b['status']<0x12c){const _0xc05796=yield _0x58798b['json']();return new SuccessfulAccountImageResponse(_0xc05796);}const _0x46f235=yield _0x58798b['json']();return new FailedAccountImageResponse(_0x46f235);}catch(_0x3419f4){if(_0x3419f4 instanceof Error)return new FailedAccountImageResponse({'detail':_0x3419f4['message'],'title':_0x3419f4['name'],'status':0x1f4,'instance':'','type':''});throw _0x3419f4;}});}}
|
|
4
|
-
|
|
5
|
-
var __awaiter$7=undefined&&undefined['__awaiter']||function(_0x470b5b,_0x3b2f97,_0x538585,_0x6b2346){function _0x1834f3(_0x5aa781){return _0x5aa781 instanceof _0x538585?_0x5aa781:new _0x538585(function(_0x84febc){_0x84febc(_0x5aa781);});}return new(_0x538585||(_0x538585=Promise))(function(_0x4ea3f8,_0x1a87ec){function _0x3e2e45(_0x26fa8b){try{_0x15edc0(_0x6b2346['next'](_0x26fa8b));}catch(_0x648bc0){_0x1a87ec(_0x648bc0);}}function _0x2dbe74(_0x1f8ab4){try{_0x15edc0(_0x6b2346['throw'](_0x1f8ab4));}catch(_0x27d26e){_0x1a87ec(_0x27d26e);}}function _0x15edc0(_0x1351f9){_0x1351f9['done']?_0x4ea3f8(_0x1351f9['value']):_0x1834f3(_0x1351f9['value'])['then'](_0x3e2e45,_0x2dbe74);}_0x15edc0((_0x6b2346=_0x6b2346['apply'](_0x470b5b,_0x3b2f97||[]))['next']());});};class ApiKeyService{constructor(_0x3eedba){this['fetch']=_0x3eedba,this['path']='api-key';}['create'](_0x50d386,_0x536031,_0x283abc){return __awaiter$7(this,void 0,void 0,function*(){const _0x3e7801={'account_name':_0x50d386,'api_key_name':_0x536031};try{const _0x1a2aae=yield this['fetch']['post'](this['path'],_0x283abc,_0x3e7801);if(_0x1a2aae['status']>0xc7&&_0x1a2aae['status']<0x12c){const _0x3a9742=yield _0x1a2aae['json']();return new SuccessfulApiKeyResponse(_0x3a9742);}const _0x5710a9=yield _0x1a2aae['json']();return new FailedApiKeyResponse(_0x5710a9);}catch(_0x41bdc1){if(_0x41bdc1 instanceof Error)return new FailedApiKeyResponse({'detail':_0x41bdc1['message'],'title':_0x41bdc1['name'],'status':0x1f4,'instance':'','type':''});throw _0x41bdc1;}});}['view'](_0x101a2a,_0x2d7f49,_0x420253){return __awaiter$7(this,void 0,void 0,function*(){const _0x417cb8=this['path']+'/'+_0x101a2a+'/'+_0x2d7f49;try{const _0x2942f5=yield this['fetch']['get'](_0x417cb8,_0x420253);if(_0x2942f5['status']>0xc7&&_0x2942f5['status']<0x12c){const _0x5eca5d=yield _0x2942f5['json']();return new SuccessfulApiKeyValueResponse(_0x5eca5d);}const _0x2e42cb=yield _0x2942f5['json']();return new FailedApiKeyValueResponse(_0x2e42cb);}catch(_0x4f69e4){if(_0x4f69e4 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x4f69e4['message'],'title':_0x4f69e4['name'],'status':0x1f4,'instance':'','type':''});throw _0x4f69e4;}});}['delete'](_0x1ba6ec,_0x3ee4cc,_0x1a67dc){return __awaiter$7(this,void 0,void 0,function*(){const _0x100f35=this['path']+'/'+_0x1ba6ec+'/'+_0x3ee4cc;try{const _0x3edf00=yield this['fetch']['delete'](_0x100f35,_0x1a67dc);if(_0x3edf00['status']>0xc7&&_0x3edf00['status']<0x12c)return new SuccessfulResponse({});const _0x4f10d9=yield _0x3edf00['json']();return new FailedResponse(_0x4f10d9);}catch(_0x18a875){if(_0x18a875 instanceof Error)return new FailedResponse({'detail':_0x18a875['message'],'title':_0x18a875['name'],'status':0x1f4,'instance':'','type':''});throw _0x18a875;}});}}
|
|
6
|
-
|
|
7
|
-
var __awaiter$6=undefined&&undefined['__awaiter']||function(_0x6f05e8,_0x23d30d,_0x577b29,_0x1c6e40){function _0x1e5844(_0x10172b){return _0x10172b instanceof _0x577b29?_0x10172b:new _0x577b29(function(_0x3e8fe2){_0x3e8fe2(_0x10172b);});}return new(_0x577b29||(_0x577b29=Promise))(function(_0x5f580e,_0x2c793e){function _0x532a9d(_0x359789){try{_0x81fb9b(_0x1c6e40['next'](_0x359789));}catch(_0x4d657b){_0x2c793e(_0x4d657b);}}function _0x49b668(_0x1b767e){try{_0x81fb9b(_0x1c6e40['throw'](_0x1b767e));}catch(_0x2440e9){_0x2c793e(_0x2440e9);}}function _0x81fb9b(_0x16a045){_0x16a045['done']?_0x5f580e(_0x16a045['value']):_0x1e5844(_0x16a045['value'])['then'](_0x532a9d,_0x49b668);}_0x81fb9b((_0x1c6e40=_0x1c6e40['apply'](_0x6f05e8,_0x23d30d||[]))['next']());});};class ListService{constructor(_0x58b726){this['fetch']=_0x58b726;}['create'](_0xe33d70,_0x44bf6b,_0x11c260,_0x57317c){return __awaiter$6(this,void 0,void 0,function*(){const _0x19ebd4='List',_0x29af8f={'account_name':_0xe33d70,'list_name':_0x44bf6b,'search_service_name':_0x11c260};try{const _0x43255a=yield this['fetch']['post'](_0x19ebd4,_0x57317c,_0x29af8f);if(_0x43255a['status']>0xc7&&_0x43255a['status']<0x12c){const _0x1c8cc5=yield _0x43255a['json']();return new SuccessfulListIdentityResponse(_0x1c8cc5);}const _0x413b5b=yield _0x43255a['json']();return new FailedListIdentityResponse(_0x413b5b);}catch(_0x50df24){if(_0x50df24 instanceof Error)return new FailedListIdentityResponse({'detail':_0x50df24['message'],'title':_0x50df24['name'],'status':0x1f4,'instance':'','type':''});throw _0x50df24;}});}['delete'](_0x183b18,_0xf401a0,_0x3a1696){return __awaiter$6(this,void 0,void 0,function*(){const _0x4fe5ec='List/'+_0x183b18+'/'+_0xf401a0,_0x2bd83d=yield this['fetch']['delete'](_0x4fe5ec,_0x3a1696);try{if(_0x2bd83d['status']>0xc7&&_0x2bd83d['status']<0x12c)return new SuccessfulResponse({});const _0x150dea=yield _0x2bd83d['json']();return new FailedResponse(_0x150dea);}catch(_0x37560a){if(_0x37560a instanceof Error)return new FailedResponse({'detail':_0x37560a['message'],'title':_0x37560a['name'],'status':0x1f4,'instance':'','type':''});throw _0x37560a;}});}['get'](_0x3141a9,_0x7a3dac,_0x426365){return __awaiter$6(this,void 0,void 0,function*(){const _0x39cc35='List/'+_0x3141a9+'/'+_0x7a3dac;try{const _0x48cd80=yield this['fetch']['get'](_0x39cc35,_0x426365);if(_0x48cd80['status']>0xc7&&_0x48cd80['status']<0x12c){const _0xdd5d90=yield _0x48cd80['json']();return new SuccessfulListResponse(_0xdd5d90);}const _0x5a97dd=yield _0x48cd80['json']();return new FailedListResponse(_0x5a97dd);}catch(_0x2073e5){if(_0x2073e5 instanceof Error)return new FailedListResponse({'detail':_0x2073e5['message'],'title':_0x2073e5['name'],'status':0x1f4,'instance':'','type':''});throw _0x2073e5;}});}}
|
|
8
|
-
|
|
9
|
-
var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x2211ac,_0x194409,_0x5e7ee4,_0x1bb356){function _0xb8bfb3(_0x47de9b){return _0x47de9b instanceof _0x5e7ee4?_0x47de9b:new _0x5e7ee4(function(_0x222a46){_0x222a46(_0x47de9b);});}return new(_0x5e7ee4||(_0x5e7ee4=Promise))(function(_0x5aae2d,_0x101b51){function _0x374d64(_0x472fbc){try{_0x4e5c03(_0x1bb356['next'](_0x472fbc));}catch(_0x116b38){_0x101b51(_0x116b38);}}function _0x5d9092(_0x3bcd9b){try{_0x4e5c03(_0x1bb356['throw'](_0x3bcd9b));}catch(_0x39681b){_0x101b51(_0x39681b);}}function _0x4e5c03(_0x3f3ce2){_0x3f3ce2['done']?_0x5aae2d(_0x3f3ce2['value']):_0xb8bfb3(_0x3f3ce2['value'])['then'](_0x374d64,_0x5d9092);}_0x4e5c03((_0x1bb356=_0x1bb356['apply'](_0x2211ac,_0x194409||[]))['next']());});};class Fetch{constructor(_0x36d266){this['baseUri']=_0x36d266,this['getUrl']=_0x3e09e6=>{return _0x3e09e6['startsWith']('/')&&(_0x3e09e6=_0x3e09e6['replace']('/','')),''+this['baseUri']+_0x3e09e6;},!_0x36d266['endsWith']('/')&&(_0x36d266=_0x36d266+'/');}['get'](_0x552db5,_0x3b3fd1){return __awaiter$5(this,void 0,void 0,function*(){const _0x585cde=this['getUrl'](_0x552db5);return yield fetch(_0x585cde,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3b3fd1}});});}['post'](_0x2deef7,_0x42db66,_0x5dbd6c){return __awaiter$5(this,void 0,void 0,function*(){const _0x4d859e=this['getUrl'](_0x2deef7);return yield fetch(_0x4d859e,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x42db66},'body':_0x5dbd6c?JSON['stringify'](_0x5dbd6c):null});});}['PostNoAuth'](_0x431eee,_0x4b0c5c){return __awaiter$5(this,void 0,void 0,function*(){const _0x35864e=this['getUrl'](_0x431eee);return yield fetch(_0x35864e,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0x4b0c5c?JSON['stringify'](_0x4b0c5c):null});});}['put'](_0x2fb627,_0x422a90,_0x3c1064){return __awaiter$5(this,void 0,void 0,function*(){const _0x3e9cb2=this['getUrl'](_0x2fb627);return yield fetch(_0x3e9cb2,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x422a90},'body':_0x3c1064?JSON['stringify'](_0x3c1064):null});});}['delete'](_0x59f8bd,_0x4b1dd5){return __awaiter$5(this,void 0,void 0,function*(){const _0x19d210=this['getUrl'](_0x59f8bd);return yield fetch(_0x19d210,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4b1dd5}});});}}
|
|
10
|
-
|
|
11
|
-
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x5166c3,_0x582c74,_0x5f493f,_0x15d9ef){function _0x19a1d1(_0x563837){return _0x563837 instanceof _0x5f493f?_0x563837:new _0x5f493f(function(_0x34348f){_0x34348f(_0x563837);});}return new(_0x5f493f||(_0x5f493f=Promise))(function(_0xfe6062,_0x3d3d75){function _0x21f53c(_0x4fd7a3){try{_0x4ea6f0(_0x15d9ef['next'](_0x4fd7a3));}catch(_0x16384b){_0x3d3d75(_0x16384b);}}function _0x745a7e(_0x39a1ac){try{_0x4ea6f0(_0x15d9ef['throw'](_0x39a1ac));}catch(_0x53ce3a){_0x3d3d75(_0x53ce3a);}}function _0x4ea6f0(_0x2c67f1){_0x2c67f1['done']?_0xfe6062(_0x2c67f1['value']):_0x19a1d1(_0x2c67f1['value'])['then'](_0x21f53c,_0x745a7e);}_0x4ea6f0((_0x15d9ef=_0x15d9ef['apply'](_0x5166c3,_0x582c74||[]))['next']());});};class SearchServersService{constructor(_0x21e58d){this['fetch']=_0x21e58d,this['path']='search-services';}['create'](_0x37bea5,_0x1043f6,_0xbd42ee,_0x2618c7,_0x27086b,_0x16d292,_0x54e331,_0x42d34e){return __awaiter$4(this,void 0,void 0,function*(){const _0x3ab7c8={'account_name':_0x37bea5,'search_service_name':_0x1043f6,'endpoint':_0xbd42ee,'key':_0x2618c7,'country':_0x27086b,'provider':_0x16d292,'index_name':_0x54e331};try{const _0x3796af=yield this['fetch']['post'](this['path'],_0x42d34e,_0x3ab7c8);if(_0x3796af['status']>0xc7&&_0x3796af['status']<0x12c){const _0x8ebcca=yield _0x3796af['json']();return new SuccessfulSearchServiceResponse(_0x8ebcca);}const _0x3f20d0=yield _0x3796af['json']();return new FailedSearchServiceResponse(_0x3f20d0);}catch(_0x4f3944){if(_0x4f3944 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x4f3944['message'],'title':_0x4f3944['name'],'status':0x1f4,'instance':'','type':''});throw _0x4f3944;}});}['delete'](_0x308dba,_0x42b03f,_0x5d8076){return __awaiter$4(this,void 0,void 0,function*(){const _0x12f42f=this['path']+'/'+_0x308dba+'/'+_0x42b03f;try{const _0x5f7572=yield this['fetch']['delete'](_0x12f42f,_0x5d8076);if(_0x5f7572['status']>0xc7&&_0x5f7572['status']<0x12c)return new SuccessfulResponse({});const _0x2fcdc0=yield _0x5f7572['json']();return new FailedResponse(_0x2fcdc0);}catch(_0x50b5ce){if(_0x50b5ce instanceof Error)return new FailedResponse({'detail':_0x50b5ce['message'],'title':_0x50b5ce['name'],'status':0x1f4,'instance':'','type':''});throw _0x50b5ce;}});}['view'](_0x1122ab,_0x3f5a24,_0xc1be49){return __awaiter$4(this,void 0,void 0,function*(){const _0x1a1c6f=this['path']+'/'+_0x1122ab+'/'+_0x3f5a24;try{const _0xbe546d=yield this['fetch']['get'](_0x1a1c6f,_0xc1be49);if(_0xbe546d['status']>0xc7&&_0xbe546d['status']<0x12c){const _0x4bfcca=yield _0xbe546d['json']();return new SuccessfulViewSearchServiceResponse(_0x4bfcca);}const _0x567a61=yield _0xbe546d['json']();return new FailedViewSearchServiceResponse(_0x567a61);}catch(_0x14f9b4){if(_0x14f9b4 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x14f9b4['message'],'title':_0x14f9b4['name'],'status':0x1f4,'instance':'','type':''});throw _0x14f9b4;}});}['edit'](_0x18ed71,_0x502f1f,_0x46ff6f,_0x1605c4,_0x1e3a96){return __awaiter$4(this,void 0,void 0,function*(){const _0x3b7635={'account_name':_0x18ed71,'search_service_name':_0x502f1f,'key':_0x46ff6f,'country':_0x1605c4};try{const _0x247dbb=yield this['fetch']['put'](this['path'],_0x1e3a96,_0x3b7635);if(_0x247dbb['status']>0xc7&&_0x247dbb['status']<0x12c){const _0x6aa35d=yield _0x247dbb['json']();return new SuccessfulSearchServiceResponse(_0x6aa35d);}const _0x8fd145=yield _0x247dbb['json']();return new FailedSearchServiceResponse(_0x8fd145);}catch(_0x37401d){if(_0x37401d instanceof Error)return new FailedSearchServiceResponse({'detail':_0x37401d['message'],'title':_0x37401d['name'],'status':0x1f4,'instance':'','type':''});throw _0x37401d;}});}['list'](_0x42371c,_0x1d6cc3){return __awaiter$4(this,void 0,void 0,function*(){const _0x4c81ec=this['path']+'/'+_0x42371c;try{const _0x4ab8cf=yield this['fetch']['get'](_0x4c81ec,_0x1d6cc3);if(_0x4ab8cf['status']>0xc7&&_0x4ab8cf['status']<0x12c){const _0x3e98c7=yield _0x4ab8cf['json']();return new SuccessfulListSearchServiceResponse(_0x3e98c7);}const _0x5a033a=yield _0x4ab8cf['json']();return new FailedViewSearchServicesResponse(_0x5a033a);}catch(_0x3a1bcd){if(_0x3a1bcd instanceof Error)return new FailedViewSearchServicesResponse({'detail':_0x3a1bcd['message'],'title':_0x3a1bcd['name'],'status':0x1f4,'instance':'','type':''});throw _0x3a1bcd;}});}}
|
|
12
|
-
|
|
13
|
-
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x56f72a,_0x1ae731,_0x55ad64,_0x2f54d5){function _0x38d606(_0x178576){return _0x178576 instanceof _0x55ad64?_0x178576:new _0x55ad64(function(_0x51b183){_0x51b183(_0x178576);});}return new(_0x55ad64||(_0x55ad64=Promise))(function(_0x3b4a7b,_0x2f62fe){function _0x113555(_0x4e4971){try{_0x5cb112(_0x2f54d5['next'](_0x4e4971));}catch(_0x50d9d2){_0x2f62fe(_0x50d9d2);}}function _0x2c599a(_0x5f5021){try{_0x5cb112(_0x2f54d5['throw'](_0x5f5021));}catch(_0xb98846){_0x2f62fe(_0xb98846);}}function _0x5cb112(_0x29c8c4){_0x29c8c4['done']?_0x3b4a7b(_0x29c8c4['value']):_0x38d606(_0x29c8c4['value'])['then'](_0x113555,_0x2c599a);}_0x5cb112((_0x2f54d5=_0x2f54d5['apply'](_0x56f72a,_0x1ae731||[]))['next']());});};class FacetService{constructor(_0x166f6b){this['fetch']=_0x166f6b,this['path']='facet';}['create'](_0x1b18fb,_0x2afb2c,_0x2d5e40,_0x2e5527){return __awaiter$3(this,void 0,void 0,function*(){const _0x4a8cb3={'account_name':_0x1b18fb,'list_name':_0x2afb2c,'facet_name':_0x2d5e40};try{const _0x19148e=yield this['fetch']['post'](this['path'],_0x2e5527,_0x4a8cb3);if(_0x19148e['status']>0xc7&&_0x19148e['status']<0x12c){const _0x5f2b25=yield _0x19148e['json']();return new SuccessfulFacetResponse(_0x5f2b25);}const _0xd7a37a=yield _0x19148e['json']();return new FailedFacetResponse(_0xd7a37a);}catch(_0x184bc4){if(_0x184bc4 instanceof Error)return new FailedFacetResponse({'detail':_0x184bc4['message'],'title':_0x184bc4['name'],'status':0x1f4,'instance':'','type':''});throw _0x184bc4;}});}['remove'](_0x479644,_0x260c0e,_0x4dd32e,_0x4dc0f4){return __awaiter$3(this,void 0,void 0,function*(){const _0x3789c9='Facet/'+_0x479644+'/'+_0x260c0e+'/'+_0x4dd32e,_0x312ab6=yield this['fetch']['delete'](_0x3789c9,_0x4dc0f4);try{if(_0x312ab6['status']>0xc7&&_0x312ab6['status']<0x12c)return new SuccessfulResponse({});const _0x58e2f3=yield _0x312ab6['json']();return new FailedResponse(_0x58e2f3);}catch(_0x465a1c){if(_0x465a1c instanceof Error)return new FailedResponse({'detail':_0x465a1c['message'],'title':_0x465a1c['name'],'status':0x1f4,'instance':'','type':''});throw _0x465a1c;}});}['rename'](_0x1bc0dd,_0x1d1d5f,_0x2e9151,_0x4c92b3,_0x76964d){return __awaiter$3(this,void 0,void 0,function*(){const _0x34bde1={'account_name':_0x1bc0dd,'list_name':_0x1d1d5f,'facet_name':_0x2e9151,'new_facet_name':_0x4c92b3};try{const _0x26716c=yield this['fetch']['put'](this['path'],_0x76964d,_0x34bde1);if(_0x26716c['status']>0xc7&&_0x26716c['status']<0x12c){const _0x2274fc=yield _0x26716c['json']();return new SuccessfulFacetResponse(_0x2274fc);}const _0x2b0f64=yield _0x26716c['json']();return new FailedFacetResponse(_0x2b0f64);}catch(_0x55f32e){if(_0x55f32e instanceof Error)return new FailedFacetResponse({'detail':_0x55f32e['message'],'title':_0x55f32e['name'],'status':0x1f4,'instance':'','type':''});throw _0x55f32e;}});}}
|
|
14
|
-
|
|
15
|
-
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x416813,_0x684a6a,_0x2fc1af,_0x41b0bd){function _0x1c7060(_0x2c0a19){return _0x2c0a19 instanceof _0x2fc1af?_0x2c0a19:new _0x2fc1af(function(_0x4f2361){_0x4f2361(_0x2c0a19);});}return new(_0x2fc1af||(_0x2fc1af=Promise))(function(_0x50e51c,_0x41ef0a){function _0x171f22(_0x233503){try{_0x257002(_0x41b0bd['next'](_0x233503));}catch(_0x33c212){_0x41ef0a(_0x33c212);}}function _0x31c8ac(_0x474027){try{_0x257002(_0x41b0bd['throw'](_0x474027));}catch(_0x42f144){_0x41ef0a(_0x42f144);}}function _0x257002(_0x5e8d10){_0x5e8d10['done']?_0x50e51c(_0x5e8d10['value']):_0x1c7060(_0x5e8d10['value'])['then'](_0x171f22,_0x31c8ac);}_0x257002((_0x41b0bd=_0x41b0bd['apply'](_0x416813,_0x684a6a||[]))['next']());});};class SearchResultService{constructor(_0x1e3b9f){this['fetch']=_0x1e3b9f,this['path']='search-result';}['create'](_0x506f69,_0x51cac3,_0x27282c,_0x3d997b,_0x3d5d10){return __awaiter$2(this,void 0,void 0,function*(){_0x3d5d10=_0x3d5d10!==null&&_0x3d5d10!==void 0?_0x3d5d10:{'description':'','keywords':'','resource_1':'','resource_2':'','resource_3':'','latitude':0x0,'longitude':0x0,'facets':[]};const _0x472499=Object['assign']({'account_name':_0x506f69,'search_result_name':_0x27282c,'list_name':_0x51cac3},_0x3d5d10);try{const _0xae9f61=yield this['fetch']['post'](this['path'],_0x3d997b,_0x472499);if(_0xae9f61['status']>0xc7&&_0xae9f61['status']<0x12c){const _0x12f8d3=yield _0xae9f61['json']();return new SuccessfulViewSearchResultResponse(_0x12f8d3);}const _0x108e2b=yield _0xae9f61['json']();return new FailedSearchResultResponse(_0x108e2b);}catch(_0x102e63){if(_0x102e63 instanceof Error)return new FailedSearchResultResponse({'detail':_0x102e63['message'],'title':_0x102e63['name'],'status':0x1f4,'instance':'','type':''});throw _0x102e63;}});}['transfer'](_0x36aa55,_0x57fe80,_0x21b14c,_0xd707ba){return __awaiter$2(this,void 0,void 0,function*(){const _0x3d3f65={'account_name':_0x36aa55,'list_name':_0x57fe80,'new_search_service_name':_0x21b14c};try{const _0x54850f=yield this['fetch']['post'](this['path']+'/transfer',_0xd707ba,_0x3d3f65);if(_0x54850f['status']>0xc7&&_0x54850f['status']<0x12c){const _0x305e7a=yield _0x54850f['json']();return new SuccessfulListResponse(_0x305e7a);}const _0x1d7fb9=yield _0x54850f['json']();return new FailedListResponse(_0x1d7fb9);}catch(_0x3c872d){if(_0x3c872d instanceof Error)return new FailedListResponse({'detail':_0x3c872d['message'],'title':_0x3c872d['name'],'status':0x1f4,'instance':'','type':''});throw _0x3c872d;}});}}
|
|
16
|
-
|
|
17
|
-
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x27d0dc,_0x4c466e,_0x5d3efa,_0x5317a7){function _0x1e69a6(_0x3f0fbc){return _0x3f0fbc instanceof _0x5d3efa?_0x3f0fbc:new _0x5d3efa(function(_0x143e0c){_0x143e0c(_0x3f0fbc);});}return new(_0x5d3efa||(_0x5d3efa=Promise))(function(_0x393dc0,_0xfe7874){function _0x43e81d(_0x3e235a){try{_0xa606dc(_0x5317a7['next'](_0x3e235a));}catch(_0x500bba){_0xfe7874(_0x500bba);}}function _0x90e81f(_0x5bd97d){try{_0xa606dc(_0x5317a7['throw'](_0x5bd97d));}catch(_0x33ecdd){_0xfe7874(_0x33ecdd);}}function _0xa606dc(_0x3fca8c){_0x3fca8c['done']?_0x393dc0(_0x3fca8c['value']):_0x1e69a6(_0x3fca8c['value'])['then'](_0x43e81d,_0x90e81f);}_0xa606dc((_0x5317a7=_0x5317a7['apply'](_0x27d0dc,_0x4c466e||[]))['next']());});};class ContributorService{constructor(_0x4bcb09){this['fetch']=_0x4bcb09,this['path']='contributor';}['create'](_0x1ad974,_0x1cb1fa,_0x3e58be,_0x31c9d5){return __awaiter$1(this,void 0,void 0,function*(){const _0x28dac9={'account_name':_0x1ad974,'list_name':_0x1cb1fa,'contributor_name':_0x3e58be};try{const _0x5ed92a=yield this['fetch']['post'](this['path'],_0x31c9d5,_0x28dac9);if(_0x5ed92a['status']>0xc7&&_0x5ed92a['status']<0x12c){const _0x5869bb=yield _0x5ed92a['json']();return new SuccessfulContributorResponse(_0x5869bb);}const _0x35fbec=yield _0x5ed92a['json']();return new FailedContributorResponse(_0x35fbec);}catch(_0x814f3b){if(_0x814f3b instanceof Error)return new FailedContributorResponse({'detail':_0x814f3b['message'],'title':_0x814f3b['name'],'status':0x1f4,'instance':'','type':''});throw _0x814f3b;}});}['remove'](_0x27e732,_0x3805ef,_0x6c90c1,_0x3613ae){return __awaiter$1(this,void 0,void 0,function*(){const _0x54e4c4=this['path']+'/'+_0x27e732+'/'+_0x3805ef+'/'+_0x6c90c1,_0x1b1d14=yield this['fetch']['delete'](_0x54e4c4,_0x3613ae);try{if(_0x1b1d14['status']>0xc7&&_0x1b1d14['status']<0x12c)return new SuccessfulResponse({});const _0x3485ad=yield _0x1b1d14['json']();return new FailedResponse(_0x3485ad);}catch(_0x32e991){if(_0x32e991 instanceof Error)return new FailedResponse({'detail':_0x32e991['message'],'title':_0x32e991['name'],'status':0x1f4,'instance':'','type':''});throw _0x32e991;}});}['startsWith'](_0x209cf9,_0x268852){return __awaiter$1(this,void 0,void 0,function*(){const _0x4a9f30=this['path']+'/'+_0x209cf9;try{const _0x224073=yield this['fetch']['get'](_0x4a9f30,_0x268852);if(_0x224073['status']>0xc7&&_0x224073['status']<0x12c){const _0x36d765=yield _0x224073['json']();return new SuccessfulAccountAndImageResponse(_0x36d765);}const _0x2181b1=yield _0x224073['json']();return new FailedAccountAndImageResponse(_0x2181b1);}catch(_0x137600){if(_0x137600 instanceof Error)return new FailedAccountAndImageResponse({'detail':_0x137600['message'],'title':_0x137600['name'],'status':0x1f4,'instance':'','type':''});throw _0x137600;}});}}
|
|
18
|
-
|
|
19
|
-
var __awaiter=undefined&&undefined['__awaiter']||function(_0x2825d1,_0x3d674c,_0x4e98d6,_0x568bd1){function _0x11dc79(_0x495af4){return _0x495af4 instanceof _0x4e98d6?_0x495af4:new _0x4e98d6(function(_0x4b17b7){_0x4b17b7(_0x495af4);});}return new(_0x4e98d6||(_0x4e98d6=Promise))(function(_0x202917,_0x4f3875){function _0x2a043a(_0x5c273d){try{_0x91f11(_0x568bd1['next'](_0x5c273d));}catch(_0x3f9e2e){_0x4f3875(_0x3f9e2e);}}function _0x1e0e59(_0x570933){try{_0x91f11(_0x568bd1['throw'](_0x570933));}catch(_0x3c3465){_0x4f3875(_0x3c3465);}}function _0x91f11(_0x5df2fe){_0x5df2fe['done']?_0x202917(_0x5df2fe['value']):_0x11dc79(_0x5df2fe['value'])['then'](_0x2a043a,_0x1e0e59);}_0x91f11((_0x568bd1=_0x568bd1['apply'](_0x2825d1,_0x3d674c||[]))['next']());});};class AdminClient{constructor(_0x592252='https://admin.searchability.dev/'){var _0xac808=new Fetch(_0x592252);this['Accounts']=new AccountService(_0xac808),this['Lists']=new ListService(_0xac808),this['ApiKeys']=new ApiKeyService(_0xac808),this['SearchServers']=new SearchServersService(_0xac808),this['Facets']=new FacetService(_0xac808),this['SearchResults']=new SearchResultService(_0xac808),this['Contributors']=new ContributorService(_0xac808);}}class AuthClient{constructor(_0x5e9891='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x5e9891);}['login'](_0x239e30){return __awaiter(this,void 0,void 0,function*(){const _0x19257c='login/'+_0x239e30;try{const _0x40b5d9=yield yield fetch(_0x19257c);if(_0x40b5d9['status']>0xc7&&_0x40b5d9['status']<0x12c){const _0x16d190=yield _0x40b5d9['json']();return new SuccessfulAuthResponse(_0x16d190);}const _0x5b843b=yield _0x40b5d9['json']();return new FailedAuthResponse(_0x5b843b);}catch(_0x26e77c){if(_0x26e77c instanceof Error)return new FailedAuthResponse({'detail':_0x26e77c['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x26e77c;}});}['refresh'](_0x4dd231){return __awaiter(this,void 0,void 0,function*(){const _0x2a95da='refresh',_0x4cd5eb={'refresh_token':_0x4dd231};try{const _0x5262dc=yield this['fetch']['PostNoAuth'](_0x2a95da,_0x4cd5eb);if(_0x5262dc['status']>0xc7&&_0x5262dc['status']<0x12c){const _0x476bcb=yield _0x5262dc['json']();return new SuccessfulAuthResponse(_0x476bcb);}const _0x2a76f9=yield _0x5262dc['json']();return new FailedAuthResponse(_0x2a76f9);}catch(_0x4a086a){if(_0x4a086a instanceof Error)return new FailedAuthResponse({'detail':_0x4a086a['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x4a086a;}});}['getTokenStatus'](_0x401820){if(Date['now']()<_0x401820['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x401820['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
|
|
20
|
-
|
|
21
|
-
export { AdminClient, AuthClient, TokenStatus, Tokens };
|