@opexa/portal-sdk 0.59.81 → 0.59.83

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
@@ -3438,6 +3438,75 @@ var PLATFORM_GAMES_QUERY = gql`
3438
3438
  }
3439
3439
  }
3440
3440
  `;
3441
+ var GAME_GROUPS_QUERY = gql`
3442
+ query GameGroups(
3443
+ $first: Int
3444
+ $after: Cursor
3445
+ $filter: GameGroupFilterInput
3446
+ $sort: GameGroupSortInput
3447
+ $limit: Int,
3448
+ $offset: Int,
3449
+ ) {
3450
+ gameGroups(first: $first, after: $after, filter: $filter, sort: $sort) {
3451
+ totalCount
3452
+ pageInfo {
3453
+ hasNextPage
3454
+ endCursor
3455
+ }
3456
+ edges {
3457
+ cursor
3458
+ node {
3459
+ ... on GameGroup {
3460
+ id
3461
+ name
3462
+
3463
+ games(limit: $limit, offset: $offset) {
3464
+ id
3465
+ reference
3466
+ name
3467
+ displayName
3468
+ type
3469
+ provider
3470
+
3471
+ status
3472
+ hidden
3473
+ hasFreeBet
3474
+ hasJackpot
3475
+ image
3476
+ }
3477
+ dateTimeLastUpdated
3478
+ dateTimeCreated
3479
+ }
3480
+ }
3481
+ }
3482
+ }
3483
+ }
3484
+ `;
3485
+ var GAME_GROUP_QUERY = gql`
3486
+ query GameGroup($id: ObjectId!) {
3487
+ node(id: $id) {
3488
+ ... on GameGroup {
3489
+ id
3490
+ name
3491
+ games {
3492
+ id
3493
+ reference
3494
+ name
3495
+ displayName
3496
+ type
3497
+ provider
3498
+ status
3499
+ hidden
3500
+ hasFreeBet
3501
+ hasJackpot
3502
+ image
3503
+ }
3504
+ dateTimeLastUpdated
3505
+ dateTimeCreated
3506
+ }
3507
+ }
3508
+ }
3509
+ `;
3441
3510
  var GOOGLE_CLIEND_ID_QUERY = gql`
3442
3511
  query GoogleClientId {
3443
3512
  googleClientId
@@ -6555,6 +6624,27 @@ var WalletService = class {
6555
6624
  ok: true
6556
6625
  };
6557
6626
  }
6627
+ async gameGroups(variables) {
6628
+ const res = await this.client.request(GAME_GROUPS_QUERY, variables);
6629
+ if (!res.ok) return res;
6630
+ if (!res.data.gameGroups) {
6631
+ return {
6632
+ ok: false,
6633
+ error: {
6634
+ name: "UnknownError",
6635
+ message: "Something went wrong."
6636
+ }
6637
+ };
6638
+ }
6639
+ return {
6640
+ ok: true,
6641
+ data: res.data.gameGroups
6642
+ };
6643
+ }
6644
+ async gameGroup(variables) {
6645
+ const res = await this.client.request(GAME_GROUP_QUERY, variables);
6646
+ return res.ok ? { ok: res.ok, data: res.data.node } : res;
6647
+ }
6558
6648
  };
6559
6649
 
6560
6650
  // src/services/extension.service.ts
@@ -11650,6 +11740,30 @@ var Sdk = class {
11650
11740
  }
11651
11741
  };
11652
11742
  }
11743
+ async gameGroups(input) {
11744
+ const res = await this.walletService.gameGroups(input);
11745
+ if (!res.ok) return res;
11746
+ return {
11747
+ ok: true,
11748
+ data: {
11749
+ gameGroups: res.data.edges.map(({ cursor, node }) => ({
11750
+ ...node,
11751
+ cursor
11752
+ })),
11753
+ totalCount: res.data.totalCount,
11754
+ hasNextPage: res.data.pageInfo.hasNextPage,
11755
+ endCursor: res.data.pageInfo.endCursor ?? void 0
11756
+ }
11757
+ };
11758
+ }
11759
+ async gameGroup(input) {
11760
+ const res = await this.walletService.gameGroup(input);
11761
+ if (!res.ok) return res;
11762
+ return {
11763
+ ok: true,
11764
+ data: res.data ?? null
11765
+ };
11766
+ }
11653
11767
  async games__next(input) {
11654
11768
  const res = await this.cmsPortalService.games__next(input);
11655
11769
  if (!res.ok) return res;