@opexa/portal-sdk 0.0.68 → 0.0.70

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
1
  var _e = Object.defineProperty;
2
2
  var Te = (n, e, t) => e in n ? _e(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
3
  var m = (n, e, t) => Te(n, typeof e != "symbol" ? e + "" : e, t);
4
- import { ObjectId as b } from "@opexa/object-id";
5
- import { ObjectId as Lt } from "@opexa/object-id";
6
- const A = {
4
+ import { ObjectId as E } from "@opexa/object-id";
5
+ import { ObjectId as Vt } from "@opexa/object-id";
6
+ const b = {
7
7
  Account: 8,
8
8
  Deposit: 9,
9
9
  Withdrawal: 14,
@@ -163,7 +163,7 @@ const L = o`
163
163
  mutation EndGameSession($input: EndGameSessionInput!) {
164
164
  endGameSession(input: $input)
165
165
  }
166
- `, Ge = o`
166
+ `, xe = o`
167
167
  mutation EndGameSession($input: EndGameSessionInput!) {
168
168
  endGameSession(input: $input) {
169
169
  ... on GameSessionDoesNotExistError {
@@ -177,7 +177,7 @@ const L = o`
177
177
  }
178
178
  }
179
179
  }
180
- `, xe = o`
180
+ `, Ge = o`
181
181
  query Announcements($first: Int, $after: Cursor, $filter: AnnouncementFilterInput) {
182
182
  announcements(first: $first, after: $after, filter: $filter) {
183
183
  edges {
@@ -450,7 +450,7 @@ const L = o`
450
450
  }
451
451
  }
452
452
  }
453
- `, Ye = o`
453
+ `, He = o`
454
454
  mutation CreateMayaAppDeposit($input: CreateMayaAppDepositInput!) {
455
455
  createMayaAppDeposit(input: $input) {
456
456
  ... on DepositPromoMaximumAmountExceededError {
@@ -479,7 +479,7 @@ const L = o`
479
479
  }
480
480
  }
481
481
  }
