@opexa/portal-sdk 0.0.27 → 0.0.28

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,7 +1,7 @@
1
- var Te = Object.defineProperty;
2
- var Ce = (o, e, t) => e in o ? Te(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
3
- var m = (o, e, t) => Ce(o, typeof e != "symbol" ? e + "" : e, t);
4
- import { ObjectId as E } from "@opexa/object-id";
1
+ var Ce = Object.defineProperty;
2
+ var Te = (o, e, t) => e in o ? Ce(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
3
+ var m = (o, e, t) => Te(o, typeof e != "symbol" ? e + "" : e, t);
4
+ import { ObjectId as b } from "@opexa/object-id";
5
5
  import { ObjectId as Gt } from "@opexa/object-id";
6
6
  const S = {
7
7
  Account: 8,
@@ -21,7 +21,7 @@ function n(o, ...e) {
21
21
  }
22
22
  return t.trim();
23
23
  }
24
- const x = n`
24
+ const G = n`
25
25
  fragment FileFragment on File {
26
26
  id
27
27
  url
@@ -29,7 +29,7 @@ const x = n`
29
29
  dateTimeCreated
30
30
  }
31
31
  `, ve = n`
32
- ${x}
32
+ ${G}
33
33
 
34
34
  query File($id: ObjectId!) {
35
35
  node(id: $id) {
@@ -52,7 +52,7 @@ const x = n`
52
52
  }
53
53
  }
54
54
  }
55
- `, Ie = n`
55
+ `, Me = n`
56
56
  query Wallet {
57
57
  wallet {
58
58
  id
@@ -62,7 +62,7 @@ const x = n`
62
62
  dateTimeLastUpdated
63
63
  }
64
64
  }
65
- `, Me = n`
65
+ `, De = n`
66
66
  query PointsWallet {
67
67
  pointsWallet {
68
68
  id
@@ -71,7 +71,7 @@ const x = n`
71
71
  dateTimeCreated
72
72
  }
73
73
  }
74
- `, De = n`
74
+ `, Ie = n`
75
75
  mutation PointsToCashConversion($input: PointsToCashConversionInput!) {
76
76
  pointsToCashConversion(input: $input) {
77
77
  ... on InsufficientPointsError {
@@ -111,7 +111,7 @@ const x = n`
111
111
  }
112
112
  }
113
113
  }
114
- `, Ee = n`
114
+ `, be = n`
115
115
  query GameSession($id: ObjectId!) {
116
116
  node(id: $id) {
117
117
  ... on GameSession {
@@ -149,7 +149,7 @@ const x = n`
149
149
  }
150
150
  }
151
151
  }
152
- `, xe = n`
152
+ `, Ge = n`
153
153
  query Announcements($first: Int, $after: Cursor, $filter: AnnouncementFilterInput) {
154
154
  announcements(first: $first, after: $after, filter: $filter) {
155
155
  edges {
@@ -175,7 +175,7 @@ const x = n`
175
175
  }
176
176
  }
177
177
  }
178
- `, Ge = n`
178
+ `, xe = n`
179
179
  query WithdrawalRecords($first: Int, $after: Cursor, $filter: WithdrawalRecordFilterInput) {
180
180
  member {
181
181
  withdrawalRecords(first: $first, after: $after, filter: $filter) {
@@ -242,7 +242,7 @@ const x = n`
242
242
  }
243
243
  }
244
244
  }
245
- `, Oe = n`
245
+ `, Be = n`
246
246
  mutation CreateGCashWithdrawal($input: CreateGCashWithdrawalInput!) {
247
247
  createGCashWithdrawal(input: $input) {
248
248
  ... on AccountNotVerifiedError {
@@ -265,7 +265,7 @@ const x = n`
265
265
  }
266
266
  }
267
267
  }
268
- `, Ue = n`
268
+ `, $e = n`
269
269
  mutation CreateMayaWithdrawal($input: CreateMayaWithdrawalInput!) {
270
270
  createMayaWithdrawal(input: $input) {
271
271
  ... on AccountNotVerifiedError {
@@ -288,7 +288,7 @@ const x = n`
288
288
  }
289
289
  }
290
290
  }
291
- `, Be = n`
291
+ `, We = n`
292
292
  mutation CreateMayaAppWithdrawal($input: CreateMayaAppWithdrawalInput!) {
293
293
  createMayaAppWithdrawal(input: $input) {
294
294
  ... on AccountNotVerifiedError {
@@ -308,7 +308,7 @@ const x = n`
308
308
  }
309
309
  }
310
310
  }
311
- `, $e = n`
311
+ `, Ue = n`
312
312
  mutation CreateBankWithdrawal($input: CreateBankWithdrawalInput!) {
313
313
  createBankWithdrawal(input: $input) {
314
314
  ... on MobileNumberNotVerifiedError {
@@ -331,7 +331,7 @@ const x = n`
331
331
  }
332
332
  }
333
333
  }
334
- `, We = n`
334
+ `, Oe = n`
335
335
  query RemainingDailyWithdrawalsCount {
336
336
  remainingDailyWithdrawalsCount
337
337
  }
@@ -364,7 +364,7 @@ const x = n`
364
364
  }
365
365
  }
366
366
  }
367
- `, Le = n`
367
+ `, Fe = n`
368
368
  mutation CreateGCashDeposit($input: CreateGCashDepositInput!) {
369
369
  createGCashDeposit(input: $input) {
370
370
  ... on DepositPromoMaximumAmountExceededError {
@@ -393,7 +393,7 @@ const x = n`
393
393
  }
