@opexa/portal-sdk 0.0.70 → 0.0.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1622 -1622
- package/dist/index.js +50 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +329 -235
- package/dist/index.mjs.map +1 -1
- package/dist/sdk/sdk.d.ts +9 -2
- package/dist/sdk/transformer.d.ts +2 -0
- package/dist/sdk/types.d.ts +22 -1
- package/dist/services/account.service.d.ts +2 -2
- package/dist/services/auth.service.d.ts +5 -0
- package/dist/services/queries.d.ts +2 -1
- package/dist/services/report.service.d.ts +2 -1
- package/dist/services/types.d.ts +30 -9
- package/package.json +81 -81
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var
|
|
2
|
-
var Te = (n, e, t) => e in n ?
|
|
3
|
-
var
|
|
4
|
-
import { ObjectId as
|
|
5
|
-
import { ObjectId as
|
|
6
|
-
const
|
|
1
|
+
var Ce = Object.defineProperty;
|
|
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 d = (n, e, t) => Te(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { ObjectId as b } from "@opexa/object-id";
|
|
5
|
+
import { ObjectId as Ht } from "@opexa/object-id";
|
|
6
|
+
const A = {
|
|
7
7
|
Account: 8,
|
|
8
8
|
Deposit: 9,
|
|
9
9
|
Withdrawal: 14,
|
|
@@ -38,7 +38,7 @@ const L = o`
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
`,
|
|
41
|
+
`, Ne = o`
|
|
42
42
|
mutation UploadPrivateImageFile($input: UploadFileInput!) {
|
|
43
43
|
uploadPrivateImageFile(input: $input) {
|
|
44
44
|
... on FileFormatNotSupportedError {
|
|
@@ -52,7 +52,7 @@ const L = o`
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
`,
|
|
55
|
+
`, Me = o`
|
|
56
56
|
query Wallet {
|
|
57
57
|
wallet {
|
|
58
58
|
id
|
|
@@ -139,7 +139,7 @@ const L = o`
|
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
|
-
`,
|
|
142
|
+
`, be = o`
|
|
143
143
|
query GameSession($id: ObjectId!) {
|
|
144
144
|
node(id: $id) {
|
|
145
145
|
... on GameSession {
|
|
@@ -151,7 +151,7 @@ const L = o`
|
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
|
-
`,
|
|
154
|
+
`, Ae = o`
|
|
155
155
|
mutation CreateGameSession($input: CreateGameSessionInput!) {
|
|
156
156
|
createGameSession(input: $input) {
|
|
157
157
|
... on GameDoesNotExistError {
|
|
@@ -270,7 +270,7 @@ const L = o`
|
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
|
-
`,
|
|
273
|
+
`, Ue = o`
|
|
274
274
|
mutation CreateGCashWithdrawal($input: CreateGCashWithdrawalInput!) {
|
|
275
275
|
createGCashWithdrawal(input: $input) {
|
|
276
276
|
... on AccountNotVerifiedError {
|
|
@@ -293,7 +293,7 @@ const L = o`
|
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
|
-
`,
|
|
296
|
+
`, We = o`
|
|
297
297
|
mutation CreateMayaWithdrawal($input: CreateMayaWithdrawalInput!) {
|
|
298
298
|
createMayaWithdrawal(input: $input) {
|
|
299
299
|
... on AccountNotVerifiedError {
|
|
@@ -639,7 +639,7 @@ const L = o`
|
|
|
639
639
|
...PromoFragment
|
|
640
640
|
}
|
|
641
641
|
}
|
|
642
|
-
`,
|
|
642
|
+
`, Ee = o`
|
|
643
643
|
${L}
|
|
644
644
|
|
|
645
645
|
fragment CashbackFragment on Cashback {
|
|
@@ -657,7 +657,7 @@ const L = o`
|
|
|
657
657
|
dateTimeLastUpdated
|
|
658
658
|
}
|
|
659
659
|
`, Ze = o`
|
|
660
|
-
${
|
|
660
|
+
${Ee}
|
|
661
661
|
|
|
662
662
|
query Cashbacks {
|
|
663
663
|
cashbacks {
|
|
@@ -694,7 +694,7 @@ const L = o`
|
|
|
694
694
|
}
|
|
695
695
|
}
|
|
696
696
|
`, tt = o`
|
|
697
|
-
${
|
|
697
|
+
${Ee}
|
|
698
698
|
|
|
699
699
|
query CashbackBonuses {
|
|
700
700
|
cashbackBonuses {
|
|
@@ -807,11 +807,14 @@ const L = o`
|
|
|
807
807
|
}
|
|
808
808
|
}
|
|
809
809
|
`, st = o`
|
|
810
|
-
mutation
|
|
810
|
+
mutation RegisterMemberAccount(
|
|
811
811
|
$input: RegisterMemberAccountInput_next!
|
|
812
812
|
$reCAPTCHAResponse: String
|
|
813
813
|
) {
|
|
814
|
-
registerMemberAccount_next(
|
|
814
|
+
registerMemberAccount: registerMemberAccount_next(
|
|
815
|
+
input: $input
|
|
816
|
+
reCAPTCHAResponse: $reCAPTCHAResponse
|
|
817
|
+
) {
|
|
815
818
|
... on AccountNameNotAvailableError {
|
|
816
819
|
__typename
|
|
817
820
|
}
|
|
@@ -843,7 +846,7 @@ const L = o`
|
|
|
843
846
|
}
|
|
844
847
|
}
|
|
845
848
|
}
|
|
846
|
-
`,
|
|
849
|
+
`, dt = o`
|
|
847
850
|
mutation UpdateMemberAccount($input: UpdateMemberAccountInput!) {
|
|
848
851
|
updateMemberAccount(input: $input) {
|
|
849
852
|
... on AccountNameNotAvailableError {
|
|
@@ -869,7 +872,7 @@ const L = o`
|
|
|
869
872
|
}
|
|
870
873
|
}
|
|
871
874
|
}
|
|
872
|
-
`,
|
|
875
|
+
`, mt = o`
|
|
873
876
|
mutation ResetPassword($input: ResetPasswordInput!, $verificationCode: String) {
|
|
874
877
|
resetPassword(input: $input, verificationCode: $verificationCode) {
|
|
875
878
|
... on AccountNotFoundError {
|
|
@@ -1014,7 +1017,7 @@ const L = o`
|
|
|
1014
1017
|
mutation ValidateMayaSession {
|
|
1015
1018
|
validateMayaSession: validMayaSession
|
|
1016
1019
|
}
|
|
1017
|
-
`,
|
|
1020
|
+
`, bt = o`
|
|
1018
1021
|
query ActivityRecords($after: Cursor, $first: Int, $filter: ActivityRecordsFilterInput) {
|
|
1019
1022
|
member {
|
|
1020
1023
|
activityRecords(after: $after, first: $first, filter: $filter) {
|
|
@@ -1039,11 +1042,11 @@ const L = o`
|
|
|
1039
1042
|
}
|
|
1040
1043
|
}
|
|
1041
1044
|
}
|
|
1042
|
-
`,
|
|
1045
|
+
`, At = o`
|
|
1043
1046
|
query ReferralCode {
|
|
1044
1047
|
referralCode
|
|
1045
1048
|
}
|
|
1046
|
-
`,
|
|
1049
|
+
`, Et = o`
|
|
1047
1050
|
mutation UpdateReferralCode($input: UpdateReferralCodeInput!) {
|
|
1048
1051
|
updateReferralCode(input: $input) {
|
|
1049
1052
|
... on ReferralCodeNotAvailableError {
|
|
@@ -1051,8 +1054,42 @@ const L = o`
|
|
|
1051
1054
|
}
|
|
1052
1055
|
}
|
|
1053
1056
|
}
|
|
1057
|
+
`, kt = o`
|
|
1058
|
+
query Referrals($first: Int, $after: Cursor, $filter: ReferralFilterInput) {
|
|
1059
|
+
member {
|
|
1060
|
+
referrals(first: $first, after: $after, filter: $filter) {
|
|
1061
|
+
edges {
|
|
1062
|
+
cursor
|
|
1063
|
+
node {
|
|
1064
|
+
... on Referral {
|
|
1065
|
+
id
|
|
1066
|
+
upline {
|
|
1067
|
+
id
|
|
1068
|
+
name
|
|
1069
|
+
realName
|
|
1070
|
+
}
|
|
1071
|
+
downline {
|
|
1072
|
+
id
|
|
1073
|
+
name
|
|
1074
|
+
realName
|
|
1075
|
+
}
|
|
1076
|
+
level
|
|
1077
|
+
turnover
|
|
1078
|
+
commission
|
|
1079
|
+
dateTimeCreated
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
totalCount
|
|
1084
|
+
pageInfo {
|
|
1085
|
+
hasNextPage
|
|
1086
|
+
endCursor
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1054
1091
|
`;
|
|
1055
|
-
function
|
|
1092
|
+
function m(n) {
|
|
1056
1093
|
return {
|
|
1057
1094
|
name: n,
|
|
1058
1095
|
message: {
|
|
@@ -1107,9 +1144,9 @@ function d(n) {
|
|
|
1107
1144
|
}[n]
|
|
1108
1145
|
};
|
|
1109
1146
|
}
|
|
1110
|
-
class
|
|
1147
|
+
class _t {
|
|
1111
1148
|
constructor(e) {
|
|
1112
|
-
|
|
1149
|
+
d(this, "client");
|
|
1113
1150
|
this.client = e;
|
|
1114
1151
|
}
|
|
1115
1152
|
/** aka `Query.self` */
|
|
@@ -1124,25 +1161,25 @@ class kt {
|
|
|
1124
1161
|
const t = await this.client.request(it, e);
|
|
1125
1162
|
return t.ok ? t.data.registerMemberAccount ? {
|
|
1126
1163
|
ok: !1,
|
|
1127
|
-
error:
|
|
1164
|
+
error: m(t.data.registerMemberAccount.__typename)
|
|
1128
1165
|
} : {
|
|
1129
1166
|
ok: !0
|
|
1130
1167
|
} : t;
|
|
1131
1168
|
}
|
|
1132
|
-
async
|
|
1169
|
+
async registerMemberAccount__next(e) {
|
|
1133
1170
|
const t = await this.client.request(st, e);
|
|
1134
|
-
return t.ok ? t.data.
|
|
1171
|
+
return t.ok ? t.data.registerMemberAccount ? {
|
|
1135
1172
|
ok: !1,
|
|
1136
|
-
error:
|
|
1173
|
+
error: m(t.data.registerMemberAccount.__typename)
|
|
1137
1174
|
} : {
|
|
1138
1175
|
ok: !0
|
|
1139
1176
|
} : t;
|
|
1140
1177
|
}
|
|
1141
1178
|
async updateMemberAccount(e) {
|
|
1142
|
-
const t = await this.client.request(
|
|
1179
|
+
const t = await this.client.request(dt, e);
|
|
1143
1180
|
return t.ok ? t.data.updateMemberAccount ? {
|
|
1144
1181
|
ok: !1,
|
|
1145
|
-
error:
|
|
1182
|
+
error: m(t.data.updateMemberAccount.__typename)
|
|
1146
1183
|
} : {
|
|
1147
1184
|
ok: !0
|
|
1148
1185
|
} : t;
|
|
@@ -1161,12 +1198,12 @@ class kt {
|
|
|
1161
1198
|
}
|
|
1162
1199
|
async resetPassword(e) {
|
|
1163
1200
|
const t = await this.client.request(
|
|
1164
|
-
|
|
1201
|
+
mt,
|
|
1165
1202
|
e
|
|
1166
1203
|
);
|
|
1167
1204
|
return t.ok ? t.data.resetPassword ? {
|
|
1168
1205
|
ok: !1,
|
|
1169
|
-
error:
|
|
1206
|
+
error: m(t.data.resetPassword.__typename)
|
|
1170
1207
|
} : {
|
|
1171
1208
|
ok: !0
|
|
1172
1209
|
} : t;
|
|
@@ -1182,7 +1219,7 @@ class kt {
|
|
|
1182
1219
|
const t = await this.client.request(yt, e);
|
|
1183
1220
|
return t.ok ? t.data.sendVerificationCode ? {
|
|
1184
1221
|
ok: !1,
|
|
1185
|
-
error:
|
|
1222
|
+
error: m(t.data.sendVerificationCode.__typename)
|
|
1186
1223
|
} : {
|
|
1187
1224
|
ok: !0
|
|
1188
1225
|
} : t;
|
|
@@ -1191,7 +1228,7 @@ class kt {
|
|
|
1191
1228
|
const t = await this.client.request(lt, e);
|
|
1192
1229
|
return t.ok ? t.data.verifyMobileNumber ? {
|
|
1193
1230
|
ok: !1,
|
|
1194
|
-
error:
|
|
1231
|
+
error: m(t.data.verifyMobileNumber.__typename)
|
|
1195
1232
|
} : {
|
|
1196
1233
|
ok: !0
|
|
1197
1234
|
} : t;
|
|
@@ -1200,7 +1237,7 @@ class kt {
|
|
|
1200
1237
|
const t = await this.client.request(pt, e);
|
|
1201
1238
|
return t.ok ? t.data.createMemberVerification ? {
|
|
1202
1239
|
ok: !1,
|
|
1203
|
-
error:
|
|
1240
|
+
error: m(t.data.createMemberVerification.__typename)
|
|
1204
1241
|
} : {
|
|
1205
1242
|
ok: !0
|
|
1206
1243
|
} : t;
|
|
@@ -1209,7 +1246,7 @@ class kt {
|
|
|
1209
1246
|
const t = await this.client.request(ft, e);
|
|
1210
1247
|
return t.ok ? t.data.updateMemberVerification ? {
|
|
1211
1248
|
ok: !1,
|
|
1212
|
-
error:
|
|
1249
|
+
error: m(t.data.updateMemberVerification.__typename)
|
|
1213
1250
|
} : {
|
|
1214
1251
|
ok: !0
|
|
1215
1252
|
} : t;
|
|
@@ -1235,32 +1272,32 @@ class kt {
|
|
|
1235
1272
|
const t = await this.client.request(ct, e);
|
|
1236
1273
|
return t.ok ? t.data.registerMayaMemberAccount ? {
|
|
1237
1274
|
ok: !1,
|
|
1238
|
-
error:
|
|
1275
|
+
error: m(t.data.registerMayaMemberAccount.__typename)
|
|
1239
1276
|
} : {
|
|
1240
1277
|
ok: !0
|
|
1241
1278
|
} : t;
|
|
1242
1279
|
}
|
|
1243
1280
|
async referralCode() {
|
|
1244
|
-
const e = await this.client.request(
|
|
1281
|
+
const e = await this.client.request(At);
|
|
1245
1282
|
return e.ok ? {
|
|
1246
1283
|
ok: !0,
|
|
1247
1284
|
data: e.data.referralCode
|
|
1248
1285
|
} : e;
|
|
1249
1286
|
}
|
|
1250
1287
|
async updateReferralCode(e) {
|
|
1251
|
-
const t = await this.client.request(
|
|
1288
|
+
const t = await this.client.request(Et, e);
|
|
1252
1289
|
return t.ok ? t.data.updateReferralCode ? {
|
|
1253
1290
|
ok: !1,
|
|
1254
|
-
error:
|
|
1291
|
+
error: m(t.data.updateReferralCode.__typename)
|
|
1255
1292
|
} : {
|
|
1256
1293
|
ok: !0
|
|
1257
1294
|
} : t;
|
|
1258
1295
|
}
|
|
1259
1296
|
}
|
|
1260
|
-
function
|
|
1297
|
+
function E(n) {
|
|
1261
1298
|
return n.startsWith("+63") ? n : n.startsWith("63") ? `+${n}` : n.startsWith("0") ? `+63${n.substring(1)}` : `+63${n}`;
|
|
1262
1299
|
}
|
|
1263
|
-
function
|
|
1300
|
+
function f(n, e) {
|
|
1264
1301
|
const t = V[n] ? V[n] : V[500];
|
|
1265
1302
|
return {
|
|
1266
1303
|
name: t.name,
|
|
@@ -1278,22 +1315,22 @@ const V = {
|
|
|
1278
1315
|
};
|
|
1279
1316
|
class Ct {
|
|
1280
1317
|
constructor(e) {
|
|
1281
|
-
|
|
1282
|
-
|
|
1318
|
+
d(this, "url");
|
|
1319
|
+
d(this, "platform");
|
|
1283
1320
|
this.url = e.url, this.platform = e.platform;
|
|
1284
1321
|
}
|
|
1322
|
+
get headers() {
|
|
1323
|
+
const e = new Headers();
|
|
1324
|
+
return e.append("Accept", "application/json, text/plain"), e.append("Content-Type", "application/json"), e.append("Platform-Code", this.platform), e.append("Role", "MEMBER"), e;
|
|
1325
|
+
}
|
|
1285
1326
|
async createSession(e) {
|
|
1286
|
-
const t = new Headers(
|
|
1287
|
-
"Content-Type": "application/json",
|
|
1288
|
-
"Platform-Code": this.platform,
|
|
1289
|
-
Role: "MEMBER"
|
|
1290
|
-
});
|
|
1327
|
+
const t = new Headers(this.headers);
|
|
1291
1328
|
if (e.name) {
|
|
1292
1329
|
const r = `${e.name}:${e.password}`, a = Buffer.from(r).toString("base64");
|
|
1293
1330
|
t.set("Authorization", `Basic ${a}`);
|
|
1294
1331
|
}
|
|
1295
1332
|
if (e.mobileNumber) {
|
|
1296
|
-
const a = `${
|
|
1333
|
+
const a = `${E(e.mobileNumber)}:${e.authenticationCode}`, s = Buffer.from(a).toString("base64");
|
|
1297
1334
|
console.log(`MobileNumberOTP ${s}`), t.set("Authorization", `MobileNumberOTP ${s}`);
|
|
1298
1335
|
}
|
|
1299
1336
|
e.sessionId && t.set("Authorization", `MayaSession ${e.sessionId}`);
|
|
@@ -1307,24 +1344,20 @@ class Ct {
|
|
|
1307
1344
|
data: a
|
|
1308
1345
|
} : a.code === "ACCOUNT_BLACKLISTED" ? {
|
|
1309
1346
|
ok: !1,
|
|
1310
|
-
error:
|
|
1347
|
+
error: m("AccountBlacklisted")
|
|
1311
1348
|
} : {
|
|
1312
1349
|
ok: !1,
|
|
1313
|
-
error:
|
|
1350
|
+
error: f(r.status)
|
|
1314
1351
|
};
|
|
1315
1352
|
} catch {
|
|
1316
1353
|
return {
|
|
1317
1354
|
ok: !1,
|
|
1318
|
-
error:
|
|
1355
|
+
error: f(500)
|
|
1319
1356
|
};
|
|
1320
1357
|
}
|
|
1321
1358
|
}
|
|
1322
1359
|
async authenticate(e) {
|
|
1323
|
-
const t = new Headers(
|
|
1324
|
-
"Content-Type": "application/json",
|
|
1325
|
-
"Platform-Code": this.platform,
|
|
1326
|
-
Role: "MEMBER"
|
|
1327
|
-
});
|
|
1360
|
+
const t = new Headers(this.headers);
|
|
1328
1361
|
if (e.type === "SECURITY_QUESTION") {
|
|
1329
1362
|
t.set("Authorization", `Bearer ${e.token}`);
|
|
1330
1363
|
try {
|
|
@@ -1340,92 +1373,82 @@ class Ct {
|
|
|
1340
1373
|
data: a
|
|
1341
1374
|
} : r.status === 401 || r.status === 403 ? {
|
|
1342
1375
|
ok: !1,
|
|
1343
|
-
error:
|
|
1376
|
+
error: m("InvalidTokenOrSecretAnswer")
|
|
1344
1377
|
} : {
|
|
1345
1378
|
ok: !1,
|
|
1346
|
-
error:
|
|
1379
|
+
error: f(r.status)
|
|
1347
1380
|
};
|
|
1348
1381
|
} catch {
|
|
1349
1382
|
return {
|
|
1350
1383
|
ok: !1,
|
|
1351
|
-
error:
|
|
1384
|
+
error: f(500)
|
|
1352
1385
|
};
|
|
1353
1386
|
}
|
|
1354
1387
|
}
|
|
1355
1388
|
throw new Error("Invalid input 'type'");
|
|
1356
1389
|
}
|
|
1357
1390
|
async refreshSession(e) {
|
|
1391
|
+
const t = new Headers(this.headers);
|
|
1392
|
+
t.append("Authorization", `Bearer ${e}`);
|
|
1358
1393
|
try {
|
|
1359
|
-
const
|
|
1394
|
+
const r = await fetch(`${this.url}/session:refresh`, {
|
|
1360
1395
|
method: "POST",
|
|
1361
|
-
headers:
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
Role: "MEMBER",
|
|
1365
|
-
Authorization: `Bearer ${e}`
|
|
1366
|
-
}
|
|
1367
|
-
}), r = await t.json();
|
|
1368
|
-
return t.ok ? {
|
|
1396
|
+
headers: t
|
|
1397
|
+
}), a = await r.json();
|
|
1398
|
+
return r.ok ? {
|
|
1369
1399
|
ok: !0,
|
|
1370
|
-
data:
|
|
1371
|
-
} :
|
|
1400
|
+
data: a
|
|
1401
|
+
} : a.code === "ACCOUNT_BLACKLISTED" ? {
|
|
1372
1402
|
ok: !1,
|
|
1373
|
-
error:
|
|
1374
|
-
} :
|
|
1403
|
+
error: m("AccountBlacklisted")
|
|
1404
|
+
} : r.status === 403 || r.status === 401 ? {
|
|
1375
1405
|
ok: !1,
|
|
1376
|
-
error:
|
|
1406
|
+
error: m("InvalidToken")
|
|
1377
1407
|
} : {
|
|
1378
1408
|
ok: !1,
|
|
1379
|
-
error:
|
|
1409
|
+
error: f(r.status)
|
|
1380
1410
|
};
|
|
1381
1411
|
} catch {
|
|
1382
1412
|
return {
|
|
1383
1413
|
ok: !1,
|
|
1384
|
-
error:
|
|
1414
|
+
error: f(500)
|
|
1385
1415
|
};
|
|
1386
1416
|
}
|
|
1387
1417
|
}
|
|
1388
1418
|
async destroySession(e) {
|
|
1419
|
+
const t = new Headers(this.headers);
|
|
1420
|
+
t.append("Authorization", `Bearer ${e}`);
|
|
1389
1421
|
try {
|
|
1390
|
-
const
|
|
1422
|
+
const r = await fetch(`${this.url}/session`, {
|
|
1391
1423
|
method: "DELETE",
|
|
1392
|
-
headers:
|
|
1393
|
-
"Content-Type": "application/json",
|
|
1394
|
-
"Platform-Code": this.platform,
|
|
1395
|
-
Role: "MEMBER",
|
|
1396
|
-
Authorization: `Bearer ${e}`
|
|
1397
|
-
}
|
|
1424
|
+
headers: t
|
|
1398
1425
|
});
|
|
1399
|
-
return
|
|
1426
|
+
return r.ok ? { ok: !0 } : { ok: !1, error: f(r.status) };
|
|
1400
1427
|
} catch {
|
|
1401
|
-
return { ok: !1, error:
|
|
1428
|
+
return { ok: !1, error: f(500) };
|
|
1402
1429
|
}
|
|
1403
1430
|
}
|
|
1404
1431
|
async verifySession(e) {
|
|
1432
|
+
const t = new Headers(this.headers);
|
|
1433
|
+
t.append("Authorization", `Bearer ${e}`);
|
|
1405
1434
|
try {
|
|
1406
1435
|
return (await fetch(`${this.url}/session`, {
|
|
1407
1436
|
method: "GET",
|
|
1408
|
-
headers:
|
|
1409
|
-
"Content-Type": "application/json",
|
|
1410
|
-
"Platform-Code": this.platform,
|
|
1411
|
-
Role: "MEMBER",
|
|
1412
|
-
Authorization: `Bearer ${e}`
|
|
1413
|
-
}
|
|
1437
|
+
headers: t
|
|
1414
1438
|
})).ok;
|
|
1415
1439
|
} catch {
|
|
1416
1440
|
return !0;
|
|
1417
1441
|
}
|
|
1418
1442
|
}
|
|
1443
|
+
/**
|
|
1444
|
+
* @deprecated use `sendOtp`
|
|
1445
|
+
*/
|
|
1419
1446
|
async sendVerificationCode(e) {
|
|
1420
|
-
const t =
|
|
1447
|
+
const t = E(e);
|
|
1421
1448
|
try {
|
|
1422
1449
|
const r = await fetch(`${this.url}/sendVerificationCode`, {
|
|
1423
1450
|
method: "POST",
|
|
1424
|
-
headers:
|
|
1425
|
-
"Content-Type": "application/json",
|
|
1426
|
-
"Platform-Code": this.platform,
|
|
1427
|
-
Role: "MEMBER"
|
|
1428
|
-
},
|
|
1451
|
+
headers: this.headers,
|
|
1429
1452
|
body: JSON.stringify({
|
|
1430
1453
|
channel: "SMS",
|
|
1431
1454
|
recipient: t
|
|
@@ -1433,21 +1456,50 @@ class Ct {
|
|
|
1433
1456
|
});
|
|
1434
1457
|
return r.ok ? { ok: !0 } : {
|
|
1435
1458
|
ok: !1,
|
|
1436
|
-
error:
|
|
1459
|
+
error: f(r.status)
|
|
1437
1460
|
};
|
|
1438
1461
|
} catch {
|
|
1439
1462
|
return {
|
|
1440
1463
|
ok: !1,
|
|
1441
|
-
error:
|
|
1464
|
+
error: f(500)
|
|
1465
|
+
};
|
|
1466
|
+
}
|
|
1467
|
+
}
|
|
1468
|
+
async sendVerificationCode__next(e) {
|
|
1469
|
+
const t = E(e);
|
|
1470
|
+
try {
|
|
1471
|
+
const r = await fetch(`${this.url}/otps`, {
|
|
1472
|
+
method: "POST",
|
|
1473
|
+
headers: this.headers,
|
|
1474
|
+
body: JSON.stringify({
|
|
1475
|
+
channel: "SMS",
|
|
1476
|
+
recipient: t
|
|
1477
|
+
})
|
|
1478
|
+
});
|
|
1479
|
+
if (r.status === 403) {
|
|
1480
|
+
const a = await r.json();
|
|
1481
|
+
return {
|
|
1482
|
+
ok: !1,
|
|
1483
|
+
error: f(r.status, a.message)
|
|
1484
|
+
};
|
|
1485
|
+
}
|
|
1486
|
+
return r.ok ? { ok: !0 } : {
|
|
1487
|
+
ok: !1,
|
|
1488
|
+
error: f(r.status)
|
|
1489
|
+
};
|
|
1490
|
+
} catch {
|
|
1491
|
+
return {
|
|
1492
|
+
ok: !1,
|
|
1493
|
+
error: f(500)
|
|
1442
1494
|
};
|
|
1443
1495
|
}
|
|
1444
1496
|
}
|
|
1445
1497
|
}
|
|
1446
|
-
class
|
|
1498
|
+
class Tt {
|
|
1447
1499
|
constructor(e) {
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1500
|
+
d(this, "url");
|
|
1501
|
+
d(this, "siteId");
|
|
1502
|
+
d(this, "platformId");
|
|
1451
1503
|
this.url = e.url, this.siteId = e.site, this.platformId = e.platform;
|
|
1452
1504
|
}
|
|
1453
1505
|
async self() {
|
|
@@ -1458,22 +1510,22 @@ class _t {
|
|
|
1458
1510
|
} : e;
|
|
1459
1511
|
}
|
|
1460
1512
|
async games(e) {
|
|
1461
|
-
var a, s, c, u, l,
|
|
1513
|
+
var a, s, c, u, l, h, y, p, T, v, N, M, I, S, R, D, _, P, x, G, C, $, W, O;
|
|
1462
1514
|
const t = new URLSearchParams();
|
|
1463
|
-
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), (
|
|
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), (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), (h = (l = e == null ? void 0 : e.filter) == null ? void 0 : l.type) != null && h.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), (M = (N = e == null ? void 0 : e.filter) == null ? void 0 : N.provider) != null && M.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 = (_ = e == null ? void 0 : e.filter) == null ? void 0 : _.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()), ($ = (C = e == null ? void 0 : e.filter) == null ? void 0 : C.tags) != null && $.in && t.set(
|
|
1464
1516
|
"filter[tags][in]",
|
|
1465
|
-
e.filter.tags.in.map((
|
|
1466
|
-
), (O = (
|
|
1517
|
+
e.filter.tags.in.map((k) => k.toLowerCase()).join(",")
|
|
1518
|
+
), (O = (W = e == null ? void 0 : e.filter) == null ? void 0 : W.tags) != null && O.notIn && t.set(
|
|
1467
1519
|
"filter[tags][nin]",
|
|
1468
|
-
e.filter.tags.notIn.map((
|
|
1520
|
+
e.filter.tags.notIn.map((k) => k.toLowerCase()).join(",")
|
|
1469
1521
|
);
|
|
1470
1522
|
const r = await this.getJson("/games", t);
|
|
1471
1523
|
return r.ok ? {
|
|
1472
1524
|
ok: !0,
|
|
1473
1525
|
data: {
|
|
1474
|
-
edges: r.data.data.map((
|
|
1475
|
-
node:
|
|
1476
|
-
cursor:
|
|
1526
|
+
edges: r.data.data.map((k) => ({
|
|
1527
|
+
node: k,
|
|
1528
|
+
cursor: k.cursor
|
|
1477
1529
|
})),
|
|
1478
1530
|
totalCount: r.data.totalCount ?? 0,
|
|
1479
1531
|
pageInfo: {
|
|
@@ -1511,19 +1563,19 @@ class _t {
|
|
|
1511
1563
|
data: await a.json()
|
|
1512
1564
|
} : {
|
|
1513
1565
|
ok: !1,
|
|
1514
|
-
error:
|
|
1566
|
+
error: f(a.status)
|
|
1515
1567
|
};
|
|
1516
1568
|
} catch {
|
|
1517
1569
|
return {
|
|
1518
1570
|
ok: !1,
|
|
1519
|
-
error:
|
|
1571
|
+
error: f(500)
|
|
1520
1572
|
};
|
|
1521
1573
|
}
|
|
1522
1574
|
}
|
|
1523
1575
|
}
|
|
1524
|
-
class
|
|
1576
|
+
class vt {
|
|
1525
1577
|
constructor(e) {
|
|
1526
|
-
|
|
1578
|
+
d(this, "client");
|
|
1527
1579
|
this.client = e;
|
|
1528
1580
|
}
|
|
1529
1581
|
async file(e) {
|
|
@@ -1534,18 +1586,18 @@ class Tt {
|
|
|
1534
1586
|
} : t;
|
|
1535
1587
|
}
|
|
1536
1588
|
async uploadPrivateImageFile(e) {
|
|
1537
|
-
const t = await this.client.upload(
|
|
1589
|
+
const t = await this.client.upload(Ne, e);
|
|
1538
1590
|
return t.ok ? t.data.uploadPrivateImageFile ? {
|
|
1539
1591
|
ok: !1,
|
|
1540
|
-
error:
|
|
1592
|
+
error: m(t.data.uploadPrivateImageFile.__typename)
|
|
1541
1593
|
} : {
|
|
1542
1594
|
ok: !0
|
|
1543
1595
|
} : t;
|
|
1544
1596
|
}
|
|
1545
1597
|
}
|
|
1546
|
-
class
|
|
1598
|
+
class Nt {
|
|
1547
1599
|
constructor(e) {
|
|
1548
|
-
|
|
1600
|
+
d(this, "client");
|
|
1549
1601
|
this.client = e;
|
|
1550
1602
|
}
|
|
1551
1603
|
/** @deprecated */
|
|
@@ -1563,16 +1615,16 @@ class vt {
|
|
|
1563
1615
|
}
|
|
1564
1616
|
async gameSession(e) {
|
|
1565
1617
|
const t = await this.client.request(
|
|
1566
|
-
|
|
1618
|
+
be,
|
|
1567
1619
|
e
|
|
1568
1620
|
);
|
|
1569
1621
|
return t.ok ? { ok: !0, data: t.data.node } : t;
|
|
1570
1622
|
}
|
|
1571
1623
|
async createGameSession(e) {
|
|
1572
|
-
const t = await this.client.request(
|
|
1624
|
+
const t = await this.client.request(Ae, e);
|
|
1573
1625
|
return t.ok ? t.data.createGameSession ? {
|
|
1574
1626
|
ok: !1,
|
|
1575
|
-
error:
|
|
1627
|
+
error: m(t.data.createGameSession.__typename)
|
|
1576
1628
|
} : {
|
|
1577
1629
|
ok: !0
|
|
1578
1630
|
} : t;
|
|
@@ -1581,7 +1633,7 @@ class vt {
|
|
|
1581
1633
|
const t = await this.client.request(xe, e);
|
|
1582
1634
|
return t.ok ? t.data.endGameSession ? {
|
|
1583
1635
|
ok: !1,
|
|
1584
|
-
error:
|
|
1636
|
+
error: m(t.data.endGameSession.__typename)
|
|
1585
1637
|
} : {
|
|
1586
1638
|
ok: !0
|
|
1587
1639
|
} : t;
|
|
@@ -1589,7 +1641,7 @@ class vt {
|
|
|
1589
1641
|
}
|
|
1590
1642
|
class Mt {
|
|
1591
1643
|
constructor(e) {
|
|
1592
|
-
|
|
1644
|
+
d(this, "client");
|
|
1593
1645
|
this.client = e;
|
|
1594
1646
|
}
|
|
1595
1647
|
async latestBetRecords() {
|
|
@@ -1600,9 +1652,9 @@ class Mt {
|
|
|
1600
1652
|
} : e;
|
|
1601
1653
|
}
|
|
1602
1654
|
}
|
|
1603
|
-
class
|
|
1655
|
+
class It {
|
|
1604
1656
|
constructor(e) {
|
|
1605
|
-
|
|
1657
|
+
d(this, "client");
|
|
1606
1658
|
this.client = e;
|
|
1607
1659
|
}
|
|
1608
1660
|
async betRecords(e) {
|
|
@@ -1644,15 +1696,22 @@ class Nt {
|
|
|
1644
1696
|
}
|
|
1645
1697
|
async activityRecords(e) {
|
|
1646
1698
|
const t = await this.client.request(
|
|
1647
|
-
|
|
1699
|
+
bt,
|
|
1648
1700
|
e
|
|
1649
1701
|
);
|
|
1650
1702
|
return t.ok ? { ok: t.ok, data: t.data.member.activityRecords } : t;
|
|
1651
1703
|
}
|
|
1704
|
+
async referrals(e) {
|
|
1705
|
+
const t = await this.client.request(
|
|
1706
|
+
kt,
|
|
1707
|
+
e
|
|
1708
|
+
);
|
|
1709
|
+
return t.ok ? { ok: t.ok, data: t.data.member.referrals } : t;
|
|
1710
|
+
}
|
|
1652
1711
|
}
|
|
1653
|
-
class
|
|
1712
|
+
class Rt {
|
|
1654
1713
|
constructor(e) {
|
|
1655
|
-
|
|
1714
|
+
d(this, "url");
|
|
1656
1715
|
this.url = e.url;
|
|
1657
1716
|
}
|
|
1658
1717
|
gameThumbnails(e) {
|
|
@@ -1662,9 +1721,9 @@ class It {
|
|
|
1662
1721
|
];
|
|
1663
1722
|
}
|
|
1664
1723
|
}
|
|
1665
|
-
class
|
|
1724
|
+
class Dt {
|
|
1666
1725
|
constructor(e) {
|
|
1667
|
-
|
|
1726
|
+
d(this, "client");
|
|
1668
1727
|
this.client = e;
|
|
1669
1728
|
}
|
|
1670
1729
|
async promos() {
|
|
@@ -1690,7 +1749,7 @@ class Rt {
|
|
|
1690
1749
|
const t = await this.client.request(rt, e);
|
|
1691
1750
|
return t.ok ? t.data.claimCashbackBonus ? {
|
|
1692
1751
|
ok: !1,
|
|
1693
|
-
error:
|
|
1752
|
+
error: m(t.data.claimCashbackBonus.__typename)
|
|
1694
1753
|
} : {
|
|
1695
1754
|
ok: !0
|
|
1696
1755
|
} : {
|
|
@@ -1703,7 +1762,7 @@ class Rt {
|
|
|
1703
1762
|
return e.ok ? { ok: e.ok, data: e.data.bonus } : e;
|
|
1704
1763
|
}
|
|
1705
1764
|
async wallet() {
|
|
1706
|
-
const e = await this.client.request(
|
|
1765
|
+
const e = await this.client.request(Me);
|
|
1707
1766
|
return e.ok ? { ok: e.ok, data: e.data.wallet } : e;
|
|
1708
1767
|
}
|
|
1709
1768
|
async deposit(e) {
|
|
@@ -1717,7 +1776,7 @@ class Rt {
|
|
|
1717
1776
|
const t = await this.client.request(Le, e);
|
|
1718
1777
|
return t.ok ? t.data.createGCashDeposit ? {
|
|
1719
1778
|
ok: !1,
|
|
1720
|
-
error:
|
|
1779
|
+
error: m(t.data.createGCashDeposit.__typename)
|
|
1721
1780
|
} : {
|
|
1722
1781
|
ok: !0
|
|
1723
1782
|
} : t;
|
|
@@ -1726,7 +1785,7 @@ class Rt {
|
|
|
1726
1785
|
const t = await this.client.request(Ve, e);
|
|
1727
1786
|
return t.ok ? t.data.createMayaDeposit ? {
|
|
1728
1787
|
ok: !1,
|
|
1729
|
-
error:
|
|
1788
|
+
error: m(t.data.createMayaDeposit.__typename)
|
|
1730
1789
|
} : {
|
|
1731
1790
|
ok: !0
|
|
1732
1791
|
} : t;
|
|
@@ -1735,25 +1794,25 @@ class Rt {
|
|
|
1735
1794
|
const t = await this.client.request(He, e);
|
|
1736
1795
|
return t.ok ? t.data.createMayaAppDeposit ? {
|
|
1737
1796
|
ok: !1,
|
|
1738
|
-
error:
|
|
1797
|
+
error: m(t.data.createMayaAppDeposit.__typename)
|
|
1739
1798
|
} : {
|
|
1740
1799
|
ok: !0
|
|
1741
1800
|
} : t;
|
|
1742
1801
|
}
|
|
1743
1802
|
async createGCashWithdrawal(e) {
|
|
1744
|
-
const t = await this.client.request(
|
|
1803
|
+
const t = await this.client.request(Ue, e);
|
|
1745
1804
|
return t.ok ? t.data.createGCashWithdrawal ? {
|
|
1746
1805
|
ok: !1,
|
|
1747
|
-
error:
|
|
1806
|
+
error: m(t.data.createGCashWithdrawal.__typename)
|
|
1748
1807
|
} : {
|
|
1749
1808
|
ok: !0
|
|
1750
1809
|
} : t;
|
|
1751
1810
|
}
|
|
1752
1811
|
async createMayaWithdrawal(e) {
|
|
1753
|
-
const t = await this.client.request(
|
|
1812
|
+
const t = await this.client.request(We, e);
|
|
1754
1813
|
return t.ok ? t.data.createMayaWithdrawal ? {
|
|
1755
1814
|
ok: !1,
|
|
1756
|
-
error:
|
|
1815
|
+
error: m(t.data.createMayaWithdrawal.__typename)
|
|
1757
1816
|
} : {
|
|
1758
1817
|
ok: !0
|
|
1759
1818
|
} : t;
|
|
@@ -1762,7 +1821,7 @@ class Rt {
|
|
|
1762
1821
|
const t = await this.client.request(Oe, e);
|
|
1763
1822
|
return t.ok ? t.data.createMayaAppWithdrawal ? {
|
|
1764
1823
|
ok: !1,
|
|
1765
|
-
error:
|
|
1824
|
+
error: m(t.data.createMayaAppWithdrawal.__typename)
|
|
1766
1825
|
} : {
|
|
1767
1826
|
ok: !0
|
|
1768
1827
|
} : t;
|
|
@@ -1771,7 +1830,7 @@ class Rt {
|
|
|
1771
1830
|
const t = await this.client.request(Be, e);
|
|
1772
1831
|
return t.ok ? t.data.createBankWithdrawal ? {
|
|
1773
1832
|
ok: !1,
|
|
1774
|
-
error:
|
|
1833
|
+
error: m(t.data.createBankWithdrawal.__typename)
|
|
1775
1834
|
} : {
|
|
1776
1835
|
ok: !0
|
|
1777
1836
|
} : t;
|
|
@@ -1790,7 +1849,7 @@ class Rt {
|
|
|
1790
1849
|
const t = await this.client.request(Re, e);
|
|
1791
1850
|
return t.ok ? t.data.pointsToCashConversion ? {
|
|
1792
1851
|
ok: !1,
|
|
1793
|
-
error:
|
|
1852
|
+
error: m(t.data.pointsToCashConversion.__typename)
|
|
1794
1853
|
} : {
|
|
1795
1854
|
ok: !0
|
|
1796
1855
|
} : t;
|
|
@@ -1817,16 +1876,16 @@ class Rt {
|
|
|
1817
1876
|
}
|
|
1818
1877
|
async gameSession(e) {
|
|
1819
1878
|
const t = await this.client.request(
|
|
1820
|
-
|
|
1879
|
+
be,
|
|
1821
1880
|
e
|
|
1822
1881
|
);
|
|
1823
1882
|
return t.ok ? { ok: !0, data: t.data.node } : t;
|
|
1824
1883
|
}
|
|
1825
1884
|
async createGameSession(e) {
|
|
1826
|
-
const t = await this.client.request(
|
|
1885
|
+
const t = await this.client.request(Ae, e);
|
|
1827
1886
|
return t.ok ? t.data.createGameSession ? {
|
|
1828
1887
|
ok: !1,
|
|
1829
|
-
error:
|
|
1888
|
+
error: m(t.data.createGameSession.__typename)
|
|
1830
1889
|
} : {
|
|
1831
1890
|
ok: !0
|
|
1832
1891
|
} : t;
|
|
@@ -1861,18 +1920,18 @@ class Rt {
|
|
|
1861
1920
|
} : e;
|
|
1862
1921
|
}
|
|
1863
1922
|
}
|
|
1864
|
-
function
|
|
1923
|
+
function Pt(n, e, t) {
|
|
1865
1924
|
return n < e ? e : n > t ? t : n;
|
|
1866
1925
|
}
|
|
1867
1926
|
function H(n) {
|
|
1868
1927
|
return Object.prototype.toString.call(n) === "[object Object]" && Object(n) === n;
|
|
1869
1928
|
}
|
|
1870
|
-
function
|
|
1929
|
+
function xt(n) {
|
|
1871
1930
|
const e = [];
|
|
1872
1931
|
function t(r, a = []) {
|
|
1873
1932
|
for (const s in r) {
|
|
1874
1933
|
const c = r[s];
|
|
1875
|
-
H(c) ? t(c, [...a, s]) : Array.isArray(c) ? t(
|
|
1934
|
+
H(c) ? t(c, [...a, s]) : Array.isArray(c) ? t(Gt(c), [...a, s]) : e.push({
|
|
1876
1935
|
key: [...a, s],
|
|
1877
1936
|
value: c
|
|
1878
1937
|
});
|
|
@@ -1880,14 +1939,14 @@ function Pt(n) {
|
|
|
1880
1939
|
}
|
|
1881
1940
|
return t(n), e;
|
|
1882
1941
|
}
|
|
1883
|
-
function
|
|
1942
|
+
function Gt(n) {
|
|
1884
1943
|
return n.reduce((e, t, r) => (e[r] = t, e), {});
|
|
1885
1944
|
}
|
|
1886
|
-
class
|
|
1945
|
+
class U {
|
|
1887
1946
|
constructor(e, t) {
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1947
|
+
d(this, "url");
|
|
1948
|
+
d(this, "options");
|
|
1949
|
+
d(this, "middlewares");
|
|
1891
1950
|
var a;
|
|
1892
1951
|
const r = new Headers((a = t == null ? void 0 : t.fetchOptions) == null ? void 0 : a.headers);
|
|
1893
1952
|
this.url = e, this.options = { ...t == null ? void 0 : t.fetchOptions, headers: r }, this.middlewares = (t == null ? void 0 : t.middlewares) ?? [];
|
|
@@ -1924,11 +1983,11 @@ class W {
|
|
|
1924
1983
|
try {
|
|
1925
1984
|
const l = await fetch(e);
|
|
1926
1985
|
if (!l.ok)
|
|
1927
|
-
return { ok: !1, error:
|
|
1928
|
-
const
|
|
1929
|
-
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:
|
|
1986
|
+
return { ok: !1, error: f(l.status) };
|
|
1987
|
+
const h = await l.json(), y = h.data, p = (t = h.errors) == null ? void 0 : t.at(0);
|
|
1988
|
+
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: f(403, p.message) } : ((s = p.extensions) == null ? void 0 : s.code) === "UNAUTHORIZED" ? { ok: !1, error: f(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: f(400, p.message) } : {
|
|
1930
1989
|
ok: !1,
|
|
1931
|
-
error:
|
|
1990
|
+
error: f(500, p.message)
|
|
1932
1991
|
} : {
|
|
1933
1992
|
ok: !0,
|
|
1934
1993
|
data: y
|
|
@@ -1936,7 +1995,7 @@ class W {
|
|
|
1936
1995
|
} catch {
|
|
1937
1996
|
return {
|
|
1938
1997
|
ok: !1,
|
|
1939
|
-
error:
|
|
1998
|
+
error: f(500)
|
|
1940
1999
|
};
|
|
1941
2000
|
}
|
|
1942
2001
|
}
|
|
@@ -1947,7 +2006,7 @@ class W {
|
|
|
1947
2006
|
return t;
|
|
1948
2007
|
}
|
|
1949
2008
|
createUploadBody(e, t) {
|
|
1950
|
-
const r =
|
|
2009
|
+
const r = xt(t).filter(
|
|
1951
2010
|
(c) => c.value instanceof File || c.value instanceof Blob
|
|
1952
2011
|
), a = new FormData();
|
|
1953
2012
|
a.append(
|
|
@@ -1971,7 +2030,7 @@ async function w(n) {
|
|
|
1971
2030
|
}
|
|
1972
2031
|
class ke {
|
|
1973
2032
|
constructor(e) {
|
|
1974
|
-
|
|
2033
|
+
d(this, "enabled");
|
|
1975
2034
|
this.enabled = (e == null ? void 0 : e.enabled) ?? !0;
|
|
1976
2035
|
}
|
|
1977
2036
|
info(e) {
|
|
@@ -2001,7 +2060,7 @@ function q(n, e) {
|
|
|
2001
2060
|
function ye(n, e) {
|
|
2002
2061
|
return n.getTime() > e.getTime();
|
|
2003
2062
|
}
|
|
2004
|
-
function
|
|
2063
|
+
function _e(n) {
|
|
2005
2064
|
return new Promise((e) => {
|
|
2006
2065
|
setTimeout(e, n);
|
|
2007
2066
|
});
|
|
@@ -2014,8 +2073,8 @@ function we(n, e) {
|
|
|
2014
2073
|
/**/
|
|
2015
2074
|
} = e;
|
|
2016
2075
|
async function s(c, u) {
|
|
2017
|
-
const l = u ?? a,
|
|
2018
|
-
return t(
|
|
2076
|
+
const l = u ?? a, h = await n(...c);
|
|
2077
|
+
return t(h) ? h : l > 1 ? (await _e(r * ((a - l) / 2)), s(c, l - 1)) : h;
|
|
2019
2078
|
}
|
|
2020
2079
|
return async (...c) => await s(c);
|
|
2021
2080
|
}
|
|
@@ -2023,13 +2082,13 @@ function F(n, e) {
|
|
|
2023
2082
|
const t = j(n);
|
|
2024
2083
|
return t.setMinutes(t.getMinutes() - e), t;
|
|
2025
2084
|
}
|
|
2026
|
-
class
|
|
2085
|
+
class $t {
|
|
2027
2086
|
constructor(e) {
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2087
|
+
d(this, "logger");
|
|
2088
|
+
d(this, "storageKey", "session");
|
|
2089
|
+
d(this, "authService");
|
|
2090
|
+
d(this, "walletService");
|
|
2091
|
+
d(this, "_refreshing", !1);
|
|
2033
2092
|
this.authService = e.authService, this.walletService = e.walletService, this.logger = new ke({
|
|
2034
2093
|
enabled: e.logs ?? !1
|
|
2035
2094
|
});
|
|
@@ -2074,13 +2133,13 @@ class Gt {
|
|
|
2074
2133
|
maxAttempt: 5
|
|
2075
2134
|
})();
|
|
2076
2135
|
if (!l.ok) return l;
|
|
2077
|
-
const
|
|
2136
|
+
const h = /* @__PURE__ */ new Date();
|
|
2078
2137
|
return window.localStorage.setItem(
|
|
2079
2138
|
this.storageKey,
|
|
2080
2139
|
JSON.stringify({
|
|
2081
2140
|
...l.data,
|
|
2082
|
-
accessTokenExpiresAt: q(
|
|
2083
|
-
refreshTokenExpiresAt: F(B(
|
|
2141
|
+
accessTokenExpiresAt: q(h, 8).getTime(),
|
|
2142
|
+
refreshTokenExpiresAt: F(B(h, 30), 2).getTime()
|
|
2084
2143
|
})
|
|
2085
2144
|
), {
|
|
2086
2145
|
ok: !0,
|
|
@@ -2149,7 +2208,7 @@ class Gt {
|
|
|
2149
2208
|
data: null
|
|
2150
2209
|
};
|
|
2151
2210
|
if (this.refreshing)
|
|
2152
|
-
return await
|
|
2211
|
+
return await _e(1e3), await this.get();
|
|
2153
2212
|
const e = window.localStorage.getItem(this.storageKey);
|
|
2154
2213
|
if (!e)
|
|
2155
2214
|
return {
|
|
@@ -2250,11 +2309,11 @@ function i(n, e) {
|
|
|
2250
2309
|
}
|
|
2251
2310
|
return e;
|
|
2252
2311
|
}
|
|
2253
|
-
class
|
|
2312
|
+
class Ut {
|
|
2254
2313
|
constructor(e) {
|
|
2255
|
-
|
|
2314
|
+
d(this, "staticService");
|
|
2256
2315
|
const t = (e == null ? void 0 : e.environment) === "development";
|
|
2257
|
-
this.staticService = new
|
|
2316
|
+
this.staticService = new Rt({
|
|
2258
2317
|
url: t ? "https://static.development.opexa.io" : "https://static.opexa.io"
|
|
2259
2318
|
});
|
|
2260
2319
|
}
|
|
@@ -2284,7 +2343,8 @@ class $t {
|
|
|
2284
2343
|
file: this.file.bind(this),
|
|
2285
2344
|
pointsWallet: this.pointsWallet.bind(this),
|
|
2286
2345
|
pointsWalletTransaction: this.pointsWalletTransaction.bind(this),
|
|
2287
|
-
activityRecord: this.activityRecord.bind(this)
|
|
2346
|
+
activityRecord: this.activityRecord.bind(this),
|
|
2347
|
+
referrals: this.referrals.bind(this)
|
|
2288
2348
|
};
|
|
2289
2349
|
}
|
|
2290
2350
|
site(e) {
|
|
@@ -2297,7 +2357,7 @@ class $t {
|
|
|
2297
2357
|
return g(t);
|
|
2298
2358
|
}
|
|
2299
2359
|
platform(e) {
|
|
2300
|
-
var t, r, a, s, c, u, l,
|
|
2360
|
+
var t, r, a, s, c, u, l, h, y, p, T, v, N, M, I, S, R, D, _, P, x, G, C, $, W, O, k, Q, K, J, z, X, Z, ee, te, re, ae, ne, oe, ie, se, ce, de, me, ue, le, pe, fe, he;
|
|
2301
2361
|
return {
|
|
2302
2362
|
paymentSettings: {
|
|
2303
2363
|
minimumFirstDepositAmount: i(e.minimumFirstDepositAmount),
|
|
@@ -2313,34 +2373,34 @@ class $t {
|
|
|
2313
2373
|
},
|
|
2314
2374
|
gcash: {
|
|
2315
2375
|
androidEnabled: ((l = e.gcashDepositGatewaySettings) == null ? void 0 : l.androidEnabled) ?? !1,
|
|
2316
|
-
iosEnabled: ((
|
|
2376
|
+
iosEnabled: ((h = e.gcashDepositGatewaySettings) == null ? void 0 : h.iosEnabled) ?? !1,
|
|
2317
2377
|
webEnabled: ((y = e.gcashDepositGatewaySettings) == null ? void 0 : y.webEnabled) ?? !1,
|
|
2318
2378
|
mobileWebEnabled: ((p = e.gcashDepositGatewaySettings) == null ? void 0 : p.mobileWebEnabled) ?? !1,
|
|
2319
2379
|
minimumAmount: i((T = e.gcashDepositGatewaySettings) == null ? void 0 : T.minimumAmount),
|
|
2320
2380
|
maximumAmount: i((v = e.gcashDepositGatewaySettings) == null ? void 0 : v.maximumAmount)
|
|
2321
2381
|
},
|
|
2322
2382
|
maya: {
|
|
2323
|
-
androidEnabled: ((
|
|
2324
|
-
iosEnabled: ((
|
|
2383
|
+
androidEnabled: ((N = e.mayaDepositGatewaySettings) == null ? void 0 : N.androidEnabled) ?? !1,
|
|
2384
|
+
iosEnabled: ((M = e.mayaDepositGatewaySettings) == null ? void 0 : M.iosEnabled) ?? !1,
|
|
2325
2385
|
webEnabled: ((I = e.mayaDepositGatewaySettings) == null ? void 0 : I.webEnabled) ?? !1,
|
|
2326
2386
|
mobileWebEnabled: ((S = e.mayaDepositGatewaySettings) == null ? void 0 : S.mobileWebEnabled) ?? !1,
|
|
2327
2387
|
minimumAmount: i((R = e.mayaDepositGatewaySettings) == null ? void 0 : R.minimumAmount),
|
|
2328
2388
|
maximumAmount: i((D = e.mayaDepositGatewaySettings) == null ? void 0 : D.maximumAmount)
|
|
2329
2389
|
},
|
|
2330
2390
|
mayaApp: {
|
|
2331
|
-
androidEnabled: ((
|
|
2391
|
+
androidEnabled: ((_ = e.mayaAppDepositGatewaySettings) == null ? void 0 : _.androidEnabled) ?? !1,
|
|
2332
2392
|
iosEnabled: ((P = e.mayaAppDepositGatewaySettings) == null ? void 0 : P.iosEnabled) ?? !1,
|
|
2333
2393
|
webEnabled: ((x = e.mayaAppDepositGatewaySettings) == null ? void 0 : x.webEnabled) ?? !1,
|
|
2334
2394
|
mobileWebEnabled: ((G = e.mayaAppDepositGatewaySettings) == null ? void 0 : G.mobileWebEnabled) ?? !1,
|
|
2335
|
-
minimumAmount: i((
|
|
2395
|
+
minimumAmount: i((C = e.mayaAppDepositGatewaySettings) == null ? void 0 : C.minimumAmount),
|
|
2336
2396
|
maximumAmount: i(($ = e.mayaAppDepositGatewaySettings) == null ? void 0 : $.maximumAmount)
|
|
2337
2397
|
}
|
|
2338
2398
|
},
|
|
2339
2399
|
withdrawalGateway: {
|
|
2340
2400
|
bank: {
|
|
2341
|
-
androidEnabled: ((
|
|
2401
|
+
androidEnabled: ((W = e.bankWithdrawalGatewaySettings) == null ? void 0 : W.androidEnabled) ?? !1,
|
|
2342
2402
|
iosEnabled: ((O = e.bankWithdrawalGatewaySettings) == null ? void 0 : O.iosEnabled) ?? !1,
|
|
2343
|
-
webEnabled: ((
|
|
2403
|
+
webEnabled: ((k = e.bankWithdrawalGatewaySettings) == null ? void 0 : k.webEnabled) ?? !1,
|
|
2344
2404
|
mobileWebEnabled: ((Q = e.bankWithdrawalGatewaySettings) == null ? void 0 : Q.mobileWebEnabled) ?? !1,
|
|
2345
2405
|
minimumAmount: i((K = e.bankWithdrawalGatewaySettings) == null ? void 0 : K.minimumAmount),
|
|
2346
2406
|
maximumAmount: i((J = e.bankWithdrawalGatewaySettings) == null ? void 0 : J.maximumAmount)
|
|
@@ -2365,8 +2425,8 @@ class $t {
|
|
|
2365
2425
|
maximumAmount: i((ce = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ce.maximumAmount)
|
|
2366
2426
|
},
|
|
2367
2427
|
mayaApp: {
|
|
2368
|
-
androidEnabled: ((
|
|
2369
|
-
iosEnabled: ((
|
|
2428
|
+
androidEnabled: ((de = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : de.androidEnabled) ?? !1,
|
|
2429
|
+
iosEnabled: ((me = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : me.iosEnabled) ?? !1,
|
|
2370
2430
|
webEnabled: ((ue = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ue.webEnabled) ?? !1,
|
|
2371
2431
|
mobileWebEnabled: ((le = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : le.mobileWebEnabled) ?? !1,
|
|
2372
2432
|
minimumAmount: i((pe = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : pe.minimumAmount),
|
|
@@ -2696,20 +2756,31 @@ class $t {
|
|
|
2696
2756
|
};
|
|
2697
2757
|
return g(t);
|
|
2698
2758
|
}
|
|
2759
|
+
referrals(e) {
|
|
2760
|
+
return {
|
|
2761
|
+
id: e.id,
|
|
2762
|
+
level: e.level,
|
|
2763
|
+
upline: e.upline,
|
|
2764
|
+
downline: e.downline,
|
|
2765
|
+
turnover: i(e.turnover, 0),
|
|
2766
|
+
commision: i(e.commision, 0),
|
|
2767
|
+
dateTimeCreated: new Date(e.dateTimeCreated)
|
|
2768
|
+
};
|
|
2769
|
+
}
|
|
2699
2770
|
}
|
|
2700
|
-
class
|
|
2771
|
+
class Ft {
|
|
2701
2772
|
constructor(e) {
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2773
|
+
d(this, "cmsPortalService");
|
|
2774
|
+
d(this, "authService");
|
|
2775
|
+
d(this, "gameService");
|
|
2776
|
+
d(this, "fileService");
|
|
2777
|
+
d(this, "walletService");
|
|
2778
|
+
d(this, "accountService");
|
|
2779
|
+
d(this, "reportService");
|
|
2780
|
+
d(this, "portalService");
|
|
2781
|
+
d(this, "sessionManager");
|
|
2782
|
+
d(this, "transformer");
|
|
2783
|
+
d(this, "logger");
|
|
2713
2784
|
const {
|
|
2714
2785
|
/**/
|
|
2715
2786
|
site: t,
|
|
@@ -2718,13 +2789,13 @@ class qt {
|
|
|
2718
2789
|
environment: s,
|
|
2719
2790
|
logs: c
|
|
2720
2791
|
} = e, u = s === "production";
|
|
2721
|
-
this.transformer = new
|
|
2792
|
+
this.transformer = new Ut({
|
|
2722
2793
|
environment: s
|
|
2723
2794
|
}), this.logger = new ke({
|
|
2724
2795
|
enabled: c ?? !1
|
|
2725
2796
|
});
|
|
2726
|
-
const l = u ? "https://auth.opexa.io" : "https://auth.development.opexa.io",
|
|
2727
|
-
url:
|
|
2797
|
+
const l = u ? "https://auth.opexa.io" : "https://auth.development.opexa.io", h = 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", N = u ? "https://game.opexa.io/graphql" : "https://game.development.opexa.io/graphql", M = u ? "https://portal-api.opexacms.io/v1" : "https://portal-api.development.opexacms.io/v1", I = new Tt({
|
|
2798
|
+
url: M,
|
|
2728
2799
|
site: t,
|
|
2729
2800
|
platform: r
|
|
2730
2801
|
}), S = {
|
|
@@ -2735,15 +2806,15 @@ class qt {
|
|
|
2735
2806
|
"Platform-Code": a
|
|
2736
2807
|
}
|
|
2737
2808
|
}
|
|
2738
|
-
}, R = new
|
|
2809
|
+
}, R = new Nt(new U(N, S)), D = new vt(new U(v, S)), _ = new Dt(new U(h, S)), P = new _t(new U(p, S)), x = new It(new U(y, S)), G = new Mt(new U(T, S)), C = new Ct({
|
|
2739
2810
|
url: l,
|
|
2740
2811
|
platform: a
|
|
2741
|
-
}), $ = new
|
|
2812
|
+
}), $ = new $t({
|
|
2742
2813
|
logs: c,
|
|
2743
|
-
authService:
|
|
2744
|
-
walletService:
|
|
2814
|
+
authService: C,
|
|
2815
|
+
walletService: _
|
|
2745
2816
|
});
|
|
2746
|
-
this.authService =
|
|
2817
|
+
this.authService = C, this.gameService = R, this.fileService = D, this.walletService = _, this.accountService = P, this.reportService = x, this.portalService = G, this.sessionManager = $, this.cmsPortalService = I;
|
|
2747
2818
|
}
|
|
2748
2819
|
get authMiddleware() {
|
|
2749
2820
|
return async (e) => {
|
|
@@ -2778,6 +2849,9 @@ class qt {
|
|
|
2778
2849
|
}
|
|
2779
2850
|
}
|
|
2780
2851
|
}
|
|
2852
|
+
/**
|
|
2853
|
+
* @deprecated use `sendVerificationCode__next`
|
|
2854
|
+
*/
|
|
2781
2855
|
async sendAuthenticationCode(e) {
|
|
2782
2856
|
return this.authService.sendVerificationCode(e);
|
|
2783
2857
|
}
|
|
@@ -2860,7 +2934,7 @@ class qt {
|
|
|
2860
2934
|
* ```
|
|
2861
2935
|
*/
|
|
2862
2936
|
watchSession(e) {
|
|
2863
|
-
const t =
|
|
2937
|
+
const t = Pt(e.interval ?? 3e4, 3e4, 6e4);
|
|
2864
2938
|
let r = null;
|
|
2865
2939
|
const a = () => setTimeout(async () => {
|
|
2866
2940
|
await this.sessionManager.verify() || await e.onInvalid(), r = a();
|
|
@@ -2946,7 +3020,7 @@ class qt {
|
|
|
2946
3020
|
* ```
|
|
2947
3021
|
*/
|
|
2948
3022
|
async createAccount(e) {
|
|
2949
|
-
const t = e.id ??
|
|
3023
|
+
const t = e.id ?? b.generate(A.Account).toString(), r = await this.accountService.registerMemberAccount({
|
|
2950
3024
|
input: {
|
|
2951
3025
|
id: t,
|
|
2952
3026
|
btag: e.btag,
|
|
@@ -2954,7 +3028,7 @@ class qt {
|
|
|
2954
3028
|
domain: e.domain,
|
|
2955
3029
|
birthDay: typeof e.dateOfBirth == "string" ? e.dateOfBirth : e.dateOfBirth.toISOString(),
|
|
2956
3030
|
password: await w(e.password),
|
|
2957
|
-
mobileNumber:
|
|
3031
|
+
mobileNumber: E(e.mobileNumber)
|
|
2958
3032
|
},
|
|
2959
3033
|
referralCode: e.referralCode,
|
|
2960
3034
|
verificationCode: e.verificationCode,
|
|
@@ -2969,7 +3043,9 @@ class qt {
|
|
|
2969
3043
|
* id: ObjectId.generate(ObjectType.Account).toString(),
|
|
2970
3044
|
* name: data.name,
|
|
2971
3045
|
* password: data.password,
|
|
3046
|
+
* dateOfBirth: new Date(data.dateOfBirth),
|
|
2972
3047
|
* mobileNumber: data.mobileNumber,
|
|
3048
|
+
* domain: data.domain,
|
|
2973
3049
|
* reCAPTCHAResponse: data.reCAPTCHAResponse,
|
|
2974
3050
|
* });
|
|
2975
3051
|
*
|
|
@@ -2980,13 +3056,13 @@ class qt {
|
|
|
2980
3056
|
* }
|
|
2981
3057
|
* ```
|
|
2982
3058
|
*/
|
|
2983
|
-
async
|
|
2984
|
-
const t = e.id ??
|
|
3059
|
+
async createAccount__next(e) {
|
|
3060
|
+
const t = e.id ?? b.generate(A.Account).toString(), r = await this.accountService.registerMemberAccount__next({
|
|
2985
3061
|
input: {
|
|
2986
3062
|
id: t,
|
|
2987
3063
|
name: e.name,
|
|
2988
3064
|
password: await w(e.password),
|
|
2989
|
-
mobileNumber: e.mobileNumber ?
|
|
3065
|
+
mobileNumber: e.mobileNumber ? E(e.mobileNumber) : void 0
|
|
2990
3066
|
},
|
|
2991
3067
|
reCAPTCHAResponse: e.reCAPTCHAResponse
|
|
2992
3068
|
});
|
|
@@ -3025,7 +3101,7 @@ class qt {
|
|
|
3025
3101
|
password: t.password ? await w(t.password) : void 0,
|
|
3026
3102
|
transactionPassword: t.transactionPassword ? await w(t.transactionPassword) : void 0,
|
|
3027
3103
|
...t.mobileNumber && {
|
|
3028
|
-
mobileNumber:
|
|
3104
|
+
mobileNumber: E(t.mobileNumber)
|
|
3029
3105
|
},
|
|
3030
3106
|
secretAnswer: t.secretAnswer ? await w(t.secretAnswer) : void 0
|
|
3031
3107
|
}
|
|
@@ -3068,7 +3144,7 @@ class qt {
|
|
|
3068
3144
|
* ```
|
|
3069
3145
|
*/
|
|
3070
3146
|
async submitVerificationDetails(e) {
|
|
3071
|
-
const t = e.id ??
|
|
3147
|
+
const t = e.id ?? b.generate(A.Verification).toString(), r = await this.accountService.createMemberVerification({
|
|
3072
3148
|
input: {
|
|
3073
3149
|
id: t,
|
|
3074
3150
|
...e
|
|
@@ -3104,7 +3180,7 @@ class qt {
|
|
|
3104
3180
|
async resetPassword(e) {
|
|
3105
3181
|
return await this.accountService.resetPassword({
|
|
3106
3182
|
input: {
|
|
3107
|
-
mobileNumber:
|
|
3183
|
+
mobileNumber: E(e.mobileNumber),
|
|
3108
3184
|
newPassword: await w(e.newPassword)
|
|
3109
3185
|
},
|
|
3110
3186
|
verificationCode: e.verificationCode
|
|
@@ -3128,10 +3204,13 @@ class qt {
|
|
|
3128
3204
|
return await this.accountService.sendVerificationCode({
|
|
3129
3205
|
input: {
|
|
3130
3206
|
channel: "SMS",
|
|
3131
|
-
recipient:
|
|
3207
|
+
recipient: E(e)
|
|
3132
3208
|
}
|
|
3133
3209
|
});
|
|
3134
3210
|
}
|
|
3211
|
+
async sendVerificationCode__next(e) {
|
|
3212
|
+
return this.authService.sendVerificationCode__next(e);
|
|
3213
|
+
}
|
|
3135
3214
|
async wallet() {
|
|
3136
3215
|
const e = await this.walletService.wallet();
|
|
3137
3216
|
return e.ok ? {
|
|
@@ -3192,7 +3271,7 @@ class qt {
|
|
|
3192
3271
|
* ```
|
|
3193
3272
|
*/
|
|
3194
3273
|
async createWithdrawal(e) {
|
|
3195
|
-
const t = e.id ??
|
|
3274
|
+
const t = e.id ?? b.generate(A.Withdrawal).toString();
|
|
3196
3275
|
if (e.type === "BANK") {
|
|
3197
3276
|
const r = await this.walletService.createBankWithdrawal({
|
|
3198
3277
|
input: {
|
|
@@ -3209,7 +3288,7 @@ class qt {
|
|
|
3209
3288
|
id: t,
|
|
3210
3289
|
amount: e.amount.toString(),
|
|
3211
3290
|
transactionPassword: await w(e.transactionPassword),
|
|
3212
|
-
recipientMobileNumber:
|
|
3291
|
+
recipientMobileNumber: E(e.recipientMobileNumber)
|
|
3213
3292
|
}
|
|
3214
3293
|
});
|
|
3215
3294
|
if (!r.ok) return r;
|
|
@@ -3220,7 +3299,7 @@ class qt {
|
|
|
3220
3299
|
id: t,
|
|
3221
3300
|
amount: e.amount.toString(),
|
|
3222
3301
|
transactionPassword: await w(e.transactionPassword),
|
|
3223
|
-
recipientMobileNumber:
|
|
3302
|
+
recipientMobileNumber: E(e.recipientMobileNumber)
|
|
3224
3303
|
}
|
|
3225
3304
|
});
|
|
3226
3305
|
if (!r.ok) return r;
|
|
@@ -3278,7 +3357,7 @@ class qt {
|
|
|
3278
3357
|
* ```
|
|
3279
3358
|
*/
|
|
3280
3359
|
async createDeposit(e) {
|
|
3281
|
-
const t = e.id ??
|
|
3360
|
+
const t = e.id ?? b.generate(A.Deposit).toString();
|
|
3282
3361
|
if (e.type === "MAYA") {
|
|
3283
3362
|
const r = await this.walletService.createMayaDeposit({
|
|
3284
3363
|
input: {
|
|
@@ -3564,19 +3643,19 @@ class qt {
|
|
|
3564
3643
|
* ```
|
|
3565
3644
|
*/
|
|
3566
3645
|
async createGameSession(e) {
|
|
3567
|
-
const t = e.id ??
|
|
3646
|
+
const t = e.id ?? b.generate(A.GameSession).toString(), r = await this.walletService.createGameSession({ input: { id: t, game: e.game } });
|
|
3568
3647
|
return r.ok ? { ok: !0, data: { id: t } } : r;
|
|
3569
3648
|
}
|
|
3570
3649
|
/** @deprecated use `createGameSession__next` */
|
|
3571
3650
|
async createGameSession__legacy(e) {
|
|
3572
|
-
const t = e.id ??
|
|
3651
|
+
const t = e.id ?? b.generate(A.GameSession).toString(), r = await this.gameService.createGameSession({ input: { id: t, game: e.game } });
|
|
3573
3652
|
return r.ok ? { ok: !0, data: { id: t } } : r;
|
|
3574
3653
|
}
|
|
3575
3654
|
async createGameSession__next(e) {
|
|
3576
|
-
const t = e.id ??
|
|
3655
|
+
const t = e.id ?? b.generate(A.GameSession).toString();
|
|
3577
3656
|
if (e.game.startsWith("SPORTS:")) {
|
|
3578
|
-
const u = await
|
|
3579
|
-
(
|
|
3657
|
+
const u = await b.generateFromKey(A.Game, e.game).then(
|
|
3658
|
+
(h) => h.toString()
|
|
3580
3659
|
), l = await this.gameService.createGameSession({
|
|
3581
3660
|
input: {
|
|
3582
3661
|
id: t,
|
|
@@ -3598,7 +3677,7 @@ class qt {
|
|
|
3598
3677
|
/**/
|
|
3599
3678
|
provider: a,
|
|
3600
3679
|
reference: s
|
|
3601
|
-
} = r.data, c =
|
|
3680
|
+
} = r.data, c = Ot(a) ? await this.walletService.createGameSession({ input: { id: t, game: s } }) : await this.gameService.createGameSession({ input: { id: t, game: s } });
|
|
3602
3681
|
return c.ok ? { ok: !0, data: { id: t } } : c;
|
|
3603
3682
|
}
|
|
3604
3683
|
/** @deprecated use `endGameSession__next` */
|
|
@@ -3641,7 +3720,7 @@ class qt {
|
|
|
3641
3720
|
* ```
|
|
3642
3721
|
*/
|
|
3643
3722
|
async uploadImageFile(e) {
|
|
3644
|
-
const t = e.id ??
|
|
3723
|
+
const t = e.id ?? b.generate(A.File).toString(), r = await this.fileService.uploadPrivateImageFile({
|
|
3645
3724
|
input: {
|
|
3646
3725
|
id: t,
|
|
3647
3726
|
file: e.file
|
|
@@ -3718,6 +3797,21 @@ class qt {
|
|
|
3718
3797
|
async updateReferralCode(e) {
|
|
3719
3798
|
return await this.accountService.updateReferralCode({ input: e });
|
|
3720
3799
|
}
|
|
3800
|
+
async referrals(e) {
|
|
3801
|
+
const t = await this.reportService.referrals(e);
|
|
3802
|
+
return t.ok ? {
|
|
3803
|
+
ok: !0,
|
|
3804
|
+
data: {
|
|
3805
|
+
referrals: t.data.edges.map(({ cursor: r, node: a }) => ({
|
|
3806
|
+
...this.transformer.transform.referrals(a),
|
|
3807
|
+
cursor: r
|
|
3808
|
+
})),
|
|
3809
|
+
totalCount: t.data.totalCount,
|
|
3810
|
+
hasNextPage: t.data.pageInfo.hasNextPage,
|
|
3811
|
+
endCursor: t.data.pageInfo.endCursor ?? void 0
|
|
3812
|
+
}
|
|
3813
|
+
} : t;
|
|
3814
|
+
}
|
|
3721
3815
|
}
|
|
3722
3816
|
const Wt = [
|
|
3723
3817
|
/**/
|
|
@@ -3729,12 +3823,12 @@ const Wt = [
|
|
|
3729
3823
|
"EVOLUTION_NETENT",
|
|
3730
3824
|
"EVOLUTION_REDTIGER"
|
|
3731
3825
|
];
|
|
3732
|
-
function
|
|
3826
|
+
function Ot(n) {
|
|
3733
3827
|
return Wt.some((e) => e === n);
|
|
3734
3828
|
}
|
|
3735
3829
|
export {
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3830
|
+
Ht as ObjectId,
|
|
3831
|
+
A as ObjectType,
|
|
3832
|
+
Ft as Sdk
|
|
3739
3833
|
};
|
|
3740
3834
|
//# sourceMappingURL=index.mjs.map
|