@opexa/portal-sdk 0.51.6 → 0.51.8

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.cjs CHANGED
@@ -2743,6 +2743,27 @@ var FAVORITE_GAMES_QUERY = gql`
2743
2743
  }
2744
2744
  }
2745
2745
  `;
2746
+ var WALLET_GAMES_QUERY = gql`
2747
+ query Games($first: Int $after: Cursor, $filter: GameFilterInput) {
2748
+ games(first: $first, after: $after, filter: $filter) {
2749
+ totalCount
2750
+ pageInfo {
2751
+ hasNextPage
2752
+ endCursor
2753
+ }
2754
+ edges{
2755
+ node{
2756
+ ... on Game{
2757
+ id
2758
+ name
2759
+ type
2760
+ provider
2761
+ }
2762
+ }
2763
+ }
2764
+ }
2765
+ }
2766
+ `;
2746
2767
  var GOOGLE_CLIEND_ID_QUERY = gql`
2747
2768
  query GoogleClientId {
2748
2769
  googleClientId
@@ -4990,6 +5011,23 @@ var WalletService = class {
4990
5011
  data: res.data.favoriteGames
4991
5012
  };
4992
5013
  }
5014
+ async walletGames(variables) {
5015
+ const res = await this.client.request(WALLET_GAMES_QUERY, variables);
5016
+ if (!res.ok) return res;
5017
+ if (!res.data.games) {
5018
+ return {
5019
+ ok: false,
5020
+ error: {
5021
+ name: "UnknownError",
5022
+ message: "Something went wrong."
5023
+ }
5024
+ };
5025
+ }
5026
+ return {
5027
+ ok: true,
5028
+ data: res.data.games
5029
+ };
5030
+ }
4993
5031
  };
4994
5032
 
4995
5033
  // src/utils/clone-date.ts
@@ -9083,6 +9121,25 @@ var Sdk = class {
9083
9121
  }
9084
9122
  };
9085
9123
  }
9124
+ async walletGames(input) {
9125
+ console.warn(
9126
+ "'walletGames games' is deprecated. This is for testing purpose only."
9127
+ );
9128
+ const res = await this.walletService.walletGames(input);
9129
+ if (!res.ok) return res;
9130
+ return {
9131
+ ok: true,
9132
+ data: {
9133
+ games: res.data.edges.map(({ cursor, node }) => ({
9134
+ ...node,
9135
+ cursor
9136
+ })),
9137
+ totalCount: res.data.totalCount,
9138
+ hasNextPage: res.data.pageInfo.hasNextPage,
9139
+ endCursor: res.data.pageInfo.endCursor ?? void 0
9140
+ }
9141
+ };
9142
+ }
9086
9143
  async games__next(input) {
9087
9144
  const res = await this.cmsPortalService.games__next(input);
9088
9145
  if (!res.ok) return res;