@searchability/admin-client 0.0.152 → 0.0.154
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(_0x2f23e3){_0x2f23e3[_0x2f23e3['Ok']=0x0]='Ok',_0x2f23e3[_0x2f23e3['Refresh']=0x1]='Refresh',_0x2f23e3[_0x2f23e3['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(_0xccd141){this['isSuccess']=_0xccd141;}}class SuccessfulFacetValueResponse extends Response{constructor(_0x32f92a){super(!![]),this['facets']=_0x32f92a;}['toSuccess'](){return this['facets'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetValuesResponse extends Response{constructor(_0x1e8177){super(![]),this['problem']=_0x1e8177;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulContributorResponse extends Response{constructor(_0x1032bb){super(!![]),this['contributor']=_0x1032bb;}['toSuccess'](){return this['contributor'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedContributorResponse extends Response{constructor(_0x5e833d){super(![]),this['problem']=_0x5e833d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountAndImageResponse extends Response{constructor(_0x1b6e3a){super(!![]),this['accountAndImages']=_0x1b6e3a;}['toSuccess'](){return this['accountAndImages'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountAndImageResponse extends Response{constructor(_0x3c3eda){super(![]),this['problem']=_0x3c3eda;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulResourceResponse extends Response{constructor(_0xd21f12){super(!![]),this['resource']=_0xd21f12;}['toSuccess'](){return this['resource'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResourceResponse extends Response{constructor(_0x456b15){super(![]),this['problem']=_0x456b15;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulFacetResponse extends Response{constructor(_0x2b891b){super(!![]),this['facet']=_0x2b891b;}['toSuccess'](){return this['facet'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetResponse extends Response{constructor(_0x42c105){super(![]),this['problem']=_0x42c105;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedSearchableFieldResponse extends Response{constructor(_0xd7ce9d){super(![]),this['problem']=_0xd7ce9d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchableFieldResponse extends Response{constructor(_0x531239){super(!![]),this['searchable_field']=_0x531239;}['toSuccess'](){return this['searchable_field'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountResponse extends Response{constructor(_0x9afa07){super(!![]),this['account']=_0x9afa07;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountImageResponse extends Response{constructor(_0x25def9){super(!![]),this['accountImage']=_0x25def9;}['toSuccess'](){return this['accountImage'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListIdentityResponse extends Response{constructor(_0x1649b8){super(!![]),this['list']=_0x1649b8;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulGroupResponse extends Response{constructor(_0x44574f){super(!![]),this['group']=_0x44574f;}['toSuccess'](){return this['group'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedGroupResponse extends Response{constructor(_0x3d61c5){super(![]),this['problem']=_0x3d61c5;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListResponse extends Response{constructor(_0x5bab3c){super(!![]),this['list']=_0x5bab3c;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedListResponse extends Response{constructor(_0x4153f2){super(![]),this['problem']=_0x4153f2;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountResponse extends Response{constructor(_0x4eb8fb){super(![]),this['problem']=_0x4eb8fb;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountImageResponse extends Response{constructor(_0x242614){super(![]),this['problem']=_0x242614;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListIdentityResponse extends Response{constructor(_0x51d881){super(![]),this['problem']=_0x51d881;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x450523){super(!![]),this['tokens']=_0x450523;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0xb952d0){super(![]),this['problem']=_0xb952d0;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x1ae63a){super(!![]),this['apiKey']=_0x1ae63a;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x230e5b){super(![]),this['problem']=_0x230e5b;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x1b872d){super(!![]),this['searchService']=_0x1b872d;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x433446){super(![]),this['problem']=_0x433446;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x53a146){super(!![]),this['searchService']=_0x53a146;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulSearchResultResponse extends Response{constructor(_0x1f6150){super(!![]),this['searchResult']=_0x1f6150;}['toSuccess'](){return this['searchResult'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchResultResponse extends Response{constructor(_0x242ddc){super(![]),this['problem']=_0x242ddc;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchResultResponse extends Response{constructor(_0x1f907f){super(!![]),this['searchResults']=_0x1f907f;}['toSuccess'](){return this['searchResults'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchResultResponse extends Response{constructor(_0x46ac9e){super(![]),this['problem']=_0x46ac9e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchServiceResponse extends Response{constructor(_0x2d5b31){super(!![]),this['searchServices']=_0x2d5b31;}['toSuccess'](){return this['searchServices'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServicesResponse extends Response{constructor(_0x5cd60f){super(![]),this['problem']=_0x5cd60f;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedViewSearchServiceResponse extends Response{constructor(_0x396fa0){super(![]),this['problem']=_0x396fa0;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x1d0bbd){super(!![]),this['apiKeyValue']=_0x1d0bbd;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x2e3a3a){super(!![]),this['obj']=_0x2e3a3a;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x42735d){super(![]),this['problem']=_0x42735d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x2efd4e){super(![]),this['problem']=_0x2efd4e;}['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(_0x1b864a,_0x56c03f,_0x529f0b,_0x2888db){function _0x242f03(_0x4634c7){return _0x4634c7 instanceof _0x529f0b?_0x4634c7:new _0x529f0b(function(_0x3a13e1){_0x3a13e1(_0x4634c7);});}return new(_0x529f0b||(_0x529f0b=Promise))(function(_0x435a9b,_0xbdecfa){function _0x3abf74(_0x4cd890){try{_0x57ee4d(_0x2888db['next'](_0x4cd890));}catch(_0x598552){_0xbdecfa(_0x598552);}}function _0x179357(_0xa77627){try{_0x57ee4d(_0x2888db['throw'](_0xa77627));}catch(_0x5554ef){_0xbdecfa(_0x5554ef);}}function _0x57ee4d(_0x31cbb0){_0x31cbb0['done']?_0x435a9b(_0x31cbb0['value']):_0x242f03(_0x31cbb0['value'])['then'](_0x3abf74,_0x179357);}_0x57ee4d((_0x2888db=_0x2888db['apply'](_0x1b864a,_0x56c03f||[]))['next']());});};class AccountService{constructor(_0xe5492e){this['fetch']=_0xe5492e,this['path']='account';}['get'](_0x141451,_0x43a8dc){return __awaiter$b(this,void 0,void 0,function*(){const _0x11ad3f=this['path']+'/'+_0x141451+'/',_0x24404b=yield this['fetch']['get'](_0x11ad3f,_0x43a8dc);try{if(_0x24404b['status']>0xc7&&_0x24404b['status']<0x12c){const _0x53a534=yield _0x24404b['json']();return new SuccessfulAccountResponse(_0x53a534);}const _0x5b4046=yield _0x24404b['json']();return new FailedAccountResponse(_0x5b4046);}catch(_0xca8cd5){if(_0xca8cd5 instanceof Error)return new FailedAccountResponse({'detail':_0xca8cd5['message'],'title':_0xca8cd5['name'],'status':0x1f4,'instance':'','type':''});throw _0xca8cd5;}});}['getImage'](_0x51be24,_0x1bdca5){return __awaiter$b(this,void 0,void 0,function*(){const _0x530719=this['path']+'/image/'+_0x51be24+'/',_0x507846=yield this['fetch']['get'](_0x530719,_0x1bdca5);try{if(_0x507846['status']>0xc7&&_0x507846['status']<0x12c){const _0x5d7184=yield _0x507846['json']();return new SuccessfulAccountImageResponse(_0x5d7184);}const _0x5cafcd=yield _0x507846['json']();return new FailedAccountImageResponse(_0x5cafcd);}catch(_0x26612f){if(_0x26612f instanceof Error)return new FailedAccountImageResponse({'detail':_0x26612f['message'],'title':_0x26612f['name'],'status':0x1f4,'instance':'','type':''});throw _0x26612f;}});}['feedback'](_0x5ac39f,_0x387dd9,_0x4e1f6e,_0x42f427){return __awaiter$b(this,void 0,void 0,function*(){const _0x540992=this['path']+'/feedback',_0x5c48c3=yield this['fetch']['post'](_0x540992,_0x42f427,{'account_name':_0x5ac39f,'email_address':_0x387dd9,'feedback':_0x4e1f6e});try{if(_0x5c48c3['status']>0xc7&&_0x5c48c3['status']<0x12c)return new SuccessfulResponse({});const _0x1b3cb3=yield _0x5c48c3['json']();return new FailedResponse(_0x1b3cb3);}catch(_0x5e339a){if(_0x5e339a instanceof Error)return new FailedResponse({'detail':_0x5e339a['message'],'title':_0x5e339a['name'],'status':0x1f4,'instance':'','type':''});throw _0x5e339a;}});}['delete'](_0x157fbf,_0x45d5d1){return __awaiter$b(this,void 0,void 0,function*(){const _0x28c631=this['path']+'/'+_0x157fbf,_0x22b6ca=yield this['fetch']['delete'](_0x28c631,_0x45d5d1);try{if(_0x22b6ca['status']>0xc7&&_0x22b6ca['status']<0x12c)return new SuccessfulResponse({});const _0x1a1931=yield _0x22b6ca['json']();return new FailedResponse(_0x1a1931);}catch(_0x1978f0){if(_0x1978f0 instanceof Error)return new FailedResponse({'detail':_0x1978f0['message'],'title':_0x1978f0['name'],'status':0x1f4,'instance':'','type':''});throw _0x1978f0;}});}}
|
|
4
4
|
|
|
5
|
-
var __awaiter$a=undefined&&undefined['__awaiter']||function(
|
|
5
|
+
var __awaiter$a=undefined&&undefined['__awaiter']||function(_0x3994fa,_0x2e8968,_0x588e3b,_0x4c4860){function _0xc29f10(_0x992c0c){return _0x992c0c instanceof _0x588e3b?_0x992c0c:new _0x588e3b(function(_0x56d0cc){_0x56d0cc(_0x992c0c);});}return new(_0x588e3b||(_0x588e3b=Promise))(function(_0x37a14d,_0x496b8e){function _0x2d0981(_0x393a30){try{_0x230e8c(_0x4c4860['next'](_0x393a30));}catch(_0x46d666){_0x496b8e(_0x46d666);}}function _0x50ab83(_0x59125a){try{_0x230e8c(_0x4c4860['throw'](_0x59125a));}catch(_0x53a0b2){_0x496b8e(_0x53a0b2);}}function _0x230e8c(_0x30e3b6){_0x30e3b6['done']?_0x37a14d(_0x30e3b6['value']):_0xc29f10(_0x30e3b6['value'])['then'](_0x2d0981,_0x50ab83);}_0x230e8c((_0x4c4860=_0x4c4860['apply'](_0x3994fa,_0x2e8968||[]))['next']());});};class ApiKeyService{constructor(_0x4feaa8){this['fetch']=_0x4feaa8,this['path']='api-key';}['create'](_0x6d39cc,_0x543eb6,_0x33a0c3){return __awaiter$a(this,void 0,void 0,function*(){const _0x222983={'account_name':_0x6d39cc,'api_key_name':_0x543eb6};try{const _0x2abc09=yield this['fetch']['post'](this['path'],_0x33a0c3,_0x222983);if(_0x2abc09['status']>0xc7&&_0x2abc09['status']<0x12c){const _0x11e2c5=yield _0x2abc09['json']();return new SuccessfulApiKeyResponse(_0x11e2c5);}const _0x35e427=yield _0x2abc09['json']();return new FailedApiKeyResponse(_0x35e427);}catch(_0x5e9d14){if(_0x5e9d14 instanceof Error)return new FailedApiKeyResponse({'detail':_0x5e9d14['message'],'title':_0x5e9d14['name'],'status':0x1f4,'instance':'','type':''});throw _0x5e9d14;}});}['view'](_0x36465e,_0x43e262,_0xd286f9){return __awaiter$a(this,void 0,void 0,function*(){const _0xcc6efc=this['path']+'/'+_0x36465e+'/'+_0x43e262;try{const _0x420677=yield this['fetch']['get'](_0xcc6efc,_0xd286f9);if(_0x420677['status']>0xc7&&_0x420677['status']<0x12c){const _0x5b7e5a=yield _0x420677['json']();return new SuccessfulApiKeyValueResponse(_0x5b7e5a);}const _0x1a57ec=yield _0x420677['json']();return new FailedApiKeyValueResponse(_0x1a57ec);}catch(_0x46deee){if(_0x46deee instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x46deee['message'],'title':_0x46deee['name'],'status':0x1f4,'instance':'','type':''});throw _0x46deee;}});}['delete'](_0x24228f,_0xb4521e,_0x3d72ff){return __awaiter$a(this,void 0,void 0,function*(){const _0x71bf1a=this['path']+'/'+_0x24228f+'/'+_0xb4521e;try{const _0x5efec3=yield this['fetch']['delete'](_0x71bf1a,_0x3d72ff);if(_0x5efec3['status']>0xc7&&_0x5efec3['status']<0x12c)return new SuccessfulResponse({});const _0xb87cfe=yield _0x5efec3['json']();return new FailedResponse(_0xb87cfe);}catch(_0x379d9a){if(_0x379d9a instanceof Error)return new FailedResponse({'detail':_0x379d9a['message'],'title':_0x379d9a['name'],'status':0x1f4,'instance':'','type':''});throw _0x379d9a;}});}}
|
|
6
6
|
|
|
7
|
-
var __awaiter$9=undefined&&undefined['__awaiter']||function(
|
|
7
|
+
var __awaiter$9=undefined&&undefined['__awaiter']||function(_0xc59430,_0x1eabc0,_0x719d27,_0x50c01d){function _0x3414ed(_0x42a47b){return _0x42a47b instanceof _0x719d27?_0x42a47b:new _0x719d27(function(_0x51a7e8){_0x51a7e8(_0x42a47b);});}return new(_0x719d27||(_0x719d27=Promise))(function(_0x1b9e82,_0x406e6b){function _0xd43270(_0x429673){try{_0x4d49eb(_0x50c01d['next'](_0x429673));}catch(_0x3f1bba){_0x406e6b(_0x3f1bba);}}function _0x4c6522(_0xa5ae18){try{_0x4d49eb(_0x50c01d['throw'](_0xa5ae18));}catch(_0x299eae){_0x406e6b(_0x299eae);}}function _0x4d49eb(_0x41d8f1){_0x41d8f1['done']?_0x1b9e82(_0x41d8f1['value']):_0x3414ed(_0x41d8f1['value'])['then'](_0xd43270,_0x4c6522);}_0x4d49eb((_0x50c01d=_0x50c01d['apply'](_0xc59430,_0x1eabc0||[]))['next']());});};class ListService{constructor(_0x338d4a){this['fetch']=_0x338d4a,this['path']='list',this['Coordinates']=new CoordinatesService(_0x338d4a),this['GeneratedSuggestions']=new GeneratedSuggestionsService(_0x338d4a);}['create'](_0x362134,_0x35c64e,_0x4bef93,_0x57113b){return __awaiter$9(this,void 0,void 0,function*(){const _0x21574c={'account_name':_0x362134,'list_name':_0x35c64e,'search_service_name':_0x4bef93};try{const _0x30a82a=yield this['fetch']['post'](this['path'],_0x57113b,_0x21574c);if(_0x30a82a['status']>0xc7&&_0x30a82a['status']<0x12c){const _0x24a4a7=yield _0x30a82a['json']();return new SuccessfulListIdentityResponse(_0x24a4a7);}const _0x3d128b=yield _0x30a82a['json']();return new FailedListIdentityResponse(_0x3d128b);}catch(_0x1ac4a2){if(_0x1ac4a2 instanceof Error)return new FailedListIdentityResponse({'detail':_0x1ac4a2['message'],'title':_0x1ac4a2['name'],'status':0x1f4,'instance':'','type':''});throw _0x1ac4a2;}});}['delete'](_0x1e3a2e,_0xd3f9d0,_0x2880c1){return __awaiter$9(this,void 0,void 0,function*(){const _0x3fefb8=this['path']+'/'+_0x1e3a2e+'/'+_0xd3f9d0,_0xf7d0c3=yield this['fetch']['delete'](_0x3fefb8,_0x2880c1);try{if(_0xf7d0c3['status']>0xc7&&_0xf7d0c3['status']<0x12c)return new SuccessfulResponse({});const _0x3d3d69=yield _0xf7d0c3['json']();return new FailedResponse(_0x3d3d69);}catch(_0x5ca74c){if(_0x5ca74c instanceof Error)return new FailedResponse({'detail':_0x5ca74c['message'],'title':_0x5ca74c['name'],'status':0x1f4,'instance':'','type':''});throw _0x5ca74c;}});}['get'](_0x213312,_0x291dd2,_0x5940c4){return __awaiter$9(this,void 0,void 0,function*(){const _0x12f9e8=this['path']+'/'+_0x213312+'/'+_0x291dd2;try{const _0xf5687b=yield this['fetch']['get'](_0x12f9e8,_0x5940c4);if(_0xf5687b['status']>0xc7&&_0xf5687b['status']<0x12c){const _0x97f047=yield _0xf5687b['json']();return new SuccessfulListResponse(_0x97f047);}const _0x1088e4=yield _0xf5687b['json']();return new FailedListResponse(_0x1088e4);}catch(_0x49c679){if(_0x49c679 instanceof Error)return new FailedListResponse({'detail':_0x49c679['message'],'title':_0x49c679['name'],'status':0x1f4,'instance':'','type':''});throw _0x49c679;}});}['edit'](_0x1d69b1,_0x302d87,_0xb83011,_0x5349aa){return __awaiter$9(this,void 0,void 0,function*(){const _0x1457c9=this['path']+'/'+_0x1d69b1+'/'+_0x302d87,_0x248c48=yield this['fetch']['put'](_0x1457c9,_0xb83011,_0x5349aa);try{if(_0x248c48['status']>0xc7&&_0x248c48['status']<0x12c){const _0x438cfc=yield _0x248c48['json']();return new SuccessfulListResponse(_0x438cfc);}const _0x287e28=yield _0x248c48['json']();return new FailedListResponse(_0x287e28);}catch(_0x3c5678){if(_0x3c5678 instanceof Error)return new FailedListResponse({'detail':_0x3c5678['message'],'title':_0x3c5678['name'],'status':0x1f4,'instance':'','type':''});throw _0x3c5678;}});}['transfer'](_0x128ae6,_0x522a6e,_0x429a41,_0x1ed80d){return __awaiter$9(this,void 0,void 0,function*(){const _0xa8cd27={'new_search_service_name':_0x429a41};try{const _0x137d84=yield this['fetch']['put'](this['path']+'/transfer/'+_0x128ae6+'/'+_0x522a6e,_0x1ed80d,_0xa8cd27);if(_0x137d84['status']>0xc7&&_0x137d84['status']<0x12c){const _0x491f23=yield _0x137d84['json']();return new SuccessfulListResponse(_0x491f23);}const _0x4c3dcf=yield _0x137d84['json']();return new FailedListResponse(_0x4c3dcf);}catch(_0x5f41bd){if(_0x5f41bd instanceof Error)return new FailedListResponse({'detail':_0x5f41bd['message'],'title':_0x5f41bd['name'],'status':0x1f4,'instance':'','type':''});throw _0x5f41bd;}});}}class CoordinatesService{constructor(_0x424856){this['fetch']=_0x424856,this['path']='list/coordinates';}['add'](_0x44891f,_0x52ec2b,_0x15f05d){return __awaiter$9(this,void 0,void 0,function*(){const _0x175b39=this['path']+'/'+_0x44891f+'/'+_0x52ec2b,_0x42aab2=yield this['fetch']['post'](_0x175b39,_0x15f05d,{});try{if(_0x42aab2['status']>0xc7&&_0x42aab2['status']<0x12c){const _0x1a8cc5=yield _0x42aab2['json']();return new SuccessfulListResponse(_0x1a8cc5);}const _0x44cdad=yield _0x42aab2['json']();return new FailedListResponse(_0x44cdad);}catch(_0x54e13f){if(_0x54e13f instanceof Error)return new FailedListResponse({'detail':_0x54e13f['message'],'title':_0x54e13f['name'],'status':0x1f4,'instance':'','type':''});throw _0x54e13f;}});}['remove'](_0x151de5,_0x350e0d,_0x1c2a74){return __awaiter$9(this,void 0,void 0,function*(){const _0x1624d0=this['path']+'/'+_0x151de5+'/'+_0x350e0d,_0x47eee2=yield this['fetch']['delete'](_0x1624d0,_0x1c2a74);try{if(_0x47eee2['status']>0xc7&&_0x47eee2['status']<0x12c){const _0x2e80f9=yield _0x47eee2['json']();return new SuccessfulListResponse(_0x2e80f9);}const _0x43a650=yield _0x47eee2['json']();return new FailedListResponse(_0x43a650);}catch(_0x394a21){if(_0x394a21 instanceof Error)return new FailedListResponse({'detail':_0x394a21['message'],'title':_0x394a21['name'],'status':0x1f4,'instance':'','type':''});throw _0x394a21;}});}}class GeneratedSuggestionsService{constructor(_0x196557){this['fetch']=_0x196557,this['path']='list/generated-suggestions';}['add'](_0x59974d,_0x497a32,_0x1486f6,_0x188d11,_0x2687a2,_0x4cd866,_0x24563b){return __awaiter$9(this,void 0,void 0,function*(){const _0x529ff0=this['path']+'/'+_0x59974d+'/'+_0x497a32,_0x5ae607=yield this['fetch']['post'](_0x529ff0,_0x24563b,{'target_list_name':_0x1486f6,'minimum_result_count':_0x188d11,'is_active':_0x2687a2,'minimum_characters':_0x4cd866});try{if(_0x5ae607['status']>0xc7&&_0x5ae607['status']<0x12c){const _0x44d859=yield _0x5ae607['json']();return new SuccessfulListResponse(_0x44d859);}const _0x218700=yield _0x5ae607['json']();return new FailedListResponse(_0x218700);}catch(_0x113075){if(_0x113075 instanceof Error)return new FailedListResponse({'detail':_0x113075['message'],'title':_0x113075['name'],'status':0x1f4,'instance':'','type':''});throw _0x113075;}});}['remove'](_0x3f9490,_0x26a57c,_0x18f9a9){return __awaiter$9(this,void 0,void 0,function*(){const _0x3744f4=this['path']+'/'+_0x3f9490+'/'+_0x26a57c,_0x55b859=yield this['fetch']['delete'](_0x3744f4,_0x18f9a9);try{if(_0x55b859['status']>0xc7&&_0x55b859['status']<0x12c){const _0x26caf5=yield _0x55b859['json']();return new SuccessfulListResponse(_0x26caf5);}const _0x551fe1=yield _0x55b859['json']();return new FailedListResponse(_0x551fe1);}catch(_0x2f36eb){if(_0x2f36eb instanceof Error)return new FailedListResponse({'detail':_0x2f36eb['message'],'title':_0x2f36eb['name'],'status':0x1f4,'instance':'','type':''});throw _0x2f36eb;}});}['edit'](_0x348f90,_0x113167,_0x59894b,_0x266085){return __awaiter$9(this,void 0,void 0,function*(){const _0x315c3e=this['path']+'/'+_0x348f90+'/'+_0x113167;_0x266085=_0x266085!==null&&_0x266085!==void 0?_0x266085:{};const _0x1f4d85=yield this['fetch']['put'](_0x315c3e,_0x59894b,_0x266085);try{if(_0x1f4d85['status']>0xc7&&_0x1f4d85['status']<0x12c){const _0x3c5dfc=yield _0x1f4d85['json']();return new SuccessfulListResponse(_0x3c5dfc);}const _0xf525c7=yield _0x1f4d85['json']();return new FailedListResponse(_0xf525c7);}catch(_0x32528d){if(_0x32528d instanceof Error)return new FailedListResponse({'detail':_0x32528d['message'],'title':_0x32528d['name'],'status':0x1f4,'instance':'','type':''});throw _0x32528d;}});}}
|
|
8
8
|
|
|
9
|
-
var __awaiter$8=undefined&&undefined['__awaiter']||function(
|
|
9
|
+
var __awaiter$8=undefined&&undefined['__awaiter']||function(_0x39a581,_0x321d11,_0x5be1b0,_0x7639cb){function _0x36e38a(_0x2f7bd2){return _0x2f7bd2 instanceof _0x5be1b0?_0x2f7bd2:new _0x5be1b0(function(_0x1dff44){_0x1dff44(_0x2f7bd2);});}return new(_0x5be1b0||(_0x5be1b0=Promise))(function(_0x2b307b,_0x1363ad){function _0x3f651a(_0x31748b){try{_0x476a0c(_0x7639cb['next'](_0x31748b));}catch(_0xbb1069){_0x1363ad(_0xbb1069);}}function _0x2fad74(_0x614c3){try{_0x476a0c(_0x7639cb['throw'](_0x614c3));}catch(_0x4ca203){_0x1363ad(_0x4ca203);}}function _0x476a0c(_0xd09911){_0xd09911['done']?_0x2b307b(_0xd09911['value']):_0x36e38a(_0xd09911['value'])['then'](_0x3f651a,_0x2fad74);}_0x476a0c((_0x7639cb=_0x7639cb['apply'](_0x39a581,_0x321d11||[]))['next']());});};class Fetch{constructor(_0x26aa70){this['baseUri']=_0x26aa70,this['getUrl']=_0x1ef370=>{return _0x1ef370['startsWith']('/')&&(_0x1ef370=_0x1ef370['replace']('/','')),''+this['baseUri']+_0x1ef370;},!_0x26aa70['endsWith']('/')&&(_0x26aa70=_0x26aa70+'/');}['get'](_0x4ea911,_0x425647){return __awaiter$8(this,void 0,void 0,function*(){const _0x4f17fa=this['getUrl'](_0x4ea911);return yield fetch(_0x4f17fa,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x425647}});});}['post'](_0x3cf1ac,_0x31dacb,_0x47bdcc){return __awaiter$8(this,void 0,void 0,function*(){const _0x540d9e=this['getUrl'](_0x3cf1ac);return yield fetch(_0x540d9e,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x31dacb},'body':_0x47bdcc?JSON['stringify'](_0x47bdcc):null});});}['upload'](_0x53d295,_0x5ae1f1,_0x21d035){return __awaiter$8(this,void 0,void 0,function*(){const _0x4851f1=this['getUrl'](_0x53d295);return yield fetch(_0x4851f1,{'method':'POST','headers':{'Authorization':'Bearer\x20'+_0x5ae1f1},'body':_0x21d035});});}['PostNoAuth'](_0x3c874c,_0x289205){return __awaiter$8(this,void 0,void 0,function*(){const _0x127e0d=this['getUrl'](_0x3c874c);return yield fetch(_0x127e0d,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0x289205?JSON['stringify'](_0x289205):null});});}['put'](_0x74aa22,_0x135b9d,_0x3ff83a){return __awaiter$8(this,void 0,void 0,function*(){const _0x17fe2d=this['getUrl'](_0x74aa22);return yield fetch(_0x17fe2d,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x135b9d},'body':_0x3ff83a?JSON['stringify'](_0x3ff83a):null});});}['delete'](_0x1ccb23,_0x5a9160){return __awaiter$8(this,void 0,void 0,function*(){const _0x4bfc77=this['getUrl'](_0x1ccb23);return yield fetch(_0x4bfc77,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x5a9160}});});}}
|
|
10
10
|
|
|
11
|
-
var __awaiter$7=undefined&&undefined['__awaiter']||function(
|
|
11
|
+
var __awaiter$7=undefined&&undefined['__awaiter']||function(_0x3a13bd,_0x574acd,_0x4bc7c4,_0x30e4ac){function _0x1ce1ce(_0x4d6767){return _0x4d6767 instanceof _0x4bc7c4?_0x4d6767:new _0x4bc7c4(function(_0x49253b){_0x49253b(_0x4d6767);});}return new(_0x4bc7c4||(_0x4bc7c4=Promise))(function(_0x164f1c,_0x440531){function _0x53737f(_0x49e242){try{_0x161c17(_0x30e4ac['next'](_0x49e242));}catch(_0x468b0a){_0x440531(_0x468b0a);}}function _0x7c5fc1(_0x4b00d4){try{_0x161c17(_0x30e4ac['throw'](_0x4b00d4));}catch(_0x1e19cf){_0x440531(_0x1e19cf);}}function _0x161c17(_0x4c25dc){_0x4c25dc['done']?_0x164f1c(_0x4c25dc['value']):_0x1ce1ce(_0x4c25dc['value'])['then'](_0x53737f,_0x7c5fc1);}_0x161c17((_0x30e4ac=_0x30e4ac['apply'](_0x3a13bd,_0x574acd||[]))['next']());});};class SearchServersService{constructor(_0x389fcb){this['fetch']=_0x389fcb,this['path']='search-service';}['create'](_0x442dba,_0x10b563,_0x54ab4c,_0x1a9219,_0x3ad747,_0x484481,_0x1e9fe5,_0x2a58f5){return __awaiter$7(this,void 0,void 0,function*(){const _0x5e2f71={'account_name':_0x442dba,'search_service_name':_0x10b563,'endpoint':_0x54ab4c,'key':_0x1a9219,'country':_0x3ad747,'provider':_0x484481,'index_name':_0x1e9fe5};try{const _0x51165e=yield this['fetch']['post'](this['path'],_0x2a58f5,_0x5e2f71);if(_0x51165e['status']>0xc7&&_0x51165e['status']<0x12c){const _0x8b68a5=yield _0x51165e['json']();return new SuccessfulSearchServiceResponse(_0x8b68a5);}const _0x52266e=yield _0x51165e['json']();return new FailedSearchServiceResponse(_0x52266e);}catch(_0x4a33f3){if(_0x4a33f3 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x4a33f3['message'],'title':_0x4a33f3['name'],'status':0x1f4,'instance':'','type':''});throw _0x4a33f3;}});}['delete'](_0xc6b0d7,_0x83d2d8,_0x1cf451){return __awaiter$7(this,void 0,void 0,function*(){const _0x1b7785=this['path']+'/'+_0xc6b0d7+'/'+_0x83d2d8;try{const _0x47af6e=yield this['fetch']['delete'](_0x1b7785,_0x1cf451);if(_0x47af6e['status']>0xc7&&_0x47af6e['status']<0x12c)return new SuccessfulResponse({});const _0x922f06=yield _0x47af6e['json']();return new FailedResponse(_0x922f06);}catch(_0x5a98c1){if(_0x5a98c1 instanceof Error)return new FailedResponse({'detail':_0x5a98c1['message'],'title':_0x5a98c1['name'],'status':0x1f4,'instance':'','type':''});throw _0x5a98c1;}});}['view'](_0x4283f2,_0x29f842,_0x3fc255){return __awaiter$7(this,void 0,void 0,function*(){const _0x5a2e3e=this['path']+'/'+_0x4283f2+'/'+_0x29f842;try{const _0x26912f=yield this['fetch']['get'](_0x5a2e3e,_0x3fc255);if(_0x26912f['status']>0xc7&&_0x26912f['status']<0x12c){const _0x318307=yield _0x26912f['json']();return new SuccessfulViewSearchServiceResponse(_0x318307);}const _0x18a3fa=yield _0x26912f['json']();return new FailedViewSearchServiceResponse(_0x18a3fa);}catch(_0x2b9ecb){if(_0x2b9ecb instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x2b9ecb['message'],'title':_0x2b9ecb['name'],'status':0x1f4,'instance':'','type':''});throw _0x2b9ecb;}});}['edit'](_0x4f1089,_0xaf7301,_0x3181c2,_0x1aaf2b,_0x142ff6){return __awaiter$7(this,void 0,void 0,function*(){const _0x3b6fd9={'account_name':_0x4f1089,'search_service_name':_0xaf7301,'key':_0x3181c2,'country':_0x1aaf2b};try{const _0x5bcbd0=yield this['fetch']['put'](this['path'],_0x142ff6,_0x3b6fd9);if(_0x5bcbd0['status']>0xc7&&_0x5bcbd0['status']<0x12c){const _0x4047c8=yield _0x5bcbd0['json']();return new SuccessfulSearchServiceResponse(_0x4047c8);}const _0x49a122=yield _0x5bcbd0['json']();return new FailedSearchServiceResponse(_0x49a122);}catch(_0x411829){if(_0x411829 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x411829['message'],'title':_0x411829['name'],'status':0x1f4,'instance':'','type':''});throw _0x411829;}});}['list'](_0x1f1d48,_0x20b53b){return __awaiter$7(this,void 0,void 0,function*(){const _0x26d26f=this['path']+'/'+_0x1f1d48;try{const _0x33523b=yield this['fetch']['get'](_0x26d26f,_0x20b53b);if(_0x33523b['status']>0xc7&&_0x33523b['status']<0x12c){const _0x413d19=yield _0x33523b['json']();return new SuccessfulListSearchServiceResponse(_0x413d19);}const _0x178ee1=yield _0x33523b['json']();return new FailedViewSearchServicesResponse(_0x178ee1);}catch(_0x1afd8f){if(_0x1afd8f instanceof Error)return new FailedViewSearchServicesResponse({'detail':_0x1afd8f['message'],'title':_0x1afd8f['name'],'status':0x1f4,'instance':'','type':''});throw _0x1afd8f;}});}}
|
|
12
12
|
|
|
13
|
-
var __awaiter$6=undefined&&undefined['__awaiter']||function(
|
|
13
|
+
var __awaiter$6=undefined&&undefined['__awaiter']||function(_0x25779e,_0x30130b,_0x2b7977,_0x1642aa){function _0x29d0d0(_0x1afbfd){return _0x1afbfd instanceof _0x2b7977?_0x1afbfd:new _0x2b7977(function(_0x5e5435){_0x5e5435(_0x1afbfd);});}return new(_0x2b7977||(_0x2b7977=Promise))(function(_0x430e23,_0x1dfdb7){function _0x3bc775(_0x1edd7a){try{_0x15dd33(_0x1642aa['next'](_0x1edd7a));}catch(_0x203d18){_0x1dfdb7(_0x203d18);}}function _0x47809f(_0x5c2ada){try{_0x15dd33(_0x1642aa['throw'](_0x5c2ada));}catch(_0x577a39){_0x1dfdb7(_0x577a39);}}function _0x15dd33(_0x177dd7){_0x177dd7['done']?_0x430e23(_0x177dd7['value']):_0x29d0d0(_0x177dd7['value'])['then'](_0x3bc775,_0x47809f);}_0x15dd33((_0x1642aa=_0x1642aa['apply'](_0x25779e,_0x30130b||[]))['next']());});};class FacetService{constructor(_0x485b21){this['fetch']=_0x485b21,this['path']='facet';}['create'](_0x74e470,_0x4e810a,_0x31e8f5,_0x2af526){return __awaiter$6(this,void 0,void 0,function*(){const _0x5f4de4={'account_name':_0x74e470,'list_name':_0x4e810a,'facet_name':_0x31e8f5};try{const _0x406492=yield this['fetch']['post'](this['path'],_0x2af526,_0x5f4de4);if(_0x406492['status']>0xc7&&_0x406492['status']<0x12c){const _0x4c479c=yield _0x406492['json']();return new SuccessfulFacetResponse(_0x4c479c);}const _0xc2a7ee=yield _0x406492['json']();return new FailedFacetResponse(_0xc2a7ee);}catch(_0x2bcc1f){if(_0x2bcc1f instanceof Error)return new FailedFacetResponse({'detail':_0x2bcc1f['message'],'title':_0x2bcc1f['name'],'status':0x1f4,'instance':'','type':''});throw _0x2bcc1f;}});}['remove'](_0x4036ec,_0x7a1e6d,_0x53a82f,_0x341f49){return __awaiter$6(this,void 0,void 0,function*(){const _0x2301b3='Facet/'+_0x4036ec+'/'+_0x7a1e6d+'/'+_0x53a82f,_0x4648de=yield this['fetch']['delete'](_0x2301b3,_0x341f49);try{if(_0x4648de['status']>0xc7&&_0x4648de['status']<0x12c)return new SuccessfulResponse({});const _0x3c593d=yield _0x4648de['json']();return new FailedResponse(_0x3c593d);}catch(_0x37372a){if(_0x37372a instanceof Error)return new FailedResponse({'detail':_0x37372a['message'],'title':_0x37372a['name'],'status':0x1f4,'instance':'','type':''});throw _0x37372a;}});}['rename'](_0x148485,_0x164f7f,_0x5e97e2,_0x38f97d,_0x4c5fb9){return __awaiter$6(this,void 0,void 0,function*(){let _0x5137f7=this['path']+'/'+_0x148485+'/'+_0x164f7f+'/'+_0x5e97e2;const _0x124004={'new_facet_name':_0x38f97d};try{const _0x15d04d=yield this['fetch']['put'](_0x5137f7,_0x4c5fb9,_0x124004);if(_0x15d04d['status']>0xc7&&_0x15d04d['status']<0x12c){const _0x2c725a=yield _0x15d04d['json']();return new SuccessfulFacetResponse(_0x2c725a);}const _0x109978=yield _0x15d04d['json']();return new FailedFacetResponse(_0x109978);}catch(_0x12ab0d){if(_0x12ab0d instanceof Error)return new FailedFacetResponse({'detail':_0x12ab0d['message'],'title':_0x12ab0d['name'],'status':0x1f4,'instance':'','type':''});throw _0x12ab0d;}});}['list'](_0x12dda3,_0x10d263,_0x44bacc,_0x50afff,_0x58cf56){return __awaiter$6(this,void 0,void 0,function*(){let _0x481ba0=this['path']+'/'+_0x12dda3+'/'+_0x10d263+'/'+_0x44bacc+'/'+_0x50afff;try{const _0x5d9c8d=yield this['fetch']['get'](_0x481ba0,_0x58cf56);if(_0x5d9c8d['status']>0xc7&&_0x5d9c8d['status']<0x12c){const _0x322dec=yield _0x5d9c8d['json']();return new SuccessfulFacetValueResponse(_0x322dec);}const _0x2d7a7c=yield _0x5d9c8d['json']();return new FailedFacetValuesResponse(_0x2d7a7c);}catch(_0x42e2df){if(_0x42e2df instanceof Error)return new FailedFacetValuesResponse({'detail':_0x42e2df['message'],'title':_0x42e2df['name'],'status':0x1f4,'instance':'','type':''});throw _0x42e2df;}});}}
|
|
14
14
|
|
|
15
|
-
var __awaiter$5=undefined&&undefined['__awaiter']||function(
|
|
15
|
+
var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x59b109,_0x18f104,_0x2ff55b,_0x3b39d3){function _0x1349e5(_0x333916){return _0x333916 instanceof _0x2ff55b?_0x333916:new _0x2ff55b(function(_0x497e98){_0x497e98(_0x333916);});}return new(_0x2ff55b||(_0x2ff55b=Promise))(function(_0x411a28,_0x2918aa){function _0x53b128(_0x4ac3b8){try{_0x459724(_0x3b39d3['next'](_0x4ac3b8));}catch(_0x11c9ef){_0x2918aa(_0x11c9ef);}}function _0x58fc7e(_0x14d4ad){try{_0x459724(_0x3b39d3['throw'](_0x14d4ad));}catch(_0x1dacb7){_0x2918aa(_0x1dacb7);}}function _0x459724(_0x1b5765){_0x1b5765['done']?_0x411a28(_0x1b5765['value']):_0x1349e5(_0x1b5765['value'])['then'](_0x53b128,_0x58fc7e);}_0x459724((_0x3b39d3=_0x3b39d3['apply'](_0x59b109,_0x18f104||[]))['next']());});};class SearchResultService{constructor(_0x31c9e9){this['fetch']=_0x31c9e9,this['path']='search-result',this['isRealNumber']=_0x2efc5d=>_0x2efc5d!=undefined&&typeof _0x2efc5d==='number'&&Number['isFinite'](_0x2efc5d);}['create'](_0xbeb084,_0x4f5b73,_0x55b6fc,_0x14163c,_0x12666a){return __awaiter$5(this,void 0,void 0,function*(){const _0x29f12e=Object['assign']({'account_name':_0xbeb084,'search_result_name':_0x55b6fc,'list_name':_0x4f5b73},_0x12666a);try{const _0x4c9ee0=yield this['fetch']['post'](this['path'],_0x14163c,_0x29f12e);if(_0x4c9ee0['status']>0xc7&&_0x4c9ee0['status']<0x12c){const _0x21ea2b=yield _0x4c9ee0['json']();return new SuccessfulSearchResultResponse(_0x21ea2b);}const _0x3da662=yield _0x4c9ee0['json']();return new FailedSearchResultResponse(_0x3da662);}catch(_0x4e660b){if(_0x4e660b instanceof Error)return new FailedSearchResultResponse({'detail':_0x4e660b['message'],'title':_0x4e660b['name'],'status':0x1f4,'instance':'','type':''});throw _0x4e660b;}});}['list'](_0xa6262e,_0x9ed3da,_0x4caeb3,_0x5e5727){return __awaiter$5(this,void 0,void 0,function*(){let _0xee48ac=this['path']+'/'+_0xa6262e+'/'+_0x9ed3da+'?'+this['getQueryStr'](_0x5e5727);try{const _0x5a8bfb=yield this['fetch']['get'](_0xee48ac,_0x4caeb3);if(_0x5a8bfb['status']>0xc7&&_0x5a8bfb['status']<0x12c){const _0x3388dc=yield _0x5a8bfb['json']();return new SuccessfulListSearchResultResponse(_0x3388dc);}const _0x6eecca=yield _0x5a8bfb['json']();return new FailedViewSearchResultResponse(_0x6eecca);}catch(_0x36b46e){if(_0x36b46e instanceof Error)return new FailedViewSearchResultResponse({'detail':_0x36b46e['message'],'title':_0x36b46e['name'],'status':0x1f4,'instance':'','type':''});throw _0x36b46e;}});}['get'](_0x4baa7e,_0x3e734e,_0x1a8269,_0x4028af){return __awaiter$5(this,void 0,void 0,function*(){let _0x3d03e9=this['path']+'/'+_0x4baa7e+'/'+_0x3e734e+'?'+_0x1a8269;try{const _0x221195=yield this['fetch']['get'](_0x3d03e9,_0x4028af);if(_0x221195['status']>0xc7&&_0x221195['status']<0x12c){const _0x5f1a65=yield _0x221195['json']();return new SuccessfulSearchResultResponse(_0x5f1a65);}const _0x3ee2a3=yield _0x221195['json']();return new FailedSearchResultResponse(_0x3ee2a3);}catch(_0x3b5cac){if(_0x3b5cac instanceof Error)return new FailedSearchResultResponse({'detail':_0x3b5cac['message'],'title':_0x3b5cac['name'],'status':0x1f4,'instance':'','type':''});throw _0x3b5cac;}});}['delete'](_0x46770e,_0x5ba33c,_0x2ecc2c,_0xf05431){return __awaiter$5(this,void 0,void 0,function*(){const _0x4cf01f=this['path']+'/'+_0x46770e+'/'+_0x5ba33c+'/'+_0x2ecc2c,_0x55dd70=yield this['fetch']['delete'](_0x4cf01f,_0xf05431);try{if(_0x55dd70['status']>0xc7&&_0x55dd70['status']<0x12c)return new SuccessfulResponse({});const _0x3c05f9=yield _0x55dd70['json']();return new FailedResponse(_0x3c05f9);}catch(_0x4d6529){if(_0x4d6529 instanceof Error)return new FailedResponse({'detail':_0x4d6529['message'],'title':_0x4d6529['name'],'status':0x1f4,'instance':'','type':''});throw _0x4d6529;}});}['upload'](_0x33a4a4,_0x516663,_0x23cb86,_0x284dd1){return __awaiter$5(this,void 0,void 0,function*(){const _0x305386=this['path']+'/'+_0x33a4a4+'/'+_0x516663+'/upload',_0x2d19ff=new FormData();_0x2d19ff['append']('file',_0x23cb86);try{const _0x8df166=yield this['fetch']['upload'](_0x305386,_0x284dd1,_0x2d19ff);if(_0x8df166['status']>0xc7&&_0x8df166['status']<0x12c)return new SuccessfulResponse({});const _0x26a936=yield _0x8df166['json']();return new FailedResponse(_0x26a936);}catch(_0x5b2610){if(_0x5b2610 instanceof Error)return new FailedResponse({'detail':_0x5b2610['message'],'title':_0x5b2610['name'],'status':0x1f4,'instance':'','type':''});throw _0x5b2610;}});}['edit'](_0x5b4a7b,_0x429801,_0x4c3c1c,_0x367556,_0x4c88f2){return __awaiter$5(this,void 0,void 0,function*(){const _0x5ef8fe=this['path']+'/'+_0x5b4a7b+'/'+_0x429801+'/'+_0x4c3c1c;try{const _0x3c866d=yield this['fetch']['put'](_0x5ef8fe,_0x367556,_0x4c88f2);if(_0x3c866d['status']>0xc7&&_0x3c866d['status']<0x12c){const _0x402b1f=yield _0x3c866d['json']();return new SuccessfulSearchResultResponse(_0x402b1f);}const _0x5c52e2=yield _0x3c866d['json']();return new FailedSearchResultResponse(_0x5c52e2);}catch(_0x5d3345){if(_0x5d3345 instanceof Error)return new FailedSearchResultResponse({'detail':_0x5d3345['message'],'title':_0x5d3345['name'],'status':0x1f4,'instance':'','type':''});throw _0x5d3345;}});}['getQueryStr'](_0x2b2ab5){let _0x2e8e4a='';const _0x4526d1=[];(_0x2b2ab5===null||_0x2b2ab5===void 0?void 0:_0x2b2ab5['size'])&&_0x4526d1['push']('size='+_0x2b2ab5['size']);(_0x2b2ab5===null||_0x2b2ab5===void 0?void 0:_0x2b2ab5['skip'])&&_0x4526d1['push']('skip='+_0x2b2ab5['skip']);(_0x2b2ab5===null||_0x2b2ab5===void 0?void 0:_0x2b2ab5['query'])&&_0x4526d1['push']('query='+_0x2b2ab5['query']);(_0x2b2ab5===null||_0x2b2ab5===void 0?void 0:_0x2b2ab5['filter'])&&_0x4526d1['push']('filter='+_0x2b2ab5['filter']);if((_0x2b2ab5===null||_0x2b2ab5===void 0?void 0:_0x2b2ab5['radius'])&&this['isRealNumber'](_0x2b2ab5['radius']['latitude'])&&this['isRealNumber'](_0x2b2ab5['radius']['longitude'])&&this['isRealNumber'](_0x2b2ab5['radius']['distance_in_km'])){const _0x3910ef=_0x2b2ab5['radius']['latitude']+','+_0x2b2ab5['radius']['longitude']+','+_0x2b2ab5['radius']['distance_in_km'];_0x4526d1['push']('radius='+_0x3910ef);}return _0x2b2ab5['active']===![]&&_0x4526d1['push']('active='+_0x2b2ab5['active']),_0x4526d1['length']>0x0&&_0x4526d1['forEach']((_0x30fdb9,_0x1164f6)=>{if(_0x1164f6>0x0&&_0x2e8e4a)_0x2e8e4a+='&';_0x2e8e4a+=_0x30fdb9;}),_0x2e8e4a;}}
|
|
16
16
|
|
|
17
|
-
var __awaiter$4=undefined&&undefined['__awaiter']||function(
|
|
17
|
+
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x5e8413,_0x122df5,_0x2c8604,_0x37c5ef){function _0x1eac05(_0x3d084c){return _0x3d084c instanceof _0x2c8604?_0x3d084c:new _0x2c8604(function(_0x439fd5){_0x439fd5(_0x3d084c);});}return new(_0x2c8604||(_0x2c8604=Promise))(function(_0x5a259f,_0x4e313c){function _0x134ea6(_0x2682ea){try{_0x1956ff(_0x37c5ef['next'](_0x2682ea));}catch(_0x5b95dd){_0x4e313c(_0x5b95dd);}}function _0xff834a(_0x5ccef1){try{_0x1956ff(_0x37c5ef['throw'](_0x5ccef1));}catch(_0x2ee553){_0x4e313c(_0x2ee553);}}function _0x1956ff(_0x40258a){_0x40258a['done']?_0x5a259f(_0x40258a['value']):_0x1eac05(_0x40258a['value'])['then'](_0x134ea6,_0xff834a);}_0x1956ff((_0x37c5ef=_0x37c5ef['apply'](_0x5e8413,_0x122df5||[]))['next']());});};class ContributorService{constructor(_0x231ce0){this['fetch']=_0x231ce0,this['path']='contributor';}['create'](_0xdc7e91,_0x4843fb,_0x1d79a3,_0x44c517){return __awaiter$4(this,void 0,void 0,function*(){const _0x1cb185={'account_name':_0xdc7e91,'list_name':_0x4843fb,'contributor_name':_0x1d79a3};try{const _0x3d5cab=yield this['fetch']['post'](this['path'],_0x44c517,_0x1cb185);if(_0x3d5cab['status']>0xc7&&_0x3d5cab['status']<0x12c){const _0x17de9e=yield _0x3d5cab['json']();return new SuccessfulContributorResponse(_0x17de9e);}const _0x39601c=yield _0x3d5cab['json']();return new FailedContributorResponse(_0x39601c);}catch(_0x49d031){if(_0x49d031 instanceof Error)return new FailedContributorResponse({'detail':_0x49d031['message'],'title':_0x49d031['name'],'status':0x1f4,'instance':'','type':''});throw _0x49d031;}});}['remove'](_0x2ed585,_0x251e4b,_0x5772cf,_0x502634){return __awaiter$4(this,void 0,void 0,function*(){const _0xae1833=this['path']+'/'+_0x2ed585+'/'+_0x251e4b+'/'+_0x5772cf,_0x2e10df=yield this['fetch']['delete'](_0xae1833,_0x502634);try{if(_0x2e10df['status']>0xc7&&_0x2e10df['status']<0x12c)return new SuccessfulResponse({});const _0x1d0771=yield _0x2e10df['json']();return new FailedResponse(_0x1d0771);}catch(_0x1fccf7){if(_0x1fccf7 instanceof Error)return new FailedResponse({'detail':_0x1fccf7['message'],'title':_0x1fccf7['name'],'status':0x1f4,'instance':'','type':''});throw _0x1fccf7;}});}['startsWith'](_0x4f3702,_0x53f92f){return __awaiter$4(this,void 0,void 0,function*(){const _0x44b4af=this['path']+'/'+_0x4f3702;try{const _0x6a242a=yield this['fetch']['get'](_0x44b4af,_0x53f92f);if(_0x6a242a['status']>0xc7&&_0x6a242a['status']<0x12c){const _0x5acd10=yield _0x6a242a['json']();return new SuccessfulAccountAndImageResponse(_0x5acd10);}const _0x468b7b=yield _0x6a242a['json']();return new FailedAccountAndImageResponse(_0x468b7b);}catch(_0x123422){if(_0x123422 instanceof Error)return new FailedAccountAndImageResponse({'detail':_0x123422['message'],'title':_0x123422['name'],'status':0x1f4,'instance':'','type':''});throw _0x123422;}});}}
|
|
18
18
|
|
|
19
|
-
var __awaiter$3=undefined&&undefined['__awaiter']||function(
|
|
19
|
+
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x272c72,_0x7ff1c6,_0x166b4d,_0x43ebc0){function _0x1765ea(_0x189301){return _0x189301 instanceof _0x166b4d?_0x189301:new _0x166b4d(function(_0x2c2af6){_0x2c2af6(_0x189301);});}return new(_0x166b4d||(_0x166b4d=Promise))(function(_0x1e44fc,_0x57f99a){function _0x5d9b26(_0x3e309e){try{_0x546e1c(_0x43ebc0['next'](_0x3e309e));}catch(_0x526aee){_0x57f99a(_0x526aee);}}function _0x366c90(_0x5e8dce){try{_0x546e1c(_0x43ebc0['throw'](_0x5e8dce));}catch(_0x541d3a){_0x57f99a(_0x541d3a);}}function _0x546e1c(_0x1f2e5e){_0x1f2e5e['done']?_0x1e44fc(_0x1f2e5e['value']):_0x1765ea(_0x1f2e5e['value'])['then'](_0x5d9b26,_0x366c90);}_0x546e1c((_0x43ebc0=_0x43ebc0['apply'](_0x272c72,_0x7ff1c6||[]))['next']());});};class SearchableFieldService{constructor(_0x39568a){this['fetch']=_0x39568a,this['path']='searchable-field';}['create'](_0x5e755b,_0x534998,_0xd29694,_0x48d4c2){return __awaiter$3(this,void 0,void 0,function*(){const _0x419b79={'account_name':_0x5e755b,'list_name':_0x534998,'searchable_field_name':_0xd29694};try{const _0x581a20=yield this['fetch']['post'](this['path'],_0x48d4c2,_0x419b79);if(_0x581a20['status']>0xc7&&_0x581a20['status']<0x12c){const _0x333c7e=yield _0x581a20['json']();return new SuccessfulSearchableFieldResponse(_0x333c7e);}const _0x473b59=yield _0x581a20['json']();return new FailedSearchableFieldResponse(_0x473b59);}catch(_0x386c34){if(_0x386c34 instanceof Error)return new FailedSearchableFieldResponse({'detail':_0x386c34['message'],'title':_0x386c34['name'],'status':0x1f4,'instance':'','type':''});throw _0x386c34;}});}['remove'](_0x42ec3d,_0x542060,_0x3f5dd7,_0x4e4f61){return __awaiter$3(this,void 0,void 0,function*(){const _0x4344d0=this['path']+'/'+_0x42ec3d+'/'+_0x542060+'/'+_0x3f5dd7,_0xd8920=yield this['fetch']['delete'](_0x4344d0,_0x4e4f61);try{if(_0xd8920['status']>0xc7&&_0xd8920['status']<0x12c)return new SuccessfulResponse({});const _0x28350b=yield _0xd8920['json']();return new FailedResponse(_0x28350b);}catch(_0x46f0d7){if(_0x46f0d7 instanceof Error)return new FailedResponse({'detail':_0x46f0d7['message'],'title':_0x46f0d7['name'],'status':0x1f4,'instance':'','type':''});throw _0x46f0d7;}});}['rename'](_0x3f861b,_0x16efd1,_0x54d667,_0x28707f,_0x4b0d2b){return __awaiter$3(this,void 0,void 0,function*(){let _0x318bd7=this['path']+'/'+_0x3f861b+'/'+_0x16efd1;const _0x121532={'searchable_field_name':_0x54d667,'new_searchable_field_name':_0x28707f};try{const _0x3ce489=yield this['fetch']['put'](_0x318bd7,_0x4b0d2b,_0x121532);if(_0x3ce489['status']>0xc7&&_0x3ce489['status']<0x12c){const _0x3c34a9=yield _0x3ce489['json']();return new SuccessfulSearchableFieldResponse(_0x3c34a9);}const _0xac726c=yield _0x3ce489['json']();return new FailedSearchableFieldResponse(_0xac726c);}catch(_0x377fe6){if(_0x377fe6 instanceof Error)return new FailedSearchableFieldResponse({'detail':_0x377fe6['message'],'title':_0x377fe6['name'],'status':0x1f4,'instance':'','type':''});throw _0x377fe6;}});}}
|
|
20
20
|
|
|
21
|
-
var __awaiter$2=undefined&&undefined['__awaiter']||function(
|
|
21
|
+
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x56d8b1,_0x35dec7,_0x68593,_0x3e708d){function _0x4f6c6c(_0xe86dc1){return _0xe86dc1 instanceof _0x68593?_0xe86dc1:new _0x68593(function(_0x2f857d){_0x2f857d(_0xe86dc1);});}return new(_0x68593||(_0x68593=Promise))(function(_0xad522b,_0x9b4bc4){function _0x351f9a(_0x209937){try{_0x468ac7(_0x3e708d['next'](_0x209937));}catch(_0x39d31e){_0x9b4bc4(_0x39d31e);}}function _0x1979c1(_0x1a5481){try{_0x468ac7(_0x3e708d['throw'](_0x1a5481));}catch(_0x41dd9f){_0x9b4bc4(_0x41dd9f);}}function _0x468ac7(_0x507db8){_0x507db8['done']?_0xad522b(_0x507db8['value']):_0x4f6c6c(_0x507db8['value'])['then'](_0x351f9a,_0x1979c1);}_0x468ac7((_0x3e708d=_0x3e708d['apply'](_0x56d8b1,_0x35dec7||[]))['next']());});};class ResourceService{constructor(_0xb2d43c){this['fetch']=_0xb2d43c,this['path']='resource';}['create'](_0x2fe6ff,_0x5f0b14,_0x53b147,_0x1bdd63){return __awaiter$2(this,void 0,void 0,function*(){const _0x2cf558={'account_name':_0x2fe6ff,'list_name':_0x5f0b14,'resource_name':_0x53b147};try{const _0x5a42b1=yield this['fetch']['post'](this['path'],_0x1bdd63,_0x2cf558);if(_0x5a42b1['status']>0xc7&&_0x5a42b1['status']<0x12c){const _0x278352=yield _0x5a42b1['json']();return new SuccessfulResourceResponse(_0x278352);}const _0x435de0=yield _0x5a42b1['json']();return new FailedResourceResponse(_0x435de0);}catch(_0x3dedeb){if(_0x3dedeb instanceof Error)return new FailedResourceResponse({'detail':_0x3dedeb['message'],'title':_0x3dedeb['name'],'status':0x1f4,'instance':'','type':''});throw _0x3dedeb;}});}['remove'](_0x301b2b,_0x2622b0,_0x4ee2a9,_0x115d06){return __awaiter$2(this,void 0,void 0,function*(){const _0x1b17b9=this['path']+'/'+_0x301b2b+'/'+_0x2622b0+'/'+_0x4ee2a9,_0x340274=yield this['fetch']['delete'](_0x1b17b9,_0x115d06);try{if(_0x340274['status']>0xc7&&_0x340274['status']<0x12c)return new SuccessfulResponse({});const _0x221150=yield _0x340274['json']();return new FailedResponse(_0x221150);}catch(_0x3f0289){if(_0x3f0289 instanceof Error)return new FailedResponse({'detail':_0x3f0289['message'],'title':_0x3f0289['name'],'status':0x1f4,'instance':'','type':''});throw _0x3f0289;}});}['rename'](_0x303eb1,_0x3aa7ab,_0x2fc2f5,_0x262545,_0x3820be){return __awaiter$2(this,void 0,void 0,function*(){let _0x4ec041=this['path']+'/'+_0x303eb1+'/'+_0x3aa7ab;const _0x81c30d={'resource_name':_0x2fc2f5,'new_resource_name':_0x262545};try{const _0x4af6dc=yield this['fetch']['put'](_0x4ec041,_0x3820be,_0x81c30d);if(_0x4af6dc['status']>0xc7&&_0x4af6dc['status']<0x12c){const _0x59cff9=yield _0x4af6dc['json']();return new SuccessfulResourceResponse(_0x59cff9);}const _0x35c3e4=yield _0x4af6dc['json']();return new FailedResourceResponse(_0x35c3e4);}catch(_0x319026){if(_0x319026 instanceof Error)return new FailedResourceResponse({'detail':_0x319026['message'],'title':_0x319026['name'],'status':0x1f4,'instance':'','type':''});throw _0x319026;}});}}
|
|
22
22
|
|
|
23
|
-
var __awaiter$1=undefined&&undefined['__awaiter']||function(
|
|
23
|
+
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x44dd60,_0x399a2f,_0x46b3af,_0x103281){function _0x43fd46(_0x4fce40){return _0x4fce40 instanceof _0x46b3af?_0x4fce40:new _0x46b3af(function(_0x23e064){_0x23e064(_0x4fce40);});}return new(_0x46b3af||(_0x46b3af=Promise))(function(_0x57b57c,_0x59ff5f){function _0xa59ba9(_0x3ddab5){try{_0xaf9182(_0x103281['next'](_0x3ddab5));}catch(_0x26b4c8){_0x59ff5f(_0x26b4c8);}}function _0x47700b(_0x3c4b07){try{_0xaf9182(_0x103281['throw'](_0x3c4b07));}catch(_0x2e5a6e){_0x59ff5f(_0x2e5a6e);}}function _0xaf9182(_0x1b8014){_0x1b8014['done']?_0x57b57c(_0x1b8014['value']):_0x43fd46(_0x1b8014['value'])['then'](_0xa59ba9,_0x47700b);}_0xaf9182((_0x103281=_0x103281['apply'](_0x44dd60,_0x399a2f||[]))['next']());});};class GroupService{constructor(_0x3e7b4f){this['fetch']=_0x3e7b4f,this['path']='group',this['List']=new GroupListService(_0x3e7b4f);}['create'](_0x250422,_0xed61d0,_0x281ccc,_0x1cdeb8){return __awaiter$1(this,void 0,void 0,function*(){const _0x28144={'account_name':_0x250422,'search_service_name':_0xed61d0,'group_name':_0x281ccc};try{const _0x3856c5=yield this['fetch']['post'](this['path'],_0x1cdeb8,_0x28144);if(_0x3856c5['status']>0xc7&&_0x3856c5['status']<0x12c){const _0x2cf8af=yield _0x3856c5['json']();return new SuccessfulGroupResponse(_0x2cf8af);}const _0x48b9d1=yield _0x3856c5['json']();return new FailedGroupResponse(_0x48b9d1);}catch(_0x512f6d){if(_0x512f6d instanceof Error)return new FailedGroupResponse({'detail':_0x512f6d['message'],'title':_0x512f6d['name'],'status':0x1f4,'instance':'','type':''});throw _0x512f6d;}});}['delete'](_0x274c75,_0x44b4f1,_0x466ff0){return __awaiter$1(this,void 0,void 0,function*(){const _0x5a4c93=this['path']+'/'+_0x274c75+'/'+_0x44b4f1,_0x463eac=yield this['fetch']['delete'](_0x5a4c93,_0x466ff0);try{if(_0x463eac['status']>0xc7&&_0x463eac['status']<0x12c)return new SuccessfulResponse({});const _0x1e90e2=yield _0x463eac['json']();return new FailedResponse(_0x1e90e2);}catch(_0x23abd4){if(_0x23abd4 instanceof Error)return new FailedResponse({'detail':_0x23abd4['message'],'title':_0x23abd4['name'],'status':0x1f4,'instance':'','type':''});throw _0x23abd4;}});}['edit'](_0x3722eb,_0x19b684,_0x5c20f2,_0x489418){return __awaiter$1(this,void 0,void 0,function*(){const _0x4cb1de=this['path']+'/'+_0x3722eb+'/'+_0x19b684,_0x1748c9=yield this['fetch']['put'](_0x4cb1de,_0x5c20f2,_0x489418);try{if(_0x1748c9['status']>0xc7&&_0x1748c9['status']<0x12c){const _0x5ec90a=yield _0x1748c9['json']();return new SuccessfulGroupResponse(_0x5ec90a);}const _0x1e2c61=yield _0x1748c9['json']();return new FailedGroupResponse(_0x1e2c61);}catch(_0x39b6d3){if(_0x39b6d3 instanceof Error)return new FailedGroupResponse({'detail':_0x39b6d3['message'],'title':_0x39b6d3['name'],'status':0x1f4,'instance':'','type':''});throw _0x39b6d3;}});}['transfer'](_0x58b809,_0x25ae48,_0x19ee4d,_0x4a2414){return __awaiter$1(this,void 0,void 0,function*(){const _0x1067cf={'new_search_service_name':_0x19ee4d};try{const _0x170dd0=yield this['fetch']['put'](this['path']+'/transfer/'+_0x58b809+'/'+_0x25ae48,_0x4a2414,_0x1067cf);if(_0x170dd0['status']>0xc7&&_0x170dd0['status']<0x12c){const _0x399dad=yield _0x170dd0['json']();return new SuccessfulGroupResponse(_0x399dad);}const _0x238409=yield _0x170dd0['json']();return new FailedGroupResponse(_0x238409);}catch(_0x1e5059){if(_0x1e5059 instanceof Error)return new FailedGroupResponse({'detail':_0x1e5059['message'],'title':_0x1e5059['name'],'status':0x1f4,'instance':'','type':''});throw _0x1e5059;}});}}class GroupListService{constructor(_0x19dfd8){this['fetch']=_0x19dfd8,this['path']='group/list';}['add'](_0x24526b,_0xabfec9,_0x22281b,_0x143623,_0x53a454){return __awaiter$1(this,void 0,void 0,function*(){const _0x5ddfdf={'list_name':_0x22281b,'version':_0x143623};try{const _0x4ad282=yield this['fetch']['put'](this['path']+'/'+_0x24526b+'/'+_0xabfec9,_0x53a454,_0x5ddfdf);if(_0x4ad282['status']>0xc7&&_0x4ad282['status']<0x12c){const _0x15138c=yield _0x4ad282['json']();return new SuccessfulGroupResponse(_0x15138c);}const _0x59377d=yield _0x4ad282['json']();return new FailedGroupResponse(_0x59377d);}catch(_0x1992f8){if(_0x1992f8 instanceof Error)return new FailedGroupResponse({'detail':_0x1992f8['message'],'title':_0x1992f8['name'],'status':0x1f4,'instance':'','type':''});throw _0x1992f8;}});}['remove'](_0xec35f7,_0xdb4de4,_0x4af0e8,_0x21bd51){return __awaiter$1(this,void 0,void 0,function*(){const _0x28afe9=this['path']+'/'+_0xec35f7+'/'+_0xdb4de4+'/'+_0x4af0e8,_0x1438d8=yield this['fetch']['delete'](_0x28afe9,_0x21bd51);try{if(_0x1438d8['status']>0xc7&&_0x1438d8['status']<0x12c){const _0x29081d=yield _0x1438d8['json']();return new SuccessfulGroupResponse(_0x29081d);}const _0x2dc679=yield _0x1438d8['json']();return new FailedGroupResponse(_0x2dc679);}catch(_0x25fac6){if(_0x25fac6 instanceof Error)return new FailedGroupResponse({'detail':_0x25fac6['message'],'title':_0x25fac6['name'],'status':0x1f4,'instance':'','type':''});throw _0x25fac6;}});}}
|
|
24
24
|
|
|
25
|
-
var __awaiter=undefined&&undefined['__awaiter']||function(
|
|
25
|
+
var __awaiter=undefined&&undefined['__awaiter']||function(_0x214e19,_0x22449e,_0x566e78,_0x1454da){function _0xa348d2(_0x5b3cdb){return _0x5b3cdb instanceof _0x566e78?_0x5b3cdb:new _0x566e78(function(_0x28d21a){_0x28d21a(_0x5b3cdb);});}return new(_0x566e78||(_0x566e78=Promise))(function(_0x524913,_0x21b8e2){function _0x4843c6(_0x1fbbb0){try{_0x5b036a(_0x1454da['next'](_0x1fbbb0));}catch(_0x57046d){_0x21b8e2(_0x57046d);}}function _0x27164e(_0x10a9fb){try{_0x5b036a(_0x1454da['throw'](_0x10a9fb));}catch(_0x5b7181){_0x21b8e2(_0x5b7181);}}function _0x5b036a(_0x55292d){_0x55292d['done']?_0x524913(_0x55292d['value']):_0xa348d2(_0x55292d['value'])['then'](_0x4843c6,_0x27164e);}_0x5b036a((_0x1454da=_0x1454da['apply'](_0x214e19,_0x22449e||[]))['next']());});};class AdminClient{constructor(_0x104958='https://admin.searchability.dev/'){var _0x1c1d59=new Fetch(_0x104958);this['Accounts']=new AccountService(_0x1c1d59),this['Lists']=new ListService(_0x1c1d59),this['ApiKeys']=new ApiKeyService(_0x1c1d59),this['SearchServers']=new SearchServersService(_0x1c1d59),this['Facets']=new FacetService(_0x1c1d59),this['SearchResults']=new SearchResultService(_0x1c1d59),this['Contributors']=new ContributorService(_0x1c1d59),this['SearchableFields']=new SearchableFieldService(_0x1c1d59),this['Groups']=new GroupService(_0x1c1d59),this['Resources']=new ResourceService(_0x1c1d59);}}class AuthClient{constructor(_0x523413='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x523413);}['login'](_0x248d4f){return __awaiter(this,void 0,void 0,function*(){const _0x70f1c9='login/'+_0x248d4f;try{const _0x5c1b57=yield yield fetch(_0x70f1c9);if(_0x5c1b57['status']>0xc7&&_0x5c1b57['status']<0x12c){const _0x1215a3=yield _0x5c1b57['json']();return new SuccessfulAuthResponse(_0x1215a3);}const _0x46c362=yield _0x5c1b57['json']();return new FailedAuthResponse(_0x46c362);}catch(_0x34dd1f){if(_0x34dd1f instanceof Error)return new FailedAuthResponse({'detail':_0x34dd1f['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x34dd1f;}});}['refresh'](_0x54f374){return __awaiter(this,void 0,void 0,function*(){const _0x4eb210='refresh',_0x77dabb={'refresh_token':_0x54f374};try{const _0x3f7126=yield this['fetch']['PostNoAuth'](_0x4eb210,_0x77dabb);if(_0x3f7126['status']>0xc7&&_0x3f7126['status']<0x12c){const _0x4f8827=yield _0x3f7126['json']();return new SuccessfulAuthResponse(_0x4f8827);}const _0x1c6e63=yield _0x3f7126['json']();return new FailedAuthResponse(_0x1c6e63);}catch(_0x105ca2){if(_0x105ca2 instanceof Error)return new FailedAuthResponse({'detail':_0x105ca2['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x105ca2;}});}['getTokenStatus'](_0x295797){if(Date['now']()<_0x295797['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x295797['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
|
|
26
26
|
|
|
27
27
|
export { AdminClient, AuthClient, TokenStatus, Tokens };
|
package/dist/types.d.ts
CHANGED
|
@@ -12,9 +12,12 @@ declare class Fetch {
|
|
|
12
12
|
|
|
13
13
|
declare class AccountService {
|
|
14
14
|
private readonly fetch;
|
|
15
|
+
private readonly path;
|
|
15
16
|
constructor(fetch: Fetch);
|
|
16
17
|
get(accountName: string, access_token: string): Promise<Response<Account, Problem>>;
|
|
17
18
|
getImage(accountName: string, access_token: string): Promise<Response<AccountImage, Problem>>;
|
|
19
|
+
feedback(account_name: string, email_address: string, feedback: string, access_token: string): Promise<Response<any, Problem>>;
|
|
20
|
+
delete(account_name: string, access_token: string): Promise<Response<any, Problem>>;
|
|
18
21
|
}
|
|
19
22
|
|
|
20
23
|
declare class ApiKeyService {
|