482
- `, He = o`
482
+ `, Ye = o`
483
483
  query Deposit($id: ObjectId!) {
484
484
  node(id: $id) {
485
485
  ... on GCashDeposit {
@@ -604,7 +604,7 @@ const L = o`
604
604
  }
605
605
  }
606
606
  }
607
- `, H = o`
607
+ `, Y = o`
608
608
  ${L}
609
609
 
610
610
  fragment PromoFragment on Promo {
@@ -624,7 +624,7 @@ const L = o`
624
624
  dateTimeLastUpdated
625
625
  }
626
626
  `, ze = o`
627
- ${H}
627
+ ${Y}
628
628
 
629
629
  query Promos {
630
630
  promos {
@@ -632,7 +632,7 @@ const L = o`
632
632
  }
633
633
  }
634
634
  `, Xe = o`
635
- ${H}
635
+ ${Y}
636
636
 
637
637
  query AvailablePromos($filter: PromoFilterInput) {
638
638
  availablePromos(filter: $filter) {
@@ -665,7 +665,7 @@ const L = o`
665
665
  }
666
666
  }
667
667
  `, et = o`
668
- ${H}
668
+ ${Y}
669
669
 
670
670
  query Bonus {
671
671
  bonus {
@@ -807,6 +807,35 @@ const L = o`
807
807
  }
808
808
  }
809
809
  `, st = o`
810
+ mutation RegisterMemberAccountNext(
811
+ $input: RegisterMemberAccountInput_next!
812
+ $reCAPTCHAResponse: String
813
+ ) {
814
+ registerMemberAccount_next(input: $input, reCAPTCHAResponse: $reCAPTCHAResponse) {
815
+ ... on AccountNameNotAvailableError {
816
+ __typename
817
+ }
818
+ ... on InvalidPlatformError {
819
+ __typename
820
+ }
821
+ ... on InvalidPlatformError {
822
+ __typename
823
+ }
824
+ ... on InvalidReCAPTCHAResponseError {
825
+ __typename
826
+ }
827
+ ... on InvalidSMSVerificationCodeError {
828
+ __typename
829
+ }
830
+ ... on MinimumAgeRequirementError {
831
+ __typename
832
+ }
833
+ ... on MobileNumberNotAvailableError {
834
+ __typename
835
+ }
836
+ }
837
+ }
838
+ `, ct = o`
810
839
  mutation RegisterMayaMemberAccount($input: RegisterMayaMemberAccountInput!) {
811
840
  registerMayaMemberAccount(input: $input) {
812
841
  ... on AccountNameNotAvailableError {
@@ -814,7 +843,7 @@ const L = o`
814
843
  }
815
844
  }
816
845
  }
817
- `, ct = o`
846
+ `, mt = o`
818
847
  mutation UpdateMemberAccount($input: UpdateMemberAccountInput!) {
819
848
  updateMemberAccount(input: $input) {
820
849
  ... on AccountNameNotAvailableError {
@@ -840,7 +869,7 @@ const L = o`
840
869
  }
841
870
  }
842
871
  }
843
- `, mt = o`
872
+ `, dt = o`
844
873
  mutation ResetPassword($input: ResetPasswordInput!, $verificationCode: String) {
845
874
  resetPassword(input: $input, verificationCode: $verificationCode) {
846
875
  ... on AccountNotFoundError {
@@ -851,11 +880,11 @@ const L = o`
851
880
  }
852
881
  }
853
882
  }
854
- `, dt = o`
883
+ `, ut = o`
855
884
  mutation DeleteMemberAccount($input: DeleteMemberAccountInput!) {
856
885
  deleteMemberAccount(input: $input)
857
886
  }
858
- `, ut = o`
887
+ `, lt = o`
859
888
  mutation VerifyMobileNumber($input: VerifyMobileNumberInput!) {
860
889
  verifyMobileNumber(input: $input) {
861
890
  ... on InvalidSMSVerificationCodeError {
@@ -866,7 +895,7 @@ const L = o`
866
895
  }
867
896
  }
868
897
  }
869
- `, lt = o`
898
+ `, pt = o`
870
899
  mutation CreateMemberVerification($input: CreateMemberVerificationInput!) {
871
900
  createMemberVerification(input: $input) {
872
901
  ... on FileDoesNotExistError {
@@ -880,7 +909,7 @@ const L = o`
880
909
  }
881
910
  }
882
911
  }
883
- `, pt = o`
912
+ `, ft = o`
884
913
  mutation UpdateMemberVerification($input: UpdateMemberVerificationInput!) {
885
914
  updateMemberVerification(input: $input) {
886
915
  ... on FileDoesNotExistError {
@@ -897,7 +926,7 @@ const L = o`
897
926
  }
898
927
  }
899
928
  }
900
- `, ft = o`
929
+ `, ht = o`
901
930
  query ProfileCompletion {
902
931
  profileCompletion {
903
932
  completionPercentage
@@ -908,7 +937,7 @@ const L = o`
908
937
  accountPassword
909
938
  }
910
939
  }
911
- `, ht = o`
940
+ `, yt = o`
912
941
  mutation SendVerificationCode($input: SendVerificationCodeInput!) {
913
942
  sendVerificationCode(input: $input) {
914
943
  ... on InvalidPlatformError {
@@ -919,7 +948,7 @@ const L = o`
919
948
  }
920
949
  }
921
950
  }
922
- `, yt = o`
951
+ `, wt = o`
923
952
  fragment DepositGatewaySettingsCoreData on DepositGatewaySettings {
924
953
  minimumAmount
925
954
  maximumAmount
@@ -973,7 +1002,7 @@ const L = o`
973
1002
  multiplier
974
1003
  }
975
1004
  }
976
- `, wt = o`
1005
+ `, gt = o`
977
1006
  query MayaSession($id: ObjectId!) {
978
1007
  mayaSession(id: $id) {
979
1008
  id
@@ -981,11 +1010,11 @@ const L = o`
981
1010
  dateTimeCreated
982
1011
  }
983
1012
  }
984
- `, gt = o`
1013
+ `, St = o`
985
1014
  mutation ValidateMayaSession {
986
1015
  validateMayaSession: validMayaSession
987
1016
  }
988
- `, St = o`
1017
+ `, Et = o`
989
1018
  query ActivityRecords($after: Cursor, $first: Int, $filter: ActivityRecordsFilterInput) {
990
1019
  member {
991
1020
  activityRecords(after: $after, first: $first, filter: $filter) {
@@ -1010,11 +1039,11 @@ const L = o`
1010
1039
  }
1011
1040
  }
1012
1041
  }
1013
- `, Et = o`
1042
+ `, bt = o`
1014
1043
  query ReferralCode {
1015
1044
  referralCode
1016
1045
  }
1017
- `, bt = o`
1046
+ `, At = o`
1018
1047
  mutation UpdateReferralCode($input: UpdateReferralCodeInput!) {
1019
1048
  updateReferralCode(input: $input) {
1020
1049
  ... on ReferralCodeNotAvailableError {
@@ -1023,7 +1052,7 @@ const L = o`
1023
1052
  }
1024
1053
  }
1025
1054
  `;
1026
- function u(n) {
1055
+ function d(n) {
1027
1056
  return {
1028
1057
  name: n,
1029
1058
  message: {
@@ -1078,7 +1107,7 @@ function u(n) {
1078
1107
  }[n]
1079
1108
  };
1080
1109
  }
1081
- class At {
1110
+ class kt {
1082
1111
  constructor(e) {
1083
1112
  m(this, "client");
1084
1113
  this.client = e;
@@ -1095,22 +1124,31 @@ class At {
1095
1124
  const t = await this.client.request(it, e);
1096
1125
  return t.ok ? t.data.registerMemberAccount ? {
1097
1126
  ok: !1,
1098
- error: u(t.data.registerMemberAccount.__typename)
1127
+ error: d(t.data.registerMemberAccount.__typename)
1128
+ } : {
1129
+ ok: !0
1130
+ } : t;
1131
+ }
1132
+ async registerMemberAccountNext(e) {
1133
+ const t = await this.client.request(st, e);
1134
+ return t.ok ? t.data.registerMemberAccount_next ? {
1135
+ ok: !1,
1136
+ error: d(t.data.registerMemberAccount_next.__typename)
1099
1137
  } : {
1100
1138
  ok: !0
1101
1139
  } : t;
1102
1140
  }
1103
1141
  async updateMemberAccount(e) {
1104
- const t = await this.client.request(ct, e);
1142
+ const t = await this.client.request(mt, e);
1105
1143
  return t.ok ? t.data.updateMemberAccount ? {
1106
1144
  ok: !1,
1107
- error: u(t.data.updateMemberAccount.__typename)
1145
+ error: d(t.data.updateMemberAccount.__typename)
1108
1146
  } : {
1109
1147
  ok: !0
1110
1148
  } : t;
1111
1149
  }
1112
1150
  async deleteMemberAccount(e) {
1113
- const t = await this.client.request(dt, e);
1151
+ const t = await this.client.request(ut, e);
1114
1152
  return t.ok ? t.data.deleteMemberAccount ? {
1115
1153
  ok: !0
1116
1154
  } : {
@@ -1123,55 +1161,55 @@ class At {
1123
1161
  }
1124
1162
  async resetPassword(e) {
1125
1163
  const t = await this.client.request(
1126
- mt,
1164
+ dt,
1127
1165
  e
1128
1166
  );
1129
1167
  return t.ok ? t.data.resetPassword ? {
1130
1168
  ok: !1,
1131
- error: u(t.data.resetPassword.__typename)
1169
+ error: d(t.data.resetPassword.__typename)
1132
1170
  } : {
1133
1171
  ok: !0
1134
1172
  } : t;
1135
1173
  }
1136
1174
  async profileCompletion() {
1137
- const e = await this.client.request(ft);
1175
+ const e = await this.client.request(ht);
1138
1176
  return e.ok ? { ok: !0, data: e.data.profileCompletion } : e;
1139
1177
  }
1140
1178
  async platform() {
1141
- return await this.client.request(yt);
1179
+ return await this.client.request(wt);
1142
1180
  }
1143
1181
  async sendVerificationCode(e) {
1144
- const t = await this.client.request(ht, e);
1182
+ const t = await this.client.request(yt, e);
1145
1183
  return t.ok ? t.data.sendVerificationCode ? {
1146
1184
  ok: !1,
1147
- error: u(t.data.sendVerificationCode.__typename)
1185
+ error: d(t.data.sendVerificationCode.__typename)
1148
1186
  } : {
1149
1187
  ok: !0
1150
1188
  } : t;
1151
1189
  }
1152
1190
  async verifyMobileNumber(e) {
1153
- const t = await this.client.request(ut, e);
1191
+ const t = await this.client.request(lt, e);
1154
1192
  return t.ok ? t.data.verifyMobileNumber ? {
1155
1193
  ok: !1,
1156
- error: u(t.data.verifyMobileNumber.__typename)
1194
+ error: d(t.data.verifyMobileNumber.__typename)
1157
1195
  } : {
1158
1196
  ok: !0
1159
1197
  } : t;
1160
1198
  }
1161
1199
  async createMemberVerification(e) {
1162
- const t = await this.client.request(lt, e);
1200
+ const t = await this.client.request(pt, e);
1163
1201
  return t.ok ? t.data.createMemberVerification ? {
1164
1202
  ok: !1,
1165
- error: u(t.data.createMemberVerification.__typename)
1203
+ error: d(t.data.createMemberVerification.__typename)
1166
1204
  } : {
1167
1205
  ok: !0
1168
1206
  } : t;
1169
1207
  }
1170
1208
  async updateMemberVerification(e) {
1171
- const t = await this.client.request(pt, e);
1209
+ const t = await this.client.request(ft, e);
1172
1210
  return t.ok ? t.data.updateMemberVerification ? {
1173
1211
  ok: !1,
1174
- error: u(t.data.updateMemberVerification.__typename)
1212
+ error: d(t.data.updateMemberVerification.__typename)
1175
1213
  } : {
1176
1214
  ok: !0
1177
1215
  } : t;
@@ -1185,7 +1223,7 @@ class At {
1185
1223
  }
1186
1224
  async announcements(e) {
1187
1225
  const t = await this.client.request(
1188
- xe,
1226
+ Ge,
1189
1227
  e
1190
1228
  );
1191
1229
  return t.ok ? {
@@ -1194,32 +1232,32 @@ class At {
1194
1232
  } : t;
1195
1233
  }
1196
1234
  async registerMayaMemberAccount(e) {
1197
- const t = await this.client.request(st, e);
1235
+ const t = await this.client.request(ct, e);
1198
1236
  return t.ok ? t.data.registerMayaMemberAccount ? {
1199
1237
  ok: !1,
1200
- error: u(t.data.registerMayaMemberAccount.__typename)
1238
+ error: d(t.data.registerMayaMemberAccount.__typename)
1201
1239
  } : {
1202
1240
  ok: !0
1203
1241
  } : t;
1204
1242
  }
1205
1243
  async referralCode() {
1206
- const e = await this.client.request(Et);
1244
+ const e = await this.client.request(bt);
1207
1245
  return e.ok ? {
1208
1246
  ok: !0,
1209
1247
  data: e.data.referralCode
1210
1248
  } : e;
1211
1249
  }
1212
1250
  async updateReferralCode(e) {
1213
- const t = await this.client.request(bt, e);
1251
+ const t = await this.client.request(At, e);
1214
1252
  return t.ok ? t.data.updateReferralCode ? {
1215
1253
  ok: !1,
1216
- error: u(t.data.updateReferralCode.__typename)
1254
+ error: d(t.data.updateReferralCode.__typename)
1217
1255
  } : {
1218
1256
  ok: !0
1219
1257
  } : t;
1220
1258
  }
1221
1259
  }
1222
- function _(n) {
1260
+ function k(n) {
1223
1261
  return n.startsWith("+63") ? n : n.startsWith("63") ? `+${n}` : n.startsWith("0") ? `+63${n.substring(1)}` : `+63${n}`;
1224
1262
  }
1225
1263
  function h(n, e) {
@@ -1238,7 +1276,7 @@ const V = {
1238
1276
  429: { name: "HttpTooManyRequests", message: "Too Many Requests" },
1239
1277
  500: { name: "HttpInternalServerError", message: "Internal Server Error" }
1240
1278
  };
1241
- class kt {
1279
+ class Ct {
1242
1280
  constructor(e) {
1243
1281
  m(this, "url");
1244
1282
  m(this, "platform");
@@ -1255,7 +1293,7 @@ class kt {
1255
1293
  t.set("Authorization", `Basic ${a}`);
1256
1294
  }
1257
1295
  if (e.mobileNumber) {
1258
- const a = `${_(e.mobileNumber)}:${e.authenticationCode}`, s = Buffer.from(a).toString("base64");
1296
+ const a = `${k(e.mobileNumber)}:${e.authenticationCode}`, s = Buffer.from(a).toString("base64");
1259
1297
  console.log(`MobileNumberOTP ${s}`), t.set("Authorization", `MobileNumberOTP ${s}`);
1260
1298
  }
1261
1299
  e.sessionId && t.set("Authorization", `MayaSession ${e.sessionId}`);
@@ -1269,7 +1307,7 @@ class kt {
1269
1307
  data: a
1270
1308
  } : a.code === "ACCOUNT_BLACKLISTED" ? {
1271
1309
  ok: !1,
1272
- error: u("AccountBlacklisted")
1310
+ error: d("AccountBlacklisted")
1273
1311
  } : {
1274
1312
  ok: !1,
1275
1313
  error: h(r.status)
@@ -1302,7 +1340,7 @@ class kt {
1302
1340
  data: a
1303
1341
  } : r.status === 401 || r.status === 403 ? {
1304
1342
  ok: !1,
1305
- error: u("InvalidTokenOrSecretAnswer")
1343
+ error: d("InvalidTokenOrSecretAnswer")
1306
1344
  } : {
1307
1345
  ok: !1,
1308
1346
  error: h(r.status)
@@ -1332,10 +1370,10 @@ class kt {
1332
1370
  data: r
1333
1371
  } : r.code === "ACCOUNT_BLACKLISTED" ? {
1334
1372
  ok: !1,
1335
- error: u("AccountBlacklisted")
1373
+ error: d("AccountBlacklisted")
1336
1374
  } : t.status === 403 || t.status === 401 ? {
1337
1375
  ok: !1,
1338
- error: u("InvalidToken")
1376
+ error: d("InvalidToken")
1339
1377
  } : {
1340
1378
  ok: !1,
1341
1379
  error: h(t.status)
@@ -1379,7 +1417,7 @@ class kt {
1379
1417
  }
1380
1418
  }
1381
1419
  async sendVerificationCode(e) {
1382
- const t = _(e);
1420
+ const t = k(e);
1383
1421
  try {
1384
1422
  const r = await fetch(`${this.url}/sendVerificationCode`, {
1385
1423
  method: "POST",
@@ -1405,7 +1443,7 @@ class kt {
1405
1443
  }
1406
1444
  }
1407
1445
  }
1408
- class Ct {
1446
+ class _t {
1409
1447
  constructor(e) {
1410
1448
  m(this, "url");
1411
1449
  m(this, "siteId");
@@ -1420,22 +1458,22 @@ class Ct {
1420
1458
  } : e;
1421
1459
  }
1422
1460
  async games(e) {
1423
- var a, s, c, d, l, f, y, p, T, v, M, N, I, g, R, D, k, P, G, x, C, $, U, O;
1461
+ var a, s, c, u, l, f, y, p, T, v, M, N, I, S, R, D, C, P, x, G, _, $, U, O;
1424
1462
  const t = new URLSearchParams();
1425
- 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), (d = (c = e == null ? void 0 : e.filter) == null ? void 0 : c.type) != null && d.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), (g = (I = e == null ? void 0 : e.filter) == null ? void 0 : I.provider) != null && g.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 = (k = e == null ? void 0 : e.filter) == null ? void 0 : k.tags) != null && P.equal && t.set("filter[tags][eq]", e.filter.tags.equal.toLowerCase()), (x = (G = e == null ? void 0 : e.filter) == null ? void 0 : G.tags) != null && x.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(
1463
+ e != null && e.first && t.set("first", e.first.toString()), e != null && e.after && t.set("after", e.after), e != null && e.search && t.set("search", e.search), (s = (a = e == null ? void 0 : e.filter) == null ? void 0 : a.type) != null && s.equal && t.set("filter[type][eq]", e.filter.type.equal), (u = (c = e == null ? void 0 : e.filter) == null ? void 0 : c.type) != null && u.notEqual && t.set("filter[type][neq]", e.filter.type.notEqual), (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(
1426
1464
  "filter[tags][in]",
1427
- e.filter.tags.in.map((E) => E.toLowerCase()).join(",")
1465
+ e.filter.tags.in.map((A) => A.toLowerCase()).join(",")
1428
1466
  ), (O = (U = e == null ? void 0 : e.filter) == null ? void 0 : U.tags) != null && O.notIn && t.set(
1429
1467
  "filter[tags][nin]",
1430
- e.filter.tags.notIn.map((E) => E.toLowerCase()).join(",")
1468
+ e.filter.tags.notIn.map((A) => A.toLowerCase()).join(",")
1431
1469
  );
1432
1470
  const r = await this.getJson("/games", t);
1433
1471
  return r.ok ? {
1434
1472
  ok: !0,
1435
1473
  data: {
1436
- edges: r.data.data.map((E) => ({
1437
- node: E,
1438
- cursor: E.cursor
1474
+ edges: r.data.data.map((A) => ({
1475
+ node: A,
1476
+ cursor: A.cursor
1439
1477
  })),
1440
1478
  totalCount: r.data.totalCount ?? 0,
1441
1479
  pageInfo: {
@@ -1483,7 +1521,7 @@ class Ct {
1483
1521
  }
1484
1522
  }
1485
1523
  }
1486
- class _t {
1524
+ class Tt {
1487
1525
  constructor(e) {
1488
1526
  m(this, "client");
1489
1527
  this.client = e;
@@ -1499,13 +1537,13 @@ class _t {
1499
1537
  const t = await this.client.upload(Me, e);
1500
1538
  return t.ok ? t.data.uploadPrivateImageFile ? {
1501
1539
  ok: !1,
1502
- error: u(t.data.uploadPrivateImageFile.__typename)
1540
+ error: d(t.data.uploadPrivateImageFile.__typename)
1503
1541
  } : {
1504
1542
  ok: !0
1505
1543
  } : t;
1506
1544
  }
1507
1545
  }
1508
- class Tt {
1546
+ class vt {
1509
1547
  constructor(e) {
1510
1548
  m(this, "client");
1511
1549
  this.client = e;
@@ -1534,22 +1572,22 @@ class Tt {
1534
1572
  const t = await this.client.request(be, e);
1535
1573
  return t.ok ? t.data.createGameSession ? {
1536
1574
  ok: !1,
1537
- error: u(t.data.createGameSession.__typename)
1575
+ error: d(t.data.createGameSession.__typename)
1538
1576
  } : {
1539
1577
  ok: !0
1540
1578
  } : t;
1541
1579
  }
1542
1580
  async endGameSession(e) {
1543
- const t = await this.client.request(Ge, e);
1581
+ const t = await this.client.request(xe, e);
1544
1582
  return t.ok ? t.data.endGameSession ? {
1545
1583
  ok: !1,
1546
- error: u(t.data.endGameSession.__typename)
1584
+ error: d(t.data.endGameSession.__typename)
1547
1585
  } : {
1548
1586
  ok: !0
1549
1587
  } : t;
1550
1588
  }
1551
1589
  }
1552
- class vt {
1590
+ class Mt {
1553
1591
  constructor(e) {
1554
1592
  m(this, "client");
1555
1593
  this.client = e;
@@ -1562,7 +1600,7 @@ class vt {
1562
1600
  } : e;
1563
1601
  }
1564
1602
  }
1565
- class Mt {
1603
+ class Nt {
1566
1604
  constructor(e) {
1567
1605
  m(this, "client");
1568
1606
  this.client = e;
@@ -1606,13 +1644,13 @@ class Mt {
1606
1644
  }
1607
1645
  async activityRecords(e) {
1608
1646
  const t = await this.client.request(
1609
- St,
1647
+ Et,
1610
1648
  e
1611
1649
  );
1612
1650
  return t.ok ? { ok: t.ok, data: t.data.member.activityRecords } : t;
1613
1651
  }
1614
1652
  }
1615
- class Nt {
1653
+ class It {
1616
1654
  constructor(e) {
1617
1655
  m(this, "url");
1618
1656
  this.url = e.url;
@@ -1624,7 +1662,7 @@ class Nt {
1624
1662
  ];
1625
1663
  }
1626
1664
  }
1627
- class It {
1665
+ class Rt {
1628
1666
  constructor(e) {
1629
1667
  m(this, "client");
1630
1668
  this.client = e;
@@ -1652,7 +1690,7 @@ class It {
1652
1690
  const t = await this.client.request(rt, e);
1653
1691
  return t.ok ? t.data.claimCashbackBonus ? {
1654
1692
  ok: !1,
1655
- error: u(t.data.claimCashbackBonus.__typename)
1693
+ error: d(t.data.claimCashbackBonus.__typename)
1656
1694
  } : {
1657
1695
  ok: !0
1658
1696
  } : {
@@ -1670,7 +1708,7 @@ class It {
1670
1708
  }
1671
1709
  async deposit(e) {
1672
1710
  const t = await this.client.request(
1673
- He,
1711
+ Ye,
1674
1712
  e
1675
1713
  );
1676
1714
  return t.ok ? { ok: t.ok, data: t.data.node } : t;
@@ -1679,7 +1717,7 @@ class It {
1679
1717
  const t = await this.client.request(Le, e);
1680
1718
  return t.ok ? t.data.createGCashDeposit ? {
1681
1719
  ok: !1,
1682
- error: u(t.data.createGCashDeposit.__typename)
1720
+ error: d(t.data.createGCashDeposit.__typename)
1683
1721
  } : {
1684
1722
  ok: !0
1685
1723
  } : t;
@@ -1688,16 +1726,16 @@ class It {
1688
1726
  const t = await this.client.request(Ve, e);
1689
1727
  return t.ok ? t.data.createMayaDeposit ? {
1690
1728
  ok: !1,
1691
- error: u(t.data.createMayaDeposit.__typename)
1729
+ error: d(t.data.createMayaDeposit.__typename)
1692
1730
  } : {
1693
1731
  ok: !0
1694
1732
  } : t;
1695
1733
  }
1696
1734
  async createMayaAppDeposit(e) {
1697
- const t = await this.client.request(Ye, e);
1735
+ const t = await this.client.request(He, e);
1698
1736
  return t.ok ? t.data.createMayaAppDeposit ? {
1699
1737
  ok: !1,
1700
- error: u(t.data.createMayaAppDeposit.__typename)
1738
+ error: d(t.data.createMayaAppDeposit.__typename)
1701
1739
  } : {
1702
1740
  ok: !0
1703
1741
  } : t;
@@ -1706,7 +1744,7 @@ class It {
1706
1744
  const t = await this.client.request(We, e);
1707
1745
  return t.ok ? t.data.createGCashWithdrawal ? {
1708
1746
  ok: !1,
1709
- error: u(t.data.createGCashWithdrawal.__typename)
1747
+ error: d(t.data.createGCashWithdrawal.__typename)
1710
1748
  } : {
1711
1749
  ok: !0
1712
1750
  } : t;
@@ -1715,7 +1753,7 @@ class It {
1715
1753
  const t = await this.client.request(Ue, e);
1716
1754
  return t.ok ? t.data.createMayaWithdrawal ? {
1717
1755
  ok: !1,
1718
- error: u(t.data.createMayaWithdrawal.__typename)
1756
+ error: d(t.data.createMayaWithdrawal.__typename)
1719
1757
  } : {
1720
1758
  ok: !0
1721
1759
  } : t;
@@ -1724,7 +1762,7 @@ class It {
1724
1762
  const t = await this.client.request(Oe, e);
1725
1763
  return t.ok ? t.data.createMayaAppWithdrawal ? {
1726
1764
  ok: !1,
1727
- error: u(t.data.createMayaAppWithdrawal.__typename)
1765
+ error: d(t.data.createMayaAppWithdrawal.__typename)
1728
1766
  } : {
1729
1767
  ok: !0
1730
1768
  } : t;
@@ -1733,7 +1771,7 @@ class It {
1733
1771
  const t = await this.client.request(Be, e);
1734
1772
  return t.ok ? t.data.createBankWithdrawal ? {
1735
1773
  ok: !1,
1736
- error: u(t.data.createBankWithdrawal.__typename)
1774
+ error: d(t.data.createBankWithdrawal.__typename)
1737
1775
  } : {
1738
1776
  ok: !0
1739
1777
  } : t;
@@ -1752,14 +1790,14 @@ class It {
1752
1790
  const t = await this.client.request(Re, e);
1753
1791
  return t.ok ? t.data.pointsToCashConversion ? {
1754
1792
  ok: !1,
1755
- error: u(t.data.pointsToCashConversion.__typename)
1793
+ error: d(t.data.pointsToCashConversion.__typename)
1756
1794
  } : {
1757
1795
  ok: !0
1758
1796
  } : t;
1759
1797
  }
1760
1798
  async mayaSession(e) {
1761
1799
  const t = await this.client.request(
1762
- wt,
1800
+ gt,
1763
1801
  e
1764
1802
  );
1765
1803
  return t.ok ? { ok: t.ok, data: t.data.mayaSession } : t;
@@ -1788,7 +1826,7 @@ class It {
1788
1826
  const t = await this.client.request(be, e);
1789
1827
  return t.ok ? t.data.createGameSession ? {
1790
1828
  ok: !1,
1791
- error: u(t.data.createGameSession.__typename)
1829
+ error: d(t.data.createGameSession.__typename)
1792
1830
  } : {
1793
1831
  ok: !0
1794
1832
  } : t;
@@ -1810,7 +1848,7 @@ class It {
1810
1848
  }
1811
1849
  async validateMayaSession() {
1812
1850
  const e = await this.client.request(
1813
- gt
1851
+ St
1814
1852
  );
1815
1853
  return e.ok ? e.data.validateMayaSession ? {
1816
1854
  ok: !0
@@ -1823,18 +1861,18 @@ class It {
1823
1861
  } : e;
1824
1862
  }
1825
1863
  }
1826
- function Rt(n, e, t) {
1864
+ function Dt(n, e, t) {
1827
1865
  return n < e ? e : n > t ? t : n;
1828
1866
  }
1829
- function Y(n) {
1867
+ function H(n) {
1830
1868
  return Object.prototype.toString.call(n) === "[object Object]" && Object(n) === n;
1831
1869
  }
1832
- function Dt(n) {
1870
+ function Pt(n) {
1833
1871
  const e = [];
1834
1872
  function t(r, a = []) {
1835
1873
  for (const s in r) {
1836
1874
  const c = r[s];
1837
- Y(c) ? t(c, [...a, s]) : Array.isArray(c) ? t(Pt(c), [...a, s]) : e.push({
1875
+ H(c) ? t(c, [...a, s]) : Array.isArray(c) ? t(xt(c), [...a, s]) : e.push({
1838
1876
  key: [...a, s],
1839
1877
  value: c
1840
1878
  });
@@ -1842,7 +1880,7 @@ function Dt(n) {
1842
1880
  }
1843
1881
  return t(n), e;
1844
1882
  }
1845
- function Pt(n) {
1883
+ function xt(n) {
1846
1884
  return n.reduce((e, t, r) => (e[r] = t, e), {});
1847
1885
  }
1848
1886
  class W {
@@ -1882,13 +1920,13 @@ class W {
1882
1920
  return await this.exec(s);
1883
1921
  }
1884
1922
  async exec(e) {
1885
- var t, r, a, s, c, d;
1923
+ var t, r, a, s, c, u;
1886
1924
  try {
1887
1925
  const l = await fetch(e);
1888
1926
  if (!l.ok)
1889
1927
  return { ok: !1, error: h(l.status) };
1890
1928
  const f = await l.json(), y = f.data, p = (t = f.errors) == null ? void 0 : t.at(0);
1891
- 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" || ((d = p.extensions) == null ? void 0 : d.code) === "BAD_REQUEST" ? { ok: !1, error: h(400, p.message) } : {
1929
+ return p ? ((r = p.extensions) == null ? void 0 : r.code) === "FORBIDDEN" || ((a = p.extensions) == null ? void 0 : a.code) === "ACCESS_TOKEN_EXPIRED" ? { ok: !1, error: 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) } : {
1892
1930
  ok: !1,
1893
1931
  error: h(500, p.message)
1894
1932
  } : {
@@ -1909,7 +1947,7 @@ class W {
1909
1947
  return t;
1910
1948
  }
1911
1949
  createUploadBody(e, t) {
1912
- const r = Dt(t).filter(
1950
+ const r = Pt(t).filter(
1913
1951
  (c) => c.value instanceof File || c.value instanceof Blob
1914
1952
  ), a = new FormData();
1915
1953
  a.append(
@@ -1920,14 +1958,14 @@ class W {
1920
1958
  })
1921
1959
  );
1922
1960
  const s = {};
1923
- return r.forEach((c, d) => {
1924
- s[d.toString()] = [`variables.${c.key.join(".")}`];
1925
- }), a.append("map", JSON.stringify(s)), r.forEach((c, d) => {
1926
- a.append(d.toString(), c.value);
1961
+ return r.forEach((c, u) => {
1962
+ s[u.toString()] = [`variables.${c.key.join(".")}`];
1963
+ }), a.append("map", JSON.stringify(s)), r.forEach((c, u) => {
1964
+ a.append(u.toString(), c.value);
1927
1965
  }), a;
1928
1966
  }
1929
1967
  }
1930
- async function S(n) {
1968
+ async function w(n) {
1931
1969
  const e = new TextEncoder().encode(n), t = await crypto.subtle.digest("SHA-256", e);
1932
1970
  return Array.from(new Uint8Array(t)).map((s) => s.toString(16).padStart(2, "0")).join("");
1933
1971
  }
@@ -1975,8 +2013,8 @@ function we(n, e) {
1975
2013
  maxAttempt: a = 3
1976
2014
  /**/
1977
2015
  } = e;
1978
- async function s(c, d) {
1979
- const l = d ?? a, f = await n(...c);
2016
+ async function s(c, u) {
2017
+ const l = u ?? a, f = await n(...c);
1980
2018
  return t(f) ? f : l > 1 ? (await Ce(r * ((a - l) / 2)), s(c, l - 1)) : f;
1981
2019
  }
1982
2020
  return async (...c) => await s(c);
@@ -2184,17 +2222,17 @@ class Gt {
2184
2222
  return typeof window > "u";
2185
2223
  }
2186
2224
  }
2187
- function w(n) {
2225
+ function g(n) {
2188
2226
  const e = {};
2189
2227
  for (const t in n) {
2190
2228
  const r = n[t];
2191
2229
  if (r !== null && r !== void 0) {
2192
- if (Y(r)) {
2193
- e[t] = w(r);
2230
+ if (H(r)) {
2231
+ e[t] = g(r);
2194
2232
  continue;
2195
2233
  }
2196
2234
  if (Array.isArray(r)) {
2197
- e[t] = r.map((a) => Y(a) ? w(a) : a);
2235
+ e[t] = r.map((a) => H(a) ? g(a) : a);
2198
2236
  continue;
2199
2237
  }
2200
2238
  e[t] = r;
@@ -2212,11 +2250,11 @@ function i(n, e) {
2212
2250
  }
2213
2251
  return e;
2214
2252
  }
2215
- class xt {
2253
+ class $t {
2216
2254
  constructor(e) {
2217
2255
  m(this, "staticService");
2218
2256
  const t = (e == null ? void 0 : e.environment) === "development";
2219
- this.staticService = new Nt({
2257
+ this.staticService = new It({
2220
2258
  url: t ? "https://static.development.opexa.io" : "https://static.opexa.io"
2221
2259
  });
2222
2260
  }
@@ -2256,10 +2294,10 @@ class xt {
2256
2294
  logo: e.logo ?? void 0,
2257
2295
  fields: e.config.fields
2258
2296
  };
2259
- return w(t);
2297
+ return g(t);
2260
2298
  }
2261
2299
  platform(e) {
2262
- var t, r, a, s, c, d, l, f, y, p, T, v, M, N, I, g, R, D, k, P, G, x, C, $, U, O, E, Q, K, J, z, X, Z, ee, te, re, ae, ne, oe, ie, se, ce, me, de, ue, le, pe, fe, he;
2300
+ var t, r, a, s, c, u, l, f, y, p, T, v, M, N, I, S, R, D, C, P, x, G, _, $, U, O, A, Q, K, J, z, X, Z, ee, te, re, ae, ne, oe, ie, se, ce, me, de, ue, le, pe, fe, he;
2263
2301
  return {
2264
2302
  paymentSettings: {
2265
2303
  minimumFirstDepositAmount: i(e.minimumFirstDepositAmount),
@@ -2271,7 +2309,7 @@ class xt {
2271
2309
  webEnabled: ((a = e.bankDepositGatewaySettings) == null ? void 0 : a.webEnabled) ?? !1,
2272
2310
  mobileWebEnabled: ((s = e.bankDepositGatewaySettings) == null ? void 0 : s.mobileWebEnabled) ?? !1,
2273
2311
  minimumAmount: i((c = e.bankDepositGatewaySettings) == null ? void 0 : c.minimumAmount),
2274
- maximumAmount: i((d = e.bankDepositGatewaySettings) == null ? void 0 : d.maximumAmount)
2312
+ maximumAmount: i((u = e.bankDepositGatewaySettings) == null ? void 0 : u.maximumAmount)
2275
2313
  },
2276
2314
  gcash: {
2277
2315
  androidEnabled: ((l = e.gcashDepositGatewaySettings) == null ? void 0 : l.androidEnabled) ?? !1,
@@ -2285,16 +2323,16 @@ class xt {
2285
2323
  androidEnabled: ((M = e.mayaDepositGatewaySettings) == null ? void 0 : M.androidEnabled) ?? !1,
2286
2324
  iosEnabled: ((N = e.mayaDepositGatewaySettings) == null ? void 0 : N.iosEnabled) ?? !1,
2287
2325
  webEnabled: ((I = e.mayaDepositGatewaySettings) == null ? void 0 : I.webEnabled) ?? !1,
2288
- mobileWebEnabled: ((g = e.mayaDepositGatewaySettings) == null ? void 0 : g.mobileWebEnabled) ?? !1,
2326
+ mobileWebEnabled: ((S = e.mayaDepositGatewaySettings) == null ? void 0 : S.mobileWebEnabled) ?? !1,
2289
2327
  minimumAmount: i((R = e.mayaDepositGatewaySettings) == null ? void 0 : R.minimumAmount),
2290
2328
  maximumAmount: i((D = e.mayaDepositGatewaySettings) == null ? void 0 : D.maximumAmount)
2291
2329
  },
2292
2330
  mayaApp: {
2293
- androidEnabled: ((k = e.mayaAppDepositGatewaySettings) == null ? void 0 : k.androidEnabled) ?? !1,
2331
+ androidEnabled: ((C = e.mayaAppDepositGatewaySettings) == null ? void 0 : C.androidEnabled) ?? !1,
2294
2332
  iosEnabled: ((P = e.mayaAppDepositGatewaySettings) == null ? void 0 : P.iosEnabled) ?? !1,
2295
- webEnabled: ((G = e.mayaAppDepositGatewaySettings) == null ? void 0 : G.webEnabled) ?? !1,
2296
- mobileWebEnabled: ((x = e.mayaAppDepositGatewaySettings) == null ? void 0 : x.mobileWebEnabled) ?? !1,
2297
- minimumAmount: i((C = e.mayaAppDepositGatewaySettings) == null ? void 0 : C.minimumAmount),
2333
+ webEnabled: ((x = e.mayaAppDepositGatewaySettings) == null ? void 0 : x.webEnabled) ?? !1,
2334
+ mobileWebEnabled: ((G = e.mayaAppDepositGatewaySettings) == null ? void 0 : G.mobileWebEnabled) ?? !1,
2335
+ minimumAmount: i((_ = e.mayaAppDepositGatewaySettings) == null ? void 0 : _.minimumAmount),
2298
2336
  maximumAmount: i(($ = e.mayaAppDepositGatewaySettings) == null ? void 0 : $.maximumAmount)
2299
2337
  }
2300
2338
  },
@@ -2302,7 +2340,7 @@ class xt {
2302
2340
  bank: {
2303
2341
  androidEnabled: ((U = e.bankWithdrawalGatewaySettings) == null ? void 0 : U.androidEnabled) ?? !1,
2304
2342
  iosEnabled: ((O = e.bankWithdrawalGatewaySettings) == null ? void 0 : O.iosEnabled) ?? !1,
2305
- webEnabled: ((E = e.bankWithdrawalGatewaySettings) == null ? void 0 : E.webEnabled) ?? !1,
2343
+ webEnabled: ((A = e.bankWithdrawalGatewaySettings) == null ? void 0 : A.webEnabled) ?? !1,
2306
2344
  mobileWebEnabled: ((Q = e.bankWithdrawalGatewaySettings) == null ? void 0 : Q.mobileWebEnabled) ?? !1,
2307
2345
  minimumAmount: i((K = e.bankWithdrawalGatewaySettings) == null ? void 0 : K.minimumAmount),
2308
2346
  maximumAmount: i((J = e.bankWithdrawalGatewaySettings) == null ? void 0 : J.maximumAmount)
@@ -2365,7 +2403,7 @@ class xt {
2365
2403
  dateTimeCreated: new Date(e.dateTimeCreated),
2366
2404
  dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
2367
2405
  };
2368
- return w(t);
2406
+ return g(t);
2369
2407
  }
2370
2408
  wallet(e) {
2371
2409
  return {
@@ -2429,7 +2467,7 @@ class xt {
2429
2467
  dateTimeCreated: new Date(e.dateTimeCreated),
2430
2468
  dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
2431
2469
  };
2432
- return w(t);
2470
+ return g(t);
2433
2471
  }
2434
2472
  deposit(e) {
2435
2473
  const t = {
@@ -2438,7 +2476,7 @@ class xt {
2438
2476
  status: e.status,
2439
2477
  checkoutUrl: e.checkoutUrl ?? void 0
2440
2478
  };
2441
- return w(t);
2479
+ return g(t);
2442
2480
  }
2443
2481
  depositRecord(e) {
2444
2482
  const t = {
@@ -2453,7 +2491,7 @@ class xt {
2453
2491
  dateTimeCreated: new Date(e.dateTimeCreated),
2454
2492
  dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
2455
2493
  };
2456
- return w(t);
2494
+ return g(t);
2457
2495
  }
2458
2496
  betRecord(e) {
2459
2497
  var r;
@@ -2484,7 +2522,7 @@ class xt {
2484
2522
  odds: ((r = e.metadata) == null ? void 0 : r.odds) ?? void 0
2485
2523
  }
2486
2524
  };
2487
- return w(t);
2525
+ return g(t);
2488
2526
  }
2489
2527
  latestBetRecord(e) {
2490
2528
  return {
@@ -2513,7 +2551,7 @@ class xt {
2513
2551
  referenceNumber: e.referenceNumber,
2514
2552
  dateTimeCreated: new Date(e.dateTimeCreated)
2515
2553
  };
2516
- return w(t);
2554
+ return g(t);
2517
2555
  }
2518
2556
  /**
2519
2557
  * @deprecated
@@ -2547,7 +2585,7 @@ class xt {
2547
2585
  dateTimeCreated: new Date(e.dateTimeCreated),
2548
2586
  dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
2549
2587
  };
2550
- return w(t);
2588
+ return g(t);
2551
2589
  }
2552
2590
  promo(e) {
2553
2591
  return {
@@ -2610,7 +2648,7 @@ class xt {
2610
2648
  dateTimeCreated: new Date(e.dateTimeCreated),
2611
2649
  dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
2612
2650
  };
2613
- return w(t);
2651
+ return g(t);
2614
2652
  }
2615
2653
  cashbackBonus(e) {
2616
2654
  return {
@@ -2628,7 +2666,7 @@ class xt {
2628
2666
  status: e.status,
2629
2667
  dateTimeCreated: new Date(e.dateTimeCreated)
2630
2668
  };
2631
- return w(t);
2669
+ return g(t);
2632
2670
  }
2633
2671
  pointsWallet(e) {
2634
2672
  return {
@@ -2656,10 +2694,10 @@ class xt {
2656
2694
  details: e.details,
2657
2695
  dateTimeCreated: new Date(e.dateTimeCreated)
2658
2696
  };
2659
- return w(t);
2697
+ return g(t);
2660
2698
  }
2661
2699
  }
2662
- class Bt {
2700
+ class qt {
2663
2701
  constructor(e) {
2664
2702
  m(this, "cmsPortalService");
2665
2703
  m(this, "authService");
@@ -2679,17 +2717,17 @@ class Bt {
2679
2717
  platform: a,
2680
2718
  environment: s,
2681
2719
  logs: c
2682
- } = e, d = s === "production";
2683
- this.transformer = new xt({
2720
+ } = e, u = s === "production";
2721
+ this.transformer = new $t({
2684
2722
  environment: s
2685
2723
  }), this.logger = new ke({
2686
2724
  enabled: c ?? !1
2687
2725
  });
2688
- const l = d ? "https://auth.opexa.io" : "https://auth.development.opexa.io", f = d ? "https://wallet.opexa.io/graphql" : "https://wallet.development.opexa.io/graphql", y = d ? "https://report.opexa.io/graphql" : "https://report.development.opexa.io/graphql", p = d ? "https://account.opexa.io/graphql" : "https://account.development.opexa.io/graphql", T = d ? "https://portal.opexa.io/graphql" : "https://portal.development.opexa.io/graphql", v = d ? "https://file.opexa.io/graphql" : "https://file.development.opexa.io/graphql", M = d ? "https://game.opexa.io/graphql" : "https://game.development.opexa.io/graphql", N = d ? "https://portal-api.opexacms.io/v1" : "https://portal-api.development.opexacms.io/v1", I = new Ct({
2726
+ 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 _t({
2689
2727
  url: N,
2690
2728
  site: t,
2691
2729
  platform: r
2692
- }), g = {
2730
+ }), S = {
2693
2731
  middlewares: [this.authMiddleware],
2694
2732
  fetchOptions: {
2695
2733
  headers: {
@@ -2697,15 +2735,15 @@ class Bt {
2697
2735
  "Platform-Code": a
2698
2736
  }
2699
2737
  }
2700
- }, R = new Tt(new W(M, g)), D = new _t(new W(v, g)), k = new It(new W(f, g)), P = new At(new W(p, g)), G = new Mt(new W(y, g)), x = new vt(new W(T, g)), C = new kt({
2738
+ }, R = new vt(new W(M, S)), D = new Tt(new W(v, S)), C = new Rt(new W(f, S)), P = new kt(new W(p, S)), x = new Nt(new W(y, S)), G = new Mt(new W(T, S)), _ = new Ct({
2701
2739
  url: l,
2702
2740
  platform: a
2703
2741
  }), $ = new Gt({
2704
2742
  logs: c,
2705
- authService: C,
2706
- walletService: k
2743
+ authService: _,
2744
+ walletService: C
2707
2745
  });
2708
- this.authService = C, this.gameService = R, this.fileService = D, this.walletService = k, this.accountService = P, this.reportService = G, this.portalService = x, this.sessionManager = $, this.cmsPortalService = I;
2746
+ 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;
2709
2747
  }
2710
2748
  get authMiddleware() {
2711
2749
  return async (e) => {
@@ -2719,7 +2757,7 @@ class Bt {
2719
2757
  case "NAME_AND_PASSWORD": {
2720
2758
  const t = await this.sessionManager.create({
2721
2759
  ...e,
2722
- password: await S(e.password)
2760
+ password: await w(e.password)
2723
2761
  });
2724
2762
  return t.ok ? t.data ? {
2725
2763
  ok: !0,
@@ -2782,7 +2820,7 @@ class Bt {
2782
2820
  return await this.sessionManager.createFromAuthenticator({
2783
2821
  type: "SECURITY_QUESTION",
2784
2822
  token: e.token,
2785
- secretAnswer: await S(e.secretAnswer)
2823
+ secretAnswer: await w(e.secretAnswer)
2786
2824
  });
2787
2825
  default:
2788
2826
  return {
@@ -2822,7 +2860,7 @@ class Bt {
2822
2860
  * ```
2823
2861
  */
2824
2862
  watchSession(e) {
2825
- const t = Rt(e.interval ?? 3e4, 3e4, 6e4);
2863
+ const t = Dt(e.interval ?? 3e4, 3e4, 6e4);
2826
2864
  let r = null;
2827
2865
  const a = () => setTimeout(async () => {
2828
2866
  await this.sessionManager.verify() || await e.onInvalid(), r = a();
@@ -2908,15 +2946,15 @@ class Bt {
2908
2946
  * ```
2909
2947
  */
2910
2948
  async createAccount(e) {
2911
- const t = e.id ?? b.generate(A.Account).toString(), r = await this.accountService.registerMemberAccount({
2949
+ const t = e.id ?? E.generate(b.Account).toString(), r = await this.accountService.registerMemberAccount({
2912
2950
  input: {
2913
2951
  id: t,
2914
2952
  btag: e.btag,
2915
2953
  name: e.name,
2916
2954
  domain: e.domain,
2917
2955
  birthDay: typeof e.dateOfBirth == "string" ? e.dateOfBirth : e.dateOfBirth.toISOString(),
2918
- password: await S(e.password),
2919
- mobileNumber: _(e.mobileNumber)
2956
+ password: await w(e.password),
2957
+ mobileNumber: k(e.mobileNumber)
2920
2958
  },
2921
2959
  referralCode: e.referralCode,
2922
2960
  verificationCode: e.verificationCode,
@@ -2924,11 +2962,41 @@ class Bt {
2924
2962
  });
2925
2963
  return r.ok ? { ok: !0, data: { id: t } } : r;
2926
2964
  }
2965
+ /**
2966
+ * @example
2967
+ * ```ts
2968
+ * const res = await sdk.createAccount({
2969
+ * id: ObjectId.generate(ObjectType.Account).toString(),
2970
+ * name: data.name,
2971
+ * password: data.password,
2972
+ * mobileNumber: data.mobileNumber,
2973
+ * reCAPTCHAResponse: data.reCAPTCHAResponse,
2974
+ * });
2975
+ *
2976
+ * if (!res.ok) {
2977
+ * window.alert(res.error.message);
2978
+ * } else {
2979
+ * // Do something
2980
+ * }
2981
+ * ```
2982
+ */
2983
+ async createAccountNext(e) {
2984
+ const t = e.id ?? E.generate(b.Account).toString(), r = await this.accountService.registerMemberAccountNext({
2985
+ input: {
2986
+ id: t,
2987
+ name: e.name,
2988
+ password: await w(e.password),
2989
+ mobileNumber: e.mobileNumber ? k(e.mobileNumber) : void 0
2990
+ },
2991
+ reCAPTCHAResponse: e.reCAPTCHAResponse
2992
+ });
2993
+ return r.ok ? { ok: !0, data: { id: t } } : r;
2994
+ }
2927
2995
  async registerMayaAccount(e) {
2928
2996
  return await this.accountService.registerMayaMemberAccount({
2929
2997
  input: {
2930
2998
  name: e.name,
2931
- password: await S(e.password),
2999
+ password: await w(e.password),
2932
3000
  domain: e.domain
2933
3001
  }
2934
3002
  });
@@ -2954,12 +3022,12 @@ class Bt {
2954
3022
  id: e,
2955
3023
  data: {
2956
3024
  ...t,
2957
- password: t.password ? await S(t.password) : void 0,
2958
- transactionPassword: t.transactionPassword ? await S(t.transactionPassword) : void 0,
3025
+ password: t.password ? await w(t.password) : void 0,
3026
+ transactionPassword: t.transactionPassword ? await w(t.transactionPassword) : void 0,
2959
3027
  ...t.mobileNumber && {
2960
- mobileNumber: _(t.mobileNumber)
3028
+ mobileNumber: k(t.mobileNumber)
2961
3029
  },
2962
- secretAnswer: t.secretAnswer ? await S(t.secretAnswer) : void 0
3030
+ secretAnswer: t.secretAnswer ? await w(t.secretAnswer) : void 0
2963
3031
  }
2964
3032
  }
2965
3033
  });
@@ -3000,7 +3068,7 @@ class Bt {
3000
3068
  * ```
3001
3069
  */
3002
3070
  async submitVerificationDetails(e) {
3003
- const t = e.id ?? b.generate(A.Verification).toString(), r = await this.accountService.createMemberVerification({
3071
+ const t = e.id ?? E.generate(b.Verification).toString(), r = await this.accountService.createMemberVerification({
3004
3072
  input: {
3005
3073
  id: t,
3006
3074
  ...e
@@ -3036,8 +3104,8 @@ class Bt {
3036
3104
  async resetPassword(e) {
3037
3105
  return await this.accountService.resetPassword({
3038
3106
  input: {
3039
- mobileNumber: _(e.mobileNumber),
3040
- newPassword: await S(e.newPassword)
3107
+ mobileNumber: k(e.mobileNumber),
3108
+ newPassword: await w(e.newPassword)
3041
3109
  },
3042
3110
  verificationCode: e.verificationCode
3043
3111
  });
@@ -3060,7 +3128,7 @@ class Bt {
3060
3128
  return await this.accountService.sendVerificationCode({
3061
3129
  input: {
3062
3130
  channel: "SMS",
3063
- recipient: _(e)
3131
+ recipient: k(e)
3064
3132
  }
3065
3133
  });
3066
3134
  }
@@ -3124,13 +3192,13 @@ class Bt {
3124
3192
  * ```
3125
3193
  */
3126
3194
  async createWithdrawal(e) {
3127
- const t = e.id ?? b.generate(A.Withdrawal).toString();
3195
+ const t = e.id ?? E.generate(b.Withdrawal).toString();
3128
3196
  if (e.type === "BANK") {
3129
3197
  const r = await this.walletService.createBankWithdrawal({
3130
3198
  input: {
3131
3199
  id: t,
3132
3200
  amount: e.amount.toString(),
3133
- transactionPassword: await S(e.transactionPassword)
3201
+ transactionPassword: await w(e.transactionPassword)
3134
3202
  }
3135
3203
  });
3136
3204
  if (!r.ok) return r;
@@ -3140,8 +3208,8 @@ class Bt {
3140
3208
  input: {
3141
3209
  id: t,
3142
3210
  amount: e.amount.toString(),
3143
- transactionPassword: await S(e.transactionPassword),
3144
- recipientMobileNumber: _(e.recipientMobileNumber)
3211
+ transactionPassword: await w(e.transactionPassword),
3212
+ recipientMobileNumber: k(e.recipientMobileNumber)
3145
3213
  }
3146
3214
  });
3147
3215
  if (!r.ok) return r;
@@ -3151,8 +3219,8 @@ class Bt {
3151
3219
  input: {
3152
3220
  id: t,
3153
3221
  amount: e.amount.toString(),
3154
- transactionPassword: await S(e.transactionPassword),
3155
- recipientMobileNumber: _(e.recipientMobileNumber)
3222
+ transactionPassword: await w(e.transactionPassword),
3223
+ recipientMobileNumber: k(e.recipientMobileNumber)
3156
3224
  }
3157
3225
  });
3158
3226
  if (!r.ok) return r;
@@ -3162,7 +3230,7 @@ class Bt {
3162
3230
  input: {
3163
3231
  id: t,
3164
3232
  amount: e.amount.toString(),
3165
- transactionPassword: await S(e.transactionPassword)
3233
+ transactionPassword: await w(e.transactionPassword)
3166
3234
  }
3167
3235
  });
3168
3236
  if (!r.ok) return r;
@@ -3210,7 +3278,7 @@ class Bt {
3210
3278
  * ```
3211
3279
  */
3212
3280
  async createDeposit(e) {
3213
- const t = e.id ?? b.generate(A.Deposit).toString();
3281
+ const t = e.id ?? E.generate(b.Deposit).toString();
3214
3282
  if (e.type === "MAYA") {
3215
3283
  const r = await this.walletService.createMayaDeposit({
3216
3284
  input: {
@@ -3496,23 +3564,23 @@ class Bt {
3496
3564
  * ```
3497
3565
  */
3498
3566
  async createGameSession(e) {
3499
- const t = e.id ?? b.generate(A.GameSession).toString(), r = await this.walletService.createGameSession({ input: { id: t, game: e.game } });
3567
+ const t = e.id ?? E.generate(b.GameSession).toString(), r = await this.walletService.createGameSession({ input: { id: t, game: e.game } });
3500
3568
  return r.ok ? { ok: !0, data: { id: t } } : r;
3501
3569
  }
3502
3570
  /** @deprecated use `createGameSession__next` */
3503
3571
  async createGameSession__legacy(e) {
3504
- const t = e.id ?? b.generate(A.GameSession).toString(), r = await this.gameService.createGameSession({ input: { id: t, game: e.game } });
3572
+ const t = e.id ?? E.generate(b.GameSession).toString(), r = await this.gameService.createGameSession({ input: { id: t, game: e.game } });
3505
3573
  return r.ok ? { ok: !0, data: { id: t } } : r;
3506
3574
  }
3507
3575
  async createGameSession__next(e) {
3508
- const t = e.id ?? b.generate(A.GameSession).toString();
3576
+ const t = e.id ?? E.generate(b.GameSession).toString();
3509
3577
  if (e.game.startsWith("SPORTS:")) {
3510
- const d = await b.generateFromKey(A.Game, e.game).then(
3578
+ const u = await E.generateFromKey(b.Game, e.game).then(
3511
3579
  (f) => f.toString()
3512
3580
  ), l = await this.gameService.createGameSession({
3513
3581
  input: {
3514
3582
  id: t,
3515
- game: d
3583
+ game: u
3516
3584
  }
3517
3585
  });
3518
3586
  return l.ok ? { ok: !0, data: { id: t } } : l;
@@ -3530,7 +3598,7 @@ class Bt {
3530
3598
  /**/
3531
3599
  provider: a,
3532
3600
  reference: s
3533
- } = r.data, c = Wt(a) ? await this.walletService.createGameSession({ input: { id: t, game: s } }) : await this.gameService.createGameSession({ input: { id: t, game: s } });
3601
+ } = r.data, c = Ut(a) ? await this.walletService.createGameSession({ input: { id: t, game: s } }) : await this.gameService.createGameSession({ input: { id: t, game: s } });
3534
3602
  return c.ok ? { ok: !0, data: { id: t } } : c;
3535
3603
  }
3536
3604
  /** @deprecated use `endGameSession__next` */
@@ -3573,7 +3641,7 @@ class Bt {
3573
3641
  * ```
3574
3642
  */
3575
3643
  async uploadImageFile(e) {
3576
- const t = e.id ?? b.generate(A.File).toString(), r = await this.fileService.uploadPrivateImageFile({
3644
+ const t = e.id ?? E.generate(b.File).toString(), r = await this.fileService.uploadPrivateImageFile({
3577
3645
  input: {
3578
3646
  id: t,
3579
3647
  file: e.file
@@ -3651,7 +3719,7 @@ class Bt {
3651
3719
  return await this.accountService.updateReferralCode({ input: e });
3652
3720
  }
3653
3721
  }
3654
- const $t = [
3722
+ const Wt = [
3655
3723
  /**/
3656
3724
  "RTG",
3657
3725
  "DARWIN",
@@ -3661,12 +3729,12 @@ const $t = [
3661
3729
  "EVOLUTION_NETENT",
3662
3730
  "EVOLUTION_REDTIGER"
3663
3731
  ];
3664
- function Wt(n) {
3665
- return $t.some((e) => e === n);
3732
+ function Ut(n) {
3733
+ return Wt.some((e) => e === n);
3666
3734
  }
3667
3735
  export {
3668
- Lt as ObjectId,
3669
- A as ObjectType,
3670
- Bt as Sdk
3736
+ Vt as ObjectId,
3737
+ b as ObjectType,
3738
+ qt as Sdk
3671
3739
  };
3672
3740
  //# sourceMappingURL=index.mjs.map