@opexa/portal-sdk 0.0.90 → 0.0.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1622 -1622
- package/dist/index.js +55 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +271 -143
- package/dist/index.mjs.map +1 -1
- package/dist/sdk/sdk.d.ts +7 -2
- package/dist/sdk/transformer.d.ts +2 -0
- package/dist/sdk/types.d.ts +23 -2
- package/dist/services/index.d.ts +1 -0
- package/dist/services/queries.d.ts +4 -0
- package/dist/services/trigger.service.d.ts +12 -0
- package/dist/services/types.d.ts +44 -0
- package/package.json +81 -81
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
|
|
5
|
+
import { ObjectId as tr } 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
|
-
`,
|
|
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
|
-
`,
|
|
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
|
-
`,
|
|
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
|
-
`,
|
|
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
|
-
`,
|
|
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
|
-
`,
|
|
1177
|
+
`, Ct = o`
|
|
1178
1178
|
query UplinesByName($search: String!, $first: Int) {
|
|
1179
1179
|
uplinesByName(search: $search, first: $first) {
|
|
1180
1180
|
...ReferralFragment
|
|
@@ -1209,14 +1209,56 @@ const tt = o`
|
|
|
1209
1209
|
}
|
|
1210
1210
|
}
|
|
1211
1211
|
}
|
|
1212
|
-
`,
|
|
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
|
+
query UnreadMessagesCount($filter: MessageFilterInput) {
|
|
1248
|
+
messages(filter: $filter) {
|
|
1249
|
+
totalCount
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
`, Nt = o`
|
|
1253
|
+
mutation MarkMessageAsRead($id: ObjectId!) {
|
|
1254
|
+
markMessageAsRead(id: $id)
|
|
1255
|
+
}
|
|
1256
|
+
`, Dt = o`
|
|
1257
|
+
mutation MarkAllMessageAsRead {
|
|
1258
|
+
markAllMessageAsRead
|
|
1259
|
+
}
|
|
1218
1260
|
`;
|
|
1219
|
-
function
|
|
1261
|
+
function u(n) {
|
|
1220
1262
|
return {
|
|
1221
1263
|
name: n,
|
|
1222
1264
|
message: {
|
|
@@ -1271,7 +1313,7 @@ function d(n) {
|
|
|
1271
1313
|
}[n]
|
|
1272
1314
|
};
|
|
1273
1315
|
}
|
|
1274
|
-
class
|
|
1316
|
+
class It {
|
|
1275
1317
|
constructor(e) {
|
|
1276
1318
|
c(this, "client");
|
|
1277
1319
|
this.client = e;
|
|
@@ -1288,7 +1330,7 @@ class Mt {
|
|
|
1288
1330
|
const t = await this.client.request(at, e);
|
|
1289
1331
|
return t.ok ? t.data.registerMemberAccount ? {
|
|
1290
1332
|
ok: !1,
|
|
1291
|
-
error:
|
|
1333
|
+
error: u(t.data.registerMemberAccount.__typename)
|
|
1292
1334
|
} : {
|
|
1293
1335
|
ok: !0
|
|
1294
1336
|
} : t;
|
|
@@ -1297,7 +1339,7 @@ class Mt {
|
|
|
1297
1339
|
const t = await this.client.request(nt, e);
|
|
1298
1340
|
return t.ok ? t.data.registerMemberAccountViaMobile ? {
|
|
1299
1341
|
ok: !1,
|
|
1300
|
-
error:
|
|
1342
|
+
error: u(t.data.registerMemberAccountViaMobile.__typename)
|
|
1301
1343
|
} : {
|
|
1302
1344
|
ok: !0
|
|
1303
1345
|
} : t;
|
|
@@ -1306,7 +1348,7 @@ class Mt {
|
|
|
1306
1348
|
const t = await this.client.request(it, e);
|
|
1307
1349
|
return t.ok ? t.data.registerMemberAccount ? {
|
|
1308
1350
|
ok: !1,
|
|
1309
|
-
error:
|
|
1351
|
+
error: u(t.data.registerMemberAccount.__typename)
|
|
1310
1352
|
} : {
|
|
1311
1353
|
ok: !0
|
|
1312
1354
|
} : t;
|
|
@@ -1315,7 +1357,7 @@ class Mt {
|
|
|
1315
1357
|
const t = await this.client.request(st, e);
|
|
1316
1358
|
return t.ok ? t.data.updateMemberAccount ? {
|
|
1317
1359
|
ok: !1,
|
|
1318
|
-
error:
|
|
1360
|
+
error: u(t.data.updateMemberAccount.__typename)
|
|
1319
1361
|
} : {
|
|
1320
1362
|
ok: !0
|
|
1321
1363
|
} : t;
|
|
@@ -1339,7 +1381,7 @@ class Mt {
|
|
|
1339
1381
|
);
|
|
1340
1382
|
return t.ok ? t.data.resetPassword ? {
|
|
1341
1383
|
ok: !1,
|
|
1342
|
-
error:
|
|
1384
|
+
error: u(t.data.resetPassword.__typename)
|
|
1343
1385
|
} : {
|
|
1344
1386
|
ok: !0
|
|
1345
1387
|
} : t;
|
|
@@ -1357,7 +1399,7 @@ class Mt {
|
|
|
1357
1399
|
const t = await this.client.request(ft, e);
|
|
1358
1400
|
return t.ok ? t.data.sendVerificationCode ? {
|
|
1359
1401
|
ok: !1,
|
|
1360
|
-
error:
|
|
1402
|
+
error: u(t.data.sendVerificationCode.__typename)
|
|
1361
1403
|
} : {
|
|
1362
1404
|
ok: !0
|
|
1363
1405
|
} : t;
|
|
@@ -1369,7 +1411,7 @@ class Mt {
|
|
|
1369
1411
|
const t = await this.client.request(dt, e);
|
|
1370
1412
|
return t.ok ? t.data.verifyMobileNumber ? {
|
|
1371
1413
|
ok: !1,
|
|
1372
|
-
error:
|
|
1414
|
+
error: u(t.data.verifyMobileNumber.__typename)
|
|
1373
1415
|
} : {
|
|
1374
1416
|
ok: !0
|
|
1375
1417
|
} : t;
|
|
@@ -1378,7 +1420,7 @@ class Mt {
|
|
|
1378
1420
|
const t = await this.client.request(ut, e);
|
|
1379
1421
|
return t.ok ? t.data.createMemberVerification ? {
|
|
1380
1422
|
ok: !1,
|
|
1381
|
-
error:
|
|
1423
|
+
error: u(t.data.createMemberVerification.__typename)
|
|
1382
1424
|
} : {
|
|
1383
1425
|
ok: !0
|
|
1384
1426
|
} : t;
|
|
@@ -1387,7 +1429,7 @@ class Mt {
|
|
|
1387
1429
|
const t = await this.client.request(lt, e);
|
|
1388
1430
|
return t.ok ? t.data.updateMemberVerification ? {
|
|
1389
1431
|
ok: !1,
|
|
1390
|
-
error:
|
|
1432
|
+
error: u(t.data.updateMemberVerification.__typename)
|
|
1391
1433
|
} : {
|
|
1392
1434
|
ok: !0
|
|
1393
1435
|
} : t;
|
|
@@ -1413,7 +1455,7 @@ class Mt {
|
|
|
1413
1455
|
const t = await this.client.request(ot, e);
|
|
1414
1456
|
return t.ok ? t.data.registerMayaMemberAccount ? {
|
|
1415
1457
|
ok: !1,
|
|
1416
|
-
error:
|
|
1458
|
+
error: u(t.data.registerMayaMemberAccount.__typename)
|
|
1417
1459
|
} : {
|
|
1418
1460
|
ok: !0
|
|
1419
1461
|
} : t;
|
|
@@ -1429,13 +1471,13 @@ class Mt {
|
|
|
1429
1471
|
const t = await this.client.request(At, e);
|
|
1430
1472
|
return t.ok ? t.data.updateReferralCode ? {
|
|
1431
1473
|
ok: !1,
|
|
1432
|
-
error:
|
|
1474
|
+
error: u(t.data.updateReferralCode.__typename)
|
|
1433
1475
|
} : {
|
|
1434
1476
|
ok: !0
|
|
1435
1477
|
} : t;
|
|
1436
1478
|
}
|
|
1437
1479
|
async pointsClubSettings() {
|
|
1438
|
-
const e = await this.client.request(
|
|
1480
|
+
const e = await this.client.request(Mt);
|
|
1439
1481
|
return e.ok ? { ok: !0, data: e.data.pointsClubSettings } : e;
|
|
1440
1482
|
}
|
|
1441
1483
|
}
|
|
@@ -1455,7 +1497,7 @@ const ue = {
|
|
|
1455
1497
|
429: { name: "HttpTooManyRequests", message: "Too Many Requests" },
|
|
1456
1498
|
500: { name: "HttpInternalServerError", message: "Internal Server Error" }
|
|
1457
1499
|
};
|
|
1458
|
-
class
|
|
1500
|
+
class Gt {
|
|
1459
1501
|
constructor(e) {
|
|
1460
1502
|
c(this, "url");
|
|
1461
1503
|
c(this, "platform");
|
|
@@ -1486,7 +1528,7 @@ class Nt {
|
|
|
1486
1528
|
data: a
|
|
1487
1529
|
} : a.code === "ACCOUNT_BLACKLISTED" ? {
|
|
1488
1530
|
ok: !1,
|
|
1489
|
-
error:
|
|
1531
|
+
error: u("AccountBlacklistedError")
|
|
1490
1532
|
} : {
|
|
1491
1533
|
ok: !1,
|
|
1492
1534
|
error: w(r.status)
|
|
@@ -1515,7 +1557,7 @@ class Nt {
|
|
|
1515
1557
|
data: a
|
|
1516
1558
|
} : r.status === 401 || r.status === 403 ? {
|
|
1517
1559
|
ok: !1,
|
|
1518
|
-
error:
|
|
1560
|
+
error: u("InvalidTokenOrSecretAnswerError")
|
|
1519
1561
|
} : {
|
|
1520
1562
|
ok: !1,
|
|
1521
1563
|
error: w(r.status)
|
|
@@ -1542,10 +1584,10 @@ class Nt {
|
|
|
1542
1584
|
data: a
|
|
1543
1585
|
} : a.code === "ACCOUNT_BLACKLISTED" ? {
|
|
1544
1586
|
ok: !1,
|
|
1545
|
-
error:
|
|
1587
|
+
error: u("AccountBlacklistedError")
|
|
1546
1588
|
} : r.status === 403 || r.status === 401 ? {
|
|
1547
1589
|
ok: !1,
|
|
1548
|
-
error:
|
|
1590
|
+
error: u("InvalidTokenError")
|
|
1549
1591
|
} : {
|
|
1550
1592
|
ok: !1,
|
|
1551
1593
|
error: w(r.status)
|
|
@@ -1606,7 +1648,7 @@ class Nt {
|
|
|
1606
1648
|
const a = await r.json(), s = t(a.message);
|
|
1607
1649
|
return s ? {
|
|
1608
1650
|
ok: !1,
|
|
1609
|
-
error:
|
|
1651
|
+
error: u(s)
|
|
1610
1652
|
} : {
|
|
1611
1653
|
ok: !1,
|
|
1612
1654
|
error: w(r.status, a.message)
|
|
@@ -1624,7 +1666,7 @@ class Nt {
|
|
|
1624
1666
|
}
|
|
1625
1667
|
}
|
|
1626
1668
|
}
|
|
1627
|
-
class
|
|
1669
|
+
class Pt {
|
|
1628
1670
|
constructor(e) {
|
|
1629
1671
|
c(this, "url");
|
|
1630
1672
|
c(this, "siteId");
|
|
@@ -1639,12 +1681,12 @@ class Rt {
|
|
|
1639
1681
|
} : e;
|
|
1640
1682
|
}
|
|
1641
1683
|
async games(e) {
|
|
1642
|
-
var a, s, m,
|
|
1684
|
+
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
1685
|
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), (
|
|
1686
|
+
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
1687
|
"filter[tags][in]",
|
|
1646
1688
|
e.filter.tags.in.map((E) => E.toLowerCase()).join(",")
|
|
1647
|
-
), (
|
|
1689
|
+
), (W = (A = e == null ? void 0 : e.filter) == null ? void 0 : A.tags) != null && W.notIn && t.set(
|
|
1648
1690
|
"filter[tags][nin]",
|
|
1649
1691
|
e.filter.tags.notIn.map((E) => E.toLowerCase()).join(",")
|
|
1650
1692
|
);
|
|
@@ -1702,29 +1744,29 @@ class Rt {
|
|
|
1702
1744
|
}
|
|
1703
1745
|
}
|
|
1704
1746
|
}
|
|
1705
|
-
class
|
|
1747
|
+
class Wt {
|
|
1706
1748
|
constructor(e) {
|
|
1707
1749
|
c(this, "client");
|
|
1708
1750
|
this.client = e;
|
|
1709
1751
|
}
|
|
1710
1752
|
async file(e) {
|
|
1711
|
-
const t = await this.client.request(
|
|
1753
|
+
const t = await this.client.request(Me, e);
|
|
1712
1754
|
return t.ok ? {
|
|
1713
1755
|
ok: !0,
|
|
1714
1756
|
data: t.data.node
|
|
1715
1757
|
} : t;
|
|
1716
1758
|
}
|
|
1717
1759
|
async uploadPrivateImageFile(e) {
|
|
1718
|
-
const t = await this.client.upload(
|
|
1760
|
+
const t = await this.client.upload(ve, e);
|
|
1719
1761
|
return t.ok ? t.data.uploadPrivateImageFile ? {
|
|
1720
1762
|
ok: !1,
|
|
1721
|
-
error:
|
|
1763
|
+
error: u(t.data.uploadPrivateImageFile.__typename)
|
|
1722
1764
|
} : {
|
|
1723
1765
|
ok: !0
|
|
1724
1766
|
} : t;
|
|
1725
1767
|
}
|
|
1726
1768
|
}
|
|
1727
|
-
class
|
|
1769
|
+
class xt {
|
|
1728
1770
|
constructor(e) {
|
|
1729
1771
|
c(this, "client");
|
|
1730
1772
|
this.client = e;
|
|
@@ -1743,7 +1785,7 @@ class It {
|
|
|
1743
1785
|
const t = await this.client.request(Ee, e);
|
|
1744
1786
|
return t.ok ? t.data.createGameSession ? {
|
|
1745
1787
|
ok: !1,
|
|
1746
|
-
error:
|
|
1788
|
+
error: u(t.data.createGameSession.__typename)
|
|
1747
1789
|
} : {
|
|
1748
1790
|
ok: !0
|
|
1749
1791
|
} : t;
|
|
@@ -1761,7 +1803,7 @@ class It {
|
|
|
1761
1803
|
} : t;
|
|
1762
1804
|
}
|
|
1763
1805
|
}
|
|
1764
|
-
class
|
|
1806
|
+
class $t {
|
|
1765
1807
|
constructor(e) {
|
|
1766
1808
|
c(this, "client");
|
|
1767
1809
|
this.client = e;
|
|
@@ -1781,7 +1823,7 @@ class Gt {
|
|
|
1781
1823
|
} : e;
|
|
1782
1824
|
}
|
|
1783
1825
|
}
|
|
1784
|
-
class
|
|
1826
|
+
class Ut {
|
|
1785
1827
|
constructor(e) {
|
|
1786
1828
|
c(this, "client");
|
|
1787
1829
|
this.client = e;
|
|
@@ -1828,7 +1870,7 @@ class Pt {
|
|
|
1828
1870
|
}
|
|
1829
1871
|
async referrals(e) {
|
|
1830
1872
|
const t = await this.client.request(
|
|
1831
|
-
|
|
1873
|
+
kt,
|
|
1832
1874
|
e
|
|
1833
1875
|
);
|
|
1834
1876
|
return t.ok ? { ok: t.ok, data: t.data.member.referrals } : t;
|
|
@@ -1839,7 +1881,7 @@ class Pt {
|
|
|
1839
1881
|
}
|
|
1840
1882
|
async uplinesByName(e) {
|
|
1841
1883
|
const t = await this.client.request(
|
|
1842
|
-
|
|
1884
|
+
Ct,
|
|
1843
1885
|
e
|
|
1844
1886
|
);
|
|
1845
1887
|
return t.ok ? { ok: t.ok, data: t.data.uplinesByName } : t;
|
|
@@ -1852,7 +1894,7 @@ class Pt {
|
|
|
1852
1894
|
return t.ok ? { ok: t.ok, data: t.data.downlinesByName } : t;
|
|
1853
1895
|
}
|
|
1854
1896
|
}
|
|
1855
|
-
class
|
|
1897
|
+
class Ot {
|
|
1856
1898
|
constructor(e) {
|
|
1857
1899
|
c(this, "url");
|
|
1858
1900
|
this.url = e.url;
|
|
@@ -1864,7 +1906,50 @@ class Wt {
|
|
|
1864
1906
|
];
|
|
1865
1907
|
}
|
|
1866
1908
|
}
|
|
1867
|
-
class
|
|
1909
|
+
class Bt {
|
|
1910
|
+
constructor(e) {
|
|
1911
|
+
c(this, "client");
|
|
1912
|
+
this.client = e;
|
|
1913
|
+
}
|
|
1914
|
+
async messages(e) {
|
|
1915
|
+
const t = await this.client.request(
|
|
1916
|
+
vt,
|
|
1917
|
+
e
|
|
1918
|
+
);
|
|
1919
|
+
return t.ok ? { ok: t.ok, data: t.data.messages } : t;
|
|
1920
|
+
}
|
|
1921
|
+
async unreadMessagesCount(e) {
|
|
1922
|
+
const t = await this.client.request(Rt, e);
|
|
1923
|
+
return t.ok ? { ok: t.ok, data: t.data.messages.totalCount } : t;
|
|
1924
|
+
}
|
|
1925
|
+
async markMessageAsRead(e) {
|
|
1926
|
+
const t = await this.client.request(Nt, e);
|
|
1927
|
+
return t.ok ? t.data.markMessageAsRead ? {
|
|
1928
|
+
ok: !0
|
|
1929
|
+
} : {
|
|
1930
|
+
ok: !1,
|
|
1931
|
+
error: {
|
|
1932
|
+
name: "UnknownError",
|
|
1933
|
+
message: "Something went wrong."
|
|
1934
|
+
}
|
|
1935
|
+
} : t;
|
|
1936
|
+
}
|
|
1937
|
+
async markAllMessageAsRead() {
|
|
1938
|
+
const e = await this.client.request(
|
|
1939
|
+
Dt
|
|
1940
|
+
);
|
|
1941
|
+
return e.ok ? e.data.markAllMessageAsRead ? {
|
|
1942
|
+
ok: !0
|
|
1943
|
+
} : {
|
|
1944
|
+
ok: !1,
|
|
1945
|
+
error: {
|
|
1946
|
+
name: "UnknownError",
|
|
1947
|
+
message: "Something went wrong."
|
|
1948
|
+
}
|
|
1949
|
+
} : e;
|
|
1950
|
+
}
|
|
1951
|
+
}
|
|
1952
|
+
class qt {
|
|
1868
1953
|
constructor(e) {
|
|
1869
1954
|
c(this, "client");
|
|
1870
1955
|
this.client = e;
|
|
@@ -1892,7 +1977,7 @@ class xt {
|
|
|
1892
1977
|
const t = await this.client.request(et, e);
|
|
1893
1978
|
return t.ok ? t.data.claimCashbackBonus ? {
|
|
1894
1979
|
ok: !1,
|
|
1895
|
-
error:
|
|
1980
|
+
error: u(t.data.claimCashbackBonus.__typename)
|
|
1896
1981
|
} : {
|
|
1897
1982
|
ok: !0
|
|
1898
1983
|
} : {
|
|
@@ -1905,7 +1990,7 @@ class xt {
|
|
|
1905
1990
|
return e.ok ? { ok: e.ok, data: e.data.bonus } : e;
|
|
1906
1991
|
}
|
|
1907
1992
|
async wallet() {
|
|
1908
|
-
const e = await this.client.request(
|
|
1993
|
+
const e = await this.client.request(Re);
|
|
1909
1994
|
return e.ok ? { ok: e.ok, data: e.data.wallet } : e;
|
|
1910
1995
|
}
|
|
1911
1996
|
async deposit(e) {
|
|
@@ -1919,7 +2004,7 @@ class xt {
|
|
|
1919
2004
|
const t = await this.client.request(qe, e);
|
|
1920
2005
|
return t.ok ? t.data.createGCashDeposit ? {
|
|
1921
2006
|
ok: !1,
|
|
1922
|
-
error:
|
|
2007
|
+
error: u(t.data.createGCashDeposit.__typename)
|
|
1923
2008
|
} : {
|
|
1924
2009
|
ok: !0
|
|
1925
2010
|
} : t;
|
|
@@ -1928,7 +2013,7 @@ class xt {
|
|
|
1928
2013
|
const t = await this.client.request(Fe, e);
|
|
1929
2014
|
return t.ok ? t.data.createMayaDeposit ? {
|
|
1930
2015
|
ok: !1,
|
|
1931
|
-
error:
|
|
2016
|
+
error: u(t.data.createMayaDeposit.__typename)
|
|
1932
2017
|
} : {
|
|
1933
2018
|
ok: !0
|
|
1934
2019
|
} : t;
|
|
@@ -1937,7 +2022,7 @@ class xt {
|
|
|
1937
2022
|
const t = await this.client.request(Le, e);
|
|
1938
2023
|
return t.ok ? t.data.createMayaAppDeposit ? {
|
|
1939
2024
|
ok: !1,
|
|
1940
|
-
error:
|
|
2025
|
+
error: u(t.data.createMayaAppDeposit.__typename)
|
|
1941
2026
|
} : {
|
|
1942
2027
|
ok: !0
|
|
1943
2028
|
} : t;
|
|
@@ -1946,7 +2031,7 @@ class xt {
|
|
|
1946
2031
|
const t = await this.client.request(We, e);
|
|
1947
2032
|
return t.ok ? t.data.createGCashWithdrawal ? {
|
|
1948
2033
|
ok: !1,
|
|
1949
|
-
error:
|
|
2034
|
+
error: u(t.data.createGCashWithdrawal.__typename)
|
|
1950
2035
|
} : {
|
|
1951
2036
|
ok: !0
|
|
1952
2037
|
} : t;
|
|
@@ -1955,7 +2040,7 @@ class xt {
|
|
|
1955
2040
|
const t = await this.client.request(xe, e);
|
|
1956
2041
|
return t.ok ? t.data.createMayaWithdrawal ? {
|
|
1957
2042
|
ok: !1,
|
|
1958
|
-
error:
|
|
2043
|
+
error: u(t.data.createMayaWithdrawal.__typename)
|
|
1959
2044
|
} : {
|
|
1960
2045
|
ok: !0
|
|
1961
2046
|
} : t;
|
|
@@ -1964,7 +2049,7 @@ class xt {
|
|
|
1964
2049
|
const t = await this.client.request($e, e);
|
|
1965
2050
|
return t.ok ? t.data.createMayaAppWithdrawal ? {
|
|
1966
2051
|
ok: !1,
|
|
1967
|
-
error:
|
|
2052
|
+
error: u(t.data.createMayaAppWithdrawal.__typename)
|
|
1968
2053
|
} : {
|
|
1969
2054
|
ok: !0
|
|
1970
2055
|
} : t;
|
|
@@ -1973,7 +2058,7 @@ class xt {
|
|
|
1973
2058
|
const t = await this.client.request(Ue, e);
|
|
1974
2059
|
return t.ok ? t.data.createBankWithdrawal ? {
|
|
1975
2060
|
ok: !1,
|
|
1976
|
-
error:
|
|
2061
|
+
error: u(t.data.createBankWithdrawal.__typename)
|
|
1977
2062
|
} : {
|
|
1978
2063
|
ok: !0
|
|
1979
2064
|
} : t;
|
|
@@ -1985,14 +2070,14 @@ class xt {
|
|
|
1985
2070
|
return e.ok ? { ok: e.ok, data: e.data.remainingDailyWithdrawalsCount } : e;
|
|
1986
2071
|
}
|
|
1987
2072
|
async pointsWallet() {
|
|
1988
|
-
const e = await this.client.request(
|
|
2073
|
+
const e = await this.client.request(Ne);
|
|
1989
2074
|
return e.ok ? { ok: e.ok, data: e.data.pointsWallet } : e;
|
|
1990
2075
|
}
|
|
1991
2076
|
async redeemPointsToCash(e) {
|
|
1992
2077
|
const t = await this.client.request(De, e);
|
|
1993
2078
|
return t.ok ? t.data.redeemPointsToCash ? {
|
|
1994
2079
|
ok: !1,
|
|
1995
|
-
error:
|
|
2080
|
+
error: u(t.data.redeemPointsToCash.__typename)
|
|
1996
2081
|
} : {
|
|
1997
2082
|
ok: !0
|
|
1998
2083
|
} : t;
|
|
@@ -2015,7 +2100,7 @@ class xt {
|
|
|
2015
2100
|
const t = await this.client.request(Ee, e);
|
|
2016
2101
|
return t.ok ? t.data.createGameSession ? {
|
|
2017
2102
|
ok: !1,
|
|
2018
|
-
error:
|
|
2103
|
+
error: u(t.data.createGameSession.__typename)
|
|
2019
2104
|
} : {
|
|
2020
2105
|
ok: !0
|
|
2021
2106
|
} : t;
|
|
@@ -2053,14 +2138,14 @@ class xt {
|
|
|
2053
2138
|
function we(n) {
|
|
2054
2139
|
return new Date(n.getTime());
|
|
2055
2140
|
}
|
|
2056
|
-
function
|
|
2141
|
+
function B(n, e) {
|
|
2057
2142
|
const t = we(n);
|
|
2058
2143
|
return t.setMinutes(t.getMinutes() + e), t;
|
|
2059
2144
|
}
|
|
2060
2145
|
function le(n, e) {
|
|
2061
2146
|
return n.getTime() > e.getTime();
|
|
2062
2147
|
}
|
|
2063
|
-
class
|
|
2148
|
+
class Ft {
|
|
2064
2149
|
constructor(e) {
|
|
2065
2150
|
c(this, "config");
|
|
2066
2151
|
c(this, "cache");
|
|
@@ -2070,7 +2155,7 @@ class $t {
|
|
|
2070
2155
|
};
|
|
2071
2156
|
}
|
|
2072
2157
|
set(e, t) {
|
|
2073
|
-
const r =
|
|
2158
|
+
const r = B(/* @__PURE__ */ new Date(), this.config.cacheTime);
|
|
2074
2159
|
this.cache[e] = {
|
|
2075
2160
|
value: t,
|
|
2076
2161
|
validUntil: r
|
|
@@ -2081,18 +2166,18 @@ class $t {
|
|
|
2081
2166
|
return !t || le(/* @__PURE__ */ new Date(), t.validUntil) ? null : t.value;
|
|
2082
2167
|
}
|
|
2083
2168
|
}
|
|
2084
|
-
function
|
|
2169
|
+
function Lt(n, e, t) {
|
|
2085
2170
|
return n < e ? e : n > t ? t : n;
|
|
2086
2171
|
}
|
|
2087
2172
|
function pe(n) {
|
|
2088
2173
|
return Object.prototype.toString.call(n) === "[object Object]" && Object(n) === n;
|
|
2089
2174
|
}
|
|
2090
|
-
function
|
|
2175
|
+
function Vt(n) {
|
|
2091
2176
|
const e = [];
|
|
2092
2177
|
function t(r, a = []) {
|
|
2093
2178
|
for (const s in r) {
|
|
2094
2179
|
const m = r[s];
|
|
2095
|
-
pe(m) ? t(m, [...a, s]) : Array.isArray(m) ? t(
|
|
2180
|
+
pe(m) ? t(m, [...a, s]) : Array.isArray(m) ? t(Ht(m), [...a, s]) : e.push({
|
|
2096
2181
|
key: [...a, s],
|
|
2097
2182
|
value: m
|
|
2098
2183
|
});
|
|
@@ -2100,10 +2185,10 @@ function Ot(n) {
|
|
|
2100
2185
|
}
|
|
2101
2186
|
return t(n), e;
|
|
2102
2187
|
}
|
|
2103
|
-
function
|
|
2188
|
+
function Ht(n) {
|
|
2104
2189
|
return n.reduce((e, t, r) => (e[r] = t, e), {});
|
|
2105
2190
|
}
|
|
2106
|
-
class
|
|
2191
|
+
class O {
|
|
2107
2192
|
constructor(e, t) {
|
|
2108
2193
|
c(this, "url");
|
|
2109
2194
|
c(this, "options");
|
|
@@ -2140,13 +2225,13 @@ class B {
|
|
|
2140
2225
|
return await this.exec(s);
|
|
2141
2226
|
}
|
|
2142
2227
|
async exec(e) {
|
|
2143
|
-
var t, r, a, s, m,
|
|
2228
|
+
var t, r, a, s, m, d;
|
|
2144
2229
|
try {
|
|
2145
2230
|
const p = await fetch(e);
|
|
2146
2231
|
if (!p.ok)
|
|
2147
2232
|
return { ok: !1, error: w(p.status) };
|
|
2148
2233
|
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" || ((
|
|
2234
|
+
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
2235
|
ok: !1,
|
|
2151
2236
|
error: w(500, l.message)
|
|
2152
2237
|
} : {
|
|
@@ -2167,7 +2252,7 @@ class B {
|
|
|
2167
2252
|
return t;
|
|
2168
2253
|
}
|
|
2169
2254
|
createUploadBody(e, t) {
|
|
2170
|
-
const r =
|
|
2255
|
+
const r = Vt(t).filter(
|
|
2171
2256
|
(m) => m.value instanceof File || m.value instanceof Blob
|
|
2172
2257
|
), a = new FormData();
|
|
2173
2258
|
a.append(
|
|
@@ -2178,28 +2263,28 @@ class B {
|
|
|
2178
2263
|
})
|
|
2179
2264
|
);
|
|
2180
2265
|
const s = {};
|
|
2181
|
-
return r.forEach((m,
|
|
2182
|
-
s[
|
|
2183
|
-
}), a.append("map", JSON.stringify(s)), r.forEach((m,
|
|
2184
|
-
a.append(
|
|
2266
|
+
return r.forEach((m, d) => {
|
|
2267
|
+
s[d.toString()] = [`variables.${m.key.join(".")}`];
|
|
2268
|
+
}), a.append("map", JSON.stringify(s)), r.forEach((m, d) => {
|
|
2269
|
+
a.append(d.toString(), m.value);
|
|
2185
2270
|
}), a;
|
|
2186
2271
|
}
|
|
2187
2272
|
}
|
|
2188
|
-
function
|
|
2273
|
+
function Yt(n) {
|
|
2189
2274
|
return n === "INR" ? "en-IN" : n === "MYR" ? "en-MY" : n === "IDR" ? "en-ID" : n === "USD" ? "en-US" : "en-PH";
|
|
2190
2275
|
}
|
|
2191
|
-
function
|
|
2276
|
+
function jt(n) {
|
|
2192
2277
|
return n === "en-IN" ? "+91" : n === "en-MY" ? "+60" : n === "en-ID" ? "+62" : n === "en-US" ? "+1" : "+63";
|
|
2193
2278
|
}
|
|
2194
|
-
function
|
|
2195
|
-
const t =
|
|
2279
|
+
function x(n, e) {
|
|
2280
|
+
const t = jt(e);
|
|
2196
2281
|
return n.startsWith(t) ? n : n.startsWith(t.substring(1)) ? `+${n}` : n.startsWith("0") ? `${t}${n.substring(1)}` : `${t}${n}`;
|
|
2197
2282
|
}
|
|
2198
2283
|
async function g(n) {
|
|
2199
2284
|
const e = new TextEncoder().encode(n), t = await crypto.subtle.digest("SHA-256", e);
|
|
2200
2285
|
return Array.from(new Uint8Array(t)).map((s) => s.toString(16).padStart(2, "0")).join("");
|
|
2201
2286
|
}
|
|
2202
|
-
class
|
|
2287
|
+
class ke {
|
|
2203
2288
|
constructor(e) {
|
|
2204
2289
|
c(this, "enabled");
|
|
2205
2290
|
this.enabled = (e == null ? void 0 : e.enabled) ?? !0;
|
|
@@ -2221,7 +2306,7 @@ function q(n, e) {
|
|
|
2221
2306
|
const t = we(n);
|
|
2222
2307
|
return t.setDate(t.getDate() + e), t;
|
|
2223
2308
|
}
|
|
2224
|
-
function
|
|
2309
|
+
function Ce(n) {
|
|
2225
2310
|
return new Promise((e) => {
|
|
2226
2311
|
setTimeout(e, n);
|
|
2227
2312
|
});
|
|
@@ -2233,9 +2318,9 @@ function ge(n, e) {
|
|
|
2233
2318
|
maxAttempt: a = 3
|
|
2234
2319
|
/**/
|
|
2235
2320
|
} = e;
|
|
2236
|
-
async function s(m,
|
|
2237
|
-
const p =
|
|
2238
|
-
return t(f) ? f : p > 1 ? (await
|
|
2321
|
+
async function s(m, d) {
|
|
2322
|
+
const p = d ?? a, f = await n(...m);
|
|
2323
|
+
return t(f) ? f : p > 1 ? (await Ce(r * ((a - p) / 2)), s(m, p - 1)) : f;
|
|
2239
2324
|
}
|
|
2240
2325
|
return async (...m) => await s(m);
|
|
2241
2326
|
}
|
|
@@ -2243,14 +2328,14 @@ function F(n, e) {
|
|
|
2243
2328
|
const t = we(n);
|
|
2244
2329
|
return t.setMinutes(t.getMinutes() - e), t;
|
|
2245
2330
|
}
|
|
2246
|
-
class
|
|
2331
|
+
class Qt {
|
|
2247
2332
|
constructor(e) {
|
|
2248
2333
|
c(this, "logger");
|
|
2249
2334
|
c(this, "storageKey", "session");
|
|
2250
2335
|
c(this, "authService");
|
|
2251
2336
|
c(this, "walletService");
|
|
2252
2337
|
c(this, "_refreshing", !1);
|
|
2253
|
-
this.authService = e.authService, this.walletService = e.walletService, this.logger = new
|
|
2338
|
+
this.authService = e.authService, this.walletService = e.walletService, this.logger = new ke({
|
|
2254
2339
|
enabled: e.logs ?? !1
|
|
2255
2340
|
});
|
|
2256
2341
|
}
|
|
@@ -2299,7 +2384,7 @@ class Lt {
|
|
|
2299
2384
|
this.storageKey,
|
|
2300
2385
|
JSON.stringify({
|
|
2301
2386
|
...p.data,
|
|
2302
|
-
accessTokenExpiresAt:
|
|
2387
|
+
accessTokenExpiresAt: B(f, 8).getTime(),
|
|
2303
2388
|
refreshTokenExpiresAt: F(q(f, 30), 2).getTime()
|
|
2304
2389
|
})
|
|
2305
2390
|
), {
|
|
@@ -2315,7 +2400,7 @@ class Lt {
|
|
|
2315
2400
|
this.storageKey,
|
|
2316
2401
|
JSON.stringify({
|
|
2317
2402
|
...s.data,
|
|
2318
|
-
accessTokenExpiresAt:
|
|
2403
|
+
accessTokenExpiresAt: B(m, 8).getTime(),
|
|
2319
2404
|
refreshTokenExpiresAt: F(q(m, 30), 2).getTime()
|
|
2320
2405
|
})
|
|
2321
2406
|
), {
|
|
@@ -2333,7 +2418,7 @@ class Lt {
|
|
|
2333
2418
|
this.storageKey,
|
|
2334
2419
|
JSON.stringify({
|
|
2335
2420
|
...s.data,
|
|
2336
|
-
accessTokenExpiresAt:
|
|
2421
|
+
accessTokenExpiresAt: B(m, 8).getTime(),
|
|
2337
2422
|
refreshTokenExpiresAt: F(q(m, 30), 2).getTime()
|
|
2338
2423
|
})
|
|
2339
2424
|
), {
|
|
@@ -2357,7 +2442,7 @@ class Lt {
|
|
|
2357
2442
|
this.storageKey,
|
|
2358
2443
|
JSON.stringify({
|
|
2359
2444
|
...t.data,
|
|
2360
|
-
accessTokenExpiresAt:
|
|
2445
|
+
accessTokenExpiresAt: B(r, 8).getTime(),
|
|
2361
2446
|
refreshTokenExpiresAt: F(q(r, 30), 2).getTime()
|
|
2362
2447
|
})
|
|
2363
2448
|
), {
|
|
@@ -2373,7 +2458,7 @@ class Lt {
|
|
|
2373
2458
|
this.storageKey,
|
|
2374
2459
|
JSON.stringify({
|
|
2375
2460
|
...t.data,
|
|
2376
|
-
accessTokenExpiresAt:
|
|
2461
|
+
accessTokenExpiresAt: B(r, 8).getTime(),
|
|
2377
2462
|
refreshTokenExpiresAt: F(q(r, 30), 2).getTime()
|
|
2378
2463
|
})
|
|
2379
2464
|
), { ok: !0 };
|
|
@@ -2387,7 +2472,7 @@ class Lt {
|
|
|
2387
2472
|
data: null
|
|
2388
2473
|
};
|
|
2389
2474
|
if (this.refreshing)
|
|
2390
|
-
return await
|
|
2475
|
+
return await Ce(1e3), await this.get();
|
|
2391
2476
|
const e = window.localStorage.getItem(this.storageKey);
|
|
2392
2477
|
if (!e)
|
|
2393
2478
|
return {
|
|
@@ -2419,7 +2504,7 @@ class Lt {
|
|
|
2419
2504
|
this.logger.success("Session refreshed!"), r = /* @__PURE__ */ new Date(), t = {
|
|
2420
2505
|
...t,
|
|
2421
2506
|
...m.data,
|
|
2422
|
-
accessTokenExpiresAt:
|
|
2507
|
+
accessTokenExpiresAt: B(r, 8).getTime(),
|
|
2423
2508
|
refreshTokenExpiresAt: F(q(r, 30), 2).getTime()
|
|
2424
2509
|
}, window.localStorage.setItem(this.storageKey, JSON.stringify(t));
|
|
2425
2510
|
}
|
|
@@ -2488,11 +2573,11 @@ function i(n, e) {
|
|
|
2488
2573
|
}
|
|
2489
2574
|
return e;
|
|
2490
2575
|
}
|
|
2491
|
-
class
|
|
2576
|
+
class Kt {
|
|
2492
2577
|
constructor(e) {
|
|
2493
2578
|
c(this, "staticService");
|
|
2494
2579
|
const t = (e == null ? void 0 : e.environment) === "development";
|
|
2495
|
-
this.staticService = new
|
|
2580
|
+
this.staticService = new Ot({
|
|
2496
2581
|
url: t ? "https://static.development.opexa.io" : "https://static.opexa.io"
|
|
2497
2582
|
});
|
|
2498
2583
|
}
|
|
@@ -2525,7 +2610,8 @@ class Vt {
|
|
|
2525
2610
|
referralCommission: this.referralCommission.bind(this),
|
|
2526
2611
|
platform__next: this.platform__next.bind(this),
|
|
2527
2612
|
pointsClubSettings: this.pointsClubSettings.bind(this),
|
|
2528
|
-
paymentSettings: this.paymentSettings.bind(this)
|
|
2613
|
+
paymentSettings: this.paymentSettings.bind(this),
|
|
2614
|
+
message: this.message.bind(this)
|
|
2529
2615
|
};
|
|
2530
2616
|
}
|
|
2531
2617
|
site(e) {
|
|
@@ -2539,7 +2625,7 @@ class Vt {
|
|
|
2539
2625
|
}
|
|
2540
2626
|
/** @deprecated */
|
|
2541
2627
|
platform(e) {
|
|
2542
|
-
var t, r, a, s, m,
|
|
2628
|
+
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
2629
|
return {
|
|
2544
2630
|
timezone: e.timezone,
|
|
2545
2631
|
currency: e.currency,
|
|
@@ -2553,37 +2639,37 @@ class Vt {
|
|
|
2553
2639
|
webEnabled: ((a = e.bankDepositGatewaySettings) == null ? void 0 : a.webEnabled) ?? !1,
|
|
2554
2640
|
mobileWebEnabled: ((s = e.bankDepositGatewaySettings) == null ? void 0 : s.mobileWebEnabled) ?? !1,
|
|
2555
2641
|
minimumAmount: i((m = e.bankDepositGatewaySettings) == null ? void 0 : m.minimumAmount),
|
|
2556
|
-
maximumAmount: i((
|
|
2642
|
+
maximumAmount: i((d = e.bankDepositGatewaySettings) == null ? void 0 : d.maximumAmount)
|
|
2557
2643
|
},
|
|
2558
2644
|
gcash: {
|
|
2559
2645
|
androidEnabled: ((p = e.gcashDepositGatewaySettings) == null ? void 0 : p.androidEnabled) ?? !1,
|
|
2560
2646
|
iosEnabled: ((f = e.gcashDepositGatewaySettings) == null ? void 0 : f.iosEnabled) ?? !1,
|
|
2561
2647
|
webEnabled: ((h = e.gcashDepositGatewaySettings) == null ? void 0 : h.webEnabled) ?? !1,
|
|
2562
2648
|
mobileWebEnabled: ((l = e.gcashDepositGatewaySettings) == null ? void 0 : l.mobileWebEnabled) ?? !1,
|
|
2563
|
-
minimumAmount: i((
|
|
2564
|
-
maximumAmount: i((
|
|
2649
|
+
minimumAmount: i((k = e.gcashDepositGatewaySettings) == null ? void 0 : k.minimumAmount),
|
|
2650
|
+
maximumAmount: i((C = e.gcashDepositGatewaySettings) == null ? void 0 : C.maximumAmount)
|
|
2565
2651
|
},
|
|
2566
2652
|
maya: {
|
|
2567
2653
|
androidEnabled: ((_ = e.mayaDepositGatewaySettings) == null ? void 0 : _.androidEnabled) ?? !1,
|
|
2568
2654
|
iosEnabled: ((T = e.mayaDepositGatewaySettings) == null ? void 0 : T.iosEnabled) ?? !1,
|
|
2569
|
-
webEnabled: ((
|
|
2570
|
-
mobileWebEnabled: ((
|
|
2571
|
-
minimumAmount: i((
|
|
2572
|
-
maximumAmount: i((
|
|
2655
|
+
webEnabled: ((M = e.mayaDepositGatewaySettings) == null ? void 0 : M.webEnabled) ?? !1,
|
|
2656
|
+
mobileWebEnabled: ((v = e.mayaDepositGatewaySettings) == null ? void 0 : v.mobileWebEnabled) ?? !1,
|
|
2657
|
+
minimumAmount: i((y = e.mayaDepositGatewaySettings) == null ? void 0 : y.minimumAmount),
|
|
2658
|
+
maximumAmount: i((R = e.mayaDepositGatewaySettings) == null ? void 0 : R.maximumAmount)
|
|
2573
2659
|
},
|
|
2574
2660
|
mayaApp: {
|
|
2575
|
-
androidEnabled: ((
|
|
2576
|
-
iosEnabled: ((
|
|
2661
|
+
androidEnabled: ((N = e.mayaAppDepositGatewaySettings) == null ? void 0 : N.androidEnabled) ?? !1,
|
|
2662
|
+
iosEnabled: ((S = e.mayaAppDepositGatewaySettings) == null ? void 0 : S.iosEnabled) ?? !1,
|
|
2577
2663
|
webEnabled: ((D = e.mayaAppDepositGatewaySettings) == null ? void 0 : D.webEnabled) ?? !1,
|
|
2578
2664
|
mobileWebEnabled: ((I = e.mayaAppDepositGatewaySettings) == null ? void 0 : I.mobileWebEnabled) ?? !1,
|
|
2579
|
-
minimumAmount: i((
|
|
2580
|
-
maximumAmount: i((
|
|
2665
|
+
minimumAmount: i((G = e.mayaAppDepositGatewaySettings) == null ? void 0 : G.minimumAmount),
|
|
2666
|
+
maximumAmount: i((P = e.mayaAppDepositGatewaySettings) == null ? void 0 : P.maximumAmount)
|
|
2581
2667
|
}
|
|
2582
2668
|
},
|
|
2583
2669
|
withdrawalGateway: {
|
|
2584
2670
|
bank: {
|
|
2585
|
-
androidEnabled: ((
|
|
2586
|
-
iosEnabled: ((
|
|
2671
|
+
androidEnabled: ((A = e.bankWithdrawalGatewaySettings) == null ? void 0 : A.androidEnabled) ?? !1,
|
|
2672
|
+
iosEnabled: ((W = e.bankWithdrawalGatewaySettings) == null ? void 0 : W.iosEnabled) ?? !1,
|
|
2587
2673
|
webEnabled: ((E = e.bankWithdrawalGatewaySettings) == null ? void 0 : E.webEnabled) ?? !1,
|
|
2588
2674
|
mobileWebEnabled: ((L = e.bankWithdrawalGatewaySettings) == null ? void 0 : L.mobileWebEnabled) ?? !1,
|
|
2589
2675
|
minimumAmount: i((V = e.bankWithdrawalGatewaySettings) == null ? void 0 : V.minimumAmount),
|
|
@@ -2630,7 +2716,7 @@ class Vt {
|
|
|
2630
2716
|
return {
|
|
2631
2717
|
currency: e.currency,
|
|
2632
2718
|
timezone: e.timezone,
|
|
2633
|
-
locale:
|
|
2719
|
+
locale: Yt(e.currency)
|
|
2634
2720
|
};
|
|
2635
2721
|
}
|
|
2636
2722
|
pointsClubSettings(e) {
|
|
@@ -2639,7 +2725,7 @@ class Vt {
|
|
|
2639
2725
|
};
|
|
2640
2726
|
}
|
|
2641
2727
|
paymentSettings(e) {
|
|
2642
|
-
var t, r, a, s, m,
|
|
2728
|
+
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
2729
|
return {
|
|
2644
2730
|
minimumFirstDepositAmount: i(e.minimumFirstDepositAmount),
|
|
2645
2731
|
restrictWithdrawalsToVerifiedMembers: e.restrictWithdrawalsToVerifiedMembers,
|
|
@@ -2650,37 +2736,37 @@ class Vt {
|
|
|
2650
2736
|
webEnabled: ((a = e.bankDepositGatewaySettings) == null ? void 0 : a.webEnabled) ?? !1,
|
|
2651
2737
|
mobileWebEnabled: ((s = e.bankDepositGatewaySettings) == null ? void 0 : s.mobileWebEnabled) ?? !1,
|
|
2652
2738
|
minimumAmount: i((m = e.bankDepositGatewaySettings) == null ? void 0 : m.minimumAmount),
|
|
2653
|
-
maximumAmount: i((
|
|
2739
|
+
maximumAmount: i((d = e.bankDepositGatewaySettings) == null ? void 0 : d.maximumAmount)
|
|
2654
2740
|
},
|
|
2655
2741
|
gcash: {
|
|
2656
2742
|
androidEnabled: ((p = e.gcashDepositGatewaySettings) == null ? void 0 : p.androidEnabled) ?? !1,
|
|
2657
2743
|
iosEnabled: ((f = e.gcashDepositGatewaySettings) == null ? void 0 : f.iosEnabled) ?? !1,
|
|
2658
2744
|
webEnabled: ((h = e.gcashDepositGatewaySettings) == null ? void 0 : h.webEnabled) ?? !1,
|
|
2659
2745
|
mobileWebEnabled: ((l = e.gcashDepositGatewaySettings) == null ? void 0 : l.mobileWebEnabled) ?? !1,
|
|
2660
|
-
minimumAmount: i((
|
|
2661
|
-
maximumAmount: i((
|
|
2746
|
+
minimumAmount: i((k = e.gcashDepositGatewaySettings) == null ? void 0 : k.minimumAmount),
|
|
2747
|
+
maximumAmount: i((C = e.gcashDepositGatewaySettings) == null ? void 0 : C.maximumAmount)
|
|
2662
2748
|
},
|
|
2663
2749
|
maya: {
|
|
2664
2750
|
androidEnabled: ((_ = e.mayaDepositGatewaySettings) == null ? void 0 : _.androidEnabled) ?? !1,
|
|
2665
2751
|
iosEnabled: ((T = e.mayaDepositGatewaySettings) == null ? void 0 : T.iosEnabled) ?? !1,
|
|
2666
|
-
webEnabled: ((
|
|
2667
|
-
mobileWebEnabled: ((
|
|
2668
|
-
minimumAmount: i((
|
|
2669
|
-
maximumAmount: i((
|
|
2752
|
+
webEnabled: ((M = e.mayaDepositGatewaySettings) == null ? void 0 : M.webEnabled) ?? !1,
|
|
2753
|
+
mobileWebEnabled: ((v = e.mayaDepositGatewaySettings) == null ? void 0 : v.mobileWebEnabled) ?? !1,
|
|
2754
|
+
minimumAmount: i((y = e.mayaDepositGatewaySettings) == null ? void 0 : y.minimumAmount),
|
|
2755
|
+
maximumAmount: i((R = e.mayaDepositGatewaySettings) == null ? void 0 : R.maximumAmount)
|
|
2670
2756
|
},
|
|
2671
2757
|
mayaApp: {
|
|
2672
|
-
androidEnabled: ((
|
|
2673
|
-
iosEnabled: ((
|
|
2758
|
+
androidEnabled: ((N = e.mayaAppDepositGatewaySettings) == null ? void 0 : N.androidEnabled) ?? !1,
|
|
2759
|
+
iosEnabled: ((S = e.mayaAppDepositGatewaySettings) == null ? void 0 : S.iosEnabled) ?? !1,
|
|
2674
2760
|
webEnabled: ((D = e.mayaAppDepositGatewaySettings) == null ? void 0 : D.webEnabled) ?? !1,
|
|
2675
2761
|
mobileWebEnabled: ((I = e.mayaAppDepositGatewaySettings) == null ? void 0 : I.mobileWebEnabled) ?? !1,
|
|
2676
|
-
minimumAmount: i((
|
|
2677
|
-
maximumAmount: i((
|
|
2762
|
+
minimumAmount: i((G = e.mayaAppDepositGatewaySettings) == null ? void 0 : G.minimumAmount),
|
|
2763
|
+
maximumAmount: i((P = e.mayaAppDepositGatewaySettings) == null ? void 0 : P.maximumAmount)
|
|
2678
2764
|
}
|
|
2679
2765
|
},
|
|
2680
2766
|
withdrawalGateway: {
|
|
2681
2767
|
bank: {
|
|
2682
|
-
androidEnabled: ((
|
|
2683
|
-
iosEnabled: ((
|
|
2768
|
+
androidEnabled: ((A = e.bankWithdrawalGatewaySettings) == null ? void 0 : A.androidEnabled) ?? !1,
|
|
2769
|
+
iosEnabled: ((W = e.bankWithdrawalGatewaySettings) == null ? void 0 : W.iosEnabled) ?? !1,
|
|
2684
2770
|
webEnabled: ((E = e.bankWithdrawalGatewaySettings) == null ? void 0 : E.webEnabled) ?? !1,
|
|
2685
2771
|
mobileWebEnabled: ((L = e.bankWithdrawalGatewaySettings) == null ? void 0 : L.mobileWebEnabled) ?? !1,
|
|
2686
2772
|
minimumAmount: i((V = e.bankWithdrawalGatewaySettings) == null ? void 0 : V.minimumAmount),
|
|
@@ -3046,8 +3132,20 @@ class Vt {
|
|
|
3046
3132
|
dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
|
|
3047
3133
|
};
|
|
3048
3134
|
}
|
|
3135
|
+
message(e) {
|
|
3136
|
+
return {
|
|
3137
|
+
id: e.id,
|
|
3138
|
+
logo: e.logo,
|
|
3139
|
+
title: e.title,
|
|
3140
|
+
popup: e.popup,
|
|
3141
|
+
content: e.content,
|
|
3142
|
+
actions: e.actions,
|
|
3143
|
+
markedAsRead: e.markedAsRead,
|
|
3144
|
+
dateTimeCreated: new Date(e.dateTimeCreated)
|
|
3145
|
+
};
|
|
3146
|
+
}
|
|
3049
3147
|
}
|
|
3050
|
-
class
|
|
3148
|
+
class Xt {
|
|
3051
3149
|
constructor(e) {
|
|
3052
3150
|
c(this, "cmsPortalService");
|
|
3053
3151
|
c(this, "authService");
|
|
@@ -3057,6 +3155,7 @@ class jt {
|
|
|
3057
3155
|
c(this, "accountService");
|
|
3058
3156
|
c(this, "reportService");
|
|
3059
3157
|
c(this, "portalService");
|
|
3158
|
+
c(this, "triggerService");
|
|
3060
3159
|
c(this, "sessionManager");
|
|
3061
3160
|
c(this, "transformer");
|
|
3062
3161
|
c(this, "logger");
|
|
@@ -3068,14 +3167,14 @@ class jt {
|
|
|
3068
3167
|
platform: a,
|
|
3069
3168
|
environment: s,
|
|
3070
3169
|
logs: m
|
|
3071
|
-
} = e,
|
|
3072
|
-
this.transformer = new
|
|
3170
|
+
} = e, d = s === "production";
|
|
3171
|
+
this.transformer = new Kt({
|
|
3073
3172
|
environment: s
|
|
3074
|
-
}), this.logger = new
|
|
3173
|
+
}), this.logger = new ke({
|
|
3075
3174
|
enabled: m ?? !1
|
|
3076
3175
|
});
|
|
3077
|
-
const p =
|
|
3078
|
-
url:
|
|
3176
|
+
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 Pt({
|
|
3177
|
+
url: M,
|
|
3079
3178
|
site: t,
|
|
3080
3179
|
platform: r
|
|
3081
3180
|
}), y = {
|
|
@@ -3086,15 +3185,15 @@ class jt {
|
|
|
3086
3185
|
"Platform-Code": a
|
|
3087
3186
|
}
|
|
3088
3187
|
}
|
|
3089
|
-
},
|
|
3188
|
+
}, R = new xt(new O(_, y)), N = new Wt(new O(C, y)), S = new qt(new O(f, y)), D = new It(new O(l, y)), I = new Ut(new O(h, y)), G = new $t(new O(k, y)), P = new Bt(new O(T, y)), A = new Gt({
|
|
3090
3189
|
url: p,
|
|
3091
3190
|
platform: a
|
|
3092
|
-
}),
|
|
3191
|
+
}), W = new Qt({
|
|
3093
3192
|
logs: m,
|
|
3094
3193
|
authService: A,
|
|
3095
3194
|
walletService: S
|
|
3096
3195
|
});
|
|
3097
|
-
this.authService = A, this.gameService =
|
|
3196
|
+
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 Ft();
|
|
3098
3197
|
}
|
|
3099
3198
|
get authMiddleware() {
|
|
3100
3199
|
return async (e) => {
|
|
@@ -3142,7 +3241,7 @@ class jt {
|
|
|
3142
3241
|
case "MOBILE_NUMBER": {
|
|
3143
3242
|
const t = await this.sessionManager.create({
|
|
3144
3243
|
type: "MOBILE_NUMBER",
|
|
3145
|
-
mobileNumber:
|
|
3244
|
+
mobileNumber: x(e.mobileNumber, await this.locale),
|
|
3146
3245
|
verificationCode: e.verificationCode
|
|
3147
3246
|
});
|
|
3148
3247
|
return t.ok ? { ok: !0 } : t;
|
|
@@ -3175,7 +3274,7 @@ class jt {
|
|
|
3175
3274
|
await this.sessionManager.destroy();
|
|
3176
3275
|
}
|
|
3177
3276
|
watchSession(e) {
|
|
3178
|
-
const t =
|
|
3277
|
+
const t = Lt(e.interval ?? 3e4, 3e4, 6e4);
|
|
3179
3278
|
let r = null;
|
|
3180
3279
|
const a = () => setTimeout(async () => {
|
|
3181
3280
|
await this.sessionManager.verify() || await e.onInvalid(), r = a();
|
|
@@ -3260,7 +3359,7 @@ class jt {
|
|
|
3260
3359
|
domain: e.domain,
|
|
3261
3360
|
birthDay: typeof e.dateOfBirth == "string" ? e.dateOfBirth : e.dateOfBirth.toISOString(),
|
|
3262
3361
|
password: await g(e.password),
|
|
3263
|
-
mobileNumber:
|
|
3362
|
+
mobileNumber: x(e.mobileNumber, await this.locale)
|
|
3264
3363
|
},
|
|
3265
3364
|
referralCode: e.referralCode,
|
|
3266
3365
|
verificationCode: e.verificationCode,
|
|
@@ -3274,7 +3373,7 @@ class jt {
|
|
|
3274
3373
|
const a = await this.accountService.registerMemberAccountViaMobile({
|
|
3275
3374
|
input: {
|
|
3276
3375
|
id: t,
|
|
3277
|
-
mobileNumber:
|
|
3376
|
+
mobileNumber: x(e.mobileNumber, await this.locale)
|
|
3278
3377
|
},
|
|
3279
3378
|
referralCode: e.referralCode,
|
|
3280
3379
|
reCAPTCHAResponse: e.reCAPTCHAResponse,
|
|
@@ -3287,7 +3386,7 @@ class jt {
|
|
|
3287
3386
|
id: t,
|
|
3288
3387
|
name: e.name,
|
|
3289
3388
|
password: await g(e.password),
|
|
3290
|
-
mobileNumber: e.mobileNumber ?
|
|
3389
|
+
mobileNumber: e.mobileNumber ? x(e.mobileNumber, await this.locale) : void 0
|
|
3291
3390
|
},
|
|
3292
3391
|
reCAPTCHAResponse: e.reCAPTCHAResponse
|
|
3293
3392
|
});
|
|
@@ -3311,7 +3410,7 @@ class jt {
|
|
|
3311
3410
|
password: t.password ? await g(t.password) : void 0,
|
|
3312
3411
|
transactionPassword: t.transactionPassword ? await g(t.transactionPassword) : void 0,
|
|
3313
3412
|
...t.mobileNumber && {
|
|
3314
|
-
mobileNumber:
|
|
3413
|
+
mobileNumber: x(t.mobileNumber, await this.locale)
|
|
3315
3414
|
},
|
|
3316
3415
|
secretAnswer: t.secretAnswer ? await g(t.secretAnswer) : void 0
|
|
3317
3416
|
}
|
|
@@ -3354,7 +3453,7 @@ class jt {
|
|
|
3354
3453
|
async resetPassword(e) {
|
|
3355
3454
|
return await this.accountService.resetPassword({
|
|
3356
3455
|
input: {
|
|
3357
|
-
mobileNumber:
|
|
3456
|
+
mobileNumber: x(e.mobileNumber, await this.locale),
|
|
3358
3457
|
newPassword: await g(e.newPassword)
|
|
3359
3458
|
},
|
|
3360
3459
|
verificationCode: e.verificationCode
|
|
@@ -3381,7 +3480,7 @@ class jt {
|
|
|
3381
3480
|
return await this.accountService.sendVerificationCode({
|
|
3382
3481
|
input: {
|
|
3383
3482
|
channel: "SMS",
|
|
3384
|
-
recipient:
|
|
3483
|
+
recipient: x(e, await this.locale)
|
|
3385
3484
|
}
|
|
3386
3485
|
});
|
|
3387
3486
|
}
|
|
@@ -3389,7 +3488,7 @@ class jt {
|
|
|
3389
3488
|
if (e.type === "SMS")
|
|
3390
3489
|
return this.authService.sendVerificationCode({
|
|
3391
3490
|
channel: "SMS",
|
|
3392
|
-
recipient:
|
|
3491
|
+
recipient: x(e.mobileNumber, await this.locale),
|
|
3393
3492
|
...e.strict && {
|
|
3394
3493
|
verificationType: "MEMBER"
|
|
3395
3494
|
}
|
|
@@ -3456,7 +3555,7 @@ class jt {
|
|
|
3456
3555
|
id: t,
|
|
3457
3556
|
amount: e.amount.toString(),
|
|
3458
3557
|
transactionPassword: await g(e.transactionPassword),
|
|
3459
|
-
recipientMobileNumber:
|
|
3558
|
+
recipientMobileNumber: x(e.recipientMobileNumber, await this.locale)
|
|
3460
3559
|
}
|
|
3461
3560
|
});
|
|
3462
3561
|
if (!r.ok) return r;
|
|
@@ -3467,7 +3566,7 @@ class jt {
|
|
|
3467
3566
|
id: t,
|
|
3468
3567
|
amount: e.amount.toString(),
|
|
3469
3568
|
transactionPassword: await g(e.transactionPassword),
|
|
3470
|
-
recipientMobileNumber:
|
|
3569
|
+
recipientMobileNumber: x(e.recipientMobileNumber, await this.locale)
|
|
3471
3570
|
}
|
|
3472
3571
|
});
|
|
3473
3572
|
if (!r.ok) return r;
|
|
@@ -3892,10 +3991,39 @@ class jt {
|
|
|
3892
3991
|
data: e.data ? this.transformer.transform.pointsClubSettings(e.data) : null
|
|
3893
3992
|
} : e;
|
|
3894
3993
|
}
|
|
3994
|
+
/**/
|
|
3995
|
+
/*+----------------------------------------+*/
|
|
3996
|
+
/*+ MESSAGES +*/
|
|
3997
|
+
/*+----------------------------------------+*/
|
|
3998
|
+
/**/
|
|
3999
|
+
async messages(e) {
|
|
4000
|
+
const t = await this.triggerService.messages(e);
|
|
4001
|
+
return t.ok ? {
|
|
4002
|
+
ok: !0,
|
|
4003
|
+
data: {
|
|
4004
|
+
messages: t.data.edges.map(({ cursor: r, node: a }) => ({
|
|
4005
|
+
...this.transformer.transform.message(a),
|
|
4006
|
+
cursor: r
|
|
4007
|
+
})),
|
|
4008
|
+
totalCount: t.data.totalCount,
|
|
4009
|
+
hasNextPage: t.data.pageInfo.hasNextPage,
|
|
4010
|
+
endCursor: t.data.pageInfo.endCursor ?? void 0
|
|
4011
|
+
}
|
|
4012
|
+
} : t;
|
|
4013
|
+
}
|
|
4014
|
+
async unreadMessagesCount(e) {
|
|
4015
|
+
return await this.triggerService.unreadMessagesCount(e);
|
|
4016
|
+
}
|
|
4017
|
+
async markMessageAsRead(e) {
|
|
4018
|
+
return await this.triggerService.markMessageAsRead({ id: e });
|
|
4019
|
+
}
|
|
4020
|
+
async markAllMessageAsRead() {
|
|
4021
|
+
return await this.triggerService.markAllMessageAsRead();
|
|
4022
|
+
}
|
|
3895
4023
|
}
|
|
3896
4024
|
export {
|
|
3897
|
-
|
|
4025
|
+
tr as ObjectId,
|
|
3898
4026
|
U as ObjectType,
|
|
3899
|
-
|
|
4027
|
+
Xt as Sdk
|
|
3900
4028
|
};
|
|
3901
4029
|
//# sourceMappingURL=index.mjs.map
|