@searchability/admin-client 0.0.171 → 0.0.173
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
exports.TokenStatus = void 0;(function(
|
|
3
|
+
exports.TokenStatus = void 0;(function(_0x3786b2){_0x3786b2[_0x3786b2['Ok']=0x0]='Ok',_0x3786b2[_0x3786b2['Refresh']=0x1]='Refresh',_0x3786b2[_0x3786b2['Expired']=0x2]='Expired';}(exports.TokenStatus||(exports.TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}}class Response{constructor(_0x4f300d){this['isSuccess']=_0x4f300d;}}class SuccessfulFacetValueResponse extends Response{constructor(_0x4743e0){super(!![]),this['facets']=_0x4743e0;}['toSuccess'](){return this['facets'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetValuesResponse extends Response{constructor(_0x129019){super(![]),this['problem']=_0x129019;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulContributorResponse extends Response{constructor(_0x563252){super(!![]),this['contributor']=_0x563252;}['toSuccess'](){return this['contributor'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedContributorResponse extends Response{constructor(_0x4fff7c){super(![]),this['problem']=_0x4fff7c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountAndImageResponse extends Response{constructor(_0x3297da){super(!![]),this['accountAndImages']=_0x3297da;}['toSuccess'](){return this['accountAndImages'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountAndImageResponse extends Response{constructor(_0x1ebd9b){super(![]),this['problem']=_0x1ebd9b;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulResourceResponse extends Response{constructor(_0x5c0584){super(!![]),this['resource']=_0x5c0584;}['toSuccess'](){return this['resource'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResourceResponse extends Response{constructor(_0x578dcd){super(![]),this['problem']=_0x578dcd;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulFacetResponse extends Response{constructor(_0x142e01){super(!![]),this['facet']=_0x142e01;}['toSuccess'](){return this['facet'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetResponse extends Response{constructor(_0x1f57e6){super(![]),this['problem']=_0x1f57e6;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedSearchableFieldResponse extends Response{constructor(_0x4de58a){super(![]),this['problem']=_0x4de58a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchableFieldResponse extends Response{constructor(_0x10ebb1){super(!![]),this['searchable_field']=_0x10ebb1;}['toSuccess'](){return this['searchable_field'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountResponse extends Response{constructor(_0x4079a4){super(!![]),this['account']=_0x4079a4;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountImageResponse extends Response{constructor(_0x9ffab0){super(!![]),this['accountImage']=_0x9ffab0;}['toSuccess'](){return this['accountImage'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListIdentityResponse extends Response{constructor(_0x174d5d){super(!![]),this['list']=_0x174d5d;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulGroupResponse extends Response{constructor(_0x4e8ab2){super(!![]),this['group']=_0x4e8ab2;}['toSuccess'](){return this['group'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedGroupResponse extends Response{constructor(_0x125849){super(![]),this['problem']=_0x125849;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListResponse extends Response{constructor(_0x24ad74){super(!![]),this['list']=_0x24ad74;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedListResponse extends Response{constructor(_0xaf378a){super(![]),this['problem']=_0xaf378a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountResponse extends Response{constructor(_0x486c49){super(![]),this['problem']=_0x486c49;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountImageResponse extends Response{constructor(_0x2b6cac){super(![]),this['problem']=_0x2b6cac;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListIdentityResponse extends Response{constructor(_0x3b3614){super(![]),this['problem']=_0x3b3614;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x11ebc2){super(!![]),this['tokens']=_0x11ebc2;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x42c326){super(![]),this['problem']=_0x42c326;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x45b3ea){super(!![]),this['apiKey']=_0x45b3ea;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x25d84c){super(![]),this['problem']=_0x25d84c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0xc36a8){super(!![]),this['searchService']=_0xc36a8;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x13ef7f){super(![]),this['problem']=_0x13ef7f;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x53a14b){super(!![]),this['searchService']=_0x53a14b;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulSearchResultResponse extends Response{constructor(_0x2fec40){super(!![]),this['searchResult']=_0x2fec40;}['toSuccess'](){return this['searchResult'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchResultResponse extends Response{constructor(_0x607830){super(![]),this['problem']=_0x607830;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchResultResponse extends Response{constructor(_0x4d639c){super(!![]),this['searchResults']=_0x4d639c;}['toSuccess'](){return this['searchResults'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchResultResponse extends Response{constructor(_0x5836a6){super(![]),this['problem']=_0x5836a6;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedViewSearchServiceResponse extends Response{constructor(_0x5528a9){super(![]),this['problem']=_0x5528a9;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x506550){super(!![]),this['apiKeyValue']=_0x506550;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x2d629f){super(!![]),this['obj']=_0x2d629f;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0xab3f46){super(![]),this['problem']=_0xab3f46;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0xc2660e){super(![]),this['problem']=_0xc2660e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
|
|
4
4
|
|
|
5
|
-
var __awaiter$b=undefined&&undefined['__awaiter']||function(
|
|
5
|
+
var __awaiter$b=undefined&&undefined['__awaiter']||function(_0x48377d,_0x4a2800,_0x332570,_0x59fa50){function _0x15ad3d(_0x364eac){return _0x364eac instanceof _0x332570?_0x364eac:new _0x332570(function(_0x4c51c5){_0x4c51c5(_0x364eac);});}return new(_0x332570||(_0x332570=Promise))(function(_0x411eb9,_0x54ea95){function _0x82143a(_0x2b04a6){try{_0x1357cb(_0x59fa50['next'](_0x2b04a6));}catch(_0x34c0e4){_0x54ea95(_0x34c0e4);}}function _0xe3da73(_0x494b32){try{_0x1357cb(_0x59fa50['throw'](_0x494b32));}catch(_0x55f1ed){_0x54ea95(_0x55f1ed);}}function _0x1357cb(_0x3df5d4){_0x3df5d4['done']?_0x411eb9(_0x3df5d4['value']):_0x15ad3d(_0x3df5d4['value'])['then'](_0x82143a,_0xe3da73);}_0x1357cb((_0x59fa50=_0x59fa50['apply'](_0x48377d,_0x4a2800||[]))['next']());});};class AccountService{constructor(_0x54cb6b){this['fetch']=_0x54cb6b,this['path']='account';}['get'](_0x6c9499,_0x47864a){return __awaiter$b(this,void 0,void 0,function*(){const _0x23aa07=this['path']+'/'+_0x6c9499+'/',_0x40b403=yield this['fetch']['get'](_0x23aa07,_0x47864a);try{if(_0x40b403['status']>0xc7&&_0x40b403['status']<0x12c){const _0x1bff52=yield _0x40b403['json']();return new SuccessfulAccountResponse(_0x1bff52);}const _0x1273b5=yield _0x40b403['json']();return new FailedAccountResponse(_0x1273b5);}catch(_0x241262){if(_0x241262 instanceof Error)return new FailedAccountResponse({'detail':_0x241262['message'],'title':_0x241262['name'],'status':0x1f4,'instance':'','type':''});throw _0x241262;}});}['getImage'](_0x344eeb,_0x47c93f){return __awaiter$b(this,void 0,void 0,function*(){const _0x39d7ec=this['path']+'/image/'+_0x344eeb+'/',_0x2f1f93=yield this['fetch']['get'](_0x39d7ec,_0x47c93f);try{if(_0x2f1f93['status']>0xc7&&_0x2f1f93['status']<0x12c){const _0x2aa465=yield _0x2f1f93['json']();return new SuccessfulAccountImageResponse(_0x2aa465);}const _0x3ce975=yield _0x2f1f93['json']();return new FailedAccountImageResponse(_0x3ce975);}catch(_0x37a360){if(_0x37a360 instanceof Error)return new FailedAccountImageResponse({'detail':_0x37a360['message'],'title':_0x37a360['name'],'status':0x1f4,'instance':'','type':''});throw _0x37a360;}});}['feedback'](_0x830988,_0x5854a7,_0x4d9907,_0x17b353){return __awaiter$b(this,void 0,void 0,function*(){const _0x3e778a=this['path']+'/feedback',_0x218a06=yield this['fetch']['post'](_0x3e778a,_0x17b353,{'account_name':_0x830988,'email_address':_0x5854a7,'feedback':_0x4d9907});try{if(_0x218a06['status']>0xc7&&_0x218a06['status']<0x12c)return new SuccessfulResponse({});const _0x502533=yield _0x218a06['json']();return new FailedResponse(_0x502533);}catch(_0x2182c3){if(_0x2182c3 instanceof Error)return new FailedResponse({'detail':_0x2182c3['message'],'title':_0x2182c3['name'],'status':0x1f4,'instance':'','type':''});throw _0x2182c3;}});}['editEmail'](_0x3ae086,_0x1f0bed,_0x456e79){return __awaiter$b(this,void 0,void 0,function*(){const _0x1c28e2=this['path']+'/email/'+_0x3ae086+'/',_0x4e09ac=yield this['fetch']['put'](_0x1c28e2,_0x456e79,{'new_email_address':_0x1f0bed});try{if(_0x4e09ac['status']>0xc7&&_0x4e09ac['status']<0x12c)return new SuccessfulResponse({});const _0x1088fc=yield _0x4e09ac['json']();return new FailedResponse(_0x1088fc);}catch(_0x5691d3){if(_0x5691d3 instanceof Error)return new FailedResponse({'detail':_0x5691d3['message'],'title':_0x5691d3['name'],'status':0x1f4,'instance':'','type':''});throw _0x5691d3;}});}['editPassword'](_0x19ab14,_0x32be0e,_0x352008,_0x56d9dd){return __awaiter$b(this,void 0,void 0,function*(){const _0x2c388a=this['path']+'/password/'+_0x19ab14+'/',_0x400dbc=yield this['fetch']['put'](_0x2c388a,_0x56d9dd,{'new_password':_0x352008,'password':_0x32be0e});try{if(_0x400dbc['status']>0xc7&&_0x400dbc['status']<0x12c){const _0x49bd1c=yield _0x400dbc['json']();return new SuccessfulAccountResponse(_0x49bd1c);}const _0x218251=yield _0x400dbc['json']();return new FailedAccountResponse(_0x218251);}catch(_0x183966){if(_0x183966 instanceof Error)return new FailedAccountResponse({'detail':_0x183966['message'],'title':_0x183966['name'],'status':0x1f4,'instance':'','type':''});throw _0x183966;}});}['editCountry'](_0x13da01,_0x54da63,_0x13d448){return __awaiter$b(this,void 0,void 0,function*(){const _0x44ab57=this['path']+'/country/'+_0x13da01+'/',_0x310124=yield this['fetch']['put'](_0x44ab57,_0x13d448,{'new_country':_0x54da63});try{if(_0x310124['status']>0xc7&&_0x310124['status']<0x12c){const _0x1c10b2=yield _0x310124['json']();return new SuccessfulAccountResponse(_0x1c10b2);}const _0x2d20e1=yield _0x310124['json']();return new FailedAccountResponse(_0x2d20e1);}catch(_0x142b62){if(_0x142b62 instanceof Error)return new FailedAccountResponse({'detail':_0x142b62['message'],'title':_0x142b62['name'],'status':0x1f4,'instance':'','type':''});throw _0x142b62;}});}['delete'](_0x16c1e8,_0x175222){return __awaiter$b(this,void 0,void 0,function*(){const _0x38c7a4=this['path']+'/'+_0x16c1e8,_0x489acf=yield this['fetch']['delete'](_0x38c7a4,_0x175222);try{if(_0x489acf['status']>0xc7&&_0x489acf['status']<0x12c)return new SuccessfulResponse({});const _0x10277c=yield _0x489acf['json']();return new FailedResponse(_0x10277c);}catch(_0x39182b){if(_0x39182b instanceof Error)return new FailedResponse({'detail':_0x39182b['message'],'title':_0x39182b['name'],'status':0x1f4,'instance':'','type':''});throw _0x39182b;}});}}
|
|
6
6
|
|
|
7
|
-
var __awaiter$a=undefined&&undefined['__awaiter']||function(
|
|
7
|
+
var __awaiter$a=undefined&&undefined['__awaiter']||function(_0x2c83bc,_0x5f0fa5,_0x18c92e,_0xfc5469){function _0x2a32e7(_0x2f4d64){return _0x2f4d64 instanceof _0x18c92e?_0x2f4d64:new _0x18c92e(function(_0xcad4dc){_0xcad4dc(_0x2f4d64);});}return new(_0x18c92e||(_0x18c92e=Promise))(function(_0x11dd63,_0x5df3a6){function _0x30f008(_0x2bd6d8){try{_0x4bfae1(_0xfc5469['next'](_0x2bd6d8));}catch(_0x2575e1){_0x5df3a6(_0x2575e1);}}function _0x5bc252(_0x51b25c){try{_0x4bfae1(_0xfc5469['throw'](_0x51b25c));}catch(_0x1fcb94){_0x5df3a6(_0x1fcb94);}}function _0x4bfae1(_0x317824){_0x317824['done']?_0x11dd63(_0x317824['value']):_0x2a32e7(_0x317824['value'])['then'](_0x30f008,_0x5bc252);}_0x4bfae1((_0xfc5469=_0xfc5469['apply'](_0x2c83bc,_0x5f0fa5||[]))['next']());});};class ApiKeyService{constructor(_0x1ca68a){this['fetch']=_0x1ca68a,this['path']='api-key';}['create'](_0x16110f,_0x26d056,_0x2278c8){return __awaiter$a(this,void 0,void 0,function*(){const _0x41a680={'account_name':_0x16110f,'api_key_name':_0x26d056};try{const _0x5cd408=yield this['fetch']['post'](this['path'],_0x2278c8,_0x41a680);if(_0x5cd408['status']>0xc7&&_0x5cd408['status']<0x12c){const _0x7a9dac=yield _0x5cd408['json']();return new SuccessfulApiKeyResponse(_0x7a9dac);}const _0x457264=yield _0x5cd408['json']();return new FailedApiKeyResponse(_0x457264);}catch(_0x3569b9){if(_0x3569b9 instanceof Error)return new FailedApiKeyResponse({'detail':_0x3569b9['message'],'title':_0x3569b9['name'],'status':0x1f4,'instance':'','type':''});throw _0x3569b9;}});}['view'](_0x2c70e1,_0x1652e8,_0x442ae3){return __awaiter$a(this,void 0,void 0,function*(){const _0xbf0a81=this['path']+'/'+_0x2c70e1+'/'+_0x1652e8;try{const _0x128f51=yield this['fetch']['get'](_0xbf0a81,_0x442ae3);if(_0x128f51['status']>0xc7&&_0x128f51['status']<0x12c){const _0x89517c=yield _0x128f51['json']();return new SuccessfulApiKeyValueResponse(_0x89517c);}const _0x3a56c0=yield _0x128f51['json']();return new FailedApiKeyValueResponse(_0x3a56c0);}catch(_0x4609b1){if(_0x4609b1 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x4609b1['message'],'title':_0x4609b1['name'],'status':0x1f4,'instance':'','type':''});throw _0x4609b1;}});}['delete'](_0x4c70ea,_0x38c0d2,_0x5f35ee){return __awaiter$a(this,void 0,void 0,function*(){const _0x1f65b5=this['path']+'/'+_0x4c70ea+'/'+_0x38c0d2;try{const _0x200aba=yield this['fetch']['delete'](_0x1f65b5,_0x5f35ee);if(_0x200aba['status']>0xc7&&_0x200aba['status']<0x12c)return new SuccessfulResponse({});const _0x23cf1f=yield _0x200aba['json']();return new FailedResponse(_0x23cf1f);}catch(_0x127a66){if(_0x127a66 instanceof Error)return new FailedResponse({'detail':_0x127a66['message'],'title':_0x127a66['name'],'status':0x1f4,'instance':'','type':''});throw _0x127a66;}});}}
|
|
8
8
|
|
|
9
|
-
var __awaiter$9=undefined&&undefined['__awaiter']||function(
|
|
9
|
+
var __awaiter$9=undefined&&undefined['__awaiter']||function(_0x3274f8,_0x11b66f,_0x588f5e,_0x355173){function _0x1724a2(_0x270b9b){return _0x270b9b instanceof _0x588f5e?_0x270b9b:new _0x588f5e(function(_0x29cfd3){_0x29cfd3(_0x270b9b);});}return new(_0x588f5e||(_0x588f5e=Promise))(function(_0x31c0d6,_0xe6b808){function _0x4eb75b(_0x1c1fe9){try{_0x456699(_0x355173['next'](_0x1c1fe9));}catch(_0x2f8590){_0xe6b808(_0x2f8590);}}function _0x59cc50(_0x2fced4){try{_0x456699(_0x355173['throw'](_0x2fced4));}catch(_0x44af7b){_0xe6b808(_0x44af7b);}}function _0x456699(_0x2fc5cf){_0x2fc5cf['done']?_0x31c0d6(_0x2fc5cf['value']):_0x1724a2(_0x2fc5cf['value'])['then'](_0x4eb75b,_0x59cc50);}_0x456699((_0x355173=_0x355173['apply'](_0x3274f8,_0x11b66f||[]))['next']());});};class ListService{constructor(_0x1e9e28){this['fetch']=_0x1e9e28,this['path']='list',this['Coordinates']=new CoordinatesService(_0x1e9e28),this['GeneratedSuggestions']=new GeneratedSuggestionsService(_0x1e9e28);}['create'](_0x1f92e4,_0x552d6e,_0x1023b3,_0x3f2532){return __awaiter$9(this,void 0,void 0,function*(){const _0x38d447={'account_name':_0x1f92e4,'list_name':_0x552d6e,'search_service_name':_0x1023b3};try{const _0xd7569d=yield this['fetch']['post'](this['path'],_0x3f2532,_0x38d447);if(_0xd7569d['status']>0xc7&&_0xd7569d['status']<0x12c){const _0x34128b=yield _0xd7569d['json']();return new SuccessfulListIdentityResponse(_0x34128b);}const _0x43264a=yield _0xd7569d['json']();return new FailedListIdentityResponse(_0x43264a);}catch(_0x490347){if(_0x490347 instanceof Error)return new FailedListIdentityResponse({'detail':_0x490347['message'],'title':_0x490347['name'],'status':0x1f4,'instance':'','type':''});throw _0x490347;}});}['delete'](_0x31311e,_0x124034,_0x2259f1){return __awaiter$9(this,void 0,void 0,function*(){const _0x18563f=this['path']+'/'+_0x31311e+'/'+_0x124034,_0xd2b847=yield this['fetch']['delete'](_0x18563f,_0x2259f1);try{if(_0xd2b847['status']>0xc7&&_0xd2b847['status']<0x12c)return new SuccessfulResponse({});const _0xe10b3=yield _0xd2b847['json']();return new FailedResponse(_0xe10b3);}catch(_0x96f3bb){if(_0x96f3bb instanceof Error)return new FailedResponse({'detail':_0x96f3bb['message'],'title':_0x96f3bb['name'],'status':0x1f4,'instance':'','type':''});throw _0x96f3bb;}});}['get'](_0x309837,_0x79193b,_0x550fdd){return __awaiter$9(this,void 0,void 0,function*(){const _0x431c2f=this['path']+'/'+_0x309837+'/'+_0x79193b;try{const _0x2dece7=yield this['fetch']['get'](_0x431c2f,_0x550fdd);if(_0x2dece7['status']>0xc7&&_0x2dece7['status']<0x12c){const _0x543f2c=yield _0x2dece7['json']();return new SuccessfulListResponse(_0x543f2c);}const _0x25e5c6=yield _0x2dece7['json']();return new FailedListResponse(_0x25e5c6);}catch(_0x1cf30e){if(_0x1cf30e instanceof Error)return new FailedListResponse({'detail':_0x1cf30e['message'],'title':_0x1cf30e['name'],'status':0x1f4,'instance':'','type':''});throw _0x1cf30e;}});}['edit'](_0xb6dff8,_0x38fd85,_0x3775a6,_0xa8c03b){return __awaiter$9(this,void 0,void 0,function*(){const _0x4f947b=this['path']+'/'+_0xb6dff8+'/'+_0x38fd85,_0x233ae1=yield this['fetch']['put'](_0x4f947b,_0x3775a6,_0xa8c03b);try{if(_0x233ae1['status']>0xc7&&_0x233ae1['status']<0x12c){const _0x4baf09=yield _0x233ae1['json']();return new SuccessfulListResponse(_0x4baf09);}const _0x54a292=yield _0x233ae1['json']();return new FailedListResponse(_0x54a292);}catch(_0x2ab1a1){if(_0x2ab1a1 instanceof Error)return new FailedListResponse({'detail':_0x2ab1a1['message'],'title':_0x2ab1a1['name'],'status':0x1f4,'instance':'','type':''});throw _0x2ab1a1;}});}['transfer'](_0xae66c3,_0x2a59a2,_0x319b45,_0x6b4666){return __awaiter$9(this,void 0,void 0,function*(){const _0x3a4c42={'new_search_service_name':_0x319b45};try{const _0x1c2ce2=yield this['fetch']['put'](this['path']+'/transfer/'+_0xae66c3+'/'+_0x2a59a2,_0x6b4666,_0x3a4c42);if(_0x1c2ce2['status']>0xc7&&_0x1c2ce2['status']<0x12c){const _0x19a181=yield _0x1c2ce2['json']();return new SuccessfulListResponse(_0x19a181);}const _0x3daa54=yield _0x1c2ce2['json']();return new FailedListResponse(_0x3daa54);}catch(_0x3e276e){if(_0x3e276e instanceof Error)return new FailedListResponse({'detail':_0x3e276e['message'],'title':_0x3e276e['name'],'status':0x1f4,'instance':'','type':''});throw _0x3e276e;}});}}class CoordinatesService{constructor(_0x585045){this['fetch']=_0x585045,this['path']='list/coordinates';}['add'](_0x49bc20,_0x1c8ac3,_0x1a418a){return __awaiter$9(this,void 0,void 0,function*(){const _0x35b8a1=this['path']+'/'+_0x49bc20+'/'+_0x1c8ac3,_0xbbeac7=yield this['fetch']['post'](_0x35b8a1,_0x1a418a,{});try{if(_0xbbeac7['status']>0xc7&&_0xbbeac7['status']<0x12c){const _0x18840e=yield _0xbbeac7['json']();return new SuccessfulListResponse(_0x18840e);}const _0x2d5710=yield _0xbbeac7['json']();return new FailedListResponse(_0x2d5710);}catch(_0x41448f){if(_0x41448f instanceof Error)return new FailedListResponse({'detail':_0x41448f['message'],'title':_0x41448f['name'],'status':0x1f4,'instance':'','type':''});throw _0x41448f;}});}['remove'](_0x126cc4,_0x223169,_0x666a77){return __awaiter$9(this,void 0,void 0,function*(){const _0x4cc907=this['path']+'/'+_0x126cc4+'/'+_0x223169,_0x1b9644=yield this['fetch']['delete'](_0x4cc907,_0x666a77);try{if(_0x1b9644['status']>0xc7&&_0x1b9644['status']<0x12c){const _0x47b32c=yield _0x1b9644['json']();return new SuccessfulListResponse(_0x47b32c);}const _0x8b4afb=yield _0x1b9644['json']();return new FailedListResponse(_0x8b4afb);}catch(_0x3306b3){if(_0x3306b3 instanceof Error)return new FailedListResponse({'detail':_0x3306b3['message'],'title':_0x3306b3['name'],'status':0x1f4,'instance':'','type':''});throw _0x3306b3;}});}}class GeneratedSuggestionsService{constructor(_0x2477f5){this['fetch']=_0x2477f5,this['path']='list/generated-suggestions';}['add'](_0x475d41,_0x1bbcd7,_0x43bfe6,_0x35d7d9,_0x248dd4,_0x25e70f,_0x569fcc){return __awaiter$9(this,void 0,void 0,function*(){const _0x46f4cf=this['path']+'/'+_0x475d41+'/'+_0x1bbcd7,_0xfcaa22=yield this['fetch']['post'](_0x46f4cf,_0x569fcc,{'target_list_name':_0x43bfe6,'minimum_result_count':_0x35d7d9,'is_active':_0x248dd4,'minimum_characters':_0x25e70f});try{if(_0xfcaa22['status']>0xc7&&_0xfcaa22['status']<0x12c){const _0xe22aeb=yield _0xfcaa22['json']();return new SuccessfulListResponse(_0xe22aeb);}const _0x1ff670=yield _0xfcaa22['json']();return new FailedListResponse(_0x1ff670);}catch(_0xae71ed){if(_0xae71ed instanceof Error)return new FailedListResponse({'detail':_0xae71ed['message'],'title':_0xae71ed['name'],'status':0x1f4,'instance':'','type':''});throw _0xae71ed;}});}['remove'](_0x3a1634,_0x4e07ec,_0x2e924c){return __awaiter$9(this,void 0,void 0,function*(){const _0x472836=this['path']+'/'+_0x3a1634+'/'+_0x4e07ec,_0x2985e1=yield this['fetch']['delete'](_0x472836,_0x2e924c);try{if(_0x2985e1['status']>0xc7&&_0x2985e1['status']<0x12c){const _0x45e80f=yield _0x2985e1['json']();return new SuccessfulListResponse(_0x45e80f);}const _0x341546=yield _0x2985e1['json']();return new FailedListResponse(_0x341546);}catch(_0x3a031e){if(_0x3a031e instanceof Error)return new FailedListResponse({'detail':_0x3a031e['message'],'title':_0x3a031e['name'],'status':0x1f4,'instance':'','type':''});throw _0x3a031e;}});}['edit'](_0x4cd347,_0xc3fc5d,_0x85c6e8,_0x172e79){return __awaiter$9(this,void 0,void 0,function*(){const _0x2c2e24=this['path']+'/'+_0x4cd347+'/'+_0xc3fc5d;_0x172e79=_0x172e79!==null&&_0x172e79!==void 0?_0x172e79:{};const _0x140e2d=yield this['fetch']['put'](_0x2c2e24,_0x85c6e8,_0x172e79);try{if(_0x140e2d['status']>0xc7&&_0x140e2d['status']<0x12c){const _0x2b612a=yield _0x140e2d['json']();return new SuccessfulListResponse(_0x2b612a);}const _0x99fba=yield _0x140e2d['json']();return new FailedListResponse(_0x99fba);}catch(_0x3fd710){if(_0x3fd710 instanceof Error)return new FailedListResponse({'detail':_0x3fd710['message'],'title':_0x3fd710['name'],'status':0x1f4,'instance':'','type':''});throw _0x3fd710;}});}}
|
|
10
10
|
|
|
11
|
-
var __awaiter$8=undefined&&undefined['__awaiter']||function(
|
|
11
|
+
var __awaiter$8=undefined&&undefined['__awaiter']||function(_0x19264b,_0x50efe1,_0x2f5fa3,_0x311fec){function _0x2613b0(_0x14a99b){return _0x14a99b instanceof _0x2f5fa3?_0x14a99b:new _0x2f5fa3(function(_0x38b4c7){_0x38b4c7(_0x14a99b);});}return new(_0x2f5fa3||(_0x2f5fa3=Promise))(function(_0x3e1a9e,_0x3b0e61){function _0x22624d(_0x32acc6){try{_0x3b867b(_0x311fec['next'](_0x32acc6));}catch(_0x1f2f7d){_0x3b0e61(_0x1f2f7d);}}function _0x12b9eb(_0x29baf1){try{_0x3b867b(_0x311fec['throw'](_0x29baf1));}catch(_0x5bd82e){_0x3b0e61(_0x5bd82e);}}function _0x3b867b(_0x263743){_0x263743['done']?_0x3e1a9e(_0x263743['value']):_0x2613b0(_0x263743['value'])['then'](_0x22624d,_0x12b9eb);}_0x3b867b((_0x311fec=_0x311fec['apply'](_0x19264b,_0x50efe1||[]))['next']());});};class Fetch{constructor(_0xdf1583){this['baseUri']=_0xdf1583,this['getUrl']=_0x55d2e5=>{return _0x55d2e5['startsWith']('/')&&(_0x55d2e5=_0x55d2e5['replace']('/','')),''+this['baseUri']+_0x55d2e5;},!_0xdf1583['endsWith']('/')&&(_0xdf1583=_0xdf1583+'/');}['get'](_0x54df2e,_0x4b31ed){return __awaiter$8(this,void 0,void 0,function*(){const _0x3c054e=this['getUrl'](_0x54df2e);return yield fetch(_0x3c054e,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4b31ed}});});}['post'](_0x424a89,_0x9df8b4,_0x550c3a){return __awaiter$8(this,void 0,void 0,function*(){const _0x44592a=this['getUrl'](_0x424a89);return yield fetch(_0x44592a,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x9df8b4},'body':_0x550c3a?JSON['stringify'](_0x550c3a):null});});}['upload'](_0x57a478,_0x451c7b,_0x39b74c){return __awaiter$8(this,void 0,void 0,function*(){const _0xe9916b=this['getUrl'](_0x57a478);return yield fetch(_0xe9916b,{'method':'POST','headers':{'Authorization':'Bearer\x20'+_0x451c7b},'body':_0x39b74c});});}['PostNoAuth'](_0x292305,_0x5366fd){return __awaiter$8(this,void 0,void 0,function*(){const _0x3a0447=this['getUrl'](_0x292305);return yield fetch(_0x3a0447,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0x5366fd?JSON['stringify'](_0x5366fd):null});});}['put'](_0x559003,_0x387aad,_0x542046){return __awaiter$8(this,void 0,void 0,function*(){const _0x565138=this['getUrl'](_0x559003);return yield fetch(_0x565138,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x387aad},'body':_0x542046?JSON['stringify'](_0x542046):null});});}['delete'](_0x515b83,_0x2a0405){return __awaiter$8(this,void 0,void 0,function*(){const _0x2cf4d0=this['getUrl'](_0x515b83);return yield fetch(_0x2cf4d0,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2a0405}});});}}
|
|
12
12
|
|
|
13
|
-
var __awaiter$7=undefined&&undefined['__awaiter']||function(
|
|
13
|
+
var __awaiter$7=undefined&&undefined['__awaiter']||function(_0x524046,_0x5763d3,_0x23805c,_0x2c763d){function _0x23e307(_0x1eb26b){return _0x1eb26b instanceof _0x23805c?_0x1eb26b:new _0x23805c(function(_0x4c2002){_0x4c2002(_0x1eb26b);});}return new(_0x23805c||(_0x23805c=Promise))(function(_0x3326df,_0x33a5ef){function _0x42cbb9(_0x54a481){try{_0x1574bd(_0x2c763d['next'](_0x54a481));}catch(_0x20d657){_0x33a5ef(_0x20d657);}}function _0x5d4b2b(_0x48342c){try{_0x1574bd(_0x2c763d['throw'](_0x48342c));}catch(_0x452d83){_0x33a5ef(_0x452d83);}}function _0x1574bd(_0x85ab09){_0x85ab09['done']?_0x3326df(_0x85ab09['value']):_0x23e307(_0x85ab09['value'])['then'](_0x42cbb9,_0x5d4b2b);}_0x1574bd((_0x2c763d=_0x2c763d['apply'](_0x524046,_0x5763d3||[]))['next']());});};class SearchServersService{constructor(_0x120fbb){this['fetch']=_0x120fbb,this['path']='search-service';}['create'](_0x237140,_0x13eaea,_0x474e61,_0x103bdc,_0x3e9974,_0x159138,_0x4521d4,_0xae2f7d){return __awaiter$7(this,void 0,void 0,function*(){const _0x4e161a={'account_name':_0x237140,'search_service_name':_0x13eaea,'endpoint':_0x474e61,'key':_0x103bdc,'country':_0x3e9974,'provider':_0x159138,'index_name':_0x4521d4};try{const _0xbfb132=yield this['fetch']['post'](this['path'],_0xae2f7d,_0x4e161a);if(_0xbfb132['status']>0xc7&&_0xbfb132['status']<0x12c){const _0x3184d6=yield _0xbfb132['json']();return new SuccessfulSearchServiceResponse(_0x3184d6);}const _0x4ffaab=yield _0xbfb132['json']();return new FailedSearchServiceResponse(_0x4ffaab);}catch(_0x4d92d8){if(_0x4d92d8 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x4d92d8['message'],'title':_0x4d92d8['name'],'status':0x1f4,'instance':'','type':''});throw _0x4d92d8;}});}['view'](_0x207e77,_0x375b15,_0x13c612){return __awaiter$7(this,void 0,void 0,function*(){const _0x1a8483=this['path']+'/'+_0x207e77+'/'+_0x375b15;try{const _0x162d89=yield this['fetch']['get'](_0x1a8483,_0x13c612);if(_0x162d89['status']>0xc7&&_0x162d89['status']<0x12c){const _0x3e9028=yield _0x162d89['json']();return new SuccessfulViewSearchServiceResponse(_0x3e9028);}const _0x595e93=yield _0x162d89['json']();return new FailedViewSearchServiceResponse(_0x595e93);}catch(_0x213af2){if(_0x213af2 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x213af2['message'],'title':_0x213af2['name'],'status':0x1f4,'instance':'','type':''});throw _0x213af2;}});}['edit'](_0x1a86e1,_0x3661d4,_0x51e4fd,_0x238caa){return __awaiter$7(this,void 0,void 0,function*(){const _0x38e97a={'account_name':_0x1a86e1,'search_service_name':_0x3661d4,'key':_0x51e4fd};try{const _0x43d839=yield this['fetch']['put'](this['path'],_0x238caa,_0x38e97a);if(_0x43d839['status']>0xc7&&_0x43d839['status']<0x12c){const _0x55bcf5=yield _0x43d839['json']();return new SuccessfulSearchServiceResponse(_0x55bcf5);}const _0xdaf494=yield _0x43d839['json']();return new FailedSearchServiceResponse(_0xdaf494);}catch(_0x4e6d58){if(_0x4e6d58 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x4e6d58['message'],'title':_0x4e6d58['name'],'status':0x1f4,'instance':'','type':''});throw _0x4e6d58;}});}}
|
|
14
14
|
|
|
15
|
-
var __awaiter$6=undefined&&undefined['__awaiter']||function(
|
|
15
|
+
var __awaiter$6=undefined&&undefined['__awaiter']||function(_0x1a2df5,_0x2122ca,_0x1b1300,_0x443e85){function _0x317a85(_0x123d2e){return _0x123d2e instanceof _0x1b1300?_0x123d2e:new _0x1b1300(function(_0x5a78b8){_0x5a78b8(_0x123d2e);});}return new(_0x1b1300||(_0x1b1300=Promise))(function(_0x15b69c,_0x415db6){function _0x3bc1b2(_0x5882a8){try{_0x40220b(_0x443e85['next'](_0x5882a8));}catch(_0x4f0343){_0x415db6(_0x4f0343);}}function _0x32daeb(_0x64f754){try{_0x40220b(_0x443e85['throw'](_0x64f754));}catch(_0x4ae86d){_0x415db6(_0x4ae86d);}}function _0x40220b(_0x5df992){_0x5df992['done']?_0x15b69c(_0x5df992['value']):_0x317a85(_0x5df992['value'])['then'](_0x3bc1b2,_0x32daeb);}_0x40220b((_0x443e85=_0x443e85['apply'](_0x1a2df5,_0x2122ca||[]))['next']());});};class FacetService{constructor(_0x6fdd16){this['fetch']=_0x6fdd16,this['path']='facet';}['create'](_0x7e1bc,_0xa52402,_0x205976,_0x11069c){return __awaiter$6(this,void 0,void 0,function*(){const _0x2bb78a={'account_name':_0x7e1bc,'list_name':_0xa52402,'facet_name':_0x205976};try{const _0x244d52=yield this['fetch']['post'](this['path'],_0x11069c,_0x2bb78a);if(_0x244d52['status']>0xc7&&_0x244d52['status']<0x12c){const _0x412053=yield _0x244d52['json']();return new SuccessfulFacetResponse(_0x412053);}const _0x21864b=yield _0x244d52['json']();return new FailedFacetResponse(_0x21864b);}catch(_0x336b9f){if(_0x336b9f instanceof Error)return new FailedFacetResponse({'detail':_0x336b9f['message'],'title':_0x336b9f['name'],'status':0x1f4,'instance':'','type':''});throw _0x336b9f;}});}['remove'](_0xa0193,_0x3767ed,_0x361c07,_0x1225ed){return __awaiter$6(this,void 0,void 0,function*(){const _0x39d9da='Facet/'+_0xa0193+'/'+_0x3767ed+'/'+_0x361c07,_0x511f52=yield this['fetch']['delete'](_0x39d9da,_0x1225ed);try{if(_0x511f52['status']>0xc7&&_0x511f52['status']<0x12c)return new SuccessfulResponse({});const _0x31d0d3=yield _0x511f52['json']();return new FailedResponse(_0x31d0d3);}catch(_0x53f3a9){if(_0x53f3a9 instanceof Error)return new FailedResponse({'detail':_0x53f3a9['message'],'title':_0x53f3a9['name'],'status':0x1f4,'instance':'','type':''});throw _0x53f3a9;}});}['rename'](_0x1a28db,_0x185c1e,_0x2fb6ac,_0x19007e,_0xe21b9){return __awaiter$6(this,void 0,void 0,function*(){let _0xde7877=this['path']+'/'+_0x1a28db+'/'+_0x185c1e+'/'+_0x2fb6ac;const _0x33df16={'new_facet_name':_0x19007e};try{const _0x26a091=yield this['fetch']['put'](_0xde7877,_0xe21b9,_0x33df16);if(_0x26a091['status']>0xc7&&_0x26a091['status']<0x12c){const _0x1e28ef=yield _0x26a091['json']();return new SuccessfulFacetResponse(_0x1e28ef);}const _0x1d9966=yield _0x26a091['json']();return new FailedFacetResponse(_0x1d9966);}catch(_0x20e027){if(_0x20e027 instanceof Error)return new FailedFacetResponse({'detail':_0x20e027['message'],'title':_0x20e027['name'],'status':0x1f4,'instance':'','type':''});throw _0x20e027;}});}['list'](_0x485acc,_0x493562,_0x12f048,_0x4f7b7a,_0x31eccb){return __awaiter$6(this,void 0,void 0,function*(){let _0x39b45a=this['path']+'/'+_0x485acc+'/'+_0x493562+'/'+_0x12f048+'/'+_0x4f7b7a;try{const _0x1c0f6c=yield this['fetch']['get'](_0x39b45a,_0x31eccb);if(_0x1c0f6c['status']>0xc7&&_0x1c0f6c['status']<0x12c){const _0x5010c2=yield _0x1c0f6c['json']();return new SuccessfulFacetValueResponse(_0x5010c2);}const _0x2f62be=yield _0x1c0f6c['json']();return new FailedFacetValuesResponse(_0x2f62be);}catch(_0xc0343e){if(_0xc0343e instanceof Error)return new FailedFacetValuesResponse({'detail':_0xc0343e['message'],'title':_0xc0343e['name'],'status':0x1f4,'instance':'','type':''});throw _0xc0343e;}});}}
|
|
16
16
|
|
|
17
|
-
var __awaiter$5=undefined&&undefined['__awaiter']||function(
|
|
17
|
+
var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x26aa9a,_0x11281f,_0x2d9d1f,_0xe515ba){function _0x59a61a(_0x892a78){return _0x892a78 instanceof _0x2d9d1f?_0x892a78:new _0x2d9d1f(function(_0x5564e6){_0x5564e6(_0x892a78);});}return new(_0x2d9d1f||(_0x2d9d1f=Promise))(function(_0x4904b6,_0x1db60d){function _0x448f2b(_0x59ebcd){try{_0x47aa06(_0xe515ba['next'](_0x59ebcd));}catch(_0x4db251){_0x1db60d(_0x4db251);}}function _0x403676(_0xbc9381){try{_0x47aa06(_0xe515ba['throw'](_0xbc9381));}catch(_0x37aec6){_0x1db60d(_0x37aec6);}}function _0x47aa06(_0x367d0f){_0x367d0f['done']?_0x4904b6(_0x367d0f['value']):_0x59a61a(_0x367d0f['value'])['then'](_0x448f2b,_0x403676);}_0x47aa06((_0xe515ba=_0xe515ba['apply'](_0x26aa9a,_0x11281f||[]))['next']());});};class SearchResultService{constructor(_0x2299a9){this['fetch']=_0x2299a9,this['path']='search-result',this['isRealNumber']=_0x3dbb53=>_0x3dbb53!=undefined&&typeof _0x3dbb53==='number'&&Number['isFinite'](_0x3dbb53);}['create'](_0x11a42e,_0x513556,_0x3ddd16,_0x32da21,_0x3662e1){return __awaiter$5(this,void 0,void 0,function*(){const _0x5f3251=Object['assign']({'account_name':_0x11a42e,'search_result_name':_0x3ddd16,'list_name':_0x513556},_0x3662e1);try{const _0x57854c=yield this['fetch']['post'](this['path'],_0x32da21,_0x5f3251);if(_0x57854c['status']>0xc7&&_0x57854c['status']<0x12c){const _0x183573=yield _0x57854c['json']();return new SuccessfulSearchResultResponse(_0x183573);}const _0xa9e03=yield _0x57854c['json']();return new FailedSearchResultResponse(_0xa9e03);}catch(_0x1d1a33){if(_0x1d1a33 instanceof Error)return new FailedSearchResultResponse({'detail':_0x1d1a33['message'],'title':_0x1d1a33['name'],'status':0x1f4,'instance':'','type':''});throw _0x1d1a33;}});}['list'](_0x152838,_0x2ecb2c,_0x24cd76,_0x57d4f6){return __awaiter$5(this,void 0,void 0,function*(){let _0x5ee4fa=this['path']+'/'+_0x152838+'/'+_0x2ecb2c+'?'+this['getQueryStr'](_0x57d4f6);try{const _0x58ebe9=yield this['fetch']['get'](_0x5ee4fa,_0x24cd76);if(_0x58ebe9['status']>0xc7&&_0x58ebe9['status']<0x12c){const _0x1a5662=yield _0x58ebe9['json']();return new SuccessfulListSearchResultResponse(_0x1a5662);}const _0x289d99=yield _0x58ebe9['json']();return new FailedViewSearchResultResponse(_0x289d99);}catch(_0x2001c9){if(_0x2001c9 instanceof Error)return new FailedViewSearchResultResponse({'detail':_0x2001c9['message'],'title':_0x2001c9['name'],'status':0x1f4,'instance':'','type':''});throw _0x2001c9;}});}['get'](_0x49e0cb,_0x34bb60,_0x2e0396,_0x8d25a2){return __awaiter$5(this,void 0,void 0,function*(){let _0xec8c87=this['path']+'/'+_0x49e0cb+'/'+_0x34bb60+'?'+_0x2e0396;try{const _0xb33d30=yield this['fetch']['get'](_0xec8c87,_0x8d25a2);if(_0xb33d30['status']>0xc7&&_0xb33d30['status']<0x12c){const _0x27ad3f=yield _0xb33d30['json']();return new SuccessfulSearchResultResponse(_0x27ad3f);}const _0x36384d=yield _0xb33d30['json']();return new FailedSearchResultResponse(_0x36384d);}catch(_0x4c63f9){if(_0x4c63f9 instanceof Error)return new FailedSearchResultResponse({'detail':_0x4c63f9['message'],'title':_0x4c63f9['name'],'status':0x1f4,'instance':'','type':''});throw _0x4c63f9;}});}['delete'](_0x299486,_0x51f325,_0x21c667,_0x4837cc){return __awaiter$5(this,void 0,void 0,function*(){const _0x166a0d=this['path']+'/'+_0x299486+'/'+_0x51f325+'/'+_0x21c667,_0x36a067=yield this['fetch']['delete'](_0x166a0d,_0x4837cc);try{if(_0x36a067['status']>0xc7&&_0x36a067['status']<0x12c)return new SuccessfulResponse({});const _0x4dca8e=yield _0x36a067['json']();return new FailedResponse(_0x4dca8e);}catch(_0x297f16){if(_0x297f16 instanceof Error)return new FailedResponse({'detail':_0x297f16['message'],'title':_0x297f16['name'],'status':0x1f4,'instance':'','type':''});throw _0x297f16;}});}['upload'](_0x3351d7,_0x377db6,_0x596dd2,_0x32c09f,_0xaacb28,_0x3d4647){return __awaiter$5(this,void 0,void 0,function*(){const _0x5c3c4d=this['path']+'/'+_0x3351d7+'/'+_0x377db6+'/upload',_0x30ec59=new FormData();_0x30ec59['append']('file',_0x596dd2),_0x30ec59['append']('name_field',_0xaacb28),_0x30ec59['append']('create_fields',_0x32c09f['toString']());try{const _0x3a5de3=yield this['fetch']['upload'](_0x5c3c4d,_0x3d4647,_0x30ec59);if(_0x3a5de3['status']>0xc7&&_0x3a5de3['status']<0x12c){const _0x556086=yield _0x3a5de3['json']();return new SuccessfulListResponse(_0x556086);}const _0x13fcf3=yield _0x3a5de3['json']();return new FailedListResponse(_0x13fcf3);}catch(_0x3f5299){if(_0x3f5299 instanceof Error)return new FailedListResponse({'detail':_0x3f5299['message'],'title':_0x3f5299['name'],'status':0x1f4,'instance':'','type':''});throw _0x3f5299;}});}['edit'](_0x51bf63,_0x35e62a,_0x55c4d0,_0x4c8303,_0x3cba54){return __awaiter$5(this,void 0,void 0,function*(){const _0x7ef794=this['path']+'/'+_0x51bf63+'/'+_0x35e62a+'/'+_0x55c4d0;try{const _0x1e028e=yield this['fetch']['put'](_0x7ef794,_0x4c8303,_0x3cba54);if(_0x1e028e['status']>0xc7&&_0x1e028e['status']<0x12c){const _0x4e4376=yield _0x1e028e['json']();return new SuccessfulSearchResultResponse(_0x4e4376);}const _0x5ae484=yield _0x1e028e['json']();return new FailedSearchResultResponse(_0x5ae484);}catch(_0x212efd){if(_0x212efd instanceof Error)return new FailedSearchResultResponse({'detail':_0x212efd['message'],'title':_0x212efd['name'],'status':0x1f4,'instance':'','type':''});throw _0x212efd;}});}['getQueryStr'](_0x161541){let _0x1d8ae4='';const _0x43ea7b=[];(_0x161541===null||_0x161541===void 0?void 0:_0x161541['size'])&&_0x43ea7b['push']('size='+_0x161541['size']);(_0x161541===null||_0x161541===void 0?void 0:_0x161541['skip'])&&_0x43ea7b['push']('skip='+_0x161541['skip']);(_0x161541===null||_0x161541===void 0?void 0:_0x161541['query'])&&_0x43ea7b['push']('query='+_0x161541['query']);(_0x161541===null||_0x161541===void 0?void 0:_0x161541['filter'])&&_0x43ea7b['push']('filter='+_0x161541['filter']);if((_0x161541===null||_0x161541===void 0?void 0:_0x161541['radius'])&&this['isRealNumber'](_0x161541['radius']['latitude'])&&this['isRealNumber'](_0x161541['radius']['longitude'])&&this['isRealNumber'](_0x161541['radius']['distance'])){const _0x47f84f=_0x161541['radius']['latitude']+','+_0x161541['radius']['longitude']+','+_0x161541['radius']['distance'];_0x43ea7b['push']('radius='+_0x47f84f);}return _0x161541['active']===![]&&_0x43ea7b['push']('active='+_0x161541['active']),_0x43ea7b['length']>0x0&&_0x43ea7b['forEach']((_0x20de2f,_0x57d311)=>{if(_0x57d311>0x0&&_0x1d8ae4)_0x1d8ae4+='&';_0x1d8ae4+=_0x20de2f;}),_0x1d8ae4;}}
|
|
18
18
|
|
|
19
|
-
var __awaiter$4=undefined&&undefined['__awaiter']||function(
|
|
19
|
+
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x4c4fe9,_0x4bf012,_0x28e199,_0x43bf01){function _0x19ff5b(_0x4d06fa){return _0x4d06fa instanceof _0x28e199?_0x4d06fa:new _0x28e199(function(_0x2f56ad){_0x2f56ad(_0x4d06fa);});}return new(_0x28e199||(_0x28e199=Promise))(function(_0x2bca7f,_0x5a1a36){function _0x1c5b1a(_0x2e45da){try{_0x504e39(_0x43bf01['next'](_0x2e45da));}catch(_0x5a0252){_0x5a1a36(_0x5a0252);}}function _0x3c7558(_0x41c6fa){try{_0x504e39(_0x43bf01['throw'](_0x41c6fa));}catch(_0x590d2f){_0x5a1a36(_0x590d2f);}}function _0x504e39(_0x3fa1d8){_0x3fa1d8['done']?_0x2bca7f(_0x3fa1d8['value']):_0x19ff5b(_0x3fa1d8['value'])['then'](_0x1c5b1a,_0x3c7558);}_0x504e39((_0x43bf01=_0x43bf01['apply'](_0x4c4fe9,_0x4bf012||[]))['next']());});};class ContributorService{constructor(_0x2e19c1){this['fetch']=_0x2e19c1,this['path']='contributor';}['create'](_0x15b464,_0x5018a4,_0x13cd05,_0x83638f){return __awaiter$4(this,void 0,void 0,function*(){const _0x41985e={'account_name':_0x15b464,'list_name':_0x5018a4,'contributor_name':_0x13cd05};try{const _0x39622b=yield this['fetch']['post'](this['path'],_0x83638f,_0x41985e);if(_0x39622b['status']>0xc7&&_0x39622b['status']<0x12c){const _0x4b1dca=yield _0x39622b['json']();return new SuccessfulContributorResponse(_0x4b1dca);}const _0x490fe8=yield _0x39622b['json']();return new FailedContributorResponse(_0x490fe8);}catch(_0x50e8b3){if(_0x50e8b3 instanceof Error)return new FailedContributorResponse({'detail':_0x50e8b3['message'],'title':_0x50e8b3['name'],'status':0x1f4,'instance':'','type':''});throw _0x50e8b3;}});}['remove'](_0x4abe25,_0x9cde4,_0x368926,_0x581ca7){return __awaiter$4(this,void 0,void 0,function*(){const _0x533285=this['path']+'/'+_0x4abe25+'/'+_0x9cde4+'/'+_0x368926,_0x5aebc6=yield this['fetch']['delete'](_0x533285,_0x581ca7);try{if(_0x5aebc6['status']>0xc7&&_0x5aebc6['status']<0x12c)return new SuccessfulResponse({});const _0x5a2737=yield _0x5aebc6['json']();return new FailedResponse(_0x5a2737);}catch(_0xc5d7ab){if(_0xc5d7ab instanceof Error)return new FailedResponse({'detail':_0xc5d7ab['message'],'title':_0xc5d7ab['name'],'status':0x1f4,'instance':'','type':''});throw _0xc5d7ab;}});}['startsWith'](_0x57cbcc,_0x3befad){return __awaiter$4(this,void 0,void 0,function*(){const _0x20dcd5=this['path']+'/'+_0x57cbcc;try{const _0x2f2c7c=yield this['fetch']['get'](_0x20dcd5,_0x3befad);if(_0x2f2c7c['status']>0xc7&&_0x2f2c7c['status']<0x12c){const _0x3ca17e=yield _0x2f2c7c['json']();return new SuccessfulAccountAndImageResponse(_0x3ca17e);}const _0x17d887=yield _0x2f2c7c['json']();return new FailedAccountAndImageResponse(_0x17d887);}catch(_0xa83ab7){if(_0xa83ab7 instanceof Error)return new FailedAccountAndImageResponse({'detail':_0xa83ab7['message'],'title':_0xa83ab7['name'],'status':0x1f4,'instance':'','type':''});throw _0xa83ab7;}});}}
|
|
20
20
|
|
|
21
|
-
var __awaiter$3=undefined&&undefined['__awaiter']||function(
|
|
21
|
+
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x30a64a,_0x315051,_0x216812,_0x333aff){function _0x88c8ac(_0x49eb36){return _0x49eb36 instanceof _0x216812?_0x49eb36:new _0x216812(function(_0x33400b){_0x33400b(_0x49eb36);});}return new(_0x216812||(_0x216812=Promise))(function(_0x15cadb,_0x48432a){function _0x578b7f(_0x17a266){try{_0x4e9230(_0x333aff['next'](_0x17a266));}catch(_0x58fc74){_0x48432a(_0x58fc74);}}function _0x33e612(_0x5ce97c){try{_0x4e9230(_0x333aff['throw'](_0x5ce97c));}catch(_0x247cd9){_0x48432a(_0x247cd9);}}function _0x4e9230(_0x49851b){_0x49851b['done']?_0x15cadb(_0x49851b['value']):_0x88c8ac(_0x49851b['value'])['then'](_0x578b7f,_0x33e612);}_0x4e9230((_0x333aff=_0x333aff['apply'](_0x30a64a,_0x315051||[]))['next']());});};class SearchableFieldService{constructor(_0x65883b){this['fetch']=_0x65883b,this['path']='searchable-field';}['create'](_0x1f774d,_0x5d7cc1,_0x3558e9,_0x1cd5c9){return __awaiter$3(this,void 0,void 0,function*(){const _0x1701b5={'account_name':_0x1f774d,'list_name':_0x5d7cc1,'searchable_field_name':_0x3558e9};try{const _0x177b52=yield this['fetch']['post'](this['path'],_0x1cd5c9,_0x1701b5);if(_0x177b52['status']>0xc7&&_0x177b52['status']<0x12c){const _0x3099f3=yield _0x177b52['json']();return new SuccessfulSearchableFieldResponse(_0x3099f3);}const _0x2693bf=yield _0x177b52['json']();return new FailedSearchableFieldResponse(_0x2693bf);}catch(_0x221e82){if(_0x221e82 instanceof Error)return new FailedSearchableFieldResponse({'detail':_0x221e82['message'],'title':_0x221e82['name'],'status':0x1f4,'instance':'','type':''});throw _0x221e82;}});}['remove'](_0x428b23,_0x990141,_0x5d35a3,_0x3b488b){return __awaiter$3(this,void 0,void 0,function*(){const _0x1b0345=this['path']+'/'+_0x428b23+'/'+_0x990141+'/'+_0x5d35a3,_0x3f0a95=yield this['fetch']['delete'](_0x1b0345,_0x3b488b);try{if(_0x3f0a95['status']>0xc7&&_0x3f0a95['status']<0x12c)return new SuccessfulResponse({});const _0x1c4456=yield _0x3f0a95['json']();return new FailedResponse(_0x1c4456);}catch(_0x5de8ed){if(_0x5de8ed instanceof Error)return new FailedResponse({'detail':_0x5de8ed['message'],'title':_0x5de8ed['name'],'status':0x1f4,'instance':'','type':''});throw _0x5de8ed;}});}['rename'](_0x3f19ad,_0x51a85d,_0x2b67c2,_0x3418bd,_0x6a74ef){return __awaiter$3(this,void 0,void 0,function*(){let _0x1f32e8=this['path']+'/'+_0x3f19ad+'/'+_0x51a85d+'/'+_0x2b67c2;const _0x2f5d12={'new_searchable_field_name':_0x3418bd};try{const _0x89043c=yield this['fetch']['put'](_0x1f32e8,_0x6a74ef,_0x2f5d12);if(_0x89043c['status']>0xc7&&_0x89043c['status']<0x12c){const _0x18c412=yield _0x89043c['json']();return new SuccessfulSearchableFieldResponse(_0x18c412);}const _0x468eb0=yield _0x89043c['json']();return new FailedSearchableFieldResponse(_0x468eb0);}catch(_0x577df0){if(_0x577df0 instanceof Error)return new FailedSearchableFieldResponse({'detail':_0x577df0['message'],'title':_0x577df0['name'],'status':0x1f4,'instance':'','type':''});throw _0x577df0;}});}}
|
|
22
22
|
|
|
23
|
-
var __awaiter$2=undefined&&undefined['__awaiter']||function(
|
|
23
|
+
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x180fd8,_0x86c308,_0x27be5,_0x236250){function _0x140843(_0x3dbcf1){return _0x3dbcf1 instanceof _0x27be5?_0x3dbcf1:new _0x27be5(function(_0x191519){_0x191519(_0x3dbcf1);});}return new(_0x27be5||(_0x27be5=Promise))(function(_0x4f9196,_0x5c28d0){function _0x57817c(_0x463f91){try{_0x1e5c1b(_0x236250['next'](_0x463f91));}catch(_0x32e862){_0x5c28d0(_0x32e862);}}function _0xb26d1c(_0x388c26){try{_0x1e5c1b(_0x236250['throw'](_0x388c26));}catch(_0x59e3ff){_0x5c28d0(_0x59e3ff);}}function _0x1e5c1b(_0x1e2dc1){_0x1e2dc1['done']?_0x4f9196(_0x1e2dc1['value']):_0x140843(_0x1e2dc1['value'])['then'](_0x57817c,_0xb26d1c);}_0x1e5c1b((_0x236250=_0x236250['apply'](_0x180fd8,_0x86c308||[]))['next']());});};class ResourceService{constructor(_0x180df4){this['fetch']=_0x180df4,this['path']='resource';}['create'](_0x53c62a,_0x1cf1e9,_0x388b35,_0x4bb464){return __awaiter$2(this,void 0,void 0,function*(){const _0x71e4a={'account_name':_0x53c62a,'list_name':_0x1cf1e9,'resource_name':_0x388b35};try{const _0x102185=yield this['fetch']['post'](this['path'],_0x4bb464,_0x71e4a);if(_0x102185['status']>0xc7&&_0x102185['status']<0x12c){const _0x435556=yield _0x102185['json']();return new SuccessfulResourceResponse(_0x435556);}const _0x4116d1=yield _0x102185['json']();return new FailedResourceResponse(_0x4116d1);}catch(_0x1be259){if(_0x1be259 instanceof Error)return new FailedResourceResponse({'detail':_0x1be259['message'],'title':_0x1be259['name'],'status':0x1f4,'instance':'','type':''});throw _0x1be259;}});}['remove'](_0x1ccf8a,_0x43af5a,_0x5bb8a8,_0x37abd4){return __awaiter$2(this,void 0,void 0,function*(){const _0x39367a=this['path']+'/'+_0x1ccf8a+'/'+_0x43af5a+'/'+_0x5bb8a8,_0xe00b1a=yield this['fetch']['delete'](_0x39367a,_0x37abd4);try{if(_0xe00b1a['status']>0xc7&&_0xe00b1a['status']<0x12c)return new SuccessfulResponse({});const _0x36d48c=yield _0xe00b1a['json']();return new FailedResponse(_0x36d48c);}catch(_0x463adc){if(_0x463adc instanceof Error)return new FailedResponse({'detail':_0x463adc['message'],'title':_0x463adc['name'],'status':0x1f4,'instance':'','type':''});throw _0x463adc;}});}['rename'](_0xc0a06e,_0x379f98,_0x3dfea1,_0x59b326,_0x1f7a76){return __awaiter$2(this,void 0,void 0,function*(){let _0x452349=this['path']+'/'+_0xc0a06e+'/'+_0x379f98;const _0x59e301={'resource_name':_0x3dfea1,'new_resource_name':_0x59b326};try{const _0x37fd3=yield this['fetch']['put'](_0x452349,_0x1f7a76,_0x59e301);if(_0x37fd3['status']>0xc7&&_0x37fd3['status']<0x12c){const _0x110265=yield _0x37fd3['json']();return new SuccessfulResourceResponse(_0x110265);}const _0x3fe434=yield _0x37fd3['json']();return new FailedResourceResponse(_0x3fe434);}catch(_0x7f4bab){if(_0x7f4bab instanceof Error)return new FailedResourceResponse({'detail':_0x7f4bab['message'],'title':_0x7f4bab['name'],'status':0x1f4,'instance':'','type':''});throw _0x7f4bab;}});}}
|
|
24
24
|
|
|
25
|
-
var __awaiter$1=undefined&&undefined['__awaiter']||function(
|
|
25
|
+
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x4b5d92,_0x449416,_0x1f1448,_0x8b6108){function _0x18158b(_0x3827b5){return _0x3827b5 instanceof _0x1f1448?_0x3827b5:new _0x1f1448(function(_0x5a3337){_0x5a3337(_0x3827b5);});}return new(_0x1f1448||(_0x1f1448=Promise))(function(_0x4236f6,_0x34a2a3){function _0x25d9f5(_0x382cad){try{_0x3c4214(_0x8b6108['next'](_0x382cad));}catch(_0x1799c6){_0x34a2a3(_0x1799c6);}}function _0x11f69e(_0x26d73a){try{_0x3c4214(_0x8b6108['throw'](_0x26d73a));}catch(_0x26c9c1){_0x34a2a3(_0x26c9c1);}}function _0x3c4214(_0x559ffe){_0x559ffe['done']?_0x4236f6(_0x559ffe['value']):_0x18158b(_0x559ffe['value'])['then'](_0x25d9f5,_0x11f69e);}_0x3c4214((_0x8b6108=_0x8b6108['apply'](_0x4b5d92,_0x449416||[]))['next']());});};class GroupService{constructor(_0x40f5ab){this['fetch']=_0x40f5ab,this['path']='group',this['List']=new GroupListService(_0x40f5ab);}['create'](_0xc0161b,_0x5043e2,_0x415cff,_0x33eacb){return __awaiter$1(this,void 0,void 0,function*(){const _0xb59940={'account_name':_0xc0161b,'search_service_name':_0x5043e2,'group_name':_0x415cff};try{const _0x582009=yield this['fetch']['post'](this['path'],_0x33eacb,_0xb59940);if(_0x582009['status']>0xc7&&_0x582009['status']<0x12c){const _0x65ebb2=yield _0x582009['json']();return new SuccessfulGroupResponse(_0x65ebb2);}const _0xa15a9c=yield _0x582009['json']();return new FailedGroupResponse(_0xa15a9c);}catch(_0x35837f){if(_0x35837f instanceof Error)return new FailedGroupResponse({'detail':_0x35837f['message'],'title':_0x35837f['name'],'status':0x1f4,'instance':'','type':''});throw _0x35837f;}});}['delete'](_0x9d981d,_0x5876e4,_0x467d19){return __awaiter$1(this,void 0,void 0,function*(){const _0x50d02b=this['path']+'/'+_0x9d981d+'/'+_0x5876e4,_0x2f82ce=yield this['fetch']['delete'](_0x50d02b,_0x467d19);try{if(_0x2f82ce['status']>0xc7&&_0x2f82ce['status']<0x12c)return new SuccessfulResponse({});const _0x2f4849=yield _0x2f82ce['json']();return new FailedResponse(_0x2f4849);}catch(_0x2fd102){if(_0x2fd102 instanceof Error)return new FailedResponse({'detail':_0x2fd102['message'],'title':_0x2fd102['name'],'status':0x1f4,'instance':'','type':''});throw _0x2fd102;}});}['edit'](_0x2ef7bf,_0x2af84c,_0x173940,_0x16fdb8){return __awaiter$1(this,void 0,void 0,function*(){const _0x5512e9=this['path']+'/'+_0x2ef7bf+'/'+_0x2af84c,_0xa3a262=yield this['fetch']['put'](_0x5512e9,_0x173940,_0x16fdb8);try{if(_0xa3a262['status']>0xc7&&_0xa3a262['status']<0x12c){const _0x795a90=yield _0xa3a262['json']();return new SuccessfulGroupResponse(_0x795a90);}const _0x288da5=yield _0xa3a262['json']();return new FailedGroupResponse(_0x288da5);}catch(_0x6d8690){if(_0x6d8690 instanceof Error)return new FailedGroupResponse({'detail':_0x6d8690['message'],'title':_0x6d8690['name'],'status':0x1f4,'instance':'','type':''});throw _0x6d8690;}});}['transfer'](_0x339550,_0x2ef5f3,_0x431e94,_0x4bbec1){return __awaiter$1(this,void 0,void 0,function*(){const _0x1b6da3={'new_search_service_name':_0x431e94};try{const _0x38818e=yield this['fetch']['put'](this['path']+'/transfer/'+_0x339550+'/'+_0x2ef5f3,_0x4bbec1,_0x1b6da3);if(_0x38818e['status']>0xc7&&_0x38818e['status']<0x12c){const _0x2fab77=yield _0x38818e['json']();return new SuccessfulGroupResponse(_0x2fab77);}const _0x52a37f=yield _0x38818e['json']();return new FailedGroupResponse(_0x52a37f);}catch(_0x3df2b6){if(_0x3df2b6 instanceof Error)return new FailedGroupResponse({'detail':_0x3df2b6['message'],'title':_0x3df2b6['name'],'status':0x1f4,'instance':'','type':''});throw _0x3df2b6;}});}}class GroupListService{constructor(_0x408275){this['fetch']=_0x408275,this['path']='group/list';}['add'](_0x3439d2,_0x1a1577,_0x47b692,_0x3b09a4,_0x3a92f4){return __awaiter$1(this,void 0,void 0,function*(){const _0x29049d={'list_name':_0x47b692,'version':_0x3b09a4};try{const _0x504f49=yield this['fetch']['put'](this['path']+'/'+_0x3439d2+'/'+_0x1a1577,_0x3a92f4,_0x29049d);if(_0x504f49['status']>0xc7&&_0x504f49['status']<0x12c){const _0x5b3c07=yield _0x504f49['json']();return new SuccessfulGroupResponse(_0x5b3c07);}const _0x80404e=yield _0x504f49['json']();return new FailedGroupResponse(_0x80404e);}catch(_0x34d0ee){if(_0x34d0ee instanceof Error)return new FailedGroupResponse({'detail':_0x34d0ee['message'],'title':_0x34d0ee['name'],'status':0x1f4,'instance':'','type':''});throw _0x34d0ee;}});}['remove'](_0x49907a,_0x3d749d,_0xe47ee3,_0x34b68f){return __awaiter$1(this,void 0,void 0,function*(){const _0x508548=this['path']+'/'+_0x49907a+'/'+_0x3d749d+'/'+_0xe47ee3,_0x11527d=yield this['fetch']['delete'](_0x508548,_0x34b68f);try{if(_0x11527d['status']>0xc7&&_0x11527d['status']<0x12c){const _0x28eb22=yield _0x11527d['json']();return new SuccessfulGroupResponse(_0x28eb22);}const _0x17e218=yield _0x11527d['json']();return new FailedGroupResponse(_0x17e218);}catch(_0x493513){if(_0x493513 instanceof Error)return new FailedGroupResponse({'detail':_0x493513['message'],'title':_0x493513['name'],'status':0x1f4,'instance':'','type':''});throw _0x493513;}});}}
|
|
26
26
|
|
|
27
|
-
var __awaiter=undefined&&undefined['__awaiter']||function(
|
|
27
|
+
var __awaiter=undefined&&undefined['__awaiter']||function(_0x537092,_0x55d61c,_0x3128af,_0x319f11){function _0x3eacee(_0x42b386){return _0x42b386 instanceof _0x3128af?_0x42b386:new _0x3128af(function(_0x6ad19f){_0x6ad19f(_0x42b386);});}return new(_0x3128af||(_0x3128af=Promise))(function(_0x412142,_0x9cba81){function _0x171710(_0x5db476){try{_0x15e9ad(_0x319f11['next'](_0x5db476));}catch(_0x103a23){_0x9cba81(_0x103a23);}}function _0x2e37e8(_0x3f3434){try{_0x15e9ad(_0x319f11['throw'](_0x3f3434));}catch(_0x403436){_0x9cba81(_0x403436);}}function _0x15e9ad(_0x5b1520){_0x5b1520['done']?_0x412142(_0x5b1520['value']):_0x3eacee(_0x5b1520['value'])['then'](_0x171710,_0x2e37e8);}_0x15e9ad((_0x319f11=_0x319f11['apply'](_0x537092,_0x55d61c||[]))['next']());});};class AdminClient{constructor(_0x428278='https://admin.searchability.dev/'){var _0x236add=new Fetch(_0x428278);this['Accounts']=new AccountService(_0x236add),this['Lists']=new ListService(_0x236add),this['ApiKeys']=new ApiKeyService(_0x236add),this['SearchServers']=new SearchServersService(_0x236add),this['Facets']=new FacetService(_0x236add),this['SearchResults']=new SearchResultService(_0x236add),this['Contributors']=new ContributorService(_0x236add),this['SearchableFields']=new SearchableFieldService(_0x236add),this['Groups']=new GroupService(_0x236add),this['Resources']=new ResourceService(_0x236add);}}class AuthClient{constructor(_0x29ee6b='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x29ee6b);}['login'](_0x5f8701){return __awaiter(this,void 0,void 0,function*(){const _0x4d49e9='login/'+_0x5f8701;try{const _0x18ffd1=yield yield fetch(_0x4d49e9);if(_0x18ffd1['status']>0xc7&&_0x18ffd1['status']<0x12c){const _0x4881f2=yield _0x18ffd1['json']();return new SuccessfulAuthResponse(_0x4881f2);}const _0x179dd6=yield _0x18ffd1['json']();return new FailedAuthResponse(_0x179dd6);}catch(_0x14bc01){if(_0x14bc01 instanceof Error)return new FailedAuthResponse({'detail':_0x14bc01['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x14bc01;}});}['refresh'](_0x58bff9){return __awaiter(this,void 0,void 0,function*(){const _0x4f3f43='refresh',_0x286b8a={'refresh_token':_0x58bff9};try{const _0x16098f=yield this['fetch']['PostNoAuth'](_0x4f3f43,_0x286b8a);if(_0x16098f['status']>0xc7&&_0x16098f['status']<0x12c){const _0x222e2b=yield _0x16098f['json']();return new SuccessfulAuthResponse(_0x222e2b);}const _0x49b96d=yield _0x16098f['json']();return new FailedAuthResponse(_0x49b96d);}catch(_0x579fed){if(_0x579fed instanceof Error)return new FailedAuthResponse({'detail':_0x579fed['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x579fed;}});}['getTokenStatus'](_0x2a8a73){if(Date['now']()<_0x2a8a73['access_expires'])return exports.TokenStatus['Ok'];if(Date['now']()<_0x2a8a73['refresh_expires'])return exports.TokenStatus['Refresh'];return exports.TokenStatus['Expired'];}}
|
|
28
28
|
|
|
29
29
|
exports.AdminClient = AdminClient;
|
|
30
30
|
exports.AuthClient = AuthClient;
|