@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.
@@ -3407,6 +3407,75 @@ var PLATFORM_GAMES_QUERY = gql`
3407
3407
  }
3408
3408
  }
3409
3409
  `;
3410
+ var GAME_GROUPS_QUERY = gql`
3411
+ query GameGroups(
3412
+ $first: Int
3413
+ $after: Cursor
3414
+ $filter: GameGroupFilterInput
3415
+ $sort: GameGroupSortInput
3416
+ $limit: Int,
3417
+ $offset: Int,
3418
+ ) {
3419
+ gameGroups(first: $first, after: $after, filter: $filter, sort: $sort) {
3420
+ totalCount
3421
+ pageInfo {
3422
+ hasNextPage
3423
+ endCursor
3424
+ }
3425
+ edges {
3426
+ cursor
3427
+ node {
3428
+ ... on GameGroup {
3429
+ id
3430
+ name
3431
+
3432
+ games(limit: $limit, offset: $offset) {
3433
+ id
3434
+ reference
3435
+ name
3436
+ displayName
3437
+ type
3438
+ provider
3439
+
3440
+ status
3441
+ hidden
3442
+ hasFreeBet
3443
+ hasJackpot
3444
+ image
3445
+ }
3446
+ dateTimeLastUpdated
3447
+ dateTimeCreated
3448
+ }
3449
+ }
3450
+ }
3451
+ }
3452
+ }
3453
+ `;
3454
+ var GAME_GROUP_QUERY = gql`
3455
+ query GameGroup($id: ObjectId!) {
3456
+ node(id: $id) {
3457
+ ... on GameGroup {
3458
+ id
3459
+ name
3460
+ games {
3461
+ id
3462
+ reference
3463
+ name
3464
+ displayName
3465
+ type
3466
+ provider
3467
+ status
3468
+ hidden
3469
+ hasFreeBet
3470
+ hasJackpot
3471
+ image
3472
+ }
3473
+ dateTimeLastUpdated
3474
+ dateTimeCreated
3475
+ }
3476
+ }
3477
+ }
3478
+ `;
3410
3479
  var GOOGLE_CLIEND_ID_QUERY = gql`
3411
3480
  query GoogleClientId {
3412
3481
  googleClientId
@@ -4678,7 +4747,7 @@ var AuthService = class {
4678
4747
  return true;
4679
4748
  }
4680
4749
  }
4681
- async sendVerificationCode(input) {
4750
+ async sendVerificationCode(input, version = 1) {
4682
4751
  if (input.channel === "EMAIL")
4683
4752
  throw new Error("Email channel is not yet supported");
4684
4753
  function getErrorCode(message) {
@@ -4694,7 +4763,7 @@ var AuthService = class {
4694
4763
  }
4695
4764
  }
4696
4765
  try {
4697
- const res = await fetch(`${this.url}/otps`, {
4766
+ const res = await fetch(`${this.url}${version !== 1 ? `/v${version}/otps` : "/otps"}`, {
4698
4767
  method: "POST",
4699
4768
  headers: this.headers,
4700
4769
  body: JSON.stringify(input)
@@ -6494,6 +6563,27 @@ var WalletService = class {
6494
6563
  ok: true
6495
6564
  };
6496
6565
  }
6566
+ async gameGroups(variables) {
6567
+ const res = await this.client.request(GAME_GROUPS_QUERY, variables);
6568
+ if (!res.ok) return res;
6569
+ if (!res.data.gameGroups) {
6570
+ return {
6571
+ ok: false,
6572
+ error: {
6573
+ name: "UnknownError",
6574
+ message: "Something went wrong."
6575
+ }
6576
+ };
6577
+ }
6578
+ return {
6579
+ ok: true,
6580
+ data: res.data.gameGroups
6581
+ };
6582
+ }
6583
+ async gameGroup(variables) {
6584
+ const res = await this.client.request(GAME_GROUP_QUERY, variables);
6585
+ return res.ok ? { ok: res.ok, data: res.data.node } : res;
6586
+ }
6497
6587
  };
6498
6588
 
6499
6589
  // src/services/extension.service.ts
@@ -6529,5 +6619,5 @@ var ExtensionService = class {
6529
6619
  };
6530
6620
 
6531
6621
  export { AccountService, AuthService, CmsPortalService, ExtensionService, FileService, GameService, PortalService, ReportService, TriggerService, WalletService, getFingerPrint };
6532
- //# sourceMappingURL=chunk-CBF46HKK.js.map
6533
- //# sourceMappingURL=chunk-CBF46HKK.js.map
6622
+ //# sourceMappingURL=chunk-IT7ND6PF.js.map
6623
+ //# sourceMappingURL=chunk-IT7ND6PF.js.map