@searchability/admin-client 0.0.145 → 0.0.147
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(_0x385bc8){_0x385bc8[_0x385bc8['Ok']=0x0]='Ok',_0x385bc8[_0x385bc8['Refresh']=0x1]='Refresh',_0x385bc8[_0x385bc8['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(_0x3b8930){this['isSuccess']=_0x3b8930;}}class SuccessfulFacetValueResponse extends Response{constructor(_0x5c3c10){super(!![]),this['facets']=_0x5c3c10;}['toSuccess'](){return this['facets'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetValuesResponse extends Response{constructor(_0x179766){super(![]),this['problem']=_0x179766;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulContributorResponse extends Response{constructor(_0x40651c){super(!![]),this['contributor']=_0x40651c;}['toSuccess'](){return this['contributor'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedContributorResponse extends Response{constructor(_0x1069f6){super(![]),this['problem']=_0x1069f6;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountAndImageResponse extends Response{constructor(_0x1971a2){super(!![]),this['accountAndImages']=_0x1971a2;}['toSuccess'](){return this['accountAndImages'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountAndImageResponse extends Response{constructor(_0x1166fc){super(![]),this['problem']=_0x1166fc;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulResourceResponse extends Response{constructor(_0x180c9f){super(!![]),this['resource']=_0x180c9f;}['toSuccess'](){return this['resource'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResourceResponse extends Response{constructor(_0x24edb0){super(![]),this['problem']=_0x24edb0;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulFacetResponse extends Response{constructor(_0x37099d){super(!![]),this['facet']=_0x37099d;}['toSuccess'](){return this['facet'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetResponse extends Response{constructor(_0x3c274e){super(![]),this['problem']=_0x3c274e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedSearchableFieldResponse extends Response{constructor(_0x347725){super(![]),this['problem']=_0x347725;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchableFieldResponse extends Response{constructor(_0xa219e9){super(!![]),this['searchable_field']=_0xa219e9;}['toSuccess'](){return this['searchable_field'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountResponse extends Response{constructor(_0x214a21){super(!![]),this['account']=_0x214a21;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountImageResponse extends Response{constructor(_0x1e6216){super(!![]),this['accountImage']=_0x1e6216;}['toSuccess'](){return this['accountImage'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListIdentityResponse extends Response{constructor(_0x807574){super(!![]),this['list']=_0x807574;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulGroupResponse extends Response{constructor(_0x5ecf72){super(!![]),this['group']=_0x5ecf72;}['toSuccess'](){return this['group'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedGroupResponse extends Response{constructor(_0x58c064){super(![]),this['problem']=_0x58c064;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListResponse extends Response{constructor(_0x582935){super(!![]),this['list']=_0x582935;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedListResponse extends Response{constructor(_0x29a84d){super(![]),this['problem']=_0x29a84d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountResponse extends Response{constructor(_0x2b3b20){super(![]),this['problem']=_0x2b3b20;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountImageResponse extends Response{constructor(_0x3000b2){super(![]),this['problem']=_0x3000b2;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListIdentityResponse extends Response{constructor(_0x3e4641){super(![]),this['problem']=_0x3e4641;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x3cc8d8){super(!![]),this['tokens']=_0x3cc8d8;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x1eb8ec){super(![]),this['problem']=_0x1eb8ec;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x5d6e76){super(!![]),this['apiKey']=_0x5d6e76;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x1a1771){super(![]),this['problem']=_0x1a1771;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x127051){super(!![]),this['searchService']=_0x127051;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x2b86b7){super(![]),this['problem']=_0x2b86b7;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x248ffd){super(!![]),this['searchService']=_0x248ffd;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulSearchResultResponse extends Response{constructor(_0xc385ee){super(!![]),this['searchResult']=_0xc385ee;}['toSuccess'](){return this['searchResult'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchResultResponse extends Response{constructor(_0x56f49c){super(![]),this['problem']=_0x56f49c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchResultResponse extends Response{constructor(_0x4804bc){super(!![]),this['searchResults']=_0x4804bc;}['toSuccess'](){return this['searchResults'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchResultResponse extends Response{constructor(_0x323b45){super(![]),this['problem']=_0x323b45;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchServiceResponse extends Response{constructor(_0x1fa241){super(!![]),this['searchServices']=_0x1fa241;}['toSuccess'](){return this['searchServices'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServicesResponse extends Response{constructor(_0x5bfea6){super(![]),this['problem']=_0x5bfea6;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedViewSearchServiceResponse extends Response{constructor(_0x2c819c){super(![]),this['problem']=_0x2c819c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x2165cc){super(!![]),this['apiKeyValue']=_0x2165cc;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x35cfb2){super(!![]),this['obj']=_0x35cfb2;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x49db58){super(![]),this['problem']=_0x49db58;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x5adc5a){super(![]),this['problem']=_0x5adc5a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
|
|
2
|
+
|
|
3
|
+
var __awaiter$b=undefined&&undefined['__awaiter']||function(_0x27f87a,_0x5dd6d8,_0x247524,_0x47d540){function _0x1d6f0a(_0x2dc4aa){return _0x2dc4aa instanceof _0x247524?_0x2dc4aa:new _0x247524(function(_0x20d8e6){_0x20d8e6(_0x2dc4aa);});}return new(_0x247524||(_0x247524=Promise))(function(_0x5f491b,_0x221de0){function _0x190663(_0x5965b8){try{_0x494c0b(_0x47d540['next'](_0x5965b8));}catch(_0xcdf550){_0x221de0(_0xcdf550);}}function _0x2703c4(_0x4c16f3){try{_0x494c0b(_0x47d540['throw'](_0x4c16f3));}catch(_0x4046f9){_0x221de0(_0x4046f9);}}function _0x494c0b(_0x43feb2){_0x43feb2['done']?_0x5f491b(_0x43feb2['value']):_0x1d6f0a(_0x43feb2['value'])['then'](_0x190663,_0x2703c4);}_0x494c0b((_0x47d540=_0x47d540['apply'](_0x27f87a,_0x5dd6d8||[]))['next']());});};class AccountService{constructor(_0x172eb6){this['fetch']=_0x172eb6;}['get'](_0x290e94,_0x108446){return __awaiter$b(this,void 0,void 0,function*(){const _0xd5c1ff='Account/'+_0x290e94+'/',_0x7edb94=yield this['fetch']['get'](_0xd5c1ff,_0x108446);try{if(_0x7edb94['status']>0xc7&&_0x7edb94['status']<0x12c){const _0x333537=yield _0x7edb94['json']();return new SuccessfulAccountResponse(_0x333537);}const _0x651e5d=yield _0x7edb94['json']();return new FailedAccountResponse(_0x651e5d);}catch(_0x35b63d){if(_0x35b63d instanceof Error)return new FailedAccountResponse({'detail':_0x35b63d['message'],'title':_0x35b63d['name'],'status':0x1f4,'instance':'','type':''});throw _0x35b63d;}});}['getImage'](_0x1342b3,_0x1f0767){return __awaiter$b(this,void 0,void 0,function*(){const _0x4098e3='account/image/'+_0x1342b3+'/',_0x4a9560=yield this['fetch']['get'](_0x4098e3,_0x1f0767);try{if(_0x4a9560['status']>0xc7&&_0x4a9560['status']<0x12c){const _0x2ea836=yield _0x4a9560['json']();return new SuccessfulAccountImageResponse(_0x2ea836);}const _0x5d6ad1=yield _0x4a9560['json']();return new FailedAccountImageResponse(_0x5d6ad1);}catch(_0x422ddf){if(_0x422ddf instanceof Error)return new FailedAccountImageResponse({'detail':_0x422ddf['message'],'title':_0x422ddf['name'],'status':0x1f4,'instance':'','type':''});throw _0x422ddf;}});}}
|
|
4
|
+
|
|
5
|
+
var __awaiter$a=undefined&&undefined['__awaiter']||function(_0x3cf92c,_0x8c5e84,_0x284bdb,_0x2d1391){function _0x33461d(_0x4680db){return _0x4680db instanceof _0x284bdb?_0x4680db:new _0x284bdb(function(_0x533e80){_0x533e80(_0x4680db);});}return new(_0x284bdb||(_0x284bdb=Promise))(function(_0x465e68,_0x11dc35){function _0x29b2ea(_0x3a3d35){try{_0x242f59(_0x2d1391['next'](_0x3a3d35));}catch(_0xad76ac){_0x11dc35(_0xad76ac);}}function _0x255708(_0x150669){try{_0x242f59(_0x2d1391['throw'](_0x150669));}catch(_0x221cdf){_0x11dc35(_0x221cdf);}}function _0x242f59(_0x201d18){_0x201d18['done']?_0x465e68(_0x201d18['value']):_0x33461d(_0x201d18['value'])['then'](_0x29b2ea,_0x255708);}_0x242f59((_0x2d1391=_0x2d1391['apply'](_0x3cf92c,_0x8c5e84||[]))['next']());});};class ApiKeyService{constructor(_0x787a2){this['fetch']=_0x787a2,this['path']='api-key';}['create'](_0x2eac1b,_0xb84b84,_0x5d24db){return __awaiter$a(this,void 0,void 0,function*(){const _0xa93e7c={'account_name':_0x2eac1b,'api_key_name':_0xb84b84};try{const _0x59fad7=yield this['fetch']['post'](this['path'],_0x5d24db,_0xa93e7c);if(_0x59fad7['status']>0xc7&&_0x59fad7['status']<0x12c){const _0x1a8dfb=yield _0x59fad7['json']();return new SuccessfulApiKeyResponse(_0x1a8dfb);}const _0x51894f=yield _0x59fad7['json']();return new FailedApiKeyResponse(_0x51894f);}catch(_0x439dd7){if(_0x439dd7 instanceof Error)return new FailedApiKeyResponse({'detail':_0x439dd7['message'],'title':_0x439dd7['name'],'status':0x1f4,'instance':'','type':''});throw _0x439dd7;}});}['view'](_0x1cd6e3,_0x210646,_0x15dbe0){return __awaiter$a(this,void 0,void 0,function*(){const _0xb42fac=this['path']+'/'+_0x1cd6e3+'/'+_0x210646;try{const _0x292f5e=yield this['fetch']['get'](_0xb42fac,_0x15dbe0);if(_0x292f5e['status']>0xc7&&_0x292f5e['status']<0x12c){const _0x48393c=yield _0x292f5e['json']();return new SuccessfulApiKeyValueResponse(_0x48393c);}const _0x47c78b=yield _0x292f5e['json']();return new FailedApiKeyValueResponse(_0x47c78b);}catch(_0xee469a){if(_0xee469a instanceof Error)return new FailedApiKeyValueResponse({'detail':_0xee469a['message'],'title':_0xee469a['name'],'status':0x1f4,'instance':'','type':''});throw _0xee469a;}});}['delete'](_0x217d2c,_0x5472f0,_0x28fdd5){return __awaiter$a(this,void 0,void 0,function*(){const _0x4a04a6=this['path']+'/'+_0x217d2c+'/'+_0x5472f0;try{const _0x2420e8=yield this['fetch']['delete'](_0x4a04a6,_0x28fdd5);if(_0x2420e8['status']>0xc7&&_0x2420e8['status']<0x12c)return new SuccessfulResponse({});const _0x375497=yield _0x2420e8['json']();return new FailedResponse(_0x375497);}catch(_0xf9309){if(_0xf9309 instanceof Error)return new FailedResponse({'detail':_0xf9309['message'],'title':_0xf9309['name'],'status':0x1f4,'instance':'','type':''});throw _0xf9309;}});}}
|
|
6
|
+
|
|
7
|
+
var __awaiter$9=undefined&&undefined['__awaiter']||function(_0x1ed631,_0x367f8b,_0x3f0007,_0x2390f6){function _0x3a194c(_0x26c92d){return _0x26c92d instanceof _0x3f0007?_0x26c92d:new _0x3f0007(function(_0x57ed46){_0x57ed46(_0x26c92d);});}return new(_0x3f0007||(_0x3f0007=Promise))(function(_0x511a9d,_0x2764e9){function _0xbe641a(_0x2a56d0){try{_0x50830d(_0x2390f6['next'](_0x2a56d0));}catch(_0x1c2664){_0x2764e9(_0x1c2664);}}function _0x433a6f(_0x3b6db5){try{_0x50830d(_0x2390f6['throw'](_0x3b6db5));}catch(_0x977d19){_0x2764e9(_0x977d19);}}function _0x50830d(_0x397b35){_0x397b35['done']?_0x511a9d(_0x397b35['value']):_0x3a194c(_0x397b35['value'])['then'](_0xbe641a,_0x433a6f);}_0x50830d((_0x2390f6=_0x2390f6['apply'](_0x1ed631,_0x367f8b||[]))['next']());});};class ListService{constructor(_0x128db3){this['fetch']=_0x128db3,this['path']='list',this['Coordinates']=new CoordinatesService(_0x128db3),this['GeneratedSuggestions']=new GeneratedSuggestionsService(_0x128db3);}['create'](_0x55a2b4,_0x4d7699,_0x3705aa,_0x587c7f){return __awaiter$9(this,void 0,void 0,function*(){const _0x51a36e={'account_name':_0x55a2b4,'list_name':_0x4d7699,'search_service_name':_0x3705aa};try{const _0xe361c6=yield this['fetch']['post'](this['path'],_0x587c7f,_0x51a36e);if(_0xe361c6['status']>0xc7&&_0xe361c6['status']<0x12c){const _0x5127d1=yield _0xe361c6['json']();return new SuccessfulListIdentityResponse(_0x5127d1);}const _0xa24319=yield _0xe361c6['json']();return new FailedListIdentityResponse(_0xa24319);}catch(_0x2df9e1){if(_0x2df9e1 instanceof Error)return new FailedListIdentityResponse({'detail':_0x2df9e1['message'],'title':_0x2df9e1['name'],'status':0x1f4,'instance':'','type':''});throw _0x2df9e1;}});}['delete'](_0x38d385,_0x22a8b7,_0xfd91de){return __awaiter$9(this,void 0,void 0,function*(){const _0x37762e=this['path']+'/'+_0x38d385+'/'+_0x22a8b7,_0x718419=yield this['fetch']['delete'](_0x37762e,_0xfd91de);try{if(_0x718419['status']>0xc7&&_0x718419['status']<0x12c)return new SuccessfulResponse({});const _0x37f227=yield _0x718419['json']();return new FailedResponse(_0x37f227);}catch(_0x567975){if(_0x567975 instanceof Error)return new FailedResponse({'detail':_0x567975['message'],'title':_0x567975['name'],'status':0x1f4,'instance':'','type':''});throw _0x567975;}});}['get'](_0x40b847,_0xb9d073,_0x8e502c){return __awaiter$9(this,void 0,void 0,function*(){const _0x5660f0=this['path']+'/'+_0x40b847+'/'+_0xb9d073;try{const _0x17cf72=yield this['fetch']['get'](_0x5660f0,_0x8e502c);if(_0x17cf72['status']>0xc7&&_0x17cf72['status']<0x12c){const _0x7881b9=yield _0x17cf72['json']();return new SuccessfulListResponse(_0x7881b9);}const _0xa9a851=yield _0x17cf72['json']();return new FailedListResponse(_0xa9a851);}catch(_0x3a23bf){if(_0x3a23bf instanceof Error)return new FailedListResponse({'detail':_0x3a23bf['message'],'title':_0x3a23bf['name'],'status':0x1f4,'instance':'','type':''});throw _0x3a23bf;}});}['editSettings'](_0x22b933,_0x421661,_0x155f45,_0x2aea55){return __awaiter$9(this,void 0,void 0,function*(){const _0x120ec7=this['path']+'/settings/'+_0x22b933+'/'+_0x421661,_0x38f115=yield this['fetch']['put'](_0x120ec7,_0x155f45,_0x2aea55);try{if(_0x38f115['status']>0xc7&&_0x38f115['status']<0x12c){const _0x210cb0=yield _0x38f115['json']();return new SuccessfulListResponse(_0x210cb0);}const _0x1374e6=yield _0x38f115['json']();return new FailedListResponse(_0x1374e6);}catch(_0x5d8081){if(_0x5d8081 instanceof Error)return new FailedListResponse({'detail':_0x5d8081['message'],'title':_0x5d8081['name'],'status':0x1f4,'instance':'','type':''});throw _0x5d8081;}});}['addCoordinates'](_0x1b9021,_0x35ce1f,_0x47ec04){return __awaiter$9(this,void 0,void 0,function*(){const _0x4280a6=this['path']+'/coordinates/'+_0x1b9021+'/'+_0x35ce1f,_0x12baf4=yield this['fetch']['post'](_0x4280a6,_0x47ec04,{});try{if(_0x12baf4['status']>0xc7&&_0x12baf4['status']<0x12c){const _0x4c467e=yield _0x12baf4['json']();return new SuccessfulListResponse(_0x4c467e);}const _0x327e4d=yield _0x12baf4['json']();return new FailedListResponse(_0x327e4d);}catch(_0x26cbcd){if(_0x26cbcd instanceof Error)return new FailedListResponse({'detail':_0x26cbcd['message'],'title':_0x26cbcd['name'],'status':0x1f4,'instance':'','type':''});throw _0x26cbcd;}});}['removeCoordinates'](_0x372ad3,_0x4e7789,_0x3d1391){return __awaiter$9(this,void 0,void 0,function*(){const _0x171928=this['path']+'/coordinates/'+_0x372ad3+'/'+_0x4e7789,_0x122a8d=yield this['fetch']['delete'](_0x171928,_0x3d1391);try{if(_0x122a8d['status']>0xc7&&_0x122a8d['status']<0x12c){const _0x6af85c=yield _0x122a8d['json']();return new SuccessfulListResponse(_0x6af85c);}const _0x1924de=yield _0x122a8d['json']();return new FailedListResponse(_0x1924de);}catch(_0x4c8394){if(_0x4c8394 instanceof Error)return new FailedListResponse({'detail':_0x4c8394['message'],'title':_0x4c8394['name'],'status':0x1f4,'instance':'','type':''});throw _0x4c8394;}});}['transfer'](_0x5f5282,_0xb33cd,_0x32f2a7,_0x10352b){return __awaiter$9(this,void 0,void 0,function*(){const _0x5b462e={'new_search_service_name':_0x32f2a7};try{const _0x9d180c=yield this['fetch']['put'](this['path']+'/transfer/'+_0x5f5282+'/'+_0xb33cd,_0x10352b,_0x5b462e);if(_0x9d180c['status']>0xc7&&_0x9d180c['status']<0x12c){const _0x7a0a69=yield _0x9d180c['json']();return new SuccessfulListResponse(_0x7a0a69);}const _0x4f3b38=yield _0x9d180c['json']();return new FailedListResponse(_0x4f3b38);}catch(_0x5b2bab){if(_0x5b2bab instanceof Error)return new FailedListResponse({'detail':_0x5b2bab['message'],'title':_0x5b2bab['name'],'status':0x1f4,'instance':'','type':''});throw _0x5b2bab;}});}}class CoordinatesService{constructor(_0x5a570f){this['fetch']=_0x5a570f,this['path']='list/coordinates';}['add'](_0x2ba0ee,_0x8a57ee,_0x4b5da8){return __awaiter$9(this,void 0,void 0,function*(){const _0x4e7d40=this['path']+'/'+_0x2ba0ee+'/'+_0x8a57ee,_0x2964bf=yield this['fetch']['post'](_0x4e7d40,_0x4b5da8,{});try{if(_0x2964bf['status']>0xc7&&_0x2964bf['status']<0x12c){const _0x1bfa36=yield _0x2964bf['json']();return new SuccessfulListResponse(_0x1bfa36);}const _0x2baf4a=yield _0x2964bf['json']();return new FailedListResponse(_0x2baf4a);}catch(_0x3385ef){if(_0x3385ef instanceof Error)return new FailedListResponse({'detail':_0x3385ef['message'],'title':_0x3385ef['name'],'status':0x1f4,'instance':'','type':''});throw _0x3385ef;}});}['remove'](_0x1b7cfc,_0x27fd59,_0x59086a){return __awaiter$9(this,void 0,void 0,function*(){const _0x473e70=this['path']+'/'+_0x1b7cfc+'/'+_0x27fd59,_0x21867e=yield this['fetch']['delete'](_0x473e70,_0x59086a);try{if(_0x21867e['status']>0xc7&&_0x21867e['status']<0x12c){const _0x5ae410=yield _0x21867e['json']();return new SuccessfulListResponse(_0x5ae410);}const _0x1a7ca8=yield _0x21867e['json']();return new FailedListResponse(_0x1a7ca8);}catch(_0x2d80d9){if(_0x2d80d9 instanceof Error)return new FailedListResponse({'detail':_0x2d80d9['message'],'title':_0x2d80d9['name'],'status':0x1f4,'instance':'','type':''});throw _0x2d80d9;}});}}class GeneratedSuggestionsService{constructor(_0x4ba946){this['fetch']=_0x4ba946,this['path']='list/generated-suggestions';}['add'](_0xe6f3a0,_0x511b77,_0x553061,_0x5cb253,_0x223a11,_0x2501b8,_0x43e5d6){return __awaiter$9(this,void 0,void 0,function*(){const _0x314c07=this['path']+'/'+_0xe6f3a0+'/'+_0x511b77,_0x32de98=yield this['fetch']['post'](_0x314c07,_0x43e5d6,{'target_list_name':_0x553061,'minimum_result_count':_0x5cb253,'is_active':_0x223a11,'minimum_characters':_0x2501b8});try{if(_0x32de98['status']>0xc7&&_0x32de98['status']<0x12c){const _0x268c9a=yield _0x32de98['json']();return new SuccessfulListResponse(_0x268c9a);}const _0x71c536=yield _0x32de98['json']();return new FailedListResponse(_0x71c536);}catch(_0x7afd18){if(_0x7afd18 instanceof Error)return new FailedListResponse({'detail':_0x7afd18['message'],'title':_0x7afd18['name'],'status':0x1f4,'instance':'','type':''});throw _0x7afd18;}});}['remove'](_0x330bbd,_0x5b2fa3,_0x298d38){return __awaiter$9(this,void 0,void 0,function*(){const _0x8848ed=this['path']+'/'+_0x330bbd+'/'+_0x5b2fa3,_0x1f03cc=yield this['fetch']['delete'](_0x8848ed,_0x298d38);try{if(_0x1f03cc['status']>0xc7&&_0x1f03cc['status']<0x12c){const _0x5026c1=yield _0x1f03cc['json']();return new SuccessfulListResponse(_0x5026c1);}const _0x3b9412=yield _0x1f03cc['json']();return new FailedListResponse(_0x3b9412);}catch(_0x4db90b){if(_0x4db90b instanceof Error)return new FailedListResponse({'detail':_0x4db90b['message'],'title':_0x4db90b['name'],'status':0x1f4,'instance':'','type':''});throw _0x4db90b;}});}['edit'](_0x472832,_0x3f5265,_0x5d2fc3,_0x49d770){return __awaiter$9(this,void 0,void 0,function*(){const _0x419fb2=this['path']+'/'+_0x472832+'/'+_0x3f5265;_0x49d770=_0x49d770!==null&&_0x49d770!==void 0?_0x49d770:{};const _0x30d01f=yield this['fetch']['put'](_0x419fb2,_0x5d2fc3,_0x49d770);try{if(_0x30d01f['status']>0xc7&&_0x30d01f['status']<0x12c){const _0x1ef27d=yield _0x30d01f['json']();return new SuccessfulListResponse(_0x1ef27d);}const _0x2f4149=yield _0x30d01f['json']();return new FailedListResponse(_0x2f4149);}catch(_0x3ca57b){if(_0x3ca57b instanceof Error)return new FailedListResponse({'detail':_0x3ca57b['message'],'title':_0x3ca57b['name'],'status':0x1f4,'instance':'','type':''});throw _0x3ca57b;}});}}
|
|
8
|
+
|
|
9
|
+
var __awaiter$8=undefined&&undefined['__awaiter']||function(_0x30b67d,_0x15a038,_0x35e8a5,_0x1f83a5){function _0x4887d7(_0xc4053a){return _0xc4053a instanceof _0x35e8a5?_0xc4053a:new _0x35e8a5(function(_0x14111f){_0x14111f(_0xc4053a);});}return new(_0x35e8a5||(_0x35e8a5=Promise))(function(_0x4d6dcd,_0xe7bfb){function _0xc17beb(_0x3dfb89){try{_0x39d70f(_0x1f83a5['next'](_0x3dfb89));}catch(_0x3dfaa2){_0xe7bfb(_0x3dfaa2);}}function _0x51e8a5(_0x480486){try{_0x39d70f(_0x1f83a5['throw'](_0x480486));}catch(_0x33a911){_0xe7bfb(_0x33a911);}}function _0x39d70f(_0x5c3a5f){_0x5c3a5f['done']?_0x4d6dcd(_0x5c3a5f['value']):_0x4887d7(_0x5c3a5f['value'])['then'](_0xc17beb,_0x51e8a5);}_0x39d70f((_0x1f83a5=_0x1f83a5['apply'](_0x30b67d,_0x15a038||[]))['next']());});};class Fetch{constructor(_0x1d07aa){this['baseUri']=_0x1d07aa,this['getUrl']=_0x42639f=>{return _0x42639f['startsWith']('/')&&(_0x42639f=_0x42639f['replace']('/','')),''+this['baseUri']+_0x42639f;},!_0x1d07aa['endsWith']('/')&&(_0x1d07aa=_0x1d07aa+'/');}['get'](_0x7a703d,_0x3b85b0){return __awaiter$8(this,void 0,void 0,function*(){const _0x248001=this['getUrl'](_0x7a703d);return yield fetch(_0x248001,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3b85b0}});});}['post'](_0x1ddf7f,_0x56e714,_0x37616c){return __awaiter$8(this,void 0,void 0,function*(){const _0x1909ef=this['getUrl'](_0x1ddf7f);return yield fetch(_0x1909ef,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x56e714},'body':_0x37616c?JSON['stringify'](_0x37616c):null});});}['upload'](_0x531a87,_0x134611,_0x4b0fde){return __awaiter$8(this,void 0,void 0,function*(){const _0x52496f=this['getUrl'](_0x531a87);return yield fetch(_0x52496f,{'method':'POST','headers':{'Authorization':'Bearer\x20'+_0x134611},'body':_0x4b0fde});});}['PostNoAuth'](_0x2a1941,_0x4d546c){return __awaiter$8(this,void 0,void 0,function*(){const _0xc42e19=this['getUrl'](_0x2a1941);return yield fetch(_0xc42e19,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0x4d546c?JSON['stringify'](_0x4d546c):null});});}['put'](_0x273cef,_0xe5cc9d,_0x48049e){return __awaiter$8(this,void 0,void 0,function*(){const _0x461298=this['getUrl'](_0x273cef);return yield fetch(_0x461298,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0xe5cc9d},'body':_0x48049e?JSON['stringify'](_0x48049e):null});});}['delete'](_0x82f8bc,_0x158989){return __awaiter$8(this,void 0,void 0,function*(){const _0x1504b2=this['getUrl'](_0x82f8bc);return yield fetch(_0x1504b2,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x158989}});});}}
|
|
10
|
+
|
|
11
|
+
var __awaiter$7=undefined&&undefined['__awaiter']||function(_0x520d20,_0x1536f2,_0x425f52,_0x1b03f3){function _0x4fd134(_0x3a9552){return _0x3a9552 instanceof _0x425f52?_0x3a9552:new _0x425f52(function(_0x5dd93c){_0x5dd93c(_0x3a9552);});}return new(_0x425f52||(_0x425f52=Promise))(function(_0x54638f,_0xfc2bf3){function _0x13216b(_0x8ded10){try{_0xc2fedc(_0x1b03f3['next'](_0x8ded10));}catch(_0x20c6ab){_0xfc2bf3(_0x20c6ab);}}function _0xa95eeb(_0xf39707){try{_0xc2fedc(_0x1b03f3['throw'](_0xf39707));}catch(_0x204ab8){_0xfc2bf3(_0x204ab8);}}function _0xc2fedc(_0x74334a){_0x74334a['done']?_0x54638f(_0x74334a['value']):_0x4fd134(_0x74334a['value'])['then'](_0x13216b,_0xa95eeb);}_0xc2fedc((_0x1b03f3=_0x1b03f3['apply'](_0x520d20,_0x1536f2||[]))['next']());});};class SearchServersService{constructor(_0x46331e){this['fetch']=_0x46331e,this['path']='search-service';}['create'](_0x72455b,_0x43f2c8,_0x2e8458,_0x3b7a50,_0x29f6e9,_0x9b23c5,_0x20b469,_0x2b1818){return __awaiter$7(this,void 0,void 0,function*(){const _0x34a813={'account_name':_0x72455b,'search_service_name':_0x43f2c8,'endpoint':_0x2e8458,'key':_0x3b7a50,'country':_0x29f6e9,'provider':_0x9b23c5,'index_name':_0x20b469};try{const _0x554bca=yield this['fetch']['post'](this['path'],_0x2b1818,_0x34a813);if(_0x554bca['status']>0xc7&&_0x554bca['status']<0x12c){const _0x5f2256=yield _0x554bca['json']();return new SuccessfulSearchServiceResponse(_0x5f2256);}const _0x183064=yield _0x554bca['json']();return new FailedSearchServiceResponse(_0x183064);}catch(_0x25d61b){if(_0x25d61b instanceof Error)return new FailedSearchServiceResponse({'detail':_0x25d61b['message'],'title':_0x25d61b['name'],'status':0x1f4,'instance':'','type':''});throw _0x25d61b;}});}['delete'](_0x533bac,_0x5c4f7d,_0x4ddb12){return __awaiter$7(this,void 0,void 0,function*(){const _0x2b533a=this['path']+'/'+_0x533bac+'/'+_0x5c4f7d;try{const _0x1670e9=yield this['fetch']['delete'](_0x2b533a,_0x4ddb12);if(_0x1670e9['status']>0xc7&&_0x1670e9['status']<0x12c)return new SuccessfulResponse({});const _0x37ff83=yield _0x1670e9['json']();return new FailedResponse(_0x37ff83);}catch(_0x2d2629){if(_0x2d2629 instanceof Error)return new FailedResponse({'detail':_0x2d2629['message'],'title':_0x2d2629['name'],'status':0x1f4,'instance':'','type':''});throw _0x2d2629;}});}['view'](_0x520320,_0x1d16df,_0x389ad6){return __awaiter$7(this,void 0,void 0,function*(){const _0x26db8f=this['path']+'/'+_0x520320+'/'+_0x1d16df;try{const _0xdb52a4=yield this['fetch']['get'](_0x26db8f,_0x389ad6);if(_0xdb52a4['status']>0xc7&&_0xdb52a4['status']<0x12c){const _0x4c3b43=yield _0xdb52a4['json']();return new SuccessfulViewSearchServiceResponse(_0x4c3b43);}const _0x32fcf3=yield _0xdb52a4['json']();return new FailedViewSearchServiceResponse(_0x32fcf3);}catch(_0x41d20e){if(_0x41d20e instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x41d20e['message'],'title':_0x41d20e['name'],'status':0x1f4,'instance':'','type':''});throw _0x41d20e;}});}['edit'](_0x459b9c,_0x3728a6,_0x4a7234,_0x9e28d0,_0x2dc211){return __awaiter$7(this,void 0,void 0,function*(){const _0x301d46={'account_name':_0x459b9c,'search_service_name':_0x3728a6,'key':_0x4a7234,'country':_0x9e28d0};try{const _0x11855d=yield this['fetch']['put'](this['path'],_0x2dc211,_0x301d46);if(_0x11855d['status']>0xc7&&_0x11855d['status']<0x12c){const _0x2855b2=yield _0x11855d['json']();return new SuccessfulSearchServiceResponse(_0x2855b2);}const _0x524b82=yield _0x11855d['json']();return new FailedSearchServiceResponse(_0x524b82);}catch(_0x405465){if(_0x405465 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x405465['message'],'title':_0x405465['name'],'status':0x1f4,'instance':'','type':''});throw _0x405465;}});}['list'](_0x1fd879,_0xf55e33){return __awaiter$7(this,void 0,void 0,function*(){const _0x1043d7=this['path']+'/'+_0x1fd879;try{const _0x219ff6=yield this['fetch']['get'](_0x1043d7,_0xf55e33);if(_0x219ff6['status']>0xc7&&_0x219ff6['status']<0x12c){const _0x165c59=yield _0x219ff6['json']();return new SuccessfulListSearchServiceResponse(_0x165c59);}const _0x28191a=yield _0x219ff6['json']();return new FailedViewSearchServicesResponse(_0x28191a);}catch(_0x317841){if(_0x317841 instanceof Error)return new FailedViewSearchServicesResponse({'detail':_0x317841['message'],'title':_0x317841['name'],'status':0x1f4,'instance':'','type':''});throw _0x317841;}});}}
|
|
12
|
+
|
|
13
|
+
var __awaiter$6=undefined&&undefined['__awaiter']||function(_0x2e248d,_0x401107,_0x35888c,_0x224f91){function _0x53648d(_0x526bfc){return _0x526bfc instanceof _0x35888c?_0x526bfc:new _0x35888c(function(_0x1b0d89){_0x1b0d89(_0x526bfc);});}return new(_0x35888c||(_0x35888c=Promise))(function(_0x206123,_0x4c971e){function _0x29301a(_0x33815c){try{_0x1756c9(_0x224f91['next'](_0x33815c));}catch(_0x55f820){_0x4c971e(_0x55f820);}}function _0x2a1c6c(_0x1bd84f){try{_0x1756c9(_0x224f91['throw'](_0x1bd84f));}catch(_0x3c5852){_0x4c971e(_0x3c5852);}}function _0x1756c9(_0x53f302){_0x53f302['done']?_0x206123(_0x53f302['value']):_0x53648d(_0x53f302['value'])['then'](_0x29301a,_0x2a1c6c);}_0x1756c9((_0x224f91=_0x224f91['apply'](_0x2e248d,_0x401107||[]))['next']());});};class FacetService{constructor(_0x5f3205){this['fetch']=_0x5f3205,this['path']='facet';}['create'](_0x811275,_0x9fad9c,_0x355349,_0x3b6dea){return __awaiter$6(this,void 0,void 0,function*(){const _0x4eaeec={'account_name':_0x811275,'list_name':_0x9fad9c,'facet_name':_0x355349};try{const _0x327a0d=yield this['fetch']['post'](this['path'],_0x3b6dea,_0x4eaeec);if(_0x327a0d['status']>0xc7&&_0x327a0d['status']<0x12c){const _0xaec560=yield _0x327a0d['json']();return new SuccessfulFacetResponse(_0xaec560);}const _0x24c196=yield _0x327a0d['json']();return new FailedFacetResponse(_0x24c196);}catch(_0x44884f){if(_0x44884f instanceof Error)return new FailedFacetResponse({'detail':_0x44884f['message'],'title':_0x44884f['name'],'status':0x1f4,'instance':'','type':''});throw _0x44884f;}});}['remove'](_0x4cb282,_0x21eb31,_0x5c9874,_0x3e9a23){return __awaiter$6(this,void 0,void 0,function*(){const _0x36565a='Facet/'+_0x4cb282+'/'+_0x21eb31+'/'+_0x5c9874,_0x3a6626=yield this['fetch']['delete'](_0x36565a,_0x3e9a23);try{if(_0x3a6626['status']>0xc7&&_0x3a6626['status']<0x12c)return new SuccessfulResponse({});const _0x1d676d=yield _0x3a6626['json']();return new FailedResponse(_0x1d676d);}catch(_0x236371){if(_0x236371 instanceof Error)return new FailedResponse({'detail':_0x236371['message'],'title':_0x236371['name'],'status':0x1f4,'instance':'','type':''});throw _0x236371;}});}['rename'](_0x16d488,_0x26ec37,_0x5d1552,_0x4c03f7,_0x3c1cad){return __awaiter$6(this,void 0,void 0,function*(){let _0x368d13=this['path']+'/'+_0x16d488+'/'+_0x26ec37;const _0x8cc7d0={'facet_name':_0x5d1552,'new_facet_name':_0x4c03f7};try{const _0x24ad1b=yield this['fetch']['put'](_0x368d13,_0x3c1cad,_0x8cc7d0);if(_0x24ad1b['status']>0xc7&&_0x24ad1b['status']<0x12c){const _0x35b6a5=yield _0x24ad1b['json']();return new SuccessfulFacetResponse(_0x35b6a5);}const _0x83a949=yield _0x24ad1b['json']();return new FailedFacetResponse(_0x83a949);}catch(_0x78b503){if(_0x78b503 instanceof Error)return new FailedFacetResponse({'detail':_0x78b503['message'],'title':_0x78b503['name'],'status':0x1f4,'instance':'','type':''});throw _0x78b503;}});}['list'](_0x2afb94,_0x115bef,_0x56528c,_0x5509b5,_0x48dd09){return __awaiter$6(this,void 0,void 0,function*(){let _0x14e849=this['path']+'/'+_0x2afb94+'/'+_0x115bef+'/'+_0x56528c+'/'+_0x5509b5;try{const _0x243d58=yield this['fetch']['get'](_0x14e849,_0x48dd09);if(_0x243d58['status']>0xc7&&_0x243d58['status']<0x12c){const _0x4d2499=yield _0x243d58['json']();return new SuccessfulFacetValueResponse(_0x4d2499);}const _0xc2ba63=yield _0x243d58['json']();return new FailedFacetValuesResponse(_0xc2ba63);}catch(_0x28bced){if(_0x28bced instanceof Error)return new FailedFacetValuesResponse({'detail':_0x28bced['message'],'title':_0x28bced['name'],'status':0x1f4,'instance':'','type':''});throw _0x28bced;}});}}
|
|
14
|
+
|
|
15
|
+
var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x5ca849,_0x1aca69,_0x3a9083,_0x560edd){function _0x66b24a(_0x561bc0){return _0x561bc0 instanceof _0x3a9083?_0x561bc0:new _0x3a9083(function(_0x22c6a9){_0x22c6a9(_0x561bc0);});}return new(_0x3a9083||(_0x3a9083=Promise))(function(_0xc7416a,_0x551922){function _0x1c33ed(_0x3abb47){try{_0x3b655d(_0x560edd['next'](_0x3abb47));}catch(_0x10095d){_0x551922(_0x10095d);}}function _0x2a85a3(_0x374432){try{_0x3b655d(_0x560edd['throw'](_0x374432));}catch(_0x4370dc){_0x551922(_0x4370dc);}}function _0x3b655d(_0x48f729){_0x48f729['done']?_0xc7416a(_0x48f729['value']):_0x66b24a(_0x48f729['value'])['then'](_0x1c33ed,_0x2a85a3);}_0x3b655d((_0x560edd=_0x560edd['apply'](_0x5ca849,_0x1aca69||[]))['next']());});};class SearchResultService{constructor(_0x5466db){this['fetch']=_0x5466db,this['path']='search-result',this['isRealNumber']=_0x32fa08=>_0x32fa08!=undefined&&typeof _0x32fa08==='number'&&Number['isFinite'](_0x32fa08);}['create'](_0x27243f,_0x2fccdd,_0x5a0eb1,_0x14de7a,_0x1cc6f7){return __awaiter$5(this,void 0,void 0,function*(){const _0x3ec47d=Object['assign']({'account_name':_0x27243f,'search_result_name':_0x5a0eb1,'list_name':_0x2fccdd},_0x1cc6f7);try{const _0x31c802=yield this['fetch']['post'](this['path'],_0x14de7a,_0x3ec47d);if(_0x31c802['status']>0xc7&&_0x31c802['status']<0x12c){const _0x4e3b27=yield _0x31c802['json']();return new SuccessfulSearchResultResponse(_0x4e3b27);}const _0x3bec64=yield _0x31c802['json']();return new FailedSearchResultResponse(_0x3bec64);}catch(_0x2926f1){if(_0x2926f1 instanceof Error)return new FailedSearchResultResponse({'detail':_0x2926f1['message'],'title':_0x2926f1['name'],'status':0x1f4,'instance':'','type':''});throw _0x2926f1;}});}['list'](_0x4741fc,_0x7a2514,_0x4adca5,_0x4edea1){return __awaiter$5(this,void 0,void 0,function*(){let _0x8ebfd=this['path']+'/'+_0x4741fc+'/'+_0x7a2514+'?'+this['getQueryStr'](_0x4edea1);try{const _0x540cff=yield this['fetch']['get'](_0x8ebfd,_0x4adca5);if(_0x540cff['status']>0xc7&&_0x540cff['status']<0x12c){const _0xed54a5=yield _0x540cff['json']();return new SuccessfulListSearchResultResponse(_0xed54a5);}const _0x258410=yield _0x540cff['json']();return new FailedViewSearchResultResponse(_0x258410);}catch(_0x97ef31){if(_0x97ef31 instanceof Error)return new FailedViewSearchResultResponse({'detail':_0x97ef31['message'],'title':_0x97ef31['name'],'status':0x1f4,'instance':'','type':''});throw _0x97ef31;}});}['get'](_0x24acf6,_0x191cb8,_0x43a00b,_0x29b20d){return __awaiter$5(this,void 0,void 0,function*(){let _0x1d3e04=this['path']+'/'+_0x24acf6+'/'+_0x191cb8+'?'+_0x43a00b;try{const _0x1e9f7c=yield this['fetch']['get'](_0x1d3e04,_0x29b20d);if(_0x1e9f7c['status']>0xc7&&_0x1e9f7c['status']<0x12c){const _0x53b602=yield _0x1e9f7c['json']();return new SuccessfulSearchResultResponse(_0x53b602);}const _0xd7779=yield _0x1e9f7c['json']();return new FailedSearchResultResponse(_0xd7779);}catch(_0x158639){if(_0x158639 instanceof Error)return new FailedSearchResultResponse({'detail':_0x158639['message'],'title':_0x158639['name'],'status':0x1f4,'instance':'','type':''});throw _0x158639;}});}['delete'](_0x2eea5e,_0x5ee3cf,_0x5d7ed1,_0x16f95a){return __awaiter$5(this,void 0,void 0,function*(){const _0x16a1d8=this['path']+'/'+_0x2eea5e+'/'+_0x5ee3cf+'/'+_0x5d7ed1,_0x3828ba=yield this['fetch']['delete'](_0x16a1d8,_0x16f95a);try{if(_0x3828ba['status']>0xc7&&_0x3828ba['status']<0x12c)return new SuccessfulResponse({});const _0x588834=yield _0x3828ba['json']();return new FailedResponse(_0x588834);}catch(_0x196b9e){if(_0x196b9e instanceof Error)return new FailedResponse({'detail':_0x196b9e['message'],'title':_0x196b9e['name'],'status':0x1f4,'instance':'','type':''});throw _0x196b9e;}});}['upload'](_0x275b14,_0x205f3c,_0x2f6be5,_0x4f4471){return __awaiter$5(this,void 0,void 0,function*(){const _0x5eba9e=this['path']+'/'+_0x275b14+'/'+_0x205f3c+'/upload',_0x1b07af=new FormData();_0x1b07af['append']('file',_0x2f6be5);try{const _0xb33fb5=yield this['fetch']['upload'](_0x5eba9e,_0x4f4471,_0x1b07af);if(_0xb33fb5['status']>0xc7&&_0xb33fb5['status']<0x12c)return new SuccessfulResponse({});const _0x3af913=yield _0xb33fb5['json']();return new FailedResponse(_0x3af913);}catch(_0x5abe53){if(_0x5abe53 instanceof Error)return new FailedResponse({'detail':_0x5abe53['message'],'title':_0x5abe53['name'],'status':0x1f4,'instance':'','type':''});throw _0x5abe53;}});}['edit'](_0x3eb0cb,_0x48ef9f,_0x991ba3,_0x2ffba5,_0x30978b){return __awaiter$5(this,void 0,void 0,function*(){const _0x9b850b=this['path']+'/'+_0x3eb0cb+'/'+_0x48ef9f+'/'+_0x991ba3;try{const _0x3db1bd=yield this['fetch']['put'](_0x9b850b,_0x2ffba5,_0x30978b);if(_0x3db1bd['status']>0xc7&&_0x3db1bd['status']<0x12c){const _0xd89235=yield _0x3db1bd['json']();return new SuccessfulSearchResultResponse(_0xd89235);}const _0x1a6dfc=yield _0x3db1bd['json']();return new FailedSearchResultResponse(_0x1a6dfc);}catch(_0xc6f2a3){if(_0xc6f2a3 instanceof Error)return new FailedSearchResultResponse({'detail':_0xc6f2a3['message'],'title':_0xc6f2a3['name'],'status':0x1f4,'instance':'','type':''});throw _0xc6f2a3;}});}['getQueryStr'](_0x27a3b6){let _0x340ef5='';const _0x17a422=[];(_0x27a3b6===null||_0x27a3b6===void 0?void 0:_0x27a3b6['size'])&&_0x17a422['push']('size='+_0x27a3b6['size']);(_0x27a3b6===null||_0x27a3b6===void 0?void 0:_0x27a3b6['skip'])&&_0x17a422['push']('skip='+_0x27a3b6['skip']);(_0x27a3b6===null||_0x27a3b6===void 0?void 0:_0x27a3b6['query'])&&_0x17a422['push']('query='+_0x27a3b6['query']);(_0x27a3b6===null||_0x27a3b6===void 0?void 0:_0x27a3b6['filter'])&&_0x17a422['push']('filter='+_0x27a3b6['filter']);if((_0x27a3b6===null||_0x27a3b6===void 0?void 0:_0x27a3b6['radius'])&&this['isRealNumber'](_0x27a3b6['radius']['latitude'])&&this['isRealNumber'](_0x27a3b6['radius']['longitude'])&&this['isRealNumber'](_0x27a3b6['radius']['distance_in_km'])){const _0x53a729=_0x27a3b6['radius']['latitude']+','+_0x27a3b6['radius']['longitude']+','+_0x27a3b6['radius']['distance_in_km'];_0x17a422['push']('radius='+_0x53a729);}return _0x27a3b6['active']===![]&&_0x17a422['push']('active='+_0x27a3b6['active']),_0x17a422['length']>0x0&&_0x17a422['forEach']((_0x1c2b7b,_0x50c578)=>{if(_0x50c578>0x0&&_0x340ef5)_0x340ef5+='&';_0x340ef5+=_0x1c2b7b;}),_0x340ef5;}}
|
|
16
|
+
|
|
17
|
+
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x208cc8,_0x231020,_0x46c408,_0x582bec){function _0x210a46(_0x4f5cd8){return _0x4f5cd8 instanceof _0x46c408?_0x4f5cd8:new _0x46c408(function(_0x18cdc7){_0x18cdc7(_0x4f5cd8);});}return new(_0x46c408||(_0x46c408=Promise))(function(_0x448262,_0x47f4ef){function _0x22fcc1(_0x1c07ca){try{_0x202469(_0x582bec['next'](_0x1c07ca));}catch(_0x18bda7){_0x47f4ef(_0x18bda7);}}function _0x5b769e(_0x34103c){try{_0x202469(_0x582bec['throw'](_0x34103c));}catch(_0x2a663c){_0x47f4ef(_0x2a663c);}}function _0x202469(_0x223005){_0x223005['done']?_0x448262(_0x223005['value']):_0x210a46(_0x223005['value'])['then'](_0x22fcc1,_0x5b769e);}_0x202469((_0x582bec=_0x582bec['apply'](_0x208cc8,_0x231020||[]))['next']());});};class ContributorService{constructor(_0x1b1c31){this['fetch']=_0x1b1c31,this['path']='contributor';}['create'](_0x5780bf,_0x18a279,_0x62088e,_0x4ed512){return __awaiter$4(this,void 0,void 0,function*(){const _0x45a8f2={'account_name':_0x5780bf,'list_name':_0x18a279,'contributor_name':_0x62088e};try{const _0x4b717f=yield this['fetch']['post'](this['path'],_0x4ed512,_0x45a8f2);if(_0x4b717f['status']>0xc7&&_0x4b717f['status']<0x12c){const _0x19307c=yield _0x4b717f['json']();return new SuccessfulContributorResponse(_0x19307c);}const _0xf4e0d=yield _0x4b717f['json']();return new FailedContributorResponse(_0xf4e0d);}catch(_0x3d5467){if(_0x3d5467 instanceof Error)return new FailedContributorResponse({'detail':_0x3d5467['message'],'title':_0x3d5467['name'],'status':0x1f4,'instance':'','type':''});throw _0x3d5467;}});}['remove'](_0x4f19cf,_0x55449c,_0x20b624,_0x42ee65){return __awaiter$4(this,void 0,void 0,function*(){const _0x22c7ae=this['path']+'/'+_0x4f19cf+'/'+_0x55449c+'/'+_0x20b624,_0x3703dc=yield this['fetch']['delete'](_0x22c7ae,_0x42ee65);try{if(_0x3703dc['status']>0xc7&&_0x3703dc['status']<0x12c)return new SuccessfulResponse({});const _0x5811f2=yield _0x3703dc['json']();return new FailedResponse(_0x5811f2);}catch(_0x37f3c1){if(_0x37f3c1 instanceof Error)return new FailedResponse({'detail':_0x37f3c1['message'],'title':_0x37f3c1['name'],'status':0x1f4,'instance':'','type':''});throw _0x37f3c1;}});}['startsWith'](_0x33b51d,_0x5071bb){return __awaiter$4(this,void 0,void 0,function*(){const _0x12b95b=this['path']+'/'+_0x33b51d;try{const _0x309d1f=yield this['fetch']['get'](_0x12b95b,_0x5071bb);if(_0x309d1f['status']>0xc7&&_0x309d1f['status']<0x12c){const _0x3e1580=yield _0x309d1f['json']();return new SuccessfulAccountAndImageResponse(_0x3e1580);}const _0x839c5=yield _0x309d1f['json']();return new FailedAccountAndImageResponse(_0x839c5);}catch(_0x242157){if(_0x242157 instanceof Error)return new FailedAccountAndImageResponse({'detail':_0x242157['message'],'title':_0x242157['name'],'status':0x1f4,'instance':'','type':''});throw _0x242157;}});}}
|
|
18
|
+
|
|
19
|
+
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x5c76a7,_0x2e73fe,_0x33eade,_0x1f86d5){function _0x2414ed(_0x2103cd){return _0x2103cd instanceof _0x33eade?_0x2103cd:new _0x33eade(function(_0x1a3bcd){_0x1a3bcd(_0x2103cd);});}return new(_0x33eade||(_0x33eade=Promise))(function(_0x430a8d,_0xf0ada){function _0x365e97(_0x16d4af){try{_0x35f30f(_0x1f86d5['next'](_0x16d4af));}catch(_0x296109){_0xf0ada(_0x296109);}}function _0x26d3a4(_0x4586f6){try{_0x35f30f(_0x1f86d5['throw'](_0x4586f6));}catch(_0x1fb350){_0xf0ada(_0x1fb350);}}function _0x35f30f(_0x491261){_0x491261['done']?_0x430a8d(_0x491261['value']):_0x2414ed(_0x491261['value'])['then'](_0x365e97,_0x26d3a4);}_0x35f30f((_0x1f86d5=_0x1f86d5['apply'](_0x5c76a7,_0x2e73fe||[]))['next']());});};class SearchableFieldService{constructor(_0x38ce75){this['fetch']=_0x38ce75,this['path']='searchable-field';}['create'](_0x123e5f,_0x5178b7,_0x4bfb8d,_0x2eced8){return __awaiter$3(this,void 0,void 0,function*(){const _0x593a5f={'account_name':_0x123e5f,'list_name':_0x5178b7,'searchable_field_name':_0x4bfb8d};try{const _0x509cec=yield this['fetch']['post'](this['path'],_0x2eced8,_0x593a5f);if(_0x509cec['status']>0xc7&&_0x509cec['status']<0x12c){const _0x1ecce4=yield _0x509cec['json']();return new SuccessfulSearchableFieldResponse(_0x1ecce4);}const _0x451353=yield _0x509cec['json']();return new FailedSearchableFieldResponse(_0x451353);}catch(_0xc7764a){if(_0xc7764a instanceof Error)return new FailedSearchableFieldResponse({'detail':_0xc7764a['message'],'title':_0xc7764a['name'],'status':0x1f4,'instance':'','type':''});throw _0xc7764a;}});}['remove'](_0x188338,_0xe9d639,_0x29281d,_0x41d2d){return __awaiter$3(this,void 0,void 0,function*(){const _0x411920=this['path']+'/'+_0x188338+'/'+_0xe9d639+'/'+_0x29281d,_0x592d80=yield this['fetch']['delete'](_0x411920,_0x41d2d);try{if(_0x592d80['status']>0xc7&&_0x592d80['status']<0x12c)return new SuccessfulResponse({});const _0x3575d5=yield _0x592d80['json']();return new FailedResponse(_0x3575d5);}catch(_0x105312){if(_0x105312 instanceof Error)return new FailedResponse({'detail':_0x105312['message'],'title':_0x105312['name'],'status':0x1f4,'instance':'','type':''});throw _0x105312;}});}['rename'](_0x5cd9db,_0x23213b,_0x1e6935,_0x7c438f,_0x5c3b68){return __awaiter$3(this,void 0,void 0,function*(){let _0x5396b2=this['path']+'/'+_0x5cd9db+'/'+_0x23213b;const _0x1e3171={'searchable_field_name':_0x1e6935,'new_searchable_field_name':_0x7c438f};try{const _0x3569fc=yield this['fetch']['put'](_0x5396b2,_0x5c3b68,_0x1e3171);if(_0x3569fc['status']>0xc7&&_0x3569fc['status']<0x12c){const _0x8dd33e=yield _0x3569fc['json']();return new SuccessfulSearchableFieldResponse(_0x8dd33e);}const _0x3270df=yield _0x3569fc['json']();return new FailedSearchableFieldResponse(_0x3270df);}catch(_0x5ce46b){if(_0x5ce46b instanceof Error)return new FailedSearchableFieldResponse({'detail':_0x5ce46b['message'],'title':_0x5ce46b['name'],'status':0x1f4,'instance':'','type':''});throw _0x5ce46b;}});}}
|
|
20
|
+
|
|
21
|
+
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x5a2d19,_0x31aa9d,_0x4b050a,_0x4d144c){function _0x13c5a8(_0x10a055){return _0x10a055 instanceof _0x4b050a?_0x10a055:new _0x4b050a(function(_0x5d1aab){_0x5d1aab(_0x10a055);});}return new(_0x4b050a||(_0x4b050a=Promise))(function(_0x4c59a1,_0x1a80ff){function _0x2de65e(_0x5da1ae){try{_0x15f51d(_0x4d144c['next'](_0x5da1ae));}catch(_0x99c990){_0x1a80ff(_0x99c990);}}function _0x70b6ee(_0x3bd211){try{_0x15f51d(_0x4d144c['throw'](_0x3bd211));}catch(_0x4b772a){_0x1a80ff(_0x4b772a);}}function _0x15f51d(_0x4f097a){_0x4f097a['done']?_0x4c59a1(_0x4f097a['value']):_0x13c5a8(_0x4f097a['value'])['then'](_0x2de65e,_0x70b6ee);}_0x15f51d((_0x4d144c=_0x4d144c['apply'](_0x5a2d19,_0x31aa9d||[]))['next']());});};class ResourceService{constructor(_0x41f6d4){this['fetch']=_0x41f6d4,this['path']='resource';}['create'](_0x68e30b,_0x1635da,_0x691c89,_0x5853b0){return __awaiter$2(this,void 0,void 0,function*(){const _0x3f52c7={'account_name':_0x68e30b,'list_name':_0x1635da,'resource_name':_0x691c89};try{const _0x2a9529=yield this['fetch']['post'](this['path'],_0x5853b0,_0x3f52c7);if(_0x2a9529['status']>0xc7&&_0x2a9529['status']<0x12c){const _0x434497=yield _0x2a9529['json']();return new SuccessfulResourceResponse(_0x434497);}const _0x5ba074=yield _0x2a9529['json']();return new FailedResourceResponse(_0x5ba074);}catch(_0x59ed67){if(_0x59ed67 instanceof Error)return new FailedResourceResponse({'detail':_0x59ed67['message'],'title':_0x59ed67['name'],'status':0x1f4,'instance':'','type':''});throw _0x59ed67;}});}['remove'](_0x126d9f,_0x4536bb,_0x177098,_0x40181f){return __awaiter$2(this,void 0,void 0,function*(){const _0x30e713=this['path']+'/'+_0x126d9f+'/'+_0x4536bb+'/'+_0x177098,_0x10809a=yield this['fetch']['delete'](_0x30e713,_0x40181f);try{if(_0x10809a['status']>0xc7&&_0x10809a['status']<0x12c)return new SuccessfulResponse({});const _0x59d986=yield _0x10809a['json']();return new FailedResponse(_0x59d986);}catch(_0x51dcbb){if(_0x51dcbb instanceof Error)return new FailedResponse({'detail':_0x51dcbb['message'],'title':_0x51dcbb['name'],'status':0x1f4,'instance':'','type':''});throw _0x51dcbb;}});}['rename'](_0xaff4e,_0x2959d4,_0x175680,_0x1a8555,_0x124b9a){return __awaiter$2(this,void 0,void 0,function*(){let _0x3b952a=this['path']+'/'+_0xaff4e+'/'+_0x2959d4;const _0x4a97e6={'resource_name':_0x175680,'new_resource_name':_0x1a8555};try{const _0xbe614a=yield this['fetch']['put'](_0x3b952a,_0x124b9a,_0x4a97e6);if(_0xbe614a['status']>0xc7&&_0xbe614a['status']<0x12c){const _0x4a9732=yield _0xbe614a['json']();return new SuccessfulResourceResponse(_0x4a9732);}const _0x33a958=yield _0xbe614a['json']();return new FailedResourceResponse(_0x33a958);}catch(_0x1db479){if(_0x1db479 instanceof Error)return new FailedResourceResponse({'detail':_0x1db479['message'],'title':_0x1db479['name'],'status':0x1f4,'instance':'','type':''});throw _0x1db479;}});}}
|
|
22
|
+
|
|
23
|
+
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x3c8c43,_0x1d9c0c,_0x27c0b9,_0x297190){function _0x1e21e7(_0x5cd744){return _0x5cd744 instanceof _0x27c0b9?_0x5cd744:new _0x27c0b9(function(_0x133066){_0x133066(_0x5cd744);});}return new(_0x27c0b9||(_0x27c0b9=Promise))(function(_0x2cbee8,_0x4bf419){function _0x3b0d9b(_0x29284d){try{_0x41bcd2(_0x297190['next'](_0x29284d));}catch(_0x406b15){_0x4bf419(_0x406b15);}}function _0x2e2f17(_0x5b95ed){try{_0x41bcd2(_0x297190['throw'](_0x5b95ed));}catch(_0x3edc59){_0x4bf419(_0x3edc59);}}function _0x41bcd2(_0x448fcc){_0x448fcc['done']?_0x2cbee8(_0x448fcc['value']):_0x1e21e7(_0x448fcc['value'])['then'](_0x3b0d9b,_0x2e2f17);}_0x41bcd2((_0x297190=_0x297190['apply'](_0x3c8c43,_0x1d9c0c||[]))['next']());});};class GroupService{constructor(_0x19855d){this['fetch']=_0x19855d,this['path']='group',this['List']=new GroupListService(_0x19855d);}['create'](_0x2ff6ab,_0x1fc8d0,_0x43a612,_0xf67b0d){return __awaiter$1(this,void 0,void 0,function*(){const _0x4240c7={'account_name':_0x2ff6ab,'search_service_name':_0x1fc8d0,'group_name':_0x43a612};try{const _0x455dea=yield this['fetch']['post'](this['path'],_0xf67b0d,_0x4240c7);if(_0x455dea['status']>0xc7&&_0x455dea['status']<0x12c){const _0x5da6fb=yield _0x455dea['json']();return new SuccessfulGroupResponse(_0x5da6fb);}const _0x519cf8=yield _0x455dea['json']();return new FailedGroupResponse(_0x519cf8);}catch(_0x2fe2d6){if(_0x2fe2d6 instanceof Error)return new FailedGroupResponse({'detail':_0x2fe2d6['message'],'title':_0x2fe2d6['name'],'status':0x1f4,'instance':'','type':''});throw _0x2fe2d6;}});}['delete'](_0xfe9d17,_0x11dce7,_0x2a0a8c){return __awaiter$1(this,void 0,void 0,function*(){const _0x142491=this['path']+'/'+_0xfe9d17+'/'+_0x11dce7,_0x2cfdee=yield this['fetch']['delete'](_0x142491,_0x2a0a8c);try{if(_0x2cfdee['status']>0xc7&&_0x2cfdee['status']<0x12c)return new SuccessfulResponse({});const _0x3de2da=yield _0x2cfdee['json']();return new FailedResponse(_0x3de2da);}catch(_0x1313a5){if(_0x1313a5 instanceof Error)return new FailedResponse({'detail':_0x1313a5['message'],'title':_0x1313a5['name'],'status':0x1f4,'instance':'','type':''});throw _0x1313a5;}});}}class GroupListService{constructor(_0x5eb214){this['fetch']=_0x5eb214,this['path']='group/list';}['add'](_0x2161c1,_0x2de3cc,_0x367eba,_0x5c1dea,_0x16f6bc){return __awaiter$1(this,void 0,void 0,function*(){const _0x23dddb={'list_name':_0x367eba,'version':_0x5c1dea};try{const _0x2164b7=yield this['fetch']['put'](this['path']+'/'+_0x2161c1+'/'+_0x2de3cc,_0x16f6bc,_0x23dddb);if(_0x2164b7['status']>0xc7&&_0x2164b7['status']<0x12c){const _0x3c6e81=yield _0x2164b7['json']();return new SuccessfulGroupResponse(_0x3c6e81);}const _0x3447cb=yield _0x2164b7['json']();return new FailedGroupResponse(_0x3447cb);}catch(_0x137ef1){if(_0x137ef1 instanceof Error)return new FailedGroupResponse({'detail':_0x137ef1['message'],'title':_0x137ef1['name'],'status':0x1f4,'instance':'','type':''});throw _0x137ef1;}});}['remove'](_0x1d971c,_0x5d39f6,_0x1ced5d,_0x1c57f7){return __awaiter$1(this,void 0,void 0,function*(){const _0x128ce2=this['path']+'/'+_0x1d971c+'/'+_0x5d39f6+'/'+_0x1ced5d,_0x2cfed8=yield this['fetch']['delete'](_0x128ce2,_0x1c57f7);try{if(_0x2cfed8['status']>0xc7&&_0x2cfed8['status']<0x12c){const _0x333855=yield _0x2cfed8['json']();return new SuccessfulGroupResponse(_0x333855);}const _0x3df1df=yield _0x2cfed8['json']();return new FailedGroupResponse(_0x3df1df);}catch(_0x12a3e1){if(_0x12a3e1 instanceof Error)return new FailedGroupResponse({'detail':_0x12a3e1['message'],'title':_0x12a3e1['name'],'status':0x1f4,'instance':'','type':''});throw _0x12a3e1;}});}}
|
|
24
|
+
|
|
25
|
+
var __awaiter=undefined&&undefined['__awaiter']||function(_0x391d88,_0x1099c3,_0xb497e7,_0x5db206){function _0x4631ec(_0x5e70b7){return _0x5e70b7 instanceof _0xb497e7?_0x5e70b7:new _0xb497e7(function(_0x207706){_0x207706(_0x5e70b7);});}return new(_0xb497e7||(_0xb497e7=Promise))(function(_0x3aa673,_0x372fe7){function _0xa497f6(_0x10ba15){try{_0x31bbc2(_0x5db206['next'](_0x10ba15));}catch(_0x34860f){_0x372fe7(_0x34860f);}}function _0x5eca13(_0x586510){try{_0x31bbc2(_0x5db206['throw'](_0x586510));}catch(_0x46f729){_0x372fe7(_0x46f729);}}function _0x31bbc2(_0x39f0e7){_0x39f0e7['done']?_0x3aa673(_0x39f0e7['value']):_0x4631ec(_0x39f0e7['value'])['then'](_0xa497f6,_0x5eca13);}_0x31bbc2((_0x5db206=_0x5db206['apply'](_0x391d88,_0x1099c3||[]))['next']());});};class AdminClient{constructor(_0x505987='https://admin.searchability.dev/'){var _0x46ad8c=new Fetch(_0x505987);this['Accounts']=new AccountService(_0x46ad8c),this['Lists']=new ListService(_0x46ad8c),this['ApiKeys']=new ApiKeyService(_0x46ad8c),this['SearchServers']=new SearchServersService(_0x46ad8c),this['Facets']=new FacetService(_0x46ad8c),this['SearchResults']=new SearchResultService(_0x46ad8c),this['Contributors']=new ContributorService(_0x46ad8c),this['SearchableFields']=new SearchableFieldService(_0x46ad8c),this['Groups']=new GroupService(_0x46ad8c),this['Resources']=new ResourceService(_0x46ad8c);}}class AuthClient{constructor(_0x2f1c13='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x2f1c13);}['login'](_0x421dde){return __awaiter(this,void 0,void 0,function*(){const _0xa890f4='login/'+_0x421dde;try{const _0x38b382=yield yield fetch(_0xa890f4);if(_0x38b382['status']>0xc7&&_0x38b382['status']<0x12c){const _0x20962c=yield _0x38b382['json']();return new SuccessfulAuthResponse(_0x20962c);}const _0x3a51eb=yield _0x38b382['json']();return new FailedAuthResponse(_0x3a51eb);}catch(_0x371cdb){if(_0x371cdb instanceof Error)return new FailedAuthResponse({'detail':_0x371cdb['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x371cdb;}});}['refresh'](_0x2c8907){return __awaiter(this,void 0,void 0,function*(){const _0x3b8d3b='refresh',_0x17e0d8={'refresh_token':_0x2c8907};try{const _0x2c7a32=yield this['fetch']['PostNoAuth'](_0x3b8d3b,_0x17e0d8);if(_0x2c7a32['status']>0xc7&&_0x2c7a32['status']<0x12c){const _0x593489=yield _0x2c7a32['json']();return new SuccessfulAuthResponse(_0x593489);}const _0xcb7550=yield _0x2c7a32['json']();return new FailedAuthResponse(_0xcb7550);}catch(_0x3d5563){if(_0x3d5563 instanceof Error)return new FailedAuthResponse({'detail':_0x3d5563['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x3d5563;}});}['getTokenStatus'](_0x599f0c){if(Date['now']()<_0x599f0c['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x599f0c['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
|
|
26
|
+
|
|
27
|
+
export { AdminClient, AuthClient, TokenStatus, Tokens };
|