@opexa/portal-sdk 0.59.64 → 0.59.65

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
@@ -3090,6 +3090,26 @@ var TOP_WINS_NEXT_QUERY = gql`
3090
3090
  }
3091
3091
  }
3092
3092
  `;
3093
+ var TOP_WINS_QUERY__NEXT = gql`
3094
+ query TopWins {
3095
+ topWins: _topWins {
3096
+ id
3097
+ game {
3098
+ id
3099
+ name
3100
+ type
3101
+ provider
3102
+ reference
3103
+ }
3104
+ member {
3105
+ id
3106
+ name
3107
+ }
3108
+ multiplier
3109
+ payout
3110
+ }
3111
+ }
3112
+ `;
3093
3113
  var JACKPOTS_QUERY = gql`
3094
3114
  query Jackpots(
3095
3115
  $first: Int
@@ -5109,6 +5129,20 @@ var PortalService = class {
5109
5129
  data: res.data._topWins
5110
5130
  };
5111
5131
  }
5132
+ async topWins__next() {
5133
+ const res = await this.client.request(
5134
+ TOP_WINS_QUERY__NEXT,
5135
+ void 0,
5136
+ {
5137
+ method: "GET"
5138
+ }
5139
+ );
5140
+ if (!res.ok) return res;
5141
+ return {
5142
+ ok: true,
5143
+ data: res.data.topWins
5144
+ };
5145
+ }
5112
5146
  };
5113
5147
 
5114
5148
  // src/services/report.service.ts
@@ -5441,16 +5475,24 @@ var WalletService = class {
5441
5475
  this.client = client;
5442
5476
  }
5443
5477
  async promos() {
5444
- const res = await this.client.request(PROMOS_QUERY);
5478
+ const res = await this.client.request(PROMOS_QUERY, void 0, {
5479
+ method: "GET"
5480
+ });
5445
5481
  return res.ok ? { ok: res.ok, data: res.data.promos } : res;
5446
5482
  }
5447
5483
  async cashbacks() {
5448
- const res = await this.client.request(CASHBACKS_QUERY);
5484
+ const res = await this.client.request(CASHBACKS_QUERY, void 0, {
5485
+ method: "GET"
5486
+ });
5449
5487
  return res.ok ? { ok: res.ok, data: res.data.cashbacks } : res;
5450
5488
  }
5451
5489
  async promosAndCashbacks() {
5452
5490
  const res = await this.client.request(
5453
- PROMOS_AND_CASHBACKS_QUERY
5491
+ PROMOS_AND_CASHBACKS_QUERY,
5492
+ void 0,
5493
+ {
5494
+ method: "GET"
5495
+ }
5454
5496
  );
5455
5497
  return res.ok ? {
5456
5498
  ok: res.ok,
@@ -7767,6 +7809,7 @@ var Transformer = class {
7767
7809
  promoByCode: this.promoByCode.bind(this),
7768
7810
  quest: this.quest.bind(this),
7769
7811
  topWin: this.topWin.bind(this),
7812
+ topWin__next: this.topWin__next.bind(this),
7770
7813
  jackpots: this.jackpots.bind(this),
7771
7814
  jackpotPayouts: this.jackpotPayouts.bind(this),
7772
7815
  tournaments: this.tournaments.bind(this),
@@ -9283,6 +9326,19 @@ var Transformer = class {
9283
9326
  payout: parseDecimal(data.payout, 0)
9284
9327
  };
9285
9328
  }
9329
+ topWin__next(data) {
9330
+ const image = `${ENDPOINTS.production.static}/images/${data.game.provider.toLowerCase()}/thumbnail-${data.game.id}.webp?cache_id=${IMAGE_CACHE_ID}`;
9331
+ return {
9332
+ id: data.id,
9333
+ game: {
9334
+ ...data.game,
9335
+ images: [image]
9336
+ },
9337
+ member: data.member,
9338
+ multiplier: parseDecimal(data.multiplier, 0),
9339
+ payout: parseDecimal(data.payout, 0)
9340
+ };
9341
+ }
9286
9342
  jackpots(data) {
9287
9343
  return {
9288
9344
  id: data.id,
@@ -11804,6 +11860,14 @@ var Sdk = class {
11804
11860
  })
11805
11861
  };
11806
11862
  }
11863
+ async topWins__next() {
11864
+ const res = await this.portalService.topWins__next();
11865
+ if (!res.ok) return res;
11866
+ return {
11867
+ ok: true,
11868
+ data: res.data.map(this.transformer.transform.topWin__next)
11869
+ };
11870
+ }
11807
11871
  /*
11808
11872
  *=============================================
11809
11873
  * JACKPOT