@searchability/admin-client 0.0.122 → 0.0.123
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
var TokenStatus;(function(
|
|
1
|
+
var TokenStatus;(function(_0x511317){_0x511317[_0x511317['Ok']=0x0]='Ok',_0x511317[_0x511317['Refresh']=0x1]='Refresh',_0x511317[_0x511317['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(_0x28d89e){this['isSuccess']=_0x28d89e;}}class SuccessfulFacetValueResponse extends Response{constructor(_0x56fdd5){super(!![]),this['facets']=_0x56fdd5;}['toSuccess'](){return this['facets'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetValuesResponse extends Response{constructor(_0x1f1e2a){super(![]),this['problem']=_0x1f1e2a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulContributorResponse extends Response{constructor(_0x1ccebb){super(!![]),this['contributor']=_0x1ccebb;}['toSuccess'](){return this['contributor'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedContributorResponse extends Response{constructor(_0x3cdd78){super(![]),this['problem']=_0x3cdd78;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountAndImageResponse extends Response{constructor(_0x1e1026){super(!![]),this['accountAndImages']=_0x1e1026;}['toSuccess'](){return this['accountAndImages'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountAndImageResponse extends Response{constructor(_0x55392f){super(![]),this['problem']=_0x55392f;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulResourceResponse extends Response{constructor(_0x2ede06){super(!![]),this['resource']=_0x2ede06;}['toSuccess'](){return this['resource'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResourceResponse extends Response{constructor(_0x17fb11){super(![]),this['problem']=_0x17fb11;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulFacetResponse extends Response{constructor(_0x37e5a5){super(!![]),this['facet']=_0x37e5a5;}['toSuccess'](){return this['facet'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetResponse extends Response{constructor(_0x4cf6a4){super(![]),this['problem']=_0x4cf6a4;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedSearchableFieldResponse extends Response{constructor(_0x41ca27){super(![]),this['problem']=_0x41ca27;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchableFieldResponse extends Response{constructor(_0x22abf0){super(!![]),this['searchable_field']=_0x22abf0;}['toSuccess'](){return this['searchable_field'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountResponse extends Response{constructor(_0x13901d){super(!![]),this['account']=_0x13901d;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountImageResponse extends Response{constructor(_0x3c5ca7){super(!![]),this['accountImage']=_0x3c5ca7;}['toSuccess'](){return this['accountImage'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListIdentityResponse extends Response{constructor(_0x2734dd){super(!![]),this['list']=_0x2734dd;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulGroupResponse extends Response{constructor(_0x52c8aa){super(!![]),this['group']=_0x52c8aa;}['toSuccess'](){return this['group'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedGroupResponse extends Response{constructor(_0x2f8b90){super(![]),this['problem']=_0x2f8b90;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListResponse extends Response{constructor(_0x4ba725){super(!![]),this['list']=_0x4ba725;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedListResponse extends Response{constructor(_0x57b73d){super(![]),this['problem']=_0x57b73d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountResponse extends Response{constructor(_0xf4ca72){super(![]),this['problem']=_0xf4ca72;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountImageResponse extends Response{constructor(_0x33cb38){super(![]),this['problem']=_0x33cb38;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListIdentityResponse extends Response{constructor(_0x3d0799){super(![]),this['problem']=_0x3d0799;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x5366ee){super(!![]),this['tokens']=_0x5366ee;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x461884){super(![]),this['problem']=_0x461884;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x511f8f){super(!![]),this['apiKey']=_0x511f8f;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0xeb2ca1){super(![]),this['problem']=_0xeb2ca1;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x3edde3){super(!![]),this['searchService']=_0x3edde3;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x10829a){super(![]),this['problem']=_0x10829a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x1765c0){super(!![]),this['searchService']=_0x1765c0;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulSearchResultResponse extends Response{constructor(_0x282a0b){super(!![]),this['searchResult']=_0x282a0b;}['toSuccess'](){return this['searchResult'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchResultResponse extends Response{constructor(_0x17bf15){super(![]),this['problem']=_0x17bf15;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchResultResponse extends Response{constructor(_0x5c6d1b){super(!![]),this['searchResults']=_0x5c6d1b;}['toSuccess'](){return this['searchResults'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchResultResponse extends Response{constructor(_0x37a7d9){super(![]),this['problem']=_0x37a7d9;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchServiceResponse extends Response{constructor(_0x5bbc09){super(!![]),this['searchServices']=_0x5bbc09;}['toSuccess'](){return this['searchServices'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServicesResponse extends Response{constructor(_0x4af3e9){super(![]),this['problem']=_0x4af3e9;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedViewSearchServiceResponse extends Response{constructor(_0x18705b){super(![]),this['problem']=_0x18705b;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x508a6b){super(!![]),this['apiKeyValue']=_0x508a6b;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0xde7287){super(!![]),this['obj']=_0xde7287;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x3f2eb3){super(![]),this['problem']=_0x3f2eb3;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x1a3fab){super(![]),this['problem']=_0x1a3fab;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
|
|
2
2
|
|
|
3
|
-
var __awaiter$b=undefined&&undefined['__awaiter']||function(
|
|
3
|
+
var __awaiter$b=undefined&&undefined['__awaiter']||function(_0x41377b,_0x462877,_0x3c2234,_0x4a9727){function _0x1a483e(_0x45e388){return _0x45e388 instanceof _0x3c2234?_0x45e388:new _0x3c2234(function(_0xb33b13){_0xb33b13(_0x45e388);});}return new(_0x3c2234||(_0x3c2234=Promise))(function(_0x5aa4a6,_0x2df96e){function _0x3e295b(_0xa75060){try{_0x2f009f(_0x4a9727['next'](_0xa75060));}catch(_0x270835){_0x2df96e(_0x270835);}}function _0x4eca1(_0x4b74da){try{_0x2f009f(_0x4a9727['throw'](_0x4b74da));}catch(_0xd9ac6){_0x2df96e(_0xd9ac6);}}function _0x2f009f(_0x12f9b8){_0x12f9b8['done']?_0x5aa4a6(_0x12f9b8['value']):_0x1a483e(_0x12f9b8['value'])['then'](_0x3e295b,_0x4eca1);}_0x2f009f((_0x4a9727=_0x4a9727['apply'](_0x41377b,_0x462877||[]))['next']());});};class AccountService{constructor(_0x2ddfd0){this['fetch']=_0x2ddfd0;}['get'](_0x24a494,_0x5296ae){return __awaiter$b(this,void 0,void 0,function*(){const _0x33c253='Account/'+_0x24a494+'/',_0x3304c0=yield this['fetch']['get'](_0x33c253,_0x5296ae);try{if(_0x3304c0['status']>0xc7&&_0x3304c0['status']<0x12c){const _0x35b94e=yield _0x3304c0['json']();return new SuccessfulAccountResponse(_0x35b94e);}const _0x414deb=yield _0x3304c0['json']();return new FailedAccountResponse(_0x414deb);}catch(_0x2137b3){if(_0x2137b3 instanceof Error)return new FailedAccountResponse({'detail':_0x2137b3['message'],'title':_0x2137b3['name'],'status':0x1f4,'instance':'','type':''});throw _0x2137b3;}});}['getImage'](_0x2cf519,_0x1dc88e){return __awaiter$b(this,void 0,void 0,function*(){const _0x419ed9='account/image/'+_0x2cf519+'/',_0x59fa82=yield this['fetch']['get'](_0x419ed9,_0x1dc88e);try{if(_0x59fa82['status']>0xc7&&_0x59fa82['status']<0x12c){const _0x301025=yield _0x59fa82['json']();return new SuccessfulAccountImageResponse(_0x301025);}const _0x2ffd75=yield _0x59fa82['json']();return new FailedAccountImageResponse(_0x2ffd75);}catch(_0x8db20f){if(_0x8db20f instanceof Error)return new FailedAccountImageResponse({'detail':_0x8db20f['message'],'title':_0x8db20f['name'],'status':0x1f4,'instance':'','type':''});throw _0x8db20f;}});}}
|
|
4
4
|
|
|
5
|
-
var __awaiter$a=undefined&&undefined['__awaiter']||function(
|
|
5
|
+
var __awaiter$a=undefined&&undefined['__awaiter']||function(_0x37ae26,_0x5b6e8d,_0x4e6f89,_0xfee4b8){function _0x22504a(_0x57c282){return _0x57c282 instanceof _0x4e6f89?_0x57c282:new _0x4e6f89(function(_0x463a39){_0x463a39(_0x57c282);});}return new(_0x4e6f89||(_0x4e6f89=Promise))(function(_0x512bc8,_0x3759d9){function _0x2a5d4f(_0x1cb4be){try{_0x482c45(_0xfee4b8['next'](_0x1cb4be));}catch(_0x5e7330){_0x3759d9(_0x5e7330);}}function _0x521dd6(_0x52c078){try{_0x482c45(_0xfee4b8['throw'](_0x52c078));}catch(_0x43d741){_0x3759d9(_0x43d741);}}function _0x482c45(_0x4f1dce){_0x4f1dce['done']?_0x512bc8(_0x4f1dce['value']):_0x22504a(_0x4f1dce['value'])['then'](_0x2a5d4f,_0x521dd6);}_0x482c45((_0xfee4b8=_0xfee4b8['apply'](_0x37ae26,_0x5b6e8d||[]))['next']());});};class ApiKeyService{constructor(_0x1aa958){this['fetch']=_0x1aa958,this['path']='api-key';}['create'](_0x40e6a0,_0x319b1d,_0x5a3e89){return __awaiter$a(this,void 0,void 0,function*(){const _0x39b231={'account_name':_0x40e6a0,'api_key_name':_0x319b1d};try{const _0x5ba17e=yield this['fetch']['post'](this['path'],_0x5a3e89,_0x39b231);if(_0x5ba17e['status']>0xc7&&_0x5ba17e['status']<0x12c){const _0x124a96=yield _0x5ba17e['json']();return new SuccessfulApiKeyResponse(_0x124a96);}const _0x18f595=yield _0x5ba17e['json']();return new FailedApiKeyResponse(_0x18f595);}catch(_0x4bb3d5){if(_0x4bb3d5 instanceof Error)return new FailedApiKeyResponse({'detail':_0x4bb3d5['message'],'title':_0x4bb3d5['name'],'status':0x1f4,'instance':'','type':''});throw _0x4bb3d5;}});}['view'](_0xa1858b,_0x553059,_0x22616f){return __awaiter$a(this,void 0,void 0,function*(){const _0x9706f2=this['path']+'/'+_0xa1858b+'/'+_0x553059;try{const _0x3b1037=yield this['fetch']['get'](_0x9706f2,_0x22616f);if(_0x3b1037['status']>0xc7&&_0x3b1037['status']<0x12c){const _0x397323=yield _0x3b1037['json']();return new SuccessfulApiKeyValueResponse(_0x397323);}const _0x445255=yield _0x3b1037['json']();return new FailedApiKeyValueResponse(_0x445255);}catch(_0x365559){if(_0x365559 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x365559['message'],'title':_0x365559['name'],'status':0x1f4,'instance':'','type':''});throw _0x365559;}});}['delete'](_0x158d0a,_0x3daf66,_0x397418){return __awaiter$a(this,void 0,void 0,function*(){const _0x4b9863=this['path']+'/'+_0x158d0a+'/'+_0x3daf66;try{const _0x886a44=yield this['fetch']['delete'](_0x4b9863,_0x397418);if(_0x886a44['status']>0xc7&&_0x886a44['status']<0x12c)return new SuccessfulResponse({});const _0x2ca2bb=yield _0x886a44['json']();return new FailedResponse(_0x2ca2bb);}catch(_0x2988e2){if(_0x2988e2 instanceof Error)return new FailedResponse({'detail':_0x2988e2['message'],'title':_0x2988e2['name'],'status':0x1f4,'instance':'','type':''});throw _0x2988e2;}});}}
|
|
6
6
|
|
|
7
|
-
var __awaiter$9=undefined&&undefined['__awaiter']||function(
|
|
7
|
+
var __awaiter$9=undefined&&undefined['__awaiter']||function(_0xec3aee,_0x35ec68,_0x4c6033,_0x2065d8){function _0x33ce9f(_0x2d9657){return _0x2d9657 instanceof _0x4c6033?_0x2d9657:new _0x4c6033(function(_0x472b91){_0x472b91(_0x2d9657);});}return new(_0x4c6033||(_0x4c6033=Promise))(function(_0x1e400f,_0x508c88){function _0x47b73f(_0x29006d){try{_0x231a5f(_0x2065d8['next'](_0x29006d));}catch(_0x39d1a1){_0x508c88(_0x39d1a1);}}function _0x80bf54(_0xa655ee){try{_0x231a5f(_0x2065d8['throw'](_0xa655ee));}catch(_0x215e7f){_0x508c88(_0x215e7f);}}function _0x231a5f(_0x3709e5){_0x3709e5['done']?_0x1e400f(_0x3709e5['value']):_0x33ce9f(_0x3709e5['value'])['then'](_0x47b73f,_0x80bf54);}_0x231a5f((_0x2065d8=_0x2065d8['apply'](_0xec3aee,_0x35ec68||[]))['next']());});};class ListService{constructor(_0x53d377){this['fetch']=_0x53d377,this['path']='list';}['create'](_0xd48086,_0x5a5ab3,_0x1d6112,_0x272d40){return __awaiter$9(this,void 0,void 0,function*(){const _0xb94015={'account_name':_0xd48086,'list_name':_0x5a5ab3,'search_service_name':_0x1d6112};try{const _0x485c3e=yield this['fetch']['post'](this['path'],_0x272d40,_0xb94015);if(_0x485c3e['status']>0xc7&&_0x485c3e['status']<0x12c){const _0x3ee2f8=yield _0x485c3e['json']();return new SuccessfulListIdentityResponse(_0x3ee2f8);}const _0x2de495=yield _0x485c3e['json']();return new FailedListIdentityResponse(_0x2de495);}catch(_0x5ad5b2){if(_0x5ad5b2 instanceof Error)return new FailedListIdentityResponse({'detail':_0x5ad5b2['message'],'title':_0x5ad5b2['name'],'status':0x1f4,'instance':'','type':''});throw _0x5ad5b2;}});}['delete'](_0x3262a4,_0x21fa8d,_0x4d987a){return __awaiter$9(this,void 0,void 0,function*(){const _0x578356=this['path']+'/'+_0x3262a4+'/'+_0x21fa8d,_0x55c1de=yield this['fetch']['delete'](_0x578356,_0x4d987a);try{if(_0x55c1de['status']>0xc7&&_0x55c1de['status']<0x12c)return new SuccessfulResponse({});const _0x4759d1=yield _0x55c1de['json']();return new FailedResponse(_0x4759d1);}catch(_0x4add06){if(_0x4add06 instanceof Error)return new FailedResponse({'detail':_0x4add06['message'],'title':_0x4add06['name'],'status':0x1f4,'instance':'','type':''});throw _0x4add06;}});}['get'](_0x12aa26,_0x116676,_0xdef77){return __awaiter$9(this,void 0,void 0,function*(){const _0x3a752a=this['path']+'/'+_0x12aa26+'/'+_0x116676;try{const _0x378fe1=yield this['fetch']['get'](_0x3a752a,_0xdef77);if(_0x378fe1['status']>0xc7&&_0x378fe1['status']<0x12c){const _0x2205d3=yield _0x378fe1['json']();return new SuccessfulListResponse(_0x2205d3);}const _0x3ee6b1=yield _0x378fe1['json']();return new FailedListResponse(_0x3ee6b1);}catch(_0x4a4478){if(_0x4a4478 instanceof Error)return new FailedListResponse({'detail':_0x4a4478['message'],'title':_0x4a4478['name'],'status':0x1f4,'instance':'','type':''});throw _0x4a4478;}});}['edit'](_0x37d330,_0x3b0276,_0x42e199,_0x52e043){return __awaiter$9(this,void 0,void 0,function*(){const _0x1d39d7=this['path']+'/'+_0x37d330+'/'+_0x3b0276,_0x141190=yield this['fetch']['put'](_0x1d39d7,_0x42e199,_0x52e043);try{if(_0x141190['status']>0xc7&&_0x141190['status']<0x12c){const _0x3ac53a=yield _0x141190['json']();return new SuccessfulListResponse(_0x3ac53a);}const _0x2a6bd1=yield _0x141190['json']();return new FailedListResponse(_0x2a6bd1);}catch(_0x2432e2){if(_0x2432e2 instanceof Error)return new FailedListResponse({'detail':_0x2432e2['message'],'title':_0x2432e2['name'],'status':0x1f4,'instance':'','type':''});throw _0x2432e2;}});}}
|
|
8
8
|
|
|
9
|
-
var __awaiter$8=undefined&&undefined['__awaiter']||function(
|
|
9
|
+
var __awaiter$8=undefined&&undefined['__awaiter']||function(_0x4dce1b,_0x403868,_0x5d410c,_0x1a7979){function _0x3275c8(_0x383627){return _0x383627 instanceof _0x5d410c?_0x383627:new _0x5d410c(function(_0x144f62){_0x144f62(_0x383627);});}return new(_0x5d410c||(_0x5d410c=Promise))(function(_0x48eb87,_0x1e08aa){function _0x320e73(_0x3124fd){try{_0x33c512(_0x1a7979['next'](_0x3124fd));}catch(_0x3c60b5){_0x1e08aa(_0x3c60b5);}}function _0x11f298(_0x3f3d7c){try{_0x33c512(_0x1a7979['throw'](_0x3f3d7c));}catch(_0x1455a8){_0x1e08aa(_0x1455a8);}}function _0x33c512(_0x3fd68c){_0x3fd68c['done']?_0x48eb87(_0x3fd68c['value']):_0x3275c8(_0x3fd68c['value'])['then'](_0x320e73,_0x11f298);}_0x33c512((_0x1a7979=_0x1a7979['apply'](_0x4dce1b,_0x403868||[]))['next']());});};class Fetch{constructor(_0x1d7935){this['baseUri']=_0x1d7935,this['getUrl']=_0x21f024=>{return _0x21f024['startsWith']('/')&&(_0x21f024=_0x21f024['replace']('/','')),''+this['baseUri']+_0x21f024;},!_0x1d7935['endsWith']('/')&&(_0x1d7935=_0x1d7935+'/');}['get'](_0x54f032,_0x2021bd){return __awaiter$8(this,void 0,void 0,function*(){const _0x889a54=this['getUrl'](_0x54f032);return yield fetch(_0x889a54,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2021bd}});});}['post'](_0x287379,_0x46f6d8,_0x450c8b){return __awaiter$8(this,void 0,void 0,function*(){const _0x25c7f5=this['getUrl'](_0x287379);return yield fetch(_0x25c7f5,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x46f6d8},'body':_0x450c8b?JSON['stringify'](_0x450c8b):null});});}['upload'](_0xcbaa74,_0x39e9e6,_0x46f713){return __awaiter$8(this,void 0,void 0,function*(){const _0x252731=this['getUrl'](_0xcbaa74);return yield fetch(_0x252731,{'method':'POST','headers':{'Authorization':'Bearer\x20'+_0x39e9e6},'body':_0x46f713});});}['PostNoAuth'](_0x158fd4,_0xcf2fe0){return __awaiter$8(this,void 0,void 0,function*(){const _0x242d65=this['getUrl'](_0x158fd4);return yield fetch(_0x242d65,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0xcf2fe0?JSON['stringify'](_0xcf2fe0):null});});}['put'](_0x12c870,_0x1bccd6,_0x3d61d9){return __awaiter$8(this,void 0,void 0,function*(){const _0x3aae0c=this['getUrl'](_0x12c870);return yield fetch(_0x3aae0c,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1bccd6},'body':_0x3d61d9?JSON['stringify'](_0x3d61d9):null});});}['delete'](_0xff59e5,_0x5c40da){return __awaiter$8(this,void 0,void 0,function*(){const _0x49e14f=this['getUrl'](_0xff59e5);return yield fetch(_0x49e14f,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x5c40da}});});}}
|
|
10
10
|
|
|
11
|
-
var __awaiter$7=undefined&&undefined['__awaiter']||function(
|
|
11
|
+
var __awaiter$7=undefined&&undefined['__awaiter']||function(_0x272bec,_0x438791,_0x2d08f9,_0x3d09aa){function _0x48fecd(_0x5db1d0){return _0x5db1d0 instanceof _0x2d08f9?_0x5db1d0:new _0x2d08f9(function(_0xc4cb4e){_0xc4cb4e(_0x5db1d0);});}return new(_0x2d08f9||(_0x2d08f9=Promise))(function(_0x30ab22,_0x12230a){function _0x5a37af(_0x1c7f50){try{_0x2a62a1(_0x3d09aa['next'](_0x1c7f50));}catch(_0xe04f7f){_0x12230a(_0xe04f7f);}}function _0x4b9a9e(_0x4c8dd2){try{_0x2a62a1(_0x3d09aa['throw'](_0x4c8dd2));}catch(_0x1ebd99){_0x12230a(_0x1ebd99);}}function _0x2a62a1(_0x448be8){_0x448be8['done']?_0x30ab22(_0x448be8['value']):_0x48fecd(_0x448be8['value'])['then'](_0x5a37af,_0x4b9a9e);}_0x2a62a1((_0x3d09aa=_0x3d09aa['apply'](_0x272bec,_0x438791||[]))['next']());});};class SearchServersService{constructor(_0x373e0a){this['fetch']=_0x373e0a,this['path']='search-services';}['create'](_0x55397f,_0x36fa94,_0x2ac4af,_0x5a6624,_0x5b5fa1,_0x5f55bd,_0x5ea953,_0x271053){return __awaiter$7(this,void 0,void 0,function*(){const _0x2272cf={'account_name':_0x55397f,'search_service_name':_0x36fa94,'endpoint':_0x2ac4af,'key':_0x5a6624,'country':_0x5b5fa1,'provider':_0x5f55bd,'index_name':_0x5ea953};try{const _0x9e5036=yield this['fetch']['post'](this['path'],_0x271053,_0x2272cf);if(_0x9e5036['status']>0xc7&&_0x9e5036['status']<0x12c){const _0x5d3474=yield _0x9e5036['json']();return new SuccessfulSearchServiceResponse(_0x5d3474);}const _0x59858f=yield _0x9e5036['json']();return new FailedSearchServiceResponse(_0x59858f);}catch(_0x414936){if(_0x414936 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x414936['message'],'title':_0x414936['name'],'status':0x1f4,'instance':'','type':''});throw _0x414936;}});}['delete'](_0x2e45ee,_0x2b0a90,_0xc61905){return __awaiter$7(this,void 0,void 0,function*(){const _0x5842d8=this['path']+'/'+_0x2e45ee+'/'+_0x2b0a90;try{const _0x108da1=yield this['fetch']['delete'](_0x5842d8,_0xc61905);if(_0x108da1['status']>0xc7&&_0x108da1['status']<0x12c)return new SuccessfulResponse({});const _0x1f0cde=yield _0x108da1['json']();return new FailedResponse(_0x1f0cde);}catch(_0x5790e6){if(_0x5790e6 instanceof Error)return new FailedResponse({'detail':_0x5790e6['message'],'title':_0x5790e6['name'],'status':0x1f4,'instance':'','type':''});throw _0x5790e6;}});}['view'](_0x3ffd5b,_0x5b9f0f,_0x455c45){return __awaiter$7(this,void 0,void 0,function*(){const _0x2852a2=this['path']+'/'+_0x3ffd5b+'/'+_0x5b9f0f;try{const _0x2e382a=yield this['fetch']['get'](_0x2852a2,_0x455c45);if(_0x2e382a['status']>0xc7&&_0x2e382a['status']<0x12c){const _0x20a23a=yield _0x2e382a['json']();return new SuccessfulViewSearchServiceResponse(_0x20a23a);}const _0xb23e59=yield _0x2e382a['json']();return new FailedViewSearchServiceResponse(_0xb23e59);}catch(_0x112f70){if(_0x112f70 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x112f70['message'],'title':_0x112f70['name'],'status':0x1f4,'instance':'','type':''});throw _0x112f70;}});}['edit'](_0x13df4a,_0x496c27,_0x55a8ad,_0x3ec15c,_0x3ee5cf){return __awaiter$7(this,void 0,void 0,function*(){const _0x118b8a={'account_name':_0x13df4a,'search_service_name':_0x496c27,'key':_0x55a8ad,'country':_0x3ec15c};try{const _0x39ff4c=yield this['fetch']['put'](this['path'],_0x3ee5cf,_0x118b8a);if(_0x39ff4c['status']>0xc7&&_0x39ff4c['status']<0x12c){const _0x5be327=yield _0x39ff4c['json']();return new SuccessfulSearchServiceResponse(_0x5be327);}const _0x4ed590=yield _0x39ff4c['json']();return new FailedSearchServiceResponse(_0x4ed590);}catch(_0x89a61){if(_0x89a61 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x89a61['message'],'title':_0x89a61['name'],'status':0x1f4,'instance':'','type':''});throw _0x89a61;}});}['list'](_0x308d78,_0x176778){return __awaiter$7(this,void 0,void 0,function*(){const _0x423096=this['path']+'/'+_0x308d78;try{const _0x2f679a=yield this['fetch']['get'](_0x423096,_0x176778);if(_0x2f679a['status']>0xc7&&_0x2f679a['status']<0x12c){const _0x39d202=yield _0x2f679a['json']();return new SuccessfulListSearchServiceResponse(_0x39d202);}const _0x4c0e55=yield _0x2f679a['json']();return new FailedViewSearchServicesResponse(_0x4c0e55);}catch(_0x32c44a){if(_0x32c44a instanceof Error)return new FailedViewSearchServicesResponse({'detail':_0x32c44a['message'],'title':_0x32c44a['name'],'status':0x1f4,'instance':'','type':''});throw _0x32c44a;}});}}
|
|
12
12
|
|
|
13
|
-
var __awaiter$6=undefined&&undefined['__awaiter']||function(
|
|
13
|
+
var __awaiter$6=undefined&&undefined['__awaiter']||function(_0x3f583c,_0x51f721,_0x8546ab,_0x14fe05){function _0x3ba51e(_0x186a1e){return _0x186a1e instanceof _0x8546ab?_0x186a1e:new _0x8546ab(function(_0x5aebc7){_0x5aebc7(_0x186a1e);});}return new(_0x8546ab||(_0x8546ab=Promise))(function(_0x4d5012,_0x55f46d){function _0x108067(_0x3eb8d1){try{_0x1a5e13(_0x14fe05['next'](_0x3eb8d1));}catch(_0x65ee36){_0x55f46d(_0x65ee36);}}function _0x14461d(_0x51f060){try{_0x1a5e13(_0x14fe05['throw'](_0x51f060));}catch(_0x43698c){_0x55f46d(_0x43698c);}}function _0x1a5e13(_0xa98ffb){_0xa98ffb['done']?_0x4d5012(_0xa98ffb['value']):_0x3ba51e(_0xa98ffb['value'])['then'](_0x108067,_0x14461d);}_0x1a5e13((_0x14fe05=_0x14fe05['apply'](_0x3f583c,_0x51f721||[]))['next']());});};class FacetService{constructor(_0x22e3d7){this['fetch']=_0x22e3d7,this['path']='facet';}['create'](_0x284ebd,_0x1b366f,_0x3c86b0,_0x8b02a3){return __awaiter$6(this,void 0,void 0,function*(){const _0x3eaced={'account_name':_0x284ebd,'list_name':_0x1b366f,'facet_name':_0x3c86b0};try{const _0x5d909b=yield this['fetch']['post'](this['path'],_0x8b02a3,_0x3eaced);if(_0x5d909b['status']>0xc7&&_0x5d909b['status']<0x12c){const _0x5207b5=yield _0x5d909b['json']();return new SuccessfulFacetResponse(_0x5207b5);}const _0x5aba96=yield _0x5d909b['json']();return new FailedFacetResponse(_0x5aba96);}catch(_0x13732b){if(_0x13732b instanceof Error)return new FailedFacetResponse({'detail':_0x13732b['message'],'title':_0x13732b['name'],'status':0x1f4,'instance':'','type':''});throw _0x13732b;}});}['remove'](_0x15c44f,_0xac5bc9,_0x5dc8b1,_0x4b1eee){return __awaiter$6(this,void 0,void 0,function*(){const _0x51e144='Facet/'+_0x15c44f+'/'+_0xac5bc9+'/'+_0x5dc8b1,_0x111bf3=yield this['fetch']['delete'](_0x51e144,_0x4b1eee);try{if(_0x111bf3['status']>0xc7&&_0x111bf3['status']<0x12c)return new SuccessfulResponse({});const _0x404de4=yield _0x111bf3['json']();return new FailedResponse(_0x404de4);}catch(_0x3c8f64){if(_0x3c8f64 instanceof Error)return new FailedResponse({'detail':_0x3c8f64['message'],'title':_0x3c8f64['name'],'status':0x1f4,'instance':'','type':''});throw _0x3c8f64;}});}['rename'](_0x55067d,_0x441a16,_0x2f45c7,_0x5a34b8,_0x5bbf19){return __awaiter$6(this,void 0,void 0,function*(){let _0x7f139=this['path']+'/'+_0x55067d+'/'+_0x441a16;const _0x14869d={'facet_name':_0x2f45c7,'new_facet_name':_0x5a34b8};try{const _0x986051=yield this['fetch']['put'](_0x7f139,_0x5bbf19,_0x14869d);if(_0x986051['status']>0xc7&&_0x986051['status']<0x12c){const _0x28c2ba=yield _0x986051['json']();return new SuccessfulFacetResponse(_0x28c2ba);}const _0x14d3a1=yield _0x986051['json']();return new FailedFacetResponse(_0x14d3a1);}catch(_0x282eb1){if(_0x282eb1 instanceof Error)return new FailedFacetResponse({'detail':_0x282eb1['message'],'title':_0x282eb1['name'],'status':0x1f4,'instance':'','type':''});throw _0x282eb1;}});}['list'](_0x6fe8b9,_0x332bec,_0x1e214f,_0x12c87a,_0x5285db){return __awaiter$6(this,void 0,void 0,function*(){let _0x142130=this['path']+'/'+_0x6fe8b9+'/'+_0x332bec+'/'+_0x1e214f+'/'+_0x12c87a;try{const _0x3a3f3e=yield this['fetch']['get'](_0x142130,_0x5285db);if(_0x3a3f3e['status']>0xc7&&_0x3a3f3e['status']<0x12c){const _0x4eb5f8=yield _0x3a3f3e['json']();return new SuccessfulFacetValueResponse(_0x4eb5f8);}const _0x3a26e0=yield _0x3a3f3e['json']();return new FailedFacetValuesResponse(_0x3a26e0);}catch(_0x1cc118){if(_0x1cc118 instanceof Error)return new FailedFacetValuesResponse({'detail':_0x1cc118['message'],'title':_0x1cc118['name'],'status':0x1f4,'instance':'','type':''});throw _0x1cc118;}});}}
|
|
14
14
|
|
|
15
|
-
var __awaiter$5=undefined&&undefined['__awaiter']||function(
|
|
15
|
+
var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x3774ba,_0x258c6a,_0x5358f4,_0x158952){function _0x2b4636(_0xe1ad3){return _0xe1ad3 instanceof _0x5358f4?_0xe1ad3:new _0x5358f4(function(_0x19f4b5){_0x19f4b5(_0xe1ad3);});}return new(_0x5358f4||(_0x5358f4=Promise))(function(_0x2233a8,_0x556b97){function _0x5f53be(_0x874add){try{_0x149d50(_0x158952['next'](_0x874add));}catch(_0x48dbc9){_0x556b97(_0x48dbc9);}}function _0x4b7fb7(_0x2a1b3f){try{_0x149d50(_0x158952['throw'](_0x2a1b3f));}catch(_0x26010c){_0x556b97(_0x26010c);}}function _0x149d50(_0x568769){_0x568769['done']?_0x2233a8(_0x568769['value']):_0x2b4636(_0x568769['value'])['then'](_0x5f53be,_0x4b7fb7);}_0x149d50((_0x158952=_0x158952['apply'](_0x3774ba,_0x258c6a||[]))['next']());});};class SearchResultService{constructor(_0x232b23){this['fetch']=_0x232b23,this['path']='search-result';}['create'](_0xd2ee66,_0x1971dd,_0x396183,_0x2a115d,_0x2b29ee){return __awaiter$5(this,void 0,void 0,function*(){_0x2b29ee=_0x2b29ee!==null&&_0x2b29ee!==void 0?_0x2b29ee:{'latitude':0x0,'longitude':0x0,'facets':[],'searchable_fields':[],'resources':[],'active':!![]};const _0x3a5982=Object['assign']({'account_name':_0xd2ee66,'search_result_name':_0x396183,'list_name':_0x1971dd},_0x2b29ee);try{const _0x32cf4c=yield this['fetch']['post'](this['path'],_0x2a115d,_0x3a5982);if(_0x32cf4c['status']>0xc7&&_0x32cf4c['status']<0x12c){const _0x1c73e2=yield _0x32cf4c['json']();return new SuccessfulSearchResultResponse(_0x1c73e2);}const _0x22b59d=yield _0x32cf4c['json']();return new FailedSearchResultResponse(_0x22b59d);}catch(_0x395b26){if(_0x395b26 instanceof Error)return new FailedSearchResultResponse({'detail':_0x395b26['message'],'title':_0x395b26['name'],'status':0x1f4,'instance':'','type':''});throw _0x395b26;}});}['transfer'](_0x540bc3,_0x25374a,_0x999a70,_0x15dd6c){return __awaiter$5(this,void 0,void 0,function*(){const _0xc7424f={'account_name':_0x540bc3,'list_name':_0x25374a,'new_search_service_name':_0x999a70};try{const _0x47efbc=yield this['fetch']['post'](this['path']+'/transfer',_0x15dd6c,_0xc7424f);if(_0x47efbc['status']>0xc7&&_0x47efbc['status']<0x12c){const _0x1bcd4d=yield _0x47efbc['json']();return new SuccessfulListResponse(_0x1bcd4d);}const _0x217c72=yield _0x47efbc['json']();return new FailedListResponse(_0x217c72);}catch(_0x5f15df){if(_0x5f15df instanceof Error)return new FailedListResponse({'detail':_0x5f15df['message'],'title':_0x5f15df['name'],'status':0x1f4,'instance':'','type':''});throw _0x5f15df;}});}['list'](_0x39052c,_0xa628fa,_0x31e6dc,_0x33b84c){return __awaiter$5(this,void 0,void 0,function*(){let _0x42450d=this['path']+'/'+_0x39052c+'/'+_0xa628fa+'?'+this['getQueryStr'](_0x33b84c);try{const _0x5f4fbc=yield this['fetch']['get'](_0x42450d,_0x31e6dc);if(_0x5f4fbc['status']>0xc7&&_0x5f4fbc['status']<0x12c){const _0xd44e12=yield _0x5f4fbc['json']();return new SuccessfulListSearchResultResponse(_0xd44e12);}const _0x34f652=yield _0x5f4fbc['json']();return new FailedViewSearchResultResponse(_0x34f652);}catch(_0x24ac37){if(_0x24ac37 instanceof Error)return new FailedViewSearchResultResponse({'detail':_0x24ac37['message'],'title':_0x24ac37['name'],'status':0x1f4,'instance':'','type':''});throw _0x24ac37;}});}['get'](_0x15ccd2,_0x42d03a,_0x34f0b5,_0x244202){return __awaiter$5(this,void 0,void 0,function*(){let _0x117b68=this['path']+'/'+_0x15ccd2+'/'+_0x42d03a+'?'+_0x34f0b5;try{const _0x5b707d=yield this['fetch']['get'](_0x117b68,_0x244202);if(_0x5b707d['status']>0xc7&&_0x5b707d['status']<0x12c){const _0x206862=yield _0x5b707d['json']();return new SuccessfulSearchResultResponse(_0x206862);}const _0x2701b5=yield _0x5b707d['json']();return new FailedSearchResultResponse(_0x2701b5);}catch(_0x3dfd6d){if(_0x3dfd6d instanceof Error)return new FailedSearchResultResponse({'detail':_0x3dfd6d['message'],'title':_0x3dfd6d['name'],'status':0x1f4,'instance':'','type':''});throw _0x3dfd6d;}});}['delete'](_0x1c93aa,_0x3b7591,_0x34ce50,_0x2e44b6){return __awaiter$5(this,void 0,void 0,function*(){const _0x2dc2c2=this['path']+'/'+_0x1c93aa+'/'+_0x3b7591+'/'+_0x34ce50,_0x2a4870=yield this['fetch']['delete'](_0x2dc2c2,_0x2e44b6);try{if(_0x2a4870['status']>0xc7&&_0x2a4870['status']<0x12c)return new SuccessfulResponse({});const _0x4cec60=yield _0x2a4870['json']();return new FailedResponse(_0x4cec60);}catch(_0x32ddc8){if(_0x32ddc8 instanceof Error)return new FailedResponse({'detail':_0x32ddc8['message'],'title':_0x32ddc8['name'],'status':0x1f4,'instance':'','type':''});throw _0x32ddc8;}});}['upload'](_0x3ebc62,_0x4aeee0,_0x4b3627,_0x6bf70){return __awaiter$5(this,void 0,void 0,function*(){const _0x12790f=this['path']+'/'+_0x3ebc62+'/'+_0x4aeee0+'/upload',_0x1ef4e7=new FormData();_0x1ef4e7['append']('file',_0x4b3627);try{const _0x3ed3f4=yield this['fetch']['upload'](_0x12790f,_0x6bf70,_0x1ef4e7);if(_0x3ed3f4['status']>0xc7&&_0x3ed3f4['status']<0x12c){const _0x5418ba=yield _0x3ed3f4['json']();return new SuccessfulSearchResultResponse(_0x5418ba);}const _0x5600c0=yield _0x3ed3f4['json']();return new FailedSearchResultResponse(_0x5600c0);}catch(_0x9624d1){if(_0x9624d1 instanceof Error)return new FailedSearchResultResponse({'detail':_0x9624d1['message'],'title':_0x9624d1['name'],'status':0x1f4,'instance':'','type':''});throw _0x9624d1;}});}['edit'](_0x52603b,_0x5f41b5,_0x43504f,_0x1b012f,_0x4fa37d){return __awaiter$5(this,void 0,void 0,function*(){_0x4fa37d=_0x4fa37d!==null&&_0x4fa37d!==void 0?_0x4fa37d:{'active':!![],'latitude':0x0,'longitude':0x0,'facets':[],'searchable_fields':[],'resources':[]};const _0x346cc1=this['path']+'/'+_0x52603b+'/'+_0x5f41b5+'/'+_0x43504f;try{const _0x5b8b30=yield this['fetch']['put'](_0x346cc1,_0x1b012f,_0x4fa37d);if(_0x5b8b30['status']>0xc7&&_0x5b8b30['status']<0x12c){const _0x95a729=yield _0x5b8b30['json']();return new SuccessfulSearchResultResponse(_0x95a729);}const _0x30a019=yield _0x5b8b30['json']();return new FailedSearchResultResponse(_0x30a019);}catch(_0x2a2df5){if(_0x2a2df5 instanceof Error)return new FailedSearchResultResponse({'detail':_0x2a2df5['message'],'title':_0x2a2df5['name'],'status':0x1f4,'instance':'','type':''});throw _0x2a2df5;}});}['getQueryStr'](_0x424c72){let _0x2fa54b='';const _0x47b803=[];return (_0x424c72===null||_0x424c72===void 0?void 0:_0x424c72['size'])&&_0x47b803['push']('size='+_0x424c72['size']),(_0x424c72===null||_0x424c72===void 0?void 0:_0x424c72['skip'])&&_0x47b803['push']('skip='+_0x424c72['skip']),(_0x424c72===null||_0x424c72===void 0?void 0:_0x424c72['query'])&&_0x47b803['push']('query='+_0x424c72['query']),(_0x424c72===null||_0x424c72===void 0?void 0:_0x424c72['filter'])&&_0x47b803['push']('filter='+_0x424c72['filter']),(_0x424c72===null||_0x424c72===void 0?void 0:_0x424c72['radius'])&&_0x47b803['push']('radius='+_0x424c72['radius']),(_0x424c72===null||_0x424c72===void 0?void 0:_0x424c72['active'])&&_0x47b803['push']('active='+_0x424c72['active']),_0x47b803['length']>0x0&&_0x47b803['forEach']((_0x40978a,_0x239c0d)=>{if(_0x239c0d>0x0&&_0x2fa54b)_0x2fa54b+='&';_0x2fa54b+=_0x40978a;}),_0x2fa54b;}}
|
|
16
16
|
|
|
17
|
-
var __awaiter$4=undefined&&undefined['__awaiter']||function(
|
|
17
|
+
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x3daa4b,_0x2ee9eb,_0x551d4b,_0x2d6730){function _0x4e2b4b(_0xf1f099){return _0xf1f099 instanceof _0x551d4b?_0xf1f099:new _0x551d4b(function(_0x31cc36){_0x31cc36(_0xf1f099);});}return new(_0x551d4b||(_0x551d4b=Promise))(function(_0x295145,_0x39505b){function _0x167e9e(_0x4b2812){try{_0x27631a(_0x2d6730['next'](_0x4b2812));}catch(_0x5026a5){_0x39505b(_0x5026a5);}}function _0x535386(_0x23815a){try{_0x27631a(_0x2d6730['throw'](_0x23815a));}catch(_0x4e127b){_0x39505b(_0x4e127b);}}function _0x27631a(_0x461584){_0x461584['done']?_0x295145(_0x461584['value']):_0x4e2b4b(_0x461584['value'])['then'](_0x167e9e,_0x535386);}_0x27631a((_0x2d6730=_0x2d6730['apply'](_0x3daa4b,_0x2ee9eb||[]))['next']());});};class ContributorService{constructor(_0x4e9297){this['fetch']=_0x4e9297,this['path']='contributor';}['create'](_0x299c4e,_0x54b3f9,_0x5b50ef,_0x56f67d){return __awaiter$4(this,void 0,void 0,function*(){const _0x38cb8e={'account_name':_0x299c4e,'list_name':_0x54b3f9,'contributor_name':_0x5b50ef};try{const _0x19a304=yield this['fetch']['post'](this['path'],_0x56f67d,_0x38cb8e);if(_0x19a304['status']>0xc7&&_0x19a304['status']<0x12c){const _0x541186=yield _0x19a304['json']();return new SuccessfulContributorResponse(_0x541186);}const _0x93e629=yield _0x19a304['json']();return new FailedContributorResponse(_0x93e629);}catch(_0x33e0d2){if(_0x33e0d2 instanceof Error)return new FailedContributorResponse({'detail':_0x33e0d2['message'],'title':_0x33e0d2['name'],'status':0x1f4,'instance':'','type':''});throw _0x33e0d2;}});}['remove'](_0x255d6d,_0x35ffc8,_0x123ea3,_0x240e35){return __awaiter$4(this,void 0,void 0,function*(){const _0x38f23a=this['path']+'/'+_0x255d6d+'/'+_0x35ffc8+'/'+_0x123ea3,_0x13601a=yield this['fetch']['delete'](_0x38f23a,_0x240e35);try{if(_0x13601a['status']>0xc7&&_0x13601a['status']<0x12c)return new SuccessfulResponse({});const _0x329e4d=yield _0x13601a['json']();return new FailedResponse(_0x329e4d);}catch(_0x2d7a5e){if(_0x2d7a5e instanceof Error)return new FailedResponse({'detail':_0x2d7a5e['message'],'title':_0x2d7a5e['name'],'status':0x1f4,'instance':'','type':''});throw _0x2d7a5e;}});}['startsWith'](_0x1d113d,_0x1070da){return __awaiter$4(this,void 0,void 0,function*(){const _0x4bc832=this['path']+'/'+_0x1d113d;try{const _0x7550b1=yield this['fetch']['get'](_0x4bc832,_0x1070da);if(_0x7550b1['status']>0xc7&&_0x7550b1['status']<0x12c){const _0x251ca1=yield _0x7550b1['json']();return new SuccessfulAccountAndImageResponse(_0x251ca1);}const _0x17dc8a=yield _0x7550b1['json']();return new FailedAccountAndImageResponse(_0x17dc8a);}catch(_0x1797e7){if(_0x1797e7 instanceof Error)return new FailedAccountAndImageResponse({'detail':_0x1797e7['message'],'title':_0x1797e7['name'],'status':0x1f4,'instance':'','type':''});throw _0x1797e7;}});}}
|
|
18
18
|
|
|
19
|
-
var __awaiter$3=undefined&&undefined['__awaiter']||function(
|
|
19
|
+
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x4a74a2,_0x257d51,_0x2d5932,_0x328d8e){function _0x17892f(_0xa4707){return _0xa4707 instanceof _0x2d5932?_0xa4707:new _0x2d5932(function(_0x3ac137){_0x3ac137(_0xa4707);});}return new(_0x2d5932||(_0x2d5932=Promise))(function(_0x3e39fb,_0x4ba4b2){function _0x1e12ca(_0x50371a){try{_0x4182e5(_0x328d8e['next'](_0x50371a));}catch(_0x584758){_0x4ba4b2(_0x584758);}}function _0x404974(_0x15546e){try{_0x4182e5(_0x328d8e['throw'](_0x15546e));}catch(_0x8c135b){_0x4ba4b2(_0x8c135b);}}function _0x4182e5(_0x4aa180){_0x4aa180['done']?_0x3e39fb(_0x4aa180['value']):_0x17892f(_0x4aa180['value'])['then'](_0x1e12ca,_0x404974);}_0x4182e5((_0x328d8e=_0x328d8e['apply'](_0x4a74a2,_0x257d51||[]))['next']());});};class SearchableFieldService{constructor(_0x13c0ea){this['fetch']=_0x13c0ea,this['path']='searchable-field';}['create'](_0x557bc6,_0x3bc9c3,_0x578938,_0x11cb76){return __awaiter$3(this,void 0,void 0,function*(){const _0x2e1028={'account_name':_0x557bc6,'list_name':_0x3bc9c3,'searchable_field_name':_0x578938};try{const _0x321ee2=yield this['fetch']['post'](this['path'],_0x11cb76,_0x2e1028);if(_0x321ee2['status']>0xc7&&_0x321ee2['status']<0x12c){const _0x492aaa=yield _0x321ee2['json']();return new SuccessfulSearchableFieldResponse(_0x492aaa);}const _0x4a7b31=yield _0x321ee2['json']();return new FailedSearchableFieldResponse(_0x4a7b31);}catch(_0x572881){if(_0x572881 instanceof Error)return new FailedSearchableFieldResponse({'detail':_0x572881['message'],'title':_0x572881['name'],'status':0x1f4,'instance':'','type':''});throw _0x572881;}});}['remove'](_0x6e8158,_0x2dcf6a,_0xa5a710,_0x2a9e5e){return __awaiter$3(this,void 0,void 0,function*(){const _0x597fa2=this['path']+'/'+_0x6e8158+'/'+_0x2dcf6a+'/'+_0xa5a710,_0x2fed1b=yield this['fetch']['delete'](_0x597fa2,_0x2a9e5e);try{if(_0x2fed1b['status']>0xc7&&_0x2fed1b['status']<0x12c)return new SuccessfulResponse({});const _0xb1b4ef=yield _0x2fed1b['json']();return new FailedResponse(_0xb1b4ef);}catch(_0x4ce63c){if(_0x4ce63c instanceof Error)return new FailedResponse({'detail':_0x4ce63c['message'],'title':_0x4ce63c['name'],'status':0x1f4,'instance':'','type':''});throw _0x4ce63c;}});}['rename'](_0x5b2542,_0x386fe3,_0x570f81,_0x4b45e8,_0x48b2e2){return __awaiter$3(this,void 0,void 0,function*(){let _0x4c6d5e=this['path']+'/'+_0x5b2542+'/'+_0x386fe3;const _0x2afe45={'searchable_field_name':_0x570f81,'new_searchable_field_name':_0x4b45e8};try{const _0x55f4f=yield this['fetch']['put'](_0x4c6d5e,_0x48b2e2,_0x2afe45);if(_0x55f4f['status']>0xc7&&_0x55f4f['status']<0x12c){const _0xb341c6=yield _0x55f4f['json']();return new SuccessfulSearchableFieldResponse(_0xb341c6);}const _0x23905e=yield _0x55f4f['json']();return new FailedSearchableFieldResponse(_0x23905e);}catch(_0xd7f108){if(_0xd7f108 instanceof Error)return new FailedSearchableFieldResponse({'detail':_0xd7f108['message'],'title':_0xd7f108['name'],'status':0x1f4,'instance':'','type':''});throw _0xd7f108;}});}}
|
|
20
20
|
|
|
21
|
-
var __awaiter$2=undefined&&undefined['__awaiter']||function(
|
|
21
|
+
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x46860b,_0x447cb0,_0x3cf051,_0x5163c5){function _0x4d5a2c(_0x12e765){return _0x12e765 instanceof _0x3cf051?_0x12e765:new _0x3cf051(function(_0x72f1c3){_0x72f1c3(_0x12e765);});}return new(_0x3cf051||(_0x3cf051=Promise))(function(_0x11b85a,_0x3ce07f){function _0x3223b1(_0x3a9992){try{_0x47c370(_0x5163c5['next'](_0x3a9992));}catch(_0x14c57e){_0x3ce07f(_0x14c57e);}}function _0x25bb87(_0x162045){try{_0x47c370(_0x5163c5['throw'](_0x162045));}catch(_0x86799f){_0x3ce07f(_0x86799f);}}function _0x47c370(_0x7399e3){_0x7399e3['done']?_0x11b85a(_0x7399e3['value']):_0x4d5a2c(_0x7399e3['value'])['then'](_0x3223b1,_0x25bb87);}_0x47c370((_0x5163c5=_0x5163c5['apply'](_0x46860b,_0x447cb0||[]))['next']());});};class ResourceService{constructor(_0x63ebfb){this['fetch']=_0x63ebfb,this['path']='resource';}['create'](_0x5c0fea,_0x2c11de,_0x2ca58e,_0x4426a4){return __awaiter$2(this,void 0,void 0,function*(){const _0x4900f7={'account_name':_0x5c0fea,'list_name':_0x2c11de,'resource_name':_0x2ca58e};try{const _0x523419=yield this['fetch']['post'](this['path'],_0x4426a4,_0x4900f7);if(_0x523419['status']>0xc7&&_0x523419['status']<0x12c){const _0x38e2bc=yield _0x523419['json']();return new SuccessfulResourceResponse(_0x38e2bc);}const _0x42f886=yield _0x523419['json']();return new FailedResourceResponse(_0x42f886);}catch(_0x5eaabf){if(_0x5eaabf instanceof Error)return new FailedResourceResponse({'detail':_0x5eaabf['message'],'title':_0x5eaabf['name'],'status':0x1f4,'instance':'','type':''});throw _0x5eaabf;}});}['remove'](_0x232598,_0x179fc6,_0x3b512f,_0x1e85e6){return __awaiter$2(this,void 0,void 0,function*(){const _0x282b23=this['path']+'/'+_0x232598+'/'+_0x179fc6+'/'+_0x3b512f,_0x2df64b=yield this['fetch']['delete'](_0x282b23,_0x1e85e6);try{if(_0x2df64b['status']>0xc7&&_0x2df64b['status']<0x12c)return new SuccessfulResponse({});const _0x1a76b8=yield _0x2df64b['json']();return new FailedResponse(_0x1a76b8);}catch(_0x458861){if(_0x458861 instanceof Error)return new FailedResponse({'detail':_0x458861['message'],'title':_0x458861['name'],'status':0x1f4,'instance':'','type':''});throw _0x458861;}});}['rename'](_0x4d1da9,_0xf3ec09,_0x3b232c,_0x5472c4,_0x2451be){return __awaiter$2(this,void 0,void 0,function*(){let _0x46692e=this['path']+'/'+_0x4d1da9+'/'+_0xf3ec09;const _0x136178={'resource_name':_0x3b232c,'new_resource_name':_0x5472c4};try{const _0x23a6ee=yield this['fetch']['put'](_0x46692e,_0x2451be,_0x136178);if(_0x23a6ee['status']>0xc7&&_0x23a6ee['status']<0x12c){const _0x5253ee=yield _0x23a6ee['json']();return new SuccessfulResourceResponse(_0x5253ee);}const _0x9d819d=yield _0x23a6ee['json']();return new FailedResourceResponse(_0x9d819d);}catch(_0x7ac717){if(_0x7ac717 instanceof Error)return new FailedResourceResponse({'detail':_0x7ac717['message'],'title':_0x7ac717['name'],'status':0x1f4,'instance':'','type':''});throw _0x7ac717;}});}}
|
|
22
22
|
|
|
23
|
-
var __awaiter$1=undefined&&undefined['__awaiter']||function(
|
|
23
|
+
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x5e2d23,_0x34b5ab,_0x448f8c,_0x545730){function _0x46e8ec(_0x5dcaf1){return _0x5dcaf1 instanceof _0x448f8c?_0x5dcaf1:new _0x448f8c(function(_0x8ce50c){_0x8ce50c(_0x5dcaf1);});}return new(_0x448f8c||(_0x448f8c=Promise))(function(_0x1427be,_0x487cae){function _0x26b931(_0x41f7d0){try{_0x5221b6(_0x545730['next'](_0x41f7d0));}catch(_0xb7e150){_0x487cae(_0xb7e150);}}function _0x8ac8e8(_0x40180e){try{_0x5221b6(_0x545730['throw'](_0x40180e));}catch(_0x1696dc){_0x487cae(_0x1696dc);}}function _0x5221b6(_0x2ab28d){_0x2ab28d['done']?_0x1427be(_0x2ab28d['value']):_0x46e8ec(_0x2ab28d['value'])['then'](_0x26b931,_0x8ac8e8);}_0x5221b6((_0x545730=_0x545730['apply'](_0x5e2d23,_0x34b5ab||[]))['next']());});};class GroupService{constructor(_0x47cfe6){this['fetch']=_0x47cfe6,this['path']='group';}['create'](_0x56aeeb,_0x3046ea,_0x27d7b3,_0x33d4b6){return __awaiter$1(this,void 0,void 0,function*(){const _0x55c966={'account_name':_0x56aeeb,'search_service_name':_0x3046ea,'group_name':_0x27d7b3};try{const _0x213a1d=yield this['fetch']['post'](this['path'],_0x33d4b6,_0x55c966);if(_0x213a1d['status']>0xc7&&_0x213a1d['status']<0x12c){const _0x23b071=yield _0x213a1d['json']();return new SuccessfulGroupResponse(_0x23b071);}const _0x2bfe77=yield _0x213a1d['json']();return new FailedGroupResponse(_0x2bfe77);}catch(_0x1341f5){if(_0x1341f5 instanceof Error)return new FailedGroupResponse({'detail':_0x1341f5['message'],'title':_0x1341f5['name'],'status':0x1f4,'instance':'','type':''});throw _0x1341f5;}});}['addList'](_0x300f72,_0x46f697,_0x2b4e3f,_0x15ada4,_0x122c58){return __awaiter$1(this,void 0,void 0,function*(){const _0x257981={'account_name':_0x300f72,'list_name':_0x2b4e3f,'group_name':_0x46f697,'version':_0x15ada4};try{const _0x2170a7=yield this['fetch']['post'](this['path']+'/list',_0x122c58,_0x257981);if(_0x2170a7['status']>0xc7&&_0x2170a7['status']<0x12c){const _0x43ee0f=yield _0x2170a7['json']();return new SuccessfulListIdentityResponse(_0x43ee0f);}const _0x3986e5=yield _0x2170a7['json']();return new FailedListIdentityResponse(_0x3986e5);}catch(_0x374bec){if(_0x374bec instanceof Error)return new FailedListIdentityResponse({'detail':_0x374bec['message'],'title':_0x374bec['name'],'status':0x1f4,'instance':'','type':''});throw _0x374bec;}});}['delete'](_0x51d8cf,_0x31b898,_0x1f5a91){return __awaiter$1(this,void 0,void 0,function*(){const _0x589a1e=this['path']+'/'+_0x51d8cf+'/'+_0x31b898,_0x1337a1=yield this['fetch']['delete'](_0x589a1e,_0x1f5a91);try{if(_0x1337a1['status']>0xc7&&_0x1337a1['status']<0x12c)return new SuccessfulResponse({});const _0x238a37=yield _0x1337a1['json']();return new FailedResponse(_0x238a37);}catch(_0x12f69c){if(_0x12f69c instanceof Error)return new FailedResponse({'detail':_0x12f69c['message'],'title':_0x12f69c['name'],'status':0x1f4,'instance':'','type':''});throw _0x12f69c;}});}}
|
|
24
24
|
|
|
25
|
-
var __awaiter=undefined&&undefined['__awaiter']||function(
|
|
25
|
+
var __awaiter=undefined&&undefined['__awaiter']||function(_0x5242ea,_0x2e36bd,_0x19d9e1,_0xb9cd5a){function _0x1bc74b(_0x38705e){return _0x38705e instanceof _0x19d9e1?_0x38705e:new _0x19d9e1(function(_0x3c5c6a){_0x3c5c6a(_0x38705e);});}return new(_0x19d9e1||(_0x19d9e1=Promise))(function(_0x3bcb34,_0x10e0e9){function _0xdcd21(_0x515846){try{_0x5174eb(_0xb9cd5a['next'](_0x515846));}catch(_0x120497){_0x10e0e9(_0x120497);}}function _0x5516e4(_0xf07a9e){try{_0x5174eb(_0xb9cd5a['throw'](_0xf07a9e));}catch(_0x3bf587){_0x10e0e9(_0x3bf587);}}function _0x5174eb(_0x14d792){_0x14d792['done']?_0x3bcb34(_0x14d792['value']):_0x1bc74b(_0x14d792['value'])['then'](_0xdcd21,_0x5516e4);}_0x5174eb((_0xb9cd5a=_0xb9cd5a['apply'](_0x5242ea,_0x2e36bd||[]))['next']());});};class AdminClient{constructor(_0x235ea5='https://admin.searchability.dev/'){var _0x1d2b47=new Fetch(_0x235ea5);this['Accounts']=new AccountService(_0x1d2b47),this['Lists']=new ListService(_0x1d2b47),this['ApiKeys']=new ApiKeyService(_0x1d2b47),this['SearchServers']=new SearchServersService(_0x1d2b47),this['Facets']=new FacetService(_0x1d2b47),this['SearchResults']=new SearchResultService(_0x1d2b47),this['Contributors']=new ContributorService(_0x1d2b47),this['SearchableFields']=new SearchableFieldService(_0x1d2b47),this['Groups']=new GroupService(_0x1d2b47),this['Resources']=new ResourceService(_0x1d2b47);}}class AuthClient{constructor(_0x52229f='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x52229f);}['login'](_0xc75a87){return __awaiter(this,void 0,void 0,function*(){const _0x59f787='login/'+_0xc75a87;try{const _0x5eb3a6=yield yield fetch(_0x59f787);if(_0x5eb3a6['status']>0xc7&&_0x5eb3a6['status']<0x12c){const _0x547400=yield _0x5eb3a6['json']();return new SuccessfulAuthResponse(_0x547400);}const _0x9b81a4=yield _0x5eb3a6['json']();return new FailedAuthResponse(_0x9b81a4);}catch(_0x56f866){if(_0x56f866 instanceof Error)return new FailedAuthResponse({'detail':_0x56f866['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x56f866;}});}['refresh'](_0x102d14){return __awaiter(this,void 0,void 0,function*(){const _0x3255c4='refresh',_0x5d714d={'refresh_token':_0x102d14};try{const _0x20b8b8=yield this['fetch']['PostNoAuth'](_0x3255c4,_0x5d714d);if(_0x20b8b8['status']>0xc7&&_0x20b8b8['status']<0x12c){const _0x5b5b85=yield _0x20b8b8['json']();return new SuccessfulAuthResponse(_0x5b5b85);}const _0x4ec3e7=yield _0x20b8b8['json']();return new FailedAuthResponse(_0x4ec3e7);}catch(_0x2dc05e){if(_0x2dc05e instanceof Error)return new FailedAuthResponse({'detail':_0x2dc05e['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x2dc05e;}});}['getTokenStatus'](_0x5edd73){if(Date['now']()<_0x5edd73['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x5edd73['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
|
|
26
26
|
|
|
27
27
|
export { AdminClient, AuthClient, TokenStatus, Tokens };
|
package/dist/types.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ declare class ListService {
|
|
|
33
33
|
create(account_name: string, list_name: string, search_service_name: string, access_token: string): Promise<Response<ListIdentity, Problem>>;
|
|
34
34
|
delete(account_name: string, list_name: string, access_token: string): Promise<Response<any, Problem>>;
|
|
35
35
|
get(account_name: string, list_name: string, access_token: string): Promise<Response<List, Problem>>;
|
|
36
|
+
edit(account_name: string, list_name: string, access_token: string, options?: Partial<EditListOptions> | undefined): Promise<Response<List, Problem>>;
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
declare class SearchServersService {
|
|
@@ -60,13 +61,13 @@ declare class SearchResultService {
|
|
|
60
61
|
private readonly fetch;
|
|
61
62
|
private readonly path;
|
|
62
63
|
constructor(fetch: Fetch);
|
|
63
|
-
create(account_name: string, list_name: string, search_result_name: string, access_token: string, options?: Partial<
|
|
64
|
+
create(account_name: string, list_name: string, search_result_name: string, access_token: string, options?: Partial<SearchResultOptions> | undefined): Promise<Response<SearchResult, Problem>>;
|
|
64
65
|
transfer(account_name: string, list_name: string, new_search_service_name: string, access_token: string): Promise<Response<List, Problem>>;
|
|
65
66
|
list(account_name: string, list_name: string, access_token: string, options: Partial<ListSearchResultOptions>): Promise<Response<SearchResult[], Problem>>;
|
|
66
67
|
get(account_name: string, list_name: string, id: string, access_token: string): Promise<Response<SearchResult, Problem>>;
|
|
67
68
|
delete(account_name: string, list_name: string, id: string, access_token: string): Promise<Response<any, Problem>>;
|
|
68
69
|
upload(account_name: string, list_name: string, file: File, access_token: string): Promise<Response<SearchResult, Problem>>;
|
|
69
|
-
edit(account_name: string, list_name: string, id: string, access_token: string, options?: Partial<
|
|
70
|
+
edit(account_name: string, list_name: string, id: string, access_token: string, options?: Partial<SearchResultOptions> | undefined): Promise<Response<SearchResult, Problem>>;
|
|
70
71
|
getQueryStr(options: Partial<ListSearchResultOptions>): string;
|
|
71
72
|
}
|
|
72
73
|
|
|
@@ -93,6 +94,8 @@ declare class ResourceService {
|
|
|
93
94
|
private readonly path;
|
|
94
95
|
constructor(fetch: Fetch);
|
|
95
96
|
create(account_name: string, list_name: string, resource_name: string, access_token: string): Promise<Response<Resource, Problem>>;
|
|
97
|
+
remove(account_name: string, list_name: string, resource_name: string, access_token: string): Promise<Response<any, Problem>>;
|
|
98
|
+
rename(account_name: string, list_name: string, resource_name: string, new_resource_name: string, access_token: string): Promise<Response<Resource, Problem>>;
|
|
96
99
|
}
|
|
97
100
|
|
|
98
101
|
declare class GroupService {
|
|
@@ -255,7 +258,7 @@ type NameAndValue = {
|
|
|
255
258
|
name: string;
|
|
256
259
|
value: any | undefined;
|
|
257
260
|
};
|
|
258
|
-
type
|
|
261
|
+
type SearchResultOptions = {
|
|
259
262
|
latitude?: number;
|
|
260
263
|
longitude?: number;
|
|
261
264
|
facets?: NameAndValue[];
|
|
@@ -269,6 +272,11 @@ type ListSearchResultOptions = {
|
|
|
269
272
|
query?: string;
|
|
270
273
|
filter?: string;
|
|
271
274
|
radius?: string;
|
|
275
|
+
active?: boolean;
|
|
276
|
+
};
|
|
277
|
+
type EditListOptions = {
|
|
278
|
+
default_suggest_size?: number;
|
|
279
|
+
default_search_size?: number;
|
|
272
280
|
};
|
|
273
281
|
declare class SuccessfulFacetValueResponse extends Response<any[], Problem> {
|
|
274
282
|
readonly facets: any[];
|
|
@@ -511,4 +519,4 @@ declare class FailedApiKeyValueResponse extends Response<ApiKeyValue, Problem> {
|
|
|
511
519
|
toProblem(): Problem;
|
|
512
520
|
}
|
|
513
521
|
|
|
514
|
-
export { type Account, type AccountAndImage, type AccountImage, AdminClient, type ApiKey, type ApiKeyValue, AuthClient, type Contributor, type
|
|
522
|
+
export { type Account, type AccountAndImage, type AccountImage, AdminClient, type ApiKey, type ApiKeyValue, AuthClient, type Contributor, type EditListOptions, type Error, type Facet, FailedAccountAndImageResponse, FailedAccountImageResponse, FailedAccountResponse, FailedApiKeyResponse, FailedApiKeyValueResponse, FailedAuthResponse, FailedContributorResponse, FailedFacetResponse, FailedFacetValuesResponse, FailedGroupResponse, FailedListIdentityResponse, FailedListResponse, FailedResourceResponse, FailedResponse, FailedSearchResultResponse, FailedSearchServiceResponse, FailedSearchableFieldResponse, FailedViewSearchResultResponse, FailedViewSearchServiceResponse, FailedViewSearchServicesResponse, type Group, type List, type ListIdentity, type ListRef, type ListSearchResultOptions, type NameAndValue, type Problem, type RefreshRequest, type Resource, Response, type SearchResult, type SearchResultOptions, type SearchService, type SearchServiceDetails, type SearchableField, SuccessfulAccountAndImageResponse, SuccessfulAccountImageResponse, SuccessfulAccountResponse, SuccessfulApiKeyResponse, SuccessfulApiKeyValueResponse, SuccessfulAuthResponse, SuccessfulContributorResponse, SuccessfulFacetResponse, SuccessfulFacetValueResponse, SuccessfulGroupResponse, SuccessfulListIdentityResponse, SuccessfulListResponse, SuccessfulListSearchResultResponse, SuccessfulListSearchServiceResponse, SuccessfulResourceResponse, SuccessfulResponse, SuccessfulSearchResultResponse, SuccessfulSearchServiceResponse, SuccessfulSearchableFieldResponse, SuccessfulViewSearchServiceResponse, TokenStatus, Tokens };
|