@opexa/portal-sdk 0.59.71 → 0.59.72

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.
@@ -3319,6 +3319,30 @@ var FAVORITE_GAMES_QUERY = gql`
3319
3319
  }
3320
3320
  }
3321
3321
  `;
3322
+ var FAVORITE_GAMES_QUERY__NEXT = gql`
3323
+ query FavoriteGames {
3324
+ favoriteGames {
3325
+ id
3326
+ }
3327
+ }
3328
+ `;
3329
+ var RECENT_GAMES_QUERY = gql`
3330
+ query RecentGames {
3331
+ recentGames {
3332
+ id
3333
+ }
3334
+ }
3335
+ `;
3336
+ var ADD_FAVORITE_GAME_MUTATION = gql`
3337
+ mutation AddFavoriteGame($game: ObjectId!) {
3338
+ addFavoriteGame(input: { game: $game })
3339
+ }
3340
+ `;
3341
+ var REMOVE_FAVORITE_GAME_MUTATION = gql`
3342
+ mutation RemoveFavoriteGame($game: ObjectId!) {
3343
+ removeFavoriteGame(input: { game: $game })
3344
+ }
3345
+ `;
3322
3346
  var WALLET_GAMES_QUERY = gql`
3323
3347
  query Games($first: Int $after: Cursor, $filter: GameFilterInput) {
3324
3348
  games(first: $first, after: $after, filter: $filter) {
@@ -5057,6 +5081,74 @@ var PortalService = class {
5057
5081
  data: res.data.recommendedGames
5058
5082
  };
5059
5083
  }
5084
+ async favoriteGames() {
5085
+ const res = await this.client.request(
5086
+ FAVORITE_GAMES_QUERY__NEXT
5087
+ );
5088
+ if (!res.ok) return res;
5089
+ if (!res.data.favoriteGames) {
5090
+ return {
5091
+ ok: false,
5092
+ error: {
5093
+ name: "UnknownError",
5094
+ message: "Something went wrong."
5095
+ }
5096
+ };
5097
+ }
5098
+ return {
5099
+ ok: true,
5100
+ data: res.data.favoriteGames
5101
+ };
5102
+ }
5103
+ async recentGames() {
5104
+ const res = await this.client.request(RECENT_GAMES_QUERY);
5105
+ if (!res.ok) return res;
5106
+ if (!res.data.recentGames) {
5107
+ return {
5108
+ ok: false,
5109
+ error: {
5110
+ name: "UnknownError",
5111
+ message: "Something went wrong."
5112
+ }
5113
+ };
5114
+ }
5115
+ return {
5116
+ ok: true,
5117
+ data: res.data.recentGames
5118
+ };
5119
+ }
5120
+ async addFavoriteGame(variables) {
5121
+ const res = await this.client.request(ADD_FAVORITE_GAME_MUTATION, variables);
5122
+ if (!res.ok) return res;
5123
+ if (!res.data.addFavoriteGame) {
5124
+ return {
5125
+ ok: false,
5126
+ error: {
5127
+ name: "UnknownError",
5128
+ message: "Something went wrong."
5129
+ }
5130
+ };
5131
+ }
5132
+ return {
5133
+ ok: true
5134
+ };
5135
+ }
5136
+ async removeFavoriteGame(variables) {
5137
+ const res = await this.client.request(REMOVE_FAVORITE_GAME_MUTATION, variables);
5138
+ if (!res.ok) return res;
5139
+ if (!res.data.removeFavoriteGame) {
5140
+ return {
5141
+ ok: false,
5142
+ error: {
5143
+ name: "UnknownError",
5144
+ message: "Something went wrong."
5145
+ }
5146
+ };
5147
+ }
5148
+ return {
5149
+ ok: true
5150
+ };
5151
+ }
5060
5152
  async onboardingStatus() {
5061
5153
  const res = await this.client.request(
5062
5154
  ONBOARDING_STATUS_QUERY