@opexa/portal-sdk 0.0.40 → 0.0.41
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 +105 -99
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var Ce = Object.defineProperty;
|
|
2
2
|
var Te = (n, e, t) => e in n ? Ce(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
-
var
|
|
4
|
-
import { ObjectId as
|
|
3
|
+
var d = (n, e, t) => Te(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { ObjectId as S } from "@opexa/object-id";
|
|
5
5
|
import { ObjectId as Ot } from "@opexa/object-id";
|
|
6
|
-
const
|
|
6
|
+
const b = {
|
|
7
7
|
Account: 8,
|
|
8
8
|
Deposit: 9,
|
|
9
9
|
Withdrawal: 14,
|
|
@@ -837,7 +837,7 @@ const F = o`
|
|
|
837
837
|
}
|
|
838
838
|
}
|
|
839
839
|
}
|
|
840
|
-
`,
|
|
840
|
+
`, mt = o`
|
|
841
841
|
mutation ResetPassword($input: ResetPasswordInput!, $verificationCode: String) {
|
|
842
842
|
resetPassword(input: $input, verificationCode: $verificationCode) {
|
|
843
843
|
... on AccountNotFoundError {
|
|
@@ -848,7 +848,7 @@ const F = o`
|
|
|
848
848
|
}
|
|
849
849
|
}
|
|
850
850
|
}
|
|
851
|
-
`,
|
|
851
|
+
`, dt = o`
|
|
852
852
|
mutation DeleteMemberAccount($input: DeleteMemberAccountInput!) {
|
|
853
853
|
deleteMemberAccount(input: $input)
|
|
854
854
|
}
|
|
@@ -1008,7 +1008,7 @@ const F = o`
|
|
|
1008
1008
|
}
|
|
1009
1009
|
}
|
|
1010
1010
|
`;
|
|
1011
|
-
function
|
|
1011
|
+
function m(n) {
|
|
1012
1012
|
return {
|
|
1013
1013
|
name: n,
|
|
1014
1014
|
message: {
|
|
@@ -1064,7 +1064,7 @@ function d(n) {
|
|
|
1064
1064
|
}
|
|
1065
1065
|
class St {
|
|
1066
1066
|
constructor(e) {
|
|
1067
|
-
|
|
1067
|
+
d(this, "client");
|
|
1068
1068
|
this.client = e;
|
|
1069
1069
|
}
|
|
1070
1070
|
/** aka `Query.self` */
|
|
@@ -1079,7 +1079,7 @@ class St {
|
|
|
1079
1079
|
const t = await this.client.request(it, e);
|
|
1080
1080
|
return t.ok ? t.data.registerMemberAccount ? {
|
|
1081
1081
|
ok: !1,
|
|
1082
|
-
error:
|
|
1082
|
+
error: m(t.data.registerMemberAccount.__typename)
|
|
1083
1083
|
} : {
|
|
1084
1084
|
ok: !0
|
|
1085
1085
|
} : t;
|
|
@@ -1088,13 +1088,13 @@ class St {
|
|
|
1088
1088
|
const t = await this.client.request(ct, e);
|
|
1089
1089
|
return t.ok ? t.data.updateMemberAccount ? {
|
|
1090
1090
|
ok: !1,
|
|
1091
|
-
error:
|
|
1091
|
+
error: m(t.data.updateMemberAccount.__typename)
|
|
1092
1092
|
} : {
|
|
1093
1093
|
ok: !0
|
|
1094
1094
|
} : t;
|
|
1095
1095
|
}
|
|
1096
1096
|
async deleteMemberAccount(e) {
|
|
1097
|
-
const t = await this.client.request(
|
|
1097
|
+
const t = await this.client.request(dt, e);
|
|
1098
1098
|
return t.ok ? t.data.deleteMemberAccount ? {
|
|
1099
1099
|
ok: !0
|
|
1100
1100
|
} : {
|
|
@@ -1107,12 +1107,12 @@ class St {
|
|
|
1107
1107
|
}
|
|
1108
1108
|
async resetPassword(e) {
|
|
1109
1109
|
const t = await this.client.request(
|
|
1110
|
-
|
|
1110
|
+
mt,
|
|
1111
1111
|
e
|
|
1112
1112
|
);
|
|
1113
1113
|
return t.ok ? t.data.resetPassword ? {
|
|
1114
1114
|
ok: !1,
|
|
1115
|
-
error:
|
|
1115
|
+
error: m(t.data.resetPassword.__typename)
|
|
1116
1116
|
} : {
|
|
1117
1117
|
ok: !0
|
|
1118
1118
|
} : t;
|
|
@@ -1128,7 +1128,7 @@ class St {
|
|
|
1128
1128
|
const t = await this.client.request(ht, e);
|
|
1129
1129
|
return t.ok ? t.data.sendVerificationCode ? {
|
|
1130
1130
|
ok: !1,
|
|
1131
|
-
error:
|
|
1131
|
+
error: m(t.data.sendVerificationCode.__typename)
|
|
1132
1132
|
} : {
|
|
1133
1133
|
ok: !0
|
|
1134
1134
|
} : t;
|
|
@@ -1137,7 +1137,7 @@ class St {
|
|
|
1137
1137
|
const t = await this.client.request(ut, e);
|
|
1138
1138
|
return t.ok ? t.data.verifyMobileNumber ? {
|
|
1139
1139
|
ok: !1,
|
|
1140
|
-
error:
|
|
1140
|
+
error: m(t.data.verifyMobileNumber.__typename)
|
|
1141
1141
|
} : {
|
|
1142
1142
|
ok: !0
|
|
1143
1143
|
} : t;
|
|
@@ -1146,7 +1146,7 @@ class St {
|
|
|
1146
1146
|
const t = await this.client.request(lt, e);
|
|
1147
1147
|
return t.ok ? t.data.createMemberVerification ? {
|
|
1148
1148
|
ok: !1,
|
|
1149
|
-
error:
|
|
1149
|
+
error: m(t.data.createMemberVerification.__typename)
|
|
1150
1150
|
} : {
|
|
1151
1151
|
ok: !0
|
|
1152
1152
|
} : t;
|
|
@@ -1155,7 +1155,7 @@ class St {
|
|
|
1155
1155
|
const t = await this.client.request(pt, e);
|
|
1156
1156
|
return t.ok ? t.data.updateMemberVerification ? {
|
|
1157
1157
|
ok: !1,
|
|
1158
|
-
error:
|
|
1158
|
+
error: m(t.data.updateMemberVerification.__typename)
|
|
1159
1159
|
} : {
|
|
1160
1160
|
ok: !0
|
|
1161
1161
|
} : t;
|
|
@@ -1181,7 +1181,7 @@ class St {
|
|
|
1181
1181
|
const t = await this.client.request(st, e);
|
|
1182
1182
|
return t.ok ? t.data.registerMayaMemberAccount ? {
|
|
1183
1183
|
ok: !1,
|
|
1184
|
-
error:
|
|
1184
|
+
error: m(t.data.registerMayaMemberAccount.__typename)
|
|
1185
1185
|
} : {
|
|
1186
1186
|
ok: !0
|
|
1187
1187
|
} : t;
|
|
@@ -1205,8 +1205,8 @@ const L = {
|
|
|
1205
1205
|
};
|
|
1206
1206
|
class bt {
|
|
1207
1207
|
constructor(e) {
|
|
1208
|
-
|
|
1209
|
-
|
|
1208
|
+
d(this, "url");
|
|
1209
|
+
d(this, "platform");
|
|
1210
1210
|
this.url = e.url, this.platform = e.platform;
|
|
1211
1211
|
}
|
|
1212
1212
|
async createSession(e) {
|
|
@@ -1234,7 +1234,7 @@ class bt {
|
|
|
1234
1234
|
data: a
|
|
1235
1235
|
} : a.code === "ACCOUNT_BLACKLISTED" ? {
|
|
1236
1236
|
ok: !1,
|
|
1237
|
-
error:
|
|
1237
|
+
error: m("AccountBlacklisted")
|
|
1238
1238
|
} : {
|
|
1239
1239
|
ok: !1,
|
|
1240
1240
|
error: h(r.status)
|
|
@@ -1267,7 +1267,7 @@ class bt {
|
|
|
1267
1267
|
data: a
|
|
1268
1268
|
} : r.status === 401 || r.status === 403 ? {
|
|
1269
1269
|
ok: !1,
|
|
1270
|
-
error:
|
|
1270
|
+
error: m("InvalidTokenOrSecretAnswer")
|
|
1271
1271
|
} : {
|
|
1272
1272
|
ok: !1,
|
|
1273
1273
|
error: h(r.status)
|
|
@@ -1297,10 +1297,10 @@ class bt {
|
|
|
1297
1297
|
data: r
|
|
1298
1298
|
} : r.code === "ACCOUNT_BLACKLISTED" ? {
|
|
1299
1299
|
ok: !1,
|
|
1300
|
-
error:
|
|
1300
|
+
error: m("AccountBlacklisted")
|
|
1301
1301
|
} : t.status === 403 || t.status === 401 ? {
|
|
1302
1302
|
ok: !1,
|
|
1303
|
-
error:
|
|
1303
|
+
error: m("InvalidToken")
|
|
1304
1304
|
} : {
|
|
1305
1305
|
ok: !1,
|
|
1306
1306
|
error: h(t.status)
|
|
@@ -1346,7 +1346,7 @@ class bt {
|
|
|
1346
1346
|
}
|
|
1347
1347
|
class At {
|
|
1348
1348
|
constructor(e) {
|
|
1349
|
-
|
|
1349
|
+
d(this, "client");
|
|
1350
1350
|
this.client = e;
|
|
1351
1351
|
}
|
|
1352
1352
|
async file(e) {
|
|
@@ -1360,7 +1360,7 @@ class At {
|
|
|
1360
1360
|
const t = await this.client.upload(Me, e);
|
|
1361
1361
|
return t.ok ? t.data.uploadPrivateImageFile ? {
|
|
1362
1362
|
ok: !1,
|
|
1363
|
-
error:
|
|
1363
|
+
error: m(t.data.uploadPrivateImageFile.__typename)
|
|
1364
1364
|
} : {
|
|
1365
1365
|
ok: !0
|
|
1366
1366
|
} : t;
|
|
@@ -1368,7 +1368,7 @@ class At {
|
|
|
1368
1368
|
}
|
|
1369
1369
|
class kt {
|
|
1370
1370
|
constructor(e) {
|
|
1371
|
-
|
|
1371
|
+
d(this, "client");
|
|
1372
1372
|
this.client = e;
|
|
1373
1373
|
}
|
|
1374
1374
|
async betRecords(e) {
|
|
@@ -1418,7 +1418,7 @@ class kt {
|
|
|
1418
1418
|
}
|
|
1419
1419
|
class _t {
|
|
1420
1420
|
constructor(e) {
|
|
1421
|
-
|
|
1421
|
+
d(this, "url");
|
|
1422
1422
|
this.url = e.url;
|
|
1423
1423
|
}
|
|
1424
1424
|
gameThumbnails(e) {
|
|
@@ -1430,7 +1430,7 @@ class _t {
|
|
|
1430
1430
|
}
|
|
1431
1431
|
class Ae {
|
|
1432
1432
|
constructor(e) {
|
|
1433
|
-
|
|
1433
|
+
d(this, "client");
|
|
1434
1434
|
this.client = e;
|
|
1435
1435
|
}
|
|
1436
1436
|
async promos() {
|
|
@@ -1456,7 +1456,7 @@ class Ae {
|
|
|
1456
1456
|
const t = await this.client.request(rt, e);
|
|
1457
1457
|
return t.ok ? t.data.claimCashbackBonus ? {
|
|
1458
1458
|
ok: !1,
|
|
1459
|
-
error:
|
|
1459
|
+
error: m(t.data.claimCashbackBonus.__typename)
|
|
1460
1460
|
} : {
|
|
1461
1461
|
ok: !0
|
|
1462
1462
|
} : {
|
|
@@ -1483,7 +1483,7 @@ class Ae {
|
|
|
1483
1483
|
const t = await this.client.request(Le, e);
|
|
1484
1484
|
return t.ok ? t.data.createGCashDeposit ? {
|
|
1485
1485
|
ok: !1,
|
|
1486
|
-
error:
|
|
1486
|
+
error: m(t.data.createGCashDeposit.__typename)
|
|
1487
1487
|
} : {
|
|
1488
1488
|
ok: !0
|
|
1489
1489
|
} : t;
|
|
@@ -1492,7 +1492,7 @@ class Ae {
|
|
|
1492
1492
|
const t = await this.client.request(Ve, e);
|
|
1493
1493
|
return t.ok ? t.data.createMayaDeposit ? {
|
|
1494
1494
|
ok: !1,
|
|
1495
|
-
error:
|
|
1495
|
+
error: m(t.data.createMayaDeposit.__typename)
|
|
1496
1496
|
} : {
|
|
1497
1497
|
ok: !0
|
|
1498
1498
|
} : t;
|
|
@@ -1501,7 +1501,7 @@ class Ae {
|
|
|
1501
1501
|
const t = await this.client.request(Ye, e);
|
|
1502
1502
|
return t.ok ? t.data.createMayaAppDeposit ? {
|
|
1503
1503
|
ok: !1,
|
|
1504
|
-
error:
|
|
1504
|
+
error: m(t.data.createMayaAppDeposit.__typename)
|
|
1505
1505
|
} : {
|
|
1506
1506
|
ok: !0
|
|
1507
1507
|
} : t;
|
|
@@ -1510,7 +1510,7 @@ class Ae {
|
|
|
1510
1510
|
const t = await this.client.request(We, e);
|
|
1511
1511
|
return t.ok ? t.data.createGCashWithdrawal ? {
|
|
1512
1512
|
ok: !1,
|
|
1513
|
-
error:
|
|
1513
|
+
error: m(t.data.createGCashWithdrawal.__typename)
|
|
1514
1514
|
} : {
|
|
1515
1515
|
ok: !0
|
|
1516
1516
|
} : t;
|
|
@@ -1519,7 +1519,7 @@ class Ae {
|
|
|
1519
1519
|
const t = await this.client.request(Be, e);
|
|
1520
1520
|
return t.ok ? t.data.createMayaWithdrawal ? {
|
|
1521
1521
|
ok: !1,
|
|
1522
|
-
error:
|
|
1522
|
+
error: m(t.data.createMayaWithdrawal.__typename)
|
|
1523
1523
|
} : {
|
|
1524
1524
|
ok: !0
|
|
1525
1525
|
} : t;
|
|
@@ -1528,7 +1528,7 @@ class Ae {
|
|
|
1528
1528
|
const t = await this.client.request(Oe, e);
|
|
1529
1529
|
return t.ok ? t.data.createMayaAppWithdrawal ? {
|
|
1530
1530
|
ok: !1,
|
|
1531
|
-
error:
|
|
1531
|
+
error: m(t.data.createMayaAppWithdrawal.__typename)
|
|
1532
1532
|
} : {
|
|
1533
1533
|
ok: !0
|
|
1534
1534
|
} : t;
|
|
@@ -1537,7 +1537,7 @@ class Ae {
|
|
|
1537
1537
|
const t = await this.client.request(Ue, e);
|
|
1538
1538
|
return t.ok ? t.data.createBankWithdrawal ? {
|
|
1539
1539
|
ok: !1,
|
|
1540
|
-
error:
|
|
1540
|
+
error: m(t.data.createBankWithdrawal.__typename)
|
|
1541
1541
|
} : {
|
|
1542
1542
|
ok: !0
|
|
1543
1543
|
} : t;
|
|
@@ -1556,7 +1556,7 @@ class Ae {
|
|
|
1556
1556
|
const t = await this.client.request(De, e);
|
|
1557
1557
|
return t.ok ? t.data.pointsToCashConversion ? {
|
|
1558
1558
|
ok: !1,
|
|
1559
|
-
error:
|
|
1559
|
+
error: m(t.data.pointsToCashConversion.__typename)
|
|
1560
1560
|
} : {
|
|
1561
1561
|
ok: !0
|
|
1562
1562
|
} : t;
|
|
@@ -1592,7 +1592,7 @@ class Ae {
|
|
|
1592
1592
|
const t = await this.client.request(Se, e);
|
|
1593
1593
|
return t.ok ? t.data.createGameSession ? {
|
|
1594
1594
|
ok: !1,
|
|
1595
|
-
error:
|
|
1595
|
+
error: m(t.data.createGameSession.__typename)
|
|
1596
1596
|
} : {
|
|
1597
1597
|
ok: !0
|
|
1598
1598
|
} : t;
|
|
@@ -1629,9 +1629,9 @@ class Ae {
|
|
|
1629
1629
|
}
|
|
1630
1630
|
class Ct {
|
|
1631
1631
|
constructor(e) {
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1632
|
+
d(this, "url");
|
|
1633
|
+
d(this, "siteId");
|
|
1634
|
+
d(this, "platformId");
|
|
1635
1635
|
this.url = e.url, this.siteId = e.site, this.platformId = e.platform;
|
|
1636
1636
|
}
|
|
1637
1637
|
async self() {
|
|
@@ -1642,16 +1642,22 @@ class Ct {
|
|
|
1642
1642
|
} : e;
|
|
1643
1643
|
}
|
|
1644
1644
|
async games(e) {
|
|
1645
|
-
var a, s, c, p, u, f, w, l,
|
|
1645
|
+
var a, s, c, p, u, f, w, l, k, _, C, T, v, M, N, I, D, R, P, G, x, $, W, B;
|
|
1646
1646
|
const t = new URLSearchParams();
|
|
1647
|
-
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), (p = (c = e == null ? void 0 : e.filter) == null ? void 0 : c.type) != null && p.notEqual && t.set("filter[type][neq]", e.filter.type.notEqual), (f = (u = e == null ? void 0 : e.filter) == null ? void 0 : u.type) != null && f.in && t.set("filter[type][in]", e.filter.type.in.join(",")), (l = (w = e == null ? void 0 : e.filter) == null ? void 0 : w.type) != null && l.notIn && t.set("filter[type][nin]", e.filter.type.notIn.join(",")), (
|
|
1647
|
+
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), (p = (c = e == null ? void 0 : e.filter) == null ? void 0 : c.type) != null && p.notEqual && t.set("filter[type][neq]", e.filter.type.notEqual), (f = (u = e == null ? void 0 : e.filter) == null ? void 0 : u.type) != null && f.in && t.set("filter[type][in]", e.filter.type.in.join(",")), (l = (w = e == null ? void 0 : e.filter) == null ? void 0 : w.type) != null && l.notIn && t.set("filter[type][nin]", e.filter.type.notIn.join(",")), (_ = (k = e == null ? void 0 : e.filter) == null ? void 0 : k.provider) != null && _.equal && t.set("filter[provider][eq]", e.filter.provider.equal), (T = (C = e == null ? void 0 : e.filter) == null ? void 0 : C.provider) != null && T.notEqual && t.set("filter[provider][neq]", e.filter.provider.notEqual), (M = (v = e == null ? void 0 : e.filter) == null ? void 0 : v.provider) != null && M.in && t.set("filter[provider][in]", e.filter.provider.in.join(",")), (I = (N = e == null ? void 0 : e.filter) == null ? void 0 : N.provider) != null && I.notIn && t.set("filter[provider][nin]", e.filter.provider.notIn.join(",")), (R = (D = e == null ? void 0 : e.filter) == null ? void 0 : D.tags) != null && R.equal && t.set("filter[tags][eq]", e.filter.tags.equal.toLowerCase()), (G = (P = e == null ? void 0 : e.filter) == null ? void 0 : P.tags) != null && G.notEqual && t.set("filter[tags][neq]", e.filter.tags.notEqual.toLowerCase()), ($ = (x = e == null ? void 0 : e.filter) == null ? void 0 : x.tags) != null && $.in && t.set(
|
|
1648
|
+
"filter[tags][in]",
|
|
1649
|
+
e.filter.tags.in.map((E) => E.toLowerCase()).join(",")
|
|
1650
|
+
), (B = (W = e == null ? void 0 : e.filter) == null ? void 0 : W.tags) != null && B.notIn && t.set(
|
|
1651
|
+
"filter[tags][nin]",
|
|
1652
|
+
e.filter.tags.notIn.map((E) => E.toLowerCase()).join(",")
|
|
1653
|
+
);
|
|
1648
1654
|
const r = await this.getJson("/games", t);
|
|
1649
1655
|
return r.ok ? {
|
|
1650
1656
|
ok: !0,
|
|
1651
1657
|
data: {
|
|
1652
|
-
edges: r.data.data.map((
|
|
1653
|
-
node:
|
|
1654
|
-
cursor:
|
|
1658
|
+
edges: r.data.data.map((E) => ({
|
|
1659
|
+
node: E,
|
|
1660
|
+
cursor: E.cursor
|
|
1655
1661
|
})),
|
|
1656
1662
|
totalCount: r.data.totalCount ?? 0,
|
|
1657
1663
|
pageInfo: {
|
|
@@ -1701,7 +1707,7 @@ class Ct {
|
|
|
1701
1707
|
}
|
|
1702
1708
|
class Tt {
|
|
1703
1709
|
constructor(e) {
|
|
1704
|
-
|
|
1710
|
+
d(this, "client");
|
|
1705
1711
|
this.client = e;
|
|
1706
1712
|
}
|
|
1707
1713
|
/** @deprecated */
|
|
@@ -1728,7 +1734,7 @@ class Tt {
|
|
|
1728
1734
|
const t = await this.client.request(Se, e);
|
|
1729
1735
|
return t.ok ? t.data.createGameSession ? {
|
|
1730
1736
|
ok: !1,
|
|
1731
|
-
error:
|
|
1737
|
+
error: m(t.data.createGameSession.__typename)
|
|
1732
1738
|
} : {
|
|
1733
1739
|
ok: !0
|
|
1734
1740
|
} : t;
|
|
@@ -1737,7 +1743,7 @@ class Tt {
|
|
|
1737
1743
|
const t = await this.client.request(Ge, e);
|
|
1738
1744
|
return t.ok ? t.data.endGameSession ? {
|
|
1739
1745
|
ok: !1,
|
|
1740
|
-
error:
|
|
1746
|
+
error: m(t.data.endGameSession.__typename)
|
|
1741
1747
|
} : {
|
|
1742
1748
|
ok: !0
|
|
1743
1749
|
} : t;
|
|
@@ -1745,7 +1751,7 @@ class Tt {
|
|
|
1745
1751
|
}
|
|
1746
1752
|
class vt {
|
|
1747
1753
|
constructor(e) {
|
|
1748
|
-
|
|
1754
|
+
d(this, "client");
|
|
1749
1755
|
this.client = e;
|
|
1750
1756
|
}
|
|
1751
1757
|
async latestBetRecords() {
|
|
@@ -1778,11 +1784,11 @@ function Nt(n) {
|
|
|
1778
1784
|
function It(n) {
|
|
1779
1785
|
return n.reduce((e, t, r) => (e[r] = t, e), {});
|
|
1780
1786
|
}
|
|
1781
|
-
class
|
|
1787
|
+
class A {
|
|
1782
1788
|
constructor(e, t) {
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1789
|
+
d(this, "url");
|
|
1790
|
+
d(this, "options");
|
|
1791
|
+
d(this, "middlewares");
|
|
1786
1792
|
var a;
|
|
1787
1793
|
const r = new Headers((a = t == null ? void 0 : t.fetchOptions) == null ? void 0 : a.headers);
|
|
1788
1794
|
this.url = e, this.options = { ...t == null ? void 0 : t.fetchOptions, headers: r }, this.middlewares = (t == null ? void 0 : t.middlewares) ?? [];
|
|
@@ -1866,7 +1872,7 @@ async function g(n) {
|
|
|
1866
1872
|
}
|
|
1867
1873
|
class ke {
|
|
1868
1874
|
constructor(e) {
|
|
1869
|
-
|
|
1875
|
+
d(this, "enabled");
|
|
1870
1876
|
this.enabled = (e == null ? void 0 : e.enabled) ?? !0;
|
|
1871
1877
|
}
|
|
1872
1878
|
info(e) {
|
|
@@ -1920,16 +1926,16 @@ function q(n, e) {
|
|
|
1920
1926
|
}
|
|
1921
1927
|
class Dt {
|
|
1922
1928
|
constructor(e) {
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1929
|
+
d(this, "logger");
|
|
1930
|
+
d(this, "storageKey", "session");
|
|
1931
|
+
d(this, "authService");
|
|
1932
|
+
d(this, "walletService");
|
|
1933
|
+
d(this, "_refreshing", !1);
|
|
1928
1934
|
this.authService = new bt({
|
|
1929
1935
|
url: e.authUrl,
|
|
1930
1936
|
platform: e.platform
|
|
1931
1937
|
}), this.walletService = new Ae(
|
|
1932
|
-
new
|
|
1938
|
+
new A(e.walletUrl, {
|
|
1933
1939
|
middlewares: [
|
|
1934
1940
|
(t) => (t.headers.set("Platform", e.platform), t.headers.set("Role", "MEMBER"), t)
|
|
1935
1941
|
]
|
|
@@ -2156,7 +2162,7 @@ function i(n, e) {
|
|
|
2156
2162
|
}
|
|
2157
2163
|
class Rt {
|
|
2158
2164
|
constructor(e) {
|
|
2159
|
-
|
|
2165
|
+
d(this, "staticService");
|
|
2160
2166
|
const t = (e == null ? void 0 : e.environment) === "development";
|
|
2161
2167
|
this.staticService = new _t({
|
|
2162
2168
|
url: t ? "https://static.development.opexa.io" : "https://static.opexa.io"
|
|
@@ -2200,7 +2206,7 @@ class Rt {
|
|
|
2200
2206
|
return y(t);
|
|
2201
2207
|
}
|
|
2202
2208
|
platform(e) {
|
|
2203
|
-
var t, r, a, s, c, p, u, f, w, l,
|
|
2209
|
+
var t, r, a, s, c, p, u, f, w, l, k, _, C, T, v, M, N, I, D, R, P, G, x, $, W, B, E, j, Q, K, z, J, X, Z, ee, te, re, ae, ne, oe, ie, se, ce, me, de, ue, le, pe, fe;
|
|
2204
2210
|
return {
|
|
2205
2211
|
paymentSettings: {
|
|
2206
2212
|
minimumFirstDepositAmount: i(e.minimumFirstDepositAmount),
|
|
@@ -2219,31 +2225,31 @@ class Rt {
|
|
|
2219
2225
|
iosEnabled: ((f = e.gcashDepositGatewaySettings) == null ? void 0 : f.iosEnabled) ?? !1,
|
|
2220
2226
|
webEnabled: ((w = e.gcashDepositGatewaySettings) == null ? void 0 : w.webEnabled) ?? !1,
|
|
2221
2227
|
mobileWebEnabled: ((l = e.gcashDepositGatewaySettings) == null ? void 0 : l.mobileWebEnabled) ?? !1,
|
|
2222
|
-
minimumAmount: i((
|
|
2223
|
-
maximumAmount: i((
|
|
2228
|
+
minimumAmount: i((k = e.gcashDepositGatewaySettings) == null ? void 0 : k.minimumAmount),
|
|
2229
|
+
maximumAmount: i((_ = e.gcashDepositGatewaySettings) == null ? void 0 : _.maximumAmount)
|
|
2224
2230
|
},
|
|
2225
2231
|
maya: {
|
|
2226
|
-
androidEnabled: ((
|
|
2227
|
-
iosEnabled: ((
|
|
2228
|
-
webEnabled: ((
|
|
2229
|
-
mobileWebEnabled: ((
|
|
2230
|
-
minimumAmount: i((
|
|
2231
|
-
maximumAmount: i((
|
|
2232
|
+
androidEnabled: ((C = e.mayaDepositGatewaySettings) == null ? void 0 : C.androidEnabled) ?? !1,
|
|
2233
|
+
iosEnabled: ((T = e.mayaDepositGatewaySettings) == null ? void 0 : T.iosEnabled) ?? !1,
|
|
2234
|
+
webEnabled: ((v = e.mayaDepositGatewaySettings) == null ? void 0 : v.webEnabled) ?? !1,
|
|
2235
|
+
mobileWebEnabled: ((M = e.mayaDepositGatewaySettings) == null ? void 0 : M.mobileWebEnabled) ?? !1,
|
|
2236
|
+
minimumAmount: i((N = e.mayaDepositGatewaySettings) == null ? void 0 : N.minimumAmount),
|
|
2237
|
+
maximumAmount: i((I = e.mayaDepositGatewaySettings) == null ? void 0 : I.maximumAmount)
|
|
2232
2238
|
},
|
|
2233
2239
|
mayaApp: {
|
|
2234
|
-
androidEnabled: ((
|
|
2235
|
-
iosEnabled: ((
|
|
2236
|
-
webEnabled: ((
|
|
2237
|
-
mobileWebEnabled: ((
|
|
2238
|
-
minimumAmount: i((
|
|
2239
|
-
maximumAmount: i((
|
|
2240
|
+
androidEnabled: ((D = e.mayaAppDepositGatewaySettings) == null ? void 0 : D.androidEnabled) ?? !1,
|
|
2241
|
+
iosEnabled: ((R = e.mayaAppDepositGatewaySettings) == null ? void 0 : R.iosEnabled) ?? !1,
|
|
2242
|
+
webEnabled: ((P = e.mayaAppDepositGatewaySettings) == null ? void 0 : P.webEnabled) ?? !1,
|
|
2243
|
+
mobileWebEnabled: ((G = e.mayaAppDepositGatewaySettings) == null ? void 0 : G.mobileWebEnabled) ?? !1,
|
|
2244
|
+
minimumAmount: i((x = e.mayaAppDepositGatewaySettings) == null ? void 0 : x.minimumAmount),
|
|
2245
|
+
maximumAmount: i(($ = e.mayaAppDepositGatewaySettings) == null ? void 0 : $.maximumAmount)
|
|
2240
2246
|
}
|
|
2241
2247
|
},
|
|
2242
2248
|
withdrawalGateway: {
|
|
2243
2249
|
bank: {
|
|
2244
|
-
androidEnabled: ((
|
|
2245
|
-
iosEnabled: ((
|
|
2246
|
-
webEnabled: ((
|
|
2250
|
+
androidEnabled: ((W = e.bankWithdrawalGatewaySettings) == null ? void 0 : W.androidEnabled) ?? !1,
|
|
2251
|
+
iosEnabled: ((B = e.bankWithdrawalGatewaySettings) == null ? void 0 : B.iosEnabled) ?? !1,
|
|
2252
|
+
webEnabled: ((E = e.bankWithdrawalGatewaySettings) == null ? void 0 : E.webEnabled) ?? !1,
|
|
2247
2253
|
mobileWebEnabled: ((j = e.bankWithdrawalGatewaySettings) == null ? void 0 : j.mobileWebEnabled) ?? !1,
|
|
2248
2254
|
minimumAmount: i((Q = e.bankWithdrawalGatewaySettings) == null ? void 0 : Q.minimumAmount),
|
|
2249
2255
|
maximumAmount: i((K = e.bankWithdrawalGatewaySettings) == null ? void 0 : K.maximumAmount)
|
|
@@ -2269,8 +2275,8 @@ class Rt {
|
|
|
2269
2275
|
},
|
|
2270
2276
|
mayaApp: {
|
|
2271
2277
|
androidEnabled: ((ce = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ce.androidEnabled) ?? !1,
|
|
2272
|
-
iosEnabled: ((
|
|
2273
|
-
webEnabled: ((
|
|
2278
|
+
iosEnabled: ((me = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : me.iosEnabled) ?? !1,
|
|
2279
|
+
webEnabled: ((de = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : de.webEnabled) ?? !1,
|
|
2274
2280
|
mobileWebEnabled: ((ue = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ue.mobileWebEnabled) ?? !1,
|
|
2275
2281
|
minimumAmount: i((le = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : le.minimumAmount),
|
|
2276
2282
|
maximumAmount: i(
|
|
@@ -2590,7 +2596,7 @@ class Rt {
|
|
|
2590
2596
|
}
|
|
2591
2597
|
class $t {
|
|
2592
2598
|
constructor(e) {
|
|
2593
|
-
|
|
2599
|
+
d(this, "_config");
|
|
2594
2600
|
this._config = {
|
|
2595
2601
|
...e,
|
|
2596
2602
|
logs: e.logs ?? !1,
|
|
@@ -2631,7 +2637,7 @@ class $t {
|
|
|
2631
2637
|
}
|
|
2632
2638
|
get gameService() {
|
|
2633
2639
|
return new Tt(
|
|
2634
|
-
new
|
|
2640
|
+
new A(
|
|
2635
2641
|
this.config.environment === "development" ? "https://game.development.opexa.io/graphql" : "https://game.opexa.io/graphql",
|
|
2636
2642
|
{
|
|
2637
2643
|
middlewares: [this.authMiddleware],
|
|
@@ -2647,7 +2653,7 @@ class $t {
|
|
|
2647
2653
|
}
|
|
2648
2654
|
get fileService() {
|
|
2649
2655
|
return new At(
|
|
2650
|
-
new
|
|
2656
|
+
new A(
|
|
2651
2657
|
this.config.environment === "development" ? "https://file.development.opexa.io/graphql" : "https://file.opexa.io/graphql",
|
|
2652
2658
|
{
|
|
2653
2659
|
middlewares: [this.authMiddleware],
|
|
@@ -2663,7 +2669,7 @@ class $t {
|
|
|
2663
2669
|
}
|
|
2664
2670
|
get walletService() {
|
|
2665
2671
|
return new Ae(
|
|
2666
|
-
new
|
|
2672
|
+
new A(
|
|
2667
2673
|
this.config.environment === "development" ? "https://wallet.development.opexa.io/graphql" : "https://wallet.opexa.io/graphql",
|
|
2668
2674
|
{
|
|
2669
2675
|
middlewares: [this.authMiddleware],
|
|
@@ -2679,7 +2685,7 @@ class $t {
|
|
|
2679
2685
|
}
|
|
2680
2686
|
get accountService() {
|
|
2681
2687
|
return new St(
|
|
2682
|
-
new
|
|
2688
|
+
new A(
|
|
2683
2689
|
this.config.environment === "development" ? "https://account.development.opexa.io/graphql" : "https://account.opexa.io/graphql",
|
|
2684
2690
|
{
|
|
2685
2691
|
middlewares: [this.authMiddleware],
|
|
@@ -2695,7 +2701,7 @@ class $t {
|
|
|
2695
2701
|
}
|
|
2696
2702
|
get reportService() {
|
|
2697
2703
|
return new kt(
|
|
2698
|
-
new
|
|
2704
|
+
new A(
|
|
2699
2705
|
this.config.environment === "development" ? "https://report.development.opexa.io/graphql" : "https://report.opexa.io/graphql",
|
|
2700
2706
|
{
|
|
2701
2707
|
middlewares: [this.authMiddleware],
|
|
@@ -2711,7 +2717,7 @@ class $t {
|
|
|
2711
2717
|
}
|
|
2712
2718
|
get portalService() {
|
|
2713
2719
|
return new vt(
|
|
2714
|
-
new
|
|
2720
|
+
new A(
|
|
2715
2721
|
this.config.environment === "development" ? "https://portal.development.opexa.io/graphql" : "https://portal.opexa.io/graphql",
|
|
2716
2722
|
{
|
|
2717
2723
|
middlewares: [this.authMiddleware],
|
|
@@ -2923,7 +2929,7 @@ class $t {
|
|
|
2923
2929
|
* ```
|
|
2924
2930
|
*/
|
|
2925
2931
|
async createAccount(e) {
|
|
2926
|
-
const t = e.id ??
|
|
2932
|
+
const t = e.id ?? S.generate(b.Account).toString(), r = await this.accountService.registerMemberAccount({
|
|
2927
2933
|
input: {
|
|
2928
2934
|
id: t,
|
|
2929
2935
|
name: e.name,
|
|
@@ -3014,7 +3020,7 @@ class $t {
|
|
|
3014
3020
|
* ```
|
|
3015
3021
|
*/
|
|
3016
3022
|
async submitVerificationDetails(e) {
|
|
3017
|
-
const t = e.id ??
|
|
3023
|
+
const t = e.id ?? S.generate(b.Verification).toString(), r = await this.accountService.createMemberVerification({
|
|
3018
3024
|
input: {
|
|
3019
3025
|
id: t,
|
|
3020
3026
|
...e
|
|
@@ -3138,7 +3144,7 @@ class $t {
|
|
|
3138
3144
|
* ```
|
|
3139
3145
|
*/
|
|
3140
3146
|
async createWithdrawal(e) {
|
|
3141
|
-
const t = e.id ??
|
|
3147
|
+
const t = e.id ?? S.generate(b.Withdrawal).toString();
|
|
3142
3148
|
if (e.type === "BANK") {
|
|
3143
3149
|
const r = await this.walletService.createBankWithdrawal({
|
|
3144
3150
|
input: {
|
|
@@ -3224,7 +3230,7 @@ class $t {
|
|
|
3224
3230
|
* ```
|
|
3225
3231
|
*/
|
|
3226
3232
|
async createDeposit(e) {
|
|
3227
|
-
const t = e.id ??
|
|
3233
|
+
const t = e.id ?? S.generate(b.Deposit).toString();
|
|
3228
3234
|
if (e.type === "MAYA") {
|
|
3229
3235
|
const r = await this.walletService.createMayaDeposit({
|
|
3230
3236
|
input: {
|
|
@@ -3512,18 +3518,18 @@ class $t {
|
|
|
3512
3518
|
* ```
|
|
3513
3519
|
*/
|
|
3514
3520
|
async createGameSession(e) {
|
|
3515
|
-
const t = e.id ??
|
|
3521
|
+
const t = e.id ?? S.generate(b.GameSession).toString(), r = await this.walletService.createGameSession({ input: { id: t, game: e.game } });
|
|
3516
3522
|
return r.ok ? { ok: !0, data: { id: t } } : r;
|
|
3517
3523
|
}
|
|
3518
3524
|
/** @deprecated use `createGameSession__next` */
|
|
3519
3525
|
async createGameSession__legacy(e) {
|
|
3520
|
-
const t = e.id ??
|
|
3526
|
+
const t = e.id ?? S.generate(b.GameSession).toString(), r = await this.gameService.createGameSession({ input: { id: t, game: e.game } });
|
|
3521
3527
|
return r.ok ? { ok: !0, data: { id: t } } : r;
|
|
3522
3528
|
}
|
|
3523
3529
|
async createGameSession__next(e) {
|
|
3524
|
-
const t = e.id ??
|
|
3530
|
+
const t = e.id ?? S.generate(b.GameSession).toString();
|
|
3525
3531
|
if (e.game.startsWith("SPORTS:")) {
|
|
3526
|
-
const p = await
|
|
3532
|
+
const p = await S.generateFromKey(b.Game, e.game).then(
|
|
3527
3533
|
(f) => f.toString()
|
|
3528
3534
|
), u = await this.gameService.createGameSession({
|
|
3529
3535
|
input: {
|
|
@@ -3589,7 +3595,7 @@ class $t {
|
|
|
3589
3595
|
* ```
|
|
3590
3596
|
*/
|
|
3591
3597
|
async uploadImageFile(e) {
|
|
3592
|
-
const t = e.id ??
|
|
3598
|
+
const t = e.id ?? S.generate(b.File).toString(), r = await this.fileService.uploadPrivateImageFile({
|
|
3593
3599
|
input: {
|
|
3594
3600
|
id: t,
|
|
3595
3601
|
file: e.file
|
|
@@ -3667,7 +3673,7 @@ const Pt = [
|
|
|
3667
3673
|
];
|
|
3668
3674
|
export {
|
|
3669
3675
|
Ot as ObjectId,
|
|
3670
|
-
|
|
3676
|
+
b as ObjectType,
|
|
3671
3677
|
$t as Sdk
|
|
3672
3678
|
};
|
|
3673
3679
|
//# sourceMappingURL=index.mjs.map
|