@opexa/portal-sdk 0.0.89 → 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.js +42 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +318 -178
- package/dist/index.mjs.map +1 -1
- package/dist/sdk/sdk.d.ts +6 -1
- package/dist/sdk/transformer.d.ts +2 -0
- package/dist/sdk/types.d.ts +25 -2
- package/dist/services/index.d.ts +1 -0
- package/dist/services/queries.d.ts +3 -0
- package/dist/services/trigger.service.d.ts +11 -0
- package/dist/services/types.d.ts +44 -0
- package/package.json +1 -1
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 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
|
-
`,
|
|
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 {
|
|
@@ -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,50 @@ 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
|
+
mutation MarkMessageAsRead($id: ObjectId!) {
|
|
1248
|
+
markMessageAsRead(id: $id)
|
|
1249
|
+
}
|
|
1250
|
+
`, Nt = o`
|
|
1251
|
+
mutation MarkAllMessageAsRead {
|
|
1252
|
+
markAllMessageAsRead
|
|
1253
|
+
}
|
|
1218
1254
|
`;
|
|
1219
|
-
function
|
|
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
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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(
|
|
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
|
|
1494
|
+
class It {
|
|
1459
1495
|
constructor(e) {
|
|
1460
1496
|
c(this, "url");
|
|
1461
1497
|
c(this, "platform");
|
|
@@ -1475,7 +1511,7 @@ class Rt {
|
|
|
1475
1511
|
const r = `${e.mobileNumber}:${e.verificationCode}`, a = Buffer.from(r).toString("base64");
|
|
1476
1512
|
console.log(`MobileNumberOTP ${a}`), t.set("Authorization", `MobileNumberOTP ${a}`);
|
|
1477
1513
|
}
|
|
1478
|
-
e.sessionId && t.set("Authorization", `MayaSession ${e.sessionId}`);
|
|
1514
|
+
e.sessionId && t.set("Authorization", `MayaSession ${e.sessionId}`), e.token && t.set("Authorization", `Token ${e.token}`);
|
|
1479
1515
|
try {
|
|
1480
1516
|
const r = await fetch(`${this.url}/sessions`, {
|
|
1481
1517
|
method: "POST",
|
|
@@ -1486,7 +1522,7 @@ class Rt {
|
|
|
1486
1522
|
data: a
|
|
1487
1523
|
} : a.code === "ACCOUNT_BLACKLISTED" ? {
|
|
1488
1524
|
ok: !1,
|
|
1489
|
-
error:
|
|
1525
|
+
error: u("AccountBlacklistedError")
|
|
1490
1526
|
} : {
|
|
1491
1527
|
ok: !1,
|
|
1492
1528
|
error: w(r.status)
|
|
@@ -1515,7 +1551,7 @@ class Rt {
|
|
|
1515
1551
|
data: a
|
|
1516
1552
|
} : r.status === 401 || r.status === 403 ? {
|
|
1517
1553
|
ok: !1,
|
|
1518
|
-
error:
|
|
1554
|
+
error: u("InvalidTokenOrSecretAnswerError")
|
|
1519
1555
|
} : {
|
|
1520
1556
|
ok: !1,
|
|
1521
1557
|
error: w(r.status)
|
|
@@ -1542,10 +1578,10 @@ class Rt {
|
|
|
1542
1578
|
data: a
|
|
1543
1579
|
} : a.code === "ACCOUNT_BLACKLISTED" ? {
|
|
1544
1580
|
ok: !1,
|
|
1545
|
-
error:
|
|
1581
|
+
error: u("AccountBlacklistedError")
|
|
1546
1582
|
} : r.status === 403 || r.status === 401 ? {
|
|
1547
1583
|
ok: !1,
|
|
1548
|
-
error:
|
|
1584
|
+
error: u("InvalidTokenError")
|
|
1549
1585
|
} : {
|
|
1550
1586
|
ok: !1,
|
|
1551
1587
|
error: w(r.status)
|
|
@@ -1606,7 +1642,7 @@ class Rt {
|
|
|
1606
1642
|
const a = await r.json(), s = t(a.message);
|
|
1607
1643
|
return s ? {
|
|
1608
1644
|
ok: !1,
|
|
1609
|
-
error:
|
|
1645
|
+
error: u(s)
|
|
1610
1646
|
} : {
|
|
1611
1647
|
ok: !1,
|
|
1612
1648
|
error: w(r.status, a.message)
|
|
@@ -1624,7 +1660,7 @@ class Rt {
|
|
|
1624
1660
|
}
|
|
1625
1661
|
}
|
|
1626
1662
|
}
|
|
1627
|
-
class
|
|
1663
|
+
class Gt {
|
|
1628
1664
|
constructor(e) {
|
|
1629
1665
|
c(this, "url");
|
|
1630
1666
|
c(this, "siteId");
|
|
@@ -1639,12 +1675,12 @@ class Nt {
|
|
|
1639
1675
|
} : e;
|
|
1640
1676
|
}
|
|
1641
1677
|
async games(e) {
|
|
1642
|
-
var a, s, m,
|
|
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), (
|
|
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
|
-
), (
|
|
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 Nt {
|
|
|
1702
1738
|
}
|
|
1703
1739
|
}
|
|
1704
1740
|
}
|
|
1705
|
-
class
|
|
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(
|
|
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(
|
|
1754
|
+
const t = await this.client.upload(ve, e);
|
|
1719
1755
|
return t.ok ? t.data.uploadPrivateImageFile ? {
|
|
1720
1756
|
ok: !1,
|
|
1721
|
-
error:
|
|
1757
|
+
error: u(t.data.uploadPrivateImageFile.__typename)
|
|
1722
1758
|
} : {
|
|
1723
1759
|
ok: !0
|
|
1724
1760
|
} : t;
|
|
1725
1761
|
}
|
|
1726
1762
|
}
|
|
1727
|
-
class
|
|
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:
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
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:
|
|
1970
|
+
error: u(t.data.claimCashbackBonus.__typename)
|
|
1896
1971
|
} : {
|
|
1897
1972
|
ok: !0
|
|
1898
1973
|
} : {
|
|
@@ -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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
2051
|
+
error: u(t.data.createBankWithdrawal.__typename)
|
|
1977
2052
|
} : {
|
|
1978
2053
|
ok: !0
|
|
1979
2054
|
} : t;
|
|
@@ -1992,7 +2067,7 @@ class xt {
|
|
|
1992
2067
|
const t = await this.client.request(De, e);
|
|
1993
2068
|
return t.ok ? t.data.redeemPointsToCash ? {
|
|
1994
2069
|
ok: !1,
|
|
1995
|
-
error:
|
|
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:
|
|
2093
|
+
error: u(t.data.createGameSession.__typename)
|
|
2019
2094
|
} : {
|
|
2020
2095
|
ok: !0
|
|
2021
2096
|
} : t;
|
|
@@ -2060,7 +2135,7 @@ function B(n, e) {
|
|
|
2060
2135
|
function le(n, e) {
|
|
2061
2136
|
return n.getTime() > e.getTime();
|
|
2062
2137
|
}
|
|
2063
|
-
class
|
|
2138
|
+
class qt {
|
|
2064
2139
|
constructor(e) {
|
|
2065
2140
|
c(this, "config");
|
|
2066
2141
|
c(this, "cache");
|
|
@@ -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
|
|
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
|
|
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(
|
|
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,7 +2175,7 @@ function Ot(n) {
|
|
|
2100
2175
|
}
|
|
2101
2176
|
return t(n), e;
|
|
2102
2177
|
}
|
|
2103
|
-
function
|
|
2178
|
+
function Vt(n) {
|
|
2104
2179
|
return n.reduce((e, t, r) => (e[r] = t, e), {});
|
|
2105
2180
|
}
|
|
2106
2181
|
class O {
|
|
@@ -2140,13 +2215,13 @@ class O {
|
|
|
2140
2215
|
return await this.exec(s);
|
|
2141
2216
|
}
|
|
2142
2217
|
async exec(e) {
|
|
2143
|
-
var t, r, a, s, m,
|
|
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" || ((
|
|
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 O {
|
|
|
2167
2242
|
return t;
|
|
2168
2243
|
}
|
|
2169
2244
|
createUploadBody(e, t) {
|
|
2170
|
-
const r =
|
|
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 O {
|
|
|
2178
2253
|
})
|
|
2179
2254
|
);
|
|
2180
2255
|
const s = {};
|
|
2181
|
-
return r.forEach((m,
|
|
2182
|
-
s[
|
|
2183
|
-
}), a.append("map", JSON.stringify(s)), r.forEach((m,
|
|
2184
|
-
a.append(
|
|
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
|
|
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
|
|
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
|
|
2195
|
-
const t =
|
|
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
|
|
2277
|
+
class ke {
|
|
2203
2278
|
constructor(e) {
|
|
2204
2279
|
c(this, "enabled");
|
|
2205
2280
|
this.enabled = (e == null ? void 0 : e.enabled) ?? !0;
|
|
@@ -2217,11 +2292,11 @@ class Ce {
|
|
|
2217
2292
|
this.enabled && console.log(`\x1B[32m[success] ${e}`);
|
|
2218
2293
|
}
|
|
2219
2294
|
}
|
|
2220
|
-
function
|
|
2295
|
+
function q(n, e) {
|
|
2221
2296
|
const t = we(n);
|
|
2222
2297
|
return t.setDate(t.getDate() + e), t;
|
|
2223
2298
|
}
|
|
2224
|
-
function
|
|
2299
|
+
function Ce(n) {
|
|
2225
2300
|
return new Promise((e) => {
|
|
2226
2301
|
setTimeout(e, n);
|
|
2227
2302
|
});
|
|
@@ -2233,24 +2308,24 @@ function ge(n, e) {
|
|
|
2233
2308
|
maxAttempt: a = 3
|
|
2234
2309
|
/**/
|
|
2235
2310
|
} = e;
|
|
2236
|
-
async function s(m,
|
|
2237
|
-
const p =
|
|
2238
|
-
return t(f) ? f : p > 1 ? (await
|
|
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
|
}
|
|
2242
|
-
function
|
|
2317
|
+
function F(n, e) {
|
|
2243
2318
|
const t = we(n);
|
|
2244
2319
|
return t.setMinutes(t.getMinutes() - e), t;
|
|
2245
2320
|
}
|
|
2246
|
-
class
|
|
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
|
|
2328
|
+
this.authService = e.authService, this.walletService = e.walletService, this.logger = new ke({
|
|
2254
2329
|
enabled: e.logs ?? !1
|
|
2255
2330
|
});
|
|
2256
2331
|
}
|
|
@@ -2300,7 +2375,7 @@ class Lt {
|
|
|
2300
2375
|
JSON.stringify({
|
|
2301
2376
|
...p.data,
|
|
2302
2377
|
accessTokenExpiresAt: B(f, 8).getTime(),
|
|
2303
|
-
refreshTokenExpiresAt:
|
|
2378
|
+
refreshTokenExpiresAt: F(q(f, 30), 2).getTime()
|
|
2304
2379
|
})
|
|
2305
2380
|
), {
|
|
2306
2381
|
ok: !0,
|
|
@@ -2316,7 +2391,25 @@ class Lt {
|
|
|
2316
2391
|
JSON.stringify({
|
|
2317
2392
|
...s.data,
|
|
2318
2393
|
accessTokenExpiresAt: B(m, 8).getTime(),
|
|
2319
|
-
refreshTokenExpiresAt:
|
|
2394
|
+
refreshTokenExpiresAt: F(q(m, 30), 2).getTime()
|
|
2395
|
+
})
|
|
2396
|
+
), {
|
|
2397
|
+
ok: !0,
|
|
2398
|
+
data: null
|
|
2399
|
+
};
|
|
2400
|
+
}
|
|
2401
|
+
return s;
|
|
2402
|
+
}
|
|
2403
|
+
if (e.type === "TOKEN") {
|
|
2404
|
+
const s = await this.authService.createSession({ token: e.token });
|
|
2405
|
+
if (s.ok) {
|
|
2406
|
+
const m = /* @__PURE__ */ new Date();
|
|
2407
|
+
return window.localStorage.setItem(
|
|
2408
|
+
this.storageKey,
|
|
2409
|
+
JSON.stringify({
|
|
2410
|
+
...s.data,
|
|
2411
|
+
accessTokenExpiresAt: B(m, 8).getTime(),
|
|
2412
|
+
refreshTokenExpiresAt: F(q(m, 30), 2).getTime()
|
|
2320
2413
|
})
|
|
2321
2414
|
), {
|
|
2322
2415
|
ok: !0,
|
|
@@ -2340,7 +2433,7 @@ class Lt {
|
|
|
2340
2433
|
JSON.stringify({
|
|
2341
2434
|
...t.data,
|
|
2342
2435
|
accessTokenExpiresAt: B(r, 8).getTime(),
|
|
2343
|
-
refreshTokenExpiresAt:
|
|
2436
|
+
refreshTokenExpiresAt: F(q(r, 30), 2).getTime()
|
|
2344
2437
|
})
|
|
2345
2438
|
), {
|
|
2346
2439
|
ok: !0,
|
|
@@ -2356,7 +2449,7 @@ class Lt {
|
|
|
2356
2449
|
JSON.stringify({
|
|
2357
2450
|
...t.data,
|
|
2358
2451
|
accessTokenExpiresAt: B(r, 8).getTime(),
|
|
2359
|
-
refreshTokenExpiresAt:
|
|
2452
|
+
refreshTokenExpiresAt: F(q(r, 30), 2).getTime()
|
|
2360
2453
|
})
|
|
2361
2454
|
), { ok: !0 };
|
|
2362
2455
|
} else
|
|
@@ -2369,7 +2462,7 @@ class Lt {
|
|
|
2369
2462
|
data: null
|
|
2370
2463
|
};
|
|
2371
2464
|
if (this.refreshing)
|
|
2372
|
-
return await
|
|
2465
|
+
return await Ce(1e3), await this.get();
|
|
2373
2466
|
const e = window.localStorage.getItem(this.storageKey);
|
|
2374
2467
|
if (!e)
|
|
2375
2468
|
return {
|
|
@@ -2402,7 +2495,7 @@ class Lt {
|
|
|
2402
2495
|
...t,
|
|
2403
2496
|
...m.data,
|
|
2404
2497
|
accessTokenExpiresAt: B(r, 8).getTime(),
|
|
2405
|
-
refreshTokenExpiresAt:
|
|
2498
|
+
refreshTokenExpiresAt: F(q(r, 30), 2).getTime()
|
|
2406
2499
|
}, window.localStorage.setItem(this.storageKey, JSON.stringify(t));
|
|
2407
2500
|
}
|
|
2408
2501
|
return {
|
|
@@ -2470,11 +2563,11 @@ function i(n, e) {
|
|
|
2470
2563
|
}
|
|
2471
2564
|
return e;
|
|
2472
2565
|
}
|
|
2473
|
-
class
|
|
2566
|
+
class Qt {
|
|
2474
2567
|
constructor(e) {
|
|
2475
2568
|
c(this, "staticService");
|
|
2476
2569
|
const t = (e == null ? void 0 : e.environment) === "development";
|
|
2477
|
-
this.staticService = new
|
|
2570
|
+
this.staticService = new Ut({
|
|
2478
2571
|
url: t ? "https://static.development.opexa.io" : "https://static.opexa.io"
|
|
2479
2572
|
});
|
|
2480
2573
|
}
|
|
@@ -2507,7 +2600,8 @@ class Vt {
|
|
|
2507
2600
|
referralCommission: this.referralCommission.bind(this),
|
|
2508
2601
|
platform__next: this.platform__next.bind(this),
|
|
2509
2602
|
pointsClubSettings: this.pointsClubSettings.bind(this),
|
|
2510
|
-
paymentSettings: this.paymentSettings.bind(this)
|
|
2603
|
+
paymentSettings: this.paymentSettings.bind(this),
|
|
2604
|
+
message: this.message.bind(this)
|
|
2511
2605
|
};
|
|
2512
2606
|
}
|
|
2513
2607
|
site(e) {
|
|
@@ -2521,7 +2615,7 @@ class Vt {
|
|
|
2521
2615
|
}
|
|
2522
2616
|
/** @deprecated */
|
|
2523
2617
|
platform(e) {
|
|
2524
|
-
var t, r, a, s, m,
|
|
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;
|
|
2525
2619
|
return {
|
|
2526
2620
|
timezone: e.timezone,
|
|
2527
2621
|
currency: e.currency,
|
|
@@ -2535,69 +2629,69 @@ class Vt {
|
|
|
2535
2629
|
webEnabled: ((a = e.bankDepositGatewaySettings) == null ? void 0 : a.webEnabled) ?? !1,
|
|
2536
2630
|
mobileWebEnabled: ((s = e.bankDepositGatewaySettings) == null ? void 0 : s.mobileWebEnabled) ?? !1,
|
|
2537
2631
|
minimumAmount: i((m = e.bankDepositGatewaySettings) == null ? void 0 : m.minimumAmount),
|
|
2538
|
-
maximumAmount: i((
|
|
2632
|
+
maximumAmount: i((d = e.bankDepositGatewaySettings) == null ? void 0 : d.maximumAmount)
|
|
2539
2633
|
},
|
|
2540
2634
|
gcash: {
|
|
2541
2635
|
androidEnabled: ((p = e.gcashDepositGatewaySettings) == null ? void 0 : p.androidEnabled) ?? !1,
|
|
2542
2636
|
iosEnabled: ((f = e.gcashDepositGatewaySettings) == null ? void 0 : f.iosEnabled) ?? !1,
|
|
2543
2637
|
webEnabled: ((h = e.gcashDepositGatewaySettings) == null ? void 0 : h.webEnabled) ?? !1,
|
|
2544
2638
|
mobileWebEnabled: ((l = e.gcashDepositGatewaySettings) == null ? void 0 : l.mobileWebEnabled) ?? !1,
|
|
2545
|
-
minimumAmount: i((
|
|
2546
|
-
maximumAmount: i((
|
|
2639
|
+
minimumAmount: i((k = e.gcashDepositGatewaySettings) == null ? void 0 : k.minimumAmount),
|
|
2640
|
+
maximumAmount: i((C = e.gcashDepositGatewaySettings) == null ? void 0 : C.maximumAmount)
|
|
2547
2641
|
},
|
|
2548
2642
|
maya: {
|
|
2549
2643
|
androidEnabled: ((_ = e.mayaDepositGatewaySettings) == null ? void 0 : _.androidEnabled) ?? !1,
|
|
2550
2644
|
iosEnabled: ((T = e.mayaDepositGatewaySettings) == null ? void 0 : T.iosEnabled) ?? !1,
|
|
2551
|
-
webEnabled: ((
|
|
2552
|
-
mobileWebEnabled: ((
|
|
2553
|
-
minimumAmount: i((
|
|
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),
|
|
2554
2648
|
maximumAmount: i((R = e.mayaDepositGatewaySettings) == null ? void 0 : R.maximumAmount)
|
|
2555
2649
|
},
|
|
2556
2650
|
mayaApp: {
|
|
2557
|
-
androidEnabled: ((
|
|
2558
|
-
iosEnabled: ((
|
|
2651
|
+
androidEnabled: ((N = e.mayaAppDepositGatewaySettings) == null ? void 0 : N.androidEnabled) ?? !1,
|
|
2652
|
+
iosEnabled: ((S = e.mayaAppDepositGatewaySettings) == null ? void 0 : S.iosEnabled) ?? !1,
|
|
2559
2653
|
webEnabled: ((D = e.mayaAppDepositGatewaySettings) == null ? void 0 : D.webEnabled) ?? !1,
|
|
2560
2654
|
mobileWebEnabled: ((I = e.mayaAppDepositGatewaySettings) == null ? void 0 : I.mobileWebEnabled) ?? !1,
|
|
2561
|
-
minimumAmount: i((
|
|
2562
|
-
maximumAmount: i((
|
|
2655
|
+
minimumAmount: i((G = e.mayaAppDepositGatewaySettings) == null ? void 0 : G.minimumAmount),
|
|
2656
|
+
maximumAmount: i((P = e.mayaAppDepositGatewaySettings) == null ? void 0 : P.maximumAmount)
|
|
2563
2657
|
}
|
|
2564
2658
|
},
|
|
2565
2659
|
withdrawalGateway: {
|
|
2566
2660
|
bank: {
|
|
2567
|
-
androidEnabled: ((
|
|
2568
|
-
iosEnabled: ((
|
|
2661
|
+
androidEnabled: ((A = e.bankWithdrawalGatewaySettings) == null ? void 0 : A.androidEnabled) ?? !1,
|
|
2662
|
+
iosEnabled: ((W = e.bankWithdrawalGatewaySettings) == null ? void 0 : W.iosEnabled) ?? !1,
|
|
2569
2663
|
webEnabled: ((E = e.bankWithdrawalGatewaySettings) == null ? void 0 : E.webEnabled) ?? !1,
|
|
2570
|
-
mobileWebEnabled: ((
|
|
2571
|
-
minimumAmount: i((
|
|
2572
|
-
maximumAmount: i((
|
|
2664
|
+
mobileWebEnabled: ((L = e.bankWithdrawalGatewaySettings) == null ? void 0 : L.mobileWebEnabled) ?? !1,
|
|
2665
|
+
minimumAmount: i((V = e.bankWithdrawalGatewaySettings) == null ? void 0 : V.minimumAmount),
|
|
2666
|
+
maximumAmount: i((H = e.bankWithdrawalGatewaySettings) == null ? void 0 : H.maximumAmount)
|
|
2573
2667
|
},
|
|
2574
2668
|
gcash: {
|
|
2575
|
-
androidEnabled: ((
|
|
2576
|
-
iosEnabled: ((
|
|
2577
|
-
webEnabled: ((
|
|
2578
|
-
mobileWebEnabled: ((
|
|
2579
|
-
minimumAmount: i((
|
|
2669
|
+
androidEnabled: ((Y = e.gcashWithdrawalGatewaySettings) == null ? void 0 : Y.androidEnabled) ?? !1,
|
|
2670
|
+
iosEnabled: ((j = e.gcashWithdrawalGatewaySettings) == null ? void 0 : j.iosEnabled) ?? !1,
|
|
2671
|
+
webEnabled: ((Q = e.gcashWithdrawalGatewaySettings) == null ? void 0 : Q.webEnabled) ?? !1,
|
|
2672
|
+
mobileWebEnabled: ((K = e.gcashWithdrawalGatewaySettings) == null ? void 0 : K.mobileWebEnabled) ?? !1,
|
|
2673
|
+
minimumAmount: i((z = e.gcashWithdrawalGatewaySettings) == null ? void 0 : z.minimumAmount),
|
|
2580
2674
|
maximumAmount: i(
|
|
2581
|
-
(
|
|
2675
|
+
(J = e.gcashWithdrawalGatewaySettings) == null ? void 0 : J.maximumAmount,
|
|
2582
2676
|
1e6
|
|
2583
2677
|
)
|
|
2584
2678
|
},
|
|
2585
2679
|
maya: {
|
|
2586
|
-
androidEnabled: ((
|
|
2587
|
-
iosEnabled: ((
|
|
2588
|
-
webEnabled: ((
|
|
2589
|
-
mobileWebEnabled: ((
|
|
2590
|
-
minimumAmount: i((
|
|
2591
|
-
maximumAmount: i((
|
|
2680
|
+
androidEnabled: ((X = e.mayaWithdrawalGatewaySettings) == null ? void 0 : X.androidEnabled) ?? !1,
|
|
2681
|
+
iosEnabled: ((Z = e.mayaWithdrawalGatewaySettings) == null ? void 0 : Z.iosEnabled) ?? !1,
|
|
2682
|
+
webEnabled: ((ee = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ee.webEnabled) ?? !1,
|
|
2683
|
+
mobileWebEnabled: ((te = e.mayaWithdrawalGatewaySettings) == null ? void 0 : te.mobileWebEnabled) ?? !1,
|
|
2684
|
+
minimumAmount: i((re = e.mayaWithdrawalGatewaySettings) == null ? void 0 : re.minimumAmount),
|
|
2685
|
+
maximumAmount: i((ae = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ae.maximumAmount)
|
|
2592
2686
|
},
|
|
2593
2687
|
mayaApp: {
|
|
2594
|
-
androidEnabled: ((
|
|
2595
|
-
iosEnabled: ((
|
|
2596
|
-
webEnabled: ((
|
|
2597
|
-
mobileWebEnabled: ((
|
|
2598
|
-
minimumAmount: i((
|
|
2688
|
+
androidEnabled: ((ne = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ne.androidEnabled) ?? !1,
|
|
2689
|
+
iosEnabled: ((ie = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ie.iosEnabled) ?? !1,
|
|
2690
|
+
webEnabled: ((oe = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : oe.webEnabled) ?? !1,
|
|
2691
|
+
mobileWebEnabled: ((se = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : se.mobileWebEnabled) ?? !1,
|
|
2692
|
+
minimumAmount: i((me = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : me.minimumAmount),
|
|
2599
2693
|
maximumAmount: i(
|
|
2600
|
-
(
|
|
2694
|
+
(ce = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ce.maximumAmount,
|
|
2601
2695
|
1e6
|
|
2602
2696
|
)
|
|
2603
2697
|
}
|
|
@@ -2612,7 +2706,7 @@ class Vt {
|
|
|
2612
2706
|
return {
|
|
2613
2707
|
currency: e.currency,
|
|
2614
2708
|
timezone: e.timezone,
|
|
2615
|
-
locale:
|
|
2709
|
+
locale: Ht(e.currency)
|
|
2616
2710
|
};
|
|
2617
2711
|
}
|
|
2618
2712
|
pointsClubSettings(e) {
|
|
@@ -2621,7 +2715,7 @@ class Vt {
|
|
|
2621
2715
|
};
|
|
2622
2716
|
}
|
|
2623
2717
|
paymentSettings(e) {
|
|
2624
|
-
var t, r, a, s, m,
|
|
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;
|
|
2625
2719
|
return {
|
|
2626
2720
|
minimumFirstDepositAmount: i(e.minimumFirstDepositAmount),
|
|
2627
2721
|
restrictWithdrawalsToVerifiedMembers: e.restrictWithdrawalsToVerifiedMembers,
|
|
@@ -2632,66 +2726,66 @@ class Vt {
|
|
|
2632
2726
|
webEnabled: ((a = e.bankDepositGatewaySettings) == null ? void 0 : a.webEnabled) ?? !1,
|
|
2633
2727
|
mobileWebEnabled: ((s = e.bankDepositGatewaySettings) == null ? void 0 : s.mobileWebEnabled) ?? !1,
|
|
2634
2728
|
minimumAmount: i((m = e.bankDepositGatewaySettings) == null ? void 0 : m.minimumAmount),
|
|
2635
|
-
maximumAmount: i((
|
|
2729
|
+
maximumAmount: i((d = e.bankDepositGatewaySettings) == null ? void 0 : d.maximumAmount)
|
|
2636
2730
|
},
|
|
2637
2731
|
gcash: {
|
|
2638
2732
|
androidEnabled: ((p = e.gcashDepositGatewaySettings) == null ? void 0 : p.androidEnabled) ?? !1,
|
|
2639
2733
|
iosEnabled: ((f = e.gcashDepositGatewaySettings) == null ? void 0 : f.iosEnabled) ?? !1,
|
|
2640
2734
|
webEnabled: ((h = e.gcashDepositGatewaySettings) == null ? void 0 : h.webEnabled) ?? !1,
|
|
2641
2735
|
mobileWebEnabled: ((l = e.gcashDepositGatewaySettings) == null ? void 0 : l.mobileWebEnabled) ?? !1,
|
|
2642
|
-
minimumAmount: i((
|
|
2643
|
-
maximumAmount: i((
|
|
2736
|
+
minimumAmount: i((k = e.gcashDepositGatewaySettings) == null ? void 0 : k.minimumAmount),
|
|
2737
|
+
maximumAmount: i((C = e.gcashDepositGatewaySettings) == null ? void 0 : C.maximumAmount)
|
|
2644
2738
|
},
|
|
2645
2739
|
maya: {
|
|
2646
2740
|
androidEnabled: ((_ = e.mayaDepositGatewaySettings) == null ? void 0 : _.androidEnabled) ?? !1,
|
|
2647
2741
|
iosEnabled: ((T = e.mayaDepositGatewaySettings) == null ? void 0 : T.iosEnabled) ?? !1,
|
|
2648
|
-
webEnabled: ((
|
|
2649
|
-
mobileWebEnabled: ((
|
|
2650
|
-
minimumAmount: i((
|
|
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),
|
|
2651
2745
|
maximumAmount: i((R = e.mayaDepositGatewaySettings) == null ? void 0 : R.maximumAmount)
|
|
2652
2746
|
},
|
|
2653
2747
|
mayaApp: {
|
|
2654
|
-
androidEnabled: ((
|
|
2655
|
-
iosEnabled: ((
|
|
2748
|
+
androidEnabled: ((N = e.mayaAppDepositGatewaySettings) == null ? void 0 : N.androidEnabled) ?? !1,
|
|
2749
|
+
iosEnabled: ((S = e.mayaAppDepositGatewaySettings) == null ? void 0 : S.iosEnabled) ?? !1,
|
|
2656
2750
|
webEnabled: ((D = e.mayaAppDepositGatewaySettings) == null ? void 0 : D.webEnabled) ?? !1,
|
|
2657
2751
|
mobileWebEnabled: ((I = e.mayaAppDepositGatewaySettings) == null ? void 0 : I.mobileWebEnabled) ?? !1,
|
|
2658
|
-
minimumAmount: i((
|
|
2659
|
-
maximumAmount: i((
|
|
2752
|
+
minimumAmount: i((G = e.mayaAppDepositGatewaySettings) == null ? void 0 : G.minimumAmount),
|
|
2753
|
+
maximumAmount: i((P = e.mayaAppDepositGatewaySettings) == null ? void 0 : P.maximumAmount)
|
|
2660
2754
|
}
|
|
2661
2755
|
},
|
|
2662
2756
|
withdrawalGateway: {
|
|
2663
2757
|
bank: {
|
|
2664
|
-
androidEnabled: ((
|
|
2665
|
-
iosEnabled: ((
|
|
2758
|
+
androidEnabled: ((A = e.bankWithdrawalGatewaySettings) == null ? void 0 : A.androidEnabled) ?? !1,
|
|
2759
|
+
iosEnabled: ((W = e.bankWithdrawalGatewaySettings) == null ? void 0 : W.iosEnabled) ?? !1,
|
|
2666
2760
|
webEnabled: ((E = e.bankWithdrawalGatewaySettings) == null ? void 0 : E.webEnabled) ?? !1,
|
|
2667
|
-
mobileWebEnabled: ((
|
|
2668
|
-
minimumAmount: i((
|
|
2669
|
-
maximumAmount: i((
|
|
2761
|
+
mobileWebEnabled: ((L = e.bankWithdrawalGatewaySettings) == null ? void 0 : L.mobileWebEnabled) ?? !1,
|
|
2762
|
+
minimumAmount: i((V = e.bankWithdrawalGatewaySettings) == null ? void 0 : V.minimumAmount),
|
|
2763
|
+
maximumAmount: i((H = e.bankWithdrawalGatewaySettings) == null ? void 0 : H.maximumAmount)
|
|
2670
2764
|
},
|
|
2671
2765
|
gcash: {
|
|
2672
|
-
androidEnabled: ((
|
|
2673
|
-
iosEnabled: ((
|
|
2674
|
-
webEnabled: ((
|
|
2675
|
-
mobileWebEnabled: ((
|
|
2676
|
-
minimumAmount: i((
|
|
2677
|
-
maximumAmount: i((
|
|
2766
|
+
androidEnabled: ((Y = e.gcashWithdrawalGatewaySettings) == null ? void 0 : Y.androidEnabled) ?? !1,
|
|
2767
|
+
iosEnabled: ((j = e.gcashWithdrawalGatewaySettings) == null ? void 0 : j.iosEnabled) ?? !1,
|
|
2768
|
+
webEnabled: ((Q = e.gcashWithdrawalGatewaySettings) == null ? void 0 : Q.webEnabled) ?? !1,
|
|
2769
|
+
mobileWebEnabled: ((K = e.gcashWithdrawalGatewaySettings) == null ? void 0 : K.mobileWebEnabled) ?? !1,
|
|
2770
|
+
minimumAmount: i((z = e.gcashWithdrawalGatewaySettings) == null ? void 0 : z.minimumAmount),
|
|
2771
|
+
maximumAmount: i((J = e.gcashWithdrawalGatewaySettings) == null ? void 0 : J.maximumAmount, 1e6)
|
|
2678
2772
|
},
|
|
2679
2773
|
maya: {
|
|
2680
|
-
androidEnabled: ((
|
|
2681
|
-
iosEnabled: ((
|
|
2682
|
-
webEnabled: ((
|
|
2683
|
-
mobileWebEnabled: ((
|
|
2684
|
-
minimumAmount: i((
|
|
2685
|
-
maximumAmount: i((
|
|
2774
|
+
androidEnabled: ((X = e.mayaWithdrawalGatewaySettings) == null ? void 0 : X.androidEnabled) ?? !1,
|
|
2775
|
+
iosEnabled: ((Z = e.mayaWithdrawalGatewaySettings) == null ? void 0 : Z.iosEnabled) ?? !1,
|
|
2776
|
+
webEnabled: ((ee = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ee.webEnabled) ?? !1,
|
|
2777
|
+
mobileWebEnabled: ((te = e.mayaWithdrawalGatewaySettings) == null ? void 0 : te.mobileWebEnabled) ?? !1,
|
|
2778
|
+
minimumAmount: i((re = e.mayaWithdrawalGatewaySettings) == null ? void 0 : re.minimumAmount),
|
|
2779
|
+
maximumAmount: i((ae = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ae.maximumAmount)
|
|
2686
2780
|
},
|
|
2687
2781
|
mayaApp: {
|
|
2688
|
-
androidEnabled: ((
|
|
2689
|
-
iosEnabled: ((
|
|
2690
|
-
webEnabled: ((
|
|
2691
|
-
mobileWebEnabled: ((
|
|
2692
|
-
minimumAmount: i((
|
|
2782
|
+
androidEnabled: ((ne = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ne.androidEnabled) ?? !1,
|
|
2783
|
+
iosEnabled: ((ie = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ie.iosEnabled) ?? !1,
|
|
2784
|
+
webEnabled: ((oe = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : oe.webEnabled) ?? !1,
|
|
2785
|
+
mobileWebEnabled: ((se = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : se.mobileWebEnabled) ?? !1,
|
|
2786
|
+
minimumAmount: i((me = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : me.minimumAmount),
|
|
2693
2787
|
maximumAmount: i(
|
|
2694
|
-
(
|
|
2788
|
+
(ce = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ce.maximumAmount,
|
|
2695
2789
|
1e6
|
|
2696
2790
|
)
|
|
2697
2791
|
}
|
|
@@ -3028,8 +3122,20 @@ class Vt {
|
|
|
3028
3122
|
dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
|
|
3029
3123
|
};
|
|
3030
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
|
+
}
|
|
3031
3137
|
}
|
|
3032
|
-
class
|
|
3138
|
+
class Jt {
|
|
3033
3139
|
constructor(e) {
|
|
3034
3140
|
c(this, "cmsPortalService");
|
|
3035
3141
|
c(this, "authService");
|
|
@@ -3039,6 +3145,7 @@ class jt {
|
|
|
3039
3145
|
c(this, "accountService");
|
|
3040
3146
|
c(this, "reportService");
|
|
3041
3147
|
c(this, "portalService");
|
|
3148
|
+
c(this, "triggerService");
|
|
3042
3149
|
c(this, "sessionManager");
|
|
3043
3150
|
c(this, "transformer");
|
|
3044
3151
|
c(this, "logger");
|
|
@@ -3050,14 +3157,14 @@ class jt {
|
|
|
3050
3157
|
platform: a,
|
|
3051
3158
|
environment: s,
|
|
3052
3159
|
logs: m
|
|
3053
|
-
} = e,
|
|
3054
|
-
this.transformer = new
|
|
3160
|
+
} = e, d = s === "production";
|
|
3161
|
+
this.transformer = new Qt({
|
|
3055
3162
|
environment: s
|
|
3056
|
-
}), this.logger = new
|
|
3163
|
+
}), this.logger = new ke({
|
|
3057
3164
|
enabled: m ?? !1
|
|
3058
3165
|
});
|
|
3059
|
-
const p =
|
|
3060
|
-
url:
|
|
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,
|
|
3061
3168
|
site: t,
|
|
3062
3169
|
platform: r
|
|
3063
3170
|
}), y = {
|
|
@@ -3068,15 +3175,15 @@ class jt {
|
|
|
3068
3175
|
"Platform-Code": a
|
|
3069
3176
|
}
|
|
3070
3177
|
}
|
|
3071
|
-
},
|
|
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({
|
|
3072
3179
|
url: p,
|
|
3073
3180
|
platform: a
|
|
3074
|
-
}),
|
|
3181
|
+
}), W = new jt({
|
|
3075
3182
|
logs: m,
|
|
3076
3183
|
authService: A,
|
|
3077
3184
|
walletService: S
|
|
3078
3185
|
});
|
|
3079
|
-
this.authService = A, this.gameService =
|
|
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();
|
|
3080
3187
|
}
|
|
3081
3188
|
get authMiddleware() {
|
|
3082
3189
|
return async (e) => {
|
|
@@ -3114,10 +3221,17 @@ class jt {
|
|
|
3114
3221
|
}
|
|
3115
3222
|
} : t;
|
|
3116
3223
|
}
|
|
3224
|
+
case "TOKEN": {
|
|
3225
|
+
const t = await this.sessionManager.create({
|
|
3226
|
+
type: "TOKEN",
|
|
3227
|
+
token: e.token
|
|
3228
|
+
});
|
|
3229
|
+
return t.ok ? { ok: !0 } : t;
|
|
3230
|
+
}
|
|
3117
3231
|
case "MOBILE_NUMBER": {
|
|
3118
3232
|
const t = await this.sessionManager.create({
|
|
3119
3233
|
type: "MOBILE_NUMBER",
|
|
3120
|
-
mobileNumber:
|
|
3234
|
+
mobileNumber: x(e.mobileNumber, await this.locale),
|
|
3121
3235
|
verificationCode: e.verificationCode
|
|
3122
3236
|
});
|
|
3123
3237
|
return t.ok ? { ok: !0 } : t;
|
|
@@ -3150,7 +3264,7 @@ class jt {
|
|
|
3150
3264
|
await this.sessionManager.destroy();
|
|
3151
3265
|
}
|
|
3152
3266
|
watchSession(e) {
|
|
3153
|
-
const t =
|
|
3267
|
+
const t = Ft(e.interval ?? 3e4, 3e4, 6e4);
|
|
3154
3268
|
let r = null;
|
|
3155
3269
|
const a = () => setTimeout(async () => {
|
|
3156
3270
|
await this.sessionManager.verify() || await e.onInvalid(), r = a();
|
|
@@ -3235,7 +3349,7 @@ class jt {
|
|
|
3235
3349
|
domain: e.domain,
|
|
3236
3350
|
birthDay: typeof e.dateOfBirth == "string" ? e.dateOfBirth : e.dateOfBirth.toISOString(),
|
|
3237
3351
|
password: await g(e.password),
|
|
3238
|
-
mobileNumber:
|
|
3352
|
+
mobileNumber: x(e.mobileNumber, await this.locale)
|
|
3239
3353
|
},
|
|
3240
3354
|
referralCode: e.referralCode,
|
|
3241
3355
|
verificationCode: e.verificationCode,
|
|
@@ -3249,7 +3363,7 @@ class jt {
|
|
|
3249
3363
|
const a = await this.accountService.registerMemberAccountViaMobile({
|
|
3250
3364
|
input: {
|
|
3251
3365
|
id: t,
|
|
3252
|
-
mobileNumber:
|
|
3366
|
+
mobileNumber: x(e.mobileNumber, await this.locale)
|
|
3253
3367
|
},
|
|
3254
3368
|
referralCode: e.referralCode,
|
|
3255
3369
|
reCAPTCHAResponse: e.reCAPTCHAResponse,
|
|
@@ -3262,7 +3376,7 @@ class jt {
|
|
|
3262
3376
|
id: t,
|
|
3263
3377
|
name: e.name,
|
|
3264
3378
|
password: await g(e.password),
|
|
3265
|
-
mobileNumber: e.mobileNumber ?
|
|
3379
|
+
mobileNumber: e.mobileNumber ? x(e.mobileNumber, await this.locale) : void 0
|
|
3266
3380
|
},
|
|
3267
3381
|
reCAPTCHAResponse: e.reCAPTCHAResponse
|
|
3268
3382
|
});
|
|
@@ -3286,7 +3400,7 @@ class jt {
|
|
|
3286
3400
|
password: t.password ? await g(t.password) : void 0,
|
|
3287
3401
|
transactionPassword: t.transactionPassword ? await g(t.transactionPassword) : void 0,
|
|
3288
3402
|
...t.mobileNumber && {
|
|
3289
|
-
mobileNumber:
|
|
3403
|
+
mobileNumber: x(t.mobileNumber, await this.locale)
|
|
3290
3404
|
},
|
|
3291
3405
|
secretAnswer: t.secretAnswer ? await g(t.secretAnswer) : void 0
|
|
3292
3406
|
}
|
|
@@ -3329,7 +3443,7 @@ class jt {
|
|
|
3329
3443
|
async resetPassword(e) {
|
|
3330
3444
|
return await this.accountService.resetPassword({
|
|
3331
3445
|
input: {
|
|
3332
|
-
mobileNumber:
|
|
3446
|
+
mobileNumber: x(e.mobileNumber, await this.locale),
|
|
3333
3447
|
newPassword: await g(e.newPassword)
|
|
3334
3448
|
},
|
|
3335
3449
|
verificationCode: e.verificationCode
|
|
@@ -3356,7 +3470,7 @@ class jt {
|
|
|
3356
3470
|
return await this.accountService.sendVerificationCode({
|
|
3357
3471
|
input: {
|
|
3358
3472
|
channel: "SMS",
|
|
3359
|
-
recipient:
|
|
3473
|
+
recipient: x(e, await this.locale)
|
|
3360
3474
|
}
|
|
3361
3475
|
});
|
|
3362
3476
|
}
|
|
@@ -3364,7 +3478,7 @@ class jt {
|
|
|
3364
3478
|
if (e.type === "SMS")
|
|
3365
3479
|
return this.authService.sendVerificationCode({
|
|
3366
3480
|
channel: "SMS",
|
|
3367
|
-
recipient:
|
|
3481
|
+
recipient: x(e.mobileNumber, await this.locale),
|
|
3368
3482
|
...e.strict && {
|
|
3369
3483
|
verificationType: "MEMBER"
|
|
3370
3484
|
}
|
|
@@ -3431,7 +3545,7 @@ class jt {
|
|
|
3431
3545
|
id: t,
|
|
3432
3546
|
amount: e.amount.toString(),
|
|
3433
3547
|
transactionPassword: await g(e.transactionPassword),
|
|
3434
|
-
recipientMobileNumber:
|
|
3548
|
+
recipientMobileNumber: x(e.recipientMobileNumber, await this.locale)
|
|
3435
3549
|
}
|
|
3436
3550
|
});
|
|
3437
3551
|
if (!r.ok) return r;
|
|
@@ -3442,7 +3556,7 @@ class jt {
|
|
|
3442
3556
|
id: t,
|
|
3443
3557
|
amount: e.amount.toString(),
|
|
3444
3558
|
transactionPassword: await g(e.transactionPassword),
|
|
3445
|
-
recipientMobileNumber:
|
|
3559
|
+
recipientMobileNumber: x(e.recipientMobileNumber, await this.locale)
|
|
3446
3560
|
}
|
|
3447
3561
|
});
|
|
3448
3562
|
if (!r.ok) return r;
|
|
@@ -3867,10 +3981,36 @@ class jt {
|
|
|
3867
3981
|
data: e.data ? this.transformer.transform.pointsClubSettings(e.data) : null
|
|
3868
3982
|
} : e;
|
|
3869
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
|
+
}
|
|
3870
4010
|
}
|
|
3871
4011
|
export {
|
|
3872
|
-
|
|
4012
|
+
er as ObjectId,
|
|
3873
4013
|
U as ObjectType,
|
|
3874
|
-
|
|
4014
|
+
Jt as Sdk
|
|
3875
4015
|
};
|
|
3876
4016
|
//# sourceMappingURL=index.mjs.map
|