@searchability/admin-client 0.0.79 → 0.0.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
var TokenStatus;(function(_0x3afa43){_0x3afa43[_0x3afa43['Ok']=0x0]='Ok',_0x3afa43[_0x3afa43['Refresh']=0x1]='Refresh',_0x3afa43[_0x3afa43['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(_0x4f18bf){this['isSuccess']=_0x4f18bf;}}class SuccessfulContributorResponse extends Response{constructor(_0x2c4a1a){super(!![]),this['contributor']=_0x2c4a1a;}['toSuccess'](){return this['contributor'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedContributorResponse extends Response{constructor(_0x2b9699){super(![]),this['problem']=_0x2b9699;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountAndImageResponse extends Response{constructor(_0x175595){super(!![]),this['accountAndImages']=_0x175595;}['toSuccess'](){return this['accountAndImages'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountAndImageResponse extends Response{constructor(_0x5eaf8f){super(![]),this['problem']=_0x5eaf8f;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulFacetResponse extends Response{constructor(_0x2271a2){super(!![]),this['facet']=_0x2271a2;}['toSuccess'](){return this['facet'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetResponse extends Response{constructor(_0x4cc3a6){super(![]),this['problem']=_0x4cc3a6;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountResponse extends Response{constructor(_0x284544){super(!![]),this['account']=_0x284544;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountImageResponse extends Response{constructor(_0x2a5164){super(!![]),this['accountImage']=_0x2a5164;}['toSuccess'](){return this['accountImage'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListIdentityResponse extends Response{constructor(_0x150976){super(!![]),this['list']=_0x150976;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListResponse extends Response{constructor(_0x3532ff){super(!![]),this['list']=_0x3532ff;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x292b78){super(![]),this['problem']=_0x292b78;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountImageResponse extends Response{constructor(_0x4d9d2c){super(![]),this['problem']=_0x4d9d2c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListIdentityResponse extends Response{constructor(_0x5c89e1){super(![]),this['problem']=_0x5c89e1;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListResponse extends Response{constructor(_0x1cf69d){super(![]),this['problem']=_0x1cf69d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x34069d){super(!![]),this['tokens']=_0x34069d;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x1bdd25){super(![]),this['problem']=_0x1bdd25;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x12ed37){super(!![]),this['apiKey']=_0x12ed37;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x112190){super(![]),this['problem']=_0x112190;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x201b85){super(!![]),this['searchService']=_0x201b85;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x2cd972){super(![]),this['problem']=_0x2cd972;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x500e27){super(!![]),this['searchService']=_0x500e27;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulViewSearchResultResponse extends Response{constructor(_0x1a448d){super(!![]),this['searchResult']=_0x1a448d;}['toSuccess'](){return this['searchResult'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchResultResponse extends Response{constructor(_0x34b46c){super(![]),this['problem']=_0x34b46c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchResultResponse extends Response{constructor(_0x1f0df9){super(!![]),this['searchResults']=_0x1f0df9;}['toSuccess'](){return this['searchResults'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchResultResponse extends Response{constructor(_0x369d59){super(![]),this['problem']=_0x369d59;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchServiceResponse extends Response{constructor(_0x28098b){super(!![]),this['searchServices']=_0x28098b;}['toSuccess'](){return this['searchServices'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServicesResponse extends Response{constructor(_0x48bd53){super(![]),this['problem']=_0x48bd53;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedViewSearchServiceResponse extends Response{constructor(_0x26cbba){super(![]),this['problem']=_0x26cbba;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x47a189){super(!![]),this['apiKeyValue']=_0x47a189;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x460dd0){super(!![]),this['obj']=_0x460dd0;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x277e7f){super(![]),this['problem']=_0x277e7f;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0xa12ea2){super(![]),this['problem']=_0xa12ea2;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
|
|
2
|
+
|
|
3
|
+
var __awaiter$8=undefined&&undefined['__awaiter']||function(_0x7172cc,_0x2affcb,_0x2a92d8,_0x5518f8){function _0x511436(_0x1dfa48){return _0x1dfa48 instanceof _0x2a92d8?_0x1dfa48:new _0x2a92d8(function(_0x271465){_0x271465(_0x1dfa48);});}return new(_0x2a92d8||(_0x2a92d8=Promise))(function(_0x1fd85b,_0x484dbe){function _0xbc1331(_0x53c393){try{_0x517f7c(_0x5518f8['next'](_0x53c393));}catch(_0x370ab4){_0x484dbe(_0x370ab4);}}function _0xbc0458(_0x25b12f){try{_0x517f7c(_0x5518f8['throw'](_0x25b12f));}catch(_0xf2a1b7){_0x484dbe(_0xf2a1b7);}}function _0x517f7c(_0x59b4e2){_0x59b4e2['done']?_0x1fd85b(_0x59b4e2['value']):_0x511436(_0x59b4e2['value'])['then'](_0xbc1331,_0xbc0458);}_0x517f7c((_0x5518f8=_0x5518f8['apply'](_0x7172cc,_0x2affcb||[]))['next']());});};class AccountService{constructor(_0x1f5276){this['fetch']=_0x1f5276;}['get'](_0x20ad49,_0x53d0c1){return __awaiter$8(this,void 0,void 0,function*(){const _0x3cf909='Account/'+_0x20ad49+'/',_0x4644c9=yield this['fetch']['get'](_0x3cf909,_0x53d0c1);try{if(_0x4644c9['status']>0xc7&&_0x4644c9['status']<0x12c){const _0x4b3354=yield _0x4644c9['json']();return new SuccessfulAccountResponse(_0x4b3354);}const _0x486c47=yield _0x4644c9['json']();return new FailedAccountResponse(_0x486c47);}catch(_0x567f58){if(_0x567f58 instanceof Error)return new FailedAccountResponse({'detail':_0x567f58['message'],'title':_0x567f58['name'],'status':0x1f4,'instance':'','type':''});throw _0x567f58;}});}['getImage'](_0x2531bc,_0x5a886d){return __awaiter$8(this,void 0,void 0,function*(){const _0x2edcac='account/image/'+_0x2531bc+'/',_0x58c36d=yield this['fetch']['get'](_0x2edcac,_0x5a886d);try{if(_0x58c36d['status']>0xc7&&_0x58c36d['status']<0x12c){const _0x358323=yield _0x58c36d['json']();return new SuccessfulAccountImageResponse(_0x358323);}const _0x1fc324=yield _0x58c36d['json']();return new FailedAccountImageResponse(_0x1fc324);}catch(_0x1baea0){if(_0x1baea0 instanceof Error)return new FailedAccountImageResponse({'detail':_0x1baea0['message'],'title':_0x1baea0['name'],'status':0x1f4,'instance':'','type':''});throw _0x1baea0;}});}}
|
|
4
|
+
|
|
5
|
+
var __awaiter$7=undefined&&undefined['__awaiter']||function(_0x2d70fe,_0x17751b,_0x5d9818,_0x22cb6e){function _0x1343d7(_0x176258){return _0x176258 instanceof _0x5d9818?_0x176258:new _0x5d9818(function(_0x506054){_0x506054(_0x176258);});}return new(_0x5d9818||(_0x5d9818=Promise))(function(_0x553fe7,_0x110211){function _0x53b023(_0x3534dd){try{_0x30042e(_0x22cb6e['next'](_0x3534dd));}catch(_0x365179){_0x110211(_0x365179);}}function _0x5d0dad(_0x41a807){try{_0x30042e(_0x22cb6e['throw'](_0x41a807));}catch(_0x24e592){_0x110211(_0x24e592);}}function _0x30042e(_0x35ad3e){_0x35ad3e['done']?_0x553fe7(_0x35ad3e['value']):_0x1343d7(_0x35ad3e['value'])['then'](_0x53b023,_0x5d0dad);}_0x30042e((_0x22cb6e=_0x22cb6e['apply'](_0x2d70fe,_0x17751b||[]))['next']());});};class ApiKeyService{constructor(_0x2d19c1){this['fetch']=_0x2d19c1,this['path']='api-key';}['create'](_0x2e9f1b,_0x44fa0f,_0x5a4103){return __awaiter$7(this,void 0,void 0,function*(){const _0x355e52={'account_name':_0x2e9f1b,'api_key_name':_0x44fa0f};try{const _0x6c06c5=yield this['fetch']['post'](this['path'],_0x5a4103,_0x355e52);if(_0x6c06c5['status']>0xc7&&_0x6c06c5['status']<0x12c){const _0x1f250b=yield _0x6c06c5['json']();return new SuccessfulApiKeyResponse(_0x1f250b);}const _0x2ed95e=yield _0x6c06c5['json']();return new FailedApiKeyResponse(_0x2ed95e);}catch(_0x400f24){if(_0x400f24 instanceof Error)return new FailedApiKeyResponse({'detail':_0x400f24['message'],'title':_0x400f24['name'],'status':0x1f4,'instance':'','type':''});throw _0x400f24;}});}['view'](_0x11dd15,_0x4b78b1,_0x2e964e){return __awaiter$7(this,void 0,void 0,function*(){const _0x45b3d4=this['path']+'/'+_0x11dd15+'/'+_0x4b78b1;try{const _0x405c4d=yield this['fetch']['get'](_0x45b3d4,_0x2e964e);if(_0x405c4d['status']>0xc7&&_0x405c4d['status']<0x12c){const _0x11f605=yield _0x405c4d['json']();return new SuccessfulApiKeyValueResponse(_0x11f605);}const _0x3127de=yield _0x405c4d['json']();return new FailedApiKeyValueResponse(_0x3127de);}catch(_0x44f7be){if(_0x44f7be instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x44f7be['message'],'title':_0x44f7be['name'],'status':0x1f4,'instance':'','type':''});throw _0x44f7be;}});}['delete'](_0x53b833,_0x165eda,_0xc495b6){return __awaiter$7(this,void 0,void 0,function*(){const _0x3e3b65=this['path']+'/'+_0x53b833+'/'+_0x165eda;try{const _0x1985c7=yield this['fetch']['delete'](_0x3e3b65,_0xc495b6);if(_0x1985c7['status']>0xc7&&_0x1985c7['status']<0x12c)return new SuccessfulResponse({});const _0x2d8981=yield _0x1985c7['json']();return new FailedResponse(_0x2d8981);}catch(_0x18e2e2){if(_0x18e2e2 instanceof Error)return new FailedResponse({'detail':_0x18e2e2['message'],'title':_0x18e2e2['name'],'status':0x1f4,'instance':'','type':''});throw _0x18e2e2;}});}}
|
|
6
|
+
|
|
7
|
+
var __awaiter$6=undefined&&undefined['__awaiter']||function(_0x3374fe,_0x3933c0,_0x112145,_0x2429e8){function _0x1e88e1(_0x4b7a13){return _0x4b7a13 instanceof _0x112145?_0x4b7a13:new _0x112145(function(_0xac2ad8){_0xac2ad8(_0x4b7a13);});}return new(_0x112145||(_0x112145=Promise))(function(_0x1bc38b,_0x45fcb2){function _0x4dd164(_0x27365b){try{_0xec0eb1(_0x2429e8['next'](_0x27365b));}catch(_0x3aa1de){_0x45fcb2(_0x3aa1de);}}function _0xa4783a(_0x42cd5f){try{_0xec0eb1(_0x2429e8['throw'](_0x42cd5f));}catch(_0x426470){_0x45fcb2(_0x426470);}}function _0xec0eb1(_0x2f2881){_0x2f2881['done']?_0x1bc38b(_0x2f2881['value']):_0x1e88e1(_0x2f2881['value'])['then'](_0x4dd164,_0xa4783a);}_0xec0eb1((_0x2429e8=_0x2429e8['apply'](_0x3374fe,_0x3933c0||[]))['next']());});};class ListService{constructor(_0x4c79bc){this['fetch']=_0x4c79bc;}['create'](_0x1ae926,_0x408b44,_0x41588a,_0x47aa7c){return __awaiter$6(this,void 0,void 0,function*(){const _0x41f6a6='List',_0x420c3c={'account_name':_0x1ae926,'list_name':_0x408b44,'search_service_name':_0x41588a};try{const _0x393f7f=yield this['fetch']['post'](_0x41f6a6,_0x47aa7c,_0x420c3c);if(_0x393f7f['status']>0xc7&&_0x393f7f['status']<0x12c){const _0x576863=yield _0x393f7f['json']();return new SuccessfulListIdentityResponse(_0x576863);}const _0x412363=yield _0x393f7f['json']();return new FailedListIdentityResponse(_0x412363);}catch(_0x3ccf3a){if(_0x3ccf3a instanceof Error)return new FailedListIdentityResponse({'detail':_0x3ccf3a['message'],'title':_0x3ccf3a['name'],'status':0x1f4,'instance':'','type':''});throw _0x3ccf3a;}});}['delete'](_0x289a38,_0x2abd4c,_0x48a108){return __awaiter$6(this,void 0,void 0,function*(){const _0xe2434b='List/'+_0x289a38+'/'+_0x2abd4c,_0x6aad75=yield this['fetch']['delete'](_0xe2434b,_0x48a108);try{if(_0x6aad75['status']>0xc7&&_0x6aad75['status']<0x12c)return new SuccessfulResponse({});const _0x2b3e2b=yield _0x6aad75['json']();return new FailedResponse(_0x2b3e2b);}catch(_0x86d4c9){if(_0x86d4c9 instanceof Error)return new FailedResponse({'detail':_0x86d4c9['message'],'title':_0x86d4c9['name'],'status':0x1f4,'instance':'','type':''});throw _0x86d4c9;}});}['get'](_0x354bd7,_0x34a236,_0x7dc113){return __awaiter$6(this,void 0,void 0,function*(){const _0x2c1d58='List/'+_0x354bd7+'/'+_0x34a236;try{const _0xb65fb8=yield this['fetch']['get'](_0x2c1d58,_0x7dc113);if(_0xb65fb8['status']>0xc7&&_0xb65fb8['status']<0x12c){const _0x2e2668=yield _0xb65fb8['json']();return new SuccessfulListResponse(_0x2e2668);}const _0x162beb=yield _0xb65fb8['json']();return new FailedListResponse(_0x162beb);}catch(_0xaf2d30){if(_0xaf2d30 instanceof Error)return new FailedListResponse({'detail':_0xaf2d30['message'],'title':_0xaf2d30['name'],'status':0x1f4,'instance':'','type':''});throw _0xaf2d30;}});}}
|
|
8
|
+
|
|
9
|
+
var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x4dbbc8,_0x3320b6,_0x2f287d,_0x45e63e){function _0x5aefcd(_0x10f70d){return _0x10f70d instanceof _0x2f287d?_0x10f70d:new _0x2f287d(function(_0x4a1fab){_0x4a1fab(_0x10f70d);});}return new(_0x2f287d||(_0x2f287d=Promise))(function(_0x351821,_0x68591d){function _0x3f98fb(_0xe091e3){try{_0x36efef(_0x45e63e['next'](_0xe091e3));}catch(_0x16ab4f){_0x68591d(_0x16ab4f);}}function _0x21f22f(_0x2fcda0){try{_0x36efef(_0x45e63e['throw'](_0x2fcda0));}catch(_0x561eed){_0x68591d(_0x561eed);}}function _0x36efef(_0x4f9e34){_0x4f9e34['done']?_0x351821(_0x4f9e34['value']):_0x5aefcd(_0x4f9e34['value'])['then'](_0x3f98fb,_0x21f22f);}_0x36efef((_0x45e63e=_0x45e63e['apply'](_0x4dbbc8,_0x3320b6||[]))['next']());});};class Fetch{constructor(_0xf404ef){this['baseUri']=_0xf404ef,this['getUrl']=_0x576948=>{return _0x576948['startsWith']('/')&&(_0x576948=_0x576948['replace']('/','')),''+this['baseUri']+_0x576948;},!_0xf404ef['endsWith']('/')&&(_0xf404ef=_0xf404ef+'/');}['get'](_0x1c33b4,_0x55dd77){return __awaiter$5(this,void 0,void 0,function*(){const _0x1aedaf=this['getUrl'](_0x1c33b4);return yield fetch(_0x1aedaf,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x55dd77}});});}['post'](_0x1a4cfa,_0x23544f,_0x5409f3){return __awaiter$5(this,void 0,void 0,function*(){const _0x126893=this['getUrl'](_0x1a4cfa);return yield fetch(_0x126893,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x23544f},'body':_0x5409f3?JSON['stringify'](_0x5409f3):null});});}['PostNoAuth'](_0x44ab98,_0x57a383){return __awaiter$5(this,void 0,void 0,function*(){const _0x24b6d4=this['getUrl'](_0x44ab98);return yield fetch(_0x24b6d4,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0x57a383?JSON['stringify'](_0x57a383):null});});}['put'](_0x214cc6,_0x2a12cb,_0x41df53){return __awaiter$5(this,void 0,void 0,function*(){const _0x536067=this['getUrl'](_0x214cc6);return yield fetch(_0x536067,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2a12cb},'body':_0x41df53?JSON['stringify'](_0x41df53):null});});}['delete'](_0x589979,_0x3ac87d){return __awaiter$5(this,void 0,void 0,function*(){const _0x5a18b6=this['getUrl'](_0x589979);return yield fetch(_0x5a18b6,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3ac87d}});});}}
|
|
10
|
+
|
|
11
|
+
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x130680,_0x118f68,_0x579ba9,_0x3f0de8){function _0x83d8b2(_0x39805f){return _0x39805f instanceof _0x579ba9?_0x39805f:new _0x579ba9(function(_0x2a1c1c){_0x2a1c1c(_0x39805f);});}return new(_0x579ba9||(_0x579ba9=Promise))(function(_0x4f0e8a,_0x3712f9){function _0x2419bd(_0x16e957){try{_0x1546b5(_0x3f0de8['next'](_0x16e957));}catch(_0x18fcb2){_0x3712f9(_0x18fcb2);}}function _0x19d459(_0x4a94d1){try{_0x1546b5(_0x3f0de8['throw'](_0x4a94d1));}catch(_0x4790cd){_0x3712f9(_0x4790cd);}}function _0x1546b5(_0x36734c){_0x36734c['done']?_0x4f0e8a(_0x36734c['value']):_0x83d8b2(_0x36734c['value'])['then'](_0x2419bd,_0x19d459);}_0x1546b5((_0x3f0de8=_0x3f0de8['apply'](_0x130680,_0x118f68||[]))['next']());});};class SearchServersService{constructor(_0x8ec923){this['fetch']=_0x8ec923,this['path']='search-services';}['create'](_0x3c62e5,_0x42093f,_0x34d89c,_0x4bca75,_0x4e61e0,_0x5c0d1f,_0x128fb7,_0x46b855){return __awaiter$4(this,void 0,void 0,function*(){const _0x101b72={'account_name':_0x3c62e5,'search_service_name':_0x42093f,'endpoint':_0x34d89c,'key':_0x4bca75,'country':_0x4e61e0,'provider':_0x5c0d1f,'index_name':_0x128fb7};try{const _0x566889=yield this['fetch']['post'](this['path'],_0x46b855,_0x101b72);if(_0x566889['status']>0xc7&&_0x566889['status']<0x12c){const _0x2a1a78=yield _0x566889['json']();return new SuccessfulSearchServiceResponse(_0x2a1a78);}const _0x1d6525=yield _0x566889['json']();return new FailedSearchServiceResponse(_0x1d6525);}catch(_0x4bb331){if(_0x4bb331 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x4bb331['message'],'title':_0x4bb331['name'],'status':0x1f4,'instance':'','type':''});throw _0x4bb331;}});}['delete'](_0x31ed7d,_0x4114a7,_0x22c767){return __awaiter$4(this,void 0,void 0,function*(){const _0x262d7e=this['path']+'/'+_0x31ed7d+'/'+_0x4114a7;try{const _0x4c7c0e=yield this['fetch']['delete'](_0x262d7e,_0x22c767);if(_0x4c7c0e['status']>0xc7&&_0x4c7c0e['status']<0x12c)return new SuccessfulResponse({});const _0x28f89a=yield _0x4c7c0e['json']();return new FailedResponse(_0x28f89a);}catch(_0x324c5e){if(_0x324c5e instanceof Error)return new FailedResponse({'detail':_0x324c5e['message'],'title':_0x324c5e['name'],'status':0x1f4,'instance':'','type':''});throw _0x324c5e;}});}['view'](_0x26916d,_0x479b42,_0x2c9103){return __awaiter$4(this,void 0,void 0,function*(){const _0x3e1add=this['path']+'/'+_0x26916d+'/'+_0x479b42;try{const _0x324f77=yield this['fetch']['get'](_0x3e1add,_0x2c9103);if(_0x324f77['status']>0xc7&&_0x324f77['status']<0x12c){const _0x1a2e64=yield _0x324f77['json']();return new SuccessfulViewSearchServiceResponse(_0x1a2e64);}const _0x48737e=yield _0x324f77['json']();return new FailedViewSearchServiceResponse(_0x48737e);}catch(_0x1572ff){if(_0x1572ff instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x1572ff['message'],'title':_0x1572ff['name'],'status':0x1f4,'instance':'','type':''});throw _0x1572ff;}});}['edit'](_0x3ae907,_0x227d89,_0x1d46d8,_0x1a0d8a,_0x103c22){return __awaiter$4(this,void 0,void 0,function*(){const _0x467e66={'account_name':_0x3ae907,'search_service_name':_0x227d89,'key':_0x1d46d8,'country':_0x1a0d8a};try{const _0x42436e=yield this['fetch']['put'](this['path'],_0x103c22,_0x467e66);if(_0x42436e['status']>0xc7&&_0x42436e['status']<0x12c){const _0x298b6c=yield _0x42436e['json']();return new SuccessfulSearchServiceResponse(_0x298b6c);}const _0x3602a9=yield _0x42436e['json']();return new FailedSearchServiceResponse(_0x3602a9);}catch(_0x5eb4b6){if(_0x5eb4b6 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x5eb4b6['message'],'title':_0x5eb4b6['name'],'status':0x1f4,'instance':'','type':''});throw _0x5eb4b6;}});}['list'](_0x8eba64,_0x480fe8){return __awaiter$4(this,void 0,void 0,function*(){const _0x5104df=this['path']+'/'+_0x8eba64;try{const _0x52231b=yield this['fetch']['get'](_0x5104df,_0x480fe8);if(_0x52231b['status']>0xc7&&_0x52231b['status']<0x12c){const _0x395390=yield _0x52231b['json']();return new SuccessfulListSearchServiceResponse(_0x395390);}const _0x540768=yield _0x52231b['json']();return new FailedViewSearchServicesResponse(_0x540768);}catch(_0xffc688){if(_0xffc688 instanceof Error)return new FailedViewSearchServicesResponse({'detail':_0xffc688['message'],'title':_0xffc688['name'],'status':0x1f4,'instance':'','type':''});throw _0xffc688;}});}}
|
|
12
|
+
|
|
13
|
+
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x6aebfd,_0x30b085,_0x4add8f,_0x29fe81){function _0x466ff6(_0x3e7ab0){return _0x3e7ab0 instanceof _0x4add8f?_0x3e7ab0:new _0x4add8f(function(_0x2fe17c){_0x2fe17c(_0x3e7ab0);});}return new(_0x4add8f||(_0x4add8f=Promise))(function(_0x3848ff,_0x469ae8){function _0x1afdc7(_0xc8d0ad){try{_0x41bb0b(_0x29fe81['next'](_0xc8d0ad));}catch(_0x413452){_0x469ae8(_0x413452);}}function _0xc05d2d(_0x25acaa){try{_0x41bb0b(_0x29fe81['throw'](_0x25acaa));}catch(_0x2a3b69){_0x469ae8(_0x2a3b69);}}function _0x41bb0b(_0x13c317){_0x13c317['done']?_0x3848ff(_0x13c317['value']):_0x466ff6(_0x13c317['value'])['then'](_0x1afdc7,_0xc05d2d);}_0x41bb0b((_0x29fe81=_0x29fe81['apply'](_0x6aebfd,_0x30b085||[]))['next']());});};class FacetService{constructor(_0x173c93){this['fetch']=_0x173c93,this['path']='facet';}['create'](_0x110178,_0x3f0391,_0xe2ca27,_0x12a5c1){return __awaiter$3(this,void 0,void 0,function*(){const _0x13e64b={'account_name':_0x110178,'list_name':_0x3f0391,'facet_name':_0xe2ca27};try{const _0x3f75b8=yield this['fetch']['post'](this['path'],_0x12a5c1,_0x13e64b);if(_0x3f75b8['status']>0xc7&&_0x3f75b8['status']<0x12c){const _0x64bb3a=yield _0x3f75b8['json']();return new SuccessfulFacetResponse(_0x64bb3a);}const _0xb86616=yield _0x3f75b8['json']();return new FailedFacetResponse(_0xb86616);}catch(_0xa8ed17){if(_0xa8ed17 instanceof Error)return new FailedFacetResponse({'detail':_0xa8ed17['message'],'title':_0xa8ed17['name'],'status':0x1f4,'instance':'','type':''});throw _0xa8ed17;}});}['remove'](_0x363623,_0x87245a,_0x55dd1a,_0x51a757){return __awaiter$3(this,void 0,void 0,function*(){const _0x35d9a6='Facet/'+_0x363623+'/'+_0x87245a+'/'+_0x55dd1a,_0x579c68=yield this['fetch']['delete'](_0x35d9a6,_0x51a757);try{if(_0x579c68['status']>0xc7&&_0x579c68['status']<0x12c)return new SuccessfulResponse({});const _0x7c1447=yield _0x579c68['json']();return new FailedResponse(_0x7c1447);}catch(_0xce2bd3){if(_0xce2bd3 instanceof Error)return new FailedResponse({'detail':_0xce2bd3['message'],'title':_0xce2bd3['name'],'status':0x1f4,'instance':'','type':''});throw _0xce2bd3;}});}['rename'](_0x3be15a,_0x12a8df,_0x27e294,_0x3433fe,_0x2110cb){return __awaiter$3(this,void 0,void 0,function*(){const _0x358496={'account_name':_0x3be15a,'list_name':_0x12a8df,'facet_name':_0x27e294,'new_facet_name':_0x3433fe};try{const _0x29273f=yield this['fetch']['put'](this['path'],_0x2110cb,_0x358496);if(_0x29273f['status']>0xc7&&_0x29273f['status']<0x12c){const _0x5acc43=yield _0x29273f['json']();return new SuccessfulFacetResponse(_0x5acc43);}const _0x3aa252=yield _0x29273f['json']();return new FailedFacetResponse(_0x3aa252);}catch(_0x2ef6c2){if(_0x2ef6c2 instanceof Error)return new FailedFacetResponse({'detail':_0x2ef6c2['message'],'title':_0x2ef6c2['name'],'status':0x1f4,'instance':'','type':''});throw _0x2ef6c2;}});}}
|
|
14
|
+
|
|
15
|
+
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x56bae8,_0x5ecd33,_0x400a0e,_0x1c1f1b){function _0x123e8f(_0x1895a6){return _0x1895a6 instanceof _0x400a0e?_0x1895a6:new _0x400a0e(function(_0x367d76){_0x367d76(_0x1895a6);});}return new(_0x400a0e||(_0x400a0e=Promise))(function(_0xca38b5,_0x30376d){function _0xaf8592(_0x5d1772){try{_0x2cdb2f(_0x1c1f1b['next'](_0x5d1772));}catch(_0x8a3f49){_0x30376d(_0x8a3f49);}}function _0x455bdc(_0x4c5013){try{_0x2cdb2f(_0x1c1f1b['throw'](_0x4c5013));}catch(_0x2756b0){_0x30376d(_0x2756b0);}}function _0x2cdb2f(_0x4ff034){_0x4ff034['done']?_0xca38b5(_0x4ff034['value']):_0x123e8f(_0x4ff034['value'])['then'](_0xaf8592,_0x455bdc);}_0x2cdb2f((_0x1c1f1b=_0x1c1f1b['apply'](_0x56bae8,_0x5ecd33||[]))['next']());});};class SearchResultService{constructor(_0x9e03ee){this['fetch']=_0x9e03ee,this['path']='search-result';}['create'](_0xb8e938,_0x173458,_0x178073,_0x148d2e,_0x19df15){return __awaiter$2(this,void 0,void 0,function*(){_0x19df15=_0x19df15!==null&&_0x19df15!==void 0?_0x19df15:{'description':'','keywords':'','resource_1':'','resource_2':'','resource_3':'','latitude':0x0,'longitude':0x0,'facets':[]};const _0x4eff1f=Object['assign']({'account_name':_0xb8e938,'search_result_name':_0x178073,'list_name':_0x173458},_0x19df15);try{const _0xb05cdd=yield this['fetch']['post'](this['path'],_0x148d2e,_0x4eff1f);if(_0xb05cdd['status']>0xc7&&_0xb05cdd['status']<0x12c){const _0x43c59b=yield _0xb05cdd['json']();return new SuccessfulViewSearchResultResponse(_0x43c59b);}const _0x2d968e=yield _0xb05cdd['json']();return new FailedSearchResultResponse(_0x2d968e);}catch(_0x5211c4){if(_0x5211c4 instanceof Error)return new FailedSearchResultResponse({'detail':_0x5211c4['message'],'title':_0x5211c4['name'],'status':0x1f4,'instance':'','type':''});throw _0x5211c4;}});}['transfer'](_0x453ee6,_0x5ed95f,_0x471276,_0x529766){return __awaiter$2(this,void 0,void 0,function*(){const _0x4e30c1={'account_name':_0x453ee6,'list_name':_0x5ed95f,'new_search_service_name':_0x471276};try{const _0x3772c4=yield this['fetch']['post'](this['path']+'/transfer',_0x529766,_0x4e30c1);if(_0x3772c4['status']>0xc7&&_0x3772c4['status']<0x12c){const _0x11fe33=yield _0x3772c4['json']();return new SuccessfulListResponse(_0x11fe33);}const _0x89f33b=yield _0x3772c4['json']();return new FailedListResponse(_0x89f33b);}catch(_0x59357c){if(_0x59357c instanceof Error)return new FailedListResponse({'detail':_0x59357c['message'],'title':_0x59357c['name'],'status':0x1f4,'instance':'','type':''});throw _0x59357c;}});}['list'](_0x369700,_0x1a3702,_0x3d902c,_0x515a5c){return __awaiter$2(this,void 0,void 0,function*(){let _0x386f2c=this['path']+'/list/'+_0x369700+'/'+_0x1a3702;const _0x53d1fa=[];(_0x515a5c===null||_0x515a5c===void 0?void 0:_0x515a5c['size'])&&_0x53d1fa['push']('size='+_0x515a5c['size']);(_0x515a5c===null||_0x515a5c===void 0?void 0:_0x515a5c['skip'])&&_0x53d1fa['push']('skip='+_0x515a5c['skip']);_0x53d1fa['length']>0x0&&_0x53d1fa['forEach']((_0x3d252d,_0x2e7bf3)=>{_0x2e7bf3===0x0?_0x386f2c+='?':_0x386f2c+='&',_0x386f2c+=_0x3d252d;});try{const _0x493d8c=yield this['fetch']['get'](_0x386f2c,_0x3d902c);if(_0x493d8c['status']>0xc7&&_0x493d8c['status']<0x12c){const _0x1fbff8=yield _0x493d8c['json']();return new SuccessfulListSearchResultResponse(_0x1fbff8);}const _0x1de89c=yield _0x493d8c['json']();return new FailedViewSearchResultResponse(_0x1de89c);}catch(_0x1964e6){if(_0x1964e6 instanceof Error)return new FailedViewSearchResultResponse({'detail':_0x1964e6['message'],'title':_0x1964e6['name'],'status':0x1f4,'instance':'','type':''});throw _0x1964e6;}});}}
|
|
16
|
+
|
|
17
|
+
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x5d5384,_0x52ab53,_0x278a5a,_0xce484a){function _0xde2c34(_0x2ee84f){return _0x2ee84f instanceof _0x278a5a?_0x2ee84f:new _0x278a5a(function(_0x4f1fcd){_0x4f1fcd(_0x2ee84f);});}return new(_0x278a5a||(_0x278a5a=Promise))(function(_0x45dba6,_0x3193dd){function _0x38247b(_0x34c9a3){try{_0x50f9c3(_0xce484a['next'](_0x34c9a3));}catch(_0x173198){_0x3193dd(_0x173198);}}function _0x471556(_0x37b4b9){try{_0x50f9c3(_0xce484a['throw'](_0x37b4b9));}catch(_0x5c1fd0){_0x3193dd(_0x5c1fd0);}}function _0x50f9c3(_0x497bf8){_0x497bf8['done']?_0x45dba6(_0x497bf8['value']):_0xde2c34(_0x497bf8['value'])['then'](_0x38247b,_0x471556);}_0x50f9c3((_0xce484a=_0xce484a['apply'](_0x5d5384,_0x52ab53||[]))['next']());});};class ContributorService{constructor(_0x565f93){this['fetch']=_0x565f93,this['path']='contributor';}['create'](_0x4e7bf5,_0x58792c,_0x38ca82,_0x46d3a9){return __awaiter$1(this,void 0,void 0,function*(){const _0x4a4a95={'account_name':_0x4e7bf5,'list_name':_0x58792c,'contributor_name':_0x38ca82};try{const _0x1f6105=yield this['fetch']['post'](this['path'],_0x46d3a9,_0x4a4a95);if(_0x1f6105['status']>0xc7&&_0x1f6105['status']<0x12c){const _0x17ad7e=yield _0x1f6105['json']();return new SuccessfulContributorResponse(_0x17ad7e);}const _0x361690=yield _0x1f6105['json']();return new FailedContributorResponse(_0x361690);}catch(_0x4e73a3){if(_0x4e73a3 instanceof Error)return new FailedContributorResponse({'detail':_0x4e73a3['message'],'title':_0x4e73a3['name'],'status':0x1f4,'instance':'','type':''});throw _0x4e73a3;}});}['remove'](_0x3ae90d,_0x1cee1f,_0x337328,_0x2081a9){return __awaiter$1(this,void 0,void 0,function*(){const _0xc2394b=this['path']+'/'+_0x3ae90d+'/'+_0x1cee1f+'/'+_0x337328,_0x559e49=yield this['fetch']['delete'](_0xc2394b,_0x2081a9);try{if(_0x559e49['status']>0xc7&&_0x559e49['status']<0x12c)return new SuccessfulResponse({});const _0x28a6ee=yield _0x559e49['json']();return new FailedResponse(_0x28a6ee);}catch(_0x21bde1){if(_0x21bde1 instanceof Error)return new FailedResponse({'detail':_0x21bde1['message'],'title':_0x21bde1['name'],'status':0x1f4,'instance':'','type':''});throw _0x21bde1;}});}['startsWith'](_0x1941c7,_0x289a51){return __awaiter$1(this,void 0,void 0,function*(){const _0xebc909=this['path']+'/'+_0x1941c7;try{const _0x2a04f5=yield this['fetch']['get'](_0xebc909,_0x289a51);if(_0x2a04f5['status']>0xc7&&_0x2a04f5['status']<0x12c){const _0x2130a5=yield _0x2a04f5['json']();return new SuccessfulAccountAndImageResponse(_0x2130a5);}const _0x1a797d=yield _0x2a04f5['json']();return new FailedAccountAndImageResponse(_0x1a797d);}catch(_0x5e358c){if(_0x5e358c instanceof Error)return new FailedAccountAndImageResponse({'detail':_0x5e358c['message'],'title':_0x5e358c['name'],'status':0x1f4,'instance':'','type':''});throw _0x5e358c;}});}}
|
|
18
|
+
|
|
19
|
+
var __awaiter=undefined&&undefined['__awaiter']||function(_0x556391,_0x4a20aa,_0x4339b4,_0x1faad3){function _0x2c9efa(_0xfd21dd){return _0xfd21dd instanceof _0x4339b4?_0xfd21dd:new _0x4339b4(function(_0x544b20){_0x544b20(_0xfd21dd);});}return new(_0x4339b4||(_0x4339b4=Promise))(function(_0x1eabaa,_0x1288f3){function _0x58bb5e(_0x13fa4b){try{_0x320a59(_0x1faad3['next'](_0x13fa4b));}catch(_0x1f4246){_0x1288f3(_0x1f4246);}}function _0x4b7a91(_0x48daa4){try{_0x320a59(_0x1faad3['throw'](_0x48daa4));}catch(_0x24f326){_0x1288f3(_0x24f326);}}function _0x320a59(_0xbf2858){_0xbf2858['done']?_0x1eabaa(_0xbf2858['value']):_0x2c9efa(_0xbf2858['value'])['then'](_0x58bb5e,_0x4b7a91);}_0x320a59((_0x1faad3=_0x1faad3['apply'](_0x556391,_0x4a20aa||[]))['next']());});};class AdminClient{constructor(_0x543a4f='https://admin.searchability.dev/'){var _0xa90b9f=new Fetch(_0x543a4f);this['Accounts']=new AccountService(_0xa90b9f),this['Lists']=new ListService(_0xa90b9f),this['ApiKeys']=new ApiKeyService(_0xa90b9f),this['SearchServers']=new SearchServersService(_0xa90b9f),this['Facets']=new FacetService(_0xa90b9f),this['SearchResults']=new SearchResultService(_0xa90b9f),this['Contributors']=new ContributorService(_0xa90b9f);}}class AuthClient{constructor(_0x5eae57='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x5eae57);}['login'](_0xd6a11f){return __awaiter(this,void 0,void 0,function*(){const _0x30a6c1='login/'+_0xd6a11f;try{const _0x35adc3=yield yield fetch(_0x30a6c1);if(_0x35adc3['status']>0xc7&&_0x35adc3['status']<0x12c){const _0x4f6465=yield _0x35adc3['json']();return new SuccessfulAuthResponse(_0x4f6465);}const _0x503141=yield _0x35adc3['json']();return new FailedAuthResponse(_0x503141);}catch(_0x5d3236){if(_0x5d3236 instanceof Error)return new FailedAuthResponse({'detail':_0x5d3236['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x5d3236;}});}['refresh'](_0x5fb80a){return __awaiter(this,void 0,void 0,function*(){const _0x4e364f='refresh',_0x36a98a={'refresh_token':_0x5fb80a};try{const _0x2a02a2=yield this['fetch']['PostNoAuth'](_0x4e364f,_0x36a98a);if(_0x2a02a2['status']>0xc7&&_0x2a02a2['status']<0x12c){const _0x551424=yield _0x2a02a2['json']();return new SuccessfulAuthResponse(_0x551424);}const _0x4ebf8b=yield _0x2a02a2['json']();return new FailedAuthResponse(_0x4ebf8b);}catch(_0x30e006){if(_0x30e006 instanceof Error)return new FailedAuthResponse({'detail':_0x30e006['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x30e006;}});}['getTokenStatus'](_0x31e931){if(Date['now']()<_0x31e931['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x31e931['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
|
|
20
|
+
|
|
21
|
+
export { AdminClient, AuthClient, TokenStatus, Tokens };
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
exports.TokenStatus = void 0;(function(
|
|
3
|
+
exports.TokenStatus = void 0;(function(_0x3be7d5){_0x3be7d5[_0x3be7d5['Ok']=0x0]='Ok',_0x3be7d5[_0x3be7d5['Refresh']=0x1]='Refresh',_0x3be7d5[_0x3be7d5['Expired']=0x2]='Expired';}(exports.TokenStatus||(exports.TokenStatus={})));class Tokens{constructor(){this['access_token']='',this['access_expires']=0x0,this['refresh_token']='',this['refresh_expires']=0x0;}}class Response{constructor(_0x3f8698){this['isSuccess']=_0x3f8698;}}class SuccessfulContributorResponse extends Response{constructor(_0x1e07bb){super(!![]),this['contributor']=_0x1e07bb;}['toSuccess'](){return this['contributor'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedContributorResponse extends Response{constructor(_0x447903){super(![]),this['problem']=_0x447903;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountAndImageResponse extends Response{constructor(_0x297338){super(!![]),this['accountAndImages']=_0x297338;}['toSuccess'](){return this['accountAndImages'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountAndImageResponse extends Response{constructor(_0xb46746){super(![]),this['problem']=_0xb46746;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulFacetResponse extends Response{constructor(_0x19e68a){super(!![]),this['facet']=_0x19e68a;}['toSuccess'](){return this['facet'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetResponse extends Response{constructor(_0x59b0b9){super(![]),this['problem']=_0x59b0b9;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountResponse extends Response{constructor(_0x527f95){super(!![]),this['account']=_0x527f95;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountImageResponse extends Response{constructor(_0xac9dc){super(!![]),this['accountImage']=_0xac9dc;}['toSuccess'](){return this['accountImage'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListIdentityResponse extends Response{constructor(_0x34b93a){super(!![]),this['list']=_0x34b93a;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListResponse extends Response{constructor(_0x1db872){super(!![]),this['list']=_0x1db872;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x2d45b6){super(![]),this['problem']=_0x2d45b6;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountImageResponse extends Response{constructor(_0x206ca1){super(![]),this['problem']=_0x206ca1;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListIdentityResponse extends Response{constructor(_0x2e5759){super(![]),this['problem']=_0x2e5759;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListResponse extends Response{constructor(_0x55cfc5){super(![]),this['problem']=_0x55cfc5;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x2f1d34){super(!![]),this['tokens']=_0x2f1d34;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x193df4){super(![]),this['problem']=_0x193df4;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x543574){super(!![]),this['apiKey']=_0x543574;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x27ac12){super(![]),this['problem']=_0x27ac12;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x32f2bb){super(!![]),this['searchService']=_0x32f2bb;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0xd54b3d){super(![]),this['problem']=_0xd54b3d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x29dc17){super(!![]),this['searchService']=_0x29dc17;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulViewSearchResultResponse extends Response{constructor(_0x31d6fc){super(!![]),this['searchResult']=_0x31d6fc;}['toSuccess'](){return this['searchResult'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchResultResponse extends Response{constructor(_0x2b6cad){super(![]),this['problem']=_0x2b6cad;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchResultResponse extends Response{constructor(_0xe5efe9){super(!![]),this['searchResults']=_0xe5efe9;}['toSuccess'](){return this['searchResults'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchResultResponse extends Response{constructor(_0x2e40a3){super(![]),this['problem']=_0x2e40a3;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchServiceResponse extends Response{constructor(_0xea4310){super(!![]),this['searchServices']=_0xea4310;}['toSuccess'](){return this['searchServices'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServicesResponse extends Response{constructor(_0x22fc25){super(![]),this['problem']=_0x22fc25;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedViewSearchServiceResponse extends Response{constructor(_0x182348){super(![]),this['problem']=_0x182348;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x19ab2c){super(!![]),this['apiKeyValue']=_0x19ab2c;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x210762){super(!![]),this['obj']=_0x210762;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0xfde9f5){super(![]),this['problem']=_0xfde9f5;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x566d37){super(![]),this['problem']=_0x566d37;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
|
|
4
4
|
|
|
5
|
-
var __awaiter$8=undefined&&undefined['__awaiter']||function(
|
|
5
|
+
var __awaiter$8=undefined&&undefined['__awaiter']||function(_0x3e17c1,_0x4fedc7,_0x763e5,_0x59cfc0){function _0x131d6b(_0x5a47b5){return _0x5a47b5 instanceof _0x763e5?_0x5a47b5:new _0x763e5(function(_0x35a0e2){_0x35a0e2(_0x5a47b5);});}return new(_0x763e5||(_0x763e5=Promise))(function(_0x9ba6db,_0x140dcc){function _0x1575e8(_0x5aaa9c){try{_0x458ffa(_0x59cfc0['next'](_0x5aaa9c));}catch(_0xb8d346){_0x140dcc(_0xb8d346);}}function _0x5d4e0f(_0x273e96){try{_0x458ffa(_0x59cfc0['throw'](_0x273e96));}catch(_0x794a49){_0x140dcc(_0x794a49);}}function _0x458ffa(_0xb253d5){_0xb253d5['done']?_0x9ba6db(_0xb253d5['value']):_0x131d6b(_0xb253d5['value'])['then'](_0x1575e8,_0x5d4e0f);}_0x458ffa((_0x59cfc0=_0x59cfc0['apply'](_0x3e17c1,_0x4fedc7||[]))['next']());});};class AccountService{constructor(_0x30e72e){this['fetch']=_0x30e72e;}['get'](_0x55d6ca,_0x2d2903){return __awaiter$8(this,void 0,void 0,function*(){const _0xa092b9='Account/'+_0x55d6ca+'/',_0x3ca32f=yield this['fetch']['get'](_0xa092b9,_0x2d2903);try{if(_0x3ca32f['status']>0xc7&&_0x3ca32f['status']<0x12c){const _0x45aa89=yield _0x3ca32f['json']();return new SuccessfulAccountResponse(_0x45aa89);}const _0x53f926=yield _0x3ca32f['json']();return new FailedAccountResponse(_0x53f926);}catch(_0x43c29b){if(_0x43c29b instanceof Error)return new FailedAccountResponse({'detail':_0x43c29b['message'],'title':_0x43c29b['name'],'status':0x1f4,'instance':'','type':''});throw _0x43c29b;}});}['getImage'](_0x1ab6db,_0x2476a7){return __awaiter$8(this,void 0,void 0,function*(){const _0xcb796d='account/image/'+_0x1ab6db+'/',_0x143030=yield this['fetch']['get'](_0xcb796d,_0x2476a7);try{if(_0x143030['status']>0xc7&&_0x143030['status']<0x12c){const _0x4e4f88=yield _0x143030['json']();return new SuccessfulAccountImageResponse(_0x4e4f88);}const _0x47b0df=yield _0x143030['json']();return new FailedAccountImageResponse(_0x47b0df);}catch(_0x58f6fb){if(_0x58f6fb instanceof Error)return new FailedAccountImageResponse({'detail':_0x58f6fb['message'],'title':_0x58f6fb['name'],'status':0x1f4,'instance':'','type':''});throw _0x58f6fb;}});}}
|
|
6
6
|
|
|
7
|
-
var __awaiter$7=undefined&&undefined['__awaiter']||function(
|
|
7
|
+
var __awaiter$7=undefined&&undefined['__awaiter']||function(_0x55c953,_0x250037,_0x9e8880,_0x167543){function _0x277f35(_0x3700ba){return _0x3700ba instanceof _0x9e8880?_0x3700ba:new _0x9e8880(function(_0xb2da46){_0xb2da46(_0x3700ba);});}return new(_0x9e8880||(_0x9e8880=Promise))(function(_0x55b4e3,_0x2b104a){function _0x5001ff(_0x231c74){try{_0x47f7c1(_0x167543['next'](_0x231c74));}catch(_0x53b24a){_0x2b104a(_0x53b24a);}}function _0x510c27(_0x4008d3){try{_0x47f7c1(_0x167543['throw'](_0x4008d3));}catch(_0x4edc0e){_0x2b104a(_0x4edc0e);}}function _0x47f7c1(_0xe81e16){_0xe81e16['done']?_0x55b4e3(_0xe81e16['value']):_0x277f35(_0xe81e16['value'])['then'](_0x5001ff,_0x510c27);}_0x47f7c1((_0x167543=_0x167543['apply'](_0x55c953,_0x250037||[]))['next']());});};class ApiKeyService{constructor(_0x4d8d66){this['fetch']=_0x4d8d66,this['path']='api-key';}['create'](_0x54b8f5,_0x31ad04,_0x20e63a){return __awaiter$7(this,void 0,void 0,function*(){const _0x77c0d3={'account_name':_0x54b8f5,'api_key_name':_0x31ad04};try{const _0x36ef18=yield this['fetch']['post'](this['path'],_0x20e63a,_0x77c0d3);if(_0x36ef18['status']>0xc7&&_0x36ef18['status']<0x12c){const _0x713d1b=yield _0x36ef18['json']();return new SuccessfulApiKeyResponse(_0x713d1b);}const _0x418792=yield _0x36ef18['json']();return new FailedApiKeyResponse(_0x418792);}catch(_0x20aa18){if(_0x20aa18 instanceof Error)return new FailedApiKeyResponse({'detail':_0x20aa18['message'],'title':_0x20aa18['name'],'status':0x1f4,'instance':'','type':''});throw _0x20aa18;}});}['view'](_0x1a72c2,_0x2885d0,_0x265ef3){return __awaiter$7(this,void 0,void 0,function*(){const _0xd9c1e6=this['path']+'/'+_0x1a72c2+'/'+_0x2885d0;try{const _0x143b22=yield this['fetch']['get'](_0xd9c1e6,_0x265ef3);if(_0x143b22['status']>0xc7&&_0x143b22['status']<0x12c){const _0x459839=yield _0x143b22['json']();return new SuccessfulApiKeyValueResponse(_0x459839);}const _0x3c315b=yield _0x143b22['json']();return new FailedApiKeyValueResponse(_0x3c315b);}catch(_0x5cca06){if(_0x5cca06 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x5cca06['message'],'title':_0x5cca06['name'],'status':0x1f4,'instance':'','type':''});throw _0x5cca06;}});}['delete'](_0x5373b4,_0x5ad005,_0x49e6a1){return __awaiter$7(this,void 0,void 0,function*(){const _0x5c6af5=this['path']+'/'+_0x5373b4+'/'+_0x5ad005;try{const _0x724e96=yield this['fetch']['delete'](_0x5c6af5,_0x49e6a1);if(_0x724e96['status']>0xc7&&_0x724e96['status']<0x12c)return new SuccessfulResponse({});const _0x5059bc=yield _0x724e96['json']();return new FailedResponse(_0x5059bc);}catch(_0x7c8091){if(_0x7c8091 instanceof Error)return new FailedResponse({'detail':_0x7c8091['message'],'title':_0x7c8091['name'],'status':0x1f4,'instance':'','type':''});throw _0x7c8091;}});}}
|
|
8
8
|
|
|
9
|
-
var __awaiter$6=undefined&&undefined['__awaiter']||function(
|
|
9
|
+
var __awaiter$6=undefined&&undefined['__awaiter']||function(_0x219248,_0x59fa94,_0x1774a,_0x4edd86){function _0x4f05bf(_0x25f2b2){return _0x25f2b2 instanceof _0x1774a?_0x25f2b2:new _0x1774a(function(_0x3461cf){_0x3461cf(_0x25f2b2);});}return new(_0x1774a||(_0x1774a=Promise))(function(_0x116749,_0x25a313){function _0x350577(_0x3de4ce){try{_0x1f9f67(_0x4edd86['next'](_0x3de4ce));}catch(_0x5c5386){_0x25a313(_0x5c5386);}}function _0x1f403b(_0x5efece){try{_0x1f9f67(_0x4edd86['throw'](_0x5efece));}catch(_0x2307a6){_0x25a313(_0x2307a6);}}function _0x1f9f67(_0x4f1f8c){_0x4f1f8c['done']?_0x116749(_0x4f1f8c['value']):_0x4f05bf(_0x4f1f8c['value'])['then'](_0x350577,_0x1f403b);}_0x1f9f67((_0x4edd86=_0x4edd86['apply'](_0x219248,_0x59fa94||[]))['next']());});};class ListService{constructor(_0x245eb3){this['fetch']=_0x245eb3;}['create'](_0x3996d9,_0x448d48,_0x3c5a6f,_0x2eabd2){return __awaiter$6(this,void 0,void 0,function*(){const _0x4d7c8a='List',_0x57dd6c={'account_name':_0x3996d9,'list_name':_0x448d48,'search_service_name':_0x3c5a6f};try{const _0x35b2ca=yield this['fetch']['post'](_0x4d7c8a,_0x2eabd2,_0x57dd6c);if(_0x35b2ca['status']>0xc7&&_0x35b2ca['status']<0x12c){const _0x29c86d=yield _0x35b2ca['json']();return new SuccessfulListIdentityResponse(_0x29c86d);}const _0x15b8e2=yield _0x35b2ca['json']();return new FailedListIdentityResponse(_0x15b8e2);}catch(_0x536fc4){if(_0x536fc4 instanceof Error)return new FailedListIdentityResponse({'detail':_0x536fc4['message'],'title':_0x536fc4['name'],'status':0x1f4,'instance':'','type':''});throw _0x536fc4;}});}['delete'](_0x5edb6b,_0x411111,_0xec8a5d){return __awaiter$6(this,void 0,void 0,function*(){const _0xb274b7='List/'+_0x5edb6b+'/'+_0x411111,_0x21d4c7=yield this['fetch']['delete'](_0xb274b7,_0xec8a5d);try{if(_0x21d4c7['status']>0xc7&&_0x21d4c7['status']<0x12c)return new SuccessfulResponse({});const _0x383bf7=yield _0x21d4c7['json']();return new FailedResponse(_0x383bf7);}catch(_0x206e53){if(_0x206e53 instanceof Error)return new FailedResponse({'detail':_0x206e53['message'],'title':_0x206e53['name'],'status':0x1f4,'instance':'','type':''});throw _0x206e53;}});}['get'](_0x598cbd,_0x26f3ce,_0x5c869e){return __awaiter$6(this,void 0,void 0,function*(){const _0x3f6063='List/'+_0x598cbd+'/'+_0x26f3ce;try{const _0x1ea847=yield this['fetch']['get'](_0x3f6063,_0x5c869e);if(_0x1ea847['status']>0xc7&&_0x1ea847['status']<0x12c){const _0xc27f35=yield _0x1ea847['json']();return new SuccessfulListResponse(_0xc27f35);}const _0x4e2767=yield _0x1ea847['json']();return new FailedListResponse(_0x4e2767);}catch(_0x21e811){if(_0x21e811 instanceof Error)return new FailedListResponse({'detail':_0x21e811['message'],'title':_0x21e811['name'],'status':0x1f4,'instance':'','type':''});throw _0x21e811;}});}}
|
|
10
10
|
|
|
11
|
-
var __awaiter$5=undefined&&undefined['__awaiter']||function(
|
|
11
|
+
var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x831cb9,_0x4b1408,_0x587783,_0x4f1562){function _0x55158e(_0x33cc56){return _0x33cc56 instanceof _0x587783?_0x33cc56:new _0x587783(function(_0x30e22a){_0x30e22a(_0x33cc56);});}return new(_0x587783||(_0x587783=Promise))(function(_0x191903,_0x343e28){function _0x258df7(_0x1e0cfe){try{_0x4adaf2(_0x4f1562['next'](_0x1e0cfe));}catch(_0x10af6a){_0x343e28(_0x10af6a);}}function _0x17e346(_0x355ae4){try{_0x4adaf2(_0x4f1562['throw'](_0x355ae4));}catch(_0x1d3002){_0x343e28(_0x1d3002);}}function _0x4adaf2(_0x2ceb63){_0x2ceb63['done']?_0x191903(_0x2ceb63['value']):_0x55158e(_0x2ceb63['value'])['then'](_0x258df7,_0x17e346);}_0x4adaf2((_0x4f1562=_0x4f1562['apply'](_0x831cb9,_0x4b1408||[]))['next']());});};class Fetch{constructor(_0x1d9f25){this['baseUri']=_0x1d9f25,this['getUrl']=_0x442a43=>{return _0x442a43['startsWith']('/')&&(_0x442a43=_0x442a43['replace']('/','')),''+this['baseUri']+_0x442a43;},!_0x1d9f25['endsWith']('/')&&(_0x1d9f25=_0x1d9f25+'/');}['get'](_0x10eb16,_0x4768ed){return __awaiter$5(this,void 0,void 0,function*(){const _0x32db5c=this['getUrl'](_0x10eb16);return yield fetch(_0x32db5c,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4768ed}});});}['post'](_0x4c126f,_0x2fd537,_0x29bd5e){return __awaiter$5(this,void 0,void 0,function*(){const _0x43cdd8=this['getUrl'](_0x4c126f);return yield fetch(_0x43cdd8,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2fd537},'body':_0x29bd5e?JSON['stringify'](_0x29bd5e):null});});}['PostNoAuth'](_0x24c4e5,_0x2add1e){return __awaiter$5(this,void 0,void 0,function*(){const _0x42345f=this['getUrl'](_0x24c4e5);return yield fetch(_0x42345f,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0x2add1e?JSON['stringify'](_0x2add1e):null});});}['put'](_0x4c97e9,_0x3b923d,_0x981f71){return __awaiter$5(this,void 0,void 0,function*(){const _0x53c242=this['getUrl'](_0x4c97e9);return yield fetch(_0x53c242,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3b923d},'body':_0x981f71?JSON['stringify'](_0x981f71):null});});}['delete'](_0x4cb6ba,_0x5d0c40){return __awaiter$5(this,void 0,void 0,function*(){const _0x411e62=this['getUrl'](_0x4cb6ba);return yield fetch(_0x411e62,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x5d0c40}});});}}
|
|
12
12
|
|
|
13
|
-
var __awaiter$4=undefined&&undefined['__awaiter']||function(
|
|
13
|
+
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x520c22,_0x3ed1d3,_0x3dad57,_0x5321b5){function _0x46dec2(_0x1cc9be){return _0x1cc9be instanceof _0x3dad57?_0x1cc9be:new _0x3dad57(function(_0x5ac07f){_0x5ac07f(_0x1cc9be);});}return new(_0x3dad57||(_0x3dad57=Promise))(function(_0x274856,_0x50702a){function _0xef7367(_0x22ebbb){try{_0x2127cb(_0x5321b5['next'](_0x22ebbb));}catch(_0xa590f){_0x50702a(_0xa590f);}}function _0xa16a21(_0x16a4a5){try{_0x2127cb(_0x5321b5['throw'](_0x16a4a5));}catch(_0x1c7a70){_0x50702a(_0x1c7a70);}}function _0x2127cb(_0x888ce4){_0x888ce4['done']?_0x274856(_0x888ce4['value']):_0x46dec2(_0x888ce4['value'])['then'](_0xef7367,_0xa16a21);}_0x2127cb((_0x5321b5=_0x5321b5['apply'](_0x520c22,_0x3ed1d3||[]))['next']());});};class SearchServersService{constructor(_0x5d100b){this['fetch']=_0x5d100b,this['path']='search-services';}['create'](_0x2116f9,_0x51e6c4,_0x2dc6b3,_0x415a75,_0xc00301,_0x5bee6b,_0x1c9216,_0x140e22){return __awaiter$4(this,void 0,void 0,function*(){const _0x1ddf3d={'account_name':_0x2116f9,'search_service_name':_0x51e6c4,'endpoint':_0x2dc6b3,'key':_0x415a75,'country':_0xc00301,'provider':_0x5bee6b,'index_name':_0x1c9216};try{const _0x4a3214=yield this['fetch']['post'](this['path'],_0x140e22,_0x1ddf3d);if(_0x4a3214['status']>0xc7&&_0x4a3214['status']<0x12c){const _0x435e28=yield _0x4a3214['json']();return new SuccessfulSearchServiceResponse(_0x435e28);}const _0x129a34=yield _0x4a3214['json']();return new FailedSearchServiceResponse(_0x129a34);}catch(_0x782206){if(_0x782206 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x782206['message'],'title':_0x782206['name'],'status':0x1f4,'instance':'','type':''});throw _0x782206;}});}['delete'](_0x23321f,_0x34af58,_0x1343f2){return __awaiter$4(this,void 0,void 0,function*(){const _0x1926ec=this['path']+'/'+_0x23321f+'/'+_0x34af58;try{const _0xfee5cb=yield this['fetch']['delete'](_0x1926ec,_0x1343f2);if(_0xfee5cb['status']>0xc7&&_0xfee5cb['status']<0x12c)return new SuccessfulResponse({});const _0x2261b5=yield _0xfee5cb['json']();return new FailedResponse(_0x2261b5);}catch(_0x2dcce3){if(_0x2dcce3 instanceof Error)return new FailedResponse({'detail':_0x2dcce3['message'],'title':_0x2dcce3['name'],'status':0x1f4,'instance':'','type':''});throw _0x2dcce3;}});}['view'](_0x5a3245,_0x1dbc9f,_0x2d70fc){return __awaiter$4(this,void 0,void 0,function*(){const _0x1c9e41=this['path']+'/'+_0x5a3245+'/'+_0x1dbc9f;try{const _0x4c7e8a=yield this['fetch']['get'](_0x1c9e41,_0x2d70fc);if(_0x4c7e8a['status']>0xc7&&_0x4c7e8a['status']<0x12c){const _0x59d46b=yield _0x4c7e8a['json']();return new SuccessfulViewSearchServiceResponse(_0x59d46b);}const _0x3e1398=yield _0x4c7e8a['json']();return new FailedViewSearchServiceResponse(_0x3e1398);}catch(_0x2a7ef5){if(_0x2a7ef5 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x2a7ef5['message'],'title':_0x2a7ef5['name'],'status':0x1f4,'instance':'','type':''});throw _0x2a7ef5;}});}['edit'](_0x2d6981,_0xa64323,_0x11e6ce,_0x2d7fee,_0x22d40e){return __awaiter$4(this,void 0,void 0,function*(){const _0x1b910f={'account_name':_0x2d6981,'search_service_name':_0xa64323,'key':_0x11e6ce,'country':_0x2d7fee};try{const _0x520eaa=yield this['fetch']['put'](this['path'],_0x22d40e,_0x1b910f);if(_0x520eaa['status']>0xc7&&_0x520eaa['status']<0x12c){const _0x595e14=yield _0x520eaa['json']();return new SuccessfulSearchServiceResponse(_0x595e14);}const _0x1635b3=yield _0x520eaa['json']();return new FailedSearchServiceResponse(_0x1635b3);}catch(_0x4df67e){if(_0x4df67e instanceof Error)return new FailedSearchServiceResponse({'detail':_0x4df67e['message'],'title':_0x4df67e['name'],'status':0x1f4,'instance':'','type':''});throw _0x4df67e;}});}['list'](_0x351483,_0x5c0266){return __awaiter$4(this,void 0,void 0,function*(){const _0xb1da76=this['path']+'/'+_0x351483;try{const _0x57fa80=yield this['fetch']['get'](_0xb1da76,_0x5c0266);if(_0x57fa80['status']>0xc7&&_0x57fa80['status']<0x12c){const _0x47d397=yield _0x57fa80['json']();return new SuccessfulListSearchServiceResponse(_0x47d397);}const _0x196cda=yield _0x57fa80['json']();return new FailedViewSearchServicesResponse(_0x196cda);}catch(_0x4fdb2f){if(_0x4fdb2f instanceof Error)return new FailedViewSearchServicesResponse({'detail':_0x4fdb2f['message'],'title':_0x4fdb2f['name'],'status':0x1f4,'instance':'','type':''});throw _0x4fdb2f;}});}}
|
|
14
14
|
|
|
15
|
-
var __awaiter$3=undefined&&undefined['__awaiter']||function(
|
|
15
|
+
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x58630b,_0x256bcf,_0x2aa62f,_0x4c245f){function _0x118db4(_0x43b491){return _0x43b491 instanceof _0x2aa62f?_0x43b491:new _0x2aa62f(function(_0x389741){_0x389741(_0x43b491);});}return new(_0x2aa62f||(_0x2aa62f=Promise))(function(_0x45d29a,_0x3fcc2e){function _0x1461dd(_0x4acfa0){try{_0x129565(_0x4c245f['next'](_0x4acfa0));}catch(_0x378044){_0x3fcc2e(_0x378044);}}function _0x5d9c5e(_0x39cfe7){try{_0x129565(_0x4c245f['throw'](_0x39cfe7));}catch(_0x5c2adb){_0x3fcc2e(_0x5c2adb);}}function _0x129565(_0x45d4c5){_0x45d4c5['done']?_0x45d29a(_0x45d4c5['value']):_0x118db4(_0x45d4c5['value'])['then'](_0x1461dd,_0x5d9c5e);}_0x129565((_0x4c245f=_0x4c245f['apply'](_0x58630b,_0x256bcf||[]))['next']());});};class FacetService{constructor(_0x18e45e){this['fetch']=_0x18e45e,this['path']='facet';}['create'](_0x5c79f2,_0xeb7c11,_0x4c6d17,_0x222bf4){return __awaiter$3(this,void 0,void 0,function*(){const _0x2e6948={'account_name':_0x5c79f2,'list_name':_0xeb7c11,'facet_name':_0x4c6d17};try{const _0x1be5ce=yield this['fetch']['post'](this['path'],_0x222bf4,_0x2e6948);if(_0x1be5ce['status']>0xc7&&_0x1be5ce['status']<0x12c){const _0x136620=yield _0x1be5ce['json']();return new SuccessfulFacetResponse(_0x136620);}const _0x2d0e66=yield _0x1be5ce['json']();return new FailedFacetResponse(_0x2d0e66);}catch(_0x4ee5c1){if(_0x4ee5c1 instanceof Error)return new FailedFacetResponse({'detail':_0x4ee5c1['message'],'title':_0x4ee5c1['name'],'status':0x1f4,'instance':'','type':''});throw _0x4ee5c1;}});}['remove'](_0x3e12a6,_0x216096,_0x52f8b4,_0xb54442){return __awaiter$3(this,void 0,void 0,function*(){const _0x53f0b1='Facet/'+_0x3e12a6+'/'+_0x216096+'/'+_0x52f8b4,_0x3580cd=yield this['fetch']['delete'](_0x53f0b1,_0xb54442);try{if(_0x3580cd['status']>0xc7&&_0x3580cd['status']<0x12c)return new SuccessfulResponse({});const _0x177eef=yield _0x3580cd['json']();return new FailedResponse(_0x177eef);}catch(_0x24aac9){if(_0x24aac9 instanceof Error)return new FailedResponse({'detail':_0x24aac9['message'],'title':_0x24aac9['name'],'status':0x1f4,'instance':'','type':''});throw _0x24aac9;}});}['rename'](_0x441958,_0x19e597,_0x2abcce,_0x1404e8,_0x41a4cd){return __awaiter$3(this,void 0,void 0,function*(){const _0x237f00={'account_name':_0x441958,'list_name':_0x19e597,'facet_name':_0x2abcce,'new_facet_name':_0x1404e8};try{const _0x1776b7=yield this['fetch']['put'](this['path'],_0x41a4cd,_0x237f00);if(_0x1776b7['status']>0xc7&&_0x1776b7['status']<0x12c){const _0x456edf=yield _0x1776b7['json']();return new SuccessfulFacetResponse(_0x456edf);}const _0x41a0b9=yield _0x1776b7['json']();return new FailedFacetResponse(_0x41a0b9);}catch(_0x9ff8ec){if(_0x9ff8ec instanceof Error)return new FailedFacetResponse({'detail':_0x9ff8ec['message'],'title':_0x9ff8ec['name'],'status':0x1f4,'instance':'','type':''});throw _0x9ff8ec;}});}}
|
|
16
16
|
|
|
17
|
-
var __awaiter$2=undefined&&undefined['__awaiter']||function(
|
|
17
|
+
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x1ea0eb,_0x5cbd89,_0x48c924,_0x3c91d8){function _0x473324(_0x54e2f8){return _0x54e2f8 instanceof _0x48c924?_0x54e2f8:new _0x48c924(function(_0x177cf8){_0x177cf8(_0x54e2f8);});}return new(_0x48c924||(_0x48c924=Promise))(function(_0xdcd072,_0x34f3c3){function _0x314a43(_0x2ceb02){try{_0x3c48d5(_0x3c91d8['next'](_0x2ceb02));}catch(_0x2f9f9a){_0x34f3c3(_0x2f9f9a);}}function _0x5dead0(_0x227901){try{_0x3c48d5(_0x3c91d8['throw'](_0x227901));}catch(_0x41abe8){_0x34f3c3(_0x41abe8);}}function _0x3c48d5(_0x8917dd){_0x8917dd['done']?_0xdcd072(_0x8917dd['value']):_0x473324(_0x8917dd['value'])['then'](_0x314a43,_0x5dead0);}_0x3c48d5((_0x3c91d8=_0x3c91d8['apply'](_0x1ea0eb,_0x5cbd89||[]))['next']());});};class SearchResultService{constructor(_0x47eecf){this['fetch']=_0x47eecf,this['path']='search-result';}['create'](_0x180ee5,_0x71dca6,_0xf0e270,_0x241228,_0x57593b){return __awaiter$2(this,void 0,void 0,function*(){_0x57593b=_0x57593b!==null&&_0x57593b!==void 0?_0x57593b:{'description':'','keywords':'','resource_1':'','resource_2':'','resource_3':'','latitude':0x0,'longitude':0x0,'facets':[]};const _0x1c50e1=Object['assign']({'account_name':_0x180ee5,'search_result_name':_0xf0e270,'list_name':_0x71dca6},_0x57593b);try{const _0xe6caf9=yield this['fetch']['post'](this['path'],_0x241228,_0x1c50e1);if(_0xe6caf9['status']>0xc7&&_0xe6caf9['status']<0x12c){const _0x3c90a6=yield _0xe6caf9['json']();return new SuccessfulViewSearchResultResponse(_0x3c90a6);}const _0x2d8772=yield _0xe6caf9['json']();return new FailedSearchResultResponse(_0x2d8772);}catch(_0x53b01a){if(_0x53b01a instanceof Error)return new FailedSearchResultResponse({'detail':_0x53b01a['message'],'title':_0x53b01a['name'],'status':0x1f4,'instance':'','type':''});throw _0x53b01a;}});}['transfer'](_0x168e37,_0x4b0bc3,_0x1695a1,_0x2d405b){return __awaiter$2(this,void 0,void 0,function*(){const _0x3256d6={'account_name':_0x168e37,'list_name':_0x4b0bc3,'new_search_service_name':_0x1695a1};try{const _0x590251=yield this['fetch']['post'](this['path']+'/transfer',_0x2d405b,_0x3256d6);if(_0x590251['status']>0xc7&&_0x590251['status']<0x12c){const _0x207ed2=yield _0x590251['json']();return new SuccessfulListResponse(_0x207ed2);}const _0x5444f1=yield _0x590251['json']();return new FailedListResponse(_0x5444f1);}catch(_0x3c91fa){if(_0x3c91fa instanceof Error)return new FailedListResponse({'detail':_0x3c91fa['message'],'title':_0x3c91fa['name'],'status':0x1f4,'instance':'','type':''});throw _0x3c91fa;}});}['list'](_0x5f18f3,_0x420e0a,_0x2aec65,_0x289ad1){return __awaiter$2(this,void 0,void 0,function*(){let _0x1c6f5d=this['path']+'/list/'+_0x5f18f3+'/'+_0x420e0a;const _0xcda795=[];(_0x289ad1===null||_0x289ad1===void 0?void 0:_0x289ad1['size'])&&_0xcda795['push']('size='+_0x289ad1['size']);(_0x289ad1===null||_0x289ad1===void 0?void 0:_0x289ad1['skip'])&&_0xcda795['push']('skip='+_0x289ad1['skip']);_0xcda795['length']>0x0&&_0xcda795['forEach']((_0x586fd4,_0x12eddb)=>{_0x12eddb===0x0?_0x1c6f5d+='?':_0x1c6f5d+='&',_0x1c6f5d+=_0x586fd4;});try{const _0x2a7da7=yield this['fetch']['get'](_0x1c6f5d,_0x2aec65);if(_0x2a7da7['status']>0xc7&&_0x2a7da7['status']<0x12c){const _0x5d01e5=yield _0x2a7da7['json']();return new SuccessfulListSearchResultResponse(_0x5d01e5);}const _0x5c1a01=yield _0x2a7da7['json']();return new FailedViewSearchResultResponse(_0x5c1a01);}catch(_0x1408c4){if(_0x1408c4 instanceof Error)return new FailedViewSearchResultResponse({'detail':_0x1408c4['message'],'title':_0x1408c4['name'],'status':0x1f4,'instance':'','type':''});throw _0x1408c4;}});}}
|
|
18
18
|
|
|
19
|
-
var __awaiter$1=undefined&&undefined['__awaiter']||function(
|
|
19
|
+
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x5b305b,_0x512262,_0x215f55,_0x5952c3){function _0x2e7323(_0x2f857e){return _0x2f857e instanceof _0x215f55?_0x2f857e:new _0x215f55(function(_0x33938d){_0x33938d(_0x2f857e);});}return new(_0x215f55||(_0x215f55=Promise))(function(_0x3711ca,_0x1ef476){function _0x7ad668(_0x5257dc){try{_0x3d0533(_0x5952c3['next'](_0x5257dc));}catch(_0x440959){_0x1ef476(_0x440959);}}function _0x3d3533(_0x5866f9){try{_0x3d0533(_0x5952c3['throw'](_0x5866f9));}catch(_0x237db2){_0x1ef476(_0x237db2);}}function _0x3d0533(_0x1afd5a){_0x1afd5a['done']?_0x3711ca(_0x1afd5a['value']):_0x2e7323(_0x1afd5a['value'])['then'](_0x7ad668,_0x3d3533);}_0x3d0533((_0x5952c3=_0x5952c3['apply'](_0x5b305b,_0x512262||[]))['next']());});};class ContributorService{constructor(_0x4de22d){this['fetch']=_0x4de22d,this['path']='contributor';}['create'](_0x30da45,_0x44b261,_0x2740c2,_0x4cd95f){return __awaiter$1(this,void 0,void 0,function*(){const _0x5da947={'account_name':_0x30da45,'list_name':_0x44b261,'contributor_name':_0x2740c2};try{const _0x475a2a=yield this['fetch']['post'](this['path'],_0x4cd95f,_0x5da947);if(_0x475a2a['status']>0xc7&&_0x475a2a['status']<0x12c){const _0x3322a9=yield _0x475a2a['json']();return new SuccessfulContributorResponse(_0x3322a9);}const _0x3e1349=yield _0x475a2a['json']();return new FailedContributorResponse(_0x3e1349);}catch(_0x186bf5){if(_0x186bf5 instanceof Error)return new FailedContributorResponse({'detail':_0x186bf5['message'],'title':_0x186bf5['name'],'status':0x1f4,'instance':'','type':''});throw _0x186bf5;}});}['remove'](_0x3b0191,_0x5d943e,_0x4d7ef9,_0x124e5c){return __awaiter$1(this,void 0,void 0,function*(){const _0x249f05=this['path']+'/'+_0x3b0191+'/'+_0x5d943e+'/'+_0x4d7ef9,_0x40deb8=yield this['fetch']['delete'](_0x249f05,_0x124e5c);try{if(_0x40deb8['status']>0xc7&&_0x40deb8['status']<0x12c)return new SuccessfulResponse({});const _0x1da80a=yield _0x40deb8['json']();return new FailedResponse(_0x1da80a);}catch(_0x29479f){if(_0x29479f instanceof Error)return new FailedResponse({'detail':_0x29479f['message'],'title':_0x29479f['name'],'status':0x1f4,'instance':'','type':''});throw _0x29479f;}});}['startsWith'](_0x521f94,_0x29806a){return __awaiter$1(this,void 0,void 0,function*(){const _0x3cda1f=this['path']+'/'+_0x521f94;try{const _0x13adc0=yield this['fetch']['get'](_0x3cda1f,_0x29806a);if(_0x13adc0['status']>0xc7&&_0x13adc0['status']<0x12c){const _0x4affeb=yield _0x13adc0['json']();return new SuccessfulAccountAndImageResponse(_0x4affeb);}const _0x5d5539=yield _0x13adc0['json']();return new FailedAccountAndImageResponse(_0x5d5539);}catch(_0x2532cc){if(_0x2532cc instanceof Error)return new FailedAccountAndImageResponse({'detail':_0x2532cc['message'],'title':_0x2532cc['name'],'status':0x1f4,'instance':'','type':''});throw _0x2532cc;}});}}
|
|
20
20
|
|
|
21
|
-
var __awaiter=undefined&&undefined['__awaiter']||function(
|
|
21
|
+
var __awaiter=undefined&&undefined['__awaiter']||function(_0x4d2bf7,_0x9f029c,_0x118736,_0x33cd8a){function _0x52bf85(_0x4e5c72){return _0x4e5c72 instanceof _0x118736?_0x4e5c72:new _0x118736(function(_0x40fe95){_0x40fe95(_0x4e5c72);});}return new(_0x118736||(_0x118736=Promise))(function(_0x3a04fa,_0x1aefcb){function _0x343ca8(_0x22b736){try{_0x4dc6a9(_0x33cd8a['next'](_0x22b736));}catch(_0x3ef0db){_0x1aefcb(_0x3ef0db);}}function _0x1148ca(_0x50681b){try{_0x4dc6a9(_0x33cd8a['throw'](_0x50681b));}catch(_0x2be7f6){_0x1aefcb(_0x2be7f6);}}function _0x4dc6a9(_0x582e35){_0x582e35['done']?_0x3a04fa(_0x582e35['value']):_0x52bf85(_0x582e35['value'])['then'](_0x343ca8,_0x1148ca);}_0x4dc6a9((_0x33cd8a=_0x33cd8a['apply'](_0x4d2bf7,_0x9f029c||[]))['next']());});};class AdminClient{constructor(_0x2399cf='https://admin.searchability.dev/'){var _0x479c98=new Fetch(_0x2399cf);this['Accounts']=new AccountService(_0x479c98),this['Lists']=new ListService(_0x479c98),this['ApiKeys']=new ApiKeyService(_0x479c98),this['SearchServers']=new SearchServersService(_0x479c98),this['Facets']=new FacetService(_0x479c98),this['SearchResults']=new SearchResultService(_0x479c98),this['Contributors']=new ContributorService(_0x479c98);}}class AuthClient{constructor(_0x78e2f5='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x78e2f5);}['login'](_0x4b278d){return __awaiter(this,void 0,void 0,function*(){const _0xb3d56f='login/'+_0x4b278d;try{const _0xa0e6dc=yield yield fetch(_0xb3d56f);if(_0xa0e6dc['status']>0xc7&&_0xa0e6dc['status']<0x12c){const _0x1ebbda=yield _0xa0e6dc['json']();return new SuccessfulAuthResponse(_0x1ebbda);}const _0x22384b=yield _0xa0e6dc['json']();return new FailedAuthResponse(_0x22384b);}catch(_0x350388){if(_0x350388 instanceof Error)return new FailedAuthResponse({'detail':_0x350388['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x350388;}});}['refresh'](_0x24434b){return __awaiter(this,void 0,void 0,function*(){const _0x32bcba='refresh',_0x3033e2={'refresh_token':_0x24434b};try{const _0x3c603b=yield this['fetch']['PostNoAuth'](_0x32bcba,_0x3033e2);if(_0x3c603b['status']>0xc7&&_0x3c603b['status']<0x12c){const _0x3a649e=yield _0x3c603b['json']();return new SuccessfulAuthResponse(_0x3a649e);}const _0x261692=yield _0x3c603b['json']();return new FailedAuthResponse(_0x261692);}catch(_0xcc6001){if(_0xcc6001 instanceof Error)return new FailedAuthResponse({'detail':_0xcc6001['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0xcc6001;}});}['getTokenStatus'](_0xa50b11){if(Date['now']()<_0xa50b11['access_expires'])return exports.TokenStatus['Ok'];if(Date['now']()<_0xa50b11['refresh_expires'])return exports.TokenStatus['Refresh'];return exports.TokenStatus['Expired'];}}
|
|
22
22
|
|
|
23
23
|
exports.AdminClient = AdminClient;
|
|
24
24
|
exports.AuthClient = AuthClient;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
var TokenStatus;(function(
|
|
1
|
+
var TokenStatus;(function(_0x19c0bb){_0x19c0bb[_0x19c0bb['Ok']=0x0]='Ok',_0x19c0bb[_0x19c0bb['Refresh']=0x1]='Refresh',_0x19c0bb[_0x19c0bb['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(_0x2ab4e4){this['isSuccess']=_0x2ab4e4;}}class SuccessfulContributorResponse extends Response{constructor(_0x34a5e9){super(!![]),this['contributor']=_0x34a5e9;}['toSuccess'](){return this['contributor'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedContributorResponse extends Response{constructor(_0x5704fc){super(![]),this['problem']=_0x5704fc;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountAndImageResponse extends Response{constructor(_0x5ed6c3){super(!![]),this['accountAndImages']=_0x5ed6c3;}['toSuccess'](){return this['accountAndImages'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountAndImageResponse extends Response{constructor(_0x1620df){super(![]),this['problem']=_0x1620df;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulFacetResponse extends Response{constructor(_0x32f84a){super(!![]),this['facet']=_0x32f84a;}['toSuccess'](){return this['facet'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetResponse extends Response{constructor(_0x43ac7e){super(![]),this['problem']=_0x43ac7e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountResponse extends Response{constructor(_0x40d01a){super(!![]),this['account']=_0x40d01a;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountImageResponse extends Response{constructor(_0x10404a){super(!![]),this['accountImage']=_0x10404a;}['toSuccess'](){return this['accountImage'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListIdentityResponse extends Response{constructor(_0x1d4cf1){super(!![]),this['list']=_0x1d4cf1;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListResponse extends Response{constructor(_0x3f6e23){super(!![]),this['list']=_0x3f6e23;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x508b65){super(![]),this['problem']=_0x508b65;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountImageResponse extends Response{constructor(_0x40ab08){super(![]),this['problem']=_0x40ab08;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListIdentityResponse extends Response{constructor(_0x6bb67c){super(![]),this['problem']=_0x6bb67c;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListResponse extends Response{constructor(_0x55feec){super(![]),this['problem']=_0x55feec;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x39e47d){super(!![]),this['tokens']=_0x39e47d;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x18ffb5){super(![]),this['problem']=_0x18ffb5;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x165271){super(!![]),this['apiKey']=_0x165271;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x344a77){super(![]),this['problem']=_0x344a77;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x412a96){super(!![]),this['searchService']=_0x412a96;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x1311e7){super(![]),this['problem']=_0x1311e7;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x1aa1b6){super(!![]),this['searchService']=_0x1aa1b6;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulViewSearchResultResponse extends Response{constructor(_0x47f56f){super(!![]),this['searchResult']=_0x47f56f;}['toSuccess'](){return this['searchResult'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchResultResponse extends Response{constructor(_0x46403a){super(![]),this['problem']=_0x46403a;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchResultResponse extends Response{constructor(_0x4e83b5){super(!![]),this['searchResults']=_0x4e83b5;}['toSuccess'](){return this['searchResults'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchResultResponse extends Response{constructor(_0x5a6d22){super(![]),this['problem']=_0x5a6d22;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchServiceResponse extends Response{constructor(_0x12522f){super(!![]),this['searchServices']=_0x12522f;}['toSuccess'](){return this['searchServices'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServicesResponse extends Response{constructor(_0x263089){super(![]),this['problem']=_0x263089;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedViewSearchServiceResponse extends Response{constructor(_0x1c2074){super(![]),this['problem']=_0x1c2074;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x5adfe3){super(!![]),this['apiKeyValue']=_0x5adfe3;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x12de01){super(!![]),this['obj']=_0x12de01;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x47031e){super(![]),this['problem']=_0x47031e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x2358f0){super(![]),this['problem']=_0x2358f0;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
|
|
2
2
|
|
|
3
|
-
var __awaiter$8=undefined&&undefined['__awaiter']||function(
|
|
3
|
+
var __awaiter$8=undefined&&undefined['__awaiter']||function(_0x50fc27,_0x5731d7,_0x14230e,_0x4efcc2){function _0x61c63f(_0x51770e){return _0x51770e instanceof _0x14230e?_0x51770e:new _0x14230e(function(_0x47db39){_0x47db39(_0x51770e);});}return new(_0x14230e||(_0x14230e=Promise))(function(_0x10bae7,_0x2f625f){function _0x7ae287(_0x1f557d){try{_0x4e764c(_0x4efcc2['next'](_0x1f557d));}catch(_0x288242){_0x2f625f(_0x288242);}}function _0x4f2029(_0x3f66a3){try{_0x4e764c(_0x4efcc2['throw'](_0x3f66a3));}catch(_0x48f6b3){_0x2f625f(_0x48f6b3);}}function _0x4e764c(_0x39b747){_0x39b747['done']?_0x10bae7(_0x39b747['value']):_0x61c63f(_0x39b747['value'])['then'](_0x7ae287,_0x4f2029);}_0x4e764c((_0x4efcc2=_0x4efcc2['apply'](_0x50fc27,_0x5731d7||[]))['next']());});};class AccountService{constructor(_0x4dd2c6){this['fetch']=_0x4dd2c6;}['get'](_0x51e77e,_0x31ad7e){return __awaiter$8(this,void 0,void 0,function*(){const _0x3adef3='Account/'+_0x51e77e+'/',_0x309cac=yield this['fetch']['get'](_0x3adef3,_0x31ad7e);try{if(_0x309cac['status']>0xc7&&_0x309cac['status']<0x12c){const _0x558ee2=yield _0x309cac['json']();return new SuccessfulAccountResponse(_0x558ee2);}const _0x1500e0=yield _0x309cac['json']();return new FailedAccountResponse(_0x1500e0);}catch(_0x30e659){if(_0x30e659 instanceof Error)return new FailedAccountResponse({'detail':_0x30e659['message'],'title':_0x30e659['name'],'status':0x1f4,'instance':'','type':''});throw _0x30e659;}});}['getImage'](_0x48c904,_0x46709b){return __awaiter$8(this,void 0,void 0,function*(){const _0x25d480='account/image/'+_0x48c904+'/',_0x3a829c=yield this['fetch']['get'](_0x25d480,_0x46709b);try{if(_0x3a829c['status']>0xc7&&_0x3a829c['status']<0x12c){const _0x381ac6=yield _0x3a829c['json']();return new SuccessfulAccountImageResponse(_0x381ac6);}const _0x5adb07=yield _0x3a829c['json']();return new FailedAccountImageResponse(_0x5adb07);}catch(_0x2c285e){if(_0x2c285e instanceof Error)return new FailedAccountImageResponse({'detail':_0x2c285e['message'],'title':_0x2c285e['name'],'status':0x1f4,'instance':'','type':''});throw _0x2c285e;}});}}
|
|
4
4
|
|
|
5
|
-
var __awaiter$7=undefined&&undefined['__awaiter']||function(
|
|
5
|
+
var __awaiter$7=undefined&&undefined['__awaiter']||function(_0x232695,_0x229826,_0x4c728b,_0x3b89de){function _0x45ad0f(_0x4b8f24){return _0x4b8f24 instanceof _0x4c728b?_0x4b8f24:new _0x4c728b(function(_0x5ddfdd){_0x5ddfdd(_0x4b8f24);});}return new(_0x4c728b||(_0x4c728b=Promise))(function(_0x42e53a,_0x947382){function _0x54aa73(_0x422060){try{_0x4f3879(_0x3b89de['next'](_0x422060));}catch(_0x224b5b){_0x947382(_0x224b5b);}}function _0x414312(_0xa5c786){try{_0x4f3879(_0x3b89de['throw'](_0xa5c786));}catch(_0x398d6e){_0x947382(_0x398d6e);}}function _0x4f3879(_0x23c12b){_0x23c12b['done']?_0x42e53a(_0x23c12b['value']):_0x45ad0f(_0x23c12b['value'])['then'](_0x54aa73,_0x414312);}_0x4f3879((_0x3b89de=_0x3b89de['apply'](_0x232695,_0x229826||[]))['next']());});};class ApiKeyService{constructor(_0x287c07){this['fetch']=_0x287c07,this['path']='api-key';}['create'](_0x5b1977,_0x207f4f,_0x3d4bd1){return __awaiter$7(this,void 0,void 0,function*(){const _0x4ea2d4={'account_name':_0x5b1977,'api_key_name':_0x207f4f};try{const _0x37896a=yield this['fetch']['post'](this['path'],_0x3d4bd1,_0x4ea2d4);if(_0x37896a['status']>0xc7&&_0x37896a['status']<0x12c){const _0x1d30aa=yield _0x37896a['json']();return new SuccessfulApiKeyResponse(_0x1d30aa);}const _0x7490c3=yield _0x37896a['json']();return new FailedApiKeyResponse(_0x7490c3);}catch(_0x5dbe7f){if(_0x5dbe7f instanceof Error)return new FailedApiKeyResponse({'detail':_0x5dbe7f['message'],'title':_0x5dbe7f['name'],'status':0x1f4,'instance':'','type':''});throw _0x5dbe7f;}});}['view'](_0x174ddc,_0x1c3244,_0x3c2219){return __awaiter$7(this,void 0,void 0,function*(){const _0x1d5646=this['path']+'/'+_0x174ddc+'/'+_0x1c3244;try{const _0xa81788=yield this['fetch']['get'](_0x1d5646,_0x3c2219);if(_0xa81788['status']>0xc7&&_0xa81788['status']<0x12c){const _0x4e597e=yield _0xa81788['json']();return new SuccessfulApiKeyValueResponse(_0x4e597e);}const _0x1fd9ef=yield _0xa81788['json']();return new FailedApiKeyValueResponse(_0x1fd9ef);}catch(_0x32aeab){if(_0x32aeab instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x32aeab['message'],'title':_0x32aeab['name'],'status':0x1f4,'instance':'','type':''});throw _0x32aeab;}});}['delete'](_0x10e033,_0x44587d,_0x622e61){return __awaiter$7(this,void 0,void 0,function*(){const _0x5777a8=this['path']+'/'+_0x10e033+'/'+_0x44587d;try{const _0x430c93=yield this['fetch']['delete'](_0x5777a8,_0x622e61);if(_0x430c93['status']>0xc7&&_0x430c93['status']<0x12c)return new SuccessfulResponse({});const _0x3afb51=yield _0x430c93['json']();return new FailedResponse(_0x3afb51);}catch(_0x3657a6){if(_0x3657a6 instanceof Error)return new FailedResponse({'detail':_0x3657a6['message'],'title':_0x3657a6['name'],'status':0x1f4,'instance':'','type':''});throw _0x3657a6;}});}}
|
|
6
6
|
|
|
7
|
-
var __awaiter$6=undefined&&undefined['__awaiter']||function(
|
|
7
|
+
var __awaiter$6=undefined&&undefined['__awaiter']||function(_0x1e7b27,_0xfee664,_0x39a61c,_0x206d6c){function _0xcaf20c(_0x47d19f){return _0x47d19f instanceof _0x39a61c?_0x47d19f:new _0x39a61c(function(_0x4bc321){_0x4bc321(_0x47d19f);});}return new(_0x39a61c||(_0x39a61c=Promise))(function(_0x5caf6d,_0x3379bf){function _0x248e33(_0x27b848){try{_0x153ad3(_0x206d6c['next'](_0x27b848));}catch(_0x4b7015){_0x3379bf(_0x4b7015);}}function _0x26be9d(_0x366735){try{_0x153ad3(_0x206d6c['throw'](_0x366735));}catch(_0x6faa90){_0x3379bf(_0x6faa90);}}function _0x153ad3(_0x31f85f){_0x31f85f['done']?_0x5caf6d(_0x31f85f['value']):_0xcaf20c(_0x31f85f['value'])['then'](_0x248e33,_0x26be9d);}_0x153ad3((_0x206d6c=_0x206d6c['apply'](_0x1e7b27,_0xfee664||[]))['next']());});};class ListService{constructor(_0x1892d8){this['fetch']=_0x1892d8;}['create'](_0x25631a,_0x403c39,_0x1a7e40,_0x5ccc99){return __awaiter$6(this,void 0,void 0,function*(){const _0x541fde='List',_0x4bf0e7={'account_name':_0x25631a,'list_name':_0x403c39,'search_service_name':_0x1a7e40};try{const _0x2305a7=yield this['fetch']['post'](_0x541fde,_0x5ccc99,_0x4bf0e7);if(_0x2305a7['status']>0xc7&&_0x2305a7['status']<0x12c){const _0x4efbbf=yield _0x2305a7['json']();return new SuccessfulListIdentityResponse(_0x4efbbf);}const _0xab0b12=yield _0x2305a7['json']();return new FailedListIdentityResponse(_0xab0b12);}catch(_0x5162e7){if(_0x5162e7 instanceof Error)return new FailedListIdentityResponse({'detail':_0x5162e7['message'],'title':_0x5162e7['name'],'status':0x1f4,'instance':'','type':''});throw _0x5162e7;}});}['delete'](_0x21e994,_0x5bd346,_0x36c52c){return __awaiter$6(this,void 0,void 0,function*(){const _0x4965b8='List/'+_0x21e994+'/'+_0x5bd346,_0x338ac5=yield this['fetch']['delete'](_0x4965b8,_0x36c52c);try{if(_0x338ac5['status']>0xc7&&_0x338ac5['status']<0x12c)return new SuccessfulResponse({});const _0x43045d=yield _0x338ac5['json']();return new FailedResponse(_0x43045d);}catch(_0x2241f9){if(_0x2241f9 instanceof Error)return new FailedResponse({'detail':_0x2241f9['message'],'title':_0x2241f9['name'],'status':0x1f4,'instance':'','type':''});throw _0x2241f9;}});}['get'](_0x5877c3,_0x5963a9,_0x101630){return __awaiter$6(this,void 0,void 0,function*(){const _0x2561eb='List/'+_0x5877c3+'/'+_0x5963a9;try{const _0x308355=yield this['fetch']['get'](_0x2561eb,_0x101630);if(_0x308355['status']>0xc7&&_0x308355['status']<0x12c){const _0x23f224=yield _0x308355['json']();return new SuccessfulListResponse(_0x23f224);}const _0x368b97=yield _0x308355['json']();return new FailedListResponse(_0x368b97);}catch(_0x2c70f1){if(_0x2c70f1 instanceof Error)return new FailedListResponse({'detail':_0x2c70f1['message'],'title':_0x2c70f1['name'],'status':0x1f4,'instance':'','type':''});throw _0x2c70f1;}});}}
|
|
8
8
|
|
|
9
|
-
var __awaiter$5=undefined&&undefined['__awaiter']||function(
|
|
9
|
+
var __awaiter$5=undefined&&undefined['__awaiter']||function(_0xffdb28,_0xc62438,_0x3aef16,_0x30223a){function _0x50bdcf(_0x1ee2c0){return _0x1ee2c0 instanceof _0x3aef16?_0x1ee2c0:new _0x3aef16(function(_0xcc687){_0xcc687(_0x1ee2c0);});}return new(_0x3aef16||(_0x3aef16=Promise))(function(_0x17d687,_0x2768d3){function _0x37f6d5(_0x33d139){try{_0x93754a(_0x30223a['next'](_0x33d139));}catch(_0x4ec52a){_0x2768d3(_0x4ec52a);}}function _0x5f0a9f(_0x16b504){try{_0x93754a(_0x30223a['throw'](_0x16b504));}catch(_0x293e9f){_0x2768d3(_0x293e9f);}}function _0x93754a(_0x2280b9){_0x2280b9['done']?_0x17d687(_0x2280b9['value']):_0x50bdcf(_0x2280b9['value'])['then'](_0x37f6d5,_0x5f0a9f);}_0x93754a((_0x30223a=_0x30223a['apply'](_0xffdb28,_0xc62438||[]))['next']());});};class Fetch{constructor(_0x273db5){this['baseUri']=_0x273db5,this['getUrl']=_0x2640d3=>{return _0x2640d3['startsWith']('/')&&(_0x2640d3=_0x2640d3['replace']('/','')),''+this['baseUri']+_0x2640d3;},!_0x273db5['endsWith']('/')&&(_0x273db5=_0x273db5+'/');}['get'](_0x1d2249,_0x372634){return __awaiter$5(this,void 0,void 0,function*(){const _0x1a7462=this['getUrl'](_0x1d2249);return yield fetch(_0x1a7462,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x372634}});});}['post'](_0x3c2019,_0x2af355,_0x49d3ef){return __awaiter$5(this,void 0,void 0,function*(){const _0x533a9b=this['getUrl'](_0x3c2019);return yield fetch(_0x533a9b,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2af355},'body':_0x49d3ef?JSON['stringify'](_0x49d3ef):null});});}['PostNoAuth'](_0x4067ff,_0x10b37c){return __awaiter$5(this,void 0,void 0,function*(){const _0x238efe=this['getUrl'](_0x4067ff);return yield fetch(_0x238efe,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0x10b37c?JSON['stringify'](_0x10b37c):null});});}['put'](_0x446a96,_0x24a448,_0x3dc282){return __awaiter$5(this,void 0,void 0,function*(){const _0x6bb324=this['getUrl'](_0x446a96);return yield fetch(_0x6bb324,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x24a448},'body':_0x3dc282?JSON['stringify'](_0x3dc282):null});});}['delete'](_0x46d0ac,_0x15e897){return __awaiter$5(this,void 0,void 0,function*(){const _0x643471=this['getUrl'](_0x46d0ac);return yield fetch(_0x643471,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x15e897}});});}}
|
|
10
10
|
|
|
11
|
-
var __awaiter$4=undefined&&undefined['__awaiter']||function(
|
|
11
|
+
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x42934c,_0x2bb882,_0x319748,_0x1cf78b){function _0x32c11e(_0x2fd9c4){return _0x2fd9c4 instanceof _0x319748?_0x2fd9c4:new _0x319748(function(_0x4f2693){_0x4f2693(_0x2fd9c4);});}return new(_0x319748||(_0x319748=Promise))(function(_0x24dde1,_0x316af0){function _0x27196e(_0x5c8aa3){try{_0x441a76(_0x1cf78b['next'](_0x5c8aa3));}catch(_0x3838db){_0x316af0(_0x3838db);}}function _0x72ce66(_0x4c19b9){try{_0x441a76(_0x1cf78b['throw'](_0x4c19b9));}catch(_0x47ab55){_0x316af0(_0x47ab55);}}function _0x441a76(_0x13f307){_0x13f307['done']?_0x24dde1(_0x13f307['value']):_0x32c11e(_0x13f307['value'])['then'](_0x27196e,_0x72ce66);}_0x441a76((_0x1cf78b=_0x1cf78b['apply'](_0x42934c,_0x2bb882||[]))['next']());});};class SearchServersService{constructor(_0x16ccb8){this['fetch']=_0x16ccb8,this['path']='search-services';}['create'](_0x434599,_0x32560b,_0x13f7fe,_0x447f41,_0x3a5ef9,_0x3aeac3,_0x3a80f4,_0x5a0903){return __awaiter$4(this,void 0,void 0,function*(){const _0x12fe8b={'account_name':_0x434599,'search_service_name':_0x32560b,'endpoint':_0x13f7fe,'key':_0x447f41,'country':_0x3a5ef9,'provider':_0x3aeac3,'index_name':_0x3a80f4};try{const _0x4d32f9=yield this['fetch']['post'](this['path'],_0x5a0903,_0x12fe8b);if(_0x4d32f9['status']>0xc7&&_0x4d32f9['status']<0x12c){const _0x278874=yield _0x4d32f9['json']();return new SuccessfulSearchServiceResponse(_0x278874);}const _0xb0efbe=yield _0x4d32f9['json']();return new FailedSearchServiceResponse(_0xb0efbe);}catch(_0x2a68b2){if(_0x2a68b2 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x2a68b2['message'],'title':_0x2a68b2['name'],'status':0x1f4,'instance':'','type':''});throw _0x2a68b2;}});}['delete'](_0x1431ed,_0xdac2d5,_0x5bc479){return __awaiter$4(this,void 0,void 0,function*(){const _0x1ce9b4=this['path']+'/'+_0x1431ed+'/'+_0xdac2d5;try{const _0x1b13f2=yield this['fetch']['delete'](_0x1ce9b4,_0x5bc479);if(_0x1b13f2['status']>0xc7&&_0x1b13f2['status']<0x12c)return new SuccessfulResponse({});const _0x252595=yield _0x1b13f2['json']();return new FailedResponse(_0x252595);}catch(_0x31c1a3){if(_0x31c1a3 instanceof Error)return new FailedResponse({'detail':_0x31c1a3['message'],'title':_0x31c1a3['name'],'status':0x1f4,'instance':'','type':''});throw _0x31c1a3;}});}['view'](_0xfcc29f,_0x2f1e31,_0x428452){return __awaiter$4(this,void 0,void 0,function*(){const _0x392b03=this['path']+'/'+_0xfcc29f+'/'+_0x2f1e31;try{const _0x5e6007=yield this['fetch']['get'](_0x392b03,_0x428452);if(_0x5e6007['status']>0xc7&&_0x5e6007['status']<0x12c){const _0x4185fa=yield _0x5e6007['json']();return new SuccessfulViewSearchServiceResponse(_0x4185fa);}const _0x595392=yield _0x5e6007['json']();return new FailedViewSearchServiceResponse(_0x595392);}catch(_0x26e8b2){if(_0x26e8b2 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x26e8b2['message'],'title':_0x26e8b2['name'],'status':0x1f4,'instance':'','type':''});throw _0x26e8b2;}});}['edit'](_0xb7223d,_0x12d8e3,_0xb2e1d0,_0x5efd02,_0x113061){return __awaiter$4(this,void 0,void 0,function*(){const _0x141754={'account_name':_0xb7223d,'search_service_name':_0x12d8e3,'key':_0xb2e1d0,'country':_0x5efd02};try{const _0x3beb18=yield this['fetch']['put'](this['path'],_0x113061,_0x141754);if(_0x3beb18['status']>0xc7&&_0x3beb18['status']<0x12c){const _0x275e9e=yield _0x3beb18['json']();return new SuccessfulSearchServiceResponse(_0x275e9e);}const _0x288e65=yield _0x3beb18['json']();return new FailedSearchServiceResponse(_0x288e65);}catch(_0x256a70){if(_0x256a70 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x256a70['message'],'title':_0x256a70['name'],'status':0x1f4,'instance':'','type':''});throw _0x256a70;}});}['list'](_0x451365,_0x181829){return __awaiter$4(this,void 0,void 0,function*(){const _0xeb3cab=this['path']+'/'+_0x451365;try{const _0x241bc1=yield this['fetch']['get'](_0xeb3cab,_0x181829);if(_0x241bc1['status']>0xc7&&_0x241bc1['status']<0x12c){const _0x2db6aa=yield _0x241bc1['json']();return new SuccessfulListSearchServiceResponse(_0x2db6aa);}const _0x3e8960=yield _0x241bc1['json']();return new FailedViewSearchServicesResponse(_0x3e8960);}catch(_0x56f530){if(_0x56f530 instanceof Error)return new FailedViewSearchServicesResponse({'detail':_0x56f530['message'],'title':_0x56f530['name'],'status':0x1f4,'instance':'','type':''});throw _0x56f530;}});}}
|
|
12
12
|
|
|
13
|
-
var __awaiter$3=undefined&&undefined['__awaiter']||function(
|
|
13
|
+
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x3551df,_0x4a12a6,_0x3beb94,_0x435844){function _0x529fb9(_0x244bc9){return _0x244bc9 instanceof _0x3beb94?_0x244bc9:new _0x3beb94(function(_0x2ce709){_0x2ce709(_0x244bc9);});}return new(_0x3beb94||(_0x3beb94=Promise))(function(_0x2d4058,_0x5680e5){function _0x188170(_0x579c4a){try{_0x57cf2b(_0x435844['next'](_0x579c4a));}catch(_0x94d845){_0x5680e5(_0x94d845);}}function _0x4e4995(_0x3b90f2){try{_0x57cf2b(_0x435844['throw'](_0x3b90f2));}catch(_0x8a3810){_0x5680e5(_0x8a3810);}}function _0x57cf2b(_0x5e2800){_0x5e2800['done']?_0x2d4058(_0x5e2800['value']):_0x529fb9(_0x5e2800['value'])['then'](_0x188170,_0x4e4995);}_0x57cf2b((_0x435844=_0x435844['apply'](_0x3551df,_0x4a12a6||[]))['next']());});};class FacetService{constructor(_0x582578){this['fetch']=_0x582578,this['path']='facet';}['create'](_0x2b05ec,_0x15f24c,_0x1624de,_0x2f4305){return __awaiter$3(this,void 0,void 0,function*(){const _0x1477d2={'account_name':_0x2b05ec,'list_name':_0x15f24c,'facet_name':_0x1624de};try{const _0x13fd50=yield this['fetch']['post'](this['path'],_0x2f4305,_0x1477d2);if(_0x13fd50['status']>0xc7&&_0x13fd50['status']<0x12c){const _0x3acd43=yield _0x13fd50['json']();return new SuccessfulFacetResponse(_0x3acd43);}const _0xe5f918=yield _0x13fd50['json']();return new FailedFacetResponse(_0xe5f918);}catch(_0x56fb01){if(_0x56fb01 instanceof Error)return new FailedFacetResponse({'detail':_0x56fb01['message'],'title':_0x56fb01['name'],'status':0x1f4,'instance':'','type':''});throw _0x56fb01;}});}['remove'](_0x54a38b,_0x449cee,_0x181f77,_0x30e442){return __awaiter$3(this,void 0,void 0,function*(){const _0xbf6e51='Facet/'+_0x54a38b+'/'+_0x449cee+'/'+_0x181f77,_0x30e59e=yield this['fetch']['delete'](_0xbf6e51,_0x30e442);try{if(_0x30e59e['status']>0xc7&&_0x30e59e['status']<0x12c)return new SuccessfulResponse({});const _0x3a7867=yield _0x30e59e['json']();return new FailedResponse(_0x3a7867);}catch(_0x235396){if(_0x235396 instanceof Error)return new FailedResponse({'detail':_0x235396['message'],'title':_0x235396['name'],'status':0x1f4,'instance':'','type':''});throw _0x235396;}});}['rename'](_0x2fa853,_0x153417,_0x4e22ab,_0x4b9ea6,_0x569341){return __awaiter$3(this,void 0,void 0,function*(){const _0x27bcd4={'account_name':_0x2fa853,'list_name':_0x153417,'facet_name':_0x4e22ab,'new_facet_name':_0x4b9ea6};try{const _0x2b4ebd=yield this['fetch']['put'](this['path'],_0x569341,_0x27bcd4);if(_0x2b4ebd['status']>0xc7&&_0x2b4ebd['status']<0x12c){const _0xf4f8f3=yield _0x2b4ebd['json']();return new SuccessfulFacetResponse(_0xf4f8f3);}const _0x31422c=yield _0x2b4ebd['json']();return new FailedFacetResponse(_0x31422c);}catch(_0x39b7dd){if(_0x39b7dd instanceof Error)return new FailedFacetResponse({'detail':_0x39b7dd['message'],'title':_0x39b7dd['name'],'status':0x1f4,'instance':'','type':''});throw _0x39b7dd;}});}}
|
|
14
14
|
|
|
15
|
-
var __awaiter$2=undefined&&undefined['__awaiter']||function(
|
|
15
|
+
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x26666c,_0x2c28b2,_0x5b42a0,_0x2bef35){function _0xdeb5bc(_0x5e304e){return _0x5e304e instanceof _0x5b42a0?_0x5e304e:new _0x5b42a0(function(_0x39ce0f){_0x39ce0f(_0x5e304e);});}return new(_0x5b42a0||(_0x5b42a0=Promise))(function(_0x36c248,_0x3992b9){function _0x1ea062(_0x18bf28){try{_0x52bab1(_0x2bef35['next'](_0x18bf28));}catch(_0xa35534){_0x3992b9(_0xa35534);}}function _0x2a71d9(_0x2131ee){try{_0x52bab1(_0x2bef35['throw'](_0x2131ee));}catch(_0x492a12){_0x3992b9(_0x492a12);}}function _0x52bab1(_0x4d59ed){_0x4d59ed['done']?_0x36c248(_0x4d59ed['value']):_0xdeb5bc(_0x4d59ed['value'])['then'](_0x1ea062,_0x2a71d9);}_0x52bab1((_0x2bef35=_0x2bef35['apply'](_0x26666c,_0x2c28b2||[]))['next']());});};class SearchResultService{constructor(_0x48ac15){this['fetch']=_0x48ac15,this['path']='search-result';}['create'](_0x19959d,_0x515104,_0x170ff8,_0x34602e,_0x4679ed){return __awaiter$2(this,void 0,void 0,function*(){_0x4679ed=_0x4679ed!==null&&_0x4679ed!==void 0?_0x4679ed:{'description':'','keywords':'','resource_1':'','resource_2':'','resource_3':'','latitude':0x0,'longitude':0x0,'facets':[]};const _0x5bb0b1=Object['assign']({'account_name':_0x19959d,'search_result_name':_0x170ff8,'list_name':_0x515104},_0x4679ed);try{const _0x2884a2=yield this['fetch']['post'](this['path'],_0x34602e,_0x5bb0b1);if(_0x2884a2['status']>0xc7&&_0x2884a2['status']<0x12c){const _0x539b43=yield _0x2884a2['json']();return new SuccessfulViewSearchResultResponse(_0x539b43);}const _0xe2a01b=yield _0x2884a2['json']();return new FailedSearchResultResponse(_0xe2a01b);}catch(_0x4c857f){if(_0x4c857f instanceof Error)return new FailedSearchResultResponse({'detail':_0x4c857f['message'],'title':_0x4c857f['name'],'status':0x1f4,'instance':'','type':''});throw _0x4c857f;}});}['transfer'](_0x1e6d06,_0x3a46df,_0x19ea91,_0x1a2c9c){return __awaiter$2(this,void 0,void 0,function*(){const _0x26a5b5={'account_name':_0x1e6d06,'list_name':_0x3a46df,'new_search_service_name':_0x19ea91};try{const _0x3c2820=yield this['fetch']['post'](this['path']+'/transfer',_0x1a2c9c,_0x26a5b5);if(_0x3c2820['status']>0xc7&&_0x3c2820['status']<0x12c){const _0xb87de1=yield _0x3c2820['json']();return new SuccessfulListResponse(_0xb87de1);}const _0x4b54c0=yield _0x3c2820['json']();return new FailedListResponse(_0x4b54c0);}catch(_0x3832b3){if(_0x3832b3 instanceof Error)return new FailedListResponse({'detail':_0x3832b3['message'],'title':_0x3832b3['name'],'status':0x1f4,'instance':'','type':''});throw _0x3832b3;}});}['list'](_0x27f5ab,_0x43212e,_0x4a03fa,_0x4e687d){return __awaiter$2(this,void 0,void 0,function*(){let _0x464368=this['path']+'/list/'+_0x27f5ab+'/'+_0x43212e;const _0x25c364=[];(_0x4e687d===null||_0x4e687d===void 0?void 0:_0x4e687d['size'])&&_0x25c364['push']('size='+_0x4e687d['size']);(_0x4e687d===null||_0x4e687d===void 0?void 0:_0x4e687d['skip'])&&_0x25c364['push']('skip='+_0x4e687d['skip']);_0x25c364['length']>0x0&&_0x25c364['forEach']((_0x625375,_0x2b6357)=>{_0x2b6357===0x0?_0x464368+='?':_0x464368+='&',_0x464368+=_0x625375;});try{const _0x253839=yield this['fetch']['get'](_0x464368,_0x4a03fa);if(_0x253839['status']>0xc7&&_0x253839['status']<0x12c){const _0x494dac=yield _0x253839['json']();return new SuccessfulListSearchResultResponse(_0x494dac);}const _0x1e152f=yield _0x253839['json']();return new FailedViewSearchResultResponse(_0x1e152f);}catch(_0x2e533d){if(_0x2e533d instanceof Error)return new FailedViewSearchResultResponse({'detail':_0x2e533d['message'],'title':_0x2e533d['name'],'status':0x1f4,'instance':'','type':''});throw _0x2e533d;}});}}
|
|
16
16
|
|
|
17
|
-
var __awaiter$1=undefined&&undefined['__awaiter']||function(
|
|
17
|
+
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x3cc92a,_0x2000aa,_0x5b3a1d,_0x4fa655){function _0x4a963d(_0x2a359e){return _0x2a359e instanceof _0x5b3a1d?_0x2a359e:new _0x5b3a1d(function(_0x1f421c){_0x1f421c(_0x2a359e);});}return new(_0x5b3a1d||(_0x5b3a1d=Promise))(function(_0x2b0705,_0x67541c){function _0x171f18(_0x73eb3d){try{_0x5382ee(_0x4fa655['next'](_0x73eb3d));}catch(_0x3cd85e){_0x67541c(_0x3cd85e);}}function _0x4fa974(_0x1a192d){try{_0x5382ee(_0x4fa655['throw'](_0x1a192d));}catch(_0xa332d7){_0x67541c(_0xa332d7);}}function _0x5382ee(_0x4a1a87){_0x4a1a87['done']?_0x2b0705(_0x4a1a87['value']):_0x4a963d(_0x4a1a87['value'])['then'](_0x171f18,_0x4fa974);}_0x5382ee((_0x4fa655=_0x4fa655['apply'](_0x3cc92a,_0x2000aa||[]))['next']());});};class ContributorService{constructor(_0x551307){this['fetch']=_0x551307,this['path']='contributor';}['create'](_0x35acdb,_0x5d03d0,_0x127611,_0x5bc31d){return __awaiter$1(this,void 0,void 0,function*(){const _0x539493={'account_name':_0x35acdb,'list_name':_0x5d03d0,'contributor_name':_0x127611};try{const _0xf8d176=yield this['fetch']['post'](this['path'],_0x5bc31d,_0x539493);if(_0xf8d176['status']>0xc7&&_0xf8d176['status']<0x12c){const _0x83cc28=yield _0xf8d176['json']();return new SuccessfulContributorResponse(_0x83cc28);}const _0x15d652=yield _0xf8d176['json']();return new FailedContributorResponse(_0x15d652);}catch(_0x598017){if(_0x598017 instanceof Error)return new FailedContributorResponse({'detail':_0x598017['message'],'title':_0x598017['name'],'status':0x1f4,'instance':'','type':''});throw _0x598017;}});}['remove'](_0x455dfe,_0x55e274,_0x200cc9,_0xa010c0){return __awaiter$1(this,void 0,void 0,function*(){const _0x283ac5=this['path']+'/'+_0x455dfe+'/'+_0x55e274+'/'+_0x200cc9,_0x21ec2f=yield this['fetch']['delete'](_0x283ac5,_0xa010c0);try{if(_0x21ec2f['status']>0xc7&&_0x21ec2f['status']<0x12c)return new SuccessfulResponse({});const _0x47fbb7=yield _0x21ec2f['json']();return new FailedResponse(_0x47fbb7);}catch(_0x561e47){if(_0x561e47 instanceof Error)return new FailedResponse({'detail':_0x561e47['message'],'title':_0x561e47['name'],'status':0x1f4,'instance':'','type':''});throw _0x561e47;}});}['startsWith'](_0x14dd01,_0x2ba80e){return __awaiter$1(this,void 0,void 0,function*(){const _0x198344=this['path']+'/'+_0x14dd01;try{const _0x295897=yield this['fetch']['get'](_0x198344,_0x2ba80e);if(_0x295897['status']>0xc7&&_0x295897['status']<0x12c){const _0x32333e=yield _0x295897['json']();return new SuccessfulAccountAndImageResponse(_0x32333e);}const _0x32ff98=yield _0x295897['json']();return new FailedAccountAndImageResponse(_0x32ff98);}catch(_0x3077db){if(_0x3077db instanceof Error)return new FailedAccountAndImageResponse({'detail':_0x3077db['message'],'title':_0x3077db['name'],'status':0x1f4,'instance':'','type':''});throw _0x3077db;}});}}
|
|
18
18
|
|
|
19
|
-
var __awaiter=undefined&&undefined['__awaiter']||function(
|
|
19
|
+
var __awaiter=undefined&&undefined['__awaiter']||function(_0x368bdb,_0x4e096c,_0x343864,_0x280a66){function _0x2bfae8(_0x14aeff){return _0x14aeff instanceof _0x343864?_0x14aeff:new _0x343864(function(_0x305a10){_0x305a10(_0x14aeff);});}return new(_0x343864||(_0x343864=Promise))(function(_0xc7fe53,_0x3cc6c1){function _0x54350f(_0x1b884b){try{_0xe79feb(_0x280a66['next'](_0x1b884b));}catch(_0x202e52){_0x3cc6c1(_0x202e52);}}function _0x25089b(_0x2c9879){try{_0xe79feb(_0x280a66['throw'](_0x2c9879));}catch(_0x1c31bb){_0x3cc6c1(_0x1c31bb);}}function _0xe79feb(_0x2599d4){_0x2599d4['done']?_0xc7fe53(_0x2599d4['value']):_0x2bfae8(_0x2599d4['value'])['then'](_0x54350f,_0x25089b);}_0xe79feb((_0x280a66=_0x280a66['apply'](_0x368bdb,_0x4e096c||[]))['next']());});};class AdminClient{constructor(_0x5a7e19='https://admin.searchability.dev/'){var _0x3b99d6=new Fetch(_0x5a7e19);this['Accounts']=new AccountService(_0x3b99d6),this['Lists']=new ListService(_0x3b99d6),this['ApiKeys']=new ApiKeyService(_0x3b99d6),this['SearchServers']=new SearchServersService(_0x3b99d6),this['Facets']=new FacetService(_0x3b99d6),this['SearchResults']=new SearchResultService(_0x3b99d6),this['Contributors']=new ContributorService(_0x3b99d6);}}class AuthClient{constructor(_0x39c1f7='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x39c1f7);}['login'](_0x59d4de){return __awaiter(this,void 0,void 0,function*(){const _0x3d3275='login/'+_0x59d4de;try{const _0x3c5303=yield yield fetch(_0x3d3275);if(_0x3c5303['status']>0xc7&&_0x3c5303['status']<0x12c){const _0x1a6ea3=yield _0x3c5303['json']();return new SuccessfulAuthResponse(_0x1a6ea3);}const _0x58b5ca=yield _0x3c5303['json']();return new FailedAuthResponse(_0x58b5ca);}catch(_0x36a693){if(_0x36a693 instanceof Error)return new FailedAuthResponse({'detail':_0x36a693['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x36a693;}});}['refresh'](_0x4b8bc3){return __awaiter(this,void 0,void 0,function*(){const _0x3a5035='refresh',_0x2b2c88={'refresh_token':_0x4b8bc3};try{const _0x10a92e=yield this['fetch']['PostNoAuth'](_0x3a5035,_0x2b2c88);if(_0x10a92e['status']>0xc7&&_0x10a92e['status']<0x12c){const _0x39cbb9=yield _0x10a92e['json']();return new SuccessfulAuthResponse(_0x39cbb9);}const _0x3e63dd=yield _0x10a92e['json']();return new FailedAuthResponse(_0x3e63dd);}catch(_0x30486a){if(_0x30486a instanceof Error)return new FailedAuthResponse({'detail':_0x30486a['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x30486a;}});}['getTokenStatus'](_0x1a0c70){if(Date['now']()<_0x1a0c70['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x1a0c70['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
|
|
20
20
|
|
|
21
21
|
export { AdminClient, AuthClient, TokenStatus, Tokens };
|
package/dist/types.d.ts
CHANGED
|
@@ -57,8 +57,9 @@ declare class SearchResultService {
|
|
|
57
57
|
private readonly fetch;
|
|
58
58
|
private readonly path;
|
|
59
59
|
constructor(fetch: Fetch);
|
|
60
|
-
create(account_name: string, list_name: string, search_result_name: string, access_token: string, options?: CreateSearchResultOptions | undefined): Promise<Response<SearchResult, Problem>>;
|
|
60
|
+
create(account_name: string, list_name: string, search_result_name: string, access_token: string, options?: Partial<CreateSearchResultOptions> | undefined): Promise<Response<SearchResult, Problem>>;
|
|
61
61
|
transfer(account_name: string, list_name: string, new_search_service_name: string, access_token: string): Promise<Response<List, Problem>>;
|
|
62
|
+
list(account_name: string, list_name: string, access_token: string, options?: Partial<ListSearchResultOptions> | undefined): Promise<Response<SearchResult[], Problem>>;
|
|
62
63
|
}
|
|
63
64
|
|
|
64
65
|
declare class ContributorService {
|
|
@@ -207,6 +208,10 @@ type CreateSearchResultOptions = {
|
|
|
207
208
|
longitude?: number;
|
|
208
209
|
facets?: NameAndValue[];
|
|
209
210
|
};
|
|
211
|
+
type ListSearchResultOptions = {
|
|
212
|
+
size?: number;
|
|
213
|
+
skip?: number;
|
|
214
|
+
};
|
|
210
215
|
declare class SuccessfulContributorResponse extends Response<Contributor, Problem> {
|
|
211
216
|
readonly contributor: Contributor;
|
|
212
217
|
constructor(contributor: Contributor);
|
|
@@ -345,6 +350,18 @@ declare class FailedSearchResultResponse extends Response<SearchResult, Problem>
|
|
|
345
350
|
toSuccess(): SearchResult;
|
|
346
351
|
toProblem(): Problem;
|
|
347
352
|
}
|
|
353
|
+
declare class SuccessfulListSearchResultResponse extends Response<SearchResult[], Problem> {
|
|
354
|
+
readonly searchResults: SearchResult[];
|
|
355
|
+
constructor(searchResults: SearchResult[]);
|
|
356
|
+
toSuccess(): SearchResult[];
|
|
357
|
+
toProblem(): Problem;
|
|
358
|
+
}
|
|
359
|
+
declare class FailedViewSearchResultResponse extends Response<SearchResult[], Problem> {
|
|
360
|
+
readonly problem: Problem;
|
|
361
|
+
constructor(problem: Problem);
|
|
362
|
+
toSuccess(): SearchResult[];
|
|
363
|
+
toProblem(): Problem;
|
|
364
|
+
}
|
|
348
365
|
declare class SuccessfulListSearchServiceResponse extends Response<SearchService[], Problem> {
|
|
349
366
|
readonly searchServices: SearchService[];
|
|
350
367
|
constructor(searchServices: SearchService[]);
|
|
@@ -388,4 +405,4 @@ declare class FailedApiKeyValueResponse extends Response<ApiKeyValue, Problem> {
|
|
|
388
405
|
toProblem(): Problem;
|
|
389
406
|
}
|
|
390
407
|
|
|
391
|
-
export { type Account, type AccountAndImage, type AccountImage, AdminClient, type ApiKey, type ApiKeyValue, AuthClient, type Contributor, type CreateSearchResultOptions, type Error, type Facet, FailedAccountAndImageResponse, FailedAccountImageResponse, FailedAccountResponse, FailedApiKeyResponse, FailedApiKeyValueResponse, FailedAuthResponse, FailedContributorResponse, FailedFacetResponse, FailedListIdentityResponse, FailedListResponse, FailedResponse, FailedSearchResultResponse, FailedSearchServiceResponse, FailedViewSearchServiceResponse, FailedViewSearchServicesResponse, type List, type ListIdentity, type NameAndValue, type Problem, type RefreshRequest, Response, type SearchResult, type SearchService, type SearchServiceDetails, SuccessfulAccountAndImageResponse, SuccessfulAccountImageResponse, SuccessfulAccountResponse, SuccessfulApiKeyResponse, SuccessfulApiKeyValueResponse, SuccessfulAuthResponse, SuccessfulContributorResponse, SuccessfulFacetResponse, SuccessfulListIdentityResponse, SuccessfulListResponse, SuccessfulListSearchServiceResponse, SuccessfulResponse, SuccessfulSearchServiceResponse, SuccessfulViewSearchResultResponse, SuccessfulViewSearchServiceResponse, TokenStatus, Tokens };
|
|
408
|
+
export { type Account, type AccountAndImage, type AccountImage, AdminClient, type ApiKey, type ApiKeyValue, AuthClient, type Contributor, type CreateSearchResultOptions, type Error, type Facet, FailedAccountAndImageResponse, FailedAccountImageResponse, FailedAccountResponse, FailedApiKeyResponse, FailedApiKeyValueResponse, FailedAuthResponse, FailedContributorResponse, FailedFacetResponse, FailedListIdentityResponse, FailedListResponse, FailedResponse, FailedSearchResultResponse, FailedSearchServiceResponse, FailedViewSearchResultResponse, FailedViewSearchServiceResponse, FailedViewSearchServicesResponse, type List, type ListIdentity, type ListSearchResultOptions, type NameAndValue, type Problem, type RefreshRequest, Response, type SearchResult, type SearchService, type SearchServiceDetails, SuccessfulAccountAndImageResponse, SuccessfulAccountImageResponse, SuccessfulAccountResponse, SuccessfulApiKeyResponse, SuccessfulApiKeyValueResponse, SuccessfulAuthResponse, SuccessfulContributorResponse, SuccessfulFacetResponse, SuccessfulListIdentityResponse, SuccessfulListResponse, SuccessfulListSearchResultResponse, SuccessfulListSearchServiceResponse, SuccessfulResponse, SuccessfulSearchServiceResponse, SuccessfulViewSearchResultResponse, SuccessfulViewSearchServiceResponse, TokenStatus, Tokens };
|
package/package.json
CHANGED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
var TokenStatus;(function(_0x52d8f1){_0x52d8f1[_0x52d8f1['Ok']=0x0]='Ok',_0x52d8f1[_0x52d8f1['Refresh']=0x1]='Refresh',_0x52d8f1[_0x52d8f1['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(_0x2d309c){this['isSuccess']=_0x2d309c;}}class SuccessfulContributorResponse extends Response{constructor(_0x145762){super(!![]),this['contributor']=_0x145762;}['toSuccess'](){return this['contributor'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedContributorResponse extends Response{constructor(_0x3b56ce){super(![]),this['problem']=_0x3b56ce;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountAndImageResponse extends Response{constructor(_0x5f479f){super(!![]),this['accountAndImages']=_0x5f479f;}['toSuccess'](){return this['accountAndImages'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountAndImageResponse extends Response{constructor(_0x25fd5d){super(![]),this['problem']=_0x25fd5d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulFacetResponse extends Response{constructor(_0x500c3b){super(!![]),this['facet']=_0x500c3b;}['toSuccess'](){return this['facet'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetResponse extends Response{constructor(_0xf2105b){super(![]),this['problem']=_0xf2105b;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountResponse extends Response{constructor(_0x53fb1c){super(!![]),this['account']=_0x53fb1c;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountImageResponse extends Response{constructor(_0x3a92c8){super(!![]),this['accountImage']=_0x3a92c8;}['toSuccess'](){return this['accountImage'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListIdentityResponse extends Response{constructor(_0x3f5f72){super(!![]),this['list']=_0x3f5f72;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListResponse extends Response{constructor(_0x24494b){super(!![]),this['list']=_0x24494b;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x169cc9){super(![]),this['problem']=_0x169cc9;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountImageResponse extends Response{constructor(_0x417c13){super(![]),this['problem']=_0x417c13;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListIdentityResponse extends Response{constructor(_0x43a005){super(![]),this['problem']=_0x43a005;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListResponse extends Response{constructor(_0x45e91b){super(![]),this['problem']=_0x45e91b;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x49579c){super(!![]),this['tokens']=_0x49579c;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x241987){super(![]),this['problem']=_0x241987;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x123652){super(!![]),this['apiKey']=_0x123652;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x2d955f){super(![]),this['problem']=_0x2d955f;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0xb43551){super(!![]),this['searchService']=_0xb43551;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0xbbf316){super(![]),this['problem']=_0xbbf316;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x2ee71d){super(!![]),this['searchService']=_0x2ee71d;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulViewSearchResultResponse extends Response{constructor(_0x42d4c9){super(!![]),this['searchResult']=_0x42d4c9;}['toSuccess'](){return this['searchResult'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchResultResponse extends Response{constructor(_0x5f56a8){super(![]),this['problem']=_0x5f56a8;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchServiceResponse extends Response{constructor(_0x2c91ef){super(!![]),this['searchServices']=_0x2c91ef;}['toSuccess'](){return this['searchServices'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServicesResponse extends Response{constructor(_0x142088){super(![]),this['problem']=_0x142088;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedViewSearchServiceResponse extends Response{constructor(_0x45dd7e){super(![]),this['problem']=_0x45dd7e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x4a1e60){super(!![]),this['apiKeyValue']=_0x4a1e60;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x1416f1){super(!![]),this['obj']=_0x1416f1;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x25d91e){super(![]),this['problem']=_0x25d91e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x5bc33e){super(![]),this['problem']=_0x5bc33e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
|
|
2
|
-
|
|
3
|
-
var __awaiter$8=undefined&&undefined['__awaiter']||function(_0x23eebe,_0x51f058,_0x2d9d4e,_0x75aa3b){function _0x5d747a(_0x462a9a){return _0x462a9a instanceof _0x2d9d4e?_0x462a9a:new _0x2d9d4e(function(_0x23360f){_0x23360f(_0x462a9a);});}return new(_0x2d9d4e||(_0x2d9d4e=Promise))(function(_0xee6280,_0x308c7c){function _0x177723(_0x205962){try{_0x377206(_0x75aa3b['next'](_0x205962));}catch(_0x420daf){_0x308c7c(_0x420daf);}}function _0x3fa913(_0x579eaa){try{_0x377206(_0x75aa3b['throw'](_0x579eaa));}catch(_0x42af2e){_0x308c7c(_0x42af2e);}}function _0x377206(_0x2a5376){_0x2a5376['done']?_0xee6280(_0x2a5376['value']):_0x5d747a(_0x2a5376['value'])['then'](_0x177723,_0x3fa913);}_0x377206((_0x75aa3b=_0x75aa3b['apply'](_0x23eebe,_0x51f058||[]))['next']());});};class AccountService{constructor(_0x2e3961){this['fetch']=_0x2e3961;}['get'](_0x46725d,_0x21d3a8){return __awaiter$8(this,void 0,void 0,function*(){const _0x559978='Account/'+_0x46725d+'/',_0x5d047b=yield this['fetch']['get'](_0x559978,_0x21d3a8);try{if(_0x5d047b['status']>0xc7&&_0x5d047b['status']<0x12c){const _0x533b4b=yield _0x5d047b['json']();return new SuccessfulAccountResponse(_0x533b4b);}const _0x276c12=yield _0x5d047b['json']();return new FailedAccountResponse(_0x276c12);}catch(_0x29fa95){if(_0x29fa95 instanceof Error)return new FailedAccountResponse({'detail':_0x29fa95['message'],'title':_0x29fa95['name'],'status':0x1f4,'instance':'','type':''});throw _0x29fa95;}});}['getImage'](_0xc739fb,_0x3043b6){return __awaiter$8(this,void 0,void 0,function*(){const _0x3deb30='account/image/'+_0xc739fb+'/',_0x58798b=yield this['fetch']['get'](_0x3deb30,_0x3043b6);try{if(_0x58798b['status']>0xc7&&_0x58798b['status']<0x12c){const _0xc05796=yield _0x58798b['json']();return new SuccessfulAccountImageResponse(_0xc05796);}const _0x46f235=yield _0x58798b['json']();return new FailedAccountImageResponse(_0x46f235);}catch(_0x3419f4){if(_0x3419f4 instanceof Error)return new FailedAccountImageResponse({'detail':_0x3419f4['message'],'title':_0x3419f4['name'],'status':0x1f4,'instance':'','type':''});throw _0x3419f4;}});}}
|
|
4
|
-
|
|
5
|
-
var __awaiter$7=undefined&&undefined['__awaiter']||function(_0x470b5b,_0x3b2f97,_0x538585,_0x6b2346){function _0x1834f3(_0x5aa781){return _0x5aa781 instanceof _0x538585?_0x5aa781:new _0x538585(function(_0x84febc){_0x84febc(_0x5aa781);});}return new(_0x538585||(_0x538585=Promise))(function(_0x4ea3f8,_0x1a87ec){function _0x3e2e45(_0x26fa8b){try{_0x15edc0(_0x6b2346['next'](_0x26fa8b));}catch(_0x648bc0){_0x1a87ec(_0x648bc0);}}function _0x2dbe74(_0x1f8ab4){try{_0x15edc0(_0x6b2346['throw'](_0x1f8ab4));}catch(_0x27d26e){_0x1a87ec(_0x27d26e);}}function _0x15edc0(_0x1351f9){_0x1351f9['done']?_0x4ea3f8(_0x1351f9['value']):_0x1834f3(_0x1351f9['value'])['then'](_0x3e2e45,_0x2dbe74);}_0x15edc0((_0x6b2346=_0x6b2346['apply'](_0x470b5b,_0x3b2f97||[]))['next']());});};class ApiKeyService{constructor(_0x3eedba){this['fetch']=_0x3eedba,this['path']='api-key';}['create'](_0x50d386,_0x536031,_0x283abc){return __awaiter$7(this,void 0,void 0,function*(){const _0x3e7801={'account_name':_0x50d386,'api_key_name':_0x536031};try{const _0x1a2aae=yield this['fetch']['post'](this['path'],_0x283abc,_0x3e7801);if(_0x1a2aae['status']>0xc7&&_0x1a2aae['status']<0x12c){const _0x3a9742=yield _0x1a2aae['json']();return new SuccessfulApiKeyResponse(_0x3a9742);}const _0x5710a9=yield _0x1a2aae['json']();return new FailedApiKeyResponse(_0x5710a9);}catch(_0x41bdc1){if(_0x41bdc1 instanceof Error)return new FailedApiKeyResponse({'detail':_0x41bdc1['message'],'title':_0x41bdc1['name'],'status':0x1f4,'instance':'','type':''});throw _0x41bdc1;}});}['view'](_0x101a2a,_0x2d7f49,_0x420253){return __awaiter$7(this,void 0,void 0,function*(){const _0x417cb8=this['path']+'/'+_0x101a2a+'/'+_0x2d7f49;try{const _0x2942f5=yield this['fetch']['get'](_0x417cb8,_0x420253);if(_0x2942f5['status']>0xc7&&_0x2942f5['status']<0x12c){const _0x5eca5d=yield _0x2942f5['json']();return new SuccessfulApiKeyValueResponse(_0x5eca5d);}const _0x2e42cb=yield _0x2942f5['json']();return new FailedApiKeyValueResponse(_0x2e42cb);}catch(_0x4f69e4){if(_0x4f69e4 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x4f69e4['message'],'title':_0x4f69e4['name'],'status':0x1f4,'instance':'','type':''});throw _0x4f69e4;}});}['delete'](_0x1ba6ec,_0x3ee4cc,_0x1a67dc){return __awaiter$7(this,void 0,void 0,function*(){const _0x100f35=this['path']+'/'+_0x1ba6ec+'/'+_0x3ee4cc;try{const _0x3edf00=yield this['fetch']['delete'](_0x100f35,_0x1a67dc);if(_0x3edf00['status']>0xc7&&_0x3edf00['status']<0x12c)return new SuccessfulResponse({});const _0x4f10d9=yield _0x3edf00['json']();return new FailedResponse(_0x4f10d9);}catch(_0x18a875){if(_0x18a875 instanceof Error)return new FailedResponse({'detail':_0x18a875['message'],'title':_0x18a875['name'],'status':0x1f4,'instance':'','type':''});throw _0x18a875;}});}}
|
|
6
|
-
|
|
7
|
-
var __awaiter$6=undefined&&undefined['__awaiter']||function(_0x6f05e8,_0x23d30d,_0x577b29,_0x1c6e40){function _0x1e5844(_0x10172b){return _0x10172b instanceof _0x577b29?_0x10172b:new _0x577b29(function(_0x3e8fe2){_0x3e8fe2(_0x10172b);});}return new(_0x577b29||(_0x577b29=Promise))(function(_0x5f580e,_0x2c793e){function _0x532a9d(_0x359789){try{_0x81fb9b(_0x1c6e40['next'](_0x359789));}catch(_0x4d657b){_0x2c793e(_0x4d657b);}}function _0x49b668(_0x1b767e){try{_0x81fb9b(_0x1c6e40['throw'](_0x1b767e));}catch(_0x2440e9){_0x2c793e(_0x2440e9);}}function _0x81fb9b(_0x16a045){_0x16a045['done']?_0x5f580e(_0x16a045['value']):_0x1e5844(_0x16a045['value'])['then'](_0x532a9d,_0x49b668);}_0x81fb9b((_0x1c6e40=_0x1c6e40['apply'](_0x6f05e8,_0x23d30d||[]))['next']());});};class ListService{constructor(_0x58b726){this['fetch']=_0x58b726;}['create'](_0xe33d70,_0x44bf6b,_0x11c260,_0x57317c){return __awaiter$6(this,void 0,void 0,function*(){const _0x19ebd4='List',_0x29af8f={'account_name':_0xe33d70,'list_name':_0x44bf6b,'search_service_name':_0x11c260};try{const _0x43255a=yield this['fetch']['post'](_0x19ebd4,_0x57317c,_0x29af8f);if(_0x43255a['status']>0xc7&&_0x43255a['status']<0x12c){const _0x1c8cc5=yield _0x43255a['json']();return new SuccessfulListIdentityResponse(_0x1c8cc5);}const _0x413b5b=yield _0x43255a['json']();return new FailedListIdentityResponse(_0x413b5b);}catch(_0x50df24){if(_0x50df24 instanceof Error)return new FailedListIdentityResponse({'detail':_0x50df24['message'],'title':_0x50df24['name'],'status':0x1f4,'instance':'','type':''});throw _0x50df24;}});}['delete'](_0x183b18,_0xf401a0,_0x3a1696){return __awaiter$6(this,void 0,void 0,function*(){const _0x4fe5ec='List/'+_0x183b18+'/'+_0xf401a0,_0x2bd83d=yield this['fetch']['delete'](_0x4fe5ec,_0x3a1696);try{if(_0x2bd83d['status']>0xc7&&_0x2bd83d['status']<0x12c)return new SuccessfulResponse({});const _0x150dea=yield _0x2bd83d['json']();return new FailedResponse(_0x150dea);}catch(_0x37560a){if(_0x37560a instanceof Error)return new FailedResponse({'detail':_0x37560a['message'],'title':_0x37560a['name'],'status':0x1f4,'instance':'','type':''});throw _0x37560a;}});}['get'](_0x3141a9,_0x7a3dac,_0x426365){return __awaiter$6(this,void 0,void 0,function*(){const _0x39cc35='List/'+_0x3141a9+'/'+_0x7a3dac;try{const _0x48cd80=yield this['fetch']['get'](_0x39cc35,_0x426365);if(_0x48cd80['status']>0xc7&&_0x48cd80['status']<0x12c){const _0xdd5d90=yield _0x48cd80['json']();return new SuccessfulListResponse(_0xdd5d90);}const _0x5a97dd=yield _0x48cd80['json']();return new FailedListResponse(_0x5a97dd);}catch(_0x2073e5){if(_0x2073e5 instanceof Error)return new FailedListResponse({'detail':_0x2073e5['message'],'title':_0x2073e5['name'],'status':0x1f4,'instance':'','type':''});throw _0x2073e5;}});}}
|
|
8
|
-
|
|
9
|
-
var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x2211ac,_0x194409,_0x5e7ee4,_0x1bb356){function _0xb8bfb3(_0x47de9b){return _0x47de9b instanceof _0x5e7ee4?_0x47de9b:new _0x5e7ee4(function(_0x222a46){_0x222a46(_0x47de9b);});}return new(_0x5e7ee4||(_0x5e7ee4=Promise))(function(_0x5aae2d,_0x101b51){function _0x374d64(_0x472fbc){try{_0x4e5c03(_0x1bb356['next'](_0x472fbc));}catch(_0x116b38){_0x101b51(_0x116b38);}}function _0x5d9092(_0x3bcd9b){try{_0x4e5c03(_0x1bb356['throw'](_0x3bcd9b));}catch(_0x39681b){_0x101b51(_0x39681b);}}function _0x4e5c03(_0x3f3ce2){_0x3f3ce2['done']?_0x5aae2d(_0x3f3ce2['value']):_0xb8bfb3(_0x3f3ce2['value'])['then'](_0x374d64,_0x5d9092);}_0x4e5c03((_0x1bb356=_0x1bb356['apply'](_0x2211ac,_0x194409||[]))['next']());});};class Fetch{constructor(_0x36d266){this['baseUri']=_0x36d266,this['getUrl']=_0x3e09e6=>{return _0x3e09e6['startsWith']('/')&&(_0x3e09e6=_0x3e09e6['replace']('/','')),''+this['baseUri']+_0x3e09e6;},!_0x36d266['endsWith']('/')&&(_0x36d266=_0x36d266+'/');}['get'](_0x552db5,_0x3b3fd1){return __awaiter$5(this,void 0,void 0,function*(){const _0x585cde=this['getUrl'](_0x552db5);return yield fetch(_0x585cde,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3b3fd1}});});}['post'](_0x2deef7,_0x42db66,_0x5dbd6c){return __awaiter$5(this,void 0,void 0,function*(){const _0x4d859e=this['getUrl'](_0x2deef7);return yield fetch(_0x4d859e,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x42db66},'body':_0x5dbd6c?JSON['stringify'](_0x5dbd6c):null});});}['PostNoAuth'](_0x431eee,_0x4b0c5c){return __awaiter$5(this,void 0,void 0,function*(){const _0x35864e=this['getUrl'](_0x431eee);return yield fetch(_0x35864e,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0x4b0c5c?JSON['stringify'](_0x4b0c5c):null});});}['put'](_0x2fb627,_0x422a90,_0x3c1064){return __awaiter$5(this,void 0,void 0,function*(){const _0x3e9cb2=this['getUrl'](_0x2fb627);return yield fetch(_0x3e9cb2,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x422a90},'body':_0x3c1064?JSON['stringify'](_0x3c1064):null});});}['delete'](_0x59f8bd,_0x4b1dd5){return __awaiter$5(this,void 0,void 0,function*(){const _0x19d210=this['getUrl'](_0x59f8bd);return yield fetch(_0x19d210,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x4b1dd5}});});}}
|
|
10
|
-
|
|
11
|
-
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x5166c3,_0x582c74,_0x5f493f,_0x15d9ef){function _0x19a1d1(_0x563837){return _0x563837 instanceof _0x5f493f?_0x563837:new _0x5f493f(function(_0x34348f){_0x34348f(_0x563837);});}return new(_0x5f493f||(_0x5f493f=Promise))(function(_0xfe6062,_0x3d3d75){function _0x21f53c(_0x4fd7a3){try{_0x4ea6f0(_0x15d9ef['next'](_0x4fd7a3));}catch(_0x16384b){_0x3d3d75(_0x16384b);}}function _0x745a7e(_0x39a1ac){try{_0x4ea6f0(_0x15d9ef['throw'](_0x39a1ac));}catch(_0x53ce3a){_0x3d3d75(_0x53ce3a);}}function _0x4ea6f0(_0x2c67f1){_0x2c67f1['done']?_0xfe6062(_0x2c67f1['value']):_0x19a1d1(_0x2c67f1['value'])['then'](_0x21f53c,_0x745a7e);}_0x4ea6f0((_0x15d9ef=_0x15d9ef['apply'](_0x5166c3,_0x582c74||[]))['next']());});};class SearchServersService{constructor(_0x21e58d){this['fetch']=_0x21e58d,this['path']='search-services';}['create'](_0x37bea5,_0x1043f6,_0xbd42ee,_0x2618c7,_0x27086b,_0x16d292,_0x54e331,_0x42d34e){return __awaiter$4(this,void 0,void 0,function*(){const _0x3ab7c8={'account_name':_0x37bea5,'search_service_name':_0x1043f6,'endpoint':_0xbd42ee,'key':_0x2618c7,'country':_0x27086b,'provider':_0x16d292,'index_name':_0x54e331};try{const _0x3796af=yield this['fetch']['post'](this['path'],_0x42d34e,_0x3ab7c8);if(_0x3796af['status']>0xc7&&_0x3796af['status']<0x12c){const _0x8ebcca=yield _0x3796af['json']();return new SuccessfulSearchServiceResponse(_0x8ebcca);}const _0x3f20d0=yield _0x3796af['json']();return new FailedSearchServiceResponse(_0x3f20d0);}catch(_0x4f3944){if(_0x4f3944 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x4f3944['message'],'title':_0x4f3944['name'],'status':0x1f4,'instance':'','type':''});throw _0x4f3944;}});}['delete'](_0x308dba,_0x42b03f,_0x5d8076){return __awaiter$4(this,void 0,void 0,function*(){const _0x12f42f=this['path']+'/'+_0x308dba+'/'+_0x42b03f;try{const _0x5f7572=yield this['fetch']['delete'](_0x12f42f,_0x5d8076);if(_0x5f7572['status']>0xc7&&_0x5f7572['status']<0x12c)return new SuccessfulResponse({});const _0x2fcdc0=yield _0x5f7572['json']();return new FailedResponse(_0x2fcdc0);}catch(_0x50b5ce){if(_0x50b5ce instanceof Error)return new FailedResponse({'detail':_0x50b5ce['message'],'title':_0x50b5ce['name'],'status':0x1f4,'instance':'','type':''});throw _0x50b5ce;}});}['view'](_0x1122ab,_0x3f5a24,_0xc1be49){return __awaiter$4(this,void 0,void 0,function*(){const _0x1a1c6f=this['path']+'/'+_0x1122ab+'/'+_0x3f5a24;try{const _0xbe546d=yield this['fetch']['get'](_0x1a1c6f,_0xc1be49);if(_0xbe546d['status']>0xc7&&_0xbe546d['status']<0x12c){const _0x4bfcca=yield _0xbe546d['json']();return new SuccessfulViewSearchServiceResponse(_0x4bfcca);}const _0x567a61=yield _0xbe546d['json']();return new FailedViewSearchServiceResponse(_0x567a61);}catch(_0x14f9b4){if(_0x14f9b4 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x14f9b4['message'],'title':_0x14f9b4['name'],'status':0x1f4,'instance':'','type':''});throw _0x14f9b4;}});}['edit'](_0x18ed71,_0x502f1f,_0x46ff6f,_0x1605c4,_0x1e3a96){return __awaiter$4(this,void 0,void 0,function*(){const _0x3b7635={'account_name':_0x18ed71,'search_service_name':_0x502f1f,'key':_0x46ff6f,'country':_0x1605c4};try{const _0x247dbb=yield this['fetch']['put'](this['path'],_0x1e3a96,_0x3b7635);if(_0x247dbb['status']>0xc7&&_0x247dbb['status']<0x12c){const _0x6aa35d=yield _0x247dbb['json']();return new SuccessfulSearchServiceResponse(_0x6aa35d);}const _0x8fd145=yield _0x247dbb['json']();return new FailedSearchServiceResponse(_0x8fd145);}catch(_0x37401d){if(_0x37401d instanceof Error)return new FailedSearchServiceResponse({'detail':_0x37401d['message'],'title':_0x37401d['name'],'status':0x1f4,'instance':'','type':''});throw _0x37401d;}});}['list'](_0x42371c,_0x1d6cc3){return __awaiter$4(this,void 0,void 0,function*(){const _0x4c81ec=this['path']+'/'+_0x42371c;try{const _0x4ab8cf=yield this['fetch']['get'](_0x4c81ec,_0x1d6cc3);if(_0x4ab8cf['status']>0xc7&&_0x4ab8cf['status']<0x12c){const _0x3e98c7=yield _0x4ab8cf['json']();return new SuccessfulListSearchServiceResponse(_0x3e98c7);}const _0x5a033a=yield _0x4ab8cf['json']();return new FailedViewSearchServicesResponse(_0x5a033a);}catch(_0x3a1bcd){if(_0x3a1bcd instanceof Error)return new FailedViewSearchServicesResponse({'detail':_0x3a1bcd['message'],'title':_0x3a1bcd['name'],'status':0x1f4,'instance':'','type':''});throw _0x3a1bcd;}});}}
|
|
12
|
-
|
|
13
|
-
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x56f72a,_0x1ae731,_0x55ad64,_0x2f54d5){function _0x38d606(_0x178576){return _0x178576 instanceof _0x55ad64?_0x178576:new _0x55ad64(function(_0x51b183){_0x51b183(_0x178576);});}return new(_0x55ad64||(_0x55ad64=Promise))(function(_0x3b4a7b,_0x2f62fe){function _0x113555(_0x4e4971){try{_0x5cb112(_0x2f54d5['next'](_0x4e4971));}catch(_0x50d9d2){_0x2f62fe(_0x50d9d2);}}function _0x2c599a(_0x5f5021){try{_0x5cb112(_0x2f54d5['throw'](_0x5f5021));}catch(_0xb98846){_0x2f62fe(_0xb98846);}}function _0x5cb112(_0x29c8c4){_0x29c8c4['done']?_0x3b4a7b(_0x29c8c4['value']):_0x38d606(_0x29c8c4['value'])['then'](_0x113555,_0x2c599a);}_0x5cb112((_0x2f54d5=_0x2f54d5['apply'](_0x56f72a,_0x1ae731||[]))['next']());});};class FacetService{constructor(_0x166f6b){this['fetch']=_0x166f6b,this['path']='facet';}['create'](_0x1b18fb,_0x2afb2c,_0x2d5e40,_0x2e5527){return __awaiter$3(this,void 0,void 0,function*(){const _0x4a8cb3={'account_name':_0x1b18fb,'list_name':_0x2afb2c,'facet_name':_0x2d5e40};try{const _0x19148e=yield this['fetch']['post'](this['path'],_0x2e5527,_0x4a8cb3);if(_0x19148e['status']>0xc7&&_0x19148e['status']<0x12c){const _0x5f2b25=yield _0x19148e['json']();return new SuccessfulFacetResponse(_0x5f2b25);}const _0xd7a37a=yield _0x19148e['json']();return new FailedFacetResponse(_0xd7a37a);}catch(_0x184bc4){if(_0x184bc4 instanceof Error)return new FailedFacetResponse({'detail':_0x184bc4['message'],'title':_0x184bc4['name'],'status':0x1f4,'instance':'','type':''});throw _0x184bc4;}});}['remove'](_0x479644,_0x260c0e,_0x4dd32e,_0x4dc0f4){return __awaiter$3(this,void 0,void 0,function*(){const _0x3789c9='Facet/'+_0x479644+'/'+_0x260c0e+'/'+_0x4dd32e,_0x312ab6=yield this['fetch']['delete'](_0x3789c9,_0x4dc0f4);try{if(_0x312ab6['status']>0xc7&&_0x312ab6['status']<0x12c)return new SuccessfulResponse({});const _0x58e2f3=yield _0x312ab6['json']();return new FailedResponse(_0x58e2f3);}catch(_0x465a1c){if(_0x465a1c instanceof Error)return new FailedResponse({'detail':_0x465a1c['message'],'title':_0x465a1c['name'],'status':0x1f4,'instance':'','type':''});throw _0x465a1c;}});}['rename'](_0x1bc0dd,_0x1d1d5f,_0x2e9151,_0x4c92b3,_0x76964d){return __awaiter$3(this,void 0,void 0,function*(){const _0x34bde1={'account_name':_0x1bc0dd,'list_name':_0x1d1d5f,'facet_name':_0x2e9151,'new_facet_name':_0x4c92b3};try{const _0x26716c=yield this['fetch']['put'](this['path'],_0x76964d,_0x34bde1);if(_0x26716c['status']>0xc7&&_0x26716c['status']<0x12c){const _0x2274fc=yield _0x26716c['json']();return new SuccessfulFacetResponse(_0x2274fc);}const _0x2b0f64=yield _0x26716c['json']();return new FailedFacetResponse(_0x2b0f64);}catch(_0x55f32e){if(_0x55f32e instanceof Error)return new FailedFacetResponse({'detail':_0x55f32e['message'],'title':_0x55f32e['name'],'status':0x1f4,'instance':'','type':''});throw _0x55f32e;}});}}
|
|
14
|
-
|
|
15
|
-
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x416813,_0x684a6a,_0x2fc1af,_0x41b0bd){function _0x1c7060(_0x2c0a19){return _0x2c0a19 instanceof _0x2fc1af?_0x2c0a19:new _0x2fc1af(function(_0x4f2361){_0x4f2361(_0x2c0a19);});}return new(_0x2fc1af||(_0x2fc1af=Promise))(function(_0x50e51c,_0x41ef0a){function _0x171f22(_0x233503){try{_0x257002(_0x41b0bd['next'](_0x233503));}catch(_0x33c212){_0x41ef0a(_0x33c212);}}function _0x31c8ac(_0x474027){try{_0x257002(_0x41b0bd['throw'](_0x474027));}catch(_0x42f144){_0x41ef0a(_0x42f144);}}function _0x257002(_0x5e8d10){_0x5e8d10['done']?_0x50e51c(_0x5e8d10['value']):_0x1c7060(_0x5e8d10['value'])['then'](_0x171f22,_0x31c8ac);}_0x257002((_0x41b0bd=_0x41b0bd['apply'](_0x416813,_0x684a6a||[]))['next']());});};class SearchResultService{constructor(_0x1e3b9f){this['fetch']=_0x1e3b9f,this['path']='search-result';}['create'](_0x506f69,_0x51cac3,_0x27282c,_0x3d997b,_0x3d5d10){return __awaiter$2(this,void 0,void 0,function*(){_0x3d5d10=_0x3d5d10!==null&&_0x3d5d10!==void 0?_0x3d5d10:{'description':'','keywords':'','resource_1':'','resource_2':'','resource_3':'','latitude':0x0,'longitude':0x0,'facets':[]};const _0x472499=Object['assign']({'account_name':_0x506f69,'search_result_name':_0x27282c,'list_name':_0x51cac3},_0x3d5d10);try{const _0xae9f61=yield this['fetch']['post'](this['path'],_0x3d997b,_0x472499);if(_0xae9f61['status']>0xc7&&_0xae9f61['status']<0x12c){const _0x12f8d3=yield _0xae9f61['json']();return new SuccessfulViewSearchResultResponse(_0x12f8d3);}const _0x108e2b=yield _0xae9f61['json']();return new FailedSearchResultResponse(_0x108e2b);}catch(_0x102e63){if(_0x102e63 instanceof Error)return new FailedSearchResultResponse({'detail':_0x102e63['message'],'title':_0x102e63['name'],'status':0x1f4,'instance':'','type':''});throw _0x102e63;}});}['transfer'](_0x36aa55,_0x57fe80,_0x21b14c,_0xd707ba){return __awaiter$2(this,void 0,void 0,function*(){const _0x3d3f65={'account_name':_0x36aa55,'list_name':_0x57fe80,'new_search_service_name':_0x21b14c};try{const _0x54850f=yield this['fetch']['post'](this['path']+'/transfer',_0xd707ba,_0x3d3f65);if(_0x54850f['status']>0xc7&&_0x54850f['status']<0x12c){const _0x305e7a=yield _0x54850f['json']();return new SuccessfulListResponse(_0x305e7a);}const _0x1d7fb9=yield _0x54850f['json']();return new FailedListResponse(_0x1d7fb9);}catch(_0x3c872d){if(_0x3c872d instanceof Error)return new FailedListResponse({'detail':_0x3c872d['message'],'title':_0x3c872d['name'],'status':0x1f4,'instance':'','type':''});throw _0x3c872d;}});}}
|
|
16
|
-
|
|
17
|
-
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x27d0dc,_0x4c466e,_0x5d3efa,_0x5317a7){function _0x1e69a6(_0x3f0fbc){return _0x3f0fbc instanceof _0x5d3efa?_0x3f0fbc:new _0x5d3efa(function(_0x143e0c){_0x143e0c(_0x3f0fbc);});}return new(_0x5d3efa||(_0x5d3efa=Promise))(function(_0x393dc0,_0xfe7874){function _0x43e81d(_0x3e235a){try{_0xa606dc(_0x5317a7['next'](_0x3e235a));}catch(_0x500bba){_0xfe7874(_0x500bba);}}function _0x90e81f(_0x5bd97d){try{_0xa606dc(_0x5317a7['throw'](_0x5bd97d));}catch(_0x33ecdd){_0xfe7874(_0x33ecdd);}}function _0xa606dc(_0x3fca8c){_0x3fca8c['done']?_0x393dc0(_0x3fca8c['value']):_0x1e69a6(_0x3fca8c['value'])['then'](_0x43e81d,_0x90e81f);}_0xa606dc((_0x5317a7=_0x5317a7['apply'](_0x27d0dc,_0x4c466e||[]))['next']());});};class ContributorService{constructor(_0x4bcb09){this['fetch']=_0x4bcb09,this['path']='contributor';}['create'](_0x1ad974,_0x1cb1fa,_0x3e58be,_0x31c9d5){return __awaiter$1(this,void 0,void 0,function*(){const _0x28dac9={'account_name':_0x1ad974,'list_name':_0x1cb1fa,'contributor_name':_0x3e58be};try{const _0x5ed92a=yield this['fetch']['post'](this['path'],_0x31c9d5,_0x28dac9);if(_0x5ed92a['status']>0xc7&&_0x5ed92a['status']<0x12c){const _0x5869bb=yield _0x5ed92a['json']();return new SuccessfulContributorResponse(_0x5869bb);}const _0x35fbec=yield _0x5ed92a['json']();return new FailedContributorResponse(_0x35fbec);}catch(_0x814f3b){if(_0x814f3b instanceof Error)return new FailedContributorResponse({'detail':_0x814f3b['message'],'title':_0x814f3b['name'],'status':0x1f4,'instance':'','type':''});throw _0x814f3b;}});}['remove'](_0x27e732,_0x3805ef,_0x6c90c1,_0x3613ae){return __awaiter$1(this,void 0,void 0,function*(){const _0x54e4c4=this['path']+'/'+_0x27e732+'/'+_0x3805ef+'/'+_0x6c90c1,_0x1b1d14=yield this['fetch']['delete'](_0x54e4c4,_0x3613ae);try{if(_0x1b1d14['status']>0xc7&&_0x1b1d14['status']<0x12c)return new SuccessfulResponse({});const _0x3485ad=yield _0x1b1d14['json']();return new FailedResponse(_0x3485ad);}catch(_0x32e991){if(_0x32e991 instanceof Error)return new FailedResponse({'detail':_0x32e991['message'],'title':_0x32e991['name'],'status':0x1f4,'instance':'','type':''});throw _0x32e991;}});}['startsWith'](_0x209cf9,_0x268852){return __awaiter$1(this,void 0,void 0,function*(){const _0x4a9f30=this['path']+'/'+_0x209cf9;try{const _0x224073=yield this['fetch']['get'](_0x4a9f30,_0x268852);if(_0x224073['status']>0xc7&&_0x224073['status']<0x12c){const _0x36d765=yield _0x224073['json']();return new SuccessfulAccountAndImageResponse(_0x36d765);}const _0x2181b1=yield _0x224073['json']();return new FailedAccountAndImageResponse(_0x2181b1);}catch(_0x137600){if(_0x137600 instanceof Error)return new FailedAccountAndImageResponse({'detail':_0x137600['message'],'title':_0x137600['name'],'status':0x1f4,'instance':'','type':''});throw _0x137600;}});}}
|
|
18
|
-
|
|
19
|
-
var __awaiter=undefined&&undefined['__awaiter']||function(_0x2825d1,_0x3d674c,_0x4e98d6,_0x568bd1){function _0x11dc79(_0x495af4){return _0x495af4 instanceof _0x4e98d6?_0x495af4:new _0x4e98d6(function(_0x4b17b7){_0x4b17b7(_0x495af4);});}return new(_0x4e98d6||(_0x4e98d6=Promise))(function(_0x202917,_0x4f3875){function _0x2a043a(_0x5c273d){try{_0x91f11(_0x568bd1['next'](_0x5c273d));}catch(_0x3f9e2e){_0x4f3875(_0x3f9e2e);}}function _0x1e0e59(_0x570933){try{_0x91f11(_0x568bd1['throw'](_0x570933));}catch(_0x3c3465){_0x4f3875(_0x3c3465);}}function _0x91f11(_0x5df2fe){_0x5df2fe['done']?_0x202917(_0x5df2fe['value']):_0x11dc79(_0x5df2fe['value'])['then'](_0x2a043a,_0x1e0e59);}_0x91f11((_0x568bd1=_0x568bd1['apply'](_0x2825d1,_0x3d674c||[]))['next']());});};class AdminClient{constructor(_0x592252='https://admin.searchability.dev/'){var _0xac808=new Fetch(_0x592252);this['Accounts']=new AccountService(_0xac808),this['Lists']=new ListService(_0xac808),this['ApiKeys']=new ApiKeyService(_0xac808),this['SearchServers']=new SearchServersService(_0xac808),this['Facets']=new FacetService(_0xac808),this['SearchResults']=new SearchResultService(_0xac808),this['Contributors']=new ContributorService(_0xac808);}}class AuthClient{constructor(_0x5e9891='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x5e9891);}['login'](_0x239e30){return __awaiter(this,void 0,void 0,function*(){const _0x19257c='login/'+_0x239e30;try{const _0x40b5d9=yield yield fetch(_0x19257c);if(_0x40b5d9['status']>0xc7&&_0x40b5d9['status']<0x12c){const _0x16d190=yield _0x40b5d9['json']();return new SuccessfulAuthResponse(_0x16d190);}const _0x5b843b=yield _0x40b5d9['json']();return new FailedAuthResponse(_0x5b843b);}catch(_0x26e77c){if(_0x26e77c instanceof Error)return new FailedAuthResponse({'detail':_0x26e77c['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x26e77c;}});}['refresh'](_0x4dd231){return __awaiter(this,void 0,void 0,function*(){const _0x2a95da='refresh',_0x4cd5eb={'refresh_token':_0x4dd231};try{const _0x5262dc=yield this['fetch']['PostNoAuth'](_0x2a95da,_0x4cd5eb);if(_0x5262dc['status']>0xc7&&_0x5262dc['status']<0x12c){const _0x476bcb=yield _0x5262dc['json']();return new SuccessfulAuthResponse(_0x476bcb);}const _0x2a76f9=yield _0x5262dc['json']();return new FailedAuthResponse(_0x2a76f9);}catch(_0x4a086a){if(_0x4a086a instanceof Error)return new FailedAuthResponse({'detail':_0x4a086a['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x4a086a;}});}['getTokenStatus'](_0x401820){if(Date['now']()<_0x401820['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x401820['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
|
|
20
|
-
|
|
21
|
-
export { AdminClient, AuthClient, TokenStatus, Tokens };
|