@searchability/admin-client 0.0.130 → 0.0.132
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
var TokenStatus;(function(_0x183f76){_0x183f76[_0x183f76['Ok']=0x0]='Ok',_0x183f76[_0x183f76['Refresh']=0x1]='Refresh',_0x183f76[_0x183f76['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(_0x6deb08){this['isSuccess']=_0x6deb08;}}class SuccessfulFacetValueResponse extends Response{constructor(_0x38bc3f){super(!![]),this['facets']=_0x38bc3f;}['toSuccess'](){return this['facets'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetValuesResponse extends Response{constructor(_0x3e5a81){super(![]),this['problem']=_0x3e5a81;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulContributorResponse extends Response{constructor(_0x195373){super(!![]),this['contributor']=_0x195373;}['toSuccess'](){return this['contributor'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedContributorResponse extends Response{constructor(_0x483074){super(![]),this['problem']=_0x483074;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAccountAndImageResponse extends Response{constructor(_0x1c9034){super(!![]),this['accountAndImages']=_0x1c9034;}['toSuccess'](){return this['accountAndImages'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountAndImageResponse extends Response{constructor(_0x61678e){super(![]),this['problem']=_0x61678e;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulResourceResponse extends Response{constructor(_0x513b15){super(!![]),this['resource']=_0x513b15;}['toSuccess'](){return this['resource'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResourceResponse extends Response{constructor(_0xe10020){super(![]),this['problem']=_0xe10020;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulFacetResponse extends Response{constructor(_0x15dd12){super(!![]),this['facet']=_0x15dd12;}['toSuccess'](){return this['facet'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedFacetResponse extends Response{constructor(_0x4e3064){super(![]),this['problem']=_0x4e3064;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedSearchableFieldResponse extends Response{constructor(_0x2ec42b){super(![]),this['problem']=_0x2ec42b;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchableFieldResponse extends Response{constructor(_0x553614){super(!![]),this['searchable_field']=_0x553614;}['toSuccess'](){return this['searchable_field'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountResponse extends Response{constructor(_0x4a7891){super(!![]),this['account']=_0x4a7891;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulAccountImageResponse extends Response{constructor(_0x28e030){super(!![]),this['accountImage']=_0x28e030;}['toSuccess'](){return this['accountImage'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulListIdentityResponse extends Response{constructor(_0x4ae9a1){super(!![]),this['list']=_0x4ae9a1;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulGroupResponse extends Response{constructor(_0x464f60){super(!![]),this['group']=_0x464f60;}['toSuccess'](){return this['group'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedGroupResponse extends Response{constructor(_0x4bb77d){super(![]),this['problem']=_0x4bb77d;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListResponse extends Response{constructor(_0x44bba6){super(!![]),this['list']=_0x44bba6;}['toSuccess'](){return this['list'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedListResponse extends Response{constructor(_0x418866){super(![]),this['problem']=_0x418866;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountResponse extends Response{constructor(_0x18c4aa){super(![]),this['problem']=_0x18c4aa;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedAccountImageResponse extends Response{constructor(_0x5c25a1){super(![]),this['problem']=_0x5c25a1;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedListIdentityResponse extends Response{constructor(_0x461d00){super(![]),this['problem']=_0x461d00;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulAuthResponse extends Response{constructor(_0x5598d8){super(!![]),this['tokens']=_0x5598d8;}['toSuccess'](){return this['tokens'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAuthResponse extends Response{constructor(_0x379609){super(![]),this['problem']=_0x379609;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyResponse extends Response{constructor(_0x5e1736){super(!![]),this['apiKey']=_0x5e1736;}['toSuccess'](){return this['apiKey'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedApiKeyResponse extends Response{constructor(_0x109764){super(![]),this['problem']=_0x109764;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulSearchServiceResponse extends Response{constructor(_0x104308){super(!![]),this['searchService']=_0x104308;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchServiceResponse extends Response{constructor(_0x52bf8b){super(![]),this['problem']=_0x52bf8b;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulViewSearchServiceResponse extends Response{constructor(_0x3cdf19){super(!![]),this['searchService']=_0x3cdf19;}['toSuccess'](){return this['searchService'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulSearchResultResponse extends Response{constructor(_0x2df6ff){super(!![]),this['searchResult']=_0x2df6ff;}['toSuccess'](){return this['searchResult'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedSearchResultResponse extends Response{constructor(_0x1d1fb1){super(![]),this['problem']=_0x1d1fb1;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchResultResponse extends Response{constructor(_0x4fb3bf){super(!![]),this['searchResults']=_0x4fb3bf;}['toSuccess'](){return this['searchResults'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchResultResponse extends Response{constructor(_0x3d0119){super(![]),this['problem']=_0x3d0119;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulListSearchServiceResponse extends Response{constructor(_0x4b74e8){super(!![]),this['searchServices']=_0x4b74e8;}['toSuccess'](){return this['searchServices'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedViewSearchServicesResponse extends Response{constructor(_0x321bdc){super(![]),this['problem']=_0x321bdc;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedViewSearchServiceResponse extends Response{constructor(_0x29f854){super(![]),this['problem']=_0x29f854;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class SuccessfulApiKeyValueResponse extends Response{constructor(_0x1c0abe){super(!![]),this['apiKeyValue']=_0x1c0abe;}['toSuccess'](){return this['apiKeyValue'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class SuccessfulResponse extends Response{constructor(_0x163341){super(!![]),this['obj']=_0x163341;}['toSuccess'](){return this['obj'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedResponse extends Response{constructor(_0x50c718){super(![]),this['problem']=_0x50c718;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}class FailedApiKeyValueResponse extends Response{constructor(_0x299f9f){super(![]),this['problem']=_0x299f9f;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
|
|
2
|
-
|
|
3
|
-
var __awaiter$b=undefined&&undefined['__awaiter']||function(_0x2ae404,_0x4a5f79,_0x5ecb51,_0x425f54){function _0x154ca7(_0x360a06){return _0x360a06 instanceof _0x5ecb51?_0x360a06:new _0x5ecb51(function(_0x551bda){_0x551bda(_0x360a06);});}return new(_0x5ecb51||(_0x5ecb51=Promise))(function(_0x155f7b,_0x4c4491){function _0x517fc3(_0x980e5c){try{_0x24b95a(_0x425f54['next'](_0x980e5c));}catch(_0x19611d){_0x4c4491(_0x19611d);}}function _0x18119e(_0x2e982c){try{_0x24b95a(_0x425f54['throw'](_0x2e982c));}catch(_0x354eea){_0x4c4491(_0x354eea);}}function _0x24b95a(_0x394973){_0x394973['done']?_0x155f7b(_0x394973['value']):_0x154ca7(_0x394973['value'])['then'](_0x517fc3,_0x18119e);}_0x24b95a((_0x425f54=_0x425f54['apply'](_0x2ae404,_0x4a5f79||[]))['next']());});};class AccountService{constructor(_0x5d4bfa){this['fetch']=_0x5d4bfa;}['get'](_0x40eba7,_0x84992a){return __awaiter$b(this,void 0,void 0,function*(){const _0x473f92='Account/'+_0x40eba7+'/',_0x21c6e7=yield this['fetch']['get'](_0x473f92,_0x84992a);try{if(_0x21c6e7['status']>0xc7&&_0x21c6e7['status']<0x12c){const _0x41647b=yield _0x21c6e7['json']();return new SuccessfulAccountResponse(_0x41647b);}const _0x108de5=yield _0x21c6e7['json']();return new FailedAccountResponse(_0x108de5);}catch(_0xdcde70){if(_0xdcde70 instanceof Error)return new FailedAccountResponse({'detail':_0xdcde70['message'],'title':_0xdcde70['name'],'status':0x1f4,'instance':'','type':''});throw _0xdcde70;}});}['getImage'](_0x4ee303,_0x5e2535){return __awaiter$b(this,void 0,void 0,function*(){const _0x232b5e='account/image/'+_0x4ee303+'/',_0x1ecbc8=yield this['fetch']['get'](_0x232b5e,_0x5e2535);try{if(_0x1ecbc8['status']>0xc7&&_0x1ecbc8['status']<0x12c){const _0x3a7221=yield _0x1ecbc8['json']();return new SuccessfulAccountImageResponse(_0x3a7221);}const _0x4001de=yield _0x1ecbc8['json']();return new FailedAccountImageResponse(_0x4001de);}catch(_0x25e032){if(_0x25e032 instanceof Error)return new FailedAccountImageResponse({'detail':_0x25e032['message'],'title':_0x25e032['name'],'status':0x1f4,'instance':'','type':''});throw _0x25e032;}});}}
|
|
4
|
-
|
|
5
|
-
var __awaiter$a=undefined&&undefined['__awaiter']||function(_0x218dc0,_0x4a4940,_0xd2696e,_0x286094){function _0x15d7a9(_0x396025){return _0x396025 instanceof _0xd2696e?_0x396025:new _0xd2696e(function(_0x23d07b){_0x23d07b(_0x396025);});}return new(_0xd2696e||(_0xd2696e=Promise))(function(_0x12e0aa,_0x3559b9){function _0x5b52ec(_0x9d09c1){try{_0x90b6eb(_0x286094['next'](_0x9d09c1));}catch(_0x1f7eb2){_0x3559b9(_0x1f7eb2);}}function _0xff6abc(_0x21796a){try{_0x90b6eb(_0x286094['throw'](_0x21796a));}catch(_0x5a94af){_0x3559b9(_0x5a94af);}}function _0x90b6eb(_0x4c88e0){_0x4c88e0['done']?_0x12e0aa(_0x4c88e0['value']):_0x15d7a9(_0x4c88e0['value'])['then'](_0x5b52ec,_0xff6abc);}_0x90b6eb((_0x286094=_0x286094['apply'](_0x218dc0,_0x4a4940||[]))['next']());});};class ApiKeyService{constructor(_0xc53482){this['fetch']=_0xc53482,this['path']='api-key';}['create'](_0x5a373f,_0x459722,_0xa041d5){return __awaiter$a(this,void 0,void 0,function*(){const _0x3d95f5={'account_name':_0x5a373f,'api_key_name':_0x459722};try{const _0x2271a7=yield this['fetch']['post'](this['path'],_0xa041d5,_0x3d95f5);if(_0x2271a7['status']>0xc7&&_0x2271a7['status']<0x12c){const _0xf4de4f=yield _0x2271a7['json']();return new SuccessfulApiKeyResponse(_0xf4de4f);}const _0x101f7a=yield _0x2271a7['json']();return new FailedApiKeyResponse(_0x101f7a);}catch(_0x48b4b4){if(_0x48b4b4 instanceof Error)return new FailedApiKeyResponse({'detail':_0x48b4b4['message'],'title':_0x48b4b4['name'],'status':0x1f4,'instance':'','type':''});throw _0x48b4b4;}});}['view'](_0x42c95b,_0x2a3494,_0x28b233){return __awaiter$a(this,void 0,void 0,function*(){const _0xad5dff=this['path']+'/'+_0x42c95b+'/'+_0x2a3494;try{const _0x62fcb0=yield this['fetch']['get'](_0xad5dff,_0x28b233);if(_0x62fcb0['status']>0xc7&&_0x62fcb0['status']<0x12c){const _0x2d7737=yield _0x62fcb0['json']();return new SuccessfulApiKeyValueResponse(_0x2d7737);}const _0x595374=yield _0x62fcb0['json']();return new FailedApiKeyValueResponse(_0x595374);}catch(_0x5e7d45){if(_0x5e7d45 instanceof Error)return new FailedApiKeyValueResponse({'detail':_0x5e7d45['message'],'title':_0x5e7d45['name'],'status':0x1f4,'instance':'','type':''});throw _0x5e7d45;}});}['delete'](_0x467fc5,_0x3f25fd,_0x65ac77){return __awaiter$a(this,void 0,void 0,function*(){const _0x2a46ac=this['path']+'/'+_0x467fc5+'/'+_0x3f25fd;try{const _0x2dd6cb=yield this['fetch']['delete'](_0x2a46ac,_0x65ac77);if(_0x2dd6cb['status']>0xc7&&_0x2dd6cb['status']<0x12c)return new SuccessfulResponse({});const _0x10f20c=yield _0x2dd6cb['json']();return new FailedResponse(_0x10f20c);}catch(_0x21d4c9){if(_0x21d4c9 instanceof Error)return new FailedResponse({'detail':_0x21d4c9['message'],'title':_0x21d4c9['name'],'status':0x1f4,'instance':'','type':''});throw _0x21d4c9;}});}}
|
|
6
|
-
|
|
7
|
-
var __awaiter$9=undefined&&undefined['__awaiter']||function(_0x78205d,_0x432289,_0x4af8c8,_0x233d6f){function _0x322459(_0x30db5a){return _0x30db5a instanceof _0x4af8c8?_0x30db5a:new _0x4af8c8(function(_0x381636){_0x381636(_0x30db5a);});}return new(_0x4af8c8||(_0x4af8c8=Promise))(function(_0x1a272c,_0x57959d){function _0x1d91b3(_0xfda125){try{_0x263ed9(_0x233d6f['next'](_0xfda125));}catch(_0x14f5f5){_0x57959d(_0x14f5f5);}}function _0x2f63e5(_0x3e4239){try{_0x263ed9(_0x233d6f['throw'](_0x3e4239));}catch(_0x1ca641){_0x57959d(_0x1ca641);}}function _0x263ed9(_0x35024a){_0x35024a['done']?_0x1a272c(_0x35024a['value']):_0x322459(_0x35024a['value'])['then'](_0x1d91b3,_0x2f63e5);}_0x263ed9((_0x233d6f=_0x233d6f['apply'](_0x78205d,_0x432289||[]))['next']());});};class ListService{constructor(_0x37e722){this['fetch']=_0x37e722,this['path']='list';}['create'](_0x4d9d0c,_0x363bf7,_0x458710,_0x39a2fc){return __awaiter$9(this,void 0,void 0,function*(){const _0x232b6b={'account_name':_0x4d9d0c,'list_name':_0x363bf7,'search_service_name':_0x458710};try{const _0x49ca0b=yield this['fetch']['post'](this['path'],_0x39a2fc,_0x232b6b);if(_0x49ca0b['status']>0xc7&&_0x49ca0b['status']<0x12c){const _0x1485cf=yield _0x49ca0b['json']();return new SuccessfulListIdentityResponse(_0x1485cf);}const _0x492cf5=yield _0x49ca0b['json']();return new FailedListIdentityResponse(_0x492cf5);}catch(_0xad5361){if(_0xad5361 instanceof Error)return new FailedListIdentityResponse({'detail':_0xad5361['message'],'title':_0xad5361['name'],'status':0x1f4,'instance':'','type':''});throw _0xad5361;}});}['delete'](_0x266abd,_0x98064b,_0x4fcf77){return __awaiter$9(this,void 0,void 0,function*(){const _0x347308=this['path']+'/'+_0x266abd+'/'+_0x98064b,_0xc103ec=yield this['fetch']['delete'](_0x347308,_0x4fcf77);try{if(_0xc103ec['status']>0xc7&&_0xc103ec['status']<0x12c)return new SuccessfulResponse({});const _0x121f17=yield _0xc103ec['json']();return new FailedResponse(_0x121f17);}catch(_0x264a56){if(_0x264a56 instanceof Error)return new FailedResponse({'detail':_0x264a56['message'],'title':_0x264a56['name'],'status':0x1f4,'instance':'','type':''});throw _0x264a56;}});}['get'](_0x5411e1,_0x16f33d,_0x300b34){return __awaiter$9(this,void 0,void 0,function*(){const _0xaa718b=this['path']+'/'+_0x5411e1+'/'+_0x16f33d;try{const _0xd3e333=yield this['fetch']['get'](_0xaa718b,_0x300b34);if(_0xd3e333['status']>0xc7&&_0xd3e333['status']<0x12c){const _0x362fe7=yield _0xd3e333['json']();return new SuccessfulListResponse(_0x362fe7);}const _0x2581bf=yield _0xd3e333['json']();return new FailedListResponse(_0x2581bf);}catch(_0x365ecc){if(_0x365ecc instanceof Error)return new FailedListResponse({'detail':_0x365ecc['message'],'title':_0x365ecc['name'],'status':0x1f4,'instance':'','type':''});throw _0x365ecc;}});}['editSettings'](_0x3e4aad,_0x5a2cb9,_0x34eff9,_0x583c59){return __awaiter$9(this,void 0,void 0,function*(){const _0x3923ec=this['path']+'/settings/'+_0x3e4aad+'/'+_0x5a2cb9,_0x56a438=yield this['fetch']['put'](_0x3923ec,_0x34eff9,_0x583c59);try{if(_0x56a438['status']>0xc7&&_0x56a438['status']<0x12c){const _0x4c5d4d=yield _0x56a438['json']();return new SuccessfulListResponse(_0x4c5d4d);}const _0x2dfe77=yield _0x56a438['json']();return new FailedListResponse(_0x2dfe77);}catch(_0x1ba075){if(_0x1ba075 instanceof Error)return new FailedListResponse({'detail':_0x1ba075['message'],'title':_0x1ba075['name'],'status':0x1f4,'instance':'','type':''});throw _0x1ba075;}});}['addCoordinates'](_0x63c1a7,_0x3bf6d1,_0x340317){return __awaiter$9(this,void 0,void 0,function*(){const _0x347934=this['path']+'/coordinates/'+_0x63c1a7+'/'+_0x3bf6d1,_0x4df8c5=yield this['fetch']['post'](_0x347934,_0x340317,{});try{if(_0x4df8c5['status']>0xc7&&_0x4df8c5['status']<0x12c){const _0x285025=yield _0x4df8c5['json']();return new SuccessfulListResponse(_0x285025);}const _0x48587b=yield _0x4df8c5['json']();return new FailedListResponse(_0x48587b);}catch(_0x19f778){if(_0x19f778 instanceof Error)return new FailedListResponse({'detail':_0x19f778['message'],'title':_0x19f778['name'],'status':0x1f4,'instance':'','type':''});throw _0x19f778;}});}['removeCoordinates'](_0xb41c74,_0x739bb3,_0x3c253e){return __awaiter$9(this,void 0,void 0,function*(){const _0x4a7fe1=this['path']+'/coordinates/'+_0xb41c74+'/'+_0x739bb3,_0x11e66d=yield this['fetch']['delete'](_0x4a7fe1,_0x3c253e);try{if(_0x11e66d['status']>0xc7&&_0x11e66d['status']<0x12c){const _0x4b446e=yield _0x11e66d['json']();return new SuccessfulListResponse(_0x4b446e);}const _0x588b55=yield _0x11e66d['json']();return new FailedListResponse(_0x588b55);}catch(_0x42fadd){if(_0x42fadd instanceof Error)return new FailedListResponse({'detail':_0x42fadd['message'],'title':_0x42fadd['name'],'status':0x1f4,'instance':'','type':''});throw _0x42fadd;}});}['transfer'](_0x3e92e9,_0x2730ec,_0x39a9e2,_0x21a583){return __awaiter$9(this,void 0,void 0,function*(){const _0xdc2cf2={'new_search_service_name':_0x39a9e2};try{const _0x511bdb=yield this['fetch']['put'](this['path']+'/transfer/'+_0x3e92e9+'/'+_0x2730ec,_0x21a583,_0xdc2cf2);if(_0x511bdb['status']>0xc7&&_0x511bdb['status']<0x12c){const _0x1622a4=yield _0x511bdb['json']();return new SuccessfulListResponse(_0x1622a4);}const _0x596d17=yield _0x511bdb['json']();return new FailedListResponse(_0x596d17);}catch(_0x5ecaa5){if(_0x5ecaa5 instanceof Error)return new FailedListResponse({'detail':_0x5ecaa5['message'],'title':_0x5ecaa5['name'],'status':0x1f4,'instance':'','type':''});throw _0x5ecaa5;}});}}
|
|
8
|
-
|
|
9
|
-
var __awaiter$8=undefined&&undefined['__awaiter']||function(_0x258698,_0x3a783a,_0x42b632,_0x2fc70a){function _0x3ddee2(_0x4fb9a5){return _0x4fb9a5 instanceof _0x42b632?_0x4fb9a5:new _0x42b632(function(_0x549e3c){_0x549e3c(_0x4fb9a5);});}return new(_0x42b632||(_0x42b632=Promise))(function(_0x268efa,_0x25f7c9){function _0x5065e8(_0x1a8b91){try{_0x1747a9(_0x2fc70a['next'](_0x1a8b91));}catch(_0x4f05b2){_0x25f7c9(_0x4f05b2);}}function _0x4972a3(_0x3ca763){try{_0x1747a9(_0x2fc70a['throw'](_0x3ca763));}catch(_0x5b6949){_0x25f7c9(_0x5b6949);}}function _0x1747a9(_0x19393c){_0x19393c['done']?_0x268efa(_0x19393c['value']):_0x3ddee2(_0x19393c['value'])['then'](_0x5065e8,_0x4972a3);}_0x1747a9((_0x2fc70a=_0x2fc70a['apply'](_0x258698,_0x3a783a||[]))['next']());});};class Fetch{constructor(_0x55724a){this['baseUri']=_0x55724a,this['getUrl']=_0x36926c=>{return _0x36926c['startsWith']('/')&&(_0x36926c=_0x36926c['replace']('/','')),''+this['baseUri']+_0x36926c;},!_0x55724a['endsWith']('/')&&(_0x55724a=_0x55724a+'/');}['get'](_0x3355ab,_0x15fa2c){return __awaiter$8(this,void 0,void 0,function*(){const _0x46938c=this['getUrl'](_0x3355ab);return yield fetch(_0x46938c,{'method':'GET','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x15fa2c}});});}['post'](_0x170d08,_0x369a3d,_0x261ff1){return __awaiter$8(this,void 0,void 0,function*(){const _0x3183ab=this['getUrl'](_0x170d08);return yield fetch(_0x3183ab,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x369a3d},'body':_0x261ff1?JSON['stringify'](_0x261ff1):null});});}['upload'](_0x9a5e45,_0x79e8,_0x8d6a3b){return __awaiter$8(this,void 0,void 0,function*(){const _0x1849c6=this['getUrl'](_0x9a5e45);return yield fetch(_0x1849c6,{'method':'POST','headers':{'Authorization':'Bearer\x20'+_0x79e8},'body':_0x8d6a3b});});}['PostNoAuth'](_0x4e665f,_0x1ff3ce){return __awaiter$8(this,void 0,void 0,function*(){const _0xe1aa08=this['getUrl'](_0x4e665f);return yield fetch(_0xe1aa08,{'method':'POST','headers':{'Content-Type':'application/json'},'body':_0x1ff3ce?JSON['stringify'](_0x1ff3ce):null});});}['put'](_0x19b648,_0x268bb0,_0x2f4557){return __awaiter$8(this,void 0,void 0,function*(){const _0x474d75=this['getUrl'](_0x19b648);return yield fetch(_0x474d75,{'method':'PUT','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x268bb0},'body':_0x2f4557?JSON['stringify'](_0x2f4557):null});});}['delete'](_0x5d98d9,_0x13453b){return __awaiter$8(this,void 0,void 0,function*(){const _0x13592d=this['getUrl'](_0x5d98d9);return yield fetch(_0x13592d,{'method':'DELETE','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x13453b}});});}}
|
|
10
|
-
|
|
11
|
-
var __awaiter$7=undefined&&undefined['__awaiter']||function(_0x5e7258,_0x54b848,_0x4ccc3f,_0x2b7645){function _0x1431bb(_0x599759){return _0x599759 instanceof _0x4ccc3f?_0x599759:new _0x4ccc3f(function(_0x52c517){_0x52c517(_0x599759);});}return new(_0x4ccc3f||(_0x4ccc3f=Promise))(function(_0xf1cf02,_0x29e974){function _0xbd535b(_0x4097c3){try{_0x160026(_0x2b7645['next'](_0x4097c3));}catch(_0x17f56e){_0x29e974(_0x17f56e);}}function _0x33e79d(_0xe41c89){try{_0x160026(_0x2b7645['throw'](_0xe41c89));}catch(_0x30eaed){_0x29e974(_0x30eaed);}}function _0x160026(_0x56db95){_0x56db95['done']?_0xf1cf02(_0x56db95['value']):_0x1431bb(_0x56db95['value'])['then'](_0xbd535b,_0x33e79d);}_0x160026((_0x2b7645=_0x2b7645['apply'](_0x5e7258,_0x54b848||[]))['next']());});};class SearchServersService{constructor(_0x59d6d8){this['fetch']=_0x59d6d8,this['path']='search-service';}['create'](_0x1a2624,_0x54d2f0,_0x26e325,_0x551264,_0x2e276f,_0x8da19e,_0x2036a1,_0x325f24){return __awaiter$7(this,void 0,void 0,function*(){const _0x13b15e={'account_name':_0x1a2624,'search_service_name':_0x54d2f0,'endpoint':_0x26e325,'key':_0x551264,'country':_0x2e276f,'provider':_0x8da19e,'index_name':_0x2036a1};try{const _0x24b319=yield this['fetch']['post'](this['path'],_0x325f24,_0x13b15e);if(_0x24b319['status']>0xc7&&_0x24b319['status']<0x12c){const _0x398151=yield _0x24b319['json']();return new SuccessfulSearchServiceResponse(_0x398151);}const _0x5ef710=yield _0x24b319['json']();return new FailedSearchServiceResponse(_0x5ef710);}catch(_0x406cf5){if(_0x406cf5 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x406cf5['message'],'title':_0x406cf5['name'],'status':0x1f4,'instance':'','type':''});throw _0x406cf5;}});}['delete'](_0x149367,_0x3db3cf,_0x4fcb1d){return __awaiter$7(this,void 0,void 0,function*(){const _0x131f16=this['path']+'/'+_0x149367+'/'+_0x3db3cf;try{const _0x378d98=yield this['fetch']['delete'](_0x131f16,_0x4fcb1d);if(_0x378d98['status']>0xc7&&_0x378d98['status']<0x12c)return new SuccessfulResponse({});const _0x3edf23=yield _0x378d98['json']();return new FailedResponse(_0x3edf23);}catch(_0x5bdc80){if(_0x5bdc80 instanceof Error)return new FailedResponse({'detail':_0x5bdc80['message'],'title':_0x5bdc80['name'],'status':0x1f4,'instance':'','type':''});throw _0x5bdc80;}});}['view'](_0x5bb4b2,_0x5a94e1,_0x4eebbf){return __awaiter$7(this,void 0,void 0,function*(){const _0x33da1c=this['path']+'/'+_0x5bb4b2+'/'+_0x5a94e1;try{const _0x286339=yield this['fetch']['get'](_0x33da1c,_0x4eebbf);if(_0x286339['status']>0xc7&&_0x286339['status']<0x12c){const _0x59c916=yield _0x286339['json']();return new SuccessfulViewSearchServiceResponse(_0x59c916);}const _0x45d784=yield _0x286339['json']();return new FailedViewSearchServiceResponse(_0x45d784);}catch(_0x3b70f0){if(_0x3b70f0 instanceof Error)return new FailedViewSearchServiceResponse({'detail':_0x3b70f0['message'],'title':_0x3b70f0['name'],'status':0x1f4,'instance':'','type':''});throw _0x3b70f0;}});}['edit'](_0x2d6290,_0x7e7dd4,_0x25aadb,_0x47e7b2,_0x162d39){return __awaiter$7(this,void 0,void 0,function*(){const _0x5054f5={'account_name':_0x2d6290,'search_service_name':_0x7e7dd4,'key':_0x25aadb,'country':_0x47e7b2};try{const _0x3d57f7=yield this['fetch']['put'](this['path'],_0x162d39,_0x5054f5);if(_0x3d57f7['status']>0xc7&&_0x3d57f7['status']<0x12c){const _0x12c2a9=yield _0x3d57f7['json']();return new SuccessfulSearchServiceResponse(_0x12c2a9);}const _0x2360b7=yield _0x3d57f7['json']();return new FailedSearchServiceResponse(_0x2360b7);}catch(_0x3d59b9){if(_0x3d59b9 instanceof Error)return new FailedSearchServiceResponse({'detail':_0x3d59b9['message'],'title':_0x3d59b9['name'],'status':0x1f4,'instance':'','type':''});throw _0x3d59b9;}});}['list'](_0x4c4398,_0x2be190){return __awaiter$7(this,void 0,void 0,function*(){const _0x91d6b0=this['path']+'/'+_0x4c4398;try{const _0x4f7d19=yield this['fetch']['get'](_0x91d6b0,_0x2be190);if(_0x4f7d19['status']>0xc7&&_0x4f7d19['status']<0x12c){const _0x5d645=yield _0x4f7d19['json']();return new SuccessfulListSearchServiceResponse(_0x5d645);}const _0x572952=yield _0x4f7d19['json']();return new FailedViewSearchServicesResponse(_0x572952);}catch(_0x6e4a64){if(_0x6e4a64 instanceof Error)return new FailedViewSearchServicesResponse({'detail':_0x6e4a64['message'],'title':_0x6e4a64['name'],'status':0x1f4,'instance':'','type':''});throw _0x6e4a64;}});}}
|
|
12
|
-
|
|
13
|
-
var __awaiter$6=undefined&&undefined['__awaiter']||function(_0x72e704,_0x2278f3,_0x1bb7f7,_0x35eb38){function _0x1c944f(_0x116fd3){return _0x116fd3 instanceof _0x1bb7f7?_0x116fd3:new _0x1bb7f7(function(_0xcdf3eb){_0xcdf3eb(_0x116fd3);});}return new(_0x1bb7f7||(_0x1bb7f7=Promise))(function(_0x40886b,_0x2ee8db){function _0x1929af(_0x52e439){try{_0x45689d(_0x35eb38['next'](_0x52e439));}catch(_0x11e892){_0x2ee8db(_0x11e892);}}function _0x57ba97(_0x299c00){try{_0x45689d(_0x35eb38['throw'](_0x299c00));}catch(_0x1d43b2){_0x2ee8db(_0x1d43b2);}}function _0x45689d(_0x4f671d){_0x4f671d['done']?_0x40886b(_0x4f671d['value']):_0x1c944f(_0x4f671d['value'])['then'](_0x1929af,_0x57ba97);}_0x45689d((_0x35eb38=_0x35eb38['apply'](_0x72e704,_0x2278f3||[]))['next']());});};class FacetService{constructor(_0x48ae0c){this['fetch']=_0x48ae0c,this['path']='facet';}['create'](_0xaacce1,_0x4fe06e,_0x36aa9a,_0x1f08aa){return __awaiter$6(this,void 0,void 0,function*(){const _0x210c3d={'account_name':_0xaacce1,'list_name':_0x4fe06e,'facet_name':_0x36aa9a};try{const _0x267ede=yield this['fetch']['post'](this['path'],_0x1f08aa,_0x210c3d);if(_0x267ede['status']>0xc7&&_0x267ede['status']<0x12c){const _0x2e0739=yield _0x267ede['json']();return new SuccessfulFacetResponse(_0x2e0739);}const _0x4d98ae=yield _0x267ede['json']();return new FailedFacetResponse(_0x4d98ae);}catch(_0xbc1af8){if(_0xbc1af8 instanceof Error)return new FailedFacetResponse({'detail':_0xbc1af8['message'],'title':_0xbc1af8['name'],'status':0x1f4,'instance':'','type':''});throw _0xbc1af8;}});}['remove'](_0x12f090,_0x52d360,_0x3a32e3,_0x1a520b){return __awaiter$6(this,void 0,void 0,function*(){const _0x1aecb5='Facet/'+_0x12f090+'/'+_0x52d360+'/'+_0x3a32e3,_0x71e4e=yield this['fetch']['delete'](_0x1aecb5,_0x1a520b);try{if(_0x71e4e['status']>0xc7&&_0x71e4e['status']<0x12c)return new SuccessfulResponse({});const _0x24e50b=yield _0x71e4e['json']();return new FailedResponse(_0x24e50b);}catch(_0x2ff5b7){if(_0x2ff5b7 instanceof Error)return new FailedResponse({'detail':_0x2ff5b7['message'],'title':_0x2ff5b7['name'],'status':0x1f4,'instance':'','type':''});throw _0x2ff5b7;}});}['rename'](_0x31b334,_0x2fa301,_0x5a6980,_0x228219,_0x25bfca){return __awaiter$6(this,void 0,void 0,function*(){let _0x118b40=this['path']+'/'+_0x31b334+'/'+_0x2fa301;const _0x4b98b5={'facet_name':_0x5a6980,'new_facet_name':_0x228219};try{const _0x55eca4=yield this['fetch']['put'](_0x118b40,_0x25bfca,_0x4b98b5);if(_0x55eca4['status']>0xc7&&_0x55eca4['status']<0x12c){const _0x35ec01=yield _0x55eca4['json']();return new SuccessfulFacetResponse(_0x35ec01);}const _0x5861ec=yield _0x55eca4['json']();return new FailedFacetResponse(_0x5861ec);}catch(_0x10156f){if(_0x10156f instanceof Error)return new FailedFacetResponse({'detail':_0x10156f['message'],'title':_0x10156f['name'],'status':0x1f4,'instance':'','type':''});throw _0x10156f;}});}['list'](_0x126cf6,_0x520469,_0x38b792,_0x230474,_0xb386af){return __awaiter$6(this,void 0,void 0,function*(){let _0x21eb6a=this['path']+'/'+_0x126cf6+'/'+_0x520469+'/'+_0x38b792+'/'+_0x230474;try{const _0x4181e0=yield this['fetch']['get'](_0x21eb6a,_0xb386af);if(_0x4181e0['status']>0xc7&&_0x4181e0['status']<0x12c){const _0x3130bb=yield _0x4181e0['json']();return new SuccessfulFacetValueResponse(_0x3130bb);}const _0x14b440=yield _0x4181e0['json']();return new FailedFacetValuesResponse(_0x14b440);}catch(_0x8f3764){if(_0x8f3764 instanceof Error)return new FailedFacetValuesResponse({'detail':_0x8f3764['message'],'title':_0x8f3764['name'],'status':0x1f4,'instance':'','type':''});throw _0x8f3764;}});}}
|
|
14
|
-
|
|
15
|
-
var __awaiter$5=undefined&&undefined['__awaiter']||function(_0x132536,_0x40816b,_0x478bc8,_0x41b13d){function _0x79c0a1(_0x3bcf1c){return _0x3bcf1c instanceof _0x478bc8?_0x3bcf1c:new _0x478bc8(function(_0x2d2322){_0x2d2322(_0x3bcf1c);});}return new(_0x478bc8||(_0x478bc8=Promise))(function(_0x8163e5,_0x519fe1){function _0x4eeea9(_0x349527){try{_0x394d06(_0x41b13d['next'](_0x349527));}catch(_0x2643d8){_0x519fe1(_0x2643d8);}}function _0x4782de(_0xa368fb){try{_0x394d06(_0x41b13d['throw'](_0xa368fb));}catch(_0x343e6b){_0x519fe1(_0x343e6b);}}function _0x394d06(_0x225720){_0x225720['done']?_0x8163e5(_0x225720['value']):_0x79c0a1(_0x225720['value'])['then'](_0x4eeea9,_0x4782de);}_0x394d06((_0x41b13d=_0x41b13d['apply'](_0x132536,_0x40816b||[]))['next']());});};class SearchResultService{constructor(_0xa42e7e){this['fetch']=_0xa42e7e,this['path']='search-result';}['create'](_0xfd55ef,_0x35bbd1,_0x2e2ebd,_0x507f36,_0x3eed91){return __awaiter$5(this,void 0,void 0,function*(){_0x3eed91=_0x3eed91!==null&&_0x3eed91!==void 0?_0x3eed91:{'latitude':0x0,'longitude':0x0,'facets':[],'searchable_fields':[],'resources':[],'active':!![]};const _0xb20333=Object['assign']({'account_name':_0xfd55ef,'search_result_name':_0x2e2ebd,'list_name':_0x35bbd1},_0x3eed91);try{const _0x5ba53d=yield this['fetch']['post'](this['path'],_0x507f36,_0xb20333);if(_0x5ba53d['status']>0xc7&&_0x5ba53d['status']<0x12c){const _0x5e2669=yield _0x5ba53d['json']();return new SuccessfulSearchResultResponse(_0x5e2669);}const _0x3b5865=yield _0x5ba53d['json']();return new FailedSearchResultResponse(_0x3b5865);}catch(_0x1606fd){if(_0x1606fd instanceof Error)return new FailedSearchResultResponse({'detail':_0x1606fd['message'],'title':_0x1606fd['name'],'status':0x1f4,'instance':'','type':''});throw _0x1606fd;}});}['list'](_0x4115dd,_0x30edcd,_0xecdafc,_0xd7085){return __awaiter$5(this,void 0,void 0,function*(){let _0x3971a4=this['path']+'/'+_0x4115dd+'/'+_0x30edcd+'?'+this['getQueryStr'](_0xd7085);try{const _0x4aa822=yield this['fetch']['get'](_0x3971a4,_0xecdafc);if(_0x4aa822['status']>0xc7&&_0x4aa822['status']<0x12c){const _0x329075=yield _0x4aa822['json']();return new SuccessfulListSearchResultResponse(_0x329075);}const _0x329a66=yield _0x4aa822['json']();return new FailedViewSearchResultResponse(_0x329a66);}catch(_0x31fd07){if(_0x31fd07 instanceof Error)return new FailedViewSearchResultResponse({'detail':_0x31fd07['message'],'title':_0x31fd07['name'],'status':0x1f4,'instance':'','type':''});throw _0x31fd07;}});}['get'](_0x1f0ad9,_0x9242c6,_0x32ee2c,_0x264909){return __awaiter$5(this,void 0,void 0,function*(){let _0x9b89b8=this['path']+'/'+_0x1f0ad9+'/'+_0x9242c6+'?'+_0x32ee2c;try{const _0x47d78b=yield this['fetch']['get'](_0x9b89b8,_0x264909);if(_0x47d78b['status']>0xc7&&_0x47d78b['status']<0x12c){const _0x267f98=yield _0x47d78b['json']();return new SuccessfulSearchResultResponse(_0x267f98);}const _0x4ba04c=yield _0x47d78b['json']();return new FailedSearchResultResponse(_0x4ba04c);}catch(_0x1a1aac){if(_0x1a1aac instanceof Error)return new FailedSearchResultResponse({'detail':_0x1a1aac['message'],'title':_0x1a1aac['name'],'status':0x1f4,'instance':'','type':''});throw _0x1a1aac;}});}['delete'](_0x389ae5,_0x44949b,_0x1e6770,_0x5e0150){return __awaiter$5(this,void 0,void 0,function*(){const _0x2a854e=this['path']+'/'+_0x389ae5+'/'+_0x44949b+'/'+_0x1e6770,_0x5a702e=yield this['fetch']['delete'](_0x2a854e,_0x5e0150);try{if(_0x5a702e['status']>0xc7&&_0x5a702e['status']<0x12c)return new SuccessfulResponse({});const _0x2dd31a=yield _0x5a702e['json']();return new FailedResponse(_0x2dd31a);}catch(_0x43e527){if(_0x43e527 instanceof Error)return new FailedResponse({'detail':_0x43e527['message'],'title':_0x43e527['name'],'status':0x1f4,'instance':'','type':''});throw _0x43e527;}});}['upload'](_0x27d434,_0x5dec15,_0xd0373d,_0x18bb8b){return __awaiter$5(this,void 0,void 0,function*(){const _0x3b7187=this['path']+'/'+_0x27d434+'/'+_0x5dec15+'/upload',_0x424fe3=new FormData();_0x424fe3['append']('file',_0xd0373d);try{const _0x51af38=yield this['fetch']['upload'](_0x3b7187,_0x18bb8b,_0x424fe3);if(_0x51af38['status']>0xc7&&_0x51af38['status']<0x12c){const _0x3cf9ef=yield _0x51af38['json']();return new SuccessfulSearchResultResponse(_0x3cf9ef);}const _0x489924=yield _0x51af38['json']();return new FailedSearchResultResponse(_0x489924);}catch(_0x1059b7){if(_0x1059b7 instanceof Error)return new FailedSearchResultResponse({'detail':_0x1059b7['message'],'title':_0x1059b7['name'],'status':0x1f4,'instance':'','type':''});throw _0x1059b7;}});}['edit'](_0x391e3,_0x81e970,_0x296a15,_0x4f7c06,_0xa0866f){return __awaiter$5(this,void 0,void 0,function*(){_0xa0866f=_0xa0866f!==null&&_0xa0866f!==void 0?_0xa0866f:{'active':!![],'latitude':0x0,'longitude':0x0,'facets':[],'searchable_fields':[],'resources':[]};const _0x309655=this['path']+'/'+_0x391e3+'/'+_0x81e970+'/'+_0x296a15;try{const _0x1edb0e=yield this['fetch']['put'](_0x309655,_0x4f7c06,_0xa0866f);if(_0x1edb0e['status']>0xc7&&_0x1edb0e['status']<0x12c){const _0x4418a6=yield _0x1edb0e['json']();return new SuccessfulSearchResultResponse(_0x4418a6);}const _0x550838=yield _0x1edb0e['json']();return new FailedSearchResultResponse(_0x550838);}catch(_0x55dadf){if(_0x55dadf instanceof Error)return new FailedSearchResultResponse({'detail':_0x55dadf['message'],'title':_0x55dadf['name'],'status':0x1f4,'instance':'','type':''});throw _0x55dadf;}});}['getQueryStr'](_0x187156){let _0x2c67b9='';const _0x1f4ec0=[];(_0x187156===null||_0x187156===void 0?void 0:_0x187156['size'])&&_0x1f4ec0['push']('size='+_0x187156['size']);(_0x187156===null||_0x187156===void 0?void 0:_0x187156['skip'])&&_0x1f4ec0['push']('skip='+_0x187156['skip']);(_0x187156===null||_0x187156===void 0?void 0:_0x187156['query'])&&_0x1f4ec0['push']('query='+_0x187156['query']);(_0x187156===null||_0x187156===void 0?void 0:_0x187156['filter'])&&_0x1f4ec0['push']('filter='+_0x187156['filter']);if((_0x187156===null||_0x187156===void 0?void 0:_0x187156['radius'])&&_0x187156['radius']['latitude']&&_0x187156['radius']['longitude']&&_0x187156['radius']['distance_in_km']){const _0x36ab30=_0x187156['radius']['latitude']+','+_0x187156['radius']['longitude']+','+_0x187156['radius']['distance_in_km'];_0x1f4ec0['push']('radius='+_0x36ab30);}return _0x187156['active']===![]&&_0x1f4ec0['push']('active='+_0x187156['active']),_0x1f4ec0['length']>0x0&&_0x1f4ec0['forEach']((_0xe03e1e,_0x41f65d)=>{if(_0x41f65d>0x0&&_0x2c67b9)_0x2c67b9+='&';_0x2c67b9+=_0xe03e1e;}),_0x2c67b9;}}
|
|
16
|
-
|
|
17
|
-
var __awaiter$4=undefined&&undefined['__awaiter']||function(_0x1e28d5,_0x40ebc7,_0x3e757e,_0xdb817a){function _0x3e1040(_0x38173e){return _0x38173e instanceof _0x3e757e?_0x38173e:new _0x3e757e(function(_0x2df4d1){_0x2df4d1(_0x38173e);});}return new(_0x3e757e||(_0x3e757e=Promise))(function(_0x5d4b43,_0x4bfffe){function _0x49f11f(_0x5ace4c){try{_0x5e113d(_0xdb817a['next'](_0x5ace4c));}catch(_0x54f527){_0x4bfffe(_0x54f527);}}function _0xeef0e0(_0x30225f){try{_0x5e113d(_0xdb817a['throw'](_0x30225f));}catch(_0x170b0f){_0x4bfffe(_0x170b0f);}}function _0x5e113d(_0x27e228){_0x27e228['done']?_0x5d4b43(_0x27e228['value']):_0x3e1040(_0x27e228['value'])['then'](_0x49f11f,_0xeef0e0);}_0x5e113d((_0xdb817a=_0xdb817a['apply'](_0x1e28d5,_0x40ebc7||[]))['next']());});};class ContributorService{constructor(_0x14fd64){this['fetch']=_0x14fd64,this['path']='contributor';}['create'](_0x2b1cc6,_0x4376f4,_0x366eeb,_0x4a6900){return __awaiter$4(this,void 0,void 0,function*(){const _0x21073c={'account_name':_0x2b1cc6,'list_name':_0x4376f4,'contributor_name':_0x366eeb};try{const _0x526d5e=yield this['fetch']['post'](this['path'],_0x4a6900,_0x21073c);if(_0x526d5e['status']>0xc7&&_0x526d5e['status']<0x12c){const _0x3665f7=yield _0x526d5e['json']();return new SuccessfulContributorResponse(_0x3665f7);}const _0x48a531=yield _0x526d5e['json']();return new FailedContributorResponse(_0x48a531);}catch(_0x3c8ab2){if(_0x3c8ab2 instanceof Error)return new FailedContributorResponse({'detail':_0x3c8ab2['message'],'title':_0x3c8ab2['name'],'status':0x1f4,'instance':'','type':''});throw _0x3c8ab2;}});}['remove'](_0x54cf13,_0x551cd6,_0x507e63,_0xf0a9b3){return __awaiter$4(this,void 0,void 0,function*(){const _0x4f1e23=this['path']+'/'+_0x54cf13+'/'+_0x551cd6+'/'+_0x507e63,_0x3c0295=yield this['fetch']['delete'](_0x4f1e23,_0xf0a9b3);try{if(_0x3c0295['status']>0xc7&&_0x3c0295['status']<0x12c)return new SuccessfulResponse({});const _0x447cae=yield _0x3c0295['json']();return new FailedResponse(_0x447cae);}catch(_0x595c69){if(_0x595c69 instanceof Error)return new FailedResponse({'detail':_0x595c69['message'],'title':_0x595c69['name'],'status':0x1f4,'instance':'','type':''});throw _0x595c69;}});}['startsWith'](_0x442009,_0x1bdce3){return __awaiter$4(this,void 0,void 0,function*(){const _0x28afa1=this['path']+'/'+_0x442009;try{const _0x3f9975=yield this['fetch']['get'](_0x28afa1,_0x1bdce3);if(_0x3f9975['status']>0xc7&&_0x3f9975['status']<0x12c){const _0x5e53a4=yield _0x3f9975['json']();return new SuccessfulAccountAndImageResponse(_0x5e53a4);}const _0x3bdd4b=yield _0x3f9975['json']();return new FailedAccountAndImageResponse(_0x3bdd4b);}catch(_0x1ff49e){if(_0x1ff49e instanceof Error)return new FailedAccountAndImageResponse({'detail':_0x1ff49e['message'],'title':_0x1ff49e['name'],'status':0x1f4,'instance':'','type':''});throw _0x1ff49e;}});}}
|
|
18
|
-
|
|
19
|
-
var __awaiter$3=undefined&&undefined['__awaiter']||function(_0x22b2a8,_0x4eb114,_0x12897d,_0x4f0838){function _0xe153c6(_0x2ee238){return _0x2ee238 instanceof _0x12897d?_0x2ee238:new _0x12897d(function(_0x30966c){_0x30966c(_0x2ee238);});}return new(_0x12897d||(_0x12897d=Promise))(function(_0x7c9887,_0x500282){function _0x1ca5d9(_0x4090b8){try{_0x1364e0(_0x4f0838['next'](_0x4090b8));}catch(_0x5757c3){_0x500282(_0x5757c3);}}function _0x5c3855(_0x282939){try{_0x1364e0(_0x4f0838['throw'](_0x282939));}catch(_0x3c0187){_0x500282(_0x3c0187);}}function _0x1364e0(_0x36bc11){_0x36bc11['done']?_0x7c9887(_0x36bc11['value']):_0xe153c6(_0x36bc11['value'])['then'](_0x1ca5d9,_0x5c3855);}_0x1364e0((_0x4f0838=_0x4f0838['apply'](_0x22b2a8,_0x4eb114||[]))['next']());});};class SearchableFieldService{constructor(_0x173962){this['fetch']=_0x173962,this['path']='searchable-field';}['create'](_0x5bf932,_0x412942,_0x389f36,_0x44763b){return __awaiter$3(this,void 0,void 0,function*(){const _0x2721c9={'account_name':_0x5bf932,'list_name':_0x412942,'searchable_field_name':_0x389f36};try{const _0x28a0e0=yield this['fetch']['post'](this['path'],_0x44763b,_0x2721c9);if(_0x28a0e0['status']>0xc7&&_0x28a0e0['status']<0x12c){const _0x2df6d0=yield _0x28a0e0['json']();return new SuccessfulSearchableFieldResponse(_0x2df6d0);}const _0x249657=yield _0x28a0e0['json']();return new FailedSearchableFieldResponse(_0x249657);}catch(_0x54b90b){if(_0x54b90b instanceof Error)return new FailedSearchableFieldResponse({'detail':_0x54b90b['message'],'title':_0x54b90b['name'],'status':0x1f4,'instance':'','type':''});throw _0x54b90b;}});}['remove'](_0x2c40f7,_0x22ee91,_0x2217ec,_0x31616b){return __awaiter$3(this,void 0,void 0,function*(){const _0x1c78d6=this['path']+'/'+_0x2c40f7+'/'+_0x22ee91+'/'+_0x2217ec,_0x22b5c3=yield this['fetch']['delete'](_0x1c78d6,_0x31616b);try{if(_0x22b5c3['status']>0xc7&&_0x22b5c3['status']<0x12c)return new SuccessfulResponse({});const _0x2cd431=yield _0x22b5c3['json']();return new FailedResponse(_0x2cd431);}catch(_0x23c9e6){if(_0x23c9e6 instanceof Error)return new FailedResponse({'detail':_0x23c9e6['message'],'title':_0x23c9e6['name'],'status':0x1f4,'instance':'','type':''});throw _0x23c9e6;}});}['rename'](_0xcc8f80,_0x272ca0,_0x11b452,_0x3cd232,_0x59fb2e){return __awaiter$3(this,void 0,void 0,function*(){let _0x438a91=this['path']+'/'+_0xcc8f80+'/'+_0x272ca0;const _0x136599={'searchable_field_name':_0x11b452,'new_searchable_field_name':_0x3cd232};try{const _0x17fc73=yield this['fetch']['put'](_0x438a91,_0x59fb2e,_0x136599);if(_0x17fc73['status']>0xc7&&_0x17fc73['status']<0x12c){const _0x412bbc=yield _0x17fc73['json']();return new SuccessfulSearchableFieldResponse(_0x412bbc);}const _0x8bce4e=yield _0x17fc73['json']();return new FailedSearchableFieldResponse(_0x8bce4e);}catch(_0x503618){if(_0x503618 instanceof Error)return new FailedSearchableFieldResponse({'detail':_0x503618['message'],'title':_0x503618['name'],'status':0x1f4,'instance':'','type':''});throw _0x503618;}});}}
|
|
20
|
-
|
|
21
|
-
var __awaiter$2=undefined&&undefined['__awaiter']||function(_0x21d874,_0x3ed674,_0x3ede1d,_0x2eb748){function _0x268d36(_0x14626e){return _0x14626e instanceof _0x3ede1d?_0x14626e:new _0x3ede1d(function(_0x4bbdd0){_0x4bbdd0(_0x14626e);});}return new(_0x3ede1d||(_0x3ede1d=Promise))(function(_0x5a86ce,_0x4dfb05){function _0x18eaf2(_0x3b2f11){try{_0x52db47(_0x2eb748['next'](_0x3b2f11));}catch(_0x47e194){_0x4dfb05(_0x47e194);}}function _0x2d5124(_0x1b66dd){try{_0x52db47(_0x2eb748['throw'](_0x1b66dd));}catch(_0x5d0175){_0x4dfb05(_0x5d0175);}}function _0x52db47(_0x1d0995){_0x1d0995['done']?_0x5a86ce(_0x1d0995['value']):_0x268d36(_0x1d0995['value'])['then'](_0x18eaf2,_0x2d5124);}_0x52db47((_0x2eb748=_0x2eb748['apply'](_0x21d874,_0x3ed674||[]))['next']());});};class ResourceService{constructor(_0x50bfa9){this['fetch']=_0x50bfa9,this['path']='resource';}['create'](_0x90f0c,_0x209cf5,_0x2a73b3,_0x43ef98){return __awaiter$2(this,void 0,void 0,function*(){const _0x6cc018={'account_name':_0x90f0c,'list_name':_0x209cf5,'resource_name':_0x2a73b3};try{const _0x355c28=yield this['fetch']['post'](this['path'],_0x43ef98,_0x6cc018);if(_0x355c28['status']>0xc7&&_0x355c28['status']<0x12c){const _0xe3a5b9=yield _0x355c28['json']();return new SuccessfulResourceResponse(_0xe3a5b9);}const _0x4012e3=yield _0x355c28['json']();return new FailedResourceResponse(_0x4012e3);}catch(_0x839073){if(_0x839073 instanceof Error)return new FailedResourceResponse({'detail':_0x839073['message'],'title':_0x839073['name'],'status':0x1f4,'instance':'','type':''});throw _0x839073;}});}['remove'](_0x3b9e21,_0xfd2d4c,_0x1e3f4b,_0x421a22){return __awaiter$2(this,void 0,void 0,function*(){const _0x2d5032=this['path']+'/'+_0x3b9e21+'/'+_0xfd2d4c+'/'+_0x1e3f4b,_0xdb9fd7=yield this['fetch']['delete'](_0x2d5032,_0x421a22);try{if(_0xdb9fd7['status']>0xc7&&_0xdb9fd7['status']<0x12c)return new SuccessfulResponse({});const _0x3cab63=yield _0xdb9fd7['json']();return new FailedResponse(_0x3cab63);}catch(_0x577d39){if(_0x577d39 instanceof Error)return new FailedResponse({'detail':_0x577d39['message'],'title':_0x577d39['name'],'status':0x1f4,'instance':'','type':''});throw _0x577d39;}});}['rename'](_0x6415c9,_0x5f5d3e,_0x8ee2b9,_0xd1ee6d,_0x5c38bd){return __awaiter$2(this,void 0,void 0,function*(){let _0x3b9851=this['path']+'/'+_0x6415c9+'/'+_0x5f5d3e;const _0x56b64f={'resource_name':_0x8ee2b9,'new_resource_name':_0xd1ee6d};try{const _0x1bceb3=yield this['fetch']['put'](_0x3b9851,_0x5c38bd,_0x56b64f);if(_0x1bceb3['status']>0xc7&&_0x1bceb3['status']<0x12c){const _0x3d16f3=yield _0x1bceb3['json']();return new SuccessfulResourceResponse(_0x3d16f3);}const _0xb56fcd=yield _0x1bceb3['json']();return new FailedResourceResponse(_0xb56fcd);}catch(_0x4a0216){if(_0x4a0216 instanceof Error)return new FailedResourceResponse({'detail':_0x4a0216['message'],'title':_0x4a0216['name'],'status':0x1f4,'instance':'','type':''});throw _0x4a0216;}});}}
|
|
22
|
-
|
|
23
|
-
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x3f53d9,_0x4640ff,_0x4e6c0e,_0x45a35f){function _0x3338fd(_0x3ca82b){return _0x3ca82b instanceof _0x4e6c0e?_0x3ca82b:new _0x4e6c0e(function(_0x1e108b){_0x1e108b(_0x3ca82b);});}return new(_0x4e6c0e||(_0x4e6c0e=Promise))(function(_0x87f1a5,_0x1af3fd){function _0x2add80(_0x3c6c3a){try{_0xb96866(_0x45a35f['next'](_0x3c6c3a));}catch(_0x22893e){_0x1af3fd(_0x22893e);}}function _0x1499f2(_0x3d2e0a){try{_0xb96866(_0x45a35f['throw'](_0x3d2e0a));}catch(_0x5690bf){_0x1af3fd(_0x5690bf);}}function _0xb96866(_0x524701){_0x524701['done']?_0x87f1a5(_0x524701['value']):_0x3338fd(_0x524701['value'])['then'](_0x2add80,_0x1499f2);}_0xb96866((_0x45a35f=_0x45a35f['apply'](_0x3f53d9,_0x4640ff||[]))['next']());});};class GroupService{constructor(_0x1ac0b3){this['fetch']=_0x1ac0b3,this['path']='group';}['create'](_0x548a89,_0x288cce,_0x44c970,_0x4070a0){return __awaiter$1(this,void 0,void 0,function*(){const _0x198a4a={'account_name':_0x548a89,'search_service_name':_0x288cce,'group_name':_0x44c970};try{const _0xf508f=yield this['fetch']['post'](this['path'],_0x4070a0,_0x198a4a);if(_0xf508f['status']>0xc7&&_0xf508f['status']<0x12c){const _0x3daa37=yield _0xf508f['json']();return new SuccessfulGroupResponse(_0x3daa37);}const _0x4de9ec=yield _0xf508f['json']();return new FailedGroupResponse(_0x4de9ec);}catch(_0x4aa93a){if(_0x4aa93a instanceof Error)return new FailedGroupResponse({'detail':_0x4aa93a['message'],'title':_0x4aa93a['name'],'status':0x1f4,'instance':'','type':''});throw _0x4aa93a;}});}['addList'](_0x13e42f,_0x1f3fd5,_0x143d39,_0x44d7f1,_0x451ae5){return __awaiter$1(this,void 0,void 0,function*(){const _0x14c1b7={'account_name':_0x13e42f,'list_name':_0x143d39,'group_name':_0x1f3fd5,'version':_0x44d7f1};try{const _0x214f54=yield this['fetch']['post'](this['path']+'/list',_0x451ae5,_0x14c1b7);if(_0x214f54['status']>0xc7&&_0x214f54['status']<0x12c){const _0x309cbb=yield _0x214f54['json']();return new SuccessfulListIdentityResponse(_0x309cbb);}const _0x37312a=yield _0x214f54['json']();return new FailedListIdentityResponse(_0x37312a);}catch(_0x2e5973){if(_0x2e5973 instanceof Error)return new FailedListIdentityResponse({'detail':_0x2e5973['message'],'title':_0x2e5973['name'],'status':0x1f4,'instance':'','type':''});throw _0x2e5973;}});}['delete'](_0x5f2b0a,_0x173585,_0x4c54b8){return __awaiter$1(this,void 0,void 0,function*(){const _0x523414=this['path']+'/'+_0x5f2b0a+'/'+_0x173585,_0x151bea=yield this['fetch']['delete'](_0x523414,_0x4c54b8);try{if(_0x151bea['status']>0xc7&&_0x151bea['status']<0x12c)return new SuccessfulResponse({});const _0x45668e=yield _0x151bea['json']();return new FailedResponse(_0x45668e);}catch(_0xef34c6){if(_0xef34c6 instanceof Error)return new FailedResponse({'detail':_0xef34c6['message'],'title':_0xef34c6['name'],'status':0x1f4,'instance':'','type':''});throw _0xef34c6;}});}}
|
|
24
|
-
|
|
25
|
-
var __awaiter=undefined&&undefined['__awaiter']||function(_0xe218ec,_0x1536ab,_0x52180b,_0x625434){function _0x8a2581(_0x5e7e97){return _0x5e7e97 instanceof _0x52180b?_0x5e7e97:new _0x52180b(function(_0x3d4838){_0x3d4838(_0x5e7e97);});}return new(_0x52180b||(_0x52180b=Promise))(function(_0xe8e922,_0x560460){function _0x167077(_0x4c5d5d){try{_0x36b79c(_0x625434['next'](_0x4c5d5d));}catch(_0x4c6bdb){_0x560460(_0x4c6bdb);}}function _0xbeb3c3(_0x122352){try{_0x36b79c(_0x625434['throw'](_0x122352));}catch(_0x389221){_0x560460(_0x389221);}}function _0x36b79c(_0x29e242){_0x29e242['done']?_0xe8e922(_0x29e242['value']):_0x8a2581(_0x29e242['value'])['then'](_0x167077,_0xbeb3c3);}_0x36b79c((_0x625434=_0x625434['apply'](_0xe218ec,_0x1536ab||[]))['next']());});};class AdminClient{constructor(_0x3c6378='https://admin.searchability.dev/'){var _0x427342=new Fetch(_0x3c6378);this['Accounts']=new AccountService(_0x427342),this['Lists']=new ListService(_0x427342),this['ApiKeys']=new ApiKeyService(_0x427342),this['SearchServers']=new SearchServersService(_0x427342),this['Facets']=new FacetService(_0x427342),this['SearchResults']=new SearchResultService(_0x427342),this['Contributors']=new ContributorService(_0x427342),this['SearchableFields']=new SearchableFieldService(_0x427342),this['Groups']=new GroupService(_0x427342),this['Resources']=new ResourceService(_0x427342);}}class AuthClient{constructor(_0x608f0b='https://auth.searchability.dev/'){this['fetch']=new Fetch(_0x608f0b);}['login'](_0x195e50){return __awaiter(this,void 0,void 0,function*(){const _0x4c1466='login/'+_0x195e50;try{const _0x2ba8e7=yield yield fetch(_0x4c1466);if(_0x2ba8e7['status']>0xc7&&_0x2ba8e7['status']<0x12c){const _0x3be731=yield _0x2ba8e7['json']();return new SuccessfulAuthResponse(_0x3be731);}const _0x182242=yield _0x2ba8e7['json']();return new FailedAuthResponse(_0x182242);}catch(_0x3e69b4){if(_0x3e69b4 instanceof Error)return new FailedAuthResponse({'detail':_0x3e69b4['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x3e69b4;}});}['refresh'](_0x1d0ce0){return __awaiter(this,void 0,void 0,function*(){const _0x4858ee='refresh',_0x50ac4d={'refresh_token':_0x1d0ce0};try{const _0x12cec0=yield this['fetch']['PostNoAuth'](_0x4858ee,_0x50ac4d);if(_0x12cec0['status']>0xc7&&_0x12cec0['status']<0x12c){const _0xad60f4=yield _0x12cec0['json']();return new SuccessfulAuthResponse(_0xad60f4);}const _0x5a9346=yield _0x12cec0['json']();return new FailedAuthResponse(_0x5a9346);}catch(_0x5ac95a){if(_0x5ac95a instanceof Error)return new FailedAuthResponse({'detail':_0x5ac95a['message'],'title':'','status':0x1f4,'instance':'','type':''});throw _0x5ac95a;}});}['getTokenStatus'](_0x2d3883){if(Date['now']()<_0x2d3883['access_expires'])return TokenStatus['Ok'];if(Date['now']()<_0x2d3883['refresh_expires'])return TokenStatus['Refresh'];return TokenStatus['Expired'];}}
|
|
26
|
-
|
|
27
|
-
export { AdminClient, AuthClient, TokenStatus, Tokens };
|