@opexa/portal-sdk 0.0.83 → 0.0.84

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.mjs CHANGED
@@ -2,7 +2,7 @@ var _e = Object.defineProperty;
2
2
  var Te = (o, e, t) => e in o ? _e(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
3
3
  var d = (o, e, t) => Te(o, typeof e != "symbol" ? e + "" : e, t);
4
4
  import { ObjectId as k } from "@opexa/object-id";
5
- import { ObjectId as jt } from "@opexa/object-id";
5
+ import { ObjectId as Yt } from "@opexa/object-id";
6
6
  const _ = {
7
7
  Account: 8,
8
8
  Deposit: 9,
@@ -107,7 +107,7 @@ const L = n`
107
107
  }
108
108
  }
109
109
  }
110
- `, be = {
110
+ `, Ee = {
111
111
  current: n`
112
112
  query GameSession($id: ObjectId!) {
113
113
  node(id: $id) {
@@ -138,7 +138,7 @@ const L = n`
138
138
  }
139
139
  }
140
140
  `
141
- }, Ee = n`
141
+ }, be = n`
142
142
  mutation CreateGameSession($input: CreateGameSessionInput!) {
143
143
  createGameSession(input: $input) {
144
144
  ... on GameDoesNotExistError {
@@ -1063,11 +1063,11 @@ const tt = n`
1063
1063
  }
1064
1064
  }
1065
1065
  }
1066
- `, bt = n`
1066
+ `, Et = n`
1067
1067
  query ReferralCode {
1068
1068
  referralCode
1069
1069
  }
1070
- `, Et = n`
1070
+ `, bt = n`
1071
1071
  mutation UpdateReferralCode($input: UpdateReferralCodeInput!) {
1072
1072
  updateReferralCode(input: $input) {
1073
1073
  ... on ReferralCodeNotAvailableError {
@@ -1198,11 +1198,11 @@ function m(o) {
1198
1198
  GameSessionAlreadyClosedError: "Game session is already closed",
1199
1199
  GameSessionDoesNotExistError: "Game session does not exist",
1200
1200
  ReferralCodeNotAvailableError: "Referral code is no longer available",
1201
- AccountBlacklisted: "Account is blacklisted",
1202
- AccountNotFound: "Account not found",
1203
- InvalidToken: "Invalid token",
1204
- InvalidTokenOrSecretAnswer: "Invalid token or secret answer",
1205
- SessionExpired: "Session expired"
1201
+ AccountBlacklistedError: "Account is blacklisted",
1202
+ InvalidTokenError: "Invalid token",
1203
+ InvalidTokenOrSecretAnswerError: "Invalid token or secret answer",
1204
+ SessionExpiredError: "Session expired",
1205
+ RateLimitExceededError: "Maximum number of requests reached"
1206
1206
  }[o]
1207
1207
  };
1208
1208
  }
@@ -1350,14 +1350,14 @@ class _t {
1350
1350
  } : t;
1351
1351
  }
1352
1352
  async referralCode() {
1353
- const e = await this.client.request(bt);
1353
+ const e = await this.client.request(Et);
1354
1354
  return e.ok ? {
1355
1355
  ok: !0,
1356
1356
  data: e.data.referralCode
1357
1357
  } : e;
1358
1358
  }
1359
1359
  async updateReferralCode(e) {
1360
- const t = await this.client.request(Et, e);
1360
+ const t = await this.client.request(bt, e);
1361
1361
  return t.ok ? t.data.updateReferralCode ? {
1362
1362
  ok: !1,
1363
1363
  error: m(t.data.updateReferralCode.__typename)
@@ -1366,7 +1366,7 @@ class _t {
1366
1366
  } : t;
1367
1367
  }
1368
1368
  }
1369
- function E(o) {
1369
+ function b(o) {
1370
1370
  return o.startsWith("+63") ? o : o.startsWith("63") ? `+${o}` : o.startsWith("0") ? `+63${o.substring(1)}` : `+63${o}`;
1371
1371
  }
1372
1372
  function h(o, e) {
@@ -1402,7 +1402,7 @@ class Tt {
1402
1402
  t.set("Authorization", `Basic ${a}`);
1403
1403
  }
1404
1404
  if (e.mobileNumber) {
1405
- const a = `${E(e.mobileNumber)}:${e.verificationCode}`, s = Buffer.from(a).toString("base64");
1405
+ const a = `${b(e.mobileNumber)}:${e.verificationCode}`, s = Buffer.from(a).toString("base64");
1406
1406
  console.log(`MobileNumberOTP ${s}`), t.set("Authorization", `MobileNumberOTP ${s}`);
1407
1407
  }
1408
1408
  e.sessionId && t.set("Authorization", `MayaSession ${e.sessionId}`);
@@ -1416,7 +1416,7 @@ class Tt {
1416
1416
  data: a
1417
1417
  } : a.code === "ACCOUNT_BLACKLISTED" ? {
1418
1418
  ok: !1,
1419
- error: m("AccountBlacklisted")
1419
+ error: m("AccountBlacklistedError")
1420
1420
  } : {
1421
1421
  ok: !1,
1422
1422
  error: h(r.status)
@@ -1445,7 +1445,7 @@ class Tt {
1445
1445
  data: a
1446
1446
  } : r.status === 401 || r.status === 403 ? {
1447
1447
  ok: !1,
1448
- error: m("InvalidTokenOrSecretAnswer")
1448
+ error: m("InvalidTokenOrSecretAnswerError")
1449
1449
  } : {
1450
1450
  ok: !1,
1451
1451
  error: h(r.status)
@@ -1472,10 +1472,10 @@ class Tt {
1472
1472
  data: a
1473
1473
  } : a.code === "ACCOUNT_BLACKLISTED" ? {
1474
1474
  ok: !1,
1475
- error: m("AccountBlacklisted")
1475
+ error: m("AccountBlacklistedError")
1476
1476
  } : r.status === 403 || r.status === 401 ? {
1477
1477
  ok: !1,
1478
- error: m("InvalidToken")
1478
+ error: m("InvalidTokenError")
1479
1479
  } : {
1480
1480
  ok: !1,
1481
1481
  error: h(r.status)
@@ -1514,25 +1514,29 @@ class Tt {
1514
1514
  }
1515
1515
  async sendVerificationCode(e) {
1516
1516
  if (e.channel === "EMAIL") throw new Error("Email channel is not yet supported");
1517
+ function t(r) {
1518
+ let a = null;
1519
+ return r === "MEMBER_NOT_FOUND" && (a = "AccountNotFoundError"), r === "RATE_LIMIT_REACH" && (a = "RateLimitExceededError"), r === "NOT_READY_TO_SEND_VERIFICATION_ERROR" && (a = "NotReadyToSendVerficationCodeError"), a;
1520
+ }
1517
1521
  try {
1518
- const t = await fetch(`${this.url}/otps`, {
1522
+ const r = await fetch(`${this.url}/otps`, {
1519
1523
  method: "POST",
1520
1524
  headers: this.headers,
1521
1525
  body: JSON.stringify(e)
1522
1526
  });
1523
- if (t.status === 403) {
1524
- const r = await t.json(), a = vt(r.message);
1525
- return a ? {
1527
+ if (r.status === 403) {
1528
+ const a = await r.json(), s = t(a.message);
1529
+ return s ? {
1526
1530
  ok: !1,
1527
- error: m(a)
1531
+ error: m(s)
1528
1532
  } : {
1529
1533
  ok: !1,
1530
- error: h(t.status, r.message)
1534
+ error: h(r.status, a.message)
1531
1535
  };
1532
1536
  }
1533
- return t.ok ? { ok: !0 } : {
1537
+ return r.ok ? { ok: !0 } : {
1534
1538
  ok: !1,
1535
- error: h(t.status)
1539
+ error: h(r.status)
1536
1540
  };
1537
1541
  } catch {
1538
1542
  return {
@@ -1542,11 +1546,7 @@ class Tt {
1542
1546
  }
1543
1547
  }
1544
1548
  }
1545
- function vt(o) {
1546
- let e = null;
1547
- return o === "NOT_READY_TO_SEND_VERIFICATION_ERROR" && (e = "NotReadyToSendVerficationCodeError"), o === "MEMBER_NOT_FOUND" && (e = "AccountNotFound"), e;
1548
- }
1549
- class Mt {
1549
+ class vt {
1550
1550
  constructor(e) {
1551
1551
  d(this, "url");
1552
1552
  d(this, "siteId");
@@ -1561,9 +1561,9 @@ class Mt {
1561
1561
  } : e;
1562
1562
  }
1563
1563
  async games(e) {
1564
- var a, s, c, u, l, p, w, f, T, v, M, R, N, b, I, D, S, P, $, x, C, G, O, W;
1564
+ var a, s, c, u, l, p, w, f, T, v, M, R, N, E, I, D, S, P, $, x, C, G, O, W;
1565
1565
  const t = new URLSearchParams();
1566
- 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), (p = (l = e == null ? void 0 : e.filter) == null ? void 0 : l.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(",")), (v = (T = e == null ? void 0 : e.filter) == null ? void 0 : T.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(
1566
+ 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), (p = (l = e == null ? void 0 : e.filter) == null ? void 0 : l.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(",")), (v = (T = e == null ? void 0 : e.filter) == null ? void 0 : T.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), (E = (N = e == null ? void 0 : e.filter) == null ? void 0 : N.provider) != null && E.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(
1567
1567
  "filter[tags][in]",
1568
1568
  e.filter.tags.in.map((A) => A.toLowerCase()).join(",")
1569
1569
  ), (W = (O = e == null ? void 0 : e.filter) == null ? void 0 : O.tags) != null && W.notIn && t.set(
@@ -1624,7 +1624,7 @@ class Mt {
1624
1624
  }
1625
1625
  }
1626
1626
  }
1627
- class Rt {
1627
+ class Mt {
1628
1628
  constructor(e) {
1629
1629
  d(this, "client");
1630
1630
  this.client = e;
@@ -1646,14 +1646,14 @@ class Rt {
1646
1646
  } : t;
1647
1647
  }
1648
1648
  }
1649
- class Nt {
1649
+ class Rt {
1650
1650
  constructor(e) {
1651
1651
  d(this, "client");
1652
1652
  this.client = e;
1653
1653
  }
1654
1654
  async gameSession(e) {
1655
1655
  const t = await this.client.request(
1656
- be.legacy,
1656
+ Ee.legacy,
1657
1657
  e
1658
1658
  );
1659
1659
  return t.ok ? {
@@ -1662,7 +1662,7 @@ class Nt {
1662
1662
  } : t;
1663
1663
  }
1664
1664
  async createGameSession(e) {
1665
- const t = await this.client.request(Ee, e);
1665
+ const t = await this.client.request(be, e);
1666
1666
  return t.ok ? t.data.createGameSession ? {
1667
1667
  ok: !1,
1668
1668
  error: m(t.data.createGameSession.__typename)
@@ -1683,7 +1683,7 @@ class Nt {
1683
1683
  } : t;
1684
1684
  }
1685
1685
  }
1686
- class It {
1686
+ class Nt {
1687
1687
  constructor(e) {
1688
1688
  d(this, "client");
1689
1689
  this.client = e;
@@ -1696,7 +1696,7 @@ class It {
1696
1696
  } : e;
1697
1697
  }
1698
1698
  }
1699
- class Dt {
1699
+ class It {
1700
1700
  constructor(e) {
1701
1701
  d(this, "client");
1702
1702
  this.client = e;
@@ -1767,7 +1767,7 @@ class Dt {
1767
1767
  return t.ok ? { ok: t.ok, data: t.data.downlinesByName } : t;
1768
1768
  }
1769
1769
  }
1770
- class Pt {
1770
+ class Dt {
1771
1771
  constructor(e) {
1772
1772
  d(this, "url");
1773
1773
  this.url = e.url;
@@ -1779,7 +1779,7 @@ class Pt {
1779
1779
  ];
1780
1780
  }
1781
1781
  }
1782
- class $t {
1782
+ class Pt {
1783
1783
  constructor(e) {
1784
1784
  d(this, "client");
1785
1785
  this.client = e;
@@ -1921,13 +1921,13 @@ class $t {
1921
1921
  }
1922
1922
  async gameSession(e) {
1923
1923
  const t = await this.client.request(
1924
- be.current,
1924
+ Ee.current,
1925
1925
  e
1926
1926
  );
1927
1927
  return t.ok ? { ok: !0, data: t.data.node } : t;
1928
1928
  }
1929
1929
  async createGameSession(e) {
1930
- const t = await this.client.request(Ee, e);
1930
+ const t = await this.client.request(be, e);
1931
1931
  return t.ok ? t.data.createGameSession ? {
1932
1932
  ok: !1,
1933
1933
  error: m(t.data.createGameSession.__typename)
@@ -1965,18 +1965,18 @@ class $t {
1965
1965
  } : e;
1966
1966
  }
1967
1967
  }
1968
- function xt(o, e, t) {
1968
+ function $t(o, e, t) {
1969
1969
  return o < e ? e : o > t ? t : o;
1970
1970
  }
1971
1971
  function H(o) {
1972
1972
  return Object.prototype.toString.call(o) === "[object Object]" && Object(o) === o;
1973
1973
  }
1974
- function Gt(o) {
1974
+ function xt(o) {
1975
1975
  const e = [];
1976
1976
  function t(r, a = []) {
1977
1977
  for (const s in r) {
1978
1978
  const c = r[s];
1979
- H(c) ? t(c, [...a, s]) : Array.isArray(c) ? t(Ut(c), [...a, s]) : e.push({
1979
+ H(c) ? t(c, [...a, s]) : Array.isArray(c) ? t(Gt(c), [...a, s]) : e.push({
1980
1980
  key: [...a, s],
1981
1981
  value: c
1982
1982
  });
@@ -1984,7 +1984,7 @@ function Gt(o) {
1984
1984
  }
1985
1985
  return t(o), e;
1986
1986
  }
1987
- function Ut(o) {
1987
+ function Gt(o) {
1988
1988
  return o.reduce((e, t, r) => (e[r] = t, e), {});
1989
1989
  }
1990
1990
  class U {
@@ -2051,7 +2051,7 @@ class U {
2051
2051
  return t;
2052
2052
  }
2053
2053
  createUploadBody(e, t) {
2054
- const r = Gt(t).filter(
2054
+ const r = xt(t).filter(
2055
2055
  (c) => c.value instanceof File || c.value instanceof Blob
2056
2056
  ), a = new FormData();
2057
2057
  a.append(
@@ -2127,7 +2127,7 @@ function F(o, e) {
2127
2127
  const t = Q(o);
2128
2128
  return t.setMinutes(t.getMinutes() - e), t;
2129
2129
  }
2130
- class Ot {
2130
+ class Ut {
2131
2131
  constructor(e) {
2132
2132
  d(this, "logger");
2133
2133
  d(this, "storageKey", "session");
@@ -2267,7 +2267,7 @@ class Ot {
2267
2267
  return this.logger.warn("Session expired. Logging out.."), window.localStorage.removeItem(this.storageKey), {
2268
2268
  ok: !1,
2269
2269
  error: {
2270
- name: "SessionExpired",
2270
+ name: "SessionExpiredError",
2271
2271
  message: "Session expired."
2272
2272
  }
2273
2273
  };
@@ -2275,7 +2275,7 @@ class Ot {
2275
2275
  this.logger.info("Refreshing session..."), this.refreshing = !0;
2276
2276
  const c = await this.authService.refreshSession(t.refreshToken);
2277
2277
  if (this.refreshing = !1, !c.ok)
2278
- return this.logger.error(`Failed to refresh session: ${c.error.message}`), c.error.name === "InvalidToken" || c.error.name === "AccountBlacklisted" ? (window.localStorage.removeItem(this.storageKey), {
2278
+ return this.logger.error(`Failed to refresh session: ${c.error.message}`), c.error.name === "InvalidTokenError" || c.error.name === "AccountBlacklistedError" ? (window.localStorage.removeItem(this.storageKey), {
2279
2279
  ok: !1,
2280
2280
  error: c.error
2281
2281
  }) : (this.logger.warn("Old session returned."), {
@@ -2317,7 +2317,7 @@ class Ot {
2317
2317
  if (this.isServer)
2318
2318
  return this.logger.warn("'localStorage' is not available on the server."), !0;
2319
2319
  const e = await this.get();
2320
- if (((r = e.error) == null ? void 0 : r.name) === "InvalidToken" || ((a = e.error) == null ? void 0 : a.name) === "SessionExpired" || ((s = e.error) == null ? void 0 : s.name) === "AccountBlacklisted") return !1;
2320
+ 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;
2321
2321
  if (!e.data) return !0;
2322
2322
  const t = await this.authService.verifySession(e.data.accessToken);
2323
2323
  return t || window.localStorage.removeItem(this.storageKey), t;
@@ -2354,11 +2354,11 @@ function i(o, e) {
2354
2354
  }
2355
2355
  return e;
2356
2356
  }
2357
- class Wt {
2357
+ class Ot {
2358
2358
  constructor(e) {
2359
2359
  d(this, "staticService");
2360
2360
  const t = (e == null ? void 0 : e.environment) === "development";
2361
- this.staticService = new Pt({
2361
+ this.staticService = new Dt({
2362
2362
  url: t ? "https://static.development.opexa.io" : "https://static.opexa.io"
2363
2363
  });
2364
2364
  }
@@ -2401,7 +2401,7 @@ class Wt {
2401
2401
  return g(t);
2402
2402
  }
2403
2403
  platform(e) {
2404
- var t, r, a, s, c, u, l, p, w, f, T, v, M, R, N, b, I, D, S, P, $, x, C, G, O, W, A, K, z, J, X, Z, ee, te, re, ae, oe, ne, ie, se, ce, de, me, ue, le, fe, pe, he, we;
2404
+ var t, r, a, s, c, u, l, p, w, f, T, v, M, R, N, E, I, D, S, P, $, x, C, G, O, W, A, K, z, J, X, Z, ee, te, re, ae, oe, ne, ie, se, ce, de, me, ue, le, fe, pe, he, we;
2405
2405
  return {
2406
2406
  timezone: e.timezone,
2407
2407
  currency: e.currency,
@@ -2429,7 +2429,7 @@ class Wt {
2429
2429
  androidEnabled: ((M = e.mayaDepositGatewaySettings) == null ? void 0 : M.androidEnabled) ?? !1,
2430
2430
  iosEnabled: ((R = e.mayaDepositGatewaySettings) == null ? void 0 : R.iosEnabled) ?? !1,
2431
2431
  webEnabled: ((N = e.mayaDepositGatewaySettings) == null ? void 0 : N.webEnabled) ?? !1,
2432
- mobileWebEnabled: ((b = e.mayaDepositGatewaySettings) == null ? void 0 : b.mobileWebEnabled) ?? !1,
2432
+ mobileWebEnabled: ((E = e.mayaDepositGatewaySettings) == null ? void 0 : E.mobileWebEnabled) ?? !1,
2433
2433
  minimumAmount: i((I = e.mayaDepositGatewaySettings) == null ? void 0 : I.minimumAmount),
2434
2434
  maximumAmount: i((D = e.mayaDepositGatewaySettings) == null ? void 0 : D.maximumAmount)
2435
2435
  },
@@ -2816,7 +2816,7 @@ class Wt {
2816
2816
  };
2817
2817
  }
2818
2818
  }
2819
- class Vt {
2819
+ class Lt {
2820
2820
  constructor(e) {
2821
2821
  d(this, "cmsPortalService");
2822
2822
  d(this, "authService");
@@ -2837,16 +2837,16 @@ class Vt {
2837
2837
  environment: s,
2838
2838
  logs: c
2839
2839
  } = e, u = s === "production";
2840
- this.transformer = new Wt({
2840
+ this.transformer = new Ot({
2841
2841
  environment: s
2842
2842
  }), this.logger = new Ce({
2843
2843
  enabled: c ?? !1
2844
2844
  });
2845
- const l = 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", T = 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 = "https://portal-api.opexacms.io/v1", N = new Mt({
2845
+ const l = 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", T = 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 = "https://portal-api.opexacms.io/v1", N = new vt({
2846
2846
  url: R,
2847
2847
  site: t,
2848
2848
  platform: r
2849
- }), b = {
2849
+ }), E = {
2850
2850
  middlewares: [this.authMiddleware],
2851
2851
  fetchOptions: {
2852
2852
  headers: {
@@ -2854,10 +2854,10 @@ class Vt {
2854
2854
  "Platform-Code": a
2855
2855
  }
2856
2856
  }
2857
- }, I = new Nt(new U(M, b)), D = new Rt(new U(v, b)), S = new $t(new U(p, b)), P = new _t(new U(f, b)), $ = new Dt(new U(w, b)), x = new It(new U(T, b)), C = new Tt({
2857
+ }, I = new Rt(new U(M, E)), D = new Mt(new U(v, E)), S = new Pt(new U(p, E)), P = new _t(new U(f, E)), $ = new It(new U(w, E)), x = new Nt(new U(T, E)), C = new Tt({
2858
2858
  url: l,
2859
2859
  platform: a
2860
- }), G = new Ot({
2860
+ }), G = new Ut({
2861
2861
  logs: c,
2862
2862
  authService: C,
2863
2863
  walletService: S
@@ -2919,7 +2919,7 @@ class Vt {
2919
2919
  await this.sessionManager.destroy();
2920
2920
  }
2921
2921
  watchSession(e) {
2922
- const t = xt(e.interval ?? 3e4, 3e4, 6e4);
2922
+ const t = $t(e.interval ?? 3e4, 3e4, 6e4);
2923
2923
  let r = null;
2924
2924
  const a = () => setTimeout(async () => {
2925
2925
  await this.sessionManager.verify() || await e.onInvalid(), r = a();
@@ -2989,7 +2989,7 @@ class Vt {
2989
2989
  domain: e.domain,
2990
2990
  birthDay: typeof e.dateOfBirth == "string" ? e.dateOfBirth : e.dateOfBirth.toISOString(),
2991
2991
  password: await y(e.password),
2992
- mobileNumber: E(e.mobileNumber)
2992
+ mobileNumber: b(e.mobileNumber)
2993
2993
  },
2994
2994
  referralCode: e.referralCode,
2995
2995
  verificationCode: e.verificationCode,
@@ -3003,7 +3003,7 @@ class Vt {
3003
3003
  const a = await this.accountService.registerMemberAccountViaMobile({
3004
3004
  input: {
3005
3005
  id: t,
3006
- mobileNumber: E(e.mobileNumber)
3006
+ mobileNumber: b(e.mobileNumber)
3007
3007
  },
3008
3008
  referralCode: e.referralCode,
3009
3009
  reCAPTCHAResponse: e.reCAPTCHAResponse,
@@ -3016,7 +3016,7 @@ class Vt {
3016
3016
  id: t,
3017
3017
  name: e.name,
3018
3018
  password: await y(e.password),
3019
- mobileNumber: e.mobileNumber ? E(e.mobileNumber) : void 0
3019
+ mobileNumber: e.mobileNumber ? b(e.mobileNumber) : void 0
3020
3020
  },
3021
3021
  reCAPTCHAResponse: e.reCAPTCHAResponse
3022
3022
  });
@@ -3040,7 +3040,7 @@ class Vt {
3040
3040
  password: t.password ? await y(t.password) : void 0,
3041
3041
  transactionPassword: t.transactionPassword ? await y(t.transactionPassword) : void 0,
3042
3042
  ...t.mobileNumber && {
3043
- mobileNumber: E(t.mobileNumber)
3043
+ mobileNumber: b(t.mobileNumber)
3044
3044
  },
3045
3045
  secretAnswer: t.secretAnswer ? await y(t.secretAnswer) : void 0
3046
3046
  }
@@ -3083,7 +3083,7 @@ class Vt {
3083
3083
  async resetPassword(e) {
3084
3084
  return await this.accountService.resetPassword({
3085
3085
  input: {
3086
- mobileNumber: E(e.mobileNumber),
3086
+ mobileNumber: b(e.mobileNumber),
3087
3087
  newPassword: await y(e.newPassword)
3088
3088
  },
3089
3089
  verificationCode: e.verificationCode
@@ -3110,7 +3110,7 @@ class Vt {
3110
3110
  return await this.accountService.sendVerificationCode({
3111
3111
  input: {
3112
3112
  channel: "SMS",
3113
- recipient: E(e)
3113
+ recipient: b(e)
3114
3114
  }
3115
3115
  });
3116
3116
  }
@@ -3118,7 +3118,7 @@ class Vt {
3118
3118
  if (e.type === "SMS")
3119
3119
  return this.authService.sendVerificationCode({
3120
3120
  channel: "SMS",
3121
- recipient: E(e.mobileNumber),
3121
+ recipient: b(e.mobileNumber),
3122
3122
  ...e.strict && {
3123
3123
  verificationType: "MEMBER"
3124
3124
  }
@@ -3185,7 +3185,7 @@ class Vt {
3185
3185
  id: t,
3186
3186
  amount: e.amount.toString(),
3187
3187
  transactionPassword: await y(e.transactionPassword),
3188
- recipientMobileNumber: E(e.recipientMobileNumber)
3188
+ recipientMobileNumber: b(e.recipientMobileNumber)
3189
3189
  }
3190
3190
  });
3191
3191
  if (!r.ok) return r;
@@ -3196,7 +3196,7 @@ class Vt {
3196
3196
  id: t,
3197
3197
  amount: e.amount.toString(),
3198
3198
  transactionPassword: await y(e.transactionPassword),
3199
- recipientMobileNumber: E(e.recipientMobileNumber)
3199
+ recipientMobileNumber: b(e.recipientMobileNumber)
3200
3200
  }
3201
3201
  });
3202
3202
  if (!r.ok) return r;
@@ -3476,7 +3476,7 @@ class Vt {
3476
3476
  /**/
3477
3477
  provider: a,
3478
3478
  reference: s
3479
- } = r.data, c = qt(a) ? await this.walletService.createGameSession({ input: { id: t, game: s } }) : await this.gameService.createGameSession({ input: { id: t, game: s } });
3479
+ } = r.data, c = Bt(a) ? await this.walletService.createGameSession({ input: { id: t, game: s } }) : await this.gameService.createGameSession({ input: { id: t, game: s } });
3480
3480
  return c.ok ? { ok: !0, data: { id: t } } : c;
3481
3481
  }
3482
3482
  async endGameSession(e) {
@@ -3610,7 +3610,7 @@ class Vt {
3610
3610
  } : t;
3611
3611
  }
3612
3612
  }
3613
- const Bt = [
3613
+ const Wt = [
3614
3614
  /**/
3615
3615
  "RTG",
3616
3616
  "DARWIN",
@@ -3620,12 +3620,12 @@ const Bt = [
3620
3620
  "EVOLUTION_NETENT",
3621
3621
  "EVOLUTION_REDTIGER"
3622
3622
  ];
3623
- function qt(o) {
3624
- return Bt.some((e) => e === o);
3623
+ function Bt(o) {
3624
+ return Wt.some((e) => e === o);
3625
3625
  }
3626
3626
  export {
3627
- jt as ObjectId,
3627
+ Yt as ObjectId,
3628
3628
  _ as ObjectType,
3629
- Vt as Sdk
3629
+ Lt as Sdk
3630
3630
  };
3631
3631
  //# sourceMappingURL=index.mjs.map