@opexa/portal-sdk 0.0.75 → 0.0.77
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 +94 -59
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +172 -115
- package/dist/index.mjs.map +1 -1
- package/dist/sdk/sdk.d.ts +5 -1
- package/dist/sdk/transformer.d.ts +4 -4
- package/dist/sdk/types.d.ts +5 -2
- package/dist/services/queries.d.ts +1 -0
- package/dist/services/report.service.d.ts +2 -1
- package/dist/services/types.d.ts +13 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ var ke = Object.defineProperty;
|
|
|
2
2
|
var Te = (o, e, t) => e in o ? ke(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
|
|
3
3
|
var d = (o, e, t) => Te(o, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
import { ObjectId as k } from "@opexa/object-id";
|
|
5
|
-
import { ObjectId as
|
|
5
|
+
import { ObjectId as Lt } from "@opexa/object-id";
|
|
6
6
|
const T = {
|
|
7
7
|
Account: 8,
|
|
8
8
|
Deposit: 9,
|
|
@@ -62,7 +62,7 @@ const L = i`
|
|
|
62
62
|
dateTimeLastUpdated
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
`,
|
|
65
|
+
`, Re = i`
|
|
66
66
|
query PointsWallet {
|
|
67
67
|
pointsWallet {
|
|
68
68
|
id
|
|
@@ -71,7 +71,7 @@ const L = i`
|
|
|
71
71
|
dateTimeCreated
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
`,
|
|
74
|
+
`, Ne = i`
|
|
75
75
|
mutation PointsToCashConversion($input: PointsToCashConversionInput!) {
|
|
76
76
|
pointsToCashConversion(input: $input) {
|
|
77
77
|
... on InsufficientPointsError {
|
|
@@ -349,11 +349,11 @@ const L = i`
|
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
|
-
`,
|
|
352
|
+
`, Oe = i`
|
|
353
353
|
query RemainingDailyWithdrawalsCount {
|
|
354
354
|
remainingDailyWithdrawalsCount
|
|
355
355
|
}
|
|
356
|
-
`,
|
|
356
|
+
`, We = i`
|
|
357
357
|
query DepositRecords($after: Cursor, $first: Int, $filter: DepositRecordFilterInput) {
|
|
358
358
|
member {
|
|
359
359
|
depositRecords(after: $after, first: $first, filter: $filter) {
|
|
@@ -629,7 +629,7 @@ const L = i`
|
|
|
629
629
|
...PromoFragment
|
|
630
630
|
}
|
|
631
631
|
}
|
|
632
|
-
`,
|
|
632
|
+
`, Ce = i`
|
|
633
633
|
${L}
|
|
634
634
|
|
|
635
635
|
fragment CashbackFragment on Cashback {
|
|
@@ -647,7 +647,7 @@ const L = i`
|
|
|
647
647
|
dateTimeLastUpdated
|
|
648
648
|
}
|
|
649
649
|
`, Je = i`
|
|
650
|
-
${
|
|
650
|
+
${Ce}
|
|
651
651
|
|
|
652
652
|
query Cashbacks {
|
|
653
653
|
cashbacks {
|
|
@@ -684,7 +684,7 @@ const L = i`
|
|
|
684
684
|
}
|
|
685
685
|
}
|
|
686
686
|
`, Xe = i`
|
|
687
|
-
${
|
|
687
|
+
${Ce}
|
|
688
688
|
|
|
689
689
|
query CashbackBonuses {
|
|
690
690
|
cashbackBonuses {
|
|
@@ -917,7 +917,7 @@ const et = i`
|
|
|
917
917
|
}
|
|
918
918
|
}
|
|
919
919
|
}
|
|
920
|
-
`,
|
|
920
|
+
`, mt = i`
|
|
921
921
|
mutation CreateMemberVerification($input: CreateMemberVerificationInput!) {
|
|
922
922
|
createMemberVerification(input: $input) {
|
|
923
923
|
... on FileDoesNotExistError {
|
|
@@ -931,7 +931,7 @@ const et = i`
|
|
|
931
931
|
}
|
|
932
932
|
}
|
|
933
933
|
}
|
|
934
|
-
`,
|
|
934
|
+
`, ut = i`
|
|
935
935
|
mutation UpdateMemberVerification($input: UpdateMemberVerificationInput!) {
|
|
936
936
|
updateMemberVerification(input: $input) {
|
|
937
937
|
... on FileDoesNotExistError {
|
|
@@ -1107,8 +1107,43 @@ const et = i`
|
|
|
1107
1107
|
}
|
|
1108
1108
|
}
|
|
1109
1109
|
}
|
|
1110
|
+
`, Ct = i`
|
|
1111
|
+
query ReferralCommissions(
|
|
1112
|
+
$after: Cursor
|
|
1113
|
+
$first: Int
|
|
1114
|
+
$filter: MemberReferralCommissionFilterInput
|
|
1115
|
+
) {
|
|
1116
|
+
member {
|
|
1117
|
+
referralCommissions(after: $after, first: $first, filter: $filter) {
|
|
1118
|
+
edges {
|
|
1119
|
+
cursor
|
|
1120
|
+
node {
|
|
1121
|
+
... on ReferralCommission {
|
|
1122
|
+
id
|
|
1123
|
+
commission
|
|
1124
|
+
dateTimeCreated
|
|
1125
|
+
dateTimeLastUpdated
|
|
1126
|
+
level1Commission
|
|
1127
|
+
level1ReferralsCount
|
|
1128
|
+
level2Commission
|
|
1129
|
+
level2ReferralsCount
|
|
1130
|
+
level3Commission
|
|
1131
|
+
level3ReferralsCount
|
|
1132
|
+
referralCode
|
|
1133
|
+
referralsCount
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
totalCount
|
|
1138
|
+
pageInfo {
|
|
1139
|
+
endCursor
|
|
1140
|
+
hasNextPage
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1110
1145
|
`;
|
|
1111
|
-
function
|
|
1146
|
+
function m(o) {
|
|
1112
1147
|
return {
|
|
1113
1148
|
name: o,
|
|
1114
1149
|
message: {
|
|
@@ -1180,7 +1215,7 @@ class Et {
|
|
|
1180
1215
|
const t = await this.client.request(rt, e);
|
|
1181
1216
|
return t.ok ? t.data.registerMemberAccount ? {
|
|
1182
1217
|
ok: !1,
|
|
1183
|
-
error:
|
|
1218
|
+
error: m(t.data.registerMemberAccount.__typename)
|
|
1184
1219
|
} : {
|
|
1185
1220
|
ok: !0
|
|
1186
1221
|
} : t;
|
|
@@ -1189,7 +1224,7 @@ class Et {
|
|
|
1189
1224
|
const t = await this.client.request(at, e);
|
|
1190
1225
|
return t.ok ? t.data.registerMemberAccountViaMobile ? {
|
|
1191
1226
|
ok: !1,
|
|
1192
|
-
error:
|
|
1227
|
+
error: m(t.data.registerMemberAccountViaMobile.__typename)
|
|
1193
1228
|
} : {
|
|
1194
1229
|
ok: !0
|
|
1195
1230
|
} : t;
|
|
@@ -1198,7 +1233,7 @@ class Et {
|
|
|
1198
1233
|
const t = await this.client.request(ot, e);
|
|
1199
1234
|
return t.ok ? t.data.registerMemberAccount ? {
|
|
1200
1235
|
ok: !1,
|
|
1201
|
-
error:
|
|
1236
|
+
error: m(t.data.registerMemberAccount.__typename)
|
|
1202
1237
|
} : {
|
|
1203
1238
|
ok: !0
|
|
1204
1239
|
} : t;
|
|
@@ -1207,7 +1242,7 @@ class Et {
|
|
|
1207
1242
|
const t = await this.client.request(it, e);
|
|
1208
1243
|
return t.ok ? t.data.updateMemberAccount ? {
|
|
1209
1244
|
ok: !1,
|
|
1210
|
-
error:
|
|
1245
|
+
error: m(t.data.updateMemberAccount.__typename)
|
|
1211
1246
|
} : {
|
|
1212
1247
|
ok: !0
|
|
1213
1248
|
} : t;
|
|
@@ -1231,7 +1266,7 @@ class Et {
|
|
|
1231
1266
|
);
|
|
1232
1267
|
return t.ok ? t.data.resetPassword ? {
|
|
1233
1268
|
ok: !1,
|
|
1234
|
-
error:
|
|
1269
|
+
error: m(t.data.resetPassword.__typename)
|
|
1235
1270
|
} : {
|
|
1236
1271
|
ok: !0
|
|
1237
1272
|
} : t;
|
|
@@ -1247,7 +1282,7 @@ class Et {
|
|
|
1247
1282
|
const t = await this.client.request(pt, e);
|
|
1248
1283
|
return t.ok ? t.data.sendVerificationCode ? {
|
|
1249
1284
|
ok: !1,
|
|
1250
|
-
error:
|
|
1285
|
+
error: m(t.data.sendVerificationCode.__typename)
|
|
1251
1286
|
} : {
|
|
1252
1287
|
ok: !0
|
|
1253
1288
|
} : t;
|
|
@@ -1256,25 +1291,25 @@ class Et {
|
|
|
1256
1291
|
const t = await this.client.request(dt, e);
|
|
1257
1292
|
return t.ok ? t.data.verifyMobileNumber ? {
|
|
1258
1293
|
ok: !1,
|
|
1259
|
-
error:
|
|
1294
|
+
error: m(t.data.verifyMobileNumber.__typename)
|
|
1260
1295
|
} : {
|
|
1261
1296
|
ok: !0
|
|
1262
1297
|
} : t;
|
|
1263
1298
|
}
|
|
1264
1299
|
async createMemberVerification(e) {
|
|
1265
|
-
const t = await this.client.request(
|
|
1300
|
+
const t = await this.client.request(mt, e);
|
|
1266
1301
|
return t.ok ? t.data.createMemberVerification ? {
|
|
1267
1302
|
ok: !1,
|
|
1268
|
-
error:
|
|
1303
|
+
error: m(t.data.createMemberVerification.__typename)
|
|
1269
1304
|
} : {
|
|
1270
1305
|
ok: !0
|
|
1271
1306
|
} : t;
|
|
1272
1307
|
}
|
|
1273
1308
|
async updateMemberVerification(e) {
|
|
1274
|
-
const t = await this.client.request(
|
|
1309
|
+
const t = await this.client.request(ut, e);
|
|
1275
1310
|
return t.ok ? t.data.updateMemberVerification ? {
|
|
1276
1311
|
ok: !1,
|
|
1277
|
-
error:
|
|
1312
|
+
error: m(t.data.updateMemberVerification.__typename)
|
|
1278
1313
|
} : {
|
|
1279
1314
|
ok: !0
|
|
1280
1315
|
} : t;
|
|
@@ -1300,7 +1335,7 @@ class Et {
|
|
|
1300
1335
|
const t = await this.client.request(nt, e);
|
|
1301
1336
|
return t.ok ? t.data.registerMayaMemberAccount ? {
|
|
1302
1337
|
ok: !1,
|
|
1303
|
-
error:
|
|
1338
|
+
error: m(t.data.registerMayaMemberAccount.__typename)
|
|
1304
1339
|
} : {
|
|
1305
1340
|
ok: !0
|
|
1306
1341
|
} : t;
|
|
@@ -1316,7 +1351,7 @@ class Et {
|
|
|
1316
1351
|
const t = await this.client.request(bt, e);
|
|
1317
1352
|
return t.ok ? t.data.updateReferralCode ? {
|
|
1318
1353
|
ok: !1,
|
|
1319
|
-
error:
|
|
1354
|
+
error: m(t.data.updateReferralCode.__typename)
|
|
1320
1355
|
} : {
|
|
1321
1356
|
ok: !0
|
|
1322
1357
|
} : t;
|
|
@@ -1372,7 +1407,7 @@ class St {
|
|
|
1372
1407
|
data: a
|
|
1373
1408
|
} : a.code === "ACCOUNT_BLACKLISTED" ? {
|
|
1374
1409
|
ok: !1,
|
|
1375
|
-
error:
|
|
1410
|
+
error: m("AccountBlacklisted")
|
|
1376
1411
|
} : {
|
|
1377
1412
|
ok: !1,
|
|
1378
1413
|
error: h(r.status)
|
|
@@ -1401,7 +1436,7 @@ class St {
|
|
|
1401
1436
|
data: a
|
|
1402
1437
|
} : r.status === 401 || r.status === 403 ? {
|
|
1403
1438
|
ok: !1,
|
|
1404
|
-
error:
|
|
1439
|
+
error: m("InvalidTokenOrSecretAnswer")
|
|
1405
1440
|
} : {
|
|
1406
1441
|
ok: !1,
|
|
1407
1442
|
error: h(r.status)
|
|
@@ -1428,10 +1463,10 @@ class St {
|
|
|
1428
1463
|
data: a
|
|
1429
1464
|
} : a.code === "ACCOUNT_BLACKLISTED" ? {
|
|
1430
1465
|
ok: !1,
|
|
1431
|
-
error:
|
|
1466
|
+
error: m("AccountBlacklisted")
|
|
1432
1467
|
} : r.status === 403 || r.status === 401 ? {
|
|
1433
1468
|
ok: !1,
|
|
1434
|
-
error:
|
|
1469
|
+
error: m("InvalidToken")
|
|
1435
1470
|
} : {
|
|
1436
1471
|
ok: !1,
|
|
1437
1472
|
error: h(r.status)
|
|
@@ -1495,7 +1530,7 @@ class St {
|
|
|
1495
1530
|
}
|
|
1496
1531
|
}
|
|
1497
1532
|
}
|
|
1498
|
-
class
|
|
1533
|
+
class kt {
|
|
1499
1534
|
constructor(e) {
|
|
1500
1535
|
d(this, "url");
|
|
1501
1536
|
d(this, "siteId");
|
|
@@ -1510,22 +1545,22 @@ class Ct {
|
|
|
1510
1545
|
} : e;
|
|
1511
1546
|
}
|
|
1512
1547
|
async games(e) {
|
|
1513
|
-
var a, s, c,
|
|
1548
|
+
var a, s, c, u, l, f, w, p, _, v, M, R, N, b, I, D, E, P, $, x, S, G, O, W;
|
|
1514
1549
|
const t = new URLSearchParams();
|
|
1515
|
-
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), (
|
|
1550
|
+
e != null && e.first && t.set("first", e.first.toString()), e != null && e.after && t.set("after", e.after), e != null && e.search && t.set("search", e.search), (s = (a = e == null ? void 0 : e.filter) == null ? void 0 : a.type) != null && s.equal && t.set("filter[type][eq]", e.filter.type.equal), (u = (c = e == null ? void 0 : e.filter) == null ? void 0 : c.type) != null && u.notEqual && t.set("filter[type][neq]", e.filter.type.notEqual), (f = (l = e == null ? void 0 : e.filter) == null ? void 0 : l.type) != null && f.in && t.set("filter[type][in]", e.filter.type.in.join(",")), (p = (w = e == null ? void 0 : e.filter) == null ? void 0 : w.type) != null && p.notIn && t.set("filter[type][nin]", e.filter.type.notIn.join(",")), (v = (_ = e == null ? void 0 : e.filter) == null ? void 0 : _.provider) != null && v.equal && t.set("filter[provider][eq]", e.filter.provider.equal), (R = (M = e == null ? void 0 : e.filter) == null ? void 0 : M.provider) != null && R.notEqual && t.set("filter[provider][neq]", e.filter.provider.notEqual), (b = (N = e == null ? void 0 : e.filter) == null ? void 0 : N.provider) != null && b.in && t.set("filter[provider][in]", e.filter.provider.in.join(",")), (D = (I = e == null ? void 0 : e.filter) == null ? void 0 : I.provider) != null && D.notIn && t.set("filter[provider][nin]", e.filter.provider.notIn.join(",")), (P = (E = e == null ? void 0 : e.filter) == null ? void 0 : E.tags) != null && P.equal && t.set("filter[tags][eq]", e.filter.tags.equal.toLowerCase()), (x = ($ = e == null ? void 0 : e.filter) == null ? void 0 : $.tags) != null && x.notEqual && t.set("filter[tags][neq]", e.filter.tags.notEqual.toLowerCase()), (G = (S = e == null ? void 0 : e.filter) == null ? void 0 : S.tags) != null && G.in && t.set(
|
|
1516
1551
|
"filter[tags][in]",
|
|
1517
|
-
e.filter.tags.in.map((
|
|
1518
|
-
), (
|
|
1552
|
+
e.filter.tags.in.map((C) => C.toLowerCase()).join(",")
|
|
1553
|
+
), (W = (O = e == null ? void 0 : e.filter) == null ? void 0 : O.tags) != null && W.notIn && t.set(
|
|
1519
1554
|
"filter[tags][nin]",
|
|
1520
|
-
e.filter.tags.notIn.map((
|
|
1555
|
+
e.filter.tags.notIn.map((C) => C.toLowerCase()).join(",")
|
|
1521
1556
|
);
|
|
1522
1557
|
const r = await this.getJson("/games", t);
|
|
1523
1558
|
return r.ok ? {
|
|
1524
1559
|
ok: !0,
|
|
1525
1560
|
data: {
|
|
1526
|
-
edges: r.data.data.map((
|
|
1527
|
-
node:
|
|
1528
|
-
cursor:
|
|
1561
|
+
edges: r.data.data.map((C) => ({
|
|
1562
|
+
node: C,
|
|
1563
|
+
cursor: C.cursor
|
|
1529
1564
|
})),
|
|
1530
1565
|
totalCount: r.data.totalCount ?? 0,
|
|
1531
1566
|
pageInfo: {
|
|
@@ -1573,7 +1608,7 @@ class Ct {
|
|
|
1573
1608
|
}
|
|
1574
1609
|
}
|
|
1575
1610
|
}
|
|
1576
|
-
class
|
|
1611
|
+
class Tt {
|
|
1577
1612
|
constructor(e) {
|
|
1578
1613
|
d(this, "client");
|
|
1579
1614
|
this.client = e;
|
|
@@ -1589,13 +1624,13 @@ class kt {
|
|
|
1589
1624
|
const t = await this.client.upload(ve, e);
|
|
1590
1625
|
return t.ok ? t.data.uploadPrivateImageFile ? {
|
|
1591
1626
|
ok: !1,
|
|
1592
|
-
error:
|
|
1627
|
+
error: m(t.data.uploadPrivateImageFile.__typename)
|
|
1593
1628
|
} : {
|
|
1594
1629
|
ok: !0
|
|
1595
1630
|
} : t;
|
|
1596
1631
|
}
|
|
1597
1632
|
}
|
|
1598
|
-
class
|
|
1633
|
+
class _t {
|
|
1599
1634
|
constructor(e) {
|
|
1600
1635
|
d(this, "client");
|
|
1601
1636
|
this.client = e;
|
|
@@ -1614,7 +1649,7 @@ class Tt {
|
|
|
1614
1649
|
const t = await this.client.request(be, e);
|
|
1615
1650
|
return t.ok ? t.data.createGameSession ? {
|
|
1616
1651
|
ok: !1,
|
|
1617
|
-
error:
|
|
1652
|
+
error: m(t.data.createGameSession.__typename)
|
|
1618
1653
|
} : {
|
|
1619
1654
|
ok: !0
|
|
1620
1655
|
} : t;
|
|
@@ -1632,7 +1667,7 @@ class Tt {
|
|
|
1632
1667
|
} : t;
|
|
1633
1668
|
}
|
|
1634
1669
|
}
|
|
1635
|
-
class
|
|
1670
|
+
class vt {
|
|
1636
1671
|
constructor(e) {
|
|
1637
1672
|
d(this, "client");
|
|
1638
1673
|
this.client = e;
|
|
@@ -1645,7 +1680,7 @@ class _t {
|
|
|
1645
1680
|
} : e;
|
|
1646
1681
|
}
|
|
1647
1682
|
}
|
|
1648
|
-
class
|
|
1683
|
+
class Mt {
|
|
1649
1684
|
constructor(e) {
|
|
1650
1685
|
d(this, "client");
|
|
1651
1686
|
this.client = e;
|
|
@@ -1670,7 +1705,7 @@ class vt {
|
|
|
1670
1705
|
}
|
|
1671
1706
|
async depositRecords(e) {
|
|
1672
1707
|
const t = await this.client.request(
|
|
1673
|
-
|
|
1708
|
+
We,
|
|
1674
1709
|
e
|
|
1675
1710
|
);
|
|
1676
1711
|
return t.ok ? { ok: t.ok, data: t.data.member.depositRecords } : t;
|
|
@@ -1697,8 +1732,12 @@ class vt {
|
|
|
1697
1732
|
);
|
|
1698
1733
|
return t.ok ? { ok: t.ok, data: t.data.member.referrals } : t;
|
|
1699
1734
|
}
|
|
1735
|
+
async referralCommissions(e) {
|
|
1736
|
+
const t = await this.client.request(Ct, e);
|
|
1737
|
+
return t.ok ? { ok: t.ok, data: t.data.member.referralCommissions } : t;
|
|
1738
|
+
}
|
|
1700
1739
|
}
|
|
1701
|
-
class
|
|
1740
|
+
class Rt {
|
|
1702
1741
|
constructor(e) {
|
|
1703
1742
|
d(this, "url");
|
|
1704
1743
|
this.url = e.url;
|
|
@@ -1738,7 +1777,7 @@ class Nt {
|
|
|
1738
1777
|
const t = await this.client.request(Ze, e);
|
|
1739
1778
|
return t.ok ? t.data.claimCashbackBonus ? {
|
|
1740
1779
|
ok: !1,
|
|
1741
|
-
error:
|
|
1780
|
+
error: m(t.data.claimCashbackBonus.__typename)
|
|
1742
1781
|
} : {
|
|
1743
1782
|
ok: !0
|
|
1744
1783
|
} : {
|
|
@@ -1765,7 +1804,7 @@ class Nt {
|
|
|
1765
1804
|
const t = await this.client.request(qe, e);
|
|
1766
1805
|
return t.ok ? t.data.createGCashDeposit ? {
|
|
1767
1806
|
ok: !1,
|
|
1768
|
-
error:
|
|
1807
|
+
error: m(t.data.createGCashDeposit.__typename)
|
|
1769
1808
|
} : {
|
|
1770
1809
|
ok: !0
|
|
1771
1810
|
} : t;
|
|
@@ -1774,7 +1813,7 @@ class Nt {
|
|
|
1774
1813
|
const t = await this.client.request(Be, e);
|
|
1775
1814
|
return t.ok ? t.data.createMayaDeposit ? {
|
|
1776
1815
|
ok: !1,
|
|
1777
|
-
error:
|
|
1816
|
+
error: m(t.data.createMayaDeposit.__typename)
|
|
1778
1817
|
} : {
|
|
1779
1818
|
ok: !0
|
|
1780
1819
|
} : t;
|
|
@@ -1783,7 +1822,7 @@ class Nt {
|
|
|
1783
1822
|
const t = await this.client.request(Fe, e);
|
|
1784
1823
|
return t.ok ? t.data.createMayaAppDeposit ? {
|
|
1785
1824
|
ok: !1,
|
|
1786
|
-
error:
|
|
1825
|
+
error: m(t.data.createMayaAppDeposit.__typename)
|
|
1787
1826
|
} : {
|
|
1788
1827
|
ok: !0
|
|
1789
1828
|
} : t;
|
|
@@ -1792,7 +1831,7 @@ class Nt {
|
|
|
1792
1831
|
const t = await this.client.request($e, e);
|
|
1793
1832
|
return t.ok ? t.data.createGCashWithdrawal ? {
|
|
1794
1833
|
ok: !1,
|
|
1795
|
-
error:
|
|
1834
|
+
error: m(t.data.createGCashWithdrawal.__typename)
|
|
1796
1835
|
} : {
|
|
1797
1836
|
ok: !0
|
|
1798
1837
|
} : t;
|
|
@@ -1801,7 +1840,7 @@ class Nt {
|
|
|
1801
1840
|
const t = await this.client.request(xe, e);
|
|
1802
1841
|
return t.ok ? t.data.createMayaWithdrawal ? {
|
|
1803
1842
|
ok: !1,
|
|
1804
|
-
error:
|
|
1843
|
+
error: m(t.data.createMayaWithdrawal.__typename)
|
|
1805
1844
|
} : {
|
|
1806
1845
|
ok: !0
|
|
1807
1846
|
} : t;
|
|
@@ -1810,7 +1849,7 @@ class Nt {
|
|
|
1810
1849
|
const t = await this.client.request(Ge, e);
|
|
1811
1850
|
return t.ok ? t.data.createMayaAppWithdrawal ? {
|
|
1812
1851
|
ok: !1,
|
|
1813
|
-
error:
|
|
1852
|
+
error: m(t.data.createMayaAppWithdrawal.__typename)
|
|
1814
1853
|
} : {
|
|
1815
1854
|
ok: !0
|
|
1816
1855
|
} : t;
|
|
@@ -1819,26 +1858,26 @@ class Nt {
|
|
|
1819
1858
|
const t = await this.client.request(Ue, e);
|
|
1820
1859
|
return t.ok ? t.data.createBankWithdrawal ? {
|
|
1821
1860
|
ok: !1,
|
|
1822
|
-
error:
|
|
1861
|
+
error: m(t.data.createBankWithdrawal.__typename)
|
|
1823
1862
|
} : {
|
|
1824
1863
|
ok: !0
|
|
1825
1864
|
} : t;
|
|
1826
1865
|
}
|
|
1827
1866
|
async remainingDailyWithdrawalsCount() {
|
|
1828
1867
|
const e = await this.client.request(
|
|
1829
|
-
|
|
1868
|
+
Oe
|
|
1830
1869
|
);
|
|
1831
1870
|
return e.ok ? { ok: e.ok, data: e.data.remainingDailyWithdrawalsCount } : e;
|
|
1832
1871
|
}
|
|
1833
1872
|
async pointsWallet() {
|
|
1834
|
-
const e = await this.client.request(
|
|
1873
|
+
const e = await this.client.request(Re);
|
|
1835
1874
|
return e.ok ? { ok: e.ok, data: e.data.pointsWallet } : e;
|
|
1836
1875
|
}
|
|
1837
1876
|
async pointsToCashConversion(e) {
|
|
1838
|
-
const t = await this.client.request(
|
|
1877
|
+
const t = await this.client.request(Ne, e);
|
|
1839
1878
|
return t.ok ? t.data.pointsToCashConversion ? {
|
|
1840
1879
|
ok: !1,
|
|
1841
|
-
error:
|
|
1880
|
+
error: m(t.data.pointsToCashConversion.__typename)
|
|
1842
1881
|
} : {
|
|
1843
1882
|
ok: !0
|
|
1844
1883
|
} : t;
|
|
@@ -1861,7 +1900,7 @@ class Nt {
|
|
|
1861
1900
|
const t = await this.client.request(be, e);
|
|
1862
1901
|
return t.ok ? t.data.createGameSession ? {
|
|
1863
1902
|
ok: !1,
|
|
1864
|
-
error:
|
|
1903
|
+
error: m(t.data.createGameSession.__typename)
|
|
1865
1904
|
} : {
|
|
1866
1905
|
ok: !0
|
|
1867
1906
|
} : t;
|
|
@@ -1896,18 +1935,18 @@ class Nt {
|
|
|
1896
1935
|
} : e;
|
|
1897
1936
|
}
|
|
1898
1937
|
}
|
|
1899
|
-
function
|
|
1938
|
+
function It(o, e, t) {
|
|
1900
1939
|
return o < e ? e : o > t ? t : o;
|
|
1901
1940
|
}
|
|
1902
1941
|
function H(o) {
|
|
1903
1942
|
return Object.prototype.toString.call(o) === "[object Object]" && Object(o) === o;
|
|
1904
1943
|
}
|
|
1905
|
-
function
|
|
1944
|
+
function Dt(o) {
|
|
1906
1945
|
const e = [];
|
|
1907
1946
|
function t(r, a = []) {
|
|
1908
1947
|
for (const s in r) {
|
|
1909
1948
|
const c = r[s];
|
|
1910
|
-
H(c) ? t(c, [...a, s]) : Array.isArray(c) ? t(
|
|
1949
|
+
H(c) ? t(c, [...a, s]) : Array.isArray(c) ? t(Pt(c), [...a, s]) : e.push({
|
|
1911
1950
|
key: [...a, s],
|
|
1912
1951
|
value: c
|
|
1913
1952
|
});
|
|
@@ -1915,7 +1954,7 @@ function It(o) {
|
|
|
1915
1954
|
}
|
|
1916
1955
|
return t(o), e;
|
|
1917
1956
|
}
|
|
1918
|
-
function
|
|
1957
|
+
function Pt(o) {
|
|
1919
1958
|
return o.reduce((e, t, r) => (e[r] = t, e), {});
|
|
1920
1959
|
}
|
|
1921
1960
|
class U {
|
|
@@ -1955,13 +1994,13 @@ class U {
|
|
|
1955
1994
|
return await this.exec(s);
|
|
1956
1995
|
}
|
|
1957
1996
|
async exec(e) {
|
|
1958
|
-
var t, r, a, s, c,
|
|
1997
|
+
var t, r, a, s, c, u;
|
|
1959
1998
|
try {
|
|
1960
1999
|
const l = await fetch(e);
|
|
1961
2000
|
if (!l.ok)
|
|
1962
2001
|
return { ok: !1, error: h(l.status) };
|
|
1963
2002
|
const f = await l.json(), w = f.data, p = (t = f.errors) == null ? void 0 : t.at(0);
|
|
1964
|
-
return p ? ((r = p.extensions) == null ? void 0 : r.code) === "FORBIDDEN" || ((a = p.extensions) == null ? void 0 : a.code) === "ACCESS_TOKEN_EXPIRED" ? { ok: !1, error: h(403, p.message) } : ((s = p.extensions) == null ? void 0 : s.code) === "UNAUTHORIZED" ? { ok: !1, error: h(401, p.message) } : ((c = p.extensions) == null ? void 0 : c.code) === "BAD_USER_INPUT" || ((
|
|
2003
|
+
return p ? ((r = p.extensions) == null ? void 0 : r.code) === "FORBIDDEN" || ((a = p.extensions) == null ? void 0 : a.code) === "ACCESS_TOKEN_EXPIRED" ? { ok: !1, error: h(403, p.message) } : ((s = p.extensions) == null ? void 0 : s.code) === "UNAUTHORIZED" ? { ok: !1, error: h(401, p.message) } : ((c = p.extensions) == null ? void 0 : c.code) === "BAD_USER_INPUT" || ((u = p.extensions) == null ? void 0 : u.code) === "BAD_REQUEST" ? { ok: !1, error: h(400, p.message) } : {
|
|
1965
2004
|
ok: !1,
|
|
1966
2005
|
error: h(500, p.message)
|
|
1967
2006
|
} : {
|
|
@@ -1982,7 +2021,7 @@ class U {
|
|
|
1982
2021
|
return t;
|
|
1983
2022
|
}
|
|
1984
2023
|
createUploadBody(e, t) {
|
|
1985
|
-
const r =
|
|
2024
|
+
const r = Dt(t).filter(
|
|
1986
2025
|
(c) => c.value instanceof File || c.value instanceof Blob
|
|
1987
2026
|
), a = new FormData();
|
|
1988
2027
|
a.append(
|
|
@@ -1993,10 +2032,10 @@ class U {
|
|
|
1993
2032
|
})
|
|
1994
2033
|
);
|
|
1995
2034
|
const s = {};
|
|
1996
|
-
return r.forEach((c,
|
|
1997
|
-
s[
|
|
1998
|
-
}), a.append("map", JSON.stringify(s)), r.forEach((c,
|
|
1999
|
-
a.append(
|
|
2035
|
+
return r.forEach((c, u) => {
|
|
2036
|
+
s[u.toString()] = [`variables.${c.key.join(".")}`];
|
|
2037
|
+
}), a.append("map", JSON.stringify(s)), r.forEach((c, u) => {
|
|
2038
|
+
a.append(u.toString(), c.value);
|
|
2000
2039
|
}), a;
|
|
2001
2040
|
}
|
|
2002
2041
|
}
|
|
@@ -2004,7 +2043,7 @@ async function y(o) {
|
|
|
2004
2043
|
const e = new TextEncoder().encode(o), t = await crypto.subtle.digest("SHA-256", e);
|
|
2005
2044
|
return Array.from(new Uint8Array(t)).map((s) => s.toString(16).padStart(2, "0")).join("");
|
|
2006
2045
|
}
|
|
2007
|
-
class
|
|
2046
|
+
class Ee {
|
|
2008
2047
|
constructor(e) {
|
|
2009
2048
|
d(this, "enabled");
|
|
2010
2049
|
this.enabled = (e == null ? void 0 : e.enabled) ?? !0;
|
|
@@ -2036,7 +2075,7 @@ function B(o, e) {
|
|
|
2036
2075
|
function we(o, e) {
|
|
2037
2076
|
return o.getTime() > e.getTime();
|
|
2038
2077
|
}
|
|
2039
|
-
function
|
|
2078
|
+
function Se(o) {
|
|
2040
2079
|
return new Promise((e) => {
|
|
2041
2080
|
setTimeout(e, o);
|
|
2042
2081
|
});
|
|
@@ -2048,9 +2087,9 @@ function ye(o, e) {
|
|
|
2048
2087
|
maxAttempt: a = 3
|
|
2049
2088
|
/**/
|
|
2050
2089
|
} = e;
|
|
2051
|
-
async function s(c,
|
|
2052
|
-
const l =
|
|
2053
|
-
return t(f) ? f : l > 1 ? (await
|
|
2090
|
+
async function s(c, u) {
|
|
2091
|
+
const l = u ?? a, f = await o(...c);
|
|
2092
|
+
return t(f) ? f : l > 1 ? (await Se(r * ((a - l) / 2)), s(c, l - 1)) : f;
|
|
2054
2093
|
}
|
|
2055
2094
|
return async (...c) => await s(c);
|
|
2056
2095
|
}
|
|
@@ -2058,14 +2097,14 @@ function F(o, e) {
|
|
|
2058
2097
|
const t = j(o);
|
|
2059
2098
|
return t.setMinutes(t.getMinutes() - e), t;
|
|
2060
2099
|
}
|
|
2061
|
-
class
|
|
2100
|
+
class $t {
|
|
2062
2101
|
constructor(e) {
|
|
2063
2102
|
d(this, "logger");
|
|
2064
2103
|
d(this, "storageKey", "session");
|
|
2065
2104
|
d(this, "authService");
|
|
2066
2105
|
d(this, "walletService");
|
|
2067
2106
|
d(this, "_refreshing", !1);
|
|
2068
|
-
this.authService = e.authService, this.walletService = e.walletService, this.logger = new
|
|
2107
|
+
this.authService = e.authService, this.walletService = e.walletService, this.logger = new Ee({
|
|
2069
2108
|
enabled: e.logs ?? !1
|
|
2070
2109
|
});
|
|
2071
2110
|
}
|
|
@@ -2184,7 +2223,7 @@ class Pt {
|
|
|
2184
2223
|
data: null
|
|
2185
2224
|
};
|
|
2186
2225
|
if (this.refreshing)
|
|
2187
|
-
return await
|
|
2226
|
+
return await Se(1e3), await this.get();
|
|
2188
2227
|
const e = window.localStorage.getItem(this.storageKey);
|
|
2189
2228
|
if (!e)
|
|
2190
2229
|
return {
|
|
@@ -2285,11 +2324,11 @@ function n(o, e) {
|
|
|
2285
2324
|
}
|
|
2286
2325
|
return e;
|
|
2287
2326
|
}
|
|
2288
|
-
class
|
|
2327
|
+
class xt {
|
|
2289
2328
|
constructor(e) {
|
|
2290
2329
|
d(this, "staticService");
|
|
2291
2330
|
const t = (e == null ? void 0 : e.environment) === "development";
|
|
2292
|
-
this.staticService = new
|
|
2331
|
+
this.staticService = new Rt({
|
|
2293
2332
|
url: t ? "https://static.development.opexa.io" : "https://static.opexa.io"
|
|
2294
2333
|
});
|
|
2295
2334
|
}
|
|
@@ -2318,8 +2357,8 @@ class $t {
|
|
|
2318
2357
|
pointsWallet: this.pointsWallet.bind(this),
|
|
2319
2358
|
pointsWalletTransaction: this.pointsWalletTransaction.bind(this),
|
|
2320
2359
|
activityRecord: this.activityRecord.bind(this),
|
|
2321
|
-
|
|
2322
|
-
|
|
2360
|
+
referral: this.referral.bind(this),
|
|
2361
|
+
referralCommission: this.referralCommission.bind(this)
|
|
2323
2362
|
};
|
|
2324
2363
|
}
|
|
2325
2364
|
site(e) {
|
|
@@ -2332,7 +2371,7 @@ class $t {
|
|
|
2332
2371
|
return g(t);
|
|
2333
2372
|
}
|
|
2334
2373
|
platform(e) {
|
|
2335
|
-
var t, r, a, s, c,
|
|
2374
|
+
var t, r, a, s, c, u, l, f, w, p, _, v, M, R, N, b, I, D, E, P, $, x, S, G, O, W, C, Q, K, J, z, X, Z, ee, te, re, ae, oe, ne, ie, se, ce, de, me, ue, le, pe, fe, he;
|
|
2336
2375
|
return {
|
|
2337
2376
|
paymentSettings: {
|
|
2338
2377
|
minimumFirstDepositAmount: n(e.minimumFirstDepositAmount),
|
|
@@ -2344,7 +2383,7 @@ class $t {
|
|
|
2344
2383
|
webEnabled: ((a = e.bankDepositGatewaySettings) == null ? void 0 : a.webEnabled) ?? !1,
|
|
2345
2384
|
mobileWebEnabled: ((s = e.bankDepositGatewaySettings) == null ? void 0 : s.mobileWebEnabled) ?? !1,
|
|
2346
2385
|
minimumAmount: n((c = e.bankDepositGatewaySettings) == null ? void 0 : c.minimumAmount),
|
|
2347
|
-
maximumAmount: n((
|
|
2386
|
+
maximumAmount: n((u = e.bankDepositGatewaySettings) == null ? void 0 : u.maximumAmount)
|
|
2348
2387
|
},
|
|
2349
2388
|
gcash: {
|
|
2350
2389
|
androidEnabled: ((l = e.gcashDepositGatewaySettings) == null ? void 0 : l.androidEnabled) ?? !1,
|
|
@@ -2356,26 +2395,26 @@ class $t {
|
|
|
2356
2395
|
},
|
|
2357
2396
|
maya: {
|
|
2358
2397
|
androidEnabled: ((M = e.mayaDepositGatewaySettings) == null ? void 0 : M.androidEnabled) ?? !1,
|
|
2359
|
-
iosEnabled: ((
|
|
2360
|
-
webEnabled: ((
|
|
2398
|
+
iosEnabled: ((R = e.mayaDepositGatewaySettings) == null ? void 0 : R.iosEnabled) ?? !1,
|
|
2399
|
+
webEnabled: ((N = e.mayaDepositGatewaySettings) == null ? void 0 : N.webEnabled) ?? !1,
|
|
2361
2400
|
mobileWebEnabled: ((b = e.mayaDepositGatewaySettings) == null ? void 0 : b.mobileWebEnabled) ?? !1,
|
|
2362
2401
|
minimumAmount: n((I = e.mayaDepositGatewaySettings) == null ? void 0 : I.minimumAmount),
|
|
2363
2402
|
maximumAmount: n((D = e.mayaDepositGatewaySettings) == null ? void 0 : D.maximumAmount)
|
|
2364
2403
|
},
|
|
2365
2404
|
mayaApp: {
|
|
2366
|
-
androidEnabled: ((
|
|
2405
|
+
androidEnabled: ((E = e.mayaAppDepositGatewaySettings) == null ? void 0 : E.androidEnabled) ?? !1,
|
|
2367
2406
|
iosEnabled: ((P = e.mayaAppDepositGatewaySettings) == null ? void 0 : P.iosEnabled) ?? !1,
|
|
2368
2407
|
webEnabled: (($ = e.mayaAppDepositGatewaySettings) == null ? void 0 : $.webEnabled) ?? !1,
|
|
2369
2408
|
mobileWebEnabled: ((x = e.mayaAppDepositGatewaySettings) == null ? void 0 : x.mobileWebEnabled) ?? !1,
|
|
2370
|
-
minimumAmount: n((
|
|
2409
|
+
minimumAmount: n((S = e.mayaAppDepositGatewaySettings) == null ? void 0 : S.minimumAmount),
|
|
2371
2410
|
maximumAmount: n((G = e.mayaAppDepositGatewaySettings) == null ? void 0 : G.maximumAmount)
|
|
2372
2411
|
}
|
|
2373
2412
|
},
|
|
2374
2413
|
withdrawalGateway: {
|
|
2375
2414
|
bank: {
|
|
2376
|
-
androidEnabled: ((
|
|
2377
|
-
iosEnabled: ((
|
|
2378
|
-
webEnabled: ((
|
|
2415
|
+
androidEnabled: ((O = e.bankWithdrawalGatewaySettings) == null ? void 0 : O.androidEnabled) ?? !1,
|
|
2416
|
+
iosEnabled: ((W = e.bankWithdrawalGatewaySettings) == null ? void 0 : W.iosEnabled) ?? !1,
|
|
2417
|
+
webEnabled: ((C = e.bankWithdrawalGatewaySettings) == null ? void 0 : C.webEnabled) ?? !1,
|
|
2379
2418
|
mobileWebEnabled: ((Q = e.bankWithdrawalGatewaySettings) == null ? void 0 : Q.mobileWebEnabled) ?? !1,
|
|
2380
2419
|
minimumAmount: n((K = e.bankWithdrawalGatewaySettings) == null ? void 0 : K.minimumAmount),
|
|
2381
2420
|
maximumAmount: n((J = e.bankWithdrawalGatewaySettings) == null ? void 0 : J.maximumAmount)
|
|
@@ -2401,8 +2440,8 @@ class $t {
|
|
|
2401
2440
|
},
|
|
2402
2441
|
mayaApp: {
|
|
2403
2442
|
androidEnabled: ((de = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : de.androidEnabled) ?? !1,
|
|
2404
|
-
iosEnabled: ((
|
|
2405
|
-
webEnabled: ((
|
|
2443
|
+
iosEnabled: ((me = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : me.iosEnabled) ?? !1,
|
|
2444
|
+
webEnabled: ((ue = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ue.webEnabled) ?? !1,
|
|
2406
2445
|
mobileWebEnabled: ((le = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : le.mobileWebEnabled) ?? !1,
|
|
2407
2446
|
minimumAmount: n((pe = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : pe.minimumAmount),
|
|
2408
2447
|
maximumAmount: n(
|
|
@@ -2717,7 +2756,7 @@ class $t {
|
|
|
2717
2756
|
};
|
|
2718
2757
|
return g(t);
|
|
2719
2758
|
}
|
|
2720
|
-
|
|
2759
|
+
referral(e) {
|
|
2721
2760
|
return {
|
|
2722
2761
|
id: e.id,
|
|
2723
2762
|
level: e.level,
|
|
@@ -2728,7 +2767,7 @@ class $t {
|
|
|
2728
2767
|
dateTimeCreated: new Date(e.dateTimeCreated)
|
|
2729
2768
|
};
|
|
2730
2769
|
}
|
|
2731
|
-
|
|
2770
|
+
referralCommission(e) {
|
|
2732
2771
|
return {
|
|
2733
2772
|
id: e.id,
|
|
2734
2773
|
commission: n(e.commission, 0),
|
|
@@ -2745,7 +2784,7 @@ class $t {
|
|
|
2745
2784
|
};
|
|
2746
2785
|
}
|
|
2747
2786
|
}
|
|
2748
|
-
class
|
|
2787
|
+
class qt {
|
|
2749
2788
|
constructor(e) {
|
|
2750
2789
|
d(this, "cmsPortalService");
|
|
2751
2790
|
d(this, "authService");
|
|
@@ -2765,14 +2804,14 @@ class Ot {
|
|
|
2765
2804
|
platform: a,
|
|
2766
2805
|
environment: s,
|
|
2767
2806
|
logs: c
|
|
2768
|
-
} = e,
|
|
2769
|
-
this.transformer = new
|
|
2807
|
+
} = e, u = s === "production";
|
|
2808
|
+
this.transformer = new xt({
|
|
2770
2809
|
environment: s
|
|
2771
|
-
}), this.logger = new
|
|
2810
|
+
}), this.logger = new Ee({
|
|
2772
2811
|
enabled: c ?? !1
|
|
2773
2812
|
});
|
|
2774
|
-
const l =
|
|
2775
|
-
url:
|
|
2813
|
+
const l = u ? "https://auth.opexa.io" : "https://auth.development.opexa.io", f = u ? "https://wallet.opexa.io/graphql" : "https://wallet.development.opexa.io/graphql", w = u ? "https://report.opexa.io/graphql" : "https://report.development.opexa.io/graphql", p = u ? "https://account.opexa.io/graphql" : "https://account.development.opexa.io/graphql", _ = u ? "https://portal.opexa.io/graphql" : "https://portal.development.opexa.io/graphql", v = u ? "https://file.opexa.io/graphql" : "https://file.development.opexa.io/graphql", M = u ? "https://game.opexa.io/graphql" : "https://game.development.opexa.io/graphql", R = u ? "https://portal-api.opexacms.io/v1" : "https://portal-api.development.opexacms.io/v1", N = new kt({
|
|
2814
|
+
url: R,
|
|
2776
2815
|
site: t,
|
|
2777
2816
|
platform: r
|
|
2778
2817
|
}), b = {
|
|
@@ -2783,15 +2822,15 @@ class Ot {
|
|
|
2783
2822
|
"Platform-Code": a
|
|
2784
2823
|
}
|
|
2785
2824
|
}
|
|
2786
|
-
}, I = new
|
|
2825
|
+
}, I = new _t(new U(M, b)), D = new Tt(new U(v, b)), E = new Nt(new U(f, b)), P = new Et(new U(p, b)), $ = new Mt(new U(w, b)), x = new vt(new U(_, b)), S = new St({
|
|
2787
2826
|
url: l,
|
|
2788
2827
|
platform: a
|
|
2789
|
-
}), G = new
|
|
2828
|
+
}), G = new $t({
|
|
2790
2829
|
logs: c,
|
|
2791
|
-
authService:
|
|
2792
|
-
walletService:
|
|
2830
|
+
authService: S,
|
|
2831
|
+
walletService: E
|
|
2793
2832
|
});
|
|
2794
|
-
this.authService =
|
|
2833
|
+
this.authService = S, this.gameService = I, this.fileService = D, this.walletService = E, this.accountService = P, this.reportService = $, this.portalService = x, this.sessionManager = G, this.cmsPortalService = N;
|
|
2795
2834
|
}
|
|
2796
2835
|
get authMiddleware() {
|
|
2797
2836
|
return async (e) => {
|
|
@@ -2848,7 +2887,7 @@ class Ot {
|
|
|
2848
2887
|
await this.sessionManager.destroy();
|
|
2849
2888
|
}
|
|
2850
2889
|
watchSession(e) {
|
|
2851
|
-
const t =
|
|
2890
|
+
const t = It(e.interval ?? 3e4, 3e4, 6e4);
|
|
2852
2891
|
let r = null;
|
|
2853
2892
|
const a = () => setTimeout(async () => {
|
|
2854
2893
|
await this.sessionManager.verify() || await e.onInvalid(), r = a();
|
|
@@ -2906,6 +2945,9 @@ class Ot {
|
|
|
2906
2945
|
data: this.transformer.transform.account(e.data)
|
|
2907
2946
|
} : e;
|
|
2908
2947
|
}
|
|
2948
|
+
/**
|
|
2949
|
+
* @deprecated use `createAccount__next`
|
|
2950
|
+
*/
|
|
2909
2951
|
async createAccount(e) {
|
|
2910
2952
|
const t = e.id ?? k.generate(T.Account).toString(), r = await this.accountService.registerMemberAccount({
|
|
2911
2953
|
input: {
|
|
@@ -3362,12 +3404,12 @@ class Ot {
|
|
|
3362
3404
|
async createGameSession(e) {
|
|
3363
3405
|
const t = e.id ?? k.generate(T.GameSession).toString();
|
|
3364
3406
|
if (e.game.startsWith("SPORTS:")) {
|
|
3365
|
-
const
|
|
3407
|
+
const u = await k.generateFromKey(T.Game, e.game).then(
|
|
3366
3408
|
(f) => f.toString()
|
|
3367
3409
|
), l = await this.gameService.createGameSession({
|
|
3368
3410
|
input: {
|
|
3369
3411
|
id: t,
|
|
3370
|
-
game:
|
|
3412
|
+
game: u
|
|
3371
3413
|
}
|
|
3372
3414
|
});
|
|
3373
3415
|
return l.ok ? { ok: !0, data: { id: t } } : l;
|
|
@@ -3385,7 +3427,7 @@ class Ot {
|
|
|
3385
3427
|
/**/
|
|
3386
3428
|
provider: a,
|
|
3387
3429
|
reference: s
|
|
3388
|
-
} = r.data, c =
|
|
3430
|
+
} = r.data, c = Ut(a) ? await this.walletService.createGameSession({ input: { id: t, game: s } }) : await this.gameService.createGameSession({ input: { id: t, game: s } });
|
|
3389
3431
|
return c.ok ? { ok: !0, data: { id: t } } : c;
|
|
3390
3432
|
}
|
|
3391
3433
|
async endGameSession(e) {
|
|
@@ -3488,7 +3530,22 @@ class Ot {
|
|
|
3488
3530
|
ok: !0,
|
|
3489
3531
|
data: {
|
|
3490
3532
|
referrals: t.data.edges.map(({ cursor: r, node: a }) => ({
|
|
3491
|
-
...this.transformer.transform.
|
|
3533
|
+
...this.transformer.transform.referral(a),
|
|
3534
|
+
cursor: r
|
|
3535
|
+
})),
|
|
3536
|
+
totalCount: t.data.totalCount,
|
|
3537
|
+
hasNextPage: t.data.pageInfo.hasNextPage,
|
|
3538
|
+
endCursor: t.data.pageInfo.endCursor ?? void 0
|
|
3539
|
+
}
|
|
3540
|
+
} : t;
|
|
3541
|
+
}
|
|
3542
|
+
async referralCommissions(e) {
|
|
3543
|
+
const t = await this.reportService.referralCommissions(e);
|
|
3544
|
+
return t.ok ? {
|
|
3545
|
+
ok: !0,
|
|
3546
|
+
data: {
|
|
3547
|
+
referralCommissions: t.data.edges.map(({ cursor: r, node: a }) => ({
|
|
3548
|
+
...this.transformer.transform.referralCommission(a),
|
|
3492
3549
|
cursor: r
|
|
3493
3550
|
})),
|
|
3494
3551
|
totalCount: t.data.totalCount,
|
|
@@ -3498,7 +3555,7 @@ class Ot {
|
|
|
3498
3555
|
} : t;
|
|
3499
3556
|
}
|
|
3500
3557
|
}
|
|
3501
|
-
const
|
|
3558
|
+
const Gt = [
|
|
3502
3559
|
/**/
|
|
3503
3560
|
"RTG",
|
|
3504
3561
|
"DARWIN",
|
|
@@ -3508,12 +3565,12 @@ const xt = [
|
|
|
3508
3565
|
"EVOLUTION_NETENT",
|
|
3509
3566
|
"EVOLUTION_REDTIGER"
|
|
3510
3567
|
];
|
|
3511
|
-
function
|
|
3512
|
-
return
|
|
3568
|
+
function Ut(o) {
|
|
3569
|
+
return Gt.some((e) => e === o);
|
|
3513
3570
|
}
|
|
3514
3571
|
export {
|
|
3515
|
-
|
|
3572
|
+
Lt as ObjectId,
|
|
3516
3573
|
T as ObjectType,
|
|
3517
|
-
|
|
3574
|
+
qt as Sdk
|
|
3518
3575
|
};
|
|
3519
3576
|
//# sourceMappingURL=index.mjs.map
|