394
394
  }
395
395
  }
396
- `, Ve = n`
396
+ `, Le = n`
397
397
  mutation CreateMayaDeposit($input: CreateMayaDepositInput!) {
398
398
  createMayaDeposit(input: $input) {
399
399
  ... on DepositPromoMaximumAmountExceededError {
@@ -422,7 +422,7 @@ const x = n`
422
422
  }
423
423
  }
424
424
  }
425
- `, Fe = n`
425
+ `, Ve = n`
426
426
  mutation CreateMayaAppDeposit($input: CreateMayaAppDepositInput!) {
427
427
  createMayaAppDeposit(input: $input) {
428
428
  ... on DepositPromoMaximumAmountExceededError {
@@ -574,8 +574,8 @@ const x = n`
574
574
  }
575
575
  }
576
576
  }
577
- `, U = n`
578
- ${x}
577
+ `, $ = n`
578
+ ${G}
579
579
 
580
580
  fragment PromoFragment on Promo {
581
581
  id
@@ -594,7 +594,7 @@ const x = n`
594
594
  dateTimeLastUpdated
595
595
  }
596
596
  `, ze = n`
597
- ${U}
597
+ ${$}
598
598
 
599
599
  query Promos {
600
600
  promos {
@@ -602,15 +602,15 @@ const x = n`
602
602
  }
603
603
  }
604
604
  `, Je = n`
605
- ${U}
605
+ ${$}
606
606
 
607
607
  query AvailablePromos($filter: PromoFilterInput) {
608
608
  availablePromos(filter: $filter) {
609
609
  ...PromoFragment
610
610
  }
611
611
  }
612
- `, be = n`
613
- ${x}
612
+ `, Ee = n`
613
+ ${G}
614
614
 
615
615
  fragment CashbackFragment on Cashback {
616
616
  id
@@ -626,7 +626,7 @@ const x = n`
626
626
  dateTimeLastUpdated
627
627
  }
628
628
  `, Xe = n`
629
- ${be}
629
+ ${Ee}
630
630
 
631
631
  query Cashbacks {
632
632
  cashbacks {
@@ -634,7 +634,7 @@ const x = n`
634
634
  }
635
635
  }
636
636
  `, Ze = n`
637
- ${U}
637
+ ${$}
638
638
 
639
639
  query Bonus {
640
640
  bonus {
@@ -663,7 +663,7 @@ const x = n`
663
663
  }
664
664
  }
665
665
  `, et = n`
666
- ${be}
666
+ ${Ee}
667
667
 
668
668
  query CashbackBonuses {
669
669
  cashbackBonuses {
@@ -715,7 +715,7 @@ const x = n`
715
715
  }
716
716
  }
717
717
  `, ot = n`
718
- ${x}
718
+ ${G}
719
719
 
