@opexa/portal-sdk 0.59.114 → 0.59.116

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.
@@ -1695,6 +1695,9 @@ var BONUS_QUERY = gql`
1695
1695
  query Bonus {
1696
1696
  bonus {
1697
1697
  id
1698
+ freeBetDrop {
1699
+ id
1700
+ }
1698
1701
  promo {
1699
1702
  ...PromoFragment
1700
1703
  }
@@ -1726,6 +1729,9 @@ var BONUSES_QUERY = gql`
1726
1729
  query Bonuses {
1727
1730
  bonuses {
1728
1731
  id
1732
+ freeBetDrop {
1733
+ id
1734
+ }
1729
1735
  promo {
1730
1736
  ...PromoFragment
1731
1737
  }
@@ -3425,7 +3431,9 @@ var _GAMES_NEXT_QUERY = gql`
3425
3431
  hidden
3426
3432
  hasFreeBet
3427
3433
  hasJackpot
3428
- image
3434
+ image {
3435
+ url
3436
+ }
3429
3437
  groups {
3430
3438
  id
3431
3439
  name
@@ -3461,7 +3469,9 @@ var _GAMES_NEXT_QUERY__STAGING = gql`
3461
3469
  returnToPlayer
3462
3470
  minimumBet
3463
3471
  maximumBet
3464
- image
3472
+ image {
3473
+ url
3474
+ }
3465
3475
  groups {
3466
3476
  id
3467
3477
  name
@@ -3502,6 +3512,7 @@ var GAME_GROUPS_QUERY = gql`
3502
3512
  edges {
3503
3513
  cursor
3504
3514
  node {
3515
+ __typename
3505
3516
  ... on GameGroup {
3506
3517
  id
3507
3518
  name
@@ -3518,7 +3529,9 @@ var GAME_GROUPS_QUERY = gql`
3518
3529
  hidden
3519
3530
  hasFreeBet
3520
3531
  hasJackpot
3521
- image
3532
+ image {
3533
+ url
3534
+ }
3522
3535
  }
3523
3536
  dateTimeLastUpdated
3524
3537
  dateTimeCreated
@@ -3531,6 +3544,7 @@ var GAME_GROUPS_QUERY = gql`
3531
3544
  var GAME_GROUP_QUERY = gql`
3532
3545
  query GameGroup($id: ObjectId!) {
3533
3546
  node(id: $id) {
3547
+ __typename
3534
3548
  ... on GameGroup {
3535
3549
  id
3536
3550
  name
@@ -3545,7 +3559,9 @@ var GAME_GROUP_QUERY = gql`
3545
3559
  hidden
3546
3560
  hasFreeBet
3547
3561
  hasJackpot
3548
- image
3562
+ image {
3563
+ url
3564
+ }
3549
3565
  }
3550
3566
  dateTimeLastUpdated
3551
3567
  dateTimeCreated
@@ -5974,6 +5990,18 @@ var TriggerService = class {
5974
5990
  };
5975
5991
 
5976
5992
  // src/services/wallet.service.ts
5993
+ function isWalletGameGroup(node) {
5994
+ return node.__typename === "GameGroup" && "id" in node && typeof node.id === "string" && "name" in node && typeof node.name === "string" && "games" in node && Array.isArray(node.games) && "dateTimeCreated" in node && typeof node.dateTimeCreated === "string" && "dateTimeLastUpdated" in node && typeof node.dateTimeLastUpdated === "string";
5995
+ }
5996
+ function invalidWalletGameGroup(node) {
5997
+ return {
5998
+ ok: false,
5999
+ error: {
6000
+ name: "UnknownError",
6001
+ message: node.__typename && node.__typename !== "GameGroup" ? `Wallet returned ${node.__typename} instead of GameGroup.` : "Wallet returned invalid GameGroup data."
6002
+ }
6003
+ };
6004
+ }
5977
6005
  var WalletService = class {
5978
6006
  client;
5979
6007
  environment;
@@ -6950,14 +6978,26 @@ var WalletService = class {
6950
6978
  }
6951
6979
  };
6952
6980
  }
6981
+ const edges = [];
6982
+ for (const { cursor, node } of res.data.gameGroups.edges) {
6983
+ if (!isWalletGameGroup(node)) return invalidWalletGameGroup(node);
6984
+ const { __typename, ...group } = node;
6985
+ edges.push({ cursor, node: group });
6986
+ }
6953
6987
  return {
6954
6988
  ok: true,
6955
- data: res.data.gameGroups
6989
+ data: { ...res.data.gameGroups, edges }
6956
6990
  };
6957
6991
  }
6958
6992
  async gameGroup(variables) {
6959
6993
  const res = await this.client.request(GAME_GROUP_QUERY, variables);
6960
- return res.ok ? { ok: res.ok, data: res.data.node } : res;
6994
+ if (!res.ok) return res;
6995
+ if (!res.data.node) return { ok: true, data: res.data.node };
6996
+ if (!isWalletGameGroup(res.data.node)) {
6997
+ return invalidWalletGameGroup(res.data.node);
6998
+ }
6999
+ const { __typename, ...group } = res.data.node;
7000
+ return { ok: true, data: group };
6961
7001
  }
6962
7002
  };
6963
7003
 
@@ -6994,5 +7034,5 @@ var ExtensionService = class {
6994
7034
  };
6995
7035
 
6996
7036
  export { AccountService, AuthService, CmsPortalService, ExtensionService, FileService, GameService, PortalService, ReportService, TriggerService, WalletService, getFingerPrint, isIOSPlatform };
6997
- //# sourceMappingURL=chunk-DSBYVM5T.js.map
6998
- //# sourceMappingURL=chunk-DSBYVM5T.js.map
7037
+ //# sourceMappingURL=chunk-GAWJOZTO.js.map
7038
+ //# sourceMappingURL=chunk-GAWJOZTO.js.map