@opexa/portal-sdk 0.59.80 → 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.
@@ -3418,6 +3418,75 @@ var PLATFORM_GAMES_QUERY = gql`
3418
3418
  }
3419
3419
  }
3420
3420
  `;
3421
+ var GAME_GROUPS_QUERY = gql`
3422
+ query GameGroups(
3423
+ $first: Int
3424
+ $after: Cursor
3425
+ $filter: GameGroupFilterInput
3426
+ $sort: GameGroupSortInput
3427
+ $limit: Int,
3428
+ $offset: Int,
3429
+ ) {
3430
+ gameGroups(first: $first, after: $after, filter: $filter, sort: $sort) {
3431
+ totalCount
3432
+ pageInfo {
3433
+ hasNextPage
3434
+ endCursor
3435
+ }
3436
+ edges {
3437
+ cursor
3438
+ node {
3439
+ ... on GameGroup {
3440
+ id
3441
+ name
3442
+
3443
+ games(limit: $limit, offset: $offset) {
3444
+ id
3445
+ reference
3446
+ name
3447
+ displayName
3448
+ type
3449
+ provider
3450
+
3451
+ status
3452
+ hidden
3453
+ hasFreeBet
3454
+ hasJackpot
3455
+ image
3456
+ }
3457
+ dateTimeLastUpdated
3458
+ dateTimeCreated
3459
+ }
3460
+ }
3461
+ }
3462
+ }
3463
+ }
3464
+ `;
3465
+ var GAME_GROUP_QUERY = gql`
3466
+ query GameGroup($id: ObjectId!) {
3467
+ node(id: $id) {
3468
+ ... on GameGroup {
3469
+ id
3470
+ name
3471
+ games {
3472
+ id
3473
+ reference
3474
+ name
3475
+ displayName
3476
+ type
3477
+ provider
3478
+ status
3479
+ hidden
3480
+ hasFreeBet
3481
+ hasJackpot
3482
+ image
3483
+ }
3484
+ dateTimeLastUpdated
3485
+ dateTimeCreated
3486
+ }
3487
+ }
3488
+ }
3489
+ `;
3421
3490
  var GOOGLE_CLIEND_ID_QUERY = gql`
3422
3491
  query GoogleClientId {
3423
3492
  googleClientId
@@ -4707,7 +4776,7 @@ var AuthService = class {
4707
4776
  return true;
4708
4777
  }
4709
4778
  }
4710
- async sendVerificationCode(input) {
4779
+ async sendVerificationCode(input, version = 1) {
4711
4780
  if (input.channel === "EMAIL")
4712
4781
  throw new Error("Email channel is not yet supported");
4713
4782
  function getErrorCode(message) {
@@ -4723,7 +4792,7 @@ var AuthService = class {
4723
4792
  }
4724
4793
  }
4725
4794
  try {
4726
- const res = await fetch(`${this.url}/otps`, {
4795
+ const res = await fetch(`${this.url}${version !== 1 ? `/v${version}/otps` : "/otps"}`, {
4727
4796
  method: "POST",
4728
4797
  headers: this.headers,
4729
4798
  body: JSON.stringify(input)
@@ -6535,6 +6604,27 @@ var WalletService = class {
6535
6604
  ok: true
6536
6605
  };
6537
6606
  }
6607
+ async gameGroups(variables) {
6608
+ const res = await this.client.request(GAME_GROUPS_QUERY, variables);
6609
+ if (!res.ok) return res;
6610
+ if (!res.data.gameGroups) {
6611
+ return {
6612
+ ok: false,
6613
+ error: {
6614
+ name: "UnknownError",
6615
+ message: "Something went wrong."
6616
+ }
6617
+ };
6618
+ }
6619
+ return {
6620
+ ok: true,
6621
+ data: res.data.gameGroups
6622
+ };
6623
+ }
6624
+ async gameGroup(variables) {
6625
+ const res = await this.client.request(GAME_GROUP_QUERY, variables);
6626
+ return res.ok ? { ok: res.ok, data: res.data.node } : res;
6627
+ }
6538
6628
  };
6539
6629
 
6540
6630
  // src/services/extension.service.ts