@searchability/admin-client 0.0.74 → 0.0.76
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(_0xd467f5){_0xd467f5[_0xd467f5['Ok']=0x0]='Ok',_0xd467f5[_0xd467f5['Refresh']=0x1]='Refresh',_0xd467f5[_0xd467f5['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(_0x5d16fa){this['isSuccess']=_0x5d16fa;}}class SuccessfulContributorResponse extends Response{constructor(_0x4d83c5){super(!![]),this['contributor']=_0x4d83c5;}['toSuccess'](){return this['contributor'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedContributorResponse extends Response{constructor(_0x2c0471){super(![]),this['problem']=_0x2c0471;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountAndImageResponse extends Response{constructor(_0x11bb9d){super(!![]),this['accountAndImages']=_0x11bb9d;}['toSuccess'](){return this['accountAndImages'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountAndImageResponse extends Response{constructor(_0x1277f3){super(![]),this['problem']=_0x1277f3;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulFacetResponse extends Response{constructor(_0x724592){super(!![]),this['facet']=_0x724592;}['toSuccess'](){return this['facet'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetResponse extends Response{constructor(_0x6c457e){super(![]),this['problem']=_0x6c457e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountResponse extends Response{constructor(_0x474b43){super(!![]),this['account']=_0x474b43;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountImageResponse extends Response{constructor(_0x4c5d4f){super(!![]),this['accountImage']=_0x4c5d4f;}['toSuccess'](){return this['accountImage'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListIdentityResponse extends Response{constructor(_0x20d217){super(!![]),this['list']=_0x20d217;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListResponse extends Response{constructor(_0xc86238){super(!![]),this['list']=_0xc86238;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x5a0586){super(![]),this['problem']=_0x5a0586;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountImageResponse extends Response{constructor(_0x1c5e0f){super(![]),this['problem']=_0x1c5e0f;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListIdentityResponse extends Response{constructor(_0x249f35){super(![]),this['problem']=_0x249f35;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListResponse extends Response{constructor(_0x3bf095){super(![]),this['problem']=_0x3bf095;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x1546c1){super(!![]),this['tokens']=_0x1546c1;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x1fc02e){super(![]),this['problem']=_0x1fc02e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x1d52ba){super(!![]),this['apiKey']=_0x1d52ba;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x45db89){super(![]),this['problem']=_0x45db89;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x11e1df){super(!![]),this['searchService']=_0x11e1df;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x20b8ba){super(![]),this['problem']=_0x20b8ba;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x5165fc){super(!![]),this['searchService']=_0x5165fc;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulViewSearchResultResponse extends Response{constructor(_0x10705d){super(!![]),this['searchResult']=_0x10705d;}['toSuccess'](){return this['searchResult'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchResultResponse extends Response{constructor(_0x68baea){super(![]),this['problem']=_0x68baea;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchServiceResponse extends Response{constructor(_0x3504d2){super(!![]),this['searchServices']=_0x3504d2;}['toSuccess'](){return this['searchServices'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServicesResponse extends Response{constructor(_0x34b014){super(![]),this['problem']=_0x34b014;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedViewSearchServiceResponse extends Response{constructor(_0x27455c){super(![]),this['problem']=_0x27455c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x1cf3e7){super(!![]),this['apiKeyValue']=_0x1cf3e7;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x586397){super(!![]),this['obj']=_0x586397;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x320541){super(![]),this['problem']=_0x320541;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x452c88){super(![]),this['problem']=_0x452c88;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
|
|
2
|
+
|
|
3
|
+
var __awaiter$8=undefined&&undefined['__awaiter']||function(_0x3ea287,_0x5d217f,_0x5b081d,_0x35123c){function _0x9e092f(_0x2b54e2){return _0x2b54e2 instanceof _0x5b081d?_0x2b54e2:new _0x5b081d(function(_0x38c72d){_0x38c72d(_0x2b54e2);});}return new(_0x5b081d||(_0x5b081d=Promise))(function(_0x46efcf,_0x282ab3){function _0x2989e5(_0x51361a){try{_0x556466(_0x35123c['next'](_0x51361a));}catch(_0x21d913){_0x282ab3(_0x21d913);}}function _0x394f37(_0x14a2ae){try{_0x556466(_0x35123c['throw'](_0x14a2ae));}catch(_0x97d91f){_0x282ab3(_0x97d91f);}}function _0x556466(_0x305d4a){_0x305d4a['done']?_0x46efcf(_0x305d4a['value']):_0x9e092f(_0x305d4a['value'])['then'](_0x2989e5,_0x394f37);}_0x556466((_0x35123c=_0x35123c['apply'](_0x3ea287,_0x5d217f||[]))['next']());});};class AccountService{constructor(_0x1866e1){this['fetch']=_0x1866e1;}['get'](_0x34297f,_0x3cf451){return __awaiter$8(this,void 0,void 0,function*(){const _0x4025fd='Account/'+_0x34297f+'/',_0x26d9c1=yield this['fetch']['get'](_0x4025fd,_0x3cf451);try{if(_0x26d9c1['status']>0xc7&&_0x26d9c1['status']<0x12c){const _0x2b612d=yield _0x26d9c1['json']();return new SuccessfulAccountResponse(_0x2b612d);}const _0x5620f6=yield _0x26d9c1['json']();return new FailedAccountResponse(_0x5620f6);}catch(_0x316a9f){if(_0x316a9f instanceof Error)return new FailedAccountResponse({'detail':_0x316a9f['message'],'title':_0x316a9f['name'],'status':0x1f4,'instance':'','type':''});throw _0x316a9f;}});}['getImage'](_0x6cdafc,_0x3040f9){return __awaiter$8(this,void 0,void 0,function*(){const _0x27e8b0='account/image/'+_0x6cdafc+'/',_0x553d51=yield this['fetch']['get'](_0x27e8b0,_0x3040f9);try{if(_0x553d51['status']>0xc7&&_0x553d51['status']<0x12c){const _0x3a8f8c=yield _0x553d51['json']();return new SuccessfulAccountImageResponse(_0x3a8f8c);}const _0x372672=yield _0x553d51['json']();return new FailedAccountImageResponse(_0x372672);}catch(_0x534b45){if(_0x534b45 instanceof Error)return new FailedAccountImageResponse({'detail':_0x534b45['message'],'title':_0x534b45['name'],'status':0x1f4,'instance':'','type':''});throw _0x534b45;}});}}
|
|
4
|
+
|
|
5
|
+
var __awaiter$7=undefined&&undefined['__awaiter']||function(_0x183999,_0x5c81cd,_0x212bbb,_0x374c80){function _0x3c0dd7(_0x348742){return _0x348742 instanceof _0x212bbb?_0x348742:new _0x212bbb(function(_0x5a123b){_0x5a123b(_0x348742);});}return new(_0x212bbb||(_0x212bbb=Promise))(function(_0x1ce95b,_0x3fdd1d){function _0x234a9c(_0x15ba24){try{_0x5ea2d2(_0x374c80['next'](_0x15ba24));}catch(_0x1a1535){_0x3fdd1d(_0x1a1535);}}function _0x5d8af1(_0x545bbf){try{_0x5ea2d2(_0x374c80['throw'](_0x545bbf));}catch(_0x3f3d9b){_0x3fdd1d(_0x3f3d9b);}}function _0x5ea2d2(_0x4c8ea1){_0x4c8ea1['done']?_0x1ce95b(_0x4c8ea1['value']):_0x3c0dd7(_0x4c8ea1['value'])['then'](_0x234a9c,_0x5d8af1);}_0x5ea2d2((_0x374c80=_0x374c80['apply'](_0x183999,_0x5c81cd||[]))['next']());});};class ApiKeyService{constructor(_0x2b85f0){this['fetch']=_0x2b85f0,this['path']='api-key';}['create'](_0x40a0fc,_0x536028,_0x13e281){return __awaiter$7(this,void 0,void 0,function*(){const _0x3dcddc={'account_name':_0x40a0fc,'api_key_name':_0x536028};try{const _0x2e462f=yield this['fetch']['post'](this['path'],_0x13e281,_0x3dcddc);if(_0x2e462f['status']>0xc7&&_0x2e462f['status']<0x12c){const _0xc5513e=yield _0x2e462f['json']();return new SuccessfulApiKeyResponse(_0xc5513e);}const _0x21f03f=yield _0x2e462f['json']();return new FailedApiKeyResponse(_0x21f03f);}catch(_0x2b9788){if(_0x2b9788 instanceof Error)return new FailedApiKeyResponse({'detail':_0x2b9788['message'],'title':_0x2b9788['name'],'status':0x1f4,'instance':'','type':''});throw _0x2b9788;}});}['view'](_0x1f6e21,_0x53ddc2,_0x161abb){return __awaiter$7(this,void 0,void 0,function*(){const _0x46acf5=this['path']+'/'+_0x1f6e21+'/'+_0x53ddc2;try{const _0x77bd1c=yield this['fetch']['get'](_0x46acf5,_0x161abb);if(_0x77bd1c['status']>0xc7&&_0x77bd1c['status']<0x12c){const _0x1ea36e=yield _0x77bd1c['json']();return new SuccessfulApiKeyValueResponse(_0x1ea36e);}const _0x3e7861=yield _0x77bd1c['json']();return new FailedApiKeyValueResponse(_0x3e7861);}catch(_0x154994){if(_0x154994 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x154994['message'],'title':_0x154994['name'],'status':0x1f4,'instance':'','type':''});throw _0x154994;}});}['delete'](_0x377a4c,_0x2b75ce,_0x5171e8){return __awaiter$7(this,void 0,void 0,function*(){const _0x24ad39=this['path']+'/'+_0x377a4c+'/'+_0x2b75ce;try{const _0x400dca=yield this['fetch']['delete'](_0x24ad39,_0x5171e8);if(_0x400dca['status']>0xc7&&_0x400dca['status']<0x12c)return new SuccessfulResponse({});const _0xb6ca34=yield _0x400dca['json']();return new FailedResponse(_0xb6ca34);}catch(_0x12d26a){if(_0x12d26a instanceof Error)return new FailedResponse({'detail':_0x12d26a['message'],'title':_0x12d26a['name'],'status':0x1f4,'instance':'','type':''});throw _0x12d26a;}});}}
|
|
6
|
+
|
|
7
|
+
var __awaiter$6=undefined&&undefined['__awaiter']||function(_0xb472c2,_0x1e09eb,_0x6909d0,_0x384199){function _0x222ec4(_0x28ac9e){return _0x28ac9e instanceof _0x6909d0?_0x28ac9e:new _0x6909d0(function(_0x175b2b){_0x175b2b(_0x28ac9e);});}return new(_0x6909d0||(_0x6909d0=Promise))(function(_0x5352ab,_0x3bac20){function _0x1581a9(_0x48a939){try{_0x230483(_0x384199['next'](_0x48a939));}catch(_0x4e306e){_0x3bac20(_0x4e306e);}}function _0x4c97a3(_0x2b5201){try{_0x230483(_0x384199['throw'](_0x2b5201));}catch(_0xa22901){_0x3bac20(_0xa22901);}}function _0x230483(_0x4f88fc){_0x4f88fc['done']?_0x5352ab(_0x4f88fc['value']):_0x222ec4(_0x4f88fc['value'])['then'](_0x1581a9,_0x4c97a3);}_0x230483((_0x384199=_0x384199['apply'](_0xb472c2,_0x1e09eb||[]))['next']());});};class ListService{constructor(_0x1f707b){this['fetch']=_0x1f707b;}['create'](_0x3c2535,_0x5272ae,_0x36ab3e,_0x4f1167){return __awaiter$6(this,void 0,void 0,function*(){const _0x184397='List',_0x5b9943={'account_name':_0x3c2535,'list_name':_0x5272ae,'search_service_name':_0x36ab3e};try{const _0x3df9bd=yield this['fetch']['post'](_0x184397,_0x4f1167,_0x5b9943);if(_0x3df9bd['status']>0xc7&&_0x3df9bd['status']<0x12c){const _0x13df27=yield _0x3df9bd['json']();return new SuccessfulListIdentityResponse(_0x13df27);}const _0x324a49=yield _0x3df9bd['json']();return new FailedListIdentityResponse(_0x324a49);}catch(_0x451a25){if(_0x451a25 instanceof Error)return new FailedListIdentityResponse({'detail':_0x451a25['message'],'title':_0x451a25['name'],'status':0x1f4,'instance':'','type':''});throw _0x451a25;}});}['delete'](_0x2739d6,_0x476a2b,_0x5c841a){return __awaiter$6(this,void 0,void 0,function*(){const _0x1af81f='List/'+_0x2739d6+'/'+_0x476a2b,_0x222844=yield this['fetch']['delete'](_0x1af81f,_0x5c841a);try{if(_0x222844['status']>0xc7&&_0x222844['status']<0x12c)return new SuccessfulResponse({});const _0x230a50=yield _0x222844['json']();return new FailedResponse(_0x230a50);}catch(_0x379679){if(_0x379679 instanceof Error)return new FailedResponse({'detail':_0x379679['message'],'title':_0x379679['name'],'status':0x1f4,'instance':'','type':''});throw _0x379679;}});}['get'](_0x1a5f85,_0x32b60b,_0x32ff70){return __awaiter$6(this,void 0,void 0,function*(){const _0x45adad='List/'+_0x1a5f85+'/'+_0x32b60b;try{const _0x40b569=yield this['fetch']['get'](_0x45adad,_0x32ff70);if(_0x40b569['status']>0xc7&&_0x40b569['status']<0x12c){const _0x345adc=yield _0x40b569['json']();return new SuccessfulListResponse(_0x345adc);}const _0xcb6c58=yield _0x40b569['json']();return new FailedListResponse(_0xcb6c58);}catch(_0xb10152){if(_0xb10152 instanceof Error)return new FailedListResponse({'detail':_0xb10152['message'],'title':_0xb10152['name'],'status':0x1f4,'instance':'','type':''});throw _0xb10152;}});}}
|
|
8
|
+
|
|
9
|
+
var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x3acd2e,_0x4bd5f6,_0x4e0a97,_0x338a61){function _0x191f27(_0x33a1bd){return _0x33a1bd instanceof _0x4e0a97?_0x33a1bd:new _0x4e0a97(function(_0x44ad1a){_0x44ad1a(_0x33a1bd);});}return new(_0x4e0a97||(_0x4e0a97=Promise))(function(_0x2302e6,_0x76100a){function _0x5c2ce6(_0x229e00){try{_0x296377(_0x338a61['next'](_0x229e00));}catch(_0x43d501){_0x76100a(_0x43d501);}}function _0x3cc631(_0x11b15a){try{_0x296377(_0x338a61['throw'](_0x11b15a));}catch(_0x1cf789){_0x76100a(_0x1cf789);}}function _0x296377(_0x23ca57){_0x23ca57['done']?_0x2302e6(_0x23ca57['value']):_0x191f27(_0x23ca57['value'])['then'](_0x5c2ce6,_0x3cc631);}_0x296377((_0x338a61=_0x338a61['apply'](_0x3acd2e,_0x4bd5f6||[]))['next']());});};class Fetch{constructor(_0x5400ec){this['baseUri']=_0x5400ec,this['getUrl']=_0x4cc615=>{return _0x4cc615['startsWith']('/')&&(_0x4cc615=_0x4cc615['replace']('/','')),''+this['baseUri']+_0x4cc615;},!_0x5400ec['endsWith']('/')&&(_0x5400ec=_0x5400ec+'/');}['get'](_0x432404,_0x3cc35a){return __awaiter$5(this,void 0,void 0,function*(){const _0x57e1c5=this['getUrl'](_0x432404);return yield fetch(_0x57e1c5,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3cc35a}});});}['post'](_0x3768f0,_0x16e9f3,_0x33e0d4){return __awaiter$5(this,void 0,void 0,function*(){const _0x3e4360=this['getUrl'](_0x3768f0);return yield fetch(_0x3e4360,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x16e9f3},'body':_0x33e0d4?JSON['stringify'](_0x33e0d4):null});});}['PostNoAuth'](_0x285855,_0x4eca0b){return __awaiter$5(this,void 0,void 0,function*(){const _0x1fe896=this['getUrl'](_0x285855);return yield fetch(_0x1fe896,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0x4eca0b?JSON['stringify'](_0x4eca0b):null});});}['put'](_0x5f4489,_0x1a2179,_0x15a92a){return __awaiter$5(this,void 0,void 0,function*(){const _0x113585=this['getUrl'](_0x5f4489);return yield fetch(_0x113585,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1a2179},'body':_0x15a92a?JSON['stringify'](_0x15a92a):null});});}['delete'](_0x172744,_0x12b8d8){return __awaiter$5(this,void 0,void 0,function*(){const _0x370069=this['getUrl'](_0x172744);return yield fetch(_0x370069,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x12b8d8}});});}}
|
|
10
|
+
|
|
11
|
+
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x1049a1,_0xeb1157,_0x1adc37,_0x136962){function _0xa44494(_0x203adb){return _0x203adb instanceof _0x1adc37?_0x203adb:new _0x1adc37(function(_0x3ec557){_0x3ec557(_0x203adb);});}return new(_0x1adc37||(_0x1adc37=Promise))(function(_0x3a6148,_0x4e887f){function _0x274a2f(_0x34d903){try{_0xdcddbf(_0x136962['next'](_0x34d903));}catch(_0x3fde72){_0x4e887f(_0x3fde72);}}function _0x2a79b9(_0x5990f4){try{_0xdcddbf(_0x136962['throw'](_0x5990f4));}catch(_0xcbd069){_0x4e887f(_0xcbd069);}}function _0xdcddbf(_0x58118b){_0x58118b['done']?_0x3a6148(_0x58118b['value']):_0xa44494(_0x58118b['value'])['then'](_0x274a2f,_0x2a79b9);}_0xdcddbf((_0x136962=_0x136962['apply'](_0x1049a1,_0xeb1157||[]))['next']());});};class SearchServersService{constructor(_0x387f2b){this['fetch']=_0x387f2b,this['path']='search-services';}['create'](_0x1ab087,_0x27c67e,_0x25e0e5,_0x53bd25,_0x5ef5b9,_0x401328,_0x369c3,_0x3dcd49){return __awaiter$4(this,void 0,void 0,function*(){const _0x3dbc0a={'account_name':_0x1ab087,'search_service_name':_0x27c67e,'endpoint':_0x25e0e5,'key':_0x53bd25,'country':_0x5ef5b9,'provider':_0x401328,'index_name':_0x369c3};try{const _0x194b82=yield this['fetch']['post'](this['path'],_0x3dcd49,_0x3dbc0a);if(_0x194b82['status']>0xc7&&_0x194b82['status']<0x12c){const _0x56324e=yield _0x194b82['json']();return new SuccessfulSearchServiceResponse(_0x56324e);}const _0x40132b=yield _0x194b82['json']();return new FailedSearchServiceResponse(_0x40132b);}catch(_0x308f90){if(_0x308f90 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x308f90['message'],'title':_0x308f90['name'],'status':0x1f4,'instance':'','type':''});throw _0x308f90;}});}['delete'](_0x28af4e,_0x204ca4,_0x598efa){return __awaiter$4(this,void 0,void 0,function*(){const _0x5b5094=this['path']+'/'+_0x28af4e+'/'+_0x204ca4;try{const _0x320343=yield this['fetch']['delete'](_0x5b5094,_0x598efa);if(_0x320343['status']>0xc7&&_0x320343['status']<0x12c)return new SuccessfulResponse({});const _0x4f40bc=yield _0x320343['json']();return new FailedResponse(_0x4f40bc);}catch(_0x1740a5){if(_0x1740a5 instanceof Error)return new FailedResponse({'detail':_0x1740a5['message'],'title':_0x1740a5['name'],'status':0x1f4,'instance':'','type':''});throw _0x1740a5;}});}['view'](_0x1a345f,_0x99c862,_0x142ff2){return __awaiter$4(this,void 0,void 0,function*(){const _0x370cb0=this['path']+'/'+_0x1a345f+'/'+_0x99c862;try{const _0x29f0b7=yield this['fetch']['get'](_0x370cb0,_0x142ff2);if(_0x29f0b7['status']>0xc7&&_0x29f0b7['status']<0x12c){const _0x18c070=yield _0x29f0b7['json']();return new SuccessfulViewSearchServiceResponse(_0x18c070);}const _0x1bd791=yield _0x29f0b7['json']();return new FailedViewSearchServiceResponse(_0x1bd791);}catch(_0x7dd162){if(_0x7dd162 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x7dd162['message'],'title':_0x7dd162['name'],'status':0x1f4,'instance':'','type':''});throw _0x7dd162;}});}['edit'](_0x48ab5f,_0x2775ae,_0x3f6f8b,_0x5c5491,_0x2cd9b2){return __awaiter$4(this,void 0,void 0,function*(){const _0x8bbd36={'account_name':_0x48ab5f,'search_service_name':_0x2775ae,'key':_0x3f6f8b,'country':_0x5c5491};try{const _0x1f74b7=yield this['fetch']['put'](this['path'],_0x2cd9b2,_0x8bbd36);if(_0x1f74b7['status']>0xc7&&_0x1f74b7['status']<0x12c){const _0x558854=yield _0x1f74b7['json']();return new SuccessfulSearchServiceResponse(_0x558854);}const _0x4bd741=yield _0x1f74b7['json']();return new FailedSearchServiceResponse(_0x4bd741);}catch(_0x25497b){if(_0x25497b instanceof Error)return new FailedSearchServiceResponse({'detail':_0x25497b['message'],'title':_0x25497b['name'],'status':0x1f4,'instance':'','type':''});throw _0x25497b;}});}['list'](_0x3e3f41,_0x732b2f){return __awaiter$4(this,void 0,void 0,function*(){const _0x1269df=this['path']+'/'+_0x3e3f41;try{const _0x4125f9=yield this['fetch']['get'](_0x1269df,_0x732b2f);if(_0x4125f9['status']>0xc7&&_0x4125f9['status']<0x12c){const _0x29e57d=yield _0x4125f9['json']();return new SuccessfulListSearchServiceResponse(_0x29e57d);}const _0x16dfa7=yield _0x4125f9['json']();return new FailedViewSearchServicesResponse(_0x16dfa7);}catch(_0x3b6cad){if(_0x3b6cad instanceof Error)return new FailedViewSearchServicesResponse({'detail':_0x3b6cad['message'],'title':_0x3b6cad['name'],'status':0x1f4,'instance':'','type':''});throw _0x3b6cad;}});}}
|
|
12
|
+
|
|
13
|
+
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x29d259,_0x1424df,_0x20ec3a,_0x28e949){function _0x3da617(_0x14ed0a){return _0x14ed0a instanceof _0x20ec3a?_0x14ed0a:new _0x20ec3a(function(_0x5a37ef){_0x5a37ef(_0x14ed0a);});}return new(_0x20ec3a||(_0x20ec3a=Promise))(function(_0xf8914e,_0x414c78){function _0x3a7895(_0x2bf3ea){try{_0x2cc95c(_0x28e949['next'](_0x2bf3ea));}catch(_0x177bb7){_0x414c78(_0x177bb7);}}function _0x28524d(_0x5b8482){try{_0x2cc95c(_0x28e949['throw'](_0x5b8482));}catch(_0x284f1b){_0x414c78(_0x284f1b);}}function _0x2cc95c(_0x360896){_0x360896['done']?_0xf8914e(_0x360896['value']):_0x3da617(_0x360896['value'])['then'](_0x3a7895,_0x28524d);}_0x2cc95c((_0x28e949=_0x28e949['apply'](_0x29d259,_0x1424df||[]))['next']());});};class FacetService{constructor(_0x43d5e5){this['fetch']=_0x43d5e5,this['path']='facet';}['create'](_0x24700e,_0x1d6abd,_0x5a5111,_0x58a2e9){return __awaiter$3(this,void 0,void 0,function*(){const _0x14d27b={'account_name':_0x24700e,'list_name':_0x1d6abd,'facet_name':_0x5a5111};try{const _0x128604=yield this['fetch']['post'](this['path'],_0x58a2e9,_0x14d27b);if(_0x128604['status']>0xc7&&_0x128604['status']<0x12c){const _0x4d082f=yield _0x128604['json']();return new SuccessfulFacetResponse(_0x4d082f);}const _0x549d3f=yield _0x128604['json']();return new FailedFacetResponse(_0x549d3f);}catch(_0x110c5f){if(_0x110c5f instanceof Error)return new FailedFacetResponse({'detail':_0x110c5f['message'],'title':_0x110c5f['name'],'status':0x1f4,'instance':'','type':''});throw _0x110c5f;}});}['remove'](_0x1ed981,_0x323183,_0xa8f471,_0x58eaa5){return __awaiter$3(this,void 0,void 0,function*(){const _0x424873='Facet/'+_0x1ed981+'/'+_0x323183+'/'+_0xa8f471,_0xdeab90=yield this['fetch']['delete'](_0x424873,_0x58eaa5);try{if(_0xdeab90['status']>0xc7&&_0xdeab90['status']<0x12c)return new SuccessfulResponse({});const _0xddd1d5=yield _0xdeab90['json']();return new FailedResponse(_0xddd1d5);}catch(_0x21ec28){if(_0x21ec28 instanceof Error)return new FailedResponse({'detail':_0x21ec28['message'],'title':_0x21ec28['name'],'status':0x1f4,'instance':'','type':''});throw _0x21ec28;}});}['rename'](_0x4ea6d3,_0x25e011,_0x11d399,_0x12ba77,_0x3dbe62){return __awaiter$3(this,void 0,void 0,function*(){const _0x2feaa6={'account_name':_0x4ea6d3,'list_name':_0x25e011,'facet_name':_0x11d399,'new_facet_name':_0x12ba77};try{const _0x3110a2=yield this['fetch']['put'](this['path'],_0x3dbe62,_0x2feaa6);if(_0x3110a2['status']>0xc7&&_0x3110a2['status']<0x12c){const _0x56a8f4=yield _0x3110a2['json']();return new SuccessfulFacetResponse(_0x56a8f4);}const _0x44aa30=yield _0x3110a2['json']();return new FailedFacetResponse(_0x44aa30);}catch(_0x11bcaf){if(_0x11bcaf instanceof Error)return new FailedFacetResponse({'detail':_0x11bcaf['message'],'title':_0x11bcaf['name'],'status':0x1f4,'instance':'','type':''});throw _0x11bcaf;}});}}
|
|
14
|
+
|
|
15
|
+
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x38785d,_0x4a5925,_0x3cb350,_0x2bf93b){function _0x9b7cbf(_0x40dbd1){return _0x40dbd1 instanceof _0x3cb350?_0x40dbd1:new _0x3cb350(function(_0x26691d){_0x26691d(_0x40dbd1);});}return new(_0x3cb350||(_0x3cb350=Promise))(function(_0x30faaa,_0x2a773f){function _0x57063c(_0x39f36f){try{_0x2cb26d(_0x2bf93b['next'](_0x39f36f));}catch(_0x1bd669){_0x2a773f(_0x1bd669);}}function _0x4e780e(_0x4cb48f){try{_0x2cb26d(_0x2bf93b['throw'](_0x4cb48f));}catch(_0x4ad369){_0x2a773f(_0x4ad369);}}function _0x2cb26d(_0x1e3d9b){_0x1e3d9b['done']?_0x30faaa(_0x1e3d9b['value']):_0x9b7cbf(_0x1e3d9b['value'])['then'](_0x57063c,_0x4e780e);}_0x2cb26d((_0x2bf93b=_0x2bf93b['apply'](_0x38785d,_0x4a5925||[]))['next']());});};class SearchResultService{constructor(_0x54f6ba){this['fetch']=_0x54f6ba,this['path']='search-result';}['create'](_0x4c8116,_0x131eb8,_0x1e8b34,_0x239b8b,_0x5742bb){return __awaiter$2(this,void 0,void 0,function*(){_0x5742bb=_0x5742bb!==null&&_0x5742bb!==void 0?_0x5742bb:{'description':'','keywords':'','resource_1':'','resource_2':'','resource_3':'','latitude':0x0,'longitude':0x0,'facets':[]};const _0x1f4110=Object['assign']({'account_name':_0x4c8116,'search_result_name':_0x1e8b34,'list_name':_0x131eb8},_0x5742bb);try{const _0xbc565f=yield this['fetch']['post'](this['path'],_0x239b8b,_0x1f4110);if(_0xbc565f['status']>0xc7&&_0xbc565f['status']<0x12c){const _0x2bcbf1=yield _0xbc565f['json']();return new SuccessfulViewSearchResultResponse(_0x2bcbf1);}const _0x4fe864=yield _0xbc565f['json']();return new FailedSearchResultResponse(_0x4fe864);}catch(_0x189151){if(_0x189151 instanceof Error)return new FailedSearchResultResponse({'detail':_0x189151['message'],'title':_0x189151['name'],'status':0x1f4,'instance':'','type':''});throw _0x189151;}});}['transfer'](_0x5c2a13,_0x51e636,_0x40aa4c,_0xccc46f){return __awaiter$2(this,void 0,void 0,function*(){const _0x2d8116={'account_name':_0x5c2a13,'list_name':_0x51e636,'new_search_service_name':_0x40aa4c};try{const _0x2dfafe=yield this['fetch']['post'](this['path']+'/transfer',_0xccc46f,_0x2d8116);if(_0x2dfafe['status']>0xc7&&_0x2dfafe['status']<0x12c){const _0xea6d2d=yield _0x2dfafe['json']();return new SuccessfulResponse(_0xea6d2d);}const _0x1f86fe=yield _0x2dfafe['json']();return new FailedResponse(_0x1f86fe);}catch(_0x5dd1fd){if(_0x5dd1fd instanceof Error)return new FailedResponse({'detail':_0x5dd1fd['message'],'title':_0x5dd1fd['name'],'status':0x1f4,'instance':'','type':''});throw _0x5dd1fd;}});}}
|
|
16
|
+
|
|
17
|
+
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x195afe,_0x31d62c,_0x5acafa,_0x4afdcb){function _0x18be8d(_0x13b088){return _0x13b088 instanceof _0x5acafa?_0x13b088:new _0x5acafa(function(_0x46a76d){_0x46a76d(_0x13b088);});}return new(_0x5acafa||(_0x5acafa=Promise))(function(_0x32b6ba,_0x4b6a13){function _0x2fb80e(_0x4dac46){try{_0x58eb55(_0x4afdcb['next'](_0x4dac46));}catch(_0x2825ed){_0x4b6a13(_0x2825ed);}}function _0x988264(_0x268202){try{_0x58eb55(_0x4afdcb['throw'](_0x268202));}catch(_0x5f3e50){_0x4b6a13(_0x5f3e50);}}function _0x58eb55(_0x3364d0){_0x3364d0['done']?_0x32b6ba(_0x3364d0['value']):_0x18be8d(_0x3364d0['value'])['then'](_0x2fb80e,_0x988264);}_0x58eb55((_0x4afdcb=_0x4afdcb['apply'](_0x195afe,_0x31d62c||[]))['next']());});};class ContributorService{constructor(_0x45e61d){this['fetch']=_0x45e61d,this['path']='contributor';}['create'](_0x300ada,_0x194c6f,_0x308637,_0x43d0b5){return __awaiter$1(this,void 0,void 0,function*(){const _0x2525c2={'account_name':_0x300ada,'list_name':_0x194c6f,'contributor_name':_0x308637};try{const _0x593d4d=yield this['fetch']['post'](this['path'],_0x43d0b5,_0x2525c2);if(_0x593d4d['status']>0xc7&&_0x593d4d['status']<0x12c){const _0x369cdb=yield _0x593d4d['json']();return new SuccessfulContributorResponse(_0x369cdb);}const _0x84e600=yield _0x593d4d['json']();return new FailedContributorResponse(_0x84e600);}catch(_0x2b2f61){if(_0x2b2f61 instanceof Error)return new FailedContributorResponse({'detail':_0x2b2f61['message'],'title':_0x2b2f61['name'],'status':0x1f4,'instance':'','type':''});throw _0x2b2f61;}});}['remove'](_0x47c7f6,_0x32d398,_0x3d2bea,_0x3cdd81){return __awaiter$1(this,void 0,void 0,function*(){const _0x3203db=this['path']+'/'+_0x47c7f6+'/'+_0x32d398+'/'+_0x3d2bea,_0x354600=yield this['fetch']['delete'](_0x3203db,_0x3cdd81);try{if(_0x354600['status']>0xc7&&_0x354600['status']<0x12c)return new SuccessfulResponse({});const _0x28de75=yield _0x354600['json']();return new FailedResponse(_0x28de75);}catch(_0x257855){if(_0x257855 instanceof Error)return new FailedResponse({'detail':_0x257855['message'],'title':_0x257855['name'],'status':0x1f4,'instance':'','type':''});throw _0x257855;}});}['startsWith'](_0x242fcc,_0x315dc2){return __awaiter$1(this,void 0,void 0,function*(){const _0x16346e=this['path']+'/'+_0x242fcc;try{const _0x56f9f1=yield this['fetch']['get'](_0x16346e,_0x315dc2);if(_0x56f9f1['status']>0xc7&&_0x56f9f1['status']<0x12c){const _0x32586d=yield _0x56f9f1['json']();return new SuccessfulAccountAndImageResponse(_0x32586d);}const _0x30425b=yield _0x56f9f1['json']();return new FailedAccountAndImageResponse(_0x30425b);}catch(_0x4d823f){if(_0x4d823f instanceof Error)return new FailedAccountAndImageResponse({'detail':_0x4d823f['message'],'title':_0x4d823f['name'],'status':0x1f4,'instance':'','type':''});throw _0x4d823f;}});}}
|
|
18
|
+
|
|
19
|
+
var __awaiter=undefined&&undefined['__awaiter']||function(_0x5c8bc2,_0x39c3fa,_0x1daa5f,_0x4d9ac6){function _0x303278(_0x323791){return _0x323791 instanceof _0x1daa5f?_0x323791:new _0x1daa5f(function(_0xe712b7){_0xe712b7(_0x323791);});}return new(_0x1daa5f||(_0x1daa5f=Promise))(function(_0x1539ac,_0x503878){function _0x984cd7(_0x16f2b9){try{_0x53c36c(_0x4d9ac6['next'](_0x16f2b9));}catch(_0x594812){_0x503878(_0x594812);}}function _0x2a22e1(_0x1c0475){try{_0x53c36c(_0x4d9ac6['throw'](_0x1c0475));}catch(_0x6252e7){_0x503878(_0x6252e7);}}function _0x53c36c(_0x5f3c9b){_0x5f3c9b['done']?_0x1539ac(_0x5f3c9b['value']):_0x303278(_0x5f3c9b['value'])['then'](_0x984cd7,_0x2a22e1);}_0x53c36c((_0x4d9ac6=_0x4d9ac6['apply'](_0x5c8bc2,_0x39c3fa||[]))['next']());});};class AdminClient{constructor(_0x4e7173='https://admin.searchability.dev/'){var _0x2e925c=new Fetch(_0x4e7173);this['Accounts']=new AccountService(_0x2e925c),this['Lists']=new ListService(_0x2e925c),this['ApiKeys']=new ApiKeyService(_0x2e925c),this['SearchServers']=new SearchServersService(_0x2e925c),this['Facets']=new FacetService(_0x2e925c),this['SearchResults']=new SearchResultService(_0x2e925c),this['Contributors']=new ContributorService(_0x2e925c);}}class AuthClient{constructor(_0x11f66d='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x11f66d);}['login'](_0x328d92){return __awaiter(this,void 0,void 0,function*(){const _0x533ee1='login/'+_0x328d92;try{const _0x186a5d=yield yield fetch(_0x533ee1);if(_0x186a5d['status']>0xc7&&_0x186a5d['status']<0x12c){const _0x215da8=yield _0x186a5d['json']();return new SuccessfulAuthResponse(_0x215da8);}const _0x3453b5=yield _0x186a5d['json']();return new FailedAuthResponse(_0x3453b5);}catch(_0x54181a){if(_0x54181a instanceof Error)return new FailedAuthResponse({'detail':_0x54181a['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x54181a;}});}['refresh'](_0x5570c0){return __awaiter(this,void 0,void 0,function*(){const _0x3324fe='refresh',_0xdc9b4f={'refresh_token':_0x5570c0};try{const _0x1ab3f8=yield this['fetch']['PostNoAuth'](_0x3324fe,_0xdc9b4f);if(_0x1ab3f8['status']>0xc7&&_0x1ab3f8['status']<0x12c){const _0x50cbfd=yield _0x1ab3f8['json']();return new SuccessfulAuthResponse(_0x50cbfd);}const _0x271b8d=yield _0x1ab3f8['json']();return new FailedAuthResponse(_0x271b8d);}catch(_0x17ba64){if(_0x17ba64 instanceof Error)return new FailedAuthResponse({'detail':_0x17ba64['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x17ba64;}});}['getTokenStatus'](_0x4b3f09){if(Date['now']()<_0x4b3f09['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x4b3f09['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(_0x31f06d){_0x31f06d[_0x31f06d['Ok']=0x0]='Ok',_0x31f06d[_0x31f06d['Refresh']=0x1]='Refresh',_0x31f06d[_0x31f06d['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(_0x37de23){this['isSuccess']=_0x37de23;}}class SuccessfulContributorResponse extends Response{constructor(_0x31b34c){super(!![]),this['contributor']=_0x31b34c;}['toSuccess'](){return this['contributor'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedContributorResponse extends Response{constructor(_0x2f9685){super(![]),this['problem']=_0x2f9685;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountAndImageResponse extends Response{constructor(_0xbb8b98){super(!![]),this['accountAndImages']=_0xbb8b98;}['toSuccess'](){return this['accountAndImages'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountAndImageResponse extends Response{constructor(_0xe74f46){super(![]),this['problem']=_0xe74f46;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulFacetResponse extends Response{constructor(_0x551041){super(!![]),this['facet']=_0x551041;}['toSuccess'](){return this['facet'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetResponse extends Response{constructor(_0x476ee9){super(![]),this['problem']=_0x476ee9;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountResponse extends Response{constructor(_0x2e75f3){super(!![]),this['account']=_0x2e75f3;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountImageResponse extends Response{constructor(_0x23a13c){super(!![]),this['accountImage']=_0x23a13c;}['toSuccess'](){return this['accountImage'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListIdentityResponse extends Response{constructor(_0x2f05ad){super(!![]),this['list']=_0x2f05ad;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListResponse extends Response{constructor(_0xcad601){super(!![]),this['list']=_0xcad601;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x4f1bd6){super(![]),this['problem']=_0x4f1bd6;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountImageResponse extends Response{constructor(_0xdad229){super(![]),this['problem']=_0xdad229;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListIdentityResponse extends Response{constructor(_0x2db0da){super(![]),this['problem']=_0x2db0da;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListResponse extends Response{constructor(_0x43e323){super(![]),this['problem']=_0x43e323;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x274b94){super(!![]),this['tokens']=_0x274b94;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x25519d){super(![]),this['problem']=_0x25519d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x1ea811){super(!![]),this['apiKey']=_0x1ea811;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x2a3544){super(![]),this['problem']=_0x2a3544;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x50167d){super(!![]),this['searchService']=_0x50167d;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x1eabee){super(![]),this['problem']=_0x1eabee;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x59ad34){super(!![]),this['searchService']=_0x59ad34;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulViewSearchResultResponse extends Response{constructor(_0x6d5288){super(!![]),this['searchResult']=_0x6d5288;}['toSuccess'](){return this['searchResult'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchResultResponse extends Response{constructor(_0x4d3244){super(![]),this['problem']=_0x4d3244;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchServiceResponse extends Response{constructor(_0x25f48b){super(!![]),this['searchServices']=_0x25f48b;}['toSuccess'](){return this['searchServices'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServicesResponse extends Response{constructor(_0x353521){super(![]),this['problem']=_0x353521;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedViewSearchServiceResponse extends Response{constructor(_0x4a8457){super(![]),this['problem']=_0x4a8457;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x44f914){super(!![]),this['apiKeyValue']=_0x44f914;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x5f79fe){super(!![]),this['obj']=_0x5f79fe;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x3eba7c){super(![]),this['problem']=_0x3eba7c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0xcef114){super(![]),this['problem']=_0xcef114;}['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(_0x2567cd,_0x4059fe,_0x2c6a92,_0x36b60d){function _0x2deaf2(_0x186fcc){return _0x186fcc instanceof _0x2c6a92?_0x186fcc:new _0x2c6a92(function(_0x5ebb35){_0x5ebb35(_0x186fcc);});}return new(_0x2c6a92||(_0x2c6a92=Promise))(function(_0x238a50,_0x55a8c7){function _0x2343d6(_0x4285f9){try{_0x55ca00(_0x36b60d['next'](_0x4285f9));}catch(_0x10b669){_0x55a8c7(_0x10b669);}}function _0x4ef443(_0x2f7fed){try{_0x55ca00(_0x36b60d['throw'](_0x2f7fed));}catch(_0x1a9b0d){_0x55a8c7(_0x1a9b0d);}}function _0x55ca00(_0x2f5826){_0x2f5826['done']?_0x238a50(_0x2f5826['value']):_0x2deaf2(_0x2f5826['value'])['then'](_0x2343d6,_0x4ef443);}_0x55ca00((_0x36b60d=_0x36b60d['apply'](_0x2567cd,_0x4059fe||[]))['next']());});};class AccountService{constructor(_0x2fcb1a){this['fetch']=_0x2fcb1a;}['get'](_0x3e7720,_0x2be76f){return __awaiter$8(this,void 0,void 0,function*(){const _0x50aa6b='Account/'+_0x3e7720+'/',_0x4f4e3a=yield this['fetch']['get'](_0x50aa6b,_0x2be76f);try{if(_0x4f4e3a['status']>0xc7&&_0x4f4e3a['status']<0x12c){const _0x4b9146=yield _0x4f4e3a['json']();return new SuccessfulAccountResponse(_0x4b9146);}const _0x314255=yield _0x4f4e3a['json']();return new FailedAccountResponse(_0x314255);}catch(_0x4bad9c){if(_0x4bad9c instanceof Error)return new FailedAccountResponse({'detail':_0x4bad9c['message'],'title':_0x4bad9c['name'],'status':0x1f4,'instance':'','type':''});throw _0x4bad9c;}});}['getImage'](_0x4a7b41,_0xac8e99){return __awaiter$8(this,void 0,void 0,function*(){const _0x427240='account/image/'+_0x4a7b41+'/',_0x4a9f14=yield this['fetch']['get'](_0x427240,_0xac8e99);try{if(_0x4a9f14['status']>0xc7&&_0x4a9f14['status']<0x12c){const _0x4bd33a=yield _0x4a9f14['json']();return new SuccessfulAccountImageResponse(_0x4bd33a);}const _0x311f8a=yield _0x4a9f14['json']();return new FailedAccountImageResponse(_0x311f8a);}catch(_0x46fb79){if(_0x46fb79 instanceof Error)return new FailedAccountImageResponse({'detail':_0x46fb79['message'],'title':_0x46fb79['name'],'status':0x1f4,'instance':'','type':''});throw _0x46fb79;}});}}
|
|
6
6
|
|
|
7
|
-
var __awaiter$7=undefined&&undefined['__awaiter']||function(
|
|
7
|
+
var __awaiter$7=undefined&&undefined['__awaiter']||function(_0x4f732a,_0x5b8207,_0x1e45c0,_0xb80d06){function _0x1a25b4(_0x2d06f6){return _0x2d06f6 instanceof _0x1e45c0?_0x2d06f6:new _0x1e45c0(function(_0x20297e){_0x20297e(_0x2d06f6);});}return new(_0x1e45c0||(_0x1e45c0=Promise))(function(_0x583e61,_0x6ab894){function _0x19fb01(_0x1316b8){try{_0x479460(_0xb80d06['next'](_0x1316b8));}catch(_0xac1c93){_0x6ab894(_0xac1c93);}}function _0x1ad987(_0xeab80){try{_0x479460(_0xb80d06['throw'](_0xeab80));}catch(_0x233743){_0x6ab894(_0x233743);}}function _0x479460(_0x1ea9ee){_0x1ea9ee['done']?_0x583e61(_0x1ea9ee['value']):_0x1a25b4(_0x1ea9ee['value'])['then'](_0x19fb01,_0x1ad987);}_0x479460((_0xb80d06=_0xb80d06['apply'](_0x4f732a,_0x5b8207||[]))['next']());});};class ApiKeyService{constructor(_0x50269e){this['fetch']=_0x50269e,this['path']='api-key';}['create'](_0x2caf8b,_0x5da19e,_0x3356fb){return __awaiter$7(this,void 0,void 0,function*(){const _0x2d79d3={'account_name':_0x2caf8b,'api_key_name':_0x5da19e};try{const _0x23d1fb=yield this['fetch']['post'](this['path'],_0x3356fb,_0x2d79d3);if(_0x23d1fb['status']>0xc7&&_0x23d1fb['status']<0x12c){const _0x5b81ae=yield _0x23d1fb['json']();return new SuccessfulApiKeyResponse(_0x5b81ae);}const _0x4af136=yield _0x23d1fb['json']();return new FailedApiKeyResponse(_0x4af136);}catch(_0x260372){if(_0x260372 instanceof Error)return new FailedApiKeyResponse({'detail':_0x260372['message'],'title':_0x260372['name'],'status':0x1f4,'instance':'','type':''});throw _0x260372;}});}['view'](_0x5aba6e,_0x5680d9,_0x1c66d2){return __awaiter$7(this,void 0,void 0,function*(){const _0x22ef6d=this['path']+'/'+_0x5aba6e+'/'+_0x5680d9;try{const _0x165a11=yield this['fetch']['get'](_0x22ef6d,_0x1c66d2);if(_0x165a11['status']>0xc7&&_0x165a11['status']<0x12c){const _0x4800d3=yield _0x165a11['json']();return new SuccessfulApiKeyValueResponse(_0x4800d3);}const _0x5582d3=yield _0x165a11['json']();return new FailedApiKeyValueResponse(_0x5582d3);}catch(_0x649b1f){if(_0x649b1f instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x649b1f['message'],'title':_0x649b1f['name'],'status':0x1f4,'instance':'','type':''});throw _0x649b1f;}});}['delete'](_0xd5908b,_0x46ffbc,_0x3d3ce5){return __awaiter$7(this,void 0,void 0,function*(){const _0x4cb58e=this['path']+'/'+_0xd5908b+'/'+_0x46ffbc;try{const _0x250938=yield this['fetch']['delete'](_0x4cb58e,_0x3d3ce5);if(_0x250938['status']>0xc7&&_0x250938['status']<0x12c)return new SuccessfulResponse({});const _0x49dd11=yield _0x250938['json']();return new FailedResponse(_0x49dd11);}catch(_0x4e3002){if(_0x4e3002 instanceof Error)return new FailedResponse({'detail':_0x4e3002['message'],'title':_0x4e3002['name'],'status':0x1f4,'instance':'','type':''});throw _0x4e3002;}});}}
|
|
8
8
|
|
|
9
|
-
var __awaiter$6=undefined&&undefined['__awaiter']||function(
|
|
9
|
+
var __awaiter$6=undefined&&undefined['__awaiter']||function(_0x4b7cea,_0x4647a0,_0x4d2eb6,_0x13f9a3){function _0x2ae71a(_0x4c2160){return _0x4c2160 instanceof _0x4d2eb6?_0x4c2160:new _0x4d2eb6(function(_0x37eb21){_0x37eb21(_0x4c2160);});}return new(_0x4d2eb6||(_0x4d2eb6=Promise))(function(_0x347cb8,_0x36732a){function _0xf2b4ef(_0x238316){try{_0x218755(_0x13f9a3['next'](_0x238316));}catch(_0x1f667a){_0x36732a(_0x1f667a);}}function _0x465a1f(_0x376c15){try{_0x218755(_0x13f9a3['throw'](_0x376c15));}catch(_0x551957){_0x36732a(_0x551957);}}function _0x218755(_0x4a3877){_0x4a3877['done']?_0x347cb8(_0x4a3877['value']):_0x2ae71a(_0x4a3877['value'])['then'](_0xf2b4ef,_0x465a1f);}_0x218755((_0x13f9a3=_0x13f9a3['apply'](_0x4b7cea,_0x4647a0||[]))['next']());});};class ListService{constructor(_0x2b12b8){this['fetch']=_0x2b12b8;}['create'](_0x421501,_0x49723b,_0x15e6fd,_0x4e376d){return __awaiter$6(this,void 0,void 0,function*(){const _0x5b055c='List',_0x25e298={'account_name':_0x421501,'list_name':_0x49723b,'search_service_name':_0x15e6fd};try{const _0x3e715f=yield this['fetch']['post'](_0x5b055c,_0x4e376d,_0x25e298);if(_0x3e715f['status']>0xc7&&_0x3e715f['status']<0x12c){const _0x4ea362=yield _0x3e715f['json']();return new SuccessfulListIdentityResponse(_0x4ea362);}const _0x27935f=yield _0x3e715f['json']();return new FailedListIdentityResponse(_0x27935f);}catch(_0x48cb5a){if(_0x48cb5a instanceof Error)return new FailedListIdentityResponse({'detail':_0x48cb5a['message'],'title':_0x48cb5a['name'],'status':0x1f4,'instance':'','type':''});throw _0x48cb5a;}});}['delete'](_0xf9d558,_0x47d941,_0x43c0d9){return __awaiter$6(this,void 0,void 0,function*(){const _0x5be3fb='List/'+_0xf9d558+'/'+_0x47d941,_0xc60acb=yield this['fetch']['delete'](_0x5be3fb,_0x43c0d9);try{if(_0xc60acb['status']>0xc7&&_0xc60acb['status']<0x12c)return new SuccessfulResponse({});const _0x436b67=yield _0xc60acb['json']();return new FailedResponse(_0x436b67);}catch(_0x868791){if(_0x868791 instanceof Error)return new FailedResponse({'detail':_0x868791['message'],'title':_0x868791['name'],'status':0x1f4,'instance':'','type':''});throw _0x868791;}});}['get'](_0x3a40cb,_0x2095a2,_0x3df438){return __awaiter$6(this,void 0,void 0,function*(){const _0x5da85c='List/'+_0x3a40cb+'/'+_0x2095a2;try{const _0x192b73=yield this['fetch']['get'](_0x5da85c,_0x3df438);if(_0x192b73['status']>0xc7&&_0x192b73['status']<0x12c){const _0x29007c=yield _0x192b73['json']();return new SuccessfulListResponse(_0x29007c);}const _0x78c76f=yield _0x192b73['json']();return new FailedListResponse(_0x78c76f);}catch(_0x1f3312){if(_0x1f3312 instanceof Error)return new FailedListResponse({'detail':_0x1f3312['message'],'title':_0x1f3312['name'],'status':0x1f4,'instance':'','type':''});throw _0x1f3312;}});}}
|
|
10
10
|
|
|
11
|
-
var __awaiter$5=undefined&&undefined['__awaiter']||function(
|
|
11
|
+
var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x1479f9,_0x1ca6c6,_0xd1da57,_0xcdae60){function _0x1a1cf3(_0x5e4768){return _0x5e4768 instanceof _0xd1da57?_0x5e4768:new _0xd1da57(function(_0xeeca5){_0xeeca5(_0x5e4768);});}return new(_0xd1da57||(_0xd1da57=Promise))(function(_0xce00b1,_0x1c6081){function _0xb51f6b(_0x1efa6e){try{_0x537e80(_0xcdae60['next'](_0x1efa6e));}catch(_0x56d179){_0x1c6081(_0x56d179);}}function _0x94edd2(_0x1c156f){try{_0x537e80(_0xcdae60['throw'](_0x1c156f));}catch(_0x936a85){_0x1c6081(_0x936a85);}}function _0x537e80(_0x4a4553){_0x4a4553['done']?_0xce00b1(_0x4a4553['value']):_0x1a1cf3(_0x4a4553['value'])['then'](_0xb51f6b,_0x94edd2);}_0x537e80((_0xcdae60=_0xcdae60['apply'](_0x1479f9,_0x1ca6c6||[]))['next']());});};class Fetch{constructor(_0x40f608){this['baseUri']=_0x40f608,this['getUrl']=_0x5b791f=>{return _0x5b791f['startsWith']('/')&&(_0x5b791f=_0x5b791f['replace']('/','')),''+this['baseUri']+_0x5b791f;},!_0x40f608['endsWith']('/')&&(_0x40f608=_0x40f608+'/');}['get'](_0x546f78,_0x6a780){return __awaiter$5(this,void 0,void 0,function*(){const _0x5d5fef=this['getUrl'](_0x546f78);return yield fetch(_0x5d5fef,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x6a780}});});}['post'](_0x39e4c9,_0x590deb,_0x424b69){return __awaiter$5(this,void 0,void 0,function*(){const _0x2ae11b=this['getUrl'](_0x39e4c9);return yield fetch(_0x2ae11b,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x590deb},'body':_0x424b69?JSON['stringify'](_0x424b69):null});});}['PostNoAuth'](_0x158641,_0x200485){return __awaiter$5(this,void 0,void 0,function*(){const _0x3a6e69=this['getUrl'](_0x158641);return yield fetch(_0x3a6e69,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0x200485?JSON['stringify'](_0x200485):null});});}['put'](_0x5b1b0a,_0x22f5ec,_0x3c1548){return __awaiter$5(this,void 0,void 0,function*(){const _0x1a7f4a=this['getUrl'](_0x5b1b0a);return yield fetch(_0x1a7f4a,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x22f5ec},'body':_0x3c1548?JSON['stringify'](_0x3c1548):null});});}['delete'](_0x4601df,_0x56d49a){return __awaiter$5(this,void 0,void 0,function*(){const _0x49ee33=this['getUrl'](_0x4601df);return yield fetch(_0x49ee33,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x56d49a}});});}}
|
|
12
12
|
|
|
13
|
-
var __awaiter$4=undefined&&undefined['__awaiter']||function(
|
|
13
|
+
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x517e79,_0x135202,_0x20c17e,_0x88f10a){function _0x46492a(_0x24ba06){return _0x24ba06 instanceof _0x20c17e?_0x24ba06:new _0x20c17e(function(_0x5dbbe5){_0x5dbbe5(_0x24ba06);});}return new(_0x20c17e||(_0x20c17e=Promise))(function(_0x483a59,_0x511ba6){function _0x42db8d(_0x485934){try{_0x47947b(_0x88f10a['next'](_0x485934));}catch(_0x556837){_0x511ba6(_0x556837);}}function _0x59d20f(_0x3ed46e){try{_0x47947b(_0x88f10a['throw'](_0x3ed46e));}catch(_0x2158df){_0x511ba6(_0x2158df);}}function _0x47947b(_0x1b360e){_0x1b360e['done']?_0x483a59(_0x1b360e['value']):_0x46492a(_0x1b360e['value'])['then'](_0x42db8d,_0x59d20f);}_0x47947b((_0x88f10a=_0x88f10a['apply'](_0x517e79,_0x135202||[]))['next']());});};class SearchServersService{constructor(_0xbfd80d){this['fetch']=_0xbfd80d,this['path']='search-services';}['create'](_0x544272,_0x567047,_0x371cef,_0x3014aa,_0x4061b3,_0x47b3eb,_0x4dbf04,_0xd91790){return __awaiter$4(this,void 0,void 0,function*(){const _0x1c0c99={'account_name':_0x544272,'search_service_name':_0x567047,'endpoint':_0x371cef,'key':_0x3014aa,'country':_0x4061b3,'provider':_0x47b3eb,'index_name':_0x4dbf04};try{const _0x451b2d=yield this['fetch']['post'](this['path'],_0xd91790,_0x1c0c99);if(_0x451b2d['status']>0xc7&&_0x451b2d['status']<0x12c){const _0x5673a1=yield _0x451b2d['json']();return new SuccessfulSearchServiceResponse(_0x5673a1);}const _0x52b6d2=yield _0x451b2d['json']();return new FailedSearchServiceResponse(_0x52b6d2);}catch(_0x2ccf55){if(_0x2ccf55 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x2ccf55['message'],'title':_0x2ccf55['name'],'status':0x1f4,'instance':'','type':''});throw _0x2ccf55;}});}['delete'](_0x3d00cc,_0x5959de,_0xbbae9d){return __awaiter$4(this,void 0,void 0,function*(){const _0xcdd421=this['path']+'/'+_0x3d00cc+'/'+_0x5959de;try{const _0x38d67c=yield this['fetch']['delete'](_0xcdd421,_0xbbae9d);if(_0x38d67c['status']>0xc7&&_0x38d67c['status']<0x12c)return new SuccessfulResponse({});const _0x2c5e53=yield _0x38d67c['json']();return new FailedResponse(_0x2c5e53);}catch(_0x20f36d){if(_0x20f36d instanceof Error)return new FailedResponse({'detail':_0x20f36d['message'],'title':_0x20f36d['name'],'status':0x1f4,'instance':'','type':''});throw _0x20f36d;}});}['view'](_0x56e3fb,_0x12d8e2,_0x4dd7ab){return __awaiter$4(this,void 0,void 0,function*(){const _0x45e8d8=this['path']+'/'+_0x56e3fb+'/'+_0x12d8e2;try{const _0xebe9dc=yield this['fetch']['get'](_0x45e8d8,_0x4dd7ab);if(_0xebe9dc['status']>0xc7&&_0xebe9dc['status']<0x12c){const _0x3c0f5f=yield _0xebe9dc['json']();return new SuccessfulViewSearchServiceResponse(_0x3c0f5f);}const _0x51b1fa=yield _0xebe9dc['json']();return new FailedViewSearchServiceResponse(_0x51b1fa);}catch(_0x53ac19){if(_0x53ac19 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x53ac19['message'],'title':_0x53ac19['name'],'status':0x1f4,'instance':'','type':''});throw _0x53ac19;}});}['edit'](_0xa6c7a9,_0x47bdc8,_0x2b67d7,_0x36657d,_0x3d3d4f){return __awaiter$4(this,void 0,void 0,function*(){const _0x3c94e5={'account_name':_0xa6c7a9,'search_service_name':_0x47bdc8,'key':_0x2b67d7,'country':_0x36657d};try{const _0x3ccaad=yield this['fetch']['put'](this['path'],_0x3d3d4f,_0x3c94e5);if(_0x3ccaad['status']>0xc7&&_0x3ccaad['status']<0x12c){const _0x581eeb=yield _0x3ccaad['json']();return new SuccessfulSearchServiceResponse(_0x581eeb);}const _0x4b5612=yield _0x3ccaad['json']();return new FailedSearchServiceResponse(_0x4b5612);}catch(_0x1dcd24){if(_0x1dcd24 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x1dcd24['message'],'title':_0x1dcd24['name'],'status':0x1f4,'instance':'','type':''});throw _0x1dcd24;}});}['list'](_0x2f384d,_0x3de9ba){return __awaiter$4(this,void 0,void 0,function*(){const _0xb9ea9e=this['path']+'/'+_0x2f384d;try{const _0xec5b0f=yield this['fetch']['get'](_0xb9ea9e,_0x3de9ba);if(_0xec5b0f['status']>0xc7&&_0xec5b0f['status']<0x12c){const _0x2b77d8=yield _0xec5b0f['json']();return new SuccessfulListSearchServiceResponse(_0x2b77d8);}const _0xbfcdf9=yield _0xec5b0f['json']();return new FailedViewSearchServicesResponse(_0xbfcdf9);}catch(_0x317249){if(_0x317249 instanceof Error)return new FailedViewSearchServicesResponse({'detail':_0x317249['message'],'title':_0x317249['name'],'status':0x1f4,'instance':'','type':''});throw _0x317249;}});}}
|
|
14
14
|
|
|
15
|
-
var __awaiter$3=undefined&&undefined['__awaiter']||function(
|
|
15
|
+
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x42bf15,_0xbc2826,_0x2fb35f,_0x4e4aeb){function _0x317e90(_0x3cefd8){return _0x3cefd8 instanceof _0x2fb35f?_0x3cefd8:new _0x2fb35f(function(_0x2f9b92){_0x2f9b92(_0x3cefd8);});}return new(_0x2fb35f||(_0x2fb35f=Promise))(function(_0x58ec01,_0x448037){function _0xe714e1(_0x216d58){try{_0x2f283c(_0x4e4aeb['next'](_0x216d58));}catch(_0x1de899){_0x448037(_0x1de899);}}function _0xd11b12(_0x9737c4){try{_0x2f283c(_0x4e4aeb['throw'](_0x9737c4));}catch(_0x3fe76a){_0x448037(_0x3fe76a);}}function _0x2f283c(_0x2bb8c9){_0x2bb8c9['done']?_0x58ec01(_0x2bb8c9['value']):_0x317e90(_0x2bb8c9['value'])['then'](_0xe714e1,_0xd11b12);}_0x2f283c((_0x4e4aeb=_0x4e4aeb['apply'](_0x42bf15,_0xbc2826||[]))['next']());});};class FacetService{constructor(_0x3ab838){this['fetch']=_0x3ab838,this['path']='facet';}['create'](_0x4f68ab,_0x597afb,_0x35c359,_0xdafd5f){return __awaiter$3(this,void 0,void 0,function*(){const _0xbc254a={'account_name':_0x4f68ab,'list_name':_0x597afb,'facet_name':_0x35c359};try{const _0x34d842=yield this['fetch']['post'](this['path'],_0xdafd5f,_0xbc254a);if(_0x34d842['status']>0xc7&&_0x34d842['status']<0x12c){const _0x3c82c6=yield _0x34d842['json']();return new SuccessfulFacetResponse(_0x3c82c6);}const _0x35bce2=yield _0x34d842['json']();return new FailedFacetResponse(_0x35bce2);}catch(_0x3c8cc7){if(_0x3c8cc7 instanceof Error)return new FailedFacetResponse({'detail':_0x3c8cc7['message'],'title':_0x3c8cc7['name'],'status':0x1f4,'instance':'','type':''});throw _0x3c8cc7;}});}['remove'](_0x14ae98,_0x53e1ef,_0x51bd46,_0x42d5c8){return __awaiter$3(this,void 0,void 0,function*(){const _0x45daa4='Facet/'+_0x14ae98+'/'+_0x53e1ef+'/'+_0x51bd46,_0x56b7c2=yield this['fetch']['delete'](_0x45daa4,_0x42d5c8);try{if(_0x56b7c2['status']>0xc7&&_0x56b7c2['status']<0x12c)return new SuccessfulResponse({});const _0x87f24e=yield _0x56b7c2['json']();return new FailedResponse(_0x87f24e);}catch(_0x4f580c){if(_0x4f580c instanceof Error)return new FailedResponse({'detail':_0x4f580c['message'],'title':_0x4f580c['name'],'status':0x1f4,'instance':'','type':''});throw _0x4f580c;}});}['rename'](_0x4f2b8c,_0x305730,_0x2f81d7,_0x397e00,_0x350068){return __awaiter$3(this,void 0,void 0,function*(){const _0x5c62f5={'account_name':_0x4f2b8c,'list_name':_0x305730,'facet_name':_0x2f81d7,'new_facet_name':_0x397e00};try{const _0x756a7=yield this['fetch']['put'](this['path'],_0x350068,_0x5c62f5);if(_0x756a7['status']>0xc7&&_0x756a7['status']<0x12c){const _0x228799=yield _0x756a7['json']();return new SuccessfulFacetResponse(_0x228799);}const _0x1e2fd0=yield _0x756a7['json']();return new FailedFacetResponse(_0x1e2fd0);}catch(_0x19f956){if(_0x19f956 instanceof Error)return new FailedFacetResponse({'detail':_0x19f956['message'],'title':_0x19f956['name'],'status':0x1f4,'instance':'','type':''});throw _0x19f956;}});}}
|
|
16
16
|
|
|
17
|
-
var __awaiter$2=undefined&&undefined['__awaiter']||function(
|
|
17
|
+
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x3edeb0,_0x1062e9,_0x585236,_0x10614d){function _0x3b78f6(_0x44d7a9){return _0x44d7a9 instanceof _0x585236?_0x44d7a9:new _0x585236(function(_0x3ce0aa){_0x3ce0aa(_0x44d7a9);});}return new(_0x585236||(_0x585236=Promise))(function(_0x449398,_0x5df360){function _0x129dcd(_0x11f2ed){try{_0x506c84(_0x10614d['next'](_0x11f2ed));}catch(_0x5eb3b4){_0x5df360(_0x5eb3b4);}}function _0x32b1a4(_0x1d0356){try{_0x506c84(_0x10614d['throw'](_0x1d0356));}catch(_0x4fe640){_0x5df360(_0x4fe640);}}function _0x506c84(_0x3ebcc9){_0x3ebcc9['done']?_0x449398(_0x3ebcc9['value']):_0x3b78f6(_0x3ebcc9['value'])['then'](_0x129dcd,_0x32b1a4);}_0x506c84((_0x10614d=_0x10614d['apply'](_0x3edeb0,_0x1062e9||[]))['next']());});};class SearchResultService{constructor(_0x166957){this['fetch']=_0x166957,this['path']='search-result';}['create'](_0x36ef1d,_0x21d1a8,_0x4d58db,_0x3b7e3d,_0x5dc47c){return __awaiter$2(this,void 0,void 0,function*(){_0x5dc47c=_0x5dc47c!==null&&_0x5dc47c!==void 0?_0x5dc47c:{'description':'','keywords':'','resource_1':'','resource_2':'','resource_3':'','latitude':0x0,'longitude':0x0,'facets':[]};const _0x547616=Object['assign']({'account_name':_0x36ef1d,'search_result_name':_0x4d58db,'list_name':_0x21d1a8},_0x5dc47c);try{const _0x184d3c=yield this['fetch']['post'](this['path'],_0x3b7e3d,_0x547616);if(_0x184d3c['status']>0xc7&&_0x184d3c['status']<0x12c){const _0x3ff3c1=yield _0x184d3c['json']();return new SuccessfulViewSearchResultResponse(_0x3ff3c1);}const _0xc8b134=yield _0x184d3c['json']();return new FailedSearchResultResponse(_0xc8b134);}catch(_0x4d64a0){if(_0x4d64a0 instanceof Error)return new FailedSearchResultResponse({'detail':_0x4d64a0['message'],'title':_0x4d64a0['name'],'status':0x1f4,'instance':'','type':''});throw _0x4d64a0;}});}['transfer'](_0x179369,_0x4eb207,_0x4a264c,_0x34bb3e){return __awaiter$2(this,void 0,void 0,function*(){const _0xed6038={'account_name':_0x179369,'list_name':_0x4eb207,'new_search_service_name':_0x4a264c};try{const _0x16d98c=yield this['fetch']['post'](this['path']+'/transfer',_0x34bb3e,_0xed6038);if(_0x16d98c['status']>0xc7&&_0x16d98c['status']<0x12c){const _0x4c268b=yield _0x16d98c['json']();return new SuccessfulResponse(_0x4c268b);}const _0x19c1bf=yield _0x16d98c['json']();return new FailedResponse(_0x19c1bf);}catch(_0x4a12ca){if(_0x4a12ca instanceof Error)return new FailedResponse({'detail':_0x4a12ca['message'],'title':_0x4a12ca['name'],'status':0x1f4,'instance':'','type':''});throw _0x4a12ca;}});}}
|
|
18
18
|
|
|
19
|
-
var __awaiter$1=undefined&&undefined['__awaiter']||function(
|
|
19
|
+
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x3c53e5,_0xdb497a,_0x5f3659,_0x2e5ee9){function _0x38775b(_0x859114){return _0x859114 instanceof _0x5f3659?_0x859114:new _0x5f3659(function(_0x5a43a1){_0x5a43a1(_0x859114);});}return new(_0x5f3659||(_0x5f3659=Promise))(function(_0x5e4020,_0x37b825){function _0xf01848(_0x30e0ab){try{_0x974360(_0x2e5ee9['next'](_0x30e0ab));}catch(_0x264a59){_0x37b825(_0x264a59);}}function _0x41c818(_0x534206){try{_0x974360(_0x2e5ee9['throw'](_0x534206));}catch(_0x562610){_0x37b825(_0x562610);}}function _0x974360(_0x17c635){_0x17c635['done']?_0x5e4020(_0x17c635['value']):_0x38775b(_0x17c635['value'])['then'](_0xf01848,_0x41c818);}_0x974360((_0x2e5ee9=_0x2e5ee9['apply'](_0x3c53e5,_0xdb497a||[]))['next']());});};class ContributorService{constructor(_0x2a36fd){this['fetch']=_0x2a36fd,this['path']='contributor';}['create'](_0x14cdf2,_0x11a1dd,_0x35ac37,_0x1eb9a4){return __awaiter$1(this,void 0,void 0,function*(){const _0x25da13={'account_name':_0x14cdf2,'list_name':_0x11a1dd,'contributor_name':_0x35ac37};try{const _0x2ae6c1=yield this['fetch']['post'](this['path'],_0x1eb9a4,_0x25da13);if(_0x2ae6c1['status']>0xc7&&_0x2ae6c1['status']<0x12c){const _0x10f08c=yield _0x2ae6c1['json']();return new SuccessfulContributorResponse(_0x10f08c);}const _0x5237a4=yield _0x2ae6c1['json']();return new FailedContributorResponse(_0x5237a4);}catch(_0x3c8c66){if(_0x3c8c66 instanceof Error)return new FailedContributorResponse({'detail':_0x3c8c66['message'],'title':_0x3c8c66['name'],'status':0x1f4,'instance':'','type':''});throw _0x3c8c66;}});}['remove'](_0x136166,_0x10f260,_0x5062c4,_0x2308a9){return __awaiter$1(this,void 0,void 0,function*(){const _0x5c1fef=this['path']+'/'+_0x136166+'/'+_0x10f260+'/'+_0x5062c4,_0x3a06b2=yield this['fetch']['delete'](_0x5c1fef,_0x2308a9);try{if(_0x3a06b2['status']>0xc7&&_0x3a06b2['status']<0x12c)return new SuccessfulResponse({});const _0x139d28=yield _0x3a06b2['json']();return new FailedResponse(_0x139d28);}catch(_0x179dad){if(_0x179dad instanceof Error)return new FailedResponse({'detail':_0x179dad['message'],'title':_0x179dad['name'],'status':0x1f4,'instance':'','type':''});throw _0x179dad;}});}['startsWith'](_0x520101,_0x53849b){return __awaiter$1(this,void 0,void 0,function*(){const _0x36752e=this['path']+'/'+_0x520101;try{const _0x48437d=yield this['fetch']['get'](_0x36752e,_0x53849b);if(_0x48437d['status']>0xc7&&_0x48437d['status']<0x12c){const _0x1685ab=yield _0x48437d['json']();return new SuccessfulAccountAndImageResponse(_0x1685ab);}const _0xa11d21=yield _0x48437d['json']();return new FailedAccountAndImageResponse(_0xa11d21);}catch(_0x557ebc){if(_0x557ebc instanceof Error)return new FailedAccountAndImageResponse({'detail':_0x557ebc['message'],'title':_0x557ebc['name'],'status':0x1f4,'instance':'','type':''});throw _0x557ebc;}});}}
|
|
20
20
|
|
|
21
|
-
var __awaiter=undefined&&undefined['__awaiter']||function(
|
|
21
|
+
var __awaiter=undefined&&undefined['__awaiter']||function(_0x3288ef,_0xeba800,_0x43d51a,_0x104646){function _0x3b1066(_0x14f302){return _0x14f302 instanceof _0x43d51a?_0x14f302:new _0x43d51a(function(_0x2e7679){_0x2e7679(_0x14f302);});}return new(_0x43d51a||(_0x43d51a=Promise))(function(_0x50278a,_0x9a324f){function _0x5e5247(_0x41c0ff){try{_0x2a54a6(_0x104646['next'](_0x41c0ff));}catch(_0x16d0f7){_0x9a324f(_0x16d0f7);}}function _0x543625(_0x377b7c){try{_0x2a54a6(_0x104646['throw'](_0x377b7c));}catch(_0x109120){_0x9a324f(_0x109120);}}function _0x2a54a6(_0x1c0695){_0x1c0695['done']?_0x50278a(_0x1c0695['value']):_0x3b1066(_0x1c0695['value'])['then'](_0x5e5247,_0x543625);}_0x2a54a6((_0x104646=_0x104646['apply'](_0x3288ef,_0xeba800||[]))['next']());});};class AdminClient{constructor(_0x4c9f9f='https://admin.searchability.dev/'){var _0x2c8bf4=new Fetch(_0x4c9f9f);this['Accounts']=new AccountService(_0x2c8bf4),this['Lists']=new ListService(_0x2c8bf4),this['ApiKeys']=new ApiKeyService(_0x2c8bf4),this['SearchServers']=new SearchServersService(_0x2c8bf4),this['Facets']=new FacetService(_0x2c8bf4),this['SearchResults']=new SearchResultService(_0x2c8bf4),this['Contributors']=new ContributorService(_0x2c8bf4);}}class AuthClient{constructor(_0x18faf7='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x18faf7);}['login'](_0x5b0091){return __awaiter(this,void 0,void 0,function*(){const _0x37a1ed='login/'+_0x5b0091;try{const _0x30556e=yield yield fetch(_0x37a1ed);if(_0x30556e['status']>0xc7&&_0x30556e['status']<0x12c){const _0x4da88d=yield _0x30556e['json']();return new SuccessfulAuthResponse(_0x4da88d);}const _0xe07525=yield _0x30556e['json']();return new FailedAuthResponse(_0xe07525);}catch(_0x638418){if(_0x638418 instanceof Error)return new FailedAuthResponse({'detail':_0x638418['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x638418;}});}['refresh'](_0x2e776d){return __awaiter(this,void 0,void 0,function*(){const _0x3983e0='refresh',_0x17b588={'refresh_token':_0x2e776d};try{const _0x22049d=yield this['fetch']['PostNoAuth'](_0x3983e0,_0x17b588);if(_0x22049d['status']>0xc7&&_0x22049d['status']<0x12c){const _0x538695=yield _0x22049d['json']();return new SuccessfulAuthResponse(_0x538695);}const _0x5b9c8b=yield _0x22049d['json']();return new FailedAuthResponse(_0x5b9c8b);}catch(_0x5ba88f){if(_0x5ba88f instanceof Error)return new FailedAuthResponse({'detail':_0x5ba88f['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x5ba88f;}});}['getTokenStatus'](_0x21434d){if(Date['now']()<_0x21434d['access_expires'])return exports.TokenStatus['Ok'];if(Date['now']()<_0x21434d['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(_0x260c9d){_0x260c9d[_0x260c9d['Ok']=0x0]='Ok',_0x260c9d[_0x260c9d['Refresh']=0x1]='Refresh',_0x260c9d[_0x260c9d['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(_0x1cb16d){this['isSuccess']=_0x1cb16d;}}class SuccessfulContributorResponse extends Response{constructor(_0x1c643f){super(!![]),this['contributor']=_0x1c643f;}['toSuccess'](){return this['contributor'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedContributorResponse extends Response{constructor(_0x4284fe){super(![]),this['problem']=_0x4284fe;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountAndImageResponse extends Response{constructor(_0x37fa9c){super(!![]),this['accountAndImages']=_0x37fa9c;}['toSuccess'](){return this['accountAndImages'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountAndImageResponse extends Response{constructor(_0x39784a){super(![]),this['problem']=_0x39784a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulFacetResponse extends Response{constructor(_0x5f3161){super(!![]),this['facet']=_0x5f3161;}['toSuccess'](){return this['facet'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetResponse extends Response{constructor(_0x2f34ea){super(![]),this['problem']=_0x2f34ea;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountResponse extends Response{constructor(_0x33d0cc){super(!![]),this['account']=_0x33d0cc;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountImageResponse extends Response{constructor(_0x20a11e){super(!![]),this['accountImage']=_0x20a11e;}['toSuccess'](){return this['accountImage'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListIdentityResponse extends Response{constructor(_0x49a887){super(!![]),this['list']=_0x49a887;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListResponse extends Response{constructor(_0x51d6c3){super(!![]),this['list']=_0x51d6c3;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0xc64b96){super(![]),this['problem']=_0xc64b96;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountImageResponse extends Response{constructor(_0x2dbccc){super(![]),this['problem']=_0x2dbccc;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListIdentityResponse extends Response{constructor(_0x77e4b8){super(![]),this['problem']=_0x77e4b8;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListResponse extends Response{constructor(_0x311857){super(![]),this['problem']=_0x311857;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0xfcd799){super(!![]),this['tokens']=_0xfcd799;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x218286){super(![]),this['problem']=_0x218286;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x316bff){super(!![]),this['apiKey']=_0x316bff;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x21c3bb){super(![]),this['problem']=_0x21c3bb;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x465763){super(!![]),this['searchService']=_0x465763;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x4d1648){super(![]),this['problem']=_0x4d1648;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x212444){super(!![]),this['searchService']=_0x212444;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulViewSearchResultResponse extends Response{constructor(_0x1e50d4){super(!![]),this['searchResult']=_0x1e50d4;}['toSuccess'](){return this['searchResult'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchResultResponse extends Response{constructor(_0x1563bd){super(![]),this['problem']=_0x1563bd;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchServiceResponse extends Response{constructor(_0x1c020d){super(!![]),this['searchServices']=_0x1c020d;}['toSuccess'](){return this['searchServices'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServicesResponse extends Response{constructor(_0xb5b44b){super(![]),this['problem']=_0xb5b44b;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedViewSearchServiceResponse extends Response{constructor(_0x333947){super(![]),this['problem']=_0x333947;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x1a8e83){super(!![]),this['apiKeyValue']=_0x1a8e83;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x2cfd4e){super(!![]),this['obj']=_0x2cfd4e;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0xcff5dd){super(![]),this['problem']=_0xcff5dd;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x3fa099){super(![]),this['problem']=_0x3fa099;}['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(_0x263dca,_0x4b5591,_0x49f6ed,_0x52a0e8){function _0x46e5e9(_0xe62fad){return _0xe62fad instanceof _0x49f6ed?_0xe62fad:new _0x49f6ed(function(_0x2e5b65){_0x2e5b65(_0xe62fad);});}return new(_0x49f6ed||(_0x49f6ed=Promise))(function(_0x4c7d27,_0x11ca54){function _0x2ac91a(_0x2a1bc2){try{_0x672dc5(_0x52a0e8['next'](_0x2a1bc2));}catch(_0x48ec68){_0x11ca54(_0x48ec68);}}function _0x1b90cb(_0x55cade){try{_0x672dc5(_0x52a0e8['throw'](_0x55cade));}catch(_0x5e6ff5){_0x11ca54(_0x5e6ff5);}}function _0x672dc5(_0x3b020b){_0x3b020b['done']?_0x4c7d27(_0x3b020b['value']):_0x46e5e9(_0x3b020b['value'])['then'](_0x2ac91a,_0x1b90cb);}_0x672dc5((_0x52a0e8=_0x52a0e8['apply'](_0x263dca,_0x4b5591||[]))['next']());});};class AccountService{constructor(_0x4bc40c){this['fetch']=_0x4bc40c;}['get'](_0x3843c4,_0x102c03){return __awaiter$8(this,void 0,void 0,function*(){const _0x1474c7='Account/'+_0x3843c4+'/',_0x184086=yield this['fetch']['get'](_0x1474c7,_0x102c03);try{if(_0x184086['status']>0xc7&&_0x184086['status']<0x12c){const _0x102af7=yield _0x184086['json']();return new SuccessfulAccountResponse(_0x102af7);}const _0x4e761a=yield _0x184086['json']();return new FailedAccountResponse(_0x4e761a);}catch(_0x5f65dc){if(_0x5f65dc instanceof Error)return new FailedAccountResponse({'detail':_0x5f65dc['message'],'title':_0x5f65dc['name'],'status':0x1f4,'instance':'','type':''});throw _0x5f65dc;}});}['getImage'](_0x4cb838,_0x279bec){return __awaiter$8(this,void 0,void 0,function*(){const _0x43911a='account/image/'+_0x4cb838+'/',_0x2a0a92=yield this['fetch']['get'](_0x43911a,_0x279bec);try{if(_0x2a0a92['status']>0xc7&&_0x2a0a92['status']<0x12c){const _0x431a56=yield _0x2a0a92['json']();return new SuccessfulAccountImageResponse(_0x431a56);}const _0x511472=yield _0x2a0a92['json']();return new FailedAccountImageResponse(_0x511472);}catch(_0xfde4e0){if(_0xfde4e0 instanceof Error)return new FailedAccountImageResponse({'detail':_0xfde4e0['message'],'title':_0xfde4e0['name'],'status':0x1f4,'instance':'','type':''});throw _0xfde4e0;}});}}
|
|
4
4
|
|
|
5
|
-
var __awaiter$7=undefined&&undefined['__awaiter']||function(
|
|
5
|
+
var __awaiter$7=undefined&&undefined['__awaiter']||function(_0x22a146,_0xa55655,_0xf3ac9d,_0x58dabf){function _0x560dba(_0x660e8){return _0x660e8 instanceof _0xf3ac9d?_0x660e8:new _0xf3ac9d(function(_0xa8c713){_0xa8c713(_0x660e8);});}return new(_0xf3ac9d||(_0xf3ac9d=Promise))(function(_0x304901,_0x45c7f5){function _0x8a81e0(_0x25570a){try{_0x5b668b(_0x58dabf['next'](_0x25570a));}catch(_0x1ddd5d){_0x45c7f5(_0x1ddd5d);}}function _0x39919b(_0xfe8827){try{_0x5b668b(_0x58dabf['throw'](_0xfe8827));}catch(_0x2eef49){_0x45c7f5(_0x2eef49);}}function _0x5b668b(_0x41af93){_0x41af93['done']?_0x304901(_0x41af93['value']):_0x560dba(_0x41af93['value'])['then'](_0x8a81e0,_0x39919b);}_0x5b668b((_0x58dabf=_0x58dabf['apply'](_0x22a146,_0xa55655||[]))['next']());});};class ApiKeyService{constructor(_0x471f0e){this['fetch']=_0x471f0e,this['path']='api-key';}['create'](_0x75fa9d,_0x2c54e6,_0x11dcaa){return __awaiter$7(this,void 0,void 0,function*(){const _0x27a56={'account_name':_0x75fa9d,'api_key_name':_0x2c54e6};try{const _0xe1c6c2=yield this['fetch']['post'](this['path'],_0x11dcaa,_0x27a56);if(_0xe1c6c2['status']>0xc7&&_0xe1c6c2['status']<0x12c){const _0x4e5178=yield _0xe1c6c2['json']();return new SuccessfulApiKeyResponse(_0x4e5178);}const _0x35d5f3=yield _0xe1c6c2['json']();return new FailedApiKeyResponse(_0x35d5f3);}catch(_0x56bc03){if(_0x56bc03 instanceof Error)return new FailedApiKeyResponse({'detail':_0x56bc03['message'],'title':_0x56bc03['name'],'status':0x1f4,'instance':'','type':''});throw _0x56bc03;}});}['view'](_0x7ea881,_0x46efb3,_0x112fcb){return __awaiter$7(this,void 0,void 0,function*(){const _0x310280=this['path']+'/'+_0x7ea881+'/'+_0x46efb3;try{const _0x478fb5=yield this['fetch']['get'](_0x310280,_0x112fcb);if(_0x478fb5['status']>0xc7&&_0x478fb5['status']<0x12c){const _0x9a0e8a=yield _0x478fb5['json']();return new SuccessfulApiKeyValueResponse(_0x9a0e8a);}const _0x4b42d1=yield _0x478fb5['json']();return new FailedApiKeyValueResponse(_0x4b42d1);}catch(_0x48d06f){if(_0x48d06f instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x48d06f['message'],'title':_0x48d06f['name'],'status':0x1f4,'instance':'','type':''});throw _0x48d06f;}});}['delete'](_0x4bcb99,_0x3d08be,_0x1f7d0c){return __awaiter$7(this,void 0,void 0,function*(){const _0x5d75e6=this['path']+'/'+_0x4bcb99+'/'+_0x3d08be;try{const _0x33c2d2=yield this['fetch']['delete'](_0x5d75e6,_0x1f7d0c);if(_0x33c2d2['status']>0xc7&&_0x33c2d2['status']<0x12c)return new SuccessfulResponse({});const _0x26f738=yield _0x33c2d2['json']();return new FailedResponse(_0x26f738);}catch(_0x88bb8e){if(_0x88bb8e instanceof Error)return new FailedResponse({'detail':_0x88bb8e['message'],'title':_0x88bb8e['name'],'status':0x1f4,'instance':'','type':''});throw _0x88bb8e;}});}}
|
|
6
6
|
|
|
7
|
-
var __awaiter$6=undefined&&undefined['__awaiter']||function(
|
|
7
|
+
var __awaiter$6=undefined&&undefined['__awaiter']||function(_0x4f9a55,_0xd0dd3c,_0x1beab,_0x5a7376){function _0x384724(_0x2d9b8f){return _0x2d9b8f instanceof _0x1beab?_0x2d9b8f:new _0x1beab(function(_0x165a62){_0x165a62(_0x2d9b8f);});}return new(_0x1beab||(_0x1beab=Promise))(function(_0x28596c,_0x3ab8dd){function _0x14af22(_0x49f91f){try{_0x31c2ed(_0x5a7376['next'](_0x49f91f));}catch(_0x87848b){_0x3ab8dd(_0x87848b);}}function _0x464bfa(_0x2595a9){try{_0x31c2ed(_0x5a7376['throw'](_0x2595a9));}catch(_0xdf8d98){_0x3ab8dd(_0xdf8d98);}}function _0x31c2ed(_0x5d8822){_0x5d8822['done']?_0x28596c(_0x5d8822['value']):_0x384724(_0x5d8822['value'])['then'](_0x14af22,_0x464bfa);}_0x31c2ed((_0x5a7376=_0x5a7376['apply'](_0x4f9a55,_0xd0dd3c||[]))['next']());});};class ListService{constructor(_0x176642){this['fetch']=_0x176642;}['create'](_0x5b8661,_0x50b9fe,_0xa84db6,_0x17dd8d){return __awaiter$6(this,void 0,void 0,function*(){const _0x40d8c1='List',_0x2e5d5f={'account_name':_0x5b8661,'list_name':_0x50b9fe,'search_service_name':_0xa84db6};try{const _0x577422=yield this['fetch']['post'](_0x40d8c1,_0x17dd8d,_0x2e5d5f);if(_0x577422['status']>0xc7&&_0x577422['status']<0x12c){const _0x25807a=yield _0x577422['json']();return new SuccessfulListIdentityResponse(_0x25807a);}const _0x1b407c=yield _0x577422['json']();return new FailedListIdentityResponse(_0x1b407c);}catch(_0x5e6594){if(_0x5e6594 instanceof Error)return new FailedListIdentityResponse({'detail':_0x5e6594['message'],'title':_0x5e6594['name'],'status':0x1f4,'instance':'','type':''});throw _0x5e6594;}});}['delete'](_0x12a68a,_0x57e4ea,_0x4792ae){return __awaiter$6(this,void 0,void 0,function*(){const _0x1d3642='List/'+_0x12a68a+'/'+_0x57e4ea,_0x1353a8=yield this['fetch']['delete'](_0x1d3642,_0x4792ae);try{if(_0x1353a8['status']>0xc7&&_0x1353a8['status']<0x12c)return new SuccessfulResponse({});const _0x2718e2=yield _0x1353a8['json']();return new FailedResponse(_0x2718e2);}catch(_0x5b43a4){if(_0x5b43a4 instanceof Error)return new FailedResponse({'detail':_0x5b43a4['message'],'title':_0x5b43a4['name'],'status':0x1f4,'instance':'','type':''});throw _0x5b43a4;}});}['get'](_0x9990f3,_0x2db349,_0xad59ca){return __awaiter$6(this,void 0,void 0,function*(){const _0x3403d5='List/'+_0x9990f3+'/'+_0x2db349;try{const _0x2ee086=yield this['fetch']['get'](_0x3403d5,_0xad59ca);if(_0x2ee086['status']>0xc7&&_0x2ee086['status']<0x12c){const _0x2e8ad2=yield _0x2ee086['json']();return new SuccessfulListResponse(_0x2e8ad2);}const _0x12fbc7=yield _0x2ee086['json']();return new FailedListResponse(_0x12fbc7);}catch(_0x5307a8){if(_0x5307a8 instanceof Error)return new FailedListResponse({'detail':_0x5307a8['message'],'title':_0x5307a8['name'],'status':0x1f4,'instance':'','type':''});throw _0x5307a8;}});}}
|
|
8
8
|
|
|
9
|
-
var __awaiter$5=undefined&&undefined['__awaiter']||function(
|
|
9
|
+
var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x8b1b13,_0x242e85,_0x3751cf,_0x1bd231){function _0x22079b(_0x5b85f4){return _0x5b85f4 instanceof _0x3751cf?_0x5b85f4:new _0x3751cf(function(_0x2ab8bb){_0x2ab8bb(_0x5b85f4);});}return new(_0x3751cf||(_0x3751cf=Promise))(function(_0x574309,_0x45321e){function _0x1eeaa2(_0x52e787){try{_0x432505(_0x1bd231['next'](_0x52e787));}catch(_0x43768d){_0x45321e(_0x43768d);}}function _0x1610cf(_0x1b7264){try{_0x432505(_0x1bd231['throw'](_0x1b7264));}catch(_0xa1ebf9){_0x45321e(_0xa1ebf9);}}function _0x432505(_0x433375){_0x433375['done']?_0x574309(_0x433375['value']):_0x22079b(_0x433375['value'])['then'](_0x1eeaa2,_0x1610cf);}_0x432505((_0x1bd231=_0x1bd231['apply'](_0x8b1b13,_0x242e85||[]))['next']());});};class Fetch{constructor(_0x4a6a82){this['baseUri']=_0x4a6a82,this['getUrl']=_0x1f083f=>{return _0x1f083f['startsWith']('/')&&(_0x1f083f=_0x1f083f['replace']('/','')),''+this['baseUri']+_0x1f083f;},!_0x4a6a82['endsWith']('/')&&(_0x4a6a82=_0x4a6a82+'/');}['get'](_0x49c733,_0x23dd6e){return __awaiter$5(this,void 0,void 0,function*(){const _0x34e8cc=this['getUrl'](_0x49c733);return yield fetch(_0x34e8cc,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x23dd6e}});});}['post'](_0x3da24c,_0x23a919,_0x224a8b){return __awaiter$5(this,void 0,void 0,function*(){const _0x3bf6bb=this['getUrl'](_0x3da24c);return yield fetch(_0x3bf6bb,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x23a919},'body':_0x224a8b?JSON['stringify'](_0x224a8b):null});});}['PostNoAuth'](_0x1f52e7,_0xd5775d){return __awaiter$5(this,void 0,void 0,function*(){const _0x331911=this['getUrl'](_0x1f52e7);return yield fetch(_0x331911,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0xd5775d?JSON['stringify'](_0xd5775d):null});});}['put'](_0x1c60e2,_0xa558b8,_0x57fa66){return __awaiter$5(this,void 0,void 0,function*(){const _0x3590f8=this['getUrl'](_0x1c60e2);return yield fetch(_0x3590f8,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0xa558b8},'body':_0x57fa66?JSON['stringify'](_0x57fa66):null});});}['delete'](_0xe9a4f4,_0x288fa7){return __awaiter$5(this,void 0,void 0,function*(){const _0x55c785=this['getUrl'](_0xe9a4f4);return yield fetch(_0x55c785,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x288fa7}});});}}
|
|
10
10
|
|
|
11
|
-
var __awaiter$4=undefined&&undefined['__awaiter']||function(
|
|
11
|
+
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x6039d4,_0x1b28e3,_0x35858c,_0x4ac749){function _0x46725b(_0x4ad112){return _0x4ad112 instanceof _0x35858c?_0x4ad112:new _0x35858c(function(_0x487983){_0x487983(_0x4ad112);});}return new(_0x35858c||(_0x35858c=Promise))(function(_0x10683c,_0x1216a7){function _0x3a7d81(_0x4fd35f){try{_0x4b5f0f(_0x4ac749['next'](_0x4fd35f));}catch(_0x2f21bd){_0x1216a7(_0x2f21bd);}}function _0x5c2f8f(_0x2a6410){try{_0x4b5f0f(_0x4ac749['throw'](_0x2a6410));}catch(_0x1656f6){_0x1216a7(_0x1656f6);}}function _0x4b5f0f(_0x5a5c73){_0x5a5c73['done']?_0x10683c(_0x5a5c73['value']):_0x46725b(_0x5a5c73['value'])['then'](_0x3a7d81,_0x5c2f8f);}_0x4b5f0f((_0x4ac749=_0x4ac749['apply'](_0x6039d4,_0x1b28e3||[]))['next']());});};class SearchServersService{constructor(_0x13efdb){this['fetch']=_0x13efdb,this['path']='search-services';}['create'](_0x4768af,_0x565187,_0x10666c,_0x18224d,_0x4252f2,_0x15f441,_0x5de778,_0x1b56b5){return __awaiter$4(this,void 0,void 0,function*(){const _0x37c374={'account_name':_0x4768af,'search_service_name':_0x565187,'endpoint':_0x10666c,'key':_0x18224d,'country':_0x4252f2,'provider':_0x15f441,'index_name':_0x5de778};try{const _0x2136b=yield this['fetch']['post'](this['path'],_0x1b56b5,_0x37c374);if(_0x2136b['status']>0xc7&&_0x2136b['status']<0x12c){const _0x38adff=yield _0x2136b['json']();return new SuccessfulSearchServiceResponse(_0x38adff);}const _0x350043=yield _0x2136b['json']();return new FailedSearchServiceResponse(_0x350043);}catch(_0x34af0f){if(_0x34af0f instanceof Error)return new FailedSearchServiceResponse({'detail':_0x34af0f['message'],'title':_0x34af0f['name'],'status':0x1f4,'instance':'','type':''});throw _0x34af0f;}});}['delete'](_0x2a46f4,_0x176aac,_0x3825ae){return __awaiter$4(this,void 0,void 0,function*(){const _0x539928=this['path']+'/'+_0x2a46f4+'/'+_0x176aac;try{const _0xb196a3=yield this['fetch']['delete'](_0x539928,_0x3825ae);if(_0xb196a3['status']>0xc7&&_0xb196a3['status']<0x12c)return new SuccessfulResponse({});const _0x900bba=yield _0xb196a3['json']();return new FailedResponse(_0x900bba);}catch(_0x3fe761){if(_0x3fe761 instanceof Error)return new FailedResponse({'detail':_0x3fe761['message'],'title':_0x3fe761['name'],'status':0x1f4,'instance':'','type':''});throw _0x3fe761;}});}['view'](_0x11ae7c,_0x1f03d3,_0x14fd37){return __awaiter$4(this,void 0,void 0,function*(){const _0x42187a=this['path']+'/'+_0x11ae7c+'/'+_0x1f03d3;try{const _0x583250=yield this['fetch']['get'](_0x42187a,_0x14fd37);if(_0x583250['status']>0xc7&&_0x583250['status']<0x12c){const _0x2d7ab9=yield _0x583250['json']();return new SuccessfulViewSearchServiceResponse(_0x2d7ab9);}const _0x8a7766=yield _0x583250['json']();return new FailedViewSearchServiceResponse(_0x8a7766);}catch(_0x3cd3c1){if(_0x3cd3c1 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x3cd3c1['message'],'title':_0x3cd3c1['name'],'status':0x1f4,'instance':'','type':''});throw _0x3cd3c1;}});}['edit'](_0x582915,_0x16fdf3,_0x220642,_0x5e8dd2,_0x3177ad){return __awaiter$4(this,void 0,void 0,function*(){const _0x246e09={'account_name':_0x582915,'search_service_name':_0x16fdf3,'key':_0x220642,'country':_0x5e8dd2};try{const _0x53ffbf=yield this['fetch']['put'](this['path'],_0x3177ad,_0x246e09);if(_0x53ffbf['status']>0xc7&&_0x53ffbf['status']<0x12c){const _0xba7597=yield _0x53ffbf['json']();return new SuccessfulSearchServiceResponse(_0xba7597);}const _0x556344=yield _0x53ffbf['json']();return new FailedSearchServiceResponse(_0x556344);}catch(_0x4c4546){if(_0x4c4546 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x4c4546['message'],'title':_0x4c4546['name'],'status':0x1f4,'instance':'','type':''});throw _0x4c4546;}});}['list'](_0x14cdaf,_0x16578a){return __awaiter$4(this,void 0,void 0,function*(){const _0x40112b=this['path']+'/'+_0x14cdaf;try{const _0x48dfdb=yield this['fetch']['get'](_0x40112b,_0x16578a);if(_0x48dfdb['status']>0xc7&&_0x48dfdb['status']<0x12c){const _0x9b9b1b=yield _0x48dfdb['json']();return new SuccessfulListSearchServiceResponse(_0x9b9b1b);}const _0x109b4d=yield _0x48dfdb['json']();return new FailedViewSearchServicesResponse(_0x109b4d);}catch(_0xacc20e){if(_0xacc20e instanceof Error)return new FailedViewSearchServicesResponse({'detail':_0xacc20e['message'],'title':_0xacc20e['name'],'status':0x1f4,'instance':'','type':''});throw _0xacc20e;}});}}
|
|
12
12
|
|
|
13
|
-
var __awaiter$3=undefined&&undefined['__awaiter']||function(
|
|
13
|
+
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x14e832,_0x4ae9c1,_0x59fd05,_0x35414a){function _0x13ac7e(_0x541167){return _0x541167 instanceof _0x59fd05?_0x541167:new _0x59fd05(function(_0x47c325){_0x47c325(_0x541167);});}return new(_0x59fd05||(_0x59fd05=Promise))(function(_0x5cf738,_0x1c89b0){function _0xa4a46c(_0x44303){try{_0x14b427(_0x35414a['next'](_0x44303));}catch(_0x38a3fa){_0x1c89b0(_0x38a3fa);}}function _0x33e502(_0x5ab3f3){try{_0x14b427(_0x35414a['throw'](_0x5ab3f3));}catch(_0x36c393){_0x1c89b0(_0x36c393);}}function _0x14b427(_0x55fccc){_0x55fccc['done']?_0x5cf738(_0x55fccc['value']):_0x13ac7e(_0x55fccc['value'])['then'](_0xa4a46c,_0x33e502);}_0x14b427((_0x35414a=_0x35414a['apply'](_0x14e832,_0x4ae9c1||[]))['next']());});};class FacetService{constructor(_0x1511d8){this['fetch']=_0x1511d8,this['path']='facet';}['create'](_0xaecd9b,_0x43d598,_0x4d6ea2,_0x2a900a){return __awaiter$3(this,void 0,void 0,function*(){const _0x557bc7={'account_name':_0xaecd9b,'list_name':_0x43d598,'facet_name':_0x4d6ea2};try{const _0x25c5c8=yield this['fetch']['post'](this['path'],_0x2a900a,_0x557bc7);if(_0x25c5c8['status']>0xc7&&_0x25c5c8['status']<0x12c){const _0x43849f=yield _0x25c5c8['json']();return new SuccessfulFacetResponse(_0x43849f);}const _0x41176a=yield _0x25c5c8['json']();return new FailedFacetResponse(_0x41176a);}catch(_0xdd580f){if(_0xdd580f instanceof Error)return new FailedFacetResponse({'detail':_0xdd580f['message'],'title':_0xdd580f['name'],'status':0x1f4,'instance':'','type':''});throw _0xdd580f;}});}['remove'](_0x5128d2,_0x3da9bb,_0x393190,_0x53bea){return __awaiter$3(this,void 0,void 0,function*(){const _0x272fc7='Facet/'+_0x5128d2+'/'+_0x3da9bb+'/'+_0x393190,_0x21a7ec=yield this['fetch']['delete'](_0x272fc7,_0x53bea);try{if(_0x21a7ec['status']>0xc7&&_0x21a7ec['status']<0x12c)return new SuccessfulResponse({});const _0x2f9e99=yield _0x21a7ec['json']();return new FailedResponse(_0x2f9e99);}catch(_0x5f01d9){if(_0x5f01d9 instanceof Error)return new FailedResponse({'detail':_0x5f01d9['message'],'title':_0x5f01d9['name'],'status':0x1f4,'instance':'','type':''});throw _0x5f01d9;}});}['rename'](_0x1ca606,_0xf9be9f,_0x506568,_0x5762a5,_0x59fb0e){return __awaiter$3(this,void 0,void 0,function*(){const _0x1250ee={'account_name':_0x1ca606,'list_name':_0xf9be9f,'facet_name':_0x506568,'new_facet_name':_0x5762a5};try{const _0x8951bf=yield this['fetch']['put'](this['path'],_0x59fb0e,_0x1250ee);if(_0x8951bf['status']>0xc7&&_0x8951bf['status']<0x12c){const _0x4a0d73=yield _0x8951bf['json']();return new SuccessfulFacetResponse(_0x4a0d73);}const _0x1eca2b=yield _0x8951bf['json']();return new FailedFacetResponse(_0x1eca2b);}catch(_0x4ff8b2){if(_0x4ff8b2 instanceof Error)return new FailedFacetResponse({'detail':_0x4ff8b2['message'],'title':_0x4ff8b2['name'],'status':0x1f4,'instance':'','type':''});throw _0x4ff8b2;}});}}
|
|
14
14
|
|
|
15
|
-
var __awaiter$2=undefined&&undefined['__awaiter']||function(
|
|
15
|
+
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x19ae9c,_0x5b254d,_0xfdfda6,_0x480473){function _0x4663f3(_0x1b5635){return _0x1b5635 instanceof _0xfdfda6?_0x1b5635:new _0xfdfda6(function(_0x105429){_0x105429(_0x1b5635);});}return new(_0xfdfda6||(_0xfdfda6=Promise))(function(_0xa1a3ba,_0x261c43){function _0xce306(_0x17942f){try{_0x12cd30(_0x480473['next'](_0x17942f));}catch(_0x1cdee8){_0x261c43(_0x1cdee8);}}function _0x3dfb8a(_0x324156){try{_0x12cd30(_0x480473['throw'](_0x324156));}catch(_0x16b246){_0x261c43(_0x16b246);}}function _0x12cd30(_0x24459f){_0x24459f['done']?_0xa1a3ba(_0x24459f['value']):_0x4663f3(_0x24459f['value'])['then'](_0xce306,_0x3dfb8a);}_0x12cd30((_0x480473=_0x480473['apply'](_0x19ae9c,_0x5b254d||[]))['next']());});};class SearchResultService{constructor(_0x15cf3c){this['fetch']=_0x15cf3c,this['path']='search-result';}['create'](_0x1312b8,_0x5df312,_0x1a364a,_0xdd99c4,_0x18c6d0){return __awaiter$2(this,void 0,void 0,function*(){_0x18c6d0=_0x18c6d0!==null&&_0x18c6d0!==void 0?_0x18c6d0:{'description':'','keywords':'','resource_1':'','resource_2':'','resource_3':'','latitude':0x0,'longitude':0x0,'facets':[]};const _0x1d4b3d=Object['assign']({'account_name':_0x1312b8,'search_result_name':_0x1a364a,'list_name':_0x5df312},_0x18c6d0);try{const _0x3aad70=yield this['fetch']['post'](this['path'],_0xdd99c4,_0x1d4b3d);if(_0x3aad70['status']>0xc7&&_0x3aad70['status']<0x12c){const _0x362241=yield _0x3aad70['json']();return new SuccessfulViewSearchResultResponse(_0x362241);}const _0x4fd65a=yield _0x3aad70['json']();return new FailedSearchResultResponse(_0x4fd65a);}catch(_0x523b7a){if(_0x523b7a instanceof Error)return new FailedSearchResultResponse({'detail':_0x523b7a['message'],'title':_0x523b7a['name'],'status':0x1f4,'instance':'','type':''});throw _0x523b7a;}});}['transfer'](_0x169bf2,_0x495763,_0x10e6da,_0x41a97e){return __awaiter$2(this,void 0,void 0,function*(){const _0x3fb6fd={'account_name':_0x169bf2,'list_name':_0x495763,'new_search_service_name':_0x10e6da};try{const _0x15c92b=yield this['fetch']['post'](this['path']+'/transfer',_0x41a97e,_0x3fb6fd);if(_0x15c92b['status']>0xc7&&_0x15c92b['status']<0x12c){const _0x2b7db2=yield _0x15c92b['json']();return new SuccessfulResponse(_0x2b7db2);}const _0x10f6dd=yield _0x15c92b['json']();return new FailedResponse(_0x10f6dd);}catch(_0x41dbcf){if(_0x41dbcf instanceof Error)return new FailedResponse({'detail':_0x41dbcf['message'],'title':_0x41dbcf['name'],'status':0x1f4,'instance':'','type':''});throw _0x41dbcf;}});}}
|
|
16
16
|
|
|
17
|
-
var __awaiter$1=undefined&&undefined['__awaiter']||function(
|
|
17
|
+
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x7887c6,_0x48abb8,_0x1931b0,_0x331293){function _0x21b280(_0x357fd6){return _0x357fd6 instanceof _0x1931b0?_0x357fd6:new _0x1931b0(function(_0x8485a4){_0x8485a4(_0x357fd6);});}return new(_0x1931b0||(_0x1931b0=Promise))(function(_0x4ab1d0,_0x2d57e6){function _0x19fab3(_0x1749e0){try{_0x579221(_0x331293['next'](_0x1749e0));}catch(_0x30157d){_0x2d57e6(_0x30157d);}}function _0x32aafe(_0x2ef75d){try{_0x579221(_0x331293['throw'](_0x2ef75d));}catch(_0x503f24){_0x2d57e6(_0x503f24);}}function _0x579221(_0x8c7552){_0x8c7552['done']?_0x4ab1d0(_0x8c7552['value']):_0x21b280(_0x8c7552['value'])['then'](_0x19fab3,_0x32aafe);}_0x579221((_0x331293=_0x331293['apply'](_0x7887c6,_0x48abb8||[]))['next']());});};class ContributorService{constructor(_0x529319){this['fetch']=_0x529319,this['path']='contributor';}['create'](_0x3840f2,_0x511e75,_0x4c0c72,_0x54c272){return __awaiter$1(this,void 0,void 0,function*(){const _0x3b78cf={'account_name':_0x3840f2,'list_name':_0x511e75,'contributor_name':_0x4c0c72};try{const _0x2e9e04=yield this['fetch']['post'](this['path'],_0x54c272,_0x3b78cf);if(_0x2e9e04['status']>0xc7&&_0x2e9e04['status']<0x12c){const _0x26b1b1=yield _0x2e9e04['json']();return new SuccessfulContributorResponse(_0x26b1b1);}const _0x3487af=yield _0x2e9e04['json']();return new FailedContributorResponse(_0x3487af);}catch(_0x310f45){if(_0x310f45 instanceof Error)return new FailedContributorResponse({'detail':_0x310f45['message'],'title':_0x310f45['name'],'status':0x1f4,'instance':'','type':''});throw _0x310f45;}});}['remove'](_0x1b022c,_0x25292,_0x9f5bab,_0x4ec037){return __awaiter$1(this,void 0,void 0,function*(){const _0x4a2030=this['path']+'/'+_0x1b022c+'/'+_0x25292+'/'+_0x9f5bab,_0x28e430=yield this['fetch']['delete'](_0x4a2030,_0x4ec037);try{if(_0x28e430['status']>0xc7&&_0x28e430['status']<0x12c)return new SuccessfulResponse({});const _0x572438=yield _0x28e430['json']();return new FailedResponse(_0x572438);}catch(_0x1c2898){if(_0x1c2898 instanceof Error)return new FailedResponse({'detail':_0x1c2898['message'],'title':_0x1c2898['name'],'status':0x1f4,'instance':'','type':''});throw _0x1c2898;}});}['startsWith'](_0x1d1d6a,_0x3741a2){return __awaiter$1(this,void 0,void 0,function*(){const _0x1bdc0c=this['path']+'/'+_0x1d1d6a;try{const _0x2715a7=yield this['fetch']['get'](_0x1bdc0c,_0x3741a2);if(_0x2715a7['status']>0xc7&&_0x2715a7['status']<0x12c){const _0x5c5974=yield _0x2715a7['json']();return new SuccessfulAccountAndImageResponse(_0x5c5974);}const _0x3287a2=yield _0x2715a7['json']();return new FailedAccountAndImageResponse(_0x3287a2);}catch(_0x12aeb8){if(_0x12aeb8 instanceof Error)return new FailedAccountAndImageResponse({'detail':_0x12aeb8['message'],'title':_0x12aeb8['name'],'status':0x1f4,'instance':'','type':''});throw _0x12aeb8;}});}}
|
|
18
18
|
|
|
19
|
-
var __awaiter=undefined&&undefined['__awaiter']||function(
|
|
19
|
+
var __awaiter=undefined&&undefined['__awaiter']||function(_0x5cca26,_0x57948f,_0x152d2e,_0x44e785){function _0x271fe1(_0x320cb8){return _0x320cb8 instanceof _0x152d2e?_0x320cb8:new _0x152d2e(function(_0x29a821){_0x29a821(_0x320cb8);});}return new(_0x152d2e||(_0x152d2e=Promise))(function(_0xc1990f,_0xe56aac){function _0x52af48(_0x5c3a00){try{_0x3f2583(_0x44e785['next'](_0x5c3a00));}catch(_0x4f507c){_0xe56aac(_0x4f507c);}}function _0xc1e6b(_0x4fc39c){try{_0x3f2583(_0x44e785['throw'](_0x4fc39c));}catch(_0x18cd05){_0xe56aac(_0x18cd05);}}function _0x3f2583(_0x25b0ed){_0x25b0ed['done']?_0xc1990f(_0x25b0ed['value']):_0x271fe1(_0x25b0ed['value'])['then'](_0x52af48,_0xc1e6b);}_0x3f2583((_0x44e785=_0x44e785['apply'](_0x5cca26,_0x57948f||[]))['next']());});};class AdminClient{constructor(_0x4e4f9b='https://admin.searchability.dev/'){var _0x352a00=new Fetch(_0x4e4f9b);this['Accounts']=new AccountService(_0x352a00),this['Lists']=new ListService(_0x352a00),this['ApiKeys']=new ApiKeyService(_0x352a00),this['SearchServers']=new SearchServersService(_0x352a00),this['Facets']=new FacetService(_0x352a00),this['SearchResults']=new SearchResultService(_0x352a00),this['Contributors']=new ContributorService(_0x352a00);}}class AuthClient{constructor(_0xf13173='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0xf13173);}['login'](_0x1f4fab){return __awaiter(this,void 0,void 0,function*(){const _0x444d8e='login/'+_0x1f4fab;try{const _0x485e29=yield yield fetch(_0x444d8e);if(_0x485e29['status']>0xc7&&_0x485e29['status']<0x12c){const _0x210696=yield _0x485e29['json']();return new SuccessfulAuthResponse(_0x210696);}const _0x2e3bce=yield _0x485e29['json']();return new FailedAuthResponse(_0x2e3bce);}catch(_0x2f86f4){if(_0x2f86f4 instanceof Error)return new FailedAuthResponse({'detail':_0x2f86f4['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x2f86f4;}});}['refresh'](_0x41ef88){return __awaiter(this,void 0,void 0,function*(){const _0x39e7e9='refresh',_0x5a445c={'refresh_token':_0x41ef88};try{const _0x2e0d97=yield this['fetch']['PostNoAuth'](_0x39e7e9,_0x5a445c);if(_0x2e0d97['status']>0xc7&&_0x2e0d97['status']<0x12c){const _0x3bd6e1=yield _0x2e0d97['json']();return new SuccessfulAuthResponse(_0x3bd6e1);}const _0x14fb01=yield _0x2e0d97['json']();return new FailedAuthResponse(_0x14fb01);}catch(_0xc24278){if(_0xc24278 instanceof Error)return new FailedAuthResponse({'detail':_0xc24278['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0xc24278;}});}['getTokenStatus'](_0x4d1289){if(Date['now']()<_0x4d1289['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x4d1289['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
|
|
20
20
|
|
|
21
21
|
export { AdminClient, AuthClient, TokenStatus, Tokens };
|
package/dist/types.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ declare class SearchServersService {
|
|
|
40
40
|
create(account_name: string, search_service_name: string, endpoint: string, key: string, country: string, provider: string, index_name: string, access_token: string): Promise<Response<SearchService, Problem>>;
|
|
41
41
|
delete(account_name: string, search_service_name: string, access_token: string): Promise<Response<any, Problem>>;
|
|
42
42
|
view(account_name: string, search_service_name: string, access_token: string): Promise<Response<SearchServiceDetails, Problem>>;
|
|
43
|
-
edit(account_name: string, search_service_name: string,
|
|
43
|
+
edit(account_name: string, search_service_name: string, key: string, country: string, access_token: string): Promise<Response<SearchService, Problem>>;
|
|
44
44
|
list(account_name: string, access_token: string): Promise<Response<SearchService[], Problem>>;
|
|
45
45
|
}
|
|
46
46
|
|
|
@@ -112,8 +112,6 @@ type ListIdentity = {
|
|
|
112
112
|
list_name: string;
|
|
113
113
|
created: number;
|
|
114
114
|
account_name: string;
|
|
115
|
-
search_service_name: string;
|
|
116
|
-
search_service_is_shared: boolean;
|
|
117
115
|
version: number;
|
|
118
116
|
};
|
|
119
117
|
type List = ListIdentity & {
|
|
@@ -121,6 +119,8 @@ type List = ListIdentity & {
|
|
|
121
119
|
contributors: Contributor[];
|
|
122
120
|
search_result_count: number;
|
|
123
121
|
search_result_limit: number;
|
|
122
|
+
search_service_name: string;
|
|
123
|
+
search_service_is_shared: boolean;
|
|
124
124
|
};
|
|
125
125
|
type ApiKey = {
|
|
126
126
|
name: string;
|
package/package.json
CHANGED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
var TokenStatus;(function(_0xef1f6e){_0xef1f6e[_0xef1f6e['Ok']=0x0]='Ok',_0xef1f6e[_0xef1f6e['Refresh']=0x1]='Refresh',_0xef1f6e[_0xef1f6e['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(_0x12fe3b){this['isSuccess']=_0x12fe3b;}}class SuccessfulContributorResponse extends Response{constructor(_0x14409d){super(!![]),this['contributor']=_0x14409d;}['toSuccess'](){return this['contributor'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedContributorResponse extends Response{constructor(_0x12d7c2){super(![]),this['problem']=_0x12d7c2;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountAndImageResponse extends Response{constructor(_0x295abb){super(!![]),this['accountAndImages']=_0x295abb;}['toSuccess'](){return this['accountAndImages'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountAndImageResponse extends Response{constructor(_0xc679be){super(![]),this['problem']=_0xc679be;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulFacetResponse extends Response{constructor(_0x52662f){super(!![]),this['facet']=_0x52662f;}['toSuccess'](){return this['facet'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetResponse extends Response{constructor(_0x12b8ec){super(![]),this['problem']=_0x12b8ec;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountResponse extends Response{constructor(_0x232925){super(!![]),this['account']=_0x232925;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountImageResponse extends Response{constructor(_0x551034){super(!![]),this['accountImage']=_0x551034;}['toSuccess'](){return this['accountImage'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListIdentityResponse extends Response{constructor(_0x5a4547){super(!![]),this['list']=_0x5a4547;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListResponse extends Response{constructor(_0x1ad880){super(!![]),this['list']=_0x1ad880;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x2f149a){super(![]),this['problem']=_0x2f149a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountImageResponse extends Response{constructor(_0x2329f4){super(![]),this['problem']=_0x2329f4;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListIdentityResponse extends Response{constructor(_0x3a8f18){super(![]),this['problem']=_0x3a8f18;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListResponse extends Response{constructor(_0x4667c5){super(![]),this['problem']=_0x4667c5;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0xa1c781){super(!![]),this['tokens']=_0xa1c781;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x4027e8){super(![]),this['problem']=_0x4027e8;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x5f49d6){super(!![]),this['apiKey']=_0x5f49d6;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x54e8a4){super(![]),this['problem']=_0x54e8a4;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x3d0b3c){super(!![]),this['searchService']=_0x3d0b3c;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x56074e){super(![]),this['problem']=_0x56074e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x3cec30){super(!![]),this['searchService']=_0x3cec30;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulViewSearchResultResponse extends Response{constructor(_0x3fec7d){super(!![]),this['searchResult']=_0x3fec7d;}['toSuccess'](){return this['searchResult'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchResultResponse extends Response{constructor(_0x54dc87){super(![]),this['problem']=_0x54dc87;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchServiceResponse extends Response{constructor(_0x516dca){super(!![]),this['searchServices']=_0x516dca;}['toSuccess'](){return this['searchServices'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServicesResponse extends Response{constructor(_0x5b2ca2){super(![]),this['problem']=_0x5b2ca2;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedViewSearchServiceResponse extends Response{constructor(_0x119531){super(![]),this['problem']=_0x119531;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x325328){super(!![]),this['apiKeyValue']=_0x325328;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x4d7e14){super(!![]),this['obj']=_0x4d7e14;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x15e34b){super(![]),this['problem']=_0x15e34b;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x2d4089){super(![]),this['problem']=_0x2d4089;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
|
|
2
|
-
|
|
3
|
-
var __awaiter$8=undefined&&undefined['__awaiter']||function(_0x25cb81,_0xe4bb58,_0x1fedcb,_0x2860ab){function _0x529e28(_0x47aa49){return _0x47aa49 instanceof _0x1fedcb?_0x47aa49:new _0x1fedcb(function(_0x58e7f4){_0x58e7f4(_0x47aa49);});}return new(_0x1fedcb||(_0x1fedcb=Promise))(function(_0x59954a,_0x365ca8){function _0x2a40d7(_0x5bd96f){try{_0x2d1abc(_0x2860ab['next'](_0x5bd96f));}catch(_0x185dbd){_0x365ca8(_0x185dbd);}}function _0x7caca5(_0x19c74d){try{_0x2d1abc(_0x2860ab['throw'](_0x19c74d));}catch(_0x58c3a2){_0x365ca8(_0x58c3a2);}}function _0x2d1abc(_0x476e99){_0x476e99['done']?_0x59954a(_0x476e99['value']):_0x529e28(_0x476e99['value'])['then'](_0x2a40d7,_0x7caca5);}_0x2d1abc((_0x2860ab=_0x2860ab['apply'](_0x25cb81,_0xe4bb58||[]))['next']());});};class AccountService{constructor(_0x25f38a){this['fetch']=_0x25f38a;}['get'](_0x50f583,_0x1cbfe0){return __awaiter$8(this,void 0,void 0,function*(){const _0x196b91='Account/'+_0x50f583+'/',_0x5dac8f=yield this['fetch']['get'](_0x196b91,_0x1cbfe0);try{if(_0x5dac8f['status']>0xc7&&_0x5dac8f['status']<0x12c){const _0x4027ad=yield _0x5dac8f['json']();return new SuccessfulAccountResponse(_0x4027ad);}const _0x5ce0e8=yield _0x5dac8f['json']();return new FailedAccountResponse(_0x5ce0e8);}catch(_0x283cfc){if(_0x283cfc instanceof Error)return new FailedAccountResponse({'detail':_0x283cfc['message'],'title':_0x283cfc['name'],'status':0x1f4,'instance':'','type':''});throw _0x283cfc;}});}['getImage'](_0x1bd5eb,_0x4d1882){return __awaiter$8(this,void 0,void 0,function*(){const _0x6fa348='account/image/'+_0x1bd5eb+'/',_0x5e650a=yield this['fetch']['get'](_0x6fa348,_0x4d1882);try{if(_0x5e650a['status']>0xc7&&_0x5e650a['status']<0x12c){const _0x498e58=yield _0x5e650a['json']();return new SuccessfulAccountImageResponse(_0x498e58);}const _0x45198f=yield _0x5e650a['json']();return new FailedAccountImageResponse(_0x45198f);}catch(_0xa3bedf){if(_0xa3bedf instanceof Error)return new FailedAccountImageResponse({'detail':_0xa3bedf['message'],'title':_0xa3bedf['name'],'status':0x1f4,'instance':'','type':''});throw _0xa3bedf;}});}}
|
|
4
|
-
|
|
5
|
-
var __awaiter$7=undefined&&undefined['__awaiter']||function(_0x583b44,_0x4e2a8e,_0x22f593,_0x1e9e25){function _0x469e0f(_0x535f49){return _0x535f49 instanceof _0x22f593?_0x535f49:new _0x22f593(function(_0x1e4728){_0x1e4728(_0x535f49);});}return new(_0x22f593||(_0x22f593=Promise))(function(_0x47cf1c,_0x355a33){function _0x101676(_0x271128){try{_0x1875ea(_0x1e9e25['next'](_0x271128));}catch(_0x18bcf5){_0x355a33(_0x18bcf5);}}function _0x40a485(_0x242b6f){try{_0x1875ea(_0x1e9e25['throw'](_0x242b6f));}catch(_0x27c36a){_0x355a33(_0x27c36a);}}function _0x1875ea(_0x4205a9){_0x4205a9['done']?_0x47cf1c(_0x4205a9['value']):_0x469e0f(_0x4205a9['value'])['then'](_0x101676,_0x40a485);}_0x1875ea((_0x1e9e25=_0x1e9e25['apply'](_0x583b44,_0x4e2a8e||[]))['next']());});};class ApiKeyService{constructor(_0x342944){this['fetch']=_0x342944,this['path']='api-key';}['create'](_0x247434,_0x5e8680,_0x1725fc){return __awaiter$7(this,void 0,void 0,function*(){const _0x22d30c={'account_name':_0x247434,'api_key_name':_0x5e8680};try{const _0x161804=yield this['fetch']['post'](this['path'],_0x1725fc,_0x22d30c);if(_0x161804['status']>0xc7&&_0x161804['status']<0x12c){const _0x296854=yield _0x161804['json']();return new SuccessfulApiKeyResponse(_0x296854);}const _0x129849=yield _0x161804['json']();return new FailedApiKeyResponse(_0x129849);}catch(_0x4f2ba7){if(_0x4f2ba7 instanceof Error)return new FailedApiKeyResponse({'detail':_0x4f2ba7['message'],'title':_0x4f2ba7['name'],'status':0x1f4,'instance':'','type':''});throw _0x4f2ba7;}});}['view'](_0x2d7370,_0x4feecb,_0x321be0){return __awaiter$7(this,void 0,void 0,function*(){const _0x4e28e5=this['path']+'/'+_0x2d7370+'/'+_0x4feecb;try{const _0x146e0e=yield this['fetch']['get'](_0x4e28e5,_0x321be0);if(_0x146e0e['status']>0xc7&&_0x146e0e['status']<0x12c){const _0x503552=yield _0x146e0e['json']();return new SuccessfulApiKeyValueResponse(_0x503552);}const _0x242248=yield _0x146e0e['json']();return new FailedApiKeyValueResponse(_0x242248);}catch(_0x3ef6d5){if(_0x3ef6d5 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x3ef6d5['message'],'title':_0x3ef6d5['name'],'status':0x1f4,'instance':'','type':''});throw _0x3ef6d5;}});}['delete'](_0x35040a,_0x339efe,_0x20f9e8){return __awaiter$7(this,void 0,void 0,function*(){const _0x54229e=this['path']+'/'+_0x35040a+'/'+_0x339efe;try{const _0x54b0ab=yield this['fetch']['delete'](_0x54229e,_0x20f9e8);if(_0x54b0ab['status']>0xc7&&_0x54b0ab['status']<0x12c)return new SuccessfulResponse({});const _0x2fead4=yield _0x54b0ab['json']();return new FailedResponse(_0x2fead4);}catch(_0x173fb5){if(_0x173fb5 instanceof Error)return new FailedResponse({'detail':_0x173fb5['message'],'title':_0x173fb5['name'],'status':0x1f4,'instance':'','type':''});throw _0x173fb5;}});}}
|
|
6
|
-
|
|
7
|
-
var __awaiter$6=undefined&&undefined['__awaiter']||function(_0x490845,_0x4c65c8,_0x5d2aa3,_0xc57103){function _0x1ad65e(_0x3ab09c){return _0x3ab09c instanceof _0x5d2aa3?_0x3ab09c:new _0x5d2aa3(function(_0x24d3be){_0x24d3be(_0x3ab09c);});}return new(_0x5d2aa3||(_0x5d2aa3=Promise))(function(_0x326003,_0x551f42){function _0x161af6(_0x471c21){try{_0x1e8fc6(_0xc57103['next'](_0x471c21));}catch(_0x1343a0){_0x551f42(_0x1343a0);}}function _0x4588ea(_0x57f797){try{_0x1e8fc6(_0xc57103['throw'](_0x57f797));}catch(_0x1589eb){_0x551f42(_0x1589eb);}}function _0x1e8fc6(_0x283dff){_0x283dff['done']?_0x326003(_0x283dff['value']):_0x1ad65e(_0x283dff['value'])['then'](_0x161af6,_0x4588ea);}_0x1e8fc6((_0xc57103=_0xc57103['apply'](_0x490845,_0x4c65c8||[]))['next']());});};class ListService{constructor(_0x5d5f2a){this['fetch']=_0x5d5f2a;}['create'](_0x11078c,_0x4bca33,_0x3054ab,_0xd57876){return __awaiter$6(this,void 0,void 0,function*(){const _0x5e2b94='List',_0x53f050={'account_name':_0x11078c,'list_name':_0x4bca33,'search_service_name':_0x3054ab};try{const _0x10c207=yield this['fetch']['post'](_0x5e2b94,_0xd57876,_0x53f050);if(_0x10c207['status']>0xc7&&_0x10c207['status']<0x12c){const _0x591340=yield _0x10c207['json']();return new SuccessfulListIdentityResponse(_0x591340);}const _0x10437b=yield _0x10c207['json']();return new FailedListIdentityResponse(_0x10437b);}catch(_0x14ae09){if(_0x14ae09 instanceof Error)return new FailedListIdentityResponse({'detail':_0x14ae09['message'],'title':_0x14ae09['name'],'status':0x1f4,'instance':'','type':''});throw _0x14ae09;}});}['delete'](_0x497c45,_0x253eb4,_0x3ec1e2){return __awaiter$6(this,void 0,void 0,function*(){const _0x3a1066='List/'+_0x497c45+'/'+_0x253eb4,_0x2f0f96=yield this['fetch']['delete'](_0x3a1066,_0x3ec1e2);try{if(_0x2f0f96['status']>0xc7&&_0x2f0f96['status']<0x12c)return new SuccessfulResponse({});const _0x1c2614=yield _0x2f0f96['json']();return new FailedResponse(_0x1c2614);}catch(_0x26b4ea){if(_0x26b4ea instanceof Error)return new FailedResponse({'detail':_0x26b4ea['message'],'title':_0x26b4ea['name'],'status':0x1f4,'instance':'','type':''});throw _0x26b4ea;}});}['get'](_0x4b0d72,_0x3f32d2,_0x3e273d){return __awaiter$6(this,void 0,void 0,function*(){const _0x54510c='List/'+_0x4b0d72+'/'+_0x3f32d2;try{const _0x25da28=yield this['fetch']['get'](_0x54510c,_0x3e273d);if(_0x25da28['status']>0xc7&&_0x25da28['status']<0x12c){const _0x429868=yield _0x25da28['json']();return new SuccessfulListResponse(_0x429868);}const _0x597198=yield _0x25da28['json']();return new FailedListResponse(_0x597198);}catch(_0x23539c){if(_0x23539c instanceof Error)return new FailedListResponse({'detail':_0x23539c['message'],'title':_0x23539c['name'],'status':0x1f4,'instance':'','type':''});throw _0x23539c;}});}}
|
|
8
|
-
|
|
9
|
-
var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x425b3c,_0x36e128,_0x2e64ff,_0x3d4a3d){function _0x4a4199(_0x24cd6e){return _0x24cd6e instanceof _0x2e64ff?_0x24cd6e:new _0x2e64ff(function(_0x5796b3){_0x5796b3(_0x24cd6e);});}return new(_0x2e64ff||(_0x2e64ff=Promise))(function(_0x357701,_0x33bc24){function _0x48f63b(_0x46578d){try{_0x486c62(_0x3d4a3d['next'](_0x46578d));}catch(_0x1e8ae3){_0x33bc24(_0x1e8ae3);}}function _0x408bd4(_0x5e53ef){try{_0x486c62(_0x3d4a3d['throw'](_0x5e53ef));}catch(_0x55a5a4){_0x33bc24(_0x55a5a4);}}function _0x486c62(_0xc4ab2f){_0xc4ab2f['done']?_0x357701(_0xc4ab2f['value']):_0x4a4199(_0xc4ab2f['value'])['then'](_0x48f63b,_0x408bd4);}_0x486c62((_0x3d4a3d=_0x3d4a3d['apply'](_0x425b3c,_0x36e128||[]))['next']());});};class Fetch{constructor(_0x9664e6){this['baseUri']=_0x9664e6,this['getUrl']=_0x2e0e4d=>{return _0x2e0e4d['startsWith']('/')&&(_0x2e0e4d=_0x2e0e4d['replace']('/','')),''+this['baseUri']+_0x2e0e4d;},!_0x9664e6['endsWith']('/')&&(_0x9664e6=_0x9664e6+'/');}['get'](_0x52a29c,_0x1901ae){return __awaiter$5(this,void 0,void 0,function*(){const _0x5e5d8e=this['getUrl'](_0x52a29c);return yield fetch(_0x5e5d8e,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1901ae}});});}['post'](_0x37f548,_0x3ae776,_0x56e371){return __awaiter$5(this,void 0,void 0,function*(){const _0x552a26=this['getUrl'](_0x37f548);return yield fetch(_0x552a26,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3ae776},'body':_0x56e371?JSON['stringify'](_0x56e371):null});});}['PostNoAuth'](_0x40ca60,_0x3660dd){return __awaiter$5(this,void 0,void 0,function*(){const _0x263289=this['getUrl'](_0x40ca60);return yield fetch(_0x263289,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0x3660dd?JSON['stringify'](_0x3660dd):null});});}['put'](_0x1c39f5,_0x2955c6,_0x133982){return __awaiter$5(this,void 0,void 0,function*(){const _0x51cd3a=this['getUrl'](_0x1c39f5);return yield fetch(_0x51cd3a,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2955c6},'body':_0x133982?JSON['stringify'](_0x133982):null});});}['delete'](_0x58d8f8,_0xbaeeaa){return __awaiter$5(this,void 0,void 0,function*(){const _0x5023cd=this['getUrl'](_0x58d8f8);return yield fetch(_0x5023cd,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0xbaeeaa}});});}}
|
|
10
|
-
|
|
11
|
-
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x3589da,_0x36fb10,_0x28e8e3,_0x10873a){function _0x565ef4(_0x52a457){return _0x52a457 instanceof _0x28e8e3?_0x52a457:new _0x28e8e3(function(_0x225f13){_0x225f13(_0x52a457);});}return new(_0x28e8e3||(_0x28e8e3=Promise))(function(_0xbb51ea,_0x2ef25f){function _0x4cb259(_0x27a7d4){try{_0x2c103d(_0x10873a['next'](_0x27a7d4));}catch(_0x2d4aea){_0x2ef25f(_0x2d4aea);}}function _0x175613(_0x24948e){try{_0x2c103d(_0x10873a['throw'](_0x24948e));}catch(_0x416ad1){_0x2ef25f(_0x416ad1);}}function _0x2c103d(_0x115856){_0x115856['done']?_0xbb51ea(_0x115856['value']):_0x565ef4(_0x115856['value'])['then'](_0x4cb259,_0x175613);}_0x2c103d((_0x10873a=_0x10873a['apply'](_0x3589da,_0x36fb10||[]))['next']());});};class SearchServersService{constructor(_0x134d29){this['fetch']=_0x134d29,this['path']='search-services';}['create'](_0x4c558d,_0x344a29,_0x3978d1,_0x1064e9,_0x4a7b83,_0x5a2173,_0x2834bf,_0x1c1a51){return __awaiter$4(this,void 0,void 0,function*(){const _0x4ab29b={'account_name':_0x4c558d,'search_service_name':_0x344a29,'endpoint':_0x3978d1,'key':_0x1064e9,'country':_0x4a7b83,'provider':_0x5a2173,'index_name':_0x2834bf};try{const _0x1acf8c=yield this['fetch']['post'](this['path'],_0x1c1a51,_0x4ab29b);if(_0x1acf8c['status']>0xc7&&_0x1acf8c['status']<0x12c){const _0x39b4e3=yield _0x1acf8c['json']();return new SuccessfulSearchServiceResponse(_0x39b4e3);}const _0x535ec5=yield _0x1acf8c['json']();return new FailedSearchServiceResponse(_0x535ec5);}catch(_0x4ccb8d){if(_0x4ccb8d instanceof Error)return new FailedSearchServiceResponse({'detail':_0x4ccb8d['message'],'title':_0x4ccb8d['name'],'status':0x1f4,'instance':'','type':''});throw _0x4ccb8d;}});}['delete'](_0x2825a3,_0x3bf7af,_0x2dc470){return __awaiter$4(this,void 0,void 0,function*(){const _0x1f95bb=this['path']+'/'+_0x2825a3+'/'+_0x3bf7af;try{const _0x5d29a4=yield this['fetch']['delete'](_0x1f95bb,_0x2dc470);if(_0x5d29a4['status']>0xc7&&_0x5d29a4['status']<0x12c)return new SuccessfulResponse({});const _0x4f2080=yield _0x5d29a4['json']();return new FailedResponse(_0x4f2080);}catch(_0x50ee57){if(_0x50ee57 instanceof Error)return new FailedResponse({'detail':_0x50ee57['message'],'title':_0x50ee57['name'],'status':0x1f4,'instance':'','type':''});throw _0x50ee57;}});}['view'](_0x8bad77,_0x11a188,_0x5e4af4){return __awaiter$4(this,void 0,void 0,function*(){const _0x559e1d=this['path']+'/'+_0x8bad77+'/'+_0x11a188;try{const _0x4c1a57=yield this['fetch']['get'](_0x559e1d,_0x5e4af4);if(_0x4c1a57['status']>0xc7&&_0x4c1a57['status']<0x12c){const _0x4299c4=yield _0x4c1a57['json']();return new SuccessfulViewSearchServiceResponse(_0x4299c4);}const _0x1cf35a=yield _0x4c1a57['json']();return new FailedViewSearchServiceResponse(_0x1cf35a);}catch(_0x3a0d75){if(_0x3a0d75 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x3a0d75['message'],'title':_0x3a0d75['name'],'status':0x1f4,'instance':'','type':''});throw _0x3a0d75;}});}['edit'](_0x1674d5,_0xa883b8,_0xc4f511,_0x28f37e,_0x3d5da4,_0x4ca24a){return __awaiter$4(this,void 0,void 0,function*(){const _0x1678c={'account_name':_0x1674d5,'search_service_name':_0xa883b8,'new_search_service_name':_0xc4f511,'key':_0x28f37e,'country':_0x3d5da4};try{const _0xf92a75=yield this['fetch']['put'](this['path'],_0x4ca24a,_0x1678c);if(_0xf92a75['status']>0xc7&&_0xf92a75['status']<0x12c){const _0x3a41da=yield _0xf92a75['json']();return new SuccessfulSearchServiceResponse(_0x3a41da);}const _0x3fc184=yield _0xf92a75['json']();return new FailedSearchServiceResponse(_0x3fc184);}catch(_0x54f320){if(_0x54f320 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x54f320['message'],'title':_0x54f320['name'],'status':0x1f4,'instance':'','type':''});throw _0x54f320;}});}['list'](_0xa56a48,_0x5a9d07){return __awaiter$4(this,void 0,void 0,function*(){const _0x53533b=this['path']+'/'+_0xa56a48;try{const _0x3c8adf=yield this['fetch']['get'](_0x53533b,_0x5a9d07);if(_0x3c8adf['status']>0xc7&&_0x3c8adf['status']<0x12c){const _0x4db1bc=yield _0x3c8adf['json']();return new SuccessfulListSearchServiceResponse(_0x4db1bc);}const _0x1d2cbc=yield _0x3c8adf['json']();return new FailedViewSearchServicesResponse(_0x1d2cbc);}catch(_0x36c1b1){if(_0x36c1b1 instanceof Error)return new FailedViewSearchServicesResponse({'detail':_0x36c1b1['message'],'title':_0x36c1b1['name'],'status':0x1f4,'instance':'','type':''});throw _0x36c1b1;}});}}
|
|
12
|
-
|
|
13
|
-
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x149aa3,_0x2d2bbe,_0x577890,_0x5de5fc){function _0x5f0d06(_0x72abe6){return _0x72abe6 instanceof _0x577890?_0x72abe6:new _0x577890(function(_0x1e8948){_0x1e8948(_0x72abe6);});}return new(_0x577890||(_0x577890=Promise))(function(_0xd0e216,_0x177798){function _0x36fca0(_0x5e198f){try{_0x1cb578(_0x5de5fc['next'](_0x5e198f));}catch(_0x51f466){_0x177798(_0x51f466);}}function _0xba8a98(_0x51bd6e){try{_0x1cb578(_0x5de5fc['throw'](_0x51bd6e));}catch(_0x35633a){_0x177798(_0x35633a);}}function _0x1cb578(_0x3459f3){_0x3459f3['done']?_0xd0e216(_0x3459f3['value']):_0x5f0d06(_0x3459f3['value'])['then'](_0x36fca0,_0xba8a98);}_0x1cb578((_0x5de5fc=_0x5de5fc['apply'](_0x149aa3,_0x2d2bbe||[]))['next']());});};class FacetService{constructor(_0xb4c0b9){this['fetch']=_0xb4c0b9,this['path']='facet';}['create'](_0x363ae9,_0x412ee1,_0x4f292c,_0xb3569){return __awaiter$3(this,void 0,void 0,function*(){const _0x47c399={'account_name':_0x363ae9,'list_name':_0x412ee1,'facet_name':_0x4f292c};try{const _0x32a4ea=yield this['fetch']['post'](this['path'],_0xb3569,_0x47c399);if(_0x32a4ea['status']>0xc7&&_0x32a4ea['status']<0x12c){const _0x21ef5e=yield _0x32a4ea['json']();return new SuccessfulFacetResponse(_0x21ef5e);}const _0x2ca944=yield _0x32a4ea['json']();return new FailedFacetResponse(_0x2ca944);}catch(_0x45310f){if(_0x45310f instanceof Error)return new FailedFacetResponse({'detail':_0x45310f['message'],'title':_0x45310f['name'],'status':0x1f4,'instance':'','type':''});throw _0x45310f;}});}['remove'](_0x219e33,_0x3292b7,_0x2bf53f,_0x5e0775){return __awaiter$3(this,void 0,void 0,function*(){const _0x165ba8='Facet/'+_0x219e33+'/'+_0x3292b7+'/'+_0x2bf53f,_0xe0b63b=yield this['fetch']['delete'](_0x165ba8,_0x5e0775);try{if(_0xe0b63b['status']>0xc7&&_0xe0b63b['status']<0x12c)return new SuccessfulResponse({});const _0xd60b63=yield _0xe0b63b['json']();return new FailedResponse(_0xd60b63);}catch(_0x366a0f){if(_0x366a0f instanceof Error)return new FailedResponse({'detail':_0x366a0f['message'],'title':_0x366a0f['name'],'status':0x1f4,'instance':'','type':''});throw _0x366a0f;}});}['rename'](_0x322c12,_0x241950,_0x145acf,_0x76d636,_0x249976){return __awaiter$3(this,void 0,void 0,function*(){const _0xf3b84c={'account_name':_0x322c12,'list_name':_0x241950,'facet_name':_0x145acf,'new_facet_name':_0x76d636};try{const _0x458a0e=yield this['fetch']['put'](this['path'],_0x249976,_0xf3b84c);if(_0x458a0e['status']>0xc7&&_0x458a0e['status']<0x12c){const _0x55e560=yield _0x458a0e['json']();return new SuccessfulFacetResponse(_0x55e560);}const _0x242f6a=yield _0x458a0e['json']();return new FailedFacetResponse(_0x242f6a);}catch(_0x3d6063){if(_0x3d6063 instanceof Error)return new FailedFacetResponse({'detail':_0x3d6063['message'],'title':_0x3d6063['name'],'status':0x1f4,'instance':'','type':''});throw _0x3d6063;}});}}
|
|
14
|
-
|
|
15
|
-
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x4795a7,_0x4d6edc,_0x3b182d,_0x25c490){function _0x3182e1(_0x4b7105){return _0x4b7105 instanceof _0x3b182d?_0x4b7105:new _0x3b182d(function(_0x21736d){_0x21736d(_0x4b7105);});}return new(_0x3b182d||(_0x3b182d=Promise))(function(_0x99a4d,_0x4726a1){function _0xf8f4d6(_0x36421c){try{_0x331218(_0x25c490['next'](_0x36421c));}catch(_0x4e37d3){_0x4726a1(_0x4e37d3);}}function _0x161da7(_0x35eea9){try{_0x331218(_0x25c490['throw'](_0x35eea9));}catch(_0x1af273){_0x4726a1(_0x1af273);}}function _0x331218(_0x2a34f8){_0x2a34f8['done']?_0x99a4d(_0x2a34f8['value']):_0x3182e1(_0x2a34f8['value'])['then'](_0xf8f4d6,_0x161da7);}_0x331218((_0x25c490=_0x25c490['apply'](_0x4795a7,_0x4d6edc||[]))['next']());});};class SearchResultService{constructor(_0x19ca64){this['fetch']=_0x19ca64,this['path']='search-result';}['create'](_0x2cc32e,_0x5b9571,_0xb68703,_0xec10b6,_0x28e94f){return __awaiter$2(this,void 0,void 0,function*(){_0x28e94f=_0x28e94f!==null&&_0x28e94f!==void 0?_0x28e94f:{'description':'','keywords':'','resource_1':'','resource_2':'','resource_3':'','latitude':0x0,'longitude':0x0,'facets':[]};const _0x56dc3c=Object['assign']({'account_name':_0x2cc32e,'search_result_name':_0xb68703,'list_name':_0x5b9571},_0x28e94f);try{const _0xca6f93=yield this['fetch']['post'](this['path'],_0xec10b6,_0x56dc3c);if(_0xca6f93['status']>0xc7&&_0xca6f93['status']<0x12c){const _0x5f3ec6=yield _0xca6f93['json']();return new SuccessfulViewSearchResultResponse(_0x5f3ec6);}const _0x2d1bae=yield _0xca6f93['json']();return new FailedSearchResultResponse(_0x2d1bae);}catch(_0x21c150){if(_0x21c150 instanceof Error)return new FailedSearchResultResponse({'detail':_0x21c150['message'],'title':_0x21c150['name'],'status':0x1f4,'instance':'','type':''});throw _0x21c150;}});}['transfer'](_0x1b27f2,_0x5248c9,_0x407d7e,_0x4f2388){return __awaiter$2(this,void 0,void 0,function*(){const _0x4fc9ca={'account_name':_0x1b27f2,'list_name':_0x5248c9,'new_search_service_name':_0x407d7e};try{const _0x16460a=yield this['fetch']['post'](this['path']+'/transfer',_0x4f2388,_0x4fc9ca);if(_0x16460a['status']>0xc7&&_0x16460a['status']<0x12c){const _0x203a32=yield _0x16460a['json']();return new SuccessfulResponse(_0x203a32);}const _0x5d39c1=yield _0x16460a['json']();return new FailedResponse(_0x5d39c1);}catch(_0x5b23e2){if(_0x5b23e2 instanceof Error)return new FailedResponse({'detail':_0x5b23e2['message'],'title':_0x5b23e2['name'],'status':0x1f4,'instance':'','type':''});throw _0x5b23e2;}});}}
|
|
16
|
-
|
|
17
|
-
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x3abfcb,_0x4c87d5,_0x56c28a,_0x5e51f0){function _0x26d7f9(_0x41104f){return _0x41104f instanceof _0x56c28a?_0x41104f:new _0x56c28a(function(_0x17fea6){_0x17fea6(_0x41104f);});}return new(_0x56c28a||(_0x56c28a=Promise))(function(_0x580d06,_0x1841cd){function _0x438373(_0x25de5b){try{_0x585170(_0x5e51f0['next'](_0x25de5b));}catch(_0x810cb4){_0x1841cd(_0x810cb4);}}function _0x26b6bb(_0x2bfb4c){try{_0x585170(_0x5e51f0['throw'](_0x2bfb4c));}catch(_0x391c24){_0x1841cd(_0x391c24);}}function _0x585170(_0x5235f9){_0x5235f9['done']?_0x580d06(_0x5235f9['value']):_0x26d7f9(_0x5235f9['value'])['then'](_0x438373,_0x26b6bb);}_0x585170((_0x5e51f0=_0x5e51f0['apply'](_0x3abfcb,_0x4c87d5||[]))['next']());});};class ContributorService{constructor(_0x12fce9){this['fetch']=_0x12fce9,this['path']='contributor';}['create'](_0xd838fc,_0x3b6130,_0x4534a7,_0x53a098){return __awaiter$1(this,void 0,void 0,function*(){const _0x18f545={'account_name':_0xd838fc,'list_name':_0x3b6130,'contributor_name':_0x4534a7};try{const _0x3ce270=yield this['fetch']['post'](this['path'],_0x53a098,_0x18f545);if(_0x3ce270['status']>0xc7&&_0x3ce270['status']<0x12c){const _0x644e7b=yield _0x3ce270['json']();return new SuccessfulContributorResponse(_0x644e7b);}const _0x33790f=yield _0x3ce270['json']();return new FailedContributorResponse(_0x33790f);}catch(_0x378868){if(_0x378868 instanceof Error)return new FailedContributorResponse({'detail':_0x378868['message'],'title':_0x378868['name'],'status':0x1f4,'instance':'','type':''});throw _0x378868;}});}['remove'](_0x11c365,_0x5975c7,_0x443472,_0x46efa7){return __awaiter$1(this,void 0,void 0,function*(){const _0xe7211b=this['path']+'/'+_0x11c365+'/'+_0x5975c7+'/'+_0x443472,_0x47c4e2=yield this['fetch']['delete'](_0xe7211b,_0x46efa7);try{if(_0x47c4e2['status']>0xc7&&_0x47c4e2['status']<0x12c)return new SuccessfulResponse({});const _0x2d5dd9=yield _0x47c4e2['json']();return new FailedResponse(_0x2d5dd9);}catch(_0x19235e){if(_0x19235e instanceof Error)return new FailedResponse({'detail':_0x19235e['message'],'title':_0x19235e['name'],'status':0x1f4,'instance':'','type':''});throw _0x19235e;}});}['startsWith'](_0x49d499,_0x244d0f){return __awaiter$1(this,void 0,void 0,function*(){const _0x3d85b3=this['path']+'/'+_0x49d499;try{const _0x5bdc30=yield this['fetch']['get'](_0x3d85b3,_0x244d0f);if(_0x5bdc30['status']>0xc7&&_0x5bdc30['status']<0x12c){const _0x5178ee=yield _0x5bdc30['json']();return new SuccessfulAccountAndImageResponse(_0x5178ee);}const _0x9cda94=yield _0x5bdc30['json']();return new FailedAccountAndImageResponse(_0x9cda94);}catch(_0x1c9494){if(_0x1c9494 instanceof Error)return new FailedAccountAndImageResponse({'detail':_0x1c9494['message'],'title':_0x1c9494['name'],'status':0x1f4,'instance':'','type':''});throw _0x1c9494;}});}}
|
|
18
|
-
|
|
19
|
-
var __awaiter=undefined&&undefined['__awaiter']||function(_0x2127d9,_0x485b4a,_0x58559c,_0x22eb26){function _0x2cc6ba(_0x47452a){return _0x47452a instanceof _0x58559c?_0x47452a:new _0x58559c(function(_0x339ea4){_0x339ea4(_0x47452a);});}return new(_0x58559c||(_0x58559c=Promise))(function(_0x11887c,_0x38ec8f){function _0x948ef6(_0x2c6652){try{_0x3a6e0f(_0x22eb26['next'](_0x2c6652));}catch(_0x563192){_0x38ec8f(_0x563192);}}function _0x39cb8a(_0x2b9d1c){try{_0x3a6e0f(_0x22eb26['throw'](_0x2b9d1c));}catch(_0xf31a5b){_0x38ec8f(_0xf31a5b);}}function _0x3a6e0f(_0x1e8522){_0x1e8522['done']?_0x11887c(_0x1e8522['value']):_0x2cc6ba(_0x1e8522['value'])['then'](_0x948ef6,_0x39cb8a);}_0x3a6e0f((_0x22eb26=_0x22eb26['apply'](_0x2127d9,_0x485b4a||[]))['next']());});};class AdminClient{constructor(_0x3170fe='https://admin.searchability.dev/'){var _0x5d6a83=new Fetch(_0x3170fe);this['Accounts']=new AccountService(_0x5d6a83),this['Lists']=new ListService(_0x5d6a83),this['ApiKeys']=new ApiKeyService(_0x5d6a83),this['SearchServers']=new SearchServersService(_0x5d6a83),this['Facets']=new FacetService(_0x5d6a83),this['SearchResults']=new SearchResultService(_0x5d6a83),this['Contributors']=new ContributorService(_0x5d6a83);}}class AuthClient{constructor(_0x3041d5='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x3041d5);}['login'](_0x162c72){return __awaiter(this,void 0,void 0,function*(){const _0x551e0a='login/'+_0x162c72;try{const _0x4a3548=yield yield fetch(_0x551e0a);if(_0x4a3548['status']>0xc7&&_0x4a3548['status']<0x12c){const _0x42bf26=yield _0x4a3548['json']();return new SuccessfulAuthResponse(_0x42bf26);}const _0x527eb5=yield _0x4a3548['json']();return new FailedAuthResponse(_0x527eb5);}catch(_0x3c546c){if(_0x3c546c instanceof Error)return new FailedAuthResponse({'detail':_0x3c546c['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x3c546c;}});}['refresh'](_0x35149c){return __awaiter(this,void 0,void 0,function*(){const _0x3ac60b='refresh',_0x59d9c8={'refresh_token':_0x35149c};try{const _0x6cd2b1=yield this['fetch']['PostNoAuth'](_0x3ac60b,_0x59d9c8);if(_0x6cd2b1['status']>0xc7&&_0x6cd2b1['status']<0x12c){const _0x5edd1a=yield _0x6cd2b1['json']();return new SuccessfulAuthResponse(_0x5edd1a);}const _0x4828b1=yield _0x6cd2b1['json']();return new FailedAuthResponse(_0x4828b1);}catch(_0x10df0c){if(_0x10df0c instanceof Error)return new FailedAuthResponse({'detail':_0x10df0c['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x10df0c;}});}['getTokenStatus'](_0x1e2742){if(Date['now']()<_0x1e2742['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x1e2742['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
|
|
20
|
-
|
|
21
|
-
export { AdminClient, AuthClient, TokenStatus, Tokens };
|