@opexa/portal-sdk 0.0.111 → 0.0.113
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.
- package/README.md +1622 -1622
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +24 -23
- package/dist/index.mjs.map +1 -1
- package/dist/services/types.d.ts +2 -1
- package/dist/services/utils.d.ts +1 -1
- package/package.json +81 -81
package/dist/index.mjs
CHANGED
|
@@ -994,7 +994,7 @@ const kt = o`
|
|
|
994
994
|
}
|
|
995
995
|
}
|
|
996
996
|
}
|
|
997
|
-
`,
|
|
997
|
+
`, Nt = o`
|
|
998
998
|
mutation ResetPassword($input: ResetPasswordInput!, $verificationCode: String) {
|
|
999
999
|
resetPassword(input: $input, verificationCode: $verificationCode) {
|
|
1000
1000
|
... on AccountNotFoundError {
|
|
@@ -1005,7 +1005,7 @@ const kt = o`
|
|
|
1005
1005
|
}
|
|
1006
1006
|
}
|
|
1007
1007
|
}
|
|
1008
|
-
`,
|
|
1008
|
+
`, vt = o`
|
|
1009
1009
|
mutation DeleteMemberAccount($input: DeleteMemberAccountInput!) {
|
|
1010
1010
|
deleteMemberAccount(input: $input)
|
|
1011
1011
|
}
|
|
@@ -1388,6 +1388,7 @@ function l(i) {
|
|
|
1388
1388
|
return {
|
|
1389
1389
|
name: i,
|
|
1390
1390
|
message: {
|
|
1391
|
+
RewardAlreadyExpiredError: "Reward is either expired or no longer available",
|
|
1391
1392
|
AccountNameNotAvailableError: "Username is no longer available",
|
|
1392
1393
|
AccountNotFoundError: "Account does not exist",
|
|
1393
1394
|
AccountNotVerifiedError: "Account is not verified",
|
|
@@ -1490,7 +1491,7 @@ class ta {
|
|
|
1490
1491
|
} : t;
|
|
1491
1492
|
}
|
|
1492
1493
|
async deleteMemberAccount(e) {
|
|
1493
|
-
const t = await this.client.request(
|
|
1494
|
+
const t = await this.client.request(vt, e);
|
|
1494
1495
|
return t.ok ? t.data.deleteMemberAccount ? {
|
|
1495
1496
|
ok: !0
|
|
1496
1497
|
} : {
|
|
@@ -1503,7 +1504,7 @@ class ta {
|
|
|
1503
1504
|
}
|
|
1504
1505
|
async resetPassword(e) {
|
|
1505
1506
|
const t = await this.client.request(
|
|
1506
|
-
|
|
1507
|
+
Nt,
|
|
1507
1508
|
e
|
|
1508
1509
|
);
|
|
1509
1510
|
return t.ok ? t.data.resetPassword ? {
|
|
@@ -1808,15 +1809,15 @@ class ra {
|
|
|
1808
1809
|
} : e;
|
|
1809
1810
|
}
|
|
1810
1811
|
async games(e) {
|
|
1811
|
-
var r, s, m, d, p, f, w, u, k, C, _, T, M, D, h, R,
|
|
1812
|
+
var r, s, m, d, p, f, w, u, k, C, _, T, M, D, h, R, N, A, v, I, G, P, S, W;
|
|
1812
1813
|
const t = new URLSearchParams();
|
|
1813
|
-
e != null && e.first && t.set("first", e.first.toString()), e != null && e.after && t.set("after", e.after), e != null && e.search && t.set("search", e.search), (s = (r = e == null ? void 0 : e.filter) == null ? void 0 : r.type) != null && s.equal && t.set("filter[type][eq]", e.filter.type.equal), (d = (m = e == null ? void 0 : e.filter) == null ? void 0 : m.type) != null && d.notEqual && t.set("filter[type][neq]", e.filter.type.notEqual), (f = (p = e == null ? void 0 : e.filter) == null ? void 0 : p.type) != null && f.in && t.set("filter[type][in]", e.filter.type.in.join(",")), (u = (w = e == null ? void 0 : e.filter) == null ? void 0 : w.type) != null && u.notIn && t.set("filter[type][nin]", e.filter.type.notIn.join(",")), (C = (k = e == null ? void 0 : e.filter) == null ? void 0 : k.provider) != null && C.equal && t.set("filter[provider][eq]", e.filter.provider.equal), (T = (_ = e == null ? void 0 : e.filter) == null ? void 0 : _.provider) != null && T.notEqual && t.set("filter[provider][neq]", e.filter.provider.notEqual), (D = (M = e == null ? void 0 : e.filter) == null ? void 0 : M.provider) != null && D.in && t.set("filter[provider][in]", e.filter.provider.in.join(",")), (R = (h = e == null ? void 0 : e.filter) == null ? void 0 : h.provider) != null && R.notIn && t.set("filter[provider][nin]", e.filter.provider.notIn.join(",")), (A = (
|
|
1814
|
+
e != null && e.first && t.set("first", e.first.toString()), e != null && e.after && t.set("after", e.after), e != null && e.search && t.set("search", e.search), (s = (r = e == null ? void 0 : e.filter) == null ? void 0 : r.type) != null && s.equal && t.set("filter[type][eq]", e.filter.type.equal), (d = (m = e == null ? void 0 : e.filter) == null ? void 0 : m.type) != null && d.notEqual && t.set("filter[type][neq]", e.filter.type.notEqual), (f = (p = e == null ? void 0 : e.filter) == null ? void 0 : p.type) != null && f.in && t.set("filter[type][in]", e.filter.type.in.join(",")), (u = (w = e == null ? void 0 : e.filter) == null ? void 0 : w.type) != null && u.notIn && t.set("filter[type][nin]", e.filter.type.notIn.join(",")), (C = (k = e == null ? void 0 : e.filter) == null ? void 0 : k.provider) != null && C.equal && t.set("filter[provider][eq]", e.filter.provider.equal), (T = (_ = e == null ? void 0 : e.filter) == null ? void 0 : _.provider) != null && T.notEqual && t.set("filter[provider][neq]", e.filter.provider.notEqual), (D = (M = e == null ? void 0 : e.filter) == null ? void 0 : M.provider) != null && D.in && t.set("filter[provider][in]", e.filter.provider.in.join(",")), (R = (h = e == null ? void 0 : e.filter) == null ? void 0 : h.provider) != null && R.notIn && t.set("filter[provider][nin]", e.filter.provider.notIn.join(",")), (A = (N = e == null ? void 0 : e.filter) == null ? void 0 : N.tags) != null && A.equal && t.set("filter[tags][eq]", e.filter.tags.equal.toLowerCase()), (I = (v = e == null ? void 0 : e.filter) == null ? void 0 : v.tags) != null && I.notEqual && t.set("filter[tags][neq]", e.filter.tags.notEqual.toLowerCase()), (P = (G = e == null ? void 0 : e.filter) == null ? void 0 : G.tags) != null && P.in && t.set(
|
|
1814
1815
|
"filter[tags][in]",
|
|
1815
1816
|
e.filter.tags.in.map((E) => E.toLowerCase()).join(",")
|
|
1816
1817
|
), (W = (S = e == null ? void 0 : e.filter) == null ? void 0 : S.tags) != null && W.notIn && t.set(
|
|
1817
1818
|
"filter[tags][nin]",
|
|
1818
1819
|
e.filter.tags.notIn.map((E) => E.toLowerCase()).join(",")
|
|
1819
|
-
);
|
|
1820
|
+
), e != null && e.sort && t.set("sort[order]", e.sort);
|
|
1820
1821
|
const a = await this.getJson("/games", t);
|
|
1821
1822
|
return a.ok ? {
|
|
1822
1823
|
ok: !0,
|
|
@@ -2323,7 +2324,7 @@ function U(i, e) {
|
|
|
2323
2324
|
const t = Pe(i);
|
|
2324
2325
|
return t.setMinutes(t.getMinutes() + e), t;
|
|
2325
2326
|
}
|
|
2326
|
-
function
|
|
2327
|
+
function Ne(i, e) {
|
|
2327
2328
|
return i.getTime() > e.getTime();
|
|
2328
2329
|
}
|
|
2329
2330
|
class da {
|
|
@@ -2344,13 +2345,13 @@ class da {
|
|
|
2344
2345
|
}
|
|
2345
2346
|
get(e) {
|
|
2346
2347
|
const t = this.cache[e];
|
|
2347
|
-
return !t ||
|
|
2348
|
+
return !t || Ne(/* @__PURE__ */ new Date(), t.validUntil) ? null : t.value;
|
|
2348
2349
|
}
|
|
2349
2350
|
}
|
|
2350
2351
|
function ua(i, e, t) {
|
|
2351
2352
|
return i < e ? e : i > t ? t : i;
|
|
2352
2353
|
}
|
|
2353
|
-
function
|
|
2354
|
+
function ve(i) {
|
|
2354
2355
|
return Object.prototype.toString.call(i) === "[object Object]" && Object(i) === i;
|
|
2355
2356
|
}
|
|
2356
2357
|
function pa(i) {
|
|
@@ -2358,7 +2359,7 @@ function pa(i) {
|
|
|
2358
2359
|
function t(a, r = []) {
|
|
2359
2360
|
for (const s in a) {
|
|
2360
2361
|
const m = a[s];
|
|
2361
|
-
|
|
2362
|
+
ve(m) ? t(m, [...r, s]) : Array.isArray(m) ? t(fa(m), [...r, s]) : e.push({
|
|
2362
2363
|
key: [...r, s],
|
|
2363
2364
|
value: m
|
|
2364
2365
|
});
|
|
@@ -2663,7 +2664,7 @@ class ha {
|
|
|
2663
2664
|
try {
|
|
2664
2665
|
let t = JSON.parse(e), a = /* @__PURE__ */ new Date();
|
|
2665
2666
|
const r = new Date(t.accessTokenExpiresAt), s = new Date(t.refreshTokenExpiresAt);
|
|
2666
|
-
if (
|
|
2667
|
+
if (Ne(a, s))
|
|
2667
2668
|
return this.logger.warn("Session expired. Logging out.."), window.localStorage.removeItem(this.storageKey), {
|
|
2668
2669
|
ok: !1,
|
|
2669
2670
|
error: {
|
|
@@ -2671,7 +2672,7 @@ class ha {
|
|
|
2671
2672
|
message: "Session expired."
|
|
2672
2673
|
}
|
|
2673
2674
|
};
|
|
2674
|
-
if (
|
|
2675
|
+
if (Ne(a, r)) {
|
|
2675
2676
|
this.logger.info("Refreshing session..."), this.refreshing = !0;
|
|
2676
2677
|
const m = await this.authService.refreshSession(t.refreshToken);
|
|
2677
2678
|
if (this.refreshing = !1, !m.ok)
|
|
@@ -2731,12 +2732,12 @@ function b(i) {
|
|
|
2731
2732
|
for (const t in i) {
|
|
2732
2733
|
const a = i[t];
|
|
2733
2734
|
if (a !== null && a !== void 0) {
|
|
2734
|
-
if (
|
|
2735
|
+
if (ve(a)) {
|
|
2735
2736
|
e[t] = b(a);
|
|
2736
2737
|
continue;
|
|
2737
2738
|
}
|
|
2738
2739
|
if (Array.isArray(a)) {
|
|
2739
|
-
e[t] = a.map((r) =>
|
|
2740
|
+
e[t] = a.map((r) => ve(r) ? b(r) : r);
|
|
2740
2741
|
continue;
|
|
2741
2742
|
}
|
|
2742
2743
|
e[t] = a;
|
|
@@ -2807,7 +2808,7 @@ class ga {
|
|
|
2807
2808
|
}
|
|
2808
2809
|
/** @deprecated */
|
|
2809
2810
|
platform(e) {
|
|
2810
|
-
var t, a, r, s, m, d, p, f, w, u, k, C, _, T, M, D, h, R,
|
|
2811
|
+
var t, a, r, s, m, d, p, f, w, u, k, C, _, T, M, D, h, R, N, A, v, I, G, P, S, W, E, F, V, H, Y, Q, j, K, z, J, X, Z, ee, te, ae, re, ne, ie, oe, se, me, ce, le, de, ue, pe, fe, we, ye, he, ge, be, Ee, Ae, Se, ke, Ce, _e, Te, Me, We;
|
|
2811
2812
|
return {
|
|
2812
2813
|
timezone: e.timezone,
|
|
2813
2814
|
currency: e.currency,
|
|
@@ -2840,9 +2841,9 @@ class ga {
|
|
|
2840
2841
|
maximumAmount: n((R = e.mayaDepositGatewaySettings) == null ? void 0 : R.maximumAmount)
|
|
2841
2842
|
},
|
|
2842
2843
|
mayaApp: {
|
|
2843
|
-
androidEnabled: ((
|
|
2844
|
+
androidEnabled: ((N = e.mayaAppDepositGatewaySettings) == null ? void 0 : N.androidEnabled) ?? !1,
|
|
2844
2845
|
iosEnabled: ((A = e.mayaAppDepositGatewaySettings) == null ? void 0 : A.iosEnabled) ?? !1,
|
|
2845
|
-
webEnabled: ((
|
|
2846
|
+
webEnabled: ((v = e.mayaAppDepositGatewaySettings) == null ? void 0 : v.webEnabled) ?? !1,
|
|
2846
2847
|
mobileWebEnabled: ((I = e.mayaAppDepositGatewaySettings) == null ? void 0 : I.mobileWebEnabled) ?? !1,
|
|
2847
2848
|
minimumAmount: n((G = e.mayaAppDepositGatewaySettings) == null ? void 0 : G.minimumAmount),
|
|
2848
2849
|
maximumAmount: n((P = e.mayaAppDepositGatewaySettings) == null ? void 0 : P.maximumAmount)
|
|
@@ -2934,7 +2935,7 @@ class ga {
|
|
|
2934
2935
|
};
|
|
2935
2936
|
}
|
|
2936
2937
|
paymentSettings(e) {
|
|
2937
|
-
var t, a, r, s, m, d, p, f, w, u, k, C, _, T, M, D, h, R,
|
|
2938
|
+
var t, a, r, s, m, d, p, f, w, u, k, C, _, T, M, D, h, R, N, A, v, I, G, P, S, W, E, F, V, H, Y, Q, j, K, z, J, X, Z, ee, te, ae, re, ne, ie, oe, se, me, ce, le, de, ue, pe, fe, we, ye, he, ge, be, Ee, Ae, Se, ke, Ce, _e, Te, Me;
|
|
2938
2939
|
return {
|
|
2939
2940
|
minimumFirstDepositAmount: n(e.minimumFirstDepositAmount),
|
|
2940
2941
|
restrictWithdrawalsToVerifiedMembers: e.restrictWithdrawalsToVerifiedMembers,
|
|
@@ -2964,9 +2965,9 @@ class ga {
|
|
|
2964
2965
|
maximumAmount: n((R = e.mayaDepositGatewaySettings) == null ? void 0 : R.maximumAmount)
|
|
2965
2966
|
},
|
|
2966
2967
|
mayaApp: {
|
|
2967
|
-
androidEnabled: ((
|
|
2968
|
+
androidEnabled: ((N = e.mayaAppDepositGatewaySettings) == null ? void 0 : N.androidEnabled) ?? !1,
|
|
2968
2969
|
iosEnabled: ((A = e.mayaAppDepositGatewaySettings) == null ? void 0 : A.iosEnabled) ?? !1,
|
|
2969
|
-
webEnabled: ((
|
|
2970
|
+
webEnabled: ((v = e.mayaAppDepositGatewaySettings) == null ? void 0 : v.webEnabled) ?? !1,
|
|
2970
2971
|
mobileWebEnabled: ((I = e.mayaAppDepositGatewaySettings) == null ? void 0 : I.mobileWebEnabled) ?? !1,
|
|
2971
2972
|
minimumAmount: n((G = e.mayaAppDepositGatewaySettings) == null ? void 0 : G.minimumAmount),
|
|
2972
2973
|
maximumAmount: n((P = e.mayaAppDepositGatewaySettings) == null ? void 0 : P.maximumAmount)
|
|
@@ -3428,7 +3429,7 @@ class Aa {
|
|
|
3428
3429
|
"Platform-Code": r
|
|
3429
3430
|
}
|
|
3430
3431
|
}
|
|
3431
|
-
}, R = new ia(new B(_, h)),
|
|
3432
|
+
}, R = new ia(new B(_, h)), N = new na(new B(C, h)), A = new la(new B(f, h)), v = new ta(new B(u, h)), I = new sa(new B(w, h)), G = new oa(new B(k, h)), P = new ca(new B(T, h)), S = new aa({
|
|
3432
3433
|
url: p,
|
|
3433
3434
|
platform: r
|
|
3434
3435
|
}), W = new ha({
|
|
@@ -3436,7 +3437,7 @@ class Aa {
|
|
|
3436
3437
|
authService: S,
|
|
3437
3438
|
walletService: A
|
|
3438
3439
|
});
|
|
3439
|
-
this.authService = S, this.gameService = R, this.fileService =
|
|
3440
|
+
this.authService = S, this.gameService = R, this.fileService = N, this.walletService = A, this.accountService = v, this.reportService = I, this.portalService = G, this.triggerService = P, this.sessionManager = W, this.cmsPortalService = D, this.cache = new da();
|
|
3440
3441
|
}
|
|
3441
3442
|
get authMiddleware() {
|
|
3442
3443
|
return async (e) => {
|