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