@searchability/admin-client 0.0.173 → 0.0.174
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.
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
var TokenStatus;(function(
|
|
1
|
+
var TokenStatus;(function(_0x34bd7e){_0x34bd7e[_0x34bd7e['Ok']=0x0]='Ok',_0x34bd7e[_0x34bd7e['Refresh']=0x1]='Refresh',_0x34bd7e[_0x34bd7e['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(_0x5f006e){this['isSuccess']=_0x5f006e;}}class SuccessfulFacetValueResponse extends Response{constructor(_0x2f8eff){super(!![]),this['facets']=_0x2f8eff;}['toSuccess'](){return this['facets'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetValuesResponse extends Response{constructor(_0x449bec){super(![]),this['problem']=_0x449bec;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulContributorResponse extends Response{constructor(_0x24edcd){super(!![]),this['contributor']=_0x24edcd;}['toSuccess'](){return this['contributor'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedContributorResponse extends Response{constructor(_0x4dbb97){super(![]),this['problem']=_0x4dbb97;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountAndImageResponse extends Response{constructor(_0xb6cc87){super(!![]),this['accountAndImages']=_0xb6cc87;}['toSuccess'](){return this['accountAndImages'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountAndImageResponse extends Response{constructor(_0x13bf89){super(![]),this['problem']=_0x13bf89;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulResourceResponse extends Response{constructor(_0x598eaa){super(!![]),this['resource']=_0x598eaa;}['toSuccess'](){return this['resource'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResourceResponse extends Response{constructor(_0x3b374e){super(![]),this['problem']=_0x3b374e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulFacetResponse extends Response{constructor(_0x466fa3){super(!![]),this['facet']=_0x466fa3;}['toSuccess'](){return this['facet'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetResponse extends Response{constructor(_0x2eeb8e){super(![]),this['problem']=_0x2eeb8e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedSearchableFieldResponse extends Response{constructor(_0x449909){super(![]),this['problem']=_0x449909;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchableFieldResponse extends Response{constructor(_0x33a635){super(!![]),this['searchable_field']=_0x33a635;}['toSuccess'](){return this['searchable_field'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountResponse extends Response{constructor(_0xe70105){super(!![]),this['account']=_0xe70105;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountImageResponse extends Response{constructor(_0x974fb7){super(!![]),this['accountImage']=_0x974fb7;}['toSuccess'](){return this['accountImage'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListIdentityResponse extends Response{constructor(_0x3d530c){super(!![]),this['list']=_0x3d530c;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulGroupResponse extends Response{constructor(_0x40b56e){super(!![]),this['group']=_0x40b56e;}['toSuccess'](){return this['group'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedGroupResponse extends Response{constructor(_0x34d47f){super(![]),this['problem']=_0x34d47f;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListResponse extends Response{constructor(_0x48ff71){super(!![]),this['list']=_0x48ff71;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedListResponse extends Response{constructor(_0x1aafc){super(![]),this['problem']=_0x1aafc;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountResponse extends Response{constructor(_0x49f41e){super(![]),this['problem']=_0x49f41e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountImageResponse extends Response{constructor(_0x25a8b3){super(![]),this['problem']=_0x25a8b3;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListIdentityResponse extends Response{constructor(_0x14eed0){super(![]),this['problem']=_0x14eed0;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x3dc4d4){super(!![]),this['tokens']=_0x3dc4d4;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x540a5f){super(![]),this['problem']=_0x540a5f;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x3e7848){super(!![]),this['apiKey']=_0x3e7848;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x4c091b){super(![]),this['problem']=_0x4c091b;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x159275){super(!![]),this['searchService']=_0x159275;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x1bd8ab){super(![]),this['problem']=_0x1bd8ab;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x302017){super(!![]),this['searchService']=_0x302017;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulSearchResultResponse extends Response{constructor(_0x14fa21){super(!![]),this['searchResult']=_0x14fa21;}['toSuccess'](){return this['searchResult'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchResultResponse extends Response{constructor(_0xd8ed58){super(![]),this['problem']=_0xd8ed58;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchResultResponse extends Response{constructor(_0x465027){super(!![]),this['searchResults']=_0x465027;}['toSuccess'](){return this['searchResults'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchResultResponse extends Response{constructor(_0xf8c674){super(![]),this['problem']=_0xf8c674;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedViewSearchServiceResponse extends Response{constructor(_0x5d31c5){super(![]),this['problem']=_0x5d31c5;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x295e35){super(!![]),this['apiKeyValue']=_0x295e35;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x7ba87a){super(!![]),this['obj']=_0x7ba87a;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x117bc1){super(![]),this['problem']=_0x117bc1;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x569e9c){super(![]),this['problem']=_0x569e9c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
|
|
2
2
|
|
|
3
|
-
var __awaiter$b=undefined&&undefined['__awaiter']||function(
|
|
3
|
+
var __awaiter$b=undefined&&undefined['__awaiter']||function(_0x1c53f1,_0x262970,_0x57d50d,_0x3edbdc){function _0x40c76f(_0x189150){return _0x189150 instanceof _0x57d50d?_0x189150:new _0x57d50d(function(_0x2a207a){_0x2a207a(_0x189150);});}return new(_0x57d50d||(_0x57d50d=Promise))(function(_0x1d705f,_0x382482){function _0x5dbdc8(_0x2711d5){try{_0x41de3d(_0x3edbdc['next'](_0x2711d5));}catch(_0x530386){_0x382482(_0x530386);}}function _0x4b96fa(_0x58353c){try{_0x41de3d(_0x3edbdc['throw'](_0x58353c));}catch(_0x47a097){_0x382482(_0x47a097);}}function _0x41de3d(_0x8570ac){_0x8570ac['done']?_0x1d705f(_0x8570ac['value']):_0x40c76f(_0x8570ac['value'])['then'](_0x5dbdc8,_0x4b96fa);}_0x41de3d((_0x3edbdc=_0x3edbdc['apply'](_0x1c53f1,_0x262970||[]))['next']());});};class AccountService{constructor(_0xef7536){this['fetch']=_0xef7536,this['path']='account';}['get'](_0x2e884a,_0x52f28f){return __awaiter$b(this,void 0,void 0,function*(){const _0x31651e=this['path']+'/'+_0x2e884a+'/',_0x2ffbf9=yield this['fetch']['get'](_0x31651e,_0x52f28f);try{if(_0x2ffbf9['status']>0xc7&&_0x2ffbf9['status']<0x12c){const _0x946c91=yield _0x2ffbf9['json']();return new SuccessfulAccountResponse(_0x946c91);}const _0xc27845=yield _0x2ffbf9['json']();return new FailedAccountResponse(_0xc27845);}catch(_0x4cc88a){if(_0x4cc88a instanceof Error)return new FailedAccountResponse({'detail':_0x4cc88a['message'],'title':_0x4cc88a['name'],'status':0x1f4,'instance':'','type':''});throw _0x4cc88a;}});}['getImage'](_0x50ad1c,_0x5809d5){return __awaiter$b(this,void 0,void 0,function*(){const _0x2cc898=this['path']+'/image/'+_0x50ad1c+'/',_0x117ad3=yield this['fetch']['get'](_0x2cc898,_0x5809d5);try{if(_0x117ad3['status']>0xc7&&_0x117ad3['status']<0x12c){const _0x21073a=yield _0x117ad3['json']();return new SuccessfulAccountImageResponse(_0x21073a);}const _0x310008=yield _0x117ad3['json']();return new FailedAccountImageResponse(_0x310008);}catch(_0x3c886e){if(_0x3c886e instanceof Error)return new FailedAccountImageResponse({'detail':_0x3c886e['message'],'title':_0x3c886e['name'],'status':0x1f4,'instance':'','type':''});throw _0x3c886e;}});}['feedback'](_0x5758cc,_0x44cb8b,_0x30a866,_0x1901a3){return __awaiter$b(this,void 0,void 0,function*(){const _0x4c5493=this['path']+'/feedback',_0x4ee6cf=yield this['fetch']['post'](_0x4c5493,_0x1901a3,{'account_name':_0x5758cc,'email_address':_0x44cb8b,'feedback':_0x30a866});try{if(_0x4ee6cf['status']>0xc7&&_0x4ee6cf['status']<0x12c)return new SuccessfulResponse({});const _0x37553f=yield _0x4ee6cf['json']();return new FailedResponse(_0x37553f);}catch(_0x428309){if(_0x428309 instanceof Error)return new FailedResponse({'detail':_0x428309['message'],'title':_0x428309['name'],'status':0x1f4,'instance':'','type':''});throw _0x428309;}});}['editEmail'](_0x5edb56,_0x2c843b,_0x448b40){return __awaiter$b(this,void 0,void 0,function*(){const _0x28765b=this['path']+'/email/'+_0x5edb56+'/',_0x18fabd=yield this['fetch']['put'](_0x28765b,_0x448b40,{'new_email_address':_0x2c843b});try{if(_0x18fabd['status']>0xc7&&_0x18fabd['status']<0x12c)return new SuccessfulResponse({});const _0x408532=yield _0x18fabd['json']();return new FailedResponse(_0x408532);}catch(_0x447d49){if(_0x447d49 instanceof Error)return new FailedResponse({'detail':_0x447d49['message'],'title':_0x447d49['name'],'status':0x1f4,'instance':'','type':''});throw _0x447d49;}});}['editPassword'](_0x18baba,_0x53a509,_0x1fbeae,_0x1e9fd3){return __awaiter$b(this,void 0,void 0,function*(){const _0x5b4d84=this['path']+'/password/'+_0x18baba+'/',_0x4f22f1=yield this['fetch']['put'](_0x5b4d84,_0x1e9fd3,{'new_password':_0x1fbeae,'password':_0x53a509});try{if(_0x4f22f1['status']>0xc7&&_0x4f22f1['status']<0x12c){const _0x52a03b=yield _0x4f22f1['json']();return new SuccessfulAccountResponse(_0x52a03b);}const _0x4b7a70=yield _0x4f22f1['json']();return new FailedAccountResponse(_0x4b7a70);}catch(_0x1b0ebc){if(_0x1b0ebc instanceof Error)return new FailedAccountResponse({'detail':_0x1b0ebc['message'],'title':_0x1b0ebc['name'],'status':0x1f4,'instance':'','type':''});throw _0x1b0ebc;}});}['editCountry'](_0x36db34,_0x4fde8c,_0x573520){return __awaiter$b(this,void 0,void 0,function*(){const _0x311222=this['path']+'/country/'+_0x36db34+'/',_0x13dc63=yield this['fetch']['put'](_0x311222,_0x573520,{'new_country':_0x4fde8c});try{if(_0x13dc63['status']>0xc7&&_0x13dc63['status']<0x12c){const _0x49e9a8=yield _0x13dc63['json']();return new SuccessfulAccountResponse(_0x49e9a8);}const _0x594b55=yield _0x13dc63['json']();return new FailedAccountResponse(_0x594b55);}catch(_0x3698f4){if(_0x3698f4 instanceof Error)return new FailedAccountResponse({'detail':_0x3698f4['message'],'title':_0x3698f4['name'],'status':0x1f4,'instance':'','type':''});throw _0x3698f4;}});}['delete'](_0x3dee9d,_0x3297c6){return __awaiter$b(this,void 0,void 0,function*(){const _0x430b66=this['path']+'/'+_0x3dee9d,_0x4fd3c4=yield this['fetch']['delete'](_0x430b66,_0x3297c6);try{if(_0x4fd3c4['status']>0xc7&&_0x4fd3c4['status']<0x12c)return new SuccessfulResponse({});const _0x88289a=yield _0x4fd3c4['json']();return new FailedResponse(_0x88289a);}catch(_0x3c7e1e){if(_0x3c7e1e instanceof Error)return new FailedResponse({'detail':_0x3c7e1e['message'],'title':_0x3c7e1e['name'],'status':0x1f4,'instance':'','type':''});throw _0x3c7e1e;}});}}
|
|
4
4
|
|
|
5
|
-
var __awaiter$a=undefined&&undefined['__awaiter']||function(
|
|
5
|
+
var __awaiter$a=undefined&&undefined['__awaiter']||function(_0x3f4702,_0x73b069,_0x2dc9ce,_0x38e146){function _0x35ea3d(_0x452c7d){return _0x452c7d instanceof _0x2dc9ce?_0x452c7d:new _0x2dc9ce(function(_0x575a41){_0x575a41(_0x452c7d);});}return new(_0x2dc9ce||(_0x2dc9ce=Promise))(function(_0x4fbd48,_0x38a538){function _0x12208c(_0x2b023f){try{_0x425faa(_0x38e146['next'](_0x2b023f));}catch(_0x253d8a){_0x38a538(_0x253d8a);}}function _0x4bfb0c(_0x1d10de){try{_0x425faa(_0x38e146['throw'](_0x1d10de));}catch(_0xf6eed0){_0x38a538(_0xf6eed0);}}function _0x425faa(_0x35f486){_0x35f486['done']?_0x4fbd48(_0x35f486['value']):_0x35ea3d(_0x35f486['value'])['then'](_0x12208c,_0x4bfb0c);}_0x425faa((_0x38e146=_0x38e146['apply'](_0x3f4702,_0x73b069||[]))['next']());});};class ApiKeyService{constructor(_0x11db4f){this['fetch']=_0x11db4f,this['path']='api-key';}['create'](_0x3a3978,_0xa5697,_0x36fedd){return __awaiter$a(this,void 0,void 0,function*(){const _0x450b35={'account_name':_0x3a3978,'api_key_name':_0xa5697};try{const _0x14701c=yield this['fetch']['post'](this['path'],_0x36fedd,_0x450b35);if(_0x14701c['status']>0xc7&&_0x14701c['status']<0x12c){const _0x54afd0=yield _0x14701c['json']();return new SuccessfulApiKeyResponse(_0x54afd0);}const _0x15658b=yield _0x14701c['json']();return new FailedApiKeyResponse(_0x15658b);}catch(_0x184a60){if(_0x184a60 instanceof Error)return new FailedApiKeyResponse({'detail':_0x184a60['message'],'title':_0x184a60['name'],'status':0x1f4,'instance':'','type':''});throw _0x184a60;}});}['view'](_0x59f033,_0x506c59,_0x10a329){return __awaiter$a(this,void 0,void 0,function*(){const _0x338b64=this['path']+'/'+_0x59f033+'/'+_0x506c59;try{const _0x1b427f=yield this['fetch']['get'](_0x338b64,_0x10a329);if(_0x1b427f['status']>0xc7&&_0x1b427f['status']<0x12c){const _0x1b92ad=yield _0x1b427f['json']();return new SuccessfulApiKeyValueResponse(_0x1b92ad);}const _0xa39ce8=yield _0x1b427f['json']();return new FailedApiKeyValueResponse(_0xa39ce8);}catch(_0x3c54f2){if(_0x3c54f2 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x3c54f2['message'],'title':_0x3c54f2['name'],'status':0x1f4,'instance':'','type':''});throw _0x3c54f2;}});}['delete'](_0x55e8fa,_0x55c559,_0xb270a4){return __awaiter$a(this,void 0,void 0,function*(){const _0x46ebce=this['path']+'/'+_0x55e8fa+'/'+_0x55c559;try{const _0x407ff6=yield this['fetch']['delete'](_0x46ebce,_0xb270a4);if(_0x407ff6['status']>0xc7&&_0x407ff6['status']<0x12c)return new SuccessfulResponse({});const _0x5555c0=yield _0x407ff6['json']();return new FailedResponse(_0x5555c0);}catch(_0x49aa7b){if(_0x49aa7b instanceof Error)return new FailedResponse({'detail':_0x49aa7b['message'],'title':_0x49aa7b['name'],'status':0x1f4,'instance':'','type':''});throw _0x49aa7b;}});}}
|
|
6
6
|
|
|
7
|
-
var __awaiter$9=undefined&&undefined['__awaiter']||function(
|
|
7
|
+
var __awaiter$9=undefined&&undefined['__awaiter']||function(_0x109134,_0xe47f85,_0x15baf0,_0x290bbf){function _0x53d735(_0x4657d2){return _0x4657d2 instanceof _0x15baf0?_0x4657d2:new _0x15baf0(function(_0xfc058f){_0xfc058f(_0x4657d2);});}return new(_0x15baf0||(_0x15baf0=Promise))(function(_0x2e2511,_0x14e921){function _0x5ee589(_0x13b379){try{_0x5ded2a(_0x290bbf['next'](_0x13b379));}catch(_0x49891c){_0x14e921(_0x49891c);}}function _0x43ad18(_0x566f8d){try{_0x5ded2a(_0x290bbf['throw'](_0x566f8d));}catch(_0x1d1b93){_0x14e921(_0x1d1b93);}}function _0x5ded2a(_0xf5ccad){_0xf5ccad['done']?_0x2e2511(_0xf5ccad['value']):_0x53d735(_0xf5ccad['value'])['then'](_0x5ee589,_0x43ad18);}_0x5ded2a((_0x290bbf=_0x290bbf['apply'](_0x109134,_0xe47f85||[]))['next']());});};class ListService{constructor(_0xaec89a){this['fetch']=_0xaec89a,this['path']='list',this['Coordinates']=new CoordinatesService(_0xaec89a),this['GeneratedSuggestions']=new GeneratedSuggestionsService(_0xaec89a);}['create'](_0x32a1dc,_0x1ae643,_0x1c6556,_0xe139c){return __awaiter$9(this,void 0,void 0,function*(){const _0x549b69={'account_name':_0x32a1dc,'list_name':_0x1ae643,'search_service_name':_0x1c6556};try{const _0xee99f2=yield this['fetch']['post'](this['path'],_0xe139c,_0x549b69);if(_0xee99f2['status']>0xc7&&_0xee99f2['status']<0x12c){const _0x59fca8=yield _0xee99f2['json']();return new SuccessfulListIdentityResponse(_0x59fca8);}const _0x1f85ff=yield _0xee99f2['json']();return new FailedListIdentityResponse(_0x1f85ff);}catch(_0x36a5aa){if(_0x36a5aa instanceof Error)return new FailedListIdentityResponse({'detail':_0x36a5aa['message'],'title':_0x36a5aa['name'],'status':0x1f4,'instance':'','type':''});throw _0x36a5aa;}});}['delete'](_0x3a3698,_0x466b40,_0x171e55){return __awaiter$9(this,void 0,void 0,function*(){const _0x387f91=this['path']+'/'+_0x3a3698+'/'+_0x466b40,_0x1ba025=yield this['fetch']['delete'](_0x387f91,_0x171e55);try{if(_0x1ba025['status']>0xc7&&_0x1ba025['status']<0x12c)return new SuccessfulResponse({});const _0x1ff53b=yield _0x1ba025['json']();return new FailedResponse(_0x1ff53b);}catch(_0xa2ff64){if(_0xa2ff64 instanceof Error)return new FailedResponse({'detail':_0xa2ff64['message'],'title':_0xa2ff64['name'],'status':0x1f4,'instance':'','type':''});throw _0xa2ff64;}});}['get'](_0x5b0829,_0x38fada,_0x17a8af){return __awaiter$9(this,void 0,void 0,function*(){const _0x2d6cd7=this['path']+'/'+_0x5b0829+'/'+_0x38fada;try{const _0x35786a=yield this['fetch']['get'](_0x2d6cd7,_0x17a8af);if(_0x35786a['status']>0xc7&&_0x35786a['status']<0x12c){const _0x3939ff=yield _0x35786a['json']();return new SuccessfulListResponse(_0x3939ff);}const _0x51d41f=yield _0x35786a['json']();return new FailedListResponse(_0x51d41f);}catch(_0x2fb99a){if(_0x2fb99a instanceof Error)return new FailedListResponse({'detail':_0x2fb99a['message'],'title':_0x2fb99a['name'],'status':0x1f4,'instance':'','type':''});throw _0x2fb99a;}});}['edit'](_0x1d7da0,_0x1a65a5,_0x21abb8,_0x36d4c5){return __awaiter$9(this,void 0,void 0,function*(){const _0x1595af=this['path']+'/'+_0x1d7da0+'/'+_0x1a65a5,_0x559341=yield this['fetch']['put'](_0x1595af,_0x21abb8,_0x36d4c5);try{if(_0x559341['status']>0xc7&&_0x559341['status']<0x12c){const _0x414fcf=yield _0x559341['json']();return new SuccessfulListResponse(_0x414fcf);}const _0x24659c=yield _0x559341['json']();return new FailedListResponse(_0x24659c);}catch(_0x2766e5){if(_0x2766e5 instanceof Error)return new FailedListResponse({'detail':_0x2766e5['message'],'title':_0x2766e5['name'],'status':0x1f4,'instance':'','type':''});throw _0x2766e5;}});}['transfer'](_0x4006b6,_0x5c9971,_0x349b3a,_0x403758){return __awaiter$9(this,void 0,void 0,function*(){const _0x3968b4={'new_search_service_name':_0x349b3a};try{const _0x11a597=yield this['fetch']['put'](this['path']+'/transfer/'+_0x4006b6+'/'+_0x5c9971,_0x403758,_0x3968b4);if(_0x11a597['status']>0xc7&&_0x11a597['status']<0x12c){const _0x33c89d=yield _0x11a597['json']();return new SuccessfulListResponse(_0x33c89d);}const _0x5ecb21=yield _0x11a597['json']();return new FailedListResponse(_0x5ecb21);}catch(_0x59a0dd){if(_0x59a0dd instanceof Error)return new FailedListResponse({'detail':_0x59a0dd['message'],'title':_0x59a0dd['name'],'status':0x1f4,'instance':'','type':''});throw _0x59a0dd;}});}}class CoordinatesService{constructor(_0x5854d0){this['fetch']=_0x5854d0,this['path']='list/coordinates';}['add'](_0x162acb,_0x76ed35,_0x33e17b){return __awaiter$9(this,void 0,void 0,function*(){const _0x264fd6=this['path']+'/'+_0x162acb+'/'+_0x76ed35,_0x272306=yield this['fetch']['post'](_0x264fd6,_0x33e17b,{});try{if(_0x272306['status']>0xc7&&_0x272306['status']<0x12c){const _0x318d8b=yield _0x272306['json']();return new SuccessfulListResponse(_0x318d8b);}const _0x19429c=yield _0x272306['json']();return new FailedListResponse(_0x19429c);}catch(_0x41759f){if(_0x41759f instanceof Error)return new FailedListResponse({'detail':_0x41759f['message'],'title':_0x41759f['name'],'status':0x1f4,'instance':'','type':''});throw _0x41759f;}});}['remove'](_0x27a558,_0x4bf5d0,_0x302a19){return __awaiter$9(this,void 0,void 0,function*(){const _0x578fba=this['path']+'/'+_0x27a558+'/'+_0x4bf5d0,_0x4e4083=yield this['fetch']['delete'](_0x578fba,_0x302a19);try{if(_0x4e4083['status']>0xc7&&_0x4e4083['status']<0x12c){const _0x4a488a=yield _0x4e4083['json']();return new SuccessfulListResponse(_0x4a488a);}const _0x51f4d6=yield _0x4e4083['json']();return new FailedListResponse(_0x51f4d6);}catch(_0x5d8234){if(_0x5d8234 instanceof Error)return new FailedListResponse({'detail':_0x5d8234['message'],'title':_0x5d8234['name'],'status':0x1f4,'instance':'','type':''});throw _0x5d8234;}});}}class GeneratedSuggestionsService{constructor(_0x35d1b4){this['fetch']=_0x35d1b4,this['path']='list/generated-suggestions';}['add'](_0x50cb33,_0x1d666c,_0x2d3934,_0x2138e4,_0x257ab3,_0x1164f9,_0x56da24){return __awaiter$9(this,void 0,void 0,function*(){const _0x79d4fb=this['path']+'/'+_0x50cb33+'/'+_0x1d666c,_0x13d1db=yield this['fetch']['post'](_0x79d4fb,_0x56da24,{'target_list_name':_0x2d3934,'minimum_result_count':_0x2138e4,'is_active':_0x257ab3,'minimum_characters':_0x1164f9});try{if(_0x13d1db['status']>0xc7&&_0x13d1db['status']<0x12c){const _0x124d52=yield _0x13d1db['json']();return new SuccessfulListResponse(_0x124d52);}const _0xf9da3a=yield _0x13d1db['json']();return new FailedListResponse(_0xf9da3a);}catch(_0xb11f7e){if(_0xb11f7e instanceof Error)return new FailedListResponse({'detail':_0xb11f7e['message'],'title':_0xb11f7e['name'],'status':0x1f4,'instance':'','type':''});throw _0xb11f7e;}});}['remove'](_0xab5086,_0x4b2944,_0x144fab){return __awaiter$9(this,void 0,void 0,function*(){const _0x33898a=this['path']+'/'+_0xab5086+'/'+_0x4b2944,_0x1c3a43=yield this['fetch']['delete'](_0x33898a,_0x144fab);try{if(_0x1c3a43['status']>0xc7&&_0x1c3a43['status']<0x12c){const _0x35210b=yield _0x1c3a43['json']();return new SuccessfulListResponse(_0x35210b);}const _0x47b52f=yield _0x1c3a43['json']();return new FailedListResponse(_0x47b52f);}catch(_0x284d1d){if(_0x284d1d instanceof Error)return new FailedListResponse({'detail':_0x284d1d['message'],'title':_0x284d1d['name'],'status':0x1f4,'instance':'','type':''});throw _0x284d1d;}});}['edit'](_0x2d23d9,_0x3e230e,_0x337afd,_0x4f0f6f){return __awaiter$9(this,void 0,void 0,function*(){const _0xe57c65=this['path']+'/'+_0x2d23d9+'/'+_0x3e230e;_0x4f0f6f=_0x4f0f6f!==null&&_0x4f0f6f!==void 0?_0x4f0f6f:{};const _0x32fbaa=yield this['fetch']['put'](_0xe57c65,_0x337afd,_0x4f0f6f);try{if(_0x32fbaa['status']>0xc7&&_0x32fbaa['status']<0x12c){const _0x48f8f6=yield _0x32fbaa['json']();return new SuccessfulListResponse(_0x48f8f6);}const _0x2d895f=yield _0x32fbaa['json']();return new FailedListResponse(_0x2d895f);}catch(_0x51d121){if(_0x51d121 instanceof Error)return new FailedListResponse({'detail':_0x51d121['message'],'title':_0x51d121['name'],'status':0x1f4,'instance':'','type':''});throw _0x51d121;}});}}
|
|
8
8
|
|
|
9
|
-
var __awaiter$8=undefined&&undefined['__awaiter']||function(
|
|
9
|
+
var __awaiter$8=undefined&&undefined['__awaiter']||function(_0x250541,_0x7f1ae,_0x1e2524,_0xafbd14){function _0x117196(_0x5c62c0){return _0x5c62c0 instanceof _0x1e2524?_0x5c62c0:new _0x1e2524(function(_0x55f0aa){_0x55f0aa(_0x5c62c0);});}return new(_0x1e2524||(_0x1e2524=Promise))(function(_0x2476b9,_0x3cfa37){function _0xda7820(_0x53101a){try{_0x182742(_0xafbd14['next'](_0x53101a));}catch(_0x18d48e){_0x3cfa37(_0x18d48e);}}function _0x578805(_0x3d13b0){try{_0x182742(_0xafbd14['throw'](_0x3d13b0));}catch(_0x130528){_0x3cfa37(_0x130528);}}function _0x182742(_0x9ca7f3){_0x9ca7f3['done']?_0x2476b9(_0x9ca7f3['value']):_0x117196(_0x9ca7f3['value'])['then'](_0xda7820,_0x578805);}_0x182742((_0xafbd14=_0xafbd14['apply'](_0x250541,_0x7f1ae||[]))['next']());});};class Fetch{constructor(_0x26f95d){this['baseUri']=_0x26f95d,this['getUrl']=_0x3a7513=>{return _0x3a7513['startsWith']('/')&&(_0x3a7513=_0x3a7513['replace']('/','')),''+this['baseUri']+_0x3a7513;},!_0x26f95d['endsWith']('/')&&(_0x26f95d=_0x26f95d+'/');}['get'](_0x527b67,_0x4f190e){return __awaiter$8(this,void 0,void 0,function*(){const _0x4f9c22=this['getUrl'](_0x527b67);return yield fetch(_0x4f9c22,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4f190e}});});}['post'](_0xd713eb,_0x143d6c,_0xb3594f){return __awaiter$8(this,void 0,void 0,function*(){const _0x1d8de5=this['getUrl'](_0xd713eb);return yield fetch(_0x1d8de5,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x143d6c},'body':_0xb3594f?JSON['stringify'](_0xb3594f):null});});}['upload'](_0x4e7382,_0x4572bd,_0xa93045){return __awaiter$8(this,void 0,void 0,function*(){const _0x42499d=this['getUrl'](_0x4e7382);return yield fetch(_0x42499d,{'method':'POST','headers':{'Authorization':'Bearer\x20'+_0x4572bd},'body':_0xa93045});});}['PostNoAuth'](_0x351ff2,_0x2dd9f7){return __awaiter$8(this,void 0,void 0,function*(){const _0x5ccb0a=this['getUrl'](_0x351ff2);return yield fetch(_0x5ccb0a,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0x2dd9f7?JSON['stringify'](_0x2dd9f7):null});});}['put'](_0x28b4b5,_0x264f2c,_0x5de058){return __awaiter$8(this,void 0,void 0,function*(){const _0x3a0102=this['getUrl'](_0x28b4b5);return yield fetch(_0x3a0102,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x264f2c},'body':_0x5de058?JSON['stringify'](_0x5de058):null});});}['delete'](_0x4bd850,_0x3429aa){return __awaiter$8(this,void 0,void 0,function*(){const _0x379e57=this['getUrl'](_0x4bd850);return yield fetch(_0x379e57,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3429aa}});});}}
|
|
10
10
|
|
|
11
|
-
var __awaiter$7=undefined&&undefined['__awaiter']||function(
|
|
11
|
+
var __awaiter$7=undefined&&undefined['__awaiter']||function(_0x1a30e1,_0x217640,_0x1dd120,_0x23c68d){function _0x41aa54(_0x5a5545){return _0x5a5545 instanceof _0x1dd120?_0x5a5545:new _0x1dd120(function(_0x219289){_0x219289(_0x5a5545);});}return new(_0x1dd120||(_0x1dd120=Promise))(function(_0x5e8957,_0x32c05f){function _0x467cac(_0x5c05d8){try{_0x4d2e5d(_0x23c68d['next'](_0x5c05d8));}catch(_0x4d7443){_0x32c05f(_0x4d7443);}}function _0x57d1e0(_0x38df94){try{_0x4d2e5d(_0x23c68d['throw'](_0x38df94));}catch(_0x42d013){_0x32c05f(_0x42d013);}}function _0x4d2e5d(_0x146ae4){_0x146ae4['done']?_0x5e8957(_0x146ae4['value']):_0x41aa54(_0x146ae4['value'])['then'](_0x467cac,_0x57d1e0);}_0x4d2e5d((_0x23c68d=_0x23c68d['apply'](_0x1a30e1,_0x217640||[]))['next']());});};class SearchServersService{constructor(_0x1e58a3){this['fetch']=_0x1e58a3,this['path']='search-service';}['create'](_0x403f6c,_0x4b8a11,_0x2226e3,_0xdfa03d,_0x3e4f9a,_0x3454fc,_0x2cf87f,_0x20ddce){return __awaiter$7(this,void 0,void 0,function*(){const _0x32cf5a={'account_name':_0x403f6c,'search_service_name':_0x4b8a11,'endpoint':_0x2226e3,'key':_0xdfa03d,'country':_0x3e4f9a,'provider':_0x3454fc,'index_name':_0x2cf87f};try{const _0x57cd55=yield this['fetch']['post'](this['path'],_0x20ddce,_0x32cf5a);if(_0x57cd55['status']>0xc7&&_0x57cd55['status']<0x12c){const _0x4104c7=yield _0x57cd55['json']();return new SuccessfulSearchServiceResponse(_0x4104c7);}const _0x44bc29=yield _0x57cd55['json']();return new FailedSearchServiceResponse(_0x44bc29);}catch(_0x2c558c){if(_0x2c558c instanceof Error)return new FailedSearchServiceResponse({'detail':_0x2c558c['message'],'title':_0x2c558c['name'],'status':0x1f4,'instance':'','type':''});throw _0x2c558c;}});}['view'](_0x1dca7e,_0x1ddc5d,_0xb4833b){return __awaiter$7(this,void 0,void 0,function*(){const _0x39884b=this['path']+'/'+_0x1dca7e+'/'+_0x1ddc5d;try{const _0xbce100=yield this['fetch']['get'](_0x39884b,_0xb4833b);if(_0xbce100['status']>0xc7&&_0xbce100['status']<0x12c){const _0x388625=yield _0xbce100['json']();return new SuccessfulViewSearchServiceResponse(_0x388625);}const _0x1d7e6b=yield _0xbce100['json']();return new FailedViewSearchServiceResponse(_0x1d7e6b);}catch(_0xbb0505){if(_0xbb0505 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0xbb0505['message'],'title':_0xbb0505['name'],'status':0x1f4,'instance':'','type':''});throw _0xbb0505;}});}['edit'](_0x29c794,_0x4416ba,_0xd48533,_0x9b928f){return __awaiter$7(this,void 0,void 0,function*(){const _0xff3439={'account_name':_0x29c794,'search_service_name':_0x4416ba,'key':_0xd48533};try{const _0x49a037=yield this['fetch']['put'](this['path'],_0x9b928f,_0xff3439);if(_0x49a037['status']>0xc7&&_0x49a037['status']<0x12c){const _0x49afe5=yield _0x49a037['json']();return new SuccessfulSearchServiceResponse(_0x49afe5);}const _0x56c786=yield _0x49a037['json']();return new FailedSearchServiceResponse(_0x56c786);}catch(_0x49d791){if(_0x49d791 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x49d791['message'],'title':_0x49d791['name'],'status':0x1f4,'instance':'','type':''});throw _0x49d791;}});}}
|
|
12
12
|
|
|
13
|
-
var __awaiter$6=undefined&&undefined['__awaiter']||function(
|
|
13
|
+
var __awaiter$6=undefined&&undefined['__awaiter']||function(_0x2de1cc,_0x7156e2,_0x511598,_0x752d83){function _0x58af44(_0x358198){return _0x358198 instanceof _0x511598?_0x358198:new _0x511598(function(_0x557242){_0x557242(_0x358198);});}return new(_0x511598||(_0x511598=Promise))(function(_0x598846,_0x406c96){function _0x1c72b3(_0x12ceac){try{_0x54595b(_0x752d83['next'](_0x12ceac));}catch(_0x599c0b){_0x406c96(_0x599c0b);}}function _0x35a35b(_0x5447f9){try{_0x54595b(_0x752d83['throw'](_0x5447f9));}catch(_0x30958a){_0x406c96(_0x30958a);}}function _0x54595b(_0x241a0b){_0x241a0b['done']?_0x598846(_0x241a0b['value']):_0x58af44(_0x241a0b['value'])['then'](_0x1c72b3,_0x35a35b);}_0x54595b((_0x752d83=_0x752d83['apply'](_0x2de1cc,_0x7156e2||[]))['next']());});};class FacetService{constructor(_0x1938c9){this['fetch']=_0x1938c9,this['path']='facet';}['create'](_0x757770,_0x4ff9ab,_0x3bc678,_0x5daef3){return __awaiter$6(this,void 0,void 0,function*(){const _0x36e7da={'account_name':_0x757770,'list_name':_0x4ff9ab,'facet_name':_0x3bc678};try{const _0x3e547a=yield this['fetch']['post'](this['path'],_0x5daef3,_0x36e7da);if(_0x3e547a['status']>0xc7&&_0x3e547a['status']<0x12c){const _0x33b69a=yield _0x3e547a['json']();return new SuccessfulFacetResponse(_0x33b69a);}const _0x2b0702=yield _0x3e547a['json']();return new FailedFacetResponse(_0x2b0702);}catch(_0x495d77){if(_0x495d77 instanceof Error)return new FailedFacetResponse({'detail':_0x495d77['message'],'title':_0x495d77['name'],'status':0x1f4,'instance':'','type':''});throw _0x495d77;}});}['remove'](_0x39daae,_0x4f724e,_0x17ac59,_0x3e61b7){return __awaiter$6(this,void 0,void 0,function*(){const _0x5cbd88='Facet/'+_0x39daae+'/'+_0x4f724e+'/'+_0x17ac59,_0x5bd9a3=yield this['fetch']['delete'](_0x5cbd88,_0x3e61b7);try{if(_0x5bd9a3['status']>0xc7&&_0x5bd9a3['status']<0x12c)return new SuccessfulResponse({});const _0x47d4d5=yield _0x5bd9a3['json']();return new FailedResponse(_0x47d4d5);}catch(_0x510978){if(_0x510978 instanceof Error)return new FailedResponse({'detail':_0x510978['message'],'title':_0x510978['name'],'status':0x1f4,'instance':'','type':''});throw _0x510978;}});}['rename'](_0xcb8ba5,_0x2588f1,_0x1a5f50,_0x1ce4f7,_0x5d76ff){return __awaiter$6(this,void 0,void 0,function*(){let _0x290a5b=this['path']+'/'+_0xcb8ba5+'/'+_0x2588f1+'/'+_0x1a5f50;const _0xbab0f4={'new_facet_name':_0x1ce4f7};try{const _0x5177bd=yield this['fetch']['put'](_0x290a5b,_0x5d76ff,_0xbab0f4);if(_0x5177bd['status']>0xc7&&_0x5177bd['status']<0x12c){const _0x3c493c=yield _0x5177bd['json']();return new SuccessfulFacetResponse(_0x3c493c);}const _0x13e0b4=yield _0x5177bd['json']();return new FailedFacetResponse(_0x13e0b4);}catch(_0xfe3da1){if(_0xfe3da1 instanceof Error)return new FailedFacetResponse({'detail':_0xfe3da1['message'],'title':_0xfe3da1['name'],'status':0x1f4,'instance':'','type':''});throw _0xfe3da1;}});}['list'](_0x29baff,_0x254ac0,_0x510d7f,_0x3c6a17,_0x2de877){return __awaiter$6(this,void 0,void 0,function*(){let _0x34e638=this['path']+'/'+_0x29baff+'/'+_0x254ac0+'/'+_0x510d7f+'/'+_0x3c6a17;try{const _0x4e37ab=yield this['fetch']['get'](_0x34e638,_0x2de877);if(_0x4e37ab['status']>0xc7&&_0x4e37ab['status']<0x12c){const _0x3cadb1=yield _0x4e37ab['json']();return new SuccessfulFacetValueResponse(_0x3cadb1);}const _0x5984a6=yield _0x4e37ab['json']();return new FailedFacetValuesResponse(_0x5984a6);}catch(_0x50f252){if(_0x50f252 instanceof Error)return new FailedFacetValuesResponse({'detail':_0x50f252['message'],'title':_0x50f252['name'],'status':0x1f4,'instance':'','type':''});throw _0x50f252;}});}}
|
|
14
14
|
|
|
15
|
-
var __awaiter$5=undefined&&undefined['__awaiter']||function(
|
|
15
|
+
var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x4187fa,_0x2346c5,_0x389f8e,_0x41a348){function _0x4c4293(_0x49cde3){return _0x49cde3 instanceof _0x389f8e?_0x49cde3:new _0x389f8e(function(_0x1690d2){_0x1690d2(_0x49cde3);});}return new(_0x389f8e||(_0x389f8e=Promise))(function(_0xc71867,_0x3521d4){function _0x28162b(_0x4ce4d8){try{_0x2f4e5f(_0x41a348['next'](_0x4ce4d8));}catch(_0x37442a){_0x3521d4(_0x37442a);}}function _0x53f8d9(_0x2cf433){try{_0x2f4e5f(_0x41a348['throw'](_0x2cf433));}catch(_0x2457fd){_0x3521d4(_0x2457fd);}}function _0x2f4e5f(_0x50526c){_0x50526c['done']?_0xc71867(_0x50526c['value']):_0x4c4293(_0x50526c['value'])['then'](_0x28162b,_0x53f8d9);}_0x2f4e5f((_0x41a348=_0x41a348['apply'](_0x4187fa,_0x2346c5||[]))['next']());});};class SearchResultService{constructor(_0x1a8515){this['fetch']=_0x1a8515,this['path']='search-result',this['isRealNumber']=_0x2ad7c0=>_0x2ad7c0!=undefined&&typeof _0x2ad7c0==='number'&&Number['isFinite'](_0x2ad7c0);}['create'](_0x2ba5bf,_0x3fe58b,_0x1aa545,_0x5e61c8,_0x1bf015){return __awaiter$5(this,void 0,void 0,function*(){const _0x3d9d55=Object['assign']({'account_name':_0x2ba5bf,'search_result_name':_0x1aa545,'list_name':_0x3fe58b},_0x1bf015);try{const _0x16136c=yield this['fetch']['post'](this['path'],_0x5e61c8,_0x3d9d55);if(_0x16136c['status']>0xc7&&_0x16136c['status']<0x12c){const _0x43f03d=yield _0x16136c['json']();return new SuccessfulSearchResultResponse(_0x43f03d);}const _0x28c95b=yield _0x16136c['json']();return new FailedSearchResultResponse(_0x28c95b);}catch(_0x3809b5){if(_0x3809b5 instanceof Error)return new FailedSearchResultResponse({'detail':_0x3809b5['message'],'title':_0x3809b5['name'],'status':0x1f4,'instance':'','type':''});throw _0x3809b5;}});}['list'](_0x4de47f,_0x8ed7b0,_0x4fa23a,_0x5bcc33){return __awaiter$5(this,void 0,void 0,function*(){let _0x456193=this['path']+'/'+_0x4de47f+'/'+_0x8ed7b0+'?'+this['getQueryStr'](_0x5bcc33);try{const _0x570bee=yield this['fetch']['get'](_0x456193,_0x4fa23a);if(_0x570bee['status']>0xc7&&_0x570bee['status']<0x12c){const _0x57cf5b=yield _0x570bee['json']();return new SuccessfulListSearchResultResponse(_0x57cf5b);}const _0x41048b=yield _0x570bee['json']();return new FailedViewSearchResultResponse(_0x41048b);}catch(_0x508f5a){if(_0x508f5a instanceof Error)return new FailedViewSearchResultResponse({'detail':_0x508f5a['message'],'title':_0x508f5a['name'],'status':0x1f4,'instance':'','type':''});throw _0x508f5a;}});}['get'](_0x331f16,_0xe8ddac,_0x3243a3,_0x49b59e){return __awaiter$5(this,void 0,void 0,function*(){let _0x148d65=this['path']+'/'+_0x331f16+'/'+_0xe8ddac+'?'+_0x3243a3;try{const _0x50bb89=yield this['fetch']['get'](_0x148d65,_0x49b59e);if(_0x50bb89['status']>0xc7&&_0x50bb89['status']<0x12c){const _0x117d09=yield _0x50bb89['json']();return new SuccessfulSearchResultResponse(_0x117d09);}const _0x2dbbf8=yield _0x50bb89['json']();return new FailedSearchResultResponse(_0x2dbbf8);}catch(_0x479dac){if(_0x479dac instanceof Error)return new FailedSearchResultResponse({'detail':_0x479dac['message'],'title':_0x479dac['name'],'status':0x1f4,'instance':'','type':''});throw _0x479dac;}});}['delete'](_0x16883f,_0x398f08,_0x284a6d,_0x149d26){return __awaiter$5(this,void 0,void 0,function*(){const _0xc3ea9e=this['path']+'/'+_0x16883f+'/'+_0x398f08+'/'+_0x284a6d,_0x3f5fd3=yield this['fetch']['delete'](_0xc3ea9e,_0x149d26);try{if(_0x3f5fd3['status']>0xc7&&_0x3f5fd3['status']<0x12c)return new SuccessfulResponse({});const _0xf7246a=yield _0x3f5fd3['json']();return new FailedResponse(_0xf7246a);}catch(_0x553a03){if(_0x553a03 instanceof Error)return new FailedResponse({'detail':_0x553a03['message'],'title':_0x553a03['name'],'status':0x1f4,'instance':'','type':''});throw _0x553a03;}});}['upload'](_0x1d8f79,_0x3a8ea0,_0x26d27b,_0x466ec6,_0x3d64a8,_0x116a42){return __awaiter$5(this,void 0,void 0,function*(){const _0x438009=this['path']+'/'+_0x1d8f79+'/'+_0x3a8ea0+'/upload',_0x596106=new FormData();_0x596106['append']('file',_0x26d27b),_0x596106['append']('name_field',_0x3d64a8),_0x596106['append']('create_fields',_0x466ec6['toString']());try{const _0x35373a=yield this['fetch']['upload'](_0x438009,_0x116a42,_0x596106);if(_0x35373a['status']>0xc7&&_0x35373a['status']<0x12c){const _0x34ff18=yield _0x35373a['json']();return new SuccessfulListResponse(_0x34ff18);}const _0x11a07e=yield _0x35373a['json']();return new FailedListResponse(_0x11a07e);}catch(_0x1e62eb){if(_0x1e62eb instanceof Error)return new FailedListResponse({'detail':_0x1e62eb['message'],'title':_0x1e62eb['name'],'status':0x1f4,'instance':'','type':''});throw _0x1e62eb;}});}['edit'](_0x213b60,_0x124ea4,_0x463e63,_0x1d2d80,_0x5b265d){return __awaiter$5(this,void 0,void 0,function*(){const _0x568ee0=this['path']+'/'+_0x213b60+'/'+_0x124ea4+'/'+_0x463e63;try{const _0x236f30=yield this['fetch']['put'](_0x568ee0,_0x1d2d80,_0x5b265d);if(_0x236f30['status']>0xc7&&_0x236f30['status']<0x12c){const _0x48f81c=yield _0x236f30['json']();return new SuccessfulSearchResultResponse(_0x48f81c);}const _0x3733b4=yield _0x236f30['json']();return new FailedSearchResultResponse(_0x3733b4);}catch(_0x237c2b){if(_0x237c2b instanceof Error)return new FailedSearchResultResponse({'detail':_0x237c2b['message'],'title':_0x237c2b['name'],'status':0x1f4,'instance':'','type':''});throw _0x237c2b;}});}['getQueryStr'](_0x5656b1){let _0x16e61e='';const _0x58b761=[];(_0x5656b1===null||_0x5656b1===void 0?void 0:_0x5656b1['size'])&&_0x58b761['push']('size='+_0x5656b1['size']);(_0x5656b1===null||_0x5656b1===void 0?void 0:_0x5656b1['skip'])&&_0x58b761['push']('skip='+_0x5656b1['skip']);(_0x5656b1===null||_0x5656b1===void 0?void 0:_0x5656b1['query'])&&_0x58b761['push']('query='+_0x5656b1['query']);(_0x5656b1===null||_0x5656b1===void 0?void 0:_0x5656b1['filter'])&&_0x58b761['push']('filter='+_0x5656b1['filter']);if((_0x5656b1===null||_0x5656b1===void 0?void 0:_0x5656b1['radius'])&&this['isRealNumber'](_0x5656b1['radius']['latitude'])&&this['isRealNumber'](_0x5656b1['radius']['longitude'])&&this['isRealNumber'](_0x5656b1['radius']['distance'])){const _0x18ccfc=_0x5656b1['radius']['latitude']+','+_0x5656b1['radius']['longitude']+','+_0x5656b1['radius']['distance'];_0x58b761['push']('radius='+_0x18ccfc);}return _0x5656b1['active']===![]&&_0x58b761['push']('active='+_0x5656b1['active']),_0x58b761['length']>0x0&&_0x58b761['forEach']((_0x242021,_0x5a2990)=>{if(_0x5a2990>0x0&&_0x16e61e)_0x16e61e+='&';_0x16e61e+=_0x242021;}),_0x16e61e;}}
|
|
16
16
|
|
|
17
|
-
var __awaiter$4=undefined&&undefined['__awaiter']||function(
|
|
17
|
+
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x4e7bb8,_0x1fd40,_0x3bc2e7,_0x438770){function _0x5d4f9d(_0x2bf2ad){return _0x2bf2ad instanceof _0x3bc2e7?_0x2bf2ad:new _0x3bc2e7(function(_0x13e1ed){_0x13e1ed(_0x2bf2ad);});}return new(_0x3bc2e7||(_0x3bc2e7=Promise))(function(_0x50b745,_0xa8a23e){function _0x2991ce(_0x51c681){try{_0x5dc3ff(_0x438770['next'](_0x51c681));}catch(_0x26a03d){_0xa8a23e(_0x26a03d);}}function _0x486c14(_0xbcc93d){try{_0x5dc3ff(_0x438770['throw'](_0xbcc93d));}catch(_0x1cc5f4){_0xa8a23e(_0x1cc5f4);}}function _0x5dc3ff(_0x275aee){_0x275aee['done']?_0x50b745(_0x275aee['value']):_0x5d4f9d(_0x275aee['value'])['then'](_0x2991ce,_0x486c14);}_0x5dc3ff((_0x438770=_0x438770['apply'](_0x4e7bb8,_0x1fd40||[]))['next']());});};class ContributorService{constructor(_0x2d4829){this['fetch']=_0x2d4829,this['path']='contributor';}['create'](_0x2c35bf,_0x1b9387,_0x2a8def,_0x333d07){return __awaiter$4(this,void 0,void 0,function*(){const _0x536b0c={'account_name':_0x2c35bf,'list_name':_0x1b9387,'contributor_name':_0x2a8def};try{const _0x8fee4a=yield this['fetch']['post'](this['path'],_0x333d07,_0x536b0c);if(_0x8fee4a['status']>0xc7&&_0x8fee4a['status']<0x12c){const _0x3dad9a=yield _0x8fee4a['json']();return new SuccessfulContributorResponse(_0x3dad9a);}const _0x45b5c8=yield _0x8fee4a['json']();return new FailedContributorResponse(_0x45b5c8);}catch(_0x2c1459){if(_0x2c1459 instanceof Error)return new FailedContributorResponse({'detail':_0x2c1459['message'],'title':_0x2c1459['name'],'status':0x1f4,'instance':'','type':''});throw _0x2c1459;}});}['remove'](_0x27f308,_0xb0bd4,_0x5b3791,_0x522b35){return __awaiter$4(this,void 0,void 0,function*(){const _0x17f4ce=this['path']+'/'+_0x27f308+'/'+_0xb0bd4+'/'+_0x5b3791,_0x40a21e=yield this['fetch']['delete'](_0x17f4ce,_0x522b35);try{if(_0x40a21e['status']>0xc7&&_0x40a21e['status']<0x12c)return new SuccessfulResponse({});const _0x2f8eec=yield _0x40a21e['json']();return new FailedResponse(_0x2f8eec);}catch(_0xf59f24){if(_0xf59f24 instanceof Error)return new FailedResponse({'detail':_0xf59f24['message'],'title':_0xf59f24['name'],'status':0x1f4,'instance':'','type':''});throw _0xf59f24;}});}['startsWith'](_0x35fa6f,_0x2971e3){return __awaiter$4(this,void 0,void 0,function*(){const _0x11e4c1=this['path']+'/'+_0x35fa6f;try{const _0x767a=yield this['fetch']['get'](_0x11e4c1,_0x2971e3);if(_0x767a['status']>0xc7&&_0x767a['status']<0x12c){const _0x44dcca=yield _0x767a['json']();return new SuccessfulAccountAndImageResponse(_0x44dcca);}const _0x289e65=yield _0x767a['json']();return new FailedAccountAndImageResponse(_0x289e65);}catch(_0x3f0367){if(_0x3f0367 instanceof Error)return new FailedAccountAndImageResponse({'detail':_0x3f0367['message'],'title':_0x3f0367['name'],'status':0x1f4,'instance':'','type':''});throw _0x3f0367;}});}}
|
|
18
18
|
|
|
19
|
-
var __awaiter$3=undefined&&undefined['__awaiter']||function(
|
|
19
|
+
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x4b331f,_0x35675c,_0x49664e,_0x518afb){function _0x1dc828(_0x9a4844){return _0x9a4844 instanceof _0x49664e?_0x9a4844:new _0x49664e(function(_0x26c979){_0x26c979(_0x9a4844);});}return new(_0x49664e||(_0x49664e=Promise))(function(_0x57b65c,_0x548576){function _0x9da338(_0x10cbc4){try{_0x5c38b4(_0x518afb['next'](_0x10cbc4));}catch(_0x52b73a){_0x548576(_0x52b73a);}}function _0x1a16e2(_0x5ea4b4){try{_0x5c38b4(_0x518afb['throw'](_0x5ea4b4));}catch(_0x4f7f96){_0x548576(_0x4f7f96);}}function _0x5c38b4(_0x412791){_0x412791['done']?_0x57b65c(_0x412791['value']):_0x1dc828(_0x412791['value'])['then'](_0x9da338,_0x1a16e2);}_0x5c38b4((_0x518afb=_0x518afb['apply'](_0x4b331f,_0x35675c||[]))['next']());});};class SearchableFieldService{constructor(_0x148b44){this['fetch']=_0x148b44,this['path']='searchable-field';}['create'](_0x5e869d,_0x1d8baf,_0x192900,_0x2544ed){return __awaiter$3(this,void 0,void 0,function*(){const _0x4fe2ac={'account_name':_0x5e869d,'list_name':_0x1d8baf,'searchable_field_name':_0x192900};try{const _0x59aaa9=yield this['fetch']['post'](this['path'],_0x2544ed,_0x4fe2ac);if(_0x59aaa9['status']>0xc7&&_0x59aaa9['status']<0x12c){const _0x5a5fcc=yield _0x59aaa9['json']();return new SuccessfulSearchableFieldResponse(_0x5a5fcc);}const _0x9dc5f9=yield _0x59aaa9['json']();return new FailedSearchableFieldResponse(_0x9dc5f9);}catch(_0x47fac5){if(_0x47fac5 instanceof Error)return new FailedSearchableFieldResponse({'detail':_0x47fac5['message'],'title':_0x47fac5['name'],'status':0x1f4,'instance':'','type':''});throw _0x47fac5;}});}['remove'](_0x2fd756,_0x572781,_0x409a58,_0x57e745){return __awaiter$3(this,void 0,void 0,function*(){const _0x21e6aa=this['path']+'/'+_0x2fd756+'/'+_0x572781+'/'+_0x409a58,_0xabe990=yield this['fetch']['delete'](_0x21e6aa,_0x57e745);try{if(_0xabe990['status']>0xc7&&_0xabe990['status']<0x12c)return new SuccessfulResponse({});const _0x4e007a=yield _0xabe990['json']();return new FailedResponse(_0x4e007a);}catch(_0x46070b){if(_0x46070b instanceof Error)return new FailedResponse({'detail':_0x46070b['message'],'title':_0x46070b['name'],'status':0x1f4,'instance':'','type':''});throw _0x46070b;}});}['rename'](_0x19c536,_0x43ac49,_0x43f26e,_0x3f57af,_0x534749){return __awaiter$3(this,void 0,void 0,function*(){let _0x9be5e6=this['path']+'/'+_0x19c536+'/'+_0x43ac49+'/'+_0x43f26e;const _0x544275={'new_searchable_field_name':_0x3f57af};try{const _0x403d95=yield this['fetch']['put'](_0x9be5e6,_0x534749,_0x544275);if(_0x403d95['status']>0xc7&&_0x403d95['status']<0x12c){const _0x35a9ee=yield _0x403d95['json']();return new SuccessfulSearchableFieldResponse(_0x35a9ee);}const _0x2578de=yield _0x403d95['json']();return new FailedSearchableFieldResponse(_0x2578de);}catch(_0x506c47){if(_0x506c47 instanceof Error)return new FailedSearchableFieldResponse({'detail':_0x506c47['message'],'title':_0x506c47['name'],'status':0x1f4,'instance':'','type':''});throw _0x506c47;}});}}
|
|
20
20
|
|
|
21
|
-
var __awaiter$2=undefined&&undefined['__awaiter']||function(
|
|
21
|
+
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x203fcc,_0x310976,_0x4e87f2,_0x122267){function _0x39e7a8(_0x2d069c){return _0x2d069c instanceof _0x4e87f2?_0x2d069c:new _0x4e87f2(function(_0x3ca673){_0x3ca673(_0x2d069c);});}return new(_0x4e87f2||(_0x4e87f2=Promise))(function(_0xfc6196,_0x30d2bb){function _0xb47d04(_0x59971d){try{_0x25ae16(_0x122267['next'](_0x59971d));}catch(_0x5f031d){_0x30d2bb(_0x5f031d);}}function _0x326bb4(_0x4f5133){try{_0x25ae16(_0x122267['throw'](_0x4f5133));}catch(_0x25bd87){_0x30d2bb(_0x25bd87);}}function _0x25ae16(_0x27710c){_0x27710c['done']?_0xfc6196(_0x27710c['value']):_0x39e7a8(_0x27710c['value'])['then'](_0xb47d04,_0x326bb4);}_0x25ae16((_0x122267=_0x122267['apply'](_0x203fcc,_0x310976||[]))['next']());});};class ResourceService{constructor(_0x2b94b0){this['fetch']=_0x2b94b0,this['path']='resource';}['create'](_0x606473,_0x196ebc,_0x24f542,_0xb43926){return __awaiter$2(this,void 0,void 0,function*(){const _0x188a34={'account_name':_0x606473,'list_name':_0x196ebc,'resource_name':_0x24f542};try{const _0x1658ac=yield this['fetch']['post'](this['path'],_0xb43926,_0x188a34);if(_0x1658ac['status']>0xc7&&_0x1658ac['status']<0x12c){const _0x4ddc08=yield _0x1658ac['json']();return new SuccessfulResourceResponse(_0x4ddc08);}const _0x213e21=yield _0x1658ac['json']();return new FailedResourceResponse(_0x213e21);}catch(_0x597ff3){if(_0x597ff3 instanceof Error)return new FailedResourceResponse({'detail':_0x597ff3['message'],'title':_0x597ff3['name'],'status':0x1f4,'instance':'','type':''});throw _0x597ff3;}});}['remove'](_0x4d821f,_0x4786e9,_0x497e4f,_0x54c7b6){return __awaiter$2(this,void 0,void 0,function*(){const _0x59ca8a=this['path']+'/'+_0x4d821f+'/'+_0x4786e9+'/'+_0x497e4f,_0x1b1e26=yield this['fetch']['delete'](_0x59ca8a,_0x54c7b6);try{if(_0x1b1e26['status']>0xc7&&_0x1b1e26['status']<0x12c)return new SuccessfulResponse({});const _0x1fe2f6=yield _0x1b1e26['json']();return new FailedResponse(_0x1fe2f6);}catch(_0x10f4b0){if(_0x10f4b0 instanceof Error)return new FailedResponse({'detail':_0x10f4b0['message'],'title':_0x10f4b0['name'],'status':0x1f4,'instance':'','type':''});throw _0x10f4b0;}});}['rename'](_0x479c9d,_0x2ce0ff,_0xb2aba3,_0x1d6762,_0x819453){return __awaiter$2(this,void 0,void 0,function*(){let _0x45fe4a=this['path']+'/'+_0x479c9d+'/'+_0x2ce0ff;const _0x6575f5={'resource_name':_0xb2aba3,'new_resource_name':_0x1d6762};try{const _0x7d0042=yield this['fetch']['put'](_0x45fe4a,_0x819453,_0x6575f5);if(_0x7d0042['status']>0xc7&&_0x7d0042['status']<0x12c){const _0x5a8cba=yield _0x7d0042['json']();return new SuccessfulResourceResponse(_0x5a8cba);}const _0x4f6cb5=yield _0x7d0042['json']();return new FailedResourceResponse(_0x4f6cb5);}catch(_0x15930c){if(_0x15930c instanceof Error)return new FailedResourceResponse({'detail':_0x15930c['message'],'title':_0x15930c['name'],'status':0x1f4,'instance':'','type':''});throw _0x15930c;}});}}
|
|
22
22
|
|
|
23
|
-
var __awaiter$1=undefined&&undefined['__awaiter']||function(
|
|
23
|
+
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x204ae4,_0x5befbc,_0x267065,_0x1b3a97){function _0x5d04cb(_0x4ab803){return _0x4ab803 instanceof _0x267065?_0x4ab803:new _0x267065(function(_0x3c52ef){_0x3c52ef(_0x4ab803);});}return new(_0x267065||(_0x267065=Promise))(function(_0x52a000,_0x2323f9){function _0xef06d0(_0x4be623){try{_0x14ab0d(_0x1b3a97['next'](_0x4be623));}catch(_0x317f65){_0x2323f9(_0x317f65);}}function _0x4cda9b(_0x3f5ef1){try{_0x14ab0d(_0x1b3a97['throw'](_0x3f5ef1));}catch(_0x45f283){_0x2323f9(_0x45f283);}}function _0x14ab0d(_0x370195){_0x370195['done']?_0x52a000(_0x370195['value']):_0x5d04cb(_0x370195['value'])['then'](_0xef06d0,_0x4cda9b);}_0x14ab0d((_0x1b3a97=_0x1b3a97['apply'](_0x204ae4,_0x5befbc||[]))['next']());});};class GroupService{constructor(_0x551c22){this['fetch']=_0x551c22,this['path']='group',this['List']=new GroupListService(_0x551c22);}['create'](_0x10bc52,_0x46b1f6,_0x848da9,_0x173670){return __awaiter$1(this,void 0,void 0,function*(){const _0x45954f={'account_name':_0x10bc52,'search_service_name':_0x46b1f6,'group_name':_0x848da9};try{const _0x38a480=yield this['fetch']['post'](this['path'],_0x173670,_0x45954f);if(_0x38a480['status']>0xc7&&_0x38a480['status']<0x12c){const _0x2fc60c=yield _0x38a480['json']();return new SuccessfulGroupResponse(_0x2fc60c);}const _0x2a620f=yield _0x38a480['json']();return new FailedGroupResponse(_0x2a620f);}catch(_0x566d34){if(_0x566d34 instanceof Error)return new FailedGroupResponse({'detail':_0x566d34['message'],'title':_0x566d34['name'],'status':0x1f4,'instance':'','type':''});throw _0x566d34;}});}['delete'](_0x33313e,_0x47d4b4,_0x4011ae){return __awaiter$1(this,void 0,void 0,function*(){const _0x5431db=this['path']+'/'+_0x33313e+'/'+_0x47d4b4,_0x2a034b=yield this['fetch']['delete'](_0x5431db,_0x4011ae);try{if(_0x2a034b['status']>0xc7&&_0x2a034b['status']<0x12c)return new SuccessfulResponse({});const _0x193eea=yield _0x2a034b['json']();return new FailedResponse(_0x193eea);}catch(_0x5d35e7){if(_0x5d35e7 instanceof Error)return new FailedResponse({'detail':_0x5d35e7['message'],'title':_0x5d35e7['name'],'status':0x1f4,'instance':'','type':''});throw _0x5d35e7;}});}['edit'](_0x16f23a,_0x2d5bd1,_0x183ce3,_0x56ee16){return __awaiter$1(this,void 0,void 0,function*(){const _0x2f39f3=this['path']+'/'+_0x16f23a+'/'+_0x2d5bd1,_0x5eee06=yield this['fetch']['put'](_0x2f39f3,_0x183ce3,_0x56ee16);try{if(_0x5eee06['status']>0xc7&&_0x5eee06['status']<0x12c){const _0x1545d6=yield _0x5eee06['json']();return new SuccessfulGroupResponse(_0x1545d6);}const _0x41a398=yield _0x5eee06['json']();return new FailedGroupResponse(_0x41a398);}catch(_0x49a834){if(_0x49a834 instanceof Error)return new FailedGroupResponse({'detail':_0x49a834['message'],'title':_0x49a834['name'],'status':0x1f4,'instance':'','type':''});throw _0x49a834;}});}['transfer'](_0x5bb941,_0x52bfc7,_0x1a95a9,_0xd74f7a){return __awaiter$1(this,void 0,void 0,function*(){const _0x195187={'new_search_service_name':_0x1a95a9};try{const _0x205bea=yield this['fetch']['put'](this['path']+'/transfer/'+_0x5bb941+'/'+_0x52bfc7,_0xd74f7a,_0x195187);if(_0x205bea['status']>0xc7&&_0x205bea['status']<0x12c){const _0x180d0=yield _0x205bea['json']();return new SuccessfulGroupResponse(_0x180d0);}const _0x14ff83=yield _0x205bea['json']();return new FailedGroupResponse(_0x14ff83);}catch(_0x53c1c9){if(_0x53c1c9 instanceof Error)return new FailedGroupResponse({'detail':_0x53c1c9['message'],'title':_0x53c1c9['name'],'status':0x1f4,'instance':'','type':''});throw _0x53c1c9;}});}}class GroupListService{constructor(_0x3cd080){this['fetch']=_0x3cd080,this['path']='group/list';}['add'](_0x29d6e8,_0xfb4e0b,_0x3b30da,_0x2a1f18,_0x431c61){return __awaiter$1(this,void 0,void 0,function*(){const _0x698ac2={'list_name':_0x3b30da,'version':_0x2a1f18};try{const _0x1bddc9=yield this['fetch']['put'](this['path']+'/'+_0x29d6e8+'/'+_0xfb4e0b,_0x431c61,_0x698ac2);if(_0x1bddc9['status']>0xc7&&_0x1bddc9['status']<0x12c){const _0x3d3c35=yield _0x1bddc9['json']();return new SuccessfulGroupResponse(_0x3d3c35);}const _0x46973=yield _0x1bddc9['json']();return new FailedGroupResponse(_0x46973);}catch(_0x21effc){if(_0x21effc instanceof Error)return new FailedGroupResponse({'detail':_0x21effc['message'],'title':_0x21effc['name'],'status':0x1f4,'instance':'','type':''});throw _0x21effc;}});}['remove'](_0x3f1ba0,_0xfbe09d,_0x133b02,_0x2ab0fe){return __awaiter$1(this,void 0,void 0,function*(){const _0x35a830=this['path']+'/'+_0x3f1ba0+'/'+_0xfbe09d+'/'+_0x133b02,_0x3e9182=yield this['fetch']['delete'](_0x35a830,_0x2ab0fe);try{if(_0x3e9182['status']>0xc7&&_0x3e9182['status']<0x12c){const _0x5e4bb9=yield _0x3e9182['json']();return new SuccessfulGroupResponse(_0x5e4bb9);}const _0x18e13c=yield _0x3e9182['json']();return new FailedGroupResponse(_0x18e13c);}catch(_0x40cd8e){if(_0x40cd8e instanceof Error)return new FailedGroupResponse({'detail':_0x40cd8e['message'],'title':_0x40cd8e['name'],'status':0x1f4,'instance':'','type':''});throw _0x40cd8e;}});}}
|
|
24
24
|
|
|
25
|
-
var __awaiter=undefined&&undefined['__awaiter']||function(
|
|
25
|
+
var __awaiter=undefined&&undefined['__awaiter']||function(_0x46e2d2,_0x3ea25c,_0x405d77,_0x437a14){function _0x334cd3(_0x4229f1){return _0x4229f1 instanceof _0x405d77?_0x4229f1:new _0x405d77(function(_0x189f83){_0x189f83(_0x4229f1);});}return new(_0x405d77||(_0x405d77=Promise))(function(_0x19adff,_0x58f67b){function _0x2e0b1b(_0x92aa76){try{_0x19578d(_0x437a14['next'](_0x92aa76));}catch(_0x470284){_0x58f67b(_0x470284);}}function _0x2a39f1(_0x508377){try{_0x19578d(_0x437a14['throw'](_0x508377));}catch(_0x5a642c){_0x58f67b(_0x5a642c);}}function _0x19578d(_0x41533c){_0x41533c['done']?_0x19adff(_0x41533c['value']):_0x334cd3(_0x41533c['value'])['then'](_0x2e0b1b,_0x2a39f1);}_0x19578d((_0x437a14=_0x437a14['apply'](_0x46e2d2,_0x3ea25c||[]))['next']());});};class AdminClient{constructor(_0x536ceb='https://admin.searchability.dev/'){var _0x452409=new Fetch(_0x536ceb);this['Accounts']=new AccountService(_0x452409),this['Lists']=new ListService(_0x452409),this['ApiKeys']=new ApiKeyService(_0x452409),this['SearchServers']=new SearchServersService(_0x452409),this['Facets']=new FacetService(_0x452409),this['SearchResults']=new SearchResultService(_0x452409),this['Contributors']=new ContributorService(_0x452409),this['SearchableFields']=new SearchableFieldService(_0x452409),this['Groups']=new GroupService(_0x452409),this['Resources']=new ResourceService(_0x452409);}}class AuthClient{constructor(_0x59ee0f='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x59ee0f);}['login'](_0xc50e11){return __awaiter(this,void 0,void 0,function*(){const _0x828fc7='login/'+_0xc50e11;try{const _0x24948a=yield yield fetch(_0x828fc7);if(_0x24948a['status']>0xc7&&_0x24948a['status']<0x12c){const _0x24fe0d=yield _0x24948a['json']();return new SuccessfulAuthResponse(_0x24fe0d);}const _0x29e8b7=yield _0x24948a['json']();return new FailedAuthResponse(_0x29e8b7);}catch(_0x25bef8){if(_0x25bef8 instanceof Error)return new FailedAuthResponse({'detail':_0x25bef8['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x25bef8;}});}['refresh'](_0x2e2e83){return __awaiter(this,void 0,void 0,function*(){const _0x234804='refresh',_0x51e75d={'refresh_token':_0x2e2e83};try{const _0x54e012=yield this['fetch']['PostNoAuth'](_0x234804,_0x51e75d);if(_0x54e012['status']>0xc7&&_0x54e012['status']<0x12c){const _0x517677=yield _0x54e012['json']();return new SuccessfulAuthResponse(_0x517677);}const _0x23d41e=yield _0x54e012['json']();return new FailedAuthResponse(_0x23d41e);}catch(_0x233402){if(_0x233402 instanceof Error)return new FailedAuthResponse({'detail':_0x233402['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x233402;}});}['getTokenStatus'](_0x356839){if(Date['now']()<_0x356839['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x356839['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
|
|
26
26
|
|
|
27
27
|
export { AdminClient, AuthClient, TokenStatus, Tokens };
|
package/dist/types.d.ts
CHANGED
|
@@ -284,7 +284,7 @@ type AccountAndImage = {
|
|
|
284
284
|
image_path: string;
|
|
285
285
|
};
|
|
286
286
|
type Account = {
|
|
287
|
-
|
|
287
|
+
account_name: string;
|
|
288
288
|
owner: string;
|
|
289
289
|
country: string;
|
|
290
290
|
created: number;
|
|
@@ -295,7 +295,7 @@ type Account = {
|
|
|
295
295
|
groups: Group[];
|
|
296
296
|
};
|
|
297
297
|
type Subscription = {
|
|
298
|
-
|
|
298
|
+
subscription_name: string;
|
|
299
299
|
cancelled_utc?: number | null | undefined;
|
|
300
300
|
expires_utc: number;
|
|
301
301
|
created_utc: number;
|