@opexa/portal-sdk 0.0.76 → 0.0.78
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/dist/index.js +15 -27
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +49 -69
- package/dist/index.mjs.map +1 -1
- package/dist/sdk/sdk.d.ts +2 -2
- package/dist/sdk/types.d.ts +1 -3
- package/dist/services/queries.d.ts +1 -1
- package/dist/services/report.service.d.ts +2 -2
- package/dist/services/types.d.ts +3 -8
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -629,7 +629,7 @@ const L = i`
|
|
|
629
629
|
...PromoFragment
|
|
630
630
|
}
|
|
631
631
|
}
|
|
632
|
-
`,
|
|
632
|
+
`, Ee = i`
|
|
633
633
|
${L}
|
|
634
634
|
|
|
635
635
|
fragment CashbackFragment on Cashback {
|
|
@@ -647,7 +647,7 @@ const L = i`
|
|
|
647
647
|
dateTimeLastUpdated
|
|
648
648
|
}
|
|
649
649
|
`, Je = i`
|
|
650
|
-
${
|
|
650
|
+
${Ee}
|
|
651
651
|
|
|
652
652
|
query Cashbacks {
|
|
653
653
|
cashbacks {
|
|
@@ -684,7 +684,7 @@ const L = i`
|
|
|
684
684
|
}
|
|
685
685
|
}
|
|
686
686
|
`, Xe = i`
|
|
687
|
-
${
|
|
687
|
+
${Ee}
|
|
688
688
|
|
|
689
689
|
query CashbackBonuses {
|
|
690
690
|
cashbackBonuses {
|
|
@@ -1107,34 +1107,22 @@ const et = i`
|
|
|
1107
1107
|
}
|
|
1108
1108
|
}
|
|
1109
1109
|
}
|
|
1110
|
-
`,
|
|
1111
|
-
query
|
|
1110
|
+
`, Et = i`
|
|
1111
|
+
query ReferralCommission {
|
|
1112
1112
|
member {
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
level3Commission
|
|
1127
|
-
level3ReferralsCount
|
|
1128
|
-
referralCode
|
|
1129
|
-
referralsCount
|
|
1130
|
-
}
|
|
1131
|
-
}
|
|
1132
|
-
}
|
|
1133
|
-
totalCount
|
|
1134
|
-
pageInfo {
|
|
1135
|
-
endCursor
|
|
1136
|
-
hasNextPage
|
|
1137
|
-
}
|
|
1113
|
+
referralCommission {
|
|
1114
|
+
id
|
|
1115
|
+
commission
|
|
1116
|
+
dateTimeCreated
|
|
1117
|
+
dateTimeLastUpdated
|
|
1118
|
+
level1Commission
|
|
1119
|
+
level1ReferralsCount
|
|
1120
|
+
level2Commission
|
|
1121
|
+
level2ReferralsCount
|
|
1122
|
+
level3Commission
|
|
1123
|
+
level3ReferralsCount
|
|
1124
|
+
referralCode
|
|
1125
|
+
referralsCount
|
|
1138
1126
|
}
|
|
1139
1127
|
}
|
|
1140
1128
|
}
|
|
@@ -1194,7 +1182,7 @@ function m(o) {
|
|
|
1194
1182
|
}[o]
|
|
1195
1183
|
};
|
|
1196
1184
|
}
|
|
1197
|
-
class
|
|
1185
|
+
class St {
|
|
1198
1186
|
constructor(e) {
|
|
1199
1187
|
d(this, "client");
|
|
1200
1188
|
this.client = e;
|
|
@@ -1372,7 +1360,7 @@ const V = {
|
|
|
1372
1360
|
429: { name: "HttpTooManyRequests", message: "Too Many Requests" },
|
|
1373
1361
|
500: { name: "HttpInternalServerError", message: "Internal Server Error" }
|
|
1374
1362
|
};
|
|
1375
|
-
class
|
|
1363
|
+
class Ct {
|
|
1376
1364
|
constructor(e) {
|
|
1377
1365
|
d(this, "url");
|
|
1378
1366
|
d(this, "platform");
|
|
@@ -1541,22 +1529,22 @@ class kt {
|
|
|
1541
1529
|
} : e;
|
|
1542
1530
|
}
|
|
1543
1531
|
async games(e) {
|
|
1544
|
-
var a, s, c, u, l, f, w, p, _, v, M, R, N, b, I, D,
|
|
1532
|
+
var a, s, c, u, l, f, w, p, _, v, M, R, N, b, I, D, S, P, $, x, C, G, O, W;
|
|
1545
1533
|
const t = new URLSearchParams();
|
|
1546
|
-
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 = (a = e == null ? void 0 : e.filter) == null ? void 0 : a.type) != null && s.equal && t.set("filter[type][eq]", e.filter.type.equal), (u = (c = e == null ? void 0 : e.filter) == null ? void 0 : c.type) != null && u.notEqual && t.set("filter[type][neq]", e.filter.type.notEqual), (f = (l = e == null ? void 0 : e.filter) == null ? void 0 : l.type) != null && f.in && t.set("filter[type][in]", e.filter.type.in.join(",")), (p = (w = e == null ? void 0 : e.filter) == null ? void 0 : w.type) != null && p.notIn && t.set("filter[type][nin]", e.filter.type.notIn.join(",")), (v = (_ = e == null ? void 0 : e.filter) == null ? void 0 : _.provider) != null && v.equal && t.set("filter[provider][eq]", e.filter.provider.equal), (R = (M = e == null ? void 0 : e.filter) == null ? void 0 : M.provider) != null && R.notEqual && t.set("filter[provider][neq]", e.filter.provider.notEqual), (b = (N = e == null ? void 0 : e.filter) == null ? void 0 : N.provider) != null && b.in && t.set("filter[provider][in]", e.filter.provider.in.join(",")), (D = (I = e == null ? void 0 : e.filter) == null ? void 0 : I.provider) != null && D.notIn && t.set("filter[provider][nin]", e.filter.provider.notIn.join(",")), (P = (
|
|
1534
|
+
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 = (a = e == null ? void 0 : e.filter) == null ? void 0 : a.type) != null && s.equal && t.set("filter[type][eq]", e.filter.type.equal), (u = (c = e == null ? void 0 : e.filter) == null ? void 0 : c.type) != null && u.notEqual && t.set("filter[type][neq]", e.filter.type.notEqual), (f = (l = e == null ? void 0 : e.filter) == null ? void 0 : l.type) != null && f.in && t.set("filter[type][in]", e.filter.type.in.join(",")), (p = (w = e == null ? void 0 : e.filter) == null ? void 0 : w.type) != null && p.notIn && t.set("filter[type][nin]", e.filter.type.notIn.join(",")), (v = (_ = e == null ? void 0 : e.filter) == null ? void 0 : _.provider) != null && v.equal && t.set("filter[provider][eq]", e.filter.provider.equal), (R = (M = e == null ? void 0 : e.filter) == null ? void 0 : M.provider) != null && R.notEqual && t.set("filter[provider][neq]", e.filter.provider.notEqual), (b = (N = e == null ? void 0 : e.filter) == null ? void 0 : N.provider) != null && b.in && t.set("filter[provider][in]", e.filter.provider.in.join(",")), (D = (I = e == null ? void 0 : e.filter) == null ? void 0 : I.provider) != null && D.notIn && t.set("filter[provider][nin]", e.filter.provider.notIn.join(",")), (P = (S = e == null ? void 0 : e.filter) == null ? void 0 : S.tags) != null && P.equal && t.set("filter[tags][eq]", e.filter.tags.equal.toLowerCase()), (x = ($ = e == null ? void 0 : e.filter) == null ? void 0 : $.tags) != null && x.notEqual && t.set("filter[tags][neq]", e.filter.tags.notEqual.toLowerCase()), (G = (C = e == null ? void 0 : e.filter) == null ? void 0 : C.tags) != null && G.in && t.set(
|
|
1547
1535
|
"filter[tags][in]",
|
|
1548
|
-
e.filter.tags.in.map((
|
|
1536
|
+
e.filter.tags.in.map((E) => E.toLowerCase()).join(",")
|
|
1549
1537
|
), (W = (O = e == null ? void 0 : e.filter) == null ? void 0 : O.tags) != null && W.notIn && t.set(
|
|
1550
1538
|
"filter[tags][nin]",
|
|
1551
|
-
e.filter.tags.notIn.map((
|
|
1539
|
+
e.filter.tags.notIn.map((E) => E.toLowerCase()).join(",")
|
|
1552
1540
|
);
|
|
1553
1541
|
const r = await this.getJson("/games", t);
|
|
1554
1542
|
return r.ok ? {
|
|
1555
1543
|
ok: !0,
|
|
1556
1544
|
data: {
|
|
1557
|
-
edges: r.data.data.map((
|
|
1558
|
-
node:
|
|
1559
|
-
cursor:
|
|
1545
|
+
edges: r.data.data.map((E) => ({
|
|
1546
|
+
node: E,
|
|
1547
|
+
cursor: E.cursor
|
|
1560
1548
|
})),
|
|
1561
1549
|
totalCount: r.data.totalCount ?? 0,
|
|
1562
1550
|
pageInfo: {
|
|
@@ -1728,9 +1716,9 @@ class Mt {
|
|
|
1728
1716
|
);
|
|
1729
1717
|
return t.ok ? { ok: t.ok, data: t.data.member.referrals } : t;
|
|
1730
1718
|
}
|
|
1731
|
-
async
|
|
1732
|
-
const
|
|
1733
|
-
return
|
|
1719
|
+
async referralCommission() {
|
|
1720
|
+
const e = await this.client.request(Et);
|
|
1721
|
+
return e.ok ? { ok: e.ok, data: e.data.member.referralCommission } : e;
|
|
1734
1722
|
}
|
|
1735
1723
|
}
|
|
1736
1724
|
class Rt {
|
|
@@ -2039,7 +2027,7 @@ async function y(o) {
|
|
|
2039
2027
|
const e = new TextEncoder().encode(o), t = await crypto.subtle.digest("SHA-256", e);
|
|
2040
2028
|
return Array.from(new Uint8Array(t)).map((s) => s.toString(16).padStart(2, "0")).join("");
|
|
2041
2029
|
}
|
|
2042
|
-
class
|
|
2030
|
+
class Se {
|
|
2043
2031
|
constructor(e) {
|
|
2044
2032
|
d(this, "enabled");
|
|
2045
2033
|
this.enabled = (e == null ? void 0 : e.enabled) ?? !0;
|
|
@@ -2071,7 +2059,7 @@ function B(o, e) {
|
|
|
2071
2059
|
function we(o, e) {
|
|
2072
2060
|
return o.getTime() > e.getTime();
|
|
2073
2061
|
}
|
|
2074
|
-
function
|
|
2062
|
+
function Ce(o) {
|
|
2075
2063
|
return new Promise((e) => {
|
|
2076
2064
|
setTimeout(e, o);
|
|
2077
2065
|
});
|
|
@@ -2085,7 +2073,7 @@ function ye(o, e) {
|
|
|
2085
2073
|
} = e;
|
|
2086
2074
|
async function s(c, u) {
|
|
2087
2075
|
const l = u ?? a, f = await o(...c);
|
|
2088
|
-
return t(f) ? f : l > 1 ? (await
|
|
2076
|
+
return t(f) ? f : l > 1 ? (await Ce(r * ((a - l) / 2)), s(c, l - 1)) : f;
|
|
2089
2077
|
}
|
|
2090
2078
|
return async (...c) => await s(c);
|
|
2091
2079
|
}
|
|
@@ -2100,7 +2088,7 @@ class $t {
|
|
|
2100
2088
|
d(this, "authService");
|
|
2101
2089
|
d(this, "walletService");
|
|
2102
2090
|
d(this, "_refreshing", !1);
|
|
2103
|
-
this.authService = e.authService, this.walletService = e.walletService, this.logger = new
|
|
2091
|
+
this.authService = e.authService, this.walletService = e.walletService, this.logger = new Se({
|
|
2104
2092
|
enabled: e.logs ?? !1
|
|
2105
2093
|
});
|
|
2106
2094
|
}
|
|
@@ -2219,7 +2207,7 @@ class $t {
|
|
|
2219
2207
|
data: null
|
|
2220
2208
|
};
|
|
2221
2209
|
if (this.refreshing)
|
|
2222
|
-
return await
|
|
2210
|
+
return await Ce(1e3), await this.get();
|
|
2223
2211
|
const e = window.localStorage.getItem(this.storageKey);
|
|
2224
2212
|
if (!e)
|
|
2225
2213
|
return {
|
|
@@ -2367,7 +2355,7 @@ class xt {
|
|
|
2367
2355
|
return g(t);
|
|
2368
2356
|
}
|
|
2369
2357
|
platform(e) {
|
|
2370
|
-
var t, r, a, s, c, u, l, f, w, p, _, v, M, R, N, b, I, D,
|
|
2358
|
+
var t, r, a, s, c, u, l, f, w, p, _, v, M, R, N, b, I, D, S, P, $, x, C, G, O, W, E, Q, K, J, z, X, Z, ee, te, re, ae, oe, ne, ie, se, ce, de, me, ue, le, pe, fe, he;
|
|
2371
2359
|
return {
|
|
2372
2360
|
paymentSettings: {
|
|
2373
2361
|
minimumFirstDepositAmount: n(e.minimumFirstDepositAmount),
|
|
@@ -2398,11 +2386,11 @@ class xt {
|
|
|
2398
2386
|
maximumAmount: n((D = e.mayaDepositGatewaySettings) == null ? void 0 : D.maximumAmount)
|
|
2399
2387
|
},
|
|
2400
2388
|
mayaApp: {
|
|
2401
|
-
androidEnabled: ((
|
|
2389
|
+
androidEnabled: ((S = e.mayaAppDepositGatewaySettings) == null ? void 0 : S.androidEnabled) ?? !1,
|
|
2402
2390
|
iosEnabled: ((P = e.mayaAppDepositGatewaySettings) == null ? void 0 : P.iosEnabled) ?? !1,
|
|
2403
2391
|
webEnabled: (($ = e.mayaAppDepositGatewaySettings) == null ? void 0 : $.webEnabled) ?? !1,
|
|
2404
2392
|
mobileWebEnabled: ((x = e.mayaAppDepositGatewaySettings) == null ? void 0 : x.mobileWebEnabled) ?? !1,
|
|
2405
|
-
minimumAmount: n((
|
|
2393
|
+
minimumAmount: n((C = e.mayaAppDepositGatewaySettings) == null ? void 0 : C.minimumAmount),
|
|
2406
2394
|
maximumAmount: n((G = e.mayaAppDepositGatewaySettings) == null ? void 0 : G.maximumAmount)
|
|
2407
2395
|
}
|
|
2408
2396
|
},
|
|
@@ -2410,7 +2398,7 @@ class xt {
|
|
|
2410
2398
|
bank: {
|
|
2411
2399
|
androidEnabled: ((O = e.bankWithdrawalGatewaySettings) == null ? void 0 : O.androidEnabled) ?? !1,
|
|
2412
2400
|
iosEnabled: ((W = e.bankWithdrawalGatewaySettings) == null ? void 0 : W.iosEnabled) ?? !1,
|
|
2413
|
-
webEnabled: ((
|
|
2401
|
+
webEnabled: ((E = e.bankWithdrawalGatewaySettings) == null ? void 0 : E.webEnabled) ?? !1,
|
|
2414
2402
|
mobileWebEnabled: ((Q = e.bankWithdrawalGatewaySettings) == null ? void 0 : Q.mobileWebEnabled) ?? !1,
|
|
2415
2403
|
minimumAmount: n((K = e.bankWithdrawalGatewaySettings) == null ? void 0 : K.minimumAmount),
|
|
2416
2404
|
maximumAmount: n((J = e.bankWithdrawalGatewaySettings) == null ? void 0 : J.maximumAmount)
|
|
@@ -2803,7 +2791,7 @@ class qt {
|
|
|
2803
2791
|
} = e, u = s === "production";
|
|
2804
2792
|
this.transformer = new xt({
|
|
2805
2793
|
environment: s
|
|
2806
|
-
}), this.logger = new
|
|
2794
|
+
}), this.logger = new Se({
|
|
2807
2795
|
enabled: c ?? !1
|
|
2808
2796
|
});
|
|
2809
2797
|
const l = u ? "https://auth.opexa.io" : "https://auth.development.opexa.io", f = u ? "https://wallet.opexa.io/graphql" : "https://wallet.development.opexa.io/graphql", w = u ? "https://report.opexa.io/graphql" : "https://report.development.opexa.io/graphql", p = u ? "https://account.opexa.io/graphql" : "https://account.development.opexa.io/graphql", _ = u ? "https://portal.opexa.io/graphql" : "https://portal.development.opexa.io/graphql", v = u ? "https://file.opexa.io/graphql" : "https://file.development.opexa.io/graphql", M = u ? "https://game.opexa.io/graphql" : "https://game.development.opexa.io/graphql", R = u ? "https://portal-api.opexacms.io/v1" : "https://portal-api.development.opexacms.io/v1", N = new kt({
|
|
@@ -2818,15 +2806,15 @@ class qt {
|
|
|
2818
2806
|
"Platform-Code": a
|
|
2819
2807
|
}
|
|
2820
2808
|
}
|
|
2821
|
-
}, I = new _t(new U(M, b)), D = new Tt(new U(v, b)),
|
|
2809
|
+
}, I = new _t(new U(M, b)), D = new Tt(new U(v, b)), S = new Nt(new U(f, b)), P = new St(new U(p, b)), $ = new Mt(new U(w, b)), x = new vt(new U(_, b)), C = new Ct({
|
|
2822
2810
|
url: l,
|
|
2823
2811
|
platform: a
|
|
2824
2812
|
}), G = new $t({
|
|
2825
2813
|
logs: c,
|
|
2826
|
-
authService:
|
|
2827
|
-
walletService:
|
|
2814
|
+
authService: C,
|
|
2815
|
+
walletService: S
|
|
2828
2816
|
});
|
|
2829
|
-
this.authService =
|
|
2817
|
+
this.authService = C, this.gameService = I, this.fileService = D, this.walletService = S, this.accountService = P, this.reportService = $, this.portalService = x, this.sessionManager = G, this.cmsPortalService = N;
|
|
2830
2818
|
}
|
|
2831
2819
|
get authMiddleware() {
|
|
2832
2820
|
return async (e) => {
|
|
@@ -3535,20 +3523,12 @@ class qt {
|
|
|
3535
3523
|
}
|
|
3536
3524
|
} : t;
|
|
3537
3525
|
}
|
|
3538
|
-
async
|
|
3539
|
-
const
|
|
3540
|
-
return
|
|
3526
|
+
async referralCommission() {
|
|
3527
|
+
const e = await this.reportService.referralCommission();
|
|
3528
|
+
return e.ok ? {
|
|
3541
3529
|
ok: !0,
|
|
3542
|
-
data:
|
|
3543
|
-
|
|
3544
|
-
...this.transformer.transform.referralCommission(a),
|
|
3545
|
-
cursor: r
|
|
3546
|
-
})),
|
|
3547
|
-
totalCount: t.data.totalCount,
|
|
3548
|
-
hasNextPage: t.data.pageInfo.hasNextPage,
|
|
3549
|
-
endCursor: t.data.pageInfo.endCursor ?? void 0
|
|
3550
|
-
}
|
|
3551
|
-
} : t;
|
|
3530
|
+
data: e.data ? this.transformer.transform.referralCommission(e.data) : null
|
|
3531
|
+
} : e;
|
|
3552
3532
|
}
|
|
3553
3533
|
}
|
|
3554
3534
|
const Gt = [
|