@opexa/portal-sdk 0.0.68 → 0.0.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
- var _e = Object.defineProperty;
2
- var Te = (n, e, t) => e in n ? _e(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var m = (n, e, t) => Te(n, typeof e != "symbol" ? e + "" : e, t);
1
+ var Ce = Object.defineProperty;
2
+ var Te = (n, e, t) => e in n ? Ce(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
+ var d = (n, e, t) => Te(n, typeof e != "symbol" ? e + "" : e, t);
4
4
  import { ObjectId as b } from "@opexa/object-id";
5
- import { ObjectId as Lt } from "@opexa/object-id";
5
+ import { ObjectId as Vt } from "@opexa/object-id";
6
6
  const A = {
7
7
  Account: 8,
8
8
  Deposit: 9,
@@ -139,7 +139,7 @@ const L = o`
139
139
  }
140
140
  }
141
141
  }
142
- `, Ee = o`
142
+ `, be = o`
143
143
  query GameSession($id: ObjectId!) {
144
144
  node(id: $id) {
145
145
  ... on GameSession {
@@ -151,7 +151,7 @@ const L = o`
151
151
  }
152
152
  }
153
153
  }
154
- `, be = o`
154
+ `, Ae = o`
155
155
  mutation CreateGameSession($input: CreateGameSessionInput!) {
156
156
  createGameSession(input: $input) {
157
157
  ... on GameDoesNotExistError {
@@ -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,14 +632,14 @@ 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) {
639
639
  ...PromoFragment
640
640
  }
641
641
  }
642
- `, Ae = o`
642
+ `, Ee = o`
643
643
  ${L}
644
644
 
645
645
  fragment CashbackFragment on Cashback {
@@ -657,7 +657,7 @@ const L = o`
657
657
  dateTimeLastUpdated
658
658
  }
659
659
  `, Ze = o`
660
- ${Ae}
660
+ ${Ee}
661
661
 
662
662
  query Cashbacks {
663
663
  cashbacks {
@@ -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 {
@@ -694,7 +694,7 @@ const L = o`
694
694
  }
695
695
  }
696
696
  `, tt = o`
697
- ${Ae}
697
+ ${Ee}
698
698
 
699
699
  query CashbackBonuses {
700
700
  cashbackBonuses {
@@ -807,6 +807,38 @@ const L = o`
807
807
  }
808
808
  }
809
809
  `, st = o`
810
+ mutation RegisterMemberAccount(
811
+ $input: RegisterMemberAccountInput_next!
812
+ $reCAPTCHAResponse: String
813
+ ) {
814
+ registerMemberAccount: registerMemberAccount_next(
815
+ input: $input
816
+ reCAPTCHAResponse: $reCAPTCHAResponse
817
+ ) {
818
+ ... on AccountNameNotAvailableError {
819
+ __typename
820
+ }
821
+ ... on InvalidPlatformError {
822
+ __typename
823
+ }
824
+ ... on InvalidPlatformError {
825
+ __typename
826
+ }
827
+ ... on InvalidReCAPTCHAResponseError {
828
+ __typename
829
+ }
830
+ ... on InvalidSMSVerificationCodeError {
831
+ __typename
832
+ }
833
+ ... on MinimumAgeRequirementError {
834
+ __typename
835
+ }
836
+ ... on MobileNumberNotAvailableError {
837
+ __typename
838
+ }
839
+ }
840
+ }
841
+ `, ct = o`
810
842
  mutation RegisterMayaMemberAccount($input: RegisterMayaMemberAccountInput!) {
811
843
  registerMayaMemberAccount(input: $input) {
812
844
  ... on AccountNameNotAvailableError {
@@ -814,7 +846,7 @@ const L = o`
814
846
  }
815
847
  }
816
848
  }
817
- `, ct = o`
849
+ `, dt = o`
818
850
  mutation UpdateMemberAccount($input: UpdateMemberAccountInput!) {
819
851
  updateMemberAccount(input: $input) {
820
852
  ... on AccountNameNotAvailableError {
@@ -851,11 +883,11 @@ const L = o`
851
883
  }
852
884
  }
853
885
  }
854
- `, dt = o`
886
+ `, ut = o`
855
887
  mutation DeleteMemberAccount($input: DeleteMemberAccountInput!) {
856
888
  deleteMemberAccount(input: $input)
857
889
  }
858
- `, ut = o`
890
+ `, lt = o`
859
891
  mutation VerifyMobileNumber($input: VerifyMobileNumberInput!) {
860
892
  verifyMobileNumber(input: $input) {
861
893
  ... on InvalidSMSVerificationCodeError {
@@ -866,7 +898,7 @@ const L = o`
866
898
  }
867
899
  }
868
900
  }
869
- `, lt = o`
901
+ `, pt = o`
870
902
  mutation CreateMemberVerification($input: CreateMemberVerificationInput!) {
871
903
  createMemberVerification(input: $input) {
872
904
  ... on FileDoesNotExistError {
@@ -880,7 +912,7 @@ const L = o`
880
912
  }
881
913
  }
882
914
  }
883
- `, pt = o`
915
+ `, ft = o`
884
916
  mutation UpdateMemberVerification($input: UpdateMemberVerificationInput!) {
885
917
  updateMemberVerification(input: $input) {
886
918
  ... on FileDoesNotExistError {
@@ -897,7 +929,7 @@ const L = o`
897
929
  }
898
930
  }
899
931
  }
900
- `, ft = o`
932
+ `, ht = o`
901
933
  query ProfileCompletion {
902
934
  profileCompletion {
903
935
  completionPercentage
@@ -908,7 +940,7 @@ const L = o`
908
940
  accountPassword
909
941
  }
910
942
  }
911
- `, ht = o`
943
+ `, yt = o`
912
944
  mutation SendVerificationCode($input: SendVerificationCodeInput!) {
913
945
  sendVerificationCode(input: $input) {
914
946
  ... on InvalidPlatformError {
@@ -919,7 +951,7 @@ const L = o`
919
951
  }
920
952
  }
921
953
  }
922
- `, yt = o`
954
+ `, wt = o`
923
955
  fragment DepositGatewaySettingsCoreData on DepositGatewaySettings {
924
956
  minimumAmount
925
957
  maximumAmount
@@ -973,7 +1005,7 @@ const L = o`
973
1005
  multiplier
974
1006
  }
975
1007
  }
976
- `, wt = o`
1008
+ `, gt = o`
977
1009
  query MayaSession($id: ObjectId!) {
978
1010
  mayaSession(id: $id) {
979
1011
  id
@@ -981,11 +1013,11 @@ const L = o`
981
1013
  dateTimeCreated
982
1014
  }
983
1015
  }
984
- `, gt = o`
1016
+ `, St = o`
985
1017
  mutation ValidateMayaSession {
986
1018
  validateMayaSession: validMayaSession
987
1019
  }
