@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.
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
var TokenStatus;(function(_0x2697f3){_0x2697f3[_0x2697f3['Ok']=0x0]='Ok',_0x2697f3[_0x2697f3['Refresh']=0x1]='Refresh',_0x2697f3[_0x2697f3['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(_0x158623){this['isSuccess']=_0x158623;}}class SuccessfulFacetValueResponse extends Response{constructor(_0x18234f){super(!![]),this['facets']=_0x18234f;}['toSuccess'](){return this['facets'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetValuesResponse extends Response{constructor(_0x5b03e4){super(![]),this['problem']=_0x5b03e4;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulContributorResponse extends Response{constructor(_0x2bdeb5){super(!![]),this['contributor']=_0x2bdeb5;}['toSuccess'](){return this['contributor'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedContributorResponse extends Response{constructor(_0x2b9a08){super(![]),this['problem']=_0x2b9a08;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountAndImageResponse extends Response{constructor(_0x4ec0c7){super(!![]),this['accountAndImages']=_0x4ec0c7;}['toSuccess'](){return this['accountAndImages'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountAndImageResponse extends Response{constructor(_0xab28e1){super(![]),this['problem']=_0xab28e1;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulResourceResponse extends Response{constructor(_0x30288f){super(!![]),this['resource']=_0x30288f;}['toSuccess'](){return this['resource'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResourceResponse extends Response{constructor(_0x452f56){super(![]),this['problem']=_0x452f56;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulFacetResponse extends Response{constructor(_0x30d735){super(!![]),this['facet']=_0x30d735;}['toSuccess'](){return this['facet'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetResponse extends Response{constructor(_0x13ac16){super(![]),this['problem']=_0x13ac16;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedSearchableFieldResponse extends Response{constructor(_0x1856e7){super(![]),this['problem']=_0x1856e7;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchableFieldResponse extends Response{constructor(_0xcf2fc8){super(!![]),this['searchable_field']=_0xcf2fc8;}['toSuccess'](){return this['searchable_field'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountResponse extends Response{constructor(_0x533295){super(!![]),this['account']=_0x533295;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountImageResponse extends Response{constructor(_0xc8526b){super(!![]),this['accountImage']=_0xc8526b;}['toSuccess'](){return this['accountImage'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListIdentityResponse extends Response{constructor(_0x22b1e5){super(!![]),this['list']=_0x22b1e5;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulGroupResponse extends Response{constructor(_0x307fcc){super(!![]),this['group']=_0x307fcc;}['toSuccess'](){return this['group'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedGroupResponse extends Response{constructor(_0x5ac39c){super(![]),this['problem']=_0x5ac39c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListResponse extends Response{constructor(_0x550cc4){super(!![]),this['list']=_0x550cc4;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedListResponse extends Response{constructor(_0x33dd52){super(![]),this['problem']=_0x33dd52;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountResponse extends Response{constructor(_0x517d75){super(![]),this['problem']=_0x517d75;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountImageResponse extends Response{constructor(_0x39fdda){super(![]),this['problem']=_0x39fdda;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListIdentityResponse extends Response{constructor(_0x12f9b5){super(![]),this['problem']=_0x12f9b5;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x39c3f6){super(!![]),this['tokens']=_0x39c3f6;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x2b5f5){super(![]),this['problem']=_0x2b5f5;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x2fdc6f){super(!![]),this['apiKey']=_0x2fdc6f;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x2ef7bc){super(![]),this['problem']=_0x2ef7bc;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0xddf19c){super(!![]),this['searchService']=_0xddf19c;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x3f7d85){super(![]),this['problem']=_0x3f7d85;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x4ea6ac){super(!![]),this['searchService']=_0x4ea6ac;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulSearchResultResponse extends Response{constructor(_0x14cb20){super(!![]),this['searchResult']=_0x14cb20;}['toSuccess'](){return this['searchResult'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchResultResponse extends Response{constructor(_0x41933d){super(![]),this['problem']=_0x41933d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchResultResponse extends Response{constructor(_0x2f49f3){super(!![]),this['searchResults']=_0x2f49f3;}['toSuccess'](){return this['searchResults'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchResultResponse extends Response{constructor(_0x6b9100){super(![]),this['problem']=_0x6b9100;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchServiceResponse extends Response{constructor(_0x3554c9){super(!![]),this['searchServices']=_0x3554c9;}['toSuccess'](){return this['searchServices'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServicesResponse extends Response{constructor(_0x21702f){super(![]),this['problem']=_0x21702f;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedViewSearchServiceResponse extends Response{constructor(_0x578dd5){super(![]),this['problem']=_0x578dd5;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x2343f7){super(!![]),this['apiKeyValue']=_0x2343f7;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x2d35dd){super(!![]),this['obj']=_0x2d35dd;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x25629f){super(![]),this['problem']=_0x25629f;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x34681c){super(![]),this['problem']=_0x34681c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
|
|
2
|
+
|
|
3
|
+
var __awaiter$b=undefined&&undefined['__awaiter']||function(_0x3f02f5,_0x3dda54,_0x59015d,_0x15052){function _0x572d20(_0x3e97ae){return _0x3e97ae instanceof _0x59015d?_0x3e97ae:new _0x59015d(function(_0x1387f4){_0x1387f4(_0x3e97ae);});}return new(_0x59015d||(_0x59015d=Promise))(function(_0x3ef827,_0x29403d){function _0x4fd147(_0xc64866){try{_0x4417be(_0x15052['next'](_0xc64866));}catch(_0x4121a9){_0x29403d(_0x4121a9);}}function _0x599d9f(_0x12150b){try{_0x4417be(_0x15052['throw'](_0x12150b));}catch(_0x3f4efa){_0x29403d(_0x3f4efa);}}function _0x4417be(_0x10f89e){_0x10f89e['done']?_0x3ef827(_0x10f89e['value']):_0x572d20(_0x10f89e['value'])['then'](_0x4fd147,_0x599d9f);}_0x4417be((_0x15052=_0x15052['apply'](_0x3f02f5,_0x3dda54||[]))['next']());});};class AccountService{constructor(_0x53470c){this['fetch']=_0x53470c;}['get'](_0x43b98a,_0x54213e){return __awaiter$b(this,void 0,void 0,function*(){const _0x24e3bc='Account/'+_0x43b98a+'/',_0x5c6a4e=yield this['fetch']['get'](_0x24e3bc,_0x54213e);try{if(_0x5c6a4e['status']>0xc7&&_0x5c6a4e['status']<0x12c){const _0x4f326e=yield _0x5c6a4e['json']();return new SuccessfulAccountResponse(_0x4f326e);}const _0x4afcbc=yield _0x5c6a4e['json']();return new FailedAccountResponse(_0x4afcbc);}catch(_0x427adf){if(_0x427adf instanceof Error)return new FailedAccountResponse({'detail':_0x427adf['message'],'title':_0x427adf['name'],'status':0x1f4,'instance':'','type':''});throw _0x427adf;}});}['getImage'](_0x520286,_0x4f46ac){return __awaiter$b(this,void 0,void 0,function*(){const _0xa60089='account/image/'+_0x520286+'/',_0x2c4650=yield this['fetch']['get'](_0xa60089,_0x4f46ac);try{if(_0x2c4650['status']>0xc7&&_0x2c4650['status']<0x12c){const _0x57b479=yield _0x2c4650['json']();return new SuccessfulAccountImageResponse(_0x57b479);}const _0x426767=yield _0x2c4650['json']();return new FailedAccountImageResponse(_0x426767);}catch(_0x1af79a){if(_0x1af79a instanceof Error)return new FailedAccountImageResponse({'detail':_0x1af79a['message'],'title':_0x1af79a['name'],'status':0x1f4,'instance':'','type':''});throw _0x1af79a;}});}}
|
|
4
|
+
|
|
5
|
+
var __awaiter$a=undefined&&undefined['__awaiter']||function(_0x1f69a2,_0x32d0b1,_0x1a1f66,_0x2e5d5b){function _0x5f0754(_0x1a408e){return _0x1a408e instanceof _0x1a1f66?_0x1a408e:new _0x1a1f66(function(_0xbfb8f1){_0xbfb8f1(_0x1a408e);});}return new(_0x1a1f66||(_0x1a1f66=Promise))(function(_0x30ef2f,_0x53a72d){function _0x50d682(_0x115b9e){try{_0x369ad1(_0x2e5d5b['next'](_0x115b9e));}catch(_0x29c024){_0x53a72d(_0x29c024);}}function _0x5c692f(_0x5ce952){try{_0x369ad1(_0x2e5d5b['throw'](_0x5ce952));}catch(_0x4834d6){_0x53a72d(_0x4834d6);}}function _0x369ad1(_0x5cb0a0){_0x5cb0a0['done']?_0x30ef2f(_0x5cb0a0['value']):_0x5f0754(_0x5cb0a0['value'])['then'](_0x50d682,_0x5c692f);}_0x369ad1((_0x2e5d5b=_0x2e5d5b['apply'](_0x1f69a2,_0x32d0b1||[]))['next']());});};class ApiKeyService{constructor(_0x43aa31){this['fetch']=_0x43aa31,this['path']='api-key';}['create'](_0x18d903,_0x50791e,_0x4a95df){return __awaiter$a(this,void 0,void 0,function*(){const _0x4e4d11={'account_name':_0x18d903,'api_key_name':_0x50791e};try{const _0x32b2d0=yield this['fetch']['post'](this['path'],_0x4a95df,_0x4e4d11);if(_0x32b2d0['status']>0xc7&&_0x32b2d0['status']<0x12c){const _0x404e9f=yield _0x32b2d0['json']();return new SuccessfulApiKeyResponse(_0x404e9f);}const _0x5e6d35=yield _0x32b2d0['json']();return new FailedApiKeyResponse(_0x5e6d35);}catch(_0x55ea85){if(_0x55ea85 instanceof Error)return new FailedApiKeyResponse({'detail':_0x55ea85['message'],'title':_0x55ea85['name'],'status':0x1f4,'instance':'','type':''});throw _0x55ea85;}});}['view'](_0x32c597,_0x52afb0,_0x38bd73){return __awaiter$a(this,void 0,void 0,function*(){const _0x4b5b2f=this['path']+'/'+_0x32c597+'/'+_0x52afb0;try{const _0x5f463e=yield this['fetch']['get'](_0x4b5b2f,_0x38bd73);if(_0x5f463e['status']>0xc7&&_0x5f463e['status']<0x12c){const _0x4932e1=yield _0x5f463e['json']();return new SuccessfulApiKeyValueResponse(_0x4932e1);}const _0xc3c59d=yield _0x5f463e['json']();return new FailedApiKeyValueResponse(_0xc3c59d);}catch(_0x1b3f8c){if(_0x1b3f8c instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x1b3f8c['message'],'title':_0x1b3f8c['name'],'status':0x1f4,'instance':'','type':''});throw _0x1b3f8c;}});}['delete'](_0x49a843,_0x10d289,_0x57a9dd){return __awaiter$a(this,void 0,void 0,function*(){const _0xd825aa=this['path']+'/'+_0x49a843+'/'+_0x10d289;try{const _0x5351c4=yield this['fetch']['delete'](_0xd825aa,_0x57a9dd);if(_0x5351c4['status']>0xc7&&_0x5351c4['status']<0x12c)return new SuccessfulResponse({});const _0x443130=yield _0x5351c4['json']();return new FailedResponse(_0x443130);}catch(_0xadc648){if(_0xadc648 instanceof Error)return new FailedResponse({'detail':_0xadc648['message'],'title':_0xadc648['name'],'status':0x1f4,'instance':'','type':''});throw _0xadc648;}});}}
|
|
6
|
+
|
|
7
|
+
var __awaiter$9=undefined&&undefined['__awaiter']||function(_0xe0d134,_0x5f4a41,_0x1ec48e,_0x5ef65a){function _0x367aa5(_0x5ca6c4){return _0x5ca6c4 instanceof _0x1ec48e?_0x5ca6c4:new _0x1ec48e(function(_0x76fd0b){_0x76fd0b(_0x5ca6c4);});}return new(_0x1ec48e||(_0x1ec48e=Promise))(function(_0x757fda,_0x4ed26d){function _0x3b911a(_0xb01aff){try{_0x5df446(_0x5ef65a['next'](_0xb01aff));}catch(_0x37db78){_0x4ed26d(_0x37db78);}}function _0x28e0d1(_0x5404d1){try{_0x5df446(_0x5ef65a['throw'](_0x5404d1));}catch(_0x2baf60){_0x4ed26d(_0x2baf60);}}function _0x5df446(_0x88d184){_0x88d184['done']?_0x757fda(_0x88d184['value']):_0x367aa5(_0x88d184['value'])['then'](_0x3b911a,_0x28e0d1);}_0x5df446((_0x5ef65a=_0x5ef65a['apply'](_0xe0d134,_0x5f4a41||[]))['next']());});};class ListService{constructor(_0x2a9ca0){this['fetch']=_0x2a9ca0,this['path']='list',this['Coordinates']=new CoordinatesService(_0x2a9ca0),this['GeneratedSuggestions']=new GeneratedSuggestionsService(_0x2a9ca0);}['create'](_0x1c3cc9,_0x54e081,_0x4d927c,_0x21a3f4){return __awaiter$9(this,void 0,void 0,function*(){const _0x449531={'account_name':_0x1c3cc9,'list_name':_0x54e081,'search_service_name':_0x4d927c};try{const _0xf3481b=yield this['fetch']['post'](this['path'],_0x21a3f4,_0x449531);if(_0xf3481b['status']>0xc7&&_0xf3481b['status']<0x12c){const _0x5e782d=yield _0xf3481b['json']();return new SuccessfulListIdentityResponse(_0x5e782d);}const _0x47b77e=yield _0xf3481b['json']();return new FailedListIdentityResponse(_0x47b77e);}catch(_0x420f34){if(_0x420f34 instanceof Error)return new FailedListIdentityResponse({'detail':_0x420f34['message'],'title':_0x420f34['name'],'status':0x1f4,'instance':'','type':''});throw _0x420f34;}});}['delete'](_0x58786c,_0x328213,_0x465969){return __awaiter$9(this,void 0,void 0,function*(){const _0x101ce6=this['path']+'/'+_0x58786c+'/'+_0x328213,_0x39b4cd=yield this['fetch']['delete'](_0x101ce6,_0x465969);try{if(_0x39b4cd['status']>0xc7&&_0x39b4cd['status']<0x12c)return new SuccessfulResponse({});const _0x5d471c=yield _0x39b4cd['json']();return new FailedResponse(_0x5d471c);}catch(_0x119bed){if(_0x119bed instanceof Error)return new FailedResponse({'detail':_0x119bed['message'],'title':_0x119bed['name'],'status':0x1f4,'instance':'','type':''});throw _0x119bed;}});}['get'](_0x25bb03,_0x3021ec,_0xa9704){return __awaiter$9(this,void 0,void 0,function*(){const _0x19a03d=this['path']+'/'+_0x25bb03+'/'+_0x3021ec;try{const _0x1b4858=yield this['fetch']['get'](_0x19a03d,_0xa9704);if(_0x1b4858['status']>0xc7&&_0x1b4858['status']<0x12c){const _0x343251=yield _0x1b4858['json']();return new SuccessfulListResponse(_0x343251);}const _0x1fc3b9=yield _0x1b4858['json']();return new FailedListResponse(_0x1fc3b9);}catch(_0x7f15e0){if(_0x7f15e0 instanceof Error)return new FailedListResponse({'detail':_0x7f15e0['message'],'title':_0x7f15e0['name'],'status':0x1f4,'instance':'','type':''});throw _0x7f15e0;}});}['editSettings'](_0x230469,_0x1c98d0,_0x3eebb7,_0x4b4145){return __awaiter$9(this,void 0,void 0,function*(){const _0x424283=this['path']+'/settings/'+_0x230469+'/'+_0x1c98d0,_0x5a4071=yield this['fetch']['put'](_0x424283,_0x3eebb7,_0x4b4145);try{if(_0x5a4071['status']>0xc7&&_0x5a4071['status']<0x12c){const _0x429d59=yield _0x5a4071['json']();return new SuccessfulListResponse(_0x429d59);}const _0x3e250e=yield _0x5a4071['json']();return new FailedListResponse(_0x3e250e);}catch(_0x3f87fe){if(_0x3f87fe instanceof Error)return new FailedListResponse({'detail':_0x3f87fe['message'],'title':_0x3f87fe['name'],'status':0x1f4,'instance':'','type':''});throw _0x3f87fe;}});}['addCoordinates'](_0x283369,_0x3a5cc8,_0x24e1ef){return __awaiter$9(this,void 0,void 0,function*(){const _0x3beaa9=this['path']+'/coordinates/'+_0x283369+'/'+_0x3a5cc8,_0x20d7c3=yield this['fetch']['post'](_0x3beaa9,_0x24e1ef,{});try{if(_0x20d7c3['status']>0xc7&&_0x20d7c3['status']<0x12c){const _0xe5781c=yield _0x20d7c3['json']();return new SuccessfulListResponse(_0xe5781c);}const _0x250c6b=yield _0x20d7c3['json']();return new FailedListResponse(_0x250c6b);}catch(_0x5ef9ad){if(_0x5ef9ad instanceof Error)return new FailedListResponse({'detail':_0x5ef9ad['message'],'title':_0x5ef9ad['name'],'status':0x1f4,'instance':'','type':''});throw _0x5ef9ad;}});}['removeCoordinates'](_0xbc8c0b,_0x53a818,_0x4ce568){return __awaiter$9(this,void 0,void 0,function*(){const _0x4dcac3=this['path']+'/coordinates/'+_0xbc8c0b+'/'+_0x53a818,_0x4c61bb=yield this['fetch']['delete'](_0x4dcac3,_0x4ce568);try{if(_0x4c61bb['status']>0xc7&&_0x4c61bb['status']<0x12c){const _0xfe5e52=yield _0x4c61bb['json']();return new SuccessfulListResponse(_0xfe5e52);}const _0x2ce1b9=yield _0x4c61bb['json']();return new FailedListResponse(_0x2ce1b9);}catch(_0xe75d5f){if(_0xe75d5f instanceof Error)return new FailedListResponse({'detail':_0xe75d5f['message'],'title':_0xe75d5f['name'],'status':0x1f4,'instance':'','type':''});throw _0xe75d5f;}});}['transfer'](_0x15cbbd,_0x365059,_0x41ab45,_0xd1e695){return __awaiter$9(this,void 0,void 0,function*(){const _0x12af24={'new_search_service_name':_0x41ab45};try{const _0xae3e7a=yield this['fetch']['put'](this['path']+'/transfer/'+_0x15cbbd+'/'+_0x365059,_0xd1e695,_0x12af24);if(_0xae3e7a['status']>0xc7&&_0xae3e7a['status']<0x12c){const _0x5220c7=yield _0xae3e7a['json']();return new SuccessfulListResponse(_0x5220c7);}const _0x14313e=yield _0xae3e7a['json']();return new FailedListResponse(_0x14313e);}catch(_0x62b446){if(_0x62b446 instanceof Error)return new FailedListResponse({'detail':_0x62b446['message'],'title':_0x62b446['name'],'status':0x1f4,'instance':'','type':''});throw _0x62b446;}});}}class CoordinatesService{constructor(_0x583820){this['fetch']=_0x583820,this['path']='list/coordinates';}['add'](_0x89783f,_0x2a9127,_0x585e55){return __awaiter$9(this,void 0,void 0,function*(){const _0x4dfac7=this['path']+'/'+_0x89783f+'/'+_0x2a9127,_0x1d4307=yield this['fetch']['post'](_0x4dfac7,_0x585e55,{});try{if(_0x1d4307['status']>0xc7&&_0x1d4307['status']<0x12c){const _0x4f9c14=yield _0x1d4307['json']();return new SuccessfulListResponse(_0x4f9c14);}const _0x316a67=yield _0x1d4307['json']();return new FailedListResponse(_0x316a67);}catch(_0x59e68a){if(_0x59e68a instanceof Error)return new FailedListResponse({'detail':_0x59e68a['message'],'title':_0x59e68a['name'],'status':0x1f4,'instance':'','type':''});throw _0x59e68a;}});}['remove'](_0x2baa1d,_0x3bb38e,_0x14b2d7){return __awaiter$9(this,void 0,void 0,function*(){const _0x219994=this['path']+'/'+_0x2baa1d+'/'+_0x3bb38e,_0x5d3143=yield this['fetch']['delete'](_0x219994,_0x14b2d7);try{if(_0x5d3143['status']>0xc7&&_0x5d3143['status']<0x12c){const _0x255e74=yield _0x5d3143['json']();return new SuccessfulListResponse(_0x255e74);}const _0x49d355=yield _0x5d3143['json']();return new FailedListResponse(_0x49d355);}catch(_0x88fc32){if(_0x88fc32 instanceof Error)return new FailedListResponse({'detail':_0x88fc32['message'],'title':_0x88fc32['name'],'status':0x1f4,'instance':'','type':''});throw _0x88fc32;}});}}class GeneratedSuggestionsService{constructor(_0x499799){this['fetch']=_0x499799,this['path']='list/generated-suggestions';}['add'](_0x282bad,_0x362db7,_0x5428ac,_0x1063f4,_0x413f84,_0x56e4e0,_0x5ba4a4){return __awaiter$9(this,void 0,void 0,function*(){const _0x347c44=this['path']+'/'+_0x282bad+'/'+_0x362db7,_0x457910=yield this['fetch']['post'](_0x347c44,_0x5ba4a4,{'target_list_name':_0x5428ac,'minimum_result_count':_0x1063f4,'is_active':_0x413f84,'minimum_characters':_0x56e4e0});try{if(_0x457910['status']>0xc7&&_0x457910['status']<0x12c){const _0x5ef8c5=yield _0x457910['json']();return new SuccessfulListResponse(_0x5ef8c5);}const _0xff3f76=yield _0x457910['json']();return new FailedListResponse(_0xff3f76);}catch(_0x36d20f){if(_0x36d20f instanceof Error)return new FailedListResponse({'detail':_0x36d20f['message'],'title':_0x36d20f['name'],'status':0x1f4,'instance':'','type':''});throw _0x36d20f;}});}['remove'](_0x2b3377,_0xf04160,_0x5adf22){return __awaiter$9(this,void 0,void 0,function*(){const _0x486803=this['path']+'/'+_0x2b3377+'/'+_0xf04160,_0x22b351=yield this['fetch']['delete'](_0x486803,_0x5adf22);try{if(_0x22b351['status']>0xc7&&_0x22b351['status']<0x12c){const _0xb23527=yield _0x22b351['json']();return new SuccessfulListResponse(_0xb23527);}const _0x3c8ab6=yield _0x22b351['json']();return new FailedListResponse(_0x3c8ab6);}catch(_0x17cd0b){if(_0x17cd0b instanceof Error)return new FailedListResponse({'detail':_0x17cd0b['message'],'title':_0x17cd0b['name'],'status':0x1f4,'instance':'','type':''});throw _0x17cd0b;}});}['edit'](_0x207d9c,_0xc09321,_0x2ed8a3,_0x366e76){return __awaiter$9(this,void 0,void 0,function*(){const _0x2270a6=this['path']+'/'+_0x207d9c+'/'+_0xc09321;_0x366e76=_0x366e76!==null&&_0x366e76!==void 0?_0x366e76:{};const _0x560291=yield this['fetch']['put'](_0x2270a6,_0x2ed8a3,_0x366e76);try{if(_0x560291['status']>0xc7&&_0x560291['status']<0x12c){const _0x22ac07=yield _0x560291['json']();return new SuccessfulListResponse(_0x22ac07);}const _0x24c04c=yield _0x560291['json']();return new FailedListResponse(_0x24c04c);}catch(_0x440615){if(_0x440615 instanceof Error)return new FailedListResponse({'detail':_0x440615['message'],'title':_0x440615['name'],'status':0x1f4,'instance':'','type':''});throw _0x440615;}});}}
|
|
8
|
+
|
|
9
|
+
var __awaiter$8=undefined&&undefined['__awaiter']||function(_0x2e67b2,_0x384765,_0x16d628,_0x4f830e){function _0x169097(_0x1f35d4){return _0x1f35d4 instanceof _0x16d628?_0x1f35d4:new _0x16d628(function(_0x154a3d){_0x154a3d(_0x1f35d4);});}return new(_0x16d628||(_0x16d628=Promise))(function(_0x23fb16,_0x488722){function _0x7106ae(_0x34842f){try{_0x2916f5(_0x4f830e['next'](_0x34842f));}catch(_0x1c3397){_0x488722(_0x1c3397);}}function _0x76344e(_0x56bcd0){try{_0x2916f5(_0x4f830e['throw'](_0x56bcd0));}catch(_0x2fd768){_0x488722(_0x2fd768);}}function _0x2916f5(_0x421709){_0x421709['done']?_0x23fb16(_0x421709['value']):_0x169097(_0x421709['value'])['then'](_0x7106ae,_0x76344e);}_0x2916f5((_0x4f830e=_0x4f830e['apply'](_0x2e67b2,_0x384765||[]))['next']());});};class Fetch{constructor(_0x280a6d){this['baseUri']=_0x280a6d,this['getUrl']=_0x5d7988=>{return _0x5d7988['startsWith']('/')&&(_0x5d7988=_0x5d7988['replace']('/','')),''+this['baseUri']+_0x5d7988;},!_0x280a6d['endsWith']('/')&&(_0x280a6d=_0x280a6d+'/');}['get'](_0x1eda40,_0x192298){return __awaiter$8(this,void 0,void 0,function*(){const _0x5ea165=this['getUrl'](_0x1eda40);return yield fetch(_0x5ea165,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x192298}});});}['post'](_0x3b437d,_0xff2264,_0x7001cb){return __awaiter$8(this,void 0,void 0,function*(){const _0x20de87=this['getUrl'](_0x3b437d);return yield fetch(_0x20de87,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0xff2264},'body':_0x7001cb?JSON['stringify'](_0x7001cb):null});});}['upload'](_0x2bbdbf,_0x5be77f,_0x18b21d){return __awaiter$8(this,void 0,void 0,function*(){const _0x3c5bc0=this['getUrl'](_0x2bbdbf);return yield fetch(_0x3c5bc0,{'method':'POST','headers':{'Authorization':'Bearer\x20'+_0x5be77f},'body':_0x18b21d});});}['PostNoAuth'](_0x4d047f,_0xbfd0d0){return __awaiter$8(this,void 0,void 0,function*(){const _0x42b3cb=this['getUrl'](_0x4d047f);return yield fetch(_0x42b3cb,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0xbfd0d0?JSON['stringify'](_0xbfd0d0):null});});}['put'](_0x1d2623,_0x865885,_0x42ebba){return __awaiter$8(this,void 0,void 0,function*(){const _0x59a29b=this['getUrl'](_0x1d2623);return yield fetch(_0x59a29b,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x865885},'body':_0x42ebba?JSON['stringify'](_0x42ebba):null});});}['delete'](_0x3a5270,_0x3e5282){return __awaiter$8(this,void 0,void 0,function*(){const _0xebff4f=this['getUrl'](_0x3a5270);return yield fetch(_0xebff4f,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3e5282}});});}}
|
|
10
|
+
|
|
11
|
+
var __awaiter$7=undefined&&undefined['__awaiter']||function(_0x28c6fc,_0x4932ed,_0xd525ba,_0x174fd9){function _0x396e79(_0x27b0c3){return _0x27b0c3 instanceof _0xd525ba?_0x27b0c3:new _0xd525ba(function(_0x11af5c){_0x11af5c(_0x27b0c3);});}return new(_0xd525ba||(_0xd525ba=Promise))(function(_0xa79553,_0x3134a1){function _0xfea54c(_0x17ed25){try{_0x40fe23(_0x174fd9['next'](_0x17ed25));}catch(_0x5455b6){_0x3134a1(_0x5455b6);}}function _0x2f0000(_0x10dc6b){try{_0x40fe23(_0x174fd9['throw'](_0x10dc6b));}catch(_0x30f76e){_0x3134a1(_0x30f76e);}}function _0x40fe23(_0x345476){_0x345476['done']?_0xa79553(_0x345476['value']):_0x396e79(_0x345476['value'])['then'](_0xfea54c,_0x2f0000);}_0x40fe23((_0x174fd9=_0x174fd9['apply'](_0x28c6fc,_0x4932ed||[]))['next']());});};class SearchServersService{constructor(_0x41d7b0){this['fetch']=_0x41d7b0,this['path']='search-service';}['create'](_0x79dffa,_0x564d10,_0x20aa44,_0x484fa8,_0x53cd6b,_0x16a04e,_0x3379e6,_0x331816){return __awaiter$7(this,void 0,void 0,function*(){const _0xe518d6={'account_name':_0x79dffa,'search_service_name':_0x564d10,'endpoint':_0x20aa44,'key':_0x484fa8,'country':_0x53cd6b,'provider':_0x16a04e,'index_name':_0x3379e6};try{const _0x5b1c40=yield this['fetch']['post'](this['path'],_0x331816,_0xe518d6);if(_0x5b1c40['status']>0xc7&&_0x5b1c40['status']<0x12c){const _0x2f1490=yield _0x5b1c40['json']();return new SuccessfulSearchServiceResponse(_0x2f1490);}const _0x28ce8d=yield _0x5b1c40['json']();return new FailedSearchServiceResponse(_0x28ce8d);}catch(_0xec0bd4){if(_0xec0bd4 instanceof Error)return new FailedSearchServiceResponse({'detail':_0xec0bd4['message'],'title':_0xec0bd4['name'],'status':0x1f4,'instance':'','type':''});throw _0xec0bd4;}});}['delete'](_0x2feeed,_0x4f2e53,_0x2d803d){return __awaiter$7(this,void 0,void 0,function*(){const _0x1a4b6f=this['path']+'/'+_0x2feeed+'/'+_0x4f2e53;try{const _0x2f5dda=yield this['fetch']['delete'](_0x1a4b6f,_0x2d803d);if(_0x2f5dda['status']>0xc7&&_0x2f5dda['status']<0x12c)return new SuccessfulResponse({});const _0xe2d7b1=yield _0x2f5dda['json']();return new FailedResponse(_0xe2d7b1);}catch(_0x511d0f){if(_0x511d0f instanceof Error)return new FailedResponse({'detail':_0x511d0f['message'],'title':_0x511d0f['name'],'status':0x1f4,'instance':'','type':''});throw _0x511d0f;}});}['view'](_0x4593ff,_0x78ae9,_0x56ca54){return __awaiter$7(this,void 0,void 0,function*(){const _0x48a082=this['path']+'/'+_0x4593ff+'/'+_0x78ae9;try{const _0x51b00e=yield this['fetch']['get'](_0x48a082,_0x56ca54);if(_0x51b00e['status']>0xc7&&_0x51b00e['status']<0x12c){const _0x19e964=yield _0x51b00e['json']();return new SuccessfulViewSearchServiceResponse(_0x19e964);}const _0x4959fd=yield _0x51b00e['json']();return new FailedViewSearchServiceResponse(_0x4959fd);}catch(_0x200e2a){if(_0x200e2a instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x200e2a['message'],'title':_0x200e2a['name'],'status':0x1f4,'instance':'','type':''});throw _0x200e2a;}});}['edit'](_0x346f6b,_0x2374e4,_0x575e08,_0x57183d,_0x1a4495){return __awaiter$7(this,void 0,void 0,function*(){const _0x21c0e7={'account_name':_0x346f6b,'search_service_name':_0x2374e4,'key':_0x575e08,'country':_0x57183d};try{const _0x414778=yield this['fetch']['put'](this['path'],_0x1a4495,_0x21c0e7);if(_0x414778['status']>0xc7&&_0x414778['status']<0x12c){const _0x548980=yield _0x414778['json']();return new SuccessfulSearchServiceResponse(_0x548980);}const _0x3e54ed=yield _0x414778['json']();return new FailedSearchServiceResponse(_0x3e54ed);}catch(_0x1ce7ad){if(_0x1ce7ad instanceof Error)return new FailedSearchServiceResponse({'detail':_0x1ce7ad['message'],'title':_0x1ce7ad['name'],'status':0x1f4,'instance':'','type':''});throw _0x1ce7ad;}});}['list'](_0x512673,_0x319e86){return __awaiter$7(this,void 0,void 0,function*(){const _0xa01945=this['path']+'/'+_0x512673;try{const _0x2766b2=yield this['fetch']['get'](_0xa01945,_0x319e86);if(_0x2766b2['status']>0xc7&&_0x2766b2['status']<0x12c){const _0x5d5536=yield _0x2766b2['json']();return new SuccessfulListSearchServiceResponse(_0x5d5536);}const _0x3b85fd=yield _0x2766b2['json']();return new FailedViewSearchServicesResponse(_0x3b85fd);}catch(_0x298aa5){if(_0x298aa5 instanceof Error)return new FailedViewSearchServicesResponse({'detail':_0x298aa5['message'],'title':_0x298aa5['name'],'status':0x1f4,'instance':'','type':''});throw _0x298aa5;}});}}
|
|
12
|
+
|
|
13
|
+
var __awaiter$6=undefined&&undefined['__awaiter']||function(_0x311d09,_0x431501,_0x1cff35,_0x1d7b87){function _0x2e6474(_0xa946fa){return _0xa946fa instanceof _0x1cff35?_0xa946fa:new _0x1cff35(function(_0x53e6af){_0x53e6af(_0xa946fa);});}return new(_0x1cff35||(_0x1cff35=Promise))(function(_0x4ad073,_0x91efbf){function _0x23b875(_0x2f532f){try{_0x2afdb1(_0x1d7b87['next'](_0x2f532f));}catch(_0x311b11){_0x91efbf(_0x311b11);}}function _0x3956aa(_0x5172b1){try{_0x2afdb1(_0x1d7b87['throw'](_0x5172b1));}catch(_0x3a35dd){_0x91efbf(_0x3a35dd);}}function _0x2afdb1(_0x35a6b8){_0x35a6b8['done']?_0x4ad073(_0x35a6b8['value']):_0x2e6474(_0x35a6b8['value'])['then'](_0x23b875,_0x3956aa);}_0x2afdb1((_0x1d7b87=_0x1d7b87['apply'](_0x311d09,_0x431501||[]))['next']());});};class FacetService{constructor(_0x13acbe){this['fetch']=_0x13acbe,this['path']='facet';}['create'](_0x1ee9bc,_0x5ef05e,_0x51f9ba,_0x37c4f0){return __awaiter$6(this,void 0,void 0,function*(){const _0x36aed9={'account_name':_0x1ee9bc,'list_name':_0x5ef05e,'facet_name':_0x51f9ba};try{const _0x24c227=yield this['fetch']['post'](this['path'],_0x37c4f0,_0x36aed9);if(_0x24c227['status']>0xc7&&_0x24c227['status']<0x12c){const _0x4bee51=yield _0x24c227['json']();return new SuccessfulFacetResponse(_0x4bee51);}const _0x1e165d=yield _0x24c227['json']();return new FailedFacetResponse(_0x1e165d);}catch(_0x293620){if(_0x293620 instanceof Error)return new FailedFacetResponse({'detail':_0x293620['message'],'title':_0x293620['name'],'status':0x1f4,'instance':'','type':''});throw _0x293620;}});}['remove'](_0x4f87ad,_0x22fe47,_0x5b21ad,_0x49b7ab){return __awaiter$6(this,void 0,void 0,function*(){const _0x2439cb='Facet/'+_0x4f87ad+'/'+_0x22fe47+'/'+_0x5b21ad,_0xed86f8=yield this['fetch']['delete'](_0x2439cb,_0x49b7ab);try{if(_0xed86f8['status']>0xc7&&_0xed86f8['status']<0x12c)return new SuccessfulResponse({});const _0x552170=yield _0xed86f8['json']();return new FailedResponse(_0x552170);}catch(_0x449e83){if(_0x449e83 instanceof Error)return new FailedResponse({'detail':_0x449e83['message'],'title':_0x449e83['name'],'status':0x1f4,'instance':'','type':''});throw _0x449e83;}});}['rename'](_0xa40777,_0x48c05b,_0x26b417,_0x12ccba,_0x20b45a){return __awaiter$6(this,void 0,void 0,function*(){let _0x38067b=this['path']+'/'+_0xa40777+'/'+_0x48c05b;const _0x45d532={'facet_name':_0x26b417,'new_facet_name':_0x12ccba};try{const _0x1770ef=yield this['fetch']['put'](_0x38067b,_0x20b45a,_0x45d532);if(_0x1770ef['status']>0xc7&&_0x1770ef['status']<0x12c){const _0x4fb578=yield _0x1770ef['json']();return new SuccessfulFacetResponse(_0x4fb578);}const _0x39af57=yield _0x1770ef['json']();return new FailedFacetResponse(_0x39af57);}catch(_0x1ec47e){if(_0x1ec47e instanceof Error)return new FailedFacetResponse({'detail':_0x1ec47e['message'],'title':_0x1ec47e['name'],'status':0x1f4,'instance':'','type':''});throw _0x1ec47e;}});}['list'](_0x37c280,_0x50f772,_0x24d62e,_0x21dec5,_0x4edccb){return __awaiter$6(this,void 0,void 0,function*(){let _0x11955e=this['path']+'/'+_0x37c280+'/'+_0x50f772+'/'+_0x24d62e+'/'+_0x21dec5;try{const _0x5cea07=yield this['fetch']['get'](_0x11955e,_0x4edccb);if(_0x5cea07['status']>0xc7&&_0x5cea07['status']<0x12c){const _0x493277=yield _0x5cea07['json']();return new SuccessfulFacetValueResponse(_0x493277);}const _0x3d4df4=yield _0x5cea07['json']();return new FailedFacetValuesResponse(_0x3d4df4);}catch(_0x2aaa4c){if(_0x2aaa4c instanceof Error)return new FailedFacetValuesResponse({'detail':_0x2aaa4c['message'],'title':_0x2aaa4c['name'],'status':0x1f4,'instance':'','type':''});throw _0x2aaa4c;}});}}
|
|
14
|
+
|
|
15
|
+
var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x2a6761,_0xd6a0d5,_0x47cd27,_0x33ebfd){function _0x3e88a7(_0x36e6cc){return _0x36e6cc instanceof _0x47cd27?_0x36e6cc:new _0x47cd27(function(_0x33c012){_0x33c012(_0x36e6cc);});}return new(_0x47cd27||(_0x47cd27=Promise))(function(_0xf109f4,_0x2b4ee0){function _0x2242b8(_0x8f5d14){try{_0x201fb4(_0x33ebfd['next'](_0x8f5d14));}catch(_0x15f804){_0x2b4ee0(_0x15f804);}}function _0x1e8698(_0x2a9e35){try{_0x201fb4(_0x33ebfd['throw'](_0x2a9e35));}catch(_0x2b9493){_0x2b4ee0(_0x2b9493);}}function _0x201fb4(_0x54114a){_0x54114a['done']?_0xf109f4(_0x54114a['value']):_0x3e88a7(_0x54114a['value'])['then'](_0x2242b8,_0x1e8698);}_0x201fb4((_0x33ebfd=_0x33ebfd['apply'](_0x2a6761,_0xd6a0d5||[]))['next']());});};class SearchResultService{constructor(_0x2ee0c6){this['fetch']=_0x2ee0c6,this['path']='search-result',this['isRealNumber']=_0x382b09=>_0x382b09!=undefined&&typeof _0x382b09==='number'&&Number['isFinite'](_0x382b09);}['create'](_0x25796c,_0x3f6dde,_0x1f9b43,_0x6eafd8,_0x3b530f){return __awaiter$5(this,void 0,void 0,function*(){const _0x42913a={'account_name':_0x25796c,'search_result_name':_0x1f9b43,'list_name':_0x3f6dde,'options':_0x3b530f};try{const _0x43e89e=yield this['fetch']['post'](this['path'],_0x6eafd8,_0x42913a);if(_0x43e89e['status']>0xc7&&_0x43e89e['status']<0x12c){const _0x289f77=yield _0x43e89e['json']();return new SuccessfulSearchResultResponse(_0x289f77);}const _0x338f90=yield _0x43e89e['json']();return new FailedSearchResultResponse(_0x338f90);}catch(_0x3b7d45){if(_0x3b7d45 instanceof Error)return new FailedSearchResultResponse({'detail':_0x3b7d45['message'],'title':_0x3b7d45['name'],'status':0x1f4,'instance':'','type':''});throw _0x3b7d45;}});}['list'](_0x7d97e4,_0x522d3e,_0x2605ef,_0x19f720){return __awaiter$5(this,void 0,void 0,function*(){let _0x2b5b33=this['path']+'/'+_0x7d97e4+'/'+_0x522d3e+'?'+this['getQueryStr'](_0x19f720);try{const _0x59357b=yield this['fetch']['get'](_0x2b5b33,_0x2605ef);if(_0x59357b['status']>0xc7&&_0x59357b['status']<0x12c){const _0x37868d=yield _0x59357b['json']();return new SuccessfulListSearchResultResponse(_0x37868d);}const _0x2eb453=yield _0x59357b['json']();return new FailedViewSearchResultResponse(_0x2eb453);}catch(_0x53105f){if(_0x53105f instanceof Error)return new FailedViewSearchResultResponse({'detail':_0x53105f['message'],'title':_0x53105f['name'],'status':0x1f4,'instance':'','type':''});throw _0x53105f;}});}['get'](_0x24d229,_0x406ffb,_0x136d05,_0x2d2358){return __awaiter$5(this,void 0,void 0,function*(){let _0x1030dd=this['path']+'/'+_0x24d229+'/'+_0x406ffb+'?'+_0x136d05;try{const _0x2bb607=yield this['fetch']['get'](_0x1030dd,_0x2d2358);if(_0x2bb607['status']>0xc7&&_0x2bb607['status']<0x12c){const _0x1ca897=yield _0x2bb607['json']();return new SuccessfulSearchResultResponse(_0x1ca897);}const _0x1df212=yield _0x2bb607['json']();return new FailedSearchResultResponse(_0x1df212);}catch(_0x1d4ad5){if(_0x1d4ad5 instanceof Error)return new FailedSearchResultResponse({'detail':_0x1d4ad5['message'],'title':_0x1d4ad5['name'],'status':0x1f4,'instance':'','type':''});throw _0x1d4ad5;}});}['delete'](_0x52eff3,_0x53b7f6,_0x458709,_0x41c109){return __awaiter$5(this,void 0,void 0,function*(){const _0x3044ba=this['path']+'/'+_0x52eff3+'/'+_0x53b7f6+'/'+_0x458709,_0x173fe8=yield this['fetch']['delete'](_0x3044ba,_0x41c109);try{if(_0x173fe8['status']>0xc7&&_0x173fe8['status']<0x12c)return new SuccessfulResponse({});const _0x81f45d=yield _0x173fe8['json']();return new FailedResponse(_0x81f45d);}catch(_0x256649){if(_0x256649 instanceof Error)return new FailedResponse({'detail':_0x256649['message'],'title':_0x256649['name'],'status':0x1f4,'instance':'','type':''});throw _0x256649;}});}['upload'](_0x10597d,_0x136bac,_0xd1e0c3,_0x518ab8){return __awaiter$5(this,void 0,void 0,function*(){const _0x3de950=this['path']+'/'+_0x10597d+'/'+_0x136bac+'/upload',_0x41c193=new FormData();_0x41c193['append']('file',_0xd1e0c3);try{const _0xfe0f8a=yield this['fetch']['upload'](_0x3de950,_0x518ab8,_0x41c193);if(_0xfe0f8a['status']>0xc7&&_0xfe0f8a['status']<0x12c)return new SuccessfulResponse({});const _0x30f6c5=yield _0xfe0f8a['json']();return new FailedResponse(_0x30f6c5);}catch(_0x121098){if(_0x121098 instanceof Error)return new FailedResponse({'detail':_0x121098['message'],'title':_0x121098['name'],'status':0x1f4,'instance':'','type':''});throw _0x121098;}});}['edit'](_0x34a638,_0x2b98f9,_0x35c6a4,_0x303506,_0x13855f){return __awaiter$5(this,void 0,void 0,function*(){const _0x35b783=this['path']+'/'+_0x34a638+'/'+_0x2b98f9+'/'+_0x35c6a4;try{const _0x2c708d=yield this['fetch']['put'](_0x35b783,_0x303506,_0x13855f);if(_0x2c708d['status']>0xc7&&_0x2c708d['status']<0x12c){const _0x3cfca8=yield _0x2c708d['json']();return new SuccessfulSearchResultResponse(_0x3cfca8);}const _0x547f01=yield _0x2c708d['json']();return new FailedSearchResultResponse(_0x547f01);}catch(_0x14c2b7){if(_0x14c2b7 instanceof Error)return new FailedSearchResultResponse({'detail':_0x14c2b7['message'],'title':_0x14c2b7['name'],'status':0x1f4,'instance':'','type':''});throw _0x14c2b7;}});}['getQueryStr'](_0x1481d7){let _0x19636a='';const _0x33217f=[];(_0x1481d7===null||_0x1481d7===void 0?void 0:_0x1481d7['size'])&&_0x33217f['push']('size='+_0x1481d7['size']);(_0x1481d7===null||_0x1481d7===void 0?void 0:_0x1481d7['skip'])&&_0x33217f['push']('skip='+_0x1481d7['skip']);(_0x1481d7===null||_0x1481d7===void 0?void 0:_0x1481d7['query'])&&_0x33217f['push']('query='+_0x1481d7['query']);(_0x1481d7===null||_0x1481d7===void 0?void 0:_0x1481d7['filter'])&&_0x33217f['push']('filter='+_0x1481d7['filter']);if((_0x1481d7===null||_0x1481d7===void 0?void 0:_0x1481d7['radius'])&&this['isRealNumber'](_0x1481d7['radius']['latitude'])&&this['isRealNumber'](_0x1481d7['radius']['longitude'])&&this['isRealNumber'](_0x1481d7['radius']['distance_in_km'])){const _0x311540=_0x1481d7['radius']['latitude']+','+_0x1481d7['radius']['longitude']+','+_0x1481d7['radius']['distance_in_km'];_0x33217f['push']('radius='+_0x311540);}return _0x1481d7['active']===![]&&_0x33217f['push']('active='+_0x1481d7['active']),_0x33217f['length']>0x0&&_0x33217f['forEach']((_0x56fc8b,_0x3fcf15)=>{if(_0x3fcf15>0x0&&_0x19636a)_0x19636a+='&';_0x19636a+=_0x56fc8b;}),_0x19636a;}}
|
|
16
|
+
|
|
17
|
+
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x47d004,_0x26a438,_0x5499dd,_0x462aaf){function _0x360b35(_0x1903b3){return _0x1903b3 instanceof _0x5499dd?_0x1903b3:new _0x5499dd(function(_0x1c1216){_0x1c1216(_0x1903b3);});}return new(_0x5499dd||(_0x5499dd=Promise))(function(_0x233ab7,_0x3dc319){function _0x4b1746(_0x2ea267){try{_0x130e53(_0x462aaf['next'](_0x2ea267));}catch(_0x28157d){_0x3dc319(_0x28157d);}}function _0xd65d6(_0x774733){try{_0x130e53(_0x462aaf['throw'](_0x774733));}catch(_0x176147){_0x3dc319(_0x176147);}}function _0x130e53(_0x423349){_0x423349['done']?_0x233ab7(_0x423349['value']):_0x360b35(_0x423349['value'])['then'](_0x4b1746,_0xd65d6);}_0x130e53((_0x462aaf=_0x462aaf['apply'](_0x47d004,_0x26a438||[]))['next']());});};class ContributorService{constructor(_0x5cb077){this['fetch']=_0x5cb077,this['path']='contributor';}['create'](_0x26874d,_0x16e3ca,_0x52ef1a,_0x42e240){return __awaiter$4(this,void 0,void 0,function*(){const _0x5ca7c2={'account_name':_0x26874d,'list_name':_0x16e3ca,'contributor_name':_0x52ef1a};try{const _0x44b5a1=yield this['fetch']['post'](this['path'],_0x42e240,_0x5ca7c2);if(_0x44b5a1['status']>0xc7&&_0x44b5a1['status']<0x12c){const _0x52ed63=yield _0x44b5a1['json']();return new SuccessfulContributorResponse(_0x52ed63);}const _0x5188a0=yield _0x44b5a1['json']();return new FailedContributorResponse(_0x5188a0);}catch(_0x1aebe4){if(_0x1aebe4 instanceof Error)return new FailedContributorResponse({'detail':_0x1aebe4['message'],'title':_0x1aebe4['name'],'status':0x1f4,'instance':'','type':''});throw _0x1aebe4;}});}['remove'](_0x5ebdd3,_0x2315e2,_0x2cad18,_0x402fbb){return __awaiter$4(this,void 0,void 0,function*(){const _0x308f3c=this['path']+'/'+_0x5ebdd3+'/'+_0x2315e2+'/'+_0x2cad18,_0x1141ff=yield this['fetch']['delete'](_0x308f3c,_0x402fbb);try{if(_0x1141ff['status']>0xc7&&_0x1141ff['status']<0x12c)return new SuccessfulResponse({});const _0x597875=yield _0x1141ff['json']();return new FailedResponse(_0x597875);}catch(_0x48f808){if(_0x48f808 instanceof Error)return new FailedResponse({'detail':_0x48f808['message'],'title':_0x48f808['name'],'status':0x1f4,'instance':'','type':''});throw _0x48f808;}});}['startsWith'](_0xc41c94,_0x2fcf2a){return __awaiter$4(this,void 0,void 0,function*(){const _0x2ad3e8=this['path']+'/'+_0xc41c94;try{const _0x169e94=yield this['fetch']['get'](_0x2ad3e8,_0x2fcf2a);if(_0x169e94['status']>0xc7&&_0x169e94['status']<0x12c){const _0x11cfc2=yield _0x169e94['json']();return new SuccessfulAccountAndImageResponse(_0x11cfc2);}const _0x1f3e45=yield _0x169e94['json']();return new FailedAccountAndImageResponse(_0x1f3e45);}catch(_0x5ba1f0){if(_0x5ba1f0 instanceof Error)return new FailedAccountAndImageResponse({'detail':_0x5ba1f0['message'],'title':_0x5ba1f0['name'],'status':0x1f4,'instance':'','type':''});throw _0x5ba1f0;}});}}
|
|
18
|
+
|
|
19
|
+
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x188991,_0xb96ea0,_0x11a785,_0x1eb112){function _0x227bc8(_0x9790d9){return _0x9790d9 instanceof _0x11a785?_0x9790d9:new _0x11a785(function(_0x152aee){_0x152aee(_0x9790d9);});}return new(_0x11a785||(_0x11a785=Promise))(function(_0x4c9ded,_0x216348){function _0x4ca8da(_0xeb2703){try{_0x4fea0e(_0x1eb112['next'](_0xeb2703));}catch(_0x3d8166){_0x216348(_0x3d8166);}}function _0x340feb(_0x76db01){try{_0x4fea0e(_0x1eb112['throw'](_0x76db01));}catch(_0x284b41){_0x216348(_0x284b41);}}function _0x4fea0e(_0x1d56fd){_0x1d56fd['done']?_0x4c9ded(_0x1d56fd['value']):_0x227bc8(_0x1d56fd['value'])['then'](_0x4ca8da,_0x340feb);}_0x4fea0e((_0x1eb112=_0x1eb112['apply'](_0x188991,_0xb96ea0||[]))['next']());});};class SearchableFieldService{constructor(_0x5884f7){this['fetch']=_0x5884f7,this['path']='searchable-field';}['create'](_0x26a8a4,_0x4c70fc,_0x4fc4fd,_0xd9b24d){return __awaiter$3(this,void 0,void 0,function*(){const _0x59ef8b={'account_name':_0x26a8a4,'list_name':_0x4c70fc,'searchable_field_name':_0x4fc4fd};try{const _0x29a3c8=yield this['fetch']['post'](this['path'],_0xd9b24d,_0x59ef8b);if(_0x29a3c8['status']>0xc7&&_0x29a3c8['status']<0x12c){const _0x21bdaf=yield _0x29a3c8['json']();return new SuccessfulSearchableFieldResponse(_0x21bdaf);}const _0x5c5e1d=yield _0x29a3c8['json']();return new FailedSearchableFieldResponse(_0x5c5e1d);}catch(_0x185285){if(_0x185285 instanceof Error)return new FailedSearchableFieldResponse({'detail':_0x185285['message'],'title':_0x185285['name'],'status':0x1f4,'instance':'','type':''});throw _0x185285;}});}['remove'](_0x2d381b,_0x21e98b,_0x20b833,_0x2496ee){return __awaiter$3(this,void 0,void 0,function*(){const _0x3c3f05=this['path']+'/'+_0x2d381b+'/'+_0x21e98b+'/'+_0x20b833,_0x173c76=yield this['fetch']['delete'](_0x3c3f05,_0x2496ee);try{if(_0x173c76['status']>0xc7&&_0x173c76['status']<0x12c)return new SuccessfulResponse({});const _0x18ccdb=yield _0x173c76['json']();return new FailedResponse(_0x18ccdb);}catch(_0xfb6f3a){if(_0xfb6f3a instanceof Error)return new FailedResponse({'detail':_0xfb6f3a['message'],'title':_0xfb6f3a['name'],'status':0x1f4,'instance':'','type':''});throw _0xfb6f3a;}});}['rename'](_0x56876d,_0x5d0368,_0x55faa9,_0x4d74b8,_0x3d28c6){return __awaiter$3(this,void 0,void 0,function*(){let _0x41db08=this['path']+'/'+_0x56876d+'/'+_0x5d0368;const _0x10867c={'searchable_field_name':_0x55faa9,'new_searchable_field_name':_0x4d74b8};try{const _0x3f7d3e=yield this['fetch']['put'](_0x41db08,_0x3d28c6,_0x10867c);if(_0x3f7d3e['status']>0xc7&&_0x3f7d3e['status']<0x12c){const _0x27b4ad=yield _0x3f7d3e['json']();return new SuccessfulSearchableFieldResponse(_0x27b4ad);}const _0x2d9a8d=yield _0x3f7d3e['json']();return new FailedSearchableFieldResponse(_0x2d9a8d);}catch(_0x17744a){if(_0x17744a instanceof Error)return new FailedSearchableFieldResponse({'detail':_0x17744a['message'],'title':_0x17744a['name'],'status':0x1f4,'instance':'','type':''});throw _0x17744a;}});}}
|
|
20
|
+
|
|
21
|
+
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x3eea0b,_0x5d4b19,_0x5fae32,_0x3f0327){function _0x12c8e9(_0x460b87){return _0x460b87 instanceof _0x5fae32?_0x460b87:new _0x5fae32(function(_0x2d3bc4){_0x2d3bc4(_0x460b87);});}return new(_0x5fae32||(_0x5fae32=Promise))(function(_0x388314,_0xd40f58){function _0x5db8a6(_0x2ed5fe){try{_0x44f15(_0x3f0327['next'](_0x2ed5fe));}catch(_0x1e6c49){_0xd40f58(_0x1e6c49);}}function _0x103994(_0x211f41){try{_0x44f15(_0x3f0327['throw'](_0x211f41));}catch(_0x5b9651){_0xd40f58(_0x5b9651);}}function _0x44f15(_0x5e1e18){_0x5e1e18['done']?_0x388314(_0x5e1e18['value']):_0x12c8e9(_0x5e1e18['value'])['then'](_0x5db8a6,_0x103994);}_0x44f15((_0x3f0327=_0x3f0327['apply'](_0x3eea0b,_0x5d4b19||[]))['next']());});};class ResourceService{constructor(_0xca3250){this['fetch']=_0xca3250,this['path']='resource';}['create'](_0x27e3ae,_0xcecb90,_0x488001,_0x3645aa){return __awaiter$2(this,void 0,void 0,function*(){const _0x1e97ab={'account_name':_0x27e3ae,'list_name':_0xcecb90,'resource_name':_0x488001};try{const _0x28291e=yield this['fetch']['post'](this['path'],_0x3645aa,_0x1e97ab);if(_0x28291e['status']>0xc7&&_0x28291e['status']<0x12c){const _0x3dc8a9=yield _0x28291e['json']();return new SuccessfulResourceResponse(_0x3dc8a9);}const _0x126d70=yield _0x28291e['json']();return new FailedResourceResponse(_0x126d70);}catch(_0x474419){if(_0x474419 instanceof Error)return new FailedResourceResponse({'detail':_0x474419['message'],'title':_0x474419['name'],'status':0x1f4,'instance':'','type':''});throw _0x474419;}});}['remove'](_0xe74eb9,_0x217387,_0x4a1418,_0x17adfd){return __awaiter$2(this,void 0,void 0,function*(){const _0x546e55=this['path']+'/'+_0xe74eb9+'/'+_0x217387+'/'+_0x4a1418,_0x18346d=yield this['fetch']['delete'](_0x546e55,_0x17adfd);try{if(_0x18346d['status']>0xc7&&_0x18346d['status']<0x12c)return new SuccessfulResponse({});const _0x4468ab=yield _0x18346d['json']();return new FailedResponse(_0x4468ab);}catch(_0x515a5b){if(_0x515a5b instanceof Error)return new FailedResponse({'detail':_0x515a5b['message'],'title':_0x515a5b['name'],'status':0x1f4,'instance':'','type':''});throw _0x515a5b;}});}['rename'](_0x1b3052,_0x7355f2,_0xaf6cca,_0x56fbf6,_0x304766){return __awaiter$2(this,void 0,void 0,function*(){let _0x2ff5aa=this['path']+'/'+_0x1b3052+'/'+_0x7355f2;const _0x18d515={'resource_name':_0xaf6cca,'new_resource_name':_0x56fbf6};try{const _0x2bf6a3=yield this['fetch']['put'](_0x2ff5aa,_0x304766,_0x18d515);if(_0x2bf6a3['status']>0xc7&&_0x2bf6a3['status']<0x12c){const _0x40d62c=yield _0x2bf6a3['json']();return new SuccessfulResourceResponse(_0x40d62c);}const _0x2f3295=yield _0x2bf6a3['json']();return new FailedResourceResponse(_0x2f3295);}catch(_0x517c20){if(_0x517c20 instanceof Error)return new FailedResourceResponse({'detail':_0x517c20['message'],'title':_0x517c20['name'],'status':0x1f4,'instance':'','type':''});throw _0x517c20;}});}}
|
|
22
|
+
|
|
23
|
+
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x27f3ee,_0x55830d,_0x43cdff,_0x252cca){function _0x206cbf(_0x2ed9b9){return _0x2ed9b9 instanceof _0x43cdff?_0x2ed9b9:new _0x43cdff(function(_0x31143e){_0x31143e(_0x2ed9b9);});}return new(_0x43cdff||(_0x43cdff=Promise))(function(_0xef522b,_0x14a909){function _0x2003b7(_0x275de2){try{_0x334744(_0x252cca['next'](_0x275de2));}catch(_0x182def){_0x14a909(_0x182def);}}function _0x43468b(_0x246b9f){try{_0x334744(_0x252cca['throw'](_0x246b9f));}catch(_0x276325){_0x14a909(_0x276325);}}function _0x334744(_0x4d393f){_0x4d393f['done']?_0xef522b(_0x4d393f['value']):_0x206cbf(_0x4d393f['value'])['then'](_0x2003b7,_0x43468b);}_0x334744((_0x252cca=_0x252cca['apply'](_0x27f3ee,_0x55830d||[]))['next']());});};class GroupService{constructor(_0x1e2472){this['fetch']=_0x1e2472,this['path']='group';}['create'](_0x19f026,_0x52c543,_0x1d6233,_0x3da1a4){return __awaiter$1(this,void 0,void 0,function*(){const _0x3f57dc={'account_name':_0x19f026,'search_service_name':_0x52c543,'group_name':_0x1d6233};try{const _0x46eb56=yield this['fetch']['post'](this['path'],_0x3da1a4,_0x3f57dc);if(_0x46eb56['status']>0xc7&&_0x46eb56['status']<0x12c){const _0x124d2c=yield _0x46eb56['json']();return new SuccessfulGroupResponse(_0x124d2c);}const _0x42ed70=yield _0x46eb56['json']();return new FailedGroupResponse(_0x42ed70);}catch(_0x5c57a9){if(_0x5c57a9 instanceof Error)return new FailedGroupResponse({'detail':_0x5c57a9['message'],'title':_0x5c57a9['name'],'status':0x1f4,'instance':'','type':''});throw _0x5c57a9;}});}['addList'](_0x1e249d,_0x23fc1c,_0x218b11,_0x309ff4,_0xc5e1de){return __awaiter$1(this,void 0,void 0,function*(){const _0x23fc88={'account_name':_0x1e249d,'list_name':_0x218b11,'group_name':_0x23fc1c,'version':_0x309ff4};try{const _0x5e056a=yield this['fetch']['post'](this['path']+'/list',_0xc5e1de,_0x23fc88);if(_0x5e056a['status']>0xc7&&_0x5e056a['status']<0x12c){const _0x2fab9a=yield _0x5e056a['json']();return new SuccessfulListIdentityResponse(_0x2fab9a);}const _0x52fe2f=yield _0x5e056a['json']();return new FailedListIdentityResponse(_0x52fe2f);}catch(_0x385a77){if(_0x385a77 instanceof Error)return new FailedListIdentityResponse({'detail':_0x385a77['message'],'title':_0x385a77['name'],'status':0x1f4,'instance':'','type':''});throw _0x385a77;}});}['delete'](_0x4a58ba,_0x76e13f,_0x4130a7){return __awaiter$1(this,void 0,void 0,function*(){const _0x301c3f=this['path']+'/'+_0x4a58ba+'/'+_0x76e13f,_0xbcb6c3=yield this['fetch']['delete'](_0x301c3f,_0x4130a7);try{if(_0xbcb6c3['status']>0xc7&&_0xbcb6c3['status']<0x12c)return new SuccessfulResponse({});const _0x5ad3f8=yield _0xbcb6c3['json']();return new FailedResponse(_0x5ad3f8);}catch(_0x5d6b27){if(_0x5d6b27 instanceof Error)return new FailedResponse({'detail':_0x5d6b27['message'],'title':_0x5d6b27['name'],'status':0x1f4,'instance':'','type':''});throw _0x5d6b27;}});}}
|
|
24
|
+
|
|
25
|
+
var __awaiter=undefined&&undefined['__awaiter']||function(_0x434cc4,_0x1b1328,_0x2e8f00,_0x58c728){function _0x539375(_0x4ed354){return _0x4ed354 instanceof _0x2e8f00?_0x4ed354:new _0x2e8f00(function(_0xbba683){_0xbba683(_0x4ed354);});}return new(_0x2e8f00||(_0x2e8f00=Promise))(function(_0x3f6ca,_0xb7b6b5){function _0x1a309f(_0x421595){try{_0x4d218d(_0x58c728['next'](_0x421595));}catch(_0x142088){_0xb7b6b5(_0x142088);}}function _0x4c459e(_0x1bf824){try{_0x4d218d(_0x58c728['throw'](_0x1bf824));}catch(_0x3ee187){_0xb7b6b5(_0x3ee187);}}function _0x4d218d(_0x1e121b){_0x1e121b['done']?_0x3f6ca(_0x1e121b['value']):_0x539375(_0x1e121b['value'])['then'](_0x1a309f,_0x4c459e);}_0x4d218d((_0x58c728=_0x58c728['apply'](_0x434cc4,_0x1b1328||[]))['next']());});};class AdminClient{constructor(_0x357aff='https://admin.searchability.dev/'){var _0x227475=new Fetch(_0x357aff);this['Accounts']=new AccountService(_0x227475),this['Lists']=new ListService(_0x227475),this['ApiKeys']=new ApiKeyService(_0x227475),this['SearchServers']=new SearchServersService(_0x227475),this['Facets']=new FacetService(_0x227475),this['SearchResults']=new SearchResultService(_0x227475),this['Contributors']=new ContributorService(_0x227475),this['SearchableFields']=new SearchableFieldService(_0x227475),this['Groups']=new GroupService(_0x227475),this['Resources']=new ResourceService(_0x227475);}}class AuthClient{constructor(_0x10710e='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x10710e);}['login'](_0x1a7994){return __awaiter(this,void 0,void 0,function*(){const _0x9fab43='login/'+_0x1a7994;try{const _0x1a9642=yield yield fetch(_0x9fab43);if(_0x1a9642['status']>0xc7&&_0x1a9642['status']<0x12c){const _0x50c6a6=yield _0x1a9642['json']();return new SuccessfulAuthResponse(_0x50c6a6);}const _0xe935e7=yield _0x1a9642['json']();return new FailedAuthResponse(_0xe935e7);}catch(_0x4999ca){if(_0x4999ca instanceof Error)return new FailedAuthResponse({'detail':_0x4999ca['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x4999ca;}});}['refresh'](_0x3a01c9){return __awaiter(this,void 0,void 0,function*(){const _0x470cf6='refresh',_0x4d5cae={'refresh_token':_0x3a01c9};try{const _0x5cad42=yield this['fetch']['PostNoAuth'](_0x470cf6,_0x4d5cae);if(_0x5cad42['status']>0xc7&&_0x5cad42['status']<0x12c){const _0x7bccb1=yield _0x5cad42['json']();return new SuccessfulAuthResponse(_0x7bccb1);}const _0x10083f=yield _0x5cad42['json']();return new FailedAuthResponse(_0x10083f);}catch(_0x4c1bc1){if(_0x4c1bc1 instanceof Error)return new FailedAuthResponse({'detail':_0x4c1bc1['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x4c1bc1;}});}['getTokenStatus'](_0x24a92c){if(Date['now']()<_0x24a92c['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x24a92c['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
|
|
26
|
+
|
|
27
|
+
export { AdminClient, AuthClient, TokenStatus, Tokens };
|