@searchability/admin-client 0.0.136 → 0.0.137
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,30 +1,30 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
exports.TokenStatus = void 0;(function(
|
|
3
|
+
exports.TokenStatus = void 0;(function(_0x65f720){_0x65f720[_0x65f720['Ok']=0x0]='Ok',_0x65f720[_0x65f720['Refresh']=0x1]='Refresh',_0x65f720[_0x65f720['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(_0x4188af){this['isSuccess']=_0x4188af;}}class SuccessfulFacetValueResponse extends Response{constructor(_0x58514f){super(!![]),this['facets']=_0x58514f;}['toSuccess'](){return this['facets'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetValuesResponse extends Response{constructor(_0x49a55b){super(![]),this['problem']=_0x49a55b;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulContributorResponse extends Response{constructor(_0x267541){super(!![]),this['contributor']=_0x267541;}['toSuccess'](){return this['contributor'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedContributorResponse extends Response{constructor(_0x49d214){super(![]),this['problem']=_0x49d214;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountAndImageResponse extends Response{constructor(_0x4f8603){super(!![]),this['accountAndImages']=_0x4f8603;}['toSuccess'](){return this['accountAndImages'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountAndImageResponse extends Response{constructor(_0x2a6602){super(![]),this['problem']=_0x2a6602;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulResourceResponse extends Response{constructor(_0x2dd166){super(!![]),this['resource']=_0x2dd166;}['toSuccess'](){return this['resource'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResourceResponse extends Response{constructor(_0x14ce28){super(![]),this['problem']=_0x14ce28;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulFacetResponse extends Response{constructor(_0x4ea6d7){super(!![]),this['facet']=_0x4ea6d7;}['toSuccess'](){return this['facet'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetResponse extends Response{constructor(_0x441b7a){super(![]),this['problem']=_0x441b7a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedSearchableFieldResponse extends Response{constructor(_0xccb0b3){super(![]),this['problem']=_0xccb0b3;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchableFieldResponse extends Response{constructor(_0x4f8345){super(!![]),this['searchable_field']=_0x4f8345;}['toSuccess'](){return this['searchable_field'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountResponse extends Response{constructor(_0x457ec1){super(!![]),this['account']=_0x457ec1;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountImageResponse extends Response{constructor(_0xff6354){super(!![]),this['accountImage']=_0xff6354;}['toSuccess'](){return this['accountImage'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListIdentityResponse extends Response{constructor(_0x274e9b){super(!![]),this['list']=_0x274e9b;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulGroupResponse extends Response{constructor(_0x409fbf){super(!![]),this['group']=_0x409fbf;}['toSuccess'](){return this['group'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedGroupResponse extends Response{constructor(_0x3d9128){super(![]),this['problem']=_0x3d9128;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListResponse extends Response{constructor(_0x5461fc){super(!![]),this['list']=_0x5461fc;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedListResponse extends Response{constructor(_0x126974){super(![]),this['problem']=_0x126974;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountResponse extends Response{constructor(_0x2a8642){super(![]),this['problem']=_0x2a8642;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountImageResponse extends Response{constructor(_0x1e2b68){super(![]),this['problem']=_0x1e2b68;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListIdentityResponse extends Response{constructor(_0x2cfeb0){super(![]),this['problem']=_0x2cfeb0;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x385fdd){super(!![]),this['tokens']=_0x385fdd;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0xc2e59c){super(![]),this['problem']=_0xc2e59c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x3856ab){super(!![]),this['apiKey']=_0x3856ab;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x23dedf){super(![]),this['problem']=_0x23dedf;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x27fa45){super(!![]),this['searchService']=_0x27fa45;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x5870f9){super(![]),this['problem']=_0x5870f9;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x27bc32){super(!![]),this['searchService']=_0x27bc32;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulSearchResultResponse extends Response{constructor(_0x113ee9){super(!![]),this['searchResult']=_0x113ee9;}['toSuccess'](){return this['searchResult'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchResultResponse extends Response{constructor(_0x21ba91){super(![]),this['problem']=_0x21ba91;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchResultResponse extends Response{constructor(_0x5bd6e4){super(!![]),this['searchResults']=_0x5bd6e4;}['toSuccess'](){return this['searchResults'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchResultResponse extends Response{constructor(_0x565448){super(![]),this['problem']=_0x565448;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchServiceResponse extends Response{constructor(_0x43201e){super(!![]),this['searchServices']=_0x43201e;}['toSuccess'](){return this['searchServices'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServicesResponse extends Response{constructor(_0x1fb619){super(![]),this['problem']=_0x1fb619;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedViewSearchServiceResponse extends Response{constructor(_0x34dbf2){super(![]),this['problem']=_0x34dbf2;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x847e7c){super(!![]),this['apiKeyValue']=_0x847e7c;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x11df63){super(!![]),this['obj']=_0x11df63;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x21ab90){super(![]),this['problem']=_0x21ab90;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0xdf6862){super(![]),this['problem']=_0xdf6862;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
|
|
4
4
|
|
|
5
|
-
var __awaiter$b=undefined&&undefined['__awaiter']||function(
|
|
5
|
+
var __awaiter$b=undefined&&undefined['__awaiter']||function(_0x355c05,_0x3771c6,_0x1e4b4a,_0x52369f){function _0x275a61(_0x5aca45){return _0x5aca45 instanceof _0x1e4b4a?_0x5aca45:new _0x1e4b4a(function(_0x2b873f){_0x2b873f(_0x5aca45);});}return new(_0x1e4b4a||(_0x1e4b4a=Promise))(function(_0x161c0d,_0x1bb3fe){function _0x1beb21(_0x28ac6f){try{_0xdb1dbf(_0x52369f['next'](_0x28ac6f));}catch(_0x57f02c){_0x1bb3fe(_0x57f02c);}}function _0x262b08(_0x15315e){try{_0xdb1dbf(_0x52369f['throw'](_0x15315e));}catch(_0x464b95){_0x1bb3fe(_0x464b95);}}function _0xdb1dbf(_0x6f5a92){_0x6f5a92['done']?_0x161c0d(_0x6f5a92['value']):_0x275a61(_0x6f5a92['value'])['then'](_0x1beb21,_0x262b08);}_0xdb1dbf((_0x52369f=_0x52369f['apply'](_0x355c05,_0x3771c6||[]))['next']());});};class AccountService{constructor(_0x2e188e){this['fetch']=_0x2e188e;}['get'](_0x4e336d,_0x1739cc){return __awaiter$b(this,void 0,void 0,function*(){const _0x326cd1='Account/'+_0x4e336d+'/',_0x245c7e=yield this['fetch']['get'](_0x326cd1,_0x1739cc);try{if(_0x245c7e['status']>0xc7&&_0x245c7e['status']<0x12c){const _0x5b2283=yield _0x245c7e['json']();return new SuccessfulAccountResponse(_0x5b2283);}const _0xdb530a=yield _0x245c7e['json']();return new FailedAccountResponse(_0xdb530a);}catch(_0x34e3f5){if(_0x34e3f5 instanceof Error)return new FailedAccountResponse({'detail':_0x34e3f5['message'],'title':_0x34e3f5['name'],'status':0x1f4,'instance':'','type':''});throw _0x34e3f5;}});}['getImage'](_0x2bd254,_0x4ff378){return __awaiter$b(this,void 0,void 0,function*(){const _0x2d352b='account/image/'+_0x2bd254+'/',_0x18c8df=yield this['fetch']['get'](_0x2d352b,_0x4ff378);try{if(_0x18c8df['status']>0xc7&&_0x18c8df['status']<0x12c){const _0xbecdc5=yield _0x18c8df['json']();return new SuccessfulAccountImageResponse(_0xbecdc5);}const _0x5bdd32=yield _0x18c8df['json']();return new FailedAccountImageResponse(_0x5bdd32);}catch(_0x8b7e87){if(_0x8b7e87 instanceof Error)return new FailedAccountImageResponse({'detail':_0x8b7e87['message'],'title':_0x8b7e87['name'],'status':0x1f4,'instance':'','type':''});throw _0x8b7e87;}});}}
|
|
6
6
|
|
|
7
|
-
var __awaiter$a=undefined&&undefined['__awaiter']||function(
|
|
7
|
+
var __awaiter$a=undefined&&undefined['__awaiter']||function(_0x1bb0d1,_0x23b69a,_0x495ed1,_0x20c2e6){function _0x3fb5b6(_0x11b6c9){return _0x11b6c9 instanceof _0x495ed1?_0x11b6c9:new _0x495ed1(function(_0x564ea2){_0x564ea2(_0x11b6c9);});}return new(_0x495ed1||(_0x495ed1=Promise))(function(_0x42675d,_0x5e2fed){function _0x5b87ea(_0x349bdc){try{_0x90a657(_0x20c2e6['next'](_0x349bdc));}catch(_0x300f10){_0x5e2fed(_0x300f10);}}function _0x160083(_0xd6a14c){try{_0x90a657(_0x20c2e6['throw'](_0xd6a14c));}catch(_0x5f3a9c){_0x5e2fed(_0x5f3a9c);}}function _0x90a657(_0x27af69){_0x27af69['done']?_0x42675d(_0x27af69['value']):_0x3fb5b6(_0x27af69['value'])['then'](_0x5b87ea,_0x160083);}_0x90a657((_0x20c2e6=_0x20c2e6['apply'](_0x1bb0d1,_0x23b69a||[]))['next']());});};class ApiKeyService{constructor(_0x9738cf){this['fetch']=_0x9738cf,this['path']='api-key';}['create'](_0x455367,_0x618295,_0x3cbe65){return __awaiter$a(this,void 0,void 0,function*(){const _0x30620c={'account_name':_0x455367,'api_key_name':_0x618295};try{const _0x3899b3=yield this['fetch']['post'](this['path'],_0x3cbe65,_0x30620c);if(_0x3899b3['status']>0xc7&&_0x3899b3['status']<0x12c){const _0xf19250=yield _0x3899b3['json']();return new SuccessfulApiKeyResponse(_0xf19250);}const _0x3e0389=yield _0x3899b3['json']();return new FailedApiKeyResponse(_0x3e0389);}catch(_0x24c2f1){if(_0x24c2f1 instanceof Error)return new FailedApiKeyResponse({'detail':_0x24c2f1['message'],'title':_0x24c2f1['name'],'status':0x1f4,'instance':'','type':''});throw _0x24c2f1;}});}['view'](_0x18c86d,_0x21b7c4,_0xe58229){return __awaiter$a(this,void 0,void 0,function*(){const _0x38c6da=this['path']+'/'+_0x18c86d+'/'+_0x21b7c4;try{const _0x201759=yield this['fetch']['get'](_0x38c6da,_0xe58229);if(_0x201759['status']>0xc7&&_0x201759['status']<0x12c){const _0xebc6a7=yield _0x201759['json']();return new SuccessfulApiKeyValueResponse(_0xebc6a7);}const _0x4f4c74=yield _0x201759['json']();return new FailedApiKeyValueResponse(_0x4f4c74);}catch(_0x52c1cc){if(_0x52c1cc instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x52c1cc['message'],'title':_0x52c1cc['name'],'status':0x1f4,'instance':'','type':''});throw _0x52c1cc;}});}['delete'](_0x257630,_0xb439e7,_0x33ebeb){return __awaiter$a(this,void 0,void 0,function*(){const _0x2bc088=this['path']+'/'+_0x257630+'/'+_0xb439e7;try{const _0x598951=yield this['fetch']['delete'](_0x2bc088,_0x33ebeb);if(_0x598951['status']>0xc7&&_0x598951['status']<0x12c)return new SuccessfulResponse({});const _0x2f0382=yield _0x598951['json']();return new FailedResponse(_0x2f0382);}catch(_0x30febc){if(_0x30febc instanceof Error)return new FailedResponse({'detail':_0x30febc['message'],'title':_0x30febc['name'],'status':0x1f4,'instance':'','type':''});throw _0x30febc;}});}}
|
|
8
8
|
|
|
9
|
-
var __awaiter$9=undefined&&undefined['__awaiter']||function(
|
|
9
|
+
var __awaiter$9=undefined&&undefined['__awaiter']||function(_0x5a7398,_0x12fc2a,_0x5e9daf,_0x1c1a87){function _0x196447(_0x17a9d7){return _0x17a9d7 instanceof _0x5e9daf?_0x17a9d7:new _0x5e9daf(function(_0x5b55dd){_0x5b55dd(_0x17a9d7);});}return new(_0x5e9daf||(_0x5e9daf=Promise))(function(_0x1ab66f,_0x39ff79){function _0x60eac2(_0x149a7f){try{_0x51d407(_0x1c1a87['next'](_0x149a7f));}catch(_0x2d8c08){_0x39ff79(_0x2d8c08);}}function _0x371b86(_0x251f3e){try{_0x51d407(_0x1c1a87['throw'](_0x251f3e));}catch(_0x265972){_0x39ff79(_0x265972);}}function _0x51d407(_0x1d5cf8){_0x1d5cf8['done']?_0x1ab66f(_0x1d5cf8['value']):_0x196447(_0x1d5cf8['value'])['then'](_0x60eac2,_0x371b86);}_0x51d407((_0x1c1a87=_0x1c1a87['apply'](_0x5a7398,_0x12fc2a||[]))['next']());});};class ListService{constructor(_0x3a93eb){this['fetch']=_0x3a93eb,this['path']='list',this['Coordinates']=new CoordinatesService(_0x3a93eb),this['GeneratedSuggestions']=new GeneratedSuggestionsService(_0x3a93eb);}['create'](_0x25de6e,_0x4671e0,_0x4f4dad,_0x354711){return __awaiter$9(this,void 0,void 0,function*(){const _0x180e21={'account_name':_0x25de6e,'list_name':_0x4671e0,'search_service_name':_0x4f4dad};try{const _0x231f94=yield this['fetch']['post'](this['path'],_0x354711,_0x180e21);if(_0x231f94['status']>0xc7&&_0x231f94['status']<0x12c){const _0x3630ed=yield _0x231f94['json']();return new SuccessfulListIdentityResponse(_0x3630ed);}const _0x48d932=yield _0x231f94['json']();return new FailedListIdentityResponse(_0x48d932);}catch(_0x5e1489){if(_0x5e1489 instanceof Error)return new FailedListIdentityResponse({'detail':_0x5e1489['message'],'title':_0x5e1489['name'],'status':0x1f4,'instance':'','type':''});throw _0x5e1489;}});}['delete'](_0x32cac3,_0x2f84c9,_0x192770){return __awaiter$9(this,void 0,void 0,function*(){const _0x539598=this['path']+'/'+_0x32cac3+'/'+_0x2f84c9,_0x566b2d=yield this['fetch']['delete'](_0x539598,_0x192770);try{if(_0x566b2d['status']>0xc7&&_0x566b2d['status']<0x12c)return new SuccessfulResponse({});const _0xcf54b3=yield _0x566b2d['json']();return new FailedResponse(_0xcf54b3);}catch(_0x1c9d8c){if(_0x1c9d8c instanceof Error)return new FailedResponse({'detail':_0x1c9d8c['message'],'title':_0x1c9d8c['name'],'status':0x1f4,'instance':'','type':''});throw _0x1c9d8c;}});}['get'](_0x14a122,_0x9a84bd,_0x2030ee){return __awaiter$9(this,void 0,void 0,function*(){const _0x3e3d29=this['path']+'/'+_0x14a122+'/'+_0x9a84bd;try{const _0x4555f0=yield this['fetch']['get'](_0x3e3d29,_0x2030ee);if(_0x4555f0['status']>0xc7&&_0x4555f0['status']<0x12c){const _0x2ce85f=yield _0x4555f0['json']();return new SuccessfulListResponse(_0x2ce85f);}const _0x410ccd=yield _0x4555f0['json']();return new FailedListResponse(_0x410ccd);}catch(_0x3b43f6){if(_0x3b43f6 instanceof Error)return new FailedListResponse({'detail':_0x3b43f6['message'],'title':_0x3b43f6['name'],'status':0x1f4,'instance':'','type':''});throw _0x3b43f6;}});}['editSettings'](_0x5bfc92,_0xb42aae,_0x2b8cae,_0x4c152c){return __awaiter$9(this,void 0,void 0,function*(){const _0x161ca8=this['path']+'/settings/'+_0x5bfc92+'/'+_0xb42aae,_0x34fcae=yield this['fetch']['put'](_0x161ca8,_0x2b8cae,_0x4c152c);try{if(_0x34fcae['status']>0xc7&&_0x34fcae['status']<0x12c){const _0x23e3a4=yield _0x34fcae['json']();return new SuccessfulListResponse(_0x23e3a4);}const _0x189bb0=yield _0x34fcae['json']();return new FailedListResponse(_0x189bb0);}catch(_0x3aec2a){if(_0x3aec2a instanceof Error)return new FailedListResponse({'detail':_0x3aec2a['message'],'title':_0x3aec2a['name'],'status':0x1f4,'instance':'','type':''});throw _0x3aec2a;}});}['addCoordinates'](_0x5ddcc2,_0x2f0143,_0x260285){return __awaiter$9(this,void 0,void 0,function*(){const _0x648c83=this['path']+'/coordinates/'+_0x5ddcc2+'/'+_0x2f0143,_0x3e3dbe=yield this['fetch']['post'](_0x648c83,_0x260285,{});try{if(_0x3e3dbe['status']>0xc7&&_0x3e3dbe['status']<0x12c){const _0x2e5cdf=yield _0x3e3dbe['json']();return new SuccessfulListResponse(_0x2e5cdf);}const _0xd28ad2=yield _0x3e3dbe['json']();return new FailedListResponse(_0xd28ad2);}catch(_0x50faed){if(_0x50faed instanceof Error)return new FailedListResponse({'detail':_0x50faed['message'],'title':_0x50faed['name'],'status':0x1f4,'instance':'','type':''});throw _0x50faed;}});}['removeCoordinates'](_0x414381,_0x325dea,_0x54fcf9){return __awaiter$9(this,void 0,void 0,function*(){const _0x3d9e31=this['path']+'/coordinates/'+_0x414381+'/'+_0x325dea,_0x3e5ee2=yield this['fetch']['delete'](_0x3d9e31,_0x54fcf9);try{if(_0x3e5ee2['status']>0xc7&&_0x3e5ee2['status']<0x12c){const _0xf4850f=yield _0x3e5ee2['json']();return new SuccessfulListResponse(_0xf4850f);}const _0x547830=yield _0x3e5ee2['json']();return new FailedListResponse(_0x547830);}catch(_0x483bb4){if(_0x483bb4 instanceof Error)return new FailedListResponse({'detail':_0x483bb4['message'],'title':_0x483bb4['name'],'status':0x1f4,'instance':'','type':''});throw _0x483bb4;}});}['transfer'](_0x250bc4,_0x43fbac,_0x5f5356,_0x3f1ecd){return __awaiter$9(this,void 0,void 0,function*(){const _0x509a6f={'new_search_service_name':_0x5f5356};try{const _0x3a78cc=yield this['fetch']['put'](this['path']+'/transfer/'+_0x250bc4+'/'+_0x43fbac,_0x3f1ecd,_0x509a6f);if(_0x3a78cc['status']>0xc7&&_0x3a78cc['status']<0x12c){const _0x2c2f43=yield _0x3a78cc['json']();return new SuccessfulListResponse(_0x2c2f43);}const _0x7675f2=yield _0x3a78cc['json']();return new FailedListResponse(_0x7675f2);}catch(_0x2bd4a7){if(_0x2bd4a7 instanceof Error)return new FailedListResponse({'detail':_0x2bd4a7['message'],'title':_0x2bd4a7['name'],'status':0x1f4,'instance':'','type':''});throw _0x2bd4a7;}});}}class CoordinatesService{constructor(_0x16cfbd){this['fetch']=_0x16cfbd,this['path']='list/coordinates';}['add'](_0xe78d91,_0xf16bdc,_0x2e67e6){return __awaiter$9(this,void 0,void 0,function*(){const _0x5da64a=this['path']+'/'+_0xe78d91+'/'+_0xf16bdc,_0x2abb97=yield this['fetch']['post'](_0x5da64a,_0x2e67e6,{});try{if(_0x2abb97['status']>0xc7&&_0x2abb97['status']<0x12c){const _0xfb4e7b=yield _0x2abb97['json']();return new SuccessfulListResponse(_0xfb4e7b);}const _0x28c1f7=yield _0x2abb97['json']();return new FailedListResponse(_0x28c1f7);}catch(_0x13985c){if(_0x13985c instanceof Error)return new FailedListResponse({'detail':_0x13985c['message'],'title':_0x13985c['name'],'status':0x1f4,'instance':'','type':''});throw _0x13985c;}});}['remove'](_0x198551,_0x3aaf79,_0x581baf){return __awaiter$9(this,void 0,void 0,function*(){const _0x53326d=this['path']+'/'+_0x198551+'/'+_0x3aaf79,_0x354799=yield this['fetch']['delete'](_0x53326d,_0x581baf);try{if(_0x354799['status']>0xc7&&_0x354799['status']<0x12c){const _0x398fa7=yield _0x354799['json']();return new SuccessfulListResponse(_0x398fa7);}const _0x1ccac4=yield _0x354799['json']();return new FailedListResponse(_0x1ccac4);}catch(_0x30e0bc){if(_0x30e0bc instanceof Error)return new FailedListResponse({'detail':_0x30e0bc['message'],'title':_0x30e0bc['name'],'status':0x1f4,'instance':'','type':''});throw _0x30e0bc;}});}}class GeneratedSuggestionsService{constructor(_0x7476b4){this['fetch']=_0x7476b4,this['path']='list/generated-suggestions';}['add'](_0x42dbdc,_0x4b6815,_0x339977,_0x12e0a5,_0x3b74d3,_0xee1af1,_0x24cebc){return __awaiter$9(this,void 0,void 0,function*(){const _0x391b6f=this['path']+'/'+_0x42dbdc+'/'+_0x4b6815,_0x16f0a6=yield this['fetch']['post'](_0x391b6f,_0x24cebc,{'target_list_name':_0x339977,'minimum_result_count':_0x12e0a5,'is_active':_0x3b74d3,'minimum_characters':_0xee1af1});try{if(_0x16f0a6['status']>0xc7&&_0x16f0a6['status']<0x12c){const _0x235efb=yield _0x16f0a6['json']();return new SuccessfulListResponse(_0x235efb);}const _0x48276b=yield _0x16f0a6['json']();return new FailedListResponse(_0x48276b);}catch(_0x291e00){if(_0x291e00 instanceof Error)return new FailedListResponse({'detail':_0x291e00['message'],'title':_0x291e00['name'],'status':0x1f4,'instance':'','type':''});throw _0x291e00;}});}['remove'](_0xdd9762,_0x3326a9,_0x26e677){return __awaiter$9(this,void 0,void 0,function*(){const _0x30b9b9=this['path']+'/'+_0xdd9762+'/'+_0x3326a9,_0xbf46b3=yield this['fetch']['delete'](_0x30b9b9,_0x26e677);try{if(_0xbf46b3['status']>0xc7&&_0xbf46b3['status']<0x12c){const _0x1dac4f=yield _0xbf46b3['json']();return new SuccessfulListResponse(_0x1dac4f);}const _0x38ccab=yield _0xbf46b3['json']();return new FailedListResponse(_0x38ccab);}catch(_0x1af64f){if(_0x1af64f instanceof Error)return new FailedListResponse({'detail':_0x1af64f['message'],'title':_0x1af64f['name'],'status':0x1f4,'instance':'','type':''});throw _0x1af64f;}});}['edit'](_0xe138ed,_0x37911b,_0x43c61f,_0x5900b0){return __awaiter$9(this,void 0,void 0,function*(){const _0x177788=this['path']+'/'+_0xe138ed+'/'+_0x37911b;_0x5900b0=_0x5900b0!==null&&_0x5900b0!==void 0?_0x5900b0:{};const _0x2a1b80=yield this['fetch']['put'](_0x177788,_0x43c61f,_0x5900b0);try{if(_0x2a1b80['status']>0xc7&&_0x2a1b80['status']<0x12c){const _0x48b0f4=yield _0x2a1b80['json']();return new SuccessfulListResponse(_0x48b0f4);}const _0x481dfd=yield _0x2a1b80['json']();return new FailedListResponse(_0x481dfd);}catch(_0x23fe7e){if(_0x23fe7e instanceof Error)return new FailedListResponse({'detail':_0x23fe7e['message'],'title':_0x23fe7e['name'],'status':0x1f4,'instance':'','type':''});throw _0x23fe7e;}});}}
|
|
10
10
|
|
|
11
|
-
var __awaiter$8=undefined&&undefined['__awaiter']||function(
|
|
11
|
+
var __awaiter$8=undefined&&undefined['__awaiter']||function(_0x17db15,_0x2cadba,_0x4a9713,_0xf0a63f){function _0x22db7d(_0x43e3ca){return _0x43e3ca instanceof _0x4a9713?_0x43e3ca:new _0x4a9713(function(_0x1e178c){_0x1e178c(_0x43e3ca);});}return new(_0x4a9713||(_0x4a9713=Promise))(function(_0x4d062c,_0xbc31a0){function _0x22b14b(_0x1b1923){try{_0x522019(_0xf0a63f['next'](_0x1b1923));}catch(_0xa5dfb4){_0xbc31a0(_0xa5dfb4);}}function _0x483bd9(_0x20d2c7){try{_0x522019(_0xf0a63f['throw'](_0x20d2c7));}catch(_0x26c21c){_0xbc31a0(_0x26c21c);}}function _0x522019(_0x1b4411){_0x1b4411['done']?_0x4d062c(_0x1b4411['value']):_0x22db7d(_0x1b4411['value'])['then'](_0x22b14b,_0x483bd9);}_0x522019((_0xf0a63f=_0xf0a63f['apply'](_0x17db15,_0x2cadba||[]))['next']());});};class Fetch{constructor(_0x1e5f45){this['baseUri']=_0x1e5f45,this['getUrl']=_0x2166ee=>{return _0x2166ee['startsWith']('/')&&(_0x2166ee=_0x2166ee['replace']('/','')),''+this['baseUri']+_0x2166ee;},!_0x1e5f45['endsWith']('/')&&(_0x1e5f45=_0x1e5f45+'/');}['get'](_0x578dd6,_0x38583d){return __awaiter$8(this,void 0,void 0,function*(){const _0x56d38f=this['getUrl'](_0x578dd6);return yield fetch(_0x56d38f,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x38583d}});});}['post'](_0x1c91b4,_0x224ee9,_0x31a813){return __awaiter$8(this,void 0,void 0,function*(){const _0x5301a2=this['getUrl'](_0x1c91b4);return yield fetch(_0x5301a2,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x224ee9},'body':_0x31a813?JSON['stringify'](_0x31a813):null});});}['upload'](_0x3353aa,_0x42ab5b,_0x2ff3c8){return __awaiter$8(this,void 0,void 0,function*(){const _0x2ef2ba=this['getUrl'](_0x3353aa);return yield fetch(_0x2ef2ba,{'method':'POST','headers':{'Authorization':'Bearer\x20'+_0x42ab5b},'body':_0x2ff3c8});});}['PostNoAuth'](_0x26a7cb,_0x5aac6a){return __awaiter$8(this,void 0,void 0,function*(){const _0x23cf04=this['getUrl'](_0x26a7cb);return yield fetch(_0x23cf04,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0x5aac6a?JSON['stringify'](_0x5aac6a):null});});}['put'](_0x3f1c88,_0x161935,_0x3d83af){return __awaiter$8(this,void 0,void 0,function*(){const _0x48209b=this['getUrl'](_0x3f1c88);return yield fetch(_0x48209b,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x161935},'body':_0x3d83af?JSON['stringify'](_0x3d83af):null});});}['delete'](_0x446be8,_0x4670db){return __awaiter$8(this,void 0,void 0,function*(){const _0x235910=this['getUrl'](_0x446be8);return yield fetch(_0x235910,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4670db}});});}}
|
|
12
12
|
|
|
13
|
-
var __awaiter$7=undefined&&undefined['__awaiter']||function(
|
|
13
|
+
var __awaiter$7=undefined&&undefined['__awaiter']||function(_0x4aed10,_0x3ea495,_0x5afdf1,_0x3314f5){function _0x41f8d5(_0x37e38c){return _0x37e38c instanceof _0x5afdf1?_0x37e38c:new _0x5afdf1(function(_0x598553){_0x598553(_0x37e38c);});}return new(_0x5afdf1||(_0x5afdf1=Promise))(function(_0x1aeb04,_0x19179b){function _0xd9cc9e(_0x5b7530){try{_0x5dcc10(_0x3314f5['next'](_0x5b7530));}catch(_0x33fe6b){_0x19179b(_0x33fe6b);}}function _0x10b2e5(_0x34bfc9){try{_0x5dcc10(_0x3314f5['throw'](_0x34bfc9));}catch(_0x195e0c){_0x19179b(_0x195e0c);}}function _0x5dcc10(_0x56d25f){_0x56d25f['done']?_0x1aeb04(_0x56d25f['value']):_0x41f8d5(_0x56d25f['value'])['then'](_0xd9cc9e,_0x10b2e5);}_0x5dcc10((_0x3314f5=_0x3314f5['apply'](_0x4aed10,_0x3ea495||[]))['next']());});};class SearchServersService{constructor(_0x49bd76){this['fetch']=_0x49bd76,this['path']='search-service';}['create'](_0x5deca3,_0x33e824,_0x4be306,_0x127d2b,_0xf29439,_0x50d782,_0x2bcfef,_0x2ce1a0){return __awaiter$7(this,void 0,void 0,function*(){const _0x849b13={'account_name':_0x5deca3,'search_service_name':_0x33e824,'endpoint':_0x4be306,'key':_0x127d2b,'country':_0xf29439,'provider':_0x50d782,'index_name':_0x2bcfef};try{const _0x58735c=yield this['fetch']['post'](this['path'],_0x2ce1a0,_0x849b13);if(_0x58735c['status']>0xc7&&_0x58735c['status']<0x12c){const _0x2c9886=yield _0x58735c['json']();return new SuccessfulSearchServiceResponse(_0x2c9886);}const _0x3ae4cb=yield _0x58735c['json']();return new FailedSearchServiceResponse(_0x3ae4cb);}catch(_0x363176){if(_0x363176 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x363176['message'],'title':_0x363176['name'],'status':0x1f4,'instance':'','type':''});throw _0x363176;}});}['delete'](_0x54c3cd,_0x5d63b7,_0x1c2129){return __awaiter$7(this,void 0,void 0,function*(){const _0x5b839d=this['path']+'/'+_0x54c3cd+'/'+_0x5d63b7;try{const _0x17bd68=yield this['fetch']['delete'](_0x5b839d,_0x1c2129);if(_0x17bd68['status']>0xc7&&_0x17bd68['status']<0x12c)return new SuccessfulResponse({});const _0x5d71de=yield _0x17bd68['json']();return new FailedResponse(_0x5d71de);}catch(_0x5671ee){if(_0x5671ee instanceof Error)return new FailedResponse({'detail':_0x5671ee['message'],'title':_0x5671ee['name'],'status':0x1f4,'instance':'','type':''});throw _0x5671ee;}});}['view'](_0x1ba229,_0x3a762d,_0x45b67e){return __awaiter$7(this,void 0,void 0,function*(){const _0x3ff600=this['path']+'/'+_0x1ba229+'/'+_0x3a762d;try{const _0xaa4b81=yield this['fetch']['get'](_0x3ff600,_0x45b67e);if(_0xaa4b81['status']>0xc7&&_0xaa4b81['status']<0x12c){const _0x3e439c=yield _0xaa4b81['json']();return new SuccessfulViewSearchServiceResponse(_0x3e439c);}const _0x437867=yield _0xaa4b81['json']();return new FailedViewSearchServiceResponse(_0x437867);}catch(_0x4d12d2){if(_0x4d12d2 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x4d12d2['message'],'title':_0x4d12d2['name'],'status':0x1f4,'instance':'','type':''});throw _0x4d12d2;}});}['edit'](_0x506fcd,_0x3a48a0,_0x14bc2d,_0x4271e5,_0x2b8a2f){return __awaiter$7(this,void 0,void 0,function*(){const _0x411248={'account_name':_0x506fcd,'search_service_name':_0x3a48a0,'key':_0x14bc2d,'country':_0x4271e5};try{const _0x436dce=yield this['fetch']['put'](this['path'],_0x2b8a2f,_0x411248);if(_0x436dce['status']>0xc7&&_0x436dce['status']<0x12c){const _0x387a42=yield _0x436dce['json']();return new SuccessfulSearchServiceResponse(_0x387a42);}const _0x5c8559=yield _0x436dce['json']();return new FailedSearchServiceResponse(_0x5c8559);}catch(_0x2a8b17){if(_0x2a8b17 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x2a8b17['message'],'title':_0x2a8b17['name'],'status':0x1f4,'instance':'','type':''});throw _0x2a8b17;}});}['list'](_0x2a206b,_0x4b851b){return __awaiter$7(this,void 0,void 0,function*(){const _0x530cc3=this['path']+'/'+_0x2a206b;try{const _0x333d1d=yield this['fetch']['get'](_0x530cc3,_0x4b851b);if(_0x333d1d['status']>0xc7&&_0x333d1d['status']<0x12c){const _0x5f5307=yield _0x333d1d['json']();return new SuccessfulListSearchServiceResponse(_0x5f5307);}const _0x42bbf1=yield _0x333d1d['json']();return new FailedViewSearchServicesResponse(_0x42bbf1);}catch(_0x61df37){if(_0x61df37 instanceof Error)return new FailedViewSearchServicesResponse({'detail':_0x61df37['message'],'title':_0x61df37['name'],'status':0x1f4,'instance':'','type':''});throw _0x61df37;}});}}
|
|
14
14
|
|
|
15
|
-
var __awaiter$6=undefined&&undefined['__awaiter']||function(
|
|
15
|
+
var __awaiter$6=undefined&&undefined['__awaiter']||function(_0x262d0c,_0x4e5763,_0x2549a7,_0x43ffc8){function _0x1300a1(_0x53896){return _0x53896 instanceof _0x2549a7?_0x53896:new _0x2549a7(function(_0x57fa9d){_0x57fa9d(_0x53896);});}return new(_0x2549a7||(_0x2549a7=Promise))(function(_0x422836,_0x2ee0c1){function _0x53c45d(_0x40121f){try{_0x52ea72(_0x43ffc8['next'](_0x40121f));}catch(_0x5364b4){_0x2ee0c1(_0x5364b4);}}function _0x454b00(_0x216525){try{_0x52ea72(_0x43ffc8['throw'](_0x216525));}catch(_0x37ece4){_0x2ee0c1(_0x37ece4);}}function _0x52ea72(_0x4e980b){_0x4e980b['done']?_0x422836(_0x4e980b['value']):_0x1300a1(_0x4e980b['value'])['then'](_0x53c45d,_0x454b00);}_0x52ea72((_0x43ffc8=_0x43ffc8['apply'](_0x262d0c,_0x4e5763||[]))['next']());});};class FacetService{constructor(_0x5a0699){this['fetch']=_0x5a0699,this['path']='facet';}['create'](_0x136abd,_0x3a56f6,_0x19b78e,_0x5069c1){return __awaiter$6(this,void 0,void 0,function*(){const _0x594029={'account_name':_0x136abd,'list_name':_0x3a56f6,'facet_name':_0x19b78e};try{const _0x3eecc5=yield this['fetch']['post'](this['path'],_0x5069c1,_0x594029);if(_0x3eecc5['status']>0xc7&&_0x3eecc5['status']<0x12c){const _0x18cd5a=yield _0x3eecc5['json']();return new SuccessfulFacetResponse(_0x18cd5a);}const _0x188850=yield _0x3eecc5['json']();return new FailedFacetResponse(_0x188850);}catch(_0x320b8f){if(_0x320b8f instanceof Error)return new FailedFacetResponse({'detail':_0x320b8f['message'],'title':_0x320b8f['name'],'status':0x1f4,'instance':'','type':''});throw _0x320b8f;}});}['remove'](_0x334470,_0xba940,_0x15b59f,_0x1fb523){return __awaiter$6(this,void 0,void 0,function*(){const _0x54e475='Facet/'+_0x334470+'/'+_0xba940+'/'+_0x15b59f,_0x23c366=yield this['fetch']['delete'](_0x54e475,_0x1fb523);try{if(_0x23c366['status']>0xc7&&_0x23c366['status']<0x12c)return new SuccessfulResponse({});const _0xc56111=yield _0x23c366['json']();return new FailedResponse(_0xc56111);}catch(_0x58c304){if(_0x58c304 instanceof Error)return new FailedResponse({'detail':_0x58c304['message'],'title':_0x58c304['name'],'status':0x1f4,'instance':'','type':''});throw _0x58c304;}});}['rename'](_0x4dbcd3,_0x4dbafe,_0xdf89a1,_0x1b5a66,_0x4c49ae){return __awaiter$6(this,void 0,void 0,function*(){let _0x108262=this['path']+'/'+_0x4dbcd3+'/'+_0x4dbafe;const _0x36e259={'facet_name':_0xdf89a1,'new_facet_name':_0x1b5a66};try{const _0x53a7c1=yield this['fetch']['put'](_0x108262,_0x4c49ae,_0x36e259);if(_0x53a7c1['status']>0xc7&&_0x53a7c1['status']<0x12c){const _0x15af38=yield _0x53a7c1['json']();return new SuccessfulFacetResponse(_0x15af38);}const _0x4e3901=yield _0x53a7c1['json']();return new FailedFacetResponse(_0x4e3901);}catch(_0x32476d){if(_0x32476d instanceof Error)return new FailedFacetResponse({'detail':_0x32476d['message'],'title':_0x32476d['name'],'status':0x1f4,'instance':'','type':''});throw _0x32476d;}});}['list'](_0x49575b,_0x1ca274,_0x211546,_0xfa6380,_0x5caf56){return __awaiter$6(this,void 0,void 0,function*(){let _0x488a8d=this['path']+'/'+_0x49575b+'/'+_0x1ca274+'/'+_0x211546+'/'+_0xfa6380;try{const _0x54c025=yield this['fetch']['get'](_0x488a8d,_0x5caf56);if(_0x54c025['status']>0xc7&&_0x54c025['status']<0x12c){const _0x46c02b=yield _0x54c025['json']();return new SuccessfulFacetValueResponse(_0x46c02b);}const _0x5ec24f=yield _0x54c025['json']();return new FailedFacetValuesResponse(_0x5ec24f);}catch(_0x40b997){if(_0x40b997 instanceof Error)return new FailedFacetValuesResponse({'detail':_0x40b997['message'],'title':_0x40b997['name'],'status':0x1f4,'instance':'','type':''});throw _0x40b997;}});}}
|
|
16
16
|
|
|
17
|
-
var __awaiter$5=undefined&&undefined['__awaiter']||function(
|
|
17
|
+
var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x3b40bd,_0x284085,_0x11e358,_0x25a644){function _0x409d0e(_0x5421ab){return _0x5421ab instanceof _0x11e358?_0x5421ab:new _0x11e358(function(_0x1dbd8f){_0x1dbd8f(_0x5421ab);});}return new(_0x11e358||(_0x11e358=Promise))(function(_0x402ee4,_0x6de1e6){function _0x3eae43(_0x3d1747){try{_0x52f2f4(_0x25a644['next'](_0x3d1747));}catch(_0x170e48){_0x6de1e6(_0x170e48);}}function _0xc52d2f(_0xa58acb){try{_0x52f2f4(_0x25a644['throw'](_0xa58acb));}catch(_0x80f555){_0x6de1e6(_0x80f555);}}function _0x52f2f4(_0xe4450b){_0xe4450b['done']?_0x402ee4(_0xe4450b['value']):_0x409d0e(_0xe4450b['value'])['then'](_0x3eae43,_0xc52d2f);}_0x52f2f4((_0x25a644=_0x25a644['apply'](_0x3b40bd,_0x284085||[]))['next']());});};class SearchResultService{constructor(_0x5e39db){this['fetch']=_0x5e39db,this['path']='search-result',this['isRealNumber']=_0x4e6d47=>_0x4e6d47!=undefined&&typeof _0x4e6d47==='number'&&Number['isFinite'](_0x4e6d47);}['create'](_0x47f3f,_0x253b41,_0x58ac44,_0x5c5bce,_0x5675ef){return __awaiter$5(this,void 0,void 0,function*(){_0x5675ef=_0x5675ef!==null&&_0x5675ef!==void 0?_0x5675ef:{'latitude':0x0,'longitude':0x0,'facets':[],'searchable_fields':[],'resources':[],'active':!![]};const _0x7e157a=Object['assign']({'account_name':_0x47f3f,'search_result_name':_0x58ac44,'list_name':_0x253b41},_0x5675ef);try{const _0x24a1ca=yield this['fetch']['post'](this['path'],_0x5c5bce,_0x7e157a);if(_0x24a1ca['status']>0xc7&&_0x24a1ca['status']<0x12c){const _0x59f736=yield _0x24a1ca['json']();return new SuccessfulSearchResultResponse(_0x59f736);}const _0x269f0a=yield _0x24a1ca['json']();return new FailedSearchResultResponse(_0x269f0a);}catch(_0x17ec3b){if(_0x17ec3b instanceof Error)return new FailedSearchResultResponse({'detail':_0x17ec3b['message'],'title':_0x17ec3b['name'],'status':0x1f4,'instance':'','type':''});throw _0x17ec3b;}});}['list'](_0x220926,_0xe5a8ae,_0x654219,_0x5061b1){return __awaiter$5(this,void 0,void 0,function*(){let _0x202cbf=this['path']+'/'+_0x220926+'/'+_0xe5a8ae+'?'+this['getQueryStr'](_0x5061b1);try{const _0x564742=yield this['fetch']['get'](_0x202cbf,_0x654219);if(_0x564742['status']>0xc7&&_0x564742['status']<0x12c){const _0x4a7adb=yield _0x564742['json']();return new SuccessfulListSearchResultResponse(_0x4a7adb);}const _0x1582ce=yield _0x564742['json']();return new FailedViewSearchResultResponse(_0x1582ce);}catch(_0x517d3e){if(_0x517d3e instanceof Error)return new FailedViewSearchResultResponse({'detail':_0x517d3e['message'],'title':_0x517d3e['name'],'status':0x1f4,'instance':'','type':''});throw _0x517d3e;}});}['get'](_0x2d13aa,_0x4451a6,_0x1673a8,_0xf42f1f){return __awaiter$5(this,void 0,void 0,function*(){let _0x23454f=this['path']+'/'+_0x2d13aa+'/'+_0x4451a6+'?'+_0x1673a8;try{const _0x28302f=yield this['fetch']['get'](_0x23454f,_0xf42f1f);if(_0x28302f['status']>0xc7&&_0x28302f['status']<0x12c){const _0x28342f=yield _0x28302f['json']();return new SuccessfulSearchResultResponse(_0x28342f);}const _0x18c8b3=yield _0x28302f['json']();return new FailedSearchResultResponse(_0x18c8b3);}catch(_0x36b25a){if(_0x36b25a instanceof Error)return new FailedSearchResultResponse({'detail':_0x36b25a['message'],'title':_0x36b25a['name'],'status':0x1f4,'instance':'','type':''});throw _0x36b25a;}});}['delete'](_0x4b6c0d,_0x290d0b,_0x1be812,_0x39d23f){return __awaiter$5(this,void 0,void 0,function*(){const _0x57fcb9=this['path']+'/'+_0x4b6c0d+'/'+_0x290d0b+'/'+_0x1be812,_0x2db713=yield this['fetch']['delete'](_0x57fcb9,_0x39d23f);try{if(_0x2db713['status']>0xc7&&_0x2db713['status']<0x12c)return new SuccessfulResponse({});const _0x53efc9=yield _0x2db713['json']();return new FailedResponse(_0x53efc9);}catch(_0x40a67f){if(_0x40a67f instanceof Error)return new FailedResponse({'detail':_0x40a67f['message'],'title':_0x40a67f['name'],'status':0x1f4,'instance':'','type':''});throw _0x40a67f;}});}['upload'](_0x40ab2b,_0x3bdefa,_0x3ffd7d,_0x36de88){return __awaiter$5(this,void 0,void 0,function*(){const _0x1041ff=this['path']+'/'+_0x40ab2b+'/'+_0x3bdefa+'/upload',_0x30982e=new FormData();_0x30982e['append']('file',_0x3ffd7d);try{const _0x9efd00=yield this['fetch']['upload'](_0x1041ff,_0x36de88,_0x30982e);if(_0x9efd00['status']>0xc7&&_0x9efd00['status']<0x12c)return new SuccessfulResponse({});const _0xfee810=yield _0x9efd00['json']();return new FailedResponse(_0xfee810);}catch(_0x4aec7b){if(_0x4aec7b instanceof Error)return new FailedResponse({'detail':_0x4aec7b['message'],'title':_0x4aec7b['name'],'status':0x1f4,'instance':'','type':''});throw _0x4aec7b;}});}['edit'](_0x335dfb,_0x35d84c,_0x520dbc,_0x292674,_0x31b1ef){return __awaiter$5(this,void 0,void 0,function*(){_0x31b1ef=_0x31b1ef!==null&&_0x31b1ef!==void 0?_0x31b1ef:{'active':!![],'latitude':0x0,'longitude':0x0,'facets':[],'searchable_fields':[],'resources':[]};const _0x994f95=this['path']+'/'+_0x335dfb+'/'+_0x35d84c+'/'+_0x520dbc;try{const _0x459b89=yield this['fetch']['put'](_0x994f95,_0x292674,_0x31b1ef);if(_0x459b89['status']>0xc7&&_0x459b89['status']<0x12c){const _0x160a39=yield _0x459b89['json']();return new SuccessfulSearchResultResponse(_0x160a39);}const _0xcf55be=yield _0x459b89['json']();return new FailedSearchResultResponse(_0xcf55be);}catch(_0x4dfacc){if(_0x4dfacc instanceof Error)return new FailedSearchResultResponse({'detail':_0x4dfacc['message'],'title':_0x4dfacc['name'],'status':0x1f4,'instance':'','type':''});throw _0x4dfacc;}});}['getQueryStr'](_0x493ee0){let _0x26849f='';const _0x589c59=[];(_0x493ee0===null||_0x493ee0===void 0?void 0:_0x493ee0['size'])&&_0x589c59['push']('size='+_0x493ee0['size']);(_0x493ee0===null||_0x493ee0===void 0?void 0:_0x493ee0['skip'])&&_0x589c59['push']('skip='+_0x493ee0['skip']);(_0x493ee0===null||_0x493ee0===void 0?void 0:_0x493ee0['query'])&&_0x589c59['push']('query='+_0x493ee0['query']);(_0x493ee0===null||_0x493ee0===void 0?void 0:_0x493ee0['filter'])&&_0x589c59['push']('filter='+_0x493ee0['filter']);if((_0x493ee0===null||_0x493ee0===void 0?void 0:_0x493ee0['radius'])&&this['isRealNumber'](_0x493ee0['radius']['latitude'])&&this['isRealNumber'](_0x493ee0['radius']['longitude'])&&this['isRealNumber'](_0x493ee0['radius']['distance_in_km'])){const _0x173eef=_0x493ee0['radius']['latitude']+','+_0x493ee0['radius']['longitude']+','+_0x493ee0['radius']['distance_in_km'];_0x589c59['push']('radius='+_0x173eef);}return _0x493ee0['active']===![]&&_0x589c59['push']('active='+_0x493ee0['active']),_0x589c59['length']>0x0&&_0x589c59['forEach']((_0x1bbd89,_0x11d27e)=>{if(_0x11d27e>0x0&&_0x26849f)_0x26849f+='&';_0x26849f+=_0x1bbd89;}),_0x26849f;}}
|
|
18
18
|
|
|
19
|
-
var __awaiter$4=undefined&&undefined['__awaiter']||function(
|
|
19
|
+
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x40296c,_0x232ef3,_0x22924f,_0x2b3000){function _0x40c062(_0x45f34b){return _0x45f34b instanceof _0x22924f?_0x45f34b:new _0x22924f(function(_0x20175f){_0x20175f(_0x45f34b);});}return new(_0x22924f||(_0x22924f=Promise))(function(_0x19f4d4,_0x3ce576){function _0x5f199d(_0x26d24e){try{_0x2b7142(_0x2b3000['next'](_0x26d24e));}catch(_0x2dc8db){_0x3ce576(_0x2dc8db);}}function _0x540888(_0x15057d){try{_0x2b7142(_0x2b3000['throw'](_0x15057d));}catch(_0x422642){_0x3ce576(_0x422642);}}function _0x2b7142(_0x468739){_0x468739['done']?_0x19f4d4(_0x468739['value']):_0x40c062(_0x468739['value'])['then'](_0x5f199d,_0x540888);}_0x2b7142((_0x2b3000=_0x2b3000['apply'](_0x40296c,_0x232ef3||[]))['next']());});};class ContributorService{constructor(_0x2bc417){this['fetch']=_0x2bc417,this['path']='contributor';}['create'](_0x5bbe33,_0x18509d,_0x34474a,_0x3dab9c){return __awaiter$4(this,void 0,void 0,function*(){const _0x1a71ee={'account_name':_0x5bbe33,'list_name':_0x18509d,'contributor_name':_0x34474a};try{const _0x2b273e=yield this['fetch']['post'](this['path'],_0x3dab9c,_0x1a71ee);if(_0x2b273e['status']>0xc7&&_0x2b273e['status']<0x12c){const _0x162122=yield _0x2b273e['json']();return new SuccessfulContributorResponse(_0x162122);}const _0x2a445a=yield _0x2b273e['json']();return new FailedContributorResponse(_0x2a445a);}catch(_0x5cde0d){if(_0x5cde0d instanceof Error)return new FailedContributorResponse({'detail':_0x5cde0d['message'],'title':_0x5cde0d['name'],'status':0x1f4,'instance':'','type':''});throw _0x5cde0d;}});}['remove'](_0x34132d,_0xd487ac,_0x759dd2,_0x5c4851){return __awaiter$4(this,void 0,void 0,function*(){const _0x40f7db=this['path']+'/'+_0x34132d+'/'+_0xd487ac+'/'+_0x759dd2,_0x250899=yield this['fetch']['delete'](_0x40f7db,_0x5c4851);try{if(_0x250899['status']>0xc7&&_0x250899['status']<0x12c)return new SuccessfulResponse({});const _0xe872fb=yield _0x250899['json']();return new FailedResponse(_0xe872fb);}catch(_0x328f56){if(_0x328f56 instanceof Error)return new FailedResponse({'detail':_0x328f56['message'],'title':_0x328f56['name'],'status':0x1f4,'instance':'','type':''});throw _0x328f56;}});}['startsWith'](_0x356bdd,_0x3a5f14){return __awaiter$4(this,void 0,void 0,function*(){const _0x126670=this['path']+'/'+_0x356bdd;try{const _0xef07b3=yield this['fetch']['get'](_0x126670,_0x3a5f14);if(_0xef07b3['status']>0xc7&&_0xef07b3['status']<0x12c){const _0x17b800=yield _0xef07b3['json']();return new SuccessfulAccountAndImageResponse(_0x17b800);}const _0x14793a=yield _0xef07b3['json']();return new FailedAccountAndImageResponse(_0x14793a);}catch(_0x3caa9a){if(_0x3caa9a instanceof Error)return new FailedAccountAndImageResponse({'detail':_0x3caa9a['message'],'title':_0x3caa9a['name'],'status':0x1f4,'instance':'','type':''});throw _0x3caa9a;}});}}
|
|
20
20
|
|
|
21
|
-
var __awaiter$3=undefined&&undefined['__awaiter']||function(
|
|
21
|
+
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x40a335,_0x504e78,_0x287f5c,_0x4b05a2){function _0x3ec284(_0x2b42af){return _0x2b42af instanceof _0x287f5c?_0x2b42af:new _0x287f5c(function(_0x38fdac){_0x38fdac(_0x2b42af);});}return new(_0x287f5c||(_0x287f5c=Promise))(function(_0x244113,_0x5d3587){function _0x394139(_0x965020){try{_0x467f03(_0x4b05a2['next'](_0x965020));}catch(_0x485a6f){_0x5d3587(_0x485a6f);}}function _0x2a4336(_0x1ec5bf){try{_0x467f03(_0x4b05a2['throw'](_0x1ec5bf));}catch(_0xae878c){_0x5d3587(_0xae878c);}}function _0x467f03(_0x5663ff){_0x5663ff['done']?_0x244113(_0x5663ff['value']):_0x3ec284(_0x5663ff['value'])['then'](_0x394139,_0x2a4336);}_0x467f03((_0x4b05a2=_0x4b05a2['apply'](_0x40a335,_0x504e78||[]))['next']());});};class SearchableFieldService{constructor(_0x2c9dbf){this['fetch']=_0x2c9dbf,this['path']='searchable-field';}['create'](_0x3f33af,_0x58ab9d,_0x1459e3,_0x3a10d3){return __awaiter$3(this,void 0,void 0,function*(){const _0x89c0eb={'account_name':_0x3f33af,'list_name':_0x58ab9d,'searchable_field_name':_0x1459e3};try{const _0x2a5003=yield this['fetch']['post'](this['path'],_0x3a10d3,_0x89c0eb);if(_0x2a5003['status']>0xc7&&_0x2a5003['status']<0x12c){const _0x561544=yield _0x2a5003['json']();return new SuccessfulSearchableFieldResponse(_0x561544);}const _0x1df52a=yield _0x2a5003['json']();return new FailedSearchableFieldResponse(_0x1df52a);}catch(_0xae9155){if(_0xae9155 instanceof Error)return new FailedSearchableFieldResponse({'detail':_0xae9155['message'],'title':_0xae9155['name'],'status':0x1f4,'instance':'','type':''});throw _0xae9155;}});}['remove'](_0x500289,_0x366717,_0xe999e1,_0x3a54c6){return __awaiter$3(this,void 0,void 0,function*(){const _0x5f53f0=this['path']+'/'+_0x500289+'/'+_0x366717+'/'+_0xe999e1,_0xcc6156=yield this['fetch']['delete'](_0x5f53f0,_0x3a54c6);try{if(_0xcc6156['status']>0xc7&&_0xcc6156['status']<0x12c)return new SuccessfulResponse({});const _0x554fda=yield _0xcc6156['json']();return new FailedResponse(_0x554fda);}catch(_0x1e0352){if(_0x1e0352 instanceof Error)return new FailedResponse({'detail':_0x1e0352['message'],'title':_0x1e0352['name'],'status':0x1f4,'instance':'','type':''});throw _0x1e0352;}});}['rename'](_0x454d19,_0x432648,_0x127205,_0x49881c,_0x3b15a6){return __awaiter$3(this,void 0,void 0,function*(){let _0x16b34b=this['path']+'/'+_0x454d19+'/'+_0x432648;const _0x547d65={'searchable_field_name':_0x127205,'new_searchable_field_name':_0x49881c};try{const _0x331103=yield this['fetch']['put'](_0x16b34b,_0x3b15a6,_0x547d65);if(_0x331103['status']>0xc7&&_0x331103['status']<0x12c){const _0x3e4c34=yield _0x331103['json']();return new SuccessfulSearchableFieldResponse(_0x3e4c34);}const _0x5da837=yield _0x331103['json']();return new FailedSearchableFieldResponse(_0x5da837);}catch(_0x1fa862){if(_0x1fa862 instanceof Error)return new FailedSearchableFieldResponse({'detail':_0x1fa862['message'],'title':_0x1fa862['name'],'status':0x1f4,'instance':'','type':''});throw _0x1fa862;}});}}
|
|
22
22
|
|
|
23
|
-
var __awaiter$2=undefined&&undefined['__awaiter']||function(
|
|
23
|
+
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x2baf81,_0x5b6a7a,_0x5c4ddb,_0x5a3170){function _0x203b50(_0x2aeefb){return _0x2aeefb instanceof _0x5c4ddb?_0x2aeefb:new _0x5c4ddb(function(_0x467ef6){_0x467ef6(_0x2aeefb);});}return new(_0x5c4ddb||(_0x5c4ddb=Promise))(function(_0x27edb2,_0x110597){function _0x5b9483(_0x463d65){try{_0x2070cc(_0x5a3170['next'](_0x463d65));}catch(_0x30418d){_0x110597(_0x30418d);}}function _0x1f8022(_0x378b20){try{_0x2070cc(_0x5a3170['throw'](_0x378b20));}catch(_0x258d77){_0x110597(_0x258d77);}}function _0x2070cc(_0x1afa8c){_0x1afa8c['done']?_0x27edb2(_0x1afa8c['value']):_0x203b50(_0x1afa8c['value'])['then'](_0x5b9483,_0x1f8022);}_0x2070cc((_0x5a3170=_0x5a3170['apply'](_0x2baf81,_0x5b6a7a||[]))['next']());});};class ResourceService{constructor(_0xc01b8f){this['fetch']=_0xc01b8f,this['path']='resource';}['create'](_0x3cfa8f,_0x543888,_0x3435b4,_0x34e3ec){return __awaiter$2(this,void 0,void 0,function*(){const _0x2bcfc7={'account_name':_0x3cfa8f,'list_name':_0x543888,'resource_name':_0x3435b4};try{const _0x2a6f48=yield this['fetch']['post'](this['path'],_0x34e3ec,_0x2bcfc7);if(_0x2a6f48['status']>0xc7&&_0x2a6f48['status']<0x12c){const _0x582ac6=yield _0x2a6f48['json']();return new SuccessfulResourceResponse(_0x582ac6);}const _0x293896=yield _0x2a6f48['json']();return new FailedResourceResponse(_0x293896);}catch(_0x36d8fb){if(_0x36d8fb instanceof Error)return new FailedResourceResponse({'detail':_0x36d8fb['message'],'title':_0x36d8fb['name'],'status':0x1f4,'instance':'','type':''});throw _0x36d8fb;}});}['remove'](_0x2d7a9a,_0x4241e7,_0x4e63c0,_0x146890){return __awaiter$2(this,void 0,void 0,function*(){const _0x515674=this['path']+'/'+_0x2d7a9a+'/'+_0x4241e7+'/'+_0x4e63c0,_0x1bbd4f=yield this['fetch']['delete'](_0x515674,_0x146890);try{if(_0x1bbd4f['status']>0xc7&&_0x1bbd4f['status']<0x12c)return new SuccessfulResponse({});const _0x425eb1=yield _0x1bbd4f['json']();return new FailedResponse(_0x425eb1);}catch(_0x1e420e){if(_0x1e420e instanceof Error)return new FailedResponse({'detail':_0x1e420e['message'],'title':_0x1e420e['name'],'status':0x1f4,'instance':'','type':''});throw _0x1e420e;}});}['rename'](_0x3570fe,_0x5debc1,_0x2d6675,_0x5b0386,_0x6e5201){return __awaiter$2(this,void 0,void 0,function*(){let _0x272870=this['path']+'/'+_0x3570fe+'/'+_0x5debc1;const _0x344b3d={'resource_name':_0x2d6675,'new_resource_name':_0x5b0386};try{const _0x360605=yield this['fetch']['put'](_0x272870,_0x6e5201,_0x344b3d);if(_0x360605['status']>0xc7&&_0x360605['status']<0x12c){const _0x3ee9a6=yield _0x360605['json']();return new SuccessfulResourceResponse(_0x3ee9a6);}const _0x1e28dd=yield _0x360605['json']();return new FailedResourceResponse(_0x1e28dd);}catch(_0x101276){if(_0x101276 instanceof Error)return new FailedResourceResponse({'detail':_0x101276['message'],'title':_0x101276['name'],'status':0x1f4,'instance':'','type':''});throw _0x101276;}});}}
|
|
24
24
|
|
|
25
|
-
var __awaiter$1=undefined&&undefined['__awaiter']||function(
|
|
25
|
+
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x48ba75,_0x5d12e6,_0x45f018,_0x51d34b){function _0x45f3ab(_0x31c545){return _0x31c545 instanceof _0x45f018?_0x31c545:new _0x45f018(function(_0x5be2c2){_0x5be2c2(_0x31c545);});}return new(_0x45f018||(_0x45f018=Promise))(function(_0x29047f,_0x23938e){function _0x1d9a2d(_0x1dba4f){try{_0x1fdd19(_0x51d34b['next'](_0x1dba4f));}catch(_0x14c007){_0x23938e(_0x14c007);}}function _0x1997d7(_0x56efea){try{_0x1fdd19(_0x51d34b['throw'](_0x56efea));}catch(_0x11809b){_0x23938e(_0x11809b);}}function _0x1fdd19(_0x6e9989){_0x6e9989['done']?_0x29047f(_0x6e9989['value']):_0x45f3ab(_0x6e9989['value'])['then'](_0x1d9a2d,_0x1997d7);}_0x1fdd19((_0x51d34b=_0x51d34b['apply'](_0x48ba75,_0x5d12e6||[]))['next']());});};class GroupService{constructor(_0x36352f){this['fetch']=_0x36352f,this['path']='group';}['create'](_0x502756,_0x22d821,_0x32a68d,_0x455713){return __awaiter$1(this,void 0,void 0,function*(){const _0x211c2b={'account_name':_0x502756,'search_service_name':_0x22d821,'group_name':_0x32a68d};try{const _0x3abd85=yield this['fetch']['post'](this['path'],_0x455713,_0x211c2b);if(_0x3abd85['status']>0xc7&&_0x3abd85['status']<0x12c){const _0x5a1198=yield _0x3abd85['json']();return new SuccessfulGroupResponse(_0x5a1198);}const _0x51f31b=yield _0x3abd85['json']();return new FailedGroupResponse(_0x51f31b);}catch(_0x5ac8ad){if(_0x5ac8ad instanceof Error)return new FailedGroupResponse({'detail':_0x5ac8ad['message'],'title':_0x5ac8ad['name'],'status':0x1f4,'instance':'','type':''});throw _0x5ac8ad;}});}['addList'](_0x5e2b2b,_0x302a26,_0x22e370,_0x415507,_0x449941){return __awaiter$1(this,void 0,void 0,function*(){const _0x272b41={'account_name':_0x5e2b2b,'list_name':_0x22e370,'group_name':_0x302a26,'version':_0x415507};try{const _0x1cd189=yield this['fetch']['post'](this['path']+'/list',_0x449941,_0x272b41);if(_0x1cd189['status']>0xc7&&_0x1cd189['status']<0x12c){const _0x51b90f=yield _0x1cd189['json']();return new SuccessfulListIdentityResponse(_0x51b90f);}const _0x3001dc=yield _0x1cd189['json']();return new FailedListIdentityResponse(_0x3001dc);}catch(_0x124f58){if(_0x124f58 instanceof Error)return new FailedListIdentityResponse({'detail':_0x124f58['message'],'title':_0x124f58['name'],'status':0x1f4,'instance':'','type':''});throw _0x124f58;}});}['delete'](_0xeec7c4,_0x379832,_0x919443){return __awaiter$1(this,void 0,void 0,function*(){const _0x2636a8=this['path']+'/'+_0xeec7c4+'/'+_0x379832,_0x40af42=yield this['fetch']['delete'](_0x2636a8,_0x919443);try{if(_0x40af42['status']>0xc7&&_0x40af42['status']<0x12c)return new SuccessfulResponse({});const _0x57eaa9=yield _0x40af42['json']();return new FailedResponse(_0x57eaa9);}catch(_0xea1469){if(_0xea1469 instanceof Error)return new FailedResponse({'detail':_0xea1469['message'],'title':_0xea1469['name'],'status':0x1f4,'instance':'','type':''});throw _0xea1469;}});}}
|
|
26
26
|
|
|
27
|
-
var __awaiter=undefined&&undefined['__awaiter']||function(
|
|
27
|
+
var __awaiter=undefined&&undefined['__awaiter']||function(_0x54cbf4,_0x24216b,_0x30489f,_0xe74ce4){function _0x2dbfad(_0x4e486f){return _0x4e486f instanceof _0x30489f?_0x4e486f:new _0x30489f(function(_0x3e2799){_0x3e2799(_0x4e486f);});}return new(_0x30489f||(_0x30489f=Promise))(function(_0x51862e,_0x1d1259){function _0x15584a(_0x3b8f83){try{_0x10ff90(_0xe74ce4['next'](_0x3b8f83));}catch(_0x136b39){_0x1d1259(_0x136b39);}}function _0x57aac2(_0x44e94e){try{_0x10ff90(_0xe74ce4['throw'](_0x44e94e));}catch(_0x448360){_0x1d1259(_0x448360);}}function _0x10ff90(_0x5cfff3){_0x5cfff3['done']?_0x51862e(_0x5cfff3['value']):_0x2dbfad(_0x5cfff3['value'])['then'](_0x15584a,_0x57aac2);}_0x10ff90((_0xe74ce4=_0xe74ce4['apply'](_0x54cbf4,_0x24216b||[]))['next']());});};class AdminClient{constructor(_0x3cf5bf='https://admin.searchability.dev/'){var _0x4a93a9=new Fetch(_0x3cf5bf);this['Accounts']=new AccountService(_0x4a93a9),this['Lists']=new ListService(_0x4a93a9),this['ApiKeys']=new ApiKeyService(_0x4a93a9),this['SearchServers']=new SearchServersService(_0x4a93a9),this['Facets']=new FacetService(_0x4a93a9),this['SearchResults']=new SearchResultService(_0x4a93a9),this['Contributors']=new ContributorService(_0x4a93a9),this['SearchableFields']=new SearchableFieldService(_0x4a93a9),this['Groups']=new GroupService(_0x4a93a9),this['Resources']=new ResourceService(_0x4a93a9);}}class AuthClient{constructor(_0x42aca3='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x42aca3);}['login'](_0x6e8d57){return __awaiter(this,void 0,void 0,function*(){const _0x38b8d3='login/'+_0x6e8d57;try{const _0x357d02=yield yield fetch(_0x38b8d3);if(_0x357d02['status']>0xc7&&_0x357d02['status']<0x12c){const _0x164947=yield _0x357d02['json']();return new SuccessfulAuthResponse(_0x164947);}const _0x2a105a=yield _0x357d02['json']();return new FailedAuthResponse(_0x2a105a);}catch(_0x1fea11){if(_0x1fea11 instanceof Error)return new FailedAuthResponse({'detail':_0x1fea11['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x1fea11;}});}['refresh'](_0x562cb6){return __awaiter(this,void 0,void 0,function*(){const _0x6f1ff0='refresh',_0x4bccfe={'refresh_token':_0x562cb6};try{const _0x59c691=yield this['fetch']['PostNoAuth'](_0x6f1ff0,_0x4bccfe);if(_0x59c691['status']>0xc7&&_0x59c691['status']<0x12c){const _0x2c1937=yield _0x59c691['json']();return new SuccessfulAuthResponse(_0x2c1937);}const _0xa6545a=yield _0x59c691['json']();return new FailedAuthResponse(_0xa6545a);}catch(_0x1e1b56){if(_0x1e1b56 instanceof Error)return new FailedAuthResponse({'detail':_0x1e1b56['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x1e1b56;}});}['getTokenStatus'](_0x50f15b){if(Date['now']()<_0x50f15b['access_expires'])return exports.TokenStatus['Ok'];if(Date['now']()<_0x50f15b['refresh_expires'])return exports.TokenStatus['Refresh'];return exports.TokenStatus['Expired'];}}
|
|
28
28
|
|
|
29
29
|
exports.AdminClient = AdminClient;
|
|
30
30
|
exports.AuthClient = AuthClient;
|