@opexa/portal-sdk 0.0.153 → 0.0.154
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 +1624 -1624
- package/dist/index.js +14 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +181 -172
- package/dist/index.mjs.map +1 -1
- package/dist/sdk/const.d.ts +3 -1
- package/dist/sdk/sdk.d.ts +3 -3
- package/package.json +81 -81
package/dist/index.mjs
CHANGED
|
@@ -16,12 +16,12 @@ const Q = {
|
|
|
16
16
|
function i(o, ...e) {
|
|
17
17
|
let t = "";
|
|
18
18
|
for (const [r, a] of o.entries()) {
|
|
19
|
-
const
|
|
20
|
-
t = `${t}${a}${
|
|
19
|
+
const s = e.at(r) ?? "";
|
|
20
|
+
t = `${t}${a}${s}`;
|
|
21
21
|
}
|
|
22
22
|
return t.trim();
|
|
23
23
|
}
|
|
24
|
-
const
|
|
24
|
+
const Ie = i`
|
|
25
25
|
fragment FileFragment on File {
|
|
26
26
|
id
|
|
27
27
|
url
|
|
@@ -29,7 +29,7 @@ const Me = i`
|
|
|
29
29
|
dateTimeCreated
|
|
30
30
|
}
|
|
31
31
|
`, Ke = i`
|
|
32
|
-
${
|
|
32
|
+
${Ie}
|
|
33
33
|
|
|
34
34
|
query File($id: ObjectId!) {
|
|
35
35
|
node(id: $id) {
|
|
@@ -543,7 +543,7 @@ const Me = i`
|
|
|
543
543
|
}
|
|
544
544
|
}
|
|
545
545
|
}
|
|
546
|
-
`,
|
|
546
|
+
`, ht = i`
|
|
547
547
|
mutation CreateAIOOnlineBankDeposit($input: CreateAIOOnlineBankDepositInput!) {
|
|
548
548
|
createAIOOnlineBankDeposit(input: $input) {
|
|
549
549
|
... on DepositPromoMaximumAmountExceededError {
|
|
@@ -572,7 +572,7 @@ const Me = i`
|
|
|
572
572
|
}
|
|
573
573
|
}
|
|
574
574
|
}
|
|
575
|
-
`,
|
|
575
|
+
`, yt = i`
|
|
576
576
|
query Deposit($id: ObjectId!) {
|
|
577
577
|
node(id: $id) {
|
|
578
578
|
... on GCashDeposit {
|
|
@@ -703,8 +703,8 @@ const Me = i`
|
|
|
703
703
|
}
|
|
704
704
|
}
|
|
705
705
|
}
|
|
706
|
-
`,
|
|
707
|
-
${
|
|
706
|
+
`, Ne = i`
|
|
707
|
+
${Ie}
|
|
708
708
|
|
|
709
709
|
fragment PromoFragment on Promo {
|
|
710
710
|
id
|
|
@@ -725,7 +725,7 @@ const Me = i`
|
|
|
725
725
|
dateTimeLastUpdated
|
|
726
726
|
}
|
|
727
727
|
`, Ct = i`
|
|
728
|
-
${
|
|
728
|
+
${Ne}
|
|
729
729
|
|
|
730
730
|
query Promos {
|
|
731
731
|
promos {
|
|
@@ -733,7 +733,7 @@ const Me = i`
|
|
|
733
733
|
}
|
|
734
734
|
}
|
|
735
735
|
`, bt = i`
|
|
736
|
-
${
|
|
736
|
+
${Ne}
|
|
737
737
|
|
|
738
738
|
query AvailablePromos($filter: PromoFilterInput) {
|
|
739
739
|
availablePromos(filter: $filter) {
|
|
@@ -789,7 +789,7 @@ const Me = i`
|
|
|
789
789
|
}
|
|
790
790
|
}
|
|
791
791
|
`, He = i`
|
|
792
|
-
${
|
|
792
|
+
${Ie}
|
|
793
793
|
|
|
794
794
|
fragment CashbackFragment on Cashback {
|
|
795
795
|
id
|
|
@@ -816,7 +816,7 @@ const Me = i`
|
|
|
816
816
|
}
|
|
817
817
|
}
|
|
818
818
|
`, Rt = i`
|
|
819
|
-
${
|
|
819
|
+
${Ne}
|
|
820
820
|
|
|
821
821
|
query Bonus {
|
|
822
822
|
bonus {
|
|
@@ -845,7 +845,7 @@ const Me = i`
|
|
|
845
845
|
}
|
|
846
846
|
}
|
|
847
847
|
`, Dt = i`
|
|
848
|
-
${
|
|
848
|
+
${Ne}
|
|
849
849
|
|
|
850
850
|
query Bonuses {
|
|
851
851
|
bonuses {
|
|
@@ -929,7 +929,7 @@ const Nt = i`
|
|
|
929
929
|
}
|
|
930
930
|
}
|
|
931
931
|
`, Pt = i`
|
|
932
|
-
${
|
|
932
|
+
${Ie}
|
|
933
933
|
|
|
934
934
|
query MemberVerification {
|
|
935
935
|
memberAccount: self {
|
|
@@ -1346,7 +1346,7 @@ const Nt = i`
|
|
|
1346
1346
|
}
|
|
1347
1347
|
}
|
|
1348
1348
|
}
|
|
1349
|
-
`,
|
|
1349
|
+
`, Be = i`
|
|
1350
1350
|
fragment ReferralFragment on Referral {
|
|
1351
1351
|
id
|
|
1352
1352
|
upline {
|
|
@@ -1385,7 +1385,7 @@ const Nt = i`
|
|
|
1385
1385
|
}
|
|
1386
1386
|
}
|
|
1387
1387
|
|
|
1388
|
-
${
|
|
1388
|
+
${Be}
|
|
1389
1389
|
`, er = i`
|
|
1390
1390
|
query UplinesByName($search: String!, $first: Int) {
|
|
1391
1391
|
uplinesByName(search: $search, first: $first) {
|
|
@@ -1393,7 +1393,7 @@ const Nt = i`
|
|
|
1393
1393
|
}
|
|
1394
1394
|
}
|
|
1395
1395
|
|
|
1396
|
-
${
|
|
1396
|
+
${Be}
|
|
1397
1397
|
`, tr = i`
|
|
1398
1398
|
query DownlinesByName($search: String!, $first: Int) {
|
|
1399
1399
|
downlinesByName(search: $search, first: $first) {
|
|
@@ -1401,7 +1401,7 @@ const Nt = i`
|
|
|
1401
1401
|
}
|
|
1402
1402
|
}
|
|
1403
1403
|
|
|
1404
|
-
${
|
|
1404
|
+
${Be}
|
|
1405
1405
|
`, rr = i`
|
|
1406
1406
|
query ReferralCommission {
|
|
1407
1407
|
member {
|
|
@@ -1781,13 +1781,13 @@ class fr {
|
|
|
1781
1781
|
}
|
|
1782
1782
|
}
|
|
1783
1783
|
function g(o, e) {
|
|
1784
|
-
const t =
|
|
1784
|
+
const t = Pe[o] ? Pe[o] : Pe[500];
|
|
1785
1785
|
return {
|
|
1786
1786
|
name: t.name,
|
|
1787
1787
|
message: e ?? t.message
|
|
1788
1788
|
};
|
|
1789
1789
|
}
|
|
1790
|
-
const
|
|
1790
|
+
const Pe = {
|
|
1791
1791
|
400: { name: "HttpBadRequest", message: "Bad Request" },
|
|
1792
1792
|
401: { name: "HttpUnauthorized", message: "Unauthorized" },
|
|
1793
1793
|
403: { name: "HttpForbidden", message: "Forbidden" },
|
|
@@ -1953,10 +1953,10 @@ class wr {
|
|
|
1953
1953
|
body: JSON.stringify(e)
|
|
1954
1954
|
});
|
|
1955
1955
|
if (r.status === 403) {
|
|
1956
|
-
const a = await r.json(),
|
|
1957
|
-
return
|
|
1956
|
+
const a = await r.json(), s = t(a.message);
|
|
1957
|
+
return s ? {
|
|
1958
1958
|
ok: !1,
|
|
1959
|
-
error: l(
|
|
1959
|
+
error: l(s)
|
|
1960
1960
|
} : {
|
|
1961
1961
|
ok: !1,
|
|
1962
1962
|
error: g(r.status, a.message)
|
|
@@ -1974,7 +1974,7 @@ class wr {
|
|
|
1974
1974
|
}
|
|
1975
1975
|
}
|
|
1976
1976
|
}
|
|
1977
|
-
class
|
|
1977
|
+
class hr {
|
|
1978
1978
|
constructor(e) {
|
|
1979
1979
|
d(this, "url");
|
|
1980
1980
|
d(this, "siteId");
|
|
@@ -1989,22 +1989,22 @@ class yr {
|
|
|
1989
1989
|
} : e;
|
|
1990
1990
|
}
|
|
1991
1991
|
async games(e) {
|
|
1992
|
-
var a,
|
|
1992
|
+
var a, s, m, u, c, p, w, f, b, k, T, _, R, D, h, M, I, A, N, P, G, v, E, B, x, W, q, U, $, L, F, H;
|
|
1993
1993
|
const t = new URLSearchParams();
|
|
1994
|
-
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), (
|
|
1994
|
+
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 = (m = e == null ? void 0 : e.filter) == null ? void 0 : m.type) != null && u.notEqual && t.set("filter[type][neq]", e.filter.type.notEqual), (p = (c = e == null ? void 0 : e.filter) == null ? void 0 : c.type) != null && p.in && t.set("filter[type][in]", e.filter.type.in.join(",")), (f = (w = e == null ? void 0 : e.filter) == null ? void 0 : w.type) != null && f.notIn && t.set("filter[type][nin]", e.filter.type.notIn.join(",")), (k = (b = e == null ? void 0 : e.filter) == null ? void 0 : b.provider) != null && k.equal && t.set("filter[provider][eq]", e.filter.provider.equal), (_ = (T = e == null ? void 0 : e.filter) == null ? void 0 : T.provider) != null && _.notEqual && t.set("filter[provider][neq]", e.filter.provider.notEqual), (D = (R = e == null ? void 0 : e.filter) == null ? void 0 : R.provider) != null && D.in && t.set("filter[provider][in]", e.filter.provider.in.join(",")), (M = (h = e == null ? void 0 : e.filter) == null ? void 0 : h.provider) != null && M.notIn && t.set("filter[provider][nin]", e.filter.provider.notIn.join(",")), (A = (I = e == null ? void 0 : e.filter) == null ? void 0 : I.tags) != null && A.equal && t.set("filter[tags][eq]", e.filter.tags.equal.toLowerCase()), (P = (N = e == null ? void 0 : e.filter) == null ? void 0 : N.tags) != null && P.notEqual && t.set("filter[tags][neq]", e.filter.tags.notEqual.toLowerCase()), (v = (G = e == null ? void 0 : e.filter) == null ? void 0 : G.tags) != null && v.in && t.set(
|
|
1995
1995
|
"filter[tags][in]",
|
|
1996
|
-
e.filter.tags.in.map((
|
|
1996
|
+
e.filter.tags.in.map((y) => y.toLowerCase()).join(",")
|
|
1997
1997
|
), (B = (E = e == null ? void 0 : e.filter) == null ? void 0 : E.tags) != null && B.notIn && t.set(
|
|
1998
1998
|
"filter[tags][nin]",
|
|
1999
|
-
e.filter.tags.notIn.map((
|
|
1999
|
+
e.filter.tags.notIn.map((y) => y.toLowerCase()).join(",")
|
|
2000
2000
|
), (W = (x = e == null ? void 0 : e.filter) == null ? void 0 : x.reference) != null && W.equal && t.set("filter[reference][eq]", e.filter.reference.equal), (U = (q = e == null ? void 0 : e.filter) == null ? void 0 : q.reference) != null && U.notEqual && t.set("filter[reference][neq]", e.filter.reference.notEqual), (L = ($ = e == null ? void 0 : e.filter) == null ? void 0 : $.reference) != null && L.in && t.set("filter[reference][in]", e.filter.reference.in.join(",")), (H = (F = e == null ? void 0 : e.filter) == null ? void 0 : F.reference) != null && H.notIn && t.set("filter[reference][nin]", e.filter.reference.notIn.join(",")), e != null && e.sort && t.set("sort[order]", e.sort);
|
|
2001
2001
|
const r = await this.getJson("/v1/games", t);
|
|
2002
2002
|
return r.ok ? {
|
|
2003
2003
|
ok: !0,
|
|
2004
2004
|
data: {
|
|
2005
|
-
edges: r.data.data.map((
|
|
2006
|
-
node:
|
|
2007
|
-
cursor:
|
|
2005
|
+
edges: r.data.data.map((y) => ({
|
|
2006
|
+
node: y,
|
|
2007
|
+
cursor: y.cursor
|
|
2008
2008
|
})),
|
|
2009
2009
|
totalCount: r.data.totalCount ?? 0,
|
|
2010
2010
|
pageInfo: {
|
|
@@ -2015,22 +2015,22 @@ class yr {
|
|
|
2015
2015
|
} : r;
|
|
2016
2016
|
}
|
|
2017
2017
|
async games__next(e) {
|
|
2018
|
-
var a,
|
|
2018
|
+
var a, s, m, u, c, p, w, f, b, k, T, _, R, D, h, M, I, A, N, P, G, v, E, B, x, W, q, U, $, L, F, H;
|
|
2019
2019
|
const t = new URLSearchParams();
|
|
2020
|
-
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), (
|
|
2020
|
+
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 = (m = e == null ? void 0 : e.filter) == null ? void 0 : m.type) != null && u.notEqual && t.set("filter[type][neq]", e.filter.type.notEqual), (p = (c = e == null ? void 0 : e.filter) == null ? void 0 : c.type) != null && p.in && t.set("filter[type][in]", e.filter.type.in.join(",")), (f = (w = e == null ? void 0 : e.filter) == null ? void 0 : w.type) != null && f.notIn && t.set("filter[type][nin]", e.filter.type.notIn.join(",")), (k = (b = e == null ? void 0 : e.filter) == null ? void 0 : b.provider) != null && k.equal && t.set("filter[provider][eq]", e.filter.provider.equal), (_ = (T = e == null ? void 0 : e.filter) == null ? void 0 : T.provider) != null && _.notEqual && t.set("filter[provider][neq]", e.filter.provider.notEqual), (D = (R = e == null ? void 0 : e.filter) == null ? void 0 : R.provider) != null && D.in && t.set("filter[provider][in]", e.filter.provider.in.join(",")), (M = (h = e == null ? void 0 : e.filter) == null ? void 0 : h.provider) != null && M.notIn && t.set("filter[provider][nin]", e.filter.provider.notIn.join(",")), (A = (I = e == null ? void 0 : e.filter) == null ? void 0 : I.tags) != null && A.equal && t.set("filter[tags][eq]", e.filter.tags.equal.toLowerCase()), (P = (N = e == null ? void 0 : e.filter) == null ? void 0 : N.tags) != null && P.notEqual && t.set("filter[tags][neq]", e.filter.tags.notEqual.toLowerCase()), (v = (G = e == null ? void 0 : e.filter) == null ? void 0 : G.tags) != null && v.in && t.set(
|
|
2021
2021
|
"filter[tags][in]",
|
|
2022
|
-
e.filter.tags.in.map((
|
|
2022
|
+
e.filter.tags.in.map((y) => y.toLowerCase()).join(",")
|
|
2023
2023
|
), (B = (E = e == null ? void 0 : e.filter) == null ? void 0 : E.tags) != null && B.notIn && t.set(
|
|
2024
2024
|
"filter[tags][nin]",
|
|
2025
|
-
e.filter.tags.notIn.map((
|
|
2025
|
+
e.filter.tags.notIn.map((y) => y.toLowerCase()).join(",")
|
|
2026
2026
|
), (W = (x = e == null ? void 0 : e.filter) == null ? void 0 : x.reference) != null && W.equal && t.set("filter[reference][eq]", e.filter.reference.equal), (U = (q = e == null ? void 0 : e.filter) == null ? void 0 : q.reference) != null && U.notEqual && t.set("filter[reference][neq]", e.filter.reference.notEqual), (L = ($ = e == null ? void 0 : e.filter) == null ? void 0 : $.reference) != null && L.in && t.set("filter[reference][in]", e.filter.reference.in.join(",")), (H = (F = e == null ? void 0 : e.filter) == null ? void 0 : F.reference) != null && H.notIn && t.set("filter[reference][nin]", e.filter.reference.notIn.join(",")), e != null && e.sort && (t.set("sort[order]", e.sort.order), t.set("sort[context]", e.sort.context.toLowerCase()));
|
|
2027
2027
|
const r = await this.getJson("/v2/games", t);
|
|
2028
2028
|
return r.ok ? {
|
|
2029
2029
|
ok: !0,
|
|
2030
2030
|
data: {
|
|
2031
|
-
edges: r.data.data.map((
|
|
2032
|
-
node:
|
|
2033
|
-
cursor:
|
|
2031
|
+
edges: r.data.data.map((y) => ({
|
|
2032
|
+
node: y,
|
|
2033
|
+
cursor: y.cursor
|
|
2034
2034
|
})),
|
|
2035
2035
|
totalCount: r.data.totalCount ?? 0,
|
|
2036
2036
|
pageInfo: {
|
|
@@ -2078,7 +2078,7 @@ class yr {
|
|
|
2078
2078
|
}
|
|
2079
2079
|
}
|
|
2080
2080
|
}
|
|
2081
|
-
class
|
|
2081
|
+
class yr {
|
|
2082
2082
|
constructor(e) {
|
|
2083
2083
|
d(this, "client");
|
|
2084
2084
|
this.client = e;
|
|
@@ -2389,7 +2389,7 @@ class Cr {
|
|
|
2389
2389
|
}
|
|
2390
2390
|
async deposit(e) {
|
|
2391
2391
|
const t = await this.client.request(
|
|
2392
|
-
|
|
2392
|
+
yt,
|
|
2393
2393
|
e
|
|
2394
2394
|
);
|
|
2395
2395
|
return t.ok ? { ok: t.ok, data: t.data.node } : t;
|
|
@@ -2440,7 +2440,7 @@ class Cr {
|
|
|
2440
2440
|
} : a;
|
|
2441
2441
|
}
|
|
2442
2442
|
async createAIOOnlineBankDeposit(e) {
|
|
2443
|
-
const { reCAPTCHAResponse: t, ...r } = e, a = await this.client.request(
|
|
2443
|
+
const { reCAPTCHAResponse: t, ...r } = e, a = await this.client.request(ht, r, {
|
|
2444
2444
|
headers: {
|
|
2445
2445
|
...t && {
|
|
2446
2446
|
[C]: t
|
|
@@ -2639,14 +2639,14 @@ class Cr {
|
|
|
2639
2639
|
};
|
|
2640
2640
|
}
|
|
2641
2641
|
}
|
|
2642
|
-
function
|
|
2642
|
+
function Oe(o) {
|
|
2643
2643
|
return new Date(o.getTime());
|
|
2644
2644
|
}
|
|
2645
2645
|
function j(o, e) {
|
|
2646
|
-
const t =
|
|
2646
|
+
const t = Oe(o);
|
|
2647
2647
|
return t.setMinutes(t.getMinutes() + e), t;
|
|
2648
2648
|
}
|
|
2649
|
-
function
|
|
2649
|
+
function Ge(o, e) {
|
|
2650
2650
|
return o.getTime() > e.getTime();
|
|
2651
2651
|
}
|
|
2652
2652
|
class br {
|
|
@@ -2667,23 +2667,23 @@ class br {
|
|
|
2667
2667
|
}
|
|
2668
2668
|
get(e) {
|
|
2669
2669
|
const t = this.cache[e];
|
|
2670
|
-
return !t ||
|
|
2670
|
+
return !t || Ge(/* @__PURE__ */ new Date(), t.validUntil) ? null : t.value;
|
|
2671
2671
|
}
|
|
2672
2672
|
}
|
|
2673
2673
|
function kr(o, e, t) {
|
|
2674
2674
|
return o < e ? e : o > t ? t : o;
|
|
2675
2675
|
}
|
|
2676
|
-
function
|
|
2676
|
+
function ve(o) {
|
|
2677
2677
|
return Object.prototype.toString.call(o) === "[object Object]" && Object(o) === o;
|
|
2678
2678
|
}
|
|
2679
2679
|
function Tr(o) {
|
|
2680
2680
|
const e = [];
|
|
2681
2681
|
function t(r, a = []) {
|
|
2682
|
-
for (const
|
|
2683
|
-
const
|
|
2684
|
-
|
|
2685
|
-
key: [...a,
|
|
2686
|
-
value:
|
|
2682
|
+
for (const s in r) {
|
|
2683
|
+
const m = r[s];
|
|
2684
|
+
ve(m) ? t(m, [...a, s]) : Array.isArray(m) ? t(_r(m), [...a, s]) : e.push({
|
|
2685
|
+
key: [...a, s],
|
|
2686
|
+
value: m
|
|
2687
2687
|
});
|
|
2688
2688
|
}
|
|
2689
2689
|
}
|
|
@@ -2702,18 +2702,18 @@ class K {
|
|
|
2702
2702
|
this.url = e, this.options = { ...t == null ? void 0 : t.fetchOptions, headers: r }, this.middlewares = (t == null ? void 0 : t.middlewares) ?? [];
|
|
2703
2703
|
}
|
|
2704
2704
|
async request(e, t, r) {
|
|
2705
|
-
const a =
|
|
2705
|
+
const a = qe(this.options, r), s = JSON.stringify({
|
|
2706
2706
|
query: e,
|
|
2707
2707
|
variables: t
|
|
2708
|
-
}),
|
|
2709
|
-
|
|
2710
|
-
const u = new URL(this.url), c =
|
|
2708
|
+
}), m = new Headers(a.headers);
|
|
2709
|
+
m.set("Content-Type", "application/json"), m.set("Accept", "application/json");
|
|
2710
|
+
const u = new URL(this.url), c = We(e);
|
|
2711
2711
|
c && u.searchParams.set(`_${c.type}`, c.name);
|
|
2712
2712
|
const p = await this.runMiddlewares(
|
|
2713
2713
|
new Request(u, {
|
|
2714
2714
|
...a,
|
|
2715
|
-
body:
|
|
2716
|
-
headers:
|
|
2715
|
+
body: s,
|
|
2716
|
+
headers: m,
|
|
2717
2717
|
method: "POST"
|
|
2718
2718
|
})
|
|
2719
2719
|
);
|
|
@@ -2721,28 +2721,28 @@ class K {
|
|
|
2721
2721
|
}
|
|
2722
2722
|
/** Single file upload */
|
|
2723
2723
|
async upload(e, t, r) {
|
|
2724
|
-
const a =
|
|
2725
|
-
|
|
2726
|
-
const u = new URL(this.url), c =
|
|
2724
|
+
const a = qe(this.options, r), s = this.createUploadBody(e, t), m = new Headers(a.headers);
|
|
2725
|
+
m.delete("Content-Type");
|
|
2726
|
+
const u = new URL(this.url), c = We(e);
|
|
2727
2727
|
c && u.searchParams.set(`_${c.type}`, c.name);
|
|
2728
2728
|
const p = await this.runMiddlewares(
|
|
2729
2729
|
new Request(u, {
|
|
2730
2730
|
...a,
|
|
2731
|
-
body:
|
|
2732
|
-
headers:
|
|
2731
|
+
body: s,
|
|
2732
|
+
headers: m,
|
|
2733
2733
|
method: "POST"
|
|
2734
2734
|
})
|
|
2735
2735
|
);
|
|
2736
2736
|
return await this.exec(p);
|
|
2737
2737
|
}
|
|
2738
2738
|
async exec(e) {
|
|
2739
|
-
var t, r, a,
|
|
2739
|
+
var t, r, a, s, m, u;
|
|
2740
2740
|
try {
|
|
2741
2741
|
const c = await fetch(e);
|
|
2742
2742
|
if (!c.ok)
|
|
2743
2743
|
return { ok: !1, error: g(c.status) };
|
|
2744
2744
|
const p = await c.json(), w = p.data, f = (t = p.errors) == null ? void 0 : t.at(0);
|
|
2745
|
-
return f ? ((r = f.extensions) == null ? void 0 : r.code) === "FORBIDDEN" || ((a = f.extensions) == null ? void 0 : a.code) === "ACCESS_TOKEN_EXPIRED" ? { ok: !1, error: g(403, f.message) } : ((
|
|
2745
|
+
return f ? ((r = f.extensions) == null ? void 0 : r.code) === "FORBIDDEN" || ((a = f.extensions) == null ? void 0 : a.code) === "ACCESS_TOKEN_EXPIRED" ? { ok: !1, error: g(403, f.message) } : ((s = f.extensions) == null ? void 0 : s.code) === "UNAUTHORIZED" ? { ok: !1, error: g(401, f.message) } : ((m = f.extensions) == null ? void 0 : m.code) === "BAD_USER_INPUT" || ((u = f.extensions) == null ? void 0 : u.code) === "BAD_REQUEST" ? { ok: !1, error: g(400, f.message) } : {
|
|
2746
2746
|
ok: !1,
|
|
2747
2747
|
error: g(500, f.message)
|
|
2748
2748
|
} : {
|
|
@@ -2764,7 +2764,7 @@ class K {
|
|
|
2764
2764
|
}
|
|
2765
2765
|
createUploadBody(e, t) {
|
|
2766
2766
|
const r = Tr(t).filter(
|
|
2767
|
-
(
|
|
2767
|
+
(m) => m.value instanceof File || m.value instanceof Blob
|
|
2768
2768
|
), a = new FormData();
|
|
2769
2769
|
a.append(
|
|
2770
2770
|
"operations",
|
|
@@ -2773,21 +2773,21 @@ class K {
|
|
|
2773
2773
|
variables: t
|
|
2774
2774
|
})
|
|
2775
2775
|
);
|
|
2776
|
-
const
|
|
2777
|
-
return r.forEach((
|
|
2778
|
-
|
|
2779
|
-
}), a.append("map", JSON.stringify(
|
|
2780
|
-
a.append(u.toString(),
|
|
2776
|
+
const s = {};
|
|
2777
|
+
return r.forEach((m, u) => {
|
|
2778
|
+
s[u.toString()] = [`variables.${m.key.join(".")}`];
|
|
2779
|
+
}), a.append("map", JSON.stringify(s)), r.forEach((m, u) => {
|
|
2780
|
+
a.append(u.toString(), m.value);
|
|
2781
2781
|
}), a;
|
|
2782
2782
|
}
|
|
2783
2783
|
}
|
|
2784
|
-
function
|
|
2784
|
+
function We(o) {
|
|
2785
2785
|
const e = o.match(/(query|mutation)\s+(\w+)/);
|
|
2786
2786
|
if (!e) return null;
|
|
2787
2787
|
const t = e.at(1), r = e.at(2);
|
|
2788
2788
|
return t && r ? { type: t, name: r } : null;
|
|
2789
2789
|
}
|
|
2790
|
-
function
|
|
2790
|
+
function qe(o, e) {
|
|
2791
2791
|
return o ? e ? {
|
|
2792
2792
|
...o,
|
|
2793
2793
|
...e,
|
|
@@ -2812,9 +2812,9 @@ function V(o, e) {
|
|
|
2812
2812
|
}
|
|
2813
2813
|
async function S(o) {
|
|
2814
2814
|
const e = new TextEncoder().encode(o), t = await crypto.subtle.digest("SHA-256", e);
|
|
2815
|
-
return Array.from(new Uint8Array(t)).map((
|
|
2815
|
+
return Array.from(new Uint8Array(t)).map((s) => s.toString(16).padStart(2, "0")).join("");
|
|
2816
2816
|
}
|
|
2817
|
-
const
|
|
2817
|
+
const Me = [
|
|
2818
2818
|
/**/
|
|
2819
2819
|
"RTG",
|
|
2820
2820
|
"DARWIN",
|
|
@@ -2844,7 +2844,7 @@ class Ve {
|
|
|
2844
2844
|
}
|
|
2845
2845
|
}
|
|
2846
2846
|
function z(o, e) {
|
|
2847
|
-
const t =
|
|
2847
|
+
const t = Oe(o);
|
|
2848
2848
|
return t.setDate(t.getDate() + e), t;
|
|
2849
2849
|
}
|
|
2850
2850
|
function Ye(o) {
|
|
@@ -2859,14 +2859,14 @@ function Ue(o, e) {
|
|
|
2859
2859
|
maxAttempt: a = 3
|
|
2860
2860
|
/**/
|
|
2861
2861
|
} = e;
|
|
2862
|
-
async function m
|
|
2863
|
-
const c = u ?? a, p = await o(...
|
|
2864
|
-
return t(p) ? p : c > 1 ? (await Ye(r * ((a - c) / 2)), m
|
|
2862
|
+
async function s(m, u) {
|
|
2863
|
+
const c = u ?? a, p = await o(...m);
|
|
2864
|
+
return t(p) ? p : c > 1 ? (await Ye(r * ((a - c) / 2)), s(m, c - 1)) : p;
|
|
2865
2865
|
}
|
|
2866
|
-
return async (...
|
|
2866
|
+
return async (...m) => await s(m);
|
|
2867
2867
|
}
|
|
2868
2868
|
function J(o, e) {
|
|
2869
|
-
const t =
|
|
2869
|
+
const t = Oe(o);
|
|
2870
2870
|
return t.setMinutes(t.getMinutes() - e), t;
|
|
2871
2871
|
}
|
|
2872
2872
|
class Ir {
|
|
@@ -2897,7 +2897,7 @@ class Ir {
|
|
|
2897
2897
|
}
|
|
2898
2898
|
};
|
|
2899
2899
|
if (e.type === "MAYA") {
|
|
2900
|
-
const
|
|
2900
|
+
const m = await Ue(() => this.walletService.mayaSession({ id: e.sessionId }), {
|
|
2901
2901
|
until: (w) => {
|
|
2902
2902
|
var f;
|
|
2903
2903
|
return w.ok && ((f = w.data) == null ? void 0 : f.member) != null;
|
|
@@ -2905,8 +2905,8 @@ class Ir {
|
|
|
2905
2905
|
interval: 1e3,
|
|
2906
2906
|
maxAttempt: 5
|
|
2907
2907
|
})();
|
|
2908
|
-
if (!
|
|
2909
|
-
if (!((a =
|
|
2908
|
+
if (!m.ok) return m;
|
|
2909
|
+
if (!((a = m.data) != null && a.member))
|
|
2910
2910
|
return {
|
|
2911
2911
|
ok: !1,
|
|
2912
2912
|
error: {
|
|
@@ -2934,61 +2934,61 @@ class Ir {
|
|
|
2934
2934
|
};
|
|
2935
2935
|
}
|
|
2936
2936
|
if (e.type === "MOBILE_NUMBER") {
|
|
2937
|
-
const
|
|
2938
|
-
if (
|
|
2939
|
-
const
|
|
2937
|
+
const s = await this.authService.createSession(e);
|
|
2938
|
+
if (s.ok) {
|
|
2939
|
+
const m = /* @__PURE__ */ new Date();
|
|
2940
2940
|
return window.localStorage.setItem(
|
|
2941
2941
|
this.storageKey,
|
|
2942
2942
|
JSON.stringify({
|
|
2943
|
-
...
|
|
2944
|
-
accessTokenExpiresAt: j(
|
|
2945
|
-
refreshTokenExpiresAt: J(z(
|
|
2943
|
+
...s.data,
|
|
2944
|
+
accessTokenExpiresAt: j(m, 8).getTime(),
|
|
2945
|
+
refreshTokenExpiresAt: J(z(m, 30), 2).getTime()
|
|
2946
2946
|
})
|
|
2947
2947
|
), {
|
|
2948
2948
|
ok: !0,
|
|
2949
2949
|
data: null
|
|
2950
2950
|
};
|
|
2951
2951
|
}
|
|
2952
|
-
return
|
|
2952
|
+
return s;
|
|
2953
2953
|
}
|
|
2954
2954
|
if (e.type === "SOCIALS" || e.type === "TOKEN") {
|
|
2955
|
-
const
|
|
2955
|
+
const s = await this.authService.createSession({
|
|
2956
2956
|
type: "SOCIALS",
|
|
2957
2957
|
token: e.token
|
|
2958
2958
|
});
|
|
2959
|
-
if (
|
|
2960
|
-
const
|
|
2959
|
+
if (s.ok) {
|
|
2960
|
+
const m = /* @__PURE__ */ new Date();
|
|
2961
2961
|
return window.localStorage.setItem(
|
|
2962
2962
|
this.storageKey,
|
|
2963
2963
|
JSON.stringify({
|
|
2964
|
-
...
|
|
2965
|
-
accessTokenExpiresAt: j(
|
|
2966
|
-
refreshTokenExpiresAt: J(z(
|
|
2964
|
+
...s.data,
|
|
2965
|
+
accessTokenExpiresAt: j(m, 8).getTime(),
|
|
2966
|
+
refreshTokenExpiresAt: J(z(m, 30), 2).getTime()
|
|
2967
2967
|
})
|
|
2968
2968
|
), {
|
|
2969
2969
|
ok: !0,
|
|
2970
2970
|
data: null
|
|
2971
2971
|
};
|
|
2972
2972
|
}
|
|
2973
|
-
return
|
|
2973
|
+
return s;
|
|
2974
2974
|
}
|
|
2975
2975
|
if (e.type === "CABINET") {
|
|
2976
|
-
const
|
|
2977
|
-
if (
|
|
2978
|
-
const
|
|
2976
|
+
const s = await this.authService.createSession(e);
|
|
2977
|
+
if (s.ok) {
|
|
2978
|
+
const m = /* @__PURE__ */ new Date();
|
|
2979
2979
|
return window.localStorage.setItem(
|
|
2980
2980
|
this.storageKey,
|
|
2981
2981
|
JSON.stringify({
|
|
2982
|
-
...
|
|
2983
|
-
accessTokenExpiresAt: j(
|
|
2984
|
-
refreshTokenExpiresAt: J(z(
|
|
2982
|
+
...s.data,
|
|
2983
|
+
accessTokenExpiresAt: j(m, 8).getTime(),
|
|
2984
|
+
refreshTokenExpiresAt: J(z(m, 30), 2).getTime()
|
|
2985
2985
|
})
|
|
2986
2986
|
), {
|
|
2987
2987
|
ok: !0,
|
|
2988
2988
|
data: null
|
|
2989
2989
|
};
|
|
2990
2990
|
}
|
|
2991
|
-
return
|
|
2991
|
+
return s;
|
|
2992
2992
|
}
|
|
2993
2993
|
const t = await this.authService.createSession(e);
|
|
2994
2994
|
if (!t.ok) return t;
|
|
@@ -3043,8 +3043,8 @@ class Ir {
|
|
|
3043
3043
|
};
|
|
3044
3044
|
try {
|
|
3045
3045
|
let t = JSON.parse(e), r = /* @__PURE__ */ new Date();
|
|
3046
|
-
const a = new Date(t.accessTokenExpiresAt),
|
|
3047
|
-
if (
|
|
3046
|
+
const a = new Date(t.accessTokenExpiresAt), s = new Date(t.refreshTokenExpiresAt);
|
|
3047
|
+
if (Ge(r, s))
|
|
3048
3048
|
return this.logger.warn("Session expired. Logging out.."), window.localStorage.removeItem(this.storageKey), {
|
|
3049
3049
|
ok: !1,
|
|
3050
3050
|
error: {
|
|
@@ -3052,20 +3052,20 @@ class Ir {
|
|
|
3052
3052
|
message: "Session expired."
|
|
3053
3053
|
}
|
|
3054
3054
|
};
|
|
3055
|
-
if (
|
|
3055
|
+
if (Ge(r, a)) {
|
|
3056
3056
|
this.logger.info("Refreshing session..."), this.refreshing = !0;
|
|
3057
|
-
const
|
|
3058
|
-
if (this.refreshing = !1, !
|
|
3059
|
-
return this.logger.error(`Failed to refresh session: ${
|
|
3057
|
+
const m = await this.authService.refreshSession(t.refreshToken);
|
|
3058
|
+
if (this.refreshing = !1, !m.ok)
|
|
3059
|
+
return this.logger.error(`Failed to refresh session: ${m.error.message}`), m.error.name === "InvalidTokenError" || m.error.name === "AccountBlacklistedError" ? (window.localStorage.removeItem(this.storageKey), {
|
|
3060
3060
|
ok: !1,
|
|
3061
|
-
error:
|
|
3061
|
+
error: m.error
|
|
3062
3062
|
}) : (this.logger.warn("Old session returned."), {
|
|
3063
3063
|
ok: !0,
|
|
3064
3064
|
data: t
|
|
3065
3065
|
});
|
|
3066
3066
|
this.logger.success("Session refreshed!"), r = /* @__PURE__ */ new Date(), t = {
|
|
3067
3067
|
...t,
|
|
3068
|
-
...
|
|
3068
|
+
...m.data,
|
|
3069
3069
|
accessTokenExpiresAt: j(r, 8).getTime(),
|
|
3070
3070
|
refreshTokenExpiresAt: J(z(r, 30), 2).getTime()
|
|
3071
3071
|
}, window.localStorage.setItem(this.storageKey, JSON.stringify(t));
|
|
@@ -3094,11 +3094,11 @@ class Ir {
|
|
|
3094
3094
|
(t = e.data) != null && t.accessToken && await this.authService.destroySession(e.data.accessToken), window.localStorage.removeItem(this.storageKey);
|
|
3095
3095
|
}
|
|
3096
3096
|
async verify() {
|
|
3097
|
-
var r, a,
|
|
3097
|
+
var r, a, s;
|
|
3098
3098
|
if (this.isServer)
|
|
3099
3099
|
return this.logger.warn("'localStorage' is not available on the server."), !0;
|
|
3100
3100
|
const e = await this.get();
|
|
3101
|
-
if (((r = e.error) == null ? void 0 : r.name) === "InvalidTokenError" || ((a = e.error) == null ? void 0 : a.name) === "SessionExpiredError" || ((
|
|
3101
|
+
if (((r = e.error) == null ? void 0 : r.name) === "InvalidTokenError" || ((a = e.error) == null ? void 0 : a.name) === "SessionExpiredError" || ((s = e.error) == null ? void 0 : s.name) === "AccountBlacklistedError") return !1;
|
|
3102
3102
|
if (!e.data) return !0;
|
|
3103
3103
|
const t = await this.authService.verifySession(e.data.accessToken);
|
|
3104
3104
|
return t || window.localStorage.removeItem(this.storageKey), t;
|
|
@@ -3112,12 +3112,12 @@ function O(o) {
|
|
|
3112
3112
|
for (const t in o) {
|
|
3113
3113
|
const r = o[t];
|
|
3114
3114
|
if (r !== null && r !== void 0) {
|
|
3115
|
-
if (
|
|
3115
|
+
if (ve(r)) {
|
|
3116
3116
|
e[t] = O(r);
|
|
3117
3117
|
continue;
|
|
3118
3118
|
}
|
|
3119
3119
|
if (Array.isArray(r)) {
|
|
3120
|
-
e[t] = r.map((a) =>
|
|
3120
|
+
e[t] = r.map((a) => ve(a) ? O(a) : a);
|
|
3121
3121
|
continue;
|
|
3122
3122
|
}
|
|
3123
3123
|
e[t] = r;
|
|
@@ -3183,7 +3183,7 @@ class Nr {
|
|
|
3183
3183
|
}
|
|
3184
3184
|
/** @deprecated */
|
|
3185
3185
|
platform(e) {
|
|
3186
|
-
var t, r, a,
|
|
3186
|
+
var t, r, a, s, m, u, c, p, w, f, b, k, T, _, R, D, h, M, I, A, N, P, G, v, E, B, x, W, q, U, $, L, F, H, y, X, Z, ee, te, re, ae, ne, oe, ie, se, me, ue, ce, de, le, pe, fe, we, he, ye, ge, Ae, Ee, Se, Ce, be, ke, Te, _e, Re, De, xe;
|
|
3187
3187
|
return {
|
|
3188
3188
|
timezone: e.timezone,
|
|
3189
3189
|
currency: e.currency,
|
|
@@ -3195,8 +3195,8 @@ class Nr {
|
|
|
3195
3195
|
androidEnabled: ((t = e.bankDepositGatewaySettings) == null ? void 0 : t.androidEnabled) ?? !1,
|
|
3196
3196
|
iosEnabled: ((r = e.bankDepositGatewaySettings) == null ? void 0 : r.iosEnabled) ?? !1,
|
|
3197
3197
|
webEnabled: ((a = e.bankDepositGatewaySettings) == null ? void 0 : a.webEnabled) ?? !1,
|
|
3198
|
-
mobileWebEnabled: ((
|
|
3199
|
-
minimumAmount: n((
|
|
3198
|
+
mobileWebEnabled: ((s = e.bankDepositGatewaySettings) == null ? void 0 : s.mobileWebEnabled) ?? !1,
|
|
3199
|
+
minimumAmount: n((m = e.bankDepositGatewaySettings) == null ? void 0 : m.minimumAmount),
|
|
3200
3200
|
maximumAmount: n((u = e.bankDepositGatewaySettings) == null ? void 0 : u.maximumAmount)
|
|
3201
3201
|
},
|
|
3202
3202
|
gcash: {
|
|
@@ -3212,7 +3212,7 @@ class Nr {
|
|
|
3212
3212
|
iosEnabled: ((_ = e.mayaDepositGatewaySettings) == null ? void 0 : _.iosEnabled) ?? !1,
|
|
3213
3213
|
webEnabled: ((R = e.mayaDepositGatewaySettings) == null ? void 0 : R.webEnabled) ?? !1,
|
|
3214
3214
|
mobileWebEnabled: ((D = e.mayaDepositGatewaySettings) == null ? void 0 : D.mobileWebEnabled) ?? !1,
|
|
3215
|
-
minimumAmount: n((
|
|
3215
|
+
minimumAmount: n((h = e.mayaDepositGatewaySettings) == null ? void 0 : h.minimumAmount),
|
|
3216
3216
|
maximumAmount: n((M = e.mayaDepositGatewaySettings) == null ? void 0 : M.maximumAmount)
|
|
3217
3217
|
},
|
|
3218
3218
|
mayaApp: {
|
|
@@ -3236,7 +3236,7 @@ class Nr {
|
|
|
3236
3236
|
iosEnabled: ((L = e.qrphDepositGatewaySettings) == null ? void 0 : L.iosEnabled) ?? !1,
|
|
3237
3237
|
webEnabled: ((F = e.qrphDepositGatewaySettings) == null ? void 0 : F.webEnabled) ?? !1,
|
|
3238
3238
|
mobileWebEnabled: ((H = e.qrphDepositGatewaySettings) == null ? void 0 : H.mobileWebEnabled) ?? !1,
|
|
3239
|
-
minimumAmount: n((
|
|
3239
|
+
minimumAmount: n((y = e.qrphDepositGatewaySettings) == null ? void 0 : y.minimumAmount),
|
|
3240
3240
|
maximumAmount: n((X = e.qrphDepositGatewaySettings) == null ? void 0 : X.maximumAmount)
|
|
3241
3241
|
}
|
|
3242
3242
|
},
|
|
@@ -3266,10 +3266,10 @@ class Nr {
|
|
|
3266
3266
|
webEnabled: ((pe = e.mayaWithdrawalGatewaySettings) == null ? void 0 : pe.webEnabled) ?? !1,
|
|
3267
3267
|
mobileWebEnabled: ((fe = e.mayaWithdrawalGatewaySettings) == null ? void 0 : fe.mobileWebEnabled) ?? !1,
|
|
3268
3268
|
minimumAmount: n((we = e.mayaWithdrawalGatewaySettings) == null ? void 0 : we.minimumAmount),
|
|
3269
|
-
maximumAmount: n((
|
|
3269
|
+
maximumAmount: n((he = e.mayaWithdrawalGatewaySettings) == null ? void 0 : he.maximumAmount)
|
|
3270
3270
|
},
|
|
3271
3271
|
mayaApp: {
|
|
3272
|
-
androidEnabled: ((
|
|
3272
|
+
androidEnabled: ((ye = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ye.androidEnabled) ?? !1,
|
|
3273
3273
|
iosEnabled: ((ge = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ge.iosEnabled) ?? !1,
|
|
3274
3274
|
webEnabled: ((Ae = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : Ae.webEnabled) ?? !1,
|
|
3275
3275
|
mobileWebEnabled: ((Ee = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : Ee.mobileWebEnabled) ?? !1,
|
|
@@ -3293,7 +3293,7 @@ class Nr {
|
|
|
3293
3293
|
}
|
|
3294
3294
|
},
|
|
3295
3295
|
pointsClubSettings: {
|
|
3296
|
-
multiplier: n((
|
|
3296
|
+
multiplier: n((xe = e.pointsClubSettings) == null ? void 0 : xe.multiplier, 0)
|
|
3297
3297
|
}
|
|
3298
3298
|
};
|
|
3299
3299
|
}
|
|
@@ -3310,7 +3310,7 @@ class Nr {
|
|
|
3310
3310
|
};
|
|
3311
3311
|
}
|
|
3312
3312
|
paymentSettings(e) {
|
|
3313
|
-
var t, r, a,
|
|
3313
|
+
var t, r, a, s, m, u, c, p, w, f, b, k, T, _, R, D, h, M, I, A, N, P, G, v, E, B, x, W, q, U, $, L, F, H, y, X, Z, ee, te, re, ae, ne, oe, ie, se, me, ue, ce, de, le, pe, fe, we, he, ye, ge, Ae, Ee, Se, Ce, be, ke, Te, _e, Re, De;
|
|
3314
3314
|
return {
|
|
3315
3315
|
minimumFirstDepositAmount: n(e.minimumFirstDepositAmount),
|
|
3316
3316
|
restrictWithdrawalsToVerifiedMembers: e.restrictWithdrawalsToVerifiedMembers,
|
|
@@ -3319,8 +3319,8 @@ class Nr {
|
|
|
3319
3319
|
androidEnabled: ((t = e.bankDepositGatewaySettings) == null ? void 0 : t.androidEnabled) ?? !1,
|
|
3320
3320
|
iosEnabled: ((r = e.bankDepositGatewaySettings) == null ? void 0 : r.iosEnabled) ?? !1,
|
|
3321
3321
|
webEnabled: ((a = e.bankDepositGatewaySettings) == null ? void 0 : a.webEnabled) ?? !1,
|
|
3322
|
-
mobileWebEnabled: ((
|
|
3323
|
-
minimumAmount: n((
|
|
3322
|
+
mobileWebEnabled: ((s = e.bankDepositGatewaySettings) == null ? void 0 : s.mobileWebEnabled) ?? !1,
|
|
3323
|
+
minimumAmount: n((m = e.bankDepositGatewaySettings) == null ? void 0 : m.minimumAmount),
|
|
3324
3324
|
maximumAmount: n((u = e.bankDepositGatewaySettings) == null ? void 0 : u.maximumAmount)
|
|
3325
3325
|
},
|
|
3326
3326
|
gcash: {
|
|
@@ -3336,7 +3336,7 @@ class Nr {
|
|
|
3336
3336
|
iosEnabled: ((_ = e.mayaDepositGatewaySettings) == null ? void 0 : _.iosEnabled) ?? !1,
|
|
3337
3337
|
webEnabled: ((R = e.mayaDepositGatewaySettings) == null ? void 0 : R.webEnabled) ?? !1,
|
|
3338
3338
|
mobileWebEnabled: ((D = e.mayaDepositGatewaySettings) == null ? void 0 : D.mobileWebEnabled) ?? !1,
|
|
3339
|
-
minimumAmount: n((
|
|
3339
|
+
minimumAmount: n((h = e.mayaDepositGatewaySettings) == null ? void 0 : h.minimumAmount),
|
|
3340
3340
|
maximumAmount: n((M = e.mayaDepositGatewaySettings) == null ? void 0 : M.maximumAmount)
|
|
3341
3341
|
},
|
|
3342
3342
|
mayaApp: {
|
|
@@ -3360,7 +3360,7 @@ class Nr {
|
|
|
3360
3360
|
iosEnabled: ((L = e.qrphDepositGatewaySettings) == null ? void 0 : L.iosEnabled) ?? !1,
|
|
3361
3361
|
webEnabled: ((F = e.qrphDepositGatewaySettings) == null ? void 0 : F.webEnabled) ?? !1,
|
|
3362
3362
|
mobileWebEnabled: ((H = e.qrphDepositGatewaySettings) == null ? void 0 : H.mobileWebEnabled) ?? !1,
|
|
3363
|
-
minimumAmount: n((
|
|
3363
|
+
minimumAmount: n((y = e.qrphDepositGatewaySettings) == null ? void 0 : y.minimumAmount),
|
|
3364
3364
|
maximumAmount: n((X = e.qrphDepositGatewaySettings) == null ? void 0 : X.maximumAmount)
|
|
3365
3365
|
}
|
|
3366
3366
|
},
|
|
@@ -3387,10 +3387,10 @@ class Nr {
|
|
|
3387
3387
|
webEnabled: ((pe = e.mayaWithdrawalGatewaySettings) == null ? void 0 : pe.webEnabled) ?? !1,
|
|
3388
3388
|
mobileWebEnabled: ((fe = e.mayaWithdrawalGatewaySettings) == null ? void 0 : fe.mobileWebEnabled) ?? !1,
|
|
3389
3389
|
minimumAmount: n((we = e.mayaWithdrawalGatewaySettings) == null ? void 0 : we.minimumAmount),
|
|
3390
|
-
maximumAmount: n((
|
|
3390
|
+
maximumAmount: n((he = e.mayaWithdrawalGatewaySettings) == null ? void 0 : he.maximumAmount)
|
|
3391
3391
|
},
|
|
3392
3392
|
mayaApp: {
|
|
3393
|
-
androidEnabled: ((
|
|
3393
|
+
androidEnabled: ((ye = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ye.androidEnabled) ?? !1,
|
|
3394
3394
|
iosEnabled: ((ge = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ge.iosEnabled) ?? !1,
|
|
3395
3395
|
webEnabled: ((Ae = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : Ae.webEnabled) ?? !1,
|
|
3396
3396
|
mobileWebEnabled: ((Ee = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : Ee.mobileWebEnabled) ?? !1,
|
|
@@ -3632,7 +3632,7 @@ class Nr {
|
|
|
3632
3632
|
dateTimeLastUpdated: new Date(e.dateTimeLastUpdated),
|
|
3633
3633
|
turnoverContributionPercentagePerGameProvider: Object.entries(
|
|
3634
3634
|
e.turnoverContributionPercentagePerGameProvider
|
|
3635
|
-
).reduce((r, [a,
|
|
3635
|
+
).reduce((r, [a, s]) => (r[a] = n(s, 0), r), {})
|
|
3636
3636
|
};
|
|
3637
3637
|
}
|
|
3638
3638
|
bonus(e) {
|
|
@@ -3842,17 +3842,17 @@ class vr {
|
|
|
3842
3842
|
site: t,
|
|
3843
3843
|
sitePlatform: r,
|
|
3844
3844
|
platform: a,
|
|
3845
|
-
environment:
|
|
3846
|
-
logs:
|
|
3847
|
-
} = e, u =
|
|
3845
|
+
environment: s,
|
|
3846
|
+
logs: m
|
|
3847
|
+
} = e, u = s === "production";
|
|
3848
3848
|
this.transformer = new Nr(), this.logger = new Ve({
|
|
3849
|
-
enabled:
|
|
3849
|
+
enabled: m ?? !1
|
|
3850
3850
|
});
|
|
3851
|
-
const c = u ? "https://auth.opexa.io" : "https://auth.development.opexa.io", p = 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", f = u ? "https://account.opexa.io/graphql" : "https://account.development.opexa.io/graphql", b = u ? "https://portal.opexa.io/graphql" : "https://portal.development.opexa.io/graphql", k = u ? "https://file.opexa.io/graphql" : "https://file.development.opexa.io/graphql", T = u ? "https://game.opexa.io/graphql" : "https://game.development.opexa.io/graphql", _ = u ? "https://trigger.opexa.io/graphql" : "https://trigger.development.opexa.io/graphql", R = "https://portal-api.opexacms.io", D = new
|
|
3851
|
+
const c = u ? "https://auth.opexa.io" : "https://auth.development.opexa.io", p = 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", f = u ? "https://account.opexa.io/graphql" : "https://account.development.opexa.io/graphql", b = u ? "https://portal.opexa.io/graphql" : "https://portal.development.opexa.io/graphql", k = u ? "https://file.opexa.io/graphql" : "https://file.development.opexa.io/graphql", T = u ? "https://game.opexa.io/graphql" : "https://game.development.opexa.io/graphql", _ = u ? "https://trigger.opexa.io/graphql" : "https://trigger.development.opexa.io/graphql", R = "https://portal-api.opexacms.io", D = new hr({
|
|
3852
3852
|
url: R,
|
|
3853
3853
|
site: t,
|
|
3854
3854
|
platform: r
|
|
3855
|
-
}),
|
|
3855
|
+
}), h = {
|
|
3856
3856
|
middlewares: [this.authMiddleware],
|
|
3857
3857
|
fetchOptions: {
|
|
3858
3858
|
headers: {
|
|
@@ -3860,7 +3860,7 @@ class vr {
|
|
|
3860
3860
|
"Platform-Code": a
|
|
3861
3861
|
}
|
|
3862
3862
|
}
|
|
3863
|
-
}, M = new gr(new K(T,
|
|
3863
|
+
}, M = new gr(new K(T, h)), I = new yr(new K(k, h)), A = new Cr(new K(p, h)), N = new fr(new K(f, h)), P = new Er(new K(w, h)), G = new Ar(new K(b, h)), v = new Sr(new K(_, h)), E = new wr({
|
|
3864
3864
|
url: c,
|
|
3865
3865
|
fetchOptions: {
|
|
3866
3866
|
headers: {
|
|
@@ -3872,7 +3872,7 @@ class vr {
|
|
|
3872
3872
|
}
|
|
3873
3873
|
}
|
|
3874
3874
|
}), B = new Ir({
|
|
3875
|
-
logs:
|
|
3875
|
+
logs: m,
|
|
3876
3876
|
authService: E,
|
|
3877
3877
|
walletService: A
|
|
3878
3878
|
});
|
|
@@ -4102,8 +4102,8 @@ class vr {
|
|
|
4102
4102
|
/**/
|
|
4103
4103
|
password: r,
|
|
4104
4104
|
dateOfBirth: a,
|
|
4105
|
-
mobileNumber:
|
|
4106
|
-
secretAnswer:
|
|
4105
|
+
mobileNumber: s,
|
|
4106
|
+
secretAnswer: m,
|
|
4107
4107
|
transactionPassword: u,
|
|
4108
4108
|
...c
|
|
4109
4109
|
} = t;
|
|
@@ -4114,8 +4114,8 @@ class vr {
|
|
|
4114
4114
|
...c,
|
|
4115
4115
|
password: r ? await S(r) : void 0,
|
|
4116
4116
|
transactionPassword: u ? await S(u) : void 0,
|
|
4117
|
-
mobileNumber:
|
|
4118
|
-
secretAnswer:
|
|
4117
|
+
mobileNumber: s ? V(s, await this.locale) : void 0,
|
|
4118
|
+
secretAnswer: m ? await S(m) : void 0,
|
|
4119
4119
|
birthDay: a ? typeof a == "string" ? a : this.formatYmd(a) : void 0
|
|
4120
4120
|
}
|
|
4121
4121
|
}
|
|
@@ -4448,7 +4448,7 @@ class vr {
|
|
|
4448
4448
|
}
|
|
4449
4449
|
});
|
|
4450
4450
|
if (!t.ok) return t;
|
|
4451
|
-
const r = [...new Set(t.data.edges.map((
|
|
4451
|
+
const r = [...new Set(t.data.edges.map((s) => s.node.game.id))];
|
|
4452
4452
|
if (r.length <= 0)
|
|
4453
4453
|
return {
|
|
4454
4454
|
ok: !0,
|
|
@@ -4469,15 +4469,15 @@ class vr {
|
|
|
4469
4469
|
return a.ok ? {
|
|
4470
4470
|
ok: !0,
|
|
4471
4471
|
data: {
|
|
4472
|
-
betRecords: t.data.edges.map(({ cursor:
|
|
4472
|
+
betRecords: t.data.edges.map(({ cursor: s, node: m }) => {
|
|
4473
4473
|
var c;
|
|
4474
|
-
const u = (c = a.data.edges.find((p) =>
|
|
4474
|
+
const u = (c = a.data.edges.find((p) => m.game.id === p.node.reference)) == null ? void 0 : c.node;
|
|
4475
4475
|
return {
|
|
4476
4476
|
...this.transformer.transform.betRecord({
|
|
4477
|
-
...
|
|
4477
|
+
...m,
|
|
4478
4478
|
game: u
|
|
4479
4479
|
}),
|
|
4480
|
-
cursor:
|
|
4480
|
+
cursor: s
|
|
4481
4481
|
};
|
|
4482
4482
|
}),
|
|
4483
4483
|
totalCount: t.data.totalCount,
|
|
@@ -4505,11 +4505,11 @@ class vr {
|
|
|
4505
4505
|
return r.ok ? {
|
|
4506
4506
|
ok: !0,
|
|
4507
4507
|
data: e.data.map((a) => {
|
|
4508
|
-
var
|
|
4509
|
-
const
|
|
4508
|
+
var m;
|
|
4509
|
+
const s = (m = r.data.edges.find((u) => u.node.reference === a.game.id)) == null ? void 0 : m.node;
|
|
4510
4510
|
return this.transformer.transform.latestBetRecord({
|
|
4511
4511
|
...a,
|
|
4512
|
-
game:
|
|
4512
|
+
game: s
|
|
4513
4513
|
});
|
|
4514
4514
|
})
|
|
4515
4515
|
} : r;
|
|
@@ -4633,7 +4633,7 @@ class vr {
|
|
|
4633
4633
|
async recommendedGames(e) {
|
|
4634
4634
|
const t = await this.portalService.recommendedGames();
|
|
4635
4635
|
if (!t.ok) return t;
|
|
4636
|
-
const r = [...new Set(t.data.map((
|
|
4636
|
+
const r = [...new Set(t.data.map((s) => s.id))];
|
|
4637
4637
|
if (r.length <= 0)
|
|
4638
4638
|
return {
|
|
4639
4639
|
ok: !0,
|
|
@@ -4656,9 +4656,9 @@ class vr {
|
|
|
4656
4656
|
return a.ok ? {
|
|
4657
4657
|
ok: !0,
|
|
4658
4658
|
data: {
|
|
4659
|
-
games: a.data.edges.map(({ cursor:
|
|
4660
|
-
...this.transformer.transform.game(
|
|
4661
|
-
cursor:
|
|
4659
|
+
games: a.data.edges.map(({ cursor: s, node: m }) => ({
|
|
4660
|
+
...this.transformer.transform.game(m),
|
|
4661
|
+
cursor: s
|
|
4662
4662
|
})),
|
|
4663
4663
|
totalCount: a.data.totalCount,
|
|
4664
4664
|
hasNextPage: a.data.pageInfo.hasNextPage,
|
|
@@ -4666,24 +4666,31 @@ class vr {
|
|
|
4666
4666
|
}
|
|
4667
4667
|
} : a;
|
|
4668
4668
|
}
|
|
4669
|
-
async gameSession(e) {
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4669
|
+
async gameSession(e, t) {
|
|
4670
|
+
if (t) {
|
|
4671
|
+
const s = Me.includes(t) ? await this.walletService.gameSession({ id: e }) : await this.gameService.gameSession({ id: e });
|
|
4672
|
+
return s.ok ? {
|
|
4673
|
+
ok: !0,
|
|
4674
|
+
data: s.data ? this.transformer.transform.gameSession(s.data) : null
|
|
4675
|
+
} : s;
|
|
4676
|
+
}
|
|
4677
|
+
const r = await this.walletService.gameSession({ id: e });
|
|
4678
|
+
if (!r.ok) return r;
|
|
4679
|
+
if (r.data)
|
|
4673
4680
|
return {
|
|
4674
4681
|
ok: !0,
|
|
4675
|
-
data: this.transformer.transform.gameSession(
|
|
4682
|
+
data: this.transformer.transform.gameSession(r.data)
|
|
4676
4683
|
};
|
|
4677
|
-
const
|
|
4678
|
-
return
|
|
4684
|
+
const a = await this.gameService.gameSession({ id: e });
|
|
4685
|
+
return a.ok ? {
|
|
4679
4686
|
ok: !0,
|
|
4680
|
-
data:
|
|
4681
|
-
} :
|
|
4687
|
+
data: a.data ? this.transformer.transform.gameSession(a.data) : null
|
|
4688
|
+
} : a;
|
|
4682
4689
|
}
|
|
4683
4690
|
async createGameSession(e) {
|
|
4684
4691
|
const t = e.id ?? Y.generate(Q.GameSession).toString();
|
|
4685
4692
|
if (e.provider) {
|
|
4686
|
-
const c =
|
|
4693
|
+
const c = Me.includes(e.provider) ? await this.walletService.createGameSession({ input: { id: t, game: e.reference } }) : await this.gameService.createGameSession({ input: { id: t, game: e.reference } });
|
|
4687
4694
|
return c.ok ? { ok: !0, data: { id: t } } : c;
|
|
4688
4695
|
}
|
|
4689
4696
|
if (e.game.startsWith("SPORTS:")) {
|
|
@@ -4706,12 +4713,14 @@ class vr {
|
|
|
4706
4713
|
message: "Game does not exist"
|
|
4707
4714
|
}
|
|
4708
4715
|
};
|
|
4709
|
-
const { provider:
|
|
4716
|
+
const { provider: s, reference: m } = a.data, u = Me.includes(s) ? await this.walletService.createGameSession({ input: { id: t, game: m } }) : await this.gameService.createGameSession({ input: { id: t, game: m } });
|
|
4710
4717
|
return u.ok ? { ok: !0, data: { id: t } } : u;
|
|
4711
4718
|
}
|
|
4712
|
-
async endGameSession(e) {
|
|
4713
|
-
|
|
4714
|
-
|
|
4719
|
+
async endGameSession(e, t) {
|
|
4720
|
+
if (t)
|
|
4721
|
+
return Me.includes(t) ? await this.walletService.endGameSession({ input: { id: e } }) : await this.gameService.endGameSession({ input: { id: e } });
|
|
4722
|
+
const r = await this.walletService.endGameSession({ input: { id: e } });
|
|
4723
|
+
return r.ok ? r : await this.gameService.endGameSession({ input: { id: e } });
|
|
4715
4724
|
}
|
|
4716
4725
|
/**/
|
|
4717
4726
|
/*+----------------------------------------+*/
|
|
@@ -4886,8 +4895,8 @@ class vr {
|
|
|
4886
4895
|
} : e;
|
|
4887
4896
|
}
|
|
4888
4897
|
formatYmd(e) {
|
|
4889
|
-
const t = (
|
|
4890
|
-
return `${r}-${a}-${
|
|
4898
|
+
const t = (m) => m.toString().padStart(2, "0"), r = e.getFullYear(), a = t(e.getMonth() + 1), s = t(e.getDate());
|
|
4899
|
+
return `${r}-${a}-${s}`;
|
|
4891
4900
|
}
|
|
4892
4901
|
/**/
|
|
4893
4902
|
/*+----------------------------------------+*/
|