@opexa/portal-sdk 0.0.70 → 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,9 +1,9 @@
1
- var _e = Object.defineProperty;
2
- var Te = (n, e, t) => e in n ? _e(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var m = (n, e, t) => Te(n, typeof e != "symbol" ? e + "" : e, t);
4
- import { ObjectId as E } from "@opexa/object-id";
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
+ import { ObjectId as b } from "@opexa/object-id";
5
5
  import { ObjectId as Vt } from "@opexa/object-id";
6
- const b = {
6
+ const A = {
7
7
  Account: 8,
8
8
  Deposit: 9,
9
9
  Withdrawal: 14,
@@ -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 {
@@ -639,7 +639,7 @@ const L = o`
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 {
@@ -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,11 +807,14 @@ const L = o`
807
807
  }
808
808
  }
809
809
  `, st = o`
810
- mutation RegisterMemberAccountNext(
810
+ mutation RegisterMemberAccount(
811
811
  $input: RegisterMemberAccountInput_next!
812
812
  $reCAPTCHAResponse: String
813
813
  ) {
814
- registerMemberAccount_next(input: $input, reCAPTCHAResponse: $reCAPTCHAResponse) {
814
+ registerMemberAccount: registerMemberAccount_next(
815
+ input: $input
816
+ reCAPTCHAResponse: $reCAPTCHAResponse
817
+ ) {
815
818
  ... on AccountNameNotAvailableError {
816
819
  __typename
817
820
  }
@@ -843,7 +846,7 @@ const L = o`
843
846
  }
844
847
  }
845
848
  }
846
- `, mt = o`
849
+ `, dt = o`
847
850
  mutation UpdateMemberAccount($input: UpdateMemberAccountInput!) {
848
851
  updateMemberAccount(input: $input) {
849
852
  ... on AccountNameNotAvailableError {
@@ -869,7 +872,7 @@ const L = o`
869
872
  }
870
873
  }
871
874
  }
872
- `, dt = o`
875
+ `, mt = o`
873
876
  mutation ResetPassword($input: ResetPasswordInput!, $verificationCode: String) {
874
877
  resetPassword(input: $input, verificationCode: $verificationCode) {
875
878
  ... on AccountNotFoundError {
@@ -1014,7 +1017,7 @@ const L = o`
1014
1017
  mutation ValidateMayaSession {
1015
1018
  validateMayaSession: validMayaSession
1016
1019
  }
1017
- `, Et = o`
1020
+ `, bt = o`
1018
1021
  query ActivityRecords($after: Cursor, $first: Int, $filter: ActivityRecordsFilterInput) {
1019
1022
  member {
1020
1023
  activityRecords(after: $after, first: $first, filter: $filter) {
@@ -1039,11 +1042,11 @@ const L = o`
1039
1042
  }
1040
1043
  }
1041
1044
  }
1042
- `, bt = o`
1045
+ `, At = o`
1043
1046
  query ReferralCode {
1044
1047
  referralCode
1045
1048
  }
1046
- `, At = o`
1049
+ `, Et = o`
1047
1050
  mutation UpdateReferralCode($input: UpdateReferralCodeInput!) {
1048
1051
  updateReferralCode(input: $input) {
1049
1052
  ... on ReferralCodeNotAvailableError {
@@ -1052,7 +1055,7 @@ const L = o`
1052
1055
  }
1053
1056
  }
1054
1057
  `;
1055
- function d(n) {
1058
+ function m(n) {
1056
1059
  return {
1057
1060
  name: n,
1058
1061
  message: {
@@ -1109,7 +1112,7 @@ function d(n) {
1109
1112
  }
1110
1113
  class kt {
1111
1114
  constructor(e) {
1112
- m(this, "client");
1115
+ d(this, "client");
1113
1116
  this.client = e;
1114
1117
  }
1115
1118
  /** aka `Query.self` */
@@ -1124,25 +1127,25 @@ class kt {
1124
1127
  const t = await this.client.request(it, e);
1125
1128
  return t.ok ? t.data.registerMemberAccount ? {
1126
1129
  ok: !1,
1127
- error: d(t.data.registerMemberAccount.__typename)
1130
+ error: m(t.data.registerMemberAccount.__typename)
1128
1131
  } : {
1129
1132
  ok: !0
1130
1133
  } : t;
1131
1134
  }
1132
- async registerMemberAccountNext(e) {
1135
+ async registerMemberAccount__next(e) {
1133
1136
  const t = await this.client.request(st, e);
1134
- return t.ok ? t.data.registerMemberAccount_next ? {
1137
+ return t.ok ? t.data.registerMemberAccount ? {
1135
1138
  ok: !1,
1136
- error: d(t.data.registerMemberAccount_next.__typename)
1139
+ error: m(t.data.registerMemberAccount.__typename)
1137
1140
  } : {
1138
1141
  ok: !0
1139
1142
  } : t;
1140
1143
  }
1141
1144
  async updateMemberAccount(e) {
1142
- const t = await this.client.request(mt, e);
1145
+ const t = await this.client.request(dt, e);
1143
1146
  return t.ok ? t.data.updateMemberAccount ? {
1144
1147
  ok: !1,
1145
- error: d(t.data.updateMemberAccount.__typename)
1148
+ error: m(t.data.updateMemberAccount.__typename)
1146
1149
  } : {
1147
1150
  ok: !0
1148
1151
  } : t;
@@ -1161,12 +1164,12 @@ class kt {
1161
1164
  }
1162
1165
  async resetPassword(e) {
1163
1166
  const t = await this.client.request(
1164
- dt,
1167
+ mt,
1165
1168
  e
1166
1169
  );
1167
1170
  return t.ok ? t.data.resetPassword ? {
1168
1171
  ok: !1,
1169
- error: d(t.data.resetPassword.__typename)
1172
+ error: m(t.data.resetPassword.__typename)
1170
1173
  } : {
1171
1174
  ok: !0
1172
1175
  } : t;
@@ -1182,7 +1185,7 @@ class kt {
1182
1185
  const t = await this.client.request(yt, e);
1183
1186
  return t.ok ? t.data.sendVerificationCode ? {
1184
1187
  ok: !1,
1185
- error: d(t.data.sendVerificationCode.__typename)
1188
+ error: m(t.data.sendVerificationCode.__typename)
1186
1189
  } : {
1187
1190
  ok: !0
1188
1191
  } : t;
@@ -1191,7 +1194,7 @@ class kt {
1191
1194
  const t = await this.client.request(lt, e);
1192
1195
  return t.ok ? t.data.verifyMobileNumber ? {
1193
1196
  ok: !1,
1194
- error: d(t.data.verifyMobileNumber.__typename)
1197
+ error: m(t.data.verifyMobileNumber.__typename)
1195
1198
  } : {
1196
1199
  ok: !0
1197
1200
  } : t;
@@ -1200,7 +1203,7 @@ class kt {
1200
1203
  const t = await this.client.request(pt, e);
1201
1204
  return t.ok ? t.data.createMemberVerification ? {
1202
1205
  ok: !1,
1203
- error: d(t.data.createMemberVerification.__typename)
1206
+ error: m(t.data.createMemberVerification.__typename)
1204
1207
  } : {
1205
1208
  ok: !0
1206
1209
  } : t;
@@ -1209,7 +1212,7 @@ class kt {
1209
1212
  const t = await this.client.request(ft, e);
1210
1213
  return t.ok ? t.data.updateMemberVerification ? {
1211
1214
  ok: !1,
1212
- error: d(t.data.updateMemberVerification.__typename)
1215
+ error: m(t.data.updateMemberVerification.__typename)
1213
1216
  } : {
1214
1217
  ok: !0
1215
1218
  } : t;
@@ -1235,32 +1238,32 @@ class kt {
1235
1238
  const t = await this.client.request(ct, e);
1236
1239
  return t.ok ? t.data.registerMayaMemberAccount ? {
1237
1240
  ok: !1,
1238
- error: d(t.data.registerMayaMemberAccount.__typename)
1241
+ error: m(t.data.registerMayaMemberAccount.__typename)
1239
1242
  } : {
1240
1243
  ok: !0
1241
1244
  } : t;
1242
1245
  }
1243
1246
  async referralCode() {
1244
- const e = await this.client.request(bt);
1247
+ const e = await this.client.request(At);
1245
1248
  return e.ok ? {
1246
1249
  ok: !0,
1247
1250
  data: e.data.referralCode
1248
1251
  } : e;
1249
1252
  }
1250
1253
  async updateReferralCode(e) {
1251
- const t = await this.client.request(At, e);
1254
+ const t = await this.client.request(Et, e);
1252
1255
  return t.ok ? t.data.updateReferralCode ? {
1253
1256
  ok: !1,
1254
- error: d(t.data.updateReferralCode.__typename)
1257
+ error: m(t.data.updateReferralCode.__typename)
1255
1258
  } : {
1256
1259
  ok: !0
1257
1260
  } : t;
1258
1261
  }
1259
1262
  }
1260
- function k(n) {
1263
+ function E(n) {
1261
1264
  return n.startsWith("+63") ? n : n.startsWith("63") ? `+${n}` : n.startsWith("0") ? `+63${n.substring(1)}` : `+63${n}`;
1262
1265
  }
1263
- function h(n, e) {
1266
+ function f(n, e) {
1264
1267
  const t = V[n] ? V[n] : V[500];
1265
1268
  return {
1266
1269
  name: t.name,
@@ -1276,24 +1279,24 @@ const V = {
1276
1279
  429: { name: "HttpTooManyRequests", message: "Too Many Requests" },
1277
1280
  500: { name: "HttpInternalServerError", message: "Internal Server Error" }
1278
1281
  };
1279
- class Ct {
1282
+ class _t {
1280
1283
  constructor(e) {
1281
- m(this, "url");
1282
- m(this, "platform");
1284
+ d(this, "url");
1285
+ d(this, "platform");
1283
1286
  this.url = e.url, this.platform = e.platform;
1284
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
+ }
1285
1292
  async createSession(e) {
1286
- const t = new Headers({
1287
- "Content-Type": "application/json",
1288
- "Platform-Code": this.platform,
1289
- Role: "MEMBER"
1290
- });
1293
+ const t = new Headers(this.headers);
1291
1294
  if (e.name) {
1292
1295
  const r = `${e.name}:${e.password}`, a = Buffer.from(r).toString("base64");
1293
1296
  t.set("Authorization", `Basic ${a}`);
1294
1297
  }
1295
1298
  if (e.mobileNumber) {
1296
- const a = `${k(e.mobileNumber)}:${e.authenticationCode}`, s = Buffer.from(a).toString("base64");
1299
+ const a = `${E(e.mobileNumber)}:${e.authenticationCode}`, s = Buffer.from(a).toString("base64");
1297
1300
  console.log(`MobileNumberOTP ${s}`), t.set("Authorization", `MobileNumberOTP ${s}`);
1298
1301
  }
1299
1302
  e.sessionId && t.set("Authorization", `MayaSession ${e.sessionId}`);
@@ -1307,24 +1310,20 @@ class Ct {
1307
1310
  data: a
1308
1311
  } : a.code === "ACCOUNT_BLACKLISTED" ? {
1309
1312
  ok: !1,
1310
- error: d("AccountBlacklisted")
1313
+ error: m("AccountBlacklisted")
1311
1314
  } : {
1312
1315
  ok: !1,
1313
- error: h(r.status)
1316
+ error: f(r.status)
1314
1317
  };
1315
1318
  } catch {
1316
1319
  return {
1317
1320
  ok: !1,
1318
- error: h(500)
1321
+ error: f(500)
1319
1322
  };
1320
1323
  }
1321
1324
  }
1322
1325
  async authenticate(e) {
1323
- const t = new Headers({
1324
- "Content-Type": "application/json",
1325
- "Platform-Code": this.platform,
1326
- Role: "MEMBER"
1327
- });
1326
+ const t = new Headers(this.headers);
1328
1327
  if (e.type === "SECURITY_QUESTION") {
1329
1328
  t.set("Authorization", `Bearer ${e.token}`);
1330
1329
  try {
@@ -1340,114 +1339,133 @@ class Ct {
1340
1339
  data: a
1341
1340
  } : r.status === 401 || r.status === 403 ? {
1342
1341
  ok: !1,
1343
- error: d("InvalidTokenOrSecretAnswer")
1342
+ error: m("InvalidTokenOrSecretAnswer")
1344
1343
  } : {
1345
1344
  ok: !1,
1346
- error: h(r.status)
1345
+ error: f(r.status)
1347
1346
  };
1348
1347
  } catch {
1349
1348
  return {
1350
1349
  ok: !1,
1351
- error: h(500)
1350
+ error: f(500)
1352
1351
  };
1353
1352
  }
1354
1353
  }
1355
1354
  throw new Error("Invalid input 'type'");
1356
1355
  }
1357
1356
  async refreshSession(e) {
1357
+ const t = new Headers(this.headers);
1358
+ t.append("Authorization", `Bearer ${e}`);
1358
1359
  try {
1359
- const t = await fetch(`${this.url}/session:refresh`, {
1360
+ const r = await fetch(`${this.url}/session:refresh`, {
1360
1361
  method: "POST",
1361
- headers: {
1362
- "Content-Type": "application/json",
1363
- "Platform-Code": this.platform,
1364
- Role: "MEMBER",
1365
- Authorization: `Bearer ${e}`
1366
- }
1367
- }), r = await t.json();
1368
- return t.ok ? {
1362
+ headers: t
1363
+ }), a = await r.json();
1364
+ return r.ok ? {
1369
1365
  ok: !0,
1370
- data: r
1371
- } : r.code === "ACCOUNT_BLACKLISTED" ? {
1366
+ data: a
1367
+ } : a.code === "ACCOUNT_BLACKLISTED" ? {
1372
1368
  ok: !1,
1373
- error: d("AccountBlacklisted")
1374
- } : t.status === 403 || t.status === 401 ? {
1369
+ error: m("AccountBlacklisted")
1370
+ } : r.status === 403 || r.status === 401 ? {
1375
1371
  ok: !1,
1376
- error: d("InvalidToken")
1372
+ error: m("InvalidToken")
1377
1373
  } : {
1378
1374
  ok: !1,
1379
- error: h(t.status)
1375
+ error: f(r.status)
1380
1376
  };
1381
1377
  } catch {
1382
1378
  return {
1383
1379
  ok: !1,
1384
- error: h(500)
1380
+ error: f(500)
1385
1381
  };
1386
1382
  }
1387
1383
  }
1388
1384
  async destroySession(e) {
1385
+ const t = new Headers(this.headers);
1386
+ t.append("Authorization", `Bearer ${e}`);
1389
1387
  try {
1390
- const t = await fetch(`${this.url}/session`, {
1388
+ const r = await fetch(`${this.url}/session`, {
1391
1389
  method: "DELETE",
1392
- headers: {
1393
- "Content-Type": "application/json",
1394
- "Platform-Code": this.platform,
1395
- Role: "MEMBER",
1396
- Authorization: `Bearer ${e}`
1397
- }
1390
+ headers: t
1398
1391
  });
1399
- return t.ok ? { ok: !0 } : { ok: !1, error: h(t.status) };
1392
+ return r.ok ? { ok: !0 } : { ok: !1, error: f(r.status) };
1400
1393
  } catch {
1401
- return { ok: !1, error: h(500) };
1394
+ return { ok: !1, error: f(500) };
1402
1395
  }
1403
1396
  }
1404
1397
  async verifySession(e) {
1398
+ const t = new Headers(this.headers);
1399
+ t.append("Authorization", `Bearer ${e}`);
1405
1400
  try {
1406
1401
  return (await fetch(`${this.url}/session`, {
1407
1402
  method: "GET",
1408
- headers: {
1409
- "Content-Type": "application/json",
1410
- "Platform-Code": this.platform,
1411
- Role: "MEMBER",
1412
- Authorization: `Bearer ${e}`
1413
- }
1403
+ headers: t
1414
1404
  })).ok;
1415
1405
  } catch {
1416
1406
  return !0;
1417
1407
  }
1418
1408
  }
1409
+ /**
1410
+ * @deprecated use `sendOtp`
1411
+ */
1419
1412
  async sendVerificationCode(e) {
1420
- const t = k(e);
1413
+ const t = E(e);
1421
1414
  try {
1422
1415
  const r = await fetch(`${this.url}/sendVerificationCode`, {
1423
1416
  method: "POST",
1424
- headers: {
1425
- "Content-Type": "application/json",
1426
- "Platform-Code": this.platform,
1427
- Role: "MEMBER"
1428
- },
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,
1429
1440
  body: JSON.stringify({
1430
1441
  channel: "SMS",
1431
1442
  recipient: t
1432
1443
  })
1433
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
+ }
1434
1452
  return r.ok ? { ok: !0 } : {
1435
1453
  ok: !1,
1436
- error: h(r.status)
1454
+ error: f(r.status)
1437
1455
  };
1438
1456
  } catch {
1439
1457
  return {
1440
1458
  ok: !1,
1441
- error: h(500)
1459
+ error: f(500)
1442
1460
  };
1443
1461
  }
1444
1462
  }
1445
1463
  }
1446
- class _t {
1464
+ class Ct {
1447
1465
  constructor(e) {
1448
- m(this, "url");
1449
- m(this, "siteId");
1450
- m(this, "platformId");
1466
+ d(this, "url");
1467
+ d(this, "siteId");
1468
+ d(this, "platformId");
1451
1469
  this.url = e.url, this.siteId = e.site, this.platformId = e.platform;
1452
1470
  }
1453
1471
  async self() {
@@ -1458,22 +1476,22 @@ class _t {
1458
1476
  } : e;
1459
1477
  }
1460
1478
  async games(e) {
1461
- var a, s, c, u, l, f, y, p, T, v, M, N, I, S, R, D, C, P, x, G, _, $, 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;
1462
1480
  const t = new URLSearchParams();
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(
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(
1464
1482
  "filter[tags][in]",
1465
- e.filter.tags.in.map((A) => A.toLowerCase()).join(",")
1483
+ e.filter.tags.in.map((k) => k.toLowerCase()).join(",")
1466
1484
  ), (O = (U = e == null ? void 0 : e.filter) == null ? void 0 : U.tags) != null && O.notIn && t.set(
1467
1485
  "filter[tags][nin]",
1468
- e.filter.tags.notIn.map((A) => A.toLowerCase()).join(",")
1486
+ e.filter.tags.notIn.map((k) => k.toLowerCase()).join(",")
1469
1487
  );
1470
1488
  const r = await this.getJson("/games", t);
1471
1489
  return r.ok ? {
1472
1490
  ok: !0,
1473
1491
  data: {
1474
- edges: r.data.data.map((A) => ({
1475
- node: A,
1476
- cursor: A.cursor
1492
+ edges: r.data.data.map((k) => ({
1493
+ node: k,
1494
+ cursor: k.cursor
1477
1495
  })),
1478
1496
  totalCount: r.data.totalCount ?? 0,
1479
1497
  pageInfo: {
@@ -1511,19 +1529,19 @@ class _t {
1511
1529
  data: await a.json()
1512
1530
  } : {
1513
1531
  ok: !1,
1514
- error: h(a.status)
1532
+ error: f(a.status)
1515
1533
  };
1516
1534
  } catch {
1517
1535
  return {
1518
1536
  ok: !1,
1519
- error: h(500)
1537
+ error: f(500)
1520
1538
  };
1521
1539
  }
1522
1540
  }
1523
1541
  }
1524
1542
  class Tt {
1525
1543
  constructor(e) {
1526
- m(this, "client");
1544
+ d(this, "client");
1527
1545
  this.client = e;
1528
1546
  }
1529
1547
  async file(e) {
@@ -1537,7 +1555,7 @@ class Tt {
1537
1555
  const t = await this.client.upload(Me, e);
1538
1556
  return t.ok ? t.data.uploadPrivateImageFile ? {
1539
1557
  ok: !1,
1540
- error: d(t.data.uploadPrivateImageFile.__typename)
1558
+ error: m(t.data.uploadPrivateImageFile.__typename)
1541
1559
  } : {
1542
1560
  ok: !0
1543
1561
  } : t;
@@ -1545,7 +1563,7 @@ class Tt {
1545
1563
  }
1546
1564
  class vt {
1547
1565
  constructor(e) {
1548
- m(this, "client");
1566
+ d(this, "client");
1549
1567
  this.client = e;
1550
1568
  }
1551
1569
  /** @deprecated */
@@ -1563,16 +1581,16 @@ class vt {
1563
1581
  }
1564
1582
  async gameSession(e) {
1565
1583
  const t = await this.client.request(
1566
- Ee,
1584
+ be,
1567
1585
  e
1568
1586
  );
1569
1587
  return t.ok ? { ok: !0, data: t.data.node } : t;
1570
1588
  }
1571
1589
  async createGameSession(e) {
1572
- const t = await this.client.request(be, e);
1590
+ const t = await this.client.request(Ae, e);
1573
1591
  return t.ok ? t.data.createGameSession ? {
1574
1592
  ok: !1,
1575
- error: d(t.data.createGameSession.__typename)
1593
+ error: m(t.data.createGameSession.__typename)
1576
1594
  } : {
1577
1595
  ok: !0
1578
1596
  } : t;
@@ -1581,7 +1599,7 @@ class vt {
1581
1599
  const t = await this.client.request(xe, e);
1582
1600
  return t.ok ? t.data.endGameSession ? {
1583
1601
  ok: !1,
1584
- error: d(t.data.endGameSession.__typename)
1602
+ error: m(t.data.endGameSession.__typename)
1585
1603
  } : {
1586
1604
  ok: !0
1587
1605
  } : t;
@@ -1589,7 +1607,7 @@ class vt {
1589
1607
  }
1590
1608
  class Mt {
1591
1609
  constructor(e) {
1592
- m(this, "client");
1610
+ d(this, "client");
1593
1611
  this.client = e;
1594
1612
  }
1595
1613
  async latestBetRecords() {
@@ -1602,7 +1620,7 @@ class Mt {
1602
1620
  }
1603
1621
  class Nt {
1604
1622
  constructor(e) {
1605
- m(this, "client");
1623
+ d(this, "client");
1606
1624
  this.client = e;
1607
1625
  }
1608
1626
  async betRecords(e) {
@@ -1644,7 +1662,7 @@ class Nt {
1644
1662
  }
1645
1663
  async activityRecords(e) {
1646
1664
  const t = await this.client.request(
1647
- Et,
1665
+ bt,
1648
1666
  e
1649
1667
  );
1650
1668
  return t.ok ? { ok: t.ok, data: t.data.member.activityRecords } : t;
@@ -1652,7 +1670,7 @@ class Nt {
1652
1670
  }
1653
1671
  class It {
1654
1672
  constructor(e) {
1655
- m(this, "url");
1673
+ d(this, "url");
1656
1674
  this.url = e.url;
1657
1675
  }
1658
1676
  gameThumbnails(e) {
@@ -1664,7 +1682,7 @@ class It {
1664
1682
  }
1665
1683
  class Rt {
1666
1684
  constructor(e) {
1667
- m(this, "client");
1685
+ d(this, "client");
1668
1686
  this.client = e;
1669
1687
  }
1670
1688
  async promos() {
@@ -1690,7 +1708,7 @@ class Rt {
1690
1708
  const t = await this.client.request(rt, e);
1691
1709
  return t.ok ? t.data.claimCashbackBonus ? {
1692
1710
  ok: !1,
1693
- error: d(t.data.claimCashbackBonus.__typename)
1711
+ error: m(t.data.claimCashbackBonus.__typename)
1694
1712
  } : {
1695
1713
  ok: !0
1696
1714
  } : {
@@ -1717,7 +1735,7 @@ class Rt {
1717
1735
  const t = await this.client.request(Le, e);
1718
1736
  return t.ok ? t.data.createGCashDeposit ? {
1719
1737
  ok: !1,
1720
- error: d(t.data.createGCashDeposit.__typename)
1738
+ error: m(t.data.createGCashDeposit.__typename)
1721
1739
  } : {
1722
1740
  ok: !0
1723
1741
  } : t;
@@ -1726,7 +1744,7 @@ class Rt {
1726
1744
  const t = await this.client.request(Ve, e);
1727
1745
  return t.ok ? t.data.createMayaDeposit ? {
1728
1746
  ok: !1,
1729
- error: d(t.data.createMayaDeposit.__typename)
1747
+ error: m(t.data.createMayaDeposit.__typename)
1730
1748
  } : {
1731
1749
  ok: !0
1732
1750
  } : t;
@@ -1735,7 +1753,7 @@ class Rt {
1735
1753
  const t = await this.client.request(He, e);
1736
1754
  return t.ok ? t.data.createMayaAppDeposit ? {
1737
1755
  ok: !1,
1738
- error: d(t.data.createMayaAppDeposit.__typename)
1756
+ error: m(t.data.createMayaAppDeposit.__typename)
1739
1757
  } : {
1740
1758
  ok: !0
1741
1759
  } : t;
@@ -1744,7 +1762,7 @@ class Rt {
1744
1762
  const t = await this.client.request(We, e);
1745
1763
  return t.ok ? t.data.createGCashWithdrawal ? {
1746
1764
  ok: !1,
1747
- error: d(t.data.createGCashWithdrawal.__typename)
1765
+ error: m(t.data.createGCashWithdrawal.__typename)
1748
1766
  } : {
1749
1767
  ok: !0
1750
1768
  } : t;
@@ -1753,7 +1771,7 @@ class Rt {
1753
1771
  const t = await this.client.request(Ue, e);
1754
1772
  return t.ok ? t.data.createMayaWithdrawal ? {
1755
1773
  ok: !1,
1756
- error: d(t.data.createMayaWithdrawal.__typename)
1774
+ error: m(t.data.createMayaWithdrawal.__typename)
1757
1775
  } : {
1758
1776
  ok: !0
1759
1777
  } : t;
@@ -1762,7 +1780,7 @@ class Rt {
1762
1780
  const t = await this.client.request(Oe, e);
1763
1781
  return t.ok ? t.data.createMayaAppWithdrawal ? {
1764
1782
  ok: !1,
1765
- error: d(t.data.createMayaAppWithdrawal.__typename)
1783
+ error: m(t.data.createMayaAppWithdrawal.__typename)
1766
1784
  } : {
1767
1785
  ok: !0
1768
1786
  } : t;
@@ -1771,7 +1789,7 @@ class Rt {
1771
1789
  const t = await this.client.request(Be, e);
1772
1790
  return t.ok ? t.data.createBankWithdrawal ? {
1773
1791
  ok: !1,
1774
- error: d(t.data.createBankWithdrawal.__typename)
1792
+ error: m(t.data.createBankWithdrawal.__typename)
1775
1793
  } : {
1776
1794
  ok: !0
1777
1795
  } : t;
@@ -1790,7 +1808,7 @@ class Rt {
1790
1808
  const t = await this.client.request(Re, e);
1791
1809
  return t.ok ? t.data.pointsToCashConversion ? {
1792
1810
  ok: !1,
1793
- error: d(t.data.pointsToCashConversion.__typename)
1811
+ error: m(t.data.pointsToCashConversion.__typename)
1794
1812
  } : {
1795
1813
  ok: !0
1796
1814
  } : t;
@@ -1817,16 +1835,16 @@ class Rt {
1817
1835
  }
1818
1836
  async gameSession(e) {
1819
1837
  const t = await this.client.request(
1820
- Ee,
1838
+ be,
1821
1839
  e
1822
1840
  );
1823
1841
  return t.ok ? { ok: !0, data: t.data.node } : t;
1824
1842
  }
1825
1843
  async createGameSession(e) {
1826
- const t = await this.client.request(be, e);
1844
+ const t = await this.client.request(Ae, e);
1827
1845
  return t.ok ? t.data.createGameSession ? {
1828
1846
  ok: !1,
1829
- error: d(t.data.createGameSession.__typename)
1847
+ error: m(t.data.createGameSession.__typename)
1830
1848
  } : {
1831
1849
  ok: !0
1832
1850
  } : t;
@@ -1885,9 +1903,9 @@ function xt(n) {
1885
1903
  }
1886
1904
  class W {
1887
1905
  constructor(e, t) {
1888
- m(this, "url");
1889
- m(this, "options");
1890
- m(this, "middlewares");
1906
+ d(this, "url");
1907
+ d(this, "options");
1908
+ d(this, "middlewares");
1891
1909
  var a;
1892
1910
  const r = new Headers((a = t == null ? void 0 : t.fetchOptions) == null ? void 0 : a.headers);
1893
1911
  this.url = e, this.options = { ...t == null ? void 0 : t.fetchOptions, headers: r }, this.middlewares = (t == null ? void 0 : t.middlewares) ?? [];
@@ -1924,11 +1942,11 @@ class W {
1924
1942
  try {
1925
1943
  const l = await fetch(e);
1926
1944
  if (!l.ok)
1927
- return { ok: !1, error: h(l.status) };
1928
- const f = await l.json(), y = f.data, p = (t = f.errors) == null ? void 0 : t.at(0);
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) } : {
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) } : {
1930
1948
  ok: !1,
1931
- error: h(500, p.message)
1949
+ error: f(500, p.message)
1932
1950
  } : {
1933
1951
  ok: !0,
1934
1952
  data: y
@@ -1936,7 +1954,7 @@ class W {
1936
1954
  } catch {
1937
1955
  return {
1938
1956
  ok: !1,
1939
- error: h(500)
1957
+ error: f(500)
1940
1958
  };
1941
1959
  }
1942
1960
  }
@@ -1971,7 +1989,7 @@ async function w(n) {
1971
1989
  }
1972
1990
  class ke {
1973
1991
  constructor(e) {
1974
- m(this, "enabled");
1992
+ d(this, "enabled");
1975
1993
  this.enabled = (e == null ? void 0 : e.enabled) ?? !0;
1976
1994
  }
1977
1995
  info(e) {
@@ -2001,7 +2019,7 @@ function q(n, e) {
2001
2019
  function ye(n, e) {
2002
2020
  return n.getTime() > e.getTime();
2003
2021
  }
2004
- function Ce(n) {
2022
+ function _e(n) {
2005
2023
  return new Promise((e) => {
2006
2024
  setTimeout(e, n);
2007
2025
  });
@@ -2014,8 +2032,8 @@ function we(n, e) {
2014
2032
  /**/
2015
2033
  } = e;
2016
2034
  async function s(c, u) {
2017
- const l = u ?? a, f = await n(...c);
2018
- return t(f) ? f : l > 1 ? (await Ce(r * ((a - l) / 2)), s(c, l - 1)) : f;
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;
2019
2037
  }
2020
2038
  return async (...c) => await s(c);
2021
2039
  }
@@ -2025,11 +2043,11 @@ function F(n, e) {
2025
2043
  }
2026
2044
  class Gt {
2027
2045
  constructor(e) {
2028
- m(this, "logger");
2029
- m(this, "storageKey", "session");
2030
- m(this, "authService");
2031
- m(this, "walletService");
2032
- 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);
2033
2051
  this.authService = e.authService, this.walletService = e.walletService, this.logger = new ke({
2034
2052
  enabled: e.logs ?? !1
2035
2053
  });
@@ -2074,13 +2092,13 @@ class Gt {
2074
2092
  maxAttempt: 5
2075
2093
  })();
2076
2094
  if (!l.ok) return l;
2077
- const f = /* @__PURE__ */ new Date();
2095
+ const h = /* @__PURE__ */ new Date();
2078
2096
  return window.localStorage.setItem(
2079
2097
  this.storageKey,
2080
2098
  JSON.stringify({
2081
2099
  ...l.data,
2082
- accessTokenExpiresAt: q(f, 8).getTime(),
2083
- refreshTokenExpiresAt: F(B(f, 30), 2).getTime()
2100
+ accessTokenExpiresAt: q(h, 8).getTime(),
2101
+ refreshTokenExpiresAt: F(B(h, 30), 2).getTime()
2084
2102
  })
2085
2103
  ), {
2086
2104
  ok: !0,
@@ -2149,7 +2167,7 @@ class Gt {
2149
2167
  data: null
2150
2168
  };
2151
2169
  if (this.refreshing)
2152
- return await Ce(1e3), await this.get();
2170
+ return await _e(1e3), await this.get();
2153
2171
  const e = window.localStorage.getItem(this.storageKey);
2154
2172
  if (!e)
2155
2173
  return {
@@ -2252,7 +2270,7 @@ function i(n, e) {
2252
2270
  }
2253
2271
  class $t {
2254
2272
  constructor(e) {
2255
- m(this, "staticService");
2273
+ d(this, "staticService");
2256
2274
  const t = (e == null ? void 0 : e.environment) === "development";
2257
2275
  this.staticService = new It({
2258
2276
  url: t ? "https://static.development.opexa.io" : "https://static.opexa.io"
@@ -2297,7 +2315,7 @@ class $t {
2297
2315
  return g(t);
2298
2316
  }
2299
2317
  platform(e) {
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;
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;
2301
2319
  return {
2302
2320
  paymentSettings: {
2303
2321
  minimumFirstDepositAmount: i(e.minimumFirstDepositAmount),
@@ -2313,7 +2331,7 @@ class $t {
2313
2331
  },
2314
2332
  gcash: {
2315
2333
  androidEnabled: ((l = e.gcashDepositGatewaySettings) == null ? void 0 : l.androidEnabled) ?? !1,
2316
- iosEnabled: ((f = e.gcashDepositGatewaySettings) == null ? void 0 : f.iosEnabled) ?? !1,
2334
+ iosEnabled: ((h = e.gcashDepositGatewaySettings) == null ? void 0 : h.iosEnabled) ?? !1,
2317
2335
  webEnabled: ((y = e.gcashDepositGatewaySettings) == null ? void 0 : y.webEnabled) ?? !1,
2318
2336
  mobileWebEnabled: ((p = e.gcashDepositGatewaySettings) == null ? void 0 : p.mobileWebEnabled) ?? !1,
2319
2337
  minimumAmount: i((T = e.gcashDepositGatewaySettings) == null ? void 0 : T.minimumAmount),
@@ -2328,11 +2346,11 @@ class $t {
2328
2346
  maximumAmount: i((D = e.mayaDepositGatewaySettings) == null ? void 0 : D.maximumAmount)
2329
2347
  },
2330
2348
  mayaApp: {
2331
- androidEnabled: ((C = e.mayaAppDepositGatewaySettings) == null ? void 0 : C.androidEnabled) ?? !1,
2349
+ androidEnabled: ((_ = e.mayaAppDepositGatewaySettings) == null ? void 0 : _.androidEnabled) ?? !1,
2332
2350
  iosEnabled: ((P = e.mayaAppDepositGatewaySettings) == null ? void 0 : P.iosEnabled) ?? !1,
2333
2351
  webEnabled: ((x = e.mayaAppDepositGatewaySettings) == null ? void 0 : x.webEnabled) ?? !1,
2334
2352
  mobileWebEnabled: ((G = e.mayaAppDepositGatewaySettings) == null ? void 0 : G.mobileWebEnabled) ?? !1,
2335
- minimumAmount: i((_ = e.mayaAppDepositGatewaySettings) == null ? void 0 : _.minimumAmount),
2353
+ minimumAmount: i((C = e.mayaAppDepositGatewaySettings) == null ? void 0 : C.minimumAmount),
2336
2354
  maximumAmount: i(($ = e.mayaAppDepositGatewaySettings) == null ? void 0 : $.maximumAmount)
2337
2355
  }
2338
2356
  },
@@ -2340,7 +2358,7 @@ class $t {
2340
2358
  bank: {
2341
2359
  androidEnabled: ((U = e.bankWithdrawalGatewaySettings) == null ? void 0 : U.androidEnabled) ?? !1,
2342
2360
  iosEnabled: ((O = e.bankWithdrawalGatewaySettings) == null ? void 0 : O.iosEnabled) ?? !1,
2343
- webEnabled: ((A = e.bankWithdrawalGatewaySettings) == null ? void 0 : A.webEnabled) ?? !1,
2361
+ webEnabled: ((k = e.bankWithdrawalGatewaySettings) == null ? void 0 : k.webEnabled) ?? !1,
2344
2362
  mobileWebEnabled: ((Q = e.bankWithdrawalGatewaySettings) == null ? void 0 : Q.mobileWebEnabled) ?? !1,
2345
2363
  minimumAmount: i((K = e.bankWithdrawalGatewaySettings) == null ? void 0 : K.minimumAmount),
2346
2364
  maximumAmount: i((J = e.bankWithdrawalGatewaySettings) == null ? void 0 : J.maximumAmount)
@@ -2365,8 +2383,8 @@ class $t {
2365
2383
  maximumAmount: i((ce = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ce.maximumAmount)
2366
2384
  },
2367
2385
  mayaApp: {
2368
- androidEnabled: ((me = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : me.androidEnabled) ?? !1,
2369
- 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,
2370
2388
  webEnabled: ((ue = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ue.webEnabled) ?? !1,
2371
2389
  mobileWebEnabled: ((le = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : le.mobileWebEnabled) ?? !1,
2372
2390
  minimumAmount: i((pe = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : pe.minimumAmount),
@@ -2699,17 +2717,17 @@ class $t {
2699
2717
  }
2700
2718
  class qt {
2701
2719
  constructor(e) {
2702
- m(this, "cmsPortalService");
2703
- m(this, "authService");
2704
- m(this, "gameService");
2705
- m(this, "fileService");
2706
- m(this, "walletService");
2707
- m(this, "accountService");
2708
- m(this, "reportService");
2709
- m(this, "portalService");
2710
- m(this, "sessionManager");
2711
- m(this, "transformer");
2712
- 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");
2713
2731
  const {
2714
2732
  /**/
2715
2733
  site: t,
@@ -2723,7 +2741,7 @@ class qt {
2723
2741
  }), this.logger = new ke({
2724
2742
  enabled: c ?? !1
2725
2743
  });
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({
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({
2727
2745
  url: N,
2728
2746
  site: t,
2729
2747
  platform: r
@@ -2735,15 +2753,15 @@ class qt {
2735
2753
  "Platform-Code": a
2736
2754
  }
2737
2755
  }
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({
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({
2739
2757
  url: l,
2740
2758
  platform: a
2741
2759
  }), $ = new Gt({
2742
2760
  logs: c,
2743
- authService: _,
2744
- walletService: C
2761
+ authService: C,
2762
+ walletService: _
2745
2763
  });
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;
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;
2747
2765
  }
2748
2766
  get authMiddleware() {
2749
2767
  return async (e) => {
@@ -2778,6 +2796,9 @@ class qt {
2778
2796
  }
2779
2797
  }
2780
2798
  }
2799
+ /**
2800
+ * @deprecated use `sendVerificationCode__next`
2801
+ */
2781
2802
  async sendAuthenticationCode(e) {
2782
2803
  return this.authService.sendVerificationCode(e);
2783
2804
  }
@@ -2946,7 +2967,7 @@ class qt {
2946
2967
  * ```
2947
2968
  */
2948
2969
  async createAccount(e) {
2949
- const t = e.id ?? E.generate(b.Account).toString(), r = await this.accountService.registerMemberAccount({
2970
+ const t = e.id ?? b.generate(A.Account).toString(), r = await this.accountService.registerMemberAccount({
2950
2971
  input: {
2951
2972
  id: t,
2952
2973
  btag: e.btag,
@@ -2954,7 +2975,7 @@ class qt {
2954
2975
  domain: e.domain,
2955
2976
  birthDay: typeof e.dateOfBirth == "string" ? e.dateOfBirth : e.dateOfBirth.toISOString(),
2956
2977
  password: await w(e.password),
2957
- mobileNumber: k(e.mobileNumber)
2978
+ mobileNumber: E(e.mobileNumber)
2958
2979
  },
2959
2980
  referralCode: e.referralCode,
2960
2981
  verificationCode: e.verificationCode,
@@ -2969,7 +2990,9 @@ class qt {
2969
2990
  * id: ObjectId.generate(ObjectType.Account).toString(),
2970
2991
  * name: data.name,
2971
2992
  * password: data.password,
2993
+ * dateOfBirth: new Date(data.dateOfBirth),
2972
2994
  * mobileNumber: data.mobileNumber,
2995
+ * domain: data.domain,
2973
2996
  * reCAPTCHAResponse: data.reCAPTCHAResponse,
2974
2997
  * });
2975
2998
  *
@@ -2980,13 +3003,13 @@ class qt {
2980
3003
  * }
2981
3004
  * ```
2982
3005
  */
2983
- async createAccountNext(e) {
2984
- const t = e.id ?? E.generate(b.Account).toString(), r = await this.accountService.registerMemberAccountNext({
3006
+ async createAccount__next(e) {
3007
+ const t = e.id ?? b.generate(A.Account).toString(), r = await this.accountService.registerMemberAccount__next({
2985
3008
  input: {
2986
3009
  id: t,
2987
3010
  name: e.name,
2988
3011
  password: await w(e.password),
2989
- mobileNumber: e.mobileNumber ? k(e.mobileNumber) : void 0
3012
+ mobileNumber: e.mobileNumber ? E(e.mobileNumber) : void 0
2990
3013
  },
2991
3014
  reCAPTCHAResponse: e.reCAPTCHAResponse
2992
3015
  });
@@ -3025,7 +3048,7 @@ class qt {
3025
3048
  password: t.password ? await w(t.password) : void 0,
3026
3049
  transactionPassword: t.transactionPassword ? await w(t.transactionPassword) : void 0,
3027
3050
  ...t.mobileNumber && {
3028
- mobileNumber: k(t.mobileNumber)
3051
+ mobileNumber: E(t.mobileNumber)
3029
3052
  },
3030
3053
  secretAnswer: t.secretAnswer ? await w(t.secretAnswer) : void 0
3031
3054
  }
@@ -3068,7 +3091,7 @@ class qt {
3068
3091
  * ```
3069
3092
  */
3070
3093
  async submitVerificationDetails(e) {
3071
- const t = e.id ?? E.generate(b.Verification).toString(), r = await this.accountService.createMemberVerification({
3094
+ const t = e.id ?? b.generate(A.Verification).toString(), r = await this.accountService.createMemberVerification({
3072
3095
  input: {
3073
3096
  id: t,
3074
3097
  ...e
@@ -3104,7 +3127,7 @@ class qt {
3104
3127
  async resetPassword(e) {
3105
3128
  return await this.accountService.resetPassword({
3106
3129
  input: {
3107
- mobileNumber: k(e.mobileNumber),
3130
+ mobileNumber: E(e.mobileNumber),
3108
3131
  newPassword: await w(e.newPassword)
3109
3132
  },
3110
3133
  verificationCode: e.verificationCode
@@ -3128,10 +3151,13 @@ class qt {
3128
3151
  return await this.accountService.sendVerificationCode({
3129
3152
  input: {
3130
3153
  channel: "SMS",
3131
- recipient: k(e)
3154
+ recipient: E(e)
3132
3155
  }
3133
3156
  });
3134
3157
  }
3158
+ async sendVerificationCode__next(e) {
3159
+ return this.authService.sendVerificationCode__next(e);
3160
+ }
3135
3161
  async wallet() {
3136
3162
  const e = await this.walletService.wallet();
3137
3163
  return e.ok ? {
@@ -3192,7 +3218,7 @@ class qt {
3192
3218
  * ```
3193
3219
  */
3194
3220
  async createWithdrawal(e) {
3195
- const t = e.id ?? E.generate(b.Withdrawal).toString();
3221
+ const t = e.id ?? b.generate(A.Withdrawal).toString();
3196
3222
  if (e.type === "BANK") {
3197
3223
  const r = await this.walletService.createBankWithdrawal({
3198
3224
  input: {
@@ -3209,7 +3235,7 @@ class qt {
3209
3235
  id: t,
3210
3236
  amount: e.amount.toString(),
3211
3237
  transactionPassword: await w(e.transactionPassword),
3212
- recipientMobileNumber: k(e.recipientMobileNumber)
3238
+ recipientMobileNumber: E(e.recipientMobileNumber)
3213
3239
  }
3214
3240
  });
3215
3241
  if (!r.ok) return r;
@@ -3220,7 +3246,7 @@ class qt {
3220
3246
  id: t,
3221
3247
  amount: e.amount.toString(),
3222
3248
  transactionPassword: await w(e.transactionPassword),
3223
- recipientMobileNumber: k(e.recipientMobileNumber)
3249
+ recipientMobileNumber: E(e.recipientMobileNumber)
3224
3250
  }
3225
3251
  });
3226
3252
  if (!r.ok) return r;
@@ -3278,7 +3304,7 @@ class qt {
3278
3304
  * ```
3279
3305
  */
3280
3306
  async createDeposit(e) {
3281
- const t = e.id ?? E.generate(b.Deposit).toString();
3307
+ const t = e.id ?? b.generate(A.Deposit).toString();
3282
3308
  if (e.type === "MAYA") {
3283
3309
  const r = await this.walletService.createMayaDeposit({
3284
3310
  input: {
@@ -3564,19 +3590,19 @@ class qt {
3564
3590
  * ```
3565
3591
  */
3566
3592
  async createGameSession(e) {
3567
- const t = e.id ?? E.generate(b.GameSession).toString(), r = await this.walletService.createGameSession({ input: { id: t, game: e.game } });
3593
+ const t = e.id ?? b.generate(A.GameSession).toString(), r = await this.walletService.createGameSession({ input: { id: t, game: e.game } });
3568
3594
  return r.ok ? { ok: !0, data: { id: t } } : r;
3569
3595
  }
3570
3596
  /** @deprecated use `createGameSession__next` */
3571
3597
  async createGameSession__legacy(e) {
3572
- const t = e.id ?? E.generate(b.GameSession).toString(), r = await this.gameService.createGameSession({ input: { id: t, game: e.game } });
3598
+ const t = e.id ?? b.generate(A.GameSession).toString(), r = await this.gameService.createGameSession({ input: { id: t, game: e.game } });
3573
3599
  return r.ok ? { ok: !0, data: { id: t } } : r;
3574
3600
  }
3575
3601
  async createGameSession__next(e) {
3576
- const t = e.id ?? E.generate(b.GameSession).toString();
3602
+ const t = e.id ?? b.generate(A.GameSession).toString();
3577
3603
  if (e.game.startsWith("SPORTS:")) {
3578
- const u = await E.generateFromKey(b.Game, e.game).then(
3579
- (f) => f.toString()
3604
+ const u = await b.generateFromKey(A.Game, e.game).then(
3605
+ (h) => h.toString()
3580
3606
  ), l = await this.gameService.createGameSession({
3581
3607
  input: {
3582
3608
  id: t,
@@ -3641,7 +3667,7 @@ class qt {
3641
3667
  * ```
3642
3668
  */
3643
3669
  async uploadImageFile(e) {
3644
- const t = e.id ?? E.generate(b.File).toString(), r = await this.fileService.uploadPrivateImageFile({
3670
+ const t = e.id ?? b.generate(A.File).toString(), r = await this.fileService.uploadPrivateImageFile({
3645
3671
  input: {
3646
3672
  id: t,
3647
3673
  file: e.file
@@ -3734,7 +3760,7 @@ function Ut(n) {
3734
3760
  }
3735
3761
  export {
3736
3762
  Vt as ObjectId,
3737
- b as ObjectType,
3763
+ A as ObjectType,
3738
3764
  qt as Sdk
3739
3765
  };
3740
3766
  //# sourceMappingURL=index.mjs.map