@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.
@@ -3806,6 +3806,79 @@ var MEMBER_FREE_BET_DROPS_QUERY = gql`
3806
3806
  }
3807
3807
  }
3808
3808
  `;
3809
+ var _GAMES_QUERY = gql`
3810
+ query _Games($first: Int, $after: Cursor, $filter: GameFilterInput) {
3811
+ games(first: $first, after: $after, filter: $filter) {
3812
+ edges {
3813
+ cursor
3814
+ node {
3815
+ ... on Game {
3816
+ id
3817
+ name
3818
+ displayName
3819
+ type
3820
+ provider
3821
+ reference
3822
+ hidden
3823
+ image
3824
+ }
3825
+ }
3826
+ }
3827
+ pageInfo {
3828
+ hasNextPage
3829
+ endCursor
3830
+ }
3831
+ }
3832
+ }
3833
+ `;
3834
+ var _GAME_GROUPS_QUERY = gql`
3835
+ query _GameGroups {
3836
+ gameGroups {
3837
+ id
3838
+ name
3839
+ }
3840
+ }
3841
+ `;
3842
+ var _GAME_GROUP_NODE_QUERY = gql`
3843
+ query _GameGroupNode($id: ObjectId!, $limit: Int, $offset: Int) {
3844
+ node(id: $id) {
3845
+ ... on GameGroup {
3846
+ id
3847
+ name
3848
+ games(limit: $limit, offset: $offset) {
3849
+ id
3850
+ name
3851
+ displayName
3852
+ type
3853
+ provider
3854
+ reference
3855
+ hidden
3856
+ image
3857
+ }
3858
+ }
3859
+ }
3860
+ }
3861
+ `;
3862
+ var _GAME_NODE_QUERY = gql`
3863
+ query _GameNode($id: ObjectId!) {
3864
+ node(id: $id) {
3865
+ ... on Game {
3866
+ id
3867
+ name
3868
+ displayName
3869
+ type
3870
+ provider
3871
+ reference
3872
+ hidden
3873
+ image
3874
+ groups {
3875
+ id
3876
+ name
3877
+ }
3878
+ }
3879
+ }
3880
+ }
3881
+ `;
3809
3882
 
3810
3883
  // src/services/utils.ts
3811
3884
  function createOperationError(code) {
@@ -4715,6 +4788,12 @@ var AuthService = class {
4715
4788
  error: createOperationError("AccountSuspendedError")
4716
4789
  };
4717
4790
  }
4791
+ if (body.code === "REFRESH_TOKEN_EXPIRED") {
4792
+ return {
4793
+ ok: false,
4794
+ error: createOperationError("SessionExpiredError")
4795
+ };
4796
+ }
4718
4797
  if (res.status === 403 || res.status === 401) {
4719
4798
  return {
4720
4799
  ok: false,
@@ -5180,6 +5259,66 @@ var PortalService = class {
5180
5259
  data: res.data
5181
5260
  };
5182
5261
  }
5262
+ async _games(variables) {
5263
+ const res = await this.client.request(
5264
+ _GAMES_QUERY,
5265
+ variables
5266
+ );
5267
+ if (!res.ok) return res;
5268
+ if (!res.data.games) {
5269
+ return {
5270
+ ok: false,
5271
+ error: {
5272
+ name: "UnknownError",
5273
+ message: "Something went wrong."
5274
+ }
5275
+ };
5276
+ }
5277
+ return {
5278
+ ok: true,
5279
+ data: res.data.games
5280
+ };
5281
+ }
5282
+ async _gameGroups() {
5283
+ const res = await this.client.request(
5284
+ _GAME_GROUPS_QUERY
5285
+ );
5286
+ if (!res.ok) return res;
5287
+ if (!res.data.gameGroups) {
5288
+ return {
5289
+ ok: false,
5290
+ error: {
5291
+ name: "UnknownError",
5292
+ message: "Something went wrong."
5293
+ }
5294
+ };
5295
+ }
5296
+ return {
5297
+ ok: true,
5298
+ data: res.data.gameGroups
5299
+ };
5300
+ }
5301
+ async _gameGroupNode(id, limit, offset) {
5302
+ const res = await this.client.request(
5303
+ _GAME_GROUP_NODE_QUERY,
5304
+ { id, limit, offset }
5305
+ );
5306
+ if (!res.ok) return res;
5307
+ return {
5308
+ ok: true,
5309
+ data: res.data.node
5310
+ };
5311
+ }
5312
+ async _gameNode(id) {
5313
+ const res = await this.client.request(_GAME_NODE_QUERY, {
5314
+ id
5315
+ });
5316
+ if (!res.ok) return res;
5317
+ return {
5318
+ ok: true,
5319
+ data: res.data.node
5320
+ };
5321
+ }
5183
5322
  async recommendedGames() {
5184
5323
  const res = await this.client.request(
5185
5324
  RECOMMENDED_GAMES_QUERY
@@ -6640,5 +6779,5 @@ var ExtensionService = class {
6640
6779
  };
6641
6780
 
6642
6781
  export { AccountService, AuthService, CmsPortalService, ExtensionService, FileService, GameService, PortalService, ReportService, TriggerService, WalletService, getFingerPrint };
6643
- //# sourceMappingURL=chunk-AOATA4DJ.js.map
6644
- //# sourceMappingURL=chunk-AOATA4DJ.js.map
6782
+ //# sourceMappingURL=chunk-HJSVCLHQ.js.map
6783
+ //# sourceMappingURL=chunk-HJSVCLHQ.js.map