@searchability/admin-client 0.0.138 → 0.0.139
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(_0x2f49b2){_0x2f49b2[_0x2f49b2['Ok']=0x0]='Ok',_0x2f49b2[_0x2f49b2['Refresh']=0x1]='Refresh',_0x2f49b2[_0x2f49b2['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(_0x49c744){this['isSuccess']=_0x49c744;}}class SuccessfulFacetValueResponse extends Response{constructor(_0x230d01){super(!![]),this['facets']=_0x230d01;}['toSuccess'](){return this['facets'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetValuesResponse extends Response{constructor(_0x1db254){super(![]),this['problem']=_0x1db254;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulContributorResponse extends Response{constructor(_0x240d98){super(!![]),this['contributor']=_0x240d98;}['toSuccess'](){return this['contributor'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedContributorResponse extends Response{constructor(_0x423682){super(![]),this['problem']=_0x423682;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountAndImageResponse extends Response{constructor(_0x43d5da){super(!![]),this['accountAndImages']=_0x43d5da;}['toSuccess'](){return this['accountAndImages'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountAndImageResponse extends Response{constructor(_0x41b7a5){super(![]),this['problem']=_0x41b7a5;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulResourceResponse extends Response{constructor(_0x58b01d){super(!![]),this['resource']=_0x58b01d;}['toSuccess'](){return this['resource'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResourceResponse extends Response{constructor(_0x8693b3){super(![]),this['problem']=_0x8693b3;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulFacetResponse extends Response{constructor(_0x4c2535){super(!![]),this['facet']=_0x4c2535;}['toSuccess'](){return this['facet'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetResponse extends Response{constructor(_0x30de5a){super(![]),this['problem']=_0x30de5a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedSearchableFieldResponse extends Response{constructor(_0x71d68b){super(![]),this['problem']=_0x71d68b;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchableFieldResponse extends Response{constructor(_0x2d95fb){super(!![]),this['searchable_field']=_0x2d95fb;}['toSuccess'](){return this['searchable_field'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountResponse extends Response{constructor(_0x289113){super(!![]),this['account']=_0x289113;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountImageResponse extends Response{constructor(_0x2992df){super(!![]),this['accountImage']=_0x2992df;}['toSuccess'](){return this['accountImage'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListIdentityResponse extends Response{constructor(_0x336236){super(!![]),this['list']=_0x336236;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulGroupResponse extends Response{constructor(_0x361cb2){super(!![]),this['group']=_0x361cb2;}['toSuccess'](){return this['group'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedGroupResponse extends Response{constructor(_0x5ca899){super(![]),this['problem']=_0x5ca899;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListResponse extends Response{constructor(_0x4bcbd1){super(!![]),this['list']=_0x4bcbd1;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedListResponse extends Response{constructor(_0x105183){super(![]),this['problem']=_0x105183;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountResponse extends Response{constructor(_0x5c97ee){super(![]),this['problem']=_0x5c97ee;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountImageResponse extends Response{constructor(_0x249da0){super(![]),this['problem']=_0x249da0;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListIdentityResponse extends Response{constructor(_0x3e9ff1){super(![]),this['problem']=_0x3e9ff1;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x57f530){super(!![]),this['tokens']=_0x57f530;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x42e36a){super(![]),this['problem']=_0x42e36a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x516d6d){super(!![]),this['apiKey']=_0x516d6d;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x43a80a){super(![]),this['problem']=_0x43a80a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x5e40e7){super(!![]),this['searchService']=_0x5e40e7;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x29b8cf){super(![]),this['problem']=_0x29b8cf;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0xc983bf){super(!![]),this['searchService']=_0xc983bf;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulSearchResultResponse extends Response{constructor(_0x4e887f){super(!![]),this['searchResult']=_0x4e887f;}['toSuccess'](){return this['searchResult'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchResultResponse extends Response{constructor(_0x4de0be){super(![]),this['problem']=_0x4de0be;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchResultResponse extends Response{constructor(_0x8bab36){super(!![]),this['searchResults']=_0x8bab36;}['toSuccess'](){return this['searchResults'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchResultResponse extends Response{constructor(_0x13d7f6){super(![]),this['problem']=_0x13d7f6;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchServiceResponse extends Response{constructor(_0x5621a6){super(!![]),this['searchServices']=_0x5621a6;}['toSuccess'](){return this['searchServices'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServicesResponse extends Response{constructor(_0x2463f7){super(![]),this['problem']=_0x2463f7;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedViewSearchServiceResponse extends Response{constructor(_0x2703ba){super(![]),this['problem']=_0x2703ba;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x433621){super(!![]),this['apiKeyValue']=_0x433621;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x58ff8b){super(!![]),this['obj']=_0x58ff8b;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x4c7ee0){super(![]),this['problem']=_0x4c7ee0;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x3759a){super(![]),this['problem']=_0x3759a;}['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(_0xb2b27b,_0x4d1ddc,_0x2a2deb,_0x3ccf00){function _0x23b3cf(_0xe61038){return _0xe61038 instanceof _0x2a2deb?_0xe61038:new _0x2a2deb(function(_0x43ec65){_0x43ec65(_0xe61038);});}return new(_0x2a2deb||(_0x2a2deb=Promise))(function(_0x5ddb23,_0x537521){function _0x475880(_0x289902){try{_0x2e64dc(_0x3ccf00['next'](_0x289902));}catch(_0xc2d179){_0x537521(_0xc2d179);}}function _0x1be733(_0x522d3c){try{_0x2e64dc(_0x3ccf00['throw'](_0x522d3c));}catch(_0x4e6b2e){_0x537521(_0x4e6b2e);}}function _0x2e64dc(_0x2da48c){_0x2da48c['done']?_0x5ddb23(_0x2da48c['value']):_0x23b3cf(_0x2da48c['value'])['then'](_0x475880,_0x1be733);}_0x2e64dc((_0x3ccf00=_0x3ccf00['apply'](_0xb2b27b,_0x4d1ddc||[]))['next']());});};class AccountService{constructor(_0x152be6){this['fetch']=_0x152be6;}['get'](_0x188d9f,_0x15214d){return __awaiter$b(this,void 0,void 0,function*(){const _0x330d6d='Account/'+_0x188d9f+'/',_0x1b2a66=yield this['fetch']['get'](_0x330d6d,_0x15214d);try{if(_0x1b2a66['status']>0xc7&&_0x1b2a66['status']<0x12c){const _0x209ba2=yield _0x1b2a66['json']();return new SuccessfulAccountResponse(_0x209ba2);}const _0x31893e=yield _0x1b2a66['json']();return new FailedAccountResponse(_0x31893e);}catch(_0x1032f8){if(_0x1032f8 instanceof Error)return new FailedAccountResponse({'detail':_0x1032f8['message'],'title':_0x1032f8['name'],'status':0x1f4,'instance':'','type':''});throw _0x1032f8;}});}['getImage'](_0x5010bb,_0x3bb293){return __awaiter$b(this,void 0,void 0,function*(){const _0x3ddaa0='account/image/'+_0x5010bb+'/',_0xca978e=yield this['fetch']['get'](_0x3ddaa0,_0x3bb293);try{if(_0xca978e['status']>0xc7&&_0xca978e['status']<0x12c){const _0x30fd3e=yield _0xca978e['json']();return new SuccessfulAccountImageResponse(_0x30fd3e);}const _0x40c0ba=yield _0xca978e['json']();return new FailedAccountImageResponse(_0x40c0ba);}catch(_0x37bb6c){if(_0x37bb6c instanceof Error)return new FailedAccountImageResponse({'detail':_0x37bb6c['message'],'title':_0x37bb6c['name'],'status':0x1f4,'instance':'','type':''});throw _0x37bb6c;}});}}
|
|
6
6
|
|
|
7
|
-
var __awaiter$a=undefined&&undefined['__awaiter']||function(
|
|
7
|
+
var __awaiter$a=undefined&&undefined['__awaiter']||function(_0x57f763,_0x2e61ee,_0x10bbc4,_0x234c6f){function _0x37edef(_0x1b6f7a){return _0x1b6f7a instanceof _0x10bbc4?_0x1b6f7a:new _0x10bbc4(function(_0x36ef94){_0x36ef94(_0x1b6f7a);});}return new(_0x10bbc4||(_0x10bbc4=Promise))(function(_0x24dbcd,_0x356976){function _0x19d685(_0x52a43a){try{_0x529ca3(_0x234c6f['next'](_0x52a43a));}catch(_0x5127c4){_0x356976(_0x5127c4);}}function _0x1771de(_0x2d6d1e){try{_0x529ca3(_0x234c6f['throw'](_0x2d6d1e));}catch(_0x321f69){_0x356976(_0x321f69);}}function _0x529ca3(_0x350665){_0x350665['done']?_0x24dbcd(_0x350665['value']):_0x37edef(_0x350665['value'])['then'](_0x19d685,_0x1771de);}_0x529ca3((_0x234c6f=_0x234c6f['apply'](_0x57f763,_0x2e61ee||[]))['next']());});};class ApiKeyService{constructor(_0x310867){this['fetch']=_0x310867,this['path']='api-key';}['create'](_0x13907a,_0x224595,_0x31b664){return __awaiter$a(this,void 0,void 0,function*(){const _0x31d13b={'account_name':_0x13907a,'api_key_name':_0x224595};try{const _0x893d04=yield this['fetch']['post'](this['path'],_0x31b664,_0x31d13b);if(_0x893d04['status']>0xc7&&_0x893d04['status']<0x12c){const _0x519b09=yield _0x893d04['json']();return new SuccessfulApiKeyResponse(_0x519b09);}const _0x562a00=yield _0x893d04['json']();return new FailedApiKeyResponse(_0x562a00);}catch(_0x15de34){if(_0x15de34 instanceof Error)return new FailedApiKeyResponse({'detail':_0x15de34['message'],'title':_0x15de34['name'],'status':0x1f4,'instance':'','type':''});throw _0x15de34;}});}['view'](_0x42c026,_0x847655,_0x15f017){return __awaiter$a(this,void 0,void 0,function*(){const _0x5513e7=this['path']+'/'+_0x42c026+'/'+_0x847655;try{const _0x49cf86=yield this['fetch']['get'](_0x5513e7,_0x15f017);if(_0x49cf86['status']>0xc7&&_0x49cf86['status']<0x12c){const _0x4e9ccf=yield _0x49cf86['json']();return new SuccessfulApiKeyValueResponse(_0x4e9ccf);}const _0x48a8c3=yield _0x49cf86['json']();return new FailedApiKeyValueResponse(_0x48a8c3);}catch(_0x251141){if(_0x251141 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x251141['message'],'title':_0x251141['name'],'status':0x1f4,'instance':'','type':''});throw _0x251141;}});}['delete'](_0x19e9be,_0x260731,_0x410a1a){return __awaiter$a(this,void 0,void 0,function*(){const _0x1e7af0=this['path']+'/'+_0x19e9be+'/'+_0x260731;try{const _0x2a7638=yield this['fetch']['delete'](_0x1e7af0,_0x410a1a);if(_0x2a7638['status']>0xc7&&_0x2a7638['status']<0x12c)return new SuccessfulResponse({});const _0xbfb09e=yield _0x2a7638['json']();return new FailedResponse(_0xbfb09e);}catch(_0x11ad27){if(_0x11ad27 instanceof Error)return new FailedResponse({'detail':_0x11ad27['message'],'title':_0x11ad27['name'],'status':0x1f4,'instance':'','type':''});throw _0x11ad27;}});}}
|
|
8
8
|
|
|
9
|
-
var __awaiter$9=undefined&&undefined['__awaiter']||function(
|
|
9
|
+
var __awaiter$9=undefined&&undefined['__awaiter']||function(_0x24c51a,_0x5357b9,_0x43f791,_0x16eaed){function _0x493e76(_0x2e7043){return _0x2e7043 instanceof _0x43f791?_0x2e7043:new _0x43f791(function(_0x534be3){_0x534be3(_0x2e7043);});}return new(_0x43f791||(_0x43f791=Promise))(function(_0x42959d,_0x33384d){function _0x3610ea(_0x21fc92){try{_0x16262f(_0x16eaed['next'](_0x21fc92));}catch(_0xf74b45){_0x33384d(_0xf74b45);}}function _0x4d168a(_0x498137){try{_0x16262f(_0x16eaed['throw'](_0x498137));}catch(_0x4ee16d){_0x33384d(_0x4ee16d);}}function _0x16262f(_0x11496a){_0x11496a['done']?_0x42959d(_0x11496a['value']):_0x493e76(_0x11496a['value'])['then'](_0x3610ea,_0x4d168a);}_0x16262f((_0x16eaed=_0x16eaed['apply'](_0x24c51a,_0x5357b9||[]))['next']());});};class ListService{constructor(_0xf64028){this['fetch']=_0xf64028,this['path']='list',this['Coordinates']=new CoordinatesService(_0xf64028),this['GeneratedSuggestions']=new GeneratedSuggestionsService(_0xf64028);}['create'](_0x558c3b,_0x53cf00,_0x163442,_0x5b6f8e){return __awaiter$9(this,void 0,void 0,function*(){const _0x5b8d6d={'account_name':_0x558c3b,'list_name':_0x53cf00,'search_service_name':_0x163442};try{const _0xfc7eb1=yield this['fetch']['post'](this['path'],_0x5b6f8e,_0x5b8d6d);if(_0xfc7eb1['status']>0xc7&&_0xfc7eb1['status']<0x12c){const _0x11dc84=yield _0xfc7eb1['json']();return new SuccessfulListIdentityResponse(_0x11dc84);}const _0x436a10=yield _0xfc7eb1['json']();return new FailedListIdentityResponse(_0x436a10);}catch(_0x2d7508){if(_0x2d7508 instanceof Error)return new FailedListIdentityResponse({'detail':_0x2d7508['message'],'title':_0x2d7508['name'],'status':0x1f4,'instance':'','type':''});throw _0x2d7508;}});}['delete'](_0x372250,_0x1c694f,_0x53d0d1){return __awaiter$9(this,void 0,void 0,function*(){const _0xf652fd=this['path']+'/'+_0x372250+'/'+_0x1c694f,_0x46afba=yield this['fetch']['delete'](_0xf652fd,_0x53d0d1);try{if(_0x46afba['status']>0xc7&&_0x46afba['status']<0x12c)return new SuccessfulResponse({});const _0x5111fc=yield _0x46afba['json']();return new FailedResponse(_0x5111fc);}catch(_0x3249bc){if(_0x3249bc instanceof Error)return new FailedResponse({'detail':_0x3249bc['message'],'title':_0x3249bc['name'],'status':0x1f4,'instance':'','type':''});throw _0x3249bc;}});}['get'](_0x2117ed,_0x54f92e,_0x21aef4){return __awaiter$9(this,void 0,void 0,function*(){const _0x4837d8=this['path']+'/'+_0x2117ed+'/'+_0x54f92e;try{const _0x1633db=yield this['fetch']['get'](_0x4837d8,_0x21aef4);if(_0x1633db['status']>0xc7&&_0x1633db['status']<0x12c){const _0x28d737=yield _0x1633db['json']();return new SuccessfulListResponse(_0x28d737);}const _0x464917=yield _0x1633db['json']();return new FailedListResponse(_0x464917);}catch(_0x2e7ead){if(_0x2e7ead instanceof Error)return new FailedListResponse({'detail':_0x2e7ead['message'],'title':_0x2e7ead['name'],'status':0x1f4,'instance':'','type':''});throw _0x2e7ead;}});}['editSettings'](_0x2351a3,_0x28476e,_0x1f0e8b,_0x867e2f){return __awaiter$9(this,void 0,void 0,function*(){const _0x14b723=this['path']+'/settings/'+_0x2351a3+'/'+_0x28476e,_0xd3a47d=yield this['fetch']['put'](_0x14b723,_0x1f0e8b,_0x867e2f);try{if(_0xd3a47d['status']>0xc7&&_0xd3a47d['status']<0x12c){const _0x3429c3=yield _0xd3a47d['json']();return new SuccessfulListResponse(_0x3429c3);}const _0x516934=yield _0xd3a47d['json']();return new FailedListResponse(_0x516934);}catch(_0x2d708b){if(_0x2d708b instanceof Error)return new FailedListResponse({'detail':_0x2d708b['message'],'title':_0x2d708b['name'],'status':0x1f4,'instance':'','type':''});throw _0x2d708b;}});}['addCoordinates'](_0x47f604,_0x4dba37,_0x3a6d82){return __awaiter$9(this,void 0,void 0,function*(){const _0x4586da=this['path']+'/coordinates/'+_0x47f604+'/'+_0x4dba37,_0x577cb7=yield this['fetch']['post'](_0x4586da,_0x3a6d82,{});try{if(_0x577cb7['status']>0xc7&&_0x577cb7['status']<0x12c){const _0x45f341=yield _0x577cb7['json']();return new SuccessfulListResponse(_0x45f341);}const _0x3dda36=yield _0x577cb7['json']();return new FailedListResponse(_0x3dda36);}catch(_0x1b3a81){if(_0x1b3a81 instanceof Error)return new FailedListResponse({'detail':_0x1b3a81['message'],'title':_0x1b3a81['name'],'status':0x1f4,'instance':'','type':''});throw _0x1b3a81;}});}['removeCoordinates'](_0x25ffbe,_0x3f2f61,_0x2918fc){return __awaiter$9(this,void 0,void 0,function*(){const _0x29f0c3=this['path']+'/coordinates/'+_0x25ffbe+'/'+_0x3f2f61,_0x20e936=yield this['fetch']['delete'](_0x29f0c3,_0x2918fc);try{if(_0x20e936['status']>0xc7&&_0x20e936['status']<0x12c){const _0x42bc52=yield _0x20e936['json']();return new SuccessfulListResponse(_0x42bc52);}const _0x381689=yield _0x20e936['json']();return new FailedListResponse(_0x381689);}catch(_0x572b59){if(_0x572b59 instanceof Error)return new FailedListResponse({'detail':_0x572b59['message'],'title':_0x572b59['name'],'status':0x1f4,'instance':'','type':''});throw _0x572b59;}});}['transfer'](_0x5a208a,_0x3091a1,_0x14b5d5,_0x140ab0){return __awaiter$9(this,void 0,void 0,function*(){const _0x3bb8cc={'new_search_service_name':_0x14b5d5};try{const _0x4e1110=yield this['fetch']['put'](this['path']+'/transfer/'+_0x5a208a+'/'+_0x3091a1,_0x140ab0,_0x3bb8cc);if(_0x4e1110['status']>0xc7&&_0x4e1110['status']<0x12c){const _0x23b97a=yield _0x4e1110['json']();return new SuccessfulListResponse(_0x23b97a);}const _0xbd1c3e=yield _0x4e1110['json']();return new FailedListResponse(_0xbd1c3e);}catch(_0xc33de6){if(_0xc33de6 instanceof Error)return new FailedListResponse({'detail':_0xc33de6['message'],'title':_0xc33de6['name'],'status':0x1f4,'instance':'','type':''});throw _0xc33de6;}});}}class CoordinatesService{constructor(_0x40784a){this['fetch']=_0x40784a,this['path']='list/coordinates';}['add'](_0x53d9c0,_0x4b70f0,_0x138346){return __awaiter$9(this,void 0,void 0,function*(){const _0xcc4884=this['path']+'/'+_0x53d9c0+'/'+_0x4b70f0,_0x1b3260=yield this['fetch']['post'](_0xcc4884,_0x138346,{});try{if(_0x1b3260['status']>0xc7&&_0x1b3260['status']<0x12c){const _0x565945=yield _0x1b3260['json']();return new SuccessfulListResponse(_0x565945);}const _0x2aa1cb=yield _0x1b3260['json']();return new FailedListResponse(_0x2aa1cb);}catch(_0x14b04b){if(_0x14b04b instanceof Error)return new FailedListResponse({'detail':_0x14b04b['message'],'title':_0x14b04b['name'],'status':0x1f4,'instance':'','type':''});throw _0x14b04b;}});}['remove'](_0x108af1,_0x7d0b6f,_0x39a710){return __awaiter$9(this,void 0,void 0,function*(){const _0x497a74=this['path']+'/'+_0x108af1+'/'+_0x7d0b6f,_0x1823f8=yield this['fetch']['delete'](_0x497a74,_0x39a710);try{if(_0x1823f8['status']>0xc7&&_0x1823f8['status']<0x12c){const _0x333fae=yield _0x1823f8['json']();return new SuccessfulListResponse(_0x333fae);}const _0x2d2006=yield _0x1823f8['json']();return new FailedListResponse(_0x2d2006);}catch(_0x574256){if(_0x574256 instanceof Error)return new FailedListResponse({'detail':_0x574256['message'],'title':_0x574256['name'],'status':0x1f4,'instance':'','type':''});throw _0x574256;}});}}class GeneratedSuggestionsService{constructor(_0x3764c7){this['fetch']=_0x3764c7,this['path']='list/generated-suggestions';}['add'](_0x582078,_0x5d3a0b,_0x8b8fb9,_0x4f3401,_0x152551,_0x518906,_0x5a7669){return __awaiter$9(this,void 0,void 0,function*(){const _0x18fa53=this['path']+'/'+_0x582078+'/'+_0x5d3a0b,_0x3fb801=yield this['fetch']['post'](_0x18fa53,_0x5a7669,{'target_list_name':_0x8b8fb9,'minimum_result_count':_0x4f3401,'is_active':_0x152551,'minimum_characters':_0x518906});try{if(_0x3fb801['status']>0xc7&&_0x3fb801['status']<0x12c){const _0x3ca604=yield _0x3fb801['json']();return new SuccessfulListResponse(_0x3ca604);}const _0x5e4f05=yield _0x3fb801['json']();return new FailedListResponse(_0x5e4f05);}catch(_0x497637){if(_0x497637 instanceof Error)return new FailedListResponse({'detail':_0x497637['message'],'title':_0x497637['name'],'status':0x1f4,'instance':'','type':''});throw _0x497637;}});}['remove'](_0xabf7bc,_0x43ef87,_0x5189bb){return __awaiter$9(this,void 0,void 0,function*(){const _0x2dd561=this['path']+'/'+_0xabf7bc+'/'+_0x43ef87,_0x3ee2a1=yield this['fetch']['delete'](_0x2dd561,_0x5189bb);try{if(_0x3ee2a1['status']>0xc7&&_0x3ee2a1['status']<0x12c){const _0x3b2fb7=yield _0x3ee2a1['json']();return new SuccessfulListResponse(_0x3b2fb7);}const _0x121df0=yield _0x3ee2a1['json']();return new FailedListResponse(_0x121df0);}catch(_0xd68c16){if(_0xd68c16 instanceof Error)return new FailedListResponse({'detail':_0xd68c16['message'],'title':_0xd68c16['name'],'status':0x1f4,'instance':'','type':''});throw _0xd68c16;}});}['edit'](_0xd7bafb,_0x2f28be,_0x5d3c36,_0x4d8ee1){return __awaiter$9(this,void 0,void 0,function*(){const _0x22cdf8=this['path']+'/'+_0xd7bafb+'/'+_0x2f28be;_0x4d8ee1=_0x4d8ee1!==null&&_0x4d8ee1!==void 0?_0x4d8ee1:{};const _0x407c74=yield this['fetch']['put'](_0x22cdf8,_0x5d3c36,_0x4d8ee1);try{if(_0x407c74['status']>0xc7&&_0x407c74['status']<0x12c){const _0x49fb4a=yield _0x407c74['json']();return new SuccessfulListResponse(_0x49fb4a);}const _0x3a6f12=yield _0x407c74['json']();return new FailedListResponse(_0x3a6f12);}catch(_0x11aace){if(_0x11aace instanceof Error)return new FailedListResponse({'detail':_0x11aace['message'],'title':_0x11aace['name'],'status':0x1f4,'instance':'','type':''});throw _0x11aace;}});}}
|
|
10
10
|
|
|
11
|
-
var __awaiter$8=undefined&&undefined['__awaiter']||function(
|
|
11
|
+
var __awaiter$8=undefined&&undefined['__awaiter']||function(_0xffbecc,_0x179649,_0x1b5463,_0xcbdc0e){function _0x164bdd(_0x2a8514){return _0x2a8514 instanceof _0x1b5463?_0x2a8514:new _0x1b5463(function(_0x31d579){_0x31d579(_0x2a8514);});}return new(_0x1b5463||(_0x1b5463=Promise))(function(_0x349aa6,_0x2f8cb6){function _0x20b93c(_0x461c23){try{_0x1f061a(_0xcbdc0e['next'](_0x461c23));}catch(_0x17b84f){_0x2f8cb6(_0x17b84f);}}function _0x300f75(_0x38988c){try{_0x1f061a(_0xcbdc0e['throw'](_0x38988c));}catch(_0x4a983f){_0x2f8cb6(_0x4a983f);}}function _0x1f061a(_0x1a35ec){_0x1a35ec['done']?_0x349aa6(_0x1a35ec['value']):_0x164bdd(_0x1a35ec['value'])['then'](_0x20b93c,_0x300f75);}_0x1f061a((_0xcbdc0e=_0xcbdc0e['apply'](_0xffbecc,_0x179649||[]))['next']());});};class Fetch{constructor(_0x374780){this['baseUri']=_0x374780,this['getUrl']=_0x19b6a3=>{return _0x19b6a3['startsWith']('/')&&(_0x19b6a3=_0x19b6a3['replace']('/','')),''+this['baseUri']+_0x19b6a3;},!_0x374780['endsWith']('/')&&(_0x374780=_0x374780+'/');}['get'](_0x2e6383,_0x3c0335){return __awaiter$8(this,void 0,void 0,function*(){const _0x4b628f=this['getUrl'](_0x2e6383);return yield fetch(_0x4b628f,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3c0335}});});}['post'](_0x14df43,_0x572fa3,_0xe9e13f){return __awaiter$8(this,void 0,void 0,function*(){const _0x1080b2=this['getUrl'](_0x14df43);return yield fetch(_0x1080b2,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x572fa3},'body':_0xe9e13f?JSON['stringify'](_0xe9e13f):null});});}['upload'](_0x4e5a0c,_0x1f543f,_0x442ea6){return __awaiter$8(this,void 0,void 0,function*(){const _0x5061df=this['getUrl'](_0x4e5a0c);return yield fetch(_0x5061df,{'method':'POST','headers':{'Authorization':'Bearer\x20'+_0x1f543f},'body':_0x442ea6});});}['PostNoAuth'](_0x5d5ed4,_0x28196b){return __awaiter$8(this,void 0,void 0,function*(){const _0x3efb0e=this['getUrl'](_0x5d5ed4);return yield fetch(_0x3efb0e,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0x28196b?JSON['stringify'](_0x28196b):null});});}['put'](_0x47b070,_0x3cc10f,_0x3c7f33){return __awaiter$8(this,void 0,void 0,function*(){const _0x5c3605=this['getUrl'](_0x47b070);return yield fetch(_0x5c3605,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3cc10f},'body':_0x3c7f33?JSON['stringify'](_0x3c7f33):null});});}['delete'](_0x37f8c2,_0x517b77){return __awaiter$8(this,void 0,void 0,function*(){const _0x2f83c8=this['getUrl'](_0x37f8c2);return yield fetch(_0x2f83c8,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x517b77}});});}}
|
|
12
12
|
|
|
13
|
-
var __awaiter$7=undefined&&undefined['__awaiter']||function(
|
|
13
|
+
var __awaiter$7=undefined&&undefined['__awaiter']||function(_0x56a79e,_0x221fda,_0x3a9c46,_0x4eca09){function _0x499b00(_0x24b20b){return _0x24b20b instanceof _0x3a9c46?_0x24b20b:new _0x3a9c46(function(_0x22a165){_0x22a165(_0x24b20b);});}return new(_0x3a9c46||(_0x3a9c46=Promise))(function(_0x13bce9,_0x9756a){function _0x4a8832(_0x3abfbf){try{_0x2c1e48(_0x4eca09['next'](_0x3abfbf));}catch(_0x4b4a1c){_0x9756a(_0x4b4a1c);}}function _0x1b790d(_0xfd5086){try{_0x2c1e48(_0x4eca09['throw'](_0xfd5086));}catch(_0x2b4a82){_0x9756a(_0x2b4a82);}}function _0x2c1e48(_0x15fc0b){_0x15fc0b['done']?_0x13bce9(_0x15fc0b['value']):_0x499b00(_0x15fc0b['value'])['then'](_0x4a8832,_0x1b790d);}_0x2c1e48((_0x4eca09=_0x4eca09['apply'](_0x56a79e,_0x221fda||[]))['next']());});};class SearchServersService{constructor(_0x3f06d1){this['fetch']=_0x3f06d1,this['path']='search-service';}['create'](_0x21b605,_0x4d94bc,_0x4b19f7,_0x50eeb9,_0x61d8bc,_0x1d6d52,_0x46c323,_0x2dfb64){return __awaiter$7(this,void 0,void 0,function*(){const _0x925ee={'account_name':_0x21b605,'search_service_name':_0x4d94bc,'endpoint':_0x4b19f7,'key':_0x50eeb9,'country':_0x61d8bc,'provider':_0x1d6d52,'index_name':_0x46c323};try{const _0x8fc55b=yield this['fetch']['post'](this['path'],_0x2dfb64,_0x925ee);if(_0x8fc55b['status']>0xc7&&_0x8fc55b['status']<0x12c){const _0xdb3e14=yield _0x8fc55b['json']();return new SuccessfulSearchServiceResponse(_0xdb3e14);}const _0x67cf6f=yield _0x8fc55b['json']();return new FailedSearchServiceResponse(_0x67cf6f);}catch(_0x25318d){if(_0x25318d instanceof Error)return new FailedSearchServiceResponse({'detail':_0x25318d['message'],'title':_0x25318d['name'],'status':0x1f4,'instance':'','type':''});throw _0x25318d;}});}['delete'](_0x2becd4,_0x47632a,_0x4b5c03){return __awaiter$7(this,void 0,void 0,function*(){const _0x40f0f2=this['path']+'/'+_0x2becd4+'/'+_0x47632a;try{const _0x2473bd=yield this['fetch']['delete'](_0x40f0f2,_0x4b5c03);if(_0x2473bd['status']>0xc7&&_0x2473bd['status']<0x12c)return new SuccessfulResponse({});const _0x1c0951=yield _0x2473bd['json']();return new FailedResponse(_0x1c0951);}catch(_0x4fe0d2){if(_0x4fe0d2 instanceof Error)return new FailedResponse({'detail':_0x4fe0d2['message'],'title':_0x4fe0d2['name'],'status':0x1f4,'instance':'','type':''});throw _0x4fe0d2;}});}['view'](_0x172362,_0x5a0201,_0x3d9c8c){return __awaiter$7(this,void 0,void 0,function*(){const _0x345162=this['path']+'/'+_0x172362+'/'+_0x5a0201;try{const _0x2779d4=yield this['fetch']['get'](_0x345162,_0x3d9c8c);if(_0x2779d4['status']>0xc7&&_0x2779d4['status']<0x12c){const _0x1ffded=yield _0x2779d4['json']();return new SuccessfulViewSearchServiceResponse(_0x1ffded);}const _0x1cfa81=yield _0x2779d4['json']();return new FailedViewSearchServiceResponse(_0x1cfa81);}catch(_0x4195a2){if(_0x4195a2 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x4195a2['message'],'title':_0x4195a2['name'],'status':0x1f4,'instance':'','type':''});throw _0x4195a2;}});}['edit'](_0x56adfc,_0x46f158,_0x494824,_0x22bfec,_0x3168a3){return __awaiter$7(this,void 0,void 0,function*(){const _0x488c0a={'account_name':_0x56adfc,'search_service_name':_0x46f158,'key':_0x494824,'country':_0x22bfec};try{const _0x19f232=yield this['fetch']['put'](this['path'],_0x3168a3,_0x488c0a);if(_0x19f232['status']>0xc7&&_0x19f232['status']<0x12c){const _0x12817a=yield _0x19f232['json']();return new SuccessfulSearchServiceResponse(_0x12817a);}const _0x3ad16e=yield _0x19f232['json']();return new FailedSearchServiceResponse(_0x3ad16e);}catch(_0x316ea6){if(_0x316ea6 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x316ea6['message'],'title':_0x316ea6['name'],'status':0x1f4,'instance':'','type':''});throw _0x316ea6;}});}['list'](_0x542f6e,_0x669ce8){return __awaiter$7(this,void 0,void 0,function*(){const _0x4c97ac=this['path']+'/'+_0x542f6e;try{const _0x9d1af1=yield this['fetch']['get'](_0x4c97ac,_0x669ce8);if(_0x9d1af1['status']>0xc7&&_0x9d1af1['status']<0x12c){const _0x486f3b=yield _0x9d1af1['json']();return new SuccessfulListSearchServiceResponse(_0x486f3b);}const _0xa46c20=yield _0x9d1af1['json']();return new FailedViewSearchServicesResponse(_0xa46c20);}catch(_0x49266d){if(_0x49266d instanceof Error)return new FailedViewSearchServicesResponse({'detail':_0x49266d['message'],'title':_0x49266d['name'],'status':0x1f4,'instance':'','type':''});throw _0x49266d;}});}}
|
|
14
14
|
|
|
15
|
-
var __awaiter$6=undefined&&undefined['__awaiter']||function(
|
|
15
|
+
var __awaiter$6=undefined&&undefined['__awaiter']||function(_0xb45c08,_0x3b1e9a,_0x4f1059,_0x175791){function _0x5246c4(_0x740481){return _0x740481 instanceof _0x4f1059?_0x740481:new _0x4f1059(function(_0x50d001){_0x50d001(_0x740481);});}return new(_0x4f1059||(_0x4f1059=Promise))(function(_0x294f6b,_0x2f241b){function _0x38515a(_0x562268){try{_0x30bdcb(_0x175791['next'](_0x562268));}catch(_0x4a9b0f){_0x2f241b(_0x4a9b0f);}}function _0x325974(_0x53cd41){try{_0x30bdcb(_0x175791['throw'](_0x53cd41));}catch(_0xa0f892){_0x2f241b(_0xa0f892);}}function _0x30bdcb(_0x4a6f1c){_0x4a6f1c['done']?_0x294f6b(_0x4a6f1c['value']):_0x5246c4(_0x4a6f1c['value'])['then'](_0x38515a,_0x325974);}_0x30bdcb((_0x175791=_0x175791['apply'](_0xb45c08,_0x3b1e9a||[]))['next']());});};class FacetService{constructor(_0x29c39f){this['fetch']=_0x29c39f,this['path']='facet';}['create'](_0x5440d7,_0x4c3f90,_0x27f1c9,_0x35e280){return __awaiter$6(this,void 0,void 0,function*(){const _0x473837={'account_name':_0x5440d7,'list_name':_0x4c3f90,'facet_name':_0x27f1c9};try{const _0x222c63=yield this['fetch']['post'](this['path'],_0x35e280,_0x473837);if(_0x222c63['status']>0xc7&&_0x222c63['status']<0x12c){const _0x31af9f=yield _0x222c63['json']();return new SuccessfulFacetResponse(_0x31af9f);}const _0x40ea4f=yield _0x222c63['json']();return new FailedFacetResponse(_0x40ea4f);}catch(_0x3d4df9){if(_0x3d4df9 instanceof Error)return new FailedFacetResponse({'detail':_0x3d4df9['message'],'title':_0x3d4df9['name'],'status':0x1f4,'instance':'','type':''});throw _0x3d4df9;}});}['remove'](_0x2cba16,_0x3c934c,_0x106e11,_0x13bea0){return __awaiter$6(this,void 0,void 0,function*(){const _0x5c53ba='Facet/'+_0x2cba16+'/'+_0x3c934c+'/'+_0x106e11,_0x309ec3=yield this['fetch']['delete'](_0x5c53ba,_0x13bea0);try{if(_0x309ec3['status']>0xc7&&_0x309ec3['status']<0x12c)return new SuccessfulResponse({});const _0x6a8641=yield _0x309ec3['json']();return new FailedResponse(_0x6a8641);}catch(_0x5ab20b){if(_0x5ab20b instanceof Error)return new FailedResponse({'detail':_0x5ab20b['message'],'title':_0x5ab20b['name'],'status':0x1f4,'instance':'','type':''});throw _0x5ab20b;}});}['rename'](_0x1730a2,_0x367643,_0x1d32da,_0x320746,_0x12f2e8){return __awaiter$6(this,void 0,void 0,function*(){let _0x5b3efc=this['path']+'/'+_0x1730a2+'/'+_0x367643;const _0x34e7a0={'facet_name':_0x1d32da,'new_facet_name':_0x320746};try{const _0x1742ea=yield this['fetch']['put'](_0x5b3efc,_0x12f2e8,_0x34e7a0);if(_0x1742ea['status']>0xc7&&_0x1742ea['status']<0x12c){const _0x201a1c=yield _0x1742ea['json']();return new SuccessfulFacetResponse(_0x201a1c);}const _0x381b94=yield _0x1742ea['json']();return new FailedFacetResponse(_0x381b94);}catch(_0x4d09c5){if(_0x4d09c5 instanceof Error)return new FailedFacetResponse({'detail':_0x4d09c5['message'],'title':_0x4d09c5['name'],'status':0x1f4,'instance':'','type':''});throw _0x4d09c5;}});}['list'](_0x13e1c7,_0x44e6da,_0x289a9c,_0x40ac45,_0x477794){return __awaiter$6(this,void 0,void 0,function*(){let _0x73db7e=this['path']+'/'+_0x13e1c7+'/'+_0x44e6da+'/'+_0x289a9c+'/'+_0x40ac45;try{const _0x5418fe=yield this['fetch']['get'](_0x73db7e,_0x477794);if(_0x5418fe['status']>0xc7&&_0x5418fe['status']<0x12c){const _0x54d2ab=yield _0x5418fe['json']();return new SuccessfulFacetValueResponse(_0x54d2ab);}const _0x58caaa=yield _0x5418fe['json']();return new FailedFacetValuesResponse(_0x58caaa);}catch(_0x44478f){if(_0x44478f instanceof Error)return new FailedFacetValuesResponse({'detail':_0x44478f['message'],'title':_0x44478f['name'],'status':0x1f4,'instance':'','type':''});throw _0x44478f;}});}}
|
|
16
16
|
|
|
17
|
-
var __awaiter$5=undefined&&undefined['__awaiter']||function(
|
|
17
|
+
var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x6ab38,_0x26cb03,_0x3cab06,_0x31fb27){function _0x583a8c(_0x1f03f3){return _0x1f03f3 instanceof _0x3cab06?_0x1f03f3:new _0x3cab06(function(_0x25bf41){_0x25bf41(_0x1f03f3);});}return new(_0x3cab06||(_0x3cab06=Promise))(function(_0x49c7e8,_0x486964){function _0x1b90fb(_0x106587){try{_0x1654fd(_0x31fb27['next'](_0x106587));}catch(_0xba4ce3){_0x486964(_0xba4ce3);}}function _0x32f95d(_0x2bf6af){try{_0x1654fd(_0x31fb27['throw'](_0x2bf6af));}catch(_0x4b735d){_0x486964(_0x4b735d);}}function _0x1654fd(_0x9d5ebc){_0x9d5ebc['done']?_0x49c7e8(_0x9d5ebc['value']):_0x583a8c(_0x9d5ebc['value'])['then'](_0x1b90fb,_0x32f95d);}_0x1654fd((_0x31fb27=_0x31fb27['apply'](_0x6ab38,_0x26cb03||[]))['next']());});};class SearchResultService{constructor(_0x34e1cb){this['fetch']=_0x34e1cb,this['path']='search-result',this['isRealNumber']=_0x1b517f=>_0x1b517f!=undefined&&typeof _0x1b517f==='number'&&Number['isFinite'](_0x1b517f);}['create'](_0x1a128b,_0x129993,_0x4ce479,_0x438786,_0x9a9888){return __awaiter$5(this,void 0,void 0,function*(){const _0x2a341f={'account_name':_0x1a128b,'search_result_name':_0x4ce479,'list_name':_0x129993,'options':_0x9a9888};try{const _0x2a0f39=yield this['fetch']['post'](this['path'],_0x438786,_0x2a341f);if(_0x2a0f39['status']>0xc7&&_0x2a0f39['status']<0x12c){const _0x5e30b4=yield _0x2a0f39['json']();return new SuccessfulSearchResultResponse(_0x5e30b4);}const _0x3ff23f=yield _0x2a0f39['json']();return new FailedSearchResultResponse(_0x3ff23f);}catch(_0x3bbe84){if(_0x3bbe84 instanceof Error)return new FailedSearchResultResponse({'detail':_0x3bbe84['message'],'title':_0x3bbe84['name'],'status':0x1f4,'instance':'','type':''});throw _0x3bbe84;}});}['list'](_0x492335,_0x36c9dd,_0x2874c4,_0x1bf437){return __awaiter$5(this,void 0,void 0,function*(){let _0xfa556f=this['path']+'/'+_0x492335+'/'+_0x36c9dd+'?'+this['getQueryStr'](_0x1bf437);try{const _0x51e7d1=yield this['fetch']['get'](_0xfa556f,_0x2874c4);if(_0x51e7d1['status']>0xc7&&_0x51e7d1['status']<0x12c){const _0x14aa76=yield _0x51e7d1['json']();return new SuccessfulListSearchResultResponse(_0x14aa76);}const _0x26de0f=yield _0x51e7d1['json']();return new FailedViewSearchResultResponse(_0x26de0f);}catch(_0x28cadc){if(_0x28cadc instanceof Error)return new FailedViewSearchResultResponse({'detail':_0x28cadc['message'],'title':_0x28cadc['name'],'status':0x1f4,'instance':'','type':''});throw _0x28cadc;}});}['get'](_0x4edd94,_0x1e0c42,_0xfdf3cd,_0x2d6653){return __awaiter$5(this,void 0,void 0,function*(){let _0x75922a=this['path']+'/'+_0x4edd94+'/'+_0x1e0c42+'?'+_0xfdf3cd;try{const _0x45406a=yield this['fetch']['get'](_0x75922a,_0x2d6653);if(_0x45406a['status']>0xc7&&_0x45406a['status']<0x12c){const _0x46ed8e=yield _0x45406a['json']();return new SuccessfulSearchResultResponse(_0x46ed8e);}const _0x82d14a=yield _0x45406a['json']();return new FailedSearchResultResponse(_0x82d14a);}catch(_0x18bd48){if(_0x18bd48 instanceof Error)return new FailedSearchResultResponse({'detail':_0x18bd48['message'],'title':_0x18bd48['name'],'status':0x1f4,'instance':'','type':''});throw _0x18bd48;}});}['delete'](_0x517198,_0x177122,_0x1d0de1,_0x4ef602){return __awaiter$5(this,void 0,void 0,function*(){const _0x52db12=this['path']+'/'+_0x517198+'/'+_0x177122+'/'+_0x1d0de1,_0x678357=yield this['fetch']['delete'](_0x52db12,_0x4ef602);try{if(_0x678357['status']>0xc7&&_0x678357['status']<0x12c)return new SuccessfulResponse({});const _0x537f9f=yield _0x678357['json']();return new FailedResponse(_0x537f9f);}catch(_0x40398){if(_0x40398 instanceof Error)return new FailedResponse({'detail':_0x40398['message'],'title':_0x40398['name'],'status':0x1f4,'instance':'','type':''});throw _0x40398;}});}['upload'](_0x35f3bc,_0x3a76cd,_0x7d58ab,_0x212a2d){return __awaiter$5(this,void 0,void 0,function*(){const _0x447392=this['path']+'/'+_0x35f3bc+'/'+_0x3a76cd+'/upload',_0x1a17f6=new FormData();_0x1a17f6['append']('file',_0x7d58ab);try{const _0x4c37ac=yield this['fetch']['upload'](_0x447392,_0x212a2d,_0x1a17f6);if(_0x4c37ac['status']>0xc7&&_0x4c37ac['status']<0x12c)return new SuccessfulResponse({});const _0x327af0=yield _0x4c37ac['json']();return new FailedResponse(_0x327af0);}catch(_0x4c53bd){if(_0x4c53bd instanceof Error)return new FailedResponse({'detail':_0x4c53bd['message'],'title':_0x4c53bd['name'],'status':0x1f4,'instance':'','type':''});throw _0x4c53bd;}});}['edit'](_0x5675a7,_0x3c5108,_0x540372,_0x31f250,_0x55f966){return __awaiter$5(this,void 0,void 0,function*(){const _0x4f14fc=this['path']+'/'+_0x5675a7+'/'+_0x3c5108+'/'+_0x540372;try{const _0x567d7d=yield this['fetch']['put'](_0x4f14fc,_0x31f250,_0x55f966);if(_0x567d7d['status']>0xc7&&_0x567d7d['status']<0x12c){const _0xd12292=yield _0x567d7d['json']();return new SuccessfulSearchResultResponse(_0xd12292);}const _0x236b0e=yield _0x567d7d['json']();return new FailedSearchResultResponse(_0x236b0e);}catch(_0x836469){if(_0x836469 instanceof Error)return new FailedSearchResultResponse({'detail':_0x836469['message'],'title':_0x836469['name'],'status':0x1f4,'instance':'','type':''});throw _0x836469;}});}['getQueryStr'](_0x2a01c3){let _0x5b880f='';const _0x5d528e=[];(_0x2a01c3===null||_0x2a01c3===void 0?void 0:_0x2a01c3['size'])&&_0x5d528e['push']('size='+_0x2a01c3['size']);(_0x2a01c3===null||_0x2a01c3===void 0?void 0:_0x2a01c3['skip'])&&_0x5d528e['push']('skip='+_0x2a01c3['skip']);(_0x2a01c3===null||_0x2a01c3===void 0?void 0:_0x2a01c3['query'])&&_0x5d528e['push']('query='+_0x2a01c3['query']);(_0x2a01c3===null||_0x2a01c3===void 0?void 0:_0x2a01c3['filter'])&&_0x5d528e['push']('filter='+_0x2a01c3['filter']);if((_0x2a01c3===null||_0x2a01c3===void 0?void 0:_0x2a01c3['radius'])&&this['isRealNumber'](_0x2a01c3['radius']['latitude'])&&this['isRealNumber'](_0x2a01c3['radius']['longitude'])&&this['isRealNumber'](_0x2a01c3['radius']['distance_in_km'])){const _0x40b6c9=_0x2a01c3['radius']['latitude']+','+_0x2a01c3['radius']['longitude']+','+_0x2a01c3['radius']['distance_in_km'];_0x5d528e['push']('radius='+_0x40b6c9);}return _0x2a01c3['active']===![]&&_0x5d528e['push']('active='+_0x2a01c3['active']),_0x5d528e['length']>0x0&&_0x5d528e['forEach']((_0x292c3c,_0x37aa7f)=>{if(_0x37aa7f>0x0&&_0x5b880f)_0x5b880f+='&';_0x5b880f+=_0x292c3c;}),_0x5b880f;}}
|
|
18
18
|
|
|
19
|
-
var __awaiter$4=undefined&&undefined['__awaiter']||function(
|
|
19
|
+
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x3d9b49,_0x448ddd,_0x581dc2,_0x1dc636){function _0x51629f(_0x4378ff){return _0x4378ff instanceof _0x581dc2?_0x4378ff:new _0x581dc2(function(_0x112a43){_0x112a43(_0x4378ff);});}return new(_0x581dc2||(_0x581dc2=Promise))(function(_0x17d1e9,_0x2d83c4){function _0x7a1e3c(_0x126492){try{_0x353996(_0x1dc636['next'](_0x126492));}catch(_0x34bd71){_0x2d83c4(_0x34bd71);}}function _0x5de0b1(_0x377622){try{_0x353996(_0x1dc636['throw'](_0x377622));}catch(_0x5c2e31){_0x2d83c4(_0x5c2e31);}}function _0x353996(_0x178ae1){_0x178ae1['done']?_0x17d1e9(_0x178ae1['value']):_0x51629f(_0x178ae1['value'])['then'](_0x7a1e3c,_0x5de0b1);}_0x353996((_0x1dc636=_0x1dc636['apply'](_0x3d9b49,_0x448ddd||[]))['next']());});};class ContributorService{constructor(_0x39ff37){this['fetch']=_0x39ff37,this['path']='contributor';}['create'](_0x2a2ab0,_0x5a357d,_0x32c37d,_0x592ff8){return __awaiter$4(this,void 0,void 0,function*(){const _0x28274a={'account_name':_0x2a2ab0,'list_name':_0x5a357d,'contributor_name':_0x32c37d};try{const _0x170b05=yield this['fetch']['post'](this['path'],_0x592ff8,_0x28274a);if(_0x170b05['status']>0xc7&&_0x170b05['status']<0x12c){const _0x174ba7=yield _0x170b05['json']();return new SuccessfulContributorResponse(_0x174ba7);}const _0x43d40a=yield _0x170b05['json']();return new FailedContributorResponse(_0x43d40a);}catch(_0x431c01){if(_0x431c01 instanceof Error)return new FailedContributorResponse({'detail':_0x431c01['message'],'title':_0x431c01['name'],'status':0x1f4,'instance':'','type':''});throw _0x431c01;}});}['remove'](_0x21dfbf,_0x822684,_0x1022ae,_0x274fab){return __awaiter$4(this,void 0,void 0,function*(){const _0x4e13bc=this['path']+'/'+_0x21dfbf+'/'+_0x822684+'/'+_0x1022ae,_0x4ea4a6=yield this['fetch']['delete'](_0x4e13bc,_0x274fab);try{if(_0x4ea4a6['status']>0xc7&&_0x4ea4a6['status']<0x12c)return new SuccessfulResponse({});const _0x4b5d27=yield _0x4ea4a6['json']();return new FailedResponse(_0x4b5d27);}catch(_0x49ffb1){if(_0x49ffb1 instanceof Error)return new FailedResponse({'detail':_0x49ffb1['message'],'title':_0x49ffb1['name'],'status':0x1f4,'instance':'','type':''});throw _0x49ffb1;}});}['startsWith'](_0x2ca9cb,_0xeb0199){return __awaiter$4(this,void 0,void 0,function*(){const _0x1ffb90=this['path']+'/'+_0x2ca9cb;try{const _0x16bcbd=yield this['fetch']['get'](_0x1ffb90,_0xeb0199);if(_0x16bcbd['status']>0xc7&&_0x16bcbd['status']<0x12c){const _0x3672f6=yield _0x16bcbd['json']();return new SuccessfulAccountAndImageResponse(_0x3672f6);}const _0x58392a=yield _0x16bcbd['json']();return new FailedAccountAndImageResponse(_0x58392a);}catch(_0x17412e){if(_0x17412e instanceof Error)return new FailedAccountAndImageResponse({'detail':_0x17412e['message'],'title':_0x17412e['name'],'status':0x1f4,'instance':'','type':''});throw _0x17412e;}});}}
|
|
20
20
|
|
|
21
|
-
var __awaiter$3=undefined&&undefined['__awaiter']||function(
|
|
21
|
+
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x325ca5,_0x6528b8,_0x43dd8e,_0x5e5d2){function _0xbd0162(_0x2f4e1d){return _0x2f4e1d instanceof _0x43dd8e?_0x2f4e1d:new _0x43dd8e(function(_0x1e5009){_0x1e5009(_0x2f4e1d);});}return new(_0x43dd8e||(_0x43dd8e=Promise))(function(_0x3910e7,_0x8e4d28){function _0xc57d64(_0x4bc1e3){try{_0x217e27(_0x5e5d2['next'](_0x4bc1e3));}catch(_0x23a5ef){_0x8e4d28(_0x23a5ef);}}function _0x5442a5(_0x594ca7){try{_0x217e27(_0x5e5d2['throw'](_0x594ca7));}catch(_0xe21c9d){_0x8e4d28(_0xe21c9d);}}function _0x217e27(_0xf45e4a){_0xf45e4a['done']?_0x3910e7(_0xf45e4a['value']):_0xbd0162(_0xf45e4a['value'])['then'](_0xc57d64,_0x5442a5);}_0x217e27((_0x5e5d2=_0x5e5d2['apply'](_0x325ca5,_0x6528b8||[]))['next']());});};class SearchableFieldService{constructor(_0x15532d){this['fetch']=_0x15532d,this['path']='searchable-field';}['create'](_0x5921c1,_0x44350f,_0x29f89d,_0x2cf757){return __awaiter$3(this,void 0,void 0,function*(){const _0xa34ff3={'account_name':_0x5921c1,'list_name':_0x44350f,'searchable_field_name':_0x29f89d};try{const _0x11d632=yield this['fetch']['post'](this['path'],_0x2cf757,_0xa34ff3);if(_0x11d632['status']>0xc7&&_0x11d632['status']<0x12c){const _0x24f689=yield _0x11d632['json']();return new SuccessfulSearchableFieldResponse(_0x24f689);}const _0x298312=yield _0x11d632['json']();return new FailedSearchableFieldResponse(_0x298312);}catch(_0xf409e3){if(_0xf409e3 instanceof Error)return new FailedSearchableFieldResponse({'detail':_0xf409e3['message'],'title':_0xf409e3['name'],'status':0x1f4,'instance':'','type':''});throw _0xf409e3;}});}['remove'](_0x462f7a,_0x2e8806,_0x2304a3,_0x4405a9){return __awaiter$3(this,void 0,void 0,function*(){const _0x4ed118=this['path']+'/'+_0x462f7a+'/'+_0x2e8806+'/'+_0x2304a3,_0x4796bb=yield this['fetch']['delete'](_0x4ed118,_0x4405a9);try{if(_0x4796bb['status']>0xc7&&_0x4796bb['status']<0x12c)return new SuccessfulResponse({});const _0x41b8b4=yield _0x4796bb['json']();return new FailedResponse(_0x41b8b4);}catch(_0x383a20){if(_0x383a20 instanceof Error)return new FailedResponse({'detail':_0x383a20['message'],'title':_0x383a20['name'],'status':0x1f4,'instance':'','type':''});throw _0x383a20;}});}['rename'](_0x3dc2d9,_0x71b7b6,_0x3e75e9,_0x536c2c,_0x327429){return __awaiter$3(this,void 0,void 0,function*(){let _0x20a43e=this['path']+'/'+_0x3dc2d9+'/'+_0x71b7b6;const _0x430e6c={'searchable_field_name':_0x3e75e9,'new_searchable_field_name':_0x536c2c};try{const _0x277304=yield this['fetch']['put'](_0x20a43e,_0x327429,_0x430e6c);if(_0x277304['status']>0xc7&&_0x277304['status']<0x12c){const _0x4ff56c=yield _0x277304['json']();return new SuccessfulSearchableFieldResponse(_0x4ff56c);}const _0x54c9b6=yield _0x277304['json']();return new FailedSearchableFieldResponse(_0x54c9b6);}catch(_0x432b33){if(_0x432b33 instanceof Error)return new FailedSearchableFieldResponse({'detail':_0x432b33['message'],'title':_0x432b33['name'],'status':0x1f4,'instance':'','type':''});throw _0x432b33;}});}}
|
|
22
22
|
|
|
23
|
-
var __awaiter$2=undefined&&undefined['__awaiter']||function(
|
|
23
|
+
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x4aa944,_0x4d2341,_0x1438c6,_0x202737){function _0x565620(_0x10e636){return _0x10e636 instanceof _0x1438c6?_0x10e636:new _0x1438c6(function(_0x206ef5){_0x206ef5(_0x10e636);});}return new(_0x1438c6||(_0x1438c6=Promise))(function(_0xe8eebe,_0x221747){function _0x3c6771(_0x4b8442){try{_0xdc4b70(_0x202737['next'](_0x4b8442));}catch(_0x30c72c){_0x221747(_0x30c72c);}}function _0x3225d8(_0x317c99){try{_0xdc4b70(_0x202737['throw'](_0x317c99));}catch(_0x9f2a41){_0x221747(_0x9f2a41);}}function _0xdc4b70(_0x2347ee){_0x2347ee['done']?_0xe8eebe(_0x2347ee['value']):_0x565620(_0x2347ee['value'])['then'](_0x3c6771,_0x3225d8);}_0xdc4b70((_0x202737=_0x202737['apply'](_0x4aa944,_0x4d2341||[]))['next']());});};class ResourceService{constructor(_0x440ac5){this['fetch']=_0x440ac5,this['path']='resource';}['create'](_0x1ecd9c,_0x3ddaaa,_0x2cd00c,_0xf1f628){return __awaiter$2(this,void 0,void 0,function*(){const _0x5b51da={'account_name':_0x1ecd9c,'list_name':_0x3ddaaa,'resource_name':_0x2cd00c};try{const _0x5469c6=yield this['fetch']['post'](this['path'],_0xf1f628,_0x5b51da);if(_0x5469c6['status']>0xc7&&_0x5469c6['status']<0x12c){const _0x4e07d0=yield _0x5469c6['json']();return new SuccessfulResourceResponse(_0x4e07d0);}const _0x165ad0=yield _0x5469c6['json']();return new FailedResourceResponse(_0x165ad0);}catch(_0x490222){if(_0x490222 instanceof Error)return new FailedResourceResponse({'detail':_0x490222['message'],'title':_0x490222['name'],'status':0x1f4,'instance':'','type':''});throw _0x490222;}});}['remove'](_0x229f62,_0x430243,_0x158915,_0x209fc8){return __awaiter$2(this,void 0,void 0,function*(){const _0x49afa7=this['path']+'/'+_0x229f62+'/'+_0x430243+'/'+_0x158915,_0x139286=yield this['fetch']['delete'](_0x49afa7,_0x209fc8);try{if(_0x139286['status']>0xc7&&_0x139286['status']<0x12c)return new SuccessfulResponse({});const _0x43e7cf=yield _0x139286['json']();return new FailedResponse(_0x43e7cf);}catch(_0x4353a5){if(_0x4353a5 instanceof Error)return new FailedResponse({'detail':_0x4353a5['message'],'title':_0x4353a5['name'],'status':0x1f4,'instance':'','type':''});throw _0x4353a5;}});}['rename'](_0x2f5fd1,_0x504caf,_0x468eb7,_0x43caa0,_0x53e673){return __awaiter$2(this,void 0,void 0,function*(){let _0x352d69=this['path']+'/'+_0x2f5fd1+'/'+_0x504caf;const _0x248c48={'resource_name':_0x468eb7,'new_resource_name':_0x43caa0};try{const _0xee15e3=yield this['fetch']['put'](_0x352d69,_0x53e673,_0x248c48);if(_0xee15e3['status']>0xc7&&_0xee15e3['status']<0x12c){const _0x499334=yield _0xee15e3['json']();return new SuccessfulResourceResponse(_0x499334);}const _0x61d4fa=yield _0xee15e3['json']();return new FailedResourceResponse(_0x61d4fa);}catch(_0x322d2a){if(_0x322d2a instanceof Error)return new FailedResourceResponse({'detail':_0x322d2a['message'],'title':_0x322d2a['name'],'status':0x1f4,'instance':'','type':''});throw _0x322d2a;}});}}
|
|
24
24
|
|
|
25
|
-
var __awaiter$1=undefined&&undefined['__awaiter']||function(
|
|
25
|
+
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x34c924,_0x21112d,_0x21269e,_0x37e514){function _0x14449c(_0x265ddf){return _0x265ddf instanceof _0x21269e?_0x265ddf:new _0x21269e(function(_0x392171){_0x392171(_0x265ddf);});}return new(_0x21269e||(_0x21269e=Promise))(function(_0x277e25,_0x57c347){function _0xcdbf80(_0x57ce0f){try{_0x1a7405(_0x37e514['next'](_0x57ce0f));}catch(_0x4030e8){_0x57c347(_0x4030e8);}}function _0x39053b(_0x34498a){try{_0x1a7405(_0x37e514['throw'](_0x34498a));}catch(_0x15219e){_0x57c347(_0x15219e);}}function _0x1a7405(_0x4895b6){_0x4895b6['done']?_0x277e25(_0x4895b6['value']):_0x14449c(_0x4895b6['value'])['then'](_0xcdbf80,_0x39053b);}_0x1a7405((_0x37e514=_0x37e514['apply'](_0x34c924,_0x21112d||[]))['next']());});};class GroupService{constructor(_0x4cc4d2){this['fetch']=_0x4cc4d2,this['path']='group';}['create'](_0x58609a,_0x2f64e9,_0x5023b4,_0x12a20e){return __awaiter$1(this,void 0,void 0,function*(){const _0xe58b8a={'account_name':_0x58609a,'search_service_name':_0x2f64e9,'group_name':_0x5023b4};try{const _0x37c71f=yield this['fetch']['post'](this['path'],_0x12a20e,_0xe58b8a);if(_0x37c71f['status']>0xc7&&_0x37c71f['status']<0x12c){const _0x259f4d=yield _0x37c71f['json']();return new SuccessfulGroupResponse(_0x259f4d);}const _0x845d56=yield _0x37c71f['json']();return new FailedGroupResponse(_0x845d56);}catch(_0x358356){if(_0x358356 instanceof Error)return new FailedGroupResponse({'detail':_0x358356['message'],'title':_0x358356['name'],'status':0x1f4,'instance':'','type':''});throw _0x358356;}});}['addList'](_0x232cc1,_0x304eaf,_0x5d32b,_0x486ed9,_0x4765a9){return __awaiter$1(this,void 0,void 0,function*(){const _0x171cd1={'account_name':_0x232cc1,'list_name':_0x5d32b,'group_name':_0x304eaf,'version':_0x486ed9};try{const _0x46709a=yield this['fetch']['post'](this['path']+'/list',_0x4765a9,_0x171cd1);if(_0x46709a['status']>0xc7&&_0x46709a['status']<0x12c){const _0x5e5c51=yield _0x46709a['json']();return new SuccessfulListIdentityResponse(_0x5e5c51);}const _0x834b55=yield _0x46709a['json']();return new FailedListIdentityResponse(_0x834b55);}catch(_0x39697c){if(_0x39697c instanceof Error)return new FailedListIdentityResponse({'detail':_0x39697c['message'],'title':_0x39697c['name'],'status':0x1f4,'instance':'','type':''});throw _0x39697c;}});}['delete'](_0x3e1f8c,_0x4b5410,_0xac37c0){return __awaiter$1(this,void 0,void 0,function*(){const _0x2a6241=this['path']+'/'+_0x3e1f8c+'/'+_0x4b5410,_0x42c77b=yield this['fetch']['delete'](_0x2a6241,_0xac37c0);try{if(_0x42c77b['status']>0xc7&&_0x42c77b['status']<0x12c)return new SuccessfulResponse({});const _0x134d2f=yield _0x42c77b['json']();return new FailedResponse(_0x134d2f);}catch(_0x2d9f3d){if(_0x2d9f3d instanceof Error)return new FailedResponse({'detail':_0x2d9f3d['message'],'title':_0x2d9f3d['name'],'status':0x1f4,'instance':'','type':''});throw _0x2d9f3d;}});}}
|
|
26
26
|
|
|
27
|
-
var __awaiter=undefined&&undefined['__awaiter']||function(
|
|
27
|
+
var __awaiter=undefined&&undefined['__awaiter']||function(_0x134a2c,_0x1bf981,_0x1ec1d2,_0x299e58){function _0x3c7def(_0x4a279e){return _0x4a279e instanceof _0x1ec1d2?_0x4a279e:new _0x1ec1d2(function(_0x3c66c4){_0x3c66c4(_0x4a279e);});}return new(_0x1ec1d2||(_0x1ec1d2=Promise))(function(_0x2961f6,_0x4ce757){function _0x2e8a8e(_0x2d311f){try{_0x558ec8(_0x299e58['next'](_0x2d311f));}catch(_0x560f56){_0x4ce757(_0x560f56);}}function _0x503f17(_0x21c705){try{_0x558ec8(_0x299e58['throw'](_0x21c705));}catch(_0x595b0d){_0x4ce757(_0x595b0d);}}function _0x558ec8(_0x51f35a){_0x51f35a['done']?_0x2961f6(_0x51f35a['value']):_0x3c7def(_0x51f35a['value'])['then'](_0x2e8a8e,_0x503f17);}_0x558ec8((_0x299e58=_0x299e58['apply'](_0x134a2c,_0x1bf981||[]))['next']());});};class AdminClient{constructor(_0x3097e6='https://admin.searchability.dev/'){var _0x49dc1e=new Fetch(_0x3097e6);this['Accounts']=new AccountService(_0x49dc1e),this['Lists']=new ListService(_0x49dc1e),this['ApiKeys']=new ApiKeyService(_0x49dc1e),this['SearchServers']=new SearchServersService(_0x49dc1e),this['Facets']=new FacetService(_0x49dc1e),this['SearchResults']=new SearchResultService(_0x49dc1e),this['Contributors']=new ContributorService(_0x49dc1e),this['SearchableFields']=new SearchableFieldService(_0x49dc1e),this['Groups']=new GroupService(_0x49dc1e),this['Resources']=new ResourceService(_0x49dc1e);}}class AuthClient{constructor(_0x41b7fb='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x41b7fb);}['login'](_0x4db93f){return __awaiter(this,void 0,void 0,function*(){const _0x42ce24='login/'+_0x4db93f;try{const _0x22d960=yield yield fetch(_0x42ce24);if(_0x22d960['status']>0xc7&&_0x22d960['status']<0x12c){const _0x44ba1c=yield _0x22d960['json']();return new SuccessfulAuthResponse(_0x44ba1c);}const _0x4ec4a0=yield _0x22d960['json']();return new FailedAuthResponse(_0x4ec4a0);}catch(_0x4d72f5){if(_0x4d72f5 instanceof Error)return new FailedAuthResponse({'detail':_0x4d72f5['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x4d72f5;}});}['refresh'](_0x95dfa6){return __awaiter(this,void 0,void 0,function*(){const _0x1a9d1b='refresh',_0x7cf9f7={'refresh_token':_0x95dfa6};try{const _0x24f651=yield this['fetch']['PostNoAuth'](_0x1a9d1b,_0x7cf9f7);if(_0x24f651['status']>0xc7&&_0x24f651['status']<0x12c){const _0x3012ed=yield _0x24f651['json']();return new SuccessfulAuthResponse(_0x3012ed);}const _0x5c8f72=yield _0x24f651['json']();return new FailedAuthResponse(_0x5c8f72);}catch(_0x17facc){if(_0x17facc instanceof Error)return new FailedAuthResponse({'detail':_0x17facc['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x17facc;}});}['getTokenStatus'](_0x12afd6){if(Date['now']()<_0x12afd6['access_expires'])return exports.TokenStatus['Ok'];if(Date['now']()<_0x12afd6['refresh_expires'])return exports.TokenStatus['Refresh'];return exports.TokenStatus['Expired'];}}
|
|
28
28
|
|
|
29
29
|
exports.AdminClient = AdminClient;
|
|
30
30
|
exports.AuthClient = AuthClient;
|