@searchability/admin-client 0.0.1 → 0.0.2
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,9 +1,9 @@
|
|
|
1
|
-
var __awaiter$1=undefined&&undefined['__awaiter']||function(
|
|
1
|
+
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x1cd876,_0x1aba90,_0x4f56f2,_0x430be3){function _0x26d4f7(_0x481acd){return _0x481acd instanceof _0x4f56f2?_0x481acd:new _0x4f56f2(function(_0x1eb483){_0x1eb483(_0x481acd);});}return new(_0x4f56f2||(_0x4f56f2=Promise))(function(_0x297f96,_0x46b7ac){function _0x228e6b(_0xe72e32){try{_0x1bb595(_0x430be3['next'](_0xe72e32));}catch(_0x326de8){_0x46b7ac(_0x326de8);}}function _0x28186d(_0x45774d){try{_0x1bb595(_0x430be3['throw'](_0x45774d));}catch(_0x2dfa29){_0x46b7ac(_0x2dfa29);}}function _0x1bb595(_0x325ec9){_0x325ec9['done']?_0x297f96(_0x325ec9['value']):_0x26d4f7(_0x325ec9['value'])['then'](_0x228e6b,_0x28186d);}_0x1bb595((_0x430be3=_0x430be3['apply'](_0x1cd876,_0x1aba90||[]))['next']());});};class Fetch{static['get'](_0x2155a2,_0x8f94cf){return __awaiter$1(this,void 0,void 0,function*(){return yield fetch(_0x2155a2,{'method':'get','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x8f94cf}});});}}
|
|
2
2
|
|
|
3
|
-
class Response{constructor(
|
|
3
|
+
class Response{constructor(_0x15129d){this['isSuccess']=_0x15129d;}}class SuccessfulAccountResponse extends Response{constructor(_0x2839e7){super(!![]),this['account']=_0x2839e7;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x149a88){super(![]),this['problem']=_0x149a88;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
|
|
4
4
|
|
|
5
|
-
var __awaiter=undefined&&undefined['__awaiter']||function(
|
|
5
|
+
var __awaiter=undefined&&undefined['__awaiter']||function(_0x4224ec,_0x31ccfb,_0x32f87c,_0x3e6c2b){function _0x3b51ac(_0xb3a6fa){return _0xb3a6fa instanceof _0x32f87c?_0xb3a6fa:new _0x32f87c(function(_0x5ecfaa){_0x5ecfaa(_0xb3a6fa);});}return new(_0x32f87c||(_0x32f87c=Promise))(function(_0x1cfd4e,_0x5e7013){function _0x35852c(_0x23398e){try{_0x4774d8(_0x3e6c2b['next'](_0x23398e));}catch(_0x3ba682){_0x5e7013(_0x3ba682);}}function _0x2667c6(_0x236366){try{_0x4774d8(_0x3e6c2b['throw'](_0x236366));}catch(_0x584b6f){_0x5e7013(_0x584b6f);}}function _0x4774d8(_0x2305e6){_0x2305e6['done']?_0x1cfd4e(_0x2305e6['value']):_0x3b51ac(_0x2305e6['value'])['then'](_0x35852c,_0x2667c6);}_0x4774d8((_0x3e6c2b=_0x3e6c2b['apply'](_0x4224ec,_0x31ccfb||[]))['next']());});};class AccountService{constructor(_0xd9588b){this['baseUri']=_0xd9588b;}['get'](_0x50b3bd,_0x2aac6d){return __awaiter(this,arguments,void 0,function*(_0x547146,_0x3f1702,_0x2efcbc={}){var _0x17116d;let _0x55bc6a=(_0x17116d=_0x2efcbc['baseUri'])!==null&&_0x17116d!==void 0?_0x17116d:this['baseUri'];_0x55bc6a=_0x55bc6a+'/Account/'+_0x3f1702+'/';const _0x206704=yield Fetch['get'](_0x55bc6a,_0x547146);if(_0x206704['status']>0xc7&&_0x206704['status']<0x12c){const _0x579ec6=yield _0x206704['json']();return new SuccessfulAccountResponse(_0x579ec6);}if(_0x206704['bodyUsed']){const _0x312596=yield _0x206704['json']();return new FailedAccountResponse(_0x312596);}const _0x2891d2={'type':'','status':_0x206704['status'],'title':'','instance':'','errors':{}};return new FailedAccountResponse(_0x2891d2);});}}
|
|
6
6
|
|
|
7
|
-
class AdminClient{
|
|
7
|
+
var _a;class AdminClient{}_a=AdminClient,AdminClient['baseUri']='https://admin.searchability.dev',AdminClient['Accounts']=new AccountService(_a['baseUri']);
|
|
8
8
|
|
|
9
9
|
export { AdminClient };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var __awaiter$1=undefined&&undefined['__awaiter']||function(
|
|
3
|
+
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0x580bf0,_0x66316c,_0x7afe77,_0x2bd145){function _0x1259ff(_0x18526e){return _0x18526e instanceof _0x7afe77?_0x18526e:new _0x7afe77(function(_0x3a00c6){_0x3a00c6(_0x18526e);});}return new(_0x7afe77||(_0x7afe77=Promise))(function(_0xeb8711,_0x480b4b){function _0x4fd4e8(_0x139982){try{_0xee4384(_0x2bd145['next'](_0x139982));}catch(_0xca23a1){_0x480b4b(_0xca23a1);}}function _0x1e56ea(_0x23c1bf){try{_0xee4384(_0x2bd145['throw'](_0x23c1bf));}catch(_0x34fa8f){_0x480b4b(_0x34fa8f);}}function _0xee4384(_0x42c7d9){_0x42c7d9['done']?_0xeb8711(_0x42c7d9['value']):_0x1259ff(_0x42c7d9['value'])['then'](_0x4fd4e8,_0x1e56ea);}_0xee4384((_0x2bd145=_0x2bd145['apply'](_0x580bf0,_0x66316c||[]))['next']());});};class Fetch{static['get'](_0x1b2d59,_0x2bb766){return __awaiter$1(this,void 0,void 0,function*(){return yield fetch(_0x1b2d59,{'method':'get','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2bb766}});});}}
|
|
4
4
|
|
|
5
|
-
class Response{constructor(
|
|
5
|
+
class Response{constructor(_0x1be5df){this['isSuccess']=_0x1be5df;}}class SuccessfulAccountResponse extends Response{constructor(_0x4b3068){super(!![]),this['account']=_0x4b3068;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x4aeb42){super(![]),this['problem']=_0x4aeb42;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
|
|
6
6
|
|
|
7
|
-
var __awaiter=undefined&&undefined['__awaiter']||function(
|
|
7
|
+
var __awaiter=undefined&&undefined['__awaiter']||function(_0x15454e,_0x556014,_0x26a756,_0x1bb587){function _0xb9f461(_0x266ef9){return _0x266ef9 instanceof _0x26a756?_0x266ef9:new _0x26a756(function(_0x168d29){_0x168d29(_0x266ef9);});}return new(_0x26a756||(_0x26a756=Promise))(function(_0xcfe8ce,_0x4c4cd3){function _0x2ad599(_0x116a68){try{_0x17ed23(_0x1bb587['next'](_0x116a68));}catch(_0x2c6168){_0x4c4cd3(_0x2c6168);}}function _0x539f03(_0x61e8de){try{_0x17ed23(_0x1bb587['throw'](_0x61e8de));}catch(_0x2e445f){_0x4c4cd3(_0x2e445f);}}function _0x17ed23(_0x76bccb){_0x76bccb['done']?_0xcfe8ce(_0x76bccb['value']):_0xb9f461(_0x76bccb['value'])['then'](_0x2ad599,_0x539f03);}_0x17ed23((_0x1bb587=_0x1bb587['apply'](_0x15454e,_0x556014||[]))['next']());});};class AccountService{constructor(_0x34d697){this['baseUri']=_0x34d697;}['get'](_0xc0fff2,_0x1298ac){return __awaiter(this,arguments,void 0,function*(_0x317fa3,_0x215aee,_0x448b85={}){var _0x3135f3;let _0x38e10a=(_0x3135f3=_0x448b85['baseUri'])!==null&&_0x3135f3!==void 0?_0x3135f3:this['baseUri'];_0x38e10a=_0x38e10a+'/Account/'+_0x215aee+'/';const _0x549fcd=yield Fetch['get'](_0x38e10a,_0x317fa3);if(_0x549fcd['status']>0xc7&&_0x549fcd['status']<0x12c){const _0x4db49b=yield _0x549fcd['json']();return new SuccessfulAccountResponse(_0x4db49b);}if(_0x549fcd['bodyUsed']){const _0x37273d=yield _0x549fcd['json']();return new FailedAccountResponse(_0x37273d);}const _0x289dee={'type':'','status':_0x549fcd['status'],'title':'','instance':'','errors':{}};return new FailedAccountResponse(_0x289dee);});}}
|
|
8
8
|
|
|
9
|
-
class AdminClient{
|
|
9
|
+
var _a;class AdminClient{}_a=AdminClient,AdminClient['baseUri']='https://admin.searchability.dev',AdminClient['Accounts']=new AccountService(_a['baseUri']);
|
|
10
10
|
|
|
11
11
|
exports.AdminClient = AdminClient;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0xc12900,_0x5359ac,_0x3ad6ab,_0x2be2d8){function _0x46b8fc(_0x2049e9){return _0x2049e9 instanceof _0x3ad6ab?_0x2049e9:new _0x3ad6ab(function(_0x21d8fd){_0x21d8fd(_0x2049e9);});}return new(_0x3ad6ab||(_0x3ad6ab=Promise))(function(_0x22103f,_0x58b6a0){function _0x46b1e5(_0x1d22c2){try{_0x3a5f9c(_0x2be2d8['next'](_0x1d22c2));}catch(_0x56a586){_0x58b6a0(_0x56a586);}}function _0x4562f2(_0x1c04b6){try{_0x3a5f9c(_0x2be2d8['throw'](_0x1c04b6));}catch(_0x39155c){_0x58b6a0(_0x39155c);}}function _0x3a5f9c(_0x53d7fb){_0x53d7fb['done']?_0x22103f(_0x53d7fb['value']):_0x46b8fc(_0x53d7fb['value'])['then'](_0x46b1e5,_0x4562f2);}_0x3a5f9c((_0x2be2d8=_0x2be2d8['apply'](_0xc12900,_0x5359ac||[]))['next']());});};class Fetch{static['get'](_0x489c66,_0xaf2c03){return __awaiter$1(this,void 0,void 0,function*(){return yield fetch(_0x489c66,{'method':'get','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0xaf2c03}});});}}
|
|
2
|
+
|
|
3
|
+
class Response{constructor(_0x4aa07f){this['isSuccess']=_0x4aa07f;}}class SuccessfulAccountResponse extends Response{constructor(_0x7eacf5){super(!![]),this['account']=_0x7eacf5;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x4fdcff){super(![]),this['problem']=_0x4fdcff;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
|
|
4
|
+
|
|
5
|
+
var __awaiter=undefined&&undefined['__awaiter']||function(_0x1b87cb,_0x424120,_0x5d47b4,_0x4eff57){function _0x571e2c(_0x478c6e){return _0x478c6e instanceof _0x5d47b4?_0x478c6e:new _0x5d47b4(function(_0x380e33){_0x380e33(_0x478c6e);});}return new(_0x5d47b4||(_0x5d47b4=Promise))(function(_0x118de4,_0x3da08a){function _0x113f02(_0x4eee5f){try{_0x2eb9a6(_0x4eff57['next'](_0x4eee5f));}catch(_0x200e01){_0x3da08a(_0x200e01);}}function _0x39d59e(_0x244586){try{_0x2eb9a6(_0x4eff57['throw'](_0x244586));}catch(_0x1d5791){_0x3da08a(_0x1d5791);}}function _0x2eb9a6(_0x101c4b){_0x101c4b['done']?_0x118de4(_0x101c4b['value']):_0x571e2c(_0x101c4b['value'])['then'](_0x113f02,_0x39d59e);}_0x2eb9a6((_0x4eff57=_0x4eff57['apply'](_0x1b87cb,_0x424120||[]))['next']());});};class AccountService{constructor(_0x3c7f70){this['baseUri']=_0x3c7f70;}['get'](_0x38be53,_0x49c753){return __awaiter(this,arguments,void 0,function*(_0x7697aa,_0x253bd8,_0x42fdec={}){var _0x34d814;let _0x3989dd=(_0x34d814=_0x42fdec['baseUri'])!==null&&_0x34d814!==void 0?_0x34d814:this['baseUri'];_0x3989dd=_0x3989dd+'/Account/'+_0x253bd8+'/';const _0xbde0f0=yield Fetch['get'](_0x3989dd,_0x7697aa);if(_0xbde0f0['status']>0xc7&&_0xbde0f0['status']<0x12c){const _0xd764cc=yield _0xbde0f0['json']();return new SuccessfulAccountResponse(_0xd764cc);}if(_0xbde0f0['bodyUsed']){const _0x32e1f8=yield _0xbde0f0['json']();return new FailedAccountResponse(_0x32e1f8);}const _0x175bed={'type':'','status':_0xbde0f0['status'],'title':'','instance':'','errors':{}};return new FailedAccountResponse(_0x175bed);});}}
|
|
6
|
+
|
|
7
|
+
var _a;class AdminClient{}_a=AdminClient,AdminClient['baseUri']='https://admin.searchability.dev',AdminClient['Accounts']=new AccountService(_a['baseUri']);
|
|
8
|
+
|
|
9
|
+
export { AdminClient };
|
package/dist/types.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
declare class AccountService {
|
|
2
|
-
|
|
2
|
+
readonly baseUri: string;
|
|
3
|
+
constructor(baseUri: string);
|
|
3
4
|
get(accessToken: string, accountName: string, options?: Partial<Options>): Promise<Response<Account, Problem>>;
|
|
4
5
|
}
|
|
5
6
|
|
|
6
7
|
declare class AdminClient {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
constructor();
|
|
8
|
+
static baseUri: string;
|
|
9
|
+
static Accounts: AccountService;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
type Options = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@searchability/admin-client",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "Searchability admin client.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/types.d.ts",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"exports": {
|
|
9
9
|
"import":{
|
|
10
10
|
"types":"./dist/types.d.ts",
|
|
11
|
-
"default":"./dist/searchability-admin-client.
|
|
11
|
+
"default":"./dist/searchability-admin-client.mjs"
|
|
12
12
|
},
|
|
13
13
|
"require":{
|
|
14
14
|
"types":"./dist/types.d.ts",
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
var __awaiter$1=undefined&&undefined['__awaiter']||function(_0xe1d169,_0x310f23,_0x7dc183,_0x4ebf66){function _0x27cc91(_0x59207e){return _0x59207e instanceof _0x7dc183?_0x59207e:new _0x7dc183(function(_0x44a99e){_0x44a99e(_0x59207e);});}return new(_0x7dc183||(_0x7dc183=Promise))(function(_0x4c2c2e,_0x18f062){function _0x2ea042(_0x48e8ba){try{_0xf92b18(_0x4ebf66['next'](_0x48e8ba));}catch(_0x213d08){_0x18f062(_0x213d08);}}function _0x3727e4(_0x4efdb9){try{_0xf92b18(_0x4ebf66['throw'](_0x4efdb9));}catch(_0x511180){_0x18f062(_0x511180);}}function _0xf92b18(_0x15e3a4){_0x15e3a4['done']?_0x4c2c2e(_0x15e3a4['value']):_0x27cc91(_0x15e3a4['value'])['then'](_0x2ea042,_0x3727e4);}_0xf92b18((_0x4ebf66=_0x4ebf66['apply'](_0xe1d169,_0x310f23||[]))['next']());});};class Fetch{static['get'](_0x16edad,_0x2295b1){return __awaiter$1(this,void 0,void 0,function*(){return yield fetch(_0x16edad,{'method':'get','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2295b1}});});}}
|
|
2
|
-
|
|
3
|
-
class Response{constructor(_0x4b4b5a){this['isSuccess']=_0x4b4b5a;}}class SuccessfulAccountResponse extends Response{constructor(_0x3a9d48){super(!![]),this['account']=_0x3a9d48;}['toSuccess'](){return this['account'];}['toProblem'](){throw new Error('Did\x20not\x20fail');}}class FailedAccountResponse extends Response{constructor(_0x42d662){super(![]),this['problem']=_0x42d662;}['toSuccess'](){throw new Error('Not\x20a\x20success');}['toProblem'](){return this['problem'];}}
|
|
4
|
-
|
|
5
|
-
var __awaiter=undefined&&undefined['__awaiter']||function(_0x5efb31,_0x213af3,_0x2d164a,_0x25532e){function _0x172889(_0x3f1a1e){return _0x3f1a1e instanceof _0x2d164a?_0x3f1a1e:new _0x2d164a(function(_0x192ded){_0x192ded(_0x3f1a1e);});}return new(_0x2d164a||(_0x2d164a=Promise))(function(_0x500ae5,_0x557cfd){function _0x522302(_0x3a04cc){try{_0x123439(_0x25532e['next'](_0x3a04cc));}catch(_0x395e2e){_0x557cfd(_0x395e2e);}}function _0x3401a1(_0x5c39d5){try{_0x123439(_0x25532e['throw'](_0x5c39d5));}catch(_0x24e2cd){_0x557cfd(_0x24e2cd);}}function _0x123439(_0x3208d1){_0x3208d1['done']?_0x500ae5(_0x3208d1['value']):_0x172889(_0x3208d1['value'])['then'](_0x522302,_0x3401a1);}_0x123439((_0x25532e=_0x25532e['apply'](_0x5efb31,_0x213af3||[]))['next']());});};class AccountService{constructor(){}['get'](_0x1522eb,_0x5c9b66){return __awaiter(this,arguments,void 0,function*(_0x50fe7d,_0x2929d1,_0x4f59e7={}){let _0x15bb2e=_0x4f59e7['baseUri'];_0x15bb2e=_0x15bb2e+'/Account/'+_0x2929d1+'/';const _0x2c7e24=yield Fetch['get'](_0x15bb2e,_0x50fe7d);if(_0x2c7e24['status']>0xc7&&_0x2c7e24['status']<0x12c){const _0x5151f1=yield _0x2c7e24['json']();return new SuccessfulAccountResponse(_0x5151f1);}if(_0x2c7e24['bodyUsed']){const _0x50d428=yield _0x2c7e24['json']();return new FailedAccountResponse(_0x50d428);}const _0x285dc0={'type':'','status':_0x2c7e24['status'],'title':'','instance':'','errors':{}};return new FailedAccountResponse(_0x285dc0);});}}
|
|
6
|
-
|
|
7
|
-
class AdminClient{constructor(){this['baseUri']='https://admin.searchability.dev',this['Accounts']=new AccountService();}}
|
|
8
|
-
|
|
9
|
-
export { AdminClient };
|