@opexa/portal-sdk 0.59.107 → 0.59.111

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.
@@ -3414,8 +3414,8 @@ var WALLET_GAMES_QUERY = gql`
3414
3414
  }
3415
3415
  }
3416
3416
  `;
3417
- var PLATFORM_GAMES_QUERY = gql`
3418
- query PlatformGames($first: Int, $after: Cursor, $filter: _GameFilterInput) {
3417
+ var _GAMES_NEXT_QUERY = gql`
3418
+ query _games($first: Int, $after: Cursor, $filter: _GameFilterInput) {
3419
3419
  _games(first: $first, after: $after, filter: $filter) {
3420
3420
  totalCount
3421
3421
  pageInfo {
@@ -3436,12 +3436,65 @@ var PLATFORM_GAMES_QUERY = gql`
3436
3436
  hidden
3437
3437
  hasFreeBet
3438
3438
  hasJackpot
3439
+ image
3440
+ groups {
3441
+ id
3442
+ name
3443
+ }
3439
3444
  }
3440
3445
  }
3441
3446
  }
3442
3447
  }
3443
3448
  }
3444
3449
  `;
3450
+ var _GAMES_NEXT_QUERY__STAGING = gql`
3451
+ query _games($first: Int, $after: Cursor, $filter: _GameFilterInput) {
3452
+ _games(first: $first, after: $after, filter: $filter) {
3453
+ totalCount
3454
+ pageInfo {
3455
+ hasNextPage
3456
+ endCursor
3457
+ }
3458
+ edges {
3459
+ cursor
3460
+ node {
3461
+ ... on _Game {
3462
+ id
3463
+ reference
3464
+ name
3465
+ displayName
3466
+ type
3467
+ provider
3468
+ status
3469
+ hidden
3470
+ hasFreeBet
3471
+ hasJackpot
3472
+ returnToPlayer
3473
+ minimumBet
3474
+ maximumBet
3475
+ image
3476
+ groups {
3477
+ id
3478
+ name
3479
+ }
3480
+ }
3481
+ }
3482
+ }
3483
+ }
3484
+ }
3485
+ `;
3486
+ var WALLET_GAMES_BY_NAME_QUERY = gql`
3487
+ query WalletGamesByName(
3488
+ $search: String!
3489
+ $first: Int
3490
+ $filter: _GameFilterInput
3491
+ ) {
3492
+ _gamesByName(search: $search, first: $first, filter: $filter) {
3493
+ id
3494
+ name
3495
+ }
3496
+ }
3497
+ `;
3445
3498
  var GAME_GROUPS_QUERY = gql`
3446
3499
  query GameGroups(
3447
3500
  $first: Int
@@ -5957,8 +6010,10 @@ var TriggerService = class {
5957
6010
  // src/services/wallet.service.ts
5958
6011
  var WalletService = class {
5959
6012
  client;
5960
- constructor(client) {
6013
+ environment;
6014
+ constructor(client, environment = "development") {
5961
6015
  this.client = client;
6016
+ this.environment = environment;
5962
6017
  }
5963
6018
  async promos() {
5964
6019
  const res = await this.client.request(PROMOS_QUERY, void 0);
@@ -6858,8 +6913,11 @@ var WalletService = class {
6858
6913
  data: res.data.games
6859
6914
  };
6860
6915
  }
6861
- async platformGames(variables) {
6862
- const res = await this.client.request(PLATFORM_GAMES_QUERY, variables);
6916
+ async _games(variables) {
6917
+ const res = await this.client.request(
6918
+ this.environment === "production" ? _GAMES_NEXT_QUERY : _GAMES_NEXT_QUERY__STAGING,
6919
+ variables
6920
+ );
6863
6921
  if (!res.ok) return res;
6864
6922
  if (!res.data._games) {
6865
6923
  return {
@@ -6875,6 +6933,23 @@ var WalletService = class {
6875
6933
  data: res.data._games
6876
6934
  };
6877
6935
  }
6936
+ async _gamesByName(variables) {
6937
+ const res = await this.client.request(WALLET_GAMES_BY_NAME_QUERY, variables);
6938
+ if (!res.ok) return res;
6939
+ if (!res.data._gamesByName) {
6940
+ return {
6941
+ ok: false,
6942
+ error: {
6943
+ name: "UnknownError",
6944
+ message: "Something went wrong."
6945
+ }
6946
+ };
6947
+ }
6948
+ return {
6949
+ ok: true,
6950
+ data: res.data._gamesByName
6951
+ };
6952
+ }
6878
6953
  async cabinetWithdrawal(variables) {
6879
6954
  const res = await this.client.request(CABINET_WITHDRAWAL_QUERY, variables);
6880
6955
  return res.ok ? { ok: res.ok, data: res.data.node } : res;