@searchability/admin-client 0.0.81 → 0.0.83
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(_0x2b1d1f){_0x2b1d1f[_0x2b1d1f['Ok']=0x0]='Ok',_0x2b1d1f[_0x2b1d1f['Refresh']=0x1]='Refresh',_0x2b1d1f[_0x2b1d1f['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(_0x3e2e15){this['isSuccess']=_0x3e2e15;}}class SuccessfulContributorResponse extends Response{constructor(_0xc2cd11){super(!![]),this['contributor']=_0xc2cd11;}['toSuccess'](){return this['contributor'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedContributorResponse extends Response{constructor(_0x498e7b){super(![]),this['problem']=_0x498e7b;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountAndImageResponse extends Response{constructor(_0x579ccd){super(!![]),this['accountAndImages']=_0x579ccd;}['toSuccess'](){return this['accountAndImages'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountAndImageResponse extends Response{constructor(_0x428fb6){super(![]),this['problem']=_0x428fb6;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulFacetResponse extends Response{constructor(_0x2155fc){super(!![]),this['facet']=_0x2155fc;}['toSuccess'](){return this['facet'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetResponse extends Response{constructor(_0xf68718){super(![]),this['problem']=_0xf68718;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountResponse extends Response{constructor(_0x13b398){super(!![]),this['account']=_0x13b398;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountImageResponse extends Response{constructor(_0x39aa66){super(!![]),this['accountImage']=_0x39aa66;}['toSuccess'](){return this['accountImage'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListIdentityResponse extends Response{constructor(_0x590561){super(!![]),this['list']=_0x590561;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListResponse extends Response{constructor(_0x4bd987){super(!![]),this['list']=_0x4bd987;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x52940d){super(![]),this['problem']=_0x52940d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountImageResponse extends Response{constructor(_0x181a56){super(![]),this['problem']=_0x181a56;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListIdentityResponse extends Response{constructor(_0x3b831e){super(![]),this['problem']=_0x3b831e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListResponse extends Response{constructor(_0x17d32c){super(![]),this['problem']=_0x17d32c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x2d09fd){super(!![]),this['tokens']=_0x2d09fd;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0xcf9c56){super(![]),this['problem']=_0xcf9c56;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x3fc216){super(!![]),this['apiKey']=_0x3fc216;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x37d0e4){super(![]),this['problem']=_0x37d0e4;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x1d28ae){super(!![]),this['searchService']=_0x1d28ae;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x25c8e2){super(![]),this['problem']=_0x25c8e2;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x39d5df){super(!![]),this['searchService']=_0x39d5df;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulViewSearchResultResponse extends Response{constructor(_0x324833){super(!![]),this['searchResult']=_0x324833;}['toSuccess'](){return this['searchResult'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchResultResponse extends Response{constructor(_0x388f43){super(![]),this['problem']=_0x388f43;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchResultResponse extends Response{constructor(_0x1e2655){super(!![]),this['searchResults']=_0x1e2655;}['toSuccess'](){return this['searchResults'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchResultResponse extends Response{constructor(_0x38e3e9){super(![]),this['problem']=_0x38e3e9;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchServiceResponse extends Response{constructor(_0x300468){super(!![]),this['searchServices']=_0x300468;}['toSuccess'](){return this['searchServices'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServicesResponse extends Response{constructor(_0x3c7520){super(![]),this['problem']=_0x3c7520;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedViewSearchServiceResponse extends Response{constructor(_0x4afdb3){super(![]),this['problem']=_0x4afdb3;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x1eb28e){super(!![]),this['apiKeyValue']=_0x1eb28e;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x52e2b1){super(!![]),this['obj']=_0x52e2b1;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x10a6fd){super(![]),this['problem']=_0x10a6fd;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x21a87d){super(![]),this['problem']=_0x21a87d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
|
|
2
|
+
|
|
3
|
+
var __awaiter$8=undefined&&undefined['__awaiter']||function(_0x3396d6,_0x1d4ba3,_0x47a496,_0x4e6337){function _0x1fa6f9(_0xeaecfb){return _0xeaecfb instanceof _0x47a496?_0xeaecfb:new _0x47a496(function(_0x108b96){_0x108b96(_0xeaecfb);});}return new(_0x47a496||(_0x47a496=Promise))(function(_0x4987b8,_0x3a8769){function _0x3663eb(_0x33a0cc){try{_0x272977(_0x4e6337['next'](_0x33a0cc));}catch(_0x1fed14){_0x3a8769(_0x1fed14);}}function _0x3f960f(_0x311cb3){try{_0x272977(_0x4e6337['throw'](_0x311cb3));}catch(_0x1f457f){_0x3a8769(_0x1f457f);}}function _0x272977(_0x4928fb){_0x4928fb['done']?_0x4987b8(_0x4928fb['value']):_0x1fa6f9(_0x4928fb['value'])['then'](_0x3663eb,_0x3f960f);}_0x272977((_0x4e6337=_0x4e6337['apply'](_0x3396d6,_0x1d4ba3||[]))['next']());});};class AccountService{constructor(_0x54e0d9){this['fetch']=_0x54e0d9;}['get'](_0x144b8e,_0x3e6fe2){return __awaiter$8(this,void 0,void 0,function*(){const _0x30cbab='Account/'+_0x144b8e+'/',_0x124f8a=yield this['fetch']['get'](_0x30cbab,_0x3e6fe2);try{if(_0x124f8a['status']>0xc7&&_0x124f8a['status']<0x12c){const _0xf07705=yield _0x124f8a['json']();return new SuccessfulAccountResponse(_0xf07705);}const _0x5bb0e7=yield _0x124f8a['json']();return new FailedAccountResponse(_0x5bb0e7);}catch(_0x122ff5){if(_0x122ff5 instanceof Error)return new FailedAccountResponse({'detail':_0x122ff5['message'],'title':_0x122ff5['name'],'status':0x1f4,'instance':'','type':''});throw _0x122ff5;}});}['getImage'](_0x4161ab,_0x2287c5){return __awaiter$8(this,void 0,void 0,function*(){const _0x4a1c67='account/image/'+_0x4161ab+'/',_0x84265b=yield this['fetch']['get'](_0x4a1c67,_0x2287c5);try{if(_0x84265b['status']>0xc7&&_0x84265b['status']<0x12c){const _0x48c109=yield _0x84265b['json']();return new SuccessfulAccountImageResponse(_0x48c109);}const _0x472647=yield _0x84265b['json']();return new FailedAccountImageResponse(_0x472647);}catch(_0x4c9599){if(_0x4c9599 instanceof Error)return new FailedAccountImageResponse({'detail':_0x4c9599['message'],'title':_0x4c9599['name'],'status':0x1f4,'instance':'','type':''});throw _0x4c9599;}});}}
|
|
4
|
+
|
|
5
|
+
var __awaiter$7=undefined&&undefined['__awaiter']||function(_0x539aef,_0x51383d,_0x2b1ab7,_0x1b00ed){function _0x429f2d(_0xf3a88c){return _0xf3a88c instanceof _0x2b1ab7?_0xf3a88c:new _0x2b1ab7(function(_0x3184b6){_0x3184b6(_0xf3a88c);});}return new(_0x2b1ab7||(_0x2b1ab7=Promise))(function(_0x58cadb,_0x4879da){function _0x54e803(_0x5aed04){try{_0xcf6ea0(_0x1b00ed['next'](_0x5aed04));}catch(_0x25faa9){_0x4879da(_0x25faa9);}}function _0x2421b5(_0x3a4993){try{_0xcf6ea0(_0x1b00ed['throw'](_0x3a4993));}catch(_0x5c3c53){_0x4879da(_0x5c3c53);}}function _0xcf6ea0(_0x11a959){_0x11a959['done']?_0x58cadb(_0x11a959['value']):_0x429f2d(_0x11a959['value'])['then'](_0x54e803,_0x2421b5);}_0xcf6ea0((_0x1b00ed=_0x1b00ed['apply'](_0x539aef,_0x51383d||[]))['next']());});};class ApiKeyService{constructor(_0x276bfb){this['fetch']=_0x276bfb,this['path']='api-key';}['create'](_0x24c235,_0x2fc8db,_0x387696){return __awaiter$7(this,void 0,void 0,function*(){const _0x430aea={'account_name':_0x24c235,'api_key_name':_0x2fc8db};try{const _0x5e41cc=yield this['fetch']['post'](this['path'],_0x387696,_0x430aea);if(_0x5e41cc['status']>0xc7&&_0x5e41cc['status']<0x12c){const _0x578528=yield _0x5e41cc['json']();return new SuccessfulApiKeyResponse(_0x578528);}const _0x16855c=yield _0x5e41cc['json']();return new FailedApiKeyResponse(_0x16855c);}catch(_0x3553da){if(_0x3553da instanceof Error)return new FailedApiKeyResponse({'detail':_0x3553da['message'],'title':_0x3553da['name'],'status':0x1f4,'instance':'','type':''});throw _0x3553da;}});}['view'](_0x3d4995,_0x1f4b75,_0x42a647){return __awaiter$7(this,void 0,void 0,function*(){const _0x176452=this['path']+'/'+_0x3d4995+'/'+_0x1f4b75;try{const _0x56acc5=yield this['fetch']['get'](_0x176452,_0x42a647);if(_0x56acc5['status']>0xc7&&_0x56acc5['status']<0x12c){const _0x3f4a54=yield _0x56acc5['json']();return new SuccessfulApiKeyValueResponse(_0x3f4a54);}const _0xd978c4=yield _0x56acc5['json']();return new FailedApiKeyValueResponse(_0xd978c4);}catch(_0x3f813f){if(_0x3f813f instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x3f813f['message'],'title':_0x3f813f['name'],'status':0x1f4,'instance':'','type':''});throw _0x3f813f;}});}['delete'](_0x419809,_0x5c763f,_0x5f4d0c){return __awaiter$7(this,void 0,void 0,function*(){const _0x20fa28=this['path']+'/'+_0x419809+'/'+_0x5c763f;try{const _0x438426=yield this['fetch']['delete'](_0x20fa28,_0x5f4d0c);if(_0x438426['status']>0xc7&&_0x438426['status']<0x12c)return new SuccessfulResponse({});const _0x44023d=yield _0x438426['json']();return new FailedResponse(_0x44023d);}catch(_0x4a5251){if(_0x4a5251 instanceof Error)return new FailedResponse({'detail':_0x4a5251['message'],'title':_0x4a5251['name'],'status':0x1f4,'instance':'','type':''});throw _0x4a5251;}});}}
|
|
6
|
+
|
|
7
|
+
var __awaiter$6=undefined&&undefined['__awaiter']||function(_0x25c323,_0x59dd99,_0x1998c9,_0x403ba6){function _0xeced80(_0x2c1996){return _0x2c1996 instanceof _0x1998c9?_0x2c1996:new _0x1998c9(function(_0x1c9c94){_0x1c9c94(_0x2c1996);});}return new(_0x1998c9||(_0x1998c9=Promise))(function(_0x528e9f,_0x49e23c){function _0x4d4be0(_0x12590c){try{_0x52bb9e(_0x403ba6['next'](_0x12590c));}catch(_0x3b7ad2){_0x49e23c(_0x3b7ad2);}}function _0x5f1327(_0x45061e){try{_0x52bb9e(_0x403ba6['throw'](_0x45061e));}catch(_0x4f08f7){_0x49e23c(_0x4f08f7);}}function _0x52bb9e(_0x473ed7){_0x473ed7['done']?_0x528e9f(_0x473ed7['value']):_0xeced80(_0x473ed7['value'])['then'](_0x4d4be0,_0x5f1327);}_0x52bb9e((_0x403ba6=_0x403ba6['apply'](_0x25c323,_0x59dd99||[]))['next']());});};class ListService{constructor(_0xba5dee){this['fetch']=_0xba5dee;}['create'](_0x43d766,_0x3cbaee,_0x530901,_0x129cdd){return __awaiter$6(this,void 0,void 0,function*(){const _0x9d5fa='List',_0x268ba7={'account_name':_0x43d766,'list_name':_0x3cbaee,'search_service_name':_0x530901};try{const _0x67864e=yield this['fetch']['post'](_0x9d5fa,_0x129cdd,_0x268ba7);if(_0x67864e['status']>0xc7&&_0x67864e['status']<0x12c){const _0x112fb8=yield _0x67864e['json']();return new SuccessfulListIdentityResponse(_0x112fb8);}const _0x1bcfb7=yield _0x67864e['json']();return new FailedListIdentityResponse(_0x1bcfb7);}catch(_0x34b20f){if(_0x34b20f instanceof Error)return new FailedListIdentityResponse({'detail':_0x34b20f['message'],'title':_0x34b20f['name'],'status':0x1f4,'instance':'','type':''});throw _0x34b20f;}});}['delete'](_0x310a6c,_0x77cff8,_0x2e7e8f){return __awaiter$6(this,void 0,void 0,function*(){const _0x18a9ab='List/'+_0x310a6c+'/'+_0x77cff8,_0x274579=yield this['fetch']['delete'](_0x18a9ab,_0x2e7e8f);try{if(_0x274579['status']>0xc7&&_0x274579['status']<0x12c)return new SuccessfulResponse({});const _0x517f14=yield _0x274579['json']();return new FailedResponse(_0x517f14);}catch(_0xa5ee3f){if(_0xa5ee3f instanceof Error)return new FailedResponse({'detail':_0xa5ee3f['message'],'title':_0xa5ee3f['name'],'status':0x1f4,'instance':'','type':''});throw _0xa5ee3f;}});}['get'](_0x1bb498,_0x44fe49,_0x5118c0){return __awaiter$6(this,void 0,void 0,function*(){const _0x4c1e65='List/'+_0x1bb498+'/'+_0x44fe49;try{const _0x79ff80=yield this['fetch']['get'](_0x4c1e65,_0x5118c0);if(_0x79ff80['status']>0xc7&&_0x79ff80['status']<0x12c){const _0xd3298b=yield _0x79ff80['json']();return new SuccessfulListResponse(_0xd3298b);}const _0x39d738=yield _0x79ff80['json']();return new FailedListResponse(_0x39d738);}catch(_0x5c5627){if(_0x5c5627 instanceof Error)return new FailedListResponse({'detail':_0x5c5627['message'],'title':_0x5c5627['name'],'status':0x1f4,'instance':'','type':''});throw _0x5c5627;}});}}
|
|
8
|
+
|
|
9
|
+
var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x332f9a,_0x271221,_0x540e9c,_0x5484b4){function _0x43db42(_0x1565d9){return _0x1565d9 instanceof _0x540e9c?_0x1565d9:new _0x540e9c(function(_0x11631f){_0x11631f(_0x1565d9);});}return new(_0x540e9c||(_0x540e9c=Promise))(function(_0x2ebf95,_0x47706f){function _0x3dcfce(_0x270354){try{_0x4ba8dd(_0x5484b4['next'](_0x270354));}catch(_0x3b4bbc){_0x47706f(_0x3b4bbc);}}function _0x5f4732(_0x77f70b){try{_0x4ba8dd(_0x5484b4['throw'](_0x77f70b));}catch(_0x2c0440){_0x47706f(_0x2c0440);}}function _0x4ba8dd(_0x21170f){_0x21170f['done']?_0x2ebf95(_0x21170f['value']):_0x43db42(_0x21170f['value'])['then'](_0x3dcfce,_0x5f4732);}_0x4ba8dd((_0x5484b4=_0x5484b4['apply'](_0x332f9a,_0x271221||[]))['next']());});};class Fetch{constructor(_0x5b7a05){this['baseUri']=_0x5b7a05,this['getUrl']=_0x1a61d5=>{return _0x1a61d5['startsWith']('/')&&(_0x1a61d5=_0x1a61d5['replace']('/','')),''+this['baseUri']+_0x1a61d5;},!_0x5b7a05['endsWith']('/')&&(_0x5b7a05=_0x5b7a05+'/');}['get'](_0x16c2c5,_0x51e583){return __awaiter$5(this,void 0,void 0,function*(){const _0x65c570=this['getUrl'](_0x16c2c5);return yield fetch(_0x65c570,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x51e583}});});}['post'](_0x238b87,_0xd66857,_0x4840cc){return __awaiter$5(this,void 0,void 0,function*(){const _0x3ca47b=this['getUrl'](_0x238b87);return yield fetch(_0x3ca47b,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0xd66857},'body':_0x4840cc?JSON['stringify'](_0x4840cc):null});});}['PostNoAuth'](_0xa7bbe1,_0x609412){return __awaiter$5(this,void 0,void 0,function*(){const _0x1261fe=this['getUrl'](_0xa7bbe1);return yield fetch(_0x1261fe,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0x609412?JSON['stringify'](_0x609412):null});});}['put'](_0x5abfa5,_0x54f521,_0x49bab8){return __awaiter$5(this,void 0,void 0,function*(){const _0xfdfd80=this['getUrl'](_0x5abfa5);return yield fetch(_0xfdfd80,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x54f521},'body':_0x49bab8?JSON['stringify'](_0x49bab8):null});});}['delete'](_0x35ca75,_0x3da470){return __awaiter$5(this,void 0,void 0,function*(){const _0x603373=this['getUrl'](_0x35ca75);return yield fetch(_0x603373,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3da470}});});}}
|
|
10
|
+
|
|
11
|
+
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x7baf84,_0x417c9e,_0x3b157d,_0x27697d){function _0x58cafd(_0x1ab23c){return _0x1ab23c instanceof _0x3b157d?_0x1ab23c:new _0x3b157d(function(_0x336187){_0x336187(_0x1ab23c);});}return new(_0x3b157d||(_0x3b157d=Promise))(function(_0x95a549,_0x3ed309){function _0x4e430d(_0x4153b9){try{_0x1e67d5(_0x27697d['next'](_0x4153b9));}catch(_0x23c8fd){_0x3ed309(_0x23c8fd);}}function _0x498919(_0x544450){try{_0x1e67d5(_0x27697d['throw'](_0x544450));}catch(_0x144916){_0x3ed309(_0x144916);}}function _0x1e67d5(_0x377828){_0x377828['done']?_0x95a549(_0x377828['value']):_0x58cafd(_0x377828['value'])['then'](_0x4e430d,_0x498919);}_0x1e67d5((_0x27697d=_0x27697d['apply'](_0x7baf84,_0x417c9e||[]))['next']());});};class SearchServersService{constructor(_0x265bc0){this['fetch']=_0x265bc0,this['path']='search-services';}['create'](_0x188511,_0x3c7b2e,_0x145544,_0x1f2380,_0x36f13d,_0x16b76f,_0x5d5b2d,_0x2d3e77){return __awaiter$4(this,void 0,void 0,function*(){const _0x419b38={'account_name':_0x188511,'search_service_name':_0x3c7b2e,'endpoint':_0x145544,'key':_0x1f2380,'country':_0x36f13d,'provider':_0x16b76f,'index_name':_0x5d5b2d};try{const _0x10aa9f=yield this['fetch']['post'](this['path'],_0x2d3e77,_0x419b38);if(_0x10aa9f['status']>0xc7&&_0x10aa9f['status']<0x12c){const _0x4f6300=yield _0x10aa9f['json']();return new SuccessfulSearchServiceResponse(_0x4f6300);}const _0x3ae7de=yield _0x10aa9f['json']();return new FailedSearchServiceResponse(_0x3ae7de);}catch(_0x5d7f36){if(_0x5d7f36 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x5d7f36['message'],'title':_0x5d7f36['name'],'status':0x1f4,'instance':'','type':''});throw _0x5d7f36;}});}['delete'](_0x411206,_0x394cd9,_0x436a89){return __awaiter$4(this,void 0,void 0,function*(){const _0x548506=this['path']+'/'+_0x411206+'/'+_0x394cd9;try{const _0x1558bc=yield this['fetch']['delete'](_0x548506,_0x436a89);if(_0x1558bc['status']>0xc7&&_0x1558bc['status']<0x12c)return new SuccessfulResponse({});const _0x3967cb=yield _0x1558bc['json']();return new FailedResponse(_0x3967cb);}catch(_0x27f885){if(_0x27f885 instanceof Error)return new FailedResponse({'detail':_0x27f885['message'],'title':_0x27f885['name'],'status':0x1f4,'instance':'','type':''});throw _0x27f885;}});}['view'](_0x24f214,_0x38d62f,_0x114fac){return __awaiter$4(this,void 0,void 0,function*(){const _0x4079e6=this['path']+'/'+_0x24f214+'/'+_0x38d62f;try{const _0x1bc6ab=yield this['fetch']['get'](_0x4079e6,_0x114fac);if(_0x1bc6ab['status']>0xc7&&_0x1bc6ab['status']<0x12c){const _0x4e4355=yield _0x1bc6ab['json']();return new SuccessfulViewSearchServiceResponse(_0x4e4355);}const _0x2fb949=yield _0x1bc6ab['json']();return new FailedViewSearchServiceResponse(_0x2fb949);}catch(_0x2c02c7){if(_0x2c02c7 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x2c02c7['message'],'title':_0x2c02c7['name'],'status':0x1f4,'instance':'','type':''});throw _0x2c02c7;}});}['edit'](_0x3b6aba,_0x3c4bd1,_0x5e8104,_0x175831,_0x419d83){return __awaiter$4(this,void 0,void 0,function*(){const _0x513267={'account_name':_0x3b6aba,'search_service_name':_0x3c4bd1,'key':_0x5e8104,'country':_0x175831};try{const _0x46575b=yield this['fetch']['put'](this['path'],_0x419d83,_0x513267);if(_0x46575b['status']>0xc7&&_0x46575b['status']<0x12c){const _0x27eb16=yield _0x46575b['json']();return new SuccessfulSearchServiceResponse(_0x27eb16);}const _0x1b797e=yield _0x46575b['json']();return new FailedSearchServiceResponse(_0x1b797e);}catch(_0x260a2b){if(_0x260a2b instanceof Error)return new FailedSearchServiceResponse({'detail':_0x260a2b['message'],'title':_0x260a2b['name'],'status':0x1f4,'instance':'','type':''});throw _0x260a2b;}});}['list'](_0x3328db,_0x2141d4){return __awaiter$4(this,void 0,void 0,function*(){const _0x13e913=this['path']+'/'+_0x3328db;try{const _0x1318b0=yield this['fetch']['get'](_0x13e913,_0x2141d4);if(_0x1318b0['status']>0xc7&&_0x1318b0['status']<0x12c){const _0xee6d52=yield _0x1318b0['json']();return new SuccessfulListSearchServiceResponse(_0xee6d52);}const _0x5ee4c4=yield _0x1318b0['json']();return new FailedViewSearchServicesResponse(_0x5ee4c4);}catch(_0x2de0fb){if(_0x2de0fb instanceof Error)return new FailedViewSearchServicesResponse({'detail':_0x2de0fb['message'],'title':_0x2de0fb['name'],'status':0x1f4,'instance':'','type':''});throw _0x2de0fb;}});}}
|
|
12
|
+
|
|
13
|
+
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x1cde7c,_0x5ae940,_0x58cffc,_0x3d2c5a){function _0x3464d9(_0x2b9ba6){return _0x2b9ba6 instanceof _0x58cffc?_0x2b9ba6:new _0x58cffc(function(_0x1e2175){_0x1e2175(_0x2b9ba6);});}return new(_0x58cffc||(_0x58cffc=Promise))(function(_0x33cb20,_0x5ab514){function _0x1f53ed(_0x105599){try{_0x1ab5a0(_0x3d2c5a['next'](_0x105599));}catch(_0x4adffe){_0x5ab514(_0x4adffe);}}function _0x52f60d(_0x1f86a4){try{_0x1ab5a0(_0x3d2c5a['throw'](_0x1f86a4));}catch(_0x106d08){_0x5ab514(_0x106d08);}}function _0x1ab5a0(_0x2b2fb5){_0x2b2fb5['done']?_0x33cb20(_0x2b2fb5['value']):_0x3464d9(_0x2b2fb5['value'])['then'](_0x1f53ed,_0x52f60d);}_0x1ab5a0((_0x3d2c5a=_0x3d2c5a['apply'](_0x1cde7c,_0x5ae940||[]))['next']());});};class FacetService{constructor(_0x396ba0){this['fetch']=_0x396ba0,this['path']='facet';}['create'](_0x46375a,_0x4e1690,_0x1fc92a,_0x56715b){return __awaiter$3(this,void 0,void 0,function*(){const _0x18457b={'account_name':_0x46375a,'list_name':_0x4e1690,'facet_name':_0x1fc92a};try{const _0x326ba4=yield this['fetch']['post'](this['path'],_0x56715b,_0x18457b);if(_0x326ba4['status']>0xc7&&_0x326ba4['status']<0x12c){const _0x28900a=yield _0x326ba4['json']();return new SuccessfulFacetResponse(_0x28900a);}const _0x19d375=yield _0x326ba4['json']();return new FailedFacetResponse(_0x19d375);}catch(_0x32f53c){if(_0x32f53c instanceof Error)return new FailedFacetResponse({'detail':_0x32f53c['message'],'title':_0x32f53c['name'],'status':0x1f4,'instance':'','type':''});throw _0x32f53c;}});}['remove'](_0x299d26,_0x14a4c3,_0x27b831,_0x4b3c73){return __awaiter$3(this,void 0,void 0,function*(){const _0x22c010='Facet/'+_0x299d26+'/'+_0x14a4c3+'/'+_0x27b831,_0x188773=yield this['fetch']['delete'](_0x22c010,_0x4b3c73);try{if(_0x188773['status']>0xc7&&_0x188773['status']<0x12c)return new SuccessfulResponse({});const _0x5ab0d7=yield _0x188773['json']();return new FailedResponse(_0x5ab0d7);}catch(_0x2e2480){if(_0x2e2480 instanceof Error)return new FailedResponse({'detail':_0x2e2480['message'],'title':_0x2e2480['name'],'status':0x1f4,'instance':'','type':''});throw _0x2e2480;}});}['rename'](_0x2961e3,_0x19ecdb,_0x4007e1,_0x143a6b,_0x2cde68){return __awaiter$3(this,void 0,void 0,function*(){const _0xe28fa5={'account_name':_0x2961e3,'list_name':_0x19ecdb,'facet_name':_0x4007e1,'new_facet_name':_0x143a6b};try{const _0x40bcd3=yield this['fetch']['put'](this['path'],_0x2cde68,_0xe28fa5);if(_0x40bcd3['status']>0xc7&&_0x40bcd3['status']<0x12c){const _0x437c3c=yield _0x40bcd3['json']();return new SuccessfulFacetResponse(_0x437c3c);}const _0x394313=yield _0x40bcd3['json']();return new FailedFacetResponse(_0x394313);}catch(_0x13af2c){if(_0x13af2c instanceof Error)return new FailedFacetResponse({'detail':_0x13af2c['message'],'title':_0x13af2c['name'],'status':0x1f4,'instance':'','type':''});throw _0x13af2c;}});}}
|
|
14
|
+
|
|
15
|
+
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x4d44a0,_0x3b3b77,_0x24b272,_0xf499e8){function _0x13b7c6(_0x4533a3){return _0x4533a3 instanceof _0x24b272?_0x4533a3:new _0x24b272(function(_0x167f76){_0x167f76(_0x4533a3);});}return new(_0x24b272||(_0x24b272=Promise))(function(_0x37d0d1,_0x2ae1ea){function _0x3b148a(_0x599c4d){try{_0x5e4141(_0xf499e8['next'](_0x599c4d));}catch(_0x9638c8){_0x2ae1ea(_0x9638c8);}}function _0xabccec(_0x4e9b56){try{_0x5e4141(_0xf499e8['throw'](_0x4e9b56));}catch(_0x3dc856){_0x2ae1ea(_0x3dc856);}}function _0x5e4141(_0x2b27ad){_0x2b27ad['done']?_0x37d0d1(_0x2b27ad['value']):_0x13b7c6(_0x2b27ad['value'])['then'](_0x3b148a,_0xabccec);}_0x5e4141((_0xf499e8=_0xf499e8['apply'](_0x4d44a0,_0x3b3b77||[]))['next']());});};class SearchResultService{constructor(_0x471f1a){this['fetch']=_0x471f1a,this['path']='search-result';}['create'](_0x59a738,_0x3a794e,_0x603642,_0x106b21,_0x35c4c3){return __awaiter$2(this,void 0,void 0,function*(){_0x35c4c3=_0x35c4c3!==null&&_0x35c4c3!==void 0?_0x35c4c3:{'description':'','keywords':'','resource_1':'','resource_2':'','resource_3':'','latitude':0x0,'longitude':0x0,'facets':[]};const _0xaaebf7=Object['assign']({'account_name':_0x59a738,'search_result_name':_0x603642,'list_name':_0x3a794e},_0x35c4c3);try{const _0x23ff85=yield this['fetch']['post'](this['path'],_0x106b21,_0xaaebf7);if(_0x23ff85['status']>0xc7&&_0x23ff85['status']<0x12c){const _0x20b208=yield _0x23ff85['json']();return new SuccessfulViewSearchResultResponse(_0x20b208);}const _0x239b70=yield _0x23ff85['json']();return new FailedSearchResultResponse(_0x239b70);}catch(_0x468793){if(_0x468793 instanceof Error)return new FailedSearchResultResponse({'detail':_0x468793['message'],'title':_0x468793['name'],'status':0x1f4,'instance':'','type':''});throw _0x468793;}});}['transfer'](_0x55a7cc,_0x405429,_0x44bd86,_0x4bb5e9){return __awaiter$2(this,void 0,void 0,function*(){const _0xbae5fe={'account_name':_0x55a7cc,'list_name':_0x405429,'new_search_service_name':_0x44bd86};try{const _0x1f9d4b=yield this['fetch']['post'](this['path']+'/transfer',_0x4bb5e9,_0xbae5fe);if(_0x1f9d4b['status']>0xc7&&_0x1f9d4b['status']<0x12c){const _0x283d34=yield _0x1f9d4b['json']();return new SuccessfulListResponse(_0x283d34);}const _0x52dd2e=yield _0x1f9d4b['json']();return new FailedListResponse(_0x52dd2e);}catch(_0x512ecf){if(_0x512ecf instanceof Error)return new FailedListResponse({'detail':_0x512ecf['message'],'title':_0x512ecf['name'],'status':0x1f4,'instance':'','type':''});throw _0x512ecf;}});}['list'](_0x2bc265,_0x4bfd7f,_0x580c3d,_0xfb282a){return __awaiter$2(this,void 0,void 0,function*(){let _0x5d7a9c=this['path']+'/'+_0x2bc265+'/'+_0x4bfd7f;const _0x5cf7b5=[];(_0xfb282a===null||_0xfb282a===void 0?void 0:_0xfb282a['size'])&&_0x5cf7b5['push']('size='+_0xfb282a['size']);(_0xfb282a===null||_0xfb282a===void 0?void 0:_0xfb282a['skip'])&&_0x5cf7b5['push']('skip='+_0xfb282a['skip']);(_0xfb282a===null||_0xfb282a===void 0?void 0:_0xfb282a['query'])&&_0x5cf7b5['push']('query='+_0xfb282a['query']);(_0xfb282a===null||_0xfb282a===void 0?void 0:_0xfb282a['filter'])&&_0x5cf7b5['push']('filter='+_0xfb282a['filter']);(_0xfb282a===null||_0xfb282a===void 0?void 0:_0xfb282a['radius'])&&_0x5cf7b5['push']('radius='+_0xfb282a['radius']);_0x5cf7b5['length']>0x0&&_0x5cf7b5['forEach']((_0x2d3cb1,_0x59981b)=>{_0x59981b===0x0?_0x5d7a9c+='?':_0x5d7a9c+='&',_0x5d7a9c+=_0x2d3cb1;});try{const _0x3d547d=yield this['fetch']['get'](_0x5d7a9c,_0x580c3d);if(_0x3d547d['status']>0xc7&&_0x3d547d['status']<0x12c){const _0x4e509c=yield _0x3d547d['json']();return new SuccessfulListSearchResultResponse(_0x4e509c);}const _0x23a81c=yield _0x3d547d['json']();return new FailedViewSearchResultResponse(_0x23a81c);}catch(_0x1898df){if(_0x1898df instanceof Error)return new FailedViewSearchResultResponse({'detail':_0x1898df['message'],'title':_0x1898df['name'],'status':0x1f4,'instance':'','type':''});throw _0x1898df;}});}}
|
|
16
|
+
|
|
17
|
+
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0xbf350f,_0x1da07a,_0x29d8e6,_0x3e8401){function _0x2022af(_0x29112f){return _0x29112f instanceof _0x29d8e6?_0x29112f:new _0x29d8e6(function(_0x47f758){_0x47f758(_0x29112f);});}return new(_0x29d8e6||(_0x29d8e6=Promise))(function(_0x3d1721,_0x472651){function _0x44954f(_0x271558){try{_0x40b767(_0x3e8401['next'](_0x271558));}catch(_0x20e33f){_0x472651(_0x20e33f);}}function _0x10821a(_0x458c17){try{_0x40b767(_0x3e8401['throw'](_0x458c17));}catch(_0x2499cb){_0x472651(_0x2499cb);}}function _0x40b767(_0x24df04){_0x24df04['done']?_0x3d1721(_0x24df04['value']):_0x2022af(_0x24df04['value'])['then'](_0x44954f,_0x10821a);}_0x40b767((_0x3e8401=_0x3e8401['apply'](_0xbf350f,_0x1da07a||[]))['next']());});};class ContributorService{constructor(_0x1a82df){this['fetch']=_0x1a82df,this['path']='contributor';}['create'](_0x370f15,_0x22b7da,_0x3e545f,_0x2d099d){return __awaiter$1(this,void 0,void 0,function*(){const _0x1920e6={'account_name':_0x370f15,'list_name':_0x22b7da,'contributor_name':_0x3e545f};try{const _0x4550a9=yield this['fetch']['post'](this['path'],_0x2d099d,_0x1920e6);if(_0x4550a9['status']>0xc7&&_0x4550a9['status']<0x12c){const _0x1d0a22=yield _0x4550a9['json']();return new SuccessfulContributorResponse(_0x1d0a22);}const _0x54ec50=yield _0x4550a9['json']();return new FailedContributorResponse(_0x54ec50);}catch(_0x1a5064){if(_0x1a5064 instanceof Error)return new FailedContributorResponse({'detail':_0x1a5064['message'],'title':_0x1a5064['name'],'status':0x1f4,'instance':'','type':''});throw _0x1a5064;}});}['remove'](_0x102994,_0x4012e6,_0x4e1fb6,_0x3c71ea){return __awaiter$1(this,void 0,void 0,function*(){const _0x8950c7=this['path']+'/'+_0x102994+'/'+_0x4012e6+'/'+_0x4e1fb6,_0x23b271=yield this['fetch']['delete'](_0x8950c7,_0x3c71ea);try{if(_0x23b271['status']>0xc7&&_0x23b271['status']<0x12c)return new SuccessfulResponse({});const _0x3bf68a=yield _0x23b271['json']();return new FailedResponse(_0x3bf68a);}catch(_0x2c6e11){if(_0x2c6e11 instanceof Error)return new FailedResponse({'detail':_0x2c6e11['message'],'title':_0x2c6e11['name'],'status':0x1f4,'instance':'','type':''});throw _0x2c6e11;}});}['startsWith'](_0x1ade71,_0x4fde27){return __awaiter$1(this,void 0,void 0,function*(){const _0x4065c5=this['path']+'/'+_0x1ade71;try{const _0x3bdff8=yield this['fetch']['get'](_0x4065c5,_0x4fde27);if(_0x3bdff8['status']>0xc7&&_0x3bdff8['status']<0x12c){const _0x32f3f4=yield _0x3bdff8['json']();return new SuccessfulAccountAndImageResponse(_0x32f3f4);}const _0x4ea541=yield _0x3bdff8['json']();return new FailedAccountAndImageResponse(_0x4ea541);}catch(_0x562720){if(_0x562720 instanceof Error)return new FailedAccountAndImageResponse({'detail':_0x562720['message'],'title':_0x562720['name'],'status':0x1f4,'instance':'','type':''});throw _0x562720;}});}}
|
|
18
|
+
|
|
19
|
+
var __awaiter=undefined&&undefined['__awaiter']||function(_0x2cafc9,_0x552fe3,_0x2980aa,_0x1532e2){function _0x340e3e(_0x245132){return _0x245132 instanceof _0x2980aa?_0x245132:new _0x2980aa(function(_0xd81f0f){_0xd81f0f(_0x245132);});}return new(_0x2980aa||(_0x2980aa=Promise))(function(_0x4d9430,_0x28e71b){function _0x46985b(_0x183d26){try{_0x5f07ed(_0x1532e2['next'](_0x183d26));}catch(_0x234fd0){_0x28e71b(_0x234fd0);}}function _0x499b73(_0x15ecf6){try{_0x5f07ed(_0x1532e2['throw'](_0x15ecf6));}catch(_0x15c2c3){_0x28e71b(_0x15c2c3);}}function _0x5f07ed(_0x105cc6){_0x105cc6['done']?_0x4d9430(_0x105cc6['value']):_0x340e3e(_0x105cc6['value'])['then'](_0x46985b,_0x499b73);}_0x5f07ed((_0x1532e2=_0x1532e2['apply'](_0x2cafc9,_0x552fe3||[]))['next']());});};class AdminClient{constructor(_0x5f1752='https://admin.searchability.dev/'){var _0xb585c4=new Fetch(_0x5f1752);this['Accounts']=new AccountService(_0xb585c4),this['Lists']=new ListService(_0xb585c4),this['ApiKeys']=new ApiKeyService(_0xb585c4),this['SearchServers']=new SearchServersService(_0xb585c4),this['Facets']=new FacetService(_0xb585c4),this['SearchResults']=new SearchResultService(_0xb585c4),this['Contributors']=new ContributorService(_0xb585c4);}}class AuthClient{constructor(_0x388052='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x388052);}['login'](_0x2c7a24){return __awaiter(this,void 0,void 0,function*(){const _0x2b9ba='login/'+_0x2c7a24;try{const _0x37281b=yield yield fetch(_0x2b9ba);if(_0x37281b['status']>0xc7&&_0x37281b['status']<0x12c){const _0x4defa0=yield _0x37281b['json']();return new SuccessfulAuthResponse(_0x4defa0);}const _0x317b59=yield _0x37281b['json']();return new FailedAuthResponse(_0x317b59);}catch(_0x133f59){if(_0x133f59 instanceof Error)return new FailedAuthResponse({'detail':_0x133f59['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x133f59;}});}['refresh'](_0x3f2f7f){return __awaiter(this,void 0,void 0,function*(){const _0x47e1e7='refresh',_0x5d0523={'refresh_token':_0x3f2f7f};try{const _0x2290b0=yield this['fetch']['PostNoAuth'](_0x47e1e7,_0x5d0523);if(_0x2290b0['status']>0xc7&&_0x2290b0['status']<0x12c){const _0x49de64=yield _0x2290b0['json']();return new SuccessfulAuthResponse(_0x49de64);}const _0x5838ff=yield _0x2290b0['json']();return new FailedAuthResponse(_0x5838ff);}catch(_0x4b271d){if(_0x4b271d instanceof Error)return new FailedAuthResponse({'detail':_0x4b271d['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x4b271d;}});}['getTokenStatus'](_0x391efa){if(Date['now']()<_0x391efa['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x391efa['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(_0xc3d553){_0xc3d553[_0xc3d553['Ok']=0x0]='Ok',_0xc3d553[_0xc3d553['Refresh']=0x1]='Refresh',_0xc3d553[_0xc3d553['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(_0xd8e302){this['isSuccess']=_0xd8e302;}}class SuccessfulContributorResponse extends Response{constructor(_0x573046){super(!![]),this['contributor']=_0x573046;}['toSuccess'](){return this['contributor'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedContributorResponse extends Response{constructor(_0x736de5){super(![]),this['problem']=_0x736de5;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountAndImageResponse extends Response{constructor(_0x175f36){super(!![]),this['accountAndImages']=_0x175f36;}['toSuccess'](){return this['accountAndImages'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountAndImageResponse extends Response{constructor(_0x2bf699){super(![]),this['problem']=_0x2bf699;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulFacetResponse extends Response{constructor(_0x62b28e){super(!![]),this['facet']=_0x62b28e;}['toSuccess'](){return this['facet'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetResponse extends Response{constructor(_0x9492aa){super(![]),this['problem']=_0x9492aa;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountResponse extends Response{constructor(_0x249503){super(!![]),this['account']=_0x249503;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountImageResponse extends Response{constructor(_0xb80d21){super(!![]),this['accountImage']=_0xb80d21;}['toSuccess'](){return this['accountImage'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListIdentityResponse extends Response{constructor(_0x4c4dda){super(!![]),this['list']=_0x4c4dda;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListResponse extends Response{constructor(_0x1e68b2){super(!![]),this['list']=_0x1e68b2;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x32f668){super(![]),this['problem']=_0x32f668;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountImageResponse extends Response{constructor(_0x5393e1){super(![]),this['problem']=_0x5393e1;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListIdentityResponse extends Response{constructor(_0x19649a){super(![]),this['problem']=_0x19649a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListResponse extends Response{constructor(_0x638de5){super(![]),this['problem']=_0x638de5;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x5c5806){super(!![]),this['tokens']=_0x5c5806;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x45d365){super(![]),this['problem']=_0x45d365;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x38d101){super(!![]),this['apiKey']=_0x38d101;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x1c1924){super(![]),this['problem']=_0x1c1924;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x5ac620){super(!![]),this['searchService']=_0x5ac620;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x11532d){super(![]),this['problem']=_0x11532d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x4757d6){super(!![]),this['searchService']=_0x4757d6;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulViewSearchResultResponse extends Response{constructor(_0xc9f584){super(!![]),this['searchResult']=_0xc9f584;}['toSuccess'](){return this['searchResult'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchResultResponse extends Response{constructor(_0x2c5eba){super(![]),this['problem']=_0x2c5eba;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchResultResponse extends Response{constructor(_0x1187e7){super(!![]),this['searchResults']=_0x1187e7;}['toSuccess'](){return this['searchResults'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchResultResponse extends Response{constructor(_0x302670){super(![]),this['problem']=_0x302670;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchServiceResponse extends Response{constructor(_0x43dce2){super(!![]),this['searchServices']=_0x43dce2;}['toSuccess'](){return this['searchServices'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServicesResponse extends Response{constructor(_0x2736ff){super(![]),this['problem']=_0x2736ff;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedViewSearchServiceResponse extends Response{constructor(_0xd83cbc){super(![]),this['problem']=_0xd83cbc;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x27ac84){super(!![]),this['apiKeyValue']=_0x27ac84;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x1043d5){super(!![]),this['obj']=_0x1043d5;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x40226c){super(![]),this['problem']=_0x40226c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x3b0dd0){super(![]),this['problem']=_0x3b0dd0;}['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(_0x12209f,_0x3306b0,_0x4f9322,_0x1fbe52){function _0x3ca956(_0x61b5e9){return _0x61b5e9 instanceof _0x4f9322?_0x61b5e9:new _0x4f9322(function(_0x32ea7d){_0x32ea7d(_0x61b5e9);});}return new(_0x4f9322||(_0x4f9322=Promise))(function(_0x56b7dc,_0x40a02e){function _0xd3185f(_0x4806ab){try{_0xd9a265(_0x1fbe52['next'](_0x4806ab));}catch(_0x224602){_0x40a02e(_0x224602);}}function _0x49e21e(_0x270f24){try{_0xd9a265(_0x1fbe52['throw'](_0x270f24));}catch(_0x1d3a63){_0x40a02e(_0x1d3a63);}}function _0xd9a265(_0x805a68){_0x805a68['done']?_0x56b7dc(_0x805a68['value']):_0x3ca956(_0x805a68['value'])['then'](_0xd3185f,_0x49e21e);}_0xd9a265((_0x1fbe52=_0x1fbe52['apply'](_0x12209f,_0x3306b0||[]))['next']());});};class AccountService{constructor(_0x9cd42d){this['fetch']=_0x9cd42d;}['get'](_0x51e040,_0x28995d){return __awaiter$8(this,void 0,void 0,function*(){const _0x41f73f='Account/'+_0x51e040+'/',_0x383313=yield this['fetch']['get'](_0x41f73f,_0x28995d);try{if(_0x383313['status']>0xc7&&_0x383313['status']<0x12c){const _0x13e400=yield _0x383313['json']();return new SuccessfulAccountResponse(_0x13e400);}const _0x5138f8=yield _0x383313['json']();return new FailedAccountResponse(_0x5138f8);}catch(_0x4f6d8b){if(_0x4f6d8b instanceof Error)return new FailedAccountResponse({'detail':_0x4f6d8b['message'],'title':_0x4f6d8b['name'],'status':0x1f4,'instance':'','type':''});throw _0x4f6d8b;}});}['getImage'](_0x4b3931,_0x4a2afc){return __awaiter$8(this,void 0,void 0,function*(){const _0x2480a6='account/image/'+_0x4b3931+'/',_0x46ddee=yield this['fetch']['get'](_0x2480a6,_0x4a2afc);try{if(_0x46ddee['status']>0xc7&&_0x46ddee['status']<0x12c){const _0x26131f=yield _0x46ddee['json']();return new SuccessfulAccountImageResponse(_0x26131f);}const _0x351c47=yield _0x46ddee['json']();return new FailedAccountImageResponse(_0x351c47);}catch(_0x3c6fc2){if(_0x3c6fc2 instanceof Error)return new FailedAccountImageResponse({'detail':_0x3c6fc2['message'],'title':_0x3c6fc2['name'],'status':0x1f4,'instance':'','type':''});throw _0x3c6fc2;}});}}
|
|
6
6
|
|
|
7
|
-
var __awaiter$7=undefined&&undefined['__awaiter']||function(
|
|
7
|
+
var __awaiter$7=undefined&&undefined['__awaiter']||function(_0x2c9395,_0x257cdf,_0x4fc833,_0x5be39b){function _0x31c6bf(_0x951ef8){return _0x951ef8 instanceof _0x4fc833?_0x951ef8:new _0x4fc833(function(_0xbda7b0){_0xbda7b0(_0x951ef8);});}return new(_0x4fc833||(_0x4fc833=Promise))(function(_0xa7549f,_0x9c2d9a){function _0xd1b319(_0x201c49){try{_0x5c25ef(_0x5be39b['next'](_0x201c49));}catch(_0x38f049){_0x9c2d9a(_0x38f049);}}function _0x5be0fd(_0x4005cf){try{_0x5c25ef(_0x5be39b['throw'](_0x4005cf));}catch(_0x525097){_0x9c2d9a(_0x525097);}}function _0x5c25ef(_0x2e4c07){_0x2e4c07['done']?_0xa7549f(_0x2e4c07['value']):_0x31c6bf(_0x2e4c07['value'])['then'](_0xd1b319,_0x5be0fd);}_0x5c25ef((_0x5be39b=_0x5be39b['apply'](_0x2c9395,_0x257cdf||[]))['next']());});};class ApiKeyService{constructor(_0x4a5bda){this['fetch']=_0x4a5bda,this['path']='api-key';}['create'](_0x22722c,_0x4e60c0,_0x4faae0){return __awaiter$7(this,void 0,void 0,function*(){const _0xa43661={'account_name':_0x22722c,'api_key_name':_0x4e60c0};try{const _0x485304=yield this['fetch']['post'](this['path'],_0x4faae0,_0xa43661);if(_0x485304['status']>0xc7&&_0x485304['status']<0x12c){const _0x413a35=yield _0x485304['json']();return new SuccessfulApiKeyResponse(_0x413a35);}const _0x135536=yield _0x485304['json']();return new FailedApiKeyResponse(_0x135536);}catch(_0x318465){if(_0x318465 instanceof Error)return new FailedApiKeyResponse({'detail':_0x318465['message'],'title':_0x318465['name'],'status':0x1f4,'instance':'','type':''});throw _0x318465;}});}['view'](_0x3350c5,_0x34521e,_0x1d4954){return __awaiter$7(this,void 0,void 0,function*(){const _0x193a5f=this['path']+'/'+_0x3350c5+'/'+_0x34521e;try{const _0x7507b8=yield this['fetch']['get'](_0x193a5f,_0x1d4954);if(_0x7507b8['status']>0xc7&&_0x7507b8['status']<0x12c){const _0x7ecfc4=yield _0x7507b8['json']();return new SuccessfulApiKeyValueResponse(_0x7ecfc4);}const _0x837367=yield _0x7507b8['json']();return new FailedApiKeyValueResponse(_0x837367);}catch(_0x1a6e47){if(_0x1a6e47 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x1a6e47['message'],'title':_0x1a6e47['name'],'status':0x1f4,'instance':'','type':''});throw _0x1a6e47;}});}['delete'](_0x1ee95d,_0x5792e7,_0x1aa605){return __awaiter$7(this,void 0,void 0,function*(){const _0x3f4bd5=this['path']+'/'+_0x1ee95d+'/'+_0x5792e7;try{const _0x5f0900=yield this['fetch']['delete'](_0x3f4bd5,_0x1aa605);if(_0x5f0900['status']>0xc7&&_0x5f0900['status']<0x12c)return new SuccessfulResponse({});const _0x498bef=yield _0x5f0900['json']();return new FailedResponse(_0x498bef);}catch(_0x4369d1){if(_0x4369d1 instanceof Error)return new FailedResponse({'detail':_0x4369d1['message'],'title':_0x4369d1['name'],'status':0x1f4,'instance':'','type':''});throw _0x4369d1;}});}}
|
|
8
8
|
|
|
9
|
-
var __awaiter$6=undefined&&undefined['__awaiter']||function(
|
|
9
|
+
var __awaiter$6=undefined&&undefined['__awaiter']||function(_0x136ebf,_0x43adfc,_0x7042c5,_0x4467fb){function _0x48f628(_0xe0d6af){return _0xe0d6af instanceof _0x7042c5?_0xe0d6af:new _0x7042c5(function(_0xfc31dc){_0xfc31dc(_0xe0d6af);});}return new(_0x7042c5||(_0x7042c5=Promise))(function(_0x16f24b,_0x3751bf){function _0x29cd6b(_0x26ac17){try{_0x158d5d(_0x4467fb['next'](_0x26ac17));}catch(_0x16edbf){_0x3751bf(_0x16edbf);}}function _0x614a4f(_0x202b76){try{_0x158d5d(_0x4467fb['throw'](_0x202b76));}catch(_0x3c918f){_0x3751bf(_0x3c918f);}}function _0x158d5d(_0x42bf0f){_0x42bf0f['done']?_0x16f24b(_0x42bf0f['value']):_0x48f628(_0x42bf0f['value'])['then'](_0x29cd6b,_0x614a4f);}_0x158d5d((_0x4467fb=_0x4467fb['apply'](_0x136ebf,_0x43adfc||[]))['next']());});};class ListService{constructor(_0x3f614f){this['fetch']=_0x3f614f;}['create'](_0x293641,_0x40780e,_0xbf9ec4,_0x2818c2){return __awaiter$6(this,void 0,void 0,function*(){const _0x3e408e='List',_0x53c497={'account_name':_0x293641,'list_name':_0x40780e,'search_service_name':_0xbf9ec4};try{const _0x2617af=yield this['fetch']['post'](_0x3e408e,_0x2818c2,_0x53c497);if(_0x2617af['status']>0xc7&&_0x2617af['status']<0x12c){const _0x41f158=yield _0x2617af['json']();return new SuccessfulListIdentityResponse(_0x41f158);}const _0x4c5b07=yield _0x2617af['json']();return new FailedListIdentityResponse(_0x4c5b07);}catch(_0x4cf491){if(_0x4cf491 instanceof Error)return new FailedListIdentityResponse({'detail':_0x4cf491['message'],'title':_0x4cf491['name'],'status':0x1f4,'instance':'','type':''});throw _0x4cf491;}});}['delete'](_0x2ecbbb,_0x3a385c,_0x18a0c8){return __awaiter$6(this,void 0,void 0,function*(){const _0x2db6d8='List/'+_0x2ecbbb+'/'+_0x3a385c,_0x466ed6=yield this['fetch']['delete'](_0x2db6d8,_0x18a0c8);try{if(_0x466ed6['status']>0xc7&&_0x466ed6['status']<0x12c)return new SuccessfulResponse({});const _0x783f1e=yield _0x466ed6['json']();return new FailedResponse(_0x783f1e);}catch(_0x3de6e9){if(_0x3de6e9 instanceof Error)return new FailedResponse({'detail':_0x3de6e9['message'],'title':_0x3de6e9['name'],'status':0x1f4,'instance':'','type':''});throw _0x3de6e9;}});}['get'](_0x1d1d6d,_0x2995a9,_0x147f9a){return __awaiter$6(this,void 0,void 0,function*(){const _0x1cafa8='List/'+_0x1d1d6d+'/'+_0x2995a9;try{const _0x3201a0=yield this['fetch']['get'](_0x1cafa8,_0x147f9a);if(_0x3201a0['status']>0xc7&&_0x3201a0['status']<0x12c){const _0x165a56=yield _0x3201a0['json']();return new SuccessfulListResponse(_0x165a56);}const _0x17eb17=yield _0x3201a0['json']();return new FailedListResponse(_0x17eb17);}catch(_0x2d2aba){if(_0x2d2aba instanceof Error)return new FailedListResponse({'detail':_0x2d2aba['message'],'title':_0x2d2aba['name'],'status':0x1f4,'instance':'','type':''});throw _0x2d2aba;}});}}
|
|
10
10
|
|
|
11
|
-
var __awaiter$5=undefined&&undefined['__awaiter']||function(
|
|
11
|
+
var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x1ce3fb,_0x12817d,_0x3f3cf7,_0x16d21b){function _0x270f4b(_0x2393b0){return _0x2393b0 instanceof _0x3f3cf7?_0x2393b0:new _0x3f3cf7(function(_0x253ec0){_0x253ec0(_0x2393b0);});}return new(_0x3f3cf7||(_0x3f3cf7=Promise))(function(_0x20b223,_0x9a9957){function _0x2963ba(_0x10e29){try{_0x3bd492(_0x16d21b['next'](_0x10e29));}catch(_0x53ddb4){_0x9a9957(_0x53ddb4);}}function _0x252df5(_0x29a5b2){try{_0x3bd492(_0x16d21b['throw'](_0x29a5b2));}catch(_0x3aad4a){_0x9a9957(_0x3aad4a);}}function _0x3bd492(_0x85f319){_0x85f319['done']?_0x20b223(_0x85f319['value']):_0x270f4b(_0x85f319['value'])['then'](_0x2963ba,_0x252df5);}_0x3bd492((_0x16d21b=_0x16d21b['apply'](_0x1ce3fb,_0x12817d||[]))['next']());});};class Fetch{constructor(_0x223446){this['baseUri']=_0x223446,this['getUrl']=_0x53ff8a=>{return _0x53ff8a['startsWith']('/')&&(_0x53ff8a=_0x53ff8a['replace']('/','')),''+this['baseUri']+_0x53ff8a;},!_0x223446['endsWith']('/')&&(_0x223446=_0x223446+'/');}['get'](_0xf0dc0a,_0x21a94e){return __awaiter$5(this,void 0,void 0,function*(){const _0x3c3a2d=this['getUrl'](_0xf0dc0a);return yield fetch(_0x3c3a2d,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x21a94e}});});}['post'](_0x184625,_0x49fdd5,_0x28beb2){return __awaiter$5(this,void 0,void 0,function*(){const _0x4dc3c8=this['getUrl'](_0x184625);return yield fetch(_0x4dc3c8,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x49fdd5},'body':_0x28beb2?JSON['stringify'](_0x28beb2):null});});}['PostNoAuth'](_0x11aa1b,_0x4e4aff){return __awaiter$5(this,void 0,void 0,function*(){const _0x514f26=this['getUrl'](_0x11aa1b);return yield fetch(_0x514f26,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0x4e4aff?JSON['stringify'](_0x4e4aff):null});});}['put'](_0x2b894f,_0x4d7c3a,_0x1e08d9){return __awaiter$5(this,void 0,void 0,function*(){const _0x388f3e=this['getUrl'](_0x2b894f);return yield fetch(_0x388f3e,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4d7c3a},'body':_0x1e08d9?JSON['stringify'](_0x1e08d9):null});});}['delete'](_0x207ff4,_0x5481e4){return __awaiter$5(this,void 0,void 0,function*(){const _0x4111bb=this['getUrl'](_0x207ff4);return yield fetch(_0x4111bb,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x5481e4}});});}}
|
|
12
12
|
|
|
13
|
-
var __awaiter$4=undefined&&undefined['__awaiter']||function(
|
|
13
|
+
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x98d6ae,_0xbdc39,_0x4a034e,_0x485ec1){function _0x5e5521(_0x5d402f){return _0x5d402f instanceof _0x4a034e?_0x5d402f:new _0x4a034e(function(_0x5edd57){_0x5edd57(_0x5d402f);});}return new(_0x4a034e||(_0x4a034e=Promise))(function(_0x5da095,_0x305005){function _0x1620c0(_0x458393){try{_0x1a7107(_0x485ec1['next'](_0x458393));}catch(_0x757415){_0x305005(_0x757415);}}function _0x445f22(_0x3bd052){try{_0x1a7107(_0x485ec1['throw'](_0x3bd052));}catch(_0x1491d0){_0x305005(_0x1491d0);}}function _0x1a7107(_0x8f4c47){_0x8f4c47['done']?_0x5da095(_0x8f4c47['value']):_0x5e5521(_0x8f4c47['value'])['then'](_0x1620c0,_0x445f22);}_0x1a7107((_0x485ec1=_0x485ec1['apply'](_0x98d6ae,_0xbdc39||[]))['next']());});};class SearchServersService{constructor(_0x3a54d9){this['fetch']=_0x3a54d9,this['path']='search-services';}['create'](_0x283ff4,_0x157e96,_0x2b1841,_0x293b5e,_0x2ae8bd,_0x2343da,_0x383a87,_0x23cd1f){return __awaiter$4(this,void 0,void 0,function*(){const _0x12d648={'account_name':_0x283ff4,'search_service_name':_0x157e96,'endpoint':_0x2b1841,'key':_0x293b5e,'country':_0x2ae8bd,'provider':_0x2343da,'index_name':_0x383a87};try{const _0x53e52f=yield this['fetch']['post'](this['path'],_0x23cd1f,_0x12d648);if(_0x53e52f['status']>0xc7&&_0x53e52f['status']<0x12c){const _0x3e077d=yield _0x53e52f['json']();return new SuccessfulSearchServiceResponse(_0x3e077d);}const _0x486731=yield _0x53e52f['json']();return new FailedSearchServiceResponse(_0x486731);}catch(_0x4c1916){if(_0x4c1916 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x4c1916['message'],'title':_0x4c1916['name'],'status':0x1f4,'instance':'','type':''});throw _0x4c1916;}});}['delete'](_0x31ea88,_0x40d8b2,_0x347f94){return __awaiter$4(this,void 0,void 0,function*(){const _0x45fafa=this['path']+'/'+_0x31ea88+'/'+_0x40d8b2;try{const _0x1971a5=yield this['fetch']['delete'](_0x45fafa,_0x347f94);if(_0x1971a5['status']>0xc7&&_0x1971a5['status']<0x12c)return new SuccessfulResponse({});const _0x36f76f=yield _0x1971a5['json']();return new FailedResponse(_0x36f76f);}catch(_0x3ca00e){if(_0x3ca00e instanceof Error)return new FailedResponse({'detail':_0x3ca00e['message'],'title':_0x3ca00e['name'],'status':0x1f4,'instance':'','type':''});throw _0x3ca00e;}});}['view'](_0x56695d,_0x167e96,_0x34b120){return __awaiter$4(this,void 0,void 0,function*(){const _0x439b22=this['path']+'/'+_0x56695d+'/'+_0x167e96;try{const _0x3f6841=yield this['fetch']['get'](_0x439b22,_0x34b120);if(_0x3f6841['status']>0xc7&&_0x3f6841['status']<0x12c){const _0x477f3f=yield _0x3f6841['json']();return new SuccessfulViewSearchServiceResponse(_0x477f3f);}const _0x3695ad=yield _0x3f6841['json']();return new FailedViewSearchServiceResponse(_0x3695ad);}catch(_0x6e9579){if(_0x6e9579 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x6e9579['message'],'title':_0x6e9579['name'],'status':0x1f4,'instance':'','type':''});throw _0x6e9579;}});}['edit'](_0x3e4fe6,_0x12e256,_0x35ff54,_0x5886be,_0x1fd11c){return __awaiter$4(this,void 0,void 0,function*(){const _0x3670c6={'account_name':_0x3e4fe6,'search_service_name':_0x12e256,'key':_0x35ff54,'country':_0x5886be};try{const _0x2634d3=yield this['fetch']['put'](this['path'],_0x1fd11c,_0x3670c6);if(_0x2634d3['status']>0xc7&&_0x2634d3['status']<0x12c){const _0x45a4f9=yield _0x2634d3['json']();return new SuccessfulSearchServiceResponse(_0x45a4f9);}const _0xbf9242=yield _0x2634d3['json']();return new FailedSearchServiceResponse(_0xbf9242);}catch(_0x5ad6eb){if(_0x5ad6eb instanceof Error)return new FailedSearchServiceResponse({'detail':_0x5ad6eb['message'],'title':_0x5ad6eb['name'],'status':0x1f4,'instance':'','type':''});throw _0x5ad6eb;}});}['list'](_0x476185,_0x2466d7){return __awaiter$4(this,void 0,void 0,function*(){const _0x2336c3=this['path']+'/'+_0x476185;try{const _0x5750af=yield this['fetch']['get'](_0x2336c3,_0x2466d7);if(_0x5750af['status']>0xc7&&_0x5750af['status']<0x12c){const _0x2acf0c=yield _0x5750af['json']();return new SuccessfulListSearchServiceResponse(_0x2acf0c);}const _0x23e517=yield _0x5750af['json']();return new FailedViewSearchServicesResponse(_0x23e517);}catch(_0x50d688){if(_0x50d688 instanceof Error)return new FailedViewSearchServicesResponse({'detail':_0x50d688['message'],'title':_0x50d688['name'],'status':0x1f4,'instance':'','type':''});throw _0x50d688;}});}}
|
|
14
14
|
|
|
15
|
-
var __awaiter$3=undefined&&undefined['__awaiter']||function(
|
|
15
|
+
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0xa8c914,_0x16c3ab,_0x58e756,_0x527eae){function _0x51fa82(_0x399852){return _0x399852 instanceof _0x58e756?_0x399852:new _0x58e756(function(_0x24e597){_0x24e597(_0x399852);});}return new(_0x58e756||(_0x58e756=Promise))(function(_0x323bf9,_0x4038b0){function _0x17eab2(_0x2a7dd3){try{_0x5a797f(_0x527eae['next'](_0x2a7dd3));}catch(_0x225332){_0x4038b0(_0x225332);}}function _0x1e0cd7(_0x4954e3){try{_0x5a797f(_0x527eae['throw'](_0x4954e3));}catch(_0x4429ef){_0x4038b0(_0x4429ef);}}function _0x5a797f(_0x49ba4f){_0x49ba4f['done']?_0x323bf9(_0x49ba4f['value']):_0x51fa82(_0x49ba4f['value'])['then'](_0x17eab2,_0x1e0cd7);}_0x5a797f((_0x527eae=_0x527eae['apply'](_0xa8c914,_0x16c3ab||[]))['next']());});};class FacetService{constructor(_0x2aed09){this['fetch']=_0x2aed09,this['path']='facet';}['create'](_0x4d277d,_0x4d1028,_0x43a05c,_0x37878a){return __awaiter$3(this,void 0,void 0,function*(){const _0x44262c={'account_name':_0x4d277d,'list_name':_0x4d1028,'facet_name':_0x43a05c};try{const _0x2bd07f=yield this['fetch']['post'](this['path'],_0x37878a,_0x44262c);if(_0x2bd07f['status']>0xc7&&_0x2bd07f['status']<0x12c){const _0x35c8d8=yield _0x2bd07f['json']();return new SuccessfulFacetResponse(_0x35c8d8);}const _0x2f99fe=yield _0x2bd07f['json']();return new FailedFacetResponse(_0x2f99fe);}catch(_0x2fd2b7){if(_0x2fd2b7 instanceof Error)return new FailedFacetResponse({'detail':_0x2fd2b7['message'],'title':_0x2fd2b7['name'],'status':0x1f4,'instance':'','type':''});throw _0x2fd2b7;}});}['remove'](_0x2c8c0a,_0x352e16,_0x3227ca,_0x463aa7){return __awaiter$3(this,void 0,void 0,function*(){const _0x24be13='Facet/'+_0x2c8c0a+'/'+_0x352e16+'/'+_0x3227ca,_0x353268=yield this['fetch']['delete'](_0x24be13,_0x463aa7);try{if(_0x353268['status']>0xc7&&_0x353268['status']<0x12c)return new SuccessfulResponse({});const _0x103484=yield _0x353268['json']();return new FailedResponse(_0x103484);}catch(_0xf12ca2){if(_0xf12ca2 instanceof Error)return new FailedResponse({'detail':_0xf12ca2['message'],'title':_0xf12ca2['name'],'status':0x1f4,'instance':'','type':''});throw _0xf12ca2;}});}['rename'](_0x2b3338,_0x262672,_0x3c1b62,_0x56b831,_0x5f2911){return __awaiter$3(this,void 0,void 0,function*(){const _0x2376af={'account_name':_0x2b3338,'list_name':_0x262672,'facet_name':_0x3c1b62,'new_facet_name':_0x56b831};try{const _0x49e130=yield this['fetch']['put'](this['path'],_0x5f2911,_0x2376af);if(_0x49e130['status']>0xc7&&_0x49e130['status']<0x12c){const _0x40f59a=yield _0x49e130['json']();return new SuccessfulFacetResponse(_0x40f59a);}const _0x43c0d9=yield _0x49e130['json']();return new FailedFacetResponse(_0x43c0d9);}catch(_0x250a39){if(_0x250a39 instanceof Error)return new FailedFacetResponse({'detail':_0x250a39['message'],'title':_0x250a39['name'],'status':0x1f4,'instance':'','type':''});throw _0x250a39;}});}}
|
|
16
16
|
|
|
17
|
-
var __awaiter$2=undefined&&undefined['__awaiter']||function(
|
|
17
|
+
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x170d31,_0x99f9f7,_0x3f9e56,_0x2d52a4){function _0x3883b1(_0x39eeb6){return _0x39eeb6 instanceof _0x3f9e56?_0x39eeb6:new _0x3f9e56(function(_0x24f867){_0x24f867(_0x39eeb6);});}return new(_0x3f9e56||(_0x3f9e56=Promise))(function(_0x164b39,_0x1310c6){function _0x409b93(_0x294cfb){try{_0x5bf42a(_0x2d52a4['next'](_0x294cfb));}catch(_0xdd28fd){_0x1310c6(_0xdd28fd);}}function _0x2ccdbc(_0x22fce8){try{_0x5bf42a(_0x2d52a4['throw'](_0x22fce8));}catch(_0x2d0e0b){_0x1310c6(_0x2d0e0b);}}function _0x5bf42a(_0xd5851f){_0xd5851f['done']?_0x164b39(_0xd5851f['value']):_0x3883b1(_0xd5851f['value'])['then'](_0x409b93,_0x2ccdbc);}_0x5bf42a((_0x2d52a4=_0x2d52a4['apply'](_0x170d31,_0x99f9f7||[]))['next']());});};class SearchResultService{constructor(_0x1fddf3){this['fetch']=_0x1fddf3,this['path']='search-result';}['create'](_0x2b2bfb,_0x2bff97,_0x599c7d,_0x893c5c,_0x430e57){return __awaiter$2(this,void 0,void 0,function*(){_0x430e57=_0x430e57!==null&&_0x430e57!==void 0?_0x430e57:{'description':'','keywords':'','resource_1':'','resource_2':'','resource_3':'','latitude':0x0,'longitude':0x0,'facets':[]};const _0x27dd0f=Object['assign']({'account_name':_0x2b2bfb,'search_result_name':_0x599c7d,'list_name':_0x2bff97},_0x430e57);try{const _0x2aba2e=yield this['fetch']['post'](this['path'],_0x893c5c,_0x27dd0f);if(_0x2aba2e['status']>0xc7&&_0x2aba2e['status']<0x12c){const _0x135693=yield _0x2aba2e['json']();return new SuccessfulViewSearchResultResponse(_0x135693);}const _0x35ee99=yield _0x2aba2e['json']();return new FailedSearchResultResponse(_0x35ee99);}catch(_0x33af5d){if(_0x33af5d instanceof Error)return new FailedSearchResultResponse({'detail':_0x33af5d['message'],'title':_0x33af5d['name'],'status':0x1f4,'instance':'','type':''});throw _0x33af5d;}});}['transfer'](_0x140b53,_0x5718a7,_0x2cf289,_0xd3eb2e){return __awaiter$2(this,void 0,void 0,function*(){const _0x263e71={'account_name':_0x140b53,'list_name':_0x5718a7,'new_search_service_name':_0x2cf289};try{const _0x4b0f8d=yield this['fetch']['post'](this['path']+'/transfer',_0xd3eb2e,_0x263e71);if(_0x4b0f8d['status']>0xc7&&_0x4b0f8d['status']<0x12c){const _0x1942eb=yield _0x4b0f8d['json']();return new SuccessfulListResponse(_0x1942eb);}const _0x4a5dd9=yield _0x4b0f8d['json']();return new FailedListResponse(_0x4a5dd9);}catch(_0x340558){if(_0x340558 instanceof Error)return new FailedListResponse({'detail':_0x340558['message'],'title':_0x340558['name'],'status':0x1f4,'instance':'','type':''});throw _0x340558;}});}['list'](_0x4b074b,_0x53b373,_0xb90475,_0x351fd4){return __awaiter$2(this,void 0,void 0,function*(){let _0x4a8e1c=this['path']+'/'+_0x4b074b+'/'+_0x53b373;const _0x1d3237=[];(_0x351fd4===null||_0x351fd4===void 0?void 0:_0x351fd4['size'])&&_0x1d3237['push']('size='+_0x351fd4['size']);(_0x351fd4===null||_0x351fd4===void 0?void 0:_0x351fd4['skip'])&&_0x1d3237['push']('skip='+_0x351fd4['skip']);(_0x351fd4===null||_0x351fd4===void 0?void 0:_0x351fd4['query'])&&_0x1d3237['push']('query='+_0x351fd4['query']);(_0x351fd4===null||_0x351fd4===void 0?void 0:_0x351fd4['filter'])&&_0x1d3237['push']('filter='+_0x351fd4['filter']);(_0x351fd4===null||_0x351fd4===void 0?void 0:_0x351fd4['radius'])&&_0x1d3237['push']('radius='+_0x351fd4['radius']);_0x1d3237['length']>0x0&&_0x1d3237['forEach']((_0x22efcb,_0x19068d)=>{_0x19068d===0x0?_0x4a8e1c+='?':_0x4a8e1c+='&',_0x4a8e1c+=_0x22efcb;});try{const _0x1784d5=yield this['fetch']['get'](_0x4a8e1c,_0xb90475);if(_0x1784d5['status']>0xc7&&_0x1784d5['status']<0x12c){const _0x5980e9=yield _0x1784d5['json']();return new SuccessfulListSearchResultResponse(_0x5980e9);}const _0x4f2ef4=yield _0x1784d5['json']();return new FailedViewSearchResultResponse(_0x4f2ef4);}catch(_0xce3069){if(_0xce3069 instanceof Error)return new FailedViewSearchResultResponse({'detail':_0xce3069['message'],'title':_0xce3069['name'],'status':0x1f4,'instance':'','type':''});throw _0xce3069;}});}}
|
|
18
18
|
|
|
19
|
-
var __awaiter$1=undefined&&undefined['__awaiter']||function(
|
|
19
|
+
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x5a8e9e,_0x2b87c8,_0x29d57c,_0x35e8b1){function _0x327093(_0x40c315){return _0x40c315 instanceof _0x29d57c?_0x40c315:new _0x29d57c(function(_0x49df0a){_0x49df0a(_0x40c315);});}return new(_0x29d57c||(_0x29d57c=Promise))(function(_0x27b178,_0x277561){function _0x346e14(_0x32e7ea){try{_0x57afdb(_0x35e8b1['next'](_0x32e7ea));}catch(_0x9e69db){_0x277561(_0x9e69db);}}function _0x2c8428(_0x4b24c8){try{_0x57afdb(_0x35e8b1['throw'](_0x4b24c8));}catch(_0x523d5e){_0x277561(_0x523d5e);}}function _0x57afdb(_0x62e02){_0x62e02['done']?_0x27b178(_0x62e02['value']):_0x327093(_0x62e02['value'])['then'](_0x346e14,_0x2c8428);}_0x57afdb((_0x35e8b1=_0x35e8b1['apply'](_0x5a8e9e,_0x2b87c8||[]))['next']());});};class ContributorService{constructor(_0x133286){this['fetch']=_0x133286,this['path']='contributor';}['create'](_0x440599,_0x2e1cd3,_0x39888c,_0x3e6910){return __awaiter$1(this,void 0,void 0,function*(){const _0x3efa72={'account_name':_0x440599,'list_name':_0x2e1cd3,'contributor_name':_0x39888c};try{const _0x11077d=yield this['fetch']['post'](this['path'],_0x3e6910,_0x3efa72);if(_0x11077d['status']>0xc7&&_0x11077d['status']<0x12c){const _0x1e7afd=yield _0x11077d['json']();return new SuccessfulContributorResponse(_0x1e7afd);}const _0x1e5e9e=yield _0x11077d['json']();return new FailedContributorResponse(_0x1e5e9e);}catch(_0x317e7a){if(_0x317e7a instanceof Error)return new FailedContributorResponse({'detail':_0x317e7a['message'],'title':_0x317e7a['name'],'status':0x1f4,'instance':'','type':''});throw _0x317e7a;}});}['remove'](_0x19d92e,_0x4f9e38,_0x307563,_0x280a2c){return __awaiter$1(this,void 0,void 0,function*(){const _0x77b9fd=this['path']+'/'+_0x19d92e+'/'+_0x4f9e38+'/'+_0x307563,_0x136ae8=yield this['fetch']['delete'](_0x77b9fd,_0x280a2c);try{if(_0x136ae8['status']>0xc7&&_0x136ae8['status']<0x12c)return new SuccessfulResponse({});const _0x4efb38=yield _0x136ae8['json']();return new FailedResponse(_0x4efb38);}catch(_0x1551fb){if(_0x1551fb instanceof Error)return new FailedResponse({'detail':_0x1551fb['message'],'title':_0x1551fb['name'],'status':0x1f4,'instance':'','type':''});throw _0x1551fb;}});}['startsWith'](_0x379a06,_0x507809){return __awaiter$1(this,void 0,void 0,function*(){const _0xd6bdb5=this['path']+'/'+_0x379a06;try{const _0x1bb090=yield this['fetch']['get'](_0xd6bdb5,_0x507809);if(_0x1bb090['status']>0xc7&&_0x1bb090['status']<0x12c){const _0xdac044=yield _0x1bb090['json']();return new SuccessfulAccountAndImageResponse(_0xdac044);}const _0x1559f0=yield _0x1bb090['json']();return new FailedAccountAndImageResponse(_0x1559f0);}catch(_0x1c9369){if(_0x1c9369 instanceof Error)return new FailedAccountAndImageResponse({'detail':_0x1c9369['message'],'title':_0x1c9369['name'],'status':0x1f4,'instance':'','type':''});throw _0x1c9369;}});}}
|
|
20
20
|
|
|
21
|
-
var __awaiter=undefined&&undefined['__awaiter']||function(
|
|
21
|
+
var __awaiter=undefined&&undefined['__awaiter']||function(_0x1db341,_0x1e5a9e,_0x700a9e,_0x3539dc){function _0x20e9ef(_0x16c041){return _0x16c041 instanceof _0x700a9e?_0x16c041:new _0x700a9e(function(_0x571cc9){_0x571cc9(_0x16c041);});}return new(_0x700a9e||(_0x700a9e=Promise))(function(_0x60119b,_0x1c700a){function _0x1c80ee(_0x355977){try{_0x3d1667(_0x3539dc['next'](_0x355977));}catch(_0x11e075){_0x1c700a(_0x11e075);}}function _0x97b4f7(_0x4cece4){try{_0x3d1667(_0x3539dc['throw'](_0x4cece4));}catch(_0x4df9ae){_0x1c700a(_0x4df9ae);}}function _0x3d1667(_0x1b940f){_0x1b940f['done']?_0x60119b(_0x1b940f['value']):_0x20e9ef(_0x1b940f['value'])['then'](_0x1c80ee,_0x97b4f7);}_0x3d1667((_0x3539dc=_0x3539dc['apply'](_0x1db341,_0x1e5a9e||[]))['next']());});};class AdminClient{constructor(_0x2def09='https://admin.searchability.dev/'){var _0x49633a=new Fetch(_0x2def09);this['Accounts']=new AccountService(_0x49633a),this['Lists']=new ListService(_0x49633a),this['ApiKeys']=new ApiKeyService(_0x49633a),this['SearchServers']=new SearchServersService(_0x49633a),this['Facets']=new FacetService(_0x49633a),this['SearchResults']=new SearchResultService(_0x49633a),this['Contributors']=new ContributorService(_0x49633a);}}class AuthClient{constructor(_0x40290b='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x40290b);}['login'](_0xb096fb){return __awaiter(this,void 0,void 0,function*(){const _0xb27c3a='login/'+_0xb096fb;try{const _0x4d21af=yield yield fetch(_0xb27c3a);if(_0x4d21af['status']>0xc7&&_0x4d21af['status']<0x12c){const _0x3022ad=yield _0x4d21af['json']();return new SuccessfulAuthResponse(_0x3022ad);}const _0xa50080=yield _0x4d21af['json']();return new FailedAuthResponse(_0xa50080);}catch(_0x524565){if(_0x524565 instanceof Error)return new FailedAuthResponse({'detail':_0x524565['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x524565;}});}['refresh'](_0x45ccba){return __awaiter(this,void 0,void 0,function*(){const _0xe3adb4='refresh',_0x2c5b5d={'refresh_token':_0x45ccba};try{const _0x1cf4d7=yield this['fetch']['PostNoAuth'](_0xe3adb4,_0x2c5b5d);if(_0x1cf4d7['status']>0xc7&&_0x1cf4d7['status']<0x12c){const _0x1f4509=yield _0x1cf4d7['json']();return new SuccessfulAuthResponse(_0x1f4509);}const _0x3b379c=yield _0x1cf4d7['json']();return new FailedAuthResponse(_0x3b379c);}catch(_0x40646e){if(_0x40646e instanceof Error)return new FailedAuthResponse({'detail':_0x40646e['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x40646e;}});}['getTokenStatus'](_0x2e98bb){if(Date['now']()<_0x2e98bb['access_expires'])return exports.TokenStatus['Ok'];if(Date['now']()<_0x2e98bb['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(_0x5a7ccb){_0x5a7ccb[_0x5a7ccb['Ok']=0x0]='Ok',_0x5a7ccb[_0x5a7ccb['Refresh']=0x1]='Refresh',_0x5a7ccb[_0x5a7ccb['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(_0x12b013){this['isSuccess']=_0x12b013;}}class SuccessfulContributorResponse extends Response{constructor(_0x5b7e6){super(!![]),this['contributor']=_0x5b7e6;}['toSuccess'](){return this['contributor'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedContributorResponse extends Response{constructor(_0x37044a){super(![]),this['problem']=_0x37044a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountAndImageResponse extends Response{constructor(_0x425f40){super(!![]),this['accountAndImages']=_0x425f40;}['toSuccess'](){return this['accountAndImages'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountAndImageResponse extends Response{constructor(_0x435db1){super(![]),this['problem']=_0x435db1;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulFacetResponse extends Response{constructor(_0x4cc05a){super(!![]),this['facet']=_0x4cc05a;}['toSuccess'](){return this['facet'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetResponse extends Response{constructor(_0x48e273){super(![]),this['problem']=_0x48e273;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountResponse extends Response{constructor(_0x391e25){super(!![]),this['account']=_0x391e25;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountImageResponse extends Response{constructor(_0x357bcc){super(!![]),this['accountImage']=_0x357bcc;}['toSuccess'](){return this['accountImage'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListIdentityResponse extends Response{constructor(_0x2d4356){super(!![]),this['list']=_0x2d4356;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListResponse extends Response{constructor(_0x5f0c77){super(!![]),this['list']=_0x5f0c77;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x280665){super(![]),this['problem']=_0x280665;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountImageResponse extends Response{constructor(_0x3242d3){super(![]),this['problem']=_0x3242d3;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListIdentityResponse extends Response{constructor(_0x35f059){super(![]),this['problem']=_0x35f059;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListResponse extends Response{constructor(_0x50197f){super(![]),this['problem']=_0x50197f;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x5853a6){super(!![]),this['tokens']=_0x5853a6;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x3933af){super(![]),this['problem']=_0x3933af;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x55ea5c){super(!![]),this['apiKey']=_0x55ea5c;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x4f399c){super(![]),this['problem']=_0x4f399c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x1adf89){super(!![]),this['searchService']=_0x1adf89;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x2b7c95){super(![]),this['problem']=_0x2b7c95;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x125670){super(!![]),this['searchService']=_0x125670;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulViewSearchResultResponse extends Response{constructor(_0xf67e45){super(!![]),this['searchResult']=_0xf67e45;}['toSuccess'](){return this['searchResult'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchResultResponse extends Response{constructor(_0xd96ea1){super(![]),this['problem']=_0xd96ea1;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchResultResponse extends Response{constructor(_0x43207d){super(!![]),this['searchResults']=_0x43207d;}['toSuccess'](){return this['searchResults'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchResultResponse extends Response{constructor(_0x40e757){super(![]),this['problem']=_0x40e757;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchServiceResponse extends Response{constructor(_0x4a6de5){super(!![]),this['searchServices']=_0x4a6de5;}['toSuccess'](){return this['searchServices'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServicesResponse extends Response{constructor(_0x3745fb){super(![]),this['problem']=_0x3745fb;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedViewSearchServiceResponse extends Response{constructor(_0x2d9a96){super(![]),this['problem']=_0x2d9a96;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x34a963){super(!![]),this['apiKeyValue']=_0x34a963;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x7fc7e8){super(!![]),this['obj']=_0x7fc7e8;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x2b8ec5){super(![]),this['problem']=_0x2b8ec5;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x56c9d2){super(![]),this['problem']=_0x56c9d2;}['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(_0x2a4c91,_0x31f607,_0x27f6f5,_0x261234){function _0xa15cc4(_0x4a33b4){return _0x4a33b4 instanceof _0x27f6f5?_0x4a33b4:new _0x27f6f5(function(_0x4f38d6){_0x4f38d6(_0x4a33b4);});}return new(_0x27f6f5||(_0x27f6f5=Promise))(function(_0x37bc05,_0x555404){function _0x3656f0(_0x19918e){try{_0x1fde39(_0x261234['next'](_0x19918e));}catch(_0x316878){_0x555404(_0x316878);}}function _0xe9a0f4(_0x309bbd){try{_0x1fde39(_0x261234['throw'](_0x309bbd));}catch(_0x102233){_0x555404(_0x102233);}}function _0x1fde39(_0x1c0771){_0x1c0771['done']?_0x37bc05(_0x1c0771['value']):_0xa15cc4(_0x1c0771['value'])['then'](_0x3656f0,_0xe9a0f4);}_0x1fde39((_0x261234=_0x261234['apply'](_0x2a4c91,_0x31f607||[]))['next']());});};class AccountService{constructor(_0x19e376){this['fetch']=_0x19e376;}['get'](_0x20b131,_0x9e8e5d){return __awaiter$8(this,void 0,void 0,function*(){const _0xd5204f='Account/'+_0x20b131+'/',_0x33c468=yield this['fetch']['get'](_0xd5204f,_0x9e8e5d);try{if(_0x33c468['status']>0xc7&&_0x33c468['status']<0x12c){const _0x589f1b=yield _0x33c468['json']();return new SuccessfulAccountResponse(_0x589f1b);}const _0x18294c=yield _0x33c468['json']();return new FailedAccountResponse(_0x18294c);}catch(_0x18f7d9){if(_0x18f7d9 instanceof Error)return new FailedAccountResponse({'detail':_0x18f7d9['message'],'title':_0x18f7d9['name'],'status':0x1f4,'instance':'','type':''});throw _0x18f7d9;}});}['getImage'](_0x137646,_0x3a98ec){return __awaiter$8(this,void 0,void 0,function*(){const _0x21dbd='account/image/'+_0x137646+'/',_0x2b69e9=yield this['fetch']['get'](_0x21dbd,_0x3a98ec);try{if(_0x2b69e9['status']>0xc7&&_0x2b69e9['status']<0x12c){const _0x5022f0=yield _0x2b69e9['json']();return new SuccessfulAccountImageResponse(_0x5022f0);}const _0x376a80=yield _0x2b69e9['json']();return new FailedAccountImageResponse(_0x376a80);}catch(_0x58a504){if(_0x58a504 instanceof Error)return new FailedAccountImageResponse({'detail':_0x58a504['message'],'title':_0x58a504['name'],'status':0x1f4,'instance':'','type':''});throw _0x58a504;}});}}
|
|
4
4
|
|
|
5
|
-
var __awaiter$7=undefined&&undefined['__awaiter']||function(
|
|
5
|
+
var __awaiter$7=undefined&&undefined['__awaiter']||function(_0x3bcaab,_0x1da9a4,_0x17e095,_0x11fb52){function _0x3ebb65(_0x319df2){return _0x319df2 instanceof _0x17e095?_0x319df2:new _0x17e095(function(_0x2d1140){_0x2d1140(_0x319df2);});}return new(_0x17e095||(_0x17e095=Promise))(function(_0x4b66ce,_0x1ab97a){function _0x2572b7(_0x1844c4){try{_0x2e7b30(_0x11fb52['next'](_0x1844c4));}catch(_0x3bc53a){_0x1ab97a(_0x3bc53a);}}function _0x284d89(_0x55f0bb){try{_0x2e7b30(_0x11fb52['throw'](_0x55f0bb));}catch(_0x992f51){_0x1ab97a(_0x992f51);}}function _0x2e7b30(_0x39f89b){_0x39f89b['done']?_0x4b66ce(_0x39f89b['value']):_0x3ebb65(_0x39f89b['value'])['then'](_0x2572b7,_0x284d89);}_0x2e7b30((_0x11fb52=_0x11fb52['apply'](_0x3bcaab,_0x1da9a4||[]))['next']());});};class ApiKeyService{constructor(_0x36413f){this['fetch']=_0x36413f,this['path']='api-key';}['create'](_0x52b68c,_0x4ee354,_0x507c43){return __awaiter$7(this,void 0,void 0,function*(){const _0x470816={'account_name':_0x52b68c,'api_key_name':_0x4ee354};try{const _0x1371bd=yield this['fetch']['post'](this['path'],_0x507c43,_0x470816);if(_0x1371bd['status']>0xc7&&_0x1371bd['status']<0x12c){const _0xf1638b=yield _0x1371bd['json']();return new SuccessfulApiKeyResponse(_0xf1638b);}const _0x4cb50=yield _0x1371bd['json']();return new FailedApiKeyResponse(_0x4cb50);}catch(_0x324958){if(_0x324958 instanceof Error)return new FailedApiKeyResponse({'detail':_0x324958['message'],'title':_0x324958['name'],'status':0x1f4,'instance':'','type':''});throw _0x324958;}});}['view'](_0x2f26c5,_0x42b39a,_0x110987){return __awaiter$7(this,void 0,void 0,function*(){const _0x1d29be=this['path']+'/'+_0x2f26c5+'/'+_0x42b39a;try{const _0xaa1489=yield this['fetch']['get'](_0x1d29be,_0x110987);if(_0xaa1489['status']>0xc7&&_0xaa1489['status']<0x12c){const _0x4ec258=yield _0xaa1489['json']();return new SuccessfulApiKeyValueResponse(_0x4ec258);}const _0x147cc6=yield _0xaa1489['json']();return new FailedApiKeyValueResponse(_0x147cc6);}catch(_0x2aae95){if(_0x2aae95 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x2aae95['message'],'title':_0x2aae95['name'],'status':0x1f4,'instance':'','type':''});throw _0x2aae95;}});}['delete'](_0x142b00,_0x678e46,_0x28b49c){return __awaiter$7(this,void 0,void 0,function*(){const _0x3edb96=this['path']+'/'+_0x142b00+'/'+_0x678e46;try{const _0x21369c=yield this['fetch']['delete'](_0x3edb96,_0x28b49c);if(_0x21369c['status']>0xc7&&_0x21369c['status']<0x12c)return new SuccessfulResponse({});const _0x1336a5=yield _0x21369c['json']();return new FailedResponse(_0x1336a5);}catch(_0x1ae9a5){if(_0x1ae9a5 instanceof Error)return new FailedResponse({'detail':_0x1ae9a5['message'],'title':_0x1ae9a5['name'],'status':0x1f4,'instance':'','type':''});throw _0x1ae9a5;}});}}
|
|
6
6
|
|
|
7
|
-
var __awaiter$6=undefined&&undefined['__awaiter']||function(
|
|
7
|
+
var __awaiter$6=undefined&&undefined['__awaiter']||function(_0x5cb041,_0x46f157,_0x38ac00,_0x1f6cb1){function _0x3946c5(_0x575957){return _0x575957 instanceof _0x38ac00?_0x575957:new _0x38ac00(function(_0x5a6c68){_0x5a6c68(_0x575957);});}return new(_0x38ac00||(_0x38ac00=Promise))(function(_0x3e7bdc,_0x3dbb37){function _0x2983ff(_0x2610c3){try{_0x410bb4(_0x1f6cb1['next'](_0x2610c3));}catch(_0x21f7d2){_0x3dbb37(_0x21f7d2);}}function _0x1c519a(_0x103662){try{_0x410bb4(_0x1f6cb1['throw'](_0x103662));}catch(_0x57c726){_0x3dbb37(_0x57c726);}}function _0x410bb4(_0x5efe0a){_0x5efe0a['done']?_0x3e7bdc(_0x5efe0a['value']):_0x3946c5(_0x5efe0a['value'])['then'](_0x2983ff,_0x1c519a);}_0x410bb4((_0x1f6cb1=_0x1f6cb1['apply'](_0x5cb041,_0x46f157||[]))['next']());});};class ListService{constructor(_0x47641c){this['fetch']=_0x47641c;}['create'](_0x112d93,_0x16b0a4,_0x149c95,_0x4cfe9b){return __awaiter$6(this,void 0,void 0,function*(){const _0x2b9f49='List',_0x252b76={'account_name':_0x112d93,'list_name':_0x16b0a4,'search_service_name':_0x149c95};try{const _0x138928=yield this['fetch']['post'](_0x2b9f49,_0x4cfe9b,_0x252b76);if(_0x138928['status']>0xc7&&_0x138928['status']<0x12c){const _0x45895d=yield _0x138928['json']();return new SuccessfulListIdentityResponse(_0x45895d);}const _0x35127f=yield _0x138928['json']();return new FailedListIdentityResponse(_0x35127f);}catch(_0x3e08b9){if(_0x3e08b9 instanceof Error)return new FailedListIdentityResponse({'detail':_0x3e08b9['message'],'title':_0x3e08b9['name'],'status':0x1f4,'instance':'','type':''});throw _0x3e08b9;}});}['delete'](_0x3c478d,_0x3c28fc,_0x3234ab){return __awaiter$6(this,void 0,void 0,function*(){const _0x4c5121='List/'+_0x3c478d+'/'+_0x3c28fc,_0x568135=yield this['fetch']['delete'](_0x4c5121,_0x3234ab);try{if(_0x568135['status']>0xc7&&_0x568135['status']<0x12c)return new SuccessfulResponse({});const _0x578413=yield _0x568135['json']();return new FailedResponse(_0x578413);}catch(_0x1163ba){if(_0x1163ba instanceof Error)return new FailedResponse({'detail':_0x1163ba['message'],'title':_0x1163ba['name'],'status':0x1f4,'instance':'','type':''});throw _0x1163ba;}});}['get'](_0x2ac288,_0x121a55,_0x274a05){return __awaiter$6(this,void 0,void 0,function*(){const _0x2997b4='List/'+_0x2ac288+'/'+_0x121a55;try{const _0x754b60=yield this['fetch']['get'](_0x2997b4,_0x274a05);if(_0x754b60['status']>0xc7&&_0x754b60['status']<0x12c){const _0x362276=yield _0x754b60['json']();return new SuccessfulListResponse(_0x362276);}const _0x4bdbc0=yield _0x754b60['json']();return new FailedListResponse(_0x4bdbc0);}catch(_0x4f7ba4){if(_0x4f7ba4 instanceof Error)return new FailedListResponse({'detail':_0x4f7ba4['message'],'title':_0x4f7ba4['name'],'status':0x1f4,'instance':'','type':''});throw _0x4f7ba4;}});}}
|
|
8
8
|
|
|
9
|
-
var __awaiter$5=undefined&&undefined['__awaiter']||function(
|
|
9
|
+
var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x8b64de,_0xfaee25,_0x2f1fdc,_0x36f570){function _0x46a7f8(_0xd0b3bf){return _0xd0b3bf instanceof _0x2f1fdc?_0xd0b3bf:new _0x2f1fdc(function(_0x54bbb5){_0x54bbb5(_0xd0b3bf);});}return new(_0x2f1fdc||(_0x2f1fdc=Promise))(function(_0x24ad66,_0x2f00bf){function _0x2e5194(_0x5b3ed0){try{_0x56b13d(_0x36f570['next'](_0x5b3ed0));}catch(_0x544ebc){_0x2f00bf(_0x544ebc);}}function _0x1d39ec(_0x60e51){try{_0x56b13d(_0x36f570['throw'](_0x60e51));}catch(_0x1b13b6){_0x2f00bf(_0x1b13b6);}}function _0x56b13d(_0x218585){_0x218585['done']?_0x24ad66(_0x218585['value']):_0x46a7f8(_0x218585['value'])['then'](_0x2e5194,_0x1d39ec);}_0x56b13d((_0x36f570=_0x36f570['apply'](_0x8b64de,_0xfaee25||[]))['next']());});};class Fetch{constructor(_0x495a0c){this['baseUri']=_0x495a0c,this['getUrl']=_0x5ad25c=>{return _0x5ad25c['startsWith']('/')&&(_0x5ad25c=_0x5ad25c['replace']('/','')),''+this['baseUri']+_0x5ad25c;},!_0x495a0c['endsWith']('/')&&(_0x495a0c=_0x495a0c+'/');}['get'](_0x49a06b,_0x1bd094){return __awaiter$5(this,void 0,void 0,function*(){const _0x4418a0=this['getUrl'](_0x49a06b);return yield fetch(_0x4418a0,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1bd094}});});}['post'](_0x12c436,_0x42a7b4,_0x477077){return __awaiter$5(this,void 0,void 0,function*(){const _0x27cce0=this['getUrl'](_0x12c436);return yield fetch(_0x27cce0,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x42a7b4},'body':_0x477077?JSON['stringify'](_0x477077):null});});}['PostNoAuth'](_0x2c3661,_0x4a0fd){return __awaiter$5(this,void 0,void 0,function*(){const _0x9ea24=this['getUrl'](_0x2c3661);return yield fetch(_0x9ea24,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0x4a0fd?JSON['stringify'](_0x4a0fd):null});});}['put'](_0x5db3fd,_0x470a53,_0x3bcd39){return __awaiter$5(this,void 0,void 0,function*(){const _0x5c2935=this['getUrl'](_0x5db3fd);return yield fetch(_0x5c2935,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x470a53},'body':_0x3bcd39?JSON['stringify'](_0x3bcd39):null});});}['delete'](_0xb690f9,_0x3a6f26){return __awaiter$5(this,void 0,void 0,function*(){const _0x37d828=this['getUrl'](_0xb690f9);return yield fetch(_0x37d828,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3a6f26}});});}}
|
|
10
10
|
|
|
11
|
-
var __awaiter$4=undefined&&undefined['__awaiter']||function(
|
|
11
|
+
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x1776ab,_0x12821c,_0x421d0b,_0x322012){function _0x722c5(_0x359c6d){return _0x359c6d instanceof _0x421d0b?_0x359c6d:new _0x421d0b(function(_0x1431c2){_0x1431c2(_0x359c6d);});}return new(_0x421d0b||(_0x421d0b=Promise))(function(_0x2593a6,_0x3b7711){function _0x1492b0(_0x55dba5){try{_0x5a83d0(_0x322012['next'](_0x55dba5));}catch(_0xe4fc6e){_0x3b7711(_0xe4fc6e);}}function _0x1049c6(_0x2e2fef){try{_0x5a83d0(_0x322012['throw'](_0x2e2fef));}catch(_0x193a76){_0x3b7711(_0x193a76);}}function _0x5a83d0(_0xa932f8){_0xa932f8['done']?_0x2593a6(_0xa932f8['value']):_0x722c5(_0xa932f8['value'])['then'](_0x1492b0,_0x1049c6);}_0x5a83d0((_0x322012=_0x322012['apply'](_0x1776ab,_0x12821c||[]))['next']());});};class SearchServersService{constructor(_0x253d9f){this['fetch']=_0x253d9f,this['path']='search-services';}['create'](_0x26f277,_0x102ff0,_0x1ad1c5,_0x2f699b,_0x31f3f2,_0x56fa3d,_0x46479d,_0x51f7e0){return __awaiter$4(this,void 0,void 0,function*(){const _0x5895a8={'account_name':_0x26f277,'search_service_name':_0x102ff0,'endpoint':_0x1ad1c5,'key':_0x2f699b,'country':_0x31f3f2,'provider':_0x56fa3d,'index_name':_0x46479d};try{const _0x2f50f5=yield this['fetch']['post'](this['path'],_0x51f7e0,_0x5895a8);if(_0x2f50f5['status']>0xc7&&_0x2f50f5['status']<0x12c){const _0x1b9cd7=yield _0x2f50f5['json']();return new SuccessfulSearchServiceResponse(_0x1b9cd7);}const _0x3ea3a0=yield _0x2f50f5['json']();return new FailedSearchServiceResponse(_0x3ea3a0);}catch(_0x53b770){if(_0x53b770 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x53b770['message'],'title':_0x53b770['name'],'status':0x1f4,'instance':'','type':''});throw _0x53b770;}});}['delete'](_0x20db18,_0x42eceb,_0xe97dfb){return __awaiter$4(this,void 0,void 0,function*(){const _0x2d61b7=this['path']+'/'+_0x20db18+'/'+_0x42eceb;try{const _0x4057d0=yield this['fetch']['delete'](_0x2d61b7,_0xe97dfb);if(_0x4057d0['status']>0xc7&&_0x4057d0['status']<0x12c)return new SuccessfulResponse({});const _0x1b4516=yield _0x4057d0['json']();return new FailedResponse(_0x1b4516);}catch(_0x4e9227){if(_0x4e9227 instanceof Error)return new FailedResponse({'detail':_0x4e9227['message'],'title':_0x4e9227['name'],'status':0x1f4,'instance':'','type':''});throw _0x4e9227;}});}['view'](_0x3451e0,_0x36a95b,_0x1f3163){return __awaiter$4(this,void 0,void 0,function*(){const _0x313b8b=this['path']+'/'+_0x3451e0+'/'+_0x36a95b;try{const _0x423bc9=yield this['fetch']['get'](_0x313b8b,_0x1f3163);if(_0x423bc9['status']>0xc7&&_0x423bc9['status']<0x12c){const _0xdff10b=yield _0x423bc9['json']();return new SuccessfulViewSearchServiceResponse(_0xdff10b);}const _0x4cc702=yield _0x423bc9['json']();return new FailedViewSearchServiceResponse(_0x4cc702);}catch(_0x364283){if(_0x364283 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x364283['message'],'title':_0x364283['name'],'status':0x1f4,'instance':'','type':''});throw _0x364283;}});}['edit'](_0x70bac1,_0xbcdf75,_0xf30f21,_0x4a1625,_0x5de3e7){return __awaiter$4(this,void 0,void 0,function*(){const _0x3a7ff9={'account_name':_0x70bac1,'search_service_name':_0xbcdf75,'key':_0xf30f21,'country':_0x4a1625};try{const _0xa74ecc=yield this['fetch']['put'](this['path'],_0x5de3e7,_0x3a7ff9);if(_0xa74ecc['status']>0xc7&&_0xa74ecc['status']<0x12c){const _0x5da00e=yield _0xa74ecc['json']();return new SuccessfulSearchServiceResponse(_0x5da00e);}const _0x4f4288=yield _0xa74ecc['json']();return new FailedSearchServiceResponse(_0x4f4288);}catch(_0x1996f4){if(_0x1996f4 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x1996f4['message'],'title':_0x1996f4['name'],'status':0x1f4,'instance':'','type':''});throw _0x1996f4;}});}['list'](_0x5a00a4,_0x2afd75){return __awaiter$4(this,void 0,void 0,function*(){const _0x42da65=this['path']+'/'+_0x5a00a4;try{const _0x59e3d0=yield this['fetch']['get'](_0x42da65,_0x2afd75);if(_0x59e3d0['status']>0xc7&&_0x59e3d0['status']<0x12c){const _0x47c96b=yield _0x59e3d0['json']();return new SuccessfulListSearchServiceResponse(_0x47c96b);}const _0x35d321=yield _0x59e3d0['json']();return new FailedViewSearchServicesResponse(_0x35d321);}catch(_0x5649c8){if(_0x5649c8 instanceof Error)return new FailedViewSearchServicesResponse({'detail':_0x5649c8['message'],'title':_0x5649c8['name'],'status':0x1f4,'instance':'','type':''});throw _0x5649c8;}});}}
|
|
12
12
|
|
|
13
|
-
var __awaiter$3=undefined&&undefined['__awaiter']||function(
|
|
13
|
+
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x9759f1,_0x343749,_0x387b2b,_0x707ce1){function _0x1e6b7f(_0x319933){return _0x319933 instanceof _0x387b2b?_0x319933:new _0x387b2b(function(_0x741e0f){_0x741e0f(_0x319933);});}return new(_0x387b2b||(_0x387b2b=Promise))(function(_0x286d9c,_0x4ef3a7){function _0x400a8d(_0x10cd2c){try{_0x5b5bb6(_0x707ce1['next'](_0x10cd2c));}catch(_0x29eebb){_0x4ef3a7(_0x29eebb);}}function _0x4a1563(_0x37b1dc){try{_0x5b5bb6(_0x707ce1['throw'](_0x37b1dc));}catch(_0x747dc4){_0x4ef3a7(_0x747dc4);}}function _0x5b5bb6(_0xfd3f30){_0xfd3f30['done']?_0x286d9c(_0xfd3f30['value']):_0x1e6b7f(_0xfd3f30['value'])['then'](_0x400a8d,_0x4a1563);}_0x5b5bb6((_0x707ce1=_0x707ce1['apply'](_0x9759f1,_0x343749||[]))['next']());});};class FacetService{constructor(_0x1374f5){this['fetch']=_0x1374f5,this['path']='facet';}['create'](_0x1c1e58,_0x43d6e3,_0x16e600,_0x14d6b2){return __awaiter$3(this,void 0,void 0,function*(){const _0x37e66c={'account_name':_0x1c1e58,'list_name':_0x43d6e3,'facet_name':_0x16e600};try{const _0x443c99=yield this['fetch']['post'](this['path'],_0x14d6b2,_0x37e66c);if(_0x443c99['status']>0xc7&&_0x443c99['status']<0x12c){const _0x2ca4e4=yield _0x443c99['json']();return new SuccessfulFacetResponse(_0x2ca4e4);}const _0x18fc25=yield _0x443c99['json']();return new FailedFacetResponse(_0x18fc25);}catch(_0x53b8ce){if(_0x53b8ce instanceof Error)return new FailedFacetResponse({'detail':_0x53b8ce['message'],'title':_0x53b8ce['name'],'status':0x1f4,'instance':'','type':''});throw _0x53b8ce;}});}['remove'](_0x568f5d,_0x489b68,_0x454ec4,_0x149edb){return __awaiter$3(this,void 0,void 0,function*(){const _0x2f0367='Facet/'+_0x568f5d+'/'+_0x489b68+'/'+_0x454ec4,_0x2dc6b9=yield this['fetch']['delete'](_0x2f0367,_0x149edb);try{if(_0x2dc6b9['status']>0xc7&&_0x2dc6b9['status']<0x12c)return new SuccessfulResponse({});const _0x456ae4=yield _0x2dc6b9['json']();return new FailedResponse(_0x456ae4);}catch(_0x1cc77f){if(_0x1cc77f instanceof Error)return new FailedResponse({'detail':_0x1cc77f['message'],'title':_0x1cc77f['name'],'status':0x1f4,'instance':'','type':''});throw _0x1cc77f;}});}['rename'](_0x3a6397,_0x35d4af,_0x5516b6,_0x5768d7,_0x515013){return __awaiter$3(this,void 0,void 0,function*(){const _0x34f562={'account_name':_0x3a6397,'list_name':_0x35d4af,'facet_name':_0x5516b6,'new_facet_name':_0x5768d7};try{const _0x5a8327=yield this['fetch']['put'](this['path'],_0x515013,_0x34f562);if(_0x5a8327['status']>0xc7&&_0x5a8327['status']<0x12c){const _0x4fe310=yield _0x5a8327['json']();return new SuccessfulFacetResponse(_0x4fe310);}const _0x4964df=yield _0x5a8327['json']();return new FailedFacetResponse(_0x4964df);}catch(_0x45878d){if(_0x45878d instanceof Error)return new FailedFacetResponse({'detail':_0x45878d['message'],'title':_0x45878d['name'],'status':0x1f4,'instance':'','type':''});throw _0x45878d;}});}}
|
|
14
14
|
|
|
15
|
-
var __awaiter$2=undefined&&undefined['__awaiter']||function(
|
|
15
|
+
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x2fed19,_0x3fe17c,_0x2ebdf9,_0xab993d){function _0x400712(_0x2b4ba9){return _0x2b4ba9 instanceof _0x2ebdf9?_0x2b4ba9:new _0x2ebdf9(function(_0x4d81c2){_0x4d81c2(_0x2b4ba9);});}return new(_0x2ebdf9||(_0x2ebdf9=Promise))(function(_0x453b91,_0x420f7d){function _0x5b02b7(_0x409492){try{_0x29ea20(_0xab993d['next'](_0x409492));}catch(_0x22d8c6){_0x420f7d(_0x22d8c6);}}function _0x509077(_0x271445){try{_0x29ea20(_0xab993d['throw'](_0x271445));}catch(_0x48ebf8){_0x420f7d(_0x48ebf8);}}function _0x29ea20(_0x358ea6){_0x358ea6['done']?_0x453b91(_0x358ea6['value']):_0x400712(_0x358ea6['value'])['then'](_0x5b02b7,_0x509077);}_0x29ea20((_0xab993d=_0xab993d['apply'](_0x2fed19,_0x3fe17c||[]))['next']());});};class SearchResultService{constructor(_0x39f673){this['fetch']=_0x39f673,this['path']='search-result';}['create'](_0x26a629,_0x3655a8,_0x2bd335,_0x2d3c48,_0x355c13){return __awaiter$2(this,void 0,void 0,function*(){_0x355c13=_0x355c13!==null&&_0x355c13!==void 0?_0x355c13:{'description':'','keywords':'','resource_1':'','resource_2':'','resource_3':'','latitude':0x0,'longitude':0x0,'facets':[]};const _0x2dd7d3=Object['assign']({'account_name':_0x26a629,'search_result_name':_0x2bd335,'list_name':_0x3655a8},_0x355c13);try{const _0x47233a=yield this['fetch']['post'](this['path'],_0x2d3c48,_0x2dd7d3);if(_0x47233a['status']>0xc7&&_0x47233a['status']<0x12c){const _0x3c1477=yield _0x47233a['json']();return new SuccessfulViewSearchResultResponse(_0x3c1477);}const _0x547758=yield _0x47233a['json']();return new FailedSearchResultResponse(_0x547758);}catch(_0x7b84a8){if(_0x7b84a8 instanceof Error)return new FailedSearchResultResponse({'detail':_0x7b84a8['message'],'title':_0x7b84a8['name'],'status':0x1f4,'instance':'','type':''});throw _0x7b84a8;}});}['transfer'](_0x2f4630,_0x17c4e3,_0x17aec3,_0x5a1894){return __awaiter$2(this,void 0,void 0,function*(){const _0x571806={'account_name':_0x2f4630,'list_name':_0x17c4e3,'new_search_service_name':_0x17aec3};try{const _0xe44ee9=yield this['fetch']['post'](this['path']+'/transfer',_0x5a1894,_0x571806);if(_0xe44ee9['status']>0xc7&&_0xe44ee9['status']<0x12c){const _0x2e00e8=yield _0xe44ee9['json']();return new SuccessfulListResponse(_0x2e00e8);}const _0x4c6e19=yield _0xe44ee9['json']();return new FailedListResponse(_0x4c6e19);}catch(_0x37e07f){if(_0x37e07f instanceof Error)return new FailedListResponse({'detail':_0x37e07f['message'],'title':_0x37e07f['name'],'status':0x1f4,'instance':'','type':''});throw _0x37e07f;}});}['list'](_0x40fda0,_0x59dc9a,_0x2f771c,_0x4b96ca){return __awaiter$2(this,void 0,void 0,function*(){let _0x25f3a7=this['path']+'/'+_0x40fda0+'/'+_0x59dc9a;const _0x2583df=[];(_0x4b96ca===null||_0x4b96ca===void 0?void 0:_0x4b96ca['size'])&&_0x2583df['push']('size='+_0x4b96ca['size']);(_0x4b96ca===null||_0x4b96ca===void 0?void 0:_0x4b96ca['skip'])&&_0x2583df['push']('skip='+_0x4b96ca['skip']);(_0x4b96ca===null||_0x4b96ca===void 0?void 0:_0x4b96ca['query'])&&_0x2583df['push']('query='+_0x4b96ca['query']);(_0x4b96ca===null||_0x4b96ca===void 0?void 0:_0x4b96ca['filter'])&&_0x2583df['push']('filter='+_0x4b96ca['filter']);(_0x4b96ca===null||_0x4b96ca===void 0?void 0:_0x4b96ca['radius'])&&_0x2583df['push']('radius='+_0x4b96ca['radius']);_0x2583df['length']>0x0&&_0x2583df['forEach']((_0x468a9d,_0x2dda24)=>{_0x2dda24===0x0?_0x25f3a7+='?':_0x25f3a7+='&',_0x25f3a7+=_0x468a9d;});try{const _0x2914b7=yield this['fetch']['get'](_0x25f3a7,_0x2f771c);if(_0x2914b7['status']>0xc7&&_0x2914b7['status']<0x12c){const _0xdd339c=yield _0x2914b7['json']();return new SuccessfulListSearchResultResponse(_0xdd339c);}const _0x1deaf7=yield _0x2914b7['json']();return new FailedViewSearchResultResponse(_0x1deaf7);}catch(_0x31f32a){if(_0x31f32a instanceof Error)return new FailedViewSearchResultResponse({'detail':_0x31f32a['message'],'title':_0x31f32a['name'],'status':0x1f4,'instance':'','type':''});throw _0x31f32a;}});}}
|
|
16
16
|
|
|
17
|
-
var __awaiter$1=undefined&&undefined['__awaiter']||function(
|
|
17
|
+
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x14f6ad,_0x12e853,_0x94250c,_0x239d8c){function _0xef8ced(_0x148e60){return _0x148e60 instanceof _0x94250c?_0x148e60:new _0x94250c(function(_0x40e118){_0x40e118(_0x148e60);});}return new(_0x94250c||(_0x94250c=Promise))(function(_0x465509,_0x1d1696){function _0x75456b(_0x2a2399){try{_0x35f304(_0x239d8c['next'](_0x2a2399));}catch(_0x41aac3){_0x1d1696(_0x41aac3);}}function _0x151289(_0x36bf0a){try{_0x35f304(_0x239d8c['throw'](_0x36bf0a));}catch(_0x228adf){_0x1d1696(_0x228adf);}}function _0x35f304(_0x23ed94){_0x23ed94['done']?_0x465509(_0x23ed94['value']):_0xef8ced(_0x23ed94['value'])['then'](_0x75456b,_0x151289);}_0x35f304((_0x239d8c=_0x239d8c['apply'](_0x14f6ad,_0x12e853||[]))['next']());});};class ContributorService{constructor(_0x4918c4){this['fetch']=_0x4918c4,this['path']='contributor';}['create'](_0x56d55d,_0x19ddcb,_0x24de78,_0x18be49){return __awaiter$1(this,void 0,void 0,function*(){const _0x580244={'account_name':_0x56d55d,'list_name':_0x19ddcb,'contributor_name':_0x24de78};try{const _0x290116=yield this['fetch']['post'](this['path'],_0x18be49,_0x580244);if(_0x290116['status']>0xc7&&_0x290116['status']<0x12c){const _0x1a4697=yield _0x290116['json']();return new SuccessfulContributorResponse(_0x1a4697);}const _0x266146=yield _0x290116['json']();return new FailedContributorResponse(_0x266146);}catch(_0x297315){if(_0x297315 instanceof Error)return new FailedContributorResponse({'detail':_0x297315['message'],'title':_0x297315['name'],'status':0x1f4,'instance':'','type':''});throw _0x297315;}});}['remove'](_0x5104ab,_0x421ad2,_0x9003e5,_0x207034){return __awaiter$1(this,void 0,void 0,function*(){const _0x22113b=this['path']+'/'+_0x5104ab+'/'+_0x421ad2+'/'+_0x9003e5,_0x8bdb8d=yield this['fetch']['delete'](_0x22113b,_0x207034);try{if(_0x8bdb8d['status']>0xc7&&_0x8bdb8d['status']<0x12c)return new SuccessfulResponse({});const _0x1fda52=yield _0x8bdb8d['json']();return new FailedResponse(_0x1fda52);}catch(_0x42736d){if(_0x42736d instanceof Error)return new FailedResponse({'detail':_0x42736d['message'],'title':_0x42736d['name'],'status':0x1f4,'instance':'','type':''});throw _0x42736d;}});}['startsWith'](_0x37c971,_0x474190){return __awaiter$1(this,void 0,void 0,function*(){const _0x34613f=this['path']+'/'+_0x37c971;try{const _0x203b79=yield this['fetch']['get'](_0x34613f,_0x474190);if(_0x203b79['status']>0xc7&&_0x203b79['status']<0x12c){const _0x244781=yield _0x203b79['json']();return new SuccessfulAccountAndImageResponse(_0x244781);}const _0x334708=yield _0x203b79['json']();return new FailedAccountAndImageResponse(_0x334708);}catch(_0x17ea00){if(_0x17ea00 instanceof Error)return new FailedAccountAndImageResponse({'detail':_0x17ea00['message'],'title':_0x17ea00['name'],'status':0x1f4,'instance':'','type':''});throw _0x17ea00;}});}}
|
|
18
18
|
|
|
19
|
-
var __awaiter=undefined&&undefined['__awaiter']||function(
|
|
19
|
+
var __awaiter=undefined&&undefined['__awaiter']||function(_0x18c75d,_0x502c77,_0x5c5ebb,_0x5703b3){function _0x6cb778(_0x31d7c8){return _0x31d7c8 instanceof _0x5c5ebb?_0x31d7c8:new _0x5c5ebb(function(_0x348420){_0x348420(_0x31d7c8);});}return new(_0x5c5ebb||(_0x5c5ebb=Promise))(function(_0x76fb60,_0x37b19e){function _0x4afac9(_0x180b41){try{_0x5e7021(_0x5703b3['next'](_0x180b41));}catch(_0x322088){_0x37b19e(_0x322088);}}function _0x48bc20(_0x5c5e17){try{_0x5e7021(_0x5703b3['throw'](_0x5c5e17));}catch(_0xfb944a){_0x37b19e(_0xfb944a);}}function _0x5e7021(_0x9d4a33){_0x9d4a33['done']?_0x76fb60(_0x9d4a33['value']):_0x6cb778(_0x9d4a33['value'])['then'](_0x4afac9,_0x48bc20);}_0x5e7021((_0x5703b3=_0x5703b3['apply'](_0x18c75d,_0x502c77||[]))['next']());});};class AdminClient{constructor(_0x47c13f='https://admin.searchability.dev/'){var _0x548c41=new Fetch(_0x47c13f);this['Accounts']=new AccountService(_0x548c41),this['Lists']=new ListService(_0x548c41),this['ApiKeys']=new ApiKeyService(_0x548c41),this['SearchServers']=new SearchServersService(_0x548c41),this['Facets']=new FacetService(_0x548c41),this['SearchResults']=new SearchResultService(_0x548c41),this['Contributors']=new ContributorService(_0x548c41);}}class AuthClient{constructor(_0x4896aa='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x4896aa);}['login'](_0x352d51){return __awaiter(this,void 0,void 0,function*(){const _0x446e1a='login/'+_0x352d51;try{const _0x5c7807=yield yield fetch(_0x446e1a);if(_0x5c7807['status']>0xc7&&_0x5c7807['status']<0x12c){const _0x27990c=yield _0x5c7807['json']();return new SuccessfulAuthResponse(_0x27990c);}const _0x3f22da=yield _0x5c7807['json']();return new FailedAuthResponse(_0x3f22da);}catch(_0xf48c46){if(_0xf48c46 instanceof Error)return new FailedAuthResponse({'detail':_0xf48c46['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0xf48c46;}});}['refresh'](_0x3f1132){return __awaiter(this,void 0,void 0,function*(){const _0x51eaba='refresh',_0x2d3d5a={'refresh_token':_0x3f1132};try{const _0x283c5b=yield this['fetch']['PostNoAuth'](_0x51eaba,_0x2d3d5a);if(_0x283c5b['status']>0xc7&&_0x283c5b['status']<0x12c){const _0x580778=yield _0x283c5b['json']();return new SuccessfulAuthResponse(_0x580778);}const _0x299b70=yield _0x283c5b['json']();return new FailedAuthResponse(_0x299b70);}catch(_0x10adeb){if(_0x10adeb instanceof Error)return new FailedAuthResponse({'detail':_0x10adeb['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x10adeb;}});}['getTokenStatus'](_0x490f14){if(Date['now']()<_0x490f14['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x490f14['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
|
|
20
20
|
|
|
21
21
|
export { AdminClient, AuthClient, TokenStatus, Tokens };
|
package/dist/types.d.ts
CHANGED
|
@@ -212,6 +212,8 @@ type ListSearchResultOptions = {
|
|
|
212
212
|
size?: number;
|
|
213
213
|
skip?: number;
|
|
214
214
|
query?: string;
|
|
215
|
+
filter?: string;
|
|
216
|
+
radius?: string;
|
|
215
217
|
};
|
|
216
218
|
declare class SuccessfulContributorResponse extends Response<Contributor, Problem> {
|
|
217
219
|
readonly contributor: Contributor;
|
package/package.json
CHANGED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
var TokenStatus;(function(_0x49ee63){_0x49ee63[_0x49ee63['Ok']=0x0]='Ok',_0x49ee63[_0x49ee63['Refresh']=0x1]='Refresh',_0x49ee63[_0x49ee63['Expired']=0x2]='Expired';}(TokenStatus||(TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}}class Response{constructor(_0x512f3d){this['isSuccess']=_0x512f3d;}}class SuccessfulContributorResponse extends Response{constructor(_0x2a3d32){super(!![]),this['contributor']=_0x2a3d32;}['toSuccess'](){return this['contributor'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedContributorResponse extends Response{constructor(_0x294c21){super(![]),this['problem']=_0x294c21;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountAndImageResponse extends Response{constructor(_0x3214a9){super(!![]),this['accountAndImages']=_0x3214a9;}['toSuccess'](){return this['accountAndImages'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountAndImageResponse extends Response{constructor(_0x50604d){super(![]),this['problem']=_0x50604d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulFacetResponse extends Response{constructor(_0x4f0880){super(!![]),this['facet']=_0x4f0880;}['toSuccess'](){return this['facet'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetResponse extends Response{constructor(_0x56dff8){super(![]),this['problem']=_0x56dff8;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountResponse extends Response{constructor(_0x2b2be4){super(!![]),this['account']=_0x2b2be4;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountImageResponse extends Response{constructor(_0x59d98){super(!![]),this['accountImage']=_0x59d98;}['toSuccess'](){return this['accountImage'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListIdentityResponse extends Response{constructor(_0x5c22d0){super(!![]),this['list']=_0x5c22d0;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListResponse extends Response{constructor(_0x5d9d8f){super(!![]),this['list']=_0x5d9d8f;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x386de4){super(![]),this['problem']=_0x386de4;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountImageResponse extends Response{constructor(_0x5d16ab){super(![]),this['problem']=_0x5d16ab;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListIdentityResponse extends Response{constructor(_0x500440){super(![]),this['problem']=_0x500440;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListResponse extends Response{constructor(_0x4cd20b){super(![]),this['problem']=_0x4cd20b;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x443cc0){super(!![]),this['tokens']=_0x443cc0;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x4509b0){super(![]),this['problem']=_0x4509b0;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x3065cb){super(!![]),this['apiKey']=_0x3065cb;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x1cf612){super(![]),this['problem']=_0x1cf612;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x5945a7){super(!![]),this['searchService']=_0x5945a7;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0xe0d12b){super(![]),this['problem']=_0xe0d12b;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x387628){super(!![]),this['searchService']=_0x387628;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulViewSearchResultResponse extends Response{constructor(_0x2ca0b1){super(!![]),this['searchResult']=_0x2ca0b1;}['toSuccess'](){return this['searchResult'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchResultResponse extends Response{constructor(_0x41f388){super(![]),this['problem']=_0x41f388;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchResultResponse extends Response{constructor(_0xefe137){super(!![]),this['searchResults']=_0xefe137;}['toSuccess'](){return this['searchResults'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchResultResponse extends Response{constructor(_0x206c44){super(![]),this['problem']=_0x206c44;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchServiceResponse extends Response{constructor(_0x1f7e39){super(!![]),this['searchServices']=_0x1f7e39;}['toSuccess'](){return this['searchServices'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServicesResponse extends Response{constructor(_0x4c65fb){super(![]),this['problem']=_0x4c65fb;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedViewSearchServiceResponse extends Response{constructor(_0x3a18f2){super(![]),this['problem']=_0x3a18f2;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x240975){super(!![]),this['apiKeyValue']=_0x240975;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x3d40da){super(!![]),this['obj']=_0x3d40da;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x363cd3){super(![]),this['problem']=_0x363cd3;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x5c4e71){super(![]),this['problem']=_0x5c4e71;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
|
|
2
|
-
|
|
3
|
-
var __awaiter$8=undefined&&undefined['__awaiter']||function(_0x364917,_0x1a58f4,_0x28ec65,_0x43c674){function _0x411605(_0x5a6665){return _0x5a6665 instanceof _0x28ec65?_0x5a6665:new _0x28ec65(function(_0x5929ec){_0x5929ec(_0x5a6665);});}return new(_0x28ec65||(_0x28ec65=Promise))(function(_0x4395a4,_0x405f74){function _0x26f3bb(_0x43bcb8){try{_0x42fd57(_0x43c674['next'](_0x43bcb8));}catch(_0x2eadf5){_0x405f74(_0x2eadf5);}}function _0x2226df(_0x33ce6f){try{_0x42fd57(_0x43c674['throw'](_0x33ce6f));}catch(_0x306763){_0x405f74(_0x306763);}}function _0x42fd57(_0x36fc0d){_0x36fc0d['done']?_0x4395a4(_0x36fc0d['value']):_0x411605(_0x36fc0d['value'])['then'](_0x26f3bb,_0x2226df);}_0x42fd57((_0x43c674=_0x43c674['apply'](_0x364917,_0x1a58f4||[]))['next']());});};class AccountService{constructor(_0x3df75b){this['fetch']=_0x3df75b;}['get'](_0x4ed3fe,_0x208f4b){return __awaiter$8(this,void 0,void 0,function*(){const _0x5ec91c='Account/'+_0x4ed3fe+'/',_0x5ab7b2=yield this['fetch']['get'](_0x5ec91c,_0x208f4b);try{if(_0x5ab7b2['status']>0xc7&&_0x5ab7b2['status']<0x12c){const _0x264475=yield _0x5ab7b2['json']();return new SuccessfulAccountResponse(_0x264475);}const _0x49639b=yield _0x5ab7b2['json']();return new FailedAccountResponse(_0x49639b);}catch(_0xd41f2d){if(_0xd41f2d instanceof Error)return new FailedAccountResponse({'detail':_0xd41f2d['message'],'title':_0xd41f2d['name'],'status':0x1f4,'instance':'','type':''});throw _0xd41f2d;}});}['getImage'](_0x550aa2,_0x126517){return __awaiter$8(this,void 0,void 0,function*(){const _0x225c02='account/image/'+_0x550aa2+'/',_0x3416aa=yield this['fetch']['get'](_0x225c02,_0x126517);try{if(_0x3416aa['status']>0xc7&&_0x3416aa['status']<0x12c){const _0x5ce1ac=yield _0x3416aa['json']();return new SuccessfulAccountImageResponse(_0x5ce1ac);}const _0x20381f=yield _0x3416aa['json']();return new FailedAccountImageResponse(_0x20381f);}catch(_0x208299){if(_0x208299 instanceof Error)return new FailedAccountImageResponse({'detail':_0x208299['message'],'title':_0x208299['name'],'status':0x1f4,'instance':'','type':''});throw _0x208299;}});}}
|
|
4
|
-
|
|
5
|
-
var __awaiter$7=undefined&&undefined['__awaiter']||function(_0x208e39,_0x245b73,_0x33707c,_0x277714){function _0x3a15ad(_0x11faec){return _0x11faec instanceof _0x33707c?_0x11faec:new _0x33707c(function(_0x42480b){_0x42480b(_0x11faec);});}return new(_0x33707c||(_0x33707c=Promise))(function(_0xc6a12f,_0xc758cd){function _0x53c1df(_0x2d851e){try{_0x4aebe8(_0x277714['next'](_0x2d851e));}catch(_0x1278e6){_0xc758cd(_0x1278e6);}}function _0x531fa7(_0x511cb3){try{_0x4aebe8(_0x277714['throw'](_0x511cb3));}catch(_0x740560){_0xc758cd(_0x740560);}}function _0x4aebe8(_0x7ba385){_0x7ba385['done']?_0xc6a12f(_0x7ba385['value']):_0x3a15ad(_0x7ba385['value'])['then'](_0x53c1df,_0x531fa7);}_0x4aebe8((_0x277714=_0x277714['apply'](_0x208e39,_0x245b73||[]))['next']());});};class ApiKeyService{constructor(_0x33467f){this['fetch']=_0x33467f,this['path']='api-key';}['create'](_0x28f7be,_0x7e7372,_0x3c5c33){return __awaiter$7(this,void 0,void 0,function*(){const _0xba4109={'account_name':_0x28f7be,'api_key_name':_0x7e7372};try{const _0x83ceba=yield this['fetch']['post'](this['path'],_0x3c5c33,_0xba4109);if(_0x83ceba['status']>0xc7&&_0x83ceba['status']<0x12c){const _0x549a81=yield _0x83ceba['json']();return new SuccessfulApiKeyResponse(_0x549a81);}const _0x290b32=yield _0x83ceba['json']();return new FailedApiKeyResponse(_0x290b32);}catch(_0x706605){if(_0x706605 instanceof Error)return new FailedApiKeyResponse({'detail':_0x706605['message'],'title':_0x706605['name'],'status':0x1f4,'instance':'','type':''});throw _0x706605;}});}['view'](_0x504041,_0x4c8332,_0x2b639d){return __awaiter$7(this,void 0,void 0,function*(){const _0x37679e=this['path']+'/'+_0x504041+'/'+_0x4c8332;try{const _0x1e3bc6=yield this['fetch']['get'](_0x37679e,_0x2b639d);if(_0x1e3bc6['status']>0xc7&&_0x1e3bc6['status']<0x12c){const _0x4ee790=yield _0x1e3bc6['json']();return new SuccessfulApiKeyValueResponse(_0x4ee790);}const _0x5994f5=yield _0x1e3bc6['json']();return new FailedApiKeyValueResponse(_0x5994f5);}catch(_0x112fd3){if(_0x112fd3 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x112fd3['message'],'title':_0x112fd3['name'],'status':0x1f4,'instance':'','type':''});throw _0x112fd3;}});}['delete'](_0x2e97db,_0x45761f,_0x23d6c7){return __awaiter$7(this,void 0,void 0,function*(){const _0x1bd89b=this['path']+'/'+_0x2e97db+'/'+_0x45761f;try{const _0x3220d5=yield this['fetch']['delete'](_0x1bd89b,_0x23d6c7);if(_0x3220d5['status']>0xc7&&_0x3220d5['status']<0x12c)return new SuccessfulResponse({});const _0x34afc7=yield _0x3220d5['json']();return new FailedResponse(_0x34afc7);}catch(_0x3a547d){if(_0x3a547d instanceof Error)return new FailedResponse({'detail':_0x3a547d['message'],'title':_0x3a547d['name'],'status':0x1f4,'instance':'','type':''});throw _0x3a547d;}});}}
|
|
6
|
-
|
|
7
|
-
var __awaiter$6=undefined&&undefined['__awaiter']||function(_0x2c4271,_0x4bf633,_0x3264a4,_0xd1067a){function _0x293cfe(_0x391953){return _0x391953 instanceof _0x3264a4?_0x391953:new _0x3264a4(function(_0xf1ad03){_0xf1ad03(_0x391953);});}return new(_0x3264a4||(_0x3264a4=Promise))(function(_0x20a4e4,_0x2b80f5){function _0x5695e5(_0x219080){try{_0x448c7a(_0xd1067a['next'](_0x219080));}catch(_0x2d8b15){_0x2b80f5(_0x2d8b15);}}function _0x4ce01e(_0x33869d){try{_0x448c7a(_0xd1067a['throw'](_0x33869d));}catch(_0x13f0ef){_0x2b80f5(_0x13f0ef);}}function _0x448c7a(_0x213525){_0x213525['done']?_0x20a4e4(_0x213525['value']):_0x293cfe(_0x213525['value'])['then'](_0x5695e5,_0x4ce01e);}_0x448c7a((_0xd1067a=_0xd1067a['apply'](_0x2c4271,_0x4bf633||[]))['next']());});};class ListService{constructor(_0x41b8d0){this['fetch']=_0x41b8d0;}['create'](_0x47fae6,_0x52ce55,_0x4a840d,_0x481631){return __awaiter$6(this,void 0,void 0,function*(){const _0xd4246c='List',_0x1ba034={'account_name':_0x47fae6,'list_name':_0x52ce55,'search_service_name':_0x4a840d};try{const _0x46e675=yield this['fetch']['post'](_0xd4246c,_0x481631,_0x1ba034);if(_0x46e675['status']>0xc7&&_0x46e675['status']<0x12c){const _0x23c233=yield _0x46e675['json']();return new SuccessfulListIdentityResponse(_0x23c233);}const _0x33ec1e=yield _0x46e675['json']();return new FailedListIdentityResponse(_0x33ec1e);}catch(_0x41636d){if(_0x41636d instanceof Error)return new FailedListIdentityResponse({'detail':_0x41636d['message'],'title':_0x41636d['name'],'status':0x1f4,'instance':'','type':''});throw _0x41636d;}});}['delete'](_0x3b9846,_0x19595b,_0x18960a){return __awaiter$6(this,void 0,void 0,function*(){const _0x3b604e='List/'+_0x3b9846+'/'+_0x19595b,_0x26d7b1=yield this['fetch']['delete'](_0x3b604e,_0x18960a);try{if(_0x26d7b1['status']>0xc7&&_0x26d7b1['status']<0x12c)return new SuccessfulResponse({});const _0x4fc52d=yield _0x26d7b1['json']();return new FailedResponse(_0x4fc52d);}catch(_0x5623c8){if(_0x5623c8 instanceof Error)return new FailedResponse({'detail':_0x5623c8['message'],'title':_0x5623c8['name'],'status':0x1f4,'instance':'','type':''});throw _0x5623c8;}});}['get'](_0x54b8c4,_0x3f71ad,_0x3193ca){return __awaiter$6(this,void 0,void 0,function*(){const _0x3fefa3='List/'+_0x54b8c4+'/'+_0x3f71ad;try{const _0x1a01cf=yield this['fetch']['get'](_0x3fefa3,_0x3193ca);if(_0x1a01cf['status']>0xc7&&_0x1a01cf['status']<0x12c){const _0x2dba01=yield _0x1a01cf['json']();return new SuccessfulListResponse(_0x2dba01);}const _0x2a4b15=yield _0x1a01cf['json']();return new FailedListResponse(_0x2a4b15);}catch(_0x2e93a7){if(_0x2e93a7 instanceof Error)return new FailedListResponse({'detail':_0x2e93a7['message'],'title':_0x2e93a7['name'],'status':0x1f4,'instance':'','type':''});throw _0x2e93a7;}});}}
|
|
8
|
-
|
|
9
|
-
var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x46a99f,_0xda8ed6,_0x1000ae,_0x5514dd){function _0x4afccc(_0x593bbe){return _0x593bbe instanceof _0x1000ae?_0x593bbe:new _0x1000ae(function(_0x50649f){_0x50649f(_0x593bbe);});}return new(_0x1000ae||(_0x1000ae=Promise))(function(_0x3e145a,_0x50c332){function _0x417b72(_0x5ada5a){try{_0x5b5f9f(_0x5514dd['next'](_0x5ada5a));}catch(_0x2b2a06){_0x50c332(_0x2b2a06);}}function _0x252a39(_0x530227){try{_0x5b5f9f(_0x5514dd['throw'](_0x530227));}catch(_0x2a54fc){_0x50c332(_0x2a54fc);}}function _0x5b5f9f(_0x4888b6){_0x4888b6['done']?_0x3e145a(_0x4888b6['value']):_0x4afccc(_0x4888b6['value'])['then'](_0x417b72,_0x252a39);}_0x5b5f9f((_0x5514dd=_0x5514dd['apply'](_0x46a99f,_0xda8ed6||[]))['next']());});};class Fetch{constructor(_0x595a0b){this['baseUri']=_0x595a0b,this['getUrl']=_0x5245b1=>{return _0x5245b1['startsWith']('/')&&(_0x5245b1=_0x5245b1['replace']('/','')),''+this['baseUri']+_0x5245b1;},!_0x595a0b['endsWith']('/')&&(_0x595a0b=_0x595a0b+'/');}['get'](_0x3c5018,_0x4f2b07){return __awaiter$5(this,void 0,void 0,function*(){const _0x3df70a=this['getUrl'](_0x3c5018);return yield fetch(_0x3df70a,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4f2b07}});});}['post'](_0x1fb7a1,_0x18876e,_0x5310c0){return __awaiter$5(this,void 0,void 0,function*(){const _0x2cfede=this['getUrl'](_0x1fb7a1);return yield fetch(_0x2cfede,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x18876e},'body':_0x5310c0?JSON['stringify'](_0x5310c0):null});});}['PostNoAuth'](_0xe2b64c,_0x56ceed){return __awaiter$5(this,void 0,void 0,function*(){const _0x3d3bb7=this['getUrl'](_0xe2b64c);return yield fetch(_0x3d3bb7,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0x56ceed?JSON['stringify'](_0x56ceed):null});});}['put'](_0xf3b61d,_0x3fc179,_0x303467){return __awaiter$5(this,void 0,void 0,function*(){const _0x4e8f67=this['getUrl'](_0xf3b61d);return yield fetch(_0x4e8f67,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3fc179},'body':_0x303467?JSON['stringify'](_0x303467):null});});}['delete'](_0x587025,_0x5cc1e9){return __awaiter$5(this,void 0,void 0,function*(){const _0x2cdfc0=this['getUrl'](_0x587025);return yield fetch(_0x2cdfc0,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x5cc1e9}});});}}
|
|
10
|
-
|
|
11
|
-
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x50fb9f,_0xd69bb,_0x41fece,_0x5c8728){function _0x7b44dc(_0x278a52){return _0x278a52 instanceof _0x41fece?_0x278a52:new _0x41fece(function(_0x2b3b7c){_0x2b3b7c(_0x278a52);});}return new(_0x41fece||(_0x41fece=Promise))(function(_0x1b9486,_0x4d994e){function _0x3f0241(_0x158589){try{_0xdb1e5(_0x5c8728['next'](_0x158589));}catch(_0x1795e8){_0x4d994e(_0x1795e8);}}function _0x52f301(_0x1bc714){try{_0xdb1e5(_0x5c8728['throw'](_0x1bc714));}catch(_0x110f1f){_0x4d994e(_0x110f1f);}}function _0xdb1e5(_0x1cac81){_0x1cac81['done']?_0x1b9486(_0x1cac81['value']):_0x7b44dc(_0x1cac81['value'])['then'](_0x3f0241,_0x52f301);}_0xdb1e5((_0x5c8728=_0x5c8728['apply'](_0x50fb9f,_0xd69bb||[]))['next']());});};class SearchServersService{constructor(_0x10a753){this['fetch']=_0x10a753,this['path']='search-services';}['create'](_0x583383,_0xde75f,_0x33dbbe,_0xd51115,_0x42ef2a,_0x1e38a9,_0x1ce29a,_0x26a5f3){return __awaiter$4(this,void 0,void 0,function*(){const _0x19e8b2={'account_name':_0x583383,'search_service_name':_0xde75f,'endpoint':_0x33dbbe,'key':_0xd51115,'country':_0x42ef2a,'provider':_0x1e38a9,'index_name':_0x1ce29a};try{const _0x4b25b4=yield this['fetch']['post'](this['path'],_0x26a5f3,_0x19e8b2);if(_0x4b25b4['status']>0xc7&&_0x4b25b4['status']<0x12c){const _0x59a5ea=yield _0x4b25b4['json']();return new SuccessfulSearchServiceResponse(_0x59a5ea);}const _0xf64b90=yield _0x4b25b4['json']();return new FailedSearchServiceResponse(_0xf64b90);}catch(_0x5d019e){if(_0x5d019e instanceof Error)return new FailedSearchServiceResponse({'detail':_0x5d019e['message'],'title':_0x5d019e['name'],'status':0x1f4,'instance':'','type':''});throw _0x5d019e;}});}['delete'](_0x4d94d4,_0x2703bc,_0x26c3f8){return __awaiter$4(this,void 0,void 0,function*(){const _0x37b151=this['path']+'/'+_0x4d94d4+'/'+_0x2703bc;try{const _0x5dcb85=yield this['fetch']['delete'](_0x37b151,_0x26c3f8);if(_0x5dcb85['status']>0xc7&&_0x5dcb85['status']<0x12c)return new SuccessfulResponse({});const _0x351acc=yield _0x5dcb85['json']();return new FailedResponse(_0x351acc);}catch(_0x51299c){if(_0x51299c instanceof Error)return new FailedResponse({'detail':_0x51299c['message'],'title':_0x51299c['name'],'status':0x1f4,'instance':'','type':''});throw _0x51299c;}});}['view'](_0x216f5e,_0x2ade61,_0x2c07af){return __awaiter$4(this,void 0,void 0,function*(){const _0x50325d=this['path']+'/'+_0x216f5e+'/'+_0x2ade61;try{const _0x3e4581=yield this['fetch']['get'](_0x50325d,_0x2c07af);if(_0x3e4581['status']>0xc7&&_0x3e4581['status']<0x12c){const _0x424217=yield _0x3e4581['json']();return new SuccessfulViewSearchServiceResponse(_0x424217);}const _0x15e434=yield _0x3e4581['json']();return new FailedViewSearchServiceResponse(_0x15e434);}catch(_0x57e03c){if(_0x57e03c instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x57e03c['message'],'title':_0x57e03c['name'],'status':0x1f4,'instance':'','type':''});throw _0x57e03c;}});}['edit'](_0x4b7303,_0x4ef624,_0x534448,_0xdc9f0b,_0x38da9c){return __awaiter$4(this,void 0,void 0,function*(){const _0xd7a6e3={'account_name':_0x4b7303,'search_service_name':_0x4ef624,'key':_0x534448,'country':_0xdc9f0b};try{const _0x486c71=yield this['fetch']['put'](this['path'],_0x38da9c,_0xd7a6e3);if(_0x486c71['status']>0xc7&&_0x486c71['status']<0x12c){const _0x247e8b=yield _0x486c71['json']();return new SuccessfulSearchServiceResponse(_0x247e8b);}const _0x27153c=yield _0x486c71['json']();return new FailedSearchServiceResponse(_0x27153c);}catch(_0x391834){if(_0x391834 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x391834['message'],'title':_0x391834['name'],'status':0x1f4,'instance':'','type':''});throw _0x391834;}});}['list'](_0x2850eb,_0x1fe91f){return __awaiter$4(this,void 0,void 0,function*(){const _0x4a451f=this['path']+'/'+_0x2850eb;try{const _0x404065=yield this['fetch']['get'](_0x4a451f,_0x1fe91f);if(_0x404065['status']>0xc7&&_0x404065['status']<0x12c){const _0x4adf05=yield _0x404065['json']();return new SuccessfulListSearchServiceResponse(_0x4adf05);}const _0x28eadb=yield _0x404065['json']();return new FailedViewSearchServicesResponse(_0x28eadb);}catch(_0x319210){if(_0x319210 instanceof Error)return new FailedViewSearchServicesResponse({'detail':_0x319210['message'],'title':_0x319210['name'],'status':0x1f4,'instance':'','type':''});throw _0x319210;}});}}
|
|
12
|
-
|
|
13
|
-
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x2e245c,_0x1e1475,_0x5ed322,_0x1c7d56){function _0x4b8d96(_0x18cdfa){return _0x18cdfa instanceof _0x5ed322?_0x18cdfa:new _0x5ed322(function(_0x21e31c){_0x21e31c(_0x18cdfa);});}return new(_0x5ed322||(_0x5ed322=Promise))(function(_0x4237e1,_0x47dd15){function _0x363a38(_0xbdba08){try{_0x3ef375(_0x1c7d56['next'](_0xbdba08));}catch(_0x1bc019){_0x47dd15(_0x1bc019);}}function _0x2e6f6c(_0x212b97){try{_0x3ef375(_0x1c7d56['throw'](_0x212b97));}catch(_0x5ef305){_0x47dd15(_0x5ef305);}}function _0x3ef375(_0x3fd6fe){_0x3fd6fe['done']?_0x4237e1(_0x3fd6fe['value']):_0x4b8d96(_0x3fd6fe['value'])['then'](_0x363a38,_0x2e6f6c);}_0x3ef375((_0x1c7d56=_0x1c7d56['apply'](_0x2e245c,_0x1e1475||[]))['next']());});};class FacetService{constructor(_0xc3f96){this['fetch']=_0xc3f96,this['path']='facet';}['create'](_0x473622,_0x4dd866,_0x1d6968,_0x1ccda2){return __awaiter$3(this,void 0,void 0,function*(){const _0x1a4e01={'account_name':_0x473622,'list_name':_0x4dd866,'facet_name':_0x1d6968};try{const _0x15f7b4=yield this['fetch']['post'](this['path'],_0x1ccda2,_0x1a4e01);if(_0x15f7b4['status']>0xc7&&_0x15f7b4['status']<0x12c){const _0x367abb=yield _0x15f7b4['json']();return new SuccessfulFacetResponse(_0x367abb);}const _0x43aac0=yield _0x15f7b4['json']();return new FailedFacetResponse(_0x43aac0);}catch(_0x3df6f3){if(_0x3df6f3 instanceof Error)return new FailedFacetResponse({'detail':_0x3df6f3['message'],'title':_0x3df6f3['name'],'status':0x1f4,'instance':'','type':''});throw _0x3df6f3;}});}['remove'](_0x590820,_0x4f8068,_0x4e0e0e,_0x3c488e){return __awaiter$3(this,void 0,void 0,function*(){const _0xf1c158='Facet/'+_0x590820+'/'+_0x4f8068+'/'+_0x4e0e0e,_0x413d05=yield this['fetch']['delete'](_0xf1c158,_0x3c488e);try{if(_0x413d05['status']>0xc7&&_0x413d05['status']<0x12c)return new SuccessfulResponse({});const _0x58dfb0=yield _0x413d05['json']();return new FailedResponse(_0x58dfb0);}catch(_0x3dc3c0){if(_0x3dc3c0 instanceof Error)return new FailedResponse({'detail':_0x3dc3c0['message'],'title':_0x3dc3c0['name'],'status':0x1f4,'instance':'','type':''});throw _0x3dc3c0;}});}['rename'](_0x794e63,_0x1ad443,_0xe8f479,_0x21175e,_0x128b7a){return __awaiter$3(this,void 0,void 0,function*(){const _0x1533c9={'account_name':_0x794e63,'list_name':_0x1ad443,'facet_name':_0xe8f479,'new_facet_name':_0x21175e};try{const _0x185ead=yield this['fetch']['put'](this['path'],_0x128b7a,_0x1533c9);if(_0x185ead['status']>0xc7&&_0x185ead['status']<0x12c){const _0x47daba=yield _0x185ead['json']();return new SuccessfulFacetResponse(_0x47daba);}const _0x120906=yield _0x185ead['json']();return new FailedFacetResponse(_0x120906);}catch(_0x15b529){if(_0x15b529 instanceof Error)return new FailedFacetResponse({'detail':_0x15b529['message'],'title':_0x15b529['name'],'status':0x1f4,'instance':'','type':''});throw _0x15b529;}});}}
|
|
14
|
-
|
|
15
|
-
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x44916d,_0x44dc63,_0x2094dc,_0x3c8b1){function _0xce4497(_0x4f9c72){return _0x4f9c72 instanceof _0x2094dc?_0x4f9c72:new _0x2094dc(function(_0x36ba20){_0x36ba20(_0x4f9c72);});}return new(_0x2094dc||(_0x2094dc=Promise))(function(_0x5e35f1,_0x1ce008){function _0x90f23f(_0x57a978){try{_0x28198e(_0x3c8b1['next'](_0x57a978));}catch(_0x15d702){_0x1ce008(_0x15d702);}}function _0x2a01be(_0x452dbc){try{_0x28198e(_0x3c8b1['throw'](_0x452dbc));}catch(_0x7572c9){_0x1ce008(_0x7572c9);}}function _0x28198e(_0x412ca2){_0x412ca2['done']?_0x5e35f1(_0x412ca2['value']):_0xce4497(_0x412ca2['value'])['then'](_0x90f23f,_0x2a01be);}_0x28198e((_0x3c8b1=_0x3c8b1['apply'](_0x44916d,_0x44dc63||[]))['next']());});};class SearchResultService{constructor(_0x299319){this['fetch']=_0x299319,this['path']='search-result';}['create'](_0xec2ac3,_0x569d7a,_0x5c7743,_0x30160b,_0x4d3da8){return __awaiter$2(this,void 0,void 0,function*(){_0x4d3da8=_0x4d3da8!==null&&_0x4d3da8!==void 0?_0x4d3da8:{'description':'','keywords':'','resource_1':'','resource_2':'','resource_3':'','latitude':0x0,'longitude':0x0,'facets':[]};const _0x5bf93b=Object['assign']({'account_name':_0xec2ac3,'search_result_name':_0x5c7743,'list_name':_0x569d7a},_0x4d3da8);try{const _0x304e42=yield this['fetch']['post'](this['path'],_0x30160b,_0x5bf93b);if(_0x304e42['status']>0xc7&&_0x304e42['status']<0x12c){const _0x32f0f8=yield _0x304e42['json']();return new SuccessfulViewSearchResultResponse(_0x32f0f8);}const _0x1ae3a2=yield _0x304e42['json']();return new FailedSearchResultResponse(_0x1ae3a2);}catch(_0x5b214d){if(_0x5b214d instanceof Error)return new FailedSearchResultResponse({'detail':_0x5b214d['message'],'title':_0x5b214d['name'],'status':0x1f4,'instance':'','type':''});throw _0x5b214d;}});}['transfer'](_0x52b8d6,_0xc4658b,_0x25e54c,_0x177a76){return __awaiter$2(this,void 0,void 0,function*(){const _0x578b1f={'account_name':_0x52b8d6,'list_name':_0xc4658b,'new_search_service_name':_0x25e54c};try{const _0x4de1ec=yield this['fetch']['post'](this['path']+'/transfer',_0x177a76,_0x578b1f);if(_0x4de1ec['status']>0xc7&&_0x4de1ec['status']<0x12c){const _0x344584=yield _0x4de1ec['json']();return new SuccessfulListResponse(_0x344584);}const _0x40e54d=yield _0x4de1ec['json']();return new FailedListResponse(_0x40e54d);}catch(_0x1344de){if(_0x1344de instanceof Error)return new FailedListResponse({'detail':_0x1344de['message'],'title':_0x1344de['name'],'status':0x1f4,'instance':'','type':''});throw _0x1344de;}});}['list'](_0x527aad,_0x33a52c,_0x4f39db,_0x3d0e4e){return __awaiter$2(this,void 0,void 0,function*(){let _0x2312e2=this['path']+'/'+_0x527aad+'/'+_0x33a52c;const _0x329ef8=[];(_0x3d0e4e===null||_0x3d0e4e===void 0?void 0:_0x3d0e4e['size'])&&_0x329ef8['push']('size='+_0x3d0e4e['size']);(_0x3d0e4e===null||_0x3d0e4e===void 0?void 0:_0x3d0e4e['skip'])&&_0x329ef8['push']('skip='+_0x3d0e4e['skip']);(_0x3d0e4e===null||_0x3d0e4e===void 0?void 0:_0x3d0e4e['query'])&&_0x329ef8['push']('query='+_0x3d0e4e['query']);_0x329ef8['length']>0x0&&_0x329ef8['forEach']((_0x20e8af,_0x18bf92)=>{_0x18bf92===0x0?_0x2312e2+='?':_0x2312e2+='&',_0x2312e2+=_0x20e8af;});try{const _0x570977=yield this['fetch']['get'](_0x2312e2,_0x4f39db);if(_0x570977['status']>0xc7&&_0x570977['status']<0x12c){const _0x156993=yield _0x570977['json']();return new SuccessfulListSearchResultResponse(_0x156993);}const _0x47c1b7=yield _0x570977['json']();return new FailedViewSearchResultResponse(_0x47c1b7);}catch(_0xd70ebf){if(_0xd70ebf instanceof Error)return new FailedViewSearchResultResponse({'detail':_0xd70ebf['message'],'title':_0xd70ebf['name'],'status':0x1f4,'instance':'','type':''});throw _0xd70ebf;}});}}
|
|
16
|
-
|
|
17
|
-
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x173694,_0x4802e6,_0x5002ed,_0xfdf4e6){function _0x50791a(_0x3c3fb1){return _0x3c3fb1 instanceof _0x5002ed?_0x3c3fb1:new _0x5002ed(function(_0x5a6e2f){_0x5a6e2f(_0x3c3fb1);});}return new(_0x5002ed||(_0x5002ed=Promise))(function(_0x3fdfb9,_0x46eddb){function _0x4d1a44(_0x5b199f){try{_0x1ee851(_0xfdf4e6['next'](_0x5b199f));}catch(_0x25f5e3){_0x46eddb(_0x25f5e3);}}function _0x3acc08(_0x203d81){try{_0x1ee851(_0xfdf4e6['throw'](_0x203d81));}catch(_0x28c248){_0x46eddb(_0x28c248);}}function _0x1ee851(_0x45eee2){_0x45eee2['done']?_0x3fdfb9(_0x45eee2['value']):_0x50791a(_0x45eee2['value'])['then'](_0x4d1a44,_0x3acc08);}_0x1ee851((_0xfdf4e6=_0xfdf4e6['apply'](_0x173694,_0x4802e6||[]))['next']());});};class ContributorService{constructor(_0x29876e){this['fetch']=_0x29876e,this['path']='contributor';}['create'](_0x598526,_0x3d2887,_0x40a5b6,_0x5c0212){return __awaiter$1(this,void 0,void 0,function*(){const _0x5ba409={'account_name':_0x598526,'list_name':_0x3d2887,'contributor_name':_0x40a5b6};try{const _0x181f80=yield this['fetch']['post'](this['path'],_0x5c0212,_0x5ba409);if(_0x181f80['status']>0xc7&&_0x181f80['status']<0x12c){const _0x1adec1=yield _0x181f80['json']();return new SuccessfulContributorResponse(_0x1adec1);}const _0x2dd743=yield _0x181f80['json']();return new FailedContributorResponse(_0x2dd743);}catch(_0x5210eb){if(_0x5210eb instanceof Error)return new FailedContributorResponse({'detail':_0x5210eb['message'],'title':_0x5210eb['name'],'status':0x1f4,'instance':'','type':''});throw _0x5210eb;}});}['remove'](_0x203c4f,_0x36717a,_0x4b28bc,_0x6c862e){return __awaiter$1(this,void 0,void 0,function*(){const _0x22f6ac=this['path']+'/'+_0x203c4f+'/'+_0x36717a+'/'+_0x4b28bc,_0xb7140b=yield this['fetch']['delete'](_0x22f6ac,_0x6c862e);try{if(_0xb7140b['status']>0xc7&&_0xb7140b['status']<0x12c)return new SuccessfulResponse({});const _0x49569c=yield _0xb7140b['json']();return new FailedResponse(_0x49569c);}catch(_0x463127){if(_0x463127 instanceof Error)return new FailedResponse({'detail':_0x463127['message'],'title':_0x463127['name'],'status':0x1f4,'instance':'','type':''});throw _0x463127;}});}['startsWith'](_0xa20aa4,_0x109c2a){return __awaiter$1(this,void 0,void 0,function*(){const _0x552ff6=this['path']+'/'+_0xa20aa4;try{const _0x168e20=yield this['fetch']['get'](_0x552ff6,_0x109c2a);if(_0x168e20['status']>0xc7&&_0x168e20['status']<0x12c){const _0x4f0929=yield _0x168e20['json']();return new SuccessfulAccountAndImageResponse(_0x4f0929);}const _0x398c69=yield _0x168e20['json']();return new FailedAccountAndImageResponse(_0x398c69);}catch(_0x8d8ae7){if(_0x8d8ae7 instanceof Error)return new FailedAccountAndImageResponse({'detail':_0x8d8ae7['message'],'title':_0x8d8ae7['name'],'status':0x1f4,'instance':'','type':''});throw _0x8d8ae7;}});}}
|
|
18
|
-
|
|
19
|
-
var __awaiter=undefined&&undefined['__awaiter']||function(_0x38d796,_0x98b2a5,_0x589efe,_0x3d840d){function _0xbc2cbd(_0x549fcb){return _0x549fcb instanceof _0x589efe?_0x549fcb:new _0x589efe(function(_0x2c36b5){_0x2c36b5(_0x549fcb);});}return new(_0x589efe||(_0x589efe=Promise))(function(_0x2f528b,_0x25afb6){function _0x5d7ab9(_0x165572){try{_0x529c03(_0x3d840d['next'](_0x165572));}catch(_0x3a85b2){_0x25afb6(_0x3a85b2);}}function _0xd4a4cf(_0x4153f0){try{_0x529c03(_0x3d840d['throw'](_0x4153f0));}catch(_0x394516){_0x25afb6(_0x394516);}}function _0x529c03(_0x19761e){_0x19761e['done']?_0x2f528b(_0x19761e['value']):_0xbc2cbd(_0x19761e['value'])['then'](_0x5d7ab9,_0xd4a4cf);}_0x529c03((_0x3d840d=_0x3d840d['apply'](_0x38d796,_0x98b2a5||[]))['next']());});};class AdminClient{constructor(_0x3bbc6d='https://admin.searchability.dev/'){var _0x472720=new Fetch(_0x3bbc6d);this['Accounts']=new AccountService(_0x472720),this['Lists']=new ListService(_0x472720),this['ApiKeys']=new ApiKeyService(_0x472720),this['SearchServers']=new SearchServersService(_0x472720),this['Facets']=new FacetService(_0x472720),this['SearchResults']=new SearchResultService(_0x472720),this['Contributors']=new ContributorService(_0x472720);}}class AuthClient{constructor(_0x4a02c3='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x4a02c3);}['login'](_0x5d3c45){return __awaiter(this,void 0,void 0,function*(){const _0x441528='login/'+_0x5d3c45;try{const _0x400bf9=yield yield fetch(_0x441528);if(_0x400bf9['status']>0xc7&&_0x400bf9['status']<0x12c){const _0x23a47f=yield _0x400bf9['json']();return new SuccessfulAuthResponse(_0x23a47f);}const _0x40d6b1=yield _0x400bf9['json']();return new FailedAuthResponse(_0x40d6b1);}catch(_0x3a1ad9){if(_0x3a1ad9 instanceof Error)return new FailedAuthResponse({'detail':_0x3a1ad9['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x3a1ad9;}});}['refresh'](_0x1a2858){return __awaiter(this,void 0,void 0,function*(){const _0xe94824='refresh',_0x556164={'refresh_token':_0x1a2858};try{const _0x44dd81=yield this['fetch']['PostNoAuth'](_0xe94824,_0x556164);if(_0x44dd81['status']>0xc7&&_0x44dd81['status']<0x12c){const _0x386581=yield _0x44dd81['json']();return new SuccessfulAuthResponse(_0x386581);}const _0x553590=yield _0x44dd81['json']();return new FailedAuthResponse(_0x553590);}catch(_0x136497){if(_0x136497 instanceof Error)return new FailedAuthResponse({'detail':_0x136497['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x136497;}});}['getTokenStatus'](_0x4f35d5){if(Date['now']()<_0x4f35d5['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x4f35d5['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
|
|
20
|
-
|
|
21
|
-
export { AdminClient, AuthClient, TokenStatus, Tokens };
|