720
720
  query MemberVerification {
721
721
  memberAccount: self {
@@ -1103,7 +1103,7 @@ class wt {
1103
1103
  }
1104
1104
  async announcements(e) {
1105
1105
  const t = await this.client.request(
1106
- xe,
1106
+ Ge,
1107
1107
  e
1108
1108
  );
1109
1109
  return t.ok ? {
@@ -1113,13 +1113,13 @@ class wt {
1113
1113
  }
1114
1114
  }
1115
1115
  function h(o, e) {
1116
- const t = G[o] ? G[o] : G[500];
1116
+ const t = x[o] ? x[o] : x[500];
1117
1117
  return {
1118
1118
  name: t.name,
1119
1119
  message: e ?? t.message
1120
1120
  };
1121
1121
  }
1122
- const G = {
1122
+ const x = {
1123
1123
  400: { name: "HttpBadRequest", message: "Bad Request" },
1124
1124
  401: { name: "HttpUnauthorized", message: "Unauthorized" },
1125
1125
  403: { name: "HttpForbidden", message: "Forbidden" },
@@ -1291,7 +1291,7 @@ class gt {
1291
1291
  } : t;
1292
1292
  }
1293
1293
  }
1294
- class Et {
1294
+ class bt {
1295
1295
  constructor(e) {
1296
1296
  m(this, "client");
1297
1297
  this.client = e;
@@ -1309,7 +1309,7 @@ class Et {
1309
1309
  }
1310
1310
  async withdrawalRecords(e) {
1311
1311
  const t = await this.client.request(
1312
- Ge,
1312
+ xe,
1313
1313
  e
1314
1314
  );
1315
1315
  return t.ok ? { ok: t.ok, data: t.data.member.withdrawalRecords } : t;
@@ -1383,7 +1383,7 @@ class Ae {
1383
1383
  return e.ok ? { ok: e.ok, data: e.data.bonus } : e;
1384
1384
  }
1385
1385
  async wallet() {
1386
- const e = await this.client.request(Ie);
1386
+ const e = await this.client.request(Me);
1387
1387
  return e.ok ? { ok: e.ok, data: e.data.wallet } : e;
1388
1388
  }
1389
1389
  async deposit(e) {
@@ -1394,7 +1394,7 @@ class Ae {
1394
1394
  return t.ok ? { ok: t.ok, data: t.data.node } : t;
1395
1395
  }
1396
1396
  async createGCashDeposit(e) {
1397
- const t = await this.client.request(Le, e);
1397
+ const t = await this.client.request(Fe, e);
1398
1398
  return t.ok ? t.data.createGCashDeposit ? {
1399
1399
  ok: !1,
1400
1400
  error: d(t.data.createGCashDeposit.__typename)
@@ -1403,7 +1403,7 @@ class Ae {
1403
1403
  } : t;
1404
1404
  }
1405
1405
  async createMayaDeposit(e) {
1406
- const t = await this.client.request(Ve, e);
1406
+ const t = await this.client.request(Le, e);
1407
1407
  return t.ok ? t.data.createMayaDeposit ? {
1408
1408
  ok: !1,
1409
1409
  error: d(t.data.createMayaDeposit.__typename)
@@ -1412,7 +1412,7 @@ class Ae {
1412
1412
  } : t;
1413
1413
  }
1414
1414
  async createMayaAppDeposit(e) {
1415
- const t = await this.client.request(Fe, e);
1415
+ const t = await this.client.request(Ve, e);
1416
1416
  return t.ok ? t.data.createMayaAppDeposit ? {
1417
1417
  ok: !1,
1418
1418
  error: d(t.data.createMayaAppDeposit.__typename)
@@ -1421,7 +1421,7 @@ class Ae {
1421
1421
  } : t;
1422
1422
  }
1423
1423
  async createGCashWithdrawal(e) {
1424
- const t = await this.client.request(Oe, e);
1424
+ const t = await this.client.request(Be, e);
1425
1425
  return t.ok ? t.data.createGCashWithdrawal ? {
1426
1426
  ok: !1,
1427
1427
  error: d(t.data.createGCashWithdrawal.__typename)
@@ -1430,7 +1430,7 @@ class Ae {
1430
1430
  } : t;
1431
1431
  }
1432
1432
  async createMayaWithdrawal(e) {
1433
- const t = await this.client.request(Ue, e);
1433
+ const t = await this.client.request($e, e);
1434
1434
  return t.ok ? t.data.createMayaWithdrawal ? {
1435
1435
  ok: !1,
1436
1436
  error: d(t.data.createMayaWithdrawal.__typename)
@@ -1439,7 +1439,7 @@ class Ae {
1439
1439
  } : t;
1440
1440
  }
1441
1441
  async createMayaAppWithdrawal(e) {
1442
- const t = await this.client.request(Be, e);
1442
+ const t = await this.client.request(We, e);
1443
1443
  return t.ok ? t.data.createMayaAppWithdrawal ? {
1444
1444
  ok: !1,
1445
1445
  error: d(t.data.createMayaAppWithdrawal.__typename)
@@ -1448,7 +1448,7 @@ class Ae {
1448
1448
  } : t;
1449
1449
  }
1450
1450
  async createBankWithdrawal(e) {
1451
- const t = await this.client.request($e, e);
1451
+ const t = await this.client.request(Ue, e);
1452
1452
  return t.ok ? t.data.createBankWithdrawal ? {
1453
1453
  ok: !1,
1454
1454
  error: d(t.data.createBankWithdrawal.__typename)
@@ -1458,16 +1458,16 @@ class Ae {
1458
1458
  }
1459
1459
  async remainingDailyWithdrawalsCount() {
1460
1460
  const e = await this.client.request(
1461
- We
1461
+ Oe
1462
1462
  );
1463
1463
  return e.ok ? { ok: e.ok, data: e.data.remainingDailyWithdrawalsCount } : e;
1464
1464
  }
1465
1465
  async pointsWallet() {
1466
- const e = await this.client.request(Me);
1466
+ const e = await this.client.request(De);
1467
1467
  return e.ok ? { ok: e.ok, data: e.data.pointsWallet } : e;
1468
1468
  }
1469
1469
  async pointsToCashConversion(e) {
1470
- const t = await this.client.request(De, e);
1470
+ const t = await this.client.request(Ie, e);
1471
1471
  return t.ok ? t.data.pointsToCashConversion ? {
1472
1472
  ok: !1,
1473
1473
  error: d(t.data.pointsToCashConversion.__typename)
@@ -1497,7 +1497,7 @@ class Ae {
1497
1497
  }
1498
1498
  async gameSession(e) {
1499
1499
  const t = await this.client.request(
1500
- Ee,
1500
+ be,
1501
1501
  e
1502
1502
  );
1503
1503
  return t.ok ? { ok: !0, data: t.data.node } : t;
@@ -1527,7 +1527,7 @@ class Ae {
1527
1527
  } : t;
1528
1528
  }
1529
1529
  }
1530
- class bt {
1530
+ class Et {
1531
1531
  constructor(e) {
1532
1532
  m(this, "url");
1533
1533
  m(this, "siteId");
@@ -1542,16 +1542,16 @@ class bt {
1542
1542
  } : e;
1543
1543
  }
1544
1544
  async games(e) {
1545
- var r, s, c, u, l, p, y, f, A, _, k, T, C, v, N, I;
1545
+ var r, s, c, u, l, p, y, f, A, k, _, C, T, v, N, M;
1546
1546
  const t = new URLSearchParams();
1547
- 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 = (r = e == null ? void 0 : e.filter) == null ? void 0 : r.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), (p = (l = e == null ? void 0 : e.filter) == null ? void 0 : l.type) != null && p.in && t.set("filter[type][in]", e.filter.type.in.join(",")), (f = (y = e == null ? void 0 : e.filter) == null ? void 0 : y.type) != null && f.notIn && t.set("filter[type][nin]", e.filter.type.notIn.join(",")), (_ = (A = e == null ? void 0 : e.filter) == null ? void 0 : A.provider) != null && _.equal && t.set("filter[provider][eq]", e.filter.provider.equal), (T = (k = e == null ? void 0 : e.filter) == null ? void 0 : k.provider) != null && T.notEqual && t.set("filter[provider][neq]", e.filter.provider.notEqual), (v = (C = e == null ? void 0 : e.filter) == null ? void 0 : C.provider) != null && v.in && t.set("filter[provider][in]", e.filter.provider.in.join(",")), (I = (N = e == null ? void 0 : e.filter) == null ? void 0 : N.provider) != null && I.notIn && t.set("filter[provider][nin]", e.filter.provider.notIn.join(","));
1547
+ 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 = (r = e == null ? void 0 : e.filter) == null ? void 0 : r.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), (p = (l = e == null ? void 0 : e.filter) == null ? void 0 : l.type) != null && p.in && t.set("filter[type][in]", e.filter.type.in.join(",")), (f = (y = e == null ? void 0 : e.filter) == null ? void 0 : y.type) != null && f.notIn && t.set("filter[type][nin]", e.filter.type.notIn.join(",")), (k = (A = e == null ? void 0 : e.filter) == null ? void 0 : A.provider) != null && k.equal && t.set("filter[provider][eq]", e.filter.provider.equal), (C = (_ = e == null ? void 0 : e.filter) == null ? void 0 : _.provider) != null && C.notEqual && t.set("filter[provider][neq]", e.filter.provider.notEqual), (v = (T = e == null ? void 0 : e.filter) == null ? void 0 : T.provider) != null && v.in && t.set("filter[provider][in]", e.filter.provider.in.join(",")), (M = (N = e == null ? void 0 : e.filter) == null ? void 0 : N.provider) != null && M.notIn && t.set("filter[provider][nin]", e.filter.provider.notIn.join(","));
1548
1548
  const a = await this.getJson("/games", t);
1549
1549
  return a.ok ? {
1550
1550
  ok: !0,
1551
1551
  data: {
1552
- edges: a.data.data.map((M) => ({
1553
- node: M,
1554
- cursor: M.cursor
1552
+ edges: a.data.data.map((D) => ({
1553
+ node: D,
1554
+ cursor: D.cursor
1555
1555
  })),
1556
1556
  totalCount: a.data.totalCount ?? 0,
1557
1557
  pageInfo: {
@@ -1619,7 +1619,7 @@ class At {
1619
1619
  }
1620
1620
  async gameSession(e) {
1621
1621
  const t = await this.client.request(
1622
- Ee,
1622
+ be,
1623
1623
  e
1624
1624
  );
1625
1625
  return t.ok ? { ok: !0, data: t.data.node } : t;
@@ -1643,7 +1643,7 @@ class At {
1643
1643
  } : t;
1644
1644
  }
1645
1645
  }
1646
- class _t {
1646
+ class kt {
1647
1647
  constructor(e) {
1648
1648
  m(this, "client");
1649
1649
  this.client = e;
@@ -1656,18 +1656,18 @@ class _t {
1656
1656
  } : e;
1657
1657
  }
1658
1658
  }
1659
- function kt(o, e, t) {
1659
+ function _t(o, e, t) {
1660
1660
  return o < e ? e : o > t ? t : o;
1661
1661
  }
1662
- function O(o) {
1662
+ function B(o) {
1663
1663
  return Object.prototype.toString.call(o) === "[object Object]" && Object(o) === o;
1664
1664
  }
1665
- function Tt(o) {
1665
+ function Ct(o) {
1666
1666
  const e = [];
1667
1667
  function t(a, r = []) {
1668
1668
  for (const s in a) {
1669
1669
  const c = a[s];
1670
- O(c) ? t(c, [...r, s]) : Array.isArray(c) ? t(Ct(c), [...r, s]) : e.push({
1670
+ B(c) ? t(c, [...r, s]) : Array.isArray(c) ? t(Tt(c), [...r, s]) : e.push({
1671
1671
  key: [...r, s],
1672
1672
  value: c
1673
1673
  });
@@ -1675,10 +1675,10 @@ function Tt(o) {
1675
1675
  }
1676
1676
  return t(o), e;
1677
1677
  }
1678
- function Ct(o) {
1678
+ function Tt(o) {
1679
1679
  return o.reduce((e, t, a) => (e[a] = t, e), {});
1680
1680
  }
1681
- class b {
1681
+ class E {
1682
1682
  constructor(e, t) {
1683
1683
  m(this, "url");
1684
1684
  m(this, "options");
@@ -1742,7 +1742,7 @@ class b {
1742
1742
  return t;
1743
1743
  }
1744
1744
  createUploadBody(e, t) {
1745
- const a = Tt(t).filter(
1745
+ const a = Ct(t).filter(
1746
1746
  (c) => c.value instanceof File || c.value instanceof Blob
1747
1747
  ), r = new FormData();
1748
1748
  r.append(
@@ -1764,7 +1764,7 @@ async function g(o) {
1764
1764
  const e = new TextEncoder().encode(o), t = await crypto.subtle.digest("SHA-256", e);
1765
1765
  return Array.from(new Uint8Array(t)).map((s) => s.toString(16).padStart(2, "0")).join("");
1766
1766
  }
1767
- class _e {
1767
+ class ke {
1768
1768
  constructor(e) {
1769
1769
  m(this, "enabled");
1770
1770
  this.enabled = (e == null ? void 0 : e.enabled) ?? !0;
@@ -1782,21 +1782,21 @@ class _e {
1782
1782
  this.enabled && console.log(`\x1B[32m[success] ${e}`);
1783
1783
  }
1784
1784
  }
1785
- function B(o) {
1785
+ function W(o) {
1786
1786
  return new Date(o.getTime());
1787
1787
  }
1788
- function D(o, e) {
1789
- const t = B(o);
1788
+ function I(o, e) {
1789
+ const t = W(o);
1790
1790
  return t.setDate(t.getDate() + e), t;
1791
1791
  }
1792
1792
  function R(o, e) {
1793
- const t = B(o);
1793
+ const t = W(o);
1794
1794
  return t.setMinutes(t.getMinutes() + e), t;
1795
1795
  }
1796
1796
  function he(o, e) {
1797
1797
  return o.getTime() > e.getTime();
1798
1798
  }
1799
- function ke(o) {
1799
+ function _e(o) {
1800
1800
  return new Promise((e) => {
1801
1801
  setTimeout(e, o);
1802
1802
  });
@@ -1810,12 +1810,12 @@ function we(o, e) {
1810
1810
  } = e;
1811
1811
  async function s(c, u) {
1812
1812
  const l = u ?? r, p = await o(...c);
1813
- return t(p) ? p : l > 1 ? (await ke(a * ((r - l) / 2)), s(c, l - 1)) : p;
1813
+ return t(p) ? p : l > 1 ? (await _e(a * ((r - l) / 2)), s(c, l - 1)) : p;
1814
1814
  }
1815
1815
  return async (...c) => await s(c);
1816
1816
  }
1817
1817
  function P(o, e) {
1818
- const t = B(o);
1818
+ const t = W(o);
1819
1819
  return t.setMinutes(t.getMinutes() - e), t;
1820
1820
  }
1821
1821
  class vt {
@@ -1829,12 +1829,12 @@ class vt {
1829
1829
  url: e.authUrl,
1830
1830
  platform: e.platform
1831
1831
  }), this.walletService = new Ae(
1832
- new b(e.walletUrl, {
1832
+ new E(e.walletUrl, {
1833
1833
  middlewares: [
1834
1834
  (t) => (t.headers.set("Platform", e.platform), t.headers.set("Role", "MEMBER"), t)
1835
1835
  ]
1836
1836
  })
1837
- ), this.logger = new _e({
1837
+ ), this.logger = new ke({
1838
1838
  enabled: e.log ?? !1
1839
1839
  });
1840
1840
  }
@@ -1875,7 +1875,7 @@ class vt {
1875
1875
  JSON.stringify({
1876
1876
  ...u.data,
1877
1877
  accessTokenExpiresAt: R(l, 8).getTime(),
1878
- refreshTokenExpiresAt: P(D(l, 30), 2).getTime()
1878
+ refreshTokenExpiresAt: P(I(l, 30), 2).getTime()
1879
1879
  })
1880
1880
  ), {
1881
1881
  ok: !0,
@@ -1891,7 +1891,7 @@ class vt {
1891
1891
  JSON.stringify({
1892
1892
  ...r.data,
1893
1893
  accessTokenExpiresAt: R(s, 8).getTime(),
1894
- refreshTokenExpiresAt: P(D(s, 30), 2).getTime()
1894
+ refreshTokenExpiresAt: P(I(s, 30), 2).getTime()
1895
1895
  })
1896
1896
  ), {
1897
1897
  ok: !0,
@@ -1915,7 +1915,7 @@ class vt {
1915
1915
  JSON.stringify({
1916
1916
  ...t.data,
1917
1917
  accessTokenExpiresAt: R(a, 8).getTime(),
1918
- refreshTokenExpiresAt: P(D(a, 30), 2).getTime()
1918
+ refreshTokenExpiresAt: P(I(a, 30), 2).getTime()
1919
1919
  })
1920
1920
  ), {
1921
1921
  ok: !0,
@@ -1931,7 +1931,7 @@ class vt {
1931
1931
  JSON.stringify({
1932
1932
  ...t.data,
1933
1933
  accessTokenExpiresAt: R(a, 8).getTime(),
1934
- refreshTokenExpiresAt: P(D(a, 30), 2).getTime()
1934
+ refreshTokenExpiresAt: P(I(a, 30), 2).getTime()
1935
1935
  })
1936
1936
  ), { ok: !0 };
1937
1937
  } else
@@ -1944,7 +1944,7 @@ class vt {
1944
1944
  data: null
1945
1945
  };
1946
1946
  if (this.refreshing)
1947
- return await ke(1e3), await this.get();
1947
+ return await _e(1e3), await this.get();
1948
1948
  const e = window.localStorage.getItem(this.storageKey);
1949
1949
  if (!e)
1950
1950
  return {
@@ -1977,7 +1977,7 @@ class vt {
1977
1977
  ...t,
1978
1978
  ...c.data,
1979
1979
  accessTokenExpiresAt: R(a, 8).getTime(),
1980
- refreshTokenExpiresAt: P(D(a, 30), 2).getTime()
1980
+ refreshTokenExpiresAt: P(I(a, 30), 2).getTime()
1981
1981
  }, window.localStorage.setItem(this.storageKey, JSON.stringify(t));
1982
1982
  }
1983
1983
  return {
@@ -2022,12 +2022,12 @@ function w(o) {
2022
2022
  for (const t in o) {
2023
2023
  const a = o[t];
2024
2024
  if (a !== null && a !== void 0) {
2025
- if (O(a)) {
2025
+ if (B(a)) {
2026
2026
  e[t] = w(a);
2027
2027
  continue;
2028
2028
  }
2029
2029
  if (Array.isArray(a)) {
2030
- e[t] = a.map((r) => O(r) ? w(r) : r);
2030
+ e[t] = a.map((r) => B(r) ? w(r) : r);
2031
2031
  continue;
2032
2032
  }
2033
2033
  e[t] = a;
@@ -2089,7 +2089,7 @@ class Nt {
2089
2089
  return w(t);
2090
2090
  }
2091
2091
  platform(e) {
2092
- var t, a, r, s, c, u, l, p, y, f, A, _, k, T, C, v, N, I, M, $, W, q, L, V, F, H, Y, j, Q, K, z, J, X, Z, ee, te, ae, re, oe, ne, ie, se, ce, me, de, ue, le, pe, fe;
2092
+ var t, a, r, s, c, u, l, p, y, f, A, k, _, C, T, v, N, M, D, U, O, q, F, L, V, H, Y, j, Q, K, z, J, X, Z, ee, te, ae, re, oe, ne, ie, se, ce, me, de, ue, le, pe, fe;
2093
2093
  return {
2094
2094
  paymentSettings: {
2095
2095
  minimumFirstDepositAmount: i(e.minimumFirstDepositAmount),
@@ -2109,28 +2109,28 @@ class Nt {
2109
2109
  webEnabled: ((y = e.gcashDepositGatewaySettings) == null ? void 0 : y.webEnabled) ?? !1,
2110
2110
  mobileWebEnabled: ((f = e.gcashDepositGatewaySettings) == null ? void 0 : f.mobileWebEnabled) ?? !1,
2111
2111
  minimumAmount: i((A = e.gcashDepositGatewaySettings) == null ? void 0 : A.minimumAmount),
2112
- maximumAmount: i((_ = e.gcashDepositGatewaySettings) == null ? void 0 : _.maximumAmount)
2112
+ maximumAmount: i((k = e.gcashDepositGatewaySettings) == null ? void 0 : k.maximumAmount)
2113
2113
  },
2114
2114
  maya: {
2115
- androidEnabled: ((k = e.mayaDepositGatewaySettings) == null ? void 0 : k.androidEnabled) ?? !1,
2116
- iosEnabled: ((T = e.mayaDepositGatewaySettings) == null ? void 0 : T.iosEnabled) ?? !1,
2117
- webEnabled: ((C = e.mayaDepositGatewaySettings) == null ? void 0 : C.webEnabled) ?? !1,
2115
+ androidEnabled: ((_ = e.mayaDepositGatewaySettings) == null ? void 0 : _.androidEnabled) ?? !1,
2116
+ iosEnabled: ((C = e.mayaDepositGatewaySettings) == null ? void 0 : C.iosEnabled) ?? !1,
2117
+ webEnabled: ((T = e.mayaDepositGatewaySettings) == null ? void 0 : T.webEnabled) ?? !1,
2118
2118
  mobileWebEnabled: ((v = e.mayaDepositGatewaySettings) == null ? void 0 : v.mobileWebEnabled) ?? !1,
2119
2119
  minimumAmount: i((N = e.mayaDepositGatewaySettings) == null ? void 0 : N.minimumAmount),
2120
- maximumAmount: i((I = e.mayaDepositGatewaySettings) == null ? void 0 : I.maximumAmount)
2120
+ maximumAmount: i((M = e.mayaDepositGatewaySettings) == null ? void 0 : M.maximumAmount)
2121
2121
  },
2122
2122
  mayaApp: {
2123
- androidEnabled: ((M = e.mayaAppDepositGatewaySettings) == null ? void 0 : M.androidEnabled) ?? !1,
2124
- iosEnabled: (($ = e.mayaAppDepositGatewaySettings) == null ? void 0 : $.iosEnabled) ?? !1,
2125
- webEnabled: ((W = e.mayaAppDepositGatewaySettings) == null ? void 0 : W.webEnabled) ?? !1,
2123
+ androidEnabled: ((D = e.mayaAppDepositGatewaySettings) == null ? void 0 : D.androidEnabled) ?? !1,
2124
+ iosEnabled: ((U = e.mayaAppDepositGatewaySettings) == null ? void 0 : U.iosEnabled) ?? !1,
2125
+ webEnabled: ((O = e.mayaAppDepositGatewaySettings) == null ? void 0 : O.webEnabled) ?? !1,
2126
2126
  mobileWebEnabled: ((q = e.mayaAppDepositGatewaySettings) == null ? void 0 : q.mobileWebEnabled) ?? !1,
2127
- minimumAmount: i((L = e.mayaAppDepositGatewaySettings) == null ? void 0 : L.minimumAmount),
2128
- maximumAmount: i((V = e.mayaAppDepositGatewaySettings) == null ? void 0 : V.maximumAmount)
2127
+ minimumAmount: i((F = e.mayaAppDepositGatewaySettings) == null ? void 0 : F.minimumAmount),
2128
+ maximumAmount: i((L = e.mayaAppDepositGatewaySettings) == null ? void 0 : L.maximumAmount)
2129
2129
  }
2130
2130
  },
2131
2131
  withdrawalGateway: {
2132
2132
  bank: {
2133
- androidEnabled: ((F = e.bankWithdrawalGatewaySettings) == null ? void 0 : F.androidEnabled) ?? !1,
2133
+ androidEnabled: ((V = e.bankWithdrawalGatewaySettings) == null ? void 0 : V.androidEnabled) ?? !1,
2134
2134
  iosEnabled: ((H = e.bankWithdrawalGatewaySettings) == null ? void 0 : H.iosEnabled) ?? !1,
2135
2135
  webEnabled: ((Y = e.bankWithdrawalGatewaySettings) == null ? void 0 : Y.webEnabled) ?? !1,
2136
2136
  mobileWebEnabled: ((j = e.bankWithdrawalGatewaySettings) == null ? void 0 : j.mobileWebEnabled) ?? !1,
@@ -2453,8 +2453,7 @@ class Nt {
2453
2453
  };
2454
2454
  }
2455
2455
  }
2456
- var It = { VITE_AUTH_DEVELOPMENT_URL: "https://auth.development.opexa.io", VITE_AUTH_PRODUCTION_URL: "https://auth.opexa.io", VITE_GAME_DEVELOPMENT_URL: "https://game.development.opexa.io/graphql", VITE_GAME_PRODUCTION_URL: "https://game.opexa.io/graphql", VITE_FILE_DEVELOPMENT_URL: "https://file.development.opexa.io/graphql", VITE_FILE_PRODUCTION_URL: "https://file.opexa.io/graphql", VITE_REPORT_DEVELOPMENT_URL: "https://report.development.opexa.io/graphql", VITE_REPORT_PRODUCTION_URL: "https://report.opexa.io/graphql", VITE_WALLET_DEVELOPMENT_URL: "https://wallet.development.opexa.io/graphql", VITE_WALLET_PRODUCTION_URL: "https://wallet.opexa.io/graphql", VITE_ACCOUNT_DEVELOPMENT_URL: "https://account.development.opexa.io/graphql", VITE_ACCOUNT_PRODUCTION_URL: "https://account.opexa.io/graphql", VITE_PORTAL_DEVELOPMENT_URL: "https://portal.development.opexa.io/graphql", VITE_PORTAL_PRODUCTION_URL: "https://portal.opexa.io/graphql", VITE_STATIC_DEVELOPMENT_URL: "https://static.development.opexa.io", VITE_STATIC_PRODUCTION_URL: "https://static.opexa.io", VITE_CMS_PORTAL_DEVELOPMENT_URL: "https://portal-api.opexacms.io/v1", BASE_URL: "/", MODE: "library", DEV: !1, PROD: !0, SSR: !1 };
2457
- class Rt {
2456
+ class It {
2458
2457
  constructor(e) {
2459
2458
  m(this, "gameService");
2460
2459
  m(this, "fileService");
@@ -2472,8 +2471,8 @@ class Rt {
2472
2471
  walletUrl: t ? "https://wallet.development.opexa.io/graphql" : "https://wallet.opexa.io/graphql",
2473
2472
  platform: e.platform,
2474
2473
  log: e.log
2475
- }), this.cmsPortalService = new bt({
2476
- url: t ? "https://portal-api.opexacms.io/v1" : It.VITE_CMS_PORTAL_PRODUCTION_URL,
2474
+ }), this.cmsPortalService = new Et({
2475
+ url: "https://portal-api.opexacms.io/v1",
2477
2476
  site: e.site,
2478
2477
  platform: e.sitePlatform
2479
2478
  });
@@ -2487,36 +2486,36 @@ class Rt {
2487
2486
  }
2488
2487
  };
2489
2488
  this.gameService = new At(
2490
- new b(
2489
+ new E(
2491
2490
  t ? "https://game.development.opexa.io/graphql" : "https://game.opexa.io/graphql",
2492
2491
  a
2493
2492
  )
2494
2493
  ), this.fileService = new gt(
2495
- new b(
2494
+ new E(
2496
2495
  t ? "https://file.development.opexa.io/graphql" : "https://file.opexa.io/graphql",
2497
2496
  a
2498
2497
  )
2499
2498
  ), this.walletService = new Ae(
2500
- new b(
2499
+ new E(
2501
2500
  t ? "https://wallet.development.opexa.io/graphql" : "https://wallet.opexa.io/graphql",
2502
2501
  a
2503
2502
  )
2504
- ), this.reportService = new Et(
2505
- new b(
2503
+ ), this.reportService = new bt(
2504
+ new E(
2506
2505
  t ? "https://report.development.opexa.io/graphql" : "https://report.opexa.io/graphql",
2507
2506
  a
2508
2507
  )
2509
2508
  ), this.accountService = new wt(
2510
- new b(
2509
+ new E(
2511
2510
  t ? "https://account.development.opexa.io/graphql" : "https://account.opexa.io/graphql",
2512
2511
  a
2513
2512
  )
2514
- ), this.portalService = new _t(
2515
- new b(
2513
+ ), this.portalService = new kt(
2514
+ new E(
2516
2515
  t ? "https://portal.development.opexa.io/graphql" : "https://portal.opexa.io/graphql",
2517
2516
  a
2518
2517
  )
2519
- ), this.transformer = new Nt(e), this.logger = new _e({
2518
+ ), this.transformer = new Nt(e), this.logger = new ke({
2520
2519
  enabled: e.log ?? !1
2521
2520
  });
2522
2521
  }
@@ -2632,7 +2631,7 @@ class Rt {
2632
2631
  * ```
2633
2632
  */
2634
2633
  watchSession(e) {
2635
- const t = kt(e.interval ?? 3e4, 3e4, 6e4);
2634
+ const t = _t(e.interval ?? 3e4, 3e4, 6e4);
2636
2635
  let a = null;
2637
2636
  const r = () => setTimeout(async () => {
2638
2637
  await this.sessionManager.verify() || await e.onInvalid(), a = r();
@@ -2715,7 +2714,7 @@ class Rt {
2715
2714
  * ```
2716
2715
  */
2717
2716
  async createAccount(e) {
2718
- const t = e.id ?? E.generate(S.Account).toString(), a = await this.accountService.registerMemberAccount({
2717
+ const t = e.id ?? b.generate(S.Account).toString(), a = await this.accountService.registerMemberAccount({
2719
2718
  input: {
2720
2719
  id: t,
2721
2720
  name: e.name,
@@ -2797,7 +2796,7 @@ class Rt {
2797
2796
  * ```
2798
2797
  */
2799
2798
  async submitVerificationDetails(e) {
2800
- const t = e.id ?? E.generate(S.Verification).toString(), a = await this.accountService.createMemberVerification({
2799
+ const t = e.id ?? b.generate(S.Verification).toString(), a = await this.accountService.createMemberVerification({
2801
2800
  input: {
2802
2801
  id: t,
2803
2802
  ...e
@@ -2921,7 +2920,7 @@ class Rt {
2921
2920
  * ```
2922
2921
  */
2923
2922
  async createWithdrawal(e) {
2924
- const t = e.id ?? E.generate(S.Withdrawal).toString();
2923
+ const t = e.id ?? b.generate(S.Withdrawal).toString();
2925
2924
  if (e.type === "BANK") {
2926
2925
  const a = await this.walletService.createBankWithdrawal({
2927
2926
  input: {
@@ -3007,7 +3006,7 @@ class Rt {
3007
3006
  * ```
3008
3007
  */
3009
3008
  async createDeposit(e) {
3010
- const t = e.id ?? E.generate(S.Deposit).toString();
3009
+ const t = e.id ?? b.generate(S.Deposit).toString();
3011
3010
  if (e.type === "MAYA") {
3012
3011
  const a = await this.walletService.createMayaDeposit({
3013
3012
  input: {
@@ -3295,12 +3294,12 @@ class Rt {
3295
3294
  * ```
3296
3295
  */
3297
3296
  async createGameSession(e) {
3298
- const t = e.id ?? E.generate(S.GameSession).toString(), a = await this.walletService.createGameSession({ input: { id: t, game: e.game } });
3297
+ const t = e.id ?? b.generate(S.GameSession).toString(), a = await this.walletService.createGameSession({ input: { id: t, game: e.game } });
3299
3298
  return a.ok ? { ok: !0, data: { id: t } } : a;
3300
3299
  }
3301
3300
  /** @deprecated use `createGameSession__next` */
3302
3301
  async createGameSession__legacy(e) {
3303
- const t = e.id ?? E.generate(S.GameSession).toString(), a = await this.gameService.createGameSession({ input: { id: t, game: e.game } });
3302
+ const t = e.id ?? b.generate(S.GameSession).toString(), a = await this.gameService.createGameSession({ input: { id: t, game: e.game } });
3304
3303
  return a.ok ? { ok: !0, data: { id: t } } : a;
3305
3304
  }
3306
3305
  async createGameSession__next(e) {
@@ -3318,7 +3317,7 @@ class Rt {
3318
3317
  type: a,
3319
3318
  provider: r,
3320
3319
  externalId: s
3321
- } = t.data, c = a === "SPORTS" ? e.id ?? (await E.generateFromKey(S.Game, `SPORTS:${r}`)).toString() : e.id ?? E.generate(S.GameSession).toString(), l = [
3320
+ } = t.data, c = a === "SPORTS" ? e.id ?? (await b.generateFromKey(S.Game, `SPORTS:${r}`)).toString() : e.id ?? b.generate(S.GameSession).toString(), l = [
3322
3321
  /**/
3323
3322
  "RTG",
3324
3323
  "DARWIN",
@@ -3370,7 +3369,7 @@ class Rt {
3370
3369
  * ```
3371
3370
  */
3372
3371
  async uploadImageFile(e) {
3373
- const t = e.id ?? E.generate(S.File).toString(), a = await this.fileService.uploadPrivateImageFile({
3372
+ const t = e.id ?? b.generate(S.File).toString(), a = await this.fileService.uploadPrivateImageFile({
3374
3373
  input: {
3375
3374
  id: t,
3376
3375
  file: e.file
@@ -3404,6 +3403,6 @@ class Rt {
3404
3403
  export {
3405
3404
  Gt as ObjectId,
3406
3405
  S as ObjectType,
3407
- Rt as Sdk
3406
+ It as Sdk
3408
3407
  };
3409
3408
  //# sourceMappingURL=index.mjs.map