@opexa/portal-sdk 0.0.72 → 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.mjs CHANGED
@@ -1,8 +1,8 @@
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);
1
+ var _e = Object.defineProperty;
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 m = (n, e, t) => Te(n, typeof e != "symbol" ? e + "" : e, t);
4
4
  import { ObjectId as b } from "@opexa/object-id";
5
- import { ObjectId as Ht } from "@opexa/object-id";
5
+ import { ObjectId as Yt } from "@opexa/object-id";
6
6
  const A = {
7
7
  Account: 8,
8
8
  Deposit: 9,
@@ -38,7 +38,7 @@ const L = o`
38
38
  }
39
39
  }
40
40
  }
41
- `, Ne = o`
41
+ `, Me = 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
- `, Me = o`
55
+ `, Ne = o`
56
56
  query Wallet {
57
57
  wallet {
58
58
  id
@@ -293,7 +293,7 @@ const L = o`
293
293
  }
294
294
  }
295
295
  }
296
- `, We = o`
296
+ `, Oe = o`
297
297
  mutation CreateMayaWithdrawal($input: CreateMayaWithdrawalInput!) {
298
298
  createMayaWithdrawal(input: $input) {
299
299
  ... on AccountNotVerifiedError {
@@ -316,7 +316,7 @@ const L = o`
316
316
  }
317
317
  }
318
318
  }
319
- `, Oe = o`
319
+ `, We = o`
320
320
  mutation CreateMayaAppWithdrawal($input: CreateMayaAppWithdrawalInput!) {
321
321
  createMayaAppWithdrawal(input: $input) {
322
322
  ... on AccountNotVerifiedError {
@@ -807,6 +807,33 @@ const L = o`
807
807
  }
808
808
  }
809
809
  `, st = o`
810
+ mutation RegisterMemberAccountViaMobile(
811
+ $input: RegisterMemberAccountViaMobileInput!
812
+ $referralCode: String
813
+ $reCAPTCHAResponse: String
814
+ $verificationCode: String
815
+ ) {
816
+ registerMemberAccountViaMobile(
817
+ input: $input
818
+ referralCode: $referralCode
819
+ verificationCode: $verificationCode
820
+ reCAPTCHAResponse: $reCAPTCHAResponse
821
+ ) {
822
+ ... on InvalidPlatformError {
823
+ __typename
824
+ }
825
+ ... on InvalidReCAPTCHAResponseError {
826
+ __typename
827
+ }
828
+ ... on InvalidSMSVerificationCodeError {
829
+ __typename
830
+ }
831
+ ... on MobileNumberNotAvailableError {
832
+ __typename
833
+ }
834
+ }
835
+ }
836
+ `, ct = o`
810
837
  mutation RegisterMemberAccount(
811
838
  $input: RegisterMemberAccountInput_next!
812
839
  $reCAPTCHAResponse: String
@@ -838,7 +865,7 @@ const L = o`
838
865
  }
839
866
  }
840
867
  }
841
- `, ct = o`
868
+ `, mt = o`
842
869
  mutation RegisterMayaMemberAccount($input: RegisterMayaMemberAccountInput!) {
843
870
  registerMayaMemberAccount(input: $input) {
844
871
  ... on AccountNameNotAvailableError {
@@ -872,7 +899,7 @@ const L = o`
872
899
  }
873
900
  }
874
901
  }
875
- `, mt = o`
902
+ `, ut = o`
876
903
  mutation ResetPassword($input: ResetPasswordInput!, $verificationCode: String) {
877
904
  resetPassword(input: $input, verificationCode: $verificationCode) {
878
905
  ... on AccountNotFoundError {
@@ -883,11 +910,11 @@ const L = o`
883
910
  }
884
911
  }
885
912
  }
886
- `, ut = o`
913
+ `, lt = o`
887
914
  mutation DeleteMemberAccount($input: DeleteMemberAccountInput!) {
888
915
  deleteMemberAccount(input: $input)
889
916
  }
890
- `, lt = o`
917
+ `, pt = o`
891
918
  mutation VerifyMobileNumber($input: VerifyMobileNumberInput!) {
892
919
  verifyMobileNumber(input: $input) {
893
920
  ... on InvalidSMSVerificationCodeError {
@@ -898,7 +925,7 @@ const L = o`
898
925
  }
899
926
  }
900
927
  }
901
- `, pt = o`
928
+ `, ft = o`
902
929
  mutation CreateMemberVerification($input: CreateMemberVerificationInput!) {
903
930
  createMemberVerification(input: $input) {
904
931
  ... on FileDoesNotExistError {
@@ -912,7 +939,7 @@ const L = o`
912
939
  }
913
940
  }
914
941
  }
915
- `, ft = o`
942
+ `, ht = o`
916
943
  mutation UpdateMemberVerification($input: UpdateMemberVerificationInput!) {
917
944
  updateMemberVerification(input: $input) {
918
945
  ... on FileDoesNotExistError {
@@ -929,7 +956,7 @@ const L = o`
929
956
  }
930
957
  }
931
958
  }
932
- `, ht = o`
959
+ `, yt = o`
933
960
  query ProfileCompletion {
934
961
  profileCompletion {
935
962
  completionPercentage
@@ -940,7 +967,7 @@ const L = o`
940
967
  accountPassword
941
968
  }
942
969
  }
943
- `, yt = o`
970
+ `, wt = o`
944
971
  mutation SendVerificationCode($input: SendVerificationCodeInput!) {
945
972
  sendVerificationCode(input: $input) {
946
973
  ... on InvalidPlatformError {
@@ -951,7 +978,7 @@ const L = o`
951
978
  }
952
979
  }
953
980
  }
954
- `, wt = o`
981
+ `, gt = o`
955
982
  fragment DepositGatewaySettingsCoreData on DepositGatewaySettings {
956
983
  minimumAmount
957
984
  maximumAmount
@@ -1005,7 +1032,7 @@ const L = o`
1005
1032
  multiplier
1006
1033
  }
1007
1034
  }
1008
- `, gt = o`
1035
+ `, St = o`
1009
1036
  query MayaSession($id: ObjectId!) {
1010
1037
  mayaSession(id: $id) {
1011
1038
  id
@@ -1013,11 +1040,11 @@ const L = o`
1013
1040
  dateTimeCreated
1014
1041
  }
1015
1042
  }
1016
- `, St = o`
1043
+ `, bt = o`
1017
1044
  mutation ValidateMayaSession {
1018
1045
  validateMayaSession: validMayaSession
1019
1046
  }
1020
- `, bt = o`
1047
+ `, At = o`
1021
1048
  query ActivityRecords($after: Cursor, $first: Int, $filter: ActivityRecordsFilterInput) {
1022
1049
  member {
1023
1050
  activityRecords(after: $after, first: $first, filter: $filter) {
@@ -1042,11 +1069,11 @@ const L = o`
1042
1069
  }
1043
1070
  }
1044
1071
  }
1045
- `, At = o`
1072
+ `, Et = o`
1046
1073
  query ReferralCode {
1047
1074
  referralCode
1048
1075
  }
1049
- `, Et = o`
1076
+ `, kt = o`
1050
1077
  mutation UpdateReferralCode($input: UpdateReferralCodeInput!) {
1051
1078
  updateReferralCode(input: $input) {
1052
1079
  ... on ReferralCodeNotAvailableError {
@@ -1054,7 +1081,7 @@ const L = o`
1054
1081
  }
1055
1082
  }
1056
1083
  }
1057
- `, kt = o`
1084
+ `, Ct = o`
1058
1085
  query Referrals($first: Int, $after: Cursor, $filter: ReferralFilterInput) {
1059
1086
  member {
1060
1087
  referrals(first: $first, after: $after, filter: $filter) {
@@ -1089,7 +1116,7 @@ const L = o`
1089
1116
  }
1090
1117
  }
1091
1118
  `;
1092
- function m(n) {
1119
+ function d(n) {
1093
1120
  return {
1094
1121
  name: n,
1095
1122
  message: {
@@ -1146,7 +1173,7 @@ function m(n) {
1146
1173
  }
1147
1174
  class _t {
1148
1175
  constructor(e) {
1149
- d(this, "client");
1176
+ m(this, "client");
1150
1177
  this.client = e;
1151
1178
  }
1152
1179
  /** aka `Query.self` */
@@ -1161,16 +1188,25 @@ class _t {
1161
1188
  const t = await this.client.request(it, e);
1162
1189
  return t.ok ? t.data.registerMemberAccount ? {
1163
1190
  ok: !1,
1164
- error: m(t.data.registerMemberAccount.__typename)
1191
+ error: d(t.data.registerMemberAccount.__typename)
1165
1192
  } : {
1166
1193
  ok: !0
1167
1194
  } : t;
1168
1195
  }
1169
- async registerMemberAccount__next(e) {
1196
+ async registerMemberAccountViaMobile(e) {
1170
1197
  const t = await this.client.request(st, e);
1198
+ return t.ok ? t.data.registerMemberAccountViaMobile ? {
1199
+ ok: !1,
1200
+ error: d(t.data.registerMemberAccountViaMobile.__typename)
1201
+ } : {
1202
+ ok: !0
1203
+ } : t;
1204
+ }
1205
+ async registerMemberAccount__next(e) {
1206
+ const t = await this.client.request(ct, e);
1171
1207
  return t.ok ? t.data.registerMemberAccount ? {
1172
1208
  ok: !1,
1173
- error: m(t.data.registerMemberAccount.__typename)
1209
+ error: d(t.data.registerMemberAccount.__typename)
1174
1210
  } : {
1175
1211
  ok: !0
1176
1212
  } : t;
@@ -1179,13 +1215,13 @@ class _t {
1179
1215
  const t = await this.client.request(dt, e);
1180
1216
  return t.ok ? t.data.updateMemberAccount ? {
1181
1217
  ok: !1,
1182
- error: m(t.data.updateMemberAccount.__typename)
1218
+ error: d(t.data.updateMemberAccount.__typename)
1183
1219
  } : {
1184
1220
  ok: !0
1185
1221
  } : t;
1186
1222
  }
1187
1223
  async deleteMemberAccount(e) {
1188
- const t = await this.client.request(ut, e);
1224
+ const t = await this.client.request(lt, e);
1189
1225
  return t.ok ? t.data.deleteMemberAccount ? {
1190
1226
  ok: !0
1191
1227
  } : {
@@ -1198,55 +1234,55 @@ class _t {
1198
1234
  }
1199
1235
  async resetPassword(e) {
1200
1236
  const t = await this.client.request(
1201
- mt,
1237
+ ut,
1202
1238
  e
1203
1239
  );
1204
1240
  return t.ok ? t.data.resetPassword ? {
1205
1241
  ok: !1,
1206
- error: m(t.data.resetPassword.__typename)
1242
+ error: d(t.data.resetPassword.__typename)
1207
1243
  } : {
1208
1244
  ok: !0
1209
1245
  } : t;
1210
1246
  }
1211
1247
  async profileCompletion() {
1212
- const e = await this.client.request(ht);
1248
+ const e = await this.client.request(yt);
1213
1249
  return e.ok ? { ok: !0, data: e.data.profileCompletion } : e;
1214
1250
  }
1215
1251
  async platform() {
1216
- return await this.client.request(wt);
1252
+ return await this.client.request(gt);
1217
1253
  }
1218
1254
  async sendVerificationCode(e) {
1219
- const t = await this.client.request(yt, e);
1255
+ const t = await this.client.request(wt, e);
1220
1256
  return t.ok ? t.data.sendVerificationCode ? {
1221
1257
  ok: !1,
1222
- error: m(t.data.sendVerificationCode.__typename)
1258
+ error: d(t.data.sendVerificationCode.__typename)
1223
1259
  } : {
1224
1260
  ok: !0
1225
1261
  } : t;
1226
1262
  }
1227
1263
  async verifyMobileNumber(e) {
1228
- const t = await this.client.request(lt, e);
1264
+ const t = await this.client.request(pt, e);
1229
1265
  return t.ok ? t.data.verifyMobileNumber ? {
1230
1266
  ok: !1,
1231
- error: m(t.data.verifyMobileNumber.__typename)
1267
+ error: d(t.data.verifyMobileNumber.__typename)
1232
1268
  } : {
1233
1269
  ok: !0
1234
1270
  } : t;
1235
1271
  }
1236
1272
  async createMemberVerification(e) {
1237
- const t = await this.client.request(pt, e);
1273
+ const t = await this.client.request(ft, e);
1238
1274
  return t.ok ? t.data.createMemberVerification ? {
1239
1275
  ok: !1,
1240
- error: m(t.data.createMemberVerification.__typename)
1276
+ error: d(t.data.createMemberVerification.__typename)
1241
1277
  } : {
1242
1278
  ok: !0
1243
1279
  } : t;
1244
1280
  }
1245
1281
  async updateMemberVerification(e) {
1246
- const t = await this.client.request(ft, e);
1282
+ const t = await this.client.request(ht, e);
1247
1283
  return t.ok ? t.data.updateMemberVerification ? {
1248
1284
  ok: !1,
1249
- error: m(t.data.updateMemberVerification.__typename)
1285
+ error: d(t.data.updateMemberVerification.__typename)
1250
1286
  } : {
1251
1287
  ok: !0
1252
1288
  } : t;
@@ -1269,26 +1305,26 @@ class _t {
1269
1305
  } : t;
1270
1306
  }
1271
1307
  async registerMayaMemberAccount(e) {
1272
- const t = await this.client.request(ct, e);
1308
+ const t = await this.client.request(mt, e);
1273
1309
  return t.ok ? t.data.registerMayaMemberAccount ? {
1274
1310
  ok: !1,
1275
- error: m(t.data.registerMayaMemberAccount.__typename)
1311
+ error: d(t.data.registerMayaMemberAccount.__typename)
1276
1312
  } : {
1277
1313
  ok: !0
1278
1314
  } : t;
1279
1315
  }
1280
1316
  async referralCode() {
1281
- const e = await this.client.request(At);
1317
+ const e = await this.client.request(Et);
1282
1318
  return e.ok ? {
1283
1319
  ok: !0,
1284
1320
  data: e.data.referralCode
1285
1321
  } : e;
1286
1322
  }
1287
1323
  async updateReferralCode(e) {
1288
- const t = await this.client.request(Et, e);
1324
+ const t = await this.client.request(kt, e);
1289
1325
  return t.ok ? t.data.updateReferralCode ? {
1290
1326
  ok: !1,
1291
- error: m(t.data.updateReferralCode.__typename)
1327
+ error: d(t.data.updateReferralCode.__typename)
1292
1328
  } : {
1293
1329
  ok: !0
1294
1330
  } : t;
@@ -1297,7 +1333,7 @@ class _t {
1297
1333
  function E(n) {
1298
1334
  return n.startsWith("+63") ? n : n.startsWith("63") ? `+${n}` : n.startsWith("0") ? `+63${n.substring(1)}` : `+63${n}`;
1299
1335
  }
1300
- function f(n, e) {
1336
+ function h(n, e) {
1301
1337
  const t = V[n] ? V[n] : V[500];
1302
1338
  return {
1303
1339
  name: t.name,
@@ -1313,10 +1349,10 @@ const V = {
1313
1349
  429: { name: "HttpTooManyRequests", message: "Too Many Requests" },
1314
1350
  500: { name: "HttpInternalServerError", message: "Internal Server Error" }
1315
1351
  };
1316
- class Ct {
1352
+ class Tt {
1317
1353
  constructor(e) {
1318
- d(this, "url");
1319
- d(this, "platform");
1354
+ m(this, "url");
1355
+ m(this, "platform");
1320
1356
  this.url = e.url, this.platform = e.platform;
1321
1357
  }
1322
1358
  get headers() {
@@ -1330,7 +1366,7 @@ class Ct {
1330
1366
  t.set("Authorization", `Basic ${a}`);
1331
1367
  }
1332
1368
  if (e.mobileNumber) {
1333
- const a = `${E(e.mobileNumber)}:${e.authenticationCode}`, s = Buffer.from(a).toString("base64");
1369
+ const a = `${E(e.mobileNumber)}:${e.verificationCode}`, s = Buffer.from(a).toString("base64");
1334
1370
  console.log(`MobileNumberOTP ${s}`), t.set("Authorization", `MobileNumberOTP ${s}`);
1335
1371
  }
1336
1372
  e.sessionId && t.set("Authorization", `MayaSession ${e.sessionId}`);
@@ -1344,15 +1380,15 @@ class Ct {
1344
1380
  data: a
1345
1381
  } : a.code === "ACCOUNT_BLACKLISTED" ? {
1346
1382
  ok: !1,
1347
- error: m("AccountBlacklisted")
1383
+ error: d("AccountBlacklisted")
1348
1384
  } : {
1349
1385
  ok: !1,
1350
- error: f(r.status)
1386
+ error: h(r.status)
1351
1387
  };
1352
1388
  } catch {
1353
1389
  return {
1354
1390
  ok: !1,
1355
- error: f(500)
1391
+ error: h(500)
1356
1392
  };
1357
1393
  }
1358
1394
  }
@@ -1373,15 +1409,15 @@ class Ct {
1373
1409
  data: a
1374
1410
  } : r.status === 401 || r.status === 403 ? {
1375
1411
  ok: !1,
1376
- error: m("InvalidTokenOrSecretAnswer")
1412
+ error: d("InvalidTokenOrSecretAnswer")
1377
1413
  } : {
1378
1414
  ok: !1,
1379
- error: f(r.status)
1415
+ error: h(r.status)
1380
1416
  };
1381
1417
  } catch {
1382
1418
  return {
1383
1419
  ok: !1,
1384
- error: f(500)
1420
+ error: h(500)
1385
1421
  };
1386
1422
  }
1387
1423
  }
@@ -1400,18 +1436,18 @@ class Ct {
1400
1436
  data: a
1401
1437
  } : a.code === "ACCOUNT_BLACKLISTED" ? {
1402
1438
  ok: !1,
1403
- error: m("AccountBlacklisted")
1439
+ error: d("AccountBlacklisted")
1404
1440
  } : r.status === 403 || r.status === 401 ? {
1405
1441
  ok: !1,
1406
- error: m("InvalidToken")
1442
+ error: d("InvalidToken")
1407
1443
  } : {
1408
1444
  ok: !1,
1409
- error: f(r.status)
1445
+ error: h(r.status)
1410
1446
  };
1411
1447
  } catch {
1412
1448
  return {
1413
1449
  ok: !1,
1414
- error: f(500)
1450
+ error: h(500)
1415
1451
  };
1416
1452
  }
1417
1453
  }
@@ -1423,9 +1459,9 @@ class Ct {
1423
1459
  method: "DELETE",
1424
1460
  headers: t
1425
1461
  });
1426
- return r.ok ? { ok: !0 } : { ok: !1, error: f(r.status) };
1462
+ return r.ok ? { ok: !0 } : { ok: !1, error: h(r.status) };
1427
1463
  } catch {
1428
- return { ok: !1, error: f(500) };
1464
+ return { ok: !1, error: h(500) };
1429
1465
  }
1430
1466
  }
1431
1467
  async verifySession(e) {
@@ -1440,32 +1476,7 @@ class Ct {
1440
1476
  return !0;
1441
1477
  }
1442
1478
  }
1443
- /**
1444
- * @deprecated use `sendOtp`
1445
- */
1446
1479
  async sendVerificationCode(e) {
1447
- const t = E(e);
1448
- try {
1449
- const r = await fetch(`${this.url}/sendVerificationCode`, {
1450
- method: "POST",
1451
- headers: this.headers,
1452
- body: JSON.stringify({
1453
- channel: "SMS",
1454
- recipient: t
1455
- })
1456
- });
1457
- return r.ok ? { ok: !0 } : {
1458
- ok: !1,
1459
- error: f(r.status)
1460
- };
1461
- } catch {
1462
- return {
1463
- ok: !1,
1464
- error: f(500)
1465
- };
1466
- }
1467
- }
1468
- async sendVerificationCode__next(e) {
1469
1480
  const t = E(e);
1470
1481
  try {
1471
1482
  const r = await fetch(`${this.url}/otps`, {
@@ -1480,26 +1491,26 @@ class Ct {
1480
1491
  const a = await r.json();
1481
1492
  return {
1482
1493
  ok: !1,
1483
- error: f(r.status, a.message)
1494
+ error: h(r.status, a.message)
1484
1495
  };
1485
1496
  }
1486
1497
  return r.ok ? { ok: !0 } : {
1487
1498
  ok: !1,
1488
- error: f(r.status)
1499
+ error: h(r.status)
1489
1500
  };
1490
1501
  } catch {
1491
1502
  return {
1492
1503
  ok: !1,
1493
- error: f(500)
1504
+ error: h(500)
1494
1505
  };
1495
1506
  }
1496
1507
  }
1497
1508
  }
1498
- class Tt {
1509
+ class vt {
1499
1510
  constructor(e) {
1500
- d(this, "url");
1501
- d(this, "siteId");
1502
- d(this, "platformId");
1511
+ m(this, "url");
1512
+ m(this, "siteId");
1513
+ m(this, "platformId");
1503
1514
  this.url = e.url, this.siteId = e.site, this.platformId = e.platform;
1504
1515
  }
1505
1516
  async self() {
@@ -1510,12 +1521,12 @@ class Tt {
1510
1521
  } : e;
1511
1522
  }
1512
1523
  async games(e) {
1513
- var a, s, c, u, l, h, y, p, T, v, N, M, I, S, R, D, _, P, x, G, C, $, W, O;
1524
+ var a, s, c, u, l, f, y, p, T, v, M, N, I, S, R, D, C, P, x, G, _, $, O, W;
1514
1525
  const t = new URLSearchParams();
1515
- e != null && e.first && t.set("first", e.first.toString()), e != null && e.after && t.set("after", e.after), e != null && e.search && t.set("search", e.search), (s = (a = e == null ? void 0 : e.filter) == null ? void 0 : a.type) != null && s.equal && t.set("filter[type][eq]", e.filter.type.equal), (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(
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(
1516
1527
  "filter[tags][in]",
1517
1528
  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(
1529
+ ), (W = (O = e == null ? void 0 : e.filter) == null ? void 0 : O.tags) != null && W.notIn && t.set(
1519
1530
  "filter[tags][nin]",
1520
1531
  e.filter.tags.notIn.map((k) => k.toLowerCase()).join(",")
1521
1532
  );
@@ -1563,19 +1574,19 @@ class Tt {
1563
1574
  data: await a.json()
1564
1575
  } : {
1565
1576
  ok: !1,
1566
- error: f(a.status)
1577
+ error: h(a.status)
1567
1578
  };
1568
1579
  } catch {
1569
1580
  return {
1570
1581
  ok: !1,
1571
- error: f(500)
1582
+ error: h(500)
1572
1583
  };
1573
1584
  }
1574
1585
  }
1575
1586
  }
1576
- class vt {
1587
+ class Mt {
1577
1588
  constructor(e) {
1578
- d(this, "client");
1589
+ m(this, "client");
1579
1590
  this.client = e;
1580
1591
  }
1581
1592
  async file(e) {
@@ -1586,10 +1597,10 @@ class vt {
1586
1597
  } : t;
1587
1598
  }
1588
1599
  async uploadPrivateImageFile(e) {
1589
- const t = await this.client.upload(Ne, e);
1600
+ const t = await this.client.upload(Me, e);
1590
1601
  return t.ok ? t.data.uploadPrivateImageFile ? {
1591
1602
  ok: !1,
1592
- error: m(t.data.uploadPrivateImageFile.__typename)
1603
+ error: d(t.data.uploadPrivateImageFile.__typename)
1593
1604
  } : {
1594
1605
  ok: !0
1595
1606
  } : t;
@@ -1597,7 +1608,7 @@ class vt {
1597
1608
  }
1598
1609
  class Nt {
1599
1610
  constructor(e) {
1600
- d(this, "client");
1611
+ m(this, "client");
1601
1612
  this.client = e;
1602
1613
  }
1603
1614
  /** @deprecated */
@@ -1624,7 +1635,7 @@ class Nt {
1624
1635
  const t = await this.client.request(Ae, e);
1625
1636
  return t.ok ? t.data.createGameSession ? {
1626
1637
  ok: !1,
1627
- error: m(t.data.createGameSession.__typename)
1638
+ error: d(t.data.createGameSession.__typename)
1628
1639
  } : {
1629
1640
  ok: !0
1630
1641
  } : t;
@@ -1633,15 +1644,15 @@ class Nt {
1633
1644
  const t = await this.client.request(xe, e);
1634
1645
  return t.ok ? t.data.endGameSession ? {
1635
1646
  ok: !1,
1636
- error: m(t.data.endGameSession.__typename)
1647
+ error: d(t.data.endGameSession.__typename)
1637
1648
  } : {
1638
1649
  ok: !0
1639
1650
  } : t;
1640
1651
  }
1641
1652
  }
1642
- class Mt {
1653
+ class It {
1643
1654
  constructor(e) {
1644
- d(this, "client");
1655
+ m(this, "client");
1645
1656
  this.client = e;
1646
1657
  }
1647
1658
  async latestBetRecords() {
@@ -1652,9 +1663,9 @@ class Mt {
1652
1663
  } : e;
1653
1664
  }
1654
1665
  }
1655
- class It {
1666
+ class Rt {
1656
1667
  constructor(e) {
1657
- d(this, "client");
1668
+ m(this, "client");
1658
1669
  this.client = e;
1659
1670
  }
1660
1671
  async betRecords(e) {
@@ -1696,22 +1707,22 @@ class It {
1696
1707
  }
1697
1708
  async activityRecords(e) {
1698
1709
  const t = await this.client.request(
1699
- bt,
1710
+ At,
1700
1711
  e
1701
1712
  );
1702
1713
  return t.ok ? { ok: t.ok, data: t.data.member.activityRecords } : t;
1703
1714
  }
1704
1715
  async referrals(e) {
1705
1716
  const t = await this.client.request(
1706
- kt,
1717
+ Ct,
1707
1718
  e
1708
1719
  );
1709
1720
  return t.ok ? { ok: t.ok, data: t.data.member.referrals } : t;
1710
1721
  }
1711
1722
  }
1712
- class Rt {
1723
+ class Dt {
1713
1724
  constructor(e) {
1714
- d(this, "url");
1725
+ m(this, "url");
1715
1726
  this.url = e.url;
1716
1727
  }
1717
1728
  gameThumbnails(e) {
@@ -1721,9 +1732,9 @@ class Rt {
1721
1732
  ];
1722
1733
  }
1723
1734
  }
1724
- class Dt {
1735
+ class Pt {
1725
1736
  constructor(e) {
1726
- d(this, "client");
1737
+ m(this, "client");
1727
1738
  this.client = e;
1728
1739
  }
1729
1740
  async promos() {
@@ -1749,7 +1760,7 @@ class Dt {
1749
1760
  const t = await this.client.request(rt, e);
1750
1761
  return t.ok ? t.data.claimCashbackBonus ? {
1751
1762
  ok: !1,
1752
- error: m(t.data.claimCashbackBonus.__typename)
1763
+ error: d(t.data.claimCashbackBonus.__typename)
1753
1764
  } : {
1754
1765
  ok: !0
1755
1766
  } : {
@@ -1762,7 +1773,7 @@ class Dt {
1762
1773
  return e.ok ? { ok: e.ok, data: e.data.bonus } : e;
1763
1774
  }
1764
1775
  async wallet() {
1765
- const e = await this.client.request(Me);
1776
+ const e = await this.client.request(Ne);
1766
1777
  return e.ok ? { ok: e.ok, data: e.data.wallet } : e;
1767
1778
  }
1768
1779
  async deposit(e) {
@@ -1776,7 +1787,7 @@ class Dt {
1776
1787
  const t = await this.client.request(Le, e);
1777
1788
  return t.ok ? t.data.createGCashDeposit ? {
1778
1789
  ok: !1,
1779
- error: m(t.data.createGCashDeposit.__typename)
1790
+ error: d(t.data.createGCashDeposit.__typename)
1780
1791
  } : {
1781
1792
  ok: !0
1782
1793
  } : t;
@@ -1785,7 +1796,7 @@ class Dt {
1785
1796
  const t = await this.client.request(Ve, e);
1786
1797
  return t.ok ? t.data.createMayaDeposit ? {
1787
1798
  ok: !1,
1788
- error: m(t.data.createMayaDeposit.__typename)
1799
+ error: d(t.data.createMayaDeposit.__typename)
1789
1800
  } : {
1790
1801
  ok: !0
1791
1802
  } : t;
@@ -1794,7 +1805,7 @@ class Dt {
1794
1805
  const t = await this.client.request(He, e);
1795
1806
  return t.ok ? t.data.createMayaAppDeposit ? {
1796
1807
  ok: !1,
1797
- error: m(t.data.createMayaAppDeposit.__typename)
1808
+ error: d(t.data.createMayaAppDeposit.__typename)
1798
1809
  } : {
1799
1810
  ok: !0
1800
1811
  } : t;
@@ -1803,25 +1814,25 @@ class Dt {
1803
1814
  const t = await this.client.request(Ue, e);
1804
1815
  return t.ok ? t.data.createGCashWithdrawal ? {
1805
1816
  ok: !1,
1806
- error: m(t.data.createGCashWithdrawal.__typename)
1817
+ error: d(t.data.createGCashWithdrawal.__typename)
1807
1818
  } : {
1808
1819
  ok: !0
1809
1820
  } : t;
1810
1821
  }
1811
1822
  async createMayaWithdrawal(e) {
1812
- const t = await this.client.request(We, e);
1823
+ const t = await this.client.request(Oe, e);
1813
1824
  return t.ok ? t.data.createMayaWithdrawal ? {
1814
1825
  ok: !1,
1815
- error: m(t.data.createMayaWithdrawal.__typename)
1826
+ error: d(t.data.createMayaWithdrawal.__typename)
1816
1827
  } : {
1817
1828
  ok: !0
1818
1829
  } : t;
1819
1830
  }
1820
1831
  async createMayaAppWithdrawal(e) {
1821
- const t = await this.client.request(Oe, e);
1832
+ const t = await this.client.request(We, e);
1822
1833
  return t.ok ? t.data.createMayaAppWithdrawal ? {
1823
1834
  ok: !1,
1824
- error: m(t.data.createMayaAppWithdrawal.__typename)
1835
+ error: d(t.data.createMayaAppWithdrawal.__typename)
1825
1836
  } : {
1826
1837
  ok: !0
1827
1838
  } : t;
@@ -1830,7 +1841,7 @@ class Dt {
1830
1841
  const t = await this.client.request(Be, e);
1831
1842
  return t.ok ? t.data.createBankWithdrawal ? {
1832
1843
  ok: !1,
1833
- error: m(t.data.createBankWithdrawal.__typename)
1844
+ error: d(t.data.createBankWithdrawal.__typename)
1834
1845
  } : {
1835
1846
  ok: !0
1836
1847
  } : t;
@@ -1849,14 +1860,14 @@ class Dt {
1849
1860
  const t = await this.client.request(Re, e);
1850
1861
  return t.ok ? t.data.pointsToCashConversion ? {
1851
1862
  ok: !1,
1852
- error: m(t.data.pointsToCashConversion.__typename)
1863
+ error: d(t.data.pointsToCashConversion.__typename)
1853
1864
  } : {
1854
1865
  ok: !0
1855
1866
  } : t;
1856
1867
  }
1857
1868
  async mayaSession(e) {
1858
1869
  const t = await this.client.request(
1859
- gt,
1870
+ St,
1860
1871
  e
1861
1872
  );
1862
1873
  return t.ok ? { ok: t.ok, data: t.data.mayaSession } : t;
@@ -1885,7 +1896,7 @@ class Dt {
1885
1896
  const t = await this.client.request(Ae, e);
1886
1897
  return t.ok ? t.data.createGameSession ? {
1887
1898
  ok: !1,
1888
- error: m(t.data.createGameSession.__typename)
1899
+ error: d(t.data.createGameSession.__typename)
1889
1900
  } : {
1890
1901
  ok: !0
1891
1902
  } : t;
@@ -1907,7 +1918,7 @@ class Dt {
1907
1918
  }
1908
1919
  async validateMayaSession() {
1909
1920
  const e = await this.client.request(
1910
- St
1921
+ bt
1911
1922
  );
1912
1923
  return e.ok ? e.data.validateMayaSession ? {
1913
1924
  ok: !0
@@ -1920,18 +1931,18 @@ class Dt {
1920
1931
  } : e;
1921
1932
  }
1922
1933
  }
1923
- function Pt(n, e, t) {
1934
+ function xt(n, e, t) {
1924
1935
  return n < e ? e : n > t ? t : n;
1925
1936
  }
1926
1937
  function H(n) {
1927
1938
  return Object.prototype.toString.call(n) === "[object Object]" && Object(n) === n;
1928
1939
  }
1929
- function xt(n) {
1940
+ function Gt(n) {
1930
1941
  const e = [];
1931
1942
  function t(r, a = []) {
1932
1943
  for (const s in r) {
1933
1944
  const c = r[s];
1934
- H(c) ? t(c, [...a, s]) : Array.isArray(c) ? t(Gt(c), [...a, s]) : e.push({
1945
+ H(c) ? t(c, [...a, s]) : Array.isArray(c) ? t($t(c), [...a, s]) : e.push({
1935
1946
  key: [...a, s],
1936
1947
  value: c
1937
1948
  });
@@ -1939,14 +1950,14 @@ function xt(n) {
1939
1950
  }
1940
1951
  return t(n), e;
1941
1952
  }
1942
- function Gt(n) {
1953
+ function $t(n) {
1943
1954
  return n.reduce((e, t, r) => (e[r] = t, e), {});
1944
1955
  }
1945
1956
  class U {
1946
1957
  constructor(e, t) {
1947
- d(this, "url");
1948
- d(this, "options");
1949
- d(this, "middlewares");
1958
+ m(this, "url");
1959
+ m(this, "options");
1960
+ m(this, "middlewares");
1950
1961
  var a;
1951
1962
  const r = new Headers((a = t == null ? void 0 : t.fetchOptions) == null ? void 0 : a.headers);
1952
1963
  this.url = e, this.options = { ...t == null ? void 0 : t.fetchOptions, headers: r }, this.middlewares = (t == null ? void 0 : t.middlewares) ?? [];
@@ -1983,11 +1994,11 @@ class U {
1983
1994
  try {
1984
1995
  const l = await fetch(e);
1985
1996
  if (!l.ok)
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) } : {
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) } : {
1989
2000
  ok: !1,
1990
- error: f(500, p.message)
2001
+ error: h(500, p.message)
1991
2002
  } : {
1992
2003
  ok: !0,
1993
2004
  data: y
@@ -1995,7 +2006,7 @@ class U {
1995
2006
  } catch {
1996
2007
  return {
1997
2008
  ok: !1,
1998
- error: f(500)
2009
+ error: h(500)
1999
2010
  };
2000
2011
  }
2001
2012
  }
@@ -2006,7 +2017,7 @@ class U {
2006
2017
  return t;
2007
2018
  }
2008
2019
  createUploadBody(e, t) {
2009
- const r = xt(t).filter(
2020
+ const r = Gt(t).filter(
2010
2021
  (c) => c.value instanceof File || c.value instanceof Blob
2011
2022
  ), a = new FormData();
2012
2023
  a.append(
@@ -2030,7 +2041,7 @@ async function w(n) {
2030
2041
  }
2031
2042
  class ke {
2032
2043
  constructor(e) {
2033
- d(this, "enabled");
2044
+ m(this, "enabled");
2034
2045
  this.enabled = (e == null ? void 0 : e.enabled) ?? !0;
2035
2046
  }
2036
2047
  info(e) {
@@ -2060,7 +2071,7 @@ function q(n, e) {
2060
2071
  function ye(n, e) {
2061
2072
  return n.getTime() > e.getTime();
2062
2073
  }
2063
- function _e(n) {
2074
+ function Ce(n) {
2064
2075
  return new Promise((e) => {
2065
2076
  setTimeout(e, n);
2066
2077
  });
@@ -2073,8 +2084,8 @@ function we(n, e) {
2073
2084
  /**/
2074
2085
  } = e;
2075
2086
  async function s(c, u) {
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;
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;
2078
2089
  }
2079
2090
  return async (...c) => await s(c);
2080
2091
  }
@@ -2082,13 +2093,13 @@ function F(n, e) {
2082
2093
  const t = j(n);
2083
2094
  return t.setMinutes(t.getMinutes() - e), t;
2084
2095
  }
2085
- class $t {
2096
+ class Ut {
2086
2097
  constructor(e) {
2087
- d(this, "logger");
2088
- d(this, "storageKey", "session");
2089
- d(this, "authService");
2090
- d(this, "walletService");
2091
- d(this, "_refreshing", !1);
2098
+ m(this, "logger");
2099
+ m(this, "storageKey", "session");
2100
+ m(this, "authService");
2101
+ m(this, "walletService");
2102
+ m(this, "_refreshing", !1);
2092
2103
  this.authService = e.authService, this.walletService = e.walletService, this.logger = new ke({
2093
2104
  enabled: e.logs ?? !1
2094
2105
  });
@@ -2133,13 +2144,13 @@ class $t {
2133
2144
  maxAttempt: 5
2134
2145
  })();
2135
2146
  if (!l.ok) return l;
2136
- const h = /* @__PURE__ */ new Date();
2147
+ const f = /* @__PURE__ */ new Date();
2137
2148
  return window.localStorage.setItem(
2138
2149
  this.storageKey,
2139
2150
  JSON.stringify({
2140
2151
  ...l.data,
2141
- accessTokenExpiresAt: q(h, 8).getTime(),
2142
- refreshTokenExpiresAt: F(B(h, 30), 2).getTime()
2152
+ accessTokenExpiresAt: q(f, 8).getTime(),
2153
+ refreshTokenExpiresAt: F(B(f, 30), 2).getTime()
2143
2154
  })
2144
2155
  ), {
2145
2156
  ok: !0,
@@ -2208,7 +2219,7 @@ class $t {
2208
2219
  data: null
2209
2220
  };
2210
2221
  if (this.refreshing)
2211
- return await _e(1e3), await this.get();
2222
+ return await Ce(1e3), await this.get();
2212
2223
  const e = window.localStorage.getItem(this.storageKey);
2213
2224
  if (!e)
2214
2225
  return {
@@ -2309,11 +2320,11 @@ function i(n, e) {
2309
2320
  }
2310
2321
  return e;
2311
2322
  }
2312
- class Ut {
2323
+ class Ot {
2313
2324
  constructor(e) {
2314
- d(this, "staticService");
2325
+ m(this, "staticService");
2315
2326
  const t = (e == null ? void 0 : e.environment) === "development";
2316
- this.staticService = new Rt({
2327
+ this.staticService = new Dt({
2317
2328
  url: t ? "https://static.development.opexa.io" : "https://static.opexa.io"
2318
2329
  });
2319
2330
  }
@@ -2357,7 +2368,7 @@ class Ut {
2357
2368
  return g(t);
2358
2369
  }
2359
2370
  platform(e) {
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;
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;
2361
2372
  return {
2362
2373
  paymentSettings: {
2363
2374
  minimumFirstDepositAmount: i(e.minimumFirstDepositAmount),
@@ -2373,33 +2384,33 @@ class Ut {
2373
2384
  },
2374
2385
  gcash: {
2375
2386
  androidEnabled: ((l = e.gcashDepositGatewaySettings) == null ? void 0 : l.androidEnabled) ?? !1,
2376
- iosEnabled: ((h = e.gcashDepositGatewaySettings) == null ? void 0 : h.iosEnabled) ?? !1,
2387
+ iosEnabled: ((f = e.gcashDepositGatewaySettings) == null ? void 0 : f.iosEnabled) ?? !1,
2377
2388
  webEnabled: ((y = e.gcashDepositGatewaySettings) == null ? void 0 : y.webEnabled) ?? !1,
2378
2389
  mobileWebEnabled: ((p = e.gcashDepositGatewaySettings) == null ? void 0 : p.mobileWebEnabled) ?? !1,
2379
2390
  minimumAmount: i((T = e.gcashDepositGatewaySettings) == null ? void 0 : T.minimumAmount),
2380
2391
  maximumAmount: i((v = e.gcashDepositGatewaySettings) == null ? void 0 : v.maximumAmount)
2381
2392
  },
2382
2393
  maya: {
2383
- androidEnabled: ((N = e.mayaDepositGatewaySettings) == null ? void 0 : N.androidEnabled) ?? !1,
2384
- iosEnabled: ((M = e.mayaDepositGatewaySettings) == null ? void 0 : M.iosEnabled) ?? !1,
2394
+ androidEnabled: ((M = e.mayaDepositGatewaySettings) == null ? void 0 : M.androidEnabled) ?? !1,
2395
+ iosEnabled: ((N = e.mayaDepositGatewaySettings) == null ? void 0 : N.iosEnabled) ?? !1,
2385
2396
  webEnabled: ((I = e.mayaDepositGatewaySettings) == null ? void 0 : I.webEnabled) ?? !1,
2386
2397
  mobileWebEnabled: ((S = e.mayaDepositGatewaySettings) == null ? void 0 : S.mobileWebEnabled) ?? !1,
2387
2398
  minimumAmount: i((R = e.mayaDepositGatewaySettings) == null ? void 0 : R.minimumAmount),
2388
2399
  maximumAmount: i((D = e.mayaDepositGatewaySettings) == null ? void 0 : D.maximumAmount)
2389
2400
  },
2390
2401
  mayaApp: {
2391
- androidEnabled: ((_ = e.mayaAppDepositGatewaySettings) == null ? void 0 : _.androidEnabled) ?? !1,
2402
+ androidEnabled: ((C = e.mayaAppDepositGatewaySettings) == null ? void 0 : C.androidEnabled) ?? !1,
2392
2403
  iosEnabled: ((P = e.mayaAppDepositGatewaySettings) == null ? void 0 : P.iosEnabled) ?? !1,
2393
2404
  webEnabled: ((x = e.mayaAppDepositGatewaySettings) == null ? void 0 : x.webEnabled) ?? !1,
2394
2405
  mobileWebEnabled: ((G = e.mayaAppDepositGatewaySettings) == null ? void 0 : G.mobileWebEnabled) ?? !1,
2395
- minimumAmount: i((C = e.mayaAppDepositGatewaySettings) == null ? void 0 : C.minimumAmount),
2406
+ minimumAmount: i((_ = e.mayaAppDepositGatewaySettings) == null ? void 0 : _.minimumAmount),
2396
2407
  maximumAmount: i(($ = e.mayaAppDepositGatewaySettings) == null ? void 0 : $.maximumAmount)
2397
2408
  }
2398
2409
  },
2399
2410
  withdrawalGateway: {
2400
2411
  bank: {
2401
- androidEnabled: ((W = e.bankWithdrawalGatewaySettings) == null ? void 0 : W.androidEnabled) ?? !1,
2402
- iosEnabled: ((O = e.bankWithdrawalGatewaySettings) == null ? void 0 : O.iosEnabled) ?? !1,
2412
+ androidEnabled: ((O = e.bankWithdrawalGatewaySettings) == null ? void 0 : O.androidEnabled) ?? !1,
2413
+ iosEnabled: ((W = e.bankWithdrawalGatewaySettings) == null ? void 0 : W.iosEnabled) ?? !1,
2403
2414
  webEnabled: ((k = e.bankWithdrawalGatewaySettings) == null ? void 0 : k.webEnabled) ?? !1,
2404
2415
  mobileWebEnabled: ((Q = e.bankWithdrawalGatewaySettings) == null ? void 0 : Q.mobileWebEnabled) ?? !1,
2405
2416
  minimumAmount: i((K = e.bankWithdrawalGatewaySettings) == null ? void 0 : K.minimumAmount),
@@ -2425,8 +2436,8 @@ class Ut {
2425
2436
  maximumAmount: i((ce = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ce.maximumAmount)
2426
2437
  },
2427
2438
  mayaApp: {
2428
- androidEnabled: ((de = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : de.androidEnabled) ?? !1,
2429
- iosEnabled: ((me = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : me.iosEnabled) ?? !1,
2439
+ androidEnabled: ((me = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : me.androidEnabled) ?? !1,
2440
+ iosEnabled: ((de = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : de.iosEnabled) ?? !1,
2430
2441
  webEnabled: ((ue = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ue.webEnabled) ?? !1,
2431
2442
  mobileWebEnabled: ((le = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : le.mobileWebEnabled) ?? !1,
2432
2443
  minimumAmount: i((pe = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : pe.minimumAmount),
@@ -2768,19 +2779,19 @@ class Ut {
2768
2779
  };
2769
2780
  }
2770
2781
  }
2771
- class Ft {
2782
+ class Lt {
2772
2783
  constructor(e) {
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");
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");
2784
2795
  const {
2785
2796
  /**/
2786
2797
  site: t,
@@ -2789,13 +2800,13 @@ class Ft {
2789
2800
  environment: s,
2790
2801
  logs: c
2791
2802
  } = e, u = s === "production";
2792
- this.transformer = new Ut({
2803
+ this.transformer = new Ot({
2793
2804
  environment: s
2794
2805
  }), this.logger = new ke({
2795
2806
  enabled: c ?? !1
2796
2807
  });
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,
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({
2809
+ url: N,
2799
2810
  site: t,
2800
2811
  platform: r
2801
2812
  }), S = {
@@ -2806,15 +2817,15 @@ class Ft {
2806
2817
  "Platform-Code": a
2807
2818
  }
2808
2819
  }
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({
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({
2810
2821
  url: l,
2811
2822
  platform: a
2812
- }), $ = new $t({
2823
+ }), $ = new Ut({
2813
2824
  logs: c,
2814
- authService: C,
2815
- walletService: _
2825
+ authService: _,
2826
+ walletService: C
2816
2827
  });
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;
2828
+ this.authService = _, this.gameService = R, this.fileService = D, this.walletService = C, this.accountService = P, this.reportService = x, this.portalService = G, this.sessionManager = $, this.cmsPortalService = I;
2818
2829
  }
2819
2830
  get authMiddleware() {
2820
2831
  return async (e) => {
@@ -2849,45 +2860,6 @@ class Ft {
2849
2860
  }
2850
2861
  }
2851
2862
  }
2852
- /**
2853
- * @deprecated use `sendVerificationCode__next`
2854
- */
2855
- async sendAuthenticationCode(e) {
2856
- return this.authService.sendVerificationCode(e);
2857
- }
2858
- /**
2859
- * @example
2860
- * ```ts
2861
- * const signInResult = await signIn({
2862
- * type: 'NAME_AND_PASSWORD',
2863
- * name: data.name,
2864
- * password: data.password,
2865
- * });
2866
- *
2867
- * if (!signInResult.ok) {
2868
- * return window.alert(signInResult.error.message);
2869
- * }
2870
- *
2871
- * if (!signInResult.data) {
2872
- * // Signed in. No more steps needed
2873
- * return;
2874
- * }
2875
- *
2876
- * const secretAnswer = window.prompt(SECRET_QUESTIONS_MAP[signInResult.secretQuestion]);
2877
- *
2878
- * const authResult = await sdk.authenticate({
2879
- * type: 'SECURITY_QUESTION',
2880
- * token: signInResult.token,
2881
- * secretAnswer: secretAnswer,
2882
- * });
2883
- *
2884
- * if (!authResult.ok) {
2885
- * window.alert(res.error.message);
2886
- * } else {
2887
- * // Signed in
2888
- * }
2889
- * ```
2890
- */
2891
2863
  async authenticate(e) {
2892
2864
  switch (e.type) {
2893
2865
  case "SECURITY_QUESTION":
@@ -2909,32 +2881,8 @@ class Ft {
2909
2881
  async signOut() {
2910
2882
  await this.sessionManager.destroy();
2911
2883
  }
2912
- /**
2913
- * @description Watches the session if it is still valid whenever signed in.
2914
- * @returns Unsubscribe function
2915
- * @example
2916
- * ```tsx
2917
- * import * as React from 'react';
2918
- * import { useAuthenticated } from '@lib/stores';
2919
- *
2920
- * function WatchSession() {
2921
- * const { setAuthenticated } = useAuthenticated();
2922
- *
2923
- * React.useEffect(() => {
2924
- * const unsubscribe = sdk.watchSession({
2925
- * interval: 30000,
2926
- * onInvalid() {
2927
- * setAuthenticated(false);
2928
- * },
2929
- * });
2930
- *
2931
- * return unsubscribe;
2932
- * }, []);
2933
- * }
2934
- * ```
2935
- */
2936
2884
  watchSession(e) {
2937
- const t = Pt(e.interval ?? 3e4, 3e4, 6e4);
2885
+ const t = xt(e.interval ?? 3e4, 3e4, 6e4);
2938
2886
  let r = null;
2939
2887
  const a = () => setTimeout(async () => {
2940
2888
  await this.sessionManager.verify() || await e.onInvalid(), r = a();
@@ -2998,27 +2946,6 @@ class Ft {
2998
2946
  })
2999
2947
  } : { ok: !1, error: t.error } : { ok: !1, error: e.error };
3000
2948
  }
3001
- /**
3002
- * @example
3003
- * ```ts
3004
- * const res = await sdk.createAccount({
3005
- * id: ObjectId.generate(ObjectType.Account).toString(),
3006
- * name: data.name,
3007
- * password: data.password,
3008
- * dateOfBirth: new Date(data.dateOfBirth),
3009
- * mobileNumber: data.mobileNumber,
3010
- * domain: data.domain,
3011
- * verificationCode: data.verificationCode,
3012
- * reCAPTCHAResponse: data.reCAPTCHAResponse,
3013
- * });
3014
- *
3015
- * if (!res.ok) {
3016
- * window.alert(res.error.message);
3017
- * } else {
3018
- * // Do something
3019
- * }
3020
- * ```
3021
- */
3022
2949
  async createAccount(e) {
3023
2950
  const t = e.id ?? b.generate(A.Account).toString(), r = await this.accountService.registerMemberAccount({
3024
2951
  input: {
@@ -3036,28 +2963,21 @@ class Ft {
3036
2963
  });
3037
2964
  return r.ok ? { ok: !0, data: { id: t } } : r;
3038
2965
  }
3039
- /**
3040
- * @example
3041
- * ```ts
3042
- * const res = await sdk.createAccount({
3043
- * id: ObjectId.generate(ObjectType.Account).toString(),
3044
- * name: data.name,
3045
- * password: data.password,
3046
- * dateOfBirth: new Date(data.dateOfBirth),
3047
- * mobileNumber: data.mobileNumber,
3048
- * domain: data.domain,
3049
- * reCAPTCHAResponse: data.reCAPTCHAResponse,
3050
- * });
3051
- *
3052
- * if (!res.ok) {
3053
- * window.alert(res.error.message);
3054
- * } else {
3055
- * // Do something
3056
- * }
3057
- * ```
3058
- */
3059
2966
  async createAccount__next(e) {
3060
- const t = e.id ?? b.generate(A.Account).toString(), r = await this.accountService.registerMemberAccount__next({
2967
+ const t = e.id ?? b.generate(A.Account).toString();
2968
+ if (e.type === "MOBILE_NUMBER") {
2969
+ const a = await this.accountService.registerMemberAccountViaMobile({
2970
+ input: {
2971
+ id: t,
2972
+ mobileNumber: E(e.mobileNumber)
2973
+ },
2974
+ referralCode: e.referralCode,
2975
+ reCAPTCHAResponse: e.reCAPTCHAResponse,
2976
+ verificationCode: e.verificationCode
2977
+ });
2978
+ return a.ok ? { ok: !0, data: { id: t } } : a;
2979
+ }
2980
+ const r = await this.accountService.registerMemberAccount__next({
3061
2981
  input: {
3062
2982
  id: t,
3063
2983
  name: e.name,
@@ -3077,21 +2997,6 @@ class Ft {
3077
2997
  }
3078
2998
  });
3079
2999
  }
3080
- /**
3081
- * @example
3082
- * ```ts
3083
- * const res = await sdk.updateAccount(user.id, {
3084
- * validId: data.validId,
3085
- * realName: data.realName,
3086
- * });
3087
- *
3088
- * if (!res.ok) {
3089
- * window.alert(res.error.message);
3090
- * } else {
3091
- * // Do something
3092
- * }
3093
- * ```
3094
- */
3095
3000
  async updateAccount(e, t) {
3096
3001
  return await this.accountService.updateMemberAccount({
3097
3002
  input: {
@@ -3122,27 +3027,6 @@ class Ft {
3122
3027
  data: e.data ? this.transformer.transform.verificationDetails(e.data) : null
3123
3028
  } : e;
3124
3029
  }
3125
- /**
3126
- * @example
3127
- * ```ts
3128
- * const res = await sdk.submitVerificationDetails({
3129
- * id: ObjectId.generate(ObjectType.Verification).toString(),
3130
- * idFrontImage: data.idFrontImage,
3131
- * selfieImage: data.selfieImage,
3132
- * address: data.address,
3133
- * sourceOfIncome: data.sourceOfIncome,
3134
- * natureOfWork: data.natureOfWork,
3135
- * placeOfBirth: data.placeOfBirth,
3136
- * nationality: data.nationality,
3137
- * });
3138
- *
3139
- * if (!res.ok) {
3140
- * window.alert(res.error.message);
3141
- * } else {
3142
- * // Do something
3143
- * }
3144
- * ```
3145
- */
3146
3030
  async submitVerificationDetails(e) {
3147
3031
  const t = e.id ?? b.generate(A.Verification).toString(), r = await this.accountService.createMemberVerification({
3148
3032
  input: {
@@ -3152,21 +3036,6 @@ class Ft {
3152
3036
  });
3153
3037
  return r.ok ? { ok: !0, data: { id: t } } : r;
3154
3038
  }
3155
- /**
3156
- * @example
3157
- * ```ts
3158
- * const res = await sdk.submitVerificationDetails(verificationDetails.id, {
3159
- * idFrontImage: data.idFrontImage,
3160
- * selfieImage: data.selfieImage,
3161
- * });
3162
- *
3163
- * if (!res.ok) {
3164
- * window.alert(res.error.message);
3165
- * } else {
3166
- * // Do something
3167
- * }
3168
- * ```
3169
- */
3170
3039
  async updateVerificationDetails(e, t) {
3171
3040
  return await this.accountService.updateMemberVerification({
3172
3041
  input: {
@@ -3209,7 +3078,7 @@ class Ft {
3209
3078
  });
3210
3079
  }
3211
3080
  async sendVerificationCode__next(e) {
3212
- return this.authService.sendVerificationCode__next(e);
3081
+ return this.authService.sendVerificationCode(e);
3213
3082
  }
3214
3083
  async wallet() {
3215
3084
  const e = await this.walletService.wallet();
@@ -3253,23 +3122,6 @@ class Ft {
3253
3122
  /*+ WITHDRAWAL +*/
3254
3123
  /*+----------------------------------------+*/
3255
3124
  /**/
3256
- /**
3257
- * @example
3258
- * ```ts
3259
- * const res = await sdk.createWithdrawal({
3260
- * id: ObjectId.generate(ObjectType.Withdrawal).toString(),
3261
- * type: 'BANK',
3262
- * amount: data.amount,
3263
- * transactionPassword: data.transactionPassword,
3264
- * });
3265
- *
3266
- * if (!res.ok) {
3267
- * window.alert(res.error.message);
3268
- * } else {
3269
- * // Do something
3270
- * }
3271
- * ```
3272
- */
3273
3125
  async createWithdrawal(e) {
3274
3126
  const t = e.id ?? b.generate(A.Withdrawal).toString();
3275
3127
  if (e.type === "BANK") {
@@ -3339,23 +3191,6 @@ class Ft {
3339
3191
  /*+ DEPOSIT +*/
3340
3192
  /*+----------------------------------------+*/
3341
3193
  /**/
3342
- /**
3343
- * @example
3344
- * ```ts
3345
- * const res = await sdk.createDeposit({
3346
- * id: ObjectId.generate(ObjectType.Deposit).toString(),
3347
- * type: 'GCASH',
3348
- * amount: data.amount,
3349
- * promo: data.promo,
3350
- * });
3351
- *
3352
- * if (!res.ok) {
3353
- * window.alert(res.error.message);
3354
- * } else {
3355
- * // Do something
3356
- * }
3357
- * ```
3358
- */
3359
3194
  async createDeposit(e) {
3360
3195
  const t = e.id ?? b.generate(A.Deposit).toString();
3361
3196
  if (e.type === "MAYA") {
@@ -3626,22 +3461,6 @@ class Ft {
3626
3461
  data: r.data ? this.transformer.transform.gameSession(r.data) : null
3627
3462
  } : r;
3628
3463
  }
3629
- /**
3630
- * @deprecated use `createGameSession__next`
3631
- * @example
3632
- * ```ts
3633
- * const res = await sdk.createGameSession({
3634
- * id: ObjectId.generate(ObjectType.GameSession).toString(),
3635
- * game: game.id,
3636
- * });
3637
- *
3638
- * if (!res.ok) {
3639
- * window.alert(res.error.message);
3640
- * } else {
3641
- * // Do something
3642
- * }
3643
- * ```
3644
- */
3645
3464
  async createGameSession(e) {
3646
3465
  const t = e.id ?? b.generate(A.GameSession).toString(), r = await this.walletService.createGameSession({ input: { id: t, game: e.game } });
3647
3466
  return r.ok ? { ok: !0, data: { id: t } } : r;
@@ -3655,7 +3474,7 @@ class Ft {
3655
3474
  const t = e.id ?? b.generate(A.GameSession).toString();
3656
3475
  if (e.game.startsWith("SPORTS:")) {
3657
3476
  const u = await b.generateFromKey(A.Game, e.game).then(
3658
- (h) => h.toString()
3477
+ (f) => f.toString()
3659
3478
  ), l = await this.gameService.createGameSession({
3660
3479
  input: {
3661
3480
  id: t,
@@ -3677,7 +3496,7 @@ class Ft {
3677
3496
  /**/
3678
3497
  provider: a,
3679
3498
  reference: s
3680
- } = r.data, c = Ot(a) ? await this.walletService.createGameSession({ input: { id: t, game: s } }) : await this.gameService.createGameSession({ input: { id: t, game: s } });
3499
+ } = r.data, c = Bt(a) ? await this.walletService.createGameSession({ input: { id: t, game: s } }) : await this.gameService.createGameSession({ input: { id: t, game: s } });
3681
3500
  return c.ok ? { ok: !0, data: { id: t } } : c;
3682
3501
  }
3683
3502
  /** @deprecated use `endGameSession__next` */
@@ -3704,21 +3523,6 @@ class Ft {
3704
3523
  data: t.data ? this.transformer.transform.file(t.data) : null
3705
3524
  } : t;
3706
3525
  }
3707
- /**
3708
- * @example
3709
- * ```ts
3710
- * const res = await sdk.uploadImageFile({
3711
- * id: ObjectId.generate(ObjectType.File).toString(),
3712
- * file: data.file,
3713
- * });
3714
- *
3715
- * if (!res.ok) {
3716
- * window.alert(res.error.message);
3717
- * } else {
3718
- * // Do something
3719
- * }
3720
- * ```
3721
- */
3722
3526
  async uploadImageFile(e) {
3723
3527
  const t = e.id ?? b.generate(A.File).toString(), r = await this.fileService.uploadPrivateImageFile({
3724
3528
  input: {
@@ -3823,12 +3627,12 @@ const Wt = [
3823
3627
  "EVOLUTION_NETENT",
3824
3628
  "EVOLUTION_REDTIGER"
3825
3629
  ];
3826
- function Ot(n) {
3630
+ function Bt(n) {
3827
3631
  return Wt.some((e) => e === n);
3828
3632
  }
3829
3633
  export {
3830
- Ht as ObjectId,
3634
+ Yt as ObjectId,
3831
3635
  A as ObjectType,
3832
- Ft as Sdk
3636
+ Lt as Sdk
3833
3637
  };
3834
3638
  //# sourceMappingURL=index.mjs.map