@searchability/admin-client 0.0.144 → 0.0.146
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
var TokenStatus;(function(_0x3644f5){_0x3644f5[_0x3644f5['Ok']=0x0]='Ok',_0x3644f5[_0x3644f5['Refresh']=0x1]='Refresh',_0x3644f5[_0x3644f5['Expired']=0x2]='Expired';}(TokenStatus||(TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}}class Response{constructor(_0x158644){this['isSuccess']=_0x158644;}}class SuccessfulFacetValueResponse extends Response{constructor(_0x4dda63){super(!![]),this['facets']=_0x4dda63;}['toSuccess'](){return this['facets'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetValuesResponse extends Response{constructor(_0xaf925d){super(![]),this['problem']=_0xaf925d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulContributorResponse extends Response{constructor(_0x59df7c){super(!![]),this['contributor']=_0x59df7c;}['toSuccess'](){return this['contributor'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedContributorResponse extends Response{constructor(_0x4cd9f5){super(![]),this['problem']=_0x4cd9f5;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountAndImageResponse extends Response{constructor(_0x43c886){super(!![]),this['accountAndImages']=_0x43c886;}['toSuccess'](){return this['accountAndImages'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountAndImageResponse extends Response{constructor(_0x4f77d5){super(![]),this['problem']=_0x4f77d5;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulResourceResponse extends Response{constructor(_0x3aea84){super(!![]),this['resource']=_0x3aea84;}['toSuccess'](){return this['resource'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResourceResponse extends Response{constructor(_0x3a3037){super(![]),this['problem']=_0x3a3037;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulFacetResponse extends Response{constructor(_0x25cc80){super(!![]),this['facet']=_0x25cc80;}['toSuccess'](){return this['facet'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetResponse extends Response{constructor(_0x6908fe){super(![]),this['problem']=_0x6908fe;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedSearchableFieldResponse extends Response{constructor(_0x13b47b){super(![]),this['problem']=_0x13b47b;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchableFieldResponse extends Response{constructor(_0x10ad5d){super(!![]),this['searchable_field']=_0x10ad5d;}['toSuccess'](){return this['searchable_field'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountResponse extends Response{constructor(_0x610008){super(!![]),this['account']=_0x610008;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountImageResponse extends Response{constructor(_0x348cd5){super(!![]),this['accountImage']=_0x348cd5;}['toSuccess'](){return this['accountImage'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListIdentityResponse extends Response{constructor(_0x224b3c){super(!![]),this['list']=_0x224b3c;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulGroupResponse extends Response{constructor(_0x1f204e){super(!![]),this['group']=_0x1f204e;}['toSuccess'](){return this['group'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedGroupResponse extends Response{constructor(_0x52617a){super(![]),this['problem']=_0x52617a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListResponse extends Response{constructor(_0x3486ef){super(!![]),this['list']=_0x3486ef;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedListResponse extends Response{constructor(_0x33f541){super(![]),this['problem']=_0x33f541;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountResponse extends Response{constructor(_0x2df1f1){super(![]),this['problem']=_0x2df1f1;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountImageResponse extends Response{constructor(_0x403690){super(![]),this['problem']=_0x403690;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListIdentityResponse extends Response{constructor(_0x4b7c38){super(![]),this['problem']=_0x4b7c38;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x30bf69){super(!![]),this['tokens']=_0x30bf69;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x519f54){super(![]),this['problem']=_0x519f54;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x559c5e){super(!![]),this['apiKey']=_0x559c5e;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x1df229){super(![]),this['problem']=_0x1df229;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x4e5062){super(!![]),this['searchService']=_0x4e5062;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x114953){super(![]),this['problem']=_0x114953;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x173f2c){super(!![]),this['searchService']=_0x173f2c;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulSearchResultResponse extends Response{constructor(_0x632869){super(!![]),this['searchResult']=_0x632869;}['toSuccess'](){return this['searchResult'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchResultResponse extends Response{constructor(_0x1603e2){super(![]),this['problem']=_0x1603e2;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchResultResponse extends Response{constructor(_0xbad435){super(!![]),this['searchResults']=_0xbad435;}['toSuccess'](){return this['searchResults'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchResultResponse extends Response{constructor(_0x1f030b){super(![]),this['problem']=_0x1f030b;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchServiceResponse extends Response{constructor(_0xc3d86c){super(!![]),this['searchServices']=_0xc3d86c;}['toSuccess'](){return this['searchServices'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServicesResponse extends Response{constructor(_0x21b911){super(![]),this['problem']=_0x21b911;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedViewSearchServiceResponse extends Response{constructor(_0x5c7b05){super(![]),this['problem']=_0x5c7b05;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x29a92d){super(!![]),this['apiKeyValue']=_0x29a92d;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x56a695){super(!![]),this['obj']=_0x56a695;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x2251f0){super(![]),this['problem']=_0x2251f0;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x2b78ed){super(![]),this['problem']=_0x2b78ed;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
|
|
2
|
+
|
|
3
|
+
var __awaiter$b=undefined&&undefined['__awaiter']||function(_0x4c5343,_0x5e9fd4,_0x293a4d,_0x4535e5){function _0x1fa955(_0x332ddd){return _0x332ddd instanceof _0x293a4d?_0x332ddd:new _0x293a4d(function(_0x4e8569){_0x4e8569(_0x332ddd);});}return new(_0x293a4d||(_0x293a4d=Promise))(function(_0x44d608,_0x2aad27){function _0x64fdc4(_0x4d228c){try{_0x50b360(_0x4535e5['next'](_0x4d228c));}catch(_0x2affc2){_0x2aad27(_0x2affc2);}}function _0x58d745(_0x8f4e23){try{_0x50b360(_0x4535e5['throw'](_0x8f4e23));}catch(_0x47314e){_0x2aad27(_0x47314e);}}function _0x50b360(_0x247aa4){_0x247aa4['done']?_0x44d608(_0x247aa4['value']):_0x1fa955(_0x247aa4['value'])['then'](_0x64fdc4,_0x58d745);}_0x50b360((_0x4535e5=_0x4535e5['apply'](_0x4c5343,_0x5e9fd4||[]))['next']());});};class AccountService{constructor(_0xb43da8){this['fetch']=_0xb43da8;}['get'](_0x201b51,_0x3b9f67){return __awaiter$b(this,void 0,void 0,function*(){const _0x397826='Account/'+_0x201b51+'/',_0x315640=yield this['fetch']['get'](_0x397826,_0x3b9f67);try{if(_0x315640['status']>0xc7&&_0x315640['status']<0x12c){const _0x2a39a8=yield _0x315640['json']();return new SuccessfulAccountResponse(_0x2a39a8);}const _0x4a8198=yield _0x315640['json']();return new FailedAccountResponse(_0x4a8198);}catch(_0x2c91ce){if(_0x2c91ce instanceof Error)return new FailedAccountResponse({'detail':_0x2c91ce['message'],'title':_0x2c91ce['name'],'status':0x1f4,'instance':'','type':''});throw _0x2c91ce;}});}['getImage'](_0x4f5817,_0x5858d9){return __awaiter$b(this,void 0,void 0,function*(){const _0x2d1389='account/image/'+_0x4f5817+'/',_0x4fea29=yield this['fetch']['get'](_0x2d1389,_0x5858d9);try{if(_0x4fea29['status']>0xc7&&_0x4fea29['status']<0x12c){const _0x4b4465=yield _0x4fea29['json']();return new SuccessfulAccountImageResponse(_0x4b4465);}const _0x4a8860=yield _0x4fea29['json']();return new FailedAccountImageResponse(_0x4a8860);}catch(_0x27ec99){if(_0x27ec99 instanceof Error)return new FailedAccountImageResponse({'detail':_0x27ec99['message'],'title':_0x27ec99['name'],'status':0x1f4,'instance':'','type':''});throw _0x27ec99;}});}}
|
|
4
|
+
|
|
5
|
+
var __awaiter$a=undefined&&undefined['__awaiter']||function(_0x487473,_0x50d71d,_0x5b39f0,_0x106289){function _0x3378df(_0x473fdd){return _0x473fdd instanceof _0x5b39f0?_0x473fdd:new _0x5b39f0(function(_0x5c2407){_0x5c2407(_0x473fdd);});}return new(_0x5b39f0||(_0x5b39f0=Promise))(function(_0x5b2a57,_0x1a96b8){function _0x2dd1f2(_0x178406){try{_0x78575a(_0x106289['next'](_0x178406));}catch(_0x1565c7){_0x1a96b8(_0x1565c7);}}function _0x49f1b6(_0x101810){try{_0x78575a(_0x106289['throw'](_0x101810));}catch(_0x3a5930){_0x1a96b8(_0x3a5930);}}function _0x78575a(_0x459752){_0x459752['done']?_0x5b2a57(_0x459752['value']):_0x3378df(_0x459752['value'])['then'](_0x2dd1f2,_0x49f1b6);}_0x78575a((_0x106289=_0x106289['apply'](_0x487473,_0x50d71d||[]))['next']());});};class ApiKeyService{constructor(_0x353a46){this['fetch']=_0x353a46,this['path']='api-key';}['create'](_0x39b7f0,_0x149bf7,_0x2d5ffb){return __awaiter$a(this,void 0,void 0,function*(){const _0x2ef4af={'account_name':_0x39b7f0,'api_key_name':_0x149bf7};try{const _0x38da94=yield this['fetch']['post'](this['path'],_0x2d5ffb,_0x2ef4af);if(_0x38da94['status']>0xc7&&_0x38da94['status']<0x12c){const _0x2d8d59=yield _0x38da94['json']();return new SuccessfulApiKeyResponse(_0x2d8d59);}const _0x85aa64=yield _0x38da94['json']();return new FailedApiKeyResponse(_0x85aa64);}catch(_0x3cee87){if(_0x3cee87 instanceof Error)return new FailedApiKeyResponse({'detail':_0x3cee87['message'],'title':_0x3cee87['name'],'status':0x1f4,'instance':'','type':''});throw _0x3cee87;}});}['view'](_0x27bb97,_0x4ebfc8,_0x17615e){return __awaiter$a(this,void 0,void 0,function*(){const _0x1a2adf=this['path']+'/'+_0x27bb97+'/'+_0x4ebfc8;try{const _0x54ef91=yield this['fetch']['get'](_0x1a2adf,_0x17615e);if(_0x54ef91['status']>0xc7&&_0x54ef91['status']<0x12c){const _0x40f95c=yield _0x54ef91['json']();return new SuccessfulApiKeyValueResponse(_0x40f95c);}const _0x5f1d49=yield _0x54ef91['json']();return new FailedApiKeyValueResponse(_0x5f1d49);}catch(_0x4b6bf2){if(_0x4b6bf2 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x4b6bf2['message'],'title':_0x4b6bf2['name'],'status':0x1f4,'instance':'','type':''});throw _0x4b6bf2;}});}['delete'](_0x332019,_0x563e51,_0x5ce324){return __awaiter$a(this,void 0,void 0,function*(){const _0x48d27f=this['path']+'/'+_0x332019+'/'+_0x563e51;try{const _0x53bce6=yield this['fetch']['delete'](_0x48d27f,_0x5ce324);if(_0x53bce6['status']>0xc7&&_0x53bce6['status']<0x12c)return new SuccessfulResponse({});const _0x31105a=yield _0x53bce6['json']();return new FailedResponse(_0x31105a);}catch(_0x491b59){if(_0x491b59 instanceof Error)return new FailedResponse({'detail':_0x491b59['message'],'title':_0x491b59['name'],'status':0x1f4,'instance':'','type':''});throw _0x491b59;}});}}
|
|
6
|
+
|
|
7
|
+
var __awaiter$9=undefined&&undefined['__awaiter']||function(_0x6e39ba,_0x5f4f2d,_0x5f020c,_0x5ce7d2){function _0x113609(_0x5ac4f6){return _0x5ac4f6 instanceof _0x5f020c?_0x5ac4f6:new _0x5f020c(function(_0x2159fd){_0x2159fd(_0x5ac4f6);});}return new(_0x5f020c||(_0x5f020c=Promise))(function(_0x13e079,_0x35ffce){function _0x52b64d(_0x41c76b){try{_0x1df22f(_0x5ce7d2['next'](_0x41c76b));}catch(_0x2ffe69){_0x35ffce(_0x2ffe69);}}function _0x166b94(_0x17afa3){try{_0x1df22f(_0x5ce7d2['throw'](_0x17afa3));}catch(_0xcaa6eb){_0x35ffce(_0xcaa6eb);}}function _0x1df22f(_0x1566d0){_0x1566d0['done']?_0x13e079(_0x1566d0['value']):_0x113609(_0x1566d0['value'])['then'](_0x52b64d,_0x166b94);}_0x1df22f((_0x5ce7d2=_0x5ce7d2['apply'](_0x6e39ba,_0x5f4f2d||[]))['next']());});};class ListService{constructor(_0x160407){this['fetch']=_0x160407,this['path']='list',this['Coordinates']=new CoordinatesService(_0x160407),this['GeneratedSuggestions']=new GeneratedSuggestionsService(_0x160407);}['create'](_0x5339b5,_0x1d58a1,_0x191ca9,_0x21327b){return __awaiter$9(this,void 0,void 0,function*(){const _0x4baaa6={'account_name':_0x5339b5,'list_name':_0x1d58a1,'search_service_name':_0x191ca9};try{const _0x18ca1c=yield this['fetch']['post'](this['path'],_0x21327b,_0x4baaa6);if(_0x18ca1c['status']>0xc7&&_0x18ca1c['status']<0x12c){const _0x16bd91=yield _0x18ca1c['json']();return new SuccessfulListIdentityResponse(_0x16bd91);}const _0x5af7b6=yield _0x18ca1c['json']();return new FailedListIdentityResponse(_0x5af7b6);}catch(_0x356030){if(_0x356030 instanceof Error)return new FailedListIdentityResponse({'detail':_0x356030['message'],'title':_0x356030['name'],'status':0x1f4,'instance':'','type':''});throw _0x356030;}});}['delete'](_0x2b98c6,_0x1e4a1f,_0x4d8857){return __awaiter$9(this,void 0,void 0,function*(){const _0x1d1d83=this['path']+'/'+_0x2b98c6+'/'+_0x1e4a1f,_0x45c4c0=yield this['fetch']['delete'](_0x1d1d83,_0x4d8857);try{if(_0x45c4c0['status']>0xc7&&_0x45c4c0['status']<0x12c)return new SuccessfulResponse({});const _0x57828a=yield _0x45c4c0['json']();return new FailedResponse(_0x57828a);}catch(_0x239240){if(_0x239240 instanceof Error)return new FailedResponse({'detail':_0x239240['message'],'title':_0x239240['name'],'status':0x1f4,'instance':'','type':''});throw _0x239240;}});}['get'](_0x2817df,_0x44c07e,_0x4f2ca3){return __awaiter$9(this,void 0,void 0,function*(){const _0x177d04=this['path']+'/'+_0x2817df+'/'+_0x44c07e;try{const _0x11983b=yield this['fetch']['get'](_0x177d04,_0x4f2ca3);if(_0x11983b['status']>0xc7&&_0x11983b['status']<0x12c){const _0x2520f6=yield _0x11983b['json']();return new SuccessfulListResponse(_0x2520f6);}const _0xb0236c=yield _0x11983b['json']();return new FailedListResponse(_0xb0236c);}catch(_0x36346e){if(_0x36346e instanceof Error)return new FailedListResponse({'detail':_0x36346e['message'],'title':_0x36346e['name'],'status':0x1f4,'instance':'','type':''});throw _0x36346e;}});}['editSettings'](_0x59da5b,_0x2fc265,_0x317fbc,_0x2844c4){return __awaiter$9(this,void 0,void 0,function*(){const _0x418e49=this['path']+'/settings/'+_0x59da5b+'/'+_0x2fc265,_0x4ae14c=yield this['fetch']['put'](_0x418e49,_0x317fbc,_0x2844c4);try{if(_0x4ae14c['status']>0xc7&&_0x4ae14c['status']<0x12c){const _0x276afc=yield _0x4ae14c['json']();return new SuccessfulListResponse(_0x276afc);}const _0x68cf4e=yield _0x4ae14c['json']();return new FailedListResponse(_0x68cf4e);}catch(_0x2f8607){if(_0x2f8607 instanceof Error)return new FailedListResponse({'detail':_0x2f8607['message'],'title':_0x2f8607['name'],'status':0x1f4,'instance':'','type':''});throw _0x2f8607;}});}['addCoordinates'](_0x3376ad,_0x344716,_0x59c514){return __awaiter$9(this,void 0,void 0,function*(){const _0x23a671=this['path']+'/coordinates/'+_0x3376ad+'/'+_0x344716,_0x239879=yield this['fetch']['post'](_0x23a671,_0x59c514,{});try{if(_0x239879['status']>0xc7&&_0x239879['status']<0x12c){const _0x79ff7d=yield _0x239879['json']();return new SuccessfulListResponse(_0x79ff7d);}const _0x4cabc4=yield _0x239879['json']();return new FailedListResponse(_0x4cabc4);}catch(_0x45a04a){if(_0x45a04a instanceof Error)return new FailedListResponse({'detail':_0x45a04a['message'],'title':_0x45a04a['name'],'status':0x1f4,'instance':'','type':''});throw _0x45a04a;}});}['removeCoordinates'](_0x36c57e,_0x51eb4d,_0x3c40ac){return __awaiter$9(this,void 0,void 0,function*(){const _0x225cd7=this['path']+'/coordinates/'+_0x36c57e+'/'+_0x51eb4d,_0x5830c8=yield this['fetch']['delete'](_0x225cd7,_0x3c40ac);try{if(_0x5830c8['status']>0xc7&&_0x5830c8['status']<0x12c){const _0x371349=yield _0x5830c8['json']();return new SuccessfulListResponse(_0x371349);}const _0x113e8a=yield _0x5830c8['json']();return new FailedListResponse(_0x113e8a);}catch(_0xfa8927){if(_0xfa8927 instanceof Error)return new FailedListResponse({'detail':_0xfa8927['message'],'title':_0xfa8927['name'],'status':0x1f4,'instance':'','type':''});throw _0xfa8927;}});}['transfer'](_0x443962,_0x57b040,_0x232100,_0x2534bc){return __awaiter$9(this,void 0,void 0,function*(){const _0x14891f={'new_search_service_name':_0x232100};try{const _0x219e83=yield this['fetch']['put'](this['path']+'/transfer/'+_0x443962+'/'+_0x57b040,_0x2534bc,_0x14891f);if(_0x219e83['status']>0xc7&&_0x219e83['status']<0x12c){const _0x2277ab=yield _0x219e83['json']();return new SuccessfulListResponse(_0x2277ab);}const _0x1a04f0=yield _0x219e83['json']();return new FailedListResponse(_0x1a04f0);}catch(_0xf25a9f){if(_0xf25a9f instanceof Error)return new FailedListResponse({'detail':_0xf25a9f['message'],'title':_0xf25a9f['name'],'status':0x1f4,'instance':'','type':''});throw _0xf25a9f;}});}}class CoordinatesService{constructor(_0x33a661){this['fetch']=_0x33a661,this['path']='list/coordinates';}['add'](_0x2cc35c,_0x3ab1d8,_0x917210){return __awaiter$9(this,void 0,void 0,function*(){const _0x3d2a9f=this['path']+'/'+_0x2cc35c+'/'+_0x3ab1d8,_0x306a98=yield this['fetch']['post'](_0x3d2a9f,_0x917210,{});try{if(_0x306a98['status']>0xc7&&_0x306a98['status']<0x12c){const _0x3909ea=yield _0x306a98['json']();return new SuccessfulListResponse(_0x3909ea);}const _0x124c72=yield _0x306a98['json']();return new FailedListResponse(_0x124c72);}catch(_0x5932a6){if(_0x5932a6 instanceof Error)return new FailedListResponse({'detail':_0x5932a6['message'],'title':_0x5932a6['name'],'status':0x1f4,'instance':'','type':''});throw _0x5932a6;}});}['remove'](_0x5d88d2,_0x2853bd,_0x2d0d85){return __awaiter$9(this,void 0,void 0,function*(){const _0x201e3d=this['path']+'/'+_0x5d88d2+'/'+_0x2853bd,_0x5540d0=yield this['fetch']['delete'](_0x201e3d,_0x2d0d85);try{if(_0x5540d0['status']>0xc7&&_0x5540d0['status']<0x12c){const _0x49de4c=yield _0x5540d0['json']();return new SuccessfulListResponse(_0x49de4c);}const _0x20162e=yield _0x5540d0['json']();return new FailedListResponse(_0x20162e);}catch(_0x1df615){if(_0x1df615 instanceof Error)return new FailedListResponse({'detail':_0x1df615['message'],'title':_0x1df615['name'],'status':0x1f4,'instance':'','type':''});throw _0x1df615;}});}}class GeneratedSuggestionsService{constructor(_0x313ab8){this['fetch']=_0x313ab8,this['path']='list/generated-suggestions';}['add'](_0x2aba8d,_0x16fbb7,_0x2af113,_0x1a5c00,_0x198e47,_0x1226f4,_0x34523e){return __awaiter$9(this,void 0,void 0,function*(){const _0x1d3f64=this['path']+'/'+_0x2aba8d+'/'+_0x16fbb7,_0x3de7c6=yield this['fetch']['post'](_0x1d3f64,_0x34523e,{'target_list_name':_0x2af113,'minimum_result_count':_0x1a5c00,'is_active':_0x198e47,'minimum_characters':_0x1226f4});try{if(_0x3de7c6['status']>0xc7&&_0x3de7c6['status']<0x12c){const _0x33d7ef=yield _0x3de7c6['json']();return new SuccessfulListResponse(_0x33d7ef);}const _0x28eab2=yield _0x3de7c6['json']();return new FailedListResponse(_0x28eab2);}catch(_0x2768aa){if(_0x2768aa instanceof Error)return new FailedListResponse({'detail':_0x2768aa['message'],'title':_0x2768aa['name'],'status':0x1f4,'instance':'','type':''});throw _0x2768aa;}});}['remove'](_0x4bac01,_0x5bebe7,_0x1db930){return __awaiter$9(this,void 0,void 0,function*(){const _0x12d327=this['path']+'/'+_0x4bac01+'/'+_0x5bebe7,_0x423b35=yield this['fetch']['delete'](_0x12d327,_0x1db930);try{if(_0x423b35['status']>0xc7&&_0x423b35['status']<0x12c){const _0x12317f=yield _0x423b35['json']();return new SuccessfulListResponse(_0x12317f);}const _0x1018ec=yield _0x423b35['json']();return new FailedListResponse(_0x1018ec);}catch(_0x3ce9fb){if(_0x3ce9fb instanceof Error)return new FailedListResponse({'detail':_0x3ce9fb['message'],'title':_0x3ce9fb['name'],'status':0x1f4,'instance':'','type':''});throw _0x3ce9fb;}});}['edit'](_0x5f5333,_0x414e46,_0x3c5ae3,_0x3ac086){return __awaiter$9(this,void 0,void 0,function*(){const _0xddc10d=this['path']+'/'+_0x5f5333+'/'+_0x414e46;_0x3ac086=_0x3ac086!==null&&_0x3ac086!==void 0?_0x3ac086:{};const _0x2d0810=yield this['fetch']['put'](_0xddc10d,_0x3c5ae3,_0x3ac086);try{if(_0x2d0810['status']>0xc7&&_0x2d0810['status']<0x12c){const _0xd62cee=yield _0x2d0810['json']();return new SuccessfulListResponse(_0xd62cee);}const _0xa5cbc8=yield _0x2d0810['json']();return new FailedListResponse(_0xa5cbc8);}catch(_0x3a509b){if(_0x3a509b instanceof Error)return new FailedListResponse({'detail':_0x3a509b['message'],'title':_0x3a509b['name'],'status':0x1f4,'instance':'','type':''});throw _0x3a509b;}});}}
|
|
8
|
+
|
|
9
|
+
var __awaiter$8=undefined&&undefined['__awaiter']||function(_0x16a49a,_0x495fdd,_0x4c8ff4,_0x1acef8){function _0x1aef60(_0x3d3708){return _0x3d3708 instanceof _0x4c8ff4?_0x3d3708:new _0x4c8ff4(function(_0x330824){_0x330824(_0x3d3708);});}return new(_0x4c8ff4||(_0x4c8ff4=Promise))(function(_0x282acc,_0x4d1e4d){function _0x543882(_0x2a5d18){try{_0x3ce76a(_0x1acef8['next'](_0x2a5d18));}catch(_0x20387b){_0x4d1e4d(_0x20387b);}}function _0x5e0987(_0x3181c4){try{_0x3ce76a(_0x1acef8['throw'](_0x3181c4));}catch(_0x353cde){_0x4d1e4d(_0x353cde);}}function _0x3ce76a(_0x21eb16){_0x21eb16['done']?_0x282acc(_0x21eb16['value']):_0x1aef60(_0x21eb16['value'])['then'](_0x543882,_0x5e0987);}_0x3ce76a((_0x1acef8=_0x1acef8['apply'](_0x16a49a,_0x495fdd||[]))['next']());});};class Fetch{constructor(_0x4311da){this['baseUri']=_0x4311da,this['getUrl']=_0x3122f1=>{return _0x3122f1['startsWith']('/')&&(_0x3122f1=_0x3122f1['replace']('/','')),''+this['baseUri']+_0x3122f1;},!_0x4311da['endsWith']('/')&&(_0x4311da=_0x4311da+'/');}['get'](_0x3bfaa8,_0xae8122){return __awaiter$8(this,void 0,void 0,function*(){const _0x45558e=this['getUrl'](_0x3bfaa8);return yield fetch(_0x45558e,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0xae8122}});});}['post'](_0x55ec2e,_0x1eabde,_0x2090ce){return __awaiter$8(this,void 0,void 0,function*(){const _0x5758a9=this['getUrl'](_0x55ec2e);return yield fetch(_0x5758a9,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1eabde},'body':_0x2090ce?JSON['stringify'](_0x2090ce):null});});}['upload'](_0x5a087d,_0x5da84b,_0x2aa640){return __awaiter$8(this,void 0,void 0,function*(){const _0x2b1c6c=this['getUrl'](_0x5a087d);return yield fetch(_0x2b1c6c,{'method':'POST','headers':{'Authorization':'Bearer\x20'+_0x5da84b},'body':_0x2aa640});});}['PostNoAuth'](_0x22c2d9,_0x3be597){return __awaiter$8(this,void 0,void 0,function*(){const _0x4c1bc3=this['getUrl'](_0x22c2d9);return yield fetch(_0x4c1bc3,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0x3be597?JSON['stringify'](_0x3be597):null});});}['put'](_0x2346bf,_0x5353ca,_0x13ce63){return __awaiter$8(this,void 0,void 0,function*(){const _0x5c921f=this['getUrl'](_0x2346bf);return yield fetch(_0x5c921f,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x5353ca},'body':_0x13ce63?JSON['stringify'](_0x13ce63):null});});}['delete'](_0x38b752,_0x33eb07){return __awaiter$8(this,void 0,void 0,function*(){const _0x548572=this['getUrl'](_0x38b752);return yield fetch(_0x548572,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x33eb07}});});}}
|
|
10
|
+
|
|
11
|
+
var __awaiter$7=undefined&&undefined['__awaiter']||function(_0x34df03,_0x74e2b2,_0x3c278e,_0x45bf87){function _0x1c7c07(_0x448f6d){return _0x448f6d instanceof _0x3c278e?_0x448f6d:new _0x3c278e(function(_0x1f6222){_0x1f6222(_0x448f6d);});}return new(_0x3c278e||(_0x3c278e=Promise))(function(_0x5fdecf,_0x359121){function _0x4384be(_0x363514){try{_0x3721eb(_0x45bf87['next'](_0x363514));}catch(_0x13b886){_0x359121(_0x13b886);}}function _0x50e6d7(_0x52ac2b){try{_0x3721eb(_0x45bf87['throw'](_0x52ac2b));}catch(_0x58c26b){_0x359121(_0x58c26b);}}function _0x3721eb(_0x338911){_0x338911['done']?_0x5fdecf(_0x338911['value']):_0x1c7c07(_0x338911['value'])['then'](_0x4384be,_0x50e6d7);}_0x3721eb((_0x45bf87=_0x45bf87['apply'](_0x34df03,_0x74e2b2||[]))['next']());});};class SearchServersService{constructor(_0x6a0f5c){this['fetch']=_0x6a0f5c,this['path']='search-service';}['create'](_0x2b188a,_0x29347f,_0xb3a894,_0xb27a01,_0x221e3a,_0x369125,_0x477ef,_0x4b46d7){return __awaiter$7(this,void 0,void 0,function*(){const _0x1397c1={'account_name':_0x2b188a,'search_service_name':_0x29347f,'endpoint':_0xb3a894,'key':_0xb27a01,'country':_0x221e3a,'provider':_0x369125,'index_name':_0x477ef};try{const _0x1dc3b1=yield this['fetch']['post'](this['path'],_0x4b46d7,_0x1397c1);if(_0x1dc3b1['status']>0xc7&&_0x1dc3b1['status']<0x12c){const _0x3f2692=yield _0x1dc3b1['json']();return new SuccessfulSearchServiceResponse(_0x3f2692);}const _0x1514a1=yield _0x1dc3b1['json']();return new FailedSearchServiceResponse(_0x1514a1);}catch(_0x26b126){if(_0x26b126 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x26b126['message'],'title':_0x26b126['name'],'status':0x1f4,'instance':'','type':''});throw _0x26b126;}});}['delete'](_0x5258e4,_0x26aa66,_0x27aa51){return __awaiter$7(this,void 0,void 0,function*(){const _0xa02ae1=this['path']+'/'+_0x5258e4+'/'+_0x26aa66;try{const _0x47e372=yield this['fetch']['delete'](_0xa02ae1,_0x27aa51);if(_0x47e372['status']>0xc7&&_0x47e372['status']<0x12c)return new SuccessfulResponse({});const _0x1b084a=yield _0x47e372['json']();return new FailedResponse(_0x1b084a);}catch(_0x4bae9f){if(_0x4bae9f instanceof Error)return new FailedResponse({'detail':_0x4bae9f['message'],'title':_0x4bae9f['name'],'status':0x1f4,'instance':'','type':''});throw _0x4bae9f;}});}['view'](_0x2241d1,_0xb9feec,_0x5c5210){return __awaiter$7(this,void 0,void 0,function*(){const _0x368296=this['path']+'/'+_0x2241d1+'/'+_0xb9feec;try{const _0x357c5c=yield this['fetch']['get'](_0x368296,_0x5c5210);if(_0x357c5c['status']>0xc7&&_0x357c5c['status']<0x12c){const _0x24466f=yield _0x357c5c['json']();return new SuccessfulViewSearchServiceResponse(_0x24466f);}const _0x306164=yield _0x357c5c['json']();return new FailedViewSearchServiceResponse(_0x306164);}catch(_0x4a48fc){if(_0x4a48fc instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x4a48fc['message'],'title':_0x4a48fc['name'],'status':0x1f4,'instance':'','type':''});throw _0x4a48fc;}});}['edit'](_0x4e2b80,_0x573f4c,_0x4f0e91,_0x3862dc,_0x12f8d5){return __awaiter$7(this,void 0,void 0,function*(){const _0x365717={'account_name':_0x4e2b80,'search_service_name':_0x573f4c,'key':_0x4f0e91,'country':_0x3862dc};try{const _0x47cfeb=yield this['fetch']['put'](this['path'],_0x12f8d5,_0x365717);if(_0x47cfeb['status']>0xc7&&_0x47cfeb['status']<0x12c){const _0x330859=yield _0x47cfeb['json']();return new SuccessfulSearchServiceResponse(_0x330859);}const _0x480768=yield _0x47cfeb['json']();return new FailedSearchServiceResponse(_0x480768);}catch(_0x44b658){if(_0x44b658 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x44b658['message'],'title':_0x44b658['name'],'status':0x1f4,'instance':'','type':''});throw _0x44b658;}});}['list'](_0x3997a4,_0x7de2d3){return __awaiter$7(this,void 0,void 0,function*(){const _0x2eab91=this['path']+'/'+_0x3997a4;try{const _0x163ef4=yield this['fetch']['get'](_0x2eab91,_0x7de2d3);if(_0x163ef4['status']>0xc7&&_0x163ef4['status']<0x12c){const _0x39b0d0=yield _0x163ef4['json']();return new SuccessfulListSearchServiceResponse(_0x39b0d0);}const _0x4d34ef=yield _0x163ef4['json']();return new FailedViewSearchServicesResponse(_0x4d34ef);}catch(_0x567baa){if(_0x567baa instanceof Error)return new FailedViewSearchServicesResponse({'detail':_0x567baa['message'],'title':_0x567baa['name'],'status':0x1f4,'instance':'','type':''});throw _0x567baa;}});}}
|
|
12
|
+
|
|
13
|
+
var __awaiter$6=undefined&&undefined['__awaiter']||function(_0x48c8d8,_0x23a049,_0x2ee676,_0x4d5c91){function _0x559e78(_0x5a58b1){return _0x5a58b1 instanceof _0x2ee676?_0x5a58b1:new _0x2ee676(function(_0x5abe93){_0x5abe93(_0x5a58b1);});}return new(_0x2ee676||(_0x2ee676=Promise))(function(_0x44eb7d,_0x1f9dcf){function _0x1677b8(_0x154dac){try{_0x42db93(_0x4d5c91['next'](_0x154dac));}catch(_0x157a41){_0x1f9dcf(_0x157a41);}}function _0x57ae20(_0x7b71ce){try{_0x42db93(_0x4d5c91['throw'](_0x7b71ce));}catch(_0x2ce202){_0x1f9dcf(_0x2ce202);}}function _0x42db93(_0x54840e){_0x54840e['done']?_0x44eb7d(_0x54840e['value']):_0x559e78(_0x54840e['value'])['then'](_0x1677b8,_0x57ae20);}_0x42db93((_0x4d5c91=_0x4d5c91['apply'](_0x48c8d8,_0x23a049||[]))['next']());});};class FacetService{constructor(_0x58a43a){this['fetch']=_0x58a43a,this['path']='facet';}['create'](_0x178d3a,_0x356962,_0x35efae,_0x33d8ef){return __awaiter$6(this,void 0,void 0,function*(){const _0x46ac5d={'account_name':_0x178d3a,'list_name':_0x356962,'facet_name':_0x35efae};try{const _0x345deb=yield this['fetch']['post'](this['path'],_0x33d8ef,_0x46ac5d);if(_0x345deb['status']>0xc7&&_0x345deb['status']<0x12c){const _0x491f96=yield _0x345deb['json']();return new SuccessfulFacetResponse(_0x491f96);}const _0x4a92d3=yield _0x345deb['json']();return new FailedFacetResponse(_0x4a92d3);}catch(_0x97d5f7){if(_0x97d5f7 instanceof Error)return new FailedFacetResponse({'detail':_0x97d5f7['message'],'title':_0x97d5f7['name'],'status':0x1f4,'instance':'','type':''});throw _0x97d5f7;}});}['remove'](_0x3f00f0,_0x46a8e7,_0x30b5a4,_0x3fa351){return __awaiter$6(this,void 0,void 0,function*(){const _0x1af248='Facet/'+_0x3f00f0+'/'+_0x46a8e7+'/'+_0x30b5a4,_0x32b083=yield this['fetch']['delete'](_0x1af248,_0x3fa351);try{if(_0x32b083['status']>0xc7&&_0x32b083['status']<0x12c)return new SuccessfulResponse({});const _0x255f87=yield _0x32b083['json']();return new FailedResponse(_0x255f87);}catch(_0x20582e){if(_0x20582e instanceof Error)return new FailedResponse({'detail':_0x20582e['message'],'title':_0x20582e['name'],'status':0x1f4,'instance':'','type':''});throw _0x20582e;}});}['rename'](_0x2a852f,_0x43004c,_0x2a548e,_0x16867f,_0x242780){return __awaiter$6(this,void 0,void 0,function*(){let _0x283a48=this['path']+'/'+_0x2a852f+'/'+_0x43004c;const _0x5343d3={'facet_name':_0x2a548e,'new_facet_name':_0x16867f};try{const _0x34b336=yield this['fetch']['put'](_0x283a48,_0x242780,_0x5343d3);if(_0x34b336['status']>0xc7&&_0x34b336['status']<0x12c){const _0x36f310=yield _0x34b336['json']();return new SuccessfulFacetResponse(_0x36f310);}const _0x811d8f=yield _0x34b336['json']();return new FailedFacetResponse(_0x811d8f);}catch(_0x346385){if(_0x346385 instanceof Error)return new FailedFacetResponse({'detail':_0x346385['message'],'title':_0x346385['name'],'status':0x1f4,'instance':'','type':''});throw _0x346385;}});}['list'](_0x2f9198,_0x179513,_0x1e97f9,_0x419202,_0x1206b9){return __awaiter$6(this,void 0,void 0,function*(){let _0x59e014=this['path']+'/'+_0x2f9198+'/'+_0x179513+'/'+_0x1e97f9+'/'+_0x419202;try{const _0x1d93e8=yield this['fetch']['get'](_0x59e014,_0x1206b9);if(_0x1d93e8['status']>0xc7&&_0x1d93e8['status']<0x12c){const _0x40eb7c=yield _0x1d93e8['json']();return new SuccessfulFacetValueResponse(_0x40eb7c);}const _0x20ddf0=yield _0x1d93e8['json']();return new FailedFacetValuesResponse(_0x20ddf0);}catch(_0x8adbcc){if(_0x8adbcc instanceof Error)return new FailedFacetValuesResponse({'detail':_0x8adbcc['message'],'title':_0x8adbcc['name'],'status':0x1f4,'instance':'','type':''});throw _0x8adbcc;}});}}
|
|
14
|
+
|
|
15
|
+
var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x45274f,_0x39421e,_0x3aaf6d,_0x2327dc){function _0x4fc68c(_0x535412){return _0x535412 instanceof _0x3aaf6d?_0x535412:new _0x3aaf6d(function(_0x302e4c){_0x302e4c(_0x535412);});}return new(_0x3aaf6d||(_0x3aaf6d=Promise))(function(_0x34225e,_0x103114){function _0x43cc16(_0x16d5fd){try{_0x320771(_0x2327dc['next'](_0x16d5fd));}catch(_0x2a373){_0x103114(_0x2a373);}}function _0x557a24(_0x191824){try{_0x320771(_0x2327dc['throw'](_0x191824));}catch(_0x31e81c){_0x103114(_0x31e81c);}}function _0x320771(_0x4729e8){_0x4729e8['done']?_0x34225e(_0x4729e8['value']):_0x4fc68c(_0x4729e8['value'])['then'](_0x43cc16,_0x557a24);}_0x320771((_0x2327dc=_0x2327dc['apply'](_0x45274f,_0x39421e||[]))['next']());});};class SearchResultService{constructor(_0x1d2cd4){this['fetch']=_0x1d2cd4,this['path']='search-result',this['isRealNumber']=_0x274620=>_0x274620!=undefined&&typeof _0x274620==='number'&&Number['isFinite'](_0x274620);}['create'](_0x3c3c00,_0x402e11,_0x32fb35,_0x105c24,_0x274bb1){return __awaiter$5(this,void 0,void 0,function*(){const _0x105264=Object['assign']({'account_name':_0x3c3c00,'search_result_name':_0x32fb35,'list_name':_0x402e11},_0x274bb1);try{const _0x2ae80b=yield this['fetch']['post'](this['path'],_0x105c24,_0x105264);if(_0x2ae80b['status']>0xc7&&_0x2ae80b['status']<0x12c){const _0x3e8803=yield _0x2ae80b['json']();return new SuccessfulSearchResultResponse(_0x3e8803);}const _0x4230e8=yield _0x2ae80b['json']();return new FailedSearchResultResponse(_0x4230e8);}catch(_0x941d1a){if(_0x941d1a instanceof Error)return new FailedSearchResultResponse({'detail':_0x941d1a['message'],'title':_0x941d1a['name'],'status':0x1f4,'instance':'','type':''});throw _0x941d1a;}});}['list'](_0x4bfe9a,_0x499fb6,_0x26bc5d,_0x1f54cf){return __awaiter$5(this,void 0,void 0,function*(){let _0x19cdf4=this['path']+'/'+_0x4bfe9a+'/'+_0x499fb6+'?'+this['getQueryStr'](_0x1f54cf);try{const _0x3d9404=yield this['fetch']['get'](_0x19cdf4,_0x26bc5d);if(_0x3d9404['status']>0xc7&&_0x3d9404['status']<0x12c){const _0x2ec959=yield _0x3d9404['json']();return new SuccessfulListSearchResultResponse(_0x2ec959);}const _0x696376=yield _0x3d9404['json']();return new FailedViewSearchResultResponse(_0x696376);}catch(_0xea6d9f){if(_0xea6d9f instanceof Error)return new FailedViewSearchResultResponse({'detail':_0xea6d9f['message'],'title':_0xea6d9f['name'],'status':0x1f4,'instance':'','type':''});throw _0xea6d9f;}});}['get'](_0x40b0a3,_0xbfe6b0,_0x55f858,_0x4e3693){return __awaiter$5(this,void 0,void 0,function*(){let _0x4f9dfe=this['path']+'/'+_0x40b0a3+'/'+_0xbfe6b0+'?'+_0x55f858;try{const _0x174e38=yield this['fetch']['get'](_0x4f9dfe,_0x4e3693);if(_0x174e38['status']>0xc7&&_0x174e38['status']<0x12c){const _0x329c9c=yield _0x174e38['json']();return new SuccessfulSearchResultResponse(_0x329c9c);}const _0x56a4ae=yield _0x174e38['json']();return new FailedSearchResultResponse(_0x56a4ae);}catch(_0x1936b3){if(_0x1936b3 instanceof Error)return new FailedSearchResultResponse({'detail':_0x1936b3['message'],'title':_0x1936b3['name'],'status':0x1f4,'instance':'','type':''});throw _0x1936b3;}});}['delete'](_0x34e6bb,_0x39ddaa,_0x247dd6,_0x58d324){return __awaiter$5(this,void 0,void 0,function*(){const _0x34aee0=this['path']+'/'+_0x34e6bb+'/'+_0x39ddaa+'/'+_0x247dd6,_0x3a4c6e=yield this['fetch']['delete'](_0x34aee0,_0x58d324);try{if(_0x3a4c6e['status']>0xc7&&_0x3a4c6e['status']<0x12c)return new SuccessfulResponse({});const _0xea369b=yield _0x3a4c6e['json']();return new FailedResponse(_0xea369b);}catch(_0xcc2b3d){if(_0xcc2b3d instanceof Error)return new FailedResponse({'detail':_0xcc2b3d['message'],'title':_0xcc2b3d['name'],'status':0x1f4,'instance':'','type':''});throw _0xcc2b3d;}});}['upload'](_0x48a5c0,_0x3e35cd,_0xd06076,_0xdf5c68){return __awaiter$5(this,void 0,void 0,function*(){const _0x35331e=this['path']+'/'+_0x48a5c0+'/'+_0x3e35cd+'/upload',_0x4527c8=new FormData();_0x4527c8['append']('file',_0xd06076);try{const _0x1167a5=yield this['fetch']['upload'](_0x35331e,_0xdf5c68,_0x4527c8);if(_0x1167a5['status']>0xc7&&_0x1167a5['status']<0x12c)return new SuccessfulResponse({});const _0x3ccda5=yield _0x1167a5['json']();return new FailedResponse(_0x3ccda5);}catch(_0x87b738){if(_0x87b738 instanceof Error)return new FailedResponse({'detail':_0x87b738['message'],'title':_0x87b738['name'],'status':0x1f4,'instance':'','type':''});throw _0x87b738;}});}['edit'](_0x10acf6,_0x1b2520,_0x2334ad,_0x346acc,_0x4c5a65){return __awaiter$5(this,void 0,void 0,function*(){const _0x3908e6=this['path']+'/'+_0x10acf6+'/'+_0x1b2520+'/'+_0x2334ad;try{const _0x3a032b=yield this['fetch']['put'](_0x3908e6,_0x346acc,_0x4c5a65);if(_0x3a032b['status']>0xc7&&_0x3a032b['status']<0x12c){const _0x4fa5ea=yield _0x3a032b['json']();return new SuccessfulSearchResultResponse(_0x4fa5ea);}const _0xfef94a=yield _0x3a032b['json']();return new FailedSearchResultResponse(_0xfef94a);}catch(_0x34566c){if(_0x34566c instanceof Error)return new FailedSearchResultResponse({'detail':_0x34566c['message'],'title':_0x34566c['name'],'status':0x1f4,'instance':'','type':''});throw _0x34566c;}});}['getQueryStr'](_0x500813){let _0x1741d8='';const _0xa640e1=[];(_0x500813===null||_0x500813===void 0?void 0:_0x500813['size'])&&_0xa640e1['push']('size='+_0x500813['size']);(_0x500813===null||_0x500813===void 0?void 0:_0x500813['skip'])&&_0xa640e1['push']('skip='+_0x500813['skip']);(_0x500813===null||_0x500813===void 0?void 0:_0x500813['query'])&&_0xa640e1['push']('query='+_0x500813['query']);(_0x500813===null||_0x500813===void 0?void 0:_0x500813['filter'])&&_0xa640e1['push']('filter='+_0x500813['filter']);if((_0x500813===null||_0x500813===void 0?void 0:_0x500813['radius'])&&this['isRealNumber'](_0x500813['radius']['latitude'])&&this['isRealNumber'](_0x500813['radius']['longitude'])&&this['isRealNumber'](_0x500813['radius']['distance_in_km'])){const _0x56f381=_0x500813['radius']['latitude']+','+_0x500813['radius']['longitude']+','+_0x500813['radius']['distance_in_km'];_0xa640e1['push']('radius='+_0x56f381);}return _0x500813['active']===![]&&_0xa640e1['push']('active='+_0x500813['active']),_0xa640e1['length']>0x0&&_0xa640e1['forEach']((_0x23424c,_0xdabfad)=>{if(_0xdabfad>0x0&&_0x1741d8)_0x1741d8+='&';_0x1741d8+=_0x23424c;}),_0x1741d8;}}
|
|
16
|
+
|
|
17
|
+
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x52eb30,_0x3e238d,_0x1ead1e,_0xd0523e){function _0x583110(_0x38bf40){return _0x38bf40 instanceof _0x1ead1e?_0x38bf40:new _0x1ead1e(function(_0x3a516f){_0x3a516f(_0x38bf40);});}return new(_0x1ead1e||(_0x1ead1e=Promise))(function(_0x3cf0ee,_0x1f7817){function _0x7c1349(_0x37391d){try{_0xc0d3ba(_0xd0523e['next'](_0x37391d));}catch(_0x51e8ea){_0x1f7817(_0x51e8ea);}}function _0x5ae085(_0x13014e){try{_0xc0d3ba(_0xd0523e['throw'](_0x13014e));}catch(_0x141e54){_0x1f7817(_0x141e54);}}function _0xc0d3ba(_0x5cf3b1){_0x5cf3b1['done']?_0x3cf0ee(_0x5cf3b1['value']):_0x583110(_0x5cf3b1['value'])['then'](_0x7c1349,_0x5ae085);}_0xc0d3ba((_0xd0523e=_0xd0523e['apply'](_0x52eb30,_0x3e238d||[]))['next']());});};class ContributorService{constructor(_0x285e6a){this['fetch']=_0x285e6a,this['path']='contributor';}['create'](_0x38441d,_0x546b8e,_0x379bda,_0x1c34a7){return __awaiter$4(this,void 0,void 0,function*(){const _0x2ce755={'account_name':_0x38441d,'list_name':_0x546b8e,'contributor_name':_0x379bda};try{const _0x409367=yield this['fetch']['post'](this['path'],_0x1c34a7,_0x2ce755);if(_0x409367['status']>0xc7&&_0x409367['status']<0x12c){const _0x403032=yield _0x409367['json']();return new SuccessfulContributorResponse(_0x403032);}const _0x28851a=yield _0x409367['json']();return new FailedContributorResponse(_0x28851a);}catch(_0x3efb1e){if(_0x3efb1e instanceof Error)return new FailedContributorResponse({'detail':_0x3efb1e['message'],'title':_0x3efb1e['name'],'status':0x1f4,'instance':'','type':''});throw _0x3efb1e;}});}['remove'](_0x3df7a3,_0x72963c,_0x222a1e,_0x460db8){return __awaiter$4(this,void 0,void 0,function*(){const _0x112bee=this['path']+'/'+_0x3df7a3+'/'+_0x72963c+'/'+_0x222a1e,_0x4ca013=yield this['fetch']['delete'](_0x112bee,_0x460db8);try{if(_0x4ca013['status']>0xc7&&_0x4ca013['status']<0x12c)return new SuccessfulResponse({});const _0x36d01b=yield _0x4ca013['json']();return new FailedResponse(_0x36d01b);}catch(_0x5bd2e1){if(_0x5bd2e1 instanceof Error)return new FailedResponse({'detail':_0x5bd2e1['message'],'title':_0x5bd2e1['name'],'status':0x1f4,'instance':'','type':''});throw _0x5bd2e1;}});}['startsWith'](_0x5ed8ca,_0x3a1484){return __awaiter$4(this,void 0,void 0,function*(){const _0xaa2f54=this['path']+'/'+_0x5ed8ca;try{const _0x159b11=yield this['fetch']['get'](_0xaa2f54,_0x3a1484);if(_0x159b11['status']>0xc7&&_0x159b11['status']<0x12c){const _0x2c19fb=yield _0x159b11['json']();return new SuccessfulAccountAndImageResponse(_0x2c19fb);}const _0xcf709b=yield _0x159b11['json']();return new FailedAccountAndImageResponse(_0xcf709b);}catch(_0x134598){if(_0x134598 instanceof Error)return new FailedAccountAndImageResponse({'detail':_0x134598['message'],'title':_0x134598['name'],'status':0x1f4,'instance':'','type':''});throw _0x134598;}});}}
|
|
18
|
+
|
|
19
|
+
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0xd44479,_0x35198c,_0x4026e9,_0xcfa72a){function _0x2ccafa(_0x347cd0){return _0x347cd0 instanceof _0x4026e9?_0x347cd0:new _0x4026e9(function(_0xfc3c16){_0xfc3c16(_0x347cd0);});}return new(_0x4026e9||(_0x4026e9=Promise))(function(_0x25e7dd,_0x1cd2d2){function _0x1c4cb1(_0x8f233b){try{_0x184bc6(_0xcfa72a['next'](_0x8f233b));}catch(_0x3786ab){_0x1cd2d2(_0x3786ab);}}function _0x5b8bf3(_0x455f61){try{_0x184bc6(_0xcfa72a['throw'](_0x455f61));}catch(_0x1edda4){_0x1cd2d2(_0x1edda4);}}function _0x184bc6(_0x347463){_0x347463['done']?_0x25e7dd(_0x347463['value']):_0x2ccafa(_0x347463['value'])['then'](_0x1c4cb1,_0x5b8bf3);}_0x184bc6((_0xcfa72a=_0xcfa72a['apply'](_0xd44479,_0x35198c||[]))['next']());});};class SearchableFieldService{constructor(_0x179ee3){this['fetch']=_0x179ee3,this['path']='searchable-field';}['create'](_0xa698d4,_0x2d477a,_0x34523d,_0x37771e){return __awaiter$3(this,void 0,void 0,function*(){const _0x59249e={'account_name':_0xa698d4,'list_name':_0x2d477a,'searchable_field_name':_0x34523d};try{const _0xdcf0d4=yield this['fetch']['post'](this['path'],_0x37771e,_0x59249e);if(_0xdcf0d4['status']>0xc7&&_0xdcf0d4['status']<0x12c){const _0x3ccb40=yield _0xdcf0d4['json']();return new SuccessfulSearchableFieldResponse(_0x3ccb40);}const _0x5e3dbf=yield _0xdcf0d4['json']();return new FailedSearchableFieldResponse(_0x5e3dbf);}catch(_0x2e1d3f){if(_0x2e1d3f instanceof Error)return new FailedSearchableFieldResponse({'detail':_0x2e1d3f['message'],'title':_0x2e1d3f['name'],'status':0x1f4,'instance':'','type':''});throw _0x2e1d3f;}});}['remove'](_0x3e7c86,_0x1cafae,_0x41ce22,_0x5b1346){return __awaiter$3(this,void 0,void 0,function*(){const _0x3ed3bd=this['path']+'/'+_0x3e7c86+'/'+_0x1cafae+'/'+_0x41ce22,_0x64e116=yield this['fetch']['delete'](_0x3ed3bd,_0x5b1346);try{if(_0x64e116['status']>0xc7&&_0x64e116['status']<0x12c)return new SuccessfulResponse({});const _0x4c37f1=yield _0x64e116['json']();return new FailedResponse(_0x4c37f1);}catch(_0x3f24b6){if(_0x3f24b6 instanceof Error)return new FailedResponse({'detail':_0x3f24b6['message'],'title':_0x3f24b6['name'],'status':0x1f4,'instance':'','type':''});throw _0x3f24b6;}});}['rename'](_0x16cdd6,_0x4a57b7,_0x490281,_0x18f961,_0xf6f9a3){return __awaiter$3(this,void 0,void 0,function*(){let _0x1be0ff=this['path']+'/'+_0x16cdd6+'/'+_0x4a57b7;const _0x2d9527={'searchable_field_name':_0x490281,'new_searchable_field_name':_0x18f961};try{const _0x3bbc25=yield this['fetch']['put'](_0x1be0ff,_0xf6f9a3,_0x2d9527);if(_0x3bbc25['status']>0xc7&&_0x3bbc25['status']<0x12c){const _0x4a0d91=yield _0x3bbc25['json']();return new SuccessfulSearchableFieldResponse(_0x4a0d91);}const _0x1070a9=yield _0x3bbc25['json']();return new FailedSearchableFieldResponse(_0x1070a9);}catch(_0x4aaff0){if(_0x4aaff0 instanceof Error)return new FailedSearchableFieldResponse({'detail':_0x4aaff0['message'],'title':_0x4aaff0['name'],'status':0x1f4,'instance':'','type':''});throw _0x4aaff0;}});}}
|
|
20
|
+
|
|
21
|
+
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x2404f9,_0x3c2e61,_0xcfdbc3,_0x3c9dc7){function _0x531cb0(_0x2b4a81){return _0x2b4a81 instanceof _0xcfdbc3?_0x2b4a81:new _0xcfdbc3(function(_0x35873f){_0x35873f(_0x2b4a81);});}return new(_0xcfdbc3||(_0xcfdbc3=Promise))(function(_0x58ac2f,_0x4ffa3b){function _0x2d6d65(_0x2d7a0c){try{_0x276427(_0x3c9dc7['next'](_0x2d7a0c));}catch(_0xe93c4c){_0x4ffa3b(_0xe93c4c);}}function _0x144ca3(_0x3a0e2a){try{_0x276427(_0x3c9dc7['throw'](_0x3a0e2a));}catch(_0xe65a3d){_0x4ffa3b(_0xe65a3d);}}function _0x276427(_0x1119d5){_0x1119d5['done']?_0x58ac2f(_0x1119d5['value']):_0x531cb0(_0x1119d5['value'])['then'](_0x2d6d65,_0x144ca3);}_0x276427((_0x3c9dc7=_0x3c9dc7['apply'](_0x2404f9,_0x3c2e61||[]))['next']());});};class ResourceService{constructor(_0x14aaea){this['fetch']=_0x14aaea,this['path']='resource';}['create'](_0x1296bb,_0x35fce8,_0x4e6b4c,_0x119fa3){return __awaiter$2(this,void 0,void 0,function*(){const _0x28d86a={'account_name':_0x1296bb,'list_name':_0x35fce8,'resource_name':_0x4e6b4c};try{const _0x5df37d=yield this['fetch']['post'](this['path'],_0x119fa3,_0x28d86a);if(_0x5df37d['status']>0xc7&&_0x5df37d['status']<0x12c){const _0x4f50d2=yield _0x5df37d['json']();return new SuccessfulResourceResponse(_0x4f50d2);}const _0xf5b489=yield _0x5df37d['json']();return new FailedResourceResponse(_0xf5b489);}catch(_0x6c1d26){if(_0x6c1d26 instanceof Error)return new FailedResourceResponse({'detail':_0x6c1d26['message'],'title':_0x6c1d26['name'],'status':0x1f4,'instance':'','type':''});throw _0x6c1d26;}});}['remove'](_0x11aea5,_0x2676d3,_0x1e5aa9,_0x48bae2){return __awaiter$2(this,void 0,void 0,function*(){const _0x5c29d3=this['path']+'/'+_0x11aea5+'/'+_0x2676d3+'/'+_0x1e5aa9,_0x481865=yield this['fetch']['delete'](_0x5c29d3,_0x48bae2);try{if(_0x481865['status']>0xc7&&_0x481865['status']<0x12c)return new SuccessfulResponse({});const _0x4a113c=yield _0x481865['json']();return new FailedResponse(_0x4a113c);}catch(_0x27cddb){if(_0x27cddb instanceof Error)return new FailedResponse({'detail':_0x27cddb['message'],'title':_0x27cddb['name'],'status':0x1f4,'instance':'','type':''});throw _0x27cddb;}});}['rename'](_0x80a5b5,_0x505ee8,_0x3b84f2,_0x107683,_0x354180){return __awaiter$2(this,void 0,void 0,function*(){let _0x48431e=this['path']+'/'+_0x80a5b5+'/'+_0x505ee8;const _0x20f946={'resource_name':_0x3b84f2,'new_resource_name':_0x107683};try{const _0x2739c8=yield this['fetch']['put'](_0x48431e,_0x354180,_0x20f946);if(_0x2739c8['status']>0xc7&&_0x2739c8['status']<0x12c){const _0x29f75a=yield _0x2739c8['json']();return new SuccessfulResourceResponse(_0x29f75a);}const _0x1d5ba3=yield _0x2739c8['json']();return new FailedResourceResponse(_0x1d5ba3);}catch(_0x25d87d){if(_0x25d87d instanceof Error)return new FailedResourceResponse({'detail':_0x25d87d['message'],'title':_0x25d87d['name'],'status':0x1f4,'instance':'','type':''});throw _0x25d87d;}});}}
|
|
22
|
+
|
|
23
|
+
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x1f1c2a,_0x451985,_0x4ab513,_0x3e1387){function _0x1c5385(_0x59ba69){return _0x59ba69 instanceof _0x4ab513?_0x59ba69:new _0x4ab513(function(_0x2c225e){_0x2c225e(_0x59ba69);});}return new(_0x4ab513||(_0x4ab513=Promise))(function(_0x40041e,_0x2aabdc){function _0x32907d(_0x32654d){try{_0x582a56(_0x3e1387['next'](_0x32654d));}catch(_0x2dd6d9){_0x2aabdc(_0x2dd6d9);}}function _0x211b44(_0xf892d6){try{_0x582a56(_0x3e1387['throw'](_0xf892d6));}catch(_0x45a627){_0x2aabdc(_0x45a627);}}function _0x582a56(_0x366460){_0x366460['done']?_0x40041e(_0x366460['value']):_0x1c5385(_0x366460['value'])['then'](_0x32907d,_0x211b44);}_0x582a56((_0x3e1387=_0x3e1387['apply'](_0x1f1c2a,_0x451985||[]))['next']());});};class GroupService{constructor(_0x3a26a9){this['fetch']=_0x3a26a9,this['path']='group',this['List']=new GroupListService(_0x3a26a9);}['create'](_0x4fd190,_0x5b9820,_0x50990a,_0x2a96a2){return __awaiter$1(this,void 0,void 0,function*(){const _0x36f29f={'account_name':_0x4fd190,'search_service_name':_0x5b9820,'group_name':_0x50990a};try{const _0x22a956=yield this['fetch']['post'](this['path'],_0x2a96a2,_0x36f29f);if(_0x22a956['status']>0xc7&&_0x22a956['status']<0x12c){const _0x55f183=yield _0x22a956['json']();return new SuccessfulGroupResponse(_0x55f183);}const _0x29e811=yield _0x22a956['json']();return new FailedGroupResponse(_0x29e811);}catch(_0x1d0952){if(_0x1d0952 instanceof Error)return new FailedGroupResponse({'detail':_0x1d0952['message'],'title':_0x1d0952['name'],'status':0x1f4,'instance':'','type':''});throw _0x1d0952;}});}['delete'](_0x1a6359,_0xf75245,_0x202468){return __awaiter$1(this,void 0,void 0,function*(){const _0x1e0a0e=this['path']+'/'+_0x1a6359+'/'+_0xf75245,_0x5bfadd=yield this['fetch']['delete'](_0x1e0a0e,_0x202468);try{if(_0x5bfadd['status']>0xc7&&_0x5bfadd['status']<0x12c)return new SuccessfulResponse({});const _0x1874b1=yield _0x5bfadd['json']();return new FailedResponse(_0x1874b1);}catch(_0x12cd06){if(_0x12cd06 instanceof Error)return new FailedResponse({'detail':_0x12cd06['message'],'title':_0x12cd06['name'],'status':0x1f4,'instance':'','type':''});throw _0x12cd06;}});}}class GroupListService{constructor(_0xbad1e8){this['fetch']=_0xbad1e8,this['path']='group/list';}['add'](_0x3fe768,_0x196814,_0x5ceac2,_0xfe4ee2,_0x3eb447){return __awaiter$1(this,void 0,void 0,function*(){const _0x57ff43={'list_name':_0x5ceac2,'version':_0xfe4ee2};try{const _0x40cc83=yield this['fetch']['put'](this['path']+'/'+_0x3fe768+'/'+_0x196814,_0x3eb447,_0x57ff43);if(_0x40cc83['status']>0xc7&&_0x40cc83['status']<0x12c){const _0x40f959=yield _0x40cc83['json']();return new SuccessfulListIdentityResponse(_0x40f959);}const _0x1cff5f=yield _0x40cc83['json']();return new FailedListIdentityResponse(_0x1cff5f);}catch(_0x36136a){if(_0x36136a instanceof Error)return new FailedListIdentityResponse({'detail':_0x36136a['message'],'title':_0x36136a['name'],'status':0x1f4,'instance':'','type':''});throw _0x36136a;}});}['remove'](_0x14f1a9,_0x2495d3,_0x325330,_0x544e36){return __awaiter$1(this,void 0,void 0,function*(){const _0x44df5f=this['path']+'/'+_0x14f1a9+'/'+_0x2495d3+'/'+_0x325330,_0x4afd25=yield this['fetch']['delete'](_0x44df5f,_0x544e36);try{if(_0x4afd25['status']>0xc7&&_0x4afd25['status']<0x12c){const _0x5e57f0=yield _0x4afd25['json']();return new SuccessfulGroupResponse(_0x5e57f0);}const _0x36eae1=yield _0x4afd25['json']();return new FailedGroupResponse(_0x36eae1);}catch(_0x2df1cf){if(_0x2df1cf instanceof Error)return new FailedGroupResponse({'detail':_0x2df1cf['message'],'title':_0x2df1cf['name'],'status':0x1f4,'instance':'','type':''});throw _0x2df1cf;}});}}
|
|
24
|
+
|
|
25
|
+
var __awaiter=undefined&&undefined['__awaiter']||function(_0x3f8e09,_0x420dfc,_0x17810a,_0x50bad4){function _0x12ed65(_0x337b2c){return _0x337b2c instanceof _0x17810a?_0x337b2c:new _0x17810a(function(_0x210f6f){_0x210f6f(_0x337b2c);});}return new(_0x17810a||(_0x17810a=Promise))(function(_0xbdbaab,_0x157e76){function _0x212974(_0x38b5a6){try{_0x1feab7(_0x50bad4['next'](_0x38b5a6));}catch(_0x1d901e){_0x157e76(_0x1d901e);}}function _0xa8beed(_0x1a5e1c){try{_0x1feab7(_0x50bad4['throw'](_0x1a5e1c));}catch(_0x1710a){_0x157e76(_0x1710a);}}function _0x1feab7(_0xbffc6d){_0xbffc6d['done']?_0xbdbaab(_0xbffc6d['value']):_0x12ed65(_0xbffc6d['value'])['then'](_0x212974,_0xa8beed);}_0x1feab7((_0x50bad4=_0x50bad4['apply'](_0x3f8e09,_0x420dfc||[]))['next']());});};class AdminClient{constructor(_0x5bead8='https://admin.searchability.dev/'){var _0x1fcf32=new Fetch(_0x5bead8);this['Accounts']=new AccountService(_0x1fcf32),this['Lists']=new ListService(_0x1fcf32),this['ApiKeys']=new ApiKeyService(_0x1fcf32),this['SearchServers']=new SearchServersService(_0x1fcf32),this['Facets']=new FacetService(_0x1fcf32),this['SearchResults']=new SearchResultService(_0x1fcf32),this['Contributors']=new ContributorService(_0x1fcf32),this['SearchableFields']=new SearchableFieldService(_0x1fcf32),this['Groups']=new GroupService(_0x1fcf32),this['Resources']=new ResourceService(_0x1fcf32);}}class AuthClient{constructor(_0x3a0176='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x3a0176);}['login'](_0x59e54b){return __awaiter(this,void 0,void 0,function*(){const _0x24abac='login/'+_0x59e54b;try{const _0xe28969=yield yield fetch(_0x24abac);if(_0xe28969['status']>0xc7&&_0xe28969['status']<0x12c){const _0x59eea2=yield _0xe28969['json']();return new SuccessfulAuthResponse(_0x59eea2);}const _0xb3ff2a=yield _0xe28969['json']();return new FailedAuthResponse(_0xb3ff2a);}catch(_0x5a5b24){if(_0x5a5b24 instanceof Error)return new FailedAuthResponse({'detail':_0x5a5b24['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x5a5b24;}});}['refresh'](_0x32c449){return __awaiter(this,void 0,void 0,function*(){const _0x4a57f6='refresh',_0x130dec={'refresh_token':_0x32c449};try{const _0x29f974=yield this['fetch']['PostNoAuth'](_0x4a57f6,_0x130dec);if(_0x29f974['status']>0xc7&&_0x29f974['status']<0x12c){const _0x564211=yield _0x29f974['json']();return new SuccessfulAuthResponse(_0x564211);}const _0x59f062=yield _0x29f974['json']();return new FailedAuthResponse(_0x59f062);}catch(_0x32c73c){if(_0x32c73c instanceof Error)return new FailedAuthResponse({'detail':_0x32c73c['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x32c73c;}});}['getTokenStatus'](_0x148e3d){if(Date['now']()<_0x148e3d['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x148e3d['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
|
|
26
|
+
|
|
27
|
+
export { AdminClient, AuthClient, TokenStatus, Tokens };
|