@opexa/portal-sdk 0.59.88 → 0.59.90

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.
@@ -3817,6 +3817,79 @@ var MEMBER_FREE_BET_DROPS_QUERY = gql`
3817
3817
  }
3818
3818
  }
3819
3819
  `;
3820
+ var _GAMES_QUERY = gql`
3821
+ query _Games($first: Int, $after: Cursor, $filter: GameFilterInput) {
3822
+ games(first: $first, after: $after, filter: $filter) {
3823
+ edges {
3824
+ cursor
3825
+ node {
3826
+ ... on Game {
3827
+ id
3828
+ name
3829
+ displayName
3830
+ type
3831
+ provider
3832
+ reference
3833
+ hidden
3834
+ image
3835
+ }
3836
+ }
3837
+ }
3838
+ pageInfo {
3839
+ hasNextPage
3840
+ endCursor
3841
+ }
3842
+ }
3843
+ }
3844
+ `;
3845
+ var _GAME_GROUPS_QUERY = gql`
3846
+ query _GameGroups {
3847
+ gameGroups {
3848
+ id
3849
+ name
3850
+ }
3851
+ }
3852
+ `;
3853
+ var _GAME_GROUP_NODE_QUERY = gql`
3854
+ query _GameGroupNode($id: ObjectId!, $limit: Int, $offset: Int) {
3855
+ node(id: $id) {
3856
+ ... on GameGroup {
3857
+ id
3858
+ name
3859
+ games(limit: $limit, offset: $offset) {
3860
+ id
3861
+ name
3862
+ displayName
3863
+ type
3864
+ provider
3865
+ reference
3866
+ hidden
3867
+ image
3868
+ }
3869
+ }
3870
+ }
3871
+ }
3872
+ `;
3873
+ var _GAME_NODE_QUERY = gql`
3874
+ query _GameNode($id: ObjectId!) {
3875
+ node(id: $id) {
3876
+ ... on Game {
3877
+ id
3878
+ name
3879
+ displayName
3880
+ type
3881
+ provider
3882
+ reference
3883
+ hidden
3884
+ image
3885
+ groups {
3886
+ id
3887
+ name
3888
+ }
3889
+ }
3890
+ }
3891
+ }
3892
+ `;
3820
3893
 
3821
3894
  // src/services/utils.ts
3822
3895
  function createOperationError(code) {
@@ -4744,6 +4817,12 @@ var AuthService = class {
4744
4817
  error: createOperationError("AccountSuspendedError")
4745
4818
  };
4746
4819
  }
4820
+ if (body.code === "REFRESH_TOKEN_EXPIRED") {
4821
+ return {
4822
+ ok: false,
4823
+ error: createOperationError("SessionExpiredError")
4824
+ };
4825
+ }
4747
4826
  if (res.status === 403 || res.status === 401) {
4748
4827
  return {
4749
4828
  ok: false,
@@ -5221,6 +5300,66 @@ var PortalService = class {
5221
5300
  data: res.data
5222
5301
  };
5223
5302
  }
5303
+ async _games(variables) {
5304
+ const res = await this.client.request(
5305
+ _GAMES_QUERY,
5306
+ variables
5307
+ );
5308
+ if (!res.ok) return res;
5309
+ if (!res.data.games) {
5310
+ return {
5311
+ ok: false,
5312
+ error: {
5313
+ name: "UnknownError",
5314
+ message: "Something went wrong."
5315
+ }
5316
+ };
5317
+ }
5318
+ return {
5319
+ ok: true,
5320
+ data: res.data.games
5321
+ };
5322
+ }
5323
+ async _gameGroups() {
5324
+ const res = await this.client.request(
5325
+ _GAME_GROUPS_QUERY
5326
+ );
5327
+ if (!res.ok) return res;
5328
+ if (!res.data.gameGroups) {
5329
+ return {
5330
+ ok: false,
5331
+ error: {
5332
+ name: "UnknownError",
5333
+ message: "Something went wrong."
5334
+ }
5335
+ };
5336
+ }
5337
+ return {
5338
+ ok: true,
5339
+ data: res.data.gameGroups
5340
+ };
5341
+ }
5342
+ async _gameGroupNode(id, limit, offset) {
5343
+ const res = await this.client.request(
5344
+ _GAME_GROUP_NODE_QUERY,
5345
+ { id, limit, offset }
5346
+ );
5347
+ if (!res.ok) return res;
5348
+ return {
5349
+ ok: true,
5350
+ data: res.data.node
5351
+ };
5352
+ }
5353
+ async _gameNode(id) {
5354
+ const res = await this.client.request(_GAME_NODE_QUERY, {
5355
+ id
5356
+ });
5357
+ if (!res.ok) return res;
5358
+ return {
5359
+ ok: true,
5360
+ data: res.data.node
5361
+ };
5362
+ }
5224
5363
  async recommendedGames() {
5225
5364
  const res = await this.client.request(
5226
5365
  RECOMMENDED_GAMES_QUERY