988
- `, St = o`
1020
+ `, bt = o`
989
1021
  query ActivityRecords($after: Cursor, $first: Int, $filter: ActivityRecordsFilterInput) {
990
1022
  member {
991
1023
  activityRecords(after: $after, first: $first, filter: $filter) {
@@ -1010,11 +1042,11 @@ const L = o`
1010
1042
  }
1011
1043
  }
1012
1044
  }
1013
- `, Et = o`
1045
+ `, At = o`
1014
1046
  query ReferralCode {
1015
1047
  referralCode
1016
1048
  }
1017
- `, bt = o`
1049
+ `, Et = o`
1018
1050
  mutation UpdateReferralCode($input: UpdateReferralCodeInput!) {
1019
1051
  updateReferralCode(input: $input) {
1020
1052
  ... on ReferralCodeNotAvailableError {
@@ -1023,7 +1055,7 @@ const L = o`
1023
1055
  }
1024
1056
  }
1025
1057
  `;
1026
- function u(n) {
1058
+ function m(n) {
1027
1059
  return {
1028
1060
  name: n,
1029
1061
  message: {
@@ -1078,9 +1110,9 @@ function u(n) {
1078
1110
  }[n]
1079
1111
  };
1080
1112
  }
1081
- class At {
1113
+ class kt {
1082
1114
  constructor(e) {
1083
- m(this, "client");
1115
+ d(this, "client");
1084
1116
  this.client = e;
1085
1117
  }
1086
1118
  /** aka `Query.self` */
@@ -1095,22 +1127,31 @@ class At {
1095
1127
  const t = await this.client.request(it, e);
1096
1128
  return t.ok ? t.data.registerMemberAccount ? {
1097
1129
  ok: !1,
1098
- error: u(t.data.registerMemberAccount.__typename)
1130
+ error: m(t.data.registerMemberAccount.__typename)
1131
+ } : {
1132
+ ok: !0
1133
+ } : t;
1134
+ }
1135
+ async registerMemberAccount__next(e) {
1136
+ const t = await this.client.request(st, e);
1137
+ return t.ok ? t.data.registerMemberAccount ? {
1138
+ ok: !1,
1139
+ error: m(t.data.registerMemberAccount.__typename)
1099
1140
  } : {
1100
1141
  ok: !0
1101
1142
  } : t;
1102
1143
  }
1103
1144
  async updateMemberAccount(e) {
1104
- const t = await this.client.request(ct, e);
1145
+ const t = await this.client.request(dt, e);
1105
1146
  return t.ok ? t.data.updateMemberAccount ? {
1106
1147
  ok: !1,
1107
- error: u(t.data.updateMemberAccount.__typename)
1148
+ error: m(t.data.updateMemberAccount.__typename)
1108
1149
  } : {
1109
1150
  ok: !0
1110
1151
  } : t;
1111
1152
  }
1112
1153
  async deleteMemberAccount(e) {
1113
- const t = await this.client.request(dt, e);
1154
+ const t = await this.client.request(ut, e);
1114
1155
  return t.ok ? t.data.deleteMemberAccount ? {
1115
1156
  ok: !0
1116
1157
  } : {
@@ -1128,50 +1169,50 @@ class At {
1128
1169
  );
1129
1170
  return t.ok ? t.data.resetPassword ? {
1130
1171
  ok: !1,
1131
- error: u(t.data.resetPassword.__typename)
1172
+ error: m(t.data.resetPassword.__typename)
1132
1173
  } : {
1133
1174
  ok: !0
1134
1175
  } : t;
1135
1176
  }
1136
1177
  async profileCompletion() {
1137
- const e = await this.client.request(ft);
1178
+ const e = await this.client.request(ht);
1138
1179
  return e.ok ? { ok: !0, data: e.data.profileCompletion } : e;
1139
1180
  }
1140
1181
  async platform() {
1141
- return await this.client.request(yt);
1182
+ return await this.client.request(wt);
1142
1183
  }
1143
1184
  async sendVerificationCode(e) {
1144
- const t = await this.client.request(ht, e);
1185
+ const t = await this.client.request(yt, e);
1145
1186
  return t.ok ? t.data.sendVerificationCode ? {
1146
1187
  ok: !1,
1147
- error: u(t.data.sendVerificationCode.__typename)
1188
+ error: m(t.data.sendVerificationCode.__typename)
1148
1189
  } : {
1149
1190
  ok: !0
1150
1191
  } : t;
1151
1192
  }
1152
1193
  async verifyMobileNumber(e) {
1153
- const t = await this.client.request(ut, e);
1194
+ const t = await this.client.request(lt, e);
1154
1195
  return t.ok ? t.data.verifyMobileNumber ? {
1155
1196
  ok: !1,
1156
- error: u(t.data.verifyMobileNumber.__typename)
1197
+ error: m(t.data.verifyMobileNumber.__typename)
1157
1198
  } : {
1158
1199
  ok: !0
1159
1200
  } : t;
1160
1201
  }
1161
1202
  async createMemberVerification(e) {
1162
- const t = await this.client.request(lt, e);
1203
+ const t = await this.client.request(pt, e);
1163
1204
  return t.ok ? t.data.createMemberVerification ? {
1164
1205
  ok: !1,
1165
- error: u(t.data.createMemberVerification.__typename)
1206
+ error: m(t.data.createMemberVerification.__typename)
1166
1207
  } : {
1167
1208
  ok: !0
1168
1209
  } : t;
1169
1210
  }
1170
1211
  async updateMemberVerification(e) {
1171
- const t = await this.client.request(pt, e);
1212
+ const t = await this.client.request(ft, e);
1172
1213
  return t.ok ? t.data.updateMemberVerification ? {
1173
1214
  ok: !1,
1174
- error: u(t.data.updateMemberVerification.__typename)
1215
+ error: m(t.data.updateMemberVerification.__typename)
1175
1216
  } : {
1176
1217
  ok: !0
1177
1218
  } : t;
@@ -1185,7 +1226,7 @@ class At {
1185
1226
  }
1186
1227
  async announcements(e) {
1187
1228
  const t = await this.client.request(
1188
- xe,
1229
+ Ge,
1189
1230
  e
1190
1231
  );
1191
1232
  return t.ok ? {
@@ -1194,35 +1235,35 @@ class At {
1194
1235
  } : t;
1195
1236
  }
1196
1237
  async registerMayaMemberAccount(e) {
1197
- const t = await this.client.request(st, e);
1238
+ const t = await this.client.request(ct, e);
1198
1239
  return t.ok ? t.data.registerMayaMemberAccount ? {
1199
1240
  ok: !1,
1200
- error: u(t.data.registerMayaMemberAccount.__typename)
1241
+ error: m(t.data.registerMayaMemberAccount.__typename)
1201
1242
  } : {
1202
1243
  ok: !0
1203
1244
  } : t;
1204
1245
  }
1205
1246
  async referralCode() {
1206
- const e = await this.client.request(Et);
1247
+ const e = await this.client.request(At);
1207
1248
  return e.ok ? {
1208
1249
  ok: !0,
1209
1250
  data: e.data.referralCode
1210
1251
  } : e;
1211
1252
  }
1212
1253
  async updateReferralCode(e) {
1213
- const t = await this.client.request(bt, e);
1254
+ const t = await this.client.request(Et, e);
1214
1255
  return t.ok ? t.data.updateReferralCode ? {
1215
1256
  ok: !1,
1216
- error: u(t.data.updateReferralCode.__typename)
1257
+ error: m(t.data.updateReferralCode.__typename)
1217
1258
  } : {
1218
1259
  ok: !0
1219
1260
  } : t;
1220
1261
  }
1221
1262
  }
1222
- function _(n) {
1263
+ function E(n) {
1223
1264
  return n.startsWith("+63") ? n : n.startsWith("63") ? `+${n}` : n.startsWith("0") ? `+63${n.substring(1)}` : `+63${n}`;
1224
1265
  }
1225
- function h(n, e) {
1266
+ function f(n, e) {
1226
1267
  const t = V[n] ? V[n] : V[500];
1227
1268
  return {
1228
1269
  name: t.name,
@@ -1238,24 +1279,24 @@ const V = {
1238
1279
  429: { name: "HttpTooManyRequests", message: "Too Many Requests" },
1239
1280
  500: { name: "HttpInternalServerError", message: "Internal Server Error" }
1240
1281
  };
1241
- class kt {
1282
+ class _t {
1242
1283
  constructor(e) {
1243
- m(this, "url");
1244
- m(this, "platform");
1284
+ d(this, "url");
1285
+ d(this, "platform");
1245
1286
  this.url = e.url, this.platform = e.platform;
1246
1287
  }
1288
+ get headers() {
1289
+ const e = new Headers();
1290
+ return e.append("Accept", "application/json, text/plain"), e.append("Content-Type", "application/json"), e.append("Platform-Code", this.platform), e.append("Role", "MEMBER"), e;
1291
+ }
1247
1292
  async createSession(e) {
1248
- const t = new Headers({
1249
- "Content-Type": "application/json",
1250
- "Platform-Code": this.platform,
1251
- Role: "MEMBER"
1252
- });
1293
+ const t = new Headers(this.headers);
1253
1294
  if (e.name) {
1254
1295
  const r = `${e.name}:${e.password}`, a = Buffer.from(r).toString("base64");
1255
1296
  t.set("Authorization", `Basic ${a}`);
1256
1297
  }
1257
1298
  if (e.mobileNumber) {
1258
- const a = `${_(e.mobileNumber)}:${e.authenticationCode}`, s = Buffer.from(a).toString("base64");
1299
+ const a = `${E(e.mobileNumber)}:${e.authenticationCode}`, s = Buffer.from(a).toString("base64");
1259
1300
  console.log(`MobileNumberOTP ${s}`), t.set("Authorization", `MobileNumberOTP ${s}`);
1260
1301
  }
1261
1302
  e.sessionId && t.set("Authorization", `MayaSession ${e.sessionId}`);
@@ -1269,24 +1310,20 @@ class kt {
1269
1310
  data: a
1270
1311
  } : a.code === "ACCOUNT_BLACKLISTED" ? {
1271
1312
  ok: !1,
1272
- error: u("AccountBlacklisted")
1313
+ error: m("AccountBlacklisted")
1273
1314
  } : {
1274
1315
  ok: !1,
1275
- error: h(r.status)
1316
+ error: f(r.status)
1276
1317
  };
1277
1318
  } catch {
1278
1319
  return {
1279
1320
  ok: !1,
1280
- error: h(500)
1321
+ error: f(500)
1281
1322
  };
1282
1323
  }
1283
1324
  }
1284
1325
  async authenticate(e) {
1285
- const t = new Headers({
1286
- "Content-Type": "application/json",
1287
- "Platform-Code": this.platform,
1288
- Role: "MEMBER"
1289
- });
1326
+ const t = new Headers(this.headers);
1290
1327
  if (e.type === "SECURITY_QUESTION") {
1291
1328
  t.set("Authorization", `Bearer ${e.token}`);
1292
1329
  try {
@@ -1302,114 +1339,133 @@ class kt {
1302
1339
  data: a
1303
1340
  } : r.status === 401 || r.status === 403 ? {
1304
1341
  ok: !1,
1305
- error: u("InvalidTokenOrSecretAnswer")
1342
+ error: m("InvalidTokenOrSecretAnswer")
1306
1343
  } : {
1307
1344
  ok: !1,
1308
- error: h(r.status)
1345
+ error: f(r.status)
1309
1346
  };
1310
1347
  } catch {
1311
1348
  return {
1312
1349
  ok: !1,
1313
- error: h(500)
1350
+ error: f(500)
1314
1351
  };
1315
1352
  }
1316
1353
  }
1317
1354
  throw new Error("Invalid input 'type'");
1318
1355
  }
1319
1356
  async refreshSession(e) {
1357
+ const t = new Headers(this.headers);
1358
+ t.append("Authorization", `Bearer ${e}`);
1320
1359
  try {
1321
- const t = await fetch(`${this.url}/session:refresh`, {
1360
+ const r = await fetch(`${this.url}/session:refresh`, {
1322
1361
  method: "POST",
1323
- headers: {
1324
- "Content-Type": "application/json",
1325
- "Platform-Code": this.platform,
1326
- Role: "MEMBER",
1327
- Authorization: `Bearer ${e}`
1328
- }
1329
- }), r = await t.json();
1330
- return t.ok ? {
1362
+ headers: t
1363
+ }), a = await r.json();
1364
+ return r.ok ? {
1331
1365
  ok: !0,
1332
- data: r
1333
- } : r.code === "ACCOUNT_BLACKLISTED" ? {
1366
+ data: a
1367
+ } : a.code === "ACCOUNT_BLACKLISTED" ? {
1334
1368
  ok: !1,
1335
- error: u("AccountBlacklisted")
1336
- } : t.status === 403 || t.status === 401 ? {
1369
+ error: m("AccountBlacklisted")
1370
+ } : r.status === 403 || r.status === 401 ? {
1337
1371
  ok: !1,
1338
- error: u("InvalidToken")
1372
+ error: m("InvalidToken")
1339
1373
  } : {
1340
1374
  ok: !1,
1341
- error: h(t.status)
1375
+ error: f(r.status)
1342
1376
  };
1343
1377
  } catch {
1344
1378
  return {
1345
1379
  ok: !1,
1346
- error: h(500)
1380
+ error: f(500)
1347
1381
  };
1348
1382
  }
1349
1383
  }
1350
1384
  async destroySession(e) {
1385
+ const t = new Headers(this.headers);
1386
+ t.append("Authorization", `Bearer ${e}`);
1351
1387
  try {
1352
- const t = await fetch(`${this.url}/session`, {
1388
+ const r = await fetch(`${this.url}/session`, {
1353
1389
  method: "DELETE",
1354
- headers: {
1355
- "Content-Type": "application/json",
1356
- "Platform-Code": this.platform,
1357
- Role: "MEMBER",
1358
- Authorization: `Bearer ${e}`
1359
- }
1390
+ headers: t
1360
1391
  });
1361
- return t.ok ? { ok: !0 } : { ok: !1, error: h(t.status) };
1392
+ return r.ok ? { ok: !0 } : { ok: !1, error: f(r.status) };
1362
1393
  } catch {
1363
- return { ok: !1, error: h(500) };
1394
+ return { ok: !1, error: f(500) };
1364
1395
  }
1365
1396
  }
1366
1397
  async verifySession(e) {
1398
+ const t = new Headers(this.headers);
1399
+ t.append("Authorization", `Bearer ${e}`);
1367
1400
  try {
1368
1401
  return (await fetch(`${this.url}/session`, {
1369
1402
  method: "GET",
1370
- headers: {
1371
- "Content-Type": "application/json",
1372
- "Platform-Code": this.platform,
1373
- Role: "MEMBER",
1374
- Authorization: `Bearer ${e}`
1375
- }
1403
+ headers: t
1376
1404
  })).ok;
1377
1405
  } catch {
1378
1406
  return !0;
1379
1407
  }
1380
1408
  }
1409
+ /**
1410
+ * @deprecated use `sendOtp`
1411
+ */
1381
1412
  async sendVerificationCode(e) {
1382
- const t = _(e);
1413
+ const t = E(e);
1383
1414
  try {
1384
1415
  const r = await fetch(`${this.url}/sendVerificationCode`, {
1385
1416
  method: "POST",
1386
- headers: {
1387
- "Content-Type": "application/json",
1388
- "Platform-Code": this.platform,
1389
- Role: "MEMBER"
1390
- },
1417
+ headers: this.headers,
1418
+ body: JSON.stringify({
1419
+ channel: "SMS",
1420
+ recipient: t
1421
+ })
1422
+ });
1423
+ return r.ok ? { ok: !0 } : {
1424
+ ok: !1,
1425
+ error: f(r.status)
1426
+ };
1427
+ } catch {
1428
+ return {
1429
+ ok: !1,
1430
+ error: f(500)
1431
+ };
1432
+ }
1433
+ }
1434
+ async sendVerificationCode__next(e) {
1435
+ const t = E(e);
1436
+ try {
1437
+ const r = await fetch(`${this.url}/otps`, {
1438
+ method: "POST",
1439
+ headers: this.headers,
1391
1440
  body: JSON.stringify({
1392
1441
  channel: "SMS",
1393
1442
  recipient: t
1394
1443
  })
1395
1444
  });
1445
+ if (r.status === 403) {
1446
+ const a = await r.json();
1447
+ return {
1448
+ ok: !1,
1449
+ error: f(r.status, a.message)
1450
+ };
1451
+ }
1396
1452
  return r.ok ? { ok: !0 } : {
1397
1453
  ok: !1,
1398
- error: h(r.status)
1454
+ error: f(r.status)
1399
1455
  };
1400
1456
  } catch {
1401
1457
  return {
1402
1458
  ok: !1,
1403
- error: h(500)
1459
+ error: f(500)
1404
1460
  };
1405
1461
  }
1406
1462
  }
1407
1463
  }
1408
1464
  class Ct {
1409
1465
  constructor(e) {
1410
- m(this, "url");
1411
- m(this, "siteId");
1412
- m(this, "platformId");
1466
+ d(this, "url");
1467
+ d(this, "siteId");
1468
+ d(this, "platformId");
1413
1469
  this.url = e.url, this.siteId = e.site, this.platformId = e.platform;
1414
1470
  }
1415
1471
  async self() {
@@ -1420,22 +1476,22 @@ class Ct {
1420
1476
  } : e;
1421
1477
  }
1422
1478
  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;
1479
+ var a, s, c, u, l, h, y, p, T, v, M, N, I, S, R, D, _, P, x, G, C, $, U, O;
1424
1480
  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(
1481
+ e != null && e.first && t.set("first", e.first.toString()), e != null && e.after && t.set("after", e.after), e != null && e.search && t.set("search", e.search), (s = (a = e == null ? void 0 : e.filter) == null ? void 0 : a.type) != null && s.equal && t.set("filter[type][eq]", e.filter.type.equal), (u = (c = e == null ? void 0 : e.filter) == null ? void 0 : c.type) != null && u.notEqual && t.set("filter[type][neq]", e.filter.type.notEqual), (h = (l = e == null ? void 0 : e.filter) == null ? void 0 : l.type) != null && h.in && t.set("filter[type][in]", e.filter.type.in.join(",")), (p = (y = e == null ? void 0 : e.filter) == null ? void 0 : y.type) != null && p.notIn && t.set("filter[type][nin]", e.filter.type.notIn.join(",")), (v = (T = e == null ? void 0 : e.filter) == null ? void 0 : T.provider) != null && v.equal && t.set("filter[provider][eq]", e.filter.provider.equal), (N = (M = e == null ? void 0 : e.filter) == null ? void 0 : M.provider) != null && N.notEqual && t.set("filter[provider][neq]", e.filter.provider.notEqual), (S = (I = e == null ? void 0 : e.filter) == null ? void 0 : I.provider) != null && S.in && t.set("filter[provider][in]", e.filter.provider.in.join(",")), (D = (R = e == null ? void 0 : e.filter) == null ? void 0 : R.provider) != null && D.notIn && t.set("filter[provider][nin]", e.filter.provider.notIn.join(",")), (P = (_ = e == null ? void 0 : e.filter) == null ? void 0 : _.tags) != null && P.equal && t.set("filter[tags][eq]", e.filter.tags.equal.toLowerCase()), (G = (x = e == null ? void 0 : e.filter) == null ? void 0 : x.tags) != null && G.notEqual && t.set("filter[tags][neq]", e.filter.tags.notEqual.toLowerCase()), ($ = (C = e == null ? void 0 : e.filter) == null ? void 0 : C.tags) != null && $.in && t.set(
1426
1482
  "filter[tags][in]",
1427
- e.filter.tags.in.map((E) => E.toLowerCase()).join(",")
1483
+ e.filter.tags.in.map((k) => k.toLowerCase()).join(",")
1428
1484
  ), (O = (U = e == null ? void 0 : e.filter) == null ? void 0 : U.tags) != null && O.notIn && t.set(
1429
1485
  "filter[tags][nin]",
1430
- e.filter.tags.notIn.map((E) => E.toLowerCase()).join(",")
1486
+ e.filter.tags.notIn.map((k) => k.toLowerCase()).join(",")
1431
1487
  );
1432
1488
  const r = await this.getJson("/games", t);
1433
1489
  return r.ok ? {
1434
1490
  ok: !0,
1435
1491
  data: {
1436
- edges: r.data.data.map((E) => ({
1437
- node: E,
1438
- cursor: E.cursor
1492
+ edges: r.data.data.map((k) => ({
1493
+ node: k,
1494
+ cursor: k.cursor
1439
1495
  })),
1440
1496
  totalCount: r.data.totalCount ?? 0,
1441
1497
  pageInfo: {
@@ -1473,19 +1529,19 @@ class Ct {
1473
1529
  data: await a.json()
1474
1530
  } : {
1475
1531
  ok: !1,
1476
- error: h(a.status)
1532
+ error: f(a.status)
1477
1533
  };
1478
1534
  } catch {
1479
1535
  return {
1480
1536
  ok: !1,
1481
- error: h(500)
1537
+ error: f(500)
1482
1538
  };
1483
1539
  }
1484
1540
  }
1485
1541
  }
1486
- class _t {
1542
+ class Tt {
1487
1543
  constructor(e) {
1488
- m(this, "client");
1544
+ d(this, "client");
1489
1545
  this.client = e;
1490
1546
  }
1491
1547
  async file(e) {
@@ -1499,15 +1555,15 @@ class _t {
1499
1555
  const t = await this.client.upload(Me, e);
1500
1556
  return t.ok ? t.data.uploadPrivateImageFile ? {
1501
1557
  ok: !1,
1502
- error: u(t.data.uploadPrivateImageFile.__typename)
1558
+ error: m(t.data.uploadPrivateImageFile.__typename)
1503
1559
  } : {
1504
1560
  ok: !0
1505
1561
  } : t;
1506
1562
  }
1507
1563
  }
1508
- class Tt {
1564
+ class vt {
1509
1565
  constructor(e) {
1510
- m(this, "client");
1566
+ d(this, "client");
1511
1567
  this.client = e;
1512
1568
  }
1513
1569
  /** @deprecated */
@@ -1525,33 +1581,33 @@ class Tt {
1525
1581
  }
1526
1582
  async gameSession(e) {
1527
1583
  const t = await this.client.request(
1528
- Ee,
1584
+ be,
1529
1585
  e
1530
1586
  );
1531
1587
  return t.ok ? { ok: !0, data: t.data.node } : t;
1532
1588
  }
1533
1589
  async createGameSession(e) {
1534
- const t = await this.client.request(be, e);
1590
+ const t = await this.client.request(Ae, e);
1535
1591
  return t.ok ? t.data.createGameSession ? {
1536
1592
  ok: !1,
1537
- error: u(t.data.createGameSession.__typename)
1593
+ error: m(t.data.createGameSession.__typename)
1538
1594
  } : {
1539
1595
  ok: !0
1540
1596
  } : t;
1541
1597
  }
1542
1598
  async endGameSession(e) {
1543
- const t = await this.client.request(Ge, e);
1599
+ const t = await this.client.request(xe, e);
1544
1600
  return t.ok ? t.data.endGameSession ? {
1545
1601
  ok: !1,
1546
- error: u(t.data.endGameSession.__typename)
1602
+ error: m(t.data.endGameSession.__typename)
1547
1603
  } : {
1548
1604
  ok: !0
1549
1605
  } : t;
1550
1606
  }
1551
1607
  }
1552
- class vt {
1608
+ class Mt {
1553
1609
  constructor(e) {
1554
- m(this, "client");
1610
+ d(this, "client");
1555
1611
  this.client = e;
1556
1612
  }
1557
1613
  async latestBetRecords() {
@@ -1562,9 +1618,9 @@ class vt {
1562
1618
  } : e;
1563
1619
  }
1564
1620
  }
1565
- class Mt {
1621
+ class Nt {
1566
1622
  constructor(e) {
1567
- m(this, "client");
1623
+ d(this, "client");
1568
1624
  this.client = e;
1569
1625
  }
1570
1626
  async betRecords(e) {
@@ -1606,15 +1662,15 @@ class Mt {
1606
1662
  }
1607
1663
  async activityRecords(e) {
1608
1664
  const t = await this.client.request(
1609
- St,
1665
+ bt,
1610
1666
  e
1611
1667
  );
1612
1668
  return t.ok ? { ok: t.ok, data: t.data.member.activityRecords } : t;
1613
1669
  }
1614
1670
  }
1615
- class Nt {
1671
+ class It {
1616
1672
  constructor(e) {
1617
- m(this, "url");
1673
+ d(this, "url");
1618
1674
  this.url = e.url;
1619
1675
  }
1620
1676
  gameThumbnails(e) {
@@ -1624,9 +1680,9 @@ class Nt {
1624
1680
  ];
1625
1681
  }
1626
1682
  }
1627
- class It {
1683
+ class Rt {
1628
1684
  constructor(e) {
1629
- m(this, "client");
1685
+ d(this, "client");
1630
1686
  this.client = e;
1631
1687
  }
1632
1688
  async promos() {
@@ -1652,7 +1708,7 @@ class It {
1652
1708
  const t = await this.client.request(rt, e);
1653
1709
  return t.ok ? t.data.claimCashbackBonus ? {
1654
1710
  ok: !1,
1655
- error: u(t.data.claimCashbackBonus.__typename)
1711
+ error: m(t.data.claimCashbackBonus.__typename)
1656
1712
  } : {
1657
1713
  ok: !0
1658
1714
  } : {
@@ -1670,7 +1726,7 @@ class It {
1670
1726
  }
1671
1727
  async deposit(e) {
1672
1728
  const t = await this.client.request(
1673
- He,
1729
+ Ye,
1674
1730
  e
1675
1731
  );
1676
1732
  return t.ok ? { ok: t.ok, data: t.data.node } : t;
@@ -1679,7 +1735,7 @@ class It {
1679
1735
  const t = await this.client.request(Le, e);
1680
1736
  return t.ok ? t.data.createGCashDeposit ? {
1681
1737
  ok: !1,
1682
- error: u(t.data.createGCashDeposit.__typename)
1738
+ error: m(t.data.createGCashDeposit.__typename)
1683
1739
  } : {
1684
1740
  ok: !0
1685
1741
  } : t;
@@ -1688,16 +1744,16 @@ class It {
1688
1744
  const t = await this.client.request(Ve, e);
1689
1745
  return t.ok ? t.data.createMayaDeposit ? {
1690
1746
  ok: !1,
1691
- error: u(t.data.createMayaDeposit.__typename)
1747
+ error: m(t.data.createMayaDeposit.__typename)
1692
1748
  } : {
1693
1749
  ok: !0
1694
1750
  } : t;
1695
1751
  }
1696
1752
  async createMayaAppDeposit(e) {
1697
- const t = await this.client.request(Ye, e);
1753
+ const t = await this.client.request(He, e);
1698
1754
  return t.ok ? t.data.createMayaAppDeposit ? {
1699
1755
  ok: !1,
1700
- error: u(t.data.createMayaAppDeposit.__typename)
1756
+ error: m(t.data.createMayaAppDeposit.__typename)
1701
1757
  } : {
1702
1758
  ok: !0
1703
1759
  } : t;
@@ -1706,7 +1762,7 @@ class It {
1706
1762
  const t = await this.client.request(We, e);
1707
1763
  return t.ok ? t.data.createGCashWithdrawal ? {
1708
1764
  ok: !1,
1709
- error: u(t.data.createGCashWithdrawal.__typename)
1765
+ error: m(t.data.createGCashWithdrawal.__typename)
1710
1766
  } : {
1711
1767
  ok: !0
1712
1768
  } : t;
@@ -1715,7 +1771,7 @@ class It {
1715
1771
  const t = await this.client.request(Ue, e);
1716
1772
  return t.ok ? t.data.createMayaWithdrawal ? {
1717
1773
  ok: !1,
1718
- error: u(t.data.createMayaWithdrawal.__typename)
1774
+ error: m(t.data.createMayaWithdrawal.__typename)
1719
1775
  } : {
1720
1776
  ok: !0
1721
1777
  } : t;
@@ -1724,7 +1780,7 @@ class It {
1724
1780
  const t = await this.client.request(Oe, e);
1725
1781
  return t.ok ? t.data.createMayaAppWithdrawal ? {
1726
1782
  ok: !1,
1727
- error: u(t.data.createMayaAppWithdrawal.__typename)
1783
+ error: m(t.data.createMayaAppWithdrawal.__typename)
1728
1784
  } : {
1729
1785
  ok: !0
1730
1786
  } : t;
@@ -1733,7 +1789,7 @@ class It {
1733
1789
  const t = await this.client.request(Be, e);
1734
1790
  return t.ok ? t.data.createBankWithdrawal ? {
1735
1791
  ok: !1,
1736
- error: u(t.data.createBankWithdrawal.__typename)
1792
+ error: m(t.data.createBankWithdrawal.__typename)
1737
1793
  } : {
1738
1794
  ok: !0
1739
1795
  } : t;
@@ -1752,14 +1808,14 @@ class It {
1752
1808
  const t = await this.client.request(Re, e);
1753
1809
  return t.ok ? t.data.pointsToCashConversion ? {
1754
1810
  ok: !1,
1755
- error: u(t.data.pointsToCashConversion.__typename)
1811
+ error: m(t.data.pointsToCashConversion.__typename)
1756
1812
  } : {
1757
1813
  ok: !0
1758
1814
  } : t;
1759
1815
  }
1760
1816
  async mayaSession(e) {
1761
1817
  const t = await this.client.request(
1762
- wt,
1818
+ gt,
1763
1819
  e
1764
1820
  );
1765
1821
  return t.ok ? { ok: t.ok, data: t.data.mayaSession } : t;
@@ -1779,16 +1835,16 @@ class It {
1779
1835
  }
1780
1836
  async gameSession(e) {
1781
1837
  const t = await this.client.request(
1782
- Ee,
1838
+ be,
1783
1839
  e
1784
1840
  );
1785
1841
  return t.ok ? { ok: !0, data: t.data.node } : t;
1786
1842
  }
1787
1843
  async createGameSession(e) {
1788
- const t = await this.client.request(be, e);
1844
+ const t = await this.client.request(Ae, e);
1789
1845
  return t.ok ? t.data.createGameSession ? {
1790
1846
  ok: !1,
1791
- error: u(t.data.createGameSession.__typename)
1847
+ error: m(t.data.createGameSession.__typename)
1792
1848
  } : {
1793
1849
  ok: !0
1794
1850
  } : t;
@@ -1810,7 +1866,7 @@ class It {
1810
1866
  }
1811
1867
  async validateMayaSession() {
1812
1868
  const e = await this.client.request(
1813
- gt
1869
+ St
1814
1870
  );
1815
1871
  return e.ok ? e.data.validateMayaSession ? {
1816
1872
  ok: !0
@@ -1823,18 +1879,18 @@ class It {
1823
1879
  } : e;
1824
1880
  }
1825
1881
  }
1826
- function Rt(n, e, t) {
1882
+ function Dt(n, e, t) {
1827
1883
  return n < e ? e : n > t ? t : n;
1828
1884
  }
1829
- function Y(n) {
1885
+ function H(n) {
1830
1886
  return Object.prototype.toString.call(n) === "[object Object]" && Object(n) === n;
1831
1887
  }
1832
- function Dt(n) {
1888
+ function Pt(n) {
1833
1889
  const e = [];
1834
1890
  function t(r, a = []) {
1835
1891
  for (const s in r) {
1836
1892
  const c = r[s];
1837
- Y(c) ? t(c, [...a, s]) : Array.isArray(c) ? t(Pt(c), [...a, s]) : e.push({
1893
+ H(c) ? t(c, [...a, s]) : Array.isArray(c) ? t(xt(c), [...a, s]) : e.push({
1838
1894
  key: [...a, s],
1839
1895
  value: c
1840
1896
  });
@@ -1842,14 +1898,14 @@ function Dt(n) {
1842
1898
  }
1843
1899
  return t(n), e;
1844
1900
  }
1845
- function Pt(n) {
1901
+ function xt(n) {
1846
1902
  return n.reduce((e, t, r) => (e[r] = t, e), {});
1847
1903
  }
1848
1904
  class W {
1849
1905
  constructor(e, t) {
1850
- m(this, "url");
1851
- m(this, "options");
1852
- m(this, "middlewares");
1906
+ d(this, "url");
1907
+ d(this, "options");
1908
+ d(this, "middlewares");
1853
1909
  var a;
1854
1910
  const r = new Headers((a = t == null ? void 0 : t.fetchOptions) == null ? void 0 : a.headers);
1855
1911
  this.url = e, this.options = { ...t == null ? void 0 : t.fetchOptions, headers: r }, this.middlewares = (t == null ? void 0 : t.middlewares) ?? [];
@@ -1882,15 +1938,15 @@ class W {
1882
1938
  return await this.exec(s);
1883
1939
  }
1884
1940
  async exec(e) {
1885
- var t, r, a, s, c, d;
1941
+ var t, r, a, s, c, u;
1886
1942
  try {
1887
1943
  const l = await fetch(e);
1888
1944
  if (!l.ok)
1889
- return { ok: !1, error: h(l.status) };
1890
- 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) } : {
1945
+ return { ok: !1, error: f(l.status) };
1946
+ const h = await l.json(), y = h.data, p = (t = h.errors) == null ? void 0 : t.at(0);
1947
+ return p ? ((r = p.extensions) == null ? void 0 : r.code) === "FORBIDDEN" || ((a = p.extensions) == null ? void 0 : a.code) === "ACCESS_TOKEN_EXPIRED" ? { ok: !1, error: f(403, p.message) } : ((s = p.extensions) == null ? void 0 : s.code) === "UNAUTHORIZED" ? { ok: !1, error: f(401, p.message) } : ((c = p.extensions) == null ? void 0 : c.code) === "BAD_USER_INPUT" || ((u = p.extensions) == null ? void 0 : u.code) === "BAD_REQUEST" ? { ok: !1, error: f(400, p.message) } : {
1892
1948
  ok: !1,
1893
- error: h(500, p.message)
1949
+ error: f(500, p.message)
1894
1950
  } : {
1895
1951
  ok: !0,
1896
1952
  data: y
@@ -1898,7 +1954,7 @@ class W {
1898
1954
  } catch {
1899
1955
  return {
1900
1956
  ok: !1,
1901
- error: h(500)
1957
+ error: f(500)
1902
1958
  };
1903
1959
  }
1904
1960
  }
@@ -1909,7 +1965,7 @@ class W {
1909
1965
  return t;
1910
1966
  }
1911
1967
  createUploadBody(e, t) {
1912
- const r = Dt(t).filter(
1968
+ const r = Pt(t).filter(
1913
1969
  (c) => c.value instanceof File || c.value instanceof Blob
1914
1970
  ), a = new FormData();
1915
1971
  a.append(
@@ -1920,20 +1976,20 @@ class W {
1920
1976
  })
1921
1977
  );
1922
1978
  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);
1979
+ return r.forEach((c, u) => {
1980
+ s[u.toString()] = [`variables.${c.key.join(".")}`];
1981
+ }), a.append("map", JSON.stringify(s)), r.forEach((c, u) => {
1982
+ a.append(u.toString(), c.value);
1927
1983
  }), a;
1928
1984
  }
1929
1985
  }
1930
- async function S(n) {
1986
+ async function w(n) {
1931
1987
  const e = new TextEncoder().encode(n), t = await crypto.subtle.digest("SHA-256", e);
1932
1988
  return Array.from(new Uint8Array(t)).map((s) => s.toString(16).padStart(2, "0")).join("");
1933
1989
  }
1934
1990
  class ke {
1935
1991
  constructor(e) {
1936
- m(this, "enabled");
1992
+ d(this, "enabled");
1937
1993
  this.enabled = (e == null ? void 0 : e.enabled) ?? !0;
1938
1994
  }
1939
1995
  info(e) {
@@ -1963,7 +2019,7 @@ function q(n, e) {
1963
2019
  function ye(n, e) {
1964
2020
  return n.getTime() > e.getTime();
1965
2021
  }
1966
- function Ce(n) {
2022
+ function _e(n) {
1967
2023
  return new Promise((e) => {
1968
2024
  setTimeout(e, n);
1969
2025
  });
@@ -1975,9 +2031,9 @@ function we(n, e) {
1975
2031
  maxAttempt: a = 3
1976
2032
  /**/
1977
2033
  } = e;
1978
- async function s(c, d) {
1979
- const l = d ?? a, f = await n(...c);
1980
- return t(f) ? f : l > 1 ? (await Ce(r * ((a - l) / 2)), s(c, l - 1)) : f;
2034
+ async function s(c, u) {
2035
+ const l = u ?? a, h = await n(...c);
2036
+ return t(h) ? h : l > 1 ? (await _e(r * ((a - l) / 2)), s(c, l - 1)) : h;
1981
2037
  }
1982
2038
  return async (...c) => await s(c);
1983
2039
  }
@@ -1987,11 +2043,11 @@ function F(n, e) {
1987
2043
  }
1988
2044
  class Gt {
1989
2045
  constructor(e) {
1990
- m(this, "logger");
1991
- m(this, "storageKey", "session");
1992
- m(this, "authService");
1993
- m(this, "walletService");
1994
- m(this, "_refreshing", !1);
2046
+ d(this, "logger");
2047
+ d(this, "storageKey", "session");
2048
+ d(this, "authService");
2049
+ d(this, "walletService");
2050
+ d(this, "_refreshing", !1);
1995
2051
  this.authService = e.authService, this.walletService = e.walletService, this.logger = new ke({
1996
2052
  enabled: e.logs ?? !1
1997
2053
  });
@@ -2036,13 +2092,13 @@ class Gt {
2036
2092
  maxAttempt: 5
2037
2093
  })();
2038
2094
  if (!l.ok) return l;
2039
- const f = /* @__PURE__ */ new Date();
2095
+ const h = /* @__PURE__ */ new Date();
2040
2096
  return window.localStorage.setItem(
2041
2097
  this.storageKey,
2042
2098
  JSON.stringify({
2043
2099
  ...l.data,
2044
- accessTokenExpiresAt: q(f, 8).getTime(),
2045
- refreshTokenExpiresAt: F(B(f, 30), 2).getTime()
2100
+ accessTokenExpiresAt: q(h, 8).getTime(),
2101
+ refreshTokenExpiresAt: F(B(h, 30), 2).getTime()
2046
2102
  })
2047
2103
  ), {
2048
2104
  ok: !0,
@@ -2111,7 +2167,7 @@ class Gt {
2111
2167
  data: null
2112
2168
  };
2113
2169
  if (this.refreshing)
2114
- return await Ce(1e3), await this.get();
2170
+ return await _e(1e3), await this.get();
2115
2171
  const e = window.localStorage.getItem(this.storageKey);
2116
2172
  if (!e)
2117
2173
  return {
@@ -2184,17 +2240,17 @@ class Gt {
2184
2240
  return typeof window > "u";
2185
2241
  }
2186
2242
  }
2187
- function w(n) {
2243
+ function g(n) {
2188
2244
  const e = {};
2189
2245
  for (const t in n) {
2190
2246
  const r = n[t];
2191
2247
  if (r !== null && r !== void 0) {
2192
- if (Y(r)) {
2193
- e[t] = w(r);
2248
+ if (H(r)) {
2249
+ e[t] = g(r);
2194
2250
  continue;
2195
2251
  }
2196
2252
  if (Array.isArray(r)) {
2197
- e[t] = r.map((a) => Y(a) ? w(a) : a);
2253
+ e[t] = r.map((a) => H(a) ? g(a) : a);
2198
2254
  continue;
2199
2255
  }
2200
2256
  e[t] = r;
@@ -2212,11 +2268,11 @@ function i(n, e) {
2212
2268
  }
2213
2269
  return e;
2214
2270
  }
2215
- class xt {
2271
+ class $t {
2216
2272
  constructor(e) {
2217
- m(this, "staticService");
2273
+ d(this, "staticService");
2218
2274
  const t = (e == null ? void 0 : e.environment) === "development";
2219
- this.staticService = new Nt({
2275
+ this.staticService = new It({
2220
2276
  url: t ? "https://static.development.opexa.io" : "https://static.opexa.io"
2221
2277
  });
2222
2278
  }
@@ -2256,10 +2312,10 @@ class xt {
2256
2312
  logo: e.logo ?? void 0,
2257
2313
  fields: e.config.fields
2258
2314
  };
2259
- return w(t);
2315
+ return g(t);
2260
2316
  }
2261
2317
  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;
2318
+ var t, r, a, s, c, u, l, h, y, p, T, v, M, N, I, S, R, D, _, P, x, G, C, $, U, O, k, Q, K, J, z, X, Z, ee, te, re, ae, ne, oe, ie, se, ce, de, me, ue, le, pe, fe, he;
2263
2319
  return {
2264
2320
  paymentSettings: {
2265
2321
  minimumFirstDepositAmount: i(e.minimumFirstDepositAmount),
@@ -2271,11 +2327,11 @@ class xt {
2271
2327
  webEnabled: ((a = e.bankDepositGatewaySettings) == null ? void 0 : a.webEnabled) ?? !1,
2272
2328
  mobileWebEnabled: ((s = e.bankDepositGatewaySettings) == null ? void 0 : s.mobileWebEnabled) ?? !1,
2273
2329
  minimumAmount: i((c = e.bankDepositGatewaySettings) == null ? void 0 : c.minimumAmount),
2274
- maximumAmount: i((d = e.bankDepositGatewaySettings) == null ? void 0 : d.maximumAmount)
2330
+ maximumAmount: i((u = e.bankDepositGatewaySettings) == null ? void 0 : u.maximumAmount)
2275
2331
  },
2276
2332
  gcash: {
2277
2333
  androidEnabled: ((l = e.gcashDepositGatewaySettings) == null ? void 0 : l.androidEnabled) ?? !1,
2278
- iosEnabled: ((f = e.gcashDepositGatewaySettings) == null ? void 0 : f.iosEnabled) ?? !1,
2334
+ iosEnabled: ((h = e.gcashDepositGatewaySettings) == null ? void 0 : h.iosEnabled) ?? !1,
2279
2335
  webEnabled: ((y = e.gcashDepositGatewaySettings) == null ? void 0 : y.webEnabled) ?? !1,
2280
2336
  mobileWebEnabled: ((p = e.gcashDepositGatewaySettings) == null ? void 0 : p.mobileWebEnabled) ?? !1,
2281
2337
  minimumAmount: i((T = e.gcashDepositGatewaySettings) == null ? void 0 : T.minimumAmount),
@@ -2285,15 +2341,15 @@ class xt {
2285
2341
  androidEnabled: ((M = e.mayaDepositGatewaySettings) == null ? void 0 : M.androidEnabled) ?? !1,
2286
2342
  iosEnabled: ((N = e.mayaDepositGatewaySettings) == null ? void 0 : N.iosEnabled) ?? !1,
2287
2343
  webEnabled: ((I = e.mayaDepositGatewaySettings) == null ? void 0 : I.webEnabled) ?? !1,
2288
- mobileWebEnabled: ((g = e.mayaDepositGatewaySettings) == null ? void 0 : g.mobileWebEnabled) ?? !1,
2344
+ mobileWebEnabled: ((S = e.mayaDepositGatewaySettings) == null ? void 0 : S.mobileWebEnabled) ?? !1,
2289
2345
  minimumAmount: i((R = e.mayaDepositGatewaySettings) == null ? void 0 : R.minimumAmount),
2290
2346
  maximumAmount: i((D = e.mayaDepositGatewaySettings) == null ? void 0 : D.maximumAmount)
2291
2347
  },
2292
2348
  mayaApp: {
2293
- androidEnabled: ((k = e.mayaAppDepositGatewaySettings) == null ? void 0 : k.androidEnabled) ?? !1,
2349
+ androidEnabled: ((_ = e.mayaAppDepositGatewaySettings) == null ? void 0 : _.androidEnabled) ?? !1,
2294
2350
  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,
2351
+ webEnabled: ((x = e.mayaAppDepositGatewaySettings) == null ? void 0 : x.webEnabled) ?? !1,
2352
+ mobileWebEnabled: ((G = e.mayaAppDepositGatewaySettings) == null ? void 0 : G.mobileWebEnabled) ?? !1,
2297
2353
  minimumAmount: i((C = e.mayaAppDepositGatewaySettings) == null ? void 0 : C.minimumAmount),
2298
2354
  maximumAmount: i(($ = e.mayaAppDepositGatewaySettings) == null ? void 0 : $.maximumAmount)
2299
2355
  }
@@ -2302,7 +2358,7 @@ class xt {
2302
2358
  bank: {
2303
2359
  androidEnabled: ((U = e.bankWithdrawalGatewaySettings) == null ? void 0 : U.androidEnabled) ?? !1,
2304
2360
  iosEnabled: ((O = e.bankWithdrawalGatewaySettings) == null ? void 0 : O.iosEnabled) ?? !1,
2305
- webEnabled: ((E = e.bankWithdrawalGatewaySettings) == null ? void 0 : E.webEnabled) ?? !1,
2361
+ webEnabled: ((k = e.bankWithdrawalGatewaySettings) == null ? void 0 : k.webEnabled) ?? !1,
2306
2362
  mobileWebEnabled: ((Q = e.bankWithdrawalGatewaySettings) == null ? void 0 : Q.mobileWebEnabled) ?? !1,
2307
2363
  minimumAmount: i((K = e.bankWithdrawalGatewaySettings) == null ? void 0 : K.minimumAmount),
2308
2364
  maximumAmount: i((J = e.bankWithdrawalGatewaySettings) == null ? void 0 : J.maximumAmount)
@@ -2327,8 +2383,8 @@ class xt {
2327
2383
  maximumAmount: i((ce = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ce.maximumAmount)
2328
2384
  },
2329
2385
  mayaApp: {
2330
- androidEnabled: ((me = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : me.androidEnabled) ?? !1,
2331
- iosEnabled: ((de = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : de.iosEnabled) ?? !1,
2386
+ androidEnabled: ((de = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : de.androidEnabled) ?? !1,
2387
+ iosEnabled: ((me = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : me.iosEnabled) ?? !1,
2332
2388
  webEnabled: ((ue = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ue.webEnabled) ?? !1,
2333
2389
  mobileWebEnabled: ((le = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : le.mobileWebEnabled) ?? !1,
2334
2390
  minimumAmount: i((pe = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : pe.minimumAmount),
@@ -2365,7 +2421,7 @@ class xt {
2365
2421
  dateTimeCreated: new Date(e.dateTimeCreated),
2366
2422
  dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
2367
2423
  };
2368
- return w(t);
2424
+ return g(t);
2369
2425
  }
2370
2426
  wallet(e) {
2371
2427
  return {
@@ -2429,7 +2485,7 @@ class xt {
2429
2485
  dateTimeCreated: new Date(e.dateTimeCreated),
2430
2486
  dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
2431
2487
  };
2432
- return w(t);
2488
+ return g(t);
2433
2489
  }
2434
2490
  deposit(e) {
2435
2491
  const t = {
@@ -2438,7 +2494,7 @@ class xt {
2438
2494
  status: e.status,
2439
2495
  checkoutUrl: e.checkoutUrl ?? void 0
2440
2496
  };
2441
- return w(t);
2497
+ return g(t);
2442
2498
  }
2443
2499
  depositRecord(e) {
2444
2500
  const t = {
@@ -2453,7 +2509,7 @@ class xt {
2453
2509
  dateTimeCreated: new Date(e.dateTimeCreated),
2454
2510
  dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
2455
2511
  };
2456
- return w(t);
2512
+ return g(t);
2457
2513
  }
2458
2514
  betRecord(e) {
2459
2515
  var r;
@@ -2484,7 +2540,7 @@ class xt {
2484
2540
  odds: ((r = e.metadata) == null ? void 0 : r.odds) ?? void 0
2485
2541
  }
2486
2542
  };
2487
- return w(t);
2543
+ return g(t);
2488
2544
  }
2489
2545
  latestBetRecord(e) {
2490
2546
  return {
@@ -2513,7 +2569,7 @@ class xt {
2513
2569
  referenceNumber: e.referenceNumber,
2514
2570
  dateTimeCreated: new Date(e.dateTimeCreated)
2515
2571
  };
2516
- return w(t);
2572
+ return g(t);
2517
2573
  }
2518
2574
  /**
2519
2575
  * @deprecated
@@ -2547,7 +2603,7 @@ class xt {
2547
2603
  dateTimeCreated: new Date(e.dateTimeCreated),
2548
2604
  dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
2549
2605
  };
2550
- return w(t);
2606
+ return g(t);
2551
2607
  }
2552
2608
  promo(e) {
2553
2609
  return {
@@ -2610,7 +2666,7 @@ class xt {
2610
2666
  dateTimeCreated: new Date(e.dateTimeCreated),
2611
2667
  dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
2612
2668
  };
2613
- return w(t);
2669
+ return g(t);
2614
2670
  }
2615
2671
  cashbackBonus(e) {
2616
2672
  return {
@@ -2628,7 +2684,7 @@ class xt {
2628
2684
  status: e.status,
2629
2685
  dateTimeCreated: new Date(e.dateTimeCreated)
2630
2686
  };
2631
- return w(t);
2687
+ return g(t);
2632
2688
  }
2633
2689
  pointsWallet(e) {
2634
2690
  return {
@@ -2656,22 +2712,22 @@ class xt {
2656
2712
  details: e.details,
2657
2713
  dateTimeCreated: new Date(e.dateTimeCreated)
2658
2714
  };
2659
- return w(t);
2715
+ return g(t);
2660
2716
  }
2661
2717
  }
2662
- class Bt {
2718
+ class qt {
2663
2719
  constructor(e) {
2664
- m(this, "cmsPortalService");
2665
- m(this, "authService");
2666
- m(this, "gameService");
2667
- m(this, "fileService");
2668
- m(this, "walletService");
2669
- m(this, "accountService");
2670
- m(this, "reportService");
2671
- m(this, "portalService");
2672
- m(this, "sessionManager");
2673
- m(this, "transformer");
2674
- m(this, "logger");
2720
+ d(this, "cmsPortalService");
2721
+ d(this, "authService");
2722
+ d(this, "gameService");
2723
+ d(this, "fileService");
2724
+ d(this, "walletService");
2725
+ d(this, "accountService");
2726
+ d(this, "reportService");
2727
+ d(this, "portalService");
2728
+ d(this, "sessionManager");
2729
+ d(this, "transformer");
2730
+ d(this, "logger");
2675
2731
  const {
2676
2732
  /**/
2677
2733
  site: t,
@@ -2679,17 +2735,17 @@ class Bt {
2679
2735
  platform: a,
2680
2736
  environment: s,
2681
2737
  logs: c
2682
- } = e, d = s === "production";
2683
- this.transformer = new xt({
2738
+ } = e, u = s === "production";
2739
+ this.transformer = new $t({
2684
2740
  environment: s
2685
2741
  }), this.logger = new ke({
2686
2742
  enabled: c ?? !1
2687
2743
  });
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({
2744
+ const l = u ? "https://auth.opexa.io" : "https://auth.development.opexa.io", h = u ? "https://wallet.opexa.io/graphql" : "https://wallet.development.opexa.io/graphql", y = u ? "https://report.opexa.io/graphql" : "https://report.development.opexa.io/graphql", p = u ? "https://account.opexa.io/graphql" : "https://account.development.opexa.io/graphql", T = u ? "https://portal.opexa.io/graphql" : "https://portal.development.opexa.io/graphql", v = u ? "https://file.opexa.io/graphql" : "https://file.development.opexa.io/graphql", M = u ? "https://game.opexa.io/graphql" : "https://game.development.opexa.io/graphql", N = u ? "https://portal-api.opexacms.io/v1" : "https://portal-api.development.opexacms.io/v1", I = new Ct({
2689
2745
  url: N,
2690
2746
  site: t,
2691
2747
  platform: r
2692
- }), g = {
2748
+ }), S = {
2693
2749
  middlewares: [this.authMiddleware],
2694
2750
  fetchOptions: {
2695
2751
  headers: {
@@ -2697,15 +2753,15 @@ class Bt {
2697
2753
  "Platform-Code": a
2698
2754
  }
2699
2755
  }
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({
2756
+ }, R = new vt(new W(M, S)), D = new Tt(new W(v, S)), _ = new Rt(new W(h, S)), P = new kt(new W(p, S)), x = new Nt(new W(y, S)), G = new Mt(new W(T, S)), C = new _t({
2701
2757
  url: l,
2702
2758
  platform: a
2703
2759
  }), $ = new Gt({
2704
2760
  logs: c,
2705
2761
  authService: C,
2706
- walletService: k
2762
+ walletService: _
2707
2763
  });
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;
2764
+ this.authService = C, this.gameService = R, this.fileService = D, this.walletService = _, this.accountService = P, this.reportService = x, this.portalService = G, this.sessionManager = $, this.cmsPortalService = I;
2709
2765
  }
2710
2766
  get authMiddleware() {
2711
2767
  return async (e) => {
@@ -2719,7 +2775,7 @@ class Bt {
2719
2775
  case "NAME_AND_PASSWORD": {
2720
2776
  const t = await this.sessionManager.create({
2721
2777
  ...e,
2722
- password: await S(e.password)
2778
+ password: await w(e.password)
2723
2779
  });
2724
2780
  return t.ok ? t.data ? {
2725
2781
  ok: !0,
@@ -2740,6 +2796,9 @@ class Bt {
2740
2796
  }
2741
2797
  }
2742
2798
  }
2799
+ /**
2800
+ * @deprecated use `sendVerificationCode__next`
2801
+ */
2743
2802
  async sendAuthenticationCode(e) {
2744
2803
  return this.authService.sendVerificationCode(e);
2745
2804
  }
@@ -2782,7 +2841,7 @@ class Bt {
2782
2841
  return await this.sessionManager.createFromAuthenticator({
2783
2842
  type: "SECURITY_QUESTION",
2784
2843
  token: e.token,
2785
- secretAnswer: await S(e.secretAnswer)
2844
+ secretAnswer: await w(e.secretAnswer)
2786
2845
  });
2787
2846
  default:
2788
2847
  return {
@@ -2822,7 +2881,7 @@ class Bt {
2822
2881
  * ```
2823
2882
  */
2824
2883
  watchSession(e) {
2825
- const t = Rt(e.interval ?? 3e4, 3e4, 6e4);
2884
+ const t = Dt(e.interval ?? 3e4, 3e4, 6e4);
2826
2885
  let r = null;
2827
2886
  const a = () => setTimeout(async () => {
2828
2887
  await this.sessionManager.verify() || await e.onInvalid(), r = a();
@@ -2915,8 +2974,8 @@ class Bt {
2915
2974
  name: e.name,
2916
2975
  domain: e.domain,
2917
2976
  birthDay: typeof e.dateOfBirth == "string" ? e.dateOfBirth : e.dateOfBirth.toISOString(),
2918
- password: await S(e.password),
2919
- mobileNumber: _(e.mobileNumber)
2977
+ password: await w(e.password),
2978
+ mobileNumber: E(e.mobileNumber)
2920
2979
  },
2921
2980
  referralCode: e.referralCode,
2922
2981
  verificationCode: e.verificationCode,
@@ -2924,11 +2983,43 @@ class Bt {
2924
2983
  });
2925
2984
  return r.ok ? { ok: !0, data: { id: t } } : r;
2926
2985
  }
2986
+ /**
2987
+ * @example
2988
+ * ```ts
2989
+ * const res = await sdk.createAccount({
2990
+ * id: ObjectId.generate(ObjectType.Account).toString(),
2991
+ * name: data.name,
2992
+ * password: data.password,
2993
+ * dateOfBirth: new Date(data.dateOfBirth),
2994
+ * mobileNumber: data.mobileNumber,
2995
+ * domain: data.domain,
2996
+ * reCAPTCHAResponse: data.reCAPTCHAResponse,
2997
+ * });
2998
+ *
2999
+ * if (!res.ok) {
3000
+ * window.alert(res.error.message);
3001
+ * } else {
3002
+ * // Do something
3003
+ * }
3004
+ * ```
3005
+ */
3006
+ async createAccount__next(e) {
3007
+ const t = e.id ?? b.generate(A.Account).toString(), r = await this.accountService.registerMemberAccount__next({
3008
+ input: {
3009
+ id: t,
3010
+ name: e.name,
3011
+ password: await w(e.password),
3012
+ mobileNumber: e.mobileNumber ? E(e.mobileNumber) : void 0
3013
+ },
3014
+ reCAPTCHAResponse: e.reCAPTCHAResponse
3015
+ });
3016
+ return r.ok ? { ok: !0, data: { id: t } } : r;
3017
+ }
2927
3018
  async registerMayaAccount(e) {
2928
3019
  return await this.accountService.registerMayaMemberAccount({
2929
3020
  input: {
2930
3021
  name: e.name,
2931
- password: await S(e.password),
3022
+ password: await w(e.password),
2932
3023
  domain: e.domain
2933
3024
  }
2934
3025
  });
@@ -2954,12 +3045,12 @@ class Bt {
2954
3045
  id: e,
2955
3046
  data: {
2956
3047
  ...t,
2957
- password: t.password ? await S(t.password) : void 0,
2958
- transactionPassword: t.transactionPassword ? await S(t.transactionPassword) : void 0,
3048
+ password: t.password ? await w(t.password) : void 0,
3049
+ transactionPassword: t.transactionPassword ? await w(t.transactionPassword) : void 0,
2959
3050
  ...t.mobileNumber && {
2960
- mobileNumber: _(t.mobileNumber)
3051
+ mobileNumber: E(t.mobileNumber)
2961
3052
  },
2962
- secretAnswer: t.secretAnswer ? await S(t.secretAnswer) : void 0
3053
+ secretAnswer: t.secretAnswer ? await w(t.secretAnswer) : void 0
2963
3054
  }
2964
3055
  }
2965
3056
  });
@@ -3036,8 +3127,8 @@ class Bt {
3036
3127
  async resetPassword(e) {
3037
3128
  return await this.accountService.resetPassword({
3038
3129
  input: {
3039
- mobileNumber: _(e.mobileNumber),
3040
- newPassword: await S(e.newPassword)
3130
+ mobileNumber: E(e.mobileNumber),
3131
+ newPassword: await w(e.newPassword)
3041
3132
  },
3042
3133
  verificationCode: e.verificationCode
3043
3134
  });
@@ -3060,10 +3151,13 @@ class Bt {
3060
3151
  return await this.accountService.sendVerificationCode({
3061
3152
  input: {
3062
3153
  channel: "SMS",
3063
- recipient: _(e)
3154
+ recipient: E(e)
3064
3155
  }
3065
3156
  });
3066
3157
  }
3158
+ async sendVerificationCode__next(e) {
3159
+ return this.authService.sendVerificationCode__next(e);
3160
+ }
3067
3161
  async wallet() {
3068
3162
  const e = await this.walletService.wallet();
3069
3163
  return e.ok ? {
@@ -3130,7 +3224,7 @@ class Bt {
3130
3224
  input: {
3131
3225
  id: t,
3132
3226
  amount: e.amount.toString(),
3133
- transactionPassword: await S(e.transactionPassword)
3227
+ transactionPassword: await w(e.transactionPassword)
3134
3228
  }
3135
3229
  });
3136
3230
  if (!r.ok) return r;
@@ -3140,8 +3234,8 @@ class Bt {
3140
3234
  input: {
3141
3235
  id: t,
3142
3236
  amount: e.amount.toString(),
3143
- transactionPassword: await S(e.transactionPassword),
3144
- recipientMobileNumber: _(e.recipientMobileNumber)
3237
+ transactionPassword: await w(e.transactionPassword),
3238
+ recipientMobileNumber: E(e.recipientMobileNumber)
3145
3239
  }
3146
3240
  });
3147
3241
  if (!r.ok) return r;
@@ -3151,8 +3245,8 @@ class Bt {
3151
3245
  input: {
3152
3246
  id: t,
3153
3247
  amount: e.amount.toString(),
3154
- transactionPassword: await S(e.transactionPassword),
3155
- recipientMobileNumber: _(e.recipientMobileNumber)
3248
+ transactionPassword: await w(e.transactionPassword),
3249
+ recipientMobileNumber: E(e.recipientMobileNumber)
3156
3250
  }
3157
3251
  });
3158
3252
  if (!r.ok) return r;
@@ -3162,7 +3256,7 @@ class Bt {
3162
3256
  input: {
3163
3257
  id: t,
3164
3258
  amount: e.amount.toString(),
3165
- transactionPassword: await S(e.transactionPassword)
3259
+ transactionPassword: await w(e.transactionPassword)
3166
3260
  }
3167
3261
  });
3168
3262
  if (!r.ok) return r;
@@ -3507,12 +3601,12 @@ class Bt {
3507
3601
  async createGameSession__next(e) {
3508
3602
  const t = e.id ?? b.generate(A.GameSession).toString();
3509
3603
  if (e.game.startsWith("SPORTS:")) {
3510
- const d = await b.generateFromKey(A.Game, e.game).then(
3511
- (f) => f.toString()
3604
+ const u = await b.generateFromKey(A.Game, e.game).then(
3605
+ (h) => h.toString()
3512
3606
  ), l = await this.gameService.createGameSession({
3513
3607
  input: {
3514
3608
  id: t,
3515
- game: d
3609
+ game: u
3516
3610
  }
3517
3611
  });
3518
3612
  return l.ok ? { ok: !0, data: { id: t } } : l;
@@ -3530,7 +3624,7 @@ class Bt {
3530
3624
  /**/
3531
3625
  provider: a,
3532
3626
  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 } });
3627
+ } = r.data, c = Ut(a) ? await this.walletService.createGameSession({ input: { id: t, game: s } }) : await this.gameService.createGameSession({ input: { id: t, game: s } });
3534
3628
  return c.ok ? { ok: !0, data: { id: t } } : c;
3535
3629
  }
3536
3630
  /** @deprecated use `endGameSession__next` */
@@ -3651,7 +3745,7 @@ class Bt {
3651
3745
  return await this.accountService.updateReferralCode({ input: e });
3652
3746
  }
3653
3747
  }
3654
- const $t = [
3748
+ const Wt = [
3655
3749
  /**/
3656
3750
  "RTG",
3657
3751
  "DARWIN",
@@ -3661,12 +3755,12 @@ const $t = [
3661
3755
  "EVOLUTION_NETENT",
3662
3756
  "EVOLUTION_REDTIGER"
3663
3757
  ];
3664
- function Wt(n) {
3665
- return $t.some((e) => e === n);
3758
+ function Ut(n) {
3759
+ return Wt.some((e) => e === n);
3666
3760
  }
3667
3761
  export {
3668
- Lt as ObjectId,
3762
+ Vt as ObjectId,
3669
3763
  A as ObjectType,
3670
- Bt as Sdk
3764
+ qt as Sdk
3671
3765
  };
3672
3766
  //# sourceMappingURL=index.mjs.map