@searchability/admin-client 0.0.122 → 0.0.124
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(_0x57b16e){_0x57b16e[_0x57b16e['Ok']=0x0]='Ok',_0x57b16e[_0x57b16e['Refresh']=0x1]='Refresh',_0x57b16e[_0x57b16e['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(_0x5a4ce3){this['isSuccess']=_0x5a4ce3;}}class SuccessfulFacetValueResponse extends Response{constructor(_0x4535f1){super(!![]),this['facets']=_0x4535f1;}['toSuccess'](){return this['facets'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetValuesResponse extends Response{constructor(_0x151813){super(![]),this['problem']=_0x151813;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulContributorResponse extends Response{constructor(_0x4ce32d){super(!![]),this['contributor']=_0x4ce32d;}['toSuccess'](){return this['contributor'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedContributorResponse extends Response{constructor(_0xccf4d6){super(![]),this['problem']=_0xccf4d6;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountAndImageResponse extends Response{constructor(_0x5dc746){super(!![]),this['accountAndImages']=_0x5dc746;}['toSuccess'](){return this['accountAndImages'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountAndImageResponse extends Response{constructor(_0x224bc7){super(![]),this['problem']=_0x224bc7;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulResourceResponse extends Response{constructor(_0x32d7fe){super(!![]),this['resource']=_0x32d7fe;}['toSuccess'](){return this['resource'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResourceResponse extends Response{constructor(_0x24f439){super(![]),this['problem']=_0x24f439;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulFacetResponse extends Response{constructor(_0x72987f){super(!![]),this['facet']=_0x72987f;}['toSuccess'](){return this['facet'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetResponse extends Response{constructor(_0x501bbb){super(![]),this['problem']=_0x501bbb;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedSearchableFieldResponse extends Response{constructor(_0x30f127){super(![]),this['problem']=_0x30f127;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchableFieldResponse extends Response{constructor(_0x2afcfa){super(!![]),this['searchable_field']=_0x2afcfa;}['toSuccess'](){return this['searchable_field'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountResponse extends Response{constructor(_0x44bce6){super(!![]),this['account']=_0x44bce6;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountImageResponse extends Response{constructor(_0x40fc43){super(!![]),this['accountImage']=_0x40fc43;}['toSuccess'](){return this['accountImage'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListIdentityResponse extends Response{constructor(_0x3e3968){super(!![]),this['list']=_0x3e3968;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulGroupResponse extends Response{constructor(_0x1faea3){super(!![]),this['group']=_0x1faea3;}['toSuccess'](){return this['group'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedGroupResponse extends Response{constructor(_0x3e6ba5){super(![]),this['problem']=_0x3e6ba5;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListResponse extends Response{constructor(_0x1e3620){super(!![]),this['list']=_0x1e3620;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedListResponse extends Response{constructor(_0x50a78d){super(![]),this['problem']=_0x50a78d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountResponse extends Response{constructor(_0x26df91){super(![]),this['problem']=_0x26df91;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountImageResponse extends Response{constructor(_0x6f6d5d){super(![]),this['problem']=_0x6f6d5d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListIdentityResponse extends Response{constructor(_0x3cf96){super(![]),this['problem']=_0x3cf96;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x1290d3){super(!![]),this['tokens']=_0x1290d3;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x3edbee){super(![]),this['problem']=_0x3edbee;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x57fe06){super(!![]),this['apiKey']=_0x57fe06;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x1c2e30){super(![]),this['problem']=_0x1c2e30;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x32e41f){super(!![]),this['searchService']=_0x32e41f;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0xdad0ac){super(![]),this['problem']=_0xdad0ac;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x4ed660){super(!![]),this['searchService']=_0x4ed660;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulSearchResultResponse extends Response{constructor(_0x9a0342){super(!![]),this['searchResult']=_0x9a0342;}['toSuccess'](){return this['searchResult'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchResultResponse extends Response{constructor(_0x4cd832){super(![]),this['problem']=_0x4cd832;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchResultResponse extends Response{constructor(_0x219648){super(!![]),this['searchResults']=_0x219648;}['toSuccess'](){return this['searchResults'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchResultResponse extends Response{constructor(_0x31a09c){super(![]),this['problem']=_0x31a09c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchServiceResponse extends Response{constructor(_0xe26577){super(!![]),this['searchServices']=_0xe26577;}['toSuccess'](){return this['searchServices'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServicesResponse extends Response{constructor(_0x29bc3d){super(![]),this['problem']=_0x29bc3d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedViewSearchServiceResponse extends Response{constructor(_0x3a4a6b){super(![]),this['problem']=_0x3a4a6b;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x4bf2ac){super(!![]),this['apiKeyValue']=_0x4bf2ac;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x489198){super(!![]),this['obj']=_0x489198;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x3f765a){super(![]),this['problem']=_0x3f765a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x1a67c8){super(![]),this['problem']=_0x1a67c8;}['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(_0x483d77,_0xd4d4e0,_0xa689f7,_0x1d409){function _0x3597a6(_0xc0fb5){return _0xc0fb5 instanceof _0xa689f7?_0xc0fb5:new _0xa689f7(function(_0x17963a){_0x17963a(_0xc0fb5);});}return new(_0xa689f7||(_0xa689f7=Promise))(function(_0x2694cf,_0xe5d5d3){function _0x594cc(_0x2d73b0){try{_0x1082d6(_0x1d409['next'](_0x2d73b0));}catch(_0x59115a){_0xe5d5d3(_0x59115a);}}function _0x58d15a(_0x48d493){try{_0x1082d6(_0x1d409['throw'](_0x48d493));}catch(_0x1ae4d7){_0xe5d5d3(_0x1ae4d7);}}function _0x1082d6(_0x479215){_0x479215['done']?_0x2694cf(_0x479215['value']):_0x3597a6(_0x479215['value'])['then'](_0x594cc,_0x58d15a);}_0x1082d6((_0x1d409=_0x1d409['apply'](_0x483d77,_0xd4d4e0||[]))['next']());});};class AccountService{constructor(_0x313d04){this['fetch']=_0x313d04;}['get'](_0x587ac7,_0x38d157){return __awaiter$b(this,void 0,void 0,function*(){const _0x6af52f='Account/'+_0x587ac7+'/',_0x595175=yield this['fetch']['get'](_0x6af52f,_0x38d157);try{if(_0x595175['status']>0xc7&&_0x595175['status']<0x12c){const _0x37babc=yield _0x595175['json']();return new SuccessfulAccountResponse(_0x37babc);}const _0x30486f=yield _0x595175['json']();return new FailedAccountResponse(_0x30486f);}catch(_0x576120){if(_0x576120 instanceof Error)return new FailedAccountResponse({'detail':_0x576120['message'],'title':_0x576120['name'],'status':0x1f4,'instance':'','type':''});throw _0x576120;}});}['getImage'](_0x289722,_0xb4e8b9){return __awaiter$b(this,void 0,void 0,function*(){const _0x234fff='account/image/'+_0x289722+'/',_0xdcf7f5=yield this['fetch']['get'](_0x234fff,_0xb4e8b9);try{if(_0xdcf7f5['status']>0xc7&&_0xdcf7f5['status']<0x12c){const _0x373abe=yield _0xdcf7f5['json']();return new SuccessfulAccountImageResponse(_0x373abe);}const _0x259f5b=yield _0xdcf7f5['json']();return new FailedAccountImageResponse(_0x259f5b);}catch(_0x66b9ec){if(_0x66b9ec instanceof Error)return new FailedAccountImageResponse({'detail':_0x66b9ec['message'],'title':_0x66b9ec['name'],'status':0x1f4,'instance':'','type':''});throw _0x66b9ec;}});}}
|
|
4
4
|
|
|
5
|
-
var __awaiter$a=undefined&&undefined['__awaiter']||function(
|
|
5
|
+
var __awaiter$a=undefined&&undefined['__awaiter']||function(_0x4d0bd1,_0x474042,_0x37e91c,_0x2ffd5e){function _0x1ad0e4(_0x298ce2){return _0x298ce2 instanceof _0x37e91c?_0x298ce2:new _0x37e91c(function(_0x28e696){_0x28e696(_0x298ce2);});}return new(_0x37e91c||(_0x37e91c=Promise))(function(_0x4143ba,_0x3e653a){function _0x58b1f6(_0xfd37d7){try{_0x11f9d3(_0x2ffd5e['next'](_0xfd37d7));}catch(_0x2bbffe){_0x3e653a(_0x2bbffe);}}function _0x30704f(_0x336500){try{_0x11f9d3(_0x2ffd5e['throw'](_0x336500));}catch(_0x17f242){_0x3e653a(_0x17f242);}}function _0x11f9d3(_0x4b4e7d){_0x4b4e7d['done']?_0x4143ba(_0x4b4e7d['value']):_0x1ad0e4(_0x4b4e7d['value'])['then'](_0x58b1f6,_0x30704f);}_0x11f9d3((_0x2ffd5e=_0x2ffd5e['apply'](_0x4d0bd1,_0x474042||[]))['next']());});};class ApiKeyService{constructor(_0xbdd3f5){this['fetch']=_0xbdd3f5,this['path']='api-key';}['create'](_0x471a2d,_0x2dbc9c,_0x1021c6){return __awaiter$a(this,void 0,void 0,function*(){const _0x249897={'account_name':_0x471a2d,'api_key_name':_0x2dbc9c};try{const _0x25a591=yield this['fetch']['post'](this['path'],_0x1021c6,_0x249897);if(_0x25a591['status']>0xc7&&_0x25a591['status']<0x12c){const _0x3d1a61=yield _0x25a591['json']();return new SuccessfulApiKeyResponse(_0x3d1a61);}const _0x2b80f7=yield _0x25a591['json']();return new FailedApiKeyResponse(_0x2b80f7);}catch(_0x45a3e1){if(_0x45a3e1 instanceof Error)return new FailedApiKeyResponse({'detail':_0x45a3e1['message'],'title':_0x45a3e1['name'],'status':0x1f4,'instance':'','type':''});throw _0x45a3e1;}});}['view'](_0x4f8000,_0x5738e7,_0x13e077){return __awaiter$a(this,void 0,void 0,function*(){const _0x20defd=this['path']+'/'+_0x4f8000+'/'+_0x5738e7;try{const _0x329e9c=yield this['fetch']['get'](_0x20defd,_0x13e077);if(_0x329e9c['status']>0xc7&&_0x329e9c['status']<0x12c){const _0x5cb3df=yield _0x329e9c['json']();return new SuccessfulApiKeyValueResponse(_0x5cb3df);}const _0x468af4=yield _0x329e9c['json']();return new FailedApiKeyValueResponse(_0x468af4);}catch(_0x296eb8){if(_0x296eb8 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x296eb8['message'],'title':_0x296eb8['name'],'status':0x1f4,'instance':'','type':''});throw _0x296eb8;}});}['delete'](_0x4230d3,_0x1fa47b,_0x3ba784){return __awaiter$a(this,void 0,void 0,function*(){const _0x1bd88c=this['path']+'/'+_0x4230d3+'/'+_0x1fa47b;try{const _0x288951=yield this['fetch']['delete'](_0x1bd88c,_0x3ba784);if(_0x288951['status']>0xc7&&_0x288951['status']<0x12c)return new SuccessfulResponse({});const _0x1a3bd2=yield _0x288951['json']();return new FailedResponse(_0x1a3bd2);}catch(_0x4ca9d5){if(_0x4ca9d5 instanceof Error)return new FailedResponse({'detail':_0x4ca9d5['message'],'title':_0x4ca9d5['name'],'status':0x1f4,'instance':'','type':''});throw _0x4ca9d5;}});}}
|
|
6
6
|
|
|
7
|
-
var __awaiter$9=undefined&&undefined['__awaiter']||function(
|
|
7
|
+
var __awaiter$9=undefined&&undefined['__awaiter']||function(_0xa83597,_0x1ce6a4,_0x1d1872,_0x3ba542){function _0x4a84c6(_0x2c36ec){return _0x2c36ec instanceof _0x1d1872?_0x2c36ec:new _0x1d1872(function(_0x56a990){_0x56a990(_0x2c36ec);});}return new(_0x1d1872||(_0x1d1872=Promise))(function(_0x856b57,_0x16ac7d){function _0x30f163(_0x2a774d){try{_0x2e69a5(_0x3ba542['next'](_0x2a774d));}catch(_0x2c66d2){_0x16ac7d(_0x2c66d2);}}function _0x49f5c1(_0x5123ee){try{_0x2e69a5(_0x3ba542['throw'](_0x5123ee));}catch(_0x1b01b8){_0x16ac7d(_0x1b01b8);}}function _0x2e69a5(_0x2bc36b){_0x2bc36b['done']?_0x856b57(_0x2bc36b['value']):_0x4a84c6(_0x2bc36b['value'])['then'](_0x30f163,_0x49f5c1);}_0x2e69a5((_0x3ba542=_0x3ba542['apply'](_0xa83597,_0x1ce6a4||[]))['next']());});};class ListService{constructor(_0x8fa931){this['fetch']=_0x8fa931,this['path']='list';}['create'](_0x19c752,_0x46539c,_0x3a3d2f,_0x3df854){return __awaiter$9(this,void 0,void 0,function*(){const _0x490eb7={'account_name':_0x19c752,'list_name':_0x46539c,'search_service_name':_0x3a3d2f};try{const _0x96aaaf=yield this['fetch']['post'](this['path'],_0x3df854,_0x490eb7);if(_0x96aaaf['status']>0xc7&&_0x96aaaf['status']<0x12c){const _0x3f6da6=yield _0x96aaaf['json']();return new SuccessfulListIdentityResponse(_0x3f6da6);}const _0x2b4ba8=yield _0x96aaaf['json']();return new FailedListIdentityResponse(_0x2b4ba8);}catch(_0x51d99e){if(_0x51d99e instanceof Error)return new FailedListIdentityResponse({'detail':_0x51d99e['message'],'title':_0x51d99e['name'],'status':0x1f4,'instance':'','type':''});throw _0x51d99e;}});}['delete'](_0x1b865b,_0x2f5c37,_0x4cbeed){return __awaiter$9(this,void 0,void 0,function*(){const _0x379435=this['path']+'/'+_0x1b865b+'/'+_0x2f5c37,_0x5f3b07=yield this['fetch']['delete'](_0x379435,_0x4cbeed);try{if(_0x5f3b07['status']>0xc7&&_0x5f3b07['status']<0x12c)return new SuccessfulResponse({});const _0x50214f=yield _0x5f3b07['json']();return new FailedResponse(_0x50214f);}catch(_0x4ef475){if(_0x4ef475 instanceof Error)return new FailedResponse({'detail':_0x4ef475['message'],'title':_0x4ef475['name'],'status':0x1f4,'instance':'','type':''});throw _0x4ef475;}});}['get'](_0x23c900,_0x5613a8,_0x353ae5){return __awaiter$9(this,void 0,void 0,function*(){const _0x3cb877=this['path']+'/'+_0x23c900+'/'+_0x5613a8;try{const _0x30989a=yield this['fetch']['get'](_0x3cb877,_0x353ae5);if(_0x30989a['status']>0xc7&&_0x30989a['status']<0x12c){const _0x3ebdf2=yield _0x30989a['json']();return new SuccessfulListResponse(_0x3ebdf2);}const _0xc5a948=yield _0x30989a['json']();return new FailedListResponse(_0xc5a948);}catch(_0x48f48f){if(_0x48f48f instanceof Error)return new FailedListResponse({'detail':_0x48f48f['message'],'title':_0x48f48f['name'],'status':0x1f4,'instance':'','type':''});throw _0x48f48f;}});}['edit'](_0x3f1551,_0x71f49d,_0x3c794a,_0x5745ea){return __awaiter$9(this,void 0,void 0,function*(){const _0x4a1fff=this['path']+'/'+_0x3f1551+'/'+_0x71f49d,_0x5a7e0d=yield this['fetch']['put'](_0x4a1fff,_0x3c794a,_0x5745ea);try{if(_0x5a7e0d['status']>0xc7&&_0x5a7e0d['status']<0x12c){const _0x94e46a=yield _0x5a7e0d['json']();return new SuccessfulListResponse(_0x94e46a);}const _0x5c3ee1=yield _0x5a7e0d['json']();return new FailedListResponse(_0x5c3ee1);}catch(_0x3b2f4c){if(_0x3b2f4c instanceof Error)return new FailedListResponse({'detail':_0x3b2f4c['message'],'title':_0x3b2f4c['name'],'status':0x1f4,'instance':'','type':''});throw _0x3b2f4c;}});}}
|
|
8
8
|
|
|
9
|
-
var __awaiter$8=undefined&&undefined['__awaiter']||function(
|
|
9
|
+
var __awaiter$8=undefined&&undefined['__awaiter']||function(_0x590551,_0x5bfb0c,_0xe28c61,_0x575d0b){function _0x19f137(_0x7a1148){return _0x7a1148 instanceof _0xe28c61?_0x7a1148:new _0xe28c61(function(_0x2fd444){_0x2fd444(_0x7a1148);});}return new(_0xe28c61||(_0xe28c61=Promise))(function(_0x24db9f,_0x337316){function _0x240ec9(_0x4d3dae){try{_0x2c1460(_0x575d0b['next'](_0x4d3dae));}catch(_0x243b11){_0x337316(_0x243b11);}}function _0x3c01ad(_0x3a9ef1){try{_0x2c1460(_0x575d0b['throw'](_0x3a9ef1));}catch(_0x39f522){_0x337316(_0x39f522);}}function _0x2c1460(_0xeb6626){_0xeb6626['done']?_0x24db9f(_0xeb6626['value']):_0x19f137(_0xeb6626['value'])['then'](_0x240ec9,_0x3c01ad);}_0x2c1460((_0x575d0b=_0x575d0b['apply'](_0x590551,_0x5bfb0c||[]))['next']());});};class Fetch{constructor(_0x116321){this['baseUri']=_0x116321,this['getUrl']=_0x4cd839=>{return _0x4cd839['startsWith']('/')&&(_0x4cd839=_0x4cd839['replace']('/','')),''+this['baseUri']+_0x4cd839;},!_0x116321['endsWith']('/')&&(_0x116321=_0x116321+'/');}['get'](_0x19fc60,_0x38fb2b){return __awaiter$8(this,void 0,void 0,function*(){const _0x3fb0d4=this['getUrl'](_0x19fc60);return yield fetch(_0x3fb0d4,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x38fb2b}});});}['post'](_0x11e2fb,_0x529b5b,_0x5e44bb){return __awaiter$8(this,void 0,void 0,function*(){const _0x5030e6=this['getUrl'](_0x11e2fb);return yield fetch(_0x5030e6,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x529b5b},'body':_0x5e44bb?JSON['stringify'](_0x5e44bb):null});});}['upload'](_0x2640f7,_0x4f9979,_0x3b6c5d){return __awaiter$8(this,void 0,void 0,function*(){const _0x3a7f6e=this['getUrl'](_0x2640f7);return yield fetch(_0x3a7f6e,{'method':'POST','headers':{'Authorization':'Bearer\x20'+_0x4f9979},'body':_0x3b6c5d});});}['PostNoAuth'](_0x2af6be,_0xea3b9a){return __awaiter$8(this,void 0,void 0,function*(){const _0x2b4bb1=this['getUrl'](_0x2af6be);return yield fetch(_0x2b4bb1,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0xea3b9a?JSON['stringify'](_0xea3b9a):null});});}['put'](_0x2ff728,_0x178efd,_0x40df14){return __awaiter$8(this,void 0,void 0,function*(){const _0x4760ad=this['getUrl'](_0x2ff728);return yield fetch(_0x4760ad,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x178efd},'body':_0x40df14?JSON['stringify'](_0x40df14):null});});}['delete'](_0x726b60,_0x4c6535){return __awaiter$8(this,void 0,void 0,function*(){const _0xef4a2c=this['getUrl'](_0x726b60);return yield fetch(_0xef4a2c,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4c6535}});});}}
|
|
10
10
|
|
|
11
|
-
var __awaiter$7=undefined&&undefined['__awaiter']||function(
|
|
11
|
+
var __awaiter$7=undefined&&undefined['__awaiter']||function(_0x514e29,_0x65cdc9,_0xb3aaef,_0x1d2ee2){function _0x53acb7(_0x3b0e12){return _0x3b0e12 instanceof _0xb3aaef?_0x3b0e12:new _0xb3aaef(function(_0x223895){_0x223895(_0x3b0e12);});}return new(_0xb3aaef||(_0xb3aaef=Promise))(function(_0x46311e,_0x225763){function _0x3eeb8e(_0x31b446){try{_0x388e2f(_0x1d2ee2['next'](_0x31b446));}catch(_0xe4f733){_0x225763(_0xe4f733);}}function _0x4ad983(_0x169c8e){try{_0x388e2f(_0x1d2ee2['throw'](_0x169c8e));}catch(_0x1d6a06){_0x225763(_0x1d6a06);}}function _0x388e2f(_0x3807cd){_0x3807cd['done']?_0x46311e(_0x3807cd['value']):_0x53acb7(_0x3807cd['value'])['then'](_0x3eeb8e,_0x4ad983);}_0x388e2f((_0x1d2ee2=_0x1d2ee2['apply'](_0x514e29,_0x65cdc9||[]))['next']());});};class SearchServersService{constructor(_0x3cad20){this['fetch']=_0x3cad20,this['path']='search-services';}['create'](_0x78a34,_0x3f98c7,_0x1a9405,_0x563988,_0x421281,_0x2265a2,_0xfbf99b,_0x4e8e26){return __awaiter$7(this,void 0,void 0,function*(){const _0xc97550={'account_name':_0x78a34,'search_service_name':_0x3f98c7,'endpoint':_0x1a9405,'key':_0x563988,'country':_0x421281,'provider':_0x2265a2,'index_name':_0xfbf99b};try{const _0xb48a54=yield this['fetch']['post'](this['path'],_0x4e8e26,_0xc97550);if(_0xb48a54['status']>0xc7&&_0xb48a54['status']<0x12c){const _0x587e51=yield _0xb48a54['json']();return new SuccessfulSearchServiceResponse(_0x587e51);}const _0x2e34e7=yield _0xb48a54['json']();return new FailedSearchServiceResponse(_0x2e34e7);}catch(_0x5eec1a){if(_0x5eec1a instanceof Error)return new FailedSearchServiceResponse({'detail':_0x5eec1a['message'],'title':_0x5eec1a['name'],'status':0x1f4,'instance':'','type':''});throw _0x5eec1a;}});}['delete'](_0x1ce3fd,_0x38eb19,_0x2aa274){return __awaiter$7(this,void 0,void 0,function*(){const _0x287ea7=this['path']+'/'+_0x1ce3fd+'/'+_0x38eb19;try{const _0x1cbb66=yield this['fetch']['delete'](_0x287ea7,_0x2aa274);if(_0x1cbb66['status']>0xc7&&_0x1cbb66['status']<0x12c)return new SuccessfulResponse({});const _0x455e23=yield _0x1cbb66['json']();return new FailedResponse(_0x455e23);}catch(_0x59e845){if(_0x59e845 instanceof Error)return new FailedResponse({'detail':_0x59e845['message'],'title':_0x59e845['name'],'status':0x1f4,'instance':'','type':''});throw _0x59e845;}});}['view'](_0xdf2235,_0x3bee81,_0x2f18f7){return __awaiter$7(this,void 0,void 0,function*(){const _0x371446=this['path']+'/'+_0xdf2235+'/'+_0x3bee81;try{const _0x59e329=yield this['fetch']['get'](_0x371446,_0x2f18f7);if(_0x59e329['status']>0xc7&&_0x59e329['status']<0x12c){const _0x711fb0=yield _0x59e329['json']();return new SuccessfulViewSearchServiceResponse(_0x711fb0);}const _0x3bfb5b=yield _0x59e329['json']();return new FailedViewSearchServiceResponse(_0x3bfb5b);}catch(_0x8fec33){if(_0x8fec33 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x8fec33['message'],'title':_0x8fec33['name'],'status':0x1f4,'instance':'','type':''});throw _0x8fec33;}});}['edit'](_0x163601,_0x146be6,_0x91434d,_0x2c1987,_0xfd55dc){return __awaiter$7(this,void 0,void 0,function*(){const _0x25906a={'account_name':_0x163601,'search_service_name':_0x146be6,'key':_0x91434d,'country':_0x2c1987};try{const _0x5219bb=yield this['fetch']['put'](this['path'],_0xfd55dc,_0x25906a);if(_0x5219bb['status']>0xc7&&_0x5219bb['status']<0x12c){const _0x5bd7f3=yield _0x5219bb['json']();return new SuccessfulSearchServiceResponse(_0x5bd7f3);}const _0x395b6b=yield _0x5219bb['json']();return new FailedSearchServiceResponse(_0x395b6b);}catch(_0x55b68c){if(_0x55b68c instanceof Error)return new FailedSearchServiceResponse({'detail':_0x55b68c['message'],'title':_0x55b68c['name'],'status':0x1f4,'instance':'','type':''});throw _0x55b68c;}});}['list'](_0x5ef8c4,_0x5596a7){return __awaiter$7(this,void 0,void 0,function*(){const _0x4ac0e4=this['path']+'/'+_0x5ef8c4;try{const _0x461bd1=yield this['fetch']['get'](_0x4ac0e4,_0x5596a7);if(_0x461bd1['status']>0xc7&&_0x461bd1['status']<0x12c){const _0x2b5940=yield _0x461bd1['json']();return new SuccessfulListSearchServiceResponse(_0x2b5940);}const _0x42731b=yield _0x461bd1['json']();return new FailedViewSearchServicesResponse(_0x42731b);}catch(_0x39f497){if(_0x39f497 instanceof Error)return new FailedViewSearchServicesResponse({'detail':_0x39f497['message'],'title':_0x39f497['name'],'status':0x1f4,'instance':'','type':''});throw _0x39f497;}});}}
|
|
12
12
|
|
|
13
|
-
var __awaiter$6=undefined&&undefined['__awaiter']||function(
|
|
13
|
+
var __awaiter$6=undefined&&undefined['__awaiter']||function(_0x55be6b,_0x23b40b,_0x5670b6,_0x373fa1){function _0x5a9938(_0x3744d9){return _0x3744d9 instanceof _0x5670b6?_0x3744d9:new _0x5670b6(function(_0x551afd){_0x551afd(_0x3744d9);});}return new(_0x5670b6||(_0x5670b6=Promise))(function(_0x4a7a68,_0x2e4827){function _0x5bb422(_0x114410){try{_0x54f45(_0x373fa1['next'](_0x114410));}catch(_0x419909){_0x2e4827(_0x419909);}}function _0x480f81(_0x576c87){try{_0x54f45(_0x373fa1['throw'](_0x576c87));}catch(_0x13357a){_0x2e4827(_0x13357a);}}function _0x54f45(_0x4cd64f){_0x4cd64f['done']?_0x4a7a68(_0x4cd64f['value']):_0x5a9938(_0x4cd64f['value'])['then'](_0x5bb422,_0x480f81);}_0x54f45((_0x373fa1=_0x373fa1['apply'](_0x55be6b,_0x23b40b||[]))['next']());});};class FacetService{constructor(_0x4ce8d2){this['fetch']=_0x4ce8d2,this['path']='facet';}['create'](_0x3988c6,_0x1a30b6,_0x181914,_0x50f94f){return __awaiter$6(this,void 0,void 0,function*(){const _0x1635b3={'account_name':_0x3988c6,'list_name':_0x1a30b6,'facet_name':_0x181914};try{const _0x245461=yield this['fetch']['post'](this['path'],_0x50f94f,_0x1635b3);if(_0x245461['status']>0xc7&&_0x245461['status']<0x12c){const _0x439bc9=yield _0x245461['json']();return new SuccessfulFacetResponse(_0x439bc9);}const _0x5f5703=yield _0x245461['json']();return new FailedFacetResponse(_0x5f5703);}catch(_0x46a660){if(_0x46a660 instanceof Error)return new FailedFacetResponse({'detail':_0x46a660['message'],'title':_0x46a660['name'],'status':0x1f4,'instance':'','type':''});throw _0x46a660;}});}['remove'](_0x1031bf,_0x202f24,_0x2f2601,_0x57a1b5){return __awaiter$6(this,void 0,void 0,function*(){const _0x23a4fa='Facet/'+_0x1031bf+'/'+_0x202f24+'/'+_0x2f2601,_0x1097b7=yield this['fetch']['delete'](_0x23a4fa,_0x57a1b5);try{if(_0x1097b7['status']>0xc7&&_0x1097b7['status']<0x12c)return new SuccessfulResponse({});const _0x38df16=yield _0x1097b7['json']();return new FailedResponse(_0x38df16);}catch(_0x19c2f1){if(_0x19c2f1 instanceof Error)return new FailedResponse({'detail':_0x19c2f1['message'],'title':_0x19c2f1['name'],'status':0x1f4,'instance':'','type':''});throw _0x19c2f1;}});}['rename'](_0x5e28c1,_0x5912b1,_0x336fd7,_0x15cbf0,_0x518a29){return __awaiter$6(this,void 0,void 0,function*(){let _0x27b5a2=this['path']+'/'+_0x5e28c1+'/'+_0x5912b1;const _0x192be6={'facet_name':_0x336fd7,'new_facet_name':_0x15cbf0};try{const _0x4a48ac=yield this['fetch']['put'](_0x27b5a2,_0x518a29,_0x192be6);if(_0x4a48ac['status']>0xc7&&_0x4a48ac['status']<0x12c){const _0x5a0247=yield _0x4a48ac['json']();return new SuccessfulFacetResponse(_0x5a0247);}const _0x46b583=yield _0x4a48ac['json']();return new FailedFacetResponse(_0x46b583);}catch(_0xae5d2e){if(_0xae5d2e instanceof Error)return new FailedFacetResponse({'detail':_0xae5d2e['message'],'title':_0xae5d2e['name'],'status':0x1f4,'instance':'','type':''});throw _0xae5d2e;}});}['list'](_0x1b0912,_0x2cce4d,_0x53879f,_0x4a3312,_0x2b8e69){return __awaiter$6(this,void 0,void 0,function*(){let _0x26b964=this['path']+'/'+_0x1b0912+'/'+_0x2cce4d+'/'+_0x53879f+'/'+_0x4a3312;try{const _0x24a2a2=yield this['fetch']['get'](_0x26b964,_0x2b8e69);if(_0x24a2a2['status']>0xc7&&_0x24a2a2['status']<0x12c){const _0x2cc0ee=yield _0x24a2a2['json']();return new SuccessfulFacetValueResponse(_0x2cc0ee);}const _0x29015f=yield _0x24a2a2['json']();return new FailedFacetValuesResponse(_0x29015f);}catch(_0x201a4e){if(_0x201a4e instanceof Error)return new FailedFacetValuesResponse({'detail':_0x201a4e['message'],'title':_0x201a4e['name'],'status':0x1f4,'instance':'','type':''});throw _0x201a4e;}});}}
|
|
14
14
|
|
|
15
|
-
var __awaiter$5=undefined&&undefined['__awaiter']||function(
|
|
15
|
+
var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x4b983d,_0x21ae9a,_0x20c636,_0x43e757){function _0x1d27ce(_0x316b43){return _0x316b43 instanceof _0x20c636?_0x316b43:new _0x20c636(function(_0x572b03){_0x572b03(_0x316b43);});}return new(_0x20c636||(_0x20c636=Promise))(function(_0x22bed2,_0x33e23c){function _0x2543c8(_0x4278b0){try{_0x41b458(_0x43e757['next'](_0x4278b0));}catch(_0x4b141b){_0x33e23c(_0x4b141b);}}function _0x9d8a88(_0x3f0ed2){try{_0x41b458(_0x43e757['throw'](_0x3f0ed2));}catch(_0x5d011e){_0x33e23c(_0x5d011e);}}function _0x41b458(_0x9b3046){_0x9b3046['done']?_0x22bed2(_0x9b3046['value']):_0x1d27ce(_0x9b3046['value'])['then'](_0x2543c8,_0x9d8a88);}_0x41b458((_0x43e757=_0x43e757['apply'](_0x4b983d,_0x21ae9a||[]))['next']());});};class SearchResultService{constructor(_0x3271d8){this['fetch']=_0x3271d8,this['path']='search-result';}['create'](_0x48f880,_0x690598,_0x51742d,_0x1cf85a,_0x1fbd54){return __awaiter$5(this,void 0,void 0,function*(){_0x1fbd54=_0x1fbd54!==null&&_0x1fbd54!==void 0?_0x1fbd54:{'latitude':0x0,'longitude':0x0,'facets':[],'searchable_fields':[],'resources':[],'active':!![]};const _0x15e6ce=Object['assign']({'account_name':_0x48f880,'search_result_name':_0x51742d,'list_name':_0x690598},_0x1fbd54);try{const _0x3c9895=yield this['fetch']['post'](this['path'],_0x1cf85a,_0x15e6ce);if(_0x3c9895['status']>0xc7&&_0x3c9895['status']<0x12c){const _0x5d62d1=yield _0x3c9895['json']();return new SuccessfulSearchResultResponse(_0x5d62d1);}const _0x2fb350=yield _0x3c9895['json']();return new FailedSearchResultResponse(_0x2fb350);}catch(_0x141dbf){if(_0x141dbf instanceof Error)return new FailedSearchResultResponse({'detail':_0x141dbf['message'],'title':_0x141dbf['name'],'status':0x1f4,'instance':'','type':''});throw _0x141dbf;}});}['transfer'](_0x43591e,_0x20fb5a,_0xb20efa,_0x2cc98d){return __awaiter$5(this,void 0,void 0,function*(){const _0x1f513c={'account_name':_0x43591e,'list_name':_0x20fb5a,'new_search_service_name':_0xb20efa};try{const _0x3287c0=yield this['fetch']['post'](this['path']+'/transfer',_0x2cc98d,_0x1f513c);if(_0x3287c0['status']>0xc7&&_0x3287c0['status']<0x12c){const _0x4c2b78=yield _0x3287c0['json']();return new SuccessfulListResponse(_0x4c2b78);}const _0x5e7666=yield _0x3287c0['json']();return new FailedListResponse(_0x5e7666);}catch(_0x16dbae){if(_0x16dbae instanceof Error)return new FailedListResponse({'detail':_0x16dbae['message'],'title':_0x16dbae['name'],'status':0x1f4,'instance':'','type':''});throw _0x16dbae;}});}['list'](_0x45b265,_0x64aa18,_0x5a710f,_0x37abd5){return __awaiter$5(this,void 0,void 0,function*(){let _0x229961=this['path']+'/'+_0x45b265+'/'+_0x64aa18+'?'+this['getQueryStr'](_0x37abd5);try{const _0x4d3e6f=yield this['fetch']['get'](_0x229961,_0x5a710f);if(_0x4d3e6f['status']>0xc7&&_0x4d3e6f['status']<0x12c){const _0x26aa38=yield _0x4d3e6f['json']();return new SuccessfulListSearchResultResponse(_0x26aa38);}const _0x314460=yield _0x4d3e6f['json']();return new FailedViewSearchResultResponse(_0x314460);}catch(_0x4af710){if(_0x4af710 instanceof Error)return new FailedViewSearchResultResponse({'detail':_0x4af710['message'],'title':_0x4af710['name'],'status':0x1f4,'instance':'','type':''});throw _0x4af710;}});}['get'](_0x538b66,_0x3bad16,_0x4df0e6,_0x1f1733){return __awaiter$5(this,void 0,void 0,function*(){let _0x153453=this['path']+'/'+_0x538b66+'/'+_0x3bad16+'?'+_0x4df0e6;try{const _0x281dce=yield this['fetch']['get'](_0x153453,_0x1f1733);if(_0x281dce['status']>0xc7&&_0x281dce['status']<0x12c){const _0x109305=yield _0x281dce['json']();return new SuccessfulSearchResultResponse(_0x109305);}const _0x160bb2=yield _0x281dce['json']();return new FailedSearchResultResponse(_0x160bb2);}catch(_0x117836){if(_0x117836 instanceof Error)return new FailedSearchResultResponse({'detail':_0x117836['message'],'title':_0x117836['name'],'status':0x1f4,'instance':'','type':''});throw _0x117836;}});}['delete'](_0x149d2a,_0x18f753,_0xc9df48,_0x45f774){return __awaiter$5(this,void 0,void 0,function*(){const _0x49b438=this['path']+'/'+_0x149d2a+'/'+_0x18f753+'/'+_0xc9df48,_0x1ebf0e=yield this['fetch']['delete'](_0x49b438,_0x45f774);try{if(_0x1ebf0e['status']>0xc7&&_0x1ebf0e['status']<0x12c)return new SuccessfulResponse({});const _0x662a0d=yield _0x1ebf0e['json']();return new FailedResponse(_0x662a0d);}catch(_0x11eb43){if(_0x11eb43 instanceof Error)return new FailedResponse({'detail':_0x11eb43['message'],'title':_0x11eb43['name'],'status':0x1f4,'instance':'','type':''});throw _0x11eb43;}});}['upload'](_0x32e364,_0x578b6c,_0x3ed0d2,_0x1f5356){return __awaiter$5(this,void 0,void 0,function*(){const _0x32c899=this['path']+'/'+_0x32e364+'/'+_0x578b6c+'/upload',_0x3ab913=new FormData();_0x3ab913['append']('file',_0x3ed0d2);try{const _0x4bed88=yield this['fetch']['upload'](_0x32c899,_0x1f5356,_0x3ab913);if(_0x4bed88['status']>0xc7&&_0x4bed88['status']<0x12c){const _0x4944a0=yield _0x4bed88['json']();return new SuccessfulSearchResultResponse(_0x4944a0);}const _0x164851=yield _0x4bed88['json']();return new FailedSearchResultResponse(_0x164851);}catch(_0x44ff52){if(_0x44ff52 instanceof Error)return new FailedSearchResultResponse({'detail':_0x44ff52['message'],'title':_0x44ff52['name'],'status':0x1f4,'instance':'','type':''});throw _0x44ff52;}});}['edit'](_0x434774,_0x2ff09d,_0x55902d,_0x12b185,_0x1acaef){return __awaiter$5(this,void 0,void 0,function*(){_0x1acaef=_0x1acaef!==null&&_0x1acaef!==void 0?_0x1acaef:{'active':!![],'latitude':0x0,'longitude':0x0,'facets':[],'searchable_fields':[],'resources':[]};const _0x4d9e73=this['path']+'/'+_0x434774+'/'+_0x2ff09d+'/'+_0x55902d;try{const _0xf272e=yield this['fetch']['put'](_0x4d9e73,_0x12b185,_0x1acaef);if(_0xf272e['status']>0xc7&&_0xf272e['status']<0x12c){const _0x5623c4=yield _0xf272e['json']();return new SuccessfulSearchResultResponse(_0x5623c4);}const _0x1c3af3=yield _0xf272e['json']();return new FailedSearchResultResponse(_0x1c3af3);}catch(_0x459207){if(_0x459207 instanceof Error)return new FailedSearchResultResponse({'detail':_0x459207['message'],'title':_0x459207['name'],'status':0x1f4,'instance':'','type':''});throw _0x459207;}});}['getQueryStr'](_0x3536b7){let _0x5a2894='';const _0x90b67f=[];return (_0x3536b7===null||_0x3536b7===void 0?void 0:_0x3536b7['size'])&&_0x90b67f['push']('size='+_0x3536b7['size']),(_0x3536b7===null||_0x3536b7===void 0?void 0:_0x3536b7['skip'])&&_0x90b67f['push']('skip='+_0x3536b7['skip']),(_0x3536b7===null||_0x3536b7===void 0?void 0:_0x3536b7['query'])&&_0x90b67f['push']('query='+_0x3536b7['query']),(_0x3536b7===null||_0x3536b7===void 0?void 0:_0x3536b7['filter'])&&_0x90b67f['push']('filter='+_0x3536b7['filter']),(_0x3536b7===null||_0x3536b7===void 0?void 0:_0x3536b7['radius'])&&_0x90b67f['push']('radius='+_0x3536b7['radius']),(_0x3536b7===null||_0x3536b7===void 0?void 0:_0x3536b7['active'])&&_0x90b67f['push']('active='+_0x3536b7['active']),_0x90b67f['length']>0x0&&_0x90b67f['forEach']((_0x4d8698,_0x1c8f71)=>{if(_0x1c8f71>0x0&&_0x5a2894)_0x5a2894+='&';_0x5a2894+=_0x4d8698;}),_0x5a2894;}}
|
|
16
16
|
|
|
17
|
-
var __awaiter$4=undefined&&undefined['__awaiter']||function(
|
|
17
|
+
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x58171e,_0x20d81f,_0x357365,_0x30e46d){function _0x4657b8(_0x3e1d7f){return _0x3e1d7f instanceof _0x357365?_0x3e1d7f:new _0x357365(function(_0x45665e){_0x45665e(_0x3e1d7f);});}return new(_0x357365||(_0x357365=Promise))(function(_0x6b375,_0x2801ea){function _0x21ea7b(_0x94bc88){try{_0x257504(_0x30e46d['next'](_0x94bc88));}catch(_0x3dfaff){_0x2801ea(_0x3dfaff);}}function _0x310183(_0x49fa1b){try{_0x257504(_0x30e46d['throw'](_0x49fa1b));}catch(_0x16cde7){_0x2801ea(_0x16cde7);}}function _0x257504(_0x43613f){_0x43613f['done']?_0x6b375(_0x43613f['value']):_0x4657b8(_0x43613f['value'])['then'](_0x21ea7b,_0x310183);}_0x257504((_0x30e46d=_0x30e46d['apply'](_0x58171e,_0x20d81f||[]))['next']());});};class ContributorService{constructor(_0x446040){this['fetch']=_0x446040,this['path']='contributor';}['create'](_0x113276,_0x6341d5,_0x53384e,_0x5e1347){return __awaiter$4(this,void 0,void 0,function*(){const _0x3e520b={'account_name':_0x113276,'list_name':_0x6341d5,'contributor_name':_0x53384e};try{const _0x2e7b59=yield this['fetch']['post'](this['path'],_0x5e1347,_0x3e520b);if(_0x2e7b59['status']>0xc7&&_0x2e7b59['status']<0x12c){const _0x322e04=yield _0x2e7b59['json']();return new SuccessfulContributorResponse(_0x322e04);}const _0x227442=yield _0x2e7b59['json']();return new FailedContributorResponse(_0x227442);}catch(_0x3bbeb9){if(_0x3bbeb9 instanceof Error)return new FailedContributorResponse({'detail':_0x3bbeb9['message'],'title':_0x3bbeb9['name'],'status':0x1f4,'instance':'','type':''});throw _0x3bbeb9;}});}['remove'](_0x5033c0,_0x578836,_0x4f0ffa,_0x4a31e2){return __awaiter$4(this,void 0,void 0,function*(){const _0x2cadbe=this['path']+'/'+_0x5033c0+'/'+_0x578836+'/'+_0x4f0ffa,_0x320694=yield this['fetch']['delete'](_0x2cadbe,_0x4a31e2);try{if(_0x320694['status']>0xc7&&_0x320694['status']<0x12c)return new SuccessfulResponse({});const _0x515e3a=yield _0x320694['json']();return new FailedResponse(_0x515e3a);}catch(_0x24e582){if(_0x24e582 instanceof Error)return new FailedResponse({'detail':_0x24e582['message'],'title':_0x24e582['name'],'status':0x1f4,'instance':'','type':''});throw _0x24e582;}});}['startsWith'](_0x49b90f,_0x338ae5){return __awaiter$4(this,void 0,void 0,function*(){const _0x16598b=this['path']+'/'+_0x49b90f;try{const _0x338a99=yield this['fetch']['get'](_0x16598b,_0x338ae5);if(_0x338a99['status']>0xc7&&_0x338a99['status']<0x12c){const _0x4ba42a=yield _0x338a99['json']();return new SuccessfulAccountAndImageResponse(_0x4ba42a);}const _0x2b6241=yield _0x338a99['json']();return new FailedAccountAndImageResponse(_0x2b6241);}catch(_0x589db9){if(_0x589db9 instanceof Error)return new FailedAccountAndImageResponse({'detail':_0x589db9['message'],'title':_0x589db9['name'],'status':0x1f4,'instance':'','type':''});throw _0x589db9;}});}}
|
|
18
18
|
|
|
19
|
-
var __awaiter$3=undefined&&undefined['__awaiter']||function(
|
|
19
|
+
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x39ff29,_0x551ee8,_0x4d2026,_0x429ff9){function _0x27617d(_0x155d35){return _0x155d35 instanceof _0x4d2026?_0x155d35:new _0x4d2026(function(_0x5d2d95){_0x5d2d95(_0x155d35);});}return new(_0x4d2026||(_0x4d2026=Promise))(function(_0x1f20b2,_0xc2b687){function _0x1cb41a(_0x4aa235){try{_0x1f9c48(_0x429ff9['next'](_0x4aa235));}catch(_0x598b62){_0xc2b687(_0x598b62);}}function _0x3b9e95(_0x392c79){try{_0x1f9c48(_0x429ff9['throw'](_0x392c79));}catch(_0x27bb03){_0xc2b687(_0x27bb03);}}function _0x1f9c48(_0x73fc4e){_0x73fc4e['done']?_0x1f20b2(_0x73fc4e['value']):_0x27617d(_0x73fc4e['value'])['then'](_0x1cb41a,_0x3b9e95);}_0x1f9c48((_0x429ff9=_0x429ff9['apply'](_0x39ff29,_0x551ee8||[]))['next']());});};class SearchableFieldService{constructor(_0x357e27){this['fetch']=_0x357e27,this['path']='searchable-field';}['create'](_0x53ab65,_0x44565c,_0x59cdf5,_0x2921dc){return __awaiter$3(this,void 0,void 0,function*(){const _0x2a7356={'account_name':_0x53ab65,'list_name':_0x44565c,'searchable_field_name':_0x59cdf5};try{const _0x1e45eb=yield this['fetch']['post'](this['path'],_0x2921dc,_0x2a7356);if(_0x1e45eb['status']>0xc7&&_0x1e45eb['status']<0x12c){const _0x4be7cd=yield _0x1e45eb['json']();return new SuccessfulSearchableFieldResponse(_0x4be7cd);}const _0x100b3a=yield _0x1e45eb['json']();return new FailedSearchableFieldResponse(_0x100b3a);}catch(_0x1606fe){if(_0x1606fe instanceof Error)return new FailedSearchableFieldResponse({'detail':_0x1606fe['message'],'title':_0x1606fe['name'],'status':0x1f4,'instance':'','type':''});throw _0x1606fe;}});}['remove'](_0xa88347,_0x360cfe,_0x14a77d,_0x6e4cf){return __awaiter$3(this,void 0,void 0,function*(){const _0x4967a8=this['path']+'/'+_0xa88347+'/'+_0x360cfe+'/'+_0x14a77d,_0x1c66c5=yield this['fetch']['delete'](_0x4967a8,_0x6e4cf);try{if(_0x1c66c5['status']>0xc7&&_0x1c66c5['status']<0x12c)return new SuccessfulResponse({});const _0x56982b=yield _0x1c66c5['json']();return new FailedResponse(_0x56982b);}catch(_0x465b79){if(_0x465b79 instanceof Error)return new FailedResponse({'detail':_0x465b79['message'],'title':_0x465b79['name'],'status':0x1f4,'instance':'','type':''});throw _0x465b79;}});}['rename'](_0x556d7a,_0xbb5c16,_0x35ffa3,_0x22ad0d,_0x1c19dd){return __awaiter$3(this,void 0,void 0,function*(){let _0x3dad04=this['path']+'/'+_0x556d7a+'/'+_0xbb5c16;const _0x15014c={'searchable_field_name':_0x35ffa3,'new_searchable_field_name':_0x22ad0d};try{const _0x4285db=yield this['fetch']['put'](_0x3dad04,_0x1c19dd,_0x15014c);if(_0x4285db['status']>0xc7&&_0x4285db['status']<0x12c){const _0x34b65b=yield _0x4285db['json']();return new SuccessfulSearchableFieldResponse(_0x34b65b);}const _0x23ba71=yield _0x4285db['json']();return new FailedSearchableFieldResponse(_0x23ba71);}catch(_0x1b9bf4){if(_0x1b9bf4 instanceof Error)return new FailedSearchableFieldResponse({'detail':_0x1b9bf4['message'],'title':_0x1b9bf4['name'],'status':0x1f4,'instance':'','type':''});throw _0x1b9bf4;}});}}
|
|
20
20
|
|
|
21
|
-
var __awaiter$2=undefined&&undefined['__awaiter']||function(
|
|
21
|
+
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x5919bc,_0x27ebed,_0x4b44b2,_0x44756d){function _0x298b0f(_0x51c952){return _0x51c952 instanceof _0x4b44b2?_0x51c952:new _0x4b44b2(function(_0x104701){_0x104701(_0x51c952);});}return new(_0x4b44b2||(_0x4b44b2=Promise))(function(_0x33b892,_0x279606){function _0x3b8f98(_0x1c95df){try{_0x2ec597(_0x44756d['next'](_0x1c95df));}catch(_0x4cb09c){_0x279606(_0x4cb09c);}}function _0x431ff8(_0x23595c){try{_0x2ec597(_0x44756d['throw'](_0x23595c));}catch(_0x3c1fb5){_0x279606(_0x3c1fb5);}}function _0x2ec597(_0x9ac128){_0x9ac128['done']?_0x33b892(_0x9ac128['value']):_0x298b0f(_0x9ac128['value'])['then'](_0x3b8f98,_0x431ff8);}_0x2ec597((_0x44756d=_0x44756d['apply'](_0x5919bc,_0x27ebed||[]))['next']());});};class ResourceService{constructor(_0x510faa){this['fetch']=_0x510faa,this['path']='resource';}['create'](_0x181c2d,_0x271998,_0x4bcaca,_0x206495){return __awaiter$2(this,void 0,void 0,function*(){const _0x17747e={'account_name':_0x181c2d,'list_name':_0x271998,'resource_name':_0x4bcaca};try{const _0x54c53f=yield this['fetch']['post'](this['path'],_0x206495,_0x17747e);if(_0x54c53f['status']>0xc7&&_0x54c53f['status']<0x12c){const _0x27fda5=yield _0x54c53f['json']();return new SuccessfulResourceResponse(_0x27fda5);}const _0x25b182=yield _0x54c53f['json']();return new FailedResourceResponse(_0x25b182);}catch(_0x4ab259){if(_0x4ab259 instanceof Error)return new FailedResourceResponse({'detail':_0x4ab259['message'],'title':_0x4ab259['name'],'status':0x1f4,'instance':'','type':''});throw _0x4ab259;}});}['remove'](_0x367409,_0x47e733,_0xa10b54,_0x5b4805){return __awaiter$2(this,void 0,void 0,function*(){const _0x24858d=this['path']+'/'+_0x367409+'/'+_0x47e733+'/'+_0xa10b54,_0x102b48=yield this['fetch']['delete'](_0x24858d,_0x5b4805);try{if(_0x102b48['status']>0xc7&&_0x102b48['status']<0x12c)return new SuccessfulResponse({});const _0x53058b=yield _0x102b48['json']();return new FailedResponse(_0x53058b);}catch(_0x2bf572){if(_0x2bf572 instanceof Error)return new FailedResponse({'detail':_0x2bf572['message'],'title':_0x2bf572['name'],'status':0x1f4,'instance':'','type':''});throw _0x2bf572;}});}['rename'](_0x99cd76,_0x845066,_0x4d5740,_0x2d2b79,_0x183354){return __awaiter$2(this,void 0,void 0,function*(){let _0x267d99=this['path']+'/'+_0x99cd76+'/'+_0x845066;const _0x5456d5={'resource_name':_0x4d5740,'new_resource_name':_0x2d2b79};try{const _0x4c09d8=yield this['fetch']['put'](_0x267d99,_0x183354,_0x5456d5);if(_0x4c09d8['status']>0xc7&&_0x4c09d8['status']<0x12c){const _0x2f41c0=yield _0x4c09d8['json']();return new SuccessfulResourceResponse(_0x2f41c0);}const _0x54d92c=yield _0x4c09d8['json']();return new FailedResourceResponse(_0x54d92c);}catch(_0x51c809){if(_0x51c809 instanceof Error)return new FailedResourceResponse({'detail':_0x51c809['message'],'title':_0x51c809['name'],'status':0x1f4,'instance':'','type':''});throw _0x51c809;}});}}
|
|
22
22
|
|
|
23
|
-
var __awaiter$1=undefined&&undefined['__awaiter']||function(
|
|
23
|
+
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x84cdc3,_0x1e8d84,_0x406653,_0x92c2a7){function _0x2bf78e(_0x11a736){return _0x11a736 instanceof _0x406653?_0x11a736:new _0x406653(function(_0x170957){_0x170957(_0x11a736);});}return new(_0x406653||(_0x406653=Promise))(function(_0x591fa5,_0x30e90d){function _0x44f381(_0x23ceb5){try{_0x10e8fc(_0x92c2a7['next'](_0x23ceb5));}catch(_0x338f96){_0x30e90d(_0x338f96);}}function _0x44f0c5(_0x212824){try{_0x10e8fc(_0x92c2a7['throw'](_0x212824));}catch(_0x354e8f){_0x30e90d(_0x354e8f);}}function _0x10e8fc(_0x4f171f){_0x4f171f['done']?_0x591fa5(_0x4f171f['value']):_0x2bf78e(_0x4f171f['value'])['then'](_0x44f381,_0x44f0c5);}_0x10e8fc((_0x92c2a7=_0x92c2a7['apply'](_0x84cdc3,_0x1e8d84||[]))['next']());});};class GroupService{constructor(_0x2b82a){this['fetch']=_0x2b82a,this['path']='group';}['create'](_0x27b65a,_0x437a9d,_0x496cd9,_0x81989e){return __awaiter$1(this,void 0,void 0,function*(){const _0x17a2e4={'account_name':_0x27b65a,'search_service_name':_0x437a9d,'group_name':_0x496cd9};try{const _0x4dfe2b=yield this['fetch']['post'](this['path'],_0x81989e,_0x17a2e4);if(_0x4dfe2b['status']>0xc7&&_0x4dfe2b['status']<0x12c){const _0x1be45b=yield _0x4dfe2b['json']();return new SuccessfulGroupResponse(_0x1be45b);}const _0x5a3e0a=yield _0x4dfe2b['json']();return new FailedGroupResponse(_0x5a3e0a);}catch(_0x451937){if(_0x451937 instanceof Error)return new FailedGroupResponse({'detail':_0x451937['message'],'title':_0x451937['name'],'status':0x1f4,'instance':'','type':''});throw _0x451937;}});}['addList'](_0x3396de,_0x232f32,_0x44c5fc,_0x22d5f1,_0x27c904){return __awaiter$1(this,void 0,void 0,function*(){const _0x534d38={'account_name':_0x3396de,'list_name':_0x44c5fc,'group_name':_0x232f32,'version':_0x22d5f1};try{const _0x38f3e1=yield this['fetch']['post'](this['path']+'/list',_0x27c904,_0x534d38);if(_0x38f3e1['status']>0xc7&&_0x38f3e1['status']<0x12c){const _0x1ef019=yield _0x38f3e1['json']();return new SuccessfulListIdentityResponse(_0x1ef019);}const _0x54125b=yield _0x38f3e1['json']();return new FailedListIdentityResponse(_0x54125b);}catch(_0x23f288){if(_0x23f288 instanceof Error)return new FailedListIdentityResponse({'detail':_0x23f288['message'],'title':_0x23f288['name'],'status':0x1f4,'instance':'','type':''});throw _0x23f288;}});}['delete'](_0x15da0c,_0x287993,_0x3afbe4){return __awaiter$1(this,void 0,void 0,function*(){const _0x59b504=this['path']+'/'+_0x15da0c+'/'+_0x287993,_0x13d71d=yield this['fetch']['delete'](_0x59b504,_0x3afbe4);try{if(_0x13d71d['status']>0xc7&&_0x13d71d['status']<0x12c)return new SuccessfulResponse({});const _0x27fb4c=yield _0x13d71d['json']();return new FailedResponse(_0x27fb4c);}catch(_0x21de73){if(_0x21de73 instanceof Error)return new FailedResponse({'detail':_0x21de73['message'],'title':_0x21de73['name'],'status':0x1f4,'instance':'','type':''});throw _0x21de73;}});}}
|
|
24
24
|
|
|
25
|
-
var __awaiter=undefined&&undefined['__awaiter']||function(
|
|
25
|
+
var __awaiter=undefined&&undefined['__awaiter']||function(_0x39db49,_0x5a3e10,_0x2a738d,_0x441a07){function _0x5e251b(_0x540551){return _0x540551 instanceof _0x2a738d?_0x540551:new _0x2a738d(function(_0x2ed47c){_0x2ed47c(_0x540551);});}return new(_0x2a738d||(_0x2a738d=Promise))(function(_0x45030e,_0xc03c50){function _0x2c6291(_0x8c253a){try{_0x5aa35a(_0x441a07['next'](_0x8c253a));}catch(_0x4f309a){_0xc03c50(_0x4f309a);}}function _0x476b42(_0x13347b){try{_0x5aa35a(_0x441a07['throw'](_0x13347b));}catch(_0x1bdaf0){_0xc03c50(_0x1bdaf0);}}function _0x5aa35a(_0x3aa3a6){_0x3aa3a6['done']?_0x45030e(_0x3aa3a6['value']):_0x5e251b(_0x3aa3a6['value'])['then'](_0x2c6291,_0x476b42);}_0x5aa35a((_0x441a07=_0x441a07['apply'](_0x39db49,_0x5a3e10||[]))['next']());});};class AdminClient{constructor(_0x36c4af='https://admin.searchability.dev/'){var _0x44da84=new Fetch(_0x36c4af);this['Accounts']=new AccountService(_0x44da84),this['Lists']=new ListService(_0x44da84),this['ApiKeys']=new ApiKeyService(_0x44da84),this['SearchServers']=new SearchServersService(_0x44da84),this['Facets']=new FacetService(_0x44da84),this['SearchResults']=new SearchResultService(_0x44da84),this['Contributors']=new ContributorService(_0x44da84),this['SearchableFields']=new SearchableFieldService(_0x44da84),this['Groups']=new GroupService(_0x44da84),this['Resources']=new ResourceService(_0x44da84);}}class AuthClient{constructor(_0x1ea139='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x1ea139);}['login'](_0x4ebbe2){return __awaiter(this,void 0,void 0,function*(){const _0x3b4b3a='login/'+_0x4ebbe2;try{const _0x30bf22=yield yield fetch(_0x3b4b3a);if(_0x30bf22['status']>0xc7&&_0x30bf22['status']<0x12c){const _0x2ed4af=yield _0x30bf22['json']();return new SuccessfulAuthResponse(_0x2ed4af);}const _0x18a2c4=yield _0x30bf22['json']();return new FailedAuthResponse(_0x18a2c4);}catch(_0x409713){if(_0x409713 instanceof Error)return new FailedAuthResponse({'detail':_0x409713['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x409713;}});}['refresh'](_0x430142){return __awaiter(this,void 0,void 0,function*(){const _0xb912f2='refresh',_0x3311e3={'refresh_token':_0x430142};try{const _0x206f07=yield this['fetch']['PostNoAuth'](_0xb912f2,_0x3311e3);if(_0x206f07['status']>0xc7&&_0x206f07['status']<0x12c){const _0x4b93c5=yield _0x206f07['json']();return new SuccessfulAuthResponse(_0x4b93c5);}const _0x248ef9=yield _0x206f07['json']();return new FailedAuthResponse(_0x248ef9);}catch(_0x16f13d){if(_0x16f13d instanceof Error)return new FailedAuthResponse({'detail':_0x16f13d['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x16f13d;}});}['getTokenStatus'](_0x18d60e){if(Date['now']()<_0x18d60e['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x18d60e['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 };
|