@opexa/portal-sdk 0.0.30 → 0.0.31
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 +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +101 -92
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -16,8 +16,8 @@ const S = {
|
|
|
16
16
|
function n(o, ...e) {
|
|
17
17
|
let t = "";
|
|
18
18
|
for (const [a, r] of o.entries()) {
|
|
19
|
-
const
|
|
20
|
-
t = `${t}${r}${
|
|
19
|
+
const c = e.at(a) ?? "";
|
|
20
|
+
t = `${t}${r}${c}`;
|
|
21
21
|
}
|
|
22
22
|
return t.trim();
|
|
23
23
|
}
|
|
@@ -1163,7 +1163,7 @@ class gt {
|
|
|
1163
1163
|
} : t;
|
|
1164
1164
|
}
|
|
1165
1165
|
}
|
|
1166
|
-
function
|
|
1166
|
+
function f(o, e) {
|
|
1167
1167
|
const t = G[o] ? G[o] : G[500];
|
|
1168
1168
|
return {
|
|
1169
1169
|
name: t.name,
|
|
@@ -1213,12 +1213,12 @@ class bt {
|
|
|
1213
1213
|
error: m("AccountBlacklisted")
|
|
1214
1214
|
} : {
|
|
1215
1215
|
ok: !1,
|
|
1216
|
-
error:
|
|
1216
|
+
error: f(a.status)
|
|
1217
1217
|
};
|
|
1218
1218
|
} catch {
|
|
1219
1219
|
return {
|
|
1220
1220
|
ok: !1,
|
|
1221
|
-
error:
|
|
1221
|
+
error: f(500)
|
|
1222
1222
|
};
|
|
1223
1223
|
}
|
|
1224
1224
|
}
|
|
@@ -1246,12 +1246,12 @@ class bt {
|
|
|
1246
1246
|
error: m("InvalidTokenOrSecretAnswer")
|
|
1247
1247
|
} : {
|
|
1248
1248
|
ok: !1,
|
|
1249
|
-
error:
|
|
1249
|
+
error: f(a.status)
|
|
1250
1250
|
};
|
|
1251
1251
|
} catch {
|
|
1252
1252
|
return {
|
|
1253
1253
|
ok: !1,
|
|
1254
|
-
error:
|
|
1254
|
+
error: f(500)
|
|
1255
1255
|
};
|
|
1256
1256
|
}
|
|
1257
1257
|
}
|
|
@@ -1279,12 +1279,12 @@ class bt {
|
|
|
1279
1279
|
error: m("InvalidToken")
|
|
1280
1280
|
} : {
|
|
1281
1281
|
ok: !1,
|
|
1282
|
-
error:
|
|
1282
|
+
error: f(t.status)
|
|
1283
1283
|
};
|
|
1284
1284
|
} catch {
|
|
1285
1285
|
return {
|
|
1286
1286
|
ok: !1,
|
|
1287
|
-
error:
|
|
1287
|
+
error: f(500)
|
|
1288
1288
|
};
|
|
1289
1289
|
}
|
|
1290
1290
|
}
|
|
@@ -1299,9 +1299,9 @@ class bt {
|
|
|
1299
1299
|
Authorization: `Bearer ${e}`
|
|
1300
1300
|
}
|
|
1301
1301
|
});
|
|
1302
|
-
return t.ok ? { ok: !0 } : { ok: !1, error:
|
|
1302
|
+
return t.ok ? { ok: !0 } : { ok: !1, error: f(t.status) };
|
|
1303
1303
|
} catch {
|
|
1304
|
-
return { ok: !1, error:
|
|
1304
|
+
return { ok: !1, error: f(500) };
|
|
1305
1305
|
}
|
|
1306
1306
|
}
|
|
1307
1307
|
async verifySession(e) {
|
|
@@ -1604,9 +1604,9 @@ class kt {
|
|
|
1604
1604
|
} : e;
|
|
1605
1605
|
}
|
|
1606
1606
|
async games(e) {
|
|
1607
|
-
var r, s,
|
|
1607
|
+
var r, c, s, p, u, h, w, l, A, k, C, _, T, v, N, M;
|
|
1608
1608
|
const t = new URLSearchParams();
|
|
1609
|
-
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), (
|
|
1609
|
+
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), (c = (r = e == null ? void 0 : e.filter) == null ? void 0 : r.type) != null && c.equal && t.set("filter[type][eq]", e.filter.type.equal), (p = (s = e == null ? void 0 : e.filter) == null ? void 0 : s.type) != null && p.notEqual && t.set("filter[type][neq]", e.filter.type.notEqual), (h = (u = e == null ? void 0 : e.filter) == null ? void 0 : u.type) != null && h.in && t.set("filter[type][in]", e.filter.type.in.join(",")), (l = (w = e == null ? void 0 : e.filter) == null ? void 0 : w.type) != null && l.notIn && t.set("filter[type][nin]", e.filter.type.notIn.join(",")), (k = (A = e == null ? void 0 : e.filter) == null ? void 0 : A.provider) != null && k.equal && t.set("filter[provider][eq]", e.filter.provider.equal), (_ = (C = e == null ? void 0 : e.filter) == null ? void 0 : C.provider) != null && _.notEqual && t.set("filter[provider][neq]", e.filter.provider.notEqual), (v = (T = e == null ? void 0 : e.filter) == null ? void 0 : T.provider) != null && v.in && t.set("filter[provider][in]", e.filter.provider.in.join(",")), (M = (N = e == null ? void 0 : e.filter) == null ? void 0 : N.provider) != null && M.notIn && t.set("filter[provider][nin]", e.filter.provider.notIn.join(","));
|
|
1610
1610
|
const a = await this.getJson("/games", t);
|
|
1611
1611
|
return a.ok ? {
|
|
1612
1612
|
ok: !0,
|
|
@@ -1651,12 +1651,12 @@ class kt {
|
|
|
1651
1651
|
data: await r.json()
|
|
1652
1652
|
} : {
|
|
1653
1653
|
ok: !1,
|
|
1654
|
-
error:
|
|
1654
|
+
error: f(r.status)
|
|
1655
1655
|
};
|
|
1656
1656
|
} catch {
|
|
1657
1657
|
return {
|
|
1658
1658
|
ok: !1,
|
|
1659
|
-
error:
|
|
1659
|
+
error: f(500)
|
|
1660
1660
|
};
|
|
1661
1661
|
}
|
|
1662
1662
|
}
|
|
@@ -1727,11 +1727,11 @@ function $(o) {
|
|
|
1727
1727
|
function vt(o) {
|
|
1728
1728
|
const e = [];
|
|
1729
1729
|
function t(a, r = []) {
|
|
1730
|
-
for (const
|
|
1731
|
-
const
|
|
1732
|
-
$(
|
|
1733
|
-
key: [...r,
|
|
1734
|
-
value:
|
|
1730
|
+
for (const c in a) {
|
|
1731
|
+
const s = a[c];
|
|
1732
|
+
$(s) ? t(s, [...r, c]) : Array.isArray(s) ? t(Nt(s), [...r, c]) : e.push({
|
|
1733
|
+
key: [...r, c],
|
|
1734
|
+
value: s
|
|
1735
1735
|
});
|
|
1736
1736
|
}
|
|
1737
1737
|
}
|
|
@@ -1752,7 +1752,7 @@ class E {
|
|
|
1752
1752
|
async request(e, t) {
|
|
1753
1753
|
const a = JSON.stringify({ query: e, variables: t }), r = new Headers(this.options.headers);
|
|
1754
1754
|
r.set("Content-Type", "application/json"), r.set("Accept", "application/json");
|
|
1755
|
-
const
|
|
1755
|
+
const c = await this.runMiddlewares(
|
|
1756
1756
|
new Request(this.url, {
|
|
1757
1757
|
...this.options,
|
|
1758
1758
|
body: a,
|
|
@@ -1760,13 +1760,13 @@ class E {
|
|
|
1760
1760
|
method: "POST"
|
|
1761
1761
|
})
|
|
1762
1762
|
);
|
|
1763
|
-
return await this.exec(
|
|
1763
|
+
return await this.exec(c);
|
|
1764
1764
|
}
|
|
1765
1765
|
/** Single file upload */
|
|
1766
1766
|
async upload(e, t) {
|
|
1767
1767
|
const a = this.createUploadBody(e, t), r = new Headers(this.options.headers);
|
|
1768
1768
|
r.delete("Content-Type");
|
|
1769
|
-
const
|
|
1769
|
+
const c = await this.runMiddlewares(
|
|
1770
1770
|
new Request(this.url, {
|
|
1771
1771
|
...this.options,
|
|
1772
1772
|
body: a,
|
|
@@ -1774,26 +1774,26 @@ class E {
|
|
|
1774
1774
|
method: "POST"
|
|
1775
1775
|
})
|
|
1776
1776
|
);
|
|
1777
|
-
return await this.exec(
|
|
1777
|
+
return await this.exec(c);
|
|
1778
1778
|
}
|
|
1779
1779
|
async exec(e) {
|
|
1780
|
-
var t, a, r,
|
|
1780
|
+
var t, a, r, c, s, p;
|
|
1781
1781
|
try {
|
|
1782
|
-
const
|
|
1783
|
-
if (!
|
|
1784
|
-
return { ok: !1, error:
|
|
1785
|
-
const
|
|
1786
|
-
return
|
|
1782
|
+
const u = await fetch(e);
|
|
1783
|
+
if (!u.ok)
|
|
1784
|
+
return { ok: !1, error: f(u.status) };
|
|
1785
|
+
const h = await u.json(), w = h.data, l = (t = h.errors) == null ? void 0 : t.at(0);
|
|
1786
|
+
return l ? ((a = l.extensions) == null ? void 0 : a.code) === "FORBIDDEN" || ((r = l.extensions) == null ? void 0 : r.code) === "ACCESS_TOKEN_EXPIRED" ? { ok: !1, error: f(403, l.message) } : ((c = l.extensions) == null ? void 0 : c.code) === "UNAUTHORIZED" ? { ok: !1, error: f(401, l.message) } : ((s = l.extensions) == null ? void 0 : s.code) === "BAD_USER_INPUT" || ((p = l.extensions) == null ? void 0 : p.code) === "BAD_REQUEST" ? { ok: !1, error: f(400, l.message) } : {
|
|
1787
1787
|
ok: !1,
|
|
1788
|
-
error:
|
|
1788
|
+
error: f(500, l.message)
|
|
1789
1789
|
} : {
|
|
1790
1790
|
ok: !0,
|
|
1791
|
-
data:
|
|
1791
|
+
data: w
|
|
1792
1792
|
};
|
|
1793
1793
|
} catch {
|
|
1794
1794
|
return {
|
|
1795
1795
|
ok: !1,
|
|
1796
|
-
error:
|
|
1796
|
+
error: f(500)
|
|
1797
1797
|
};
|
|
1798
1798
|
}
|
|
1799
1799
|
}
|
|
@@ -1805,7 +1805,7 @@ class E {
|
|
|
1805
1805
|
}
|
|
1806
1806
|
createUploadBody(e, t) {
|
|
1807
1807
|
const a = vt(t).filter(
|
|
1808
|
-
(
|
|
1808
|
+
(s) => s.value instanceof File || s.value instanceof Blob
|
|
1809
1809
|
), r = new FormData();
|
|
1810
1810
|
r.append(
|
|
1811
1811
|
"operations",
|
|
@@ -1814,17 +1814,17 @@ class E {
|
|
|
1814
1814
|
variables: t
|
|
1815
1815
|
})
|
|
1816
1816
|
);
|
|
1817
|
-
const
|
|
1818
|
-
return a.forEach((
|
|
1819
|
-
|
|
1820
|
-
}), r.append("map", JSON.stringify(
|
|
1821
|
-
r.append(
|
|
1817
|
+
const c = {};
|
|
1818
|
+
return a.forEach((s, p) => {
|
|
1819
|
+
c[p.toString()] = [`variables.${s.key.join(".")}`];
|
|
1820
|
+
}), r.append("map", JSON.stringify(c)), a.forEach((s, p) => {
|
|
1821
|
+
r.append(p.toString(), s.value);
|
|
1822
1822
|
}), r;
|
|
1823
1823
|
}
|
|
1824
1824
|
}
|
|
1825
1825
|
async function g(o) {
|
|
1826
1826
|
const e = new TextEncoder().encode(o), t = await crypto.subtle.digest("SHA-256", e);
|
|
1827
|
-
return Array.from(new Uint8Array(t)).map((
|
|
1827
|
+
return Array.from(new Uint8Array(t)).map((c) => c.toString(16).padStart(2, "0")).join("");
|
|
1828
1828
|
}
|
|
1829
1829
|
class ke {
|
|
1830
1830
|
constructor(e) {
|
|
@@ -1870,11 +1870,11 @@ function we(o, e) {
|
|
|
1870
1870
|
maxAttempt: r = 3
|
|
1871
1871
|
/**/
|
|
1872
1872
|
} = e;
|
|
1873
|
-
async function s
|
|
1874
|
-
const
|
|
1875
|
-
return t(
|
|
1873
|
+
async function c(s, p) {
|
|
1874
|
+
const u = p ?? r, h = await o(...s);
|
|
1875
|
+
return t(h) ? h : u > 1 ? (await Ce(a * ((r - u) / 2)), c(s, u - 1)) : h;
|
|
1876
1876
|
}
|
|
1877
|
-
return async (...
|
|
1877
|
+
return async (...s) => await c(s);
|
|
1878
1878
|
}
|
|
1879
1879
|
function P(o, e) {
|
|
1880
1880
|
const t = B(o);
|
|
@@ -1907,6 +1907,7 @@ class Mt {
|
|
|
1907
1907
|
this._refreshing = e;
|
|
1908
1908
|
}
|
|
1909
1909
|
async create(e) {
|
|
1910
|
+
var r;
|
|
1910
1911
|
if (this.isServer)
|
|
1911
1912
|
return this.logger.warn("'localStorage' is not available on the server."), {
|
|
1912
1913
|
ok: !1,
|
|
@@ -1917,27 +1918,35 @@ class Mt {
|
|
|
1917
1918
|
};
|
|
1918
1919
|
if (e.type === "MAYA") {
|
|
1919
1920
|
const s = await we(() => this.walletService.mayaSession({ id: e.sessionId }), {
|
|
1920
|
-
until: (
|
|
1921
|
-
var
|
|
1922
|
-
return
|
|
1921
|
+
until: (w) => {
|
|
1922
|
+
var l;
|
|
1923
|
+
return w.ok && ((l = w.data) == null ? void 0 : l.member) != null;
|
|
1923
1924
|
},
|
|
1924
1925
|
interval: 1e3,
|
|
1925
1926
|
maxAttempt: 5
|
|
1926
1927
|
})();
|
|
1927
1928
|
if (!s.ok) return s;
|
|
1929
|
+
if (!((r = s.data) != null && r.member))
|
|
1930
|
+
return {
|
|
1931
|
+
ok: !1,
|
|
1932
|
+
error: {
|
|
1933
|
+
name: "HttpForbidden",
|
|
1934
|
+
message: "Forbidden"
|
|
1935
|
+
}
|
|
1936
|
+
};
|
|
1928
1937
|
const u = await we(() => this.authService.createSession(e), {
|
|
1929
|
-
until: (
|
|
1938
|
+
until: (w) => w.ok,
|
|
1930
1939
|
interval: 1e3,
|
|
1931
1940
|
maxAttempt: 5
|
|
1932
1941
|
})();
|
|
1933
1942
|
if (!u.ok) return u;
|
|
1934
|
-
const
|
|
1943
|
+
const h = /* @__PURE__ */ new Date();
|
|
1935
1944
|
return window.localStorage.setItem(
|
|
1936
1945
|
this.storageKey,
|
|
1937
1946
|
JSON.stringify({
|
|
1938
1947
|
...u.data,
|
|
1939
|
-
accessTokenExpiresAt: R(
|
|
1940
|
-
refreshTokenExpiresAt: P(D(
|
|
1948
|
+
accessTokenExpiresAt: R(h, 8).getTime(),
|
|
1949
|
+
refreshTokenExpiresAt: P(D(h, 30), 2).getTime()
|
|
1941
1950
|
})
|
|
1942
1951
|
), {
|
|
1943
1952
|
ok: !0,
|
|
@@ -1945,13 +1954,13 @@ class Mt {
|
|
|
1945
1954
|
};
|
|
1946
1955
|
}
|
|
1947
1956
|
if (e.type === "MOBILE_NUMBER") {
|
|
1948
|
-
const
|
|
1949
|
-
if (
|
|
1957
|
+
const c = await this.authService.createSession(e);
|
|
1958
|
+
if (c.ok) {
|
|
1950
1959
|
const s = /* @__PURE__ */ new Date();
|
|
1951
1960
|
return window.localStorage.setItem(
|
|
1952
1961
|
this.storageKey,
|
|
1953
1962
|
JSON.stringify({
|
|
1954
|
-
...
|
|
1963
|
+
...c.data,
|
|
1955
1964
|
accessTokenExpiresAt: R(s, 8).getTime(),
|
|
1956
1965
|
refreshTokenExpiresAt: P(D(s, 30), 2).getTime()
|
|
1957
1966
|
})
|
|
@@ -1960,7 +1969,7 @@ class Mt {
|
|
|
1960
1969
|
data: null
|
|
1961
1970
|
};
|
|
1962
1971
|
}
|
|
1963
|
-
return
|
|
1972
|
+
return c;
|
|
1964
1973
|
}
|
|
1965
1974
|
const t = await this.authService.createSession(e);
|
|
1966
1975
|
if (!t.ok) return t;
|
|
@@ -2015,8 +2024,8 @@ class Mt {
|
|
|
2015
2024
|
};
|
|
2016
2025
|
try {
|
|
2017
2026
|
let t = JSON.parse(e), a = /* @__PURE__ */ new Date();
|
|
2018
|
-
const r = new Date(t.accessTokenExpiresAt),
|
|
2019
|
-
if (he(a,
|
|
2027
|
+
const r = new Date(t.accessTokenExpiresAt), c = new Date(t.refreshTokenExpiresAt);
|
|
2028
|
+
if (he(a, c))
|
|
2020
2029
|
return this.logger.warn("Session expired. Logging out.."), window.localStorage.removeItem(this.storageKey), {
|
|
2021
2030
|
ok: !1,
|
|
2022
2031
|
error: {
|
|
@@ -2026,18 +2035,18 @@ class Mt {
|
|
|
2026
2035
|
};
|
|
2027
2036
|
if (he(a, r)) {
|
|
2028
2037
|
this.logger.info("Refreshing session..."), this.refreshing = !0;
|
|
2029
|
-
const
|
|
2030
|
-
if (this.refreshing = !1, !
|
|
2031
|
-
return this.logger.error(`Failed to refresh session: ${
|
|
2038
|
+
const s = await this.authService.refreshSession(t.refreshToken);
|
|
2039
|
+
if (this.refreshing = !1, !s.ok)
|
|
2040
|
+
return this.logger.error(`Failed to refresh session: ${s.error.message}`), s.error.name === "InvalidToken" || s.error.name === "AccountBlacklisted" ? (window.localStorage.removeItem(this.storageKey), {
|
|
2032
2041
|
ok: !1,
|
|
2033
|
-
error:
|
|
2042
|
+
error: s.error
|
|
2034
2043
|
}) : (this.logger.warn("Old session returned."), {
|
|
2035
2044
|
ok: !0,
|
|
2036
2045
|
data: t
|
|
2037
2046
|
});
|
|
2038
2047
|
this.logger.success("Session refreshed!"), a = /* @__PURE__ */ new Date(), t = {
|
|
2039
2048
|
...t,
|
|
2040
|
-
...
|
|
2049
|
+
...s.data,
|
|
2041
2050
|
accessTokenExpiresAt: R(a, 8).getTime(),
|
|
2042
2051
|
refreshTokenExpiresAt: P(D(a, 30), 2).getTime()
|
|
2043
2052
|
}, window.localStorage.setItem(this.storageKey, JSON.stringify(t));
|
|
@@ -2066,11 +2075,11 @@ class Mt {
|
|
|
2066
2075
|
(t = e.data) != null && t.accessToken && await this.authService.destroySession(e.data.accessToken), window.localStorage.removeItem(this.storageKey);
|
|
2067
2076
|
}
|
|
2068
2077
|
async verify() {
|
|
2069
|
-
var a, r,
|
|
2078
|
+
var a, r, c;
|
|
2070
2079
|
if (this.isServer)
|
|
2071
2080
|
return this.logger.warn("'localStorage' is not available on the server."), !0;
|
|
2072
2081
|
const e = await this.get();
|
|
2073
|
-
if (((a = e.error) == null ? void 0 : a.name) === "InvalidToken" || ((r = e.error) == null ? void 0 : r.name) === "SessionExpired" || ((
|
|
2082
|
+
if (((a = e.error) == null ? void 0 : a.name) === "InvalidToken" || ((r = e.error) == null ? void 0 : r.name) === "SessionExpired" || ((c = e.error) == null ? void 0 : c.name) === "AccountBlacklisted") return !1;
|
|
2074
2083
|
if (!e.data) return !0;
|
|
2075
2084
|
const t = await this.authService.verifySession(e.data.accessToken);
|
|
2076
2085
|
return t || window.localStorage.removeItem(this.storageKey), t;
|
|
@@ -2079,17 +2088,17 @@ class Mt {
|
|
|
2079
2088
|
return typeof window > "u";
|
|
2080
2089
|
}
|
|
2081
2090
|
}
|
|
2082
|
-
function
|
|
2091
|
+
function y(o) {
|
|
2083
2092
|
const e = {};
|
|
2084
2093
|
for (const t in o) {
|
|
2085
2094
|
const a = o[t];
|
|
2086
2095
|
if (a !== null && a !== void 0) {
|
|
2087
2096
|
if ($(a)) {
|
|
2088
|
-
e[t] =
|
|
2097
|
+
e[t] = y(a);
|
|
2089
2098
|
continue;
|
|
2090
2099
|
}
|
|
2091
2100
|
if (Array.isArray(a)) {
|
|
2092
|
-
e[t] = a.map((r) => $(r) ?
|
|
2101
|
+
e[t] = a.map((r) => $(r) ? y(r) : r);
|
|
2093
2102
|
continue;
|
|
2094
2103
|
}
|
|
2095
2104
|
e[t] = a;
|
|
@@ -2150,10 +2159,10 @@ class It {
|
|
|
2150
2159
|
name: e.name,
|
|
2151
2160
|
logo: e.logo ?? void 0
|
|
2152
2161
|
};
|
|
2153
|
-
return
|
|
2162
|
+
return y(t);
|
|
2154
2163
|
}
|
|
2155
2164
|
platform(e) {
|
|
2156
|
-
var t, a, r, s,
|
|
2165
|
+
var t, a, r, c, s, p, u, h, w, l, A, k, C, _, T, v, N, M, I, U, O, q, F, L, V, Y, H, j, Q, K, z, J, X, Z, ee, te, ae, re, oe, ne, ie, se, ce, de, me, ue, le, pe, fe;
|
|
2157
2166
|
return {
|
|
2158
2167
|
paymentSettings: {
|
|
2159
2168
|
minimumFirstDepositAmount: i(e.minimumFirstDepositAmount),
|
|
@@ -2163,15 +2172,15 @@ class It {
|
|
|
2163
2172
|
androidEnabled: ((t = e.bankDepositGatewaySettings) == null ? void 0 : t.androidEnabled) ?? !1,
|
|
2164
2173
|
iosEnabled: ((a = e.bankDepositGatewaySettings) == null ? void 0 : a.iosEnabled) ?? !1,
|
|
2165
2174
|
webEnabled: ((r = e.bankDepositGatewaySettings) == null ? void 0 : r.webEnabled) ?? !1,
|
|
2166
|
-
mobileWebEnabled: ((
|
|
2167
|
-
minimumAmount: i((
|
|
2168
|
-
maximumAmount: i((
|
|
2175
|
+
mobileWebEnabled: ((c = e.bankDepositGatewaySettings) == null ? void 0 : c.mobileWebEnabled) ?? !1,
|
|
2176
|
+
minimumAmount: i((s = e.bankDepositGatewaySettings) == null ? void 0 : s.minimumAmount),
|
|
2177
|
+
maximumAmount: i((p = e.bankDepositGatewaySettings) == null ? void 0 : p.maximumAmount)
|
|
2169
2178
|
},
|
|
2170
2179
|
gcash: {
|
|
2171
|
-
androidEnabled: ((
|
|
2172
|
-
iosEnabled: ((
|
|
2173
|
-
webEnabled: ((
|
|
2174
|
-
mobileWebEnabled: ((
|
|
2180
|
+
androidEnabled: ((u = e.gcashDepositGatewaySettings) == null ? void 0 : u.androidEnabled) ?? !1,
|
|
2181
|
+
iosEnabled: ((h = e.gcashDepositGatewaySettings) == null ? void 0 : h.iosEnabled) ?? !1,
|
|
2182
|
+
webEnabled: ((w = e.gcashDepositGatewaySettings) == null ? void 0 : w.webEnabled) ?? !1,
|
|
2183
|
+
mobileWebEnabled: ((l = e.gcashDepositGatewaySettings) == null ? void 0 : l.mobileWebEnabled) ?? !1,
|
|
2175
2184
|
minimumAmount: i((A = e.gcashDepositGatewaySettings) == null ? void 0 : A.minimumAmount),
|
|
2176
2185
|
maximumAmount: i((k = e.gcashDepositGatewaySettings) == null ? void 0 : k.maximumAmount)
|
|
2177
2186
|
},
|
|
@@ -2259,7 +2268,7 @@ class It {
|
|
|
2259
2268
|
dateTimeCreated: new Date(e.dateTimeCreated),
|
|
2260
2269
|
dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
|
|
2261
2270
|
};
|
|
2262
|
-
return
|
|
2271
|
+
return y(t);
|
|
2263
2272
|
}
|
|
2264
2273
|
wallet(e) {
|
|
2265
2274
|
return {
|
|
@@ -2322,7 +2331,7 @@ class It {
|
|
|
2322
2331
|
dateTimeCreated: new Date(e.dateTimeCreated),
|
|
2323
2332
|
dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
|
|
2324
2333
|
};
|
|
2325
|
-
return
|
|
2334
|
+
return y(t);
|
|
2326
2335
|
}
|
|
2327
2336
|
deposit(e) {
|
|
2328
2337
|
const t = {
|
|
@@ -2331,7 +2340,7 @@ class It {
|
|
|
2331
2340
|
status: e.status,
|
|
2332
2341
|
checkoutUrl: e.checkoutUrl ?? void 0
|
|
2333
2342
|
};
|
|
2334
|
-
return
|
|
2343
|
+
return y(t);
|
|
2335
2344
|
}
|
|
2336
2345
|
depositRecord(e) {
|
|
2337
2346
|
const t = {
|
|
@@ -2346,7 +2355,7 @@ class It {
|
|
|
2346
2355
|
dateTimeCreated: new Date(e.dateTimeCreated),
|
|
2347
2356
|
dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
|
|
2348
2357
|
};
|
|
2349
|
-
return
|
|
2358
|
+
return y(t);
|
|
2350
2359
|
}
|
|
2351
2360
|
betRecord(e) {
|
|
2352
2361
|
var a;
|
|
@@ -2372,7 +2381,7 @@ class It {
|
|
|
2372
2381
|
odds: ((a = e.metadata) == null ? void 0 : a.odds) ?? void 0
|
|
2373
2382
|
}
|
|
2374
2383
|
};
|
|
2375
|
-
return
|
|
2384
|
+
return y(t);
|
|
2376
2385
|
}
|
|
2377
2386
|
latestBetRecord(e) {
|
|
2378
2387
|
return {
|
|
@@ -2396,7 +2405,7 @@ class It {
|
|
|
2396
2405
|
referenceNumber: e.referenceNumber,
|
|
2397
2406
|
dateTimeCreated: new Date(e.dateTimeCreated)
|
|
2398
2407
|
};
|
|
2399
|
-
return
|
|
2408
|
+
return y(t);
|
|
2400
2409
|
}
|
|
2401
2410
|
game(e) {
|
|
2402
2411
|
return {
|
|
@@ -2428,7 +2437,7 @@ class It {
|
|
|
2428
2437
|
dateTimeCreated: new Date(e.dateTimeCreated),
|
|
2429
2438
|
dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
|
|
2430
2439
|
};
|
|
2431
|
-
return
|
|
2440
|
+
return y(t);
|
|
2432
2441
|
}
|
|
2433
2442
|
promo(e) {
|
|
2434
2443
|
return {
|
|
@@ -2488,7 +2497,7 @@ class It {
|
|
|
2488
2497
|
dateTimeCreated: new Date(e.dateTimeCreated),
|
|
2489
2498
|
dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
|
|
2490
2499
|
};
|
|
2491
|
-
return
|
|
2500
|
+
return y(t);
|
|
2492
2501
|
}
|
|
2493
2502
|
cashbackBonus(e) {
|
|
2494
2503
|
return {
|
|
@@ -2506,7 +2515,7 @@ class It {
|
|
|
2506
2515
|
status: e.status,
|
|
2507
2516
|
dateTimeCreated: new Date(e.dateTimeCreated)
|
|
2508
2517
|
};
|
|
2509
|
-
return
|
|
2518
|
+
return y(t);
|
|
2510
2519
|
}
|
|
2511
2520
|
pointsWallet(e) {
|
|
2512
2521
|
return {
|
|
@@ -3169,9 +3178,9 @@ class Pt {
|
|
|
3169
3178
|
return t.ok ? {
|
|
3170
3179
|
ok: !0,
|
|
3171
3180
|
data: {
|
|
3172
|
-
betRecords: t.data.edges.map(({ cursor:
|
|
3173
|
-
...this.transformer.transform.betRecord(
|
|
3174
|
-
cursor:
|
|
3181
|
+
betRecords: t.data.edges.map(({ cursor: c, node: s }) => ({
|
|
3182
|
+
...this.transformer.transform.betRecord(s),
|
|
3183
|
+
cursor: c
|
|
3175
3184
|
})),
|
|
3176
3185
|
totalCount: t.data.totalCount,
|
|
3177
3186
|
endCursor: t.data.pageInfo.endCursor ?? void 0,
|
|
@@ -3397,8 +3406,8 @@ class Pt {
|
|
|
3397
3406
|
/**/
|
|
3398
3407
|
type: a,
|
|
3399
3408
|
provider: r,
|
|
3400
|
-
externalId:
|
|
3401
|
-
} = t.data,
|
|
3409
|
+
externalId: c
|
|
3410
|
+
} = t.data, s = a === "SPORTS" ? e.id ?? (await b.generateFromKey(S.Game, `SPORTS:${r}`)).toString() : e.id ?? b.generate(S.GameSession).toString(), u = [
|
|
3402
3411
|
/**/
|
|
3403
3412
|
"RTG",
|
|
3404
3413
|
"DARWIN",
|
|
@@ -3407,8 +3416,8 @@ class Pt {
|
|
|
3407
3416
|
"EVOLUTION",
|
|
3408
3417
|
"EVOLUTION_NETENT",
|
|
3409
3418
|
"EVOLUTION_REDTIGER"
|
|
3410
|
-
].includes(r) ? await this.walletService.createGameSession({ input: { id:
|
|
3411
|
-
return
|
|
3419
|
+
].includes(r) ? await this.walletService.createGameSession({ input: { id: s, game: c } }) : await this.gameService.createGameSession({ input: { id: s, game: c } });
|
|
3420
|
+
return u.ok ? { ok: !0, data: { id: s } } : u;
|
|
3412
3421
|
}
|
|
3413
3422
|
/** @deprecated use `endGameSession__next` */
|
|
3414
3423
|
async endGameSession(e) {
|