@opexa/portal-sdk 0.59.87 → 0.59.89

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) {
@@ -5221,6 +5294,66 @@ var PortalService = class {
5221
5294
  data: res.data
5222
5295
  };
5223
5296
  }
5297
+ async _games(variables) {
5298
+ const res = await this.client.request(
5299
+ _GAMES_QUERY,
5300
+ variables
5301
+ );
5302
+ if (!res.ok) return res;
5303
+ if (!res.data.games) {
5304
+ return {
5305
+ ok: false,
5306
+ error: {
5307
+ name: "UnknownError",
5308
+ message: "Something went wrong."
5309
+ }
5310
+ };
5311
+ }
5312
+ return {
5313
+ ok: true,
5314
+ data: res.data.games
5315
+ };
5316
+ }
5317
+ async _gameGroups() {
5318
+ const res = await this.client.request(
5319
+ _GAME_GROUPS_QUERY
5320
+ );
5321
+ if (!res.ok) return res;
5322
+ if (!res.data.gameGroups) {
5323
+ return {
5324
+ ok: false,
5325
+ error: {
5326
+ name: "UnknownError",
5327
+ message: "Something went wrong."
5328
+ }
5329
+ };
5330
+ }
5331
+ return {
5332
+ ok: true,
5333
+ data: res.data.gameGroups
5334
+ };
5335
+ }
5336
+ async _gameGroupNode(id, limit, offset) {
5337
+ const res = await this.client.request(
5338
+ _GAME_GROUP_NODE_QUERY,
5339
+ { id, limit, offset }
5340
+ );
5341
+ if (!res.ok) return res;
5342
+ return {
5343
+ ok: true,
5344
+ data: res.data.node
5345
+ };
5346
+ }
5347
+ async _gameNode(id) {
5348
+ const res = await this.client.request(_GAME_NODE_QUERY, {
5349
+ id
5350
+ });
5351
+ if (!res.ok) return res;
5352
+ return {
5353
+ ok: true,
5354
+ data: res.data.node
5355
+ };
5356
+ }
5224
5357
  async recommendedGames() {
5225
5358
  const res = await this.client.request(
5226
5359
  RECOMMENDED_GAMES_QUERY