@searchability/admin-client 0.0.141 → 0.0.143
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(_0x58b94e){_0x58b94e[_0x58b94e['Ok']=0x0]='Ok',_0x58b94e[_0x58b94e['Refresh']=0x1]='Refresh',_0x58b94e[_0x58b94e['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(_0x1afac0){this['isSuccess']=_0x1afac0;}}class SuccessfulFacetValueResponse extends Response{constructor(_0x19e602){super(!![]),this['facets']=_0x19e602;}['toSuccess'](){return this['facets'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetValuesResponse extends Response{constructor(_0x43610a){super(![]),this['problem']=_0x43610a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulContributorResponse extends Response{constructor(_0x5b1e71){super(!![]),this['contributor']=_0x5b1e71;}['toSuccess'](){return this['contributor'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedContributorResponse extends Response{constructor(_0x5700ce){super(![]),this['problem']=_0x5700ce;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountAndImageResponse extends Response{constructor(_0x4ac720){super(!![]),this['accountAndImages']=_0x4ac720;}['toSuccess'](){return this['accountAndImages'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountAndImageResponse extends Response{constructor(_0x2f66fb){super(![]),this['problem']=_0x2f66fb;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulResourceResponse extends Response{constructor(_0x51f959){super(!![]),this['resource']=_0x51f959;}['toSuccess'](){return this['resource'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResourceResponse extends Response{constructor(_0x5ce73f){super(![]),this['problem']=_0x5ce73f;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulFacetResponse extends Response{constructor(_0x465229){super(!![]),this['facet']=_0x465229;}['toSuccess'](){return this['facet'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetResponse extends Response{constructor(_0x12f3fe){super(![]),this['problem']=_0x12f3fe;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedSearchableFieldResponse extends Response{constructor(_0x1fd0db){super(![]),this['problem']=_0x1fd0db;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchableFieldResponse extends Response{constructor(_0x4013cc){super(!![]),this['searchable_field']=_0x4013cc;}['toSuccess'](){return this['searchable_field'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountResponse extends Response{constructor(_0x21eeb4){super(!![]),this['account']=_0x21eeb4;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountImageResponse extends Response{constructor(_0x3c5491){super(!![]),this['accountImage']=_0x3c5491;}['toSuccess'](){return this['accountImage'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListIdentityResponse extends Response{constructor(_0x40d622){super(!![]),this['list']=_0x40d622;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulGroupResponse extends Response{constructor(_0x1308ad){super(!![]),this['group']=_0x1308ad;}['toSuccess'](){return this['group'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedGroupResponse extends Response{constructor(_0x24a940){super(![]),this['problem']=_0x24a940;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListResponse extends Response{constructor(_0x62ec94){super(!![]),this['list']=_0x62ec94;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedListResponse extends Response{constructor(_0x2a96d3){super(![]),this['problem']=_0x2a96d3;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountResponse extends Response{constructor(_0x302be1){super(![]),this['problem']=_0x302be1;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountImageResponse extends Response{constructor(_0x2c000d){super(![]),this['problem']=_0x2c000d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListIdentityResponse extends Response{constructor(_0x253650){super(![]),this['problem']=_0x253650;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x191c9b){super(!![]),this['tokens']=_0x191c9b;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0xb9ecbb){super(![]),this['problem']=_0xb9ecbb;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x5302f6){super(!![]),this['apiKey']=_0x5302f6;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x235171){super(![]),this['problem']=_0x235171;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x3eb568){super(!![]),this['searchService']=_0x3eb568;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x396f06){super(![]),this['problem']=_0x396f06;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x59c2f0){super(!![]),this['searchService']=_0x59c2f0;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulSearchResultResponse extends Response{constructor(_0x1787dc){super(!![]),this['searchResult']=_0x1787dc;}['toSuccess'](){return this['searchResult'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchResultResponse extends Response{constructor(_0x2d6076){super(![]),this['problem']=_0x2d6076;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchResultResponse extends Response{constructor(_0x36f532){super(!![]),this['searchResults']=_0x36f532;}['toSuccess'](){return this['searchResults'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchResultResponse extends Response{constructor(_0x3aed31){super(![]),this['problem']=_0x3aed31;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchServiceResponse extends Response{constructor(_0x3171d3){super(!![]),this['searchServices']=_0x3171d3;}['toSuccess'](){return this['searchServices'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServicesResponse extends Response{constructor(_0x32f27a){super(![]),this['problem']=_0x32f27a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedViewSearchServiceResponse extends Response{constructor(_0xab8b6f){super(![]),this['problem']=_0xab8b6f;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x1ce500){super(!![]),this['apiKeyValue']=_0x1ce500;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x1ad03f){super(!![]),this['obj']=_0x1ad03f;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x2947a6){super(![]),this['problem']=_0x2947a6;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x213927){super(![]),this['problem']=_0x213927;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
|
|
2
|
+
|
|
3
|
+
var __awaiter$b=undefined&&undefined['__awaiter']||function(_0x22354b,_0x3b2e3d,_0x5e6370,_0x1a95b7){function _0x54053e(_0x2a1453){return _0x2a1453 instanceof _0x5e6370?_0x2a1453:new _0x5e6370(function(_0x4b4088){_0x4b4088(_0x2a1453);});}return new(_0x5e6370||(_0x5e6370=Promise))(function(_0x56e517,_0x5b11c6){function _0xa04182(_0x532a7e){try{_0x188533(_0x1a95b7['next'](_0x532a7e));}catch(_0x75243f){_0x5b11c6(_0x75243f);}}function _0x39b399(_0x5c42ac){try{_0x188533(_0x1a95b7['throw'](_0x5c42ac));}catch(_0x4ca51f){_0x5b11c6(_0x4ca51f);}}function _0x188533(_0x378ec2){_0x378ec2['done']?_0x56e517(_0x378ec2['value']):_0x54053e(_0x378ec2['value'])['then'](_0xa04182,_0x39b399);}_0x188533((_0x1a95b7=_0x1a95b7['apply'](_0x22354b,_0x3b2e3d||[]))['next']());});};class AccountService{constructor(_0x3f9013){this['fetch']=_0x3f9013;}['get'](_0x4b3110,_0x27843c){return __awaiter$b(this,void 0,void 0,function*(){const _0x34a505='Account/'+_0x4b3110+'/',_0x2771a6=yield this['fetch']['get'](_0x34a505,_0x27843c);try{if(_0x2771a6['status']>0xc7&&_0x2771a6['status']<0x12c){const _0x24a0dc=yield _0x2771a6['json']();return new SuccessfulAccountResponse(_0x24a0dc);}const _0x5e82d1=yield _0x2771a6['json']();return new FailedAccountResponse(_0x5e82d1);}catch(_0xfc1dd5){if(_0xfc1dd5 instanceof Error)return new FailedAccountResponse({'detail':_0xfc1dd5['message'],'title':_0xfc1dd5['name'],'status':0x1f4,'instance':'','type':''});throw _0xfc1dd5;}});}['getImage'](_0x290a7d,_0x4fdc51){return __awaiter$b(this,void 0,void 0,function*(){const _0x7ee3f1='account/image/'+_0x290a7d+'/',_0x16331f=yield this['fetch']['get'](_0x7ee3f1,_0x4fdc51);try{if(_0x16331f['status']>0xc7&&_0x16331f['status']<0x12c){const _0x162c20=yield _0x16331f['json']();return new SuccessfulAccountImageResponse(_0x162c20);}const _0x21dd39=yield _0x16331f['json']();return new FailedAccountImageResponse(_0x21dd39);}catch(_0x7bbba0){if(_0x7bbba0 instanceof Error)return new FailedAccountImageResponse({'detail':_0x7bbba0['message'],'title':_0x7bbba0['name'],'status':0x1f4,'instance':'','type':''});throw _0x7bbba0;}});}}
|
|
4
|
+
|
|
5
|
+
var __awaiter$a=undefined&&undefined['__awaiter']||function(_0x3786f4,_0x1895f7,_0xe34193,_0x2706f6){function _0x176613(_0x3ac4a3){return _0x3ac4a3 instanceof _0xe34193?_0x3ac4a3:new _0xe34193(function(_0x418746){_0x418746(_0x3ac4a3);});}return new(_0xe34193||(_0xe34193=Promise))(function(_0x453bed,_0x3c51f4){function _0x2ef3d3(_0x20f133){try{_0x39dc1e(_0x2706f6['next'](_0x20f133));}catch(_0x1adbbe){_0x3c51f4(_0x1adbbe);}}function _0x37010c(_0x30f189){try{_0x39dc1e(_0x2706f6['throw'](_0x30f189));}catch(_0x237173){_0x3c51f4(_0x237173);}}function _0x39dc1e(_0x1ed203){_0x1ed203['done']?_0x453bed(_0x1ed203['value']):_0x176613(_0x1ed203['value'])['then'](_0x2ef3d3,_0x37010c);}_0x39dc1e((_0x2706f6=_0x2706f6['apply'](_0x3786f4,_0x1895f7||[]))['next']());});};class ApiKeyService{constructor(_0x4b2c97){this['fetch']=_0x4b2c97,this['path']='api-key';}['create'](_0x3751bb,_0x3b19f4,_0x494e58){return __awaiter$a(this,void 0,void 0,function*(){const _0x27c4fa={'account_name':_0x3751bb,'api_key_name':_0x3b19f4};try{const _0x4b78cf=yield this['fetch']['post'](this['path'],_0x494e58,_0x27c4fa);if(_0x4b78cf['status']>0xc7&&_0x4b78cf['status']<0x12c){const _0x4b8f3a=yield _0x4b78cf['json']();return new SuccessfulApiKeyResponse(_0x4b8f3a);}const _0x6df5fc=yield _0x4b78cf['json']();return new FailedApiKeyResponse(_0x6df5fc);}catch(_0x40dc02){if(_0x40dc02 instanceof Error)return new FailedApiKeyResponse({'detail':_0x40dc02['message'],'title':_0x40dc02['name'],'status':0x1f4,'instance':'','type':''});throw _0x40dc02;}});}['view'](_0x3ff92b,_0x20ac08,_0x5bc359){return __awaiter$a(this,void 0,void 0,function*(){const _0x124b83=this['path']+'/'+_0x3ff92b+'/'+_0x20ac08;try{const _0x29a084=yield this['fetch']['get'](_0x124b83,_0x5bc359);if(_0x29a084['status']>0xc7&&_0x29a084['status']<0x12c){const _0x96d63d=yield _0x29a084['json']();return new SuccessfulApiKeyValueResponse(_0x96d63d);}const _0x3b6bd4=yield _0x29a084['json']();return new FailedApiKeyValueResponse(_0x3b6bd4);}catch(_0x51a4dd){if(_0x51a4dd instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x51a4dd['message'],'title':_0x51a4dd['name'],'status':0x1f4,'instance':'','type':''});throw _0x51a4dd;}});}['delete'](_0x581d9f,_0x174dfb,_0x3cc900){return __awaiter$a(this,void 0,void 0,function*(){const _0x4d5e7e=this['path']+'/'+_0x581d9f+'/'+_0x174dfb;try{const _0x5a52dd=yield this['fetch']['delete'](_0x4d5e7e,_0x3cc900);if(_0x5a52dd['status']>0xc7&&_0x5a52dd['status']<0x12c)return new SuccessfulResponse({});const _0x1ccd14=yield _0x5a52dd['json']();return new FailedResponse(_0x1ccd14);}catch(_0x4964d6){if(_0x4964d6 instanceof Error)return new FailedResponse({'detail':_0x4964d6['message'],'title':_0x4964d6['name'],'status':0x1f4,'instance':'','type':''});throw _0x4964d6;}});}}
|
|
6
|
+
|
|
7
|
+
var __awaiter$9=undefined&&undefined['__awaiter']||function(_0x1eddce,_0x3a0499,_0x1620ba,_0x1acc33){function _0x13dda0(_0x21ee4e){return _0x21ee4e instanceof _0x1620ba?_0x21ee4e:new _0x1620ba(function(_0x47c60d){_0x47c60d(_0x21ee4e);});}return new(_0x1620ba||(_0x1620ba=Promise))(function(_0x3426fc,_0x4eb692){function _0x55bccb(_0x4bb43c){try{_0x100b79(_0x1acc33['next'](_0x4bb43c));}catch(_0x225148){_0x4eb692(_0x225148);}}function _0x27f2fe(_0x15a0a7){try{_0x100b79(_0x1acc33['throw'](_0x15a0a7));}catch(_0x33f267){_0x4eb692(_0x33f267);}}function _0x100b79(_0x34f76f){_0x34f76f['done']?_0x3426fc(_0x34f76f['value']):_0x13dda0(_0x34f76f['value'])['then'](_0x55bccb,_0x27f2fe);}_0x100b79((_0x1acc33=_0x1acc33['apply'](_0x1eddce,_0x3a0499||[]))['next']());});};class ListService{constructor(_0x32b6ec){this['fetch']=_0x32b6ec,this['path']='list',this['Coordinates']=new CoordinatesService(_0x32b6ec),this['GeneratedSuggestions']=new GeneratedSuggestionsService(_0x32b6ec);}['create'](_0x192209,_0x5899f2,_0x58d0ff,_0xb98a44){return __awaiter$9(this,void 0,void 0,function*(){const _0x54b19b={'account_name':_0x192209,'list_name':_0x5899f2,'search_service_name':_0x58d0ff};try{const _0x38cf3c=yield this['fetch']['post'](this['path'],_0xb98a44,_0x54b19b);if(_0x38cf3c['status']>0xc7&&_0x38cf3c['status']<0x12c){const _0x12fe89=yield _0x38cf3c['json']();return new SuccessfulListIdentityResponse(_0x12fe89);}const _0x506148=yield _0x38cf3c['json']();return new FailedListIdentityResponse(_0x506148);}catch(_0x2f9a86){if(_0x2f9a86 instanceof Error)return new FailedListIdentityResponse({'detail':_0x2f9a86['message'],'title':_0x2f9a86['name'],'status':0x1f4,'instance':'','type':''});throw _0x2f9a86;}});}['delete'](_0x422535,_0x56ca4b,_0x16e6ef){return __awaiter$9(this,void 0,void 0,function*(){const _0x18b3f3=this['path']+'/'+_0x422535+'/'+_0x56ca4b,_0x8febd6=yield this['fetch']['delete'](_0x18b3f3,_0x16e6ef);try{if(_0x8febd6['status']>0xc7&&_0x8febd6['status']<0x12c)return new SuccessfulResponse({});const _0x457000=yield _0x8febd6['json']();return new FailedResponse(_0x457000);}catch(_0x3643bf){if(_0x3643bf instanceof Error)return new FailedResponse({'detail':_0x3643bf['message'],'title':_0x3643bf['name'],'status':0x1f4,'instance':'','type':''});throw _0x3643bf;}});}['get'](_0x423d27,_0x260836,_0x3e68ff){return __awaiter$9(this,void 0,void 0,function*(){const _0x540ff2=this['path']+'/'+_0x423d27+'/'+_0x260836;try{const _0x443b66=yield this['fetch']['get'](_0x540ff2,_0x3e68ff);if(_0x443b66['status']>0xc7&&_0x443b66['status']<0x12c){const _0x3d3382=yield _0x443b66['json']();return new SuccessfulListResponse(_0x3d3382);}const _0x54391a=yield _0x443b66['json']();return new FailedListResponse(_0x54391a);}catch(_0xff9ab2){if(_0xff9ab2 instanceof Error)return new FailedListResponse({'detail':_0xff9ab2['message'],'title':_0xff9ab2['name'],'status':0x1f4,'instance':'','type':''});throw _0xff9ab2;}});}['editSettings'](_0x49af4f,_0x36d3f5,_0x4ece3e,_0x11ba2b){return __awaiter$9(this,void 0,void 0,function*(){const _0x1b041f=this['path']+'/settings/'+_0x49af4f+'/'+_0x36d3f5,_0x57ff87=yield this['fetch']['put'](_0x1b041f,_0x4ece3e,_0x11ba2b);try{if(_0x57ff87['status']>0xc7&&_0x57ff87['status']<0x12c){const _0x46f6c1=yield _0x57ff87['json']();return new SuccessfulListResponse(_0x46f6c1);}const _0x2d0f8c=yield _0x57ff87['json']();return new FailedListResponse(_0x2d0f8c);}catch(_0x29ef42){if(_0x29ef42 instanceof Error)return new FailedListResponse({'detail':_0x29ef42['message'],'title':_0x29ef42['name'],'status':0x1f4,'instance':'','type':''});throw _0x29ef42;}});}['addCoordinates'](_0x2a0ea3,_0x5336ef,_0x2af565){return __awaiter$9(this,void 0,void 0,function*(){const _0x57922a=this['path']+'/coordinates/'+_0x2a0ea3+'/'+_0x5336ef,_0x334f85=yield this['fetch']['post'](_0x57922a,_0x2af565,{});try{if(_0x334f85['status']>0xc7&&_0x334f85['status']<0x12c){const _0x124545=yield _0x334f85['json']();return new SuccessfulListResponse(_0x124545);}const _0x3f83eb=yield _0x334f85['json']();return new FailedListResponse(_0x3f83eb);}catch(_0x4057d5){if(_0x4057d5 instanceof Error)return new FailedListResponse({'detail':_0x4057d5['message'],'title':_0x4057d5['name'],'status':0x1f4,'instance':'','type':''});throw _0x4057d5;}});}['removeCoordinates'](_0x409ef4,_0x530a2f,_0x52b2ca){return __awaiter$9(this,void 0,void 0,function*(){const _0x299040=this['path']+'/coordinates/'+_0x409ef4+'/'+_0x530a2f,_0x8ceb2b=yield this['fetch']['delete'](_0x299040,_0x52b2ca);try{if(_0x8ceb2b['status']>0xc7&&_0x8ceb2b['status']<0x12c){const _0x45d830=yield _0x8ceb2b['json']();return new SuccessfulListResponse(_0x45d830);}const _0x53af63=yield _0x8ceb2b['json']();return new FailedListResponse(_0x53af63);}catch(_0x30f0ad){if(_0x30f0ad instanceof Error)return new FailedListResponse({'detail':_0x30f0ad['message'],'title':_0x30f0ad['name'],'status':0x1f4,'instance':'','type':''});throw _0x30f0ad;}});}['transfer'](_0x306cdc,_0x34fbab,_0x496607,_0x4a7afa){return __awaiter$9(this,void 0,void 0,function*(){const _0x5cf93e={'new_search_service_name':_0x496607};try{const _0x54a785=yield this['fetch']['put'](this['path']+'/transfer/'+_0x306cdc+'/'+_0x34fbab,_0x4a7afa,_0x5cf93e);if(_0x54a785['status']>0xc7&&_0x54a785['status']<0x12c){const _0x57fcf5=yield _0x54a785['json']();return new SuccessfulListResponse(_0x57fcf5);}const _0x1064a4=yield _0x54a785['json']();return new FailedListResponse(_0x1064a4);}catch(_0x4eccf2){if(_0x4eccf2 instanceof Error)return new FailedListResponse({'detail':_0x4eccf2['message'],'title':_0x4eccf2['name'],'status':0x1f4,'instance':'','type':''});throw _0x4eccf2;}});}}class CoordinatesService{constructor(_0x22eed8){this['fetch']=_0x22eed8,this['path']='list/coordinates';}['add'](_0x3a6447,_0x461ce3,_0x5a4f0d){return __awaiter$9(this,void 0,void 0,function*(){const _0x59b9a0=this['path']+'/'+_0x3a6447+'/'+_0x461ce3,_0x5767e0=yield this['fetch']['post'](_0x59b9a0,_0x5a4f0d,{});try{if(_0x5767e0['status']>0xc7&&_0x5767e0['status']<0x12c){const _0x22cc53=yield _0x5767e0['json']();return new SuccessfulListResponse(_0x22cc53);}const _0xa7da21=yield _0x5767e0['json']();return new FailedListResponse(_0xa7da21);}catch(_0x3031e9){if(_0x3031e9 instanceof Error)return new FailedListResponse({'detail':_0x3031e9['message'],'title':_0x3031e9['name'],'status':0x1f4,'instance':'','type':''});throw _0x3031e9;}});}['remove'](_0x47ea65,_0x43b4c9,_0x267e8a){return __awaiter$9(this,void 0,void 0,function*(){const _0x58c75c=this['path']+'/'+_0x47ea65+'/'+_0x43b4c9,_0x44c14f=yield this['fetch']['delete'](_0x58c75c,_0x267e8a);try{if(_0x44c14f['status']>0xc7&&_0x44c14f['status']<0x12c){const _0x264d0b=yield _0x44c14f['json']();return new SuccessfulListResponse(_0x264d0b);}const _0x21a60b=yield _0x44c14f['json']();return new FailedListResponse(_0x21a60b);}catch(_0x6f5548){if(_0x6f5548 instanceof Error)return new FailedListResponse({'detail':_0x6f5548['message'],'title':_0x6f5548['name'],'status':0x1f4,'instance':'','type':''});throw _0x6f5548;}});}}class GeneratedSuggestionsService{constructor(_0x4c7d4f){this['fetch']=_0x4c7d4f,this['path']='list/generated-suggestions';}['add'](_0x36c549,_0x175a37,_0x54efa1,_0x169d8e,_0x697b7,_0x194234,_0x19a657){return __awaiter$9(this,void 0,void 0,function*(){const _0x5bbc5e=this['path']+'/'+_0x36c549+'/'+_0x175a37,_0x37cb4c=yield this['fetch']['post'](_0x5bbc5e,_0x19a657,{'target_list_name':_0x54efa1,'minimum_result_count':_0x169d8e,'is_active':_0x697b7,'minimum_characters':_0x194234});try{if(_0x37cb4c['status']>0xc7&&_0x37cb4c['status']<0x12c){const _0xf185f8=yield _0x37cb4c['json']();return new SuccessfulListResponse(_0xf185f8);}const _0x5686bf=yield _0x37cb4c['json']();return new FailedListResponse(_0x5686bf);}catch(_0x19a584){if(_0x19a584 instanceof Error)return new FailedListResponse({'detail':_0x19a584['message'],'title':_0x19a584['name'],'status':0x1f4,'instance':'','type':''});throw _0x19a584;}});}['remove'](_0x5a1650,_0xabb253,_0x52ce6b){return __awaiter$9(this,void 0,void 0,function*(){const _0x2d7011=this['path']+'/'+_0x5a1650+'/'+_0xabb253,_0x34e8c5=yield this['fetch']['delete'](_0x2d7011,_0x52ce6b);try{if(_0x34e8c5['status']>0xc7&&_0x34e8c5['status']<0x12c){const _0x4b6781=yield _0x34e8c5['json']();return new SuccessfulListResponse(_0x4b6781);}const _0x1307f1=yield _0x34e8c5['json']();return new FailedListResponse(_0x1307f1);}catch(_0x197cfa){if(_0x197cfa instanceof Error)return new FailedListResponse({'detail':_0x197cfa['message'],'title':_0x197cfa['name'],'status':0x1f4,'instance':'','type':''});throw _0x197cfa;}});}['edit'](_0x573769,_0x1e7a10,_0x2dcb52,_0x34cdda){return __awaiter$9(this,void 0,void 0,function*(){const _0x1fbfa3=this['path']+'/'+_0x573769+'/'+_0x1e7a10;_0x34cdda=_0x34cdda!==null&&_0x34cdda!==void 0?_0x34cdda:{};const _0x571cc1=yield this['fetch']['put'](_0x1fbfa3,_0x2dcb52,_0x34cdda);try{if(_0x571cc1['status']>0xc7&&_0x571cc1['status']<0x12c){const _0x2ccd00=yield _0x571cc1['json']();return new SuccessfulListResponse(_0x2ccd00);}const _0x506cb9=yield _0x571cc1['json']();return new FailedListResponse(_0x506cb9);}catch(_0x267711){if(_0x267711 instanceof Error)return new FailedListResponse({'detail':_0x267711['message'],'title':_0x267711['name'],'status':0x1f4,'instance':'','type':''});throw _0x267711;}});}}
|
|
8
|
+
|
|
9
|
+
var __awaiter$8=undefined&&undefined['__awaiter']||function(_0x3206cc,_0x24275d,_0x5e6604,_0x476b86){function _0x1f5f4c(_0x398fdf){return _0x398fdf instanceof _0x5e6604?_0x398fdf:new _0x5e6604(function(_0x2314f4){_0x2314f4(_0x398fdf);});}return new(_0x5e6604||(_0x5e6604=Promise))(function(_0x21e34d,_0x5854bb){function _0x2af486(_0x51f290){try{_0x235d7e(_0x476b86['next'](_0x51f290));}catch(_0x271666){_0x5854bb(_0x271666);}}function _0x32d014(_0x3eeaa7){try{_0x235d7e(_0x476b86['throw'](_0x3eeaa7));}catch(_0x39239c){_0x5854bb(_0x39239c);}}function _0x235d7e(_0x1794fe){_0x1794fe['done']?_0x21e34d(_0x1794fe['value']):_0x1f5f4c(_0x1794fe['value'])['then'](_0x2af486,_0x32d014);}_0x235d7e((_0x476b86=_0x476b86['apply'](_0x3206cc,_0x24275d||[]))['next']());});};class Fetch{constructor(_0xb01df6){this['baseUri']=_0xb01df6,this['getUrl']=_0x1500d8=>{return _0x1500d8['startsWith']('/')&&(_0x1500d8=_0x1500d8['replace']('/','')),''+this['baseUri']+_0x1500d8;},!_0xb01df6['endsWith']('/')&&(_0xb01df6=_0xb01df6+'/');}['get'](_0x5411e1,_0x151dec){return __awaiter$8(this,void 0,void 0,function*(){const _0x3188e9=this['getUrl'](_0x5411e1);return yield fetch(_0x3188e9,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x151dec}});});}['post'](_0x4c8f07,_0x37264f,_0xa3a913){return __awaiter$8(this,void 0,void 0,function*(){const _0x381dc5=this['getUrl'](_0x4c8f07);return yield fetch(_0x381dc5,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x37264f},'body':_0xa3a913?JSON['stringify'](_0xa3a913):null});});}['upload'](_0x8d9a8e,_0x28a05c,_0x4ed3bc){return __awaiter$8(this,void 0,void 0,function*(){const _0x10dc54=this['getUrl'](_0x8d9a8e);return yield fetch(_0x10dc54,{'method':'POST','headers':{'Authorization':'Bearer\x20'+_0x28a05c},'body':_0x4ed3bc});});}['PostNoAuth'](_0x554937,_0xc87b66){return __awaiter$8(this,void 0,void 0,function*(){const _0x1740d3=this['getUrl'](_0x554937);return yield fetch(_0x1740d3,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0xc87b66?JSON['stringify'](_0xc87b66):null});});}['put'](_0x58df0b,_0x111304,_0x165e42){return __awaiter$8(this,void 0,void 0,function*(){const _0x3ec1e3=this['getUrl'](_0x58df0b);return yield fetch(_0x3ec1e3,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x111304},'body':_0x165e42?JSON['stringify'](_0x165e42):null});});}['delete'](_0x5705d6,_0xd21681){return __awaiter$8(this,void 0,void 0,function*(){const _0x2c36bb=this['getUrl'](_0x5705d6);return yield fetch(_0x2c36bb,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0xd21681}});});}}
|
|
10
|
+
|
|
11
|
+
var __awaiter$7=undefined&&undefined['__awaiter']||function(_0xc6ab66,_0x1ab843,_0x51467a,_0x25f94e){function _0xd5893a(_0x4b37c5){return _0x4b37c5 instanceof _0x51467a?_0x4b37c5:new _0x51467a(function(_0x16be77){_0x16be77(_0x4b37c5);});}return new(_0x51467a||(_0x51467a=Promise))(function(_0x2c89d4,_0x2d9374){function _0x451bdd(_0x3092f4){try{_0x44e5ab(_0x25f94e['next'](_0x3092f4));}catch(_0xbe9a43){_0x2d9374(_0xbe9a43);}}function _0x21d73e(_0x1ead86){try{_0x44e5ab(_0x25f94e['throw'](_0x1ead86));}catch(_0x2ae269){_0x2d9374(_0x2ae269);}}function _0x44e5ab(_0x166bee){_0x166bee['done']?_0x2c89d4(_0x166bee['value']):_0xd5893a(_0x166bee['value'])['then'](_0x451bdd,_0x21d73e);}_0x44e5ab((_0x25f94e=_0x25f94e['apply'](_0xc6ab66,_0x1ab843||[]))['next']());});};class SearchServersService{constructor(_0x4d94ef){this['fetch']=_0x4d94ef,this['path']='search-service';}['create'](_0x2cebfe,_0x2ab783,_0x15be03,_0x45d4ac,_0x46b0b0,_0x492cec,_0xae03a7,_0x2696d1){return __awaiter$7(this,void 0,void 0,function*(){const _0x52251b={'account_name':_0x2cebfe,'search_service_name':_0x2ab783,'endpoint':_0x15be03,'key':_0x45d4ac,'country':_0x46b0b0,'provider':_0x492cec,'index_name':_0xae03a7};try{const _0x1d6862=yield this['fetch']['post'](this['path'],_0x2696d1,_0x52251b);if(_0x1d6862['status']>0xc7&&_0x1d6862['status']<0x12c){const _0x2df0b9=yield _0x1d6862['json']();return new SuccessfulSearchServiceResponse(_0x2df0b9);}const _0x2ad0fc=yield _0x1d6862['json']();return new FailedSearchServiceResponse(_0x2ad0fc);}catch(_0x59f647){if(_0x59f647 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x59f647['message'],'title':_0x59f647['name'],'status':0x1f4,'instance':'','type':''});throw _0x59f647;}});}['delete'](_0x1e7974,_0xfdb544,_0x456071){return __awaiter$7(this,void 0,void 0,function*(){const _0x5a4c7d=this['path']+'/'+_0x1e7974+'/'+_0xfdb544;try{const _0x4048d4=yield this['fetch']['delete'](_0x5a4c7d,_0x456071);if(_0x4048d4['status']>0xc7&&_0x4048d4['status']<0x12c)return new SuccessfulResponse({});const _0x34677a=yield _0x4048d4['json']();return new FailedResponse(_0x34677a);}catch(_0x4796dd){if(_0x4796dd instanceof Error)return new FailedResponse({'detail':_0x4796dd['message'],'title':_0x4796dd['name'],'status':0x1f4,'instance':'','type':''});throw _0x4796dd;}});}['view'](_0x1a8a18,_0x4721f3,_0x341211){return __awaiter$7(this,void 0,void 0,function*(){const _0x49b032=this['path']+'/'+_0x1a8a18+'/'+_0x4721f3;try{const _0x3b7e42=yield this['fetch']['get'](_0x49b032,_0x341211);if(_0x3b7e42['status']>0xc7&&_0x3b7e42['status']<0x12c){const _0x35634e=yield _0x3b7e42['json']();return new SuccessfulViewSearchServiceResponse(_0x35634e);}const _0x54b3bd=yield _0x3b7e42['json']();return new FailedViewSearchServiceResponse(_0x54b3bd);}catch(_0x338c82){if(_0x338c82 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x338c82['message'],'title':_0x338c82['name'],'status':0x1f4,'instance':'','type':''});throw _0x338c82;}});}['edit'](_0x1f98fa,_0x58ac92,_0x5c6e41,_0x482427,_0x2cf04d){return __awaiter$7(this,void 0,void 0,function*(){const _0x2a991d={'account_name':_0x1f98fa,'search_service_name':_0x58ac92,'key':_0x5c6e41,'country':_0x482427};try{const _0x3c8b6f=yield this['fetch']['put'](this['path'],_0x2cf04d,_0x2a991d);if(_0x3c8b6f['status']>0xc7&&_0x3c8b6f['status']<0x12c){const _0x218240=yield _0x3c8b6f['json']();return new SuccessfulSearchServiceResponse(_0x218240);}const _0x8f2b0f=yield _0x3c8b6f['json']();return new FailedSearchServiceResponse(_0x8f2b0f);}catch(_0x74f15f){if(_0x74f15f instanceof Error)return new FailedSearchServiceResponse({'detail':_0x74f15f['message'],'title':_0x74f15f['name'],'status':0x1f4,'instance':'','type':''});throw _0x74f15f;}});}['list'](_0x12fc6a,_0x17a6ef){return __awaiter$7(this,void 0,void 0,function*(){const _0x382acf=this['path']+'/'+_0x12fc6a;try{const _0x8f1e70=yield this['fetch']['get'](_0x382acf,_0x17a6ef);if(_0x8f1e70['status']>0xc7&&_0x8f1e70['status']<0x12c){const _0xc842ee=yield _0x8f1e70['json']();return new SuccessfulListSearchServiceResponse(_0xc842ee);}const _0x5b8156=yield _0x8f1e70['json']();return new FailedViewSearchServicesResponse(_0x5b8156);}catch(_0x788d9c){if(_0x788d9c instanceof Error)return new FailedViewSearchServicesResponse({'detail':_0x788d9c['message'],'title':_0x788d9c['name'],'status':0x1f4,'instance':'','type':''});throw _0x788d9c;}});}}
|
|
12
|
+
|
|
13
|
+
var __awaiter$6=undefined&&undefined['__awaiter']||function(_0x58e54c,_0x3ed8a1,_0x1784ba,_0x49fc62){function _0x55ea28(_0x31d2f4){return _0x31d2f4 instanceof _0x1784ba?_0x31d2f4:new _0x1784ba(function(_0x1a0c15){_0x1a0c15(_0x31d2f4);});}return new(_0x1784ba||(_0x1784ba=Promise))(function(_0x19c610,_0x4413b5){function _0x139f28(_0x22a11c){try{_0x11f524(_0x49fc62['next'](_0x22a11c));}catch(_0x289ebf){_0x4413b5(_0x289ebf);}}function _0x1fbdf1(_0x2048f2){try{_0x11f524(_0x49fc62['throw'](_0x2048f2));}catch(_0x281ee9){_0x4413b5(_0x281ee9);}}function _0x11f524(_0x795b2a){_0x795b2a['done']?_0x19c610(_0x795b2a['value']):_0x55ea28(_0x795b2a['value'])['then'](_0x139f28,_0x1fbdf1);}_0x11f524((_0x49fc62=_0x49fc62['apply'](_0x58e54c,_0x3ed8a1||[]))['next']());});};class FacetService{constructor(_0x51bfad){this['fetch']=_0x51bfad,this['path']='facet';}['create'](_0x3c03b4,_0x4ac0bd,_0x55c2ba,_0x4f4377){return __awaiter$6(this,void 0,void 0,function*(){const _0x25ff6c={'account_name':_0x3c03b4,'list_name':_0x4ac0bd,'facet_name':_0x55c2ba};try{const _0x21ebb7=yield this['fetch']['post'](this['path'],_0x4f4377,_0x25ff6c);if(_0x21ebb7['status']>0xc7&&_0x21ebb7['status']<0x12c){const _0x5b8c1e=yield _0x21ebb7['json']();return new SuccessfulFacetResponse(_0x5b8c1e);}const _0x34100c=yield _0x21ebb7['json']();return new FailedFacetResponse(_0x34100c);}catch(_0x2694d5){if(_0x2694d5 instanceof Error)return new FailedFacetResponse({'detail':_0x2694d5['message'],'title':_0x2694d5['name'],'status':0x1f4,'instance':'','type':''});throw _0x2694d5;}});}['remove'](_0x341f39,_0x1726a3,_0x1347d7,_0x39b60d){return __awaiter$6(this,void 0,void 0,function*(){const _0x443061='Facet/'+_0x341f39+'/'+_0x1726a3+'/'+_0x1347d7,_0x1221ff=yield this['fetch']['delete'](_0x443061,_0x39b60d);try{if(_0x1221ff['status']>0xc7&&_0x1221ff['status']<0x12c)return new SuccessfulResponse({});const _0x7907b1=yield _0x1221ff['json']();return new FailedResponse(_0x7907b1);}catch(_0x18887d){if(_0x18887d instanceof Error)return new FailedResponse({'detail':_0x18887d['message'],'title':_0x18887d['name'],'status':0x1f4,'instance':'','type':''});throw _0x18887d;}});}['rename'](_0x31b13f,_0x5a687f,_0x509468,_0x3f22ce,_0x1786fb){return __awaiter$6(this,void 0,void 0,function*(){let _0x3cee3f=this['path']+'/'+_0x31b13f+'/'+_0x5a687f;const _0x251405={'facet_name':_0x509468,'new_facet_name':_0x3f22ce};try{const _0x49df5c=yield this['fetch']['put'](_0x3cee3f,_0x1786fb,_0x251405);if(_0x49df5c['status']>0xc7&&_0x49df5c['status']<0x12c){const _0x2f7852=yield _0x49df5c['json']();return new SuccessfulFacetResponse(_0x2f7852);}const _0x16efb6=yield _0x49df5c['json']();return new FailedFacetResponse(_0x16efb6);}catch(_0x475751){if(_0x475751 instanceof Error)return new FailedFacetResponse({'detail':_0x475751['message'],'title':_0x475751['name'],'status':0x1f4,'instance':'','type':''});throw _0x475751;}});}['list'](_0x454e27,_0x112a55,_0x9c2a0c,_0x5284bd,_0x1e2a68){return __awaiter$6(this,void 0,void 0,function*(){let _0x28b785=this['path']+'/'+_0x454e27+'/'+_0x112a55+'/'+_0x9c2a0c+'/'+_0x5284bd;try{const _0x876c9f=yield this['fetch']['get'](_0x28b785,_0x1e2a68);if(_0x876c9f['status']>0xc7&&_0x876c9f['status']<0x12c){const _0x37cca4=yield _0x876c9f['json']();return new SuccessfulFacetValueResponse(_0x37cca4);}const _0x3f3252=yield _0x876c9f['json']();return new FailedFacetValuesResponse(_0x3f3252);}catch(_0xc80228){if(_0xc80228 instanceof Error)return new FailedFacetValuesResponse({'detail':_0xc80228['message'],'title':_0xc80228['name'],'status':0x1f4,'instance':'','type':''});throw _0xc80228;}});}}
|
|
14
|
+
|
|
15
|
+
var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x234306,_0xa599f2,_0x177972,_0x5cc508){function _0x2c0b6d(_0x1f3ecd){return _0x1f3ecd instanceof _0x177972?_0x1f3ecd:new _0x177972(function(_0x2de585){_0x2de585(_0x1f3ecd);});}return new(_0x177972||(_0x177972=Promise))(function(_0x53a5e1,_0x425015){function _0x31d4d1(_0x2f68df){try{_0x5a8a8f(_0x5cc508['next'](_0x2f68df));}catch(_0x2506f0){_0x425015(_0x2506f0);}}function _0xb1f67a(_0x9abf0c){try{_0x5a8a8f(_0x5cc508['throw'](_0x9abf0c));}catch(_0x488800){_0x425015(_0x488800);}}function _0x5a8a8f(_0x518b52){_0x518b52['done']?_0x53a5e1(_0x518b52['value']):_0x2c0b6d(_0x518b52['value'])['then'](_0x31d4d1,_0xb1f67a);}_0x5a8a8f((_0x5cc508=_0x5cc508['apply'](_0x234306,_0xa599f2||[]))['next']());});};class SearchResultService{constructor(_0x4eebd8){this['fetch']=_0x4eebd8,this['path']='search-result',this['isRealNumber']=_0x52818f=>_0x52818f!=undefined&&typeof _0x52818f==='number'&&Number['isFinite'](_0x52818f);}['create'](_0x545f53,_0x19a507,_0x2b7461,_0x2b0445,_0x37b7f8){return __awaiter$5(this,void 0,void 0,function*(){const _0x2470a8=Object['assign']({'account_name':_0x545f53,'search_result_name':_0x2b7461,'list_name':_0x19a507},_0x37b7f8);try{const _0x4ebfc6=yield this['fetch']['post'](this['path'],_0x2b0445,_0x2470a8);if(_0x4ebfc6['status']>0xc7&&_0x4ebfc6['status']<0x12c){const _0x4d864d=yield _0x4ebfc6['json']();return new SuccessfulSearchResultResponse(_0x4d864d);}const _0x67909f=yield _0x4ebfc6['json']();return new FailedSearchResultResponse(_0x67909f);}catch(_0x450d70){if(_0x450d70 instanceof Error)return new FailedSearchResultResponse({'detail':_0x450d70['message'],'title':_0x450d70['name'],'status':0x1f4,'instance':'','type':''});throw _0x450d70;}});}['list'](_0x5df7a,_0x550057,_0x2c839a,_0x3f3ae1){return __awaiter$5(this,void 0,void 0,function*(){let _0x522641=this['path']+'/'+_0x5df7a+'/'+_0x550057+'?'+this['getQueryStr'](_0x3f3ae1);try{const _0x3f9188=yield this['fetch']['get'](_0x522641,_0x2c839a);if(_0x3f9188['status']>0xc7&&_0x3f9188['status']<0x12c){const _0x31ed99=yield _0x3f9188['json']();return new SuccessfulListSearchResultResponse(_0x31ed99);}const _0x566abf=yield _0x3f9188['json']();return new FailedViewSearchResultResponse(_0x566abf);}catch(_0x4151d5){if(_0x4151d5 instanceof Error)return new FailedViewSearchResultResponse({'detail':_0x4151d5['message'],'title':_0x4151d5['name'],'status':0x1f4,'instance':'','type':''});throw _0x4151d5;}});}['get'](_0x41b481,_0x5a7eb3,_0x147ddd,_0x121e0a){return __awaiter$5(this,void 0,void 0,function*(){let _0x145413=this['path']+'/'+_0x41b481+'/'+_0x5a7eb3+'?'+_0x147ddd;try{const _0x3d95c7=yield this['fetch']['get'](_0x145413,_0x121e0a);if(_0x3d95c7['status']>0xc7&&_0x3d95c7['status']<0x12c){const _0xa5c402=yield _0x3d95c7['json']();return new SuccessfulSearchResultResponse(_0xa5c402);}const _0x2ba8aa=yield _0x3d95c7['json']();return new FailedSearchResultResponse(_0x2ba8aa);}catch(_0x480ded){if(_0x480ded instanceof Error)return new FailedSearchResultResponse({'detail':_0x480ded['message'],'title':_0x480ded['name'],'status':0x1f4,'instance':'','type':''});throw _0x480ded;}});}['delete'](_0x4b3b98,_0x3fda9f,_0x163a10,_0x479c3e){return __awaiter$5(this,void 0,void 0,function*(){const _0x530737=this['path']+'/'+_0x4b3b98+'/'+_0x3fda9f+'/'+_0x163a10,_0x3e4335=yield this['fetch']['delete'](_0x530737,_0x479c3e);try{if(_0x3e4335['status']>0xc7&&_0x3e4335['status']<0x12c)return new SuccessfulResponse({});const _0x311c08=yield _0x3e4335['json']();return new FailedResponse(_0x311c08);}catch(_0x1b1deb){if(_0x1b1deb instanceof Error)return new FailedResponse({'detail':_0x1b1deb['message'],'title':_0x1b1deb['name'],'status':0x1f4,'instance':'','type':''});throw _0x1b1deb;}});}['upload'](_0x18ed64,_0x31b385,_0x536759,_0x584c25){return __awaiter$5(this,void 0,void 0,function*(){const _0x5c66fa=this['path']+'/'+_0x18ed64+'/'+_0x31b385+'/upload',_0xb7dbd9=new FormData();_0xb7dbd9['append']('file',_0x536759);try{const _0x53b3ee=yield this['fetch']['upload'](_0x5c66fa,_0x584c25,_0xb7dbd9);if(_0x53b3ee['status']>0xc7&&_0x53b3ee['status']<0x12c)return new SuccessfulResponse({});const _0x59cbcc=yield _0x53b3ee['json']();return new FailedResponse(_0x59cbcc);}catch(_0x25703d){if(_0x25703d instanceof Error)return new FailedResponse({'detail':_0x25703d['message'],'title':_0x25703d['name'],'status':0x1f4,'instance':'','type':''});throw _0x25703d;}});}['edit'](_0x4c31db,_0x376a0c,_0x2d8460,_0x369c0b,_0x8539fa){return __awaiter$5(this,void 0,void 0,function*(){const _0x55d9f4=this['path']+'/'+_0x4c31db+'/'+_0x376a0c+'/'+_0x2d8460;try{const _0x40cd98=yield this['fetch']['put'](_0x55d9f4,_0x369c0b,_0x8539fa);if(_0x40cd98['status']>0xc7&&_0x40cd98['status']<0x12c){const _0x17408a=yield _0x40cd98['json']();return new SuccessfulSearchResultResponse(_0x17408a);}const _0x52641e=yield _0x40cd98['json']();return new FailedSearchResultResponse(_0x52641e);}catch(_0x4476c5){if(_0x4476c5 instanceof Error)return new FailedSearchResultResponse({'detail':_0x4476c5['message'],'title':_0x4476c5['name'],'status':0x1f4,'instance':'','type':''});throw _0x4476c5;}});}['getQueryStr'](_0x68069d){let _0x35c585='';const _0x41f33a=[];(_0x68069d===null||_0x68069d===void 0?void 0:_0x68069d['size'])&&_0x41f33a['push']('size='+_0x68069d['size']);(_0x68069d===null||_0x68069d===void 0?void 0:_0x68069d['skip'])&&_0x41f33a['push']('skip='+_0x68069d['skip']);(_0x68069d===null||_0x68069d===void 0?void 0:_0x68069d['query'])&&_0x41f33a['push']('query='+_0x68069d['query']);(_0x68069d===null||_0x68069d===void 0?void 0:_0x68069d['filter'])&&_0x41f33a['push']('filter='+_0x68069d['filter']);if((_0x68069d===null||_0x68069d===void 0?void 0:_0x68069d['radius'])&&this['isRealNumber'](_0x68069d['radius']['latitude'])&&this['isRealNumber'](_0x68069d['radius']['longitude'])&&this['isRealNumber'](_0x68069d['radius']['distance_in_km'])){const _0x2539fc=_0x68069d['radius']['latitude']+','+_0x68069d['radius']['longitude']+','+_0x68069d['radius']['distance_in_km'];_0x41f33a['push']('radius='+_0x2539fc);}return _0x68069d['active']===![]&&_0x41f33a['push']('active='+_0x68069d['active']),_0x41f33a['length']>0x0&&_0x41f33a['forEach']((_0x330dc0,_0x206e2c)=>{if(_0x206e2c>0x0&&_0x35c585)_0x35c585+='&';_0x35c585+=_0x330dc0;}),_0x35c585;}}
|
|
16
|
+
|
|
17
|
+
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x628494,_0x52927a,_0x58a0fa,_0x17b48e){function _0x4d2375(_0x4dc72a){return _0x4dc72a instanceof _0x58a0fa?_0x4dc72a:new _0x58a0fa(function(_0x26a6c1){_0x26a6c1(_0x4dc72a);});}return new(_0x58a0fa||(_0x58a0fa=Promise))(function(_0x4fe973,_0x5382c7){function _0x2d9da1(_0x93c4a4){try{_0x8f69f9(_0x17b48e['next'](_0x93c4a4));}catch(_0x2aee37){_0x5382c7(_0x2aee37);}}function _0x26fe70(_0x443c1a){try{_0x8f69f9(_0x17b48e['throw'](_0x443c1a));}catch(_0x22f4af){_0x5382c7(_0x22f4af);}}function _0x8f69f9(_0x4b31f8){_0x4b31f8['done']?_0x4fe973(_0x4b31f8['value']):_0x4d2375(_0x4b31f8['value'])['then'](_0x2d9da1,_0x26fe70);}_0x8f69f9((_0x17b48e=_0x17b48e['apply'](_0x628494,_0x52927a||[]))['next']());});};class ContributorService{constructor(_0x41ffe3){this['fetch']=_0x41ffe3,this['path']='contributor';}['create'](_0x38dcc9,_0x2913e4,_0x329c26,_0x2a6f09){return __awaiter$4(this,void 0,void 0,function*(){const _0x49565f={'account_name':_0x38dcc9,'list_name':_0x2913e4,'contributor_name':_0x329c26};try{const _0xe96edd=yield this['fetch']['post'](this['path'],_0x2a6f09,_0x49565f);if(_0xe96edd['status']>0xc7&&_0xe96edd['status']<0x12c){const _0x323040=yield _0xe96edd['json']();return new SuccessfulContributorResponse(_0x323040);}const _0x59d803=yield _0xe96edd['json']();return new FailedContributorResponse(_0x59d803);}catch(_0x3dce5b){if(_0x3dce5b instanceof Error)return new FailedContributorResponse({'detail':_0x3dce5b['message'],'title':_0x3dce5b['name'],'status':0x1f4,'instance':'','type':''});throw _0x3dce5b;}});}['remove'](_0x53be67,_0x2c496d,_0x38a9aa,_0x5cc9dc){return __awaiter$4(this,void 0,void 0,function*(){const _0x74c3b=this['path']+'/'+_0x53be67+'/'+_0x2c496d+'/'+_0x38a9aa,_0x3973c5=yield this['fetch']['delete'](_0x74c3b,_0x5cc9dc);try{if(_0x3973c5['status']>0xc7&&_0x3973c5['status']<0x12c)return new SuccessfulResponse({});const _0x71b24e=yield _0x3973c5['json']();return new FailedResponse(_0x71b24e);}catch(_0x1f2a28){if(_0x1f2a28 instanceof Error)return new FailedResponse({'detail':_0x1f2a28['message'],'title':_0x1f2a28['name'],'status':0x1f4,'instance':'','type':''});throw _0x1f2a28;}});}['startsWith'](_0x4e8008,_0x2b921b){return __awaiter$4(this,void 0,void 0,function*(){const _0xce4321=this['path']+'/'+_0x4e8008;try{const _0x2a6868=yield this['fetch']['get'](_0xce4321,_0x2b921b);if(_0x2a6868['status']>0xc7&&_0x2a6868['status']<0x12c){const _0x432469=yield _0x2a6868['json']();return new SuccessfulAccountAndImageResponse(_0x432469);}const _0x107f88=yield _0x2a6868['json']();return new FailedAccountAndImageResponse(_0x107f88);}catch(_0x170850){if(_0x170850 instanceof Error)return new FailedAccountAndImageResponse({'detail':_0x170850['message'],'title':_0x170850['name'],'status':0x1f4,'instance':'','type':''});throw _0x170850;}});}}
|
|
18
|
+
|
|
19
|
+
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x455311,_0x1f3cde,_0x1a657b,_0x2fb8bc){function _0x33144a(_0x3ac039){return _0x3ac039 instanceof _0x1a657b?_0x3ac039:new _0x1a657b(function(_0x2e0604){_0x2e0604(_0x3ac039);});}return new(_0x1a657b||(_0x1a657b=Promise))(function(_0x2df565,_0x208077){function _0x352fa8(_0x12ec7b){try{_0xb31be2(_0x2fb8bc['next'](_0x12ec7b));}catch(_0x39c480){_0x208077(_0x39c480);}}function _0x2f28d7(_0x2ff178){try{_0xb31be2(_0x2fb8bc['throw'](_0x2ff178));}catch(_0x4a898f){_0x208077(_0x4a898f);}}function _0xb31be2(_0x12fff7){_0x12fff7['done']?_0x2df565(_0x12fff7['value']):_0x33144a(_0x12fff7['value'])['then'](_0x352fa8,_0x2f28d7);}_0xb31be2((_0x2fb8bc=_0x2fb8bc['apply'](_0x455311,_0x1f3cde||[]))['next']());});};class SearchableFieldService{constructor(_0x1c034d){this['fetch']=_0x1c034d,this['path']='searchable-field';}['create'](_0x29f3cd,_0x316b89,_0x593797,_0x3042cb){return __awaiter$3(this,void 0,void 0,function*(){const _0x4cc84b={'account_name':_0x29f3cd,'list_name':_0x316b89,'searchable_field_name':_0x593797};try{const _0x54cd58=yield this['fetch']['post'](this['path'],_0x3042cb,_0x4cc84b);if(_0x54cd58['status']>0xc7&&_0x54cd58['status']<0x12c){const _0x4a2261=yield _0x54cd58['json']();return new SuccessfulSearchableFieldResponse(_0x4a2261);}const _0x4c257a=yield _0x54cd58['json']();return new FailedSearchableFieldResponse(_0x4c257a);}catch(_0x56e2b3){if(_0x56e2b3 instanceof Error)return new FailedSearchableFieldResponse({'detail':_0x56e2b3['message'],'title':_0x56e2b3['name'],'status':0x1f4,'instance':'','type':''});throw _0x56e2b3;}});}['remove'](_0x3d1dba,_0x1387b6,_0x78041a,_0x15b935){return __awaiter$3(this,void 0,void 0,function*(){const _0x73c9ad=this['path']+'/'+_0x3d1dba+'/'+_0x1387b6+'/'+_0x78041a,_0x1e32a1=yield this['fetch']['delete'](_0x73c9ad,_0x15b935);try{if(_0x1e32a1['status']>0xc7&&_0x1e32a1['status']<0x12c)return new SuccessfulResponse({});const _0x544882=yield _0x1e32a1['json']();return new FailedResponse(_0x544882);}catch(_0x1b90b9){if(_0x1b90b9 instanceof Error)return new FailedResponse({'detail':_0x1b90b9['message'],'title':_0x1b90b9['name'],'status':0x1f4,'instance':'','type':''});throw _0x1b90b9;}});}['rename'](_0x22c2be,_0x153d2b,_0x4f1ed6,_0x41a5f1,_0x3a4660){return __awaiter$3(this,void 0,void 0,function*(){let _0x3fea68=this['path']+'/'+_0x22c2be+'/'+_0x153d2b;const _0x22bea1={'searchable_field_name':_0x4f1ed6,'new_searchable_field_name':_0x41a5f1};try{const _0x477733=yield this['fetch']['put'](_0x3fea68,_0x3a4660,_0x22bea1);if(_0x477733['status']>0xc7&&_0x477733['status']<0x12c){const _0x334d56=yield _0x477733['json']();return new SuccessfulSearchableFieldResponse(_0x334d56);}const _0x287e1e=yield _0x477733['json']();return new FailedSearchableFieldResponse(_0x287e1e);}catch(_0x19606e){if(_0x19606e instanceof Error)return new FailedSearchableFieldResponse({'detail':_0x19606e['message'],'title':_0x19606e['name'],'status':0x1f4,'instance':'','type':''});throw _0x19606e;}});}}
|
|
20
|
+
|
|
21
|
+
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x2a1c47,_0x1929ea,_0x3f5206,_0x228a23){function _0x522420(_0x2cc4bb){return _0x2cc4bb instanceof _0x3f5206?_0x2cc4bb:new _0x3f5206(function(_0xb07bdb){_0xb07bdb(_0x2cc4bb);});}return new(_0x3f5206||(_0x3f5206=Promise))(function(_0x2f470f,_0x5f8157){function _0x3038b1(_0x2e9a05){try{_0x31307f(_0x228a23['next'](_0x2e9a05));}catch(_0x44f074){_0x5f8157(_0x44f074);}}function _0x2889e8(_0xc01cbf){try{_0x31307f(_0x228a23['throw'](_0xc01cbf));}catch(_0x5b0235){_0x5f8157(_0x5b0235);}}function _0x31307f(_0x879112){_0x879112['done']?_0x2f470f(_0x879112['value']):_0x522420(_0x879112['value'])['then'](_0x3038b1,_0x2889e8);}_0x31307f((_0x228a23=_0x228a23['apply'](_0x2a1c47,_0x1929ea||[]))['next']());});};class ResourceService{constructor(_0x61ae7f){this['fetch']=_0x61ae7f,this['path']='resource';}['create'](_0xc0d18d,_0x155a21,_0x23ee17,_0x5434f4){return __awaiter$2(this,void 0,void 0,function*(){const _0x30cbf5={'account_name':_0xc0d18d,'list_name':_0x155a21,'resource_name':_0x23ee17};try{const _0xc2d011=yield this['fetch']['post'](this['path'],_0x5434f4,_0x30cbf5);if(_0xc2d011['status']>0xc7&&_0xc2d011['status']<0x12c){const _0x4d15b2=yield _0xc2d011['json']();return new SuccessfulResourceResponse(_0x4d15b2);}const _0x496009=yield _0xc2d011['json']();return new FailedResourceResponse(_0x496009);}catch(_0x5d0f71){if(_0x5d0f71 instanceof Error)return new FailedResourceResponse({'detail':_0x5d0f71['message'],'title':_0x5d0f71['name'],'status':0x1f4,'instance':'','type':''});throw _0x5d0f71;}});}['remove'](_0x434086,_0x155b3a,_0x55cee5,_0x53690a){return __awaiter$2(this,void 0,void 0,function*(){const _0x5a3f6a=this['path']+'/'+_0x434086+'/'+_0x155b3a+'/'+_0x55cee5,_0x5ed521=yield this['fetch']['delete'](_0x5a3f6a,_0x53690a);try{if(_0x5ed521['status']>0xc7&&_0x5ed521['status']<0x12c)return new SuccessfulResponse({});const _0x1a05de=yield _0x5ed521['json']();return new FailedResponse(_0x1a05de);}catch(_0x39480b){if(_0x39480b instanceof Error)return new FailedResponse({'detail':_0x39480b['message'],'title':_0x39480b['name'],'status':0x1f4,'instance':'','type':''});throw _0x39480b;}});}['rename'](_0x5b822c,_0x3e33ea,_0x7747b1,_0x37bbd9,_0x51ac64){return __awaiter$2(this,void 0,void 0,function*(){let _0x38cad9=this['path']+'/'+_0x5b822c+'/'+_0x3e33ea;const _0xa0f133={'resource_name':_0x7747b1,'new_resource_name':_0x37bbd9};try{const _0x4e2252=yield this['fetch']['put'](_0x38cad9,_0x51ac64,_0xa0f133);if(_0x4e2252['status']>0xc7&&_0x4e2252['status']<0x12c){const _0x37be6d=yield _0x4e2252['json']();return new SuccessfulResourceResponse(_0x37be6d);}const _0x4caa69=yield _0x4e2252['json']();return new FailedResourceResponse(_0x4caa69);}catch(_0x4f5e0f){if(_0x4f5e0f instanceof Error)return new FailedResourceResponse({'detail':_0x4f5e0f['message'],'title':_0x4f5e0f['name'],'status':0x1f4,'instance':'','type':''});throw _0x4f5e0f;}});}}
|
|
22
|
+
|
|
23
|
+
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x13efd3,_0x1142bd,_0x5cb009,_0x51f350){function _0x15f87e(_0x203153){return _0x203153 instanceof _0x5cb009?_0x203153:new _0x5cb009(function(_0x21b778){_0x21b778(_0x203153);});}return new(_0x5cb009||(_0x5cb009=Promise))(function(_0x1974ac,_0x5ad18a){function _0x50fe8a(_0x236e47){try{_0x60c120(_0x51f350['next'](_0x236e47));}catch(_0x58a4f5){_0x5ad18a(_0x58a4f5);}}function _0x5efeaa(_0x42aa44){try{_0x60c120(_0x51f350['throw'](_0x42aa44));}catch(_0x1f6941){_0x5ad18a(_0x1f6941);}}function _0x60c120(_0x321ace){_0x321ace['done']?_0x1974ac(_0x321ace['value']):_0x15f87e(_0x321ace['value'])['then'](_0x50fe8a,_0x5efeaa);}_0x60c120((_0x51f350=_0x51f350['apply'](_0x13efd3,_0x1142bd||[]))['next']());});};class GroupService{constructor(_0x15f3a7){this['fetch']=_0x15f3a7,this['path']='group',this['List']=new GroupListService(_0x15f3a7);}['create'](_0x16d32b,_0xbe9416,_0x5283e7,_0x41a367){return __awaiter$1(this,void 0,void 0,function*(){const _0x497e6a={'account_name':_0x16d32b,'search_service_name':_0xbe9416,'group_name':_0x5283e7};try{const _0x3a6197=yield this['fetch']['post'](this['path'],_0x41a367,_0x497e6a);if(_0x3a6197['status']>0xc7&&_0x3a6197['status']<0x12c){const _0x2864cc=yield _0x3a6197['json']();return new SuccessfulGroupResponse(_0x2864cc);}const _0x27653a=yield _0x3a6197['json']();return new FailedGroupResponse(_0x27653a);}catch(_0x508fe4){if(_0x508fe4 instanceof Error)return new FailedGroupResponse({'detail':_0x508fe4['message'],'title':_0x508fe4['name'],'status':0x1f4,'instance':'','type':''});throw _0x508fe4;}});}['delete'](_0x15bcea,_0x2e83bd,_0x54167b){return __awaiter$1(this,void 0,void 0,function*(){const _0x5e47d6=this['path']+'/'+_0x15bcea+'/'+_0x2e83bd,_0x3a9af2=yield this['fetch']['delete'](_0x5e47d6,_0x54167b);try{if(_0x3a9af2['status']>0xc7&&_0x3a9af2['status']<0x12c)return new SuccessfulResponse({});const _0xe0203d=yield _0x3a9af2['json']();return new FailedResponse(_0xe0203d);}catch(_0x12ec4a){if(_0x12ec4a instanceof Error)return new FailedResponse({'detail':_0x12ec4a['message'],'title':_0x12ec4a['name'],'status':0x1f4,'instance':'','type':''});throw _0x12ec4a;}});}}class GroupListService{constructor(_0x3a5ca6){this['fetch']=_0x3a5ca6,this['path']='group/list';}['add'](_0x145874,_0x392182,_0x1f1af3,_0x59ee5c,_0x16d258){return __awaiter$1(this,void 0,void 0,function*(){const _0x5e3e67={'list_name':_0x1f1af3,'version':_0x59ee5c};try{const _0x202448=yield this['fetch']['put'](this['path']+'/'+_0x145874+'/'+_0x392182,_0x16d258,_0x5e3e67);if(_0x202448['status']>0xc7&&_0x202448['status']<0x12c){const _0x4959b9=yield _0x202448['json']();return new SuccessfulListIdentityResponse(_0x4959b9);}const _0x1c134a=yield _0x202448['json']();return new FailedListIdentityResponse(_0x1c134a);}catch(_0x4e92ee){if(_0x4e92ee instanceof Error)return new FailedListIdentityResponse({'detail':_0x4e92ee['message'],'title':_0x4e92ee['name'],'status':0x1f4,'instance':'','type':''});throw _0x4e92ee;}});}['delete'](_0x4b00b9,_0xe9c4f7,_0x3de645,_0x5728f2){return __awaiter$1(this,void 0,void 0,function*(){const _0x42674c=this['path']+'/'+_0x4b00b9+'/'+_0xe9c4f7+'/'+_0x3de645,_0x2c5790=yield this['fetch']['delete'](_0x42674c,_0x5728f2);try{if(_0x2c5790['status']>0xc7&&_0x2c5790['status']<0x12c)return new SuccessfulResponse({});const _0x30fec9=yield _0x2c5790['json']();return new FailedResponse(_0x30fec9);}catch(_0x2e2f91){if(_0x2e2f91 instanceof Error)return new FailedResponse({'detail':_0x2e2f91['message'],'title':_0x2e2f91['name'],'status':0x1f4,'instance':'','type':''});throw _0x2e2f91;}});}}
|
|
24
|
+
|
|
25
|
+
var __awaiter=undefined&&undefined['__awaiter']||function(_0x3cf5ee,_0x456f53,_0x13eb62,_0x5b52fa){function _0x2e84cc(_0x4c67eb){return _0x4c67eb instanceof _0x13eb62?_0x4c67eb:new _0x13eb62(function(_0x1e58f3){_0x1e58f3(_0x4c67eb);});}return new(_0x13eb62||(_0x13eb62=Promise))(function(_0x22e050,_0x3b4b39){function _0xda71ea(_0x5a0e88){try{_0x5e54a2(_0x5b52fa['next'](_0x5a0e88));}catch(_0x550244){_0x3b4b39(_0x550244);}}function _0x19fa1c(_0x22a15f){try{_0x5e54a2(_0x5b52fa['throw'](_0x22a15f));}catch(_0x5b9465){_0x3b4b39(_0x5b9465);}}function _0x5e54a2(_0x2be59c){_0x2be59c['done']?_0x22e050(_0x2be59c['value']):_0x2e84cc(_0x2be59c['value'])['then'](_0xda71ea,_0x19fa1c);}_0x5e54a2((_0x5b52fa=_0x5b52fa['apply'](_0x3cf5ee,_0x456f53||[]))['next']());});};class AdminClient{constructor(_0x487cdc='https://admin.searchability.dev/'){var _0x481118=new Fetch(_0x487cdc);this['Accounts']=new AccountService(_0x481118),this['Lists']=new ListService(_0x481118),this['ApiKeys']=new ApiKeyService(_0x481118),this['SearchServers']=new SearchServersService(_0x481118),this['Facets']=new FacetService(_0x481118),this['SearchResults']=new SearchResultService(_0x481118),this['Contributors']=new ContributorService(_0x481118),this['SearchableFields']=new SearchableFieldService(_0x481118),this['Groups']=new GroupService(_0x481118),this['Resources']=new ResourceService(_0x481118);}}class AuthClient{constructor(_0x30f3b3='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x30f3b3);}['login'](_0x13ff3c){return __awaiter(this,void 0,void 0,function*(){const _0x444c03='login/'+_0x13ff3c;try{const _0x18faf9=yield yield fetch(_0x444c03);if(_0x18faf9['status']>0xc7&&_0x18faf9['status']<0x12c){const _0x4dd5fe=yield _0x18faf9['json']();return new SuccessfulAuthResponse(_0x4dd5fe);}const _0xb1a717=yield _0x18faf9['json']();return new FailedAuthResponse(_0xb1a717);}catch(_0x2bb5bc){if(_0x2bb5bc instanceof Error)return new FailedAuthResponse({'detail':_0x2bb5bc['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x2bb5bc;}});}['refresh'](_0x216f28){return __awaiter(this,void 0,void 0,function*(){const _0x249146='refresh',_0x4d5e39={'refresh_token':_0x216f28};try{const _0x497a44=yield this['fetch']['PostNoAuth'](_0x249146,_0x4d5e39);if(_0x497a44['status']>0xc7&&_0x497a44['status']<0x12c){const _0x1b1480=yield _0x497a44['json']();return new SuccessfulAuthResponse(_0x1b1480);}const _0x12bec4=yield _0x497a44['json']();return new FailedAuthResponse(_0x12bec4);}catch(_0x1193a5){if(_0x1193a5 instanceof Error)return new FailedAuthResponse({'detail':_0x1193a5['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x1193a5;}});}['getTokenStatus'](_0xe13244){if(Date['now']()<_0xe13244['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0xe13244['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
|
|
26
|
+
|
|
27
|
+
export { AdminClient, AuthClient, TokenStatus, Tokens };
|