@opexa/portal-sdk 0.0.72 → 0.0.73

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,9 +1,9 @@
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;
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
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 = {
4
+ import { ObjectId as A } from "@opexa/object-id";
5
+ import { ObjectId as Yt } from "@opexa/object-id";
6
+ const E = {
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
- `, 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
+ `, dt = o`
842
869
  mutation RegisterMayaMemberAccount($input: RegisterMayaMemberAccountInput!) {
843
870
  registerMayaMemberAccount(input: $input) {
844
871
  ... on AccountNameNotAvailableError {
@@ -846,7 +873,7 @@ const L = o`
846
873
  }
847
874
  }
848
875
  }
849
- `, dt = o`
876
+ `, mt = o`
850
877
  mutation UpdateMemberAccount($input: UpdateMemberAccountInput!) {
851
878
  updateMemberAccount(input: $input) {
852
879
  ... 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) {
@@ -1166,8 +1193,17 @@ class _t {
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: m(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
1209
  error: m(t.data.registerMemberAccount.__typename)
@@ -1176,7 +1212,7 @@ class _t {
1176
1212
  } : t;
1177
1213
  }
1178
1214
  async updateMemberAccount(e) {
1179
- const t = await this.client.request(dt, e);
1215
+ const t = await this.client.request(mt, e);
1180
1216
  return t.ok ? t.data.updateMemberAccount ? {
1181
1217
  ok: !1,
1182
1218
  error: m(t.data.updateMemberAccount.__typename)
@@ -1185,7 +1221,7 @@ class _t {
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,7 +1234,7 @@ 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 ? {
@@ -1209,14 +1245,14 @@ class _t {
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
1258
  error: m(t.data.sendVerificationCode.__typename)
@@ -1225,7 +1261,7 @@ class _t {
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
1267
  error: m(t.data.verifyMobileNumber.__typename)
@@ -1234,7 +1270,7 @@ class _t {
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
1276
  error: m(t.data.createMemberVerification.__typename)
@@ -1243,7 +1279,7 @@ class _t {
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
1285
  error: m(t.data.updateMemberVerification.__typename)
@@ -1269,7 +1305,7 @@ 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(dt, e);
1273
1309
  return t.ok ? t.data.registerMayaMemberAccount ? {
1274
1310
  ok: !1,
1275
1311
  error: m(t.data.registerMayaMemberAccount.__typename)
@@ -1278,14 +1314,14 @@ class _t {
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
1327
  error: m(t.data.updateReferralCode.__typename)
@@ -1294,7 +1330,7 @@ class _t {
1294
1330
  } : t;
1295
1331
  }
1296
1332
  }
1297
- function E(n) {
1333
+ function b(n) {
1298
1334
  return n.startsWith("+63") ? n : n.startsWith("63") ? `+${n}` : n.startsWith("0") ? `+63${n.substring(1)}` : `+63${n}`;
1299
1335
  }
1300
1336
  function f(n, e) {
@@ -1313,7 +1349,7 @@ 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
1354
  d(this, "url");
1319
1355
  d(this, "platform");
@@ -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 = `${b(e.mobileNumber)}:${e.authenticationCode}`, 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}`);
@@ -1444,7 +1480,7 @@ class Ct {
1444
1480
  * @deprecated use `sendOtp`
1445
1481
  */
1446
1482
  async sendVerificationCode(e) {
1447
- const t = E(e);
1483
+ const t = b(e);
1448
1484
  try {
1449
1485
  const r = await fetch(`${this.url}/sendVerificationCode`, {
1450
1486
  method: "POST",
@@ -1466,7 +1502,7 @@ class Ct {
1466
1502
  }
1467
1503
  }
1468
1504
  async sendVerificationCode__next(e) {
1469
- const t = E(e);
1505
+ const t = b(e);
1470
1506
  try {
1471
1507
  const r = await fetch(`${this.url}/otps`, {
1472
1508
  method: "POST",
@@ -1495,7 +1531,7 @@ class Ct {
1495
1531
  }
1496
1532
  }
1497
1533
  }
1498
- class Tt {
1534
+ class vt {
1499
1535
  constructor(e) {
1500
1536
  d(this, "url");
1501
1537
  d(this, "siteId");
@@ -1510,12 +1546,12 @@ class Tt {
1510
1546
  } : e;
1511
1547
  }
1512
1548
  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;
1549
+ var a, s, c, u, l, h, y, p, T, v, M, N, I, S, R, D, C, P, x, G, _, $, O, W;
1514
1550
  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(
1551
+ e != null && e.first && t.set("first", e.first.toString()), e != null && e.after && t.set("after", e.after), e != null && e.search && t.set("search", e.search), (s = (a = e == null ? void 0 : e.filter) == null ? void 0 : a.type) != null && s.equal && t.set("filter[type][eq]", e.filter.type.equal), (u = (c = e == null ? void 0 : e.filter) == null ? void 0 : c.type) != null && u.notEqual && t.set("filter[type][neq]", e.filter.type.notEqual), (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), (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
1552
  "filter[tags][in]",
1517
1553
  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(
1554
+ ), (W = (O = e == null ? void 0 : e.filter) == null ? void 0 : O.tags) != null && W.notIn && t.set(
1519
1555
  "filter[tags][nin]",
1520
1556
  e.filter.tags.notIn.map((k) => k.toLowerCase()).join(",")
1521
1557
  );
@@ -1573,7 +1609,7 @@ class Tt {
1573
1609
  }
1574
1610
  }
1575
1611
  }
1576
- class vt {
1612
+ class Mt {
1577
1613
  constructor(e) {
1578
1614
  d(this, "client");
1579
1615
  this.client = e;
@@ -1586,7 +1622,7 @@ class vt {
1586
1622
  } : t;
1587
1623
  }
1588
1624
  async uploadPrivateImageFile(e) {
1589
- const t = await this.client.upload(Ne, e);
1625
+ const t = await this.client.upload(Me, e);
1590
1626
  return t.ok ? t.data.uploadPrivateImageFile ? {
1591
1627
  ok: !1,
1592
1628
  error: m(t.data.uploadPrivateImageFile.__typename)
@@ -1639,7 +1675,7 @@ class Nt {
1639
1675
  } : t;
1640
1676
  }
1641
1677
  }
1642
- class Mt {
1678
+ class It {
1643
1679
  constructor(e) {
1644
1680
  d(this, "client");
1645
1681
  this.client = e;
@@ -1652,7 +1688,7 @@ class Mt {
1652
1688
  } : e;
1653
1689
  }
1654
1690
  }
1655
- class It {
1691
+ class Rt {
1656
1692
  constructor(e) {
1657
1693
  d(this, "client");
1658
1694
  this.client = e;
@@ -1696,20 +1732,20 @@ class It {
1696
1732
  }
1697
1733
  async activityRecords(e) {
1698
1734
  const t = await this.client.request(
1699
- bt,
1735
+ At,
1700
1736
  e
1701
1737
  );
1702
1738
  return t.ok ? { ok: t.ok, data: t.data.member.activityRecords } : t;
1703
1739
  }
1704
1740
  async referrals(e) {
1705
1741
  const t = await this.client.request(
1706
- kt,
1742
+ Ct,
1707
1743
  e
1708
1744
  );
1709
1745
  return t.ok ? { ok: t.ok, data: t.data.member.referrals } : t;
1710
1746
  }
1711
1747
  }
1712
- class Rt {
1748
+ class Dt {
1713
1749
  constructor(e) {
1714
1750
  d(this, "url");
1715
1751
  this.url = e.url;
@@ -1721,7 +1757,7 @@ class Rt {
1721
1757
  ];
1722
1758
  }
1723
1759
  }
1724
- class Dt {
1760
+ class Pt {
1725
1761
  constructor(e) {
1726
1762
  d(this, "client");
1727
1763
  this.client = e;
@@ -1762,7 +1798,7 @@ class Dt {
1762
1798
  return e.ok ? { ok: e.ok, data: e.data.bonus } : e;
1763
1799
  }
1764
1800
  async wallet() {
1765
- const e = await this.client.request(Me);
1801
+ const e = await this.client.request(Ne);
1766
1802
  return e.ok ? { ok: e.ok, data: e.data.wallet } : e;
1767
1803
  }
1768
1804
  async deposit(e) {
@@ -1809,7 +1845,7 @@ class Dt {
1809
1845
  } : t;
1810
1846
  }
1811
1847
  async createMayaWithdrawal(e) {
1812
- const t = await this.client.request(We, e);
1848
+ const t = await this.client.request(Oe, e);
1813
1849
  return t.ok ? t.data.createMayaWithdrawal ? {
1814
1850
  ok: !1,
1815
1851
  error: m(t.data.createMayaWithdrawal.__typename)
@@ -1818,7 +1854,7 @@ class Dt {
1818
1854
  } : t;
1819
1855
  }
1820
1856
  async createMayaAppWithdrawal(e) {
1821
- const t = await this.client.request(Oe, e);
1857
+ const t = await this.client.request(We, e);
1822
1858
  return t.ok ? t.data.createMayaAppWithdrawal ? {
1823
1859
  ok: !1,
1824
1860
  error: m(t.data.createMayaAppWithdrawal.__typename)
@@ -1856,7 +1892,7 @@ class Dt {
1856
1892
  }
1857
1893
  async mayaSession(e) {
1858
1894
  const t = await this.client.request(
1859
- gt,
1895
+ St,
1860
1896
  e
1861
1897
  );
1862
1898
  return t.ok ? { ok: t.ok, data: t.data.mayaSession } : t;
@@ -1907,7 +1943,7 @@ class Dt {
1907
1943
  }
1908
1944
  async validateMayaSession() {
1909
1945
  const e = await this.client.request(
1910
- St
1946
+ bt
1911
1947
  );
1912
1948
  return e.ok ? e.data.validateMayaSession ? {
1913
1949
  ok: !0
@@ -1920,18 +1956,18 @@ class Dt {
1920
1956
  } : e;
1921
1957
  }
1922
1958
  }
1923
- function Pt(n, e, t) {
1959
+ function xt(n, e, t) {
1924
1960
  return n < e ? e : n > t ? t : n;
1925
1961
  }
1926
1962
  function H(n) {
1927
1963
  return Object.prototype.toString.call(n) === "[object Object]" && Object(n) === n;
1928
1964
  }
1929
- function xt(n) {
1965
+ function Gt(n) {
1930
1966
  const e = [];
1931
1967
  function t(r, a = []) {
1932
1968
  for (const s in r) {
1933
1969
  const c = r[s];
1934
- H(c) ? t(c, [...a, s]) : Array.isArray(c) ? t(Gt(c), [...a, s]) : e.push({
1970
+ H(c) ? t(c, [...a, s]) : Array.isArray(c) ? t($t(c), [...a, s]) : e.push({
1935
1971
  key: [...a, s],
1936
1972
  value: c
1937
1973
  });
@@ -1939,7 +1975,7 @@ function xt(n) {
1939
1975
  }
1940
1976
  return t(n), e;
1941
1977
  }
1942
- function Gt(n) {
1978
+ function $t(n) {
1943
1979
  return n.reduce((e, t, r) => (e[r] = t, e), {});
1944
1980
  }
1945
1981
  class U {
@@ -2006,7 +2042,7 @@ class U {
2006
2042
  return t;
2007
2043
  }
2008
2044
  createUploadBody(e, t) {
2009
- const r = xt(t).filter(
2045
+ const r = Gt(t).filter(
2010
2046
  (c) => c.value instanceof File || c.value instanceof Blob
2011
2047
  ), a = new FormData();
2012
2048
  a.append(
@@ -2060,7 +2096,7 @@ function q(n, e) {
2060
2096
  function ye(n, e) {
2061
2097
  return n.getTime() > e.getTime();
2062
2098
  }
2063
- function _e(n) {
2099
+ function Ce(n) {
2064
2100
  return new Promise((e) => {
2065
2101
  setTimeout(e, n);
2066
2102
  });
@@ -2074,7 +2110,7 @@ function we(n, e) {
2074
2110
  } = e;
2075
2111
  async function s(c, u) {
2076
2112
  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;
2113
+ return t(h) ? h : l > 1 ? (await Ce(r * ((a - l) / 2)), s(c, l - 1)) : h;
2078
2114
  }
2079
2115
  return async (...c) => await s(c);
2080
2116
  }
@@ -2082,7 +2118,7 @@ function F(n, e) {
2082
2118
  const t = j(n);
2083
2119
  return t.setMinutes(t.getMinutes() - e), t;
2084
2120
  }
2085
- class $t {
2121
+ class Ut {
2086
2122
  constructor(e) {
2087
2123
  d(this, "logger");
2088
2124
  d(this, "storageKey", "session");
@@ -2208,7 +2244,7 @@ class $t {
2208
2244
  data: null
2209
2245
  };
2210
2246
  if (this.refreshing)
2211
- return await _e(1e3), await this.get();
2247
+ return await Ce(1e3), await this.get();
2212
2248
  const e = window.localStorage.getItem(this.storageKey);
2213
2249
  if (!e)
2214
2250
  return {
@@ -2309,11 +2345,11 @@ function i(n, e) {
2309
2345
  }
2310
2346
  return e;
2311
2347
  }
2312
- class Ut {
2348
+ class Ot {
2313
2349
  constructor(e) {
2314
2350
  d(this, "staticService");
2315
2351
  const t = (e == null ? void 0 : e.environment) === "development";
2316
- this.staticService = new Rt({
2352
+ this.staticService = new Dt({
2317
2353
  url: t ? "https://static.development.opexa.io" : "https://static.opexa.io"
2318
2354
  });
2319
2355
  }
@@ -2357,7 +2393,7 @@ class Ut {
2357
2393
  return g(t);
2358
2394
  }
2359
2395
  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;
2396
+ var t, r, a, s, c, u, l, h, 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, de, me, ue, le, pe, fe, he;
2361
2397
  return {
2362
2398
  paymentSettings: {
2363
2399
  minimumFirstDepositAmount: i(e.minimumFirstDepositAmount),
@@ -2380,26 +2416,26 @@ class Ut {
2380
2416
  maximumAmount: i((v = e.gcashDepositGatewaySettings) == null ? void 0 : v.maximumAmount)
2381
2417
  },
2382
2418
  maya: {
2383
- androidEnabled: ((N = e.mayaDepositGatewaySettings) == null ? void 0 : N.androidEnabled) ?? !1,
2384
- iosEnabled: ((M = e.mayaDepositGatewaySettings) == null ? void 0 : M.iosEnabled) ?? !1,
2419
+ androidEnabled: ((M = e.mayaDepositGatewaySettings) == null ? void 0 : M.androidEnabled) ?? !1,
2420
+ iosEnabled: ((N = e.mayaDepositGatewaySettings) == null ? void 0 : N.iosEnabled) ?? !1,
2385
2421
  webEnabled: ((I = e.mayaDepositGatewaySettings) == null ? void 0 : I.webEnabled) ?? !1,
2386
2422
  mobileWebEnabled: ((S = e.mayaDepositGatewaySettings) == null ? void 0 : S.mobileWebEnabled) ?? !1,
2387
2423
  minimumAmount: i((R = e.mayaDepositGatewaySettings) == null ? void 0 : R.minimumAmount),
2388
2424
  maximumAmount: i((D = e.mayaDepositGatewaySettings) == null ? void 0 : D.maximumAmount)
2389
2425
  },
2390
2426
  mayaApp: {
2391
- androidEnabled: ((_ = e.mayaAppDepositGatewaySettings) == null ? void 0 : _.androidEnabled) ?? !1,
2427
+ androidEnabled: ((C = e.mayaAppDepositGatewaySettings) == null ? void 0 : C.androidEnabled) ?? !1,
2392
2428
  iosEnabled: ((P = e.mayaAppDepositGatewaySettings) == null ? void 0 : P.iosEnabled) ?? !1,
2393
2429
  webEnabled: ((x = e.mayaAppDepositGatewaySettings) == null ? void 0 : x.webEnabled) ?? !1,
2394
2430
  mobileWebEnabled: ((G = e.mayaAppDepositGatewaySettings) == null ? void 0 : G.mobileWebEnabled) ?? !1,
2395
- minimumAmount: i((C = e.mayaAppDepositGatewaySettings) == null ? void 0 : C.minimumAmount),
2431
+ minimumAmount: i((_ = e.mayaAppDepositGatewaySettings) == null ? void 0 : _.minimumAmount),
2396
2432
  maximumAmount: i(($ = e.mayaAppDepositGatewaySettings) == null ? void 0 : $.maximumAmount)
2397
2433
  }
2398
2434
  },
2399
2435
  withdrawalGateway: {
2400
2436
  bank: {
2401
- androidEnabled: ((W = e.bankWithdrawalGatewaySettings) == null ? void 0 : W.androidEnabled) ?? !1,
2402
- iosEnabled: ((O = e.bankWithdrawalGatewaySettings) == null ? void 0 : O.iosEnabled) ?? !1,
2437
+ androidEnabled: ((O = e.bankWithdrawalGatewaySettings) == null ? void 0 : O.androidEnabled) ?? !1,
2438
+ iosEnabled: ((W = e.bankWithdrawalGatewaySettings) == null ? void 0 : W.iosEnabled) ?? !1,
2403
2439
  webEnabled: ((k = e.bankWithdrawalGatewaySettings) == null ? void 0 : k.webEnabled) ?? !1,
2404
2440
  mobileWebEnabled: ((Q = e.bankWithdrawalGatewaySettings) == null ? void 0 : Q.mobileWebEnabled) ?? !1,
2405
2441
  minimumAmount: i((K = e.bankWithdrawalGatewaySettings) == null ? void 0 : K.minimumAmount),
@@ -2768,7 +2804,7 @@ class Ut {
2768
2804
  };
2769
2805
  }
2770
2806
  }
2771
- class Ft {
2807
+ class Lt {
2772
2808
  constructor(e) {
2773
2809
  d(this, "cmsPortalService");
2774
2810
  d(this, "authService");
@@ -2789,13 +2825,13 @@ class Ft {
2789
2825
  environment: s,
2790
2826
  logs: c
2791
2827
  } = e, u = s === "production";
2792
- this.transformer = new Ut({
2828
+ this.transformer = new Ot({
2793
2829
  environment: s
2794
2830
  }), this.logger = new ke({
2795
2831
  enabled: c ?? !1
2796
2832
  });
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,
2833
+ 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", M = u ? "https://game.opexa.io/graphql" : "https://game.development.opexa.io/graphql", N = u ? "https://portal-api.opexacms.io/v1" : "https://portal-api.development.opexacms.io/v1", I = new vt({
2834
+ url: N,
2799
2835
  site: t,
2800
2836
  platform: r
2801
2837
  }), S = {
@@ -2806,15 +2842,15 @@ class Ft {
2806
2842
  "Platform-Code": a
2807
2843
  }
2808
2844
  }
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({
2845
+ }, R = new Nt(new U(M, S)), D = new Mt(new U(v, S)), C = new Pt(new U(h, 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
2846
  url: l,
2811
2847
  platform: a
2812
- }), $ = new $t({
2848
+ }), $ = new Ut({
2813
2849
  logs: c,
2814
- authService: C,
2815
- walletService: _
2850
+ authService: _,
2851
+ walletService: C
2816
2852
  });
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;
2853
+ 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
2854
  }
2819
2855
  get authMiddleware() {
2820
2856
  return async (e) => {
@@ -2855,39 +2891,6 @@ class Ft {
2855
2891
  async sendAuthenticationCode(e) {
2856
2892
  return this.authService.sendVerificationCode(e);
2857
2893
  }
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
2894
  async authenticate(e) {
2892
2895
  switch (e.type) {
2893
2896
  case "SECURITY_QUESTION":
@@ -2909,32 +2912,8 @@ class Ft {
2909
2912
  async signOut() {
2910
2913
  await this.sessionManager.destroy();
2911
2914
  }
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
2915
  watchSession(e) {
2937
- const t = Pt(e.interval ?? 3e4, 3e4, 6e4);
2916
+ const t = xt(e.interval ?? 3e4, 3e4, 6e4);
2938
2917
  let r = null;
2939
2918
  const a = () => setTimeout(async () => {
2940
2919
  await this.sessionManager.verify() || await e.onInvalid(), r = a();
@@ -2998,29 +2977,8 @@ class Ft {
2998
2977
  })
2999
2978
  } : { ok: !1, error: t.error } : { ok: !1, error: e.error };
3000
2979
  }
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
2980
  async createAccount(e) {
3023
- const t = e.id ?? b.generate(A.Account).toString(), r = await this.accountService.registerMemberAccount({
2981
+ const t = e.id ?? A.generate(E.Account).toString(), r = await this.accountService.registerMemberAccount({
3024
2982
  input: {
3025
2983
  id: t,
3026
2984
  btag: e.btag,
@@ -3028,7 +2986,7 @@ class Ft {
3028
2986
  domain: e.domain,
3029
2987
  birthDay: typeof e.dateOfBirth == "string" ? e.dateOfBirth : e.dateOfBirth.toISOString(),
3030
2988
  password: await w(e.password),
3031
- mobileNumber: E(e.mobileNumber)
2989
+ mobileNumber: b(e.mobileNumber)
3032
2990
  },
3033
2991
  referralCode: e.referralCode,
3034
2992
  verificationCode: e.verificationCode,
@@ -3036,33 +2994,26 @@ class Ft {
3036
2994
  });
3037
2995
  return r.ok ? { ok: !0, data: { id: t } } : r;
3038
2996
  }
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
2997
  async createAccount__next(e) {
3060
- const t = e.id ?? b.generate(A.Account).toString(), r = await this.accountService.registerMemberAccount__next({
2998
+ const t = e.id ?? A.generate(E.Account).toString();
2999
+ if (e.type === "MOBILE_NUMBER") {
3000
+ const a = await this.accountService.registerMemberAccountViaMobile({
3001
+ input: {
3002
+ id: t,
3003
+ mobileNumber: b(e.mobileNumber)
3004
+ },
3005
+ referralCode: e.referralCode,
3006
+ reCAPTCHAResponse: e.reCAPTCHAResponse,
3007
+ verificationCode: e.verificationCode
3008
+ });
3009
+ return a.ok ? { ok: !0, data: { id: t } } : a;
3010
+ }
3011
+ const r = await this.accountService.registerMemberAccount__next({
3061
3012
  input: {
3062
3013
  id: t,
3063
3014
  name: e.name,
3064
3015
  password: await w(e.password),
3065
- mobileNumber: e.mobileNumber ? E(e.mobileNumber) : void 0
3016
+ mobileNumber: e.mobileNumber ? b(e.mobileNumber) : void 0
3066
3017
  },
3067
3018
  reCAPTCHAResponse: e.reCAPTCHAResponse
3068
3019
  });
@@ -3077,21 +3028,6 @@ class Ft {
3077
3028
  }
3078
3029
  });
3079
3030
  }
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
3031
  async updateAccount(e, t) {
3096
3032
  return await this.accountService.updateMemberAccount({
3097
3033
  input: {
@@ -3101,7 +3037,7 @@ class Ft {
3101
3037
  password: t.password ? await w(t.password) : void 0,
3102
3038
  transactionPassword: t.transactionPassword ? await w(t.transactionPassword) : void 0,
3103
3039
  ...t.mobileNumber && {
3104
- mobileNumber: E(t.mobileNumber)
3040
+ mobileNumber: b(t.mobileNumber)
3105
3041
  },
3106
3042
  secretAnswer: t.secretAnswer ? await w(t.secretAnswer) : void 0
3107
3043
  }
@@ -3122,29 +3058,8 @@ class Ft {
3122
3058
  data: e.data ? this.transformer.transform.verificationDetails(e.data) : null
3123
3059
  } : e;
3124
3060
  }
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
3061
  async submitVerificationDetails(e) {
3147
- const t = e.id ?? b.generate(A.Verification).toString(), r = await this.accountService.createMemberVerification({
3062
+ const t = e.id ?? A.generate(E.Verification).toString(), r = await this.accountService.createMemberVerification({
3148
3063
  input: {
3149
3064
  id: t,
3150
3065
  ...e
@@ -3152,21 +3067,6 @@ class Ft {
3152
3067
  });
3153
3068
  return r.ok ? { ok: !0, data: { id: t } } : r;
3154
3069
  }
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
3070
  async updateVerificationDetails(e, t) {
3171
3071
  return await this.accountService.updateMemberVerification({
3172
3072
  input: {
@@ -3180,7 +3080,7 @@ class Ft {
3180
3080
  async resetPassword(e) {
3181
3081
  return await this.accountService.resetPassword({
3182
3082
  input: {
3183
- mobileNumber: E(e.mobileNumber),
3083
+ mobileNumber: b(e.mobileNumber),
3184
3084
  newPassword: await w(e.newPassword)
3185
3085
  },
3186
3086
  verificationCode: e.verificationCode
@@ -3204,7 +3104,7 @@ class Ft {
3204
3104
  return await this.accountService.sendVerificationCode({
3205
3105
  input: {
3206
3106
  channel: "SMS",
3207
- recipient: E(e)
3107
+ recipient: b(e)
3208
3108
  }
3209
3109
  });
3210
3110
  }
@@ -3253,25 +3153,8 @@ class Ft {
3253
3153
  /*+ WITHDRAWAL +*/
3254
3154
  /*+----------------------------------------+*/
3255
3155
  /**/
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
3156
  async createWithdrawal(e) {
3274
- const t = e.id ?? b.generate(A.Withdrawal).toString();
3157
+ const t = e.id ?? A.generate(E.Withdrawal).toString();
3275
3158
  if (e.type === "BANK") {
3276
3159
  const r = await this.walletService.createBankWithdrawal({
3277
3160
  input: {
@@ -3288,7 +3171,7 @@ class Ft {
3288
3171
  id: t,
3289
3172
  amount: e.amount.toString(),
3290
3173
  transactionPassword: await w(e.transactionPassword),
3291
- recipientMobileNumber: E(e.recipientMobileNumber)
3174
+ recipientMobileNumber: b(e.recipientMobileNumber)
3292
3175
  }
3293
3176
  });
3294
3177
  if (!r.ok) return r;
@@ -3299,7 +3182,7 @@ class Ft {
3299
3182
  id: t,
3300
3183
  amount: e.amount.toString(),
3301
3184
  transactionPassword: await w(e.transactionPassword),
3302
- recipientMobileNumber: E(e.recipientMobileNumber)
3185
+ recipientMobileNumber: b(e.recipientMobileNumber)
3303
3186
  }
3304
3187
  });
3305
3188
  if (!r.ok) return r;
@@ -3339,25 +3222,8 @@ class Ft {
3339
3222
  /*+ DEPOSIT +*/
3340
3223
  /*+----------------------------------------+*/
3341
3224
  /**/
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
3225
  async createDeposit(e) {
3360
- const t = e.id ?? b.generate(A.Deposit).toString();
3226
+ const t = e.id ?? A.generate(E.Deposit).toString();
3361
3227
  if (e.type === "MAYA") {
3362
3228
  const r = await this.walletService.createMayaDeposit({
3363
3229
  input: {
@@ -3626,35 +3492,19 @@ class Ft {
3626
3492
  data: r.data ? this.transformer.transform.gameSession(r.data) : null
3627
3493
  } : r;
3628
3494
  }
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
3495
  async createGameSession(e) {
3646
- const t = e.id ?? b.generate(A.GameSession).toString(), r = await this.walletService.createGameSession({ input: { id: t, game: e.game } });
3496
+ const t = e.id ?? A.generate(E.GameSession).toString(), r = await this.walletService.createGameSession({ input: { id: t, game: e.game } });
3647
3497
  return r.ok ? { ok: !0, data: { id: t } } : r;
3648
3498
  }
3649
3499
  /** @deprecated use `createGameSession__next` */
3650
3500
  async createGameSession__legacy(e) {
3651
- const t = e.id ?? b.generate(A.GameSession).toString(), r = await this.gameService.createGameSession({ input: { id: t, game: e.game } });
3501
+ const t = e.id ?? A.generate(E.GameSession).toString(), r = await this.gameService.createGameSession({ input: { id: t, game: e.game } });
3652
3502
  return r.ok ? { ok: !0, data: { id: t } } : r;
3653
3503
  }
3654
3504
  async createGameSession__next(e) {
3655
- const t = e.id ?? b.generate(A.GameSession).toString();
3505
+ const t = e.id ?? A.generate(E.GameSession).toString();
3656
3506
  if (e.game.startsWith("SPORTS:")) {
3657
- const u = await b.generateFromKey(A.Game, e.game).then(
3507
+ const u = await A.generateFromKey(E.Game, e.game).then(
3658
3508
  (h) => h.toString()
3659
3509
  ), l = await this.gameService.createGameSession({
3660
3510
  input: {
@@ -3677,7 +3527,7 @@ class Ft {
3677
3527
  /**/
3678
3528
  provider: a,
3679
3529
  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 } });
3530
+ } = r.data, c = Bt(a) ? await this.walletService.createGameSession({ input: { id: t, game: s } }) : await this.gameService.createGameSession({ input: { id: t, game: s } });
3681
3531
  return c.ok ? { ok: !0, data: { id: t } } : c;
3682
3532
  }
3683
3533
  /** @deprecated use `endGameSession__next` */
@@ -3704,23 +3554,8 @@ class Ft {
3704
3554
  data: t.data ? this.transformer.transform.file(t.data) : null
3705
3555
  } : t;
3706
3556
  }
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
3557
  async uploadImageFile(e) {
3723
- const t = e.id ?? b.generate(A.File).toString(), r = await this.fileService.uploadPrivateImageFile({
3558
+ const t = e.id ?? A.generate(E.File).toString(), r = await this.fileService.uploadPrivateImageFile({
3724
3559
  input: {
3725
3560
  id: t,
3726
3561
  file: e.file
@@ -3823,12 +3658,12 @@ const Wt = [
3823
3658
  "EVOLUTION_NETENT",
3824
3659
  "EVOLUTION_REDTIGER"
3825
3660
  ];
3826
- function Ot(n) {
3661
+ function Bt(n) {
3827
3662
  return Wt.some((e) => e === n);
3828
3663
  }
3829
3664
  export {
3830
- Ht as ObjectId,
3831
- A as ObjectType,
3832
- Ft as Sdk
3665
+ Yt as ObjectId,
3666
+ E as ObjectType,
3667
+ Lt as Sdk
3833
3668
  };
3834
3669
  //# sourceMappingURL=index.mjs.map