@opexa/portal-sdk 0.0.90 → 0.0.91

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 = (n, e, t) => e in n ? _e(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
3
  var c = (n, e, t) => Te(n, typeof e != "symbol" ? e + "" : e, t);
4
4
  import { ObjectId as $ } from "@opexa/object-id";
5
- import { ObjectId as zt } from "@opexa/object-id";
5
+ import { ObjectId as er } from "@opexa/object-id";
6
6
  const U = {
7
7
  Account: 8,
8
8
  Deposit: 9,
@@ -28,7 +28,7 @@ const de = o`
28
28
  status
29
29
  dateTimeCreated
30
30
  }
31
- `, ve = o`
31
+ `, Me = o`
32
32
  ${de}
33
33
 
34
34
  query File($id: ObjectId!) {
@@ -38,7 +38,7 @@ const de = o`
38
38
  }
39
39
  }
40
40
  }
41
- `, Me = o`
41
+ `, ve = o`
42
42
  mutation UploadPrivateImageFile($input: UploadFileInput!) {
43
43
  uploadPrivateImageFile(input: $input) {
44
44
  ... on FileFormatNotSupportedError {
@@ -52,7 +52,7 @@ const de = o`
52
52
  }
53
53
  }
54
54
  }
55
- `, Ne = o`
55
+ `, Re = o`
56
56
  query Wallet {
57
57
  wallet {
58
58
  id
@@ -62,7 +62,7 @@ const de = o`
62
62
  dateTimeLastUpdated
63
63
  }
64
64
  }
65
- `, Re = o`
65
+ `, Ne = o`
66
66
  query PointsWallet {
67
67
  pointsWallet {
68
68
  id
@@ -1152,7 +1152,7 @@ const tt = o`
1152
1152
  commission
1153
1153
  dateTimeCreated
1154
1154
  }
1155
- `, Ct = o`
1155
+ `, kt = o`
1156
1156
  query Referrals($first: Int, $after: Cursor, $filter: ReferralFilterInput) {
1157
1157
  member {
1158
1158
  referrals(first: $first, after: $after, filter: $filter) {
@@ -1174,7 +1174,7 @@ const tt = o`
1174
1174
  }
1175
1175
 
1176
1176
  ${he}
1177
- `, kt = o`
1177
+ `, Ct = o`
1178
1178
  query UplinesByName($search: String!, $first: Int) {
1179
1179
  uplinesByName(search: $search, first: $first) {
1180
1180
  ...ReferralFragment
@@ -1209,14 +1209,50 @@ const tt = o`
1209
1209
  }
1210
1210
  }
1211
1211
  }
1212
- `, vt = o`
1212
+ `, Mt = o`
1213
1213
  query PointsClubSettings {
1214
1214
  pointsClubSettings {
1215
1215
  multiplier
1216
1216
  }
1217
1217
  }
1218
+ `, vt = o`
1219
+ query Messages($first: Int, $after: Cursor, $filter: MessageFilterInput) {
1220
+ messages(first: $first, after: $after, filter: $filter) {
1221
+ edges {
1222
+ cursor
1223
+ node {
1224
+ ... on Message {
1225
+ id
1226
+ logo
1227
+ title
1228
+ popup
1229
+ content
1230
+ actions {
1231
+ name
1232
+ url
1233
+ }
1234
+ markedAsRead
1235
+ dateTimeCreated
1236
+ }
1237
+ }
1238
+ }
1239
+ totalCount
1240
+ pageInfo {
1241
+ hasNextPage
1242
+ endCursor
1243
+ }
1244
+ }
1245
+ }
1246
+ `, Rt = o`
1247
+ mutation MarkMessageAsRead($id: ObjectId!) {
1248
+ markMessageAsRead(id: $id)
1249
+ }
1250
+ `, Nt = o`
1251
+ mutation MarkAllMessageAsRead {
1252
+ markAllMessageAsRead
1253
+ }
1218
1254
  `;
1219
- function d(n) {
1255
+ function u(n) {
1220
1256
  return {
1221
1257
  name: n,
1222
1258
  message: {
@@ -1271,7 +1307,7 @@ function d(n) {
1271
1307
  }[n]
1272
1308
  };
1273
1309
  }
1274
- class Mt {
1310
+ class Dt {
1275
1311
  constructor(e) {
1276
1312
  c(this, "client");
1277
1313
  this.client = e;
@@ -1288,7 +1324,7 @@ class Mt {
1288
1324
  const t = await this.client.request(at, e);
1289
1325
  return t.ok ? t.data.registerMemberAccount ? {
1290
1326
  ok: !1,
1291
- error: d(t.data.registerMemberAccount.__typename)
1327
+ error: u(t.data.registerMemberAccount.__typename)
1292
1328
  } : {
1293
1329
  ok: !0
1294
1330
  } : t;
@@ -1297,7 +1333,7 @@ class Mt {
1297
1333
  const t = await this.client.request(nt, e);
1298
1334
  return t.ok ? t.data.registerMemberAccountViaMobile ? {
1299
1335
  ok: !1,
1300
- error: d(t.data.registerMemberAccountViaMobile.__typename)
1336
+ error: u(t.data.registerMemberAccountViaMobile.__typename)
1301
1337
  } : {
1302
1338
  ok: !0
1303
1339
  } : t;
@@ -1306,7 +1342,7 @@ class Mt {
1306
1342
  const t = await this.client.request(it, e);
1307
1343
  return t.ok ? t.data.registerMemberAccount ? {
1308
1344
  ok: !1,
1309
- error: d(t.data.registerMemberAccount.__typename)
1345
+ error: u(t.data.registerMemberAccount.__typename)
1310
1346
  } : {
1311
1347
  ok: !0
1312
1348
  } : t;
@@ -1315,7 +1351,7 @@ class Mt {
1315
1351
  const t = await this.client.request(st, e);
1316
1352
  return t.ok ? t.data.updateMemberAccount ? {
1317
1353
  ok: !1,
1318
- error: d(t.data.updateMemberAccount.__typename)
1354
+ error: u(t.data.updateMemberAccount.__typename)
1319
1355
  } : {
1320
1356
  ok: !0
1321
1357
  } : t;
@@ -1339,7 +1375,7 @@ class Mt {
1339
1375
  );
1340
1376
  return t.ok ? t.data.resetPassword ? {
1341
1377
  ok: !1,
1342
- error: d(t.data.resetPassword.__typename)
1378
+ error: u(t.data.resetPassword.__typename)
1343
1379
  } : {
1344
1380
  ok: !0
1345
1381
  } : t;
@@ -1357,7 +1393,7 @@ class Mt {
1357
1393
  const t = await this.client.request(ft, e);
1358
1394
  return t.ok ? t.data.sendVerificationCode ? {
1359
1395
  ok: !1,
1360
- error: d(t.data.sendVerificationCode.__typename)
1396
+ error: u(t.data.sendVerificationCode.__typename)
1361
1397
  } : {
1362
1398
  ok: !0
1363
1399
  } : t;
@@ -1369,7 +1405,7 @@ class Mt {
1369
1405
  const t = await this.client.request(dt, e);
1370
1406
  return t.ok ? t.data.verifyMobileNumber ? {
1371
1407
  ok: !1,
1372
- error: d(t.data.verifyMobileNumber.__typename)
1408
+ error: u(t.data.verifyMobileNumber.__typename)
1373
1409
  } : {
1374
1410
  ok: !0
1375
1411
  } : t;
@@ -1378,7 +1414,7 @@ class Mt {
1378
1414
  const t = await this.client.request(ut, e);
1379
1415
  return t.ok ? t.data.createMemberVerification ? {
1380
1416
  ok: !1,
1381
- error: d(t.data.createMemberVerification.__typename)
1417
+ error: u(t.data.createMemberVerification.__typename)
1382
1418
  } : {
1383
1419
  ok: !0
1384
1420
  } : t;
@@ -1387,7 +1423,7 @@ class Mt {
1387
1423
  const t = await this.client.request(lt, e);
1388
1424
  return t.ok ? t.data.updateMemberVerification ? {
1389
1425
  ok: !1,
1390
- error: d(t.data.updateMemberVerification.__typename)
1426
+ error: u(t.data.updateMemberVerification.__typename)
1391
1427
  } : {
1392
1428
  ok: !0
1393
1429
  } : t;
@@ -1413,7 +1449,7 @@ class Mt {
1413
1449
  const t = await this.client.request(ot, e);
1414
1450
  return t.ok ? t.data.registerMayaMemberAccount ? {
1415
1451
  ok: !1,
1416
- error: d(t.data.registerMayaMemberAccount.__typename)
1452
+ error: u(t.data.registerMayaMemberAccount.__typename)
1417
1453
  } : {
1418
1454
  ok: !0
1419
1455
  } : t;
@@ -1429,13 +1465,13 @@ class Mt {
1429
1465
  const t = await this.client.request(At, e);
1430
1466
  return t.ok ? t.data.updateReferralCode ? {
1431
1467
  ok: !1,
1432
- error: d(t.data.updateReferralCode.__typename)
1468
+ error: u(t.data.updateReferralCode.__typename)
1433
1469
  } : {
1434
1470
  ok: !0
1435
1471
  } : t;
1436
1472
  }
1437
1473
  async pointsClubSettings() {
1438
- const e = await this.client.request(vt);
1474
+ const e = await this.client.request(Mt);
1439
1475
  return e.ok ? { ok: !0, data: e.data.pointsClubSettings } : e;
1440
1476
  }
1441
1477
  }
@@ -1455,7 +1491,7 @@ const ue = {
1455
1491
  429: { name: "HttpTooManyRequests", message: "Too Many Requests" },
1456
1492
  500: { name: "HttpInternalServerError", message: "Internal Server Error" }
1457
1493
  };
1458
- class Nt {
1494
+ class It {
1459
1495
  constructor(e) {
1460
1496
  c(this, "url");
1461
1497
  c(this, "platform");
@@ -1486,7 +1522,7 @@ class Nt {
1486
1522
  data: a
1487
1523
  } : a.code === "ACCOUNT_BLACKLISTED" ? {
1488
1524
  ok: !1,
1489
- error: d("AccountBlacklistedError")
1525
+ error: u("AccountBlacklistedError")
1490
1526
  } : {
1491
1527
  ok: !1,
1492
1528
  error: w(r.status)
@@ -1515,7 +1551,7 @@ class Nt {
1515
1551
  data: a
1516
1552
  } : r.status === 401 || r.status === 403 ? {
1517
1553
  ok: !1,
1518
- error: d("InvalidTokenOrSecretAnswerError")
1554
+ error: u("InvalidTokenOrSecretAnswerError")
1519
1555
  } : {
1520
1556
  ok: !1,
1521
1557
  error: w(r.status)
@@ -1542,10 +1578,10 @@ class Nt {
1542
1578
  data: a
1543
1579
  } : a.code === "ACCOUNT_BLACKLISTED" ? {
1544
1580
  ok: !1,
1545
- error: d("AccountBlacklistedError")
1581
+ error: u("AccountBlacklistedError")
1546
1582
  } : r.status === 403 || r.status === 401 ? {
1547
1583
  ok: !1,
1548
- error: d("InvalidTokenError")
1584
+ error: u("InvalidTokenError")
1549
1585
  } : {
1550
1586
  ok: !1,
1551
1587
  error: w(r.status)
@@ -1606,7 +1642,7 @@ class Nt {
1606
1642
  const a = await r.json(), s = t(a.message);
1607
1643
  return s ? {
1608
1644
  ok: !1,
1609
- error: d(s)
1645
+ error: u(s)
1610
1646
  } : {
1611
1647
  ok: !1,
1612
1648
  error: w(r.status, a.message)
@@ -1624,7 +1660,7 @@ class Nt {
1624
1660
  }
1625
1661
  }
1626
1662
  }
1627
- class Rt {
1663
+ class Gt {
1628
1664
  constructor(e) {
1629
1665
  c(this, "url");
1630
1666
  c(this, "siteId");
@@ -1639,12 +1675,12 @@ class Rt {
1639
1675
  } : e;
1640
1676
  }
1641
1677
  async games(e) {
1642
- var a, s, m, u, p, f, h, l, C, k, _, T, v, y, M, N, S, R, D, I, A, G, W, x;
1678
+ var a, s, m, d, p, f, h, l, k, C, _, T, M, v, y, R, N, S, D, I, G, P, A, W;
1643
1679
  const t = new URLSearchParams();
1644
- 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), (f = (p = e == null ? void 0 : e.filter) == null ? void 0 : p.type) != null && f.in && t.set("filter[type][in]", e.filter.type.in.join(",")), (l = (h = e == null ? void 0 : e.filter) == null ? void 0 : h.type) != null && l.notIn && t.set("filter[type][nin]", e.filter.type.notIn.join(",")), (k = (C = e == null ? void 0 : e.filter) == null ? void 0 : C.provider) != null && k.equal && t.set("filter[provider][eq]", e.filter.provider.equal), (T = (_ = e == null ? void 0 : e.filter) == null ? void 0 : _.provider) != null && T.notEqual && t.set("filter[provider][neq]", e.filter.provider.notEqual), (y = (v = e == null ? void 0 : e.filter) == null ? void 0 : v.provider) != null && y.in && t.set("filter[provider][in]", e.filter.provider.in.join(",")), (N = (M = e == null ? void 0 : e.filter) == null ? void 0 : M.provider) != null && N.notIn && t.set("filter[provider][nin]", e.filter.provider.notIn.join(",")), (R = (S = e == null ? void 0 : e.filter) == null ? void 0 : S.tags) != null && R.equal && t.set("filter[tags][eq]", e.filter.tags.equal.toLowerCase()), (I = (D = e == null ? void 0 : e.filter) == null ? void 0 : D.tags) != null && I.notEqual && t.set("filter[tags][neq]", e.filter.tags.notEqual.toLowerCase()), (G = (A = e == null ? void 0 : e.filter) == null ? void 0 : A.tags) != null && G.in && t.set(
1680
+ 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), (d = (m = e == null ? void 0 : e.filter) == null ? void 0 : m.type) != null && d.notEqual && t.set("filter[type][neq]", e.filter.type.notEqual), (f = (p = e == null ? void 0 : e.filter) == null ? void 0 : p.type) != null && f.in && t.set("filter[type][in]", e.filter.type.in.join(",")), (l = (h = e == null ? void 0 : e.filter) == null ? void 0 : h.type) != null && l.notIn && t.set("filter[type][nin]", e.filter.type.notIn.join(",")), (C = (k = e == null ? void 0 : e.filter) == null ? void 0 : k.provider) != null && C.equal && t.set("filter[provider][eq]", e.filter.provider.equal), (T = (_ = e == null ? void 0 : e.filter) == null ? void 0 : _.provider) != null && T.notEqual && t.set("filter[provider][neq]", e.filter.provider.notEqual), (v = (M = e == null ? void 0 : e.filter) == null ? void 0 : M.provider) != null && v.in && t.set("filter[provider][in]", e.filter.provider.in.join(",")), (R = (y = e == null ? void 0 : e.filter) == null ? void 0 : y.provider) != null && R.notIn && t.set("filter[provider][nin]", e.filter.provider.notIn.join(",")), (S = (N = e == null ? void 0 : e.filter) == null ? void 0 : N.tags) != null && S.equal && t.set("filter[tags][eq]", e.filter.tags.equal.toLowerCase()), (I = (D = e == null ? void 0 : e.filter) == null ? void 0 : D.tags) != null && I.notEqual && t.set("filter[tags][neq]", e.filter.tags.notEqual.toLowerCase()), (P = (G = e == null ? void 0 : e.filter) == null ? void 0 : G.tags) != null && P.in && t.set(
1645
1681
  "filter[tags][in]",
1646
1682
  e.filter.tags.in.map((E) => E.toLowerCase()).join(",")
1647
- ), (x = (W = e == null ? void 0 : e.filter) == null ? void 0 : W.tags) != null && x.notIn && t.set(
1683
+ ), (W = (A = e == null ? void 0 : e.filter) == null ? void 0 : A.tags) != null && W.notIn && t.set(
1648
1684
  "filter[tags][nin]",
1649
1685
  e.filter.tags.notIn.map((E) => E.toLowerCase()).join(",")
1650
1686
  );
@@ -1702,29 +1738,29 @@ class Rt {
1702
1738
  }
1703
1739
  }
1704
1740
  }
1705
- class Dt {
1741
+ class Pt {
1706
1742
  constructor(e) {
1707
1743
  c(this, "client");
1708
1744
  this.client = e;
1709
1745
  }
1710
1746
  async file(e) {
1711
- const t = await this.client.request(ve, e);
1747
+ const t = await this.client.request(Me, e);
1712
1748
  return t.ok ? {
1713
1749
  ok: !0,
1714
1750
  data: t.data.node
1715
1751
  } : t;
1716
1752
  }
1717
1753
  async uploadPrivateImageFile(e) {
1718
- const t = await this.client.upload(Me, e);
1754
+ const t = await this.client.upload(ve, e);
1719
1755
  return t.ok ? t.data.uploadPrivateImageFile ? {
1720
1756
  ok: !1,
1721
- error: d(t.data.uploadPrivateImageFile.__typename)
1757
+ error: u(t.data.uploadPrivateImageFile.__typename)
1722
1758
  } : {
1723
1759
  ok: !0
1724
1760
  } : t;
1725
1761
  }
1726
1762
  }
1727
- class It {
1763
+ class Wt {
1728
1764
  constructor(e) {
1729
1765
  c(this, "client");
1730
1766
  this.client = e;
@@ -1743,7 +1779,7 @@ class It {
1743
1779
  const t = await this.client.request(Ee, e);
1744
1780
  return t.ok ? t.data.createGameSession ? {
1745
1781
  ok: !1,
1746
- error: d(t.data.createGameSession.__typename)
1782
+ error: u(t.data.createGameSession.__typename)
1747
1783
  } : {
1748
1784
  ok: !0
1749
1785
  } : t;
@@ -1761,7 +1797,7 @@ class It {
1761
1797
  } : t;
1762
1798
  }
1763
1799
  }
1764
- class Gt {
1800
+ class xt {
1765
1801
  constructor(e) {
1766
1802
  c(this, "client");
1767
1803
  this.client = e;
@@ -1781,7 +1817,7 @@ class Gt {
1781
1817
  } : e;
1782
1818
  }
1783
1819
  }
1784
- class Pt {
1820
+ class $t {
1785
1821
  constructor(e) {
1786
1822
  c(this, "client");
1787
1823
  this.client = e;
@@ -1828,7 +1864,7 @@ class Pt {
1828
1864
  }
1829
1865
  async referrals(e) {
1830
1866
  const t = await this.client.request(
1831
- Ct,
1867
+ kt,
1832
1868
  e
1833
1869
  );
1834
1870
  return t.ok ? { ok: t.ok, data: t.data.member.referrals } : t;
@@ -1839,7 +1875,7 @@ class Pt {
1839
1875
  }
1840
1876
  async uplinesByName(e) {
1841
1877
  const t = await this.client.request(
1842
- kt,
1878
+ Ct,
1843
1879
  e
1844
1880
  );
1845
1881
  return t.ok ? { ok: t.ok, data: t.data.uplinesByName } : t;
@@ -1852,7 +1888,7 @@ class Pt {
1852
1888
  return t.ok ? { ok: t.ok, data: t.data.downlinesByName } : t;
1853
1889
  }
1854
1890
  }
1855
- class Wt {
1891
+ class Ut {
1856
1892
  constructor(e) {
1857
1893
  c(this, "url");
1858
1894
  this.url = e.url;
@@ -1864,7 +1900,46 @@ class Wt {
1864
1900
  ];
1865
1901
  }
1866
1902
  }
1867
- class xt {
1903
+ class Ot {
1904
+ constructor(e) {
1905
+ c(this, "client");
1906
+ this.client = e;
1907
+ }
1908
+ async messages(e) {
1909
+ const t = await this.client.request(
1910
+ vt,
1911
+ e
1912
+ );
1913
+ return t.ok ? { ok: t.ok, data: t.data.messages } : t;
1914
+ }
1915
+ async markMessageAsRead(e) {
1916
+ const t = await this.client.request(Rt, e);
1917
+ return t.ok ? t.data.markMessageAsRead ? {
1918
+ ok: !0
1919
+ } : {
1920
+ ok: !1,
1921
+ error: {
1922
+ name: "UnknownError",
1923
+ message: "Something went wrong."
1924
+ }
1925
+ } : t;
1926
+ }
1927
+ async markAllMessageAsRead() {
1928
+ const e = await this.client.request(
1929
+ Nt
1930
+ );
1931
+ return e.ok ? e.data.markAllMessageAsRead ? {
1932
+ ok: !0
1933
+ } : {
1934
+ ok: !1,
1935
+ error: {
1936
+ name: "UnknownError",
1937
+ message: "Something went wrong."
1938
+ }
1939
+ } : e;
1940
+ }
1941
+ }
1942
+ class Bt {
1868
1943
  constructor(e) {
1869
1944
  c(this, "client");
1870
1945
  this.client = e;
@@ -1892,7 +1967,7 @@ class xt {
1892
1967
  const t = await this.client.request(et, e);
1893
1968
  return t.ok ? t.data.claimCashbackBonus ? {
1894
1969
  ok: !1,
1895
- error: d(t.data.claimCashbackBonus.__typename)
1970
+ error: u(t.data.claimCashbackBonus.__typename)
1896
1971
  } : {
1897
1972
  ok: !0
1898
1973
  } : {
@@ -1905,7 +1980,7 @@ class xt {
1905
1980
  return e.ok ? { ok: e.ok, data: e.data.bonus } : e;
1906
1981
  }
1907
1982
  async wallet() {
1908
- const e = await this.client.request(Ne);
1983
+ const e = await this.client.request(Re);
1909
1984
  return e.ok ? { ok: e.ok, data: e.data.wallet } : e;
1910
1985
  }
1911
1986
  async deposit(e) {
@@ -1919,7 +1994,7 @@ class xt {
1919
1994
  const t = await this.client.request(qe, e);
1920
1995
  return t.ok ? t.data.createGCashDeposit ? {
1921
1996
  ok: !1,
1922
- error: d(t.data.createGCashDeposit.__typename)
1997
+ error: u(t.data.createGCashDeposit.__typename)
1923
1998
  } : {
1924
1999
  ok: !0
1925
2000
  } : t;
@@ -1928,7 +2003,7 @@ class xt {
1928
2003
  const t = await this.client.request(Fe, e);
1929
2004
  return t.ok ? t.data.createMayaDeposit ? {
1930
2005
  ok: !1,
1931
- error: d(t.data.createMayaDeposit.__typename)
2006
+ error: u(t.data.createMayaDeposit.__typename)
1932
2007
  } : {
1933
2008
  ok: !0
1934
2009
  } : t;
@@ -1937,7 +2012,7 @@ class xt {
1937
2012
  const t = await this.client.request(Le, e);
1938
2013
  return t.ok ? t.data.createMayaAppDeposit ? {
1939
2014
  ok: !1,
1940
- error: d(t.data.createMayaAppDeposit.__typename)
2015
+ error: u(t.data.createMayaAppDeposit.__typename)
1941
2016
  } : {
1942
2017
  ok: !0
1943
2018
  } : t;
@@ -1946,7 +2021,7 @@ class xt {
1946
2021
  const t = await this.client.request(We, e);
1947
2022
  return t.ok ? t.data.createGCashWithdrawal ? {
1948
2023
  ok: !1,
1949
- error: d(t.data.createGCashWithdrawal.__typename)
2024
+ error: u(t.data.createGCashWithdrawal.__typename)
1950
2025
  } : {
1951
2026
  ok: !0
1952
2027
  } : t;
@@ -1955,7 +2030,7 @@ class xt {
1955
2030
  const t = await this.client.request(xe, e);
1956
2031
  return t.ok ? t.data.createMayaWithdrawal ? {
1957
2032
  ok: !1,
1958
- error: d(t.data.createMayaWithdrawal.__typename)
2033
+ error: u(t.data.createMayaWithdrawal.__typename)
1959
2034
  } : {
1960
2035
  ok: !0
1961
2036
  } : t;
@@ -1964,7 +2039,7 @@ class xt {
1964
2039
  const t = await this.client.request($e, e);
1965
2040
  return t.ok ? t.data.createMayaAppWithdrawal ? {
1966
2041
  ok: !1,
1967
- error: d(t.data.createMayaAppWithdrawal.__typename)
2042
+ error: u(t.data.createMayaAppWithdrawal.__typename)
1968
2043
  } : {
1969
2044
  ok: !0
1970
2045
  } : t;
@@ -1973,7 +2048,7 @@ class xt {
1973
2048
  const t = await this.client.request(Ue, e);
1974
2049
  return t.ok ? t.data.createBankWithdrawal ? {
1975
2050
  ok: !1,
1976
- error: d(t.data.createBankWithdrawal.__typename)
2051
+ error: u(t.data.createBankWithdrawal.__typename)
1977
2052
  } : {
1978
2053
  ok: !0
1979
2054
  } : t;
@@ -1985,14 +2060,14 @@ class xt {
1985
2060
  return e.ok ? { ok: e.ok, data: e.data.remainingDailyWithdrawalsCount } : e;
1986
2061
  }
1987
2062
  async pointsWallet() {
1988
- const e = await this.client.request(Re);
2063
+ const e = await this.client.request(Ne);
1989
2064
  return e.ok ? { ok: e.ok, data: e.data.pointsWallet } : e;
1990
2065
  }
1991
2066
  async redeemPointsToCash(e) {
1992
2067
  const t = await this.client.request(De, e);
1993
2068
  return t.ok ? t.data.redeemPointsToCash ? {
1994
2069
  ok: !1,
1995
- error: d(t.data.redeemPointsToCash.__typename)
2070
+ error: u(t.data.redeemPointsToCash.__typename)
1996
2071
  } : {
1997
2072
  ok: !0
1998
2073
  } : t;
@@ -2015,7 +2090,7 @@ class xt {
2015
2090
  const t = await this.client.request(Ee, e);
2016
2091
  return t.ok ? t.data.createGameSession ? {
2017
2092
  ok: !1,
2018
- error: d(t.data.createGameSession.__typename)
2093
+ error: u(t.data.createGameSession.__typename)
2019
2094
  } : {
2020
2095
  ok: !0
2021
2096
  } : t;
@@ -2053,14 +2128,14 @@ class xt {
2053
2128
  function we(n) {
2054
2129
  return new Date(n.getTime());
2055
2130
  }
2056
- function O(n, e) {
2131
+ function B(n, e) {
2057
2132
  const t = we(n);
2058
2133
  return t.setMinutes(t.getMinutes() + e), t;
2059
2134
  }
2060
2135
  function le(n, e) {
2061
2136
  return n.getTime() > e.getTime();
2062
2137
  }
2063
- class $t {
2138
+ class qt {
2064
2139
  constructor(e) {
2065
2140
  c(this, "config");
2066
2141
  c(this, "cache");
@@ -2070,7 +2145,7 @@ class $t {
2070
2145
  };
2071
2146
  }
2072
2147
  set(e, t) {
2073
- const r = O(/* @__PURE__ */ new Date(), this.config.cacheTime);
2148
+ const r = B(/* @__PURE__ */ new Date(), this.config.cacheTime);
2074
2149
  this.cache[e] = {
2075
2150
  value: t,
2076
2151
  validUntil: r
@@ -2081,18 +2156,18 @@ class $t {
2081
2156
  return !t || le(/* @__PURE__ */ new Date(), t.validUntil) ? null : t.value;
2082
2157
  }
2083
2158
  }
2084
- function Ut(n, e, t) {
2159
+ function Ft(n, e, t) {
2085
2160
  return n < e ? e : n > t ? t : n;
2086
2161
  }
2087
2162
  function pe(n) {
2088
2163
  return Object.prototype.toString.call(n) === "[object Object]" && Object(n) === n;
2089
2164
  }
2090
- function Ot(n) {
2165
+ function Lt(n) {
2091
2166
  const e = [];
2092
2167
  function t(r, a = []) {
2093
2168
  for (const s in r) {
2094
2169
  const m = r[s];
2095
- pe(m) ? t(m, [...a, s]) : Array.isArray(m) ? t(Bt(m), [...a, s]) : e.push({
2170
+ pe(m) ? t(m, [...a, s]) : Array.isArray(m) ? t(Vt(m), [...a, s]) : e.push({
2096
2171
  key: [...a, s],
2097
2172
  value: m
2098
2173
  });
@@ -2100,10 +2175,10 @@ function Ot(n) {
2100
2175
  }
2101
2176
  return t(n), e;
2102
2177
  }
2103
- function Bt(n) {
2178
+ function Vt(n) {
2104
2179
  return n.reduce((e, t, r) => (e[r] = t, e), {});
2105
2180
  }
2106
- class B {
2181
+ class O {
2107
2182
  constructor(e, t) {
2108
2183
  c(this, "url");
2109
2184
  c(this, "options");
@@ -2140,13 +2215,13 @@ class B {
2140
2215
  return await this.exec(s);
2141
2216
  }
2142
2217
  async exec(e) {
2143
- var t, r, a, s, m, u;
2218
+ var t, r, a, s, m, d;
2144
2219
  try {
2145
2220
  const p = await fetch(e);
2146
2221
  if (!p.ok)
2147
2222
  return { ok: !1, error: w(p.status) };
2148
2223
  const f = await p.json(), h = f.data, l = (t = f.errors) == null ? void 0 : t.at(0);
2149
- return l ? ((r = l.extensions) == null ? void 0 : r.code) === "FORBIDDEN" || ((a = l.extensions) == null ? void 0 : a.code) === "ACCESS_TOKEN_EXPIRED" ? { ok: !1, error: w(403, l.message) } : ((s = l.extensions) == null ? void 0 : s.code) === "UNAUTHORIZED" ? { ok: !1, error: w(401, l.message) } : ((m = l.extensions) == null ? void 0 : m.code) === "BAD_USER_INPUT" || ((u = l.extensions) == null ? void 0 : u.code) === "BAD_REQUEST" ? { ok: !1, error: w(400, l.message) } : {
2224
+ return l ? ((r = l.extensions) == null ? void 0 : r.code) === "FORBIDDEN" || ((a = l.extensions) == null ? void 0 : a.code) === "ACCESS_TOKEN_EXPIRED" ? { ok: !1, error: w(403, l.message) } : ((s = l.extensions) == null ? void 0 : s.code) === "UNAUTHORIZED" ? { ok: !1, error: w(401, l.message) } : ((m = l.extensions) == null ? void 0 : m.code) === "BAD_USER_INPUT" || ((d = l.extensions) == null ? void 0 : d.code) === "BAD_REQUEST" ? { ok: !1, error: w(400, l.message) } : {
2150
2225
  ok: !1,
2151
2226
  error: w(500, l.message)
2152
2227
  } : {
@@ -2167,7 +2242,7 @@ class B {
2167
2242
  return t;
2168
2243
  }
2169
2244
  createUploadBody(e, t) {
2170
- const r = Ot(t).filter(
2245
+ const r = Lt(t).filter(
2171
2246
  (m) => m.value instanceof File || m.value instanceof Blob
2172
2247
  ), a = new FormData();
2173
2248
  a.append(
@@ -2178,28 +2253,28 @@ class B {
2178
2253
  })
2179
2254
  );
2180
2255
  const s = {};
2181
- return r.forEach((m, u) => {
2182
- s[u.toString()] = [`variables.${m.key.join(".")}`];
2183
- }), a.append("map", JSON.stringify(s)), r.forEach((m, u) => {
2184
- a.append(u.toString(), m.value);
2256
+ return r.forEach((m, d) => {
2257
+ s[d.toString()] = [`variables.${m.key.join(".")}`];
2258
+ }), a.append("map", JSON.stringify(s)), r.forEach((m, d) => {
2259
+ a.append(d.toString(), m.value);
2185
2260
  }), a;
2186
2261
  }
2187
2262
  }
2188
- function qt(n) {
2263
+ function Ht(n) {
2189
2264
  return n === "INR" ? "en-IN" : n === "MYR" ? "en-MY" : n === "IDR" ? "en-ID" : n === "USD" ? "en-US" : "en-PH";
2190
2265
  }
2191
- function Ft(n) {
2266
+ function Yt(n) {
2192
2267
  return n === "en-IN" ? "+91" : n === "en-MY" ? "+60" : n === "en-ID" ? "+62" : n === "en-US" ? "+1" : "+63";
2193
2268
  }
2194
- function P(n, e) {
2195
- const t = Ft(e);
2269
+ function x(n, e) {
2270
+ const t = Yt(e);
2196
2271
  return n.startsWith(t) ? n : n.startsWith(t.substring(1)) ? `+${n}` : n.startsWith("0") ? `${t}${n.substring(1)}` : `${t}${n}`;
2197
2272
  }
2198
2273
  async function g(n) {
2199
2274
  const e = new TextEncoder().encode(n), t = await crypto.subtle.digest("SHA-256", e);
2200
2275
  return Array.from(new Uint8Array(t)).map((s) => s.toString(16).padStart(2, "0")).join("");
2201
2276
  }
2202
- class Ce {
2277
+ class ke {
2203
2278
  constructor(e) {
2204
2279
  c(this, "enabled");
2205
2280
  this.enabled = (e == null ? void 0 : e.enabled) ?? !0;
@@ -2221,7 +2296,7 @@ function q(n, e) {
2221
2296
  const t = we(n);
2222
2297
  return t.setDate(t.getDate() + e), t;
2223
2298
  }
2224
- function ke(n) {
2299
+ function Ce(n) {
2225
2300
  return new Promise((e) => {
2226
2301
  setTimeout(e, n);
2227
2302
  });
@@ -2233,9 +2308,9 @@ function ge(n, e) {
2233
2308
  maxAttempt: a = 3
2234
2309
  /**/
2235
2310
  } = e;
2236
- async function s(m, u) {
2237
- const p = u ?? a, f = await n(...m);
2238
- return t(f) ? f : p > 1 ? (await ke(r * ((a - p) / 2)), s(m, p - 1)) : f;
2311
+ async function s(m, d) {
2312
+ const p = d ?? a, f = await n(...m);
2313
+ return t(f) ? f : p > 1 ? (await Ce(r * ((a - p) / 2)), s(m, p - 1)) : f;
2239
2314
  }
2240
2315
  return async (...m) => await s(m);
2241
2316
  }
@@ -2243,14 +2318,14 @@ function F(n, e) {
2243
2318
  const t = we(n);
2244
2319
  return t.setMinutes(t.getMinutes() - e), t;
2245
2320
  }
2246
- class Lt {
2321
+ class jt {
2247
2322
  constructor(e) {
2248
2323
  c(this, "logger");
2249
2324
  c(this, "storageKey", "session");
2250
2325
  c(this, "authService");
2251
2326
  c(this, "walletService");
2252
2327
  c(this, "_refreshing", !1);
2253
- this.authService = e.authService, this.walletService = e.walletService, this.logger = new Ce({
2328
+ this.authService = e.authService, this.walletService = e.walletService, this.logger = new ke({
2254
2329
  enabled: e.logs ?? !1
2255
2330
  });
2256
2331
  }
@@ -2299,7 +2374,7 @@ class Lt {
2299
2374
  this.storageKey,
2300
2375
  JSON.stringify({
2301
2376
  ...p.data,
2302
- accessTokenExpiresAt: O(f, 8).getTime(),
2377
+ accessTokenExpiresAt: B(f, 8).getTime(),
2303
2378
  refreshTokenExpiresAt: F(q(f, 30), 2).getTime()
2304
2379
  })
2305
2380
  ), {
@@ -2315,7 +2390,7 @@ class Lt {
2315
2390
  this.storageKey,
2316
2391
  JSON.stringify({
2317
2392
  ...s.data,
2318
- accessTokenExpiresAt: O(m, 8).getTime(),
2393
+ accessTokenExpiresAt: B(m, 8).getTime(),
2319
2394
  refreshTokenExpiresAt: F(q(m, 30), 2).getTime()
2320
2395
  })
2321
2396
  ), {
@@ -2333,7 +2408,7 @@ class Lt {
2333
2408
  this.storageKey,
2334
2409
  JSON.stringify({
2335
2410
  ...s.data,
2336
- accessTokenExpiresAt: O(m, 8).getTime(),
2411
+ accessTokenExpiresAt: B(m, 8).getTime(),
2337
2412
  refreshTokenExpiresAt: F(q(m, 30), 2).getTime()
2338
2413
  })
2339
2414
  ), {
@@ -2357,7 +2432,7 @@ class Lt {
2357
2432
  this.storageKey,
2358
2433
  JSON.stringify({
2359
2434
  ...t.data,
2360
- accessTokenExpiresAt: O(r, 8).getTime(),
2435
+ accessTokenExpiresAt: B(r, 8).getTime(),
2361
2436
  refreshTokenExpiresAt: F(q(r, 30), 2).getTime()
2362
2437
  })
2363
2438
  ), {
@@ -2373,7 +2448,7 @@ class Lt {
2373
2448
  this.storageKey,
2374
2449
  JSON.stringify({
2375
2450
  ...t.data,
2376
- accessTokenExpiresAt: O(r, 8).getTime(),
2451
+ accessTokenExpiresAt: B(r, 8).getTime(),
2377
2452
  refreshTokenExpiresAt: F(q(r, 30), 2).getTime()
2378
2453
  })
2379
2454
  ), { ok: !0 };
@@ -2387,7 +2462,7 @@ class Lt {
2387
2462
  data: null
2388
2463
  };
2389
2464
  if (this.refreshing)
2390
- return await ke(1e3), await this.get();
2465
+ return await Ce(1e3), await this.get();
2391
2466
  const e = window.localStorage.getItem(this.storageKey);
2392
2467
  if (!e)
2393
2468
  return {
@@ -2419,7 +2494,7 @@ class Lt {
2419
2494
  this.logger.success("Session refreshed!"), r = /* @__PURE__ */ new Date(), t = {
2420
2495
  ...t,
2421
2496
  ...m.data,
2422
- accessTokenExpiresAt: O(r, 8).getTime(),
2497
+ accessTokenExpiresAt: B(r, 8).getTime(),
2423
2498
  refreshTokenExpiresAt: F(q(r, 30), 2).getTime()
2424
2499
  }, window.localStorage.setItem(this.storageKey, JSON.stringify(t));
2425
2500
  }
@@ -2488,11 +2563,11 @@ function i(n, e) {
2488
2563
  }
2489
2564
  return e;
2490
2565
  }
2491
- class Vt {
2566
+ class Qt {
2492
2567
  constructor(e) {
2493
2568
  c(this, "staticService");
2494
2569
  const t = (e == null ? void 0 : e.environment) === "development";
2495
- this.staticService = new Wt({
2570
+ this.staticService = new Ut({
2496
2571
  url: t ? "https://static.development.opexa.io" : "https://static.opexa.io"
2497
2572
  });
2498
2573
  }
@@ -2525,7 +2600,8 @@ class Vt {
2525
2600
  referralCommission: this.referralCommission.bind(this),
2526
2601
  platform__next: this.platform__next.bind(this),
2527
2602
  pointsClubSettings: this.pointsClubSettings.bind(this),
2528
- paymentSettings: this.paymentSettings.bind(this)
2603
+ paymentSettings: this.paymentSettings.bind(this),
2604
+ message: this.message.bind(this)
2529
2605
  };
2530
2606
  }
2531
2607
  site(e) {
@@ -2539,7 +2615,7 @@ class Vt {
2539
2615
  }
2540
2616
  /** @deprecated */
2541
2617
  platform(e) {
2542
- var t, r, a, s, m, u, p, f, h, l, C, k, _, T, v, y, M, N, S, R, D, I, A, G, W, x, E, L, V, H, Y, j, Q, K, z, J, X, Z, ee, te, re, ae, ne, ie, oe, se, me, ce, ye;
2618
+ var t, r, a, s, m, d, p, f, h, l, k, C, _, T, M, v, y, R, N, S, D, I, G, P, A, W, E, L, V, H, Y, j, Q, K, z, J, X, Z, ee, te, re, ae, ne, ie, oe, se, me, ce, ye;
2543
2619
  return {
2544
2620
  timezone: e.timezone,
2545
2621
  currency: e.currency,
@@ -2553,37 +2629,37 @@ class Vt {
2553
2629
  webEnabled: ((a = e.bankDepositGatewaySettings) == null ? void 0 : a.webEnabled) ?? !1,
2554
2630
  mobileWebEnabled: ((s = e.bankDepositGatewaySettings) == null ? void 0 : s.mobileWebEnabled) ?? !1,
2555
2631
  minimumAmount: i((m = e.bankDepositGatewaySettings) == null ? void 0 : m.minimumAmount),
2556
- maximumAmount: i((u = e.bankDepositGatewaySettings) == null ? void 0 : u.maximumAmount)
2632
+ maximumAmount: i((d = e.bankDepositGatewaySettings) == null ? void 0 : d.maximumAmount)
2557
2633
  },
2558
2634
  gcash: {
2559
2635
  androidEnabled: ((p = e.gcashDepositGatewaySettings) == null ? void 0 : p.androidEnabled) ?? !1,
2560
2636
  iosEnabled: ((f = e.gcashDepositGatewaySettings) == null ? void 0 : f.iosEnabled) ?? !1,
2561
2637
  webEnabled: ((h = e.gcashDepositGatewaySettings) == null ? void 0 : h.webEnabled) ?? !1,
2562
2638
  mobileWebEnabled: ((l = e.gcashDepositGatewaySettings) == null ? void 0 : l.mobileWebEnabled) ?? !1,
2563
- minimumAmount: i((C = e.gcashDepositGatewaySettings) == null ? void 0 : C.minimumAmount),
2564
- maximumAmount: i((k = e.gcashDepositGatewaySettings) == null ? void 0 : k.maximumAmount)
2639
+ minimumAmount: i((k = e.gcashDepositGatewaySettings) == null ? void 0 : k.minimumAmount),
2640
+ maximumAmount: i((C = e.gcashDepositGatewaySettings) == null ? void 0 : C.maximumAmount)
2565
2641
  },
2566
2642
  maya: {
2567
2643
  androidEnabled: ((_ = e.mayaDepositGatewaySettings) == null ? void 0 : _.androidEnabled) ?? !1,
2568
2644
  iosEnabled: ((T = e.mayaDepositGatewaySettings) == null ? void 0 : T.iosEnabled) ?? !1,
2569
- webEnabled: ((v = e.mayaDepositGatewaySettings) == null ? void 0 : v.webEnabled) ?? !1,
2570
- mobileWebEnabled: ((y = e.mayaDepositGatewaySettings) == null ? void 0 : y.mobileWebEnabled) ?? !1,
2571
- minimumAmount: i((M = e.mayaDepositGatewaySettings) == null ? void 0 : M.minimumAmount),
2572
- maximumAmount: i((N = e.mayaDepositGatewaySettings) == null ? void 0 : N.maximumAmount)
2645
+ webEnabled: ((M = e.mayaDepositGatewaySettings) == null ? void 0 : M.webEnabled) ?? !1,
2646
+ mobileWebEnabled: ((v = e.mayaDepositGatewaySettings) == null ? void 0 : v.mobileWebEnabled) ?? !1,
2647
+ minimumAmount: i((y = e.mayaDepositGatewaySettings) == null ? void 0 : y.minimumAmount),
2648
+ maximumAmount: i((R = e.mayaDepositGatewaySettings) == null ? void 0 : R.maximumAmount)
2573
2649
  },
2574
2650
  mayaApp: {
2575
- androidEnabled: ((S = e.mayaAppDepositGatewaySettings) == null ? void 0 : S.androidEnabled) ?? !1,
2576
- iosEnabled: ((R = e.mayaAppDepositGatewaySettings) == null ? void 0 : R.iosEnabled) ?? !1,
2651
+ androidEnabled: ((N = e.mayaAppDepositGatewaySettings) == null ? void 0 : N.androidEnabled) ?? !1,
2652
+ iosEnabled: ((S = e.mayaAppDepositGatewaySettings) == null ? void 0 : S.iosEnabled) ?? !1,
2577
2653
  webEnabled: ((D = e.mayaAppDepositGatewaySettings) == null ? void 0 : D.webEnabled) ?? !1,
2578
2654
  mobileWebEnabled: ((I = e.mayaAppDepositGatewaySettings) == null ? void 0 : I.mobileWebEnabled) ?? !1,
2579
- minimumAmount: i((A = e.mayaAppDepositGatewaySettings) == null ? void 0 : A.minimumAmount),
2580
- maximumAmount: i((G = e.mayaAppDepositGatewaySettings) == null ? void 0 : G.maximumAmount)
2655
+ minimumAmount: i((G = e.mayaAppDepositGatewaySettings) == null ? void 0 : G.minimumAmount),
2656
+ maximumAmount: i((P = e.mayaAppDepositGatewaySettings) == null ? void 0 : P.maximumAmount)
2581
2657
  }
2582
2658
  },
2583
2659
  withdrawalGateway: {
2584
2660
  bank: {
2585
- androidEnabled: ((W = e.bankWithdrawalGatewaySettings) == null ? void 0 : W.androidEnabled) ?? !1,
2586
- iosEnabled: ((x = e.bankWithdrawalGatewaySettings) == null ? void 0 : x.iosEnabled) ?? !1,
2661
+ androidEnabled: ((A = e.bankWithdrawalGatewaySettings) == null ? void 0 : A.androidEnabled) ?? !1,
2662
+ iosEnabled: ((W = e.bankWithdrawalGatewaySettings) == null ? void 0 : W.iosEnabled) ?? !1,
2587
2663
  webEnabled: ((E = e.bankWithdrawalGatewaySettings) == null ? void 0 : E.webEnabled) ?? !1,
2588
2664
  mobileWebEnabled: ((L = e.bankWithdrawalGatewaySettings) == null ? void 0 : L.mobileWebEnabled) ?? !1,
2589
2665
  minimumAmount: i((V = e.bankWithdrawalGatewaySettings) == null ? void 0 : V.minimumAmount),
@@ -2630,7 +2706,7 @@ class Vt {
2630
2706
  return {
2631
2707
  currency: e.currency,
2632
2708
  timezone: e.timezone,
2633
- locale: qt(e.currency)
2709
+ locale: Ht(e.currency)
2634
2710
  };
2635
2711
  }
2636
2712
  pointsClubSettings(e) {
@@ -2639,7 +2715,7 @@ class Vt {
2639
2715
  };
2640
2716
  }
2641
2717
  paymentSettings(e) {
2642
- var t, r, a, s, m, u, p, f, h, l, C, k, _, T, v, y, M, N, S, R, D, I, A, G, W, x, E, L, V, H, Y, j, Q, K, z, J, X, Z, ee, te, re, ae, ne, ie, oe, se, me, ce;
2718
+ var t, r, a, s, m, d, p, f, h, l, k, C, _, T, M, v, y, R, N, S, D, I, G, P, A, W, E, L, V, H, Y, j, Q, K, z, J, X, Z, ee, te, re, ae, ne, ie, oe, se, me, ce;
2643
2719
  return {
2644
2720
  minimumFirstDepositAmount: i(e.minimumFirstDepositAmount),
2645
2721
  restrictWithdrawalsToVerifiedMembers: e.restrictWithdrawalsToVerifiedMembers,
@@ -2650,37 +2726,37 @@ class Vt {
2650
2726
  webEnabled: ((a = e.bankDepositGatewaySettings) == null ? void 0 : a.webEnabled) ?? !1,
2651
2727
  mobileWebEnabled: ((s = e.bankDepositGatewaySettings) == null ? void 0 : s.mobileWebEnabled) ?? !1,
2652
2728
  minimumAmount: i((m = e.bankDepositGatewaySettings) == null ? void 0 : m.minimumAmount),
2653
- maximumAmount: i((u = e.bankDepositGatewaySettings) == null ? void 0 : u.maximumAmount)
2729
+ maximumAmount: i((d = e.bankDepositGatewaySettings) == null ? void 0 : d.maximumAmount)
2654
2730
  },
2655
2731
  gcash: {
2656
2732
  androidEnabled: ((p = e.gcashDepositGatewaySettings) == null ? void 0 : p.androidEnabled) ?? !1,
2657
2733
  iosEnabled: ((f = e.gcashDepositGatewaySettings) == null ? void 0 : f.iosEnabled) ?? !1,
2658
2734
  webEnabled: ((h = e.gcashDepositGatewaySettings) == null ? void 0 : h.webEnabled) ?? !1,
2659
2735
  mobileWebEnabled: ((l = e.gcashDepositGatewaySettings) == null ? void 0 : l.mobileWebEnabled) ?? !1,
2660
- minimumAmount: i((C = e.gcashDepositGatewaySettings) == null ? void 0 : C.minimumAmount),
2661
- maximumAmount: i((k = e.gcashDepositGatewaySettings) == null ? void 0 : k.maximumAmount)
2736
+ minimumAmount: i((k = e.gcashDepositGatewaySettings) == null ? void 0 : k.minimumAmount),
2737
+ maximumAmount: i((C = e.gcashDepositGatewaySettings) == null ? void 0 : C.maximumAmount)
2662
2738
  },
2663
2739
  maya: {
2664
2740
  androidEnabled: ((_ = e.mayaDepositGatewaySettings) == null ? void 0 : _.androidEnabled) ?? !1,
2665
2741
  iosEnabled: ((T = e.mayaDepositGatewaySettings) == null ? void 0 : T.iosEnabled) ?? !1,
2666
- webEnabled: ((v = e.mayaDepositGatewaySettings) == null ? void 0 : v.webEnabled) ?? !1,
2667
- mobileWebEnabled: ((y = e.mayaDepositGatewaySettings) == null ? void 0 : y.mobileWebEnabled) ?? !1,
2668
- minimumAmount: i((M = e.mayaDepositGatewaySettings) == null ? void 0 : M.minimumAmount),
2669
- maximumAmount: i((N = e.mayaDepositGatewaySettings) == null ? void 0 : N.maximumAmount)
2742
+ webEnabled: ((M = e.mayaDepositGatewaySettings) == null ? void 0 : M.webEnabled) ?? !1,
2743
+ mobileWebEnabled: ((v = e.mayaDepositGatewaySettings) == null ? void 0 : v.mobileWebEnabled) ?? !1,
2744
+ minimumAmount: i((y = e.mayaDepositGatewaySettings) == null ? void 0 : y.minimumAmount),
2745
+ maximumAmount: i((R = e.mayaDepositGatewaySettings) == null ? void 0 : R.maximumAmount)
2670
2746
  },
2671
2747
  mayaApp: {
2672
- androidEnabled: ((S = e.mayaAppDepositGatewaySettings) == null ? void 0 : S.androidEnabled) ?? !1,
2673
- iosEnabled: ((R = e.mayaAppDepositGatewaySettings) == null ? void 0 : R.iosEnabled) ?? !1,
2748
+ androidEnabled: ((N = e.mayaAppDepositGatewaySettings) == null ? void 0 : N.androidEnabled) ?? !1,
2749
+ iosEnabled: ((S = e.mayaAppDepositGatewaySettings) == null ? void 0 : S.iosEnabled) ?? !1,
2674
2750
  webEnabled: ((D = e.mayaAppDepositGatewaySettings) == null ? void 0 : D.webEnabled) ?? !1,
2675
2751
  mobileWebEnabled: ((I = e.mayaAppDepositGatewaySettings) == null ? void 0 : I.mobileWebEnabled) ?? !1,
2676
- minimumAmount: i((A = e.mayaAppDepositGatewaySettings) == null ? void 0 : A.minimumAmount),
2677
- maximumAmount: i((G = e.mayaAppDepositGatewaySettings) == null ? void 0 : G.maximumAmount)
2752
+ minimumAmount: i((G = e.mayaAppDepositGatewaySettings) == null ? void 0 : G.minimumAmount),
2753
+ maximumAmount: i((P = e.mayaAppDepositGatewaySettings) == null ? void 0 : P.maximumAmount)
2678
2754
  }
2679
2755
  },
2680
2756
  withdrawalGateway: {
2681
2757
  bank: {
2682
- androidEnabled: ((W = e.bankWithdrawalGatewaySettings) == null ? void 0 : W.androidEnabled) ?? !1,
2683
- iosEnabled: ((x = e.bankWithdrawalGatewaySettings) == null ? void 0 : x.iosEnabled) ?? !1,
2758
+ androidEnabled: ((A = e.bankWithdrawalGatewaySettings) == null ? void 0 : A.androidEnabled) ?? !1,
2759
+ iosEnabled: ((W = e.bankWithdrawalGatewaySettings) == null ? void 0 : W.iosEnabled) ?? !1,
2684
2760
  webEnabled: ((E = e.bankWithdrawalGatewaySettings) == null ? void 0 : E.webEnabled) ?? !1,
2685
2761
  mobileWebEnabled: ((L = e.bankWithdrawalGatewaySettings) == null ? void 0 : L.mobileWebEnabled) ?? !1,
2686
2762
  minimumAmount: i((V = e.bankWithdrawalGatewaySettings) == null ? void 0 : V.minimumAmount),
@@ -3046,8 +3122,20 @@ class Vt {
3046
3122
  dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
3047
3123
  };
3048
3124
  }
3125
+ message(e) {
3126
+ return {
3127
+ id: e.id,
3128
+ logo: e.logo,
3129
+ title: e.title,
3130
+ popup: e.popup,
3131
+ content: e.content,
3132
+ actions: e.actions,
3133
+ markedAsRead: e.markedAsRead,
3134
+ dateTimeCreated: new Date(e.dateTimeCreated)
3135
+ };
3136
+ }
3049
3137
  }
3050
- class jt {
3138
+ class Jt {
3051
3139
  constructor(e) {
3052
3140
  c(this, "cmsPortalService");
3053
3141
  c(this, "authService");
@@ -3057,6 +3145,7 @@ class jt {
3057
3145
  c(this, "accountService");
3058
3146
  c(this, "reportService");
3059
3147
  c(this, "portalService");
3148
+ c(this, "triggerService");
3060
3149
  c(this, "sessionManager");
3061
3150
  c(this, "transformer");
3062
3151
  c(this, "logger");
@@ -3068,14 +3157,14 @@ class jt {
3068
3157
  platform: a,
3069
3158
  environment: s,
3070
3159
  logs: m
3071
- } = e, u = s === "production";
3072
- this.transformer = new Vt({
3160
+ } = e, d = s === "production";
3161
+ this.transformer = new Qt({
3073
3162
  environment: s
3074
- }), this.logger = new Ce({
3163
+ }), this.logger = new ke({
3075
3164
  enabled: m ?? !1
3076
3165
  });
3077
- const p = u ? "https://auth.opexa.io" : "https://auth.development.opexa.io", f = u ? "https://wallet.opexa.io/graphql" : "https://wallet.development.opexa.io/graphql", h = u ? "https://report.opexa.io/graphql" : "https://report.development.opexa.io/graphql", l = u ? "https://account.opexa.io/graphql" : "https://account.development.opexa.io/graphql", C = 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", _ = u ? "https://game.opexa.io/graphql" : "https://game.development.opexa.io/graphql", T = "https://portal-api.opexacms.io/v1", v = new Rt({
3078
- url: T,
3166
+ const p = d ? "https://auth.opexa.io" : "https://auth.development.opexa.io", f = d ? "https://wallet.opexa.io/graphql" : "https://wallet.development.opexa.io/graphql", h = d ? "https://report.opexa.io/graphql" : "https://report.development.opexa.io/graphql", l = d ? "https://account.opexa.io/graphql" : "https://account.development.opexa.io/graphql", k = d ? "https://portal.opexa.io/graphql" : "https://portal.development.opexa.io/graphql", C = d ? "https://file.opexa.io/graphql" : "https://file.development.opexa.io/graphql", _ = d ? "https://game.opexa.io/graphql" : "https://game.development.opexa.io/graphql", T = d ? "https://trigger.opexa.io/graphql" : "https://trigger.development.opexa.io/graphql", M = "https://portal-api.opexacms.io/v1", v = new Gt({
3167
+ url: M,
3079
3168
  site: t,
3080
3169
  platform: r
3081
3170
  }), y = {
@@ -3086,15 +3175,15 @@ class jt {
3086
3175
  "Platform-Code": a
3087
3176
  }
3088
3177
  }
3089
- }, M = new It(new B(_, y)), N = new Dt(new B(k, y)), S = new xt(new B(f, y)), R = new Mt(new B(l, y)), D = new Pt(new B(h, y)), I = new Gt(new B(C, y)), A = new Nt({
3178
+ }, R = new Wt(new O(_, y)), N = new Pt(new O(C, y)), S = new Bt(new O(f, y)), D = new Dt(new O(l, y)), I = new $t(new O(h, y)), G = new xt(new O(k, y)), P = new Ot(new O(T, y)), A = new It({
3090
3179
  url: p,
3091
3180
  platform: a
3092
- }), G = new Lt({
3181
+ }), W = new jt({
3093
3182
  logs: m,
3094
3183
  authService: A,
3095
3184
  walletService: S
3096
3185
  });
3097
- this.authService = A, this.gameService = M, this.fileService = N, this.walletService = S, this.accountService = R, this.reportService = D, this.portalService = I, this.sessionManager = G, this.cmsPortalService = v, this.cache = new $t();
3186
+ this.authService = A, this.gameService = R, this.fileService = N, this.walletService = S, this.accountService = D, this.reportService = I, this.portalService = G, this.triggerService = P, this.sessionManager = W, this.cmsPortalService = v, this.cache = new qt();
3098
3187
  }
3099
3188
  get authMiddleware() {
3100
3189
  return async (e) => {
@@ -3142,7 +3231,7 @@ class jt {
3142
3231
  case "MOBILE_NUMBER": {
3143
3232
  const t = await this.sessionManager.create({
3144
3233
  type: "MOBILE_NUMBER",
3145
- mobileNumber: P(e.mobileNumber, await this.locale),
3234
+ mobileNumber: x(e.mobileNumber, await this.locale),
3146
3235
  verificationCode: e.verificationCode
3147
3236
  });
3148
3237
  return t.ok ? { ok: !0 } : t;
@@ -3175,7 +3264,7 @@ class jt {
3175
3264
  await this.sessionManager.destroy();
3176
3265
  }
3177
3266
  watchSession(e) {
3178
- const t = Ut(e.interval ?? 3e4, 3e4, 6e4);
3267
+ const t = Ft(e.interval ?? 3e4, 3e4, 6e4);
3179
3268
  let r = null;
3180
3269
  const a = () => setTimeout(async () => {
3181
3270
  await this.sessionManager.verify() || await e.onInvalid(), r = a();
@@ -3260,7 +3349,7 @@ class jt {
3260
3349
  domain: e.domain,
3261
3350
  birthDay: typeof e.dateOfBirth == "string" ? e.dateOfBirth : e.dateOfBirth.toISOString(),
3262
3351
  password: await g(e.password),
3263
- mobileNumber: P(e.mobileNumber, await this.locale)
3352
+ mobileNumber: x(e.mobileNumber, await this.locale)
3264
3353
  },
3265
3354
  referralCode: e.referralCode,
3266
3355
  verificationCode: e.verificationCode,
@@ -3274,7 +3363,7 @@ class jt {
3274
3363
  const a = await this.accountService.registerMemberAccountViaMobile({
3275
3364
  input: {
3276
3365
  id: t,
3277
- mobileNumber: P(e.mobileNumber, await this.locale)
3366
+ mobileNumber: x(e.mobileNumber, await this.locale)
3278
3367
  },
3279
3368
  referralCode: e.referralCode,
3280
3369
  reCAPTCHAResponse: e.reCAPTCHAResponse,
@@ -3287,7 +3376,7 @@ class jt {
3287
3376
  id: t,
3288
3377
  name: e.name,
3289
3378
  password: await g(e.password),
3290
- mobileNumber: e.mobileNumber ? P(e.mobileNumber, await this.locale) : void 0
3379
+ mobileNumber: e.mobileNumber ? x(e.mobileNumber, await this.locale) : void 0
3291
3380
  },
3292
3381
  reCAPTCHAResponse: e.reCAPTCHAResponse
3293
3382
  });
@@ -3311,7 +3400,7 @@ class jt {
3311
3400
  password: t.password ? await g(t.password) : void 0,
3312
3401
  transactionPassword: t.transactionPassword ? await g(t.transactionPassword) : void 0,
3313
3402
  ...t.mobileNumber && {
3314
- mobileNumber: P(t.mobileNumber, await this.locale)
3403
+ mobileNumber: x(t.mobileNumber, await this.locale)
3315
3404
  },
3316
3405
  secretAnswer: t.secretAnswer ? await g(t.secretAnswer) : void 0
3317
3406
  }
@@ -3354,7 +3443,7 @@ class jt {
3354
3443
  async resetPassword(e) {
3355
3444
  return await this.accountService.resetPassword({
3356
3445
  input: {
3357
- mobileNumber: P(e.mobileNumber, await this.locale),
3446
+ mobileNumber: x(e.mobileNumber, await this.locale),
3358
3447
  newPassword: await g(e.newPassword)
3359
3448
  },
3360
3449
  verificationCode: e.verificationCode
@@ -3381,7 +3470,7 @@ class jt {
3381
3470
  return await this.accountService.sendVerificationCode({
3382
3471
  input: {
3383
3472
  channel: "SMS",
3384
- recipient: P(e, await this.locale)
3473
+ recipient: x(e, await this.locale)
3385
3474
  }
3386
3475
  });
3387
3476
  }
@@ -3389,7 +3478,7 @@ class jt {
3389
3478
  if (e.type === "SMS")
3390
3479
  return this.authService.sendVerificationCode({
3391
3480
  channel: "SMS",
3392
- recipient: P(e.mobileNumber, await this.locale),
3481
+ recipient: x(e.mobileNumber, await this.locale),
3393
3482
  ...e.strict && {
3394
3483
  verificationType: "MEMBER"
3395
3484
  }
@@ -3456,7 +3545,7 @@ class jt {
3456
3545
  id: t,
3457
3546
  amount: e.amount.toString(),
3458
3547
  transactionPassword: await g(e.transactionPassword),
3459
- recipientMobileNumber: P(e.recipientMobileNumber, await this.locale)
3548
+ recipientMobileNumber: x(e.recipientMobileNumber, await this.locale)
3460
3549
  }
3461
3550
  });
3462
3551
  if (!r.ok) return r;
@@ -3467,7 +3556,7 @@ class jt {
3467
3556
  id: t,
3468
3557
  amount: e.amount.toString(),
3469
3558
  transactionPassword: await g(e.transactionPassword),
3470
- recipientMobileNumber: P(e.recipientMobileNumber, await this.locale)
3559
+ recipientMobileNumber: x(e.recipientMobileNumber, await this.locale)
3471
3560
  }
3472
3561
  });
3473
3562
  if (!r.ok) return r;
@@ -3892,10 +3981,36 @@ class jt {
3892
3981
  data: e.data ? this.transformer.transform.pointsClubSettings(e.data) : null
3893
3982
  } : e;
3894
3983
  }
3984
+ /**/
3985
+ /*+----------------------------------------+*/
3986
+ /*+ MESSAGES +*/
3987
+ /*+----------------------------------------+*/
3988
+ /**/
3989
+ async messages(e) {
3990
+ const t = await this.triggerService.messages(e);
3991
+ return t.ok ? {
3992
+ ok: !0,
3993
+ data: {
3994
+ messages: t.data.edges.map(({ cursor: r, node: a }) => ({
3995
+ ...this.transformer.transform.message(a),
3996
+ cursor: r
3997
+ })),
3998
+ totalCount: t.data.totalCount,
3999
+ hasNextPage: t.data.pageInfo.hasNextPage,
4000
+ endCursor: t.data.pageInfo.endCursor ?? void 0
4001
+ }
4002
+ } : t;
4003
+ }
4004
+ async markMessageAsRead(e) {
4005
+ return await this.triggerService.markMessageAsRead({ id: e });
4006
+ }
4007
+ async markAllMessageAsRead() {
4008
+ return await this.triggerService.markAllMessageAsRead();
4009
+ }
3895
4010
  }
3896
4011
  export {
3897
- zt as ObjectId,
4012
+ er as ObjectId,
3898
4013
  U as ObjectType,
3899
- jt as Sdk
4014
+ Jt as Sdk
3900
4015
  };
3901
4016
  //# sourceMappingURL=index.mjs.map