@opexa/portal-sdk 0.0.73 → 0.0.74
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 +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +125 -156
- package/dist/index.mjs.map +1 -1
- package/dist/sdk/sdk.d.ts +1 -5
- package/dist/sdk/types.d.ts +1 -2
- package/dist/services/auth.service.d.ts +0 -4
- package/dist/services/types.d.ts +3 -3
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
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
|
-
var
|
|
4
|
-
import { ObjectId as
|
|
3
|
+
var m = (n, e, t) => Te(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { ObjectId as b } from "@opexa/object-id";
|
|
5
5
|
import { ObjectId as Yt } from "@opexa/object-id";
|
|
6
|
-
const
|
|
6
|
+
const A = {
|
|
7
7
|
Account: 8,
|
|
8
8
|
Deposit: 9,
|
|
9
9
|
Withdrawal: 14,
|
|
@@ -865,7 +865,7 @@ const L = o`
|
|
|
865
865
|
}
|
|
866
866
|
}
|
|
867
867
|
}
|
|
868
|
-
`,
|
|
868
|
+
`, mt = o`
|
|
869
869
|
mutation RegisterMayaMemberAccount($input: RegisterMayaMemberAccountInput!) {
|
|
870
870
|
registerMayaMemberAccount(input: $input) {
|
|
871
871
|
... on AccountNameNotAvailableError {
|
|
@@ -873,7 +873,7 @@ const L = o`
|
|
|
873
873
|
}
|
|
874
874
|
}
|
|
875
875
|
}
|
|
876
|
-
`,
|
|
876
|
+
`, dt = o`
|
|
877
877
|
mutation UpdateMemberAccount($input: UpdateMemberAccountInput!) {
|
|
878
878
|
updateMemberAccount(input: $input) {
|
|
879
879
|
... on AccountNameNotAvailableError {
|
|
@@ -1116,7 +1116,7 @@ const L = o`
|
|
|
1116
1116
|
}
|
|
1117
1117
|
}
|
|
1118
1118
|
`;
|
|
1119
|
-
function
|
|
1119
|
+
function d(n) {
|
|
1120
1120
|
return {
|
|
1121
1121
|
name: n,
|
|
1122
1122
|
message: {
|
|
@@ -1173,7 +1173,7 @@ function m(n) {
|
|
|
1173
1173
|
}
|
|
1174
1174
|
class _t {
|
|
1175
1175
|
constructor(e) {
|
|
1176
|
-
|
|
1176
|
+
m(this, "client");
|
|
1177
1177
|
this.client = e;
|
|
1178
1178
|
}
|
|
1179
1179
|
/** aka `Query.self` */
|
|
@@ -1188,7 +1188,7 @@ class _t {
|
|
|
1188
1188
|
const t = await this.client.request(it, e);
|
|
1189
1189
|
return t.ok ? t.data.registerMemberAccount ? {
|
|
1190
1190
|
ok: !1,
|
|
1191
|
-
error:
|
|
1191
|
+
error: d(t.data.registerMemberAccount.__typename)
|
|
1192
1192
|
} : {
|
|
1193
1193
|
ok: !0
|
|
1194
1194
|
} : t;
|
|
@@ -1197,7 +1197,7 @@ class _t {
|
|
|
1197
1197
|
const t = await this.client.request(st, e);
|
|
1198
1198
|
return t.ok ? t.data.registerMemberAccountViaMobile ? {
|
|
1199
1199
|
ok: !1,
|
|
1200
|
-
error:
|
|
1200
|
+
error: d(t.data.registerMemberAccountViaMobile.__typename)
|
|
1201
1201
|
} : {
|
|
1202
1202
|
ok: !0
|
|
1203
1203
|
} : t;
|
|
@@ -1206,16 +1206,16 @@ class _t {
|
|
|
1206
1206
|
const t = await this.client.request(ct, e);
|
|
1207
1207
|
return t.ok ? t.data.registerMemberAccount ? {
|
|
1208
1208
|
ok: !1,
|
|
1209
|
-
error:
|
|
1209
|
+
error: d(t.data.registerMemberAccount.__typename)
|
|
1210
1210
|
} : {
|
|
1211
1211
|
ok: !0
|
|
1212
1212
|
} : t;
|
|
1213
1213
|
}
|
|
1214
1214
|
async updateMemberAccount(e) {
|
|
1215
|
-
const t = await this.client.request(
|
|
1215
|
+
const t = await this.client.request(dt, e);
|
|
1216
1216
|
return t.ok ? t.data.updateMemberAccount ? {
|
|
1217
1217
|
ok: !1,
|
|
1218
|
-
error:
|
|
1218
|
+
error: d(t.data.updateMemberAccount.__typename)
|
|
1219
1219
|
} : {
|
|
1220
1220
|
ok: !0
|
|
1221
1221
|
} : t;
|
|
@@ -1239,7 +1239,7 @@ class _t {
|
|
|
1239
1239
|
);
|
|
1240
1240
|
return t.ok ? t.data.resetPassword ? {
|
|
1241
1241
|
ok: !1,
|
|
1242
|
-
error:
|
|
1242
|
+
error: d(t.data.resetPassword.__typename)
|
|
1243
1243
|
} : {
|
|
1244
1244
|
ok: !0
|
|
1245
1245
|
} : t;
|
|
@@ -1255,7 +1255,7 @@ class _t {
|
|
|
1255
1255
|
const t = await this.client.request(wt, e);
|
|
1256
1256
|
return t.ok ? t.data.sendVerificationCode ? {
|
|
1257
1257
|
ok: !1,
|
|
1258
|
-
error:
|
|
1258
|
+
error: d(t.data.sendVerificationCode.__typename)
|
|
1259
1259
|
} : {
|
|
1260
1260
|
ok: !0
|
|
1261
1261
|
} : t;
|
|
@@ -1264,7 +1264,7 @@ class _t {
|
|
|
1264
1264
|
const t = await this.client.request(pt, e);
|
|
1265
1265
|
return t.ok ? t.data.verifyMobileNumber ? {
|
|
1266
1266
|
ok: !1,
|
|
1267
|
-
error:
|
|
1267
|
+
error: d(t.data.verifyMobileNumber.__typename)
|
|
1268
1268
|
} : {
|
|
1269
1269
|
ok: !0
|
|
1270
1270
|
} : t;
|
|
@@ -1273,7 +1273,7 @@ class _t {
|
|
|
1273
1273
|
const t = await this.client.request(ft, e);
|
|
1274
1274
|
return t.ok ? t.data.createMemberVerification ? {
|
|
1275
1275
|
ok: !1,
|
|
1276
|
-
error:
|
|
1276
|
+
error: d(t.data.createMemberVerification.__typename)
|
|
1277
1277
|
} : {
|
|
1278
1278
|
ok: !0
|
|
1279
1279
|
} : t;
|
|
@@ -1282,7 +1282,7 @@ class _t {
|
|
|
1282
1282
|
const t = await this.client.request(ht, e);
|
|
1283
1283
|
return t.ok ? t.data.updateMemberVerification ? {
|
|
1284
1284
|
ok: !1,
|
|
1285
|
-
error:
|
|
1285
|
+
error: d(t.data.updateMemberVerification.__typename)
|
|
1286
1286
|
} : {
|
|
1287
1287
|
ok: !0
|
|
1288
1288
|
} : t;
|
|
@@ -1305,10 +1305,10 @@ class _t {
|
|
|
1305
1305
|
} : t;
|
|
1306
1306
|
}
|
|
1307
1307
|
async registerMayaMemberAccount(e) {
|
|
1308
|
-
const t = await this.client.request(
|
|
1308
|
+
const t = await this.client.request(mt, e);
|
|
1309
1309
|
return t.ok ? t.data.registerMayaMemberAccount ? {
|
|
1310
1310
|
ok: !1,
|
|
1311
|
-
error:
|
|
1311
|
+
error: d(t.data.registerMayaMemberAccount.__typename)
|
|
1312
1312
|
} : {
|
|
1313
1313
|
ok: !0
|
|
1314
1314
|
} : t;
|
|
@@ -1324,16 +1324,16 @@ class _t {
|
|
|
1324
1324
|
const t = await this.client.request(kt, e);
|
|
1325
1325
|
return t.ok ? t.data.updateReferralCode ? {
|
|
1326
1326
|
ok: !1,
|
|
1327
|
-
error:
|
|
1327
|
+
error: d(t.data.updateReferralCode.__typename)
|
|
1328
1328
|
} : {
|
|
1329
1329
|
ok: !0
|
|
1330
1330
|
} : t;
|
|
1331
1331
|
}
|
|
1332
1332
|
}
|
|
1333
|
-
function
|
|
1333
|
+
function E(n) {
|
|
1334
1334
|
return n.startsWith("+63") ? n : n.startsWith("63") ? `+${n}` : n.startsWith("0") ? `+63${n.substring(1)}` : `+63${n}`;
|
|
1335
1335
|
}
|
|
1336
|
-
function
|
|
1336
|
+
function h(n, e) {
|
|
1337
1337
|
const t = V[n] ? V[n] : V[500];
|
|
1338
1338
|
return {
|
|
1339
1339
|
name: t.name,
|
|
@@ -1351,8 +1351,8 @@ const V = {
|
|
|
1351
1351
|
};
|
|
1352
1352
|
class Tt {
|
|
1353
1353
|
constructor(e) {
|
|
1354
|
-
|
|
1355
|
-
|
|
1354
|
+
m(this, "url");
|
|
1355
|
+
m(this, "platform");
|
|
1356
1356
|
this.url = e.url, this.platform = e.platform;
|
|
1357
1357
|
}
|
|
1358
1358
|
get headers() {
|
|
@@ -1366,7 +1366,7 @@ class Tt {
|
|
|
1366
1366
|
t.set("Authorization", `Basic ${a}`);
|
|
1367
1367
|
}
|
|
1368
1368
|
if (e.mobileNumber) {
|
|
1369
|
-
const a = `${
|
|
1369
|
+
const a = `${E(e.mobileNumber)}:${e.verificationCode}`, s = Buffer.from(a).toString("base64");
|
|
1370
1370
|
console.log(`MobileNumberOTP ${s}`), t.set("Authorization", `MobileNumberOTP ${s}`);
|
|
1371
1371
|
}
|
|
1372
1372
|
e.sessionId && t.set("Authorization", `MayaSession ${e.sessionId}`);
|
|
@@ -1380,15 +1380,15 @@ class Tt {
|
|
|
1380
1380
|
data: a
|
|
1381
1381
|
} : a.code === "ACCOUNT_BLACKLISTED" ? {
|
|
1382
1382
|
ok: !1,
|
|
1383
|
-
error:
|
|
1383
|
+
error: d("AccountBlacklisted")
|
|
1384
1384
|
} : {
|
|
1385
1385
|
ok: !1,
|
|
1386
|
-
error:
|
|
1386
|
+
error: h(r.status)
|
|
1387
1387
|
};
|
|
1388
1388
|
} catch {
|
|
1389
1389
|
return {
|
|
1390
1390
|
ok: !1,
|
|
1391
|
-
error:
|
|
1391
|
+
error: h(500)
|
|
1392
1392
|
};
|
|
1393
1393
|
}
|
|
1394
1394
|
}
|
|
@@ -1409,15 +1409,15 @@ class Tt {
|
|
|
1409
1409
|
data: a
|
|
1410
1410
|
} : r.status === 401 || r.status === 403 ? {
|
|
1411
1411
|
ok: !1,
|
|
1412
|
-
error:
|
|
1412
|
+
error: d("InvalidTokenOrSecretAnswer")
|
|
1413
1413
|
} : {
|
|
1414
1414
|
ok: !1,
|
|
1415
|
-
error:
|
|
1415
|
+
error: h(r.status)
|
|
1416
1416
|
};
|
|
1417
1417
|
} catch {
|
|
1418
1418
|
return {
|
|
1419
1419
|
ok: !1,
|
|
1420
|
-
error:
|
|
1420
|
+
error: h(500)
|
|
1421
1421
|
};
|
|
1422
1422
|
}
|
|
1423
1423
|
}
|
|
@@ -1436,18 +1436,18 @@ class Tt {
|
|
|
1436
1436
|
data: a
|
|
1437
1437
|
} : a.code === "ACCOUNT_BLACKLISTED" ? {
|
|
1438
1438
|
ok: !1,
|
|
1439
|
-
error:
|
|
1439
|
+
error: d("AccountBlacklisted")
|
|
1440
1440
|
} : r.status === 403 || r.status === 401 ? {
|
|
1441
1441
|
ok: !1,
|
|
1442
|
-
error:
|
|
1442
|
+
error: d("InvalidToken")
|
|
1443
1443
|
} : {
|
|
1444
1444
|
ok: !1,
|
|
1445
|
-
error:
|
|
1445
|
+
error: h(r.status)
|
|
1446
1446
|
};
|
|
1447
1447
|
} catch {
|
|
1448
1448
|
return {
|
|
1449
1449
|
ok: !1,
|
|
1450
|
-
error:
|
|
1450
|
+
error: h(500)
|
|
1451
1451
|
};
|
|
1452
1452
|
}
|
|
1453
1453
|
}
|
|
@@ -1459,9 +1459,9 @@ class Tt {
|
|
|
1459
1459
|
method: "DELETE",
|
|
1460
1460
|
headers: t
|
|
1461
1461
|
});
|
|
1462
|
-
return r.ok ? { ok: !0 } : { ok: !1, error:
|
|
1462
|
+
return r.ok ? { ok: !0 } : { ok: !1, error: h(r.status) };
|
|
1463
1463
|
} catch {
|
|
1464
|
-
return { ok: !1, error:
|
|
1464
|
+
return { ok: !1, error: h(500) };
|
|
1465
1465
|
}
|
|
1466
1466
|
}
|
|
1467
1467
|
async verifySession(e) {
|
|
@@ -1476,33 +1476,8 @@ class Tt {
|
|
|
1476
1476
|
return !0;
|
|
1477
1477
|
}
|
|
1478
1478
|
}
|
|
1479
|
-
/**
|
|
1480
|
-
* @deprecated use `sendOtp`
|
|
1481
|
-
*/
|
|
1482
1479
|
async sendVerificationCode(e) {
|
|
1483
|
-
const t =
|
|
1484
|
-
try {
|
|
1485
|
-
const r = await fetch(`${this.url}/sendVerificationCode`, {
|
|
1486
|
-
method: "POST",
|
|
1487
|
-
headers: this.headers,
|
|
1488
|
-
body: JSON.stringify({
|
|
1489
|
-
channel: "SMS",
|
|
1490
|
-
recipient: t
|
|
1491
|
-
})
|
|
1492
|
-
});
|
|
1493
|
-
return r.ok ? { ok: !0 } : {
|
|
1494
|
-
ok: !1,
|
|
1495
|
-
error: f(r.status)
|
|
1496
|
-
};
|
|
1497
|
-
} catch {
|
|
1498
|
-
return {
|
|
1499
|
-
ok: !1,
|
|
1500
|
-
error: f(500)
|
|
1501
|
-
};
|
|
1502
|
-
}
|
|
1503
|
-
}
|
|
1504
|
-
async sendVerificationCode__next(e) {
|
|
1505
|
-
const t = b(e);
|
|
1480
|
+
const t = E(e);
|
|
1506
1481
|
try {
|
|
1507
1482
|
const r = await fetch(`${this.url}/otps`, {
|
|
1508
1483
|
method: "POST",
|
|
@@ -1516,26 +1491,26 @@ class Tt {
|
|
|
1516
1491
|
const a = await r.json();
|
|
1517
1492
|
return {
|
|
1518
1493
|
ok: !1,
|
|
1519
|
-
error:
|
|
1494
|
+
error: h(r.status, a.message)
|
|
1520
1495
|
};
|
|
1521
1496
|
}
|
|
1522
1497
|
return r.ok ? { ok: !0 } : {
|
|
1523
1498
|
ok: !1,
|
|
1524
|
-
error:
|
|
1499
|
+
error: h(r.status)
|
|
1525
1500
|
};
|
|
1526
1501
|
} catch {
|
|
1527
1502
|
return {
|
|
1528
1503
|
ok: !1,
|
|
1529
|
-
error:
|
|
1504
|
+
error: h(500)
|
|
1530
1505
|
};
|
|
1531
1506
|
}
|
|
1532
1507
|
}
|
|
1533
1508
|
}
|
|
1534
1509
|
class vt {
|
|
1535
1510
|
constructor(e) {
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1511
|
+
m(this, "url");
|
|
1512
|
+
m(this, "siteId");
|
|
1513
|
+
m(this, "platformId");
|
|
1539
1514
|
this.url = e.url, this.siteId = e.site, this.platformId = e.platform;
|
|
1540
1515
|
}
|
|
1541
1516
|
async self() {
|
|
@@ -1546,9 +1521,9 @@ class vt {
|
|
|
1546
1521
|
} : e;
|
|
1547
1522
|
}
|
|
1548
1523
|
async games(e) {
|
|
1549
|
-
var a, s, c, u, l,
|
|
1524
|
+
var a, s, c, u, l, f, y, p, T, v, M, N, I, S, R, D, C, P, x, G, _, $, O, W;
|
|
1550
1525
|
const t = new URLSearchParams();
|
|
1551
|
-
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), (
|
|
1526
|
+
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 = (y = e == null ? void 0 : e.filter) == null ? void 0 : y.type) != null && p.notIn && t.set("filter[type][nin]", e.filter.type.notIn.join(",")), (v = (T = e == null ? void 0 : e.filter) == null ? void 0 : T.provider) != null && v.equal && t.set("filter[provider][eq]", e.filter.provider.equal), (N = (M = e == null ? void 0 : e.filter) == null ? void 0 : M.provider) != null && N.notEqual && t.set("filter[provider][neq]", e.filter.provider.notEqual), (S = (I = e == null ? void 0 : e.filter) == null ? void 0 : I.provider) != null && S.in && t.set("filter[provider][in]", e.filter.provider.in.join(",")), (D = (R = e == null ? void 0 : e.filter) == null ? void 0 : R.provider) != null && D.notIn && t.set("filter[provider][nin]", e.filter.provider.notIn.join(",")), (P = (C = e == null ? void 0 : e.filter) == null ? void 0 : C.tags) != null && P.equal && t.set("filter[tags][eq]", e.filter.tags.equal.toLowerCase()), (G = (x = e == null ? void 0 : e.filter) == null ? void 0 : x.tags) != null && G.notEqual && t.set("filter[tags][neq]", e.filter.tags.notEqual.toLowerCase()), ($ = (_ = e == null ? void 0 : e.filter) == null ? void 0 : _.tags) != null && $.in && t.set(
|
|
1552
1527
|
"filter[tags][in]",
|
|
1553
1528
|
e.filter.tags.in.map((k) => k.toLowerCase()).join(",")
|
|
1554
1529
|
), (W = (O = e == null ? void 0 : e.filter) == null ? void 0 : O.tags) != null && W.notIn && t.set(
|
|
@@ -1599,19 +1574,19 @@ class vt {
|
|
|
1599
1574
|
data: await a.json()
|
|
1600
1575
|
} : {
|
|
1601
1576
|
ok: !1,
|
|
1602
|
-
error:
|
|
1577
|
+
error: h(a.status)
|
|
1603
1578
|
};
|
|
1604
1579
|
} catch {
|
|
1605
1580
|
return {
|
|
1606
1581
|
ok: !1,
|
|
1607
|
-
error:
|
|
1582
|
+
error: h(500)
|
|
1608
1583
|
};
|
|
1609
1584
|
}
|
|
1610
1585
|
}
|
|
1611
1586
|
}
|
|
1612
1587
|
class Mt {
|
|
1613
1588
|
constructor(e) {
|
|
1614
|
-
|
|
1589
|
+
m(this, "client");
|
|
1615
1590
|
this.client = e;
|
|
1616
1591
|
}
|
|
1617
1592
|
async file(e) {
|
|
@@ -1625,7 +1600,7 @@ class Mt {
|
|
|
1625
1600
|
const t = await this.client.upload(Me, e);
|
|
1626
1601
|
return t.ok ? t.data.uploadPrivateImageFile ? {
|
|
1627
1602
|
ok: !1,
|
|
1628
|
-
error:
|
|
1603
|
+
error: d(t.data.uploadPrivateImageFile.__typename)
|
|
1629
1604
|
} : {
|
|
1630
1605
|
ok: !0
|
|
1631
1606
|
} : t;
|
|
@@ -1633,7 +1608,7 @@ class Mt {
|
|
|
1633
1608
|
}
|
|
1634
1609
|
class Nt {
|
|
1635
1610
|
constructor(e) {
|
|
1636
|
-
|
|
1611
|
+
m(this, "client");
|
|
1637
1612
|
this.client = e;
|
|
1638
1613
|
}
|
|
1639
1614
|
/** @deprecated */
|
|
@@ -1660,7 +1635,7 @@ class Nt {
|
|
|
1660
1635
|
const t = await this.client.request(Ae, e);
|
|
1661
1636
|
return t.ok ? t.data.createGameSession ? {
|
|
1662
1637
|
ok: !1,
|
|
1663
|
-
error:
|
|
1638
|
+
error: d(t.data.createGameSession.__typename)
|
|
1664
1639
|
} : {
|
|
1665
1640
|
ok: !0
|
|
1666
1641
|
} : t;
|
|
@@ -1669,7 +1644,7 @@ class Nt {
|
|
|
1669
1644
|
const t = await this.client.request(xe, e);
|
|
1670
1645
|
return t.ok ? t.data.endGameSession ? {
|
|
1671
1646
|
ok: !1,
|
|
1672
|
-
error:
|
|
1647
|
+
error: d(t.data.endGameSession.__typename)
|
|
1673
1648
|
} : {
|
|
1674
1649
|
ok: !0
|
|
1675
1650
|
} : t;
|
|
@@ -1677,7 +1652,7 @@ class Nt {
|
|
|
1677
1652
|
}
|
|
1678
1653
|
class It {
|
|
1679
1654
|
constructor(e) {
|
|
1680
|
-
|
|
1655
|
+
m(this, "client");
|
|
1681
1656
|
this.client = e;
|
|
1682
1657
|
}
|
|
1683
1658
|
async latestBetRecords() {
|
|
@@ -1690,7 +1665,7 @@ class It {
|
|
|
1690
1665
|
}
|
|
1691
1666
|
class Rt {
|
|
1692
1667
|
constructor(e) {
|
|
1693
|
-
|
|
1668
|
+
m(this, "client");
|
|
1694
1669
|
this.client = e;
|
|
1695
1670
|
}
|
|
1696
1671
|
async betRecords(e) {
|
|
@@ -1747,7 +1722,7 @@ class Rt {
|
|
|
1747
1722
|
}
|
|
1748
1723
|
class Dt {
|
|
1749
1724
|
constructor(e) {
|
|
1750
|
-
|
|
1725
|
+
m(this, "url");
|
|
1751
1726
|
this.url = e.url;
|
|
1752
1727
|
}
|
|
1753
1728
|
gameThumbnails(e) {
|
|
@@ -1759,7 +1734,7 @@ class Dt {
|
|
|
1759
1734
|
}
|
|
1760
1735
|
class Pt {
|
|
1761
1736
|
constructor(e) {
|
|
1762
|
-
|
|
1737
|
+
m(this, "client");
|
|
1763
1738
|
this.client = e;
|
|
1764
1739
|
}
|
|
1765
1740
|
async promos() {
|
|
@@ -1785,7 +1760,7 @@ class Pt {
|
|
|
1785
1760
|
const t = await this.client.request(rt, e);
|
|
1786
1761
|
return t.ok ? t.data.claimCashbackBonus ? {
|
|
1787
1762
|
ok: !1,
|
|
1788
|
-
error:
|
|
1763
|
+
error: d(t.data.claimCashbackBonus.__typename)
|
|
1789
1764
|
} : {
|
|
1790
1765
|
ok: !0
|
|
1791
1766
|
} : {
|
|
@@ -1812,7 +1787,7 @@ class Pt {
|
|
|
1812
1787
|
const t = await this.client.request(Le, e);
|
|
1813
1788
|
return t.ok ? t.data.createGCashDeposit ? {
|
|
1814
1789
|
ok: !1,
|
|
1815
|
-
error:
|
|
1790
|
+
error: d(t.data.createGCashDeposit.__typename)
|
|
1816
1791
|
} : {
|
|
1817
1792
|
ok: !0
|
|
1818
1793
|
} : t;
|
|
@@ -1821,7 +1796,7 @@ class Pt {
|
|
|
1821
1796
|
const t = await this.client.request(Ve, e);
|
|
1822
1797
|
return t.ok ? t.data.createMayaDeposit ? {
|
|
1823
1798
|
ok: !1,
|
|
1824
|
-
error:
|
|
1799
|
+
error: d(t.data.createMayaDeposit.__typename)
|
|
1825
1800
|
} : {
|
|
1826
1801
|
ok: !0
|
|
1827
1802
|
} : t;
|
|
@@ -1830,7 +1805,7 @@ class Pt {
|
|
|
1830
1805
|
const t = await this.client.request(He, e);
|
|
1831
1806
|
return t.ok ? t.data.createMayaAppDeposit ? {
|
|
1832
1807
|
ok: !1,
|
|
1833
|
-
error:
|
|
1808
|
+
error: d(t.data.createMayaAppDeposit.__typename)
|
|
1834
1809
|
} : {
|
|
1835
1810
|
ok: !0
|
|
1836
1811
|
} : t;
|
|
@@ -1839,7 +1814,7 @@ class Pt {
|
|
|
1839
1814
|
const t = await this.client.request(Ue, e);
|
|
1840
1815
|
return t.ok ? t.data.createGCashWithdrawal ? {
|
|
1841
1816
|
ok: !1,
|
|
1842
|
-
error:
|
|
1817
|
+
error: d(t.data.createGCashWithdrawal.__typename)
|
|
1843
1818
|
} : {
|
|
1844
1819
|
ok: !0
|
|
1845
1820
|
} : t;
|
|
@@ -1848,7 +1823,7 @@ class Pt {
|
|
|
1848
1823
|
const t = await this.client.request(Oe, e);
|
|
1849
1824
|
return t.ok ? t.data.createMayaWithdrawal ? {
|
|
1850
1825
|
ok: !1,
|
|
1851
|
-
error:
|
|
1826
|
+
error: d(t.data.createMayaWithdrawal.__typename)
|
|
1852
1827
|
} : {
|
|
1853
1828
|
ok: !0
|
|
1854
1829
|
} : t;
|
|
@@ -1857,7 +1832,7 @@ class Pt {
|
|
|
1857
1832
|
const t = await this.client.request(We, e);
|
|
1858
1833
|
return t.ok ? t.data.createMayaAppWithdrawal ? {
|
|
1859
1834
|
ok: !1,
|
|
1860
|
-
error:
|
|
1835
|
+
error: d(t.data.createMayaAppWithdrawal.__typename)
|
|
1861
1836
|
} : {
|
|
1862
1837
|
ok: !0
|
|
1863
1838
|
} : t;
|
|
@@ -1866,7 +1841,7 @@ class Pt {
|
|
|
1866
1841
|
const t = await this.client.request(Be, e);
|
|
1867
1842
|
return t.ok ? t.data.createBankWithdrawal ? {
|
|
1868
1843
|
ok: !1,
|
|
1869
|
-
error:
|
|
1844
|
+
error: d(t.data.createBankWithdrawal.__typename)
|
|
1870
1845
|
} : {
|
|
1871
1846
|
ok: !0
|
|
1872
1847
|
} : t;
|
|
@@ -1885,7 +1860,7 @@ class Pt {
|
|
|
1885
1860
|
const t = await this.client.request(Re, e);
|
|
1886
1861
|
return t.ok ? t.data.pointsToCashConversion ? {
|
|
1887
1862
|
ok: !1,
|
|
1888
|
-
error:
|
|
1863
|
+
error: d(t.data.pointsToCashConversion.__typename)
|
|
1889
1864
|
} : {
|
|
1890
1865
|
ok: !0
|
|
1891
1866
|
} : t;
|
|
@@ -1921,7 +1896,7 @@ class Pt {
|
|
|
1921
1896
|
const t = await this.client.request(Ae, e);
|
|
1922
1897
|
return t.ok ? t.data.createGameSession ? {
|
|
1923
1898
|
ok: !1,
|
|
1924
|
-
error:
|
|
1899
|
+
error: d(t.data.createGameSession.__typename)
|
|
1925
1900
|
} : {
|
|
1926
1901
|
ok: !0
|
|
1927
1902
|
} : t;
|
|
@@ -1980,9 +1955,9 @@ function $t(n) {
|
|
|
1980
1955
|
}
|
|
1981
1956
|
class U {
|
|
1982
1957
|
constructor(e, t) {
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1958
|
+
m(this, "url");
|
|
1959
|
+
m(this, "options");
|
|
1960
|
+
m(this, "middlewares");
|
|
1986
1961
|
var a;
|
|
1987
1962
|
const r = new Headers((a = t == null ? void 0 : t.fetchOptions) == null ? void 0 : a.headers);
|
|
1988
1963
|
this.url = e, this.options = { ...t == null ? void 0 : t.fetchOptions, headers: r }, this.middlewares = (t == null ? void 0 : t.middlewares) ?? [];
|
|
@@ -2019,11 +1994,11 @@ class U {
|
|
|
2019
1994
|
try {
|
|
2020
1995
|
const l = await fetch(e);
|
|
2021
1996
|
if (!l.ok)
|
|
2022
|
-
return { ok: !1, error:
|
|
2023
|
-
const
|
|
2024
|
-
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:
|
|
1997
|
+
return { ok: !1, error: h(l.status) };
|
|
1998
|
+
const f = await l.json(), y = f.data, p = (t = f.errors) == null ? void 0 : t.at(0);
|
|
1999
|
+
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) } : {
|
|
2025
2000
|
ok: !1,
|
|
2026
|
-
error:
|
|
2001
|
+
error: h(500, p.message)
|
|
2027
2002
|
} : {
|
|
2028
2003
|
ok: !0,
|
|
2029
2004
|
data: y
|
|
@@ -2031,7 +2006,7 @@ class U {
|
|
|
2031
2006
|
} catch {
|
|
2032
2007
|
return {
|
|
2033
2008
|
ok: !1,
|
|
2034
|
-
error:
|
|
2009
|
+
error: h(500)
|
|
2035
2010
|
};
|
|
2036
2011
|
}
|
|
2037
2012
|
}
|
|
@@ -2066,7 +2041,7 @@ async function w(n) {
|
|
|
2066
2041
|
}
|
|
2067
2042
|
class ke {
|
|
2068
2043
|
constructor(e) {
|
|
2069
|
-
|
|
2044
|
+
m(this, "enabled");
|
|
2070
2045
|
this.enabled = (e == null ? void 0 : e.enabled) ?? !0;
|
|
2071
2046
|
}
|
|
2072
2047
|
info(e) {
|
|
@@ -2109,8 +2084,8 @@ function we(n, e) {
|
|
|
2109
2084
|
/**/
|
|
2110
2085
|
} = e;
|
|
2111
2086
|
async function s(c, u) {
|
|
2112
|
-
const l = u ?? a,
|
|
2113
|
-
return t(
|
|
2087
|
+
const l = u ?? a, f = await n(...c);
|
|
2088
|
+
return t(f) ? f : l > 1 ? (await Ce(r * ((a - l) / 2)), s(c, l - 1)) : f;
|
|
2114
2089
|
}
|
|
2115
2090
|
return async (...c) => await s(c);
|
|
2116
2091
|
}
|
|
@@ -2120,11 +2095,11 @@ function F(n, e) {
|
|
|
2120
2095
|
}
|
|
2121
2096
|
class Ut {
|
|
2122
2097
|
constructor(e) {
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2098
|
+
m(this, "logger");
|
|
2099
|
+
m(this, "storageKey", "session");
|
|
2100
|
+
m(this, "authService");
|
|
2101
|
+
m(this, "walletService");
|
|
2102
|
+
m(this, "_refreshing", !1);
|
|
2128
2103
|
this.authService = e.authService, this.walletService = e.walletService, this.logger = new ke({
|
|
2129
2104
|
enabled: e.logs ?? !1
|
|
2130
2105
|
});
|
|
@@ -2169,13 +2144,13 @@ class Ut {
|
|
|
2169
2144
|
maxAttempt: 5
|
|
2170
2145
|
})();
|
|
2171
2146
|
if (!l.ok) return l;
|
|
2172
|
-
const
|
|
2147
|
+
const f = /* @__PURE__ */ new Date();
|
|
2173
2148
|
return window.localStorage.setItem(
|
|
2174
2149
|
this.storageKey,
|
|
2175
2150
|
JSON.stringify({
|
|
2176
2151
|
...l.data,
|
|
2177
|
-
accessTokenExpiresAt: q(
|
|
2178
|
-
refreshTokenExpiresAt: F(B(
|
|
2152
|
+
accessTokenExpiresAt: q(f, 8).getTime(),
|
|
2153
|
+
refreshTokenExpiresAt: F(B(f, 30), 2).getTime()
|
|
2179
2154
|
})
|
|
2180
2155
|
), {
|
|
2181
2156
|
ok: !0,
|
|
@@ -2347,7 +2322,7 @@ function i(n, e) {
|
|
|
2347
2322
|
}
|
|
2348
2323
|
class Ot {
|
|
2349
2324
|
constructor(e) {
|
|
2350
|
-
|
|
2325
|
+
m(this, "staticService");
|
|
2351
2326
|
const t = (e == null ? void 0 : e.environment) === "development";
|
|
2352
2327
|
this.staticService = new Dt({
|
|
2353
2328
|
url: t ? "https://static.development.opexa.io" : "https://static.opexa.io"
|
|
@@ -2393,7 +2368,7 @@ class Ot {
|
|
|
2393
2368
|
return g(t);
|
|
2394
2369
|
}
|
|
2395
2370
|
platform(e) {
|
|
2396
|
-
var t, r, a, s, c, u, l,
|
|
2371
|
+
var t, r, a, s, c, u, l, f, y, p, T, v, M, N, I, S, R, D, C, P, x, G, _, $, O, W, k, Q, K, J, z, X, Z, ee, te, re, ae, ne, oe, ie, se, ce, me, de, ue, le, pe, fe, he;
|
|
2397
2372
|
return {
|
|
2398
2373
|
paymentSettings: {
|
|
2399
2374
|
minimumFirstDepositAmount: i(e.minimumFirstDepositAmount),
|
|
@@ -2409,7 +2384,7 @@ class Ot {
|
|
|
2409
2384
|
},
|
|
2410
2385
|
gcash: {
|
|
2411
2386
|
androidEnabled: ((l = e.gcashDepositGatewaySettings) == null ? void 0 : l.androidEnabled) ?? !1,
|
|
2412
|
-
iosEnabled: ((
|
|
2387
|
+
iosEnabled: ((f = e.gcashDepositGatewaySettings) == null ? void 0 : f.iosEnabled) ?? !1,
|
|
2413
2388
|
webEnabled: ((y = e.gcashDepositGatewaySettings) == null ? void 0 : y.webEnabled) ?? !1,
|
|
2414
2389
|
mobileWebEnabled: ((p = e.gcashDepositGatewaySettings) == null ? void 0 : p.mobileWebEnabled) ?? !1,
|
|
2415
2390
|
minimumAmount: i((T = e.gcashDepositGatewaySettings) == null ? void 0 : T.minimumAmount),
|
|
@@ -2461,8 +2436,8 @@ class Ot {
|
|
|
2461
2436
|
maximumAmount: i((ce = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ce.maximumAmount)
|
|
2462
2437
|
},
|
|
2463
2438
|
mayaApp: {
|
|
2464
|
-
androidEnabled: ((
|
|
2465
|
-
iosEnabled: ((
|
|
2439
|
+
androidEnabled: ((me = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : me.androidEnabled) ?? !1,
|
|
2440
|
+
iosEnabled: ((de = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : de.iosEnabled) ?? !1,
|
|
2466
2441
|
webEnabled: ((ue = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ue.webEnabled) ?? !1,
|
|
2467
2442
|
mobileWebEnabled: ((le = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : le.mobileWebEnabled) ?? !1,
|
|
2468
2443
|
minimumAmount: i((pe = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : pe.minimumAmount),
|
|
@@ -2806,17 +2781,17 @@ class Ot {
|
|
|
2806
2781
|
}
|
|
2807
2782
|
class Lt {
|
|
2808
2783
|
constructor(e) {
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2784
|
+
m(this, "cmsPortalService");
|
|
2785
|
+
m(this, "authService");
|
|
2786
|
+
m(this, "gameService");
|
|
2787
|
+
m(this, "fileService");
|
|
2788
|
+
m(this, "walletService");
|
|
2789
|
+
m(this, "accountService");
|
|
2790
|
+
m(this, "reportService");
|
|
2791
|
+
m(this, "portalService");
|
|
2792
|
+
m(this, "sessionManager");
|
|
2793
|
+
m(this, "transformer");
|
|
2794
|
+
m(this, "logger");
|
|
2820
2795
|
const {
|
|
2821
2796
|
/**/
|
|
2822
2797
|
site: t,
|
|
@@ -2830,7 +2805,7 @@ class Lt {
|
|
|
2830
2805
|
}), this.logger = new ke({
|
|
2831
2806
|
enabled: c ?? !1
|
|
2832
2807
|
});
|
|
2833
|
-
const l = u ? "https://auth.opexa.io" : "https://auth.development.opexa.io",
|
|
2808
|
+
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", y = 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", T = u ? "https://portal.opexa.io/graphql" : "https://portal.development.opexa.io/graphql", v = u ? "https://file.opexa.io/graphql" : "https://file.development.opexa.io/graphql", M = u ? "https://game.opexa.io/graphql" : "https://game.development.opexa.io/graphql", N = u ? "https://portal-api.opexacms.io/v1" : "https://portal-api.development.opexacms.io/v1", I = new vt({
|
|
2834
2809
|
url: N,
|
|
2835
2810
|
site: t,
|
|
2836
2811
|
platform: r
|
|
@@ -2842,7 +2817,7 @@ class Lt {
|
|
|
2842
2817
|
"Platform-Code": a
|
|
2843
2818
|
}
|
|
2844
2819
|
}
|
|
2845
|
-
}, R = new Nt(new U(M, S)), D = new Mt(new U(v, S)), C = new Pt(new U(
|
|
2820
|
+
}, R = new Nt(new U(M, S)), D = new Mt(new U(v, S)), C = new Pt(new U(f, S)), P = new _t(new U(p, S)), x = new Rt(new U(y, S)), G = new It(new U(T, S)), _ = new Tt({
|
|
2846
2821
|
url: l,
|
|
2847
2822
|
platform: a
|
|
2848
2823
|
}), $ = new Ut({
|
|
@@ -2885,12 +2860,6 @@ class Lt {
|
|
|
2885
2860
|
}
|
|
2886
2861
|
}
|
|
2887
2862
|
}
|
|
2888
|
-
/**
|
|
2889
|
-
* @deprecated use `sendVerificationCode__next`
|
|
2890
|
-
*/
|
|
2891
|
-
async sendAuthenticationCode(e) {
|
|
2892
|
-
return this.authService.sendVerificationCode(e);
|
|
2893
|
-
}
|
|
2894
2863
|
async authenticate(e) {
|
|
2895
2864
|
switch (e.type) {
|
|
2896
2865
|
case "SECURITY_QUESTION":
|
|
@@ -2978,7 +2947,7 @@ class Lt {
|
|
|
2978
2947
|
} : { ok: !1, error: t.error } : { ok: !1, error: e.error };
|
|
2979
2948
|
}
|
|
2980
2949
|
async createAccount(e) {
|
|
2981
|
-
const t = e.id ??
|
|
2950
|
+
const t = e.id ?? b.generate(A.Account).toString(), r = await this.accountService.registerMemberAccount({
|
|
2982
2951
|
input: {
|
|
2983
2952
|
id: t,
|
|
2984
2953
|
btag: e.btag,
|
|
@@ -2986,7 +2955,7 @@ class Lt {
|
|
|
2986
2955
|
domain: e.domain,
|
|
2987
2956
|
birthDay: typeof e.dateOfBirth == "string" ? e.dateOfBirth : e.dateOfBirth.toISOString(),
|
|
2988
2957
|
password: await w(e.password),
|
|
2989
|
-
mobileNumber:
|
|
2958
|
+
mobileNumber: E(e.mobileNumber)
|
|
2990
2959
|
},
|
|
2991
2960
|
referralCode: e.referralCode,
|
|
2992
2961
|
verificationCode: e.verificationCode,
|
|
@@ -2995,12 +2964,12 @@ class Lt {
|
|
|
2995
2964
|
return r.ok ? { ok: !0, data: { id: t } } : r;
|
|
2996
2965
|
}
|
|
2997
2966
|
async createAccount__next(e) {
|
|
2998
|
-
const t = e.id ??
|
|
2967
|
+
const t = e.id ?? b.generate(A.Account).toString();
|
|
2999
2968
|
if (e.type === "MOBILE_NUMBER") {
|
|
3000
2969
|
const a = await this.accountService.registerMemberAccountViaMobile({
|
|
3001
2970
|
input: {
|
|
3002
2971
|
id: t,
|
|
3003
|
-
mobileNumber:
|
|
2972
|
+
mobileNumber: E(e.mobileNumber)
|
|
3004
2973
|
},
|
|
3005
2974
|
referralCode: e.referralCode,
|
|
3006
2975
|
reCAPTCHAResponse: e.reCAPTCHAResponse,
|
|
@@ -3013,7 +2982,7 @@ class Lt {
|
|
|
3013
2982
|
id: t,
|
|
3014
2983
|
name: e.name,
|
|
3015
2984
|
password: await w(e.password),
|
|
3016
|
-
mobileNumber: e.mobileNumber ?
|
|
2985
|
+
mobileNumber: e.mobileNumber ? E(e.mobileNumber) : void 0
|
|
3017
2986
|
},
|
|
3018
2987
|
reCAPTCHAResponse: e.reCAPTCHAResponse
|
|
3019
2988
|
});
|
|
@@ -3037,7 +3006,7 @@ class Lt {
|
|
|
3037
3006
|
password: t.password ? await w(t.password) : void 0,
|
|
3038
3007
|
transactionPassword: t.transactionPassword ? await w(t.transactionPassword) : void 0,
|
|
3039
3008
|
...t.mobileNumber && {
|
|
3040
|
-
mobileNumber:
|
|
3009
|
+
mobileNumber: E(t.mobileNumber)
|
|
3041
3010
|
},
|
|
3042
3011
|
secretAnswer: t.secretAnswer ? await w(t.secretAnswer) : void 0
|
|
3043
3012
|
}
|
|
@@ -3059,7 +3028,7 @@ class Lt {
|
|
|
3059
3028
|
} : e;
|
|
3060
3029
|
}
|
|
3061
3030
|
async submitVerificationDetails(e) {
|
|
3062
|
-
const t = e.id ??
|
|
3031
|
+
const t = e.id ?? b.generate(A.Verification).toString(), r = await this.accountService.createMemberVerification({
|
|
3063
3032
|
input: {
|
|
3064
3033
|
id: t,
|
|
3065
3034
|
...e
|
|
@@ -3080,7 +3049,7 @@ class Lt {
|
|
|
3080
3049
|
async resetPassword(e) {
|
|
3081
3050
|
return await this.accountService.resetPassword({
|
|
3082
3051
|
input: {
|
|
3083
|
-
mobileNumber:
|
|
3052
|
+
mobileNumber: E(e.mobileNumber),
|
|
3084
3053
|
newPassword: await w(e.newPassword)
|
|
3085
3054
|
},
|
|
3086
3055
|
verificationCode: e.verificationCode
|
|
@@ -3104,12 +3073,12 @@ class Lt {
|
|
|
3104
3073
|
return await this.accountService.sendVerificationCode({
|
|
3105
3074
|
input: {
|
|
3106
3075
|
channel: "SMS",
|
|
3107
|
-
recipient:
|
|
3076
|
+
recipient: E(e)
|
|
3108
3077
|
}
|
|
3109
3078
|
});
|
|
3110
3079
|
}
|
|
3111
3080
|
async sendVerificationCode__next(e) {
|
|
3112
|
-
return this.authService.
|
|
3081
|
+
return this.authService.sendVerificationCode(e);
|
|
3113
3082
|
}
|
|
3114
3083
|
async wallet() {
|
|
3115
3084
|
const e = await this.walletService.wallet();
|
|
@@ -3154,7 +3123,7 @@ class Lt {
|
|
|
3154
3123
|
/*+----------------------------------------+*/
|
|
3155
3124
|
/**/
|
|
3156
3125
|
async createWithdrawal(e) {
|
|
3157
|
-
const t = e.id ??
|
|
3126
|
+
const t = e.id ?? b.generate(A.Withdrawal).toString();
|
|
3158
3127
|
if (e.type === "BANK") {
|
|
3159
3128
|
const r = await this.walletService.createBankWithdrawal({
|
|
3160
3129
|
input: {
|
|
@@ -3171,7 +3140,7 @@ class Lt {
|
|
|
3171
3140
|
id: t,
|
|
3172
3141
|
amount: e.amount.toString(),
|
|
3173
3142
|
transactionPassword: await w(e.transactionPassword),
|
|
3174
|
-
recipientMobileNumber:
|
|
3143
|
+
recipientMobileNumber: E(e.recipientMobileNumber)
|
|
3175
3144
|
}
|
|
3176
3145
|
});
|
|
3177
3146
|
if (!r.ok) return r;
|
|
@@ -3182,7 +3151,7 @@ class Lt {
|
|
|
3182
3151
|
id: t,
|
|
3183
3152
|
amount: e.amount.toString(),
|
|
3184
3153
|
transactionPassword: await w(e.transactionPassword),
|
|
3185
|
-
recipientMobileNumber:
|
|
3154
|
+
recipientMobileNumber: E(e.recipientMobileNumber)
|
|
3186
3155
|
}
|
|
3187
3156
|
});
|
|
3188
3157
|
if (!r.ok) return r;
|
|
@@ -3223,7 +3192,7 @@ class Lt {
|
|
|
3223
3192
|
/*+----------------------------------------+*/
|
|
3224
3193
|
/**/
|
|
3225
3194
|
async createDeposit(e) {
|
|
3226
|
-
const t = e.id ??
|
|
3195
|
+
const t = e.id ?? b.generate(A.Deposit).toString();
|
|
3227
3196
|
if (e.type === "MAYA") {
|
|
3228
3197
|
const r = await this.walletService.createMayaDeposit({
|
|
3229
3198
|
input: {
|
|
@@ -3493,19 +3462,19 @@ class Lt {
|
|
|
3493
3462
|
} : r;
|
|
3494
3463
|
}
|
|
3495
3464
|
async createGameSession(e) {
|
|
3496
|
-
const t = e.id ??
|
|
3465
|
+
const t = e.id ?? b.generate(A.GameSession).toString(), r = await this.walletService.createGameSession({ input: { id: t, game: e.game } });
|
|
3497
3466
|
return r.ok ? { ok: !0, data: { id: t } } : r;
|
|
3498
3467
|
}
|
|
3499
3468
|
/** @deprecated use `createGameSession__next` */
|
|
3500
3469
|
async createGameSession__legacy(e) {
|
|
3501
|
-
const t = e.id ??
|
|
3470
|
+
const t = e.id ?? b.generate(A.GameSession).toString(), r = await this.gameService.createGameSession({ input: { id: t, game: e.game } });
|
|
3502
3471
|
return r.ok ? { ok: !0, data: { id: t } } : r;
|
|
3503
3472
|
}
|
|
3504
3473
|
async createGameSession__next(e) {
|
|
3505
|
-
const t = e.id ??
|
|
3474
|
+
const t = e.id ?? b.generate(A.GameSession).toString();
|
|
3506
3475
|
if (e.game.startsWith("SPORTS:")) {
|
|
3507
|
-
const u = await
|
|
3508
|
-
(
|
|
3476
|
+
const u = await b.generateFromKey(A.Game, e.game).then(
|
|
3477
|
+
(f) => f.toString()
|
|
3509
3478
|
), l = await this.gameService.createGameSession({
|
|
3510
3479
|
input: {
|
|
3511
3480
|
id: t,
|
|
@@ -3555,7 +3524,7 @@ class Lt {
|
|
|
3555
3524
|
} : t;
|
|
3556
3525
|
}
|
|
3557
3526
|
async uploadImageFile(e) {
|
|
3558
|
-
const t = e.id ??
|
|
3527
|
+
const t = e.id ?? b.generate(A.File).toString(), r = await this.fileService.uploadPrivateImageFile({
|
|
3559
3528
|
input: {
|
|
3560
3529
|
id: t,
|
|
3561
3530
|
file: e.file
|
|
@@ -3663,7 +3632,7 @@ function Bt(n) {
|
|
|
3663
3632
|
}
|
|
3664
3633
|
export {
|
|
3665
3634
|
Yt as ObjectId,
|
|
3666
|
-
|
|
3635
|
+
A as ObjectType,
|
|
3667
3636
|
Lt as Sdk
|
|
3668
3637
|
};
|
|
3669
3638
|
//# sourceMappingURL=index.mjs